@kong-ui-public/entities-shared 3.3.1-pr.1431.724700.0 → 3.3.1
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 Fn, ref as R, unref as T, computed as k, watch as Ae, defineComponent as P, openBlock as m, createBlock as M, resolveDynamicComponent as
|
|
1
|
+
import { inject as Fn, ref as R, unref as T, computed as k, watch as Ae, defineComponent as P, openBlock as m, createBlock as M, resolveDynamicComponent as se, normalizeClass as fe, withCtx as b, createElementBlock as S, createElementVNode as L, toDisplayString as $, createCommentVNode as D, Fragment as ue, renderList as oe, resolveComponent as K, createVNode as B, createTextVNode as V, useCssVars as $t, useSlots as Xe, renderSlot as z, createSlots as _e, normalizeProps as On, guardReactiveProps as $n, mergeProps as Ln, normalizeStyle as Se, pushScopeId as Ie, popScopeId as Ee, onBeforeMount as Lt, withModifiers as Ye, onMounted as Nn, onUnmounted as Bn, withDirectives as me, vShow as ge, withKeys as Rn, Teleport as Mn } from "vue";
|
|
2
2
|
import st from "axios";
|
|
3
3
|
import { createI18n as Kn, i18nTComponent as Dn } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as Un } from "@kong/kongponents";
|
|
@@ -288,8 +288,8 @@ function ar(e, t, n, r = {
|
|
|
288
288
|
const x = await Promise.all(O), U = /* @__PURE__ */ new Set();
|
|
289
289
|
u.value = [], (I = x == null ? void 0 : x.forEach) == null || I.call(x, (F) => {
|
|
290
290
|
var A;
|
|
291
|
-
(A = F == null ? void 0 : F.forEach) == null || A.call(F, (
|
|
292
|
-
U.has(
|
|
291
|
+
(A = F == null ? void 0 : F.forEach) == null || A.call(F, (q) => {
|
|
292
|
+
U.has(q.id) || (U.add(q.id), u.value.push(q));
|
|
293
293
|
});
|
|
294
294
|
});
|
|
295
295
|
} else
|
|
@@ -548,14 +548,14 @@ const Y = {
|
|
|
548
548
|
var s;
|
|
549
549
|
return t.isArrayItem ? (s = a.value) != null && s.name ? r(a.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
550
550
|
});
|
|
551
|
-
return (s, c) => (m(), M(
|
|
551
|
+
return (s, c) => (m(), M(se(e.isArrayItem ? "fieldset" : "div"), {
|
|
552
552
|
class: fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
553
553
|
}, {
|
|
554
554
|
default: b(() => [
|
|
555
555
|
e.isArrayItem ? (m(), S("legend", br, [
|
|
556
556
|
L("b", null, $(l.value), 1)
|
|
557
557
|
])) : D("", !0),
|
|
558
|
-
(m(!0), S(
|
|
558
|
+
(m(!0), S(ue, null, oe(Object.keys(o.value), (d, u) => (m(), M(Dt, {
|
|
559
559
|
key: `${i.value}-property-${u}`,
|
|
560
560
|
item: {
|
|
561
561
|
key: d,
|
|
@@ -799,13 +799,13 @@ const Y = {
|
|
|
799
799
|
rowValue: e.item.value
|
|
800
800
|
}, () => [
|
|
801
801
|
l.value ? (m(), S("div", Rr, [
|
|
802
|
-
(m(), M(
|
|
802
|
+
(m(), M(se(u.value.tag), On($n(u.value.attrs)), {
|
|
803
803
|
default: b(() => [
|
|
804
804
|
u.value.additionalComponent === "KBadge" ? (m(), S("div", {
|
|
805
805
|
key: 0,
|
|
806
806
|
"data-testid": `${e.item.key}-badge-tags`
|
|
807
807
|
}, [
|
|
808
|
-
(m(!0), S(
|
|
808
|
+
(m(!0), S(ue, null, oe(e.item.value, (h, I) => (m(), M(N, {
|
|
809
809
|
key: `${e.item.key}-badge-tag-${I}`,
|
|
810
810
|
class: "config-badge",
|
|
811
811
|
"data-testid": `${e.item.key}-badge-tag-${I}`,
|
|
@@ -823,7 +823,7 @@ const Y = {
|
|
|
823
823
|
class: "copy-uuid-array",
|
|
824
824
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
825
825
|
}, [
|
|
826
|
-
(m(!0), S(
|
|
826
|
+
(m(!0), S(ue, null, oe(e.item.value, (h, I) => (m(), M(w, Ln({ ref_for: !0 }, u.value.childAttrs, {
|
|
827
827
|
key: `${e.item.key}-copy-uuid-${I}`,
|
|
828
828
|
"data-testid": `${e.item.key}-copy-uuid-${I}`,
|
|
829
829
|
text: h
|
|
@@ -833,7 +833,7 @@ const Y = {
|
|
|
833
833
|
class: "method-badge-array",
|
|
834
834
|
"data-testid": `${e.item.key}-badge-methods`
|
|
835
835
|
}, [
|
|
836
|
-
(m(!0), S(
|
|
836
|
+
(m(!0), S(ue, null, oe(e.item.value, (h, I) => (m(), M(N, {
|
|
837
837
|
key: `${e.item.key}-badge-method-${I}`,
|
|
838
838
|
appearance: Object.values(T(Un)).includes(h.toLowerCase()) ? h.toLowerCase() : "custom",
|
|
839
839
|
class: "config-badge",
|
|
@@ -849,7 +849,7 @@ const Y = {
|
|
|
849
849
|
key: 3,
|
|
850
850
|
"data-testid": `${n.item.key}-json-array-content`
|
|
851
851
|
}, [
|
|
852
|
-
(m(!0), S(
|
|
852
|
+
(m(!0), S(ue, null, oe(e.item.value, (h, I) => (m(), M(Kt, {
|
|
853
853
|
key: `json-array-item-${I}`,
|
|
854
854
|
index: I,
|
|
855
855
|
"is-array-item": "",
|
|
@@ -2187,19 +2187,19 @@ function qa(e) {
|
|
|
2187
2187
|
function Pa(e, t, n) {
|
|
2188
2188
|
var r = "", i = e.tag, a, o, l;
|
|
2189
2189
|
for (a = 0, o = n.length; a < o; a += 1)
|
|
2190
|
-
l = n[a], e.replacer && (l = e.replacer.call(n, String(a), l)), (
|
|
2190
|
+
l = n[a], e.replacer && (l = e.replacer.call(n, String(a), l)), (ce(e, t, l, !1, !1) || typeof l > "u" && ce(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2191
2191
|
e.tag = i, e.dump = "[" + r + "]";
|
|
2192
2192
|
}
|
|
2193
2193
|
function Et(e, t, n, r) {
|
|
2194
2194
|
var i = "", a = e.tag, o, l, s;
|
|
2195
2195
|
for (o = 0, l = n.length; o < l; o += 1)
|
|
2196
|
-
s = n[o], e.replacer && (s = e.replacer.call(n, String(o), s)), (
|
|
2196
|
+
s = n[o], e.replacer && (s = e.replacer.call(n, String(o), s)), (ce(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && ce(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i += Ge(e, t)), e.dump && $e === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2197
2197
|
e.tag = a, e.dump = i || "[]";
|
|
2198
2198
|
}
|
|
2199
2199
|
function Ha(e, t, n) {
|
|
2200
2200
|
var r = "", i = e.tag, a = Object.keys(n), o, l, s, c, d;
|
|
2201
2201
|
for (o = 0, l = a.length; o < l; o += 1)
|
|
2202
|
-
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = a[o], c = n[s], e.replacer && (c = e.replacer.call(n, s, c)),
|
|
2202
|
+
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = a[o], c = n[s], e.replacer && (c = e.replacer.call(n, s, c)), ce(e, t, s, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ce(e, t, c, !1, !1) && (d += e.dump, r += d));
|
|
2203
2203
|
e.tag = i, e.dump = "{" + r + "}";
|
|
2204
2204
|
}
|
|
2205
2205
|
function Va(e, t, n, r) {
|
|
@@ -2211,7 +2211,7 @@ function Va(e, t, n, r) {
|
|
|
2211
2211
|
else if (e.sortKeys)
|
|
2212
2212
|
throw new te("sortKeys must be a boolean or a function");
|
|
2213
2213
|
for (l = 0, s = o.length; l < s; l += 1)
|
|
2214
|
-
g = "", (!r || i !== "") && (g += Ge(e, t)), c = o[l], d = n[c], e.replacer && (d = e.replacer.call(n, c, d)),
|
|
2214
|
+
g = "", (!r || i !== "") && (g += Ge(e, t)), c = o[l], d = n[c], e.replacer && (d = e.replacer.call(n, c, d)), ce(e, t + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && $e === e.dump.charCodeAt(0) ? g += "?" : g += "? "), g += e.dump, u && (g += Ge(e, t)), ce(e, t + 1, d, !0, u) && (e.dump && $e === e.dump.charCodeAt(0) ? g += ":" : g += ": ", g += e.dump, i += g));
|
|
2215
2215
|
e.tag = a, e.dump = i || "{}";
|
|
2216
2216
|
}
|
|
2217
2217
|
function Tt(e, t, n) {
|
|
@@ -2231,7 +2231,7 @@ function Tt(e, t, n) {
|
|
|
2231
2231
|
}
|
|
2232
2232
|
return !1;
|
|
2233
2233
|
}
|
|
2234
|
-
function
|
|
2234
|
+
function ce(e, t, n, r, i, a, o) {
|
|
2235
2235
|
e.tag = null, e.dump = n, Tt(e, n, !1) || Tt(e, n, !0);
|
|
2236
2236
|
var l = vn.call(e.dump), s = r, c;
|
|
2237
2237
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
@@ -2281,7 +2281,7 @@ function Ya(e, t) {
|
|
|
2281
2281
|
var n = new Ba(t);
|
|
2282
2282
|
n.noRefs || za(e, n);
|
|
2283
2283
|
var r = e;
|
|
2284
|
-
return n.replacer && (r = n.replacer.call({ "": r }, "", r)),
|
|
2284
|
+
return n.replacer && (r = n.replacer.call({ "": r }, "", r)), ce(n, 0, r, !0, !0) ? n.dump + `
|
|
2285
2285
|
` : "";
|
|
2286
2286
|
}
|
|
2287
2287
|
var Wa = Ya, Ja = {
|
|
@@ -2400,15 +2400,15 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2400
2400
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
2401
2401
|
return delete o.created_at, delete o.updated_at, o;
|
|
2402
2402
|
});
|
|
2403
|
-
return (o, l) => (m(), S(
|
|
2403
|
+
return (o, l) => (m(), S(ue, null, [
|
|
2404
2404
|
e.format === "structured" ? (m(), S("div", po, [
|
|
2405
|
-
(m(!0), S(
|
|
2405
|
+
(m(!0), S(ue, null, oe(e.propListTypes, (s) => (m(), S("div", {
|
|
2406
2406
|
key: `config-card-details-${s}-props`,
|
|
2407
2407
|
class: fe(`config-card-details-${s}-props`),
|
|
2408
2408
|
"data-testid": `config-card-details-${s}-props`
|
|
2409
2409
|
}, [
|
|
2410
2410
|
s !== "basic" ? (m(), S("div", mo, $(s === "advanced" ? T(r)("baseConfigCard.sections.advanced") : T(r)("baseConfigCard.sections.plugin")), 1)) : D("", !0),
|
|
2411
|
-
(m(!0), S(
|
|
2411
|
+
(m(!0), S(ue, null, oe(e.propertyCollections[s], (c) => (m(), M(Dt, {
|
|
2412
2412
|
key: c.key,
|
|
2413
2413
|
item: c
|
|
2414
2414
|
}, _e({
|
|
@@ -2526,7 +2526,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2526
2526
|
lineHeight: "0",
|
|
2527
2527
|
width: n.value
|
|
2528
2528
|
}));
|
|
2529
|
-
return (i, a) => (m(), M(
|
|
2529
|
+
return (i, a) => (m(), M(se(e.as), {
|
|
2530
2530
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2531
2531
|
class: "kui-icon add-icon",
|
|
2532
2532
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
@@ -2625,7 +2625,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2625
2625
|
lineHeight: "0",
|
|
2626
2626
|
width: n.value
|
|
2627
2627
|
}));
|
|
2628
|
-
return (i, a) => (m(), M(
|
|
2628
|
+
return (i, a) => (m(), M(se(e.as), {
|
|
2629
2629
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2630
2630
|
class: "kui-icon book-icon",
|
|
2631
2631
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
@@ -2724,7 +2724,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2724
2724
|
lineHeight: "0",
|
|
2725
2725
|
width: n.value
|
|
2726
2726
|
}));
|
|
2727
|
-
return (i, a) => (m(), M(
|
|
2727
|
+
return (i, a) => (m(), M(se(e.as), {
|
|
2728
2728
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2729
2729
|
class: "kui-icon chevron-down-icon",
|
|
2730
2730
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
@@ -2823,7 +2823,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2823
2823
|
lineHeight: "0",
|
|
2824
2824
|
width: n.value
|
|
2825
2825
|
}));
|
|
2826
|
-
return (i, a) => (m(), M(
|
|
2826
|
+
return (i, a) => (m(), M(se(e.as), {
|
|
2827
2827
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2828
2828
|
class: "kui-icon close-icon",
|
|
2829
2829
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
@@ -2922,7 +2922,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2922
2922
|
lineHeight: "0",
|
|
2923
2923
|
width: n.value
|
|
2924
2924
|
}));
|
|
2925
|
-
return (i, a) => (m(), M(
|
|
2925
|
+
return (i, a) => (m(), M(se(e.as), {
|
|
2926
2926
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2927
2927
|
class: "kui-icon copy-icon",
|
|
2928
2928
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
@@ -3021,7 +3021,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3021
3021
|
lineHeight: "0",
|
|
3022
3022
|
width: n.value
|
|
3023
3023
|
}));
|
|
3024
|
-
return (i, a) => (m(), M(
|
|
3024
|
+
return (i, a) => (m(), M(se(e.as), {
|
|
3025
3025
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3026
3026
|
class: "kui-icon more-icon",
|
|
3027
3027
|
"data-testid": "kui-icon-wrapper-more-icon",
|
|
@@ -3183,23 +3183,23 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3183
3183
|
return [];
|
|
3184
3184
|
const f = [], E = Object.keys(v.value).length;
|
|
3185
3185
|
for (const F in v.value) {
|
|
3186
|
-
const A = (x = (O = r.configSchema) == null ? void 0 : O[F]) == null ? void 0 : x.order,
|
|
3187
|
-
let
|
|
3188
|
-
(
|
|
3186
|
+
const A = (x = (O = r.configSchema) == null ? void 0 : O[F]) == null ? void 0 : x.order, q = (U = u[F]) == null ? void 0 : U.order;
|
|
3187
|
+
let j = E;
|
|
3188
|
+
(q || q === 0) && (j = q === -1 ? E + 1 : q), A && (j = A === -1 ? E + 1 : A), f.push([F, j]);
|
|
3189
3189
|
}
|
|
3190
3190
|
return f.sort(function(F, A) {
|
|
3191
3191
|
return F[1] - A[1];
|
|
3192
3192
|
}), f.map((F) => {
|
|
3193
3193
|
var he, lt;
|
|
3194
|
-
const A = F[0],
|
|
3194
|
+
const A = F[0], q = (he = v.value) == null ? void 0 : he[A], j = ((lt = r.configSchema) == null ? void 0 : lt[A]) || {}, J = u[A];
|
|
3195
3195
|
return {
|
|
3196
3196
|
key: A,
|
|
3197
|
-
value:
|
|
3198
|
-
hidden:
|
|
3199
|
-
type:
|
|
3200
|
-
label:
|
|
3201
|
-
tooltip:
|
|
3202
|
-
section:
|
|
3197
|
+
value: q,
|
|
3198
|
+
hidden: j.hidden || !1,
|
|
3199
|
+
type: j.type ?? ((J == null ? void 0 : J.type) || H.Text),
|
|
3200
|
+
label: j.label ?? ((J == null ? void 0 : J.label) || o(A)),
|
|
3201
|
+
tooltip: j.tooltip ?? ((J == null ? void 0 : J.tooltip) || void 0),
|
|
3202
|
+
section: j.section ?? ((J == null ? void 0 : J.section) || re.Advanced)
|
|
3203
3203
|
};
|
|
3204
3204
|
}).filter((F) => !F.hidden && F.key !== r.pluginConfigKey);
|
|
3205
3205
|
}), N = k(() => {
|
|
@@ -3208,22 +3208,22 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3208
3208
|
return [];
|
|
3209
3209
|
const f = v.value[r.pluginConfigKey] || {}, E = Object.keys(f).length, O = [];
|
|
3210
3210
|
for (const F in f) {
|
|
3211
|
-
const A = (U = (x = r.pluginConfigSchema) == null ? void 0 : x[F]) == null ? void 0 : U.order,
|
|
3212
|
-
let
|
|
3213
|
-
A && (
|
|
3211
|
+
const A = (U = (x = r.pluginConfigSchema) == null ? void 0 : x[F]) == null ? void 0 : U.order, q = f[F];
|
|
3212
|
+
let j = q != null && q !== "" ? E - 1 : E;
|
|
3213
|
+
A && (j = A === -1 ? E + 1 : A), O.push([F, j]);
|
|
3214
3214
|
}
|
|
3215
3215
|
return O.sort(function(F, A) {
|
|
3216
3216
|
return F[1] - A[1];
|
|
3217
3217
|
}), O.map((F) => {
|
|
3218
3218
|
var J;
|
|
3219
|
-
const A = F[0],
|
|
3219
|
+
const A = F[0], q = f[A], j = ((J = r.pluginConfigSchema) == null ? void 0 : J[A]) || {};
|
|
3220
3220
|
return {
|
|
3221
3221
|
key: A,
|
|
3222
|
-
value:
|
|
3223
|
-
hidden:
|
|
3224
|
-
type:
|
|
3225
|
-
label:
|
|
3226
|
-
tooltip:
|
|
3222
|
+
value: q,
|
|
3223
|
+
hidden: j.hidden || !1,
|
|
3224
|
+
type: j.type ?? H.Text,
|
|
3225
|
+
label: j.label ?? o(A),
|
|
3226
|
+
tooltip: j.tooltip ?? void 0,
|
|
3227
3227
|
section: re.Plugin
|
|
3228
3228
|
};
|
|
3229
3229
|
}).filter((F) => !F.hidden);
|
|
@@ -3265,8 +3265,8 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3265
3265
|
g.value = !1;
|
|
3266
3266
|
}
|
|
3267
3267
|
}), (f, E) => {
|
|
3268
|
-
const O = K("KLabel"), x = K("KSelect"), U = K("KButton"), F = K("KSkeleton"), A = K("KEmptyState"),
|
|
3269
|
-
return m(), M(
|
|
3268
|
+
const O = K("KLabel"), x = K("KSelect"), U = K("KButton"), F = K("KSkeleton"), A = K("KEmptyState"), q = K("KCard");
|
|
3269
|
+
return m(), M(q, {
|
|
3270
3270
|
class: "kong-ui-entity-base-config-card",
|
|
3271
3271
|
"title-tag": e.titleTag
|
|
3272
3272
|
}, _e({
|
|
@@ -3331,10 +3331,10 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3331
3331
|
"property-collections": w.value,
|
|
3332
3332
|
record: v.value
|
|
3333
3333
|
}, _e({ _: 2 }, [
|
|
3334
|
-
oe(Object.keys(f.$slots), (
|
|
3335
|
-
name:
|
|
3334
|
+
oe(Object.keys(f.$slots), (j) => ({
|
|
3335
|
+
name: j,
|
|
3336
3336
|
fn: b(({ row: J, rowValue: he }) => [
|
|
3337
|
-
z(f.$slots,
|
|
3337
|
+
z(f.$slots, j, {
|
|
3338
3338
|
row: J,
|
|
3339
3339
|
rowValue: he
|
|
3340
3340
|
}, void 0, !0)
|
|
@@ -3419,6 +3419,13 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3419
3419
|
noValidate: {
|
|
3420
3420
|
type: Boolean,
|
|
3421
3421
|
default: !1
|
|
3422
|
+
},
|
|
3423
|
+
/**
|
|
3424
|
+
* Wrapper component to use at component's root level.
|
|
3425
|
+
*/
|
|
3426
|
+
wrapperComponent: {
|
|
3427
|
+
type: String,
|
|
3428
|
+
default: "KCard"
|
|
3422
3429
|
}
|
|
3423
3430
|
},
|
|
3424
3431
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
@@ -3461,8 +3468,8 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3461
3468
|
s.value = !1;
|
|
3462
3469
|
}
|
|
3463
3470
|
}), (h, I) => {
|
|
3464
|
-
const f = K("KSkeleton"), E = K("KEmptyState"), O = K("KAlert"), x = K("KButton"), U = K("KTabs"), F = K("KSlideout")
|
|
3465
|
-
return m(), M(
|
|
3471
|
+
const f = K("KSkeleton"), E = K("KEmptyState"), O = K("KAlert"), x = K("KButton"), U = K("KTabs"), F = K("KSlideout");
|
|
3472
|
+
return m(), M(se(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3466
3473
|
default: b(() => [
|
|
3467
3474
|
s.value ? (m(), M(f, {
|
|
3468
3475
|
key: 0,
|
|
@@ -3497,7 +3504,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3497
3504
|
B(x, {
|
|
3498
3505
|
appearance: "tertiary",
|
|
3499
3506
|
"data-testid": "form-view-configuration",
|
|
3500
|
-
onClick: I[0] || (I[0] = (
|
|
3507
|
+
onClick: I[0] || (I[0] = (A) => y())
|
|
3501
3508
|
}, {
|
|
3502
3509
|
default: b(() => [
|
|
3503
3510
|
V($(T(a)("baseForm.actions.viewConfiguration")), 1)
|
|
@@ -3536,7 +3543,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3536
3543
|
"offset-top": 60,
|
|
3537
3544
|
title: T(a)("baseForm.configuration.title"),
|
|
3538
3545
|
visible: g.value,
|
|
3539
|
-
onClose: I[1] || (I[1] = (
|
|
3546
|
+
onClose: I[1] || (I[1] = (A) => y())
|
|
3540
3547
|
}, {
|
|
3541
3548
|
default: b(() => [
|
|
3542
3549
|
L("div", null, $(T(a)("baseForm.configuration.message")), 1),
|
|
@@ -3567,7 +3574,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3567
3574
|
});
|
|
3568
3575
|
};
|
|
3569
3576
|
}
|
|
3570
|
-
}), ts = /* @__PURE__ */ ae(ll, [["__scopeId", "data-v-
|
|
3577
|
+
}), ts = /* @__PURE__ */ ae(ll, [["__scopeId", "data-v-fd05df8e"]]), sl = ["data-truncate"], ul = /* @__PURE__ */ P({
|
|
3571
3578
|
__name: "EntityBaseTableCell",
|
|
3572
3579
|
props: {
|
|
3573
3580
|
keyName: {
|
|
@@ -3638,7 +3645,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3638
3645
|
}, [
|
|
3639
3646
|
B(w, {
|
|
3640
3647
|
"max-width": "300",
|
|
3641
|
-
placement: "
|
|
3648
|
+
placement: "bottomStart",
|
|
3642
3649
|
text: v.value ? g.value : ""
|
|
3643
3650
|
}, {
|
|
3644
3651
|
default: b(() => [
|
|
@@ -3650,7 +3657,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3650
3657
|
], 512);
|
|
3651
3658
|
};
|
|
3652
3659
|
}
|
|
3653
|
-
}), cl = /* @__PURE__ */ ae(ul, [["__scopeId", "data-v-
|
|
3660
|
+
}), cl = /* @__PURE__ */ ae(ul, [["__scopeId", "data-v-471ce76e"]]), dl = { class: "toolbar-container" }, fl = {
|
|
3654
3661
|
key: 0,
|
|
3655
3662
|
class: "toolbar-button-container"
|
|
3656
3663
|
}, pl = ["data-testid"], hl = /* @__PURE__ */ P({
|
|
@@ -3881,20 +3888,20 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3881
3888
|
[ge, l(A)]
|
|
3882
3889
|
])
|
|
3883
3890
|
]),
|
|
3884
|
-
actions: b(({ row: A, rowKey:
|
|
3891
|
+
actions: b(({ row: A, rowKey: q, rowValue: j }) => [
|
|
3885
3892
|
L("div", {
|
|
3886
3893
|
class: "actions-container",
|
|
3887
3894
|
"data-testid": A.name
|
|
3888
3895
|
}, [
|
|
3889
3896
|
B(x, {
|
|
3890
|
-
"kpop-attributes": { placement: "
|
|
3897
|
+
"kpop-attributes": { placement: "bottomEnd" },
|
|
3891
3898
|
width: e.dropdownMenuWidth
|
|
3892
3899
|
}, {
|
|
3893
3900
|
items: b(() => [
|
|
3894
3901
|
z(f.$slots, "actions", {
|
|
3895
3902
|
row: A,
|
|
3896
|
-
rowKey:
|
|
3897
|
-
rowValue:
|
|
3903
|
+
rowKey: q,
|
|
3904
|
+
rowValue: j
|
|
3898
3905
|
}, void 0, !0)
|
|
3899
3906
|
]),
|
|
3900
3907
|
default: b(() => [
|
|
@@ -3917,17 +3924,17 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3917
3924
|
]),
|
|
3918
3925
|
_: 2
|
|
3919
3926
|
}, [
|
|
3920
|
-
oe(e.tableHeaders, (A,
|
|
3921
|
-
name:
|
|
3922
|
-
fn: b(({ row:
|
|
3927
|
+
oe(e.tableHeaders, (A, q) => ({
|
|
3928
|
+
name: q,
|
|
3929
|
+
fn: b(({ row: j, rowKey: J, rowValue: he }) => [
|
|
3923
3930
|
B(cl, {
|
|
3924
|
-
"key-name": String(
|
|
3925
|
-
"row-el": u(
|
|
3931
|
+
"key-name": String(q),
|
|
3932
|
+
"row-el": u(j),
|
|
3926
3933
|
tooltip: A.tooltip
|
|
3927
3934
|
}, {
|
|
3928
3935
|
default: b(() => [
|
|
3929
|
-
z(f.$slots,
|
|
3930
|
-
row:
|
|
3936
|
+
z(f.$slots, q, {
|
|
3937
|
+
row: j,
|
|
3931
3938
|
rowKey: J,
|
|
3932
3939
|
rowValue: he
|
|
3933
3940
|
}, () => [
|
|
@@ -3951,7 +3958,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3951
3958
|
}, 8, ["title", "title-tag"]);
|
|
3952
3959
|
};
|
|
3953
3960
|
}
|
|
3954
|
-
}), ns = /* @__PURE__ */ ae(hl, [["__scopeId", "data-v-
|
|
3961
|
+
}), ns = /* @__PURE__ */ ae(hl, [["__scopeId", "data-v-67bd29c7"]]), ml = {
|
|
3955
3962
|
key: 0,
|
|
3956
3963
|
class: "kong-ui-entity-delete-error"
|
|
3957
3964
|
}, gl = {
|
|
@@ -4204,7 +4211,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4204
4211
|
[ge, a.value]
|
|
4205
4212
|
]),
|
|
4206
4213
|
me(L("div", wl, [
|
|
4207
|
-
(m(!0), S(
|
|
4214
|
+
(m(!0), S(ue, null, oe(c.value, (x) => {
|
|
4208
4215
|
var U, F;
|
|
4209
4216
|
return m(), S("div", {
|
|
4210
4217
|
key: x.value,
|
|
@@ -4482,7 +4489,7 @@ const Kl = ["aria-labelledby"], Dl = { class: "form-section-wrapper" }, Ul = {
|
|
|
4482
4489
|
key: 0,
|
|
4483
4490
|
class: fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4484
4491
|
}, [
|
|
4485
|
-
e.title ? (m(), M(
|
|
4492
|
+
e.title ? (m(), M(se(e.titleTag), {
|
|
4486
4493
|
key: 0,
|
|
4487
4494
|
id: T(n),
|
|
4488
4495
|
class: "form-section-title"
|
|
@@ -4578,7 +4585,7 @@ const Kl = ["aria-labelledby"], Dl = { class: "form-section-wrapper" }, Ul = {
|
|
|
4578
4585
|
key: o.value,
|
|
4579
4586
|
class: "copy-uuid-tooltip",
|
|
4580
4587
|
"max-width": "160",
|
|
4581
|
-
placement: "
|
|
4588
|
+
placement: "bottomEnd",
|
|
4582
4589
|
text: o.value
|
|
4583
4590
|
}, {
|
|
4584
4591
|
default: b(() => [
|
|
@@ -4604,7 +4611,7 @@ const Kl = ["aria-labelledby"], Dl = { class: "form-section-wrapper" }, Ul = {
|
|
|
4604
4611
|
]);
|
|
4605
4612
|
};
|
|
4606
4613
|
}
|
|
4607
|
-
}), ss = /* @__PURE__ */ ae(Wl, [["__scopeId", "data-v-
|
|
4614
|
+
}), ss = /* @__PURE__ */ ae(Wl, [["__scopeId", "data-v-be5bda4c"]]), { useAxios: us, useDeleteUrlBuilder: cs, useErrors: ds, useExternalLinkCreator: fs, useFetchUrlBuilder: ps, useFetcher: hs, useDebouncedFilter: ms, useStringHelpers: gs, useHelpers: ys, useGatewayFeatureSupported: vs, useTruncationDetector: bs, useValidators: xs } = Y;
|
|
4608
4615
|
export {
|
|
4609
4616
|
yo as ConfigCardDisplay,
|
|
4610
4617
|
Dt as ConfigCardItem,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(N,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("axios"),require("@kong-ui-public/i18n"),require("@kong/kongponents"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","axios","@kong-ui-public/i18n","@kong/kongponents","vue-router"],t):(N=typeof globalThis<"u"?globalThis:N||self,t(N["kong-ui-public-entities-shared"]={},N.Vue,N.axios,N["kong-ui-public-i18n"],N.Kongponents,N.VueRouter))})(this,function(N,t,Re,Me,ln,cn){"use strict";var Ke=(e=>(e.GatewayService="service",e.Route="route",e.Consumer="consumer",e.ConsumerGroup="consumer group",e.Plugin="plugin",e.Upstream="upstream",e.Certificate="certificate",e.CACertificate="ca certificate",e.SNI="SNI",e.Key="key",e.KeySet="key set",e.Vault="vault",e.Application="application",e.Developer="developer",e.acls="ACL Credential",e["basic-auth"]="Basic Auth Credential",e["key-auth"]="Key Auth Credential",e["key-auth-enc"]="Key Auth Encrypted Credential",e.oauth2="OAuth 2.0 Credential",e["hmac-auth"]="HMAC Credential",e.jwt="JWT Credential",e.Target="target",e.Policy="policy",e))(Ke||{}),Ue=(e=>(e.Edit="edit",e.Create="create",e))(Ue||{}),Z=(e=>(e[e.Loading=0]="Loading",e[e.Idle=1]="Idle",e[e.NoResults=2]="NoResults",e[e.Error=3]="Error",e))(Z||{}),L=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(L||{}),P=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(P||{});function sn(){return{getAxiosInstance:(e={})=>{try{const n=t.inject("get-axios-instance",void 0);return typeof n=="function"?n(e):Re.create({withCredentials:!0,timeout:3e4,...e})}catch(n){return console.warn("getAxiosInstance:",n.message||n),Re.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{var n;return((n=e==null?void 0:e.response)==null?void 0:n.headers["x-datadog-trace-id"])||""}}}function dn(){return{debounce:(e,n)=>{let r;return(...i)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...i)},n)}}}}const be="khcp-user-table-preferences",un={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0,columnWidths:{},columnVisibility:{}};function fn(){const e=r=>{if(typeof r=="string")try{return JSON.parse(r)}catch(i){console.error("useTablePreferences(tryParseJson)",i);return}},n=()=>{const r=e(localStorage.getItem(be));return!r||!Object.keys(r).length?new Map:new Map(Object.entries(r))};return{setTablePreferences:(r,i)=>{try{const o=n();o.set(r,i),localStorage.setItem(be,JSON.stringify(Object.fromEntries(o.entries())))}catch(o){console.error("useTablePreferences(setTablePreferences)",o)}},getTablePreferences:r=>{const i=n();return(i==null?void 0:i.get(r))||void 0||un},deleteAllTablePreferences:()=>{localStorage.removeItem(be)}}}function xe(e={}){const{getAxiosInstance:n}=sn();return{axiosInstance:n(e)}}const pn={global:{actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},deleteModal:{message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},baseForm:{actions:{viewConfiguration:"View Configuration",save:"Save",cancel:"Cancel",back:"Back"},configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML or JSON. This allows for straightforward importing into APIOps tools like decK with YAML, or Insomnia and cURL with JSON.",yaml:"YAML",json:"JSON"},errors:{edit:"The entity could not be edited at this time."}},baseTable:{emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},baseConfigCard:{title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},filter:{filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},debouncedFilter:{errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},errors:{unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},validationErrors:{utf8Name:"The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."},toggleModal:{enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}}};function ue(){const e=Me.createI18n("en-us",pn);return{i18n:e,i18nT:Me.i18nTComponent(e)}}function qe(){const e=(a,l)=>(l==null?void 0:l[a])??void 0,n=(a,l)=>{if(a.length!==l.length)return!1;const c=new Set([...a,...l]);for(const s of c){const u=a.filter(d=>d===s).length,f=l.filter(d=>d===s).length;if(u!==f)return!1}return!0};return{getPropValue:e,objectsAreEqual:(a,l,c)=>{if(c){if(Object.keys(a).length===Object.keys(l).length)for(const s in a)if(Array.isArray(a[s])&&Array.isArray(l[s])){if(n(a[s],l[s]))continue;return!1}else{if(a[s]===l[s])continue;return!1}else return!1;return!0}try{return JSON.stringify(a)===JSON.stringify(l)}catch{return!1}},sortAlpha:a=>(l,c)=>{let s=l[a]===void 0||l[a]===null?"":l[a],u=c[a]===void 0||c[a]===null?"":c[a];return Array.isArray(l[a])&&(s=l[a][0]),Array.isArray(c[a])&&(u=c[a][0]),s.localeCompare(u)},isValidUuid:a=>a?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(a):!1}}function mn(e,n,r,i={fetchedItemsKey:"data",searchKeys:["id"]}){r||(r="1000");const{axiosInstance:o}=xe(e.axiosRequestConfig),{i18n:{t:a}}=ue(),{debounce:l}=dn(),c=l(async h=>{await R(h)},200),s=t.ref(!1),u=t.ref(""),f=t.ref(""),d=t.ref([]),g=t.ref([]),m=t.ref(void 0),y=t.unref(n);let C=`${e.apiBaseUrl}${y}`;e.app==="konnect"?C=C.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(C=C.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""));const{isValidUuid:k}=qe(),I=async()=>{try{s.value=!0;const{data:h}=await o.get(`${C}?size=${r}`);h!=null&&h.next||(m.value=i.fetchedItemsKey in h?h[i.fetchedItemsKey]:[]),g.value=i.fetchedItemsKey in h?h[i.fetchedItemsKey]:[],d.value=g.value}catch{d.value=[],u.value=a("debouncedFilter.errors.fetch")}finally{s.value=!1}},w=t.ref(""),R=async h=>{var _,p,A;if(w.value!==h)if(w.value=h||"",m.value===void 0)try{if(s.value=!0,u.value="",f.value="",e.app==="konnect"){let B=C+"";h&&(B+=`/${h}`);const{data:b}=await o.get(`${B}?size=${r}`);i.fetchedItemsKey in b?d.value=b[i.fetchedItemsKey]:b!=null&&b.id?d.value=[b]:d.value=[]}else if(h){const B=[];k(h)&&i.searchKeys.includes("id")?B.push((async()=>{const{data:E}=await o.get(`${C}/${h}`);return[E[i.fetchedItemsKey]??E]})()):B.push(...i.searchKeys.filter(E=>E!=="id").map(async E=>{const{data:S}=await o.get(`${C}?${E}=${h}`);return S[i.fetchedItemsKey]}));const b=await Promise.all(B),T=new Set;d.value=[],(_=b==null?void 0:b.forEach)==null||_.call(b,E=>{var S;(S=E==null?void 0:E.forEach)==null||S.call(E,F=>{T.has(F.id)||(T.add(F.id),d.value.push(F))})})}else d.value=g.value}catch(B){((p=B==null?void 0:B.response)==null?void 0:p.status)===404?f.value=a("debouncedFilter.errors.invalid"):(d.value=[],u.value=a("debouncedFilter.errors.fetch"))}finally{s.value=!1}else s.value=!0,f.value="",h?(d.value=(A=m.value)==null?void 0:A.filter(B=>{var T;let b=!1;for(const E of i.searchKeys){const S=typeof B[E]=="string"?(T=B[E])==null?void 0:T.toLowerCase():B[E];S!=null&&S.includes(h.toLowerCase())&&(b=!0)}return b}),(!d.value||!d.value.length)&&(f.value=a("debouncedFilter.errors.invalid"))):d.value=m.value,s.value=!1};return{loading:s,error:u,validationError:f,results:d,allRecords:m,loadItems:I,debouncedQueryChange:c}}function hn(e,n){const r=t.unref(n),i=t.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${r}`):new URL(r));return i.value.search="",o=>`${i.value.href}/${o}`}function gn(){const{i18n:{t:e}}=ue();return{getMessageFromError:r=>{var i,o,a,l;if(!r)return e("errors.unexpected");if(((i=r==null?void 0:r.response)==null?void 0:i.status)===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if((o=r==null?void 0:r.response)!=null&&o.data){if(r.response.data.detail)return r.response.data.detail;if((a=r.response.data.details)!=null&&a.length)return r.response.data.details.map(c=>{let s=e("errors.unexpected");return c.messages&&typeof c.messages=="object"&&c.messages.length&&(s=c.messages.join(", ")),c.field?`${c.field} - ${s}`:s}).join("; ");if(r.response.data.message){const{message:c}=r.response.data;return Array.isArray(c)?(l=c[0])!=null&&l.constraints?Object.values(c[0].constraints)[0]:c[0]:c}if(typeof r.response.data=="string")return r.response.data;if(typeof r.response.data=="object")return Object.keys(r.response.data).map(c=>`${c} ${r.response.data[c]}`).join(", ")}return r.message||e("errors.unexpected")}}}function yn(e){const n=window.location.origin,r=n.endsWith("/")?n:`${n}/`;try{const i=e.join("/"),o=`${r}${i}`,a=e.some(c=>c.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(o)&&!a&&new URL(o))return`${r}${i}`;throw new Error("Invalid url")}catch(i){return console.warn("Failed to build valid URL:",i),""}}function je(e,n){const r=t.ref(t.unref(e)),i=t.ref(t.unref(n)),o=t.computed(()=>!!(r.value.app==="konnect"||r.value.isExactMatch)),a=t.computed(()=>i.value.startsWith("/")?new URL(`${window.location.origin}${i.value}`):new URL(i.value));return l=>{const{page:c,pageSize:s,offset:u,sortColumnKey:f,sortColumnOrder:d,query:g}=l;try{let m=new URL(a.value.href);return o.value&&g?(m.search="",m=r.value.isExactMatch?new URL(`${m.href}/${g}/`):new URL(`${m.href}?filter[name][contains]=${g}`)):(o.value||new URLSearchParams(g).forEach((y,C)=>{m.searchParams.append(C,y)}),f&&m.searchParams.append("sort_by",f),d==="desc"&&m.searchParams.append("sort_desc","1"),m.searchParams.append("size",String(s))),u&&c!==1&&m.searchParams.append("offset",String(u)),m.href}catch(m){return console.error("RouteList(fetcher)",m),i.value}}}function Cn(e,n,r="data"){const i=t.unref(n),{axiosInstance:o}=xe(e.axiosRequestConfig),a=je(e,i),l=t.ref({status:Z.Idle});return{fetcher:async s=>{var u;try{l.value={status:Z.Loading};let f=a(s);f.includes("filter[name]")&&(f=`${f}&page[size]=${s.pageSize}&page[number]=${s.page}`);const d=await o.get(f);if(d.status>=400)throw d;const g=d.data,m=r&&r.replace(/[^\w-_]/gi,"");let y;g[m]&&Array.isArray(g[m])?y=g[m]:Array.isArray(g)?y=g:y=Object.keys(g).length?[g]:[];const C={data:y,total:y.length,...g.offset?{pagination:{offset:g.offset}}:null};return l.value={status:Z.Idle,response:C},C}catch(f){const d={data:[],total:0};return s.query&&(((u=f.response)==null?void 0:u.status)===404||f.status===404)?(l.value={status:Z.NoResults,response:d,error:f.response?f:{response:f}},d):(l.value={status:Z.Error,response:d,error:f.response?f:{response:f}},d)}},fetcherState:l}}function bn(){const e=(i,o="_")=>i?i.split(o).map(a=>a.toLowerCase()==="id"?a.toUpperCase():a.charAt(0).toUpperCase()+a.substring(1)).join(" "):"",n=/(?:^|[\s-:'"])\w/g;return{capitalize:i=>i?i.replace(n,o=>o.toUpperCase()):"",convertKeyToTitle:e}}const Pe=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,He=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const n=e.match(Pe);if(!n)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return n.shift(),n},ze=e=>e==="*"||e==="x"||e==="X",Ye=e=>{const n=parseInt(e,10);return isNaN(n)?e:n},xn=(e,n)=>typeof e!=typeof n?[String(e),String(n)]:[e,n],kn=(e,n)=>{if(ze(e)||ze(n))return 0;const[r,i]=xn(Ye(e),Ye(n));return r>i?1:r<i?-1:0},We=(e,n)=>{for(let r=0;r<Math.max(e.length,n.length);r++){const i=kn(e[r]||"0",n[r]||"0");if(i!==0)return i}return 0},wn=(e,n)=>{const r=He(e),i=He(n),o=r.pop(),a=i.pop(),l=We(r,i);return l!==0?l:o&&a?We(o.split("."),a.split(".")):o||a?o?-1:1:0},Je=(e,n,r)=>{Sn(r);const i=wn(e,n);return Ge[r].includes(i)},Ge={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Ze=Object.keys(Ge),Sn=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Ze.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Ze.join("|")}`)},_n=e=>typeof e=="string"&&/^[v\d]/.test(e)&&Pe.test(e);function An(e){const{gatewayInfo:n,supportedRange:r}=e;if(!n)return!0;const{edition:i,version:o}=n;if(!_n(o))return console.error("Invalid version"),!1;const a=r[i];if(!a)return!1;const[l,c]=a;return!(l&&Je(o,l,"<")||c&&Je(o,c,">"))}function En(e){const n=t.ref(0),r=t.ref(0),i=t.ref(!1);return t.watch(e,a=>{a&&!i.value&&(n.value=a.offsetWidth,r.value=a.scrollWidth,i.value=!0)}),{isTruncated:t.computed(()=>n.value<r.value)}}function Bn(){const{i18n:{t:e}}=ue();return{utf8Name:r=>/^[\p{N}\p{L}.\-_~]*$/u.test(r)?"":e("validationErrors.utf8Name")}}const O={useAxios:xe,useDebouncedFilter:mn,useDeleteUrlBuilder:hn,useErrors:gn,useExternalLinkCreator:yn,useFetcher:Cn,useFetchUrlBuilder:je,useHelpers:qe,useStringHelpers:bn,useI18n:ue,useGatewayFeatureSupported:An,useTruncationDetector:En,useValidators:Bn},Nn={key:0,class:"config-card-fieldset-title"},In=t.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const n=e,{i18n:{t:r}}=O.useI18n(),{convertKeyToTitle:i}=O.useStringHelpers(),o=t.computed(()=>n.item.key??"json-array-item"),a=t.computed(()=>n.item.value??n.item),l=t.computed(()=>{const s=JSON.parse(JSON.stringify(a.value));return n.isArrayItem&&delete s.name,s}),c=t.computed(()=>{var s;return n.isArrayItem?(s=a.value)!=null&&s.name?i(a.value.name,"_"):r("baseConfigCard.general.entryTitle",{index:n.index}):""});return(s,u)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.isArrayItem?"fieldset":"div"),{class:t.normalizeClass(e.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:t.withCtx(()=>[e.isArrayItem?(t.openBlock(),t.createElementBlock("legend",Nn,[t.createElementVNode("b",null,t.toDisplayString(c.value),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(l.value),(f,d)=>(t.openBlock(),t.createBlock(ke,{key:`${o.value}-property-${d}`,item:{key:f,label:t.unref(i)(f),value:l.value[f]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),H=(e,n)=>{const r=e.__vccOpts||e;for(const[i,o]of n)r[i]=o;return r},Qe=H(In,[["__scopeId","data-v-68ca83ec"]]),Xe=H(t.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t:n}}=O.useI18n();return(r,i)=>{const o=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(o,{appearance:"tertiary",class:"navigation-button",onClick:i[0]||(i[0]=a=>r.$emit("navigation-click",e.item))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.value||t.unref(n)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-c96811e5"]]),Tn=t.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t:n}}=O.useI18n();return(r,i)=>{const o=t.resolveComponent("KBadge");return t.openBlock(),t.createBlock(o,{appearance:e.status?"success":"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.status?t.unref(n)("baseConfigCard.statusBadge.enabledLabel"):t.unref(n)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),Fn="#0044f4",$n="#e0e4ea",Ln="#afb7c5",On="#0044f4",Dn="1px",Vn="16px",vn="20px",Rn={class:"config-card-details-row"},Mn=["data-testid"],Kn=["data-testid"],Un=["data-testid"],qn=["data-testid"],jn={key:1},Pn=["data-testid"],Hn=["data-testid"],zn=["data-testid"],Yn=["data-testid"],Wn={name:"ConfigCardItem",components:{JsonCardItem:Qe,StatusBadge:Tn,InternalLinkItem:Xe}},Jn=t.defineComponent({...Wn,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(e,{emit:n}){t.useCssVars(y=>({dc1d91a8:f.value?"none":`solid ${t.unref(Dn)} ${t.unref($n)}`,"59ccec5f":u.value&&c.value?"block":"flex","29318fbe":u.value&&c.value?"100%":r.slim?"50%":"25%","292d0408":u.value&&c.value?"100%":r.slim?"50%":"75%"}));const r=e,i=n,o=t.useSlots(),{i18n:{t:a,formatUnixTimeStamp:l}}=O.useI18n(),c=t.computed(()=>r.item.value!==void 0&&r.item.value!==null&&r.item.value!==""),s=t.computed(()=>!!(r.item.tooltip||o["label-tooltip"])),u=t.computed(()=>r.item.type===L.Json||r.item.type===L.JsonArray),f=t.computed(()=>r.item.type===L.JsonArray),d=t.computed(()=>{switch(r.item.type){case L.ID:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid`,"copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case L.IdArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label})}};case L.Redacted:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid-redacted`,format:"redacted","copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case L.RedactedArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{format:"redacted","copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label})}};case L.Date:return{tag:"div",attrs:{"data-testid":`${r.item.key}-date`},text:l(r.item.value)};case L.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${r.item.key}-badge-status`,status:r.item.value}};case L.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case L.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case L.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${r.item.key}-internal-link`,item:r.item,onNavigationClick:y=>{i("navigation-click",y)}}};case L.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${r.item.key}-external-link`,href:r.item.value},text:r.item.value};case L.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-content`,item:r.item}};case L.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-array-content`,item:r.item}};default:return{tag:"div",attrs:{"data-testid":`${r.item.key}-plain-text`},text:r.item.value}}}),g=t.ref(),{isTruncated:m}=O.useTruncationDetector(g);return(y,C)=>{const k=t.resolveComponent("KLabel"),I=t.resolveComponent("KBadge"),w=t.resolveComponent("KCopy"),R=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("div",Rn,[t.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[t.renderSlot(y.$slots,"label",{item:e.item},()=>[t.createVNode(k,{"tooltip-attributes":{maxWidth:"500px"}},t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.label)+" ",1)]),_:2},[s.value?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[t.renderSlot(y.$slots,"label-tooltip",{},()=>[t.createTextVNode(t.toDisplayString(e.item.tooltip),1)],!0)],8,Kn)]),key:"0"}:void 0]),1024)],!0)],8,Mn),t.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[t.renderSlot(y.$slots,e.item.key,{rowValue:e.item.value},()=>[c.value?(t.openBlock(),t.createElementBlock("div",jn,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(d.value.tag),t.normalizeProps(t.guardReactiveProps(d.value.attrs)),{default:t.withCtx(()=>[d.value.additionalComponent==="KBadge"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-badge-tags`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(h,_)=>(t.openBlock(),t.createBlock(I,{key:`${e.item.key}-badge-tag-${_}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${_}`,tooltip:h,"truncation-tooltip":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h),1)]),_:2},1032,["data-testid","tooltip"]))),128))],8,Pn)):t.createCommentVNode("",!0),d.value.additionalComponent==="KCopy"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${e.item.key}-copy-uuid-array`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(h,_)=>(t.openBlock(),t.createBlock(w,t.mergeProps({ref_for:!0},d.value.childAttrs,{key:`${e.item.key}-copy-uuid-${_}`,"data-testid":`${e.item.key}-copy-uuid-${_}`,text:h}),null,16,["data-testid","text"]))),128))],8,Hn)):d.value.additionalComponent==="KMethodBadge"?(t.openBlock(),t.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${e.item.key}-badge-methods`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(h,_)=>(t.openBlock(),t.createBlock(I,{key:`${e.item.key}-badge-method-${_}`,appearance:Object.values(t.unref(ln.BadgeMethodAppearances)).includes(h.toLowerCase())?h.toLowerCase():"custom",class:"config-badge","data-testid":`${e.item.key}-badge-method-${_}`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h),1)]),_:2},1032,["appearance","data-testid"]))),128))],8,zn)):t.createCommentVNode("",!0),d.value.additionalComponent==="JsonCardItem"?(t.openBlock(),t.createElementBlock("div",{key:3,"data-testid":`${r.item.key}-json-array-content`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(h,_)=>(t.openBlock(),t.createBlock(Qe,{key:`json-array-item-${_}`,index:_,"is-array-item":"",item:h},null,8,["index","item"]))),128))],8,Yn)):(t.openBlock(),t.createBlock(R,{key:4,text:t.unref(m)?e.item.value:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:g,class:t.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},t.toDisplayString(d.value.text),3)]),_:1},8,["text"]))]),_:1},16))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,qn))],!0)],8,Un)])}}}),ke=H(Jn,[["__scopeId","data-v-d268261c"]]),Gn={class:"json-config"},Zn={key:0,class:"json-endpoint"},we=t.defineComponent({__name:"JsonCodeBlock",props:{config:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},jsonRecord:{type:Object,required:!0},requestMethod:{type:String,required:!1,default:""}},setup(e){t.useCssVars(o=>({"4520e3ec":`${i.value}ch`}));const n=e,r=t.computed(()=>n.jsonRecord),i=t.computed(()=>{var l;if(!n.fetcherUrl)return 0;const o=(l=n.fetcherUrl)==null?void 0:l.split("/");return o.length<2?0:41+(n.requestMethod==="post"?o[o.length-1]:o[o.length-2]).length});return(o,a)=>{const l=t.resolveComponent("KBadge"),c=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock("div",Gn,[n.fetcherUrl?(t.openBlock(),t.createElementBlock("div",Zn,[t.createVNode(l,{appearance:n.requestMethod},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.requestMethod),1)]),_:1},8,["appearance"]),t.createVNode(c,{id:"json-endpoint-codeblock",code:n.fetcherUrl,language:"json","single-line":"",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),n.jsonRecord?(t.openBlock(),t.createBlock(c,{key:1,id:"json-codeblock",class:t.normalizeClass({"json-content":n.fetcherUrl}),code:JSON.stringify(r.value,null,2),language:"json",theme:"dark"},null,8,["class","code"])):t.createCommentVNode("",!0)])}}});/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function et(e){return typeof e>"u"||e===null}function Qn(e){return typeof e=="object"&&e!==null}function Xn(e){return Array.isArray(e)?e:et(e)?[]:[e]}function er(e,n){var r,i,o,a;if(n)for(a=Object.keys(n),r=0,i=a.length;r<i;r+=1)o=a[r],e[o]=n[o];return e}function tr(e,n){var r="",i;for(i=0;i<n;i+=1)r+=e;return r}function nr(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var rr=et,ir=Qn,or=Xn,ar=tr,lr=nr,cr=er,V={isNothing:rr,isObject:ir,toArray:or,repeat:ar,isNegativeZero:lr,extend:cr};function tt(e,n){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(r+=`
|
|
1
|
+
(function(N,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("axios"),require("@kong-ui-public/i18n"),require("@kong/kongponents"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","axios","@kong-ui-public/i18n","@kong/kongponents","vue-router"],t):(N=typeof globalThis<"u"?globalThis:N||self,t(N["kong-ui-public-entities-shared"]={},N.Vue,N.axios,N["kong-ui-public-i18n"],N.Kongponents,N.VueRouter))})(this,function(N,t,Re,Me,ln,cn){"use strict";var Ke=(e=>(e.GatewayService="service",e.Route="route",e.Consumer="consumer",e.ConsumerGroup="consumer group",e.Plugin="plugin",e.Upstream="upstream",e.Certificate="certificate",e.CACertificate="ca certificate",e.SNI="SNI",e.Key="key",e.KeySet="key set",e.Vault="vault",e.Application="application",e.Developer="developer",e.acls="ACL Credential",e["basic-auth"]="Basic Auth Credential",e["key-auth"]="Key Auth Credential",e["key-auth-enc"]="Key Auth Encrypted Credential",e.oauth2="OAuth 2.0 Credential",e["hmac-auth"]="HMAC Credential",e.jwt="JWT Credential",e.Target="target",e.Policy="policy",e))(Ke||{}),Ue=(e=>(e.Edit="edit",e.Create="create",e))(Ue||{}),Z=(e=>(e[e.Loading=0]="Loading",e[e.Idle=1]="Idle",e[e.NoResults=2]="NoResults",e[e.Error=3]="Error",e))(Z||{}),$=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))($||{}),P=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(P||{});function sn(){return{getAxiosInstance:(e={})=>{try{const n=t.inject("get-axios-instance",void 0);return typeof n=="function"?n(e):Re.create({withCredentials:!0,timeout:3e4,...e})}catch(n){return console.warn("getAxiosInstance:",n.message||n),Re.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{var n;return((n=e==null?void 0:e.response)==null?void 0:n.headers["x-datadog-trace-id"])||""}}}function dn(){return{debounce:(e,n)=>{let r;return(...i)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...i)},n)}}}}const be="khcp-user-table-preferences",un={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0,columnWidths:{},columnVisibility:{}};function fn(){const e=r=>{if(typeof r=="string")try{return JSON.parse(r)}catch(i){console.error("useTablePreferences(tryParseJson)",i);return}},n=()=>{const r=e(localStorage.getItem(be));return!r||!Object.keys(r).length?new Map:new Map(Object.entries(r))};return{setTablePreferences:(r,i)=>{try{const o=n();o.set(r,i),localStorage.setItem(be,JSON.stringify(Object.fromEntries(o.entries())))}catch(o){console.error("useTablePreferences(setTablePreferences)",o)}},getTablePreferences:r=>{const i=n();return(i==null?void 0:i.get(r))||void 0||un},deleteAllTablePreferences:()=>{localStorage.removeItem(be)}}}function xe(e={}){const{getAxiosInstance:n}=sn();return{axiosInstance:n(e)}}const pn={global:{actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},deleteModal:{message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},baseForm:{actions:{viewConfiguration:"View Configuration",save:"Save",cancel:"Cancel",back:"Back"},configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML or JSON. This allows for straightforward importing into APIOps tools like decK with YAML, or Insomnia and cURL with JSON.",yaml:"YAML",json:"JSON"},errors:{edit:"The entity could not be edited at this time."}},baseTable:{emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},baseConfigCard:{title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},filter:{filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},debouncedFilter:{errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},errors:{unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},validationErrors:{utf8Name:"The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."},toggleModal:{enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}}};function ue(){const e=Me.createI18n("en-us",pn);return{i18n:e,i18nT:Me.i18nTComponent(e)}}function qe(){const e=(a,l)=>(l==null?void 0:l[a])??void 0,n=(a,l)=>{if(a.length!==l.length)return!1;const c=new Set([...a,...l]);for(const s of c){const u=a.filter(d=>d===s).length,f=l.filter(d=>d===s).length;if(u!==f)return!1}return!0};return{getPropValue:e,objectsAreEqual:(a,l,c)=>{if(c){if(Object.keys(a).length===Object.keys(l).length)for(const s in a)if(Array.isArray(a[s])&&Array.isArray(l[s])){if(n(a[s],l[s]))continue;return!1}else{if(a[s]===l[s])continue;return!1}else return!1;return!0}try{return JSON.stringify(a)===JSON.stringify(l)}catch{return!1}},sortAlpha:a=>(l,c)=>{let s=l[a]===void 0||l[a]===null?"":l[a],u=c[a]===void 0||c[a]===null?"":c[a];return Array.isArray(l[a])&&(s=l[a][0]),Array.isArray(c[a])&&(u=c[a][0]),s.localeCompare(u)},isValidUuid:a=>a?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(a):!1}}function mn(e,n,r,i={fetchedItemsKey:"data",searchKeys:["id"]}){r||(r="1000");const{axiosInstance:o}=xe(e.axiosRequestConfig),{i18n:{t:a}}=ue(),{debounce:l}=dn(),c=l(async h=>{await R(h)},200),s=t.ref(!1),u=t.ref(""),f=t.ref(""),d=t.ref([]),g=t.ref([]),m=t.ref(void 0),y=t.unref(n);let C=`${e.apiBaseUrl}${y}`;e.app==="konnect"?C=C.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(C=C.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""));const{isValidUuid:k}=qe(),I=async()=>{try{s.value=!0;const{data:h}=await o.get(`${C}?size=${r}`);h!=null&&h.next||(m.value=i.fetchedItemsKey in h?h[i.fetchedItemsKey]:[]),g.value=i.fetchedItemsKey in h?h[i.fetchedItemsKey]:[],d.value=g.value}catch{d.value=[],u.value=a("debouncedFilter.errors.fetch")}finally{s.value=!1}},w=t.ref(""),R=async h=>{var _,p,A;if(w.value!==h)if(w.value=h||"",m.value===void 0)try{if(s.value=!0,u.value="",f.value="",e.app==="konnect"){let B=C+"";h&&(B+=`/${h}`);const{data:b}=await o.get(`${B}?size=${r}`);i.fetchedItemsKey in b?d.value=b[i.fetchedItemsKey]:b!=null&&b.id?d.value=[b]:d.value=[]}else if(h){const B=[];k(h)&&i.searchKeys.includes("id")?B.push((async()=>{const{data:E}=await o.get(`${C}/${h}`);return[E[i.fetchedItemsKey]??E]})()):B.push(...i.searchKeys.filter(E=>E!=="id").map(async E=>{const{data:S}=await o.get(`${C}?${E}=${h}`);return S[i.fetchedItemsKey]}));const b=await Promise.all(B),T=new Set;d.value=[],(_=b==null?void 0:b.forEach)==null||_.call(b,E=>{var S;(S=E==null?void 0:E.forEach)==null||S.call(E,L=>{T.has(L.id)||(T.add(L.id),d.value.push(L))})})}else d.value=g.value}catch(B){((p=B==null?void 0:B.response)==null?void 0:p.status)===404?f.value=a("debouncedFilter.errors.invalid"):(d.value=[],u.value=a("debouncedFilter.errors.fetch"))}finally{s.value=!1}else s.value=!0,f.value="",h?(d.value=(A=m.value)==null?void 0:A.filter(B=>{var T;let b=!1;for(const E of i.searchKeys){const S=typeof B[E]=="string"?(T=B[E])==null?void 0:T.toLowerCase():B[E];S!=null&&S.includes(h.toLowerCase())&&(b=!0)}return b}),(!d.value||!d.value.length)&&(f.value=a("debouncedFilter.errors.invalid"))):d.value=m.value,s.value=!1};return{loading:s,error:u,validationError:f,results:d,allRecords:m,loadItems:I,debouncedQueryChange:c}}function hn(e,n){const r=t.unref(n),i=t.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${r}`):new URL(r));return i.value.search="",o=>`${i.value.href}/${o}`}function gn(){const{i18n:{t:e}}=ue();return{getMessageFromError:r=>{var i,o,a,l;if(!r)return e("errors.unexpected");if(((i=r==null?void 0:r.response)==null?void 0:i.status)===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if((o=r==null?void 0:r.response)!=null&&o.data){if(r.response.data.detail)return r.response.data.detail;if((a=r.response.data.details)!=null&&a.length)return r.response.data.details.map(c=>{let s=e("errors.unexpected");return c.messages&&typeof c.messages=="object"&&c.messages.length&&(s=c.messages.join(", ")),c.field?`${c.field} - ${s}`:s}).join("; ");if(r.response.data.message){const{message:c}=r.response.data;return Array.isArray(c)?(l=c[0])!=null&&l.constraints?Object.values(c[0].constraints)[0]:c[0]:c}if(typeof r.response.data=="string")return r.response.data;if(typeof r.response.data=="object")return Object.keys(r.response.data).map(c=>`${c} ${r.response.data[c]}`).join(", ")}return r.message||e("errors.unexpected")}}}function yn(e){const n=window.location.origin,r=n.endsWith("/")?n:`${n}/`;try{const i=e.join("/"),o=`${r}${i}`,a=e.some(c=>c.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(o)&&!a&&new URL(o))return`${r}${i}`;throw new Error("Invalid url")}catch(i){return console.warn("Failed to build valid URL:",i),""}}function je(e,n){const r=t.ref(t.unref(e)),i=t.ref(t.unref(n)),o=t.computed(()=>!!(r.value.app==="konnect"||r.value.isExactMatch)),a=t.computed(()=>i.value.startsWith("/")?new URL(`${window.location.origin}${i.value}`):new URL(i.value));return l=>{const{page:c,pageSize:s,offset:u,sortColumnKey:f,sortColumnOrder:d,query:g}=l;try{let m=new URL(a.value.href);return o.value&&g?(m.search="",m=r.value.isExactMatch?new URL(`${m.href}/${g}/`):new URL(`${m.href}?filter[name][contains]=${g}`)):(o.value||new URLSearchParams(g).forEach((y,C)=>{m.searchParams.append(C,y)}),f&&m.searchParams.append("sort_by",f),d==="desc"&&m.searchParams.append("sort_desc","1"),m.searchParams.append("size",String(s))),u&&c!==1&&m.searchParams.append("offset",String(u)),m.href}catch(m){return console.error("RouteList(fetcher)",m),i.value}}}function Cn(e,n,r="data"){const i=t.unref(n),{axiosInstance:o}=xe(e.axiosRequestConfig),a=je(e,i),l=t.ref({status:Z.Idle});return{fetcher:async s=>{var u;try{l.value={status:Z.Loading};let f=a(s);f.includes("filter[name]")&&(f=`${f}&page[size]=${s.pageSize}&page[number]=${s.page}`);const d=await o.get(f);if(d.status>=400)throw d;const g=d.data,m=r&&r.replace(/[^\w-_]/gi,"");let y;g[m]&&Array.isArray(g[m])?y=g[m]:Array.isArray(g)?y=g:y=Object.keys(g).length?[g]:[];const C={data:y,total:y.length,...g.offset?{pagination:{offset:g.offset}}:null};return l.value={status:Z.Idle,response:C},C}catch(f){const d={data:[],total:0};return s.query&&(((u=f.response)==null?void 0:u.status)===404||f.status===404)?(l.value={status:Z.NoResults,response:d,error:f.response?f:{response:f}},d):(l.value={status:Z.Error,response:d,error:f.response?f:{response:f}},d)}},fetcherState:l}}function bn(){const e=(i,o="_")=>i?i.split(o).map(a=>a.toLowerCase()==="id"?a.toUpperCase():a.charAt(0).toUpperCase()+a.substring(1)).join(" "):"",n=/(?:^|[\s-:'"])\w/g;return{capitalize:i=>i?i.replace(n,o=>o.toUpperCase()):"",convertKeyToTitle:e}}const Pe=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,He=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const n=e.match(Pe);if(!n)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return n.shift(),n},ze=e=>e==="*"||e==="x"||e==="X",Ye=e=>{const n=parseInt(e,10);return isNaN(n)?e:n},xn=(e,n)=>typeof e!=typeof n?[String(e),String(n)]:[e,n],kn=(e,n)=>{if(ze(e)||ze(n))return 0;const[r,i]=xn(Ye(e),Ye(n));return r>i?1:r<i?-1:0},We=(e,n)=>{for(let r=0;r<Math.max(e.length,n.length);r++){const i=kn(e[r]||"0",n[r]||"0");if(i!==0)return i}return 0},wn=(e,n)=>{const r=He(e),i=He(n),o=r.pop(),a=i.pop(),l=We(r,i);return l!==0?l:o&&a?We(o.split("."),a.split(".")):o||a?o?-1:1:0},Je=(e,n,r)=>{Sn(r);const i=wn(e,n);return Ge[r].includes(i)},Ge={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Ze=Object.keys(Ge),Sn=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Ze.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Ze.join("|")}`)},_n=e=>typeof e=="string"&&/^[v\d]/.test(e)&&Pe.test(e);function An(e){const{gatewayInfo:n,supportedRange:r}=e;if(!n)return!0;const{edition:i,version:o}=n;if(!_n(o))return console.error("Invalid version"),!1;const a=r[i];if(!a)return!1;const[l,c]=a;return!(l&&Je(o,l,"<")||c&&Je(o,c,">"))}function En(e){const n=t.ref(0),r=t.ref(0),i=t.ref(!1);return t.watch(e,a=>{a&&!i.value&&(n.value=a.offsetWidth,r.value=a.scrollWidth,i.value=!0)}),{isTruncated:t.computed(()=>n.value<r.value)}}function Bn(){const{i18n:{t:e}}=ue();return{utf8Name:r=>/^[\p{N}\p{L}.\-_~]*$/u.test(r)?"":e("validationErrors.utf8Name")}}const O={useAxios:xe,useDebouncedFilter:mn,useDeleteUrlBuilder:hn,useErrors:gn,useExternalLinkCreator:yn,useFetcher:Cn,useFetchUrlBuilder:je,useHelpers:qe,useStringHelpers:bn,useI18n:ue,useGatewayFeatureSupported:An,useTruncationDetector:En,useValidators:Bn},Nn={key:0,class:"config-card-fieldset-title"},In=t.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const n=e,{i18n:{t:r}}=O.useI18n(),{convertKeyToTitle:i}=O.useStringHelpers(),o=t.computed(()=>n.item.key??"json-array-item"),a=t.computed(()=>n.item.value??n.item),l=t.computed(()=>{const s=JSON.parse(JSON.stringify(a.value));return n.isArrayItem&&delete s.name,s}),c=t.computed(()=>{var s;return n.isArrayItem?(s=a.value)!=null&&s.name?i(a.value.name,"_"):r("baseConfigCard.general.entryTitle",{index:n.index}):""});return(s,u)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.isArrayItem?"fieldset":"div"),{class:t.normalizeClass(e.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:t.withCtx(()=>[e.isArrayItem?(t.openBlock(),t.createElementBlock("legend",Nn,[t.createElementVNode("b",null,t.toDisplayString(c.value),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(l.value),(f,d)=>(t.openBlock(),t.createBlock(ke,{key:`${o.value}-property-${d}`,item:{key:f,label:t.unref(i)(f),value:l.value[f]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),H=(e,n)=>{const r=e.__vccOpts||e;for(const[i,o]of n)r[i]=o;return r},Qe=H(In,[["__scopeId","data-v-68ca83ec"]]),Xe=H(t.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t:n}}=O.useI18n();return(r,i)=>{const o=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(o,{appearance:"tertiary",class:"navigation-button",onClick:i[0]||(i[0]=a=>r.$emit("navigation-click",e.item))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.value||t.unref(n)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-c96811e5"]]),Tn=t.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t:n}}=O.useI18n();return(r,i)=>{const o=t.resolveComponent("KBadge");return t.openBlock(),t.createBlock(o,{appearance:e.status?"success":"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.status?t.unref(n)("baseConfigCard.statusBadge.enabledLabel"):t.unref(n)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),Fn="#0044f4",$n="#e0e4ea",Ln="#afb7c5",On="#0044f4",Dn="1px",Vn="16px",vn="20px",Rn={class:"config-card-details-row"},Mn=["data-testid"],Kn=["data-testid"],Un=["data-testid"],qn=["data-testid"],jn={key:1},Pn=["data-testid"],Hn=["data-testid"],zn=["data-testid"],Yn=["data-testid"],Wn={name:"ConfigCardItem",components:{JsonCardItem:Qe,StatusBadge:Tn,InternalLinkItem:Xe}},Jn=t.defineComponent({...Wn,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(e,{emit:n}){t.useCssVars(y=>({dc1d91a8:f.value?"none":`solid ${t.unref(Dn)} ${t.unref($n)}`,"59ccec5f":u.value&&c.value?"block":"flex","29318fbe":u.value&&c.value?"100%":r.slim?"50%":"25%","292d0408":u.value&&c.value?"100%":r.slim?"50%":"75%"}));const r=e,i=n,o=t.useSlots(),{i18n:{t:a,formatUnixTimeStamp:l}}=O.useI18n(),c=t.computed(()=>r.item.value!==void 0&&r.item.value!==null&&r.item.value!==""),s=t.computed(()=>!!(r.item.tooltip||o["label-tooltip"])),u=t.computed(()=>r.item.type===$.Json||r.item.type===$.JsonArray),f=t.computed(()=>r.item.type===$.JsonArray),d=t.computed(()=>{switch(r.item.type){case $.ID:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid`,"copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case $.IdArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label})}};case $.Redacted:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid-redacted`,format:"redacted","copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case $.RedactedArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{format:"redacted","copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label})}};case $.Date:return{tag:"div",attrs:{"data-testid":`${r.item.key}-date`},text:l(r.item.value)};case $.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${r.item.key}-badge-status`,status:r.item.value}};case $.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case $.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case $.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${r.item.key}-internal-link`,item:r.item,onNavigationClick:y=>{i("navigation-click",y)}}};case $.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${r.item.key}-external-link`,href:r.item.value},text:r.item.value};case $.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-content`,item:r.item}};case $.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-array-content`,item:r.item}};default:return{tag:"div",attrs:{"data-testid":`${r.item.key}-plain-text`},text:r.item.value}}}),g=t.ref(),{isTruncated:m}=O.useTruncationDetector(g);return(y,C)=>{const k=t.resolveComponent("KLabel"),I=t.resolveComponent("KBadge"),w=t.resolveComponent("KCopy"),R=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("div",Rn,[t.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[t.renderSlot(y.$slots,"label",{item:e.item},()=>[t.createVNode(k,{"tooltip-attributes":{maxWidth:"500px"}},t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.label)+" ",1)]),_:2},[s.value?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[t.renderSlot(y.$slots,"label-tooltip",{},()=>[t.createTextVNode(t.toDisplayString(e.item.tooltip),1)],!0)],8,Kn)]),key:"0"}:void 0]),1024)],!0)],8,Mn),t.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[t.renderSlot(y.$slots,e.item.key,{rowValue:e.item.value},()=>[c.value?(t.openBlock(),t.createElementBlock("div",jn,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(d.value.tag),t.normalizeProps(t.guardReactiveProps(d.value.attrs)),{default:t.withCtx(()=>[d.value.additionalComponent==="KBadge"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-badge-tags`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(h,_)=>(t.openBlock(),t.createBlock(I,{key:`${e.item.key}-badge-tag-${_}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${_}`,tooltip:h,"truncation-tooltip":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h),1)]),_:2},1032,["data-testid","tooltip"]))),128))],8,Pn)):t.createCommentVNode("",!0),d.value.additionalComponent==="KCopy"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${e.item.key}-copy-uuid-array`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(h,_)=>(t.openBlock(),t.createBlock(w,t.mergeProps({ref_for:!0},d.value.childAttrs,{key:`${e.item.key}-copy-uuid-${_}`,"data-testid":`${e.item.key}-copy-uuid-${_}`,text:h}),null,16,["data-testid","text"]))),128))],8,Hn)):d.value.additionalComponent==="KMethodBadge"?(t.openBlock(),t.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${e.item.key}-badge-methods`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(h,_)=>(t.openBlock(),t.createBlock(I,{key:`${e.item.key}-badge-method-${_}`,appearance:Object.values(t.unref(ln.BadgeMethodAppearances)).includes(h.toLowerCase())?h.toLowerCase():"custom",class:"config-badge","data-testid":`${e.item.key}-badge-method-${_}`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h),1)]),_:2},1032,["appearance","data-testid"]))),128))],8,zn)):t.createCommentVNode("",!0),d.value.additionalComponent==="JsonCardItem"?(t.openBlock(),t.createElementBlock("div",{key:3,"data-testid":`${r.item.key}-json-array-content`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(h,_)=>(t.openBlock(),t.createBlock(Qe,{key:`json-array-item-${_}`,index:_,"is-array-item":"",item:h},null,8,["index","item"]))),128))],8,Yn)):(t.openBlock(),t.createBlock(R,{key:4,text:t.unref(m)?e.item.value:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:g,class:t.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},t.toDisplayString(d.value.text),3)]),_:1},8,["text"]))]),_:1},16))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,qn))],!0)],8,Un)])}}}),ke=H(Jn,[["__scopeId","data-v-d268261c"]]),Gn={class:"json-config"},Zn={key:0,class:"json-endpoint"},we=t.defineComponent({__name:"JsonCodeBlock",props:{config:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},jsonRecord:{type:Object,required:!0},requestMethod:{type:String,required:!1,default:""}},setup(e){t.useCssVars(o=>({"4520e3ec":`${i.value}ch`}));const n=e,r=t.computed(()=>n.jsonRecord),i=t.computed(()=>{var l;if(!n.fetcherUrl)return 0;const o=(l=n.fetcherUrl)==null?void 0:l.split("/");return o.length<2?0:41+(n.requestMethod==="post"?o[o.length-1]:o[o.length-2]).length});return(o,a)=>{const l=t.resolveComponent("KBadge"),c=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock("div",Gn,[n.fetcherUrl?(t.openBlock(),t.createElementBlock("div",Zn,[t.createVNode(l,{appearance:n.requestMethod},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.requestMethod),1)]),_:1},8,["appearance"]),t.createVNode(c,{id:"json-endpoint-codeblock",code:n.fetcherUrl,language:"json","single-line":"",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),n.jsonRecord?(t.openBlock(),t.createBlock(c,{key:1,id:"json-codeblock",class:t.normalizeClass({"json-content":n.fetcherUrl}),code:JSON.stringify(r.value,null,2),language:"json",theme:"dark"},null,8,["class","code"])):t.createCommentVNode("",!0)])}}});/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function et(e){return typeof e>"u"||e===null}function Qn(e){return typeof e=="object"&&e!==null}function Xn(e){return Array.isArray(e)?e:et(e)?[]:[e]}function er(e,n){var r,i,o,a;if(n)for(a=Object.keys(n),r=0,i=a.length;r<i;r+=1)o=a[r],e[o]=n[o];return e}function tr(e,n){var r="",i;for(i=0;i<n;i+=1)r+=e;return r}function nr(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var rr=et,ir=Qn,or=Xn,ar=tr,lr=nr,cr=er,V={isNothing:rr,isObject:ir,toArray:or,repeat:ar,isNegativeZero:lr,extend:cr};function tt(e,n){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(r+=`
|
|
2
2
|
|
|
3
3
|
`+e.mark.snippet),i+" "+r):i}function ae(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=tt(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ae.prototype=Object.create(Error.prototype),ae.prototype.constructor=ae,ae.prototype.toString=function(n){return this.name+": "+tt(this,n)};var q=ae;function Se(e,n,r,i,o){var a="",l="",c=Math.floor(o/2)-1;return i-n>c&&(a=" ... ",n=i-c+a.length),r-i>c&&(l=" ...",r=i+c-l.length),{str:a+e.slice(n,r).replace(/\t/g,"→")+l,pos:i-n+a.length}}function _e(e,n){return V.repeat(" ",n-e.length)+e}function sr(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],o=[],a,l=-1;a=r.exec(e.buffer);)o.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&l<0&&(l=i.length-2);l<0&&(l=i.length-1);var c="",s,u,f=Math.min(e.line+n.linesAfter,o.length).toString().length,d=n.maxLength-(n.indent+f+3);for(s=1;s<=n.linesBefore&&!(l-s<0);s++)u=Se(e.buffer,i[l-s],o[l-s],e.position-(i[l]-i[l-s]),d),c=V.repeat(" ",n.indent)+_e((e.line-s+1).toString(),f)+" | "+u.str+`
|
|
4
4
|
`+c;for(u=Se(e.buffer,i[l],o[l],e.position,d),c+=V.repeat(" ",n.indent)+_e((e.line+1).toString(),f)+" | "+u.str+`
|
|
@@ -29,4 +29,4 @@
|
|
|
29
29
|
`+e.slice(o,a),o=a+1),l=c;return s+=`
|
|
30
30
|
`,e.length-o>n&&l>o?s+=e.slice(o,l)+`
|
|
31
31
|
`+e.slice(l+1):s+=e.slice(o),s.slice(1)}function Ji(e){for(var n="",r=0,i,o=0;o<e.length;r>=65536?o+=2:o++)r=de(e,o),i=U[r],!i&&se(r)?(n+=e[o],r>=65536&&(n+=e[o+1])):n+=i||Ki(r);return n}function Gi(e,n,r){var i="",o=e.tag,a,l,c;for(a=0,l=r.length;a<l;a+=1)c=r[a],e.replacer&&(c=e.replacer.call(r,String(a),c)),(W(e,n,c,!1,!1)||typeof c>"u"&&W(e,n,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=o,e.dump="["+i+"]"}function en(e,n,r,i){var o="",a=e.tag,l,c,s;for(l=0,c=r.length;l<c;l+=1)s=r[l],e.replacer&&(s=e.replacer.call(r,String(l),s)),(W(e,n+1,s,!0,!0,!1,!0)||typeof s>"u"&&W(e,n+1,null,!0,!0,!1,!0))&&((!i||o!=="")&&(o+=Le(e,n)),e.dump&&le===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=a,e.dump=o||"[]"}function Zi(e,n,r){var i="",o=e.tag,a=Object.keys(r),l,c,s,u,f;for(l=0,c=a.length;l<c;l+=1)f="",i!==""&&(f+=", "),e.condenseFlow&&(f+='"'),s=a[l],u=r[s],e.replacer&&(u=e.replacer.call(r,s,u)),W(e,n,s,!1,!1)&&(e.dump.length>1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),W(e,n,u,!1,!1)&&(f+=e.dump,i+=f));e.tag=o,e.dump="{"+i+"}"}function Qi(e,n,r,i){var o="",a=e.tag,l=Object.keys(r),c,s,u,f,d,g;if(e.sortKeys===!0)l.sort();else if(typeof e.sortKeys=="function")l.sort(e.sortKeys);else if(e.sortKeys)throw new q("sortKeys must be a boolean or a function");for(c=0,s=l.length;c<s;c+=1)g="",(!i||o!=="")&&(g+=Le(e,n)),u=l[c],f=r[u],e.replacer&&(f=e.replacer.call(r,u,f)),W(e,n+1,u,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&le===e.dump.charCodeAt(0)?g+="?":g+="? "),g+=e.dump,d&&(g+=Le(e,n)),W(e,n+1,f,!0,d)&&(e.dump&&le===e.dump.charCodeAt(0)?g+=":":g+=": ",g+=e.dump,o+=g));e.tag=a,e.dump=o||"{}"}function tn(e,n,r){var i,o,a,l,c,s;for(o=r?e.explicitTypes:e.implicitTypes,a=0,l=o.length;a<l;a+=1)if(c=o[a],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof n=="object"&&n instanceof c.instanceOf)&&(!c.predicate||c.predicate(n))){if(r?c.multi&&c.representName?e.tag=c.representName(n):e.tag=c.tag:e.tag="?",c.represent){if(s=e.styleMap[c.tag]||c.defaultStyle,vt.call(c.represent)==="[object Function]")i=c.represent(n,s);else if(Rt.call(c.represent,s))i=c.represent[s](n,s);else throw new q("!<"+c.tag+'> tag resolver accepts not "'+s+'" style');e.dump=i}return!0}return!1}function W(e,n,r,i,o,a,l){e.tag=null,e.dump=r,tn(e,r,!1)||tn(e,r,!0);var c=vt.call(e.dump),s=i,u;i&&(i=e.flowLevel<0||e.flowLevel>n);var f=c==="[object Object]"||c==="[object Array]",d,g;if(f&&(d=e.duplicates.indexOf(r),g=d!==-1),(e.tag!==null&&e.tag!=="?"||g||e.indent!==2&&n>0)&&(o=!1),g&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(f&&g&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),c==="[object Object]")i&&Object.keys(e.dump).length!==0?(Qi(e,n,e.dump,o),g&&(e.dump="&ref_"+d+e.dump)):(Zi(e,n,e.dump),g&&(e.dump="&ref_"+d+" "+e.dump));else if(c==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!l&&n>0?en(e,n-1,e.dump,o):en(e,n,e.dump,o),g&&(e.dump="&ref_"+d+e.dump)):(Gi(e,n,e.dump),g&&(e.dump="&ref_"+d+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&Yi(e,e.dump,n,a,s);else{if(c==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new q("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}function Xi(e,n){var r=[],i=[],o,a;for(De(e,r,i),o=0,a=i.length;o<a;o+=1)n.duplicates.push(r[i[o]]);n.usedDuplicates=new Array(a)}function De(e,n,r){var i,o,a;if(e!==null&&typeof e=="object")if(o=n.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(n.push(e),Array.isArray(e))for(o=0,a=e.length;o<a;o+=1)De(e[o],n,r);else for(i=Object.keys(e),o=0,a=i.length;o<a;o+=1)De(e[i[o]],n,r)}function eo(e,n){n=n||{};var r=new qi(n);r.noRefs||Xi(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),W(r,0,i,!0,!0)?r.dump+`
|
|
32
|
-
`:""}var to=eo,no={dump:to};function Ve(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var ro=M,io=rt,oo=lt,ao=ft,lo=pt,co=Be,so=Vt.load,uo=Vt.loadAll,fo=no.dump,po=q,mo={binary:Ct,float:ut,map:at,null:ct,pairs:xt,set:kt,timestamp:gt,bool:st,int:dt,merge:yt,omap:bt,seq:ot,str:it},ho=Ve("safeLoad","load"),go=Ve("safeLoadAll","loadAll"),yo=Ve("safeDump","dump"),Co={Type:ro,Schema:io,FAILSAFE_SCHEMA:oo,JSON_SCHEMA:ao,CORE_SCHEMA:lo,DEFAULT_SCHEMA:co,load:so,loadAll:uo,dump:fo,YAMLException:po,types:mo,safeLoad:ho,safeLoadAll:go,safeDump:yo};const bo={class:"yaml-config"},ve=t.defineComponent({__name:"YamlCodeBlock",props:{yamlRecord:{type:Object,required:!0}},setup(e){const n=e,r=t.computed(()=>{const i=Object.fromEntries(Object.entries(n.yamlRecord).filter(([,o])=>o!==null&&o!==""&&(Array.isArray(o)?o.length!==0:!0)));return Object.keys(i).length===0&&i.constructor===Object?"":Co.dump(i).trim()});return(i,o)=>{const a=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock("div",bo,[n.yamlRecord?(t.openBlock(),t.createBlock(a,{key:0,id:"yaml-codeblock",code:r.value,language:"yaml",theme:"dark"},null,8,["code"])):t.createCommentVNode("",!0)])}}}),xo={key:0,class:"config-card-display-form"},ko=["data-testid"],wo={key:0,class:"config-card-prop-section-title"},nn=H(t.defineComponent({__name:"ConfigCardDisplay",props:{config:{type:Object,required:!1,default:()=>({})},propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""}},setup(e){const n=e,r=t.useSlots(),{i18n:{t:i}}=O.useI18n(),o=l=>!!(l.tooltip||r[`${l.key}-label-tooltip`]),a=t.computed(()=>{if(!n.record)return n.record;const l=JSON.parse(JSON.stringify(n.record));return delete l.created_at,delete l.updated_at,l});return(l,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[e.format==="structured"?(t.openBlock(),t.createElementBlock("div",xo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propListTypes,s=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${s}-props`,class:t.normalizeClass(`config-card-details-${s}-props`),"data-testid":`config-card-details-${s}-props`},[s!=="basic"?(t.openBlock(),t.createElementBlock("div",wo,t.toDisplayString(s==="advanced"?t.unref(i)("baseConfigCard.sections.advanced"):t.unref(i)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propertyCollections[s],u=>(t.openBlock(),t.createBlock(ke,{key:u.key,item:u},t.createSlots({label:t.withCtx(()=>[t.renderSlot(l.$slots,`${u.key}-label`,{row:u},void 0,!0)]),[u.key]:t.withCtx(({rowValue:f})=>[t.renderSlot(l.$slots,u.key,{row:u,rowValue:f},void 0,!0)]),_:2},[o(u)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(l.$slots,`${u.key}-label-tooltip`,{row:u},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,ko))),128))])):t.createCommentVNode("",!0),e.format==="json"&&n.record?(t.openBlock(),t.createBlock(we,{key:1,config:n.config,"fetcher-url":n.fetcherUrl,"json-record":a.value,"request-method":"get"},null,8,["config","fetcher-url","json-record"])):t.createCommentVNode("",!0),e.format==="yaml"&&n.record?(t.openBlock(),t.createBlock(ve,{key:2,"yaml-record":a.value},null,8,["yaml-record"])):t.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-2052238b"]]),z="24px",oe=(e,n)=>{const r=e.__vccOpts||e;for(const[i,o]of n)r[i]=o;return r},So=e=>(t.pushScopeId("data-v-1d2a8d30"),e=e(),t.popScopeId(),e),_o=["aria-hidden"],Ao={key:0,"data-testid":"kui-icon-svg-title"},Eo=So(()=>t.createElementVNode("path",{d:"M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",fill:"currentColor"},null,-1)),Bo=t.defineComponent({__name:"AddIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:z,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),r=Number(n);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,r=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),a=Number(o);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return z}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:r.value,lineHeight:"0",width:r.value}));return(o,a)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon add-icon","data-testid":"kui-icon-wrapper-add-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-add-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Ao,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Eo],8,_o))]),_:1},8,["aria-hidden","style"]))}}),No=oe(Bo,[["__scopeId","data-v-1d2a8d30"]]),Io=e=>(t.pushScopeId("data-v-929b4762"),e=e(),t.popScopeId(),e),To=["aria-hidden"],Fo={key:0,"data-testid":"kui-icon-svg-title"},$o=Io(()=>t.createElementVNode("path",{d:"M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",fill:"currentColor"},null,-1)),Lo=t.defineComponent({__name:"BookIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:z,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),r=Number(n);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,r=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),a=Number(o);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return z}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:r.value,lineHeight:"0",width:r.value}));return(o,a)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon book-icon","data-testid":"kui-icon-wrapper-book-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-book-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Fo,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),$o],8,To))]),_:1},8,["aria-hidden","style"]))}}),Oo=oe(Lo,[["__scopeId","data-v-929b4762"]]),Do=e=>(t.pushScopeId("data-v-219f8484"),e=e(),t.popScopeId(),e),Vo=["aria-hidden"],vo={key:0,"data-testid":"kui-icon-svg-title"},Ro=Do(()=>t.createElementVNode("path",{d:"M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",fill:"currentColor"},null,-1)),Mo=t.defineComponent({__name:"ChevronDownIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:z,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),r=Number(n);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,r=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),a=Number(o);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return z}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:r.value,lineHeight:"0",width:r.value}));return(o,a)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon chevron-down-icon","data-testid":"kui-icon-wrapper-chevron-down-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-chevron-down-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",vo,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Ro],8,Vo))]),_:1},8,["aria-hidden","style"]))}}),Ko=oe(Mo,[["__scopeId","data-v-219f8484"]]),Uo=e=>(t.pushScopeId("data-v-ed11facd"),e=e(),t.popScopeId(),e),qo=["aria-hidden"],jo={key:0,"data-testid":"kui-icon-svg-title"},Po=Uo(()=>t.createElementVNode("path",{d:"M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",fill:"currentColor"},null,-1)),Ho=t.defineComponent({__name:"CloseIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:z,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),r=Number(n);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,r=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),a=Number(o);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return z}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:r.value,lineHeight:"0",width:r.value}));return(o,a)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon close-icon","data-testid":"kui-icon-wrapper-close-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-close-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",jo,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Po],8,qo))]),_:1},8,["aria-hidden","style"]))}}),zo=oe(Ho,[["__scopeId","data-v-ed11facd"]]),Yo=e=>(t.pushScopeId("data-v-4399d24a"),e=e(),t.popScopeId(),e),Wo=["aria-hidden"],Jo={key:0,"data-testid":"kui-icon-svg-title"},Go=Yo(()=>t.createElementVNode("path",{d:"M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",fill:"currentColor"},null,-1)),Zo=t.defineComponent({__name:"CopyIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:z,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),r=Number(n);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,r=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),a=Number(o);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return z}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:r.value,lineHeight:"0",width:r.value}));return(o,a)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon copy-icon","data-testid":"kui-icon-wrapper-copy-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-copy-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Jo,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Go],8,Wo))]),_:1},8,["aria-hidden","style"]))}}),Qo=oe(Zo,[["__scopeId","data-v-4399d24a"]]),Xo=e=>(t.pushScopeId("data-v-cf4e7d0b"),e=e(),t.popScopeId(),e),ea=["aria-hidden"],ta={key:0,"data-testid":"kui-icon-svg-title"},na=Xo(()=>t.createElementVNode("path",{d:"M12 20C11.45 20 10.9792 19.8042 10.5875 19.4125C10.1958 19.0208 10 18.55 10 18C10 17.45 10.1958 16.9792 10.5875 16.5875C10.9792 16.1958 11.45 16 12 16C12.55 16 13.0208 16.1958 13.4125 16.5875C13.8042 16.9792 14 17.45 14 18C14 18.55 13.8042 19.0208 13.4125 19.4125C13.0208 19.8042 12.55 20 12 20ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14ZM12 8C11.45 8 10.9792 7.80417 10.5875 7.4125C10.1958 7.02083 10 6.55 10 6C10 5.45 10.1958 4.97917 10.5875 4.5875C10.9792 4.19583 11.45 4 12 4C12.55 4 13.0208 4.19583 13.4125 4.5875C13.8042 4.97917 14 5.45 14 6C14 6.55 13.8042 7.02083 13.4125 7.4125C13.0208 7.80417 12.55 8 12 8Z",fill:"currentColor"},null,-1)),ra=t.defineComponent({__name:"MoreIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:z,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),r=Number(n);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,r=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),a=Number(o);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return z}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:r.value,lineHeight:"0",width:r.value}));return(o,a)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon more-icon","data-testid":"kui-icon-wrapper-more-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-more-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",ta,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),na],8,ea))]),_:1},8,["aria-hidden","style"]))}}),ia=oe(ra,[["__scopeId","data-v-cf4e7d0b"]]),oa={class:"config-card-title","data-testid":"config-card-title"},aa={class:"config-card-actions"},la=["href"],ca={class:"config-card-details-section"},sa=H(t.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1},titleTag:{type:String,default:"h2"}},emits:["loading","fetch:success","fetch:error"],setup(e,{emit:n}){var _;const r=n,i=e,{i18n:{t:o}}=O.useI18n(),{getMessageFromError:a}=O.useErrors(),{convertKeyToTitle:l}=O.useStringHelpers(),{axiosInstance:c}=O.useAxios((_=i.config)==null?void 0:_.axiosRequestConfig),s=[{label:o("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"}],u=t.ref("structured"),f=p=>{u.value=p==null?void 0:p.value},d={id:{type:L.ID,label:o("baseConfigCard.commonFields.id_label"),order:0,section:P.Basic},name:{order:1,section:P.Basic},enabled:{type:L.BadgeStatus,order:2,section:P.Basic},updated_at:{type:L.Date,label:o("baseConfigCard.commonFields.updated_at_label"),order:3,section:P.Basic},created_at:{type:L.Date,label:o("baseConfigCard.commonFields.created_at_label"),order:4,section:P.Basic},tags:{type:L.BadgeTag,order:-1,section:P.Basic}},g=t.ref(!1),m=t.ref(!1),y=t.ref(""),C=t.ref({}),k=t.computed(()=>{var B,b,T;if(!C.value)return[];const p=[],A=Object.keys(C.value).length;for(const E in C.value){const S=(b=(B=i.configSchema)==null?void 0:B[E])==null?void 0:b.order,F=(T=d[E])==null?void 0:T.order;let $=A;(F||F===0)&&($=F===-1?A+1:F),S&&($=S===-1?A+1:S),p.push([E,$])}return p.sort(function(E,S){return E[1]-S[1]}),p.map(E=>{var X,an;const S=E[0],F=(X=C.value)==null?void 0:X[S],$=((an=i.configSchema)==null?void 0:an[S])||{},v=d[S];return{key:S,value:F,hidden:$.hidden||!1,type:$.type??((v==null?void 0:v.type)||L.Text),label:$.label??((v==null?void 0:v.label)||l(S)),tooltip:$.tooltip??((v==null?void 0:v.tooltip)||void 0),section:$.section??((v==null?void 0:v.section)||P.Advanced)}}).filter(E=>!E.hidden&&E.key!==i.pluginConfigKey)}),I=t.computed(()=>{var b,T;if(!C.value||!i.pluginConfigKey)return[];const p=C.value[i.pluginConfigKey]||{},A=Object.keys(p).length,B=[];for(const E in p){const S=(T=(b=i.pluginConfigSchema)==null?void 0:b[E])==null?void 0:T.order,F=p[E];let $=F!=null&&F!==""?A-1:A;S&&($=S===-1?A+1:S),B.push([E,$])}return B.sort(function(E,S){return E[1]-S[1]}),B.map(E=>{var v;const S=E[0],F=p[S],$=((v=i.pluginConfigSchema)==null?void 0:v[S])||{};return{key:S,value:F,hidden:$.hidden||!1,type:$.type??L.Text,label:$.label??l(S),tooltip:$.tooltip??void 0,section:P.Plugin}}).filter(E=>!E.hidden)}),w=t.computed(()=>{var p,A,B,b;return{basic:(p=k.value)==null?void 0:p.filter(T=>T.section===P.Basic),advanced:(A=k.value)==null?void 0:A.filter(T=>T.section===P.Advanced),plugin:(b=I.value)==null?void 0:b.concat((B=k.value)==null?void 0:B.filter(T=>T.section===P.Plugin))}}),R=t.computed(()=>{const p=[];return w.value.basic.length&&p.push("basic"),w.value.advanced.length&&p.push("advanced"),w.value.plugin.length&&p.push("plugin"),p}),h=t.computed(()=>{var A,B;let p=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"?p=p.replace(/{controlPlaneId}/gi,((A=i.config)==null?void 0:A.controlPlaneId)||""):i.config.app==="kongManager"&&(p=p.replace(/\/{workspace}/gi,(B=i.config)!=null&&B.workspace?`/${i.config.workspace}`:"")),p=p.replace(/{id}/gi,i.config.entityId),p});return t.watch(g,p=>{r("loading",p)},{immediate:!0}),t.onBeforeMount(async()=>{m.value=!1,g.value=!0;try{const{data:p}=await c.get(h.value);if(i.dataKey)if(typeof p[i.dataKey]<"u")C.value={...p[i.dataKey]};else throw new Error(o("errors.dataKeyUndefined",{dataKey:i.dataKey}));else C.value={...p};Object.keys(i.configSchema).filter(B=>i.configSchema[B].forceShow).forEach(B=>{C.value&&typeof C.value[B]>"u"&&(C.value[B]=null)}),r("fetch:success",p)}catch(p){const A=a(p);y.value=A.startsWith("code")?o("baseConfigCard.errors.load"):A,m.value=!0,r("fetch:error",p)}finally{g.value=!1}}),(p,A)=>{const B=t.resolveComponent("KLabel"),b=t.resolveComponent("KSelect"),T=t.resolveComponent("KButton"),E=t.resolveComponent("KSkeleton"),S=t.resolveComponent("KEmptyState"),F=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(F,{class:"kong-ui-entity-base-config-card","title-tag":e.titleTag},t.createSlots({actions:t.withCtx(()=>[t.createElementVNode("div",aa,[t.renderSlot(p.$slots,"actions",{},void 0,!0),t.createVNode(B,{class:"config-format-select-label","data-testid":"config-format-select-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1}),t.createVNode(b,{"data-testid":"select-config-format",items:s,onChange:f}),e.configCardDoc?(t.openBlock(),t.createBlock(T,{key:0,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:t.withCtx(()=>[t.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[t.createVNode(t.unref(Oo),{size:t.unref(vn)},null,8,["size"])],8,la)]),_:1})):t.createCommentVNode("",!0)])]),default:t.withCtx(()=>[g.value?(t.openBlock(),t.createBlock(E,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):m.value?(t.openBlock(),t.createBlock(S,{key:1,"data-testid":"config-card-fetch-error","icon-variant":"error"},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(y.value),1)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",ca,[t.createVNode(nn,{config:e.config,"fetcher-url":h.value,format:u.value,"prop-list-types":R.value,"property-collections":w.value,record:C.value},t.createSlots({_:2},[t.renderList(Object.keys(p.$slots),$=>({name:$,fn:t.withCtx(({row:v,rowValue:X})=>[t.renderSlot(p.$slots,$,{row:v,rowValue:X},void 0,!0)])}))]),1032,["config","fetcher-url","format","prop-list-types","property-collections","record"])])]),_:2},[e.hideTitle?void 0:{name:"title",fn:t.withCtx(()=>[t.createElementVNode("span",oa,[t.renderSlot(p.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1032,["title-tag"])}}}),[["__scopeId","data-v-f40a683b"]]),da=["novalidate"],ua={class:"form-actions","data-testid":"form-actions"},fa=H(t.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""},formFields:{type:Object,required:!0},noValidate:{type:Boolean,default:!1}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{emit:n}){var R;const r=n,i=e,o=cn.useRouter(),{i18n:{t:a}}=O.useI18n(),{getMessageFromError:l}=O.useErrors(),{axiosInstance:c}=O.useAxios((R=i.config)==null?void 0:R.axiosRequestConfig),s=t.ref(!1),u=t.ref(!1),f=t.ref(""),d=t.computed(()=>i.canSubmit===!1||i.isReadonly),g=t.ref(!1),m=t.computed(()=>{var _,p;let h=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"?h=h.replace(/{controlPlaneId}/gi,((_=i.config)==null?void 0:_.controlPlaneId)||""):i.config.app==="kongManager"&&(h=h.replace(/\/{workspace}/gi,(p=i.config)!=null&&p.workspace?`/${i.config.workspace}`:"")),i.editId?(h=h.replace(/{id}/gi,i.editId),h):(h=h.replace(/\/{id}/gi,""),h)}),y=()=>{g.value=!g.value},C=()=>{i.config.cancelRoute?o.push(i.config.cancelRoute):k()},k=()=>{r("cancel")},I=()=>{d.value||r("submit")},w=t.ref([{title:a("baseForm.configuration.yaml"),hash:"#yaml"},{title:a("baseForm.configuration.json"),hash:"#json"}]);return t.watch(()=>s.value,h=>{r("loading",h)},{immediate:!0}),t.onBeforeMount(async()=>{if(i.editId)try{u.value=!1,s.value=!0;const{data:h}=await c.get(m.value);r("fetch:success",h)}catch(h){const _=l(h);f.value=_.startsWith("code")?a("baseForm.errors.edit"):_,u.value=!0,r("fetch:error",h)}finally{s.value=!1}}),(h,_)=>{const p=t.resolveComponent("KSkeleton"),A=t.resolveComponent("KEmptyState"),B=t.resolveComponent("KAlert"),b=t.resolveComponent("KButton"),T=t.resolveComponent("KTabs"),E=t.resolveComponent("KSlideout"),S=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(S,{class:"kong-ui-entity-base-form"},{default:t.withCtx(()=>[s.value?(t.openBlock(),t.createBlock(p,{key:0,type:"form"})):u.value?(t.openBlock(),t.createBlock(A,{key:1,"action-button-text":t.unref(a)("baseForm.actions.back"),"data-testid":"form-fetch-error","icon-variant":"error",onClickAction:C},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(f.value),1)]),_:1},8,["action-button-text"])):(t.openBlock(),t.createElementBlock("form",{key:2,"data-testid":"form-content",novalidate:i.noValidate,onReset:t.withModifiers(k,["prevent"]),onSubmit:t.withModifiers(I,["prevent"])},[t.renderSlot(h.$slots,"default",{},void 0,!0),e.errorMessage?(t.openBlock(),t.createBlock(B,{key:0,appearance:"danger","data-testid":"form-error",message:e.errorMessage},null,8,["message"])):t.createCommentVNode("",!0),t.createElementVNode("div",ua,[t.renderSlot(h.$slots,"form-actions",{},()=>[t.createVNode(b,{appearance:"tertiary","data-testid":"form-view-configuration",onClick:_[0]||(_[0]=F=>y())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("baseForm.actions.viewConfiguration")),1)]),_:1}),t.createVNode(b,{appearance:"secondary","data-testid":"form-cancel",disabled:e.isReadonly,type:"reset"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),t.createVNode(b,{appearance:"primary","data-testid":"form-submit",disabled:d.value,type:"submit"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,da)),t.createVNode(E,{"close-on-blur":!1,"data-testid":"form-view-configuration-slideout","has-overlay":!1,"offset-top":60,title:t.unref(a)("baseForm.configuration.title"),visible:g.value,onClose:_[1]||(_[1]=F=>y())},{default:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(t.unref(a)("baseForm.configuration.message")),1),t.createVNode(T,{"data-testid":"form-view-configuration-slideout-tabs",tabs:w.value},{json:t.withCtx(()=>[t.createVNode(we,{config:e.config,"fetcher-url":m.value,"json-record":i.formFields,"request-method":i.editId?"put":"post"},null,8,["config","fetcher-url","json-record","request-method"])]),yaml:t.withCtx(()=>[t.createVNode(ve,{"yaml-record":i.formFields},null,8,["yaml-record"])]),_:1},8,["tabs"])]),_:1},8,["title","visible"])]),_:3})}}}),[["__scopeId","data-v-3def74fe"]]),pa=["data-truncate"],ma=H(t.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0},tooltip:{type:Boolean,default:!1}},setup(e){const n=e,r=t.computed(()=>{var k;return((k=n.rowEl)==null?void 0:k.querySelector(`[data-testid="${n.keyName}"]`))||null}),i=t.computed(()=>{var k;return((k=r.value)==null?void 0:k.querySelector('[data-truncate="true"]'))||null}),o=t.computed(()=>{var I,w;const k=(I=n.rowEl)==null?void 0:I.querySelectorAll("td");return k?((w=k[0])==null?void 0:w.getAttribute("data-testid"))===n.keyName:!1}),a=t.computed(()=>o.value||n.tooltip);let l;const c=()=>{l&&(l.disconnect(),l=void 0)},s=()=>{var I,w,R;let k=((I=r.value)==null?void 0:I.clientWidth)||0;if(r.value&&"getComputedStyle"in window){const h=window.getComputedStyle(r.value);k-=(parseFloat(h.paddingLeft)||0)+(parseFloat(h.paddingRight)||0)}f.value=((w=i.value)==null?void 0:w.getBoundingClientRect().width)||0,d.value=k,g.value=((R=u.value)==null?void 0:R.innerText)||""},u=t.ref({}),f=t.ref(0),d=t.ref(0),g=t.ref(""),m=t.computed(()=>[i.value,r.value]),y=t.watch(m,k=>{if(a.value&&(c(),"ResizeObserver"in window&&window)){l=new ResizeObserver(I=>{window.requestAnimationFrame(()=>{!Array.isArray(I)||!I.length||s()})});for(const I of k)I&&l.observe(I)}},{immediate:!0,flush:"post",deep:!0}),C=t.computed(()=>a.value?f.value>d.value:!1);return t.onMounted(()=>{s()}),t.onUnmounted(()=>{y()}),(k,I)=>{const w=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("span",{ref_key:"contentRef",ref:u,class:"content-wrapper"},[a.value?(t.openBlock(),t.createElementBlock("span",{key:0,"data-truncate":a.value||void 0},[t.createVNode(w,{"max-width":"300",placement:"bottom-start",text:C.value?g.value:""},{default:t.withCtx(()=>[t.renderSlot(k.$slots,"default",{},void 0,!0)]),_:3},8,["text"])],8,pa)):t.renderSlot(k.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-760084ce"]]),ha={class:"toolbar-container"},ga={key:0,class:"toolbar-button-container"},ya=["data-testid"],Ca=H(t.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},sortHandlerFunction:{type:Function,default:()=>({})},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""},titleTag:{type:String,default:"h2"},disableRowClick:{type:Boolean,default:!1}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o}}=O.useI18n(),a=t.computed(()=>{var p,A;return typeof r.errorMessage=="string"?{hasError:!!r.errorMessage,title:r.errorMessage,message:void 0}:{hasError:!!r.errorMessage,title:(p=r.errorMessage)==null?void 0:p.title,message:(A=r.errorMessage)==null?void 0:A.message}}),l=t.computed(()=>r.cacheIdentifier||r.preferencesStorageKey),c=p=>p.hasData||!!r.query,s=t.computed(()=>{const p=[];return Object.keys(r.tableHeaders).forEach(B=>{const b=r.tableHeaders[B];p.push({label:b.label??B,key:B,sortable:b.sortable??!1,hidable:!0})}),r.enableEntityActions&&p.push({key:"actions",hideLabel:!0}),p}),u=p=>({"data-rowid":p.id,"data-testid":p.name,...r.rowAttributes(p)}),f=t.ref({}),d=p=>{var A;return(A=f.value)==null?void 0:A.$el.querySelector(`[data-rowid="${p.id}"]`)},g=p=>{const A={"data-testid":p.headerKey,...r.cellAttributes(p)};return p.colIndex===0&&(A.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),A},m=()=>{i("empty-state-cta-clicked"),y()},y=()=>{i("clear-search-input")},C=t.computed(()=>r.disableRowClick?void 0:(p,A)=>{i("click:row",A)}),k=p=>{i("sort",p)},{setTablePreferences:I,getTablePreferences:w}=fn(),R=t.ref(w(l.value)),h=t.computed(()=>{const p=w(l.value);return{...r.initialFetcherParams,...p}}),_=p=>{R.value=p,l.value&&I(l.value,p)};return(p,A)=>{const B=t.resolveComponent("KButton"),b=t.resolveComponent("KDropdown"),T=t.resolveComponent("KTable"),E=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(E,{class:"kong-ui-entity-base-table",title:e.title,"title-tag":e.titleTag},{default:t.withCtx(()=>[t.createVNode(T,{ref_key:"tableRefs",ref:f,"cache-identifier":l.value,"cell-attrs":g,"client-sort":e.enableClientSort,"disable-pagination-page-jump":e.disablePaginationPageJump,"empty-state-action-message":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?void 0:e.emptyStateOptions.ctaPath,"empty-state-icon-variant":e.query?"search":"kong","empty-state-message":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,error:a.value.hasError,"error-state-message":a.value.message,"error-state-title":a.value.title,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),headers:s.value,"hide-pagination-when-optional":"","initial-fetcher-params":h.value,loading:e.isLoading,"pagination-offset":e.paginationType==="offset","resize-columns":"","row-attrs":u,"search-input":e.query,"sort-handler-function":e.enableClientSort?e.sortHandlerFunction:void 0,sortable:!e.disableSorting,"table-preferences":R.value,onEmptyStateActionClick:m,"onRow:click":C.value,onSort:A[0]||(A[0]=S=>k(S)),"onUpdate:tablePreferences":_},t.createSlots({toolbar:t.withCtx(({state:S})=>[t.withDirectives(t.createElementVNode("div",ha,[t.renderSlot(p.$slots,"toolbar-filter",{},void 0,!0),p.$slots["toolbar-button"]?(t.openBlock(),t.createElementBlock("div",ga,[t.renderSlot(p.$slots,"toolbar-button",{},void 0,!0)])):t.createCommentVNode("",!0)],512),[[t.vShow,c(S)]])]),actions:t.withCtx(({row:S,rowKey:F,rowValue:$})=>[t.createElementVNode("div",{class:"actions-container","data-testid":S.name},[t.createVNode(b,{"kpop-attributes":{placement:"bottom-end"},width:e.dropdownMenuWidth},{items:t.withCtx(()=>[t.renderSlot(p.$slots,"actions",{row:S,rowKey:F,rowValue:$},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(B,{appearance:"tertiary",class:"actions-trigger","data-testid":"overflow-actions-button",icon:"",size:"small"},{default:t.withCtx(()=>[t.createVNode(t.unref(ia))]),_:1})]),_:2},1032,["width"])],8,ya)]),_:2},[t.renderList(e.tableHeaders,(S,F)=>({name:F,fn:t.withCtx(({row:$,rowKey:v,rowValue:X})=>[t.createVNode(ma,{"key-name":String(F),"row-el":d($),tooltip:S.tooltip},{default:t.withCtx(()=>[t.renderSlot(p.$slots,F,{row:$,rowKey:v,rowValue:X},()=>[t.createTextVNode(t.toDisplayString(X),1)],!0)]),_:2},1032,["key-name","row-el","tooltip"])])})),e.query?void 0:{name:"empty-state-action-icon",fn:t.withCtx(()=>[t.createVNode(t.unref(No))]),key:"0"}]),1032,["cache-identifier","client-sort","disable-pagination-page-jump","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","initial-fetcher-params","loading","pagination-offset","search-input","sort-handler-function","sortable","table-preferences","onRow:click"])]),_:3},8,["title","title-tag"])}}}),[["__scopeId","data-v-940ccab7"]]),ba={key:0,class:"kong-ui-entity-delete-error"},xa={key:1,class:"description"},ka=H(t.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:n}){const{i18nT:r}=O.useI18n(),i=e,o=n,a=t.computed(()=>i.needConfirm?i.entityName:""),l=()=>{o("cancel")},c=()=>{o("proceed")};return(s,u)=>{const f=t.resolveComponent("KAlert"),d=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(d,{"action-button-appearance":"danger","action-button-disabled":e.actionPending,"action-button-text":"Yes, delete",class:"kong-ui-entity-delete-modal","confirmation-text":a.value,title:e.title,visible:e.visible,onCancel:l,onProceed:c},{default:t.withCtx(()=>[e.error?(t.openBlock(),t.createElementBlock("div",ba,[t.createVNode(f,{appearance:"danger"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.error),1)]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(r),{class:"message",keypath:i.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},t.createSlots({entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.entityType),1)]),_:2},[i.entityName?{name:"entityName",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(i.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),i.description||s.$slots.description?(t.openBlock(),t.createElementBlock("div",xa,[t.renderSlot(s.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(i.description),1)],!0)])):t.createCommentVNode("",!0)]),_:3},8,["action-button-disabled","confirmation-text","title","visible"])}}}),[["__scopeId","data-v-4361d622"]]),wa={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},Sa={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},_a=["fill"],Aa={mask:"url(#mask0_180_20349)"},Ea=["fill"],rn=t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${Fn})`}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",wa,[t.createElementVNode("mask",Sa,[t.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,_a)]),t.createElementVNode("g",Aa,[t.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,Ea)])]))}}),Ba={key:1,class:"kong-ui-entity-filter"},Na={class:"kong-ui-entity-filter-menu"},Ia=["data-testid"],Ta=["onClick","onKeydown"],Fa={class:"menu-item-indicator"},$a={class:"menu-item-body"},La=["for"],Oa={class:"menu-item-buttons"},Da={class:"filter-clear-button-container"},Va=H(t.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:n}){const{i18n:{t:r}}=O.useI18n(),i=e,o=n,a=t.ref(!1),l=t.ref({}),c=t.ref(new Set),s=t.computed(()=>{const h=[];return new URLSearchParams(i.modelValue).forEach((_,p)=>{_!==""&&h.push(p)}),h}),u=t.computed(()=>{const h=i.config.fields;return Object.keys(h).filter(_=>{var p;return(p=h==null?void 0:h[_])==null?void 0:p.searchable}).map(_=>({label:h[_].label||_,value:_,expanded:!1}))});t.watch(()=>i.modelValue,h=>{l.value={},new URLSearchParams(h).forEach((_,p)=>{l.value[p]=_})});const f=()=>{a.value=!a.value},d=h=>{c.value.has(h)?c.value.delete(h):c.value.add(h)},g=h=>{o("update:modelValue",h)},m=()=>{g("")},y=h=>`filter-${h}`,C=h=>{var _,p;return(((p=(_=i.config.schema)==null?void 0:_[h])==null?void 0:p.values)??[]).map(A=>({value:A,label:A}))},k=h=>{var _,p;return((p=(_=i.config.schema)==null?void 0:_[h])==null?void 0:p.type)??"text"},I=h=>{l.value={...l.value,[h]:""},R()},w=()=>{l.value={},R(!0)},R=(h=!1)=>{const _=Object.keys(l.value).reduce((p,A)=>(l.value[A]&&(p[A]=`${l.value[A]}`),p),{});h&&(a.value=!1),o("update:modelValue",new URLSearchParams(_).toString())};return(h,_)=>{const p=t.resolveComponent("KInput"),A=t.resolveComponent("KButton"),B=t.resolveComponent("KSelect");return e.config.isExactMatch?(t.openBlock(),t.createBlock(p,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":g},{before:t.withCtx(()=>[t.createVNode(rn)]),after:t.withCtx(()=>[t.withDirectives(t.createVNode(t.unref(zo),{class:"kong-ui-entity-filter-clear",onClick:m},null,512),[[t.vShow,e.modelValue!==""]])]),_:1},8,["model-value","placeholder"])):(t.openBlock(),t.createElementBlock("div",Ba,[t.createVNode(A,{appearance:"tertiary","data-testid":"filter-button",onClick:f},{default:t.withCtx(()=>[t.createVNode(rn),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("filter.filterButtonText"))+" "+t.toDisplayString(s.value.length>0?`(${s.value.length})`:""),1)]),_:1}),t.withDirectives(t.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:f},null,512),[[t.vShow,a.value]]),t.withDirectives(t.createElementVNode("div",Na,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,b=>{var T,E;return t.openBlock(),t.createElementBlock("div",{key:b.value,class:"kong-ui-entity-filter-menu-item","data-testid":b.value},[t.createElementVNode("span",{class:t.normalizeClass(["menu-item-title",{expanded:c.value.has(b.value)}]),role:"button",tabindex:"0",onClick:S=>d(b.value),onKeydown:t.withKeys(S=>d(b.value),["enter"])},[t.createTextVNode(t.toDisplayString(b.label)+" ",1),t.withDirectives(t.createElementVNode("span",Fa,null,512),[[t.vShow,s.value.includes(b.value)]]),t.createVNode(t.unref(Ko),{class:t.normalizeClass(["menu-item-expand-icon",{expanded:c.value.has(b.value)}]),color:t.unref(Ln)},null,8,["class","color"])],42,Ta),t.withDirectives(t.createElementVNode("div",$a,[t.createElementVNode("label",{class:"menu-item-label",for:y(b.value)},t.toDisplayString(t.unref(r)("filter.fieldLabel")),9,La),((E=(T=e.config.schema)==null?void 0:T[b.value])==null?void 0:E.type)==="select"?(t.openBlock(),t.createBlock(B,{key:0,id:y(b.value),modelValue:l.value[b.value],"onUpdate:modelValue":S=>l.value[b.value]=S,items:C(b.value),placeholder:t.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(t.openBlock(),t.createBlock(p,{key:1,id:y(b.value),modelValue:l.value[b.value],"onUpdate:modelValue":S=>l.value[b.value]=S,autocomplete:"off",placeholder:t.unref(r)("filter.inputPlaceholder"),type:k(b.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))],512),[[t.vShow,c.value.has(b.value)]]),t.withDirectives(t.createElementVNode("div",Oa,[t.createVNode(A,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:_[0]||(_[0]=S=>R(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.applyButtonText")),1)]),_:1}),t.createVNode(A,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:S=>I(b.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])],512),[[t.vShow,c.value.has(b.value)]])],8,Ia)}),128)),t.createElementVNode("div",Da,[t.createVNode(A,{appearance:"tertiary",size:"small",onClick:w},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearAllButtonText")),1)]),_:1})])],512),[[t.vShow,a.value]])]))}}}),[["__scopeId","data-v-94990087"]]),va=t.defineComponent({__name:"EntityToggleModal",props:{visible:{type:Boolean,required:!0},action:{type:String,required:!0},entityId:{type:String,required:!0},entityType:{type:String,required:!0},entityName:{type:String,required:!0},onConfirm:{type:Function,required:!1,default:null}},emits:["cancel","proceed"],setup(e,{emit:n}){const{i18n:{t:r},i18nT:i}=O.useI18n(),o=e,a=n,l=t.ref(!1),c=t.computed(()=>o.action==="enable"?r("toggleModal.enable.title",{entityType:o.entityType}):r("toggleModal.disable.title",{entityType:o.entityType})),s=t.computed(()=>o.action==="enable"?r("toggleModal.enable.confirmText"):r("toggleModal.disable.confirmText")),u=()=>a("cancel"),f=async()=>{if(o.onConfirm){l.value=!0;try{await o.onConfirm(),a("proceed")}catch(d){console.error(d)}finally{l.value=!1}}};return(d,g)=>{const m=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(m,{"action-button-disabled":l.value,"action-button-text":s.value,"data-testid":`${e.entityType}-${e.entityId}-toggle-prompt`,title:c.value,visible:e.visible,onCancel:u,onProceed:f},{default:t.withCtx(()=>[t.createVNode(t.unref(i),{keypath:`toggleModal.${o.action}.message`,scope:"global"},{entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.entityType),1)]),entityName:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(e.entityName),1)]),_:1},8,["keypath"])]),_:1},8,["action-button-disabled","action-button-text","data-testid","title","visible"])])}}}),Ra=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const n=e,r=t.ref(void 0),i=t.computed(()=>r.value===!0||r.value!==void 0&&n.forceShow===!0);return t.watch(()=>n.authFunction,async()=>{r.value=await n.authFunction()},{immediate:!0}),(o,a)=>i.value?t.renderSlot(o.$slots,"default",{key:0,isAllowed:r.value}):t.createCommentVNode("",!0)}});let Ce;const Ma=new Uint8Array(16);function Ka(){if(!Ce&&(Ce=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ce))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ce(Ma)}const K=[];for(let e=0;e<256;++e)K.push((e+256).toString(16).slice(1));function Ua(e,n=0){return K[e[n+0]]+K[e[n+1]]+K[e[n+2]]+K[e[n+3]]+"-"+K[e[n+4]]+K[e[n+5]]+"-"+K[e[n+6]]+K[e[n+7]]+"-"+K[e[n+8]]+K[e[n+9]]+"-"+K[e[n+10]]+K[e[n+11]]+K[e[n+12]]+K[e[n+13]]+K[e[n+14]]+K[e[n+15]]}const on={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function qa(e,n,r){if(on.randomUUID&&!n&&!e)return on.randomUUID();e=e||{};const i=e.random||(e.rng||Ka)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,n){r=r||0;for(let o=0;o<16;++o)n[r+o]=i[o];return n}return Ua(i)}const ja=["aria-labelledby"],Pa={class:"form-section-wrapper"},Ha={key:1,class:"form-section-description"},za={key:2,class:"form-section-footer"},Ya={class:"form-section-content"},Wa=H(t.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1},titleTag:{type:String,default:"h2"}},setup(e){const n=t.useSlots(),r=qa();return(i,o)=>(t.openBlock(),t.createElementBlock("div",{"aria-labelledby":e.title?t.unref(r):void 0,class:t.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}]),role:"group"},[t.createElementVNode("div",Pa,[e.hideInfoHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.titleTag),{key:0,id:t.unref(r),class:"form-section-title"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1},8,["id"])):t.createCommentVNode("",!0),e.description||t.unref(n).description?(t.openBlock(),t.createElementBlock("div",Ha,[t.renderSlot(i.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),t.unref(n).footer?(t.openBlock(),t.createElementBlock("div",za,[t.renderSlot(i.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",Ya,[t.renderSlot(i.$slots,"default",{},void 0,!0)])])],10,ja))}}),[["__scopeId","data-v-b1f74200"]]),Ja={class:"kong-ui-public-entity-link","data-testid":"entity-link-parent"},Ga={key:0,class:"deleted-entity"},Za={key:1},Qa=["onClick"],Xa=H(t.defineComponent({__name:"EntityLink",props:{entityLinkData:{type:Object,required:!0},externalLink:{type:String,required:!1,default:""},newWindow:{type:Boolean,required:!1,default:!1},allowCopy:{type:Boolean,required:!1,default:!1}},setup(e){const n=e,r=t.ref(),{isTruncated:i}=O.useTruncationDetector(r),{i18n:{t:o}}=O.useI18n(),a=o("global.actions.copyId"),l=t.ref(a),c=t.computed(()=>n.entityLinkData.deleted??!1),s=t.computed(()=>{var d;return(d=n.entityLinkData.id)!=null&&d.toString().includes(":")?n.entityLinkData.id.toString().split(":")[1]:n.entityLinkData.id}),u=t.computed(()=>{var d;return`${(d=s.value)==null?void 0:d.toString().slice(0,5)} (deleted)`}),f=async d=>{await d(s.value||"")&&(l.value=o("global.actions.copyToClipboard"),setTimeout(()=>{l.value=a},1800))};return(d,g)=>{const m=t.resolveComponent("KTooltip"),y=t.resolveComponent("KExternalLink"),C=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",Ja,[c.value?(t.openBlock(),t.createElementBlock("div",Ga,t.toDisplayString(u.value),1)):s.value?s.value?(t.openBlock(),t.createBlock(y,{key:2,class:"entity-link","hide-icon":!e.newWindow,href:e.externalLink,target:e.newWindow?"_blank":"_self"},{default:t.withCtx(()=>[t.createVNode(m,{text:t.unref(i)&&e.entityLinkData.label||""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:r,class:"entity-link-label"},t.toDisplayString(e.entityLinkData.label),513)]),_:1},8,["text"])]),_:1},8,["hide-icon","href","target"])):t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Za,t.toDisplayString(" – "))),s.value&&e.allowCopy?(t.openBlock(),t.createBlock(m,{key:l.value,class:"copy-uuid-tooltip","max-width":"160",placement:"bottom-end",text:l.value},{default:t.withCtx(()=>[t.createVNode(C,null,{default:t.withCtx(({copyToClipboard:k})=>[t.createElementVNode("span",{class:"entity-link-copy-id",onClick:t.withModifiers(I=>f(k),["stop"])},[t.createVNode(t.unref(Qo),{class:"copy-icon",color:t.unref(On),"data-testid":"copy-id",size:t.unref(Vn)},null,8,["color","size"])],8,Qa)]),_:1})]),_:1},8,["text"])):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-60e3ef7c"]]),{useAxios:el,useDeleteUrlBuilder:tl,useErrors:nl,useExternalLinkCreator:rl,useFetchUrlBuilder:il,useFetcher:ol,useDebouncedFilter:al,useStringHelpers:ll,useHelpers:cl,useGatewayFeatureSupported:sl,useTruncationDetector:dl,useValidators:ul}=O;N.ConfigCardDisplay=nn,N.ConfigCardItem=ke,N.ConfigurationSchemaSection=P,N.ConfigurationSchemaType=L,N.EntityBaseConfigCard=sa,N.EntityBaseForm=fa,N.EntityBaseFormType=Ue,N.EntityBaseTable=Ca,N.EntityDeleteModal=ka,N.EntityFilter=Va,N.EntityFormSection=Wa,N.EntityLink=Xa,N.EntityToggleModal=va,N.EntityTypes=Ke,N.FetcherStatus=Z,N.InternalLinkItem=Xe,N.JsonCodeBlock=we,N.PermissionsWrapper=Ra,N.YamlCodeBlock=ve,N.useAxios=el,N.useDebouncedFilter=al,N.useDeleteUrlBuilder=tl,N.useErrors=nl,N.useExternalLinkCreator=rl,N.useFetchUrlBuilder=il,N.useFetcher=ol,N.useGatewayFeatureSupported=sl,N.useHelpers=cl,N.useStringHelpers=ll,N.useTruncationDetector=dl,N.useValidators=ul,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|
|
32
|
+
`:""}var to=eo,no={dump:to};function Ve(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var ro=M,io=rt,oo=lt,ao=ft,lo=pt,co=Be,so=Vt.load,uo=Vt.loadAll,fo=no.dump,po=q,mo={binary:Ct,float:ut,map:at,null:ct,pairs:xt,set:kt,timestamp:gt,bool:st,int:dt,merge:yt,omap:bt,seq:ot,str:it},ho=Ve("safeLoad","load"),go=Ve("safeLoadAll","loadAll"),yo=Ve("safeDump","dump"),Co={Type:ro,Schema:io,FAILSAFE_SCHEMA:oo,JSON_SCHEMA:ao,CORE_SCHEMA:lo,DEFAULT_SCHEMA:co,load:so,loadAll:uo,dump:fo,YAMLException:po,types:mo,safeLoad:ho,safeLoadAll:go,safeDump:yo};const bo={class:"yaml-config"},ve=t.defineComponent({__name:"YamlCodeBlock",props:{yamlRecord:{type:Object,required:!0}},setup(e){const n=e,r=t.computed(()=>{const i=Object.fromEntries(Object.entries(n.yamlRecord).filter(([,o])=>o!==null&&o!==""&&(Array.isArray(o)?o.length!==0:!0)));return Object.keys(i).length===0&&i.constructor===Object?"":Co.dump(i).trim()});return(i,o)=>{const a=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock("div",bo,[n.yamlRecord?(t.openBlock(),t.createBlock(a,{key:0,id:"yaml-codeblock",code:r.value,language:"yaml",theme:"dark"},null,8,["code"])):t.createCommentVNode("",!0)])}}}),xo={key:0,class:"config-card-display-form"},ko=["data-testid"],wo={key:0,class:"config-card-prop-section-title"},nn=H(t.defineComponent({__name:"ConfigCardDisplay",props:{config:{type:Object,required:!1,default:()=>({})},propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""}},setup(e){const n=e,r=t.useSlots(),{i18n:{t:i}}=O.useI18n(),o=l=>!!(l.tooltip||r[`${l.key}-label-tooltip`]),a=t.computed(()=>{if(!n.record)return n.record;const l=JSON.parse(JSON.stringify(n.record));return delete l.created_at,delete l.updated_at,l});return(l,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[e.format==="structured"?(t.openBlock(),t.createElementBlock("div",xo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propListTypes,s=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${s}-props`,class:t.normalizeClass(`config-card-details-${s}-props`),"data-testid":`config-card-details-${s}-props`},[s!=="basic"?(t.openBlock(),t.createElementBlock("div",wo,t.toDisplayString(s==="advanced"?t.unref(i)("baseConfigCard.sections.advanced"):t.unref(i)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propertyCollections[s],u=>(t.openBlock(),t.createBlock(ke,{key:u.key,item:u},t.createSlots({label:t.withCtx(()=>[t.renderSlot(l.$slots,`${u.key}-label`,{row:u},void 0,!0)]),[u.key]:t.withCtx(({rowValue:f})=>[t.renderSlot(l.$slots,u.key,{row:u,rowValue:f},void 0,!0)]),_:2},[o(u)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(l.$slots,`${u.key}-label-tooltip`,{row:u},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,ko))),128))])):t.createCommentVNode("",!0),e.format==="json"&&n.record?(t.openBlock(),t.createBlock(we,{key:1,config:n.config,"fetcher-url":n.fetcherUrl,"json-record":a.value,"request-method":"get"},null,8,["config","fetcher-url","json-record"])):t.createCommentVNode("",!0),e.format==="yaml"&&n.record?(t.openBlock(),t.createBlock(ve,{key:2,"yaml-record":a.value},null,8,["yaml-record"])):t.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-2052238b"]]),z="24px",oe=(e,n)=>{const r=e.__vccOpts||e;for(const[i,o]of n)r[i]=o;return r},So=e=>(t.pushScopeId("data-v-1d2a8d30"),e=e(),t.popScopeId(),e),_o=["aria-hidden"],Ao={key:0,"data-testid":"kui-icon-svg-title"},Eo=So(()=>t.createElementVNode("path",{d:"M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",fill:"currentColor"},null,-1)),Bo=t.defineComponent({__name:"AddIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:z,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),r=Number(n);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,r=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),a=Number(o);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return z}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:r.value,lineHeight:"0",width:r.value}));return(o,a)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon add-icon","data-testid":"kui-icon-wrapper-add-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-add-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Ao,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Eo],8,_o))]),_:1},8,["aria-hidden","style"]))}}),No=oe(Bo,[["__scopeId","data-v-1d2a8d30"]]),Io=e=>(t.pushScopeId("data-v-929b4762"),e=e(),t.popScopeId(),e),To=["aria-hidden"],Fo={key:0,"data-testid":"kui-icon-svg-title"},$o=Io(()=>t.createElementVNode("path",{d:"M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",fill:"currentColor"},null,-1)),Lo=t.defineComponent({__name:"BookIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:z,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),r=Number(n);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,r=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),a=Number(o);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return z}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:r.value,lineHeight:"0",width:r.value}));return(o,a)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon book-icon","data-testid":"kui-icon-wrapper-book-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-book-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Fo,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),$o],8,To))]),_:1},8,["aria-hidden","style"]))}}),Oo=oe(Lo,[["__scopeId","data-v-929b4762"]]),Do=e=>(t.pushScopeId("data-v-219f8484"),e=e(),t.popScopeId(),e),Vo=["aria-hidden"],vo={key:0,"data-testid":"kui-icon-svg-title"},Ro=Do(()=>t.createElementVNode("path",{d:"M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",fill:"currentColor"},null,-1)),Mo=t.defineComponent({__name:"ChevronDownIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:z,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),r=Number(n);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,r=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),a=Number(o);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return z}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:r.value,lineHeight:"0",width:r.value}));return(o,a)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon chevron-down-icon","data-testid":"kui-icon-wrapper-chevron-down-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-chevron-down-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",vo,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Ro],8,Vo))]),_:1},8,["aria-hidden","style"]))}}),Ko=oe(Mo,[["__scopeId","data-v-219f8484"]]),Uo=e=>(t.pushScopeId("data-v-ed11facd"),e=e(),t.popScopeId(),e),qo=["aria-hidden"],jo={key:0,"data-testid":"kui-icon-svg-title"},Po=Uo(()=>t.createElementVNode("path",{d:"M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",fill:"currentColor"},null,-1)),Ho=t.defineComponent({__name:"CloseIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:z,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),r=Number(n);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,r=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),a=Number(o);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return z}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:r.value,lineHeight:"0",width:r.value}));return(o,a)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon close-icon","data-testid":"kui-icon-wrapper-close-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-close-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",jo,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Po],8,qo))]),_:1},8,["aria-hidden","style"]))}}),zo=oe(Ho,[["__scopeId","data-v-ed11facd"]]),Yo=e=>(t.pushScopeId("data-v-4399d24a"),e=e(),t.popScopeId(),e),Wo=["aria-hidden"],Jo={key:0,"data-testid":"kui-icon-svg-title"},Go=Yo(()=>t.createElementVNode("path",{d:"M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",fill:"currentColor"},null,-1)),Zo=t.defineComponent({__name:"CopyIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:z,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),r=Number(n);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,r=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),a=Number(o);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return z}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:r.value,lineHeight:"0",width:r.value}));return(o,a)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon copy-icon","data-testid":"kui-icon-wrapper-copy-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-copy-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Jo,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Go],8,Wo))]),_:1},8,["aria-hidden","style"]))}}),Qo=oe(Zo,[["__scopeId","data-v-4399d24a"]]),Xo=e=>(t.pushScopeId("data-v-cf4e7d0b"),e=e(),t.popScopeId(),e),ea=["aria-hidden"],ta={key:0,"data-testid":"kui-icon-svg-title"},na=Xo(()=>t.createElementVNode("path",{d:"M12 20C11.45 20 10.9792 19.8042 10.5875 19.4125C10.1958 19.0208 10 18.55 10 18C10 17.45 10.1958 16.9792 10.5875 16.5875C10.9792 16.1958 11.45 16 12 16C12.55 16 13.0208 16.1958 13.4125 16.5875C13.8042 16.9792 14 17.45 14 18C14 18.55 13.8042 19.0208 13.4125 19.4125C13.0208 19.8042 12.55 20 12 20ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14ZM12 8C11.45 8 10.9792 7.80417 10.5875 7.4125C10.1958 7.02083 10 6.55 10 6C10 5.45 10.1958 4.97917 10.5875 4.5875C10.9792 4.19583 11.45 4 12 4C12.55 4 13.0208 4.19583 13.4125 4.5875C13.8042 4.97917 14 5.45 14 6C14 6.55 13.8042 7.02083 13.4125 7.4125C13.0208 7.80417 12.55 8 12 8Z",fill:"currentColor"},null,-1)),ra=t.defineComponent({__name:"MoreIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:z,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),r=Number(n);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,r=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),a=Number(o);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return z}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:r.value,lineHeight:"0",width:r.value}));return(o,a)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon more-icon","data-testid":"kui-icon-wrapper-more-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-more-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",ta,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),na],8,ea))]),_:1},8,["aria-hidden","style"]))}}),ia=oe(ra,[["__scopeId","data-v-cf4e7d0b"]]),oa={class:"config-card-title","data-testid":"config-card-title"},aa={class:"config-card-actions"},la=["href"],ca={class:"config-card-details-section"},sa=H(t.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1},titleTag:{type:String,default:"h2"}},emits:["loading","fetch:success","fetch:error"],setup(e,{emit:n}){var _;const r=n,i=e,{i18n:{t:o}}=O.useI18n(),{getMessageFromError:a}=O.useErrors(),{convertKeyToTitle:l}=O.useStringHelpers(),{axiosInstance:c}=O.useAxios((_=i.config)==null?void 0:_.axiosRequestConfig),s=[{label:o("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"}],u=t.ref("structured"),f=p=>{u.value=p==null?void 0:p.value},d={id:{type:$.ID,label:o("baseConfigCard.commonFields.id_label"),order:0,section:P.Basic},name:{order:1,section:P.Basic},enabled:{type:$.BadgeStatus,order:2,section:P.Basic},updated_at:{type:$.Date,label:o("baseConfigCard.commonFields.updated_at_label"),order:3,section:P.Basic},created_at:{type:$.Date,label:o("baseConfigCard.commonFields.created_at_label"),order:4,section:P.Basic},tags:{type:$.BadgeTag,order:-1,section:P.Basic}},g=t.ref(!1),m=t.ref(!1),y=t.ref(""),C=t.ref({}),k=t.computed(()=>{var B,b,T;if(!C.value)return[];const p=[],A=Object.keys(C.value).length;for(const E in C.value){const S=(b=(B=i.configSchema)==null?void 0:B[E])==null?void 0:b.order,L=(T=d[E])==null?void 0:T.order;let F=A;(L||L===0)&&(F=L===-1?A+1:L),S&&(F=S===-1?A+1:S),p.push([E,F])}return p.sort(function(E,S){return E[1]-S[1]}),p.map(E=>{var X,an;const S=E[0],L=(X=C.value)==null?void 0:X[S],F=((an=i.configSchema)==null?void 0:an[S])||{},v=d[S];return{key:S,value:L,hidden:F.hidden||!1,type:F.type??((v==null?void 0:v.type)||$.Text),label:F.label??((v==null?void 0:v.label)||l(S)),tooltip:F.tooltip??((v==null?void 0:v.tooltip)||void 0),section:F.section??((v==null?void 0:v.section)||P.Advanced)}}).filter(E=>!E.hidden&&E.key!==i.pluginConfigKey)}),I=t.computed(()=>{var b,T;if(!C.value||!i.pluginConfigKey)return[];const p=C.value[i.pluginConfigKey]||{},A=Object.keys(p).length,B=[];for(const E in p){const S=(T=(b=i.pluginConfigSchema)==null?void 0:b[E])==null?void 0:T.order,L=p[E];let F=L!=null&&L!==""?A-1:A;S&&(F=S===-1?A+1:S),B.push([E,F])}return B.sort(function(E,S){return E[1]-S[1]}),B.map(E=>{var v;const S=E[0],L=p[S],F=((v=i.pluginConfigSchema)==null?void 0:v[S])||{};return{key:S,value:L,hidden:F.hidden||!1,type:F.type??$.Text,label:F.label??l(S),tooltip:F.tooltip??void 0,section:P.Plugin}}).filter(E=>!E.hidden)}),w=t.computed(()=>{var p,A,B,b;return{basic:(p=k.value)==null?void 0:p.filter(T=>T.section===P.Basic),advanced:(A=k.value)==null?void 0:A.filter(T=>T.section===P.Advanced),plugin:(b=I.value)==null?void 0:b.concat((B=k.value)==null?void 0:B.filter(T=>T.section===P.Plugin))}}),R=t.computed(()=>{const p=[];return w.value.basic.length&&p.push("basic"),w.value.advanced.length&&p.push("advanced"),w.value.plugin.length&&p.push("plugin"),p}),h=t.computed(()=>{var A,B;let p=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"?p=p.replace(/{controlPlaneId}/gi,((A=i.config)==null?void 0:A.controlPlaneId)||""):i.config.app==="kongManager"&&(p=p.replace(/\/{workspace}/gi,(B=i.config)!=null&&B.workspace?`/${i.config.workspace}`:"")),p=p.replace(/{id}/gi,i.config.entityId),p});return t.watch(g,p=>{r("loading",p)},{immediate:!0}),t.onBeforeMount(async()=>{m.value=!1,g.value=!0;try{const{data:p}=await c.get(h.value);if(i.dataKey)if(typeof p[i.dataKey]<"u")C.value={...p[i.dataKey]};else throw new Error(o("errors.dataKeyUndefined",{dataKey:i.dataKey}));else C.value={...p};Object.keys(i.configSchema).filter(B=>i.configSchema[B].forceShow).forEach(B=>{C.value&&typeof C.value[B]>"u"&&(C.value[B]=null)}),r("fetch:success",p)}catch(p){const A=a(p);y.value=A.startsWith("code")?o("baseConfigCard.errors.load"):A,m.value=!0,r("fetch:error",p)}finally{g.value=!1}}),(p,A)=>{const B=t.resolveComponent("KLabel"),b=t.resolveComponent("KSelect"),T=t.resolveComponent("KButton"),E=t.resolveComponent("KSkeleton"),S=t.resolveComponent("KEmptyState"),L=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(L,{class:"kong-ui-entity-base-config-card","title-tag":e.titleTag},t.createSlots({actions:t.withCtx(()=>[t.createElementVNode("div",aa,[t.renderSlot(p.$slots,"actions",{},void 0,!0),t.createVNode(B,{class:"config-format-select-label","data-testid":"config-format-select-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1}),t.createVNode(b,{"data-testid":"select-config-format",items:s,onChange:f}),e.configCardDoc?(t.openBlock(),t.createBlock(T,{key:0,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:t.withCtx(()=>[t.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[t.createVNode(t.unref(Oo),{size:t.unref(vn)},null,8,["size"])],8,la)]),_:1})):t.createCommentVNode("",!0)])]),default:t.withCtx(()=>[g.value?(t.openBlock(),t.createBlock(E,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):m.value?(t.openBlock(),t.createBlock(S,{key:1,"data-testid":"config-card-fetch-error","icon-variant":"error"},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(y.value),1)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",ca,[t.createVNode(nn,{config:e.config,"fetcher-url":h.value,format:u.value,"prop-list-types":R.value,"property-collections":w.value,record:C.value},t.createSlots({_:2},[t.renderList(Object.keys(p.$slots),F=>({name:F,fn:t.withCtx(({row:v,rowValue:X})=>[t.renderSlot(p.$slots,F,{row:v,rowValue:X},void 0,!0)])}))]),1032,["config","fetcher-url","format","prop-list-types","property-collections","record"])])]),_:2},[e.hideTitle?void 0:{name:"title",fn:t.withCtx(()=>[t.createElementVNode("span",oa,[t.renderSlot(p.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1032,["title-tag"])}}}),[["__scopeId","data-v-f40a683b"]]),da=["novalidate"],ua={class:"form-actions","data-testid":"form-actions"},fa=H(t.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""},formFields:{type:Object,required:!0},noValidate:{type:Boolean,default:!1},wrapperComponent:{type:String,default:"KCard"}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{emit:n}){var R;const r=n,i=e,o=cn.useRouter(),{i18n:{t:a}}=O.useI18n(),{getMessageFromError:l}=O.useErrors(),{axiosInstance:c}=O.useAxios((R=i.config)==null?void 0:R.axiosRequestConfig),s=t.ref(!1),u=t.ref(!1),f=t.ref(""),d=t.computed(()=>i.canSubmit===!1||i.isReadonly),g=t.ref(!1),m=t.computed(()=>{var _,p;let h=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"?h=h.replace(/{controlPlaneId}/gi,((_=i.config)==null?void 0:_.controlPlaneId)||""):i.config.app==="kongManager"&&(h=h.replace(/\/{workspace}/gi,(p=i.config)!=null&&p.workspace?`/${i.config.workspace}`:"")),i.editId?(h=h.replace(/{id}/gi,i.editId),h):(h=h.replace(/\/{id}/gi,""),h)}),y=()=>{g.value=!g.value},C=()=>{i.config.cancelRoute?o.push(i.config.cancelRoute):k()},k=()=>{r("cancel")},I=()=>{d.value||r("submit")},w=t.ref([{title:a("baseForm.configuration.yaml"),hash:"#yaml"},{title:a("baseForm.configuration.json"),hash:"#json"}]);return t.watch(()=>s.value,h=>{r("loading",h)},{immediate:!0}),t.onBeforeMount(async()=>{if(i.editId)try{u.value=!1,s.value=!0;const{data:h}=await c.get(m.value);r("fetch:success",h)}catch(h){const _=l(h);f.value=_.startsWith("code")?a("baseForm.errors.edit"):_,u.value=!0,r("fetch:error",h)}finally{s.value=!1}}),(h,_)=>{const p=t.resolveComponent("KSkeleton"),A=t.resolveComponent("KEmptyState"),B=t.resolveComponent("KAlert"),b=t.resolveComponent("KButton"),T=t.resolveComponent("KTabs"),E=t.resolveComponent("KSlideout");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.wrapperComponent),{class:"kong-ui-entity-base-form"},{default:t.withCtx(()=>[s.value?(t.openBlock(),t.createBlock(p,{key:0,type:"form"})):u.value?(t.openBlock(),t.createBlock(A,{key:1,"action-button-text":t.unref(a)("baseForm.actions.back"),"data-testid":"form-fetch-error","icon-variant":"error",onClickAction:C},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(f.value),1)]),_:1},8,["action-button-text"])):(t.openBlock(),t.createElementBlock("form",{key:2,"data-testid":"form-content",novalidate:i.noValidate,onReset:t.withModifiers(k,["prevent"]),onSubmit:t.withModifiers(I,["prevent"])},[t.renderSlot(h.$slots,"default",{},void 0,!0),e.errorMessage?(t.openBlock(),t.createBlock(B,{key:0,appearance:"danger","data-testid":"form-error",message:e.errorMessage},null,8,["message"])):t.createCommentVNode("",!0),t.createElementVNode("div",ua,[t.renderSlot(h.$slots,"form-actions",{},()=>[t.createVNode(b,{appearance:"tertiary","data-testid":"form-view-configuration",onClick:_[0]||(_[0]=S=>y())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("baseForm.actions.viewConfiguration")),1)]),_:1}),t.createVNode(b,{appearance:"secondary","data-testid":"form-cancel",disabled:e.isReadonly,type:"reset"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),t.createVNode(b,{appearance:"primary","data-testid":"form-submit",disabled:d.value,type:"submit"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,da)),t.createVNode(E,{"close-on-blur":!1,"data-testid":"form-view-configuration-slideout","has-overlay":!1,"offset-top":60,title:t.unref(a)("baseForm.configuration.title"),visible:g.value,onClose:_[1]||(_[1]=S=>y())},{default:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(t.unref(a)("baseForm.configuration.message")),1),t.createVNode(T,{"data-testid":"form-view-configuration-slideout-tabs",tabs:w.value},{json:t.withCtx(()=>[t.createVNode(we,{config:e.config,"fetcher-url":m.value,"json-record":i.formFields,"request-method":i.editId?"put":"post"},null,8,["config","fetcher-url","json-record","request-method"])]),yaml:t.withCtx(()=>[t.createVNode(ve,{"yaml-record":i.formFields},null,8,["yaml-record"])]),_:1},8,["tabs"])]),_:1},8,["title","visible"])]),_:3})}}}),[["__scopeId","data-v-fd05df8e"]]),pa=["data-truncate"],ma=H(t.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0},tooltip:{type:Boolean,default:!1}},setup(e){const n=e,r=t.computed(()=>{var k;return((k=n.rowEl)==null?void 0:k.querySelector(`[data-testid="${n.keyName}"]`))||null}),i=t.computed(()=>{var k;return((k=r.value)==null?void 0:k.querySelector('[data-truncate="true"]'))||null}),o=t.computed(()=>{var I,w;const k=(I=n.rowEl)==null?void 0:I.querySelectorAll("td");return k?((w=k[0])==null?void 0:w.getAttribute("data-testid"))===n.keyName:!1}),a=t.computed(()=>o.value||n.tooltip);let l;const c=()=>{l&&(l.disconnect(),l=void 0)},s=()=>{var I,w,R;let k=((I=r.value)==null?void 0:I.clientWidth)||0;if(r.value&&"getComputedStyle"in window){const h=window.getComputedStyle(r.value);k-=(parseFloat(h.paddingLeft)||0)+(parseFloat(h.paddingRight)||0)}f.value=((w=i.value)==null?void 0:w.getBoundingClientRect().width)||0,d.value=k,g.value=((R=u.value)==null?void 0:R.innerText)||""},u=t.ref({}),f=t.ref(0),d=t.ref(0),g=t.ref(""),m=t.computed(()=>[i.value,r.value]),y=t.watch(m,k=>{if(a.value&&(c(),"ResizeObserver"in window&&window)){l=new ResizeObserver(I=>{window.requestAnimationFrame(()=>{!Array.isArray(I)||!I.length||s()})});for(const I of k)I&&l.observe(I)}},{immediate:!0,flush:"post",deep:!0}),C=t.computed(()=>a.value?f.value>d.value:!1);return t.onMounted(()=>{s()}),t.onUnmounted(()=>{y()}),(k,I)=>{const w=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("span",{ref_key:"contentRef",ref:u,class:"content-wrapper"},[a.value?(t.openBlock(),t.createElementBlock("span",{key:0,"data-truncate":a.value||void 0},[t.createVNode(w,{"max-width":"300",placement:"bottomStart",text:C.value?g.value:""},{default:t.withCtx(()=>[t.renderSlot(k.$slots,"default",{},void 0,!0)]),_:3},8,["text"])],8,pa)):t.renderSlot(k.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-471ce76e"]]),ha={class:"toolbar-container"},ga={key:0,class:"toolbar-button-container"},ya=["data-testid"],Ca=H(t.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},sortHandlerFunction:{type:Function,default:()=>({})},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""},titleTag:{type:String,default:"h2"},disableRowClick:{type:Boolean,default:!1}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o}}=O.useI18n(),a=t.computed(()=>{var p,A;return typeof r.errorMessage=="string"?{hasError:!!r.errorMessage,title:r.errorMessage,message:void 0}:{hasError:!!r.errorMessage,title:(p=r.errorMessage)==null?void 0:p.title,message:(A=r.errorMessage)==null?void 0:A.message}}),l=t.computed(()=>r.cacheIdentifier||r.preferencesStorageKey),c=p=>p.hasData||!!r.query,s=t.computed(()=>{const p=[];return Object.keys(r.tableHeaders).forEach(B=>{const b=r.tableHeaders[B];p.push({label:b.label??B,key:B,sortable:b.sortable??!1,hidable:!0})}),r.enableEntityActions&&p.push({key:"actions",hideLabel:!0}),p}),u=p=>({"data-rowid":p.id,"data-testid":p.name,...r.rowAttributes(p)}),f=t.ref({}),d=p=>{var A;return(A=f.value)==null?void 0:A.$el.querySelector(`[data-rowid="${p.id}"]`)},g=p=>{const A={"data-testid":p.headerKey,...r.cellAttributes(p)};return p.colIndex===0&&(A.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),A},m=()=>{i("empty-state-cta-clicked"),y()},y=()=>{i("clear-search-input")},C=t.computed(()=>r.disableRowClick?void 0:(p,A)=>{i("click:row",A)}),k=p=>{i("sort",p)},{setTablePreferences:I,getTablePreferences:w}=fn(),R=t.ref(w(l.value)),h=t.computed(()=>{const p=w(l.value);return{...r.initialFetcherParams,...p}}),_=p=>{R.value=p,l.value&&I(l.value,p)};return(p,A)=>{const B=t.resolveComponent("KButton"),b=t.resolveComponent("KDropdown"),T=t.resolveComponent("KTable"),E=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(E,{class:"kong-ui-entity-base-table",title:e.title,"title-tag":e.titleTag},{default:t.withCtx(()=>[t.createVNode(T,{ref_key:"tableRefs",ref:f,"cache-identifier":l.value,"cell-attrs":g,"client-sort":e.enableClientSort,"disable-pagination-page-jump":e.disablePaginationPageJump,"empty-state-action-message":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?void 0:e.emptyStateOptions.ctaPath,"empty-state-icon-variant":e.query?"search":"kong","empty-state-message":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,error:a.value.hasError,"error-state-message":a.value.message,"error-state-title":a.value.title,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),headers:s.value,"hide-pagination-when-optional":"","initial-fetcher-params":h.value,loading:e.isLoading,"pagination-offset":e.paginationType==="offset","resize-columns":"","row-attrs":u,"search-input":e.query,"sort-handler-function":e.enableClientSort?e.sortHandlerFunction:void 0,sortable:!e.disableSorting,"table-preferences":R.value,onEmptyStateActionClick:m,"onRow:click":C.value,onSort:A[0]||(A[0]=S=>k(S)),"onUpdate:tablePreferences":_},t.createSlots({toolbar:t.withCtx(({state:S})=>[t.withDirectives(t.createElementVNode("div",ha,[t.renderSlot(p.$slots,"toolbar-filter",{},void 0,!0),p.$slots["toolbar-button"]?(t.openBlock(),t.createElementBlock("div",ga,[t.renderSlot(p.$slots,"toolbar-button",{},void 0,!0)])):t.createCommentVNode("",!0)],512),[[t.vShow,c(S)]])]),actions:t.withCtx(({row:S,rowKey:L,rowValue:F})=>[t.createElementVNode("div",{class:"actions-container","data-testid":S.name},[t.createVNode(b,{"kpop-attributes":{placement:"bottomEnd"},width:e.dropdownMenuWidth},{items:t.withCtx(()=>[t.renderSlot(p.$slots,"actions",{row:S,rowKey:L,rowValue:F},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(B,{appearance:"tertiary",class:"actions-trigger","data-testid":"overflow-actions-button",icon:"",size:"small"},{default:t.withCtx(()=>[t.createVNode(t.unref(ia))]),_:1})]),_:2},1032,["width"])],8,ya)]),_:2},[t.renderList(e.tableHeaders,(S,L)=>({name:L,fn:t.withCtx(({row:F,rowKey:v,rowValue:X})=>[t.createVNode(ma,{"key-name":String(L),"row-el":d(F),tooltip:S.tooltip},{default:t.withCtx(()=>[t.renderSlot(p.$slots,L,{row:F,rowKey:v,rowValue:X},()=>[t.createTextVNode(t.toDisplayString(X),1)],!0)]),_:2},1032,["key-name","row-el","tooltip"])])})),e.query?void 0:{name:"empty-state-action-icon",fn:t.withCtx(()=>[t.createVNode(t.unref(No))]),key:"0"}]),1032,["cache-identifier","client-sort","disable-pagination-page-jump","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","initial-fetcher-params","loading","pagination-offset","search-input","sort-handler-function","sortable","table-preferences","onRow:click"])]),_:3},8,["title","title-tag"])}}}),[["__scopeId","data-v-67bd29c7"]]),ba={key:0,class:"kong-ui-entity-delete-error"},xa={key:1,class:"description"},ka=H(t.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:n}){const{i18nT:r}=O.useI18n(),i=e,o=n,a=t.computed(()=>i.needConfirm?i.entityName:""),l=()=>{o("cancel")},c=()=>{o("proceed")};return(s,u)=>{const f=t.resolveComponent("KAlert"),d=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(d,{"action-button-appearance":"danger","action-button-disabled":e.actionPending,"action-button-text":"Yes, delete",class:"kong-ui-entity-delete-modal","confirmation-text":a.value,title:e.title,visible:e.visible,onCancel:l,onProceed:c},{default:t.withCtx(()=>[e.error?(t.openBlock(),t.createElementBlock("div",ba,[t.createVNode(f,{appearance:"danger"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.error),1)]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(r),{class:"message",keypath:i.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},t.createSlots({entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.entityType),1)]),_:2},[i.entityName?{name:"entityName",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(i.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),i.description||s.$slots.description?(t.openBlock(),t.createElementBlock("div",xa,[t.renderSlot(s.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(i.description),1)],!0)])):t.createCommentVNode("",!0)]),_:3},8,["action-button-disabled","confirmation-text","title","visible"])}}}),[["__scopeId","data-v-4361d622"]]),wa={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},Sa={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},_a=["fill"],Aa={mask:"url(#mask0_180_20349)"},Ea=["fill"],rn=t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${Fn})`}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",wa,[t.createElementVNode("mask",Sa,[t.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,_a)]),t.createElementVNode("g",Aa,[t.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,Ea)])]))}}),Ba={key:1,class:"kong-ui-entity-filter"},Na={class:"kong-ui-entity-filter-menu"},Ia=["data-testid"],Ta=["onClick","onKeydown"],Fa={class:"menu-item-indicator"},$a={class:"menu-item-body"},La=["for"],Oa={class:"menu-item-buttons"},Da={class:"filter-clear-button-container"},Va=H(t.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:n}){const{i18n:{t:r}}=O.useI18n(),i=e,o=n,a=t.ref(!1),l=t.ref({}),c=t.ref(new Set),s=t.computed(()=>{const h=[];return new URLSearchParams(i.modelValue).forEach((_,p)=>{_!==""&&h.push(p)}),h}),u=t.computed(()=>{const h=i.config.fields;return Object.keys(h).filter(_=>{var p;return(p=h==null?void 0:h[_])==null?void 0:p.searchable}).map(_=>({label:h[_].label||_,value:_,expanded:!1}))});t.watch(()=>i.modelValue,h=>{l.value={},new URLSearchParams(h).forEach((_,p)=>{l.value[p]=_})});const f=()=>{a.value=!a.value},d=h=>{c.value.has(h)?c.value.delete(h):c.value.add(h)},g=h=>{o("update:modelValue",h)},m=()=>{g("")},y=h=>`filter-${h}`,C=h=>{var _,p;return(((p=(_=i.config.schema)==null?void 0:_[h])==null?void 0:p.values)??[]).map(A=>({value:A,label:A}))},k=h=>{var _,p;return((p=(_=i.config.schema)==null?void 0:_[h])==null?void 0:p.type)??"text"},I=h=>{l.value={...l.value,[h]:""},R()},w=()=>{l.value={},R(!0)},R=(h=!1)=>{const _=Object.keys(l.value).reduce((p,A)=>(l.value[A]&&(p[A]=`${l.value[A]}`),p),{});h&&(a.value=!1),o("update:modelValue",new URLSearchParams(_).toString())};return(h,_)=>{const p=t.resolveComponent("KInput"),A=t.resolveComponent("KButton"),B=t.resolveComponent("KSelect");return e.config.isExactMatch?(t.openBlock(),t.createBlock(p,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":g},{before:t.withCtx(()=>[t.createVNode(rn)]),after:t.withCtx(()=>[t.withDirectives(t.createVNode(t.unref(zo),{class:"kong-ui-entity-filter-clear",onClick:m},null,512),[[t.vShow,e.modelValue!==""]])]),_:1},8,["model-value","placeholder"])):(t.openBlock(),t.createElementBlock("div",Ba,[t.createVNode(A,{appearance:"tertiary","data-testid":"filter-button",onClick:f},{default:t.withCtx(()=>[t.createVNode(rn),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("filter.filterButtonText"))+" "+t.toDisplayString(s.value.length>0?`(${s.value.length})`:""),1)]),_:1}),t.withDirectives(t.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:f},null,512),[[t.vShow,a.value]]),t.withDirectives(t.createElementVNode("div",Na,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,b=>{var T,E;return t.openBlock(),t.createElementBlock("div",{key:b.value,class:"kong-ui-entity-filter-menu-item","data-testid":b.value},[t.createElementVNode("span",{class:t.normalizeClass(["menu-item-title",{expanded:c.value.has(b.value)}]),role:"button",tabindex:"0",onClick:S=>d(b.value),onKeydown:t.withKeys(S=>d(b.value),["enter"])},[t.createTextVNode(t.toDisplayString(b.label)+" ",1),t.withDirectives(t.createElementVNode("span",Fa,null,512),[[t.vShow,s.value.includes(b.value)]]),t.createVNode(t.unref(Ko),{class:t.normalizeClass(["menu-item-expand-icon",{expanded:c.value.has(b.value)}]),color:t.unref(Ln)},null,8,["class","color"])],42,Ta),t.withDirectives(t.createElementVNode("div",$a,[t.createElementVNode("label",{class:"menu-item-label",for:y(b.value)},t.toDisplayString(t.unref(r)("filter.fieldLabel")),9,La),((E=(T=e.config.schema)==null?void 0:T[b.value])==null?void 0:E.type)==="select"?(t.openBlock(),t.createBlock(B,{key:0,id:y(b.value),modelValue:l.value[b.value],"onUpdate:modelValue":S=>l.value[b.value]=S,items:C(b.value),placeholder:t.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(t.openBlock(),t.createBlock(p,{key:1,id:y(b.value),modelValue:l.value[b.value],"onUpdate:modelValue":S=>l.value[b.value]=S,autocomplete:"off",placeholder:t.unref(r)("filter.inputPlaceholder"),type:k(b.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))],512),[[t.vShow,c.value.has(b.value)]]),t.withDirectives(t.createElementVNode("div",Oa,[t.createVNode(A,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:_[0]||(_[0]=S=>R(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.applyButtonText")),1)]),_:1}),t.createVNode(A,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:S=>I(b.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])],512),[[t.vShow,c.value.has(b.value)]])],8,Ia)}),128)),t.createElementVNode("div",Da,[t.createVNode(A,{appearance:"tertiary",size:"small",onClick:w},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearAllButtonText")),1)]),_:1})])],512),[[t.vShow,a.value]])]))}}}),[["__scopeId","data-v-94990087"]]),va=t.defineComponent({__name:"EntityToggleModal",props:{visible:{type:Boolean,required:!0},action:{type:String,required:!0},entityId:{type:String,required:!0},entityType:{type:String,required:!0},entityName:{type:String,required:!0},onConfirm:{type:Function,required:!1,default:null}},emits:["cancel","proceed"],setup(e,{emit:n}){const{i18n:{t:r},i18nT:i}=O.useI18n(),o=e,a=n,l=t.ref(!1),c=t.computed(()=>o.action==="enable"?r("toggleModal.enable.title",{entityType:o.entityType}):r("toggleModal.disable.title",{entityType:o.entityType})),s=t.computed(()=>o.action==="enable"?r("toggleModal.enable.confirmText"):r("toggleModal.disable.confirmText")),u=()=>a("cancel"),f=async()=>{if(o.onConfirm){l.value=!0;try{await o.onConfirm(),a("proceed")}catch(d){console.error(d)}finally{l.value=!1}}};return(d,g)=>{const m=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(m,{"action-button-disabled":l.value,"action-button-text":s.value,"data-testid":`${e.entityType}-${e.entityId}-toggle-prompt`,title:c.value,visible:e.visible,onCancel:u,onProceed:f},{default:t.withCtx(()=>[t.createVNode(t.unref(i),{keypath:`toggleModal.${o.action}.message`,scope:"global"},{entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.entityType),1)]),entityName:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(e.entityName),1)]),_:1},8,["keypath"])]),_:1},8,["action-button-disabled","action-button-text","data-testid","title","visible"])])}}}),Ra=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const n=e,r=t.ref(void 0),i=t.computed(()=>r.value===!0||r.value!==void 0&&n.forceShow===!0);return t.watch(()=>n.authFunction,async()=>{r.value=await n.authFunction()},{immediate:!0}),(o,a)=>i.value?t.renderSlot(o.$slots,"default",{key:0,isAllowed:r.value}):t.createCommentVNode("",!0)}});let Ce;const Ma=new Uint8Array(16);function Ka(){if(!Ce&&(Ce=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ce))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ce(Ma)}const K=[];for(let e=0;e<256;++e)K.push((e+256).toString(16).slice(1));function Ua(e,n=0){return K[e[n+0]]+K[e[n+1]]+K[e[n+2]]+K[e[n+3]]+"-"+K[e[n+4]]+K[e[n+5]]+"-"+K[e[n+6]]+K[e[n+7]]+"-"+K[e[n+8]]+K[e[n+9]]+"-"+K[e[n+10]]+K[e[n+11]]+K[e[n+12]]+K[e[n+13]]+K[e[n+14]]+K[e[n+15]]}const on={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function qa(e,n,r){if(on.randomUUID&&!n&&!e)return on.randomUUID();e=e||{};const i=e.random||(e.rng||Ka)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,n){r=r||0;for(let o=0;o<16;++o)n[r+o]=i[o];return n}return Ua(i)}const ja=["aria-labelledby"],Pa={class:"form-section-wrapper"},Ha={key:1,class:"form-section-description"},za={key:2,class:"form-section-footer"},Ya={class:"form-section-content"},Wa=H(t.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1},titleTag:{type:String,default:"h2"}},setup(e){const n=t.useSlots(),r=qa();return(i,o)=>(t.openBlock(),t.createElementBlock("div",{"aria-labelledby":e.title?t.unref(r):void 0,class:t.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}]),role:"group"},[t.createElementVNode("div",Pa,[e.hideInfoHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.titleTag),{key:0,id:t.unref(r),class:"form-section-title"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1},8,["id"])):t.createCommentVNode("",!0),e.description||t.unref(n).description?(t.openBlock(),t.createElementBlock("div",Ha,[t.renderSlot(i.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),t.unref(n).footer?(t.openBlock(),t.createElementBlock("div",za,[t.renderSlot(i.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",Ya,[t.renderSlot(i.$slots,"default",{},void 0,!0)])])],10,ja))}}),[["__scopeId","data-v-b1f74200"]]),Ja={class:"kong-ui-public-entity-link","data-testid":"entity-link-parent"},Ga={key:0,class:"deleted-entity"},Za={key:1},Qa=["onClick"],Xa=H(t.defineComponent({__name:"EntityLink",props:{entityLinkData:{type:Object,required:!0},externalLink:{type:String,required:!1,default:""},newWindow:{type:Boolean,required:!1,default:!1},allowCopy:{type:Boolean,required:!1,default:!1}},setup(e){const n=e,r=t.ref(),{isTruncated:i}=O.useTruncationDetector(r),{i18n:{t:o}}=O.useI18n(),a=o("global.actions.copyId"),l=t.ref(a),c=t.computed(()=>n.entityLinkData.deleted??!1),s=t.computed(()=>{var d;return(d=n.entityLinkData.id)!=null&&d.toString().includes(":")?n.entityLinkData.id.toString().split(":")[1]:n.entityLinkData.id}),u=t.computed(()=>{var d;return`${(d=s.value)==null?void 0:d.toString().slice(0,5)} (deleted)`}),f=async d=>{await d(s.value||"")&&(l.value=o("global.actions.copyToClipboard"),setTimeout(()=>{l.value=a},1800))};return(d,g)=>{const m=t.resolveComponent("KTooltip"),y=t.resolveComponent("KExternalLink"),C=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",Ja,[c.value?(t.openBlock(),t.createElementBlock("div",Ga,t.toDisplayString(u.value),1)):s.value?s.value?(t.openBlock(),t.createBlock(y,{key:2,class:"entity-link","hide-icon":!e.newWindow,href:e.externalLink,target:e.newWindow?"_blank":"_self"},{default:t.withCtx(()=>[t.createVNode(m,{text:t.unref(i)&&e.entityLinkData.label||""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:r,class:"entity-link-label"},t.toDisplayString(e.entityLinkData.label),513)]),_:1},8,["text"])]),_:1},8,["hide-icon","href","target"])):t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Za,t.toDisplayString(" – "))),s.value&&e.allowCopy?(t.openBlock(),t.createBlock(m,{key:l.value,class:"copy-uuid-tooltip","max-width":"160",placement:"bottomEnd",text:l.value},{default:t.withCtx(()=>[t.createVNode(C,null,{default:t.withCtx(({copyToClipboard:k})=>[t.createElementVNode("span",{class:"entity-link-copy-id",onClick:t.withModifiers(I=>f(k),["stop"])},[t.createVNode(t.unref(Qo),{class:"copy-icon",color:t.unref(On),"data-testid":"copy-id",size:t.unref(Vn)},null,8,["color","size"])],8,Qa)]),_:1})]),_:1},8,["text"])):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-be5bda4c"]]),{useAxios:el,useDeleteUrlBuilder:tl,useErrors:nl,useExternalLinkCreator:rl,useFetchUrlBuilder:il,useFetcher:ol,useDebouncedFilter:al,useStringHelpers:ll,useHelpers:cl,useGatewayFeatureSupported:sl,useTruncationDetector:dl,useValidators:ul}=O;N.ConfigCardDisplay=nn,N.ConfigCardItem=ke,N.ConfigurationSchemaSection=P,N.ConfigurationSchemaType=$,N.EntityBaseConfigCard=sa,N.EntityBaseForm=fa,N.EntityBaseFormType=Ue,N.EntityBaseTable=Ca,N.EntityDeleteModal=ka,N.EntityFilter=Va,N.EntityFormSection=Wa,N.EntityLink=Xa,N.EntityToggleModal=va,N.EntityTypes=Ke,N.FetcherStatus=Z,N.InternalLinkItem=Xe,N.JsonCodeBlock=we,N.PermissionsWrapper=Ra,N.YamlCodeBlock=ve,N.useAxios=el,N.useDebouncedFilter=al,N.useDeleteUrlBuilder=tl,N.useErrors=nl,N.useExternalLinkCreator=rl,N.useFetchUrlBuilder=il,N.useFetcher=ol,N.useGatewayFeatureSupported=sl,N.useHelpers=cl,N.useStringHelpers=ll,N.useTruncationDetector=dl,N.useValidators=ul,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-d268261c]{align-items:center;border-bottom:var(--dc1d91a8);display:var(--59ccec5f);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-d268261c]{width:var(--29318fbe)}.config-card-details-row .config-card-details-label label[data-v-d268261c]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-d268261c]{width:var(--292d0408)}.config-card-details-row .config-card-details-value .truncated[data-v-d268261c]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-d268261c]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-d268261c] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-d268261c]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-d268261c]{margin-right:4px}.config-card-details-row[data-v-d268261c] .k-label{margin-bottom:0}.config-card-details-row[data-v-d268261c] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-d268261c] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 6px 12px}.json-endpoint .k-badge{height:24px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0}.json-endpoint code{direction:rtl;max-width:var(--4520e3ec);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-2052238b]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-f40a683b]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-f40a683b]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-f40a683b]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-f40a683b] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-f40a683b]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-
|
|
1
|
+
.config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-d268261c]{align-items:center;border-bottom:var(--dc1d91a8);display:var(--59ccec5f);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-d268261c]{width:var(--29318fbe)}.config-card-details-row .config-card-details-label label[data-v-d268261c]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-d268261c]{width:var(--292d0408)}.config-card-details-row .config-card-details-value .truncated[data-v-d268261c]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-d268261c]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-d268261c] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-d268261c]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-d268261c]{margin-right:4px}.config-card-details-row[data-v-d268261c] .k-label{margin-bottom:0}.config-card-details-row[data-v-d268261c] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-d268261c] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 6px 12px}.json-endpoint .k-badge{height:24px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0}.json-endpoint code{direction:rtl;max-width:var(--4520e3ec);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-2052238b]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-f40a683b]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-f40a683b]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-f40a683b]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-f40a683b] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-f40a683b]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-fd05df8e]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-fd05df8e]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-fd05df8e] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-fd05df8e] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-fd05df8e] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-fd05df8e] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-fd05df8e] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-fd05df8e] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-471ce76e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-67bd29c7]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-67bd29c7]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-67bd29c7]{float:right}.kong-ui-entity-base-table .actions-container[data-v-67bd29c7] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-94990087]{width:100%}.kong-ui-entity-filter-clear[data-v-94990087]{cursor:pointer}.kong-ui-entity-filter[data-v-94990087]{display:flex;position:relative}.kong-ui-entity-filter[data-v-94990087] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-94990087] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-94990087]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-94990087]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-94990087]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-94990087]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-94990087]{color:#232633}.menu-item-expand-icon[data-v-94990087]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-94990087]{transform:rotate(180deg)}.menu-item-indicator[data-v-94990087]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-94990087]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-94990087] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-94990087] .k-input{width:100%}.menu-item-body[data-v-94990087] .k-select-input .input{font-size:12px}.menu-item-body[data-v-94990087] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-94990087]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-94990087]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-94990087]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-be5bda4c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-be5bda4c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-be5bda4c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-be5bda4c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-be5bda4c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-be5bda4c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-be5bda4c]{margin-left:2px}
|
|
@@ -57,6 +57,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
57
57
|
type: BooleanConstructor;
|
|
58
58
|
default: boolean;
|
|
59
59
|
};
|
|
60
|
+
/**
|
|
61
|
+
* Wrapper component to use at component's root level.
|
|
62
|
+
*/
|
|
63
|
+
wrapperComponent: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
60
67
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
61
68
|
loading: (isLoading: boolean) => void;
|
|
62
69
|
"fetch:success": (data: Record<string, any>) => void;
|
|
@@ -119,6 +126,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
119
126
|
type: BooleanConstructor;
|
|
120
127
|
default: boolean;
|
|
121
128
|
};
|
|
129
|
+
/**
|
|
130
|
+
* Wrapper component to use at component's root level.
|
|
131
|
+
*/
|
|
132
|
+
wrapperComponent: {
|
|
133
|
+
type: StringConstructor;
|
|
134
|
+
default: string;
|
|
135
|
+
};
|
|
122
136
|
}>> & {
|
|
123
137
|
onSubmit?: (() => any) | undefined;
|
|
124
138
|
onLoading?: ((isLoading: boolean) => any) | undefined;
|
|
@@ -132,6 +146,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
132
146
|
canSubmit: boolean;
|
|
133
147
|
errorMessage: string;
|
|
134
148
|
noValidate: boolean;
|
|
149
|
+
wrapperComponent: string;
|
|
135
150
|
}, {}>, {
|
|
136
151
|
default?(_: {}): any;
|
|
137
152
|
"form-actions"?(_: {}): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityBaseForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/entity-base-form/EntityBaseForm.vue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAGnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;;
|
|
1
|
+
{"version":3,"file":"EntityBaseForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/entity-base-form/EntityBaseForm.vue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAGnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;;IA8kBjF,oHAAoH;;;;;;IAWpH,0FAA0F;;;;;;IAM1F;;;;;;;OAOG;;;;;;IAMH,iFAAiF;;;;;;IAMjF,qEAAqE;;;;;;IAMrE,qEAAqE;;;;;;IAMrE,+DAA+D;;;;;IAK/D;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;;;;IA9DH,oHAAoH;;;;;;IAWpH,0FAA0F;;;;;;IAM1F;;;;;;;OAOG;;;;;;IAMH,iFAAiF;;;;;;IAMjF,qEAAqE;;;;;;IAMrE,qEAAqE;;;;;;IAMrE,+DAA+D;;;;;IAK/D;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;AAQL,wBAAwG;AACxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-shared",
|
|
3
|
-
"version": "3.3.1
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-shared.umd.js",
|
|
6
6
|
"module": "./dist/entities-shared.es.js",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"axios": "^1.6.8",
|
|
26
26
|
"vue": ">= 3.3.13 < 4",
|
|
27
27
|
"vue-router": "^4.3.2",
|
|
28
|
-
"@kong-ui-public/i18n": "^2.2.
|
|
28
|
+
"@kong-ui-public/i18n": "^2.2.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@kong/design-tokens": "1.12.12",
|
|
32
|
-
"@kong/kongponents": "9.0.0-
|
|
32
|
+
"@kong/kongponents": "9.0.0-alpha.162",
|
|
33
33
|
"axios": "^1.6.8",
|
|
34
34
|
"vue": "^3.4.26",
|
|
35
35
|
"vue-router": "^4.3.2",
|
|
36
|
-
"@kong-ui-public/i18n": "^2.2.
|
|
36
|
+
"@kong-ui-public/i18n": "^2.2.0"
|
|
37
37
|
},
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@kong/icons": "^1.9.1",
|
|
54
54
|
"compare-versions": "^6.1.0",
|
|
55
|
-
"@kong-ui-public/core": "^1.7.
|
|
55
|
+
"@kong-ui-public/core": "^1.7.0"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"dev": "cross-env USE_SANDBOX=true vite",
|