@kong-ui-public/entities-shared 3.41.9 → 3.41.10-pr.3108.eba76216f.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-shared.es.js +112 -112
- package/dist/entities-shared.umd.js +11 -11
- package/dist/style.css +1 -1
- package/dist/types/components/entity-base-config-card/EntityBaseConfigCard.vue.d.ts.map +1 -1
- package/dist/types/composables/useDebouncedFilter.d.ts.map +1 -1
- package/dist/types/types/app-config.d.ts +2 -0
- package/dist/types/types/app-config.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -300,8 +300,8 @@ function Qi(e, t, n, i = {
|
|
|
300
300
|
const { axiosInstance: r } = ut(e.axiosRequestConfig), { i18n: { t: a } } = We(), { debounce: o } = Ri(), l = o(async ($) => {
|
|
301
301
|
await x($);
|
|
302
302
|
}, 200), s = j(!1), u = j(""), d = j(""), c = j([]), g = j([]), f = j(void 0), p = _(() => {
|
|
303
|
-
|
|
304
|
-
return e.app === "konnect"
|
|
303
|
+
let $ = `${e.apiBaseUrl}${C(t)}`;
|
|
304
|
+
return e.app === "konnect" && ($ = $.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "")), $.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "");
|
|
305
305
|
}), { isValidUuid: y } = nn(), v = async () => {
|
|
306
306
|
try {
|
|
307
307
|
s.value = !0;
|
|
@@ -312,10 +312,10 @@ function Qi(e, t, n, i = {
|
|
|
312
312
|
} finally {
|
|
313
313
|
s.value = !1;
|
|
314
314
|
}
|
|
315
|
-
},
|
|
315
|
+
}, b = j(""), x = async ($) => {
|
|
316
316
|
var N, Q, F;
|
|
317
|
-
if (
|
|
318
|
-
if (
|
|
317
|
+
if (b.value !== $) {
|
|
318
|
+
if (b.value = $ ?? "", !$) {
|
|
319
319
|
c.value = g.value;
|
|
320
320
|
return;
|
|
321
321
|
}
|
|
@@ -338,8 +338,8 @@ function Qi(e, t, n, i = {
|
|
|
338
338
|
const E = await Promise.all(B), h = /* @__PURE__ */ new Set();
|
|
339
339
|
c.value = [], (N = E == null ? void 0 : E.forEach) == null || N.call(E, (w) => {
|
|
340
340
|
var T;
|
|
341
|
-
(T = w == null ? void 0 : w.forEach) == null || T.call(w, (
|
|
342
|
-
h.has(
|
|
341
|
+
(T = w == null ? void 0 : w.forEach) == null || T.call(w, (k) => {
|
|
342
|
+
h.has(k.id) || (h.add(k.id), c.value.push(k));
|
|
343
343
|
});
|
|
344
344
|
});
|
|
345
345
|
}
|
|
@@ -493,9 +493,9 @@ function tr(e, t, n) {
|
|
|
493
493
|
const y = await a.get(p);
|
|
494
494
|
if (y.status >= 400)
|
|
495
495
|
throw y;
|
|
496
|
-
const v = y.data,
|
|
496
|
+
const v = y.data, b = g && g.replace(/[^\w-_]/gi, "");
|
|
497
497
|
let x;
|
|
498
|
-
v[
|
|
498
|
+
v[b] ? x = Array.isArray(v[b]) ? v[b] : [v[b]] : Array.isArray(v) ? x = v : x = Object.keys(v).length ? [v] : [];
|
|
499
499
|
const $ = {
|
|
500
500
|
data: x,
|
|
501
501
|
total: x.length,
|
|
@@ -938,7 +938,7 @@ const Tr = { class: "config-card-details-row" }, Er = ["data-testid"], Ir = ["da
|
|
|
938
938
|
text: n.item.value
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
|
-
}), v = j(),
|
|
941
|
+
}), v = j(), b = j(), { isTruncated: x } = J.useTruncationDetector(v), { isTruncated: $ } = J.useTruncationDetector(b);
|
|
942
942
|
return (N, Q) => {
|
|
943
943
|
const F = Y("KTooltip"), B = Y("KLabel"), E = Y("KBadge"), h = Y("KCopy");
|
|
944
944
|
return m(), S("div", Tr, [
|
|
@@ -1049,7 +1049,7 @@ const Tr = { class: "config-card-details-row" }, Er = ["data-testid"], Ir = ["da
|
|
|
1049
1049
|
default: A(() => [
|
|
1050
1050
|
L("span", {
|
|
1051
1051
|
ref_key: "textContent",
|
|
1052
|
-
ref:
|
|
1052
|
+
ref: b,
|
|
1053
1053
|
class: fe(["attrs-data-text", { truncated: e.truncated }])
|
|
1054
1054
|
}, O(y.value.text), 3)
|
|
1055
1055
|
]),
|
|
@@ -1906,7 +1906,7 @@ function Xa(e, t) {
|
|
|
1906
1906
|
I(e, "unexpected end of the stream within a double quoted scalar");
|
|
1907
1907
|
}
|
|
1908
1908
|
function eo(e, t) {
|
|
1909
|
-
var n = !0, i, r, a, o = e.tag, l, s = e.anchor, u, d, c, g, f, p = /* @__PURE__ */ Object.create(null), y, v,
|
|
1909
|
+
var n = !0, i, r, a, o = e.tag, l, s = e.anchor, u, d, c, g, f, p = /* @__PURE__ */ Object.create(null), y, v, b, x;
|
|
1910
1910
|
if (x = e.input.charCodeAt(e.position), x === 91)
|
|
1911
1911
|
d = 93, f = !1, l = [];
|
|
1912
1912
|
else if (x === 123)
|
|
@@ -1916,7 +1916,7 @@ function eo(e, t) {
|
|
|
1916
1916
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), x = e.input.charCodeAt(++e.position); x !== 0; ) {
|
|
1917
1917
|
if (ie(e, !0, t), x = e.input.charCodeAt(e.position), x === d)
|
|
1918
1918
|
return e.position++, e.tag = o, e.anchor = s, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1919
|
-
n ? x === 44 && I(e, "expected the node content, but found ','") : I(e, "missed comma between flow collection entries"), v = y =
|
|
1919
|
+
n ? x === 44 && I(e, "expected the node content, but found ','") : I(e, "missed comma between flow collection entries"), v = y = b = null, c = g = !1, x === 63 && (u = e.input.charCodeAt(e.position + 1), de(u) && (c = g = !0, e.position++, ie(e, !0, t))), i = e.line, r = e.lineStart, a = e.position, Oe(e, t, Pe, !1, !0), v = e.tag, y = e.result, ie(e, !0, t), x = e.input.charCodeAt(e.position), (g || e.line === i) && x === 58 && (c = !0, x = e.input.charCodeAt(++e.position), ie(e, !0, t), Oe(e, t, Pe, !1, !0), b = e.result), f ? Ie(e, l, p, v, y, b, i, r, a) : c ? l.push(Ie(e, null, p, v, y, b, i, r, a)) : l.push(y), ie(e, !0, t), x = e.input.charCodeAt(e.position), x === 44 ? (n = !0, x = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1920
1920
|
}
|
|
1921
1921
|
I(e, "unexpected end of the stream within a flow collection");
|
|
1922
1922
|
}
|
|
@@ -1983,11 +1983,11 @@ function Nt(e, t) {
|
|
|
1983
1983
|
return l ? (e.tag = i, e.anchor = r, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1984
1984
|
}
|
|
1985
1985
|
function no(e, t, n) {
|
|
1986
|
-
var i, r, a, o, l, s, u = e.tag, d = e.anchor, c = {}, g = /* @__PURE__ */ Object.create(null), f = null, p = null, y = null, v = !1,
|
|
1986
|
+
var i, r, a, o, l, s, u = e.tag, d = e.anchor, c = {}, g = /* @__PURE__ */ Object.create(null), f = null, p = null, y = null, v = !1, b = !1, x;
|
|
1987
1987
|
if (e.firstTabInLine !== -1) return !1;
|
|
1988
1988
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), x = e.input.charCodeAt(e.position); x !== 0; ) {
|
|
1989
1989
|
if (!v && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, I(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), a = e.line, (x === 63 || x === 58) && de(i))
|
|
1990
|
-
x === 63 ? (v && (Ie(e, c, g, f, p, null, o, l, s), f = p = y = null),
|
|
1990
|
+
x === 63 ? (v && (Ie(e, c, g, f, p, null, o, l, s), f = p = y = null), b = !0, v = !0, r = !0) : v ? (v = !1, r = !0) : I(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, x = i;
|
|
1991
1991
|
else {
|
|
1992
1992
|
if (o = e.line, l = e.lineStart, s = e.position, !Oe(e, n, On, !1, !0))
|
|
1993
1993
|
break;
|
|
@@ -1995,12 +1995,12 @@ function no(e, t, n) {
|
|
|
1995
1995
|
for (x = e.input.charCodeAt(e.position); xe(x); )
|
|
1996
1996
|
x = e.input.charCodeAt(++e.position);
|
|
1997
1997
|
if (x === 58)
|
|
1998
|
-
x = e.input.charCodeAt(++e.position), de(x) || I(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (Ie(e, c, g, f, p, null, o, l, s), f = p = y = null),
|
|
1999
|
-
else if (
|
|
1998
|
+
x = e.input.charCodeAt(++e.position), de(x) || I(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (Ie(e, c, g, f, p, null, o, l, s), f = p = y = null), b = !0, v = !1, r = !1, f = e.tag, p = e.result;
|
|
1999
|
+
else if (b)
|
|
2000
2000
|
I(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2001
2001
|
else
|
|
2002
2002
|
return e.tag = u, e.anchor = d, !0;
|
|
2003
|
-
} else if (
|
|
2003
|
+
} else if (b)
|
|
2004
2004
|
I(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2005
2005
|
else
|
|
2006
2006
|
return e.tag = u, e.anchor = d, !0;
|
|
@@ -2010,7 +2010,7 @@ function no(e, t, n) {
|
|
|
2010
2010
|
else if (e.lineIndent < t)
|
|
2011
2011
|
break;
|
|
2012
2012
|
}
|
|
2013
|
-
return v && Ie(e, c, g, f, p, null, o, l, s),
|
|
2013
|
+
return v && Ie(e, c, g, f, p, null, o, l, s), b && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), b;
|
|
2014
2014
|
}
|
|
2015
2015
|
function io(e) {
|
|
2016
2016
|
var t, n = !1, i = !1, r, a, o;
|
|
@@ -2551,11 +2551,11 @@ ${p}${Vt}`;
|
|
|
2551
2551
|
`), c === null)
|
|
2552
2552
|
return g ? y += `${p}}` : y = "{}", y;
|
|
2553
2553
|
const v = Object.fromEntries(Object.entries(c).filter(([, x]) => x !== null));
|
|
2554
|
-
let
|
|
2554
|
+
let b = "";
|
|
2555
2555
|
for (const [x, $] of Object.entries(v))
|
|
2556
|
-
Array.isArray($) ? $.length === 0 ?
|
|
2557
|
-
`,
|
|
2558
|
-
`,
|
|
2556
|
+
Array.isArray($) ? $.length === 0 ? b = "[]" : (b = `[
|
|
2557
|
+
`, b += l($, void 0, p), b += `${p}${ne}]`) : $ && typeof $ == "object" ? (b = `{
|
|
2558
|
+
`, b += o($, void 0, p), b += `${p}${ne}}`) : typeof $ == "string" ? b = r($, p + ne) : b = String($ ?? ""), y += `${p}${ne}${x} = ${b}
|
|
2559
2559
|
`;
|
|
2560
2560
|
return g ? y += `${p}}
|
|
2561
2561
|
` : y;
|
|
@@ -2567,9 +2567,9 @@ ${p}${Vt}`;
|
|
|
2567
2567
|
g && (c.length === 0 ? y += `${p}${g} = [` : y += `${p}${g} = [
|
|
2568
2568
|
`);
|
|
2569
2569
|
for (let v = 0; v < c.length; v++) {
|
|
2570
|
-
const
|
|
2571
|
-
typeof
|
|
2572
|
-
`, y += o(
|
|
2570
|
+
const b = c[v];
|
|
2571
|
+
typeof b == "object" ? (y += `${p}${ne}{
|
|
2572
|
+
`, y += o(b, void 0, p), y += `${p}${ne}}`) : typeof b == "string" ? y += `${p}${ne}${r(b, p + ne)}` : y += `${p}${ne}${String(b ?? "")}`, v < c.length - 1 && (y += ","), y += `
|
|
2573
2573
|
`;
|
|
2574
2574
|
}
|
|
2575
2575
|
return g && (c.length === 0 ? y += `]
|
|
@@ -2581,13 +2581,13 @@ ${p}${Vt}`;
|
|
|
2581
2581
|
Array.isArray(p) ? g += l(p, f) : typeof p == "object" ? g += o(p, f) : g += a(p, f);
|
|
2582
2582
|
return s(g);
|
|
2583
2583
|
}, d = _(() => {
|
|
2584
|
-
var y, v,
|
|
2584
|
+
var y, v, b, x, $, N, Q;
|
|
2585
2585
|
const c = Object.fromEntries(Object.entries(t.entityRecord).filter(([, F]) => F != null)), g = t.entityRecord.config ? Object.fromEntries(Object.entries((y = t.entityRecord) == null ? void 0 : y.config).filter(([, F]) => F != null)) : void 0;
|
|
2586
2586
|
if (g && (c.config = g), Object.keys(c).length === 0)
|
|
2587
2587
|
return "";
|
|
2588
2588
|
delete c.id;
|
|
2589
2589
|
let f = "", p = "";
|
|
2590
|
-
if ((v = c.service) != null && v.id ? (p = "service", delete c.service) : (
|
|
2590
|
+
if ((v = c.service) != null && v.id ? (p = "service", delete c.service) : (b = c.route) != null && b.id ? (p = "route", delete c.route) : (x = c.consumer) != null && x.id ? (p = "consumer", delete c.consumer) : ($ = c.consumer_group) != null && $.id ? (p = "consumer_group", delete c.consumer_group) : (N = c.certificate) != null && N.id ? (p = "certificate", delete c.certificate) : (Q = c.set) != null && Q.id && (p = "set", delete c.set), n.value) {
|
|
2591
2591
|
const F = t.subEntityType ? `${t.entityType}_${t.subEntityType}` : t.entityType;
|
|
2592
2592
|
f += `resource "konnect_event_gateway_${F}" "my_eventgateway${F.replaceAll("_", "")}" {
|
|
2593
2593
|
`, f += `${ne}provider = konnect-beta
|
|
@@ -2644,9 +2644,9 @@ ${p}${Vt}`;
|
|
|
2644
2644
|
control_plane_name: t.controlPlaneName
|
|
2645
2645
|
} : t.workspace && (d._workspace = t.workspace), d;
|
|
2646
2646
|
}), l = _(() => {
|
|
2647
|
-
var f, p, y, v,
|
|
2647
|
+
var f, p, y, v, b;
|
|
2648
2648
|
const d = Object.fromEntries(Object.entries(t.entityRecord).filter(([, x]) => x !== null && x !== "" && (Array.isArray(x) ? x.length !== 0 : !0)));
|
|
2649
|
-
t.entityType === Ce.Plugin ? ((f = d.service) != null && f.id && (d.service = d.service.id), (p = d.route) != null && p.id && (d.route = d.route.id), (y = d.consumer) != null && y.id && (d.consumer = d.consumer.id), (v = d.consumer_group) != null && v.id && (d.consumer_group = d.consumer_group.id)) : t.entityType === Ce.Key && (
|
|
2649
|
+
t.entityType === Ce.Plugin ? ((f = d.service) != null && f.id && (d.service = d.service.id), (p = d.route) != null && p.id && (d.route = d.route.id), (y = d.consumer) != null && y.id && (d.consumer = d.consumer.id), (v = d.consumer_group) != null && v.id && (d.consumer_group = d.consumer_group.id)) : t.entityType === Ce.Key && (b = d.key_set) != null && b.id && (d.key_set = d.key_set.id);
|
|
2650
2650
|
const c = t.entityType === Ce.KeySet ? "key_sets" : t.entityType + "s", g = {
|
|
2651
2651
|
...o.value,
|
|
2652
2652
|
[c]: [d]
|
|
@@ -3003,9 +3003,9 @@ ${l.value}
|
|
|
3003
3003
|
const n = t, i = e, r = /* @__PURE__ */ new Set(["after-fields"]), { i18n: { t: a } } = J.useI18n(), { getMessageFromError: o } = J.useErrors(), { convertKeyToTitle: l } = J.useStringHelpers();
|
|
3004
3004
|
J.useSubSchema(i.pluginConfigKey);
|
|
3005
3005
|
const { axiosInstance: s } = J.useAxios((T = i.config) == null ? void 0 : T.axiosRequestConfig), u = Me(), d = _(
|
|
3006
|
-
() => Object.keys(u).filter((
|
|
3006
|
+
() => Object.keys(u).filter((k) => !r.has(k))
|
|
3007
3007
|
), c = _(() => !!u["after-fields"]), g = _(() => {
|
|
3008
|
-
const
|
|
3008
|
+
const k = [
|
|
3009
3009
|
{
|
|
3010
3010
|
label: a("baseConfigCard.general.structuredFormat"),
|
|
3011
3011
|
value: "structured",
|
|
@@ -3020,29 +3020,29 @@ ${l.value}
|
|
|
3020
3020
|
value: "yaml"
|
|
3021
3021
|
}
|
|
3022
3022
|
];
|
|
3023
|
-
i.config.app === "konnect" &&
|
|
3023
|
+
i.config.app === "konnect" && k.splice(2, 0, {
|
|
3024
3024
|
label: a("baseForm.configuration.terraform"),
|
|
3025
3025
|
value: "terraform"
|
|
3026
3026
|
});
|
|
3027
3027
|
const M = tn(i.entityType);
|
|
3028
|
-
(i.config.app === "kongManager" || i.config.enableDeckConfig) && M &&
|
|
3028
|
+
(i.config.app === "kongManager" || i.config.enableDeckConfig) && M && k.push({
|
|
3029
3029
|
label: a("baseForm.configuration.deck"),
|
|
3030
3030
|
value: "deck"
|
|
3031
3031
|
});
|
|
3032
3032
|
const Z = new Set(i.formatsToHide);
|
|
3033
|
-
return
|
|
3034
|
-
}), f = j("structured"), p = (
|
|
3035
|
-
f.value =
|
|
3036
|
-
}, y = (
|
|
3037
|
-
localStorage.setItem(
|
|
3033
|
+
return k.filter((X) => X.value === "structured" || !Z.has(X.value));
|
|
3034
|
+
}), f = j("structured"), p = (k) => {
|
|
3035
|
+
f.value = k == null ? void 0 : k.value, n("configFormatChange", f.value);
|
|
3036
|
+
}, y = (k, M) => {
|
|
3037
|
+
localStorage.setItem(k, M);
|
|
3038
3038
|
};
|
|
3039
|
-
Ae(f, (
|
|
3040
|
-
i.config.formatPreferenceKey && y(i.config.formatPreferenceKey,
|
|
3039
|
+
Ae(f, (k) => {
|
|
3040
|
+
i.config.formatPreferenceKey && y(i.config.formatPreferenceKey, k);
|
|
3041
3041
|
}), st(() => {
|
|
3042
|
-
var
|
|
3042
|
+
var k;
|
|
3043
3043
|
if (i.config.formatPreferenceKey) {
|
|
3044
3044
|
const M = localStorage.getItem(i.config.formatPreferenceKey), K = g.value;
|
|
3045
|
-
M && K.some((Z) => Z.value === M) ? f.value = M : f.value = ((
|
|
3045
|
+
M && K.some((Z) => Z.value === M) ? f.value = M : f.value = ((k = K[0]) == null ? void 0 : k.value) ?? "structured", y(i.config.formatPreferenceKey, f.value);
|
|
3046
3046
|
}
|
|
3047
3047
|
});
|
|
3048
3048
|
const v = {
|
|
@@ -3086,20 +3086,20 @@ ${l.value}
|
|
|
3086
3086
|
// the last property displayed
|
|
3087
3087
|
section: se.Basic
|
|
3088
3088
|
}
|
|
3089
|
-
},
|
|
3089
|
+
}, b = j(!1), x = j(!1), $ = j(""), N = j({}), Q = _(() => {
|
|
3090
3090
|
var K, Z, X;
|
|
3091
3091
|
if (!N.value)
|
|
3092
3092
|
return [];
|
|
3093
|
-
const
|
|
3093
|
+
const k = [], M = Object.keys(N.value).length;
|
|
3094
3094
|
for (const U in N.value) {
|
|
3095
3095
|
if (U === "__ui_data") continue;
|
|
3096
3096
|
const D = (Z = (K = i.configSchema) == null ? void 0 : K[U]) == null ? void 0 : Z.order, ee = (X = v[U]) == null ? void 0 : X.order;
|
|
3097
3097
|
let W = M;
|
|
3098
|
-
(ee || ee === 0) && (W = ee === -1 ? M + 1 : ee), D && (W = D === -1 ? M + 1 : D),
|
|
3098
|
+
(ee || ee === 0) && (W = ee === -1 ? M + 1 : ee), D && (W = D === -1 ? M + 1 : D), k.push([U, W]);
|
|
3099
3099
|
}
|
|
3100
|
-
return
|
|
3100
|
+
return k.sort(function(U, D) {
|
|
3101
3101
|
return U[1] - D[1];
|
|
3102
|
-
}),
|
|
3102
|
+
}), k.map((U) => {
|
|
3103
3103
|
var ht, vt;
|
|
3104
3104
|
const D = U[0], ee = (ht = N.value) == null ? void 0 : ht[D], W = ((vt = i.configSchema) == null ? void 0 : vt[D]) || {}, te = v[D];
|
|
3105
3105
|
return {
|
|
@@ -3116,9 +3116,9 @@ ${l.value}
|
|
|
3116
3116
|
var Z, X;
|
|
3117
3117
|
if (!N.value || !i.pluginConfigKey)
|
|
3118
3118
|
return [];
|
|
3119
|
-
const
|
|
3120
|
-
for (const U in
|
|
3121
|
-
const D = (X = (Z = i.pluginConfigSchema) == null ? void 0 : Z[U]) == null ? void 0 : X.order, ee =
|
|
3119
|
+
const k = N.value[i.pluginConfigKey] || {}, M = Object.keys(k).length, K = [];
|
|
3120
|
+
for (const U in k) {
|
|
3121
|
+
const D = (X = (Z = i.pluginConfigSchema) == null ? void 0 : Z[U]) == null ? void 0 : X.order, ee = k[U];
|
|
3122
3122
|
let W = ee != null && ee !== "" ? M - 1 : M;
|
|
3123
3123
|
D && (W = D === -1 ? M + 1 : D), K.push([U, W]);
|
|
3124
3124
|
}
|
|
@@ -3126,7 +3126,7 @@ ${l.value}
|
|
|
3126
3126
|
return U[1] - D[1];
|
|
3127
3127
|
}), K.map((U) => {
|
|
3128
3128
|
var te;
|
|
3129
|
-
const D = U[0], ee =
|
|
3129
|
+
const D = U[0], ee = k[D], W = ((te = i.pluginConfigSchema) == null ? void 0 : te[D]) || {};
|
|
3130
3130
|
return {
|
|
3131
3131
|
key: D,
|
|
3132
3132
|
value: ee,
|
|
@@ -3141,9 +3141,9 @@ ${l.value}
|
|
|
3141
3141
|
var Z, X;
|
|
3142
3142
|
if (!N.value || !i.policyConfigKey)
|
|
3143
3143
|
return [];
|
|
3144
|
-
const
|
|
3145
|
-
for (const U in
|
|
3146
|
-
const D = (X = (Z = i.policyConfigSchema) == null ? void 0 : Z[U]) == null ? void 0 : X.order, ee =
|
|
3144
|
+
const k = N.value[i.policyConfigKey] || {}, M = Object.keys(k).length, K = [];
|
|
3145
|
+
for (const U in k) {
|
|
3146
|
+
const D = (X = (Z = i.policyConfigSchema) == null ? void 0 : Z[U]) == null ? void 0 : X.order, ee = k[U];
|
|
3147
3147
|
let W = ee != null && ee !== "" ? M - 1 : M;
|
|
3148
3148
|
D && (W = D === -1 ? M + 1 : D), K.push([U, W]);
|
|
3149
3149
|
}
|
|
@@ -3151,7 +3151,7 @@ ${l.value}
|
|
|
3151
3151
|
return U[1] - D[1];
|
|
3152
3152
|
}), K.map((U) => {
|
|
3153
3153
|
var te;
|
|
3154
|
-
const D = U[0], ee =
|
|
3154
|
+
const D = U[0], ee = k[D], W = ((te = i.policyConfigSchema) == null ? void 0 : te[D]) || {};
|
|
3155
3155
|
return {
|
|
3156
3156
|
key: D,
|
|
3157
3157
|
value: ee,
|
|
@@ -3163,43 +3163,43 @@ ${l.value}
|
|
|
3163
3163
|
};
|
|
3164
3164
|
}).filter((U) => !U.hidden);
|
|
3165
3165
|
}), E = _(() => {
|
|
3166
|
-
var
|
|
3166
|
+
var k, M, K, Z, X, U;
|
|
3167
3167
|
return {
|
|
3168
|
-
basic: (
|
|
3168
|
+
basic: (k = Q.value) == null ? void 0 : k.filter((D) => D.section === se.Basic),
|
|
3169
3169
|
advanced: (M = Q.value) == null ? void 0 : M.filter((D) => D.section === se.Advanced),
|
|
3170
3170
|
plugin: (Z = F.value) == null ? void 0 : Z.concat((K = Q.value) == null ? void 0 : K.filter((D) => D.section === se.Plugin)),
|
|
3171
3171
|
policy: (U = B.value) == null ? void 0 : U.concat((X = Q.value) == null ? void 0 : X.filter((D) => D.section === se.Policy))
|
|
3172
3172
|
};
|
|
3173
3173
|
}), h = _(() => {
|
|
3174
|
-
const
|
|
3175
|
-
return E.value.basic.length &&
|
|
3174
|
+
const k = [];
|
|
3175
|
+
return E.value.basic.length && k.push("basic"), E.value.advanced.length && k.push("advanced"), E.value.plugin.length && k.push("plugin"), E.value.policy.length && k.push("policy"), k;
|
|
3176
3176
|
}), w = _(() => {
|
|
3177
3177
|
var M, K;
|
|
3178
|
-
let
|
|
3179
|
-
return i.config.app === "konnect"
|
|
3178
|
+
let k = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3179
|
+
return i.config.app === "konnect" && (k = k.replace(/{controlPlaneId}/gi, ((M = i.config) == null ? void 0 : M.controlPlaneId) || "")), k.replace(/\/{workspace}/gi, (K = i.config) != null && K.workspace ? `/${i.config.workspace}` : "").replace(/{id}/gi, i.config.entityId);
|
|
3180
3180
|
});
|
|
3181
|
-
return Ae(
|
|
3182
|
-
n("loading",
|
|
3181
|
+
return Ae(b, (k) => {
|
|
3182
|
+
n("loading", k);
|
|
3183
3183
|
}, { immediate: !0 }), ct(async () => {
|
|
3184
|
-
x.value = !1,
|
|
3184
|
+
x.value = !1, b.value = !0;
|
|
3185
3185
|
try {
|
|
3186
|
-
const { data:
|
|
3186
|
+
const { data: k } = await s.get(w.value);
|
|
3187
3187
|
if (i.dataKey)
|
|
3188
|
-
if (typeof
|
|
3189
|
-
N.value = { ...
|
|
3188
|
+
if (typeof k[i.dataKey] < "u")
|
|
3189
|
+
N.value = { ...k[i.dataKey] };
|
|
3190
3190
|
else
|
|
3191
3191
|
throw new Error(a("errors.dataKeyUndefined", { dataKey: i.dataKey }));
|
|
3192
|
-
else i.recordResolver ? N.value = { ...i.recordResolver(
|
|
3192
|
+
else i.recordResolver ? N.value = { ...i.recordResolver(k) } : N.value = { ...k };
|
|
3193
3193
|
Object.keys(i.configSchema).filter((K) => i.configSchema[K].forceShow).forEach((K) => {
|
|
3194
3194
|
N.value && typeof N.value[K] > "u" && (N.value[K] = null);
|
|
3195
|
-
}), n("fetch:success",
|
|
3196
|
-
} catch (
|
|
3197
|
-
const M = o(
|
|
3198
|
-
$.value = M.startsWith("code") ? a("baseConfigCard.errors.load") : M, x.value = !0, n("fetch:error",
|
|
3195
|
+
}), n("fetch:success", k);
|
|
3196
|
+
} catch (k) {
|
|
3197
|
+
const M = o(k);
|
|
3198
|
+
$.value = M.startsWith("code") ? a("baseConfigCard.errors.load") : M, x.value = !0, n("fetch:error", k);
|
|
3199
3199
|
} finally {
|
|
3200
|
-
|
|
3200
|
+
b.value = !1;
|
|
3201
3201
|
}
|
|
3202
|
-
}), (
|
|
3202
|
+
}), (k, M) => {
|
|
3203
3203
|
const K = Y("KLabel"), Z = Y("KSelect"), X = Y("KButton"), U = Y("KSkeleton"), D = Y("KEmptyState"), ee = Y("KCard");
|
|
3204
3204
|
return m(), R(ee, {
|
|
3205
3205
|
class: "kong-ui-entity-base-config-card",
|
|
@@ -3207,7 +3207,7 @@ ${l.value}
|
|
|
3207
3207
|
}, we({
|
|
3208
3208
|
actions: A(() => [
|
|
3209
3209
|
L("div", vl, [
|
|
3210
|
-
H(
|
|
3210
|
+
H(k.$slots, "actions", {}, void 0, !0),
|
|
3211
3211
|
P(K, {
|
|
3212
3212
|
class: "config-format-select-label",
|
|
3213
3213
|
"data-testid": "config-format-select-label"
|
|
@@ -3244,7 +3244,7 @@ ${l.value}
|
|
|
3244
3244
|
])
|
|
3245
3245
|
]),
|
|
3246
3246
|
default: A(() => [
|
|
3247
|
-
|
|
3247
|
+
b.value ? (m(), R(U, {
|
|
3248
3248
|
key: 0,
|
|
3249
3249
|
"data-testid": "config-card-loader",
|
|
3250
3250
|
"table-columns": 2,
|
|
@@ -3274,13 +3274,13 @@ ${l.value}
|
|
|
3274
3274
|
me(d.value, (W) => ({
|
|
3275
3275
|
name: W,
|
|
3276
3276
|
fn: A((te) => [
|
|
3277
|
-
H(
|
|
3277
|
+
H(k.$slots, W, Qt({ record: N.value }, te), void 0, !0)
|
|
3278
3278
|
])
|
|
3279
3279
|
}))
|
|
3280
3280
|
]), 1032, ["code-block-record-formatter", "config", "entity-type", "fetcher-url", "format", "prop-list-types", "property-collections", "record", "sub-entity-type"])
|
|
3281
3281
|
]),
|
|
3282
3282
|
c.value ? (m(), S("div", Cl, [
|
|
3283
|
-
H(
|
|
3283
|
+
H(k.$slots, "after-fields", {}, void 0, !0)
|
|
3284
3284
|
])) : q("", !0)
|
|
3285
3285
|
], 64))
|
|
3286
3286
|
]),
|
|
@@ -3290,7 +3290,7 @@ ${l.value}
|
|
|
3290
3290
|
name: "title",
|
|
3291
3291
|
fn: A(() => [
|
|
3292
3292
|
L("span", hl, [
|
|
3293
|
-
H(
|
|
3293
|
+
H(k.$slots, "title", {}, () => [
|
|
3294
3294
|
V(O(C(a)("baseConfigCard.title")), 1)
|
|
3295
3295
|
], !0)
|
|
3296
3296
|
])
|
|
@@ -3300,7 +3300,7 @@ ${l.value}
|
|
|
3300
3300
|
]), 1032, ["title-tag"]);
|
|
3301
3301
|
};
|
|
3302
3302
|
}
|
|
3303
|
-
}), Qs = /* @__PURE__ */ ue(xl, [["__scopeId", "data-v-
|
|
3303
|
+
}), Qs = /* @__PURE__ */ ue(xl, [["__scopeId", "data-v-9a0c5e24"]]), Al = {
|
|
3304
3304
|
/** Enable the new plugin form layout */
|
|
3305
3305
|
KM_1948_PLUGIN_FORM_LAYOUT: "KM_1948_PLUGIN_FORM_LAYOUT"
|
|
3306
3306
|
}, wl = ["novalidate"], _l = /* @__PURE__ */ z({
|
|
@@ -3430,8 +3430,8 @@ ${l.value}
|
|
|
3430
3430
|
const i = lt(Al.KM_1948_PLUGIN_FORM_LAYOUT, _(() => !1)), r = n, a = e, o = Ti(), { i18n: { t: l } } = J.useI18n(), { getMessageFromError: s } = J.useErrors(), { axiosInstance: u } = J.useAxios((E = a.config) == null ? void 0 : E.axiosRequestConfig), d = j(!1), c = _(() => !!a.editId), g = j(!1), f = j(""), p = _(() => a.canSubmit === !1 || a.isReadonly), y = j(!1), v = _(() => {
|
|
3431
3431
|
var w, T;
|
|
3432
3432
|
let h = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3433
|
-
return a.config.app === "konnect"
|
|
3434
|
-
}),
|
|
3433
|
+
return a.config.app === "konnect" && (h = h.replace(/{controlPlaneId}/gi, ((w = a.config) == null ? void 0 : w.controlPlaneId) || "")), h = h.replace(/\/{workspace}/gi, (T = a.config) != null && T.workspace ? `/${a.config.workspace}` : ""), a.editId ? (h = h.replace(/{id}/gi, a.editId), h) : (h = h.replace(/\/{id}/gi, ""), h);
|
|
3434
|
+
}), b = () => {
|
|
3435
3435
|
y.value = !y.value;
|
|
3436
3436
|
}, x = () => {
|
|
3437
3437
|
a.config.cancelRoute ? o.push(a.config.cancelRoute) : $();
|
|
@@ -3472,11 +3472,11 @@ ${l.value}
|
|
|
3472
3472
|
d.value = !1;
|
|
3473
3473
|
}
|
|
3474
3474
|
}), t({
|
|
3475
|
-
viewConfig:
|
|
3475
|
+
viewConfig: b,
|
|
3476
3476
|
formCancel: $,
|
|
3477
3477
|
formSubmit: N
|
|
3478
3478
|
}), (h, w) => {
|
|
3479
|
-
const T = Y("KSkeleton"),
|
|
3479
|
+
const T = Y("KSkeleton"), k = Y("KEmptyState"), M = Y("KAlert"), K = Y("KButton"), Z = Y("KTabs"), X = Y("KSlideout");
|
|
3480
3480
|
return m(), R(Ye(e.wrapperComponent), {
|
|
3481
3481
|
class: fe(["kong-ui-entity-base-form", {
|
|
3482
3482
|
"new-form-layout": C(i) && e.entityType === C(Ce).Plugin
|
|
@@ -3486,7 +3486,7 @@ ${l.value}
|
|
|
3486
3486
|
d.value ? (m(), R(T, {
|
|
3487
3487
|
key: 0,
|
|
3488
3488
|
type: "form"
|
|
3489
|
-
})) : g.value ? (m(), R(
|
|
3489
|
+
})) : g.value ? (m(), R(k, {
|
|
3490
3490
|
key: 1,
|
|
3491
3491
|
"action-button-text": C(l)("baseForm.actions.back"),
|
|
3492
3492
|
"data-testid": "form-fetch-error",
|
|
@@ -3525,7 +3525,7 @@ ${l.value}
|
|
|
3525
3525
|
P(K, {
|
|
3526
3526
|
appearance: "tertiary",
|
|
3527
3527
|
"data-testid": `${e.entityType}-${c.value ? "edit" : "create"}-form-view-configuration`,
|
|
3528
|
-
onClick: w[0] || (w[0] = (U) =>
|
|
3528
|
+
onClick: w[0] || (w[0] = (U) => b())
|
|
3529
3529
|
}, {
|
|
3530
3530
|
default: A(() => [
|
|
3531
3531
|
V(O(y.value ? C(l)("baseForm.actions.hideConfiguration") : C(l)("baseForm.actions.viewConfiguration")), 1)
|
|
@@ -3567,7 +3567,7 @@ ${l.value}
|
|
|
3567
3567
|
"offset-top": e.slidoutTopOffset,
|
|
3568
3568
|
title: C(l)("baseForm.configuration.title"),
|
|
3569
3569
|
visible: y.value,
|
|
3570
|
-
onClose: w[4] || (w[4] = (U) =>
|
|
3570
|
+
onClose: w[4] || (w[4] = (U) => b())
|
|
3571
3571
|
}, {
|
|
3572
3572
|
default: A(() => [
|
|
3573
3573
|
L("div", null, [
|
|
@@ -3621,7 +3621,7 @@ ${l.value}
|
|
|
3621
3621
|
}, 8, ["class"]);
|
|
3622
3622
|
};
|
|
3623
3623
|
}
|
|
3624
|
-
}), Zs = /* @__PURE__ */ ue(_l, [["__scopeId", "data-v-
|
|
3624
|
+
}), Zs = /* @__PURE__ */ ue(_l, [["__scopeId", "data-v-a447ea3f"]]), Sl = ["data-truncate"], $l = /* @__PURE__ */ z({
|
|
3625
3625
|
__name: "EntityBaseTableCell",
|
|
3626
3626
|
props: {
|
|
3627
3627
|
keyName: {
|
|
@@ -3645,16 +3645,16 @@ ${l.value}
|
|
|
3645
3645
|
var v;
|
|
3646
3646
|
return ((v = n.value) == null ? void 0 : v.querySelector('[data-truncate="true"]')) || null;
|
|
3647
3647
|
}), r = _(() => {
|
|
3648
|
-
var
|
|
3649
|
-
const v = (
|
|
3648
|
+
var b, x;
|
|
3649
|
+
const v = (b = t.rowEl) == null ? void 0 : b.querySelectorAll("td");
|
|
3650
3650
|
return v ? ((x = v[0]) == null ? void 0 : x.getAttribute("data-testid")) === t.keyName : !0;
|
|
3651
3651
|
}), a = _(() => r.value || t.tooltip);
|
|
3652
3652
|
let o;
|
|
3653
3653
|
const l = () => {
|
|
3654
3654
|
o && (o.disconnect(), o = void 0);
|
|
3655
3655
|
}, s = () => {
|
|
3656
|
-
var
|
|
3657
|
-
let v = ((
|
|
3656
|
+
var b, x, $;
|
|
3657
|
+
let v = ((b = n.value) == null ? void 0 : b.clientWidth) || 0;
|
|
3658
3658
|
if (n.value && "getComputedStyle" in window) {
|
|
3659
3659
|
const N = window.getComputedStyle(n.value);
|
|
3660
3660
|
v -= (parseFloat(N.paddingLeft) || 0) + (parseFloat(N.paddingRight) || 0);
|
|
@@ -3664,13 +3664,13 @@ ${l.value}
|
|
|
3664
3664
|
f,
|
|
3665
3665
|
(v) => {
|
|
3666
3666
|
if (a.value && (l(), "ResizeObserver" in window && window)) {
|
|
3667
|
-
o = new ResizeObserver((
|
|
3667
|
+
o = new ResizeObserver((b) => {
|
|
3668
3668
|
window.requestAnimationFrame(() => {
|
|
3669
|
-
!Array.isArray(
|
|
3669
|
+
!Array.isArray(b) || !b.length || s();
|
|
3670
3670
|
});
|
|
3671
3671
|
});
|
|
3672
|
-
for (const
|
|
3673
|
-
|
|
3672
|
+
for (const b of v)
|
|
3673
|
+
b && o.observe(b);
|
|
3674
3674
|
}
|
|
3675
3675
|
},
|
|
3676
3676
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
@@ -3679,7 +3679,7 @@ ${l.value}
|
|
|
3679
3679
|
s();
|
|
3680
3680
|
}), li(() => {
|
|
3681
3681
|
p();
|
|
3682
|
-
}), (v,
|
|
3682
|
+
}), (v, b) => {
|
|
3683
3683
|
const x = Y("KTooltip");
|
|
3684
3684
|
return m(), S("span", {
|
|
3685
3685
|
ref_key: "contentRef",
|
|
@@ -3869,12 +3869,12 @@ ${l.value}
|
|
|
3869
3869
|
}), o = _(() => n.cacheIdentifier || n.preferencesStorageKey), l = _(() => {
|
|
3870
3870
|
const h = [];
|
|
3871
3871
|
return Object.keys(n.tableHeaders).forEach((T) => {
|
|
3872
|
-
const
|
|
3872
|
+
const k = n.tableHeaders[T];
|
|
3873
3873
|
h.push({
|
|
3874
|
-
label:
|
|
3874
|
+
label: k.label ?? T,
|
|
3875
3875
|
key: T,
|
|
3876
|
-
sortable:
|
|
3877
|
-
hidable:
|
|
3876
|
+
sortable: k.sortable ?? !1,
|
|
3877
|
+
hidable: k.hidable ?? !0
|
|
3878
3878
|
});
|
|
3879
3879
|
}), n.enableEntityActions && h.push({
|
|
3880
3880
|
key: "actions",
|
|
@@ -3907,7 +3907,7 @@ ${l.value}
|
|
|
3907
3907
|
i("click:row", w);
|
|
3908
3908
|
}), v = (h) => {
|
|
3909
3909
|
i("sort", h);
|
|
3910
|
-
}, { hideTableToolbar:
|
|
3910
|
+
}, { hideTableToolbar: b, handleStateChange: x } = J.useTableState(() => n.query), { setTablePreferences: $, getTablePreferences: N } = Ni(), Q = j(N(o.value, n.defaultTablePreferences)), F = _(() => {
|
|
3911
3911
|
const h = N(o.value);
|
|
3912
3912
|
return {
|
|
3913
3913
|
...n.initialFetcherParams,
|
|
@@ -3923,8 +3923,8 @@ ${l.value}
|
|
|
3923
3923
|
...n.paginationAttributes
|
|
3924
3924
|
}));
|
|
3925
3925
|
return (h, w) => {
|
|
3926
|
-
const T = Y("KTableData"),
|
|
3927
|
-
return m(), R(
|
|
3926
|
+
const T = Y("KTableData"), k = Y("KCard");
|
|
3927
|
+
return m(), R(k, {
|
|
3928
3928
|
class: "kong-ui-entity-base-table",
|
|
3929
3929
|
title: e.title,
|
|
3930
3930
|
"title-tag": e.titleTag
|
|
@@ -3949,7 +3949,7 @@ ${l.value}
|
|
|
3949
3949
|
headers: l.value,
|
|
3950
3950
|
"hide-pagination": e.hidePagination,
|
|
3951
3951
|
"hide-pagination-when-optional": e.hidePaginationWhenOptional,
|
|
3952
|
-
"hide-toolbar": e.hideToolbar ?? C(
|
|
3952
|
+
"hide-toolbar": e.hideToolbar ?? C(b),
|
|
3953
3953
|
"initial-fetcher-params": F.value,
|
|
3954
3954
|
loading: e.isLoading,
|
|
3955
3955
|
"pagination-attributes": E.value,
|
|
@@ -4015,7 +4015,7 @@ ${l.value}
|
|
|
4015
4015
|
key: "1"
|
|
4016
4016
|
}
|
|
4017
4017
|
]), 1032, ["cache-identifier", "client-sort", "empty-state-action-message", "empty-state-action-route", "empty-state-icon-variant", "empty-state-message", "empty-state-title", "error", "error-state-message", "error-state-title", "fetcher", "fetcher-cache-key", "headers", "hide-pagination", "hide-pagination-when-optional", "hide-toolbar", "initial-fetcher-params", "loading", "pagination-attributes", "row-key", "search-input", "sort-handler-function", "sortable", "table-preferences", "onRow:click"]),
|
|
4018
|
-
h.$slots["outside-actions"] && C(
|
|
4018
|
+
h.$slots["outside-actions"] && C(b) ? (m(), S("div", Fl, [
|
|
4019
4019
|
H(h.$slots, "outside-actions", {}, void 0, !0)
|
|
4020
4020
|
])) : q("", !0)
|
|
4021
4021
|
]),
|
|
@@ -4242,7 +4242,7 @@ ${l.value}
|
|
|
4242
4242
|
}, v = (F) => {
|
|
4243
4243
|
var B, E;
|
|
4244
4244
|
return ((E = (B = i.config.schema) == null ? void 0 : B[F]) == null ? void 0 : E.type) ?? "text";
|
|
4245
|
-
},
|
|
4245
|
+
}, b = (F) => {
|
|
4246
4246
|
o.value = {
|
|
4247
4247
|
...o.value,
|
|
4248
4248
|
[F]: ""
|
|
@@ -4305,7 +4305,7 @@ ${l.value}
|
|
|
4305
4305
|
]),
|
|
4306
4306
|
_e(L("div", Ul, [
|
|
4307
4307
|
(m(!0), S(pe, null, me(u.value, (T) => {
|
|
4308
|
-
var
|
|
4308
|
+
var k, M;
|
|
4309
4309
|
return m(), S("div", {
|
|
4310
4310
|
key: T.value,
|
|
4311
4311
|
class: "kong-ui-entity-filter-menu-item",
|
|
@@ -4332,7 +4332,7 @@ ${l.value}
|
|
|
4332
4332
|
class: "menu-item-label",
|
|
4333
4333
|
for: p(T.value)
|
|
4334
4334
|
}, O(C(n)("filter.fieldLabel")), 9, Wl),
|
|
4335
|
-
((M = (
|
|
4335
|
+
((M = (k = e.config.schema) == null ? void 0 : k[T.value]) == null ? void 0 : M.type) === "select" ? (m(), R(w, {
|
|
4336
4336
|
key: 0,
|
|
4337
4337
|
id: p(T.value),
|
|
4338
4338
|
modelValue: o.value[T.value],
|
|
@@ -4369,7 +4369,7 @@ ${l.value}
|
|
|
4369
4369
|
appearance: "tertiary",
|
|
4370
4370
|
"data-testid": "clear-filter",
|
|
4371
4371
|
size: "small",
|
|
4372
|
-
onClick: (K) =>
|
|
4372
|
+
onClick: (K) => b(T.value)
|
|
4373
4373
|
}, {
|
|
4374
4374
|
default: A(() => [
|
|
4375
4375
|
V(O(C(n)("filter.clearButtonText")), 1)
|
|
@@ -4745,7 +4745,7 @@ const ns = ["aria-labelledby"], is = { class: "form-section-wrapper" }, rs = {
|
|
|
4745
4745
|
default: A(({ copyToClipboard: v }) => [
|
|
4746
4746
|
L("span", {
|
|
4747
4747
|
class: "entity-link-copy-id",
|
|
4748
|
-
onClick: De((
|
|
4748
|
+
onClick: De((b) => d(v), ["stop"])
|
|
4749
4749
|
}, [
|
|
4750
4750
|
P(C($i), {
|
|
4751
4751
|
class: "copy-icon",
|