@kong-ui-public/entities-key-sets 1.2.13 → 1.2.14
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-key-sets.es.js +110 -110
- package/dist/entities-key-sets.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as te, ref as $, computed as x, watch as be, renderSlot as z, createCommentVNode as V, unref as k, useSlots as Ye, onBeforeMount as lt, resolveComponent as O, openBlock as g, createBlock as
|
|
1
|
+
import { defineComponent as te, ref as $, computed as x, watch as be, renderSlot as z, createCommentVNode as V, unref as k, useSlots as Ye, onBeforeMount as lt, resolveComponent as O, openBlock as g, createBlock as K, createSlots as we, withCtx as b, createElementVNode as B, createTextVNode as Y, toDisplayString as F, createVNode as T, createElementBlock as _, renderList as ue, Fragment as pe, normalizeClass as Ie, withModifiers as Pe, withDirectives as Le, vShow as qe, useCssVars as Vn, resolveDynamicComponent as Me, normalizeProps as zn, guardReactiveProps as Hn, mergeProps as et, onMounted as Yn, onUnmounted as Jn, normalizeStyle as Wn, inject as Gn, pushScopeId as Zn, popScopeId as Qn, reactive as Ct } from "vue";
|
|
2
2
|
import { useRouter as st } from "vue-router";
|
|
3
3
|
import { createI18n as ct, i18nTComponent as zt } from "@kong-ui-public/i18n";
|
|
4
4
|
import Xn from "axios";
|
|
@@ -495,7 +495,7 @@ const ae = {
|
|
|
495
495
|
}, $a = "Copy to clipboard", Oa = {
|
|
496
496
|
message: ja,
|
|
497
497
|
iconTitle: $a
|
|
498
|
-
}, Ma = "kong-ui-copy-uuid-notify",
|
|
498
|
+
}, Ma = "kong-ui-copy-uuid-notify", Fa = { class: "kong-ui-copy-uuid" }, Ka = ["onClick"], Tt = 15, Ea = /* @__PURE__ */ te({
|
|
499
499
|
__name: "CopyUuid",
|
|
500
500
|
props: {
|
|
501
501
|
uuid: {
|
|
@@ -571,8 +571,8 @@ const ae = {
|
|
|
571
571
|
};
|
|
572
572
|
return (m, y) => {
|
|
573
573
|
const w = O("KIcon"), C = O("KClipboardProvider");
|
|
574
|
-
return g(), _("div",
|
|
575
|
-
e.format !== "hidden" ? (g(),
|
|
574
|
+
return g(), _("div", Fa, [
|
|
575
|
+
e.format !== "hidden" ? (g(), K(Me(e.idTooltip ? "KTooltip" : "div"), et({ key: 0 }, o.value, { "data-testid": "copy-id" }), {
|
|
576
576
|
default: b(() => [
|
|
577
577
|
B("div", {
|
|
578
578
|
class: Ie([
|
|
@@ -580,11 +580,11 @@ const ae = {
|
|
|
580
580
|
e.truncated ? "truncated-uuid" : null,
|
|
581
581
|
e.useMono ? "mono" : null
|
|
582
582
|
])
|
|
583
|
-
},
|
|
583
|
+
}, F(c.value), 3)
|
|
584
584
|
]),
|
|
585
585
|
_: 1
|
|
586
586
|
}, 16)) : V("", !0),
|
|
587
|
-
(g(),
|
|
587
|
+
(g(), K(Me(e.tooltip ? "KTooltip" : "div"), et(s.value, { class: "uuid-icon-wrapper" }), {
|
|
588
588
|
default: b(() => [
|
|
589
589
|
T(C, null, {
|
|
590
590
|
default: b(({ copyToClipboard: p }) => [
|
|
@@ -602,7 +602,7 @@ const ae = {
|
|
|
602
602
|
size: "16",
|
|
603
603
|
title: k(a)("iconTitle")
|
|
604
604
|
}, null, 8, ["color", "hide-title", "title"])
|
|
605
|
-
], 8,
|
|
605
|
+
], 8, Ka)
|
|
606
606
|
]),
|
|
607
607
|
_: 1
|
|
608
608
|
})
|
|
@@ -644,14 +644,14 @@ const ae = {
|
|
|
644
644
|
var s;
|
|
645
645
|
return n.isArrayItem ? (s = o.value) != null && s.name ? a(o.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
646
646
|
});
|
|
647
|
-
return (s, c) => (g(),
|
|
647
|
+
return (s, c) => (g(), K(Me(e.isArrayItem ? "fieldset" : "div"), {
|
|
648
648
|
class: Ie(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
649
649
|
}, {
|
|
650
650
|
default: b(() => [
|
|
651
651
|
e.isArrayItem ? (g(), _("legend", Na, [
|
|
652
|
-
B("b", null,
|
|
652
|
+
B("b", null, F(l.value), 1)
|
|
653
653
|
])) : V("", !0),
|
|
654
|
-
(g(!0), _(pe, null, ue(Object.keys(r.value), (d, u) => (g(),
|
|
654
|
+
(g(!0), _(pe, null, ue(Object.keys(r.value), (d, u) => (g(), K(ft, {
|
|
655
655
|
key: `${i.value}-property-${u}`,
|
|
656
656
|
item: {
|
|
657
657
|
key: d,
|
|
@@ -688,7 +688,7 @@ const ae = {
|
|
|
688
688
|
onClick: a[0] || (a[0] = (o) => t.$emit("navigation-click", e.item))
|
|
689
689
|
}, {
|
|
690
690
|
default: b(() => [
|
|
691
|
-
Y(
|
|
691
|
+
Y(F(e.item.value || k(n)("baseConfigCard.commonFields.link")), 1)
|
|
692
692
|
]),
|
|
693
693
|
_: 1
|
|
694
694
|
})
|
|
@@ -707,11 +707,11 @@ const ae = {
|
|
|
707
707
|
const { i18n: { t: n } } = ae.useI18n();
|
|
708
708
|
return (t, a) => {
|
|
709
709
|
const i = O("KBadge");
|
|
710
|
-
return g(),
|
|
710
|
+
return g(), K(i, {
|
|
711
711
|
appearance: e.status ? "success" : "neutral"
|
|
712
712
|
}, {
|
|
713
713
|
default: b(() => [
|
|
714
|
-
Y(
|
|
714
|
+
Y(F(e.status ? k(n)("baseConfigCard.statusBadge.enabledLabel") : k(n)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
715
715
|
]),
|
|
716
716
|
_: 1
|
|
717
717
|
}, 8, ["appearance"]);
|
|
@@ -742,10 +742,10 @@ const ae = {
|
|
|
742
742
|
setup(e, { emit: n }) {
|
|
743
743
|
const t = e;
|
|
744
744
|
Vn((y) => ({
|
|
745
|
-
"
|
|
746
|
-
|
|
747
|
-
"
|
|
748
|
-
"
|
|
745
|
+
"1df60db4": c.value ? "none" : `solid ${k(za)} ${k(Ua)}`,
|
|
746
|
+
"21d1d34e": s.value && r.value ? "block" : "flex",
|
|
747
|
+
"4d3dc7e7": s.value && r.value ? "100%" : t.slim ? "50%" : "25%",
|
|
748
|
+
"4d400dc2": s.value && r.value ? "100%" : t.slim ? "50%" : "75%"
|
|
749
749
|
}));
|
|
750
750
|
const a = Ye(), { i18n: { t: i, formatUnixTimeStamp: o } } = ae.useI18n(), r = x(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), l = x(() => !!(t.item.tooltip || a["label-tooltip"])), s = x(() => t.item.type === W.Json || t.item.type === W.JsonArray), c = x(() => t.item.type === W.JsonArray), d = x(() => {
|
|
751
751
|
switch (t.item.type) {
|
|
@@ -866,7 +866,7 @@ const ae = {
|
|
|
866
866
|
};
|
|
867
867
|
default:
|
|
868
868
|
return {
|
|
869
|
-
tag: "
|
|
869
|
+
tag: "div",
|
|
870
870
|
attrs: {
|
|
871
871
|
"data-testid": `${t.item.key}-plain-text`
|
|
872
872
|
},
|
|
@@ -884,7 +884,7 @@ const ae = {
|
|
|
884
884
|
z(y.$slots, "label", { item: e.item }, () => [
|
|
885
885
|
T(C, { "tooltip-attributes": { maxWidth: "500px" } }, we({
|
|
886
886
|
default: b(() => [
|
|
887
|
-
Y(
|
|
887
|
+
Y(F(e.item.label) + " ", 1)
|
|
888
888
|
]),
|
|
889
889
|
_: 2
|
|
890
890
|
}, [
|
|
@@ -895,7 +895,7 @@ const ae = {
|
|
|
895
895
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
896
896
|
}, [
|
|
897
897
|
z(y.$slots, "label-tooltip", {}, () => [
|
|
898
|
-
Y(
|
|
898
|
+
Y(F(e.item.tooltip), 1)
|
|
899
899
|
], !0)
|
|
900
900
|
], 8, Wa)
|
|
901
901
|
]),
|
|
@@ -912,20 +912,20 @@ const ae = {
|
|
|
912
912
|
rowValue: e.item.value
|
|
913
913
|
}, () => [
|
|
914
914
|
r.value ? (g(), _("div", Qa, [
|
|
915
|
-
(g(),
|
|
915
|
+
(g(), K(Me(d.value.tag), zn(Hn(d.value.attrs)), {
|
|
916
916
|
default: b(() => [
|
|
917
917
|
d.value.additionalComponent === "KBadge" ? (g(), _("div", {
|
|
918
918
|
key: 0,
|
|
919
919
|
"data-testid": `${e.item.key}-badge-tags`
|
|
920
920
|
}, [
|
|
921
|
-
(g(!0), _(pe, null, ue(e.item.value, (v, A) => (g(),
|
|
921
|
+
(g(!0), _(pe, null, ue(e.item.value, (v, A) => (g(), K(p, {
|
|
922
922
|
key: `${e.item.key}-badge-tag-${A}`,
|
|
923
923
|
class: "config-badge",
|
|
924
924
|
"data-testid": `${e.item.key}-badge-tag-${A}`,
|
|
925
925
|
"truncation-tooltip": v
|
|
926
926
|
}, {
|
|
927
927
|
default: b(() => [
|
|
928
|
-
Y(
|
|
928
|
+
Y(F(v), 1)
|
|
929
929
|
]),
|
|
930
930
|
_: 2
|
|
931
931
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
@@ -935,7 +935,7 @@ const ae = {
|
|
|
935
935
|
class: "copy-uuid-array",
|
|
936
936
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
937
937
|
}, [
|
|
938
|
-
(g(!0), _(pe, null, ue(e.item.value, (v, A) => (g(),
|
|
938
|
+
(g(!0), _(pe, null, ue(e.item.value, (v, A) => (g(), K(k(Gt), et(d.value.childAttrs, {
|
|
939
939
|
key: `${e.item.key}-copy-uuid-${A}`,
|
|
940
940
|
"data-testid": `${e.item.key}-copy-uuid-${A}`,
|
|
941
941
|
uuid: v
|
|
@@ -945,7 +945,7 @@ const ae = {
|
|
|
945
945
|
class: "method-badge-array",
|
|
946
946
|
"data-testid": `${e.item.key}-badge-methods`
|
|
947
947
|
}, [
|
|
948
|
-
(g(!0), _(pe, null, ue(e.item.value, (v, A) => (g(),
|
|
948
|
+
(g(!0), _(pe, null, ue(e.item.value, (v, A) => (g(), K(h, {
|
|
949
949
|
key: `${e.item.key}-badge-method-${A}`,
|
|
950
950
|
class: "config-badge",
|
|
951
951
|
"data-testid": `${e.item.key}-badge-method-${A}`,
|
|
@@ -954,7 +954,7 @@ const ae = {
|
|
|
954
954
|
method: k(ea).includes(v.toLowerCase()) ? v.toLowerCase() : "custom"
|
|
955
955
|
}, {
|
|
956
956
|
default: b(() => [
|
|
957
|
-
Y(
|
|
957
|
+
Y(F(v), 1)
|
|
958
958
|
]),
|
|
959
959
|
_: 2
|
|
960
960
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
@@ -963,13 +963,13 @@ const ae = {
|
|
|
963
963
|
key: 3,
|
|
964
964
|
"data-testid": `${t.item.key}-json-array-content`
|
|
965
965
|
}, [
|
|
966
|
-
(g(!0), _(pe, null, ue(e.item.value, (v, A) => (g(),
|
|
966
|
+
(g(!0), _(pe, null, ue(e.item.value, (v, A) => (g(), K(Zt, {
|
|
967
967
|
key: `json-array-item-${A}`,
|
|
968
968
|
index: A,
|
|
969
969
|
"is-array-item": "",
|
|
970
970
|
item: v
|
|
971
971
|
}, null, 8, ["index", "item"]))), 128))
|
|
972
|
-
], 8, ni)) : (g(),
|
|
972
|
+
], 8, ni)) : (g(), K(f, {
|
|
973
973
|
key: 4,
|
|
974
974
|
label: k(m) ? e.item.value : ""
|
|
975
975
|
}, {
|
|
@@ -978,7 +978,7 @@ const ae = {
|
|
|
978
978
|
ref_key: "textContent",
|
|
979
979
|
ref: u,
|
|
980
980
|
class: Ie(["attrs-data-text", { truncated: e.truncated }])
|
|
981
|
-
},
|
|
981
|
+
}, F(d.value.text), 3)
|
|
982
982
|
]),
|
|
983
983
|
_: 1
|
|
984
984
|
}, 8, ["label"]))
|
|
@@ -994,7 +994,7 @@ const ae = {
|
|
|
994
994
|
]);
|
|
995
995
|
};
|
|
996
996
|
}
|
|
997
|
-
}), ft = /* @__PURE__ */ fe(ii, [["__scopeId", "data-v-
|
|
997
|
+
}), ft = /* @__PURE__ */ fe(ii, [["__scopeId", "data-v-307ab96d"]]);
|
|
998
998
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
999
999
|
function Qt(e) {
|
|
1000
1000
|
return typeof e > "u" || e === null;
|
|
@@ -1035,15 +1035,15 @@ function Xt(e, n) {
|
|
|
1035
1035
|
|
|
1036
1036
|
` + e.mark.snippet), a + " " + t) : a;
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1038
|
+
function Fe(e, n) {
|
|
1039
1039
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = Xt(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1040
1040
|
}
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1041
|
+
Fe.prototype = Object.create(Error.prototype);
|
|
1042
|
+
Fe.prototype.constructor = Fe;
|
|
1043
|
+
Fe.prototype.toString = function(e) {
|
|
1044
1044
|
return this.name + ": " + Xt(this, e);
|
|
1045
1045
|
};
|
|
1046
|
-
var se =
|
|
1046
|
+
var se = Fe;
|
|
1047
1047
|
function Ze(e, n, t, a, i) {
|
|
1048
1048
|
var o = "", r = "", l = Math.floor(i / 2) - 1;
|
|
1049
1049
|
return a - n > l && (o = " ... ", n = a - l + o.length), t - a > l && (r = " ...", t = a + l - r.length), {
|
|
@@ -1321,7 +1321,7 @@ function Mi(e) {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
return !(!a || i === "_");
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function Fi(e) {
|
|
1325
1325
|
var n = e, t = 1, a;
|
|
1326
1326
|
if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")), a = n[0], (a === "-" || a === "+") && (a === "-" && (t = -1), n = n.slice(1), a = n[0]), n === "0")
|
|
1327
1327
|
return 0;
|
|
@@ -1335,14 +1335,14 @@ function Ki(e) {
|
|
|
1335
1335
|
}
|
|
1336
1336
|
return t * parseInt(n, 10);
|
|
1337
1337
|
}
|
|
1338
|
-
function
|
|
1338
|
+
function Ki(e) {
|
|
1339
1339
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ee.isNegativeZero(e);
|
|
1340
1340
|
}
|
|
1341
1341
|
var sn = new re("tag:yaml.org,2002:int", {
|
|
1342
1342
|
kind: "scalar",
|
|
1343
1343
|
resolve: Mi,
|
|
1344
|
-
construct:
|
|
1345
|
-
predicate:
|
|
1344
|
+
construct: Fi,
|
|
1345
|
+
predicate: Ki,
|
|
1346
1346
|
represent: {
|
|
1347
1347
|
binary: function(e) {
|
|
1348
1348
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1642,7 +1642,7 @@ function I(e, n) {
|
|
|
1642
1642
|
function Ve(e, n) {
|
|
1643
1643
|
e.onWarning && e.onWarning.call(null, An(e, n));
|
|
1644
1644
|
}
|
|
1645
|
-
var
|
|
1645
|
+
var Ft = {
|
|
1646
1646
|
YAML: function(e, n, t) {
|
|
1647
1647
|
var a, i, o;
|
|
1648
1648
|
e.version !== null && I(e, "duplication of %YAML directive"), t.length !== 1 && I(e, "YAML directive accepts exactly one argument"), a = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), a === null && I(e, "ill-formed argument of the YAML directive"), i = parseInt(a[1], 10), o = parseInt(a[2], 10), i !== 1 && I(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Ve(e, "unsupported YAML version of the document");
|
|
@@ -1669,7 +1669,7 @@ function he(e, n, t, a) {
|
|
|
1669
1669
|
e.result += l;
|
|
1670
1670
|
}
|
|
1671
1671
|
}
|
|
1672
|
-
function
|
|
1672
|
+
function Kt(e, n, t, a) {
|
|
1673
1673
|
var i, o, r, l;
|
|
1674
1674
|
for (ee.isObject(t) || I(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(t), r = 0, l = i.length; r < l; r += 1)
|
|
1675
1675
|
o = i[r], ve.call(n, o) || (n[o] = t[o], a[o] = !0);
|
|
@@ -1682,9 +1682,9 @@ function Te(e, n, t, a, i, o, r, l, s) {
|
|
|
1682
1682
|
if (typeof i == "object" && Ot(i) === "[object Object]" && (i = "[object Object]"), i = String(i), n === null && (n = {}), a === "tag:yaml.org,2002:merge")
|
|
1683
1683
|
if (Array.isArray(o))
|
|
1684
1684
|
for (c = 0, d = o.length; c < d; c += 1)
|
|
1685
|
-
|
|
1685
|
+
Kt(e, n, o[c], t);
|
|
1686
1686
|
else
|
|
1687
|
-
|
|
1687
|
+
Kt(e, n, o, t);
|
|
1688
1688
|
else
|
|
1689
1689
|
!e.json && !ve.call(t, i) && ve.call(n, i) && (e.line = r || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, I(e, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(n, i, {
|
|
1690
1690
|
configurable: !0,
|
|
@@ -1980,7 +1980,7 @@ function Sr(e) {
|
|
|
1980
1980
|
r = e.input.charCodeAt(++e.position);
|
|
1981
1981
|
i.push(e.input.slice(t, e.position));
|
|
1982
1982
|
}
|
|
1983
|
-
r !== 0 && gt(e), ve.call(
|
|
1983
|
+
r !== 0 && gt(e), ve.call(Ft, a) ? Ft[a](e, a, i) : Ve(e, 'unknown document directive "' + a + '"');
|
|
1984
1984
|
}
|
|
1985
1985
|
if (Q(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, Q(e, !0, -1)) : o && I(e, "directives end mark is expected"), je(e, e.lineIndent - 1, Ue, !1, !0), Q(e, !0, -1), e.checkLineBreaks && lr.test(e.input.slice(n, e.position)) && Ve(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Je(e)) {
|
|
1986
1986
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, Q(e, !0, -1));
|
|
@@ -2020,7 +2020,7 @@ function _r(e, n) {
|
|
|
2020
2020
|
var Ar = Ir, xr = _r, Tn = {
|
|
2021
2021
|
loadAll: Ar,
|
|
2022
2022
|
load: xr
|
|
2023
|
-
}, jn = Object.prototype.toString, $n = Object.prototype.hasOwnProperty, vt = 65279, Tr = 9,
|
|
2023
|
+
}, jn = Object.prototype.toString, $n = Object.prototype.hasOwnProperty, vt = 65279, Tr = 9, Ke = 10, jr = 13, $r = 32, Or = 33, Mr = 34, at = 35, Fr = 37, Kr = 38, Er = 39, Br = 42, On = 44, Nr = 45, ze = 58, Lr = 61, qr = 62, Pr = 63, Rr = 64, Mn = 91, Fn = 93, Dr = 96, Kn = 123, Ur = 124, En = 125, oe = {};
|
|
2024
2024
|
oe[0] = "\\0";
|
|
2025
2025
|
oe[7] = "\\a";
|
|
2026
2026
|
oe[8] = "\\b";
|
|
@@ -2103,7 +2103,7 @@ function Be(e) {
|
|
|
2103
2103
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== vt || 65536 <= e && e <= 1114111;
|
|
2104
2104
|
}
|
|
2105
2105
|
function Nt(e) {
|
|
2106
|
-
return Be(e) && e !== vt && e !== jr && e !==
|
|
2106
|
+
return Be(e) && e !== vt && e !== jr && e !== Ke;
|
|
2107
2107
|
}
|
|
2108
2108
|
function Lt(e, n, t) {
|
|
2109
2109
|
var a = Nt(e), i = a && !He(e);
|
|
@@ -2112,11 +2112,11 @@ function Lt(e, n, t) {
|
|
|
2112
2112
|
(t ? (
|
|
2113
2113
|
// c = flow-in
|
|
2114
2114
|
a
|
|
2115
|
-
) : a && e !== On && e !== Mn && e !==
|
|
2115
|
+
) : a && e !== On && e !== Mn && e !== Fn && e !== Kn && e !== En) && e !== at && !(n === ze && !i) || Nt(n) && !He(n) && e === at || n === ze && i
|
|
2116
2116
|
);
|
|
2117
2117
|
}
|
|
2118
2118
|
function Zr(e) {
|
|
2119
|
-
return Be(e) && e !== vt && !He(e) && e !== Nr && e !== Pr && e !== ze && e !== On && e !== Mn && e !==
|
|
2119
|
+
return Be(e) && e !== vt && !He(e) && e !== Nr && e !== Pr && e !== ze && e !== On && e !== Mn && e !== Fn && e !== Kn && e !== En && e !== at && e !== Kr && e !== Br && e !== Or && e !== Ur && e !== Lr && e !== qr && e !== Er && e !== Mr && e !== Fr && e !== Rr && e !== Dr;
|
|
2120
2120
|
}
|
|
2121
2121
|
function Qr(e) {
|
|
2122
2122
|
return !He(e) && e !== ze;
|
|
@@ -2140,7 +2140,7 @@ function Xr(e, n, t, a, i, o, r, l) {
|
|
|
2140
2140
|
}
|
|
2141
2141
|
else {
|
|
2142
2142
|
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2143
|
-
if (c = Oe(e, s), c ===
|
|
2143
|
+
if (c = Oe(e, s), c === Ke)
|
|
2144
2144
|
u = !0, y && (m = m || // Foldable line = too long, and not more-indented.
|
|
2145
2145
|
s - w - 1 > a && e[w + 1] !== " ", w = s);
|
|
2146
2146
|
else if (!Be(c))
|
|
@@ -2235,7 +2235,7 @@ function ao(e, n, t) {
|
|
|
2235
2235
|
function Dt(e, n, t, a) {
|
|
2236
2236
|
var i = "", o = e.tag, r, l, s;
|
|
2237
2237
|
for (r = 0, l = t.length; r < l; r += 1)
|
|
2238
|
-
s = t[r], e.replacer && (s = e.replacer.call(t, String(r), s)), (ge(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && ge(e, n + 1, null, !0, !0, !1, !0)) && ((!a || i !== "") && (i += it(e, n)), e.dump &&
|
|
2238
|
+
s = t[r], e.replacer && (s = e.replacer.call(t, String(r), s)), (ge(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && ge(e, n + 1, null, !0, !0, !1, !0)) && ((!a || i !== "") && (i += it(e, n)), e.dump && Ke === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2239
2239
|
e.tag = o, e.dump = i || "[]";
|
|
2240
2240
|
}
|
|
2241
2241
|
function io(e, n, t) {
|
|
@@ -2253,7 +2253,7 @@ function ro(e, n, t, a) {
|
|
|
2253
2253
|
else if (e.sortKeys)
|
|
2254
2254
|
throw new se("sortKeys must be a boolean or a function");
|
|
2255
2255
|
for (l = 0, s = r.length; l < s; l += 1)
|
|
2256
|
-
m = "", (!a || i !== "") && (m += it(e, n)), c = r[l], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)), ge(e, n + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump &&
|
|
2256
|
+
m = "", (!a || i !== "") && (m += it(e, n)), c = r[l], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)), ge(e, n + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Ke === e.dump.charCodeAt(0) ? m += "?" : m += "? "), m += e.dump, u && (m += it(e, n)), ge(e, n + 1, d, !0, u) && (e.dump && Ke === e.dump.charCodeAt(0) ? m += ":" : m += ": ", m += e.dump, i += m));
|
|
2257
2257
|
e.tag = o, e.dump = i || "{}";
|
|
2258
2258
|
}
|
|
2259
2259
|
function Ut(e, n, t) {
|
|
@@ -2412,8 +2412,8 @@ const Ao = {
|
|
|
2412
2412
|
class: Ie(`config-card-details-${d}-props`),
|
|
2413
2413
|
"data-testid": `config-card-details-${d}-props`
|
|
2414
2414
|
}, [
|
|
2415
|
-
d !== "basic" ? (g(), _("div", To,
|
|
2416
|
-
(g(!0), _(pe, null, ue(e.propertyCollections[d], (u) => (g(),
|
|
2415
|
+
d !== "basic" ? (g(), _("div", To, F(d === "advanced" ? k(a)("baseConfigCard.sections.advanced") : k(a)("baseConfigCard.sections.plugin")), 1)) : V("", !0),
|
|
2416
|
+
(g(!0), _(pe, null, ue(e.propertyCollections[d], (u) => (g(), K(ft, {
|
|
2417
2417
|
key: u.key,
|
|
2418
2418
|
item: u
|
|
2419
2419
|
}, we({
|
|
@@ -2457,15 +2457,15 @@ const Ao = {
|
|
|
2457
2457
|
], 64);
|
|
2458
2458
|
};
|
|
2459
2459
|
}
|
|
2460
|
-
}), Mo = /* @__PURE__ */ fe(Oo, [["__scopeId", "data-v-6c45e9e4"]]), Vt = "24px",
|
|
2460
|
+
}), Mo = /* @__PURE__ */ fe(Oo, [["__scopeId", "data-v-6c45e9e4"]]), Vt = "24px", Fo = (e, n) => {
|
|
2461
2461
|
const t = e.__vccOpts || e;
|
|
2462
2462
|
for (const [a, i] of n)
|
|
2463
2463
|
t[a] = i;
|
|
2464
2464
|
return t;
|
|
2465
|
-
},
|
|
2465
|
+
}, Ko = (e) => (Zn("data-v-37e959c8"), e = e(), Qn(), e), Eo = ["aria-hidden"], Bo = {
|
|
2466
2466
|
key: 0,
|
|
2467
2467
|
"data-testid": "kui-icon-svg-title"
|
|
2468
|
-
}, No = /* @__PURE__ */
|
|
2468
|
+
}, No = /* @__PURE__ */ Ko(() => /* @__PURE__ */ B("path", {
|
|
2469
2469
|
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",
|
|
2470
2470
|
fill: "currentColor"
|
|
2471
2471
|
}, null, -1)), Lo = /* @__PURE__ */ te({
|
|
@@ -2537,7 +2537,7 @@ const Ao = {
|
|
|
2537
2537
|
lineHeight: "0",
|
|
2538
2538
|
width: t.value
|
|
2539
2539
|
}));
|
|
2540
|
-
return (i, o) => (g(),
|
|
2540
|
+
return (i, o) => (g(), K(Me(e.as), {
|
|
2541
2541
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2542
2542
|
class: "kui-icon book-icon",
|
|
2543
2543
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
@@ -2554,14 +2554,14 @@ const Ao = {
|
|
|
2554
2554
|
width: "100%",
|
|
2555
2555
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2556
2556
|
}, [
|
|
2557
|
-
e.title ? (g(), _("title", Bo,
|
|
2557
|
+
e.title ? (g(), _("title", Bo, F(e.title), 1)) : V("", !0),
|
|
2558
2558
|
No
|
|
2559
2559
|
], 8, Eo))
|
|
2560
2560
|
]),
|
|
2561
2561
|
_: 1
|
|
2562
2562
|
}, 8, ["aria-hidden", "style"]));
|
|
2563
2563
|
}
|
|
2564
|
-
}), qo = /* @__PURE__ */
|
|
2564
|
+
}), qo = /* @__PURE__ */ Fo(Lo, [["__scopeId", "data-v-37e959c8"]]), Po = { "data-testid": "config-card-title" }, Ro = { class: "config-card-actions" }, Do = ["href"], Uo = {
|
|
2565
2565
|
key: 2,
|
|
2566
2566
|
class: "config-card-details-section"
|
|
2567
2567
|
}, Vo = {
|
|
@@ -2788,28 +2788,28 @@ const Ao = {
|
|
|
2788
2788
|
}
|
|
2789
2789
|
}), (S, N) => {
|
|
2790
2790
|
const M = O("KLabel"), L = O("KSelect"), U = O("KButton"), P = O("KClipboardProvider"), H = O("KSkeleton"), X = O("KEmptyState"), ne = O("KCard");
|
|
2791
|
-
return g(),
|
|
2791
|
+
return g(), K(ne, { class: "kong-ui-entity-base-config-card" }, we({
|
|
2792
2792
|
actions: b(() => [
|
|
2793
2793
|
B("div", Ro, [
|
|
2794
2794
|
z(S.$slots, "actions", {}, void 0, !0),
|
|
2795
|
-
e.config.jsonYamlEnabled ? (g(),
|
|
2795
|
+
e.config.jsonYamlEnabled ? (g(), K(M, {
|
|
2796
2796
|
key: 0,
|
|
2797
2797
|
class: "config-format-select-label",
|
|
2798
2798
|
"data-testid": "config-format-select-label"
|
|
2799
2799
|
}, {
|
|
2800
2800
|
default: b(() => [
|
|
2801
|
-
Y(
|
|
2801
|
+
Y(F(e.label), 1)
|
|
2802
2802
|
]),
|
|
2803
2803
|
_: 1
|
|
2804
2804
|
})) : V("", !0),
|
|
2805
|
-
e.config.jsonYamlEnabled ? (g(),
|
|
2805
|
+
e.config.jsonYamlEnabled ? (g(), K(L, {
|
|
2806
2806
|
key: 1,
|
|
2807
2807
|
appearance: "select",
|
|
2808
2808
|
"data-testid": "select-config-format",
|
|
2809
2809
|
items: c,
|
|
2810
2810
|
onChange: u
|
|
2811
2811
|
})) : V("", !0),
|
|
2812
|
-
a.config.jsonYamlEnabled && e.configCardDoc ? (g(),
|
|
2812
|
+
a.config.jsonYamlEnabled && e.configCardDoc ? (g(), K(U, {
|
|
2813
2813
|
key: 2,
|
|
2814
2814
|
appearance: "btn-link",
|
|
2815
2815
|
class: "book-icon",
|
|
@@ -2826,16 +2826,16 @@ const Ao = {
|
|
|
2826
2826
|
]),
|
|
2827
2827
|
_: 1
|
|
2828
2828
|
})) : V("", !0),
|
|
2829
|
-
e.config.jsonYamlEnabled ? V("", !0) : (g(),
|
|
2829
|
+
e.config.jsonYamlEnabled ? V("", !0) : (g(), K(P, { key: 3 }, {
|
|
2830
2830
|
default: b(({ copyToClipboard: Z }) => [
|
|
2831
|
-
!y.value && !w.value ? (g(),
|
|
2831
|
+
!y.value && !w.value ? (g(), K(U, {
|
|
2832
2832
|
key: 0,
|
|
2833
2833
|
appearance: "btn-link",
|
|
2834
2834
|
"data-testid": "json-copy-button",
|
|
2835
2835
|
onClick: (J) => E(Z)
|
|
2836
2836
|
}, {
|
|
2837
2837
|
default: b(() => [
|
|
2838
|
-
Y(
|
|
2838
|
+
Y(F(k(o)("baseConfigCard.actions.copy")), 1)
|
|
2839
2839
|
]),
|
|
2840
2840
|
_: 2
|
|
2841
2841
|
}, 1032, ["onClick"])) : V("", !0)
|
|
@@ -2845,18 +2845,18 @@ const Ao = {
|
|
|
2845
2845
|
])
|
|
2846
2846
|
]),
|
|
2847
2847
|
body: b(() => [
|
|
2848
|
-
y.value ? (g(),
|
|
2848
|
+
y.value ? (g(), K(H, {
|
|
2849
2849
|
key: 0,
|
|
2850
2850
|
"data-testid": "config-card-loader",
|
|
2851
2851
|
"table-columns": 2,
|
|
2852
2852
|
type: "table"
|
|
2853
|
-
})) : w.value ? (g(),
|
|
2853
|
+
})) : w.value ? (g(), K(X, {
|
|
2854
2854
|
key: 1,
|
|
2855
2855
|
"data-testid": "config-card-fetch-error",
|
|
2856
2856
|
"is-error": ""
|
|
2857
2857
|
}, {
|
|
2858
2858
|
message: b(() => [
|
|
2859
|
-
B("h3", null,
|
|
2859
|
+
B("h3", null, F(C.value), 1)
|
|
2860
2860
|
]),
|
|
2861
2861
|
_: 1
|
|
2862
2862
|
})) : V("", !0),
|
|
@@ -2883,8 +2883,8 @@ const Ao = {
|
|
|
2883
2883
|
class: Ie(`config-card-details-${Z}-props`),
|
|
2884
2884
|
"data-testid": `config-card-details-${Z}-props`
|
|
2885
2885
|
}, [
|
|
2886
|
-
Z !== "basic" ? (g(), _("div", Ho,
|
|
2887
|
-
(g(!0), _(pe, null, ue(v.value[Z], (J) => (g(),
|
|
2886
|
+
Z !== "basic" ? (g(), _("div", Ho, F(Z === "advanced" ? k(o)("baseConfigCard.sections.advanced") : k(o)("baseConfigCard.sections.plugin")), 1)) : V("", !0),
|
|
2887
|
+
(g(!0), _(pe, null, ue(v.value[Z], (J) => (g(), K(ft, {
|
|
2888
2888
|
key: J.key,
|
|
2889
2889
|
item: J
|
|
2890
2890
|
}, we({
|
|
@@ -2917,7 +2917,7 @@ const Ao = {
|
|
|
2917
2917
|
fn: b(() => [
|
|
2918
2918
|
B("div", Po, [
|
|
2919
2919
|
z(S.$slots, "title", {}, () => [
|
|
2920
|
-
Y(
|
|
2920
|
+
Y(F(k(o)("baseConfigCard.title")), 1)
|
|
2921
2921
|
], !0)
|
|
2922
2922
|
])
|
|
2923
2923
|
]),
|
|
@@ -3010,12 +3010,12 @@ const Ao = {
|
|
|
3010
3010
|
}
|
|
3011
3011
|
}), (p, h) => {
|
|
3012
3012
|
const f = O("KSkeleton"), v = O("KEmptyState"), A = O("KAlert"), q = O("KButton"), D = O("KCard");
|
|
3013
|
-
return g(),
|
|
3013
|
+
return g(), K(D, { class: "kong-ui-entity-base-form" }, {
|
|
3014
3014
|
body: b(() => [
|
|
3015
|
-
s.value ? (g(),
|
|
3015
|
+
s.value ? (g(), K(f, {
|
|
3016
3016
|
key: 0,
|
|
3017
3017
|
type: "form"
|
|
3018
|
-
})) : c.value ? (g(),
|
|
3018
|
+
})) : c.value ? (g(), K(v, {
|
|
3019
3019
|
key: 1,
|
|
3020
3020
|
"cta-text": k(o)("baseForm.actions.back"),
|
|
3021
3021
|
"data-testid": "form-fetch-error",
|
|
@@ -3023,7 +3023,7 @@ const Ao = {
|
|
|
3023
3023
|
"is-error": !0
|
|
3024
3024
|
}, {
|
|
3025
3025
|
message: b(() => [
|
|
3026
|
-
B("h3", null,
|
|
3026
|
+
B("h3", null, F(d.value), 1)
|
|
3027
3027
|
]),
|
|
3028
3028
|
_: 1
|
|
3029
3029
|
}, 8, ["cta-text"])) : (g(), _("form", {
|
|
@@ -3033,7 +3033,7 @@ const Ao = {
|
|
|
3033
3033
|
onSubmit: Pe(C, ["prevent"])
|
|
3034
3034
|
}, [
|
|
3035
3035
|
z(p.$slots, "default", {}, void 0, !0),
|
|
3036
|
-
e.errorMessage ? (g(),
|
|
3036
|
+
e.errorMessage ? (g(), K(A, {
|
|
3037
3037
|
key: 0,
|
|
3038
3038
|
"alert-message": e.errorMessage,
|
|
3039
3039
|
appearance: "danger",
|
|
@@ -3048,7 +3048,7 @@ const Ao = {
|
|
|
3048
3048
|
type: "reset"
|
|
3049
3049
|
}, {
|
|
3050
3050
|
default: b(() => [
|
|
3051
|
-
Y(
|
|
3051
|
+
Y(F(k(o)("baseForm.actions.cancel")), 1)
|
|
3052
3052
|
]),
|
|
3053
3053
|
_: 1
|
|
3054
3054
|
}, 8, ["disabled"]),
|
|
@@ -3059,7 +3059,7 @@ const Ao = {
|
|
|
3059
3059
|
type: "submit"
|
|
3060
3060
|
}, {
|
|
3061
3061
|
default: b(() => [
|
|
3062
|
-
Y(
|
|
3062
|
+
Y(F(k(o)("baseForm.actions.save")), 1)
|
|
3063
3063
|
]),
|
|
3064
3064
|
_: 1
|
|
3065
3065
|
}, 8, ["disabled"])
|
|
@@ -3304,7 +3304,7 @@ const Ao = {
|
|
|
3304
3304
|
};
|
|
3305
3305
|
return (v, A) => {
|
|
3306
3306
|
const q = O("KIcon"), D = O("KButton"), E = O("KDropdownMenu"), S = O("KTable"), N = O("KCard");
|
|
3307
|
-
return g(),
|
|
3307
|
+
return g(), K(N, {
|
|
3308
3308
|
class: "kong-ui-entity-base-table",
|
|
3309
3309
|
title: e.title
|
|
3310
3310
|
}, {
|
|
@@ -3401,7 +3401,7 @@ const Ao = {
|
|
|
3401
3401
|
rowKey: P,
|
|
3402
3402
|
rowValue: H
|
|
3403
3403
|
}, () => [
|
|
3404
|
-
Y(
|
|
3404
|
+
Y(F(H), 1)
|
|
3405
3405
|
], !0)
|
|
3406
3406
|
]),
|
|
3407
3407
|
_: 2
|
|
@@ -3466,7 +3466,7 @@ const Ao = {
|
|
|
3466
3466
|
};
|
|
3467
3467
|
return (l, s) => {
|
|
3468
3468
|
const c = O("KAlert"), d = O("KPrompt");
|
|
3469
|
-
return g(),
|
|
3469
|
+
return g(), K(d, {
|
|
3470
3470
|
"action-button-text": "Yes, delete",
|
|
3471
3471
|
"action-pending": e.actionPending,
|
|
3472
3472
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3481,7 +3481,7 @@ const Ao = {
|
|
|
3481
3481
|
e.error ? (g(), _("div", ll, [
|
|
3482
3482
|
T(c, { appearance: "danger" }, {
|
|
3483
3483
|
alertMessage: b(() => [
|
|
3484
|
-
Y(
|
|
3484
|
+
Y(F(e.error), 1)
|
|
3485
3485
|
]),
|
|
3486
3486
|
_: 1
|
|
3487
3487
|
})
|
|
@@ -3492,21 +3492,21 @@ const Ao = {
|
|
|
3492
3492
|
tag: "p"
|
|
3493
3493
|
}, we({
|
|
3494
3494
|
entityType: b(() => [
|
|
3495
|
-
Y(
|
|
3495
|
+
Y(F(t.entityType), 1)
|
|
3496
3496
|
]),
|
|
3497
3497
|
_: 2
|
|
3498
3498
|
}, [
|
|
3499
3499
|
t.entityName ? {
|
|
3500
3500
|
name: "entityName",
|
|
3501
3501
|
fn: b(() => [
|
|
3502
|
-
B("strong", null,
|
|
3502
|
+
B("strong", null, F(t.entityName), 1)
|
|
3503
3503
|
]),
|
|
3504
3504
|
key: "0"
|
|
3505
3505
|
} : void 0
|
|
3506
3506
|
]), 1032, ["keypath"]),
|
|
3507
3507
|
t.description || l.$slots.description ? (g(), _("div", sl, [
|
|
3508
3508
|
z(l.$slots, "description", {}, () => [
|
|
3509
|
-
B("p", null,
|
|
3509
|
+
B("p", null, F(t.description), 1)
|
|
3510
3510
|
], !0)
|
|
3511
3511
|
])) : V("", !0)
|
|
3512
3512
|
]),
|
|
@@ -3619,7 +3619,7 @@ const Ao = {
|
|
|
3619
3619
|
};
|
|
3620
3620
|
return (p, h) => {
|
|
3621
3621
|
const f = O("KInput"), v = O("KButton"), A = O("KSelect"), q = O("KMenuItem"), D = O("KMenu");
|
|
3622
|
-
return e.config.isExactMatch ? (g(),
|
|
3622
|
+
return e.config.isExactMatch ? (g(), K(f, {
|
|
3623
3623
|
key: 0,
|
|
3624
3624
|
autocomplete: "off",
|
|
3625
3625
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3640,7 +3640,7 @@ const Ao = {
|
|
|
3640
3640
|
onClick: s
|
|
3641
3641
|
}, {
|
|
3642
3642
|
default: b(() => [
|
|
3643
|
-
Y(
|
|
3643
|
+
Y(F(k(a)("filter.filterButtonText")) + " " + F(r.value.length > 0 ? `(${r.value.length})` : ""), 1)
|
|
3644
3644
|
]),
|
|
3645
3645
|
_: 1
|
|
3646
3646
|
}),
|
|
@@ -3652,7 +3652,7 @@ const Ao = {
|
|
|
3652
3652
|
]),
|
|
3653
3653
|
Le(T(D, { class: "kong-ui-entity-filter-menu" }, {
|
|
3654
3654
|
body: b(() => [
|
|
3655
|
-
(g(!0), _(pe, null, ue(l.value, (E, S) => (g(),
|
|
3655
|
+
(g(!0), _(pe, null, ue(l.value, (E, S) => (g(), K(q, {
|
|
3656
3656
|
key: E.value,
|
|
3657
3657
|
"data-testid": E.value,
|
|
3658
3658
|
expandable: "",
|
|
@@ -3660,7 +3660,7 @@ const Ao = {
|
|
|
3660
3660
|
}, {
|
|
3661
3661
|
itemTitle: b(() => [
|
|
3662
3662
|
B("span", vl, [
|
|
3663
|
-
Y(
|
|
3663
|
+
Y(F(E.label) + " ", 1),
|
|
3664
3664
|
Le(B("span", bl, null, 512), [
|
|
3665
3665
|
[qe, r.value.includes(E.value)]
|
|
3666
3666
|
])
|
|
@@ -3673,8 +3673,8 @@ const Ao = {
|
|
|
3673
3673
|
B("label", {
|
|
3674
3674
|
class: "menu-item-label",
|
|
3675
3675
|
for: d(E.value)
|
|
3676
|
-
},
|
|
3677
|
-
((M = (N = e.config.schema) == null ? void 0 : N[E.value]) == null ? void 0 : M.type) === "select" ? (g(),
|
|
3676
|
+
}, F(k(a)("filter.fieldLabel")), 9, Cl),
|
|
3677
|
+
((M = (N = e.config.schema) == null ? void 0 : N[E.value]) == null ? void 0 : M.type) === "select" ? (g(), K(A, {
|
|
3678
3678
|
key: 0,
|
|
3679
3679
|
id: d(E.value),
|
|
3680
3680
|
modelValue: o.value[E.value],
|
|
@@ -3682,7 +3682,7 @@ const Ao = {
|
|
|
3682
3682
|
appearance: "select",
|
|
3683
3683
|
items: u(E.value),
|
|
3684
3684
|
placeholder: k(a)("filter.selectPlaceholder")
|
|
3685
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (g(),
|
|
3685
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (g(), K(f, {
|
|
3686
3686
|
key: 1,
|
|
3687
3687
|
id: d(E.value),
|
|
3688
3688
|
modelValue: o.value[E.value],
|
|
@@ -3701,7 +3701,7 @@ const Ao = {
|
|
|
3701
3701
|
onClick: h[0] || (h[0] = (L) => C(!0))
|
|
3702
3702
|
}, {
|
|
3703
3703
|
default: b(() => [
|
|
3704
|
-
Y(
|
|
3704
|
+
Y(F(k(a)("filter.applyButtonText")), 1)
|
|
3705
3705
|
]),
|
|
3706
3706
|
_: 1
|
|
3707
3707
|
}),
|
|
@@ -3712,7 +3712,7 @@ const Ao = {
|
|
|
3712
3712
|
onClick: (L) => y(E.value)
|
|
3713
3713
|
}, {
|
|
3714
3714
|
default: b(() => [
|
|
3715
|
-
Y(
|
|
3715
|
+
Y(F(k(a)("filter.clearButtonText")), 1)
|
|
3716
3716
|
]),
|
|
3717
3717
|
_: 2
|
|
3718
3718
|
}, 1032, ["onClick"])
|
|
@@ -3725,7 +3725,7 @@ const Ao = {
|
|
|
3725
3725
|
actionButton: b(() => [
|
|
3726
3726
|
T(v, { onClick: w }, {
|
|
3727
3727
|
default: b(() => [
|
|
3728
|
-
Y(
|
|
3728
|
+
Y(F(k(a)("filter.clearAllButtonText")), 1)
|
|
3729
3729
|
]),
|
|
3730
3730
|
_: 1
|
|
3731
3731
|
})
|
|
@@ -3810,10 +3810,10 @@ const Ao = {
|
|
|
3810
3810
|
key: 0,
|
|
3811
3811
|
class: Ie(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
3812
3812
|
}, [
|
|
3813
|
-
e.title ? (g(), _("h4", Al,
|
|
3813
|
+
e.title ? (g(), _("h4", Al, F(e.title), 1)) : V("", !0),
|
|
3814
3814
|
e.description || k(n).description ? (g(), _("div", xl, [
|
|
3815
3815
|
z(t.$slots, "description", {}, () => [
|
|
3816
|
-
B("p", null,
|
|
3816
|
+
B("p", null, F(e.description), 1)
|
|
3817
3817
|
], !0)
|
|
3818
3818
|
])) : V("", !0),
|
|
3819
3819
|
k(n).footer ? (g(), _("div", Tl, [
|
|
@@ -3826,7 +3826,7 @@ const Ao = {
|
|
|
3826
3826
|
])
|
|
3827
3827
|
], 2));
|
|
3828
3828
|
}
|
|
3829
|
-
}), Ol = /* @__PURE__ */ fe($l, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Pn, useDeleteUrlBuilder: Ml, useErrors:
|
|
3829
|
+
}), Ol = /* @__PURE__ */ fe($l, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Pn, useDeleteUrlBuilder: Ml, useErrors: Fl, useFetchUrlBuilder: Hl, useFetcher: Kl, useDebouncedFilter: Yl, useStringHelpers: Jl, useHelpers: Wl, useGatewayFeatureSupported: Gl, useTruncationDetector: Zl } = ae;
|
|
3830
3830
|
const El = { class: "kong-ui-entities-key-sets-list" }, Bl = { key: 1 }, Nl = /* @__PURE__ */ te({
|
|
3831
3831
|
__name: "KeySetList",
|
|
3832
3832
|
props: {
|
|
@@ -3892,7 +3892,7 @@ const El = { class: "kong-ui-entities-key-sets-list" }, Bl = { key: 1 }, Nl = /*
|
|
|
3892
3892
|
fields: R,
|
|
3893
3893
|
schema: t.config.filterSchema
|
|
3894
3894
|
};
|
|
3895
|
-
}), { fetcher: y, fetcherState: w } =
|
|
3895
|
+
}), { fetcher: y, fetcherState: w } = Kl(t.config, d.value), C = () => {
|
|
3896
3896
|
u.value = "";
|
|
3897
3897
|
}, p = () => {
|
|
3898
3898
|
r.value++;
|
|
@@ -4011,7 +4011,7 @@ const El = { class: "kong-ui-entities-key-sets-list" }, Bl = { key: 1 }, Nl = /*
|
|
|
4011
4011
|
to: e.config.createRoute
|
|
4012
4012
|
}, {
|
|
4013
4013
|
default: b(() => [
|
|
4014
|
-
Y(
|
|
4014
|
+
Y(F(k(a)("keySets.list.toolbar_actions.new_key_set")), 1)
|
|
4015
4015
|
]),
|
|
4016
4016
|
_: 1
|
|
4017
4017
|
}, 8, ["to"])
|
|
@@ -4020,18 +4020,18 @@ const El = { class: "kong-ui-entities-key-sets-list" }, Bl = { key: 1 }, Nl = /*
|
|
|
4020
4020
|
}, 8, ["auth-function"])
|
|
4021
4021
|
]),
|
|
4022
4022
|
name: b(({ rowValue: G }) => [
|
|
4023
|
-
B("b", null,
|
|
4023
|
+
B("b", null, F(G ?? "-"), 1)
|
|
4024
4024
|
]),
|
|
4025
4025
|
tags: b(({ rowValue: G }) => [
|
|
4026
|
-
(G == null ? void 0 : G.length) > 0 ? (g(),
|
|
4026
|
+
(G == null ? void 0 : G.length) > 0 ? (g(), K(Dn, { key: 0 }, {
|
|
4027
4027
|
default: b(() => [
|
|
4028
|
-
(g(!0), _(pe, null, ue(G, (me) => (g(),
|
|
4028
|
+
(g(!0), _(pe, null, ue(G, (me) => (g(), K(ke, {
|
|
4029
4029
|
key: me,
|
|
4030
4030
|
onClick: R[1] || (R[1] = Pe(() => {
|
|
4031
4031
|
}, ["stop"]))
|
|
4032
4032
|
}, {
|
|
4033
4033
|
default: b(() => [
|
|
4034
|
-
Y(
|
|
4034
|
+
Y(F(me), 1)
|
|
4035
4035
|
]),
|
|
4036
4036
|
_: 2
|
|
4037
4037
|
}, 1024))), 128))
|
|
@@ -4054,7 +4054,7 @@ const El = { class: "kong-ui-entities-key-sets-list" }, Bl = { key: 1 }, Nl = /*
|
|
|
4054
4054
|
onClick: (We) => f(G, me)
|
|
4055
4055
|
}, {
|
|
4056
4056
|
default: b(() => [
|
|
4057
|
-
Y(
|
|
4057
|
+
Y(F(k(a)("keySets.actions.copy_id")), 1)
|
|
4058
4058
|
]),
|
|
4059
4059
|
_: 2
|
|
4060
4060
|
}, 1032, ["onClick"])
|
|
@@ -4068,7 +4068,7 @@ const El = { class: "kong-ui-entities-key-sets-list" }, Bl = { key: 1 }, Nl = /*
|
|
|
4068
4068
|
onClick: (We) => v(G, me)
|
|
4069
4069
|
}, {
|
|
4070
4070
|
default: b(() => [
|
|
4071
|
-
Y(
|
|
4071
|
+
Y(F(k(a)("keySets.actions.copy_json")), 1)
|
|
4072
4072
|
]),
|
|
4073
4073
|
_: 2
|
|
4074
4074
|
}, 1032, ["onClick"])
|
|
@@ -4109,7 +4109,7 @@ const El = { class: "kong-ui-entities-key-sets-list" }, Bl = { key: 1 }, Nl = /*
|
|
|
4109
4109
|
onClick: (me) => X(G)
|
|
4110
4110
|
}, {
|
|
4111
4111
|
default: b(() => [
|
|
4112
|
-
Y(
|
|
4112
|
+
Y(F(k(a)("keySets.actions.delete")), 1)
|
|
4113
4113
|
]),
|
|
4114
4114
|
_: 2
|
|
4115
4115
|
}, 1032, ["onClick"])
|
|
@@ -4158,7 +4158,7 @@ const Rn = (e, n) => {
|
|
|
4158
4158
|
emits: ["update", "error", "loading"],
|
|
4159
4159
|
setup(e, { emit: n }) {
|
|
4160
4160
|
var p;
|
|
4161
|
-
const t = e, a = st(), { i18n: { t: i } } = ut.useI18n(), { getMessageFromError: o } =
|
|
4161
|
+
const t = e, a = st(), { i18n: { t: i } } = ut.useI18n(), { getMessageFromError: o } = Fl(), { axiosInstance: r } = Pn({
|
|
4162
4162
|
headers: (p = t.config) == null ? void 0 : p.requestHeaders
|
|
4163
4163
|
}), l = x(() => Re.form[t.config.app].edit), s = x(() => t.keySetId ? tt.Edit : tt.Create), c = Ct({
|
|
4164
4164
|
fields: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(G,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong-ui-public/i18n"),require("axios"),require("@kong/kongponents")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong-ui-public/i18n","axios","@kong/kongponents"],e):(G=typeof globalThis<"u"?globalThis:G||self,e(G["kong-ui-public-entities-key-sets"]={},G.Vue,G.VueRouter,G["kong-ui-public-i18n"],G.axios,G.Kongponents))})(this,function(G,e,_t,ut,yn,gn){"use strict";const hn={keySets:{title:"Key Sets",list:{toolbar_actions:{new_key_set:"New Key Set"},table_headers:{name:"Name",id:"ID",tags:"Tags"},empty_state:{title:"Configure a New Key Set",description:"A Key Set object holds a collection of asymmetric key objects. This entity allows to logically group keys by their purpose."}},actions:{create:"New Key Set",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact name or ID"},delete:{title:"Delete a Key Set",description:"Deleting this key set will also delete keys associated. This action cannot be reversed so make sure to check the key set usage before deleting."},errors:{general:"Key sets could not be retrieved",delete:"The key set could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{sections:{general:{title:"General Information",description:"General information will help identify and manage this key set."}},fields:{name:{label:"Name",placeholder:"Enter a unique name for this key set"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}}}};function kn(){const t=ut.createI18n("en-us",hn);return{i18n:t,i18nT:ut.i18nTComponent(t)}}const At={useI18n:kn},bt={list:{konnect:"/api/runtime_groups/{controlPlaneId}/key-sets",kongManager:"/{workspace}/key-sets"},form:{konnect:{create:"/api/runtime_groups/{controlPlaneId}/key-sets",edit:"/api/runtime_groups/{controlPlaneId}/key-sets/{id}"},kongManager:{create:"/{workspace}/key-sets",edit:"/{workspace}/key-sets/{id}"}}};var Wt=(t=>(t.GatewayService="service",t.Route="route",t.Consumer="consumer",t.ConsumerGroup="consumer group",t.Plugin="plugin",t.Upstream="upstream",t.Certificate="certificate",t.CACertificate="ca certificate",t.SNI="SNI",t.Key="key",t.KeySet="key set",t.Vault="vault",t.Application="application",t.Developer="developer",t.acls="ACL Credential",t["basic-auth"]="Basic Auth Credential",t["key-auth"]="Key Auth Credential",t["key-auth-enc"]="Key Auth Encrypted Credential",t.oauth2="OAuth 2.0 Credential",t["hmac-auth"]="HMAC Credential",t.jwt="JWT Credential",t.Target="target",t.Policy="policy",t))(Wt||{}),Et=(t=>(t.Edit="edit",t.Create="create",t))(Et||{}),at=(t=>(t[t.Loading=0]="Loading",t[t.Idle=1]="Idle",t[t.NoResults=2]="NoResults",t[t.Error=3]="Error",t))(at||{}),F=(t=>(t.ID="id",t.IdArray="id-array",t.Text="plain-text",t.Date="date",t.Redacted="redacted",t.RedactedArray="redacted-array",t.Json="json",t.JsonArray="json-array",t.BadgeTag="badge-tag",t.BadgeStatus="badge-status",t.BadgeMethod="badge-method",t.LinkInternal="link-internal",t.LinkExternal="link-external",t))(F||{}),Z=(t=>(t.Basic="basic",t.Advanced="advanced",t.Plugin="plugin",t))(Z||{});function Tt(t={}){return{axiosInstance:yn.create({withCredentials:!0,timeout:3e4,...t})}}function bn(){return{debounce:(t,o)=>{let n;return(...a)=>{clearTimeout(n),n=window==null?void 0:window.setTimeout(()=>{t(...a)},o)}}}}const Vt="khcp-user-table-preferences",Cn={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function wn(){const t=n=>{if(typeof n=="string")try{return JSON.parse(n)}catch(a){console.error("useTablePreferences(tryParseJson)",a);return}},o=()=>{const n=t(localStorage.getItem(Vt));return!n||!Object.keys(n).length?new Map:new Map(Object.entries(n))};return{setTablePreferences:(n,a)=>{try{const r=o();r.set(n,a),localStorage.setItem(Vt,JSON.stringify(Object.fromEntries(r.entries())))}catch(r){console.error("useTablePreferences(setTablePreferences)",r)}},getTablePreferences:n=>{const a=o();return(a==null?void 0:a.get(n))||void 0||Cn},deleteAllTablePreferences:()=>{localStorage.removeItem(Vt)}}}const Sn={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},xn={actions:{save:"Save",cancel:"Cancel",back:"Back"},errors:{edit:"The entity could not be edited at this time."}},Bn={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},In={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"}},Nn={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},_n={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},An={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},En={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"}},Tn={deleteModal:Sn,baseForm:xn,baseTable:Bn,baseConfigCard:In,filter:Nn,debouncedFilter:_n,errors:An,toggleModal:En};function jt(){const t=ut.createI18n("en-us",Tn);return{i18n:t,i18nT:ut.i18nTComponent(t)}}function Vn(t,o,n,a={fetchedItemsKey:"data",searchKeys:["id"]}){n||(n="100");const{axiosInstance:r}=Tt({headers:t.requestHeaders}),{i18n:{t:l}}=jt(),{debounce:i}=bn(),s=i(async m=>{await h(m)},200),c=e.ref(!1),d=e.ref(""),u=e.ref(""),p=e.ref([]),g=e.ref(void 0),y=e.unref(o);let C=`${t.apiBaseUrl}${y}`;t.app==="konnect"?C=C.replace(/{controlPlaneId}/gi,(t==null?void 0:t.controlPlaneId)||""):t.app==="kongManager"&&(C=C.replace(/\/{workspace}/gi,t!=null&&t.workspace?`/${t.workspace}`:""));const b=async()=>{try{c.value=!0;const{data:m}=await r.get(`${C}?size=${n}`);m!=null&&m.next||(g.value=a.fetchedItemsKey in m?m[a.fetchedItemsKey]:[]),p.value=a.fetchedItemsKey in m?m[a.fetchedItemsKey]:[]}catch{p.value=[],d.value=l("debouncedFilter.errors.fetch")}finally{c.value=!1}},f=e.ref(""),h=async m=>{var k,x;if(f.value!==m)if(f.value=m||"",g.value===void 0)try{c.value=!0,d.value="",u.value="";let E=C+"";m&&(E+=`/${m}`);const{data:j}=await r.get(`${E}?size=${n}`);a.fetchedItemsKey in j?p.value=j[a.fetchedItemsKey]:j!=null&&j.id?p.value=[j]:p.value=[]}catch(E){((k=E==null?void 0:E.response)==null?void 0:k.status)===404?u.value=l("debouncedFilter.errors.invalid"):(p.value=[],d.value=l("debouncedFilter.errors.fetch"))}finally{c.value=!1}else c.value=!0,u.value="",m?(p.value=(x=g.value)==null?void 0:x.filter(E=>{var j;let N=!1;for(const w of a.searchKeys){const _=typeof E[w]=="string"?(j=E[w])==null?void 0:j.toLowerCase():E[w];_!=null&&_.includes(m.toLowerCase())&&(N=!0)}return N}),(!p.value||!p.value.length)&&(u.value=l("debouncedFilter.errors.invalid"))):p.value=g.value,c.value=!1};return{loading:c,error:d,validationError:u,results:p,allRecords:g,loadItems:b,debouncedQueryChange:s}}function jn(t,o){const n=e.unref(o),a=e.computed(()=>t.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${n}`):new URL(n));return a.value.search="",r=>`${a.value.href}/${r}`}function $n(){const{i18n:{t}}=jt();return{getMessageFromError:o=>{var n,a,r;if(!o)return t("errors.unexpected");if((n=o==null?void 0:o.response)!=null&&n.data){if(o.response.data.detail)return o.response.data.detail;if((a=o.response.data.details)!=null&&a.length)return o.response.data.details.map(l=>{let i=t("errors.unexpected");return l.messages&&typeof l.messages=="object"&&l.messages.length&&(i=l.messages.join(", ")),l.field?`${l.field} - ${i}`:i}).join("; ");if(o.response.data.message){const{message:l}=o.response.data;return Array.isArray(l)?(r=l[0])!=null&&r.constraints?Object.values(l[0].constraints)[0]:l[0]:l}if(typeof o.response.data=="string")return o.response.data;if(typeof o.response.data=="object")return Object.keys(o.response.data).map(l=>`${l} ${o.response.data[l]}`).join(", ")}return o.message||t("errors.unexpected")}}}function Gt(t,o){const n=e.ref(e.unref(t)),a=e.ref(e.unref(o)),r=e.computed(()=>!!(n.value.app==="konnect"||n.value.isExactMatch)),l=e.computed(()=>a.value.startsWith("/")?new URL(`${window.location.origin}${a.value}`):new URL(a.value));return i=>{const{page:s,pageSize:c,offset:d,sortColumnKey:u,sortColumnOrder:p,query:g}=i;try{let y=new URL(l.value.href);return r.value&&g?(y.search="",y=new URL(`${y.href}/${g}/`)):(r.value||new URLSearchParams(g).forEach((C,b)=>{y.searchParams.append(b,C)}),u&&y.searchParams.append("sort_by",u),p==="desc"&&y.searchParams.append("sort_desc","1"),y.searchParams.append("size",String(c))),d&&s!==1&&y.searchParams.append("offset",String(d)),y.href}catch(y){return console.error("RouteList(fetcher)",y),a.value}}}function On(t,o,n="data"){const a=e.unref(o),{axiosInstance:r}=Tt({headers:t.requestHeaders}),l=Gt(t,a),i=e.ref({status:at.Idle});return{fetcher:async s=>{try{i.value={status:at.Loading};const c=l(s),{data:d}=await r.get(c),u=n&&n.replace(/[^\w-_]/gi,"");let p;d[u]&&Array.isArray(d[u])?p=d[u]:p=Object.keys(d).length?[d]:[];const g={data:p,total:p.length,...d.offset?{pagination:{offset:d.offset}}:null};return i.value={status:at.Idle,response:g},g}catch(c){const d={data:[],total:0};return s.query&&c.response.status===404?(i.value={status:at.NoResults,response:d,error:c},d):(i.value={status:at.Error,response:d,error:c},d)}},fetcherState:i}}function Fn(){return{getPropValue:(t,o)=>(o==null?void 0:o[t])??void 0}}function Mn(){return{convertKeyToTitle:(t,o="_")=>t?t.split(o).map(n=>n.toLowerCase()==="id"?n.toUpperCase():n.charAt(0).toUpperCase()+n.substring(1)).join(" "):""}}const Zt=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Qt=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");const o=t.match(Zt);if(!o)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return o.shift(),o},Xt=t=>t==="*"||t==="x"||t==="X",te=t=>{const o=parseInt(t,10);return isNaN(o)?t:o},Kn=(t,o)=>typeof t!=typeof o?[String(t),String(o)]:[t,o],Dn=(t,o)=>{if(Xt(t)||Xt(o))return 0;const[n,a]=Kn(te(t),te(o));return n>a?1:n<a?-1:0},ee=(t,o)=>{for(let n=0;n<Math.max(t.length,o.length);n++){const a=Dn(t[n]||"0",o[n]||"0");if(a!==0)return a}return 0},Ln=(t,o)=>{const n=Qt(t),a=Qt(o),r=n.pop(),l=a.pop(),i=ee(n,a);return i!==0?i:r&&l?ee(r.split("."),l.split(".")):r||l?r?-1:1:0},ne=(t,o,n)=>{qn(n);const a=Ln(t,o);return oe[n].includes(a)},oe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ae=Object.keys(oe),qn=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(ae.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${ae.join("|")}`)},Pn=t=>typeof t=="string"&&/^[v\d]/.test(t)&&Zt.test(t);function Rn(t){const{gatewayInfo:o,supportedRange:n}=t;if(!o)return!0;const{edition:a,version:r}=o;if(!Pn(r))return console.error("Invalid version"),!1;const l=n[a];if(!l)return!1;const[i,s]=l;return!(i&&ne(r,i,"<")||s&&ne(r,s,">"))}function Un(t){const o=e.ref(0),n=e.ref(0),a=e.ref(!1);return e.watch(t,r=>{r&&!a.value&&(o.value=r.offsetWidth,n.value=r.scrollWidth,a.value=!0)}),{isTruncated:e.computed(()=>o.value<n.value)}}const R={useAxios:Tt,useDebouncedFilter:Vn,useDeleteUrlBuilder:jn,useErrors:$n,useFetcher:On,useFetchUrlBuilder:Gt,useHelpers:Fn,useStringHelpers:Mn,useI18n:jt,useGatewayFeatureSupported:Rn,useTruncationDetector:Un},vn={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},zn="Copy to clipboard",Hn={message:vn,iconTitle:zn},Yn="kong-ui-copy-uuid-notify",Jn={class:"kong-ui-copy-uuid"},Wn=["onClick"],re=15,Gn=e.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},idTooltip:{type:String,default:""},truncated:{type:Boolean,default:!0},useMono:{type:Boolean,default:!0},notify:{type:Function,default:void 0},iconColor:{type:String,default:"rgba(0, 0, 0, 0.45)"},tooltip:{type:String,default:""},successTooltip:{type:String,default:""},format:{type:String,required:!1,default:"uuid",validator:t=>["uuid","hidden","redacted","deleted"].includes(t)}},emits:["success","error"],setup(t,{emit:o}){const n=t,{t:a}=ut.createI18n("en-us",Hn),r=n.notify||e.inject(Yn,()=>{}),l=e.computed(()=>n.idTooltip?{label:n.idTooltip,positionFixed:!0,placement:"bottomStart"}:{title:n.uuid}),i=e.computed(()=>!!(n.tooltip&&n.successTooltip)),s=e.ref(n.tooltip),c=e.computed(()=>n.tooltip?{label:s.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),d=e.computed(()=>n.format==="redacted"?"*****":n.format==="deleted"?`*${n.uuid.substring(0,5)}`:n.uuid),u=g=>{s.value=g,setTimeout(()=>{s.value=n.tooltip},1800)},p=g=>{if(!g(n.uuid)){typeof r=="function"&&r({type:"error",message:a("message.fail")}),i.value?u(a("message.fail")):o("error",n.uuid);return}const y=n.uuid.length>re,C=n.format==="hidden"||n.format==="redacted"?a("message.success.prefix"):`"${n.uuid.substring(0,re)+(y?"...":"")}"`;typeof r=="function"&&r({type:"success",message:`${C}${a("message.success.content")}`}),i.value?u(n.successTooltip):o("success",n.uuid)};return(g,y)=>{const C=e.resolveComponent("KIcon"),b=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Jn,[t.format!=="hidden"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.idTooltip?"KTooltip":"div"),e.mergeProps({key:0},l.value,{"data-testid":"copy-id"}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["uuid-container",t.truncated?"truncated-uuid":null,t.useMono?"mono":null])},e.toDisplayString(d.value),3)]),_:1},16)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tooltip?"KTooltip":"div"),e.mergeProps(c.value,{class:"uuid-icon-wrapper"}),{default:e.withCtx(()=>[e.createVNode(b,null,{default:e.withCtx(({copyToClipboard:f})=>[e.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:e.withModifiers(h=>p(f),["stop"])},[e.createVNode(C,{class:"uuid-icon",color:t.iconColor,"hide-title":!!t.tooltip||void 0,icon:"copy",size:"16",title:e.unref(a)("iconTitle")},null,8,["color","hide-title","title"])],8,Wn)]),_:1})]),_:1},16))])}}}),Zn=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},ie=Zn(Gn,[["__scopeId","data-v-bfdaf6f7"]]),Qn={key:0,class:"config-card-fieldset-title"},Xn=e.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(t){const o=t,{i18n:{t:n}}=R.useI18n(),{convertKeyToTitle:a}=R.useStringHelpers(),r=e.computed(()=>o.item.key??"json-array-item"),l=e.computed(()=>o.item.value??o.item),i=e.computed(()=>{const c=JSON.parse(JSON.stringify(l.value));return o.isArrayItem&&delete c.name,c}),s=e.computed(()=>{var c;return o.isArrayItem?(c=l.value)!=null&&c.name?a(l.value.name,"_"):n("baseConfigCard.general.entryTitle",{index:o.index}):""});return(c,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.isArrayItem?"fieldset":"div"),{class:e.normalizeClass(t.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:e.withCtx(()=>[t.isArrayItem?(e.openBlock(),e.createElementBlock("legend",Qn,[e.createElementVNode("b",null,e.toDisplayString(s.value),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(i.value),(u,p)=>(e.openBlock(),e.createBlock($t,{key:`${r.value}-property-${p}`,item:{key:u,label:e.unref(a)(u),value:i.value[u]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),Q=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},le=Q(Xn,[["__scopeId","data-v-68ca83ec"]]),to=Q(e.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(t){const{i18n:{t:o}}=R.useI18n();return(n,a)=>{const r=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(r,{appearance:"btn-link",class:"navigation-button",onClick:a[0]||(a[0]=l=>n.$emit("navigation-click",t.item))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.value||e.unref(o)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-7410504d"]]),eo=e.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(t){const{i18n:{t:o}}=R.useI18n();return(n,a)=>{const r=e.resolveComponent("KBadge");return e.openBlock(),e.createBlock(r,{appearance:t.status?"success":"neutral"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.status?e.unref(o)("baseConfigCard.statusBadge.enabledLabel"):e.unref(o)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),no="#0044f4",oo="#e0e4ea",ao="#3a3f51",ro="1px",io="20px",lo={class:"config-card-details-row"},so=["data-testid"],co=["data-testid"],po=["data-testid"],uo=["data-testid"],fo={key:1},mo=["data-testid"],yo=["data-testid"],go=["data-testid"],ho=["data-testid"],ko={name:"ConfigCardItem",components:{CopyUuid:ie,JsonCardItem:le,StatusBadge:eo,InternalLinkItem:to}},bo=e.defineComponent({...ko,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(t,{emit:o}){const n=t;e.useCssVars(y=>({"91cfb9a4":d.value?"none":`solid ${e.unref(ro)} ${e.unref(oo)}`,c3d73f3e:c.value&&i.value?"block":"flex","7fb21e42":c.value&&i.value?"100%":n.slim?"50%":"25%","7fad928c":c.value&&i.value?"100%":n.slim?"50%":"75%"}));const a=e.useSlots(),{i18n:{t:r,formatUnixTimeStamp:l}}=R.useI18n(),i=e.computed(()=>n.item.value!==void 0&&n.item.value!==null&&n.item.value!==""),s=e.computed(()=>!!(n.item.tooltip||a["label-tooltip"])),c=e.computed(()=>n.item.type===F.Json||n.item.type===F.JsonArray),d=e.computed(()=>n.item.type===F.JsonArray),u=e.computed(()=>{switch(n.item.type){case F.ID:return{tag:"CopyUuid",attrs:{"data-testid":`${n.item.key}-copy-uuid`,"success-tooltip":r("baseConfigCard.copy.success"),tooltip:r("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,uuid:n.item.value,notify:()=>{}}};case F.IdArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{"success-tooltip":r("baseConfigCard.copy.success"),tooltip:r("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,notify:()=>{}}};case F.Redacted:return{tag:"CopyUuid",attrs:{"data-testid":`${n.item.key}-copy-uuid-redacted`,format:"redacted","success-tooltip":r("baseConfigCard.copy.success"),tooltip:r("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,uuid:n.item.value,notify:()=>{}}};case F.RedactedArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{format:"redacted","success-tooltip":r("baseConfigCard.copy.success"),tooltip:r("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,notify:()=>{}}};case F.Date:return{tag:"div",attrs:{"data-testid":`${n.item.key}-date`},text:l(n.item.value)};case F.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${n.item.key}-badge-status`,status:n.item.value}};case F.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case F.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case F.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${n.item.key}-internal-link`,item:n.item,onNavigationClick:y=>{o("navigation-click",y)}}};case F.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${n.item.key}-external-link`,href:n.item.value},text:n.item.value};case F.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${n.item.key}-json-content`,item:n.item}};case F.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${n.item.key}-json-array-content`,item:n.item}};default:return{tag:"KTooltip",attrs:{"data-testid":`${n.item.key}-plain-text`},text:n.item.value}}}),p=e.ref(),{isTruncated:g}=R.useTruncationDetector(p);return(y,C)=>{const b=e.resolveComponent("KLabel"),f=e.resolveComponent("KBadge"),h=e.resolveComponent("KMethodBadge"),m=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("div",lo,[e.createElementVNode("div",{class:"config-card-details-label","data-testid":`${t.item.key}-label`},[e.renderSlot(y.$slots,"label",{item:t.item},()=>[e.createVNode(b,{"tooltip-attributes":{maxWidth:"500px"}},e.createSlots({default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.label)+" ",1)]),_:2},[s.value?{name:"tooltip",fn:e.withCtx(()=>[e.createElementVNode("div",{"data-testid":`${t.item.key}-label-tooltip`},[e.renderSlot(y.$slots,"label-tooltip",{},()=>[e.createTextVNode(e.toDisplayString(t.item.tooltip),1)],!0)],8,co)]),key:"0"}:void 0]),1024)],!0)],8,so),e.createElementVNode("div",{class:"config-card-details-value","data-testid":`${t.item.key}-property-value`},[e.renderSlot(y.$slots,t.item.key,{rowValue:t.item.value},()=>[i.value?(e.openBlock(),e.createElementBlock("div",fo,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value.tag),e.normalizeProps(e.guardReactiveProps(u.value.attrs)),{default:e.withCtx(()=>[u.value.additionalComponent==="KBadge"?(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-badge-tags`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(k,x)=>(e.openBlock(),e.createBlock(f,{key:`${t.item.key}-badge-tag-${x}`,class:"config-badge","data-testid":`${t.item.key}-badge-tag-${x}`,"truncation-tooltip":k},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))],8,mo)):e.createCommentVNode("",!0),u.value.additionalComponent==="CopyUuid"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${t.item.key}-copy-uuid-array`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(k,x)=>(e.openBlock(),e.createBlock(e.unref(ie),e.mergeProps(u.value.childAttrs,{key:`${t.item.key}-copy-uuid-${x}`,"data-testid":`${t.item.key}-copy-uuid-${x}`,uuid:k}),null,16,["data-testid","uuid"]))),128))],8,yo)):u.value.additionalComponent==="KMethodBadge"?(e.openBlock(),e.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${t.item.key}-badge-methods`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(k,x)=>(e.openBlock(),e.createBlock(h,{key:`${t.item.key}-badge-method-${x}`,class:"config-badge","data-testid":`${t.item.key}-badge-method-${x}`,"is-rounded":"",label:k,method:e.unref(gn.MethodsArray).includes(k.toLowerCase())?k.toLowerCase():"custom"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k),1)]),_:2},1032,["data-testid","label","method"]))),128))],8,go)):e.createCommentVNode("",!0),u.value.additionalComponent==="JsonCardItem"?(e.openBlock(),e.createElementBlock("div",{key:3,"data-testid":`${n.item.key}-json-array-content`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(k,x)=>(e.openBlock(),e.createBlock(le,{key:`json-array-item-${x}`,index:x,"is-array-item":"",item:k},null,8,["index","item"]))),128))],8,ho)):(e.openBlock(),e.createBlock(m,{key:4,label:e.unref(g)?t.item.value:""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"textContent",ref:p,class:e.normalizeClass(["attrs-data-text",{truncated:t.truncated}])},e.toDisplayString(u.value.text),3)]),_:1},8,["label"]))]),_:1},16))])):(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-no-value`}," – ",8,uo))],!0)],8,po)])}}}),$t=Q(bo,[["__scopeId","data-v-75064b1c"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function se(t){return typeof t>"u"||t===null}function Co(t){return typeof t=="object"&&t!==null}function wo(t){return Array.isArray(t)?t:se(t)?[]:[t]}function So(t,o){var n,a,r,l;if(o)for(l=Object.keys(o),n=0,a=l.length;n<a;n+=1)r=l[n],t[r]=o[r];return t}function xo(t,o){var n="",a;for(a=0;a<o;a+=1)n+=t;return n}function Bo(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var Io=se,No=Co,_o=wo,Ao=xo,Eo=Bo,To=So,q={isNothing:Io,isObject:No,toArray:_o,repeat:Ao,isNegativeZero:Eo,extend:To};function ce(t,o){var n="",a=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(n+='in "'+t.mark.name+'" '),n+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!o&&t.mark.snippet&&(n+=`
|
|
1
|
+
(function(G,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong-ui-public/i18n"),require("axios"),require("@kong/kongponents")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong-ui-public/i18n","axios","@kong/kongponents"],e):(G=typeof globalThis<"u"?globalThis:G||self,e(G["kong-ui-public-entities-key-sets"]={},G.Vue,G.VueRouter,G["kong-ui-public-i18n"],G.axios,G.Kongponents))})(this,function(G,e,_t,ut,yn,gn){"use strict";const hn={keySets:{title:"Key Sets",list:{toolbar_actions:{new_key_set:"New Key Set"},table_headers:{name:"Name",id:"ID",tags:"Tags"},empty_state:{title:"Configure a New Key Set",description:"A Key Set object holds a collection of asymmetric key objects. This entity allows to logically group keys by their purpose."}},actions:{create:"New Key Set",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact name or ID"},delete:{title:"Delete a Key Set",description:"Deleting this key set will also delete keys associated. This action cannot be reversed so make sure to check the key set usage before deleting."},errors:{general:"Key sets could not be retrieved",delete:"The key set could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{sections:{general:{title:"General Information",description:"General information will help identify and manage this key set."}},fields:{name:{label:"Name",placeholder:"Enter a unique name for this key set"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}}}};function kn(){const t=ut.createI18n("en-us",hn);return{i18n:t,i18nT:ut.i18nTComponent(t)}}const At={useI18n:kn},bt={list:{konnect:"/api/runtime_groups/{controlPlaneId}/key-sets",kongManager:"/{workspace}/key-sets"},form:{konnect:{create:"/api/runtime_groups/{controlPlaneId}/key-sets",edit:"/api/runtime_groups/{controlPlaneId}/key-sets/{id}"},kongManager:{create:"/{workspace}/key-sets",edit:"/{workspace}/key-sets/{id}"}}};var Wt=(t=>(t.GatewayService="service",t.Route="route",t.Consumer="consumer",t.ConsumerGroup="consumer group",t.Plugin="plugin",t.Upstream="upstream",t.Certificate="certificate",t.CACertificate="ca certificate",t.SNI="SNI",t.Key="key",t.KeySet="key set",t.Vault="vault",t.Application="application",t.Developer="developer",t.acls="ACL Credential",t["basic-auth"]="Basic Auth Credential",t["key-auth"]="Key Auth Credential",t["key-auth-enc"]="Key Auth Encrypted Credential",t.oauth2="OAuth 2.0 Credential",t["hmac-auth"]="HMAC Credential",t.jwt="JWT Credential",t.Target="target",t.Policy="policy",t))(Wt||{}),Et=(t=>(t.Edit="edit",t.Create="create",t))(Et||{}),at=(t=>(t[t.Loading=0]="Loading",t[t.Idle=1]="Idle",t[t.NoResults=2]="NoResults",t[t.Error=3]="Error",t))(at||{}),F=(t=>(t.ID="id",t.IdArray="id-array",t.Text="plain-text",t.Date="date",t.Redacted="redacted",t.RedactedArray="redacted-array",t.Json="json",t.JsonArray="json-array",t.BadgeTag="badge-tag",t.BadgeStatus="badge-status",t.BadgeMethod="badge-method",t.LinkInternal="link-internal",t.LinkExternal="link-external",t))(F||{}),Z=(t=>(t.Basic="basic",t.Advanced="advanced",t.Plugin="plugin",t))(Z||{});function Tt(t={}){return{axiosInstance:yn.create({withCredentials:!0,timeout:3e4,...t})}}function bn(){return{debounce:(t,o)=>{let n;return(...a)=>{clearTimeout(n),n=window==null?void 0:window.setTimeout(()=>{t(...a)},o)}}}}const Vt="khcp-user-table-preferences",Cn={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function wn(){const t=n=>{if(typeof n=="string")try{return JSON.parse(n)}catch(a){console.error("useTablePreferences(tryParseJson)",a);return}},o=()=>{const n=t(localStorage.getItem(Vt));return!n||!Object.keys(n).length?new Map:new Map(Object.entries(n))};return{setTablePreferences:(n,a)=>{try{const r=o();r.set(n,a),localStorage.setItem(Vt,JSON.stringify(Object.fromEntries(r.entries())))}catch(r){console.error("useTablePreferences(setTablePreferences)",r)}},getTablePreferences:n=>{const a=o();return(a==null?void 0:a.get(n))||void 0||Cn},deleteAllTablePreferences:()=>{localStorage.removeItem(Vt)}}}const Sn={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},xn={actions:{save:"Save",cancel:"Cancel",back:"Back"},errors:{edit:"The entity could not be edited at this time."}},Bn={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},In={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"}},Nn={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},_n={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},An={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},En={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"}},Tn={deleteModal:Sn,baseForm:xn,baseTable:Bn,baseConfigCard:In,filter:Nn,debouncedFilter:_n,errors:An,toggleModal:En};function jt(){const t=ut.createI18n("en-us",Tn);return{i18n:t,i18nT:ut.i18nTComponent(t)}}function Vn(t,o,n,a={fetchedItemsKey:"data",searchKeys:["id"]}){n||(n="100");const{axiosInstance:r}=Tt({headers:t.requestHeaders}),{i18n:{t:l}}=jt(),{debounce:i}=bn(),s=i(async m=>{await h(m)},200),c=e.ref(!1),d=e.ref(""),u=e.ref(""),p=e.ref([]),g=e.ref(void 0),y=e.unref(o);let C=`${t.apiBaseUrl}${y}`;t.app==="konnect"?C=C.replace(/{controlPlaneId}/gi,(t==null?void 0:t.controlPlaneId)||""):t.app==="kongManager"&&(C=C.replace(/\/{workspace}/gi,t!=null&&t.workspace?`/${t.workspace}`:""));const b=async()=>{try{c.value=!0;const{data:m}=await r.get(`${C}?size=${n}`);m!=null&&m.next||(g.value=a.fetchedItemsKey in m?m[a.fetchedItemsKey]:[]),p.value=a.fetchedItemsKey in m?m[a.fetchedItemsKey]:[]}catch{p.value=[],d.value=l("debouncedFilter.errors.fetch")}finally{c.value=!1}},f=e.ref(""),h=async m=>{var k,x;if(f.value!==m)if(f.value=m||"",g.value===void 0)try{c.value=!0,d.value="",u.value="";let E=C+"";m&&(E+=`/${m}`);const{data:j}=await r.get(`${E}?size=${n}`);a.fetchedItemsKey in j?p.value=j[a.fetchedItemsKey]:j!=null&&j.id?p.value=[j]:p.value=[]}catch(E){((k=E==null?void 0:E.response)==null?void 0:k.status)===404?u.value=l("debouncedFilter.errors.invalid"):(p.value=[],d.value=l("debouncedFilter.errors.fetch"))}finally{c.value=!1}else c.value=!0,u.value="",m?(p.value=(x=g.value)==null?void 0:x.filter(E=>{var j;let N=!1;for(const w of a.searchKeys){const _=typeof E[w]=="string"?(j=E[w])==null?void 0:j.toLowerCase():E[w];_!=null&&_.includes(m.toLowerCase())&&(N=!0)}return N}),(!p.value||!p.value.length)&&(u.value=l("debouncedFilter.errors.invalid"))):p.value=g.value,c.value=!1};return{loading:c,error:d,validationError:u,results:p,allRecords:g,loadItems:b,debouncedQueryChange:s}}function jn(t,o){const n=e.unref(o),a=e.computed(()=>t.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${n}`):new URL(n));return a.value.search="",r=>`${a.value.href}/${r}`}function $n(){const{i18n:{t}}=jt();return{getMessageFromError:o=>{var n,a,r;if(!o)return t("errors.unexpected");if((n=o==null?void 0:o.response)!=null&&n.data){if(o.response.data.detail)return o.response.data.detail;if((a=o.response.data.details)!=null&&a.length)return o.response.data.details.map(l=>{let i=t("errors.unexpected");return l.messages&&typeof l.messages=="object"&&l.messages.length&&(i=l.messages.join(", ")),l.field?`${l.field} - ${i}`:i}).join("; ");if(o.response.data.message){const{message:l}=o.response.data;return Array.isArray(l)?(r=l[0])!=null&&r.constraints?Object.values(l[0].constraints)[0]:l[0]:l}if(typeof o.response.data=="string")return o.response.data;if(typeof o.response.data=="object")return Object.keys(o.response.data).map(l=>`${l} ${o.response.data[l]}`).join(", ")}return o.message||t("errors.unexpected")}}}function Gt(t,o){const n=e.ref(e.unref(t)),a=e.ref(e.unref(o)),r=e.computed(()=>!!(n.value.app==="konnect"||n.value.isExactMatch)),l=e.computed(()=>a.value.startsWith("/")?new URL(`${window.location.origin}${a.value}`):new URL(a.value));return i=>{const{page:s,pageSize:c,offset:d,sortColumnKey:u,sortColumnOrder:p,query:g}=i;try{let y=new URL(l.value.href);return r.value&&g?(y.search="",y=new URL(`${y.href}/${g}/`)):(r.value||new URLSearchParams(g).forEach((C,b)=>{y.searchParams.append(b,C)}),u&&y.searchParams.append("sort_by",u),p==="desc"&&y.searchParams.append("sort_desc","1"),y.searchParams.append("size",String(c))),d&&s!==1&&y.searchParams.append("offset",String(d)),y.href}catch(y){return console.error("RouteList(fetcher)",y),a.value}}}function On(t,o,n="data"){const a=e.unref(o),{axiosInstance:r}=Tt({headers:t.requestHeaders}),l=Gt(t,a),i=e.ref({status:at.Idle});return{fetcher:async s=>{try{i.value={status:at.Loading};const c=l(s),{data:d}=await r.get(c),u=n&&n.replace(/[^\w-_]/gi,"");let p;d[u]&&Array.isArray(d[u])?p=d[u]:p=Object.keys(d).length?[d]:[];const g={data:p,total:p.length,...d.offset?{pagination:{offset:d.offset}}:null};return i.value={status:at.Idle,response:g},g}catch(c){const d={data:[],total:0};return s.query&&c.response.status===404?(i.value={status:at.NoResults,response:d,error:c},d):(i.value={status:at.Error,response:d,error:c},d)}},fetcherState:i}}function Fn(){return{getPropValue:(t,o)=>(o==null?void 0:o[t])??void 0}}function Mn(){return{convertKeyToTitle:(t,o="_")=>t?t.split(o).map(n=>n.toLowerCase()==="id"?n.toUpperCase():n.charAt(0).toUpperCase()+n.substring(1)).join(" "):""}}const Zt=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Qt=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");const o=t.match(Zt);if(!o)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return o.shift(),o},Xt=t=>t==="*"||t==="x"||t==="X",te=t=>{const o=parseInt(t,10);return isNaN(o)?t:o},Kn=(t,o)=>typeof t!=typeof o?[String(t),String(o)]:[t,o],Dn=(t,o)=>{if(Xt(t)||Xt(o))return 0;const[n,a]=Kn(te(t),te(o));return n>a?1:n<a?-1:0},ee=(t,o)=>{for(let n=0;n<Math.max(t.length,o.length);n++){const a=Dn(t[n]||"0",o[n]||"0");if(a!==0)return a}return 0},Ln=(t,o)=>{const n=Qt(t),a=Qt(o),r=n.pop(),l=a.pop(),i=ee(n,a);return i!==0?i:r&&l?ee(r.split("."),l.split(".")):r||l?r?-1:1:0},ne=(t,o,n)=>{qn(n);const a=Ln(t,o);return oe[n].includes(a)},oe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ae=Object.keys(oe),qn=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(ae.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${ae.join("|")}`)},Pn=t=>typeof t=="string"&&/^[v\d]/.test(t)&&Zt.test(t);function Rn(t){const{gatewayInfo:o,supportedRange:n}=t;if(!o)return!0;const{edition:a,version:r}=o;if(!Pn(r))return console.error("Invalid version"),!1;const l=n[a];if(!l)return!1;const[i,s]=l;return!(i&&ne(r,i,"<")||s&&ne(r,s,">"))}function Un(t){const o=e.ref(0),n=e.ref(0),a=e.ref(!1);return e.watch(t,r=>{r&&!a.value&&(o.value=r.offsetWidth,n.value=r.scrollWidth,a.value=!0)}),{isTruncated:e.computed(()=>o.value<n.value)}}const R={useAxios:Tt,useDebouncedFilter:Vn,useDeleteUrlBuilder:jn,useErrors:$n,useFetcher:On,useFetchUrlBuilder:Gt,useHelpers:Fn,useStringHelpers:Mn,useI18n:jt,useGatewayFeatureSupported:Rn,useTruncationDetector:Un},vn={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},zn="Copy to clipboard",Hn={message:vn,iconTitle:zn},Yn="kong-ui-copy-uuid-notify",Jn={class:"kong-ui-copy-uuid"},Wn=["onClick"],re=15,Gn=e.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},idTooltip:{type:String,default:""},truncated:{type:Boolean,default:!0},useMono:{type:Boolean,default:!0},notify:{type:Function,default:void 0},iconColor:{type:String,default:"rgba(0, 0, 0, 0.45)"},tooltip:{type:String,default:""},successTooltip:{type:String,default:""},format:{type:String,required:!1,default:"uuid",validator:t=>["uuid","hidden","redacted","deleted"].includes(t)}},emits:["success","error"],setup(t,{emit:o}){const n=t,{t:a}=ut.createI18n("en-us",Hn),r=n.notify||e.inject(Yn,()=>{}),l=e.computed(()=>n.idTooltip?{label:n.idTooltip,positionFixed:!0,placement:"bottomStart"}:{title:n.uuid}),i=e.computed(()=>!!(n.tooltip&&n.successTooltip)),s=e.ref(n.tooltip),c=e.computed(()=>n.tooltip?{label:s.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),d=e.computed(()=>n.format==="redacted"?"*****":n.format==="deleted"?`*${n.uuid.substring(0,5)}`:n.uuid),u=g=>{s.value=g,setTimeout(()=>{s.value=n.tooltip},1800)},p=g=>{if(!g(n.uuid)){typeof r=="function"&&r({type:"error",message:a("message.fail")}),i.value?u(a("message.fail")):o("error",n.uuid);return}const y=n.uuid.length>re,C=n.format==="hidden"||n.format==="redacted"?a("message.success.prefix"):`"${n.uuid.substring(0,re)+(y?"...":"")}"`;typeof r=="function"&&r({type:"success",message:`${C}${a("message.success.content")}`}),i.value?u(n.successTooltip):o("success",n.uuid)};return(g,y)=>{const C=e.resolveComponent("KIcon"),b=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Jn,[t.format!=="hidden"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.idTooltip?"KTooltip":"div"),e.mergeProps({key:0},l.value,{"data-testid":"copy-id"}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["uuid-container",t.truncated?"truncated-uuid":null,t.useMono?"mono":null])},e.toDisplayString(d.value),3)]),_:1},16)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tooltip?"KTooltip":"div"),e.mergeProps(c.value,{class:"uuid-icon-wrapper"}),{default:e.withCtx(()=>[e.createVNode(b,null,{default:e.withCtx(({copyToClipboard:f})=>[e.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:e.withModifiers(h=>p(f),["stop"])},[e.createVNode(C,{class:"uuid-icon",color:t.iconColor,"hide-title":!!t.tooltip||void 0,icon:"copy",size:"16",title:e.unref(a)("iconTitle")},null,8,["color","hide-title","title"])],8,Wn)]),_:1})]),_:1},16))])}}}),Zn=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},ie=Zn(Gn,[["__scopeId","data-v-bfdaf6f7"]]),Qn={key:0,class:"config-card-fieldset-title"},Xn=e.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(t){const o=t,{i18n:{t:n}}=R.useI18n(),{convertKeyToTitle:a}=R.useStringHelpers(),r=e.computed(()=>o.item.key??"json-array-item"),l=e.computed(()=>o.item.value??o.item),i=e.computed(()=>{const c=JSON.parse(JSON.stringify(l.value));return o.isArrayItem&&delete c.name,c}),s=e.computed(()=>{var c;return o.isArrayItem?(c=l.value)!=null&&c.name?a(l.value.name,"_"):n("baseConfigCard.general.entryTitle",{index:o.index}):""});return(c,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.isArrayItem?"fieldset":"div"),{class:e.normalizeClass(t.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:e.withCtx(()=>[t.isArrayItem?(e.openBlock(),e.createElementBlock("legend",Qn,[e.createElementVNode("b",null,e.toDisplayString(s.value),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(i.value),(u,p)=>(e.openBlock(),e.createBlock($t,{key:`${r.value}-property-${p}`,item:{key:u,label:e.unref(a)(u),value:i.value[u]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),Q=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},le=Q(Xn,[["__scopeId","data-v-68ca83ec"]]),to=Q(e.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(t){const{i18n:{t:o}}=R.useI18n();return(n,a)=>{const r=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(r,{appearance:"btn-link",class:"navigation-button",onClick:a[0]||(a[0]=l=>n.$emit("navigation-click",t.item))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.value||e.unref(o)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-7410504d"]]),eo=e.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(t){const{i18n:{t:o}}=R.useI18n();return(n,a)=>{const r=e.resolveComponent("KBadge");return e.openBlock(),e.createBlock(r,{appearance:t.status?"success":"neutral"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.status?e.unref(o)("baseConfigCard.statusBadge.enabledLabel"):e.unref(o)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),no="#0044f4",oo="#e0e4ea",ao="#3a3f51",ro="1px",io="20px",lo={class:"config-card-details-row"},so=["data-testid"],co=["data-testid"],po=["data-testid"],uo=["data-testid"],fo={key:1},mo=["data-testid"],yo=["data-testid"],go=["data-testid"],ho=["data-testid"],ko={name:"ConfigCardItem",components:{CopyUuid:ie,JsonCardItem:le,StatusBadge:eo,InternalLinkItem:to}},bo=e.defineComponent({...ko,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(t,{emit:o}){const n=t;e.useCssVars(y=>({"1df60db4":d.value?"none":`solid ${e.unref(ro)} ${e.unref(oo)}`,"21d1d34e":c.value&&i.value?"block":"flex","4d3dc7e7":c.value&&i.value?"100%":n.slim?"50%":"25%","4d400dc2":c.value&&i.value?"100%":n.slim?"50%":"75%"}));const a=e.useSlots(),{i18n:{t:r,formatUnixTimeStamp:l}}=R.useI18n(),i=e.computed(()=>n.item.value!==void 0&&n.item.value!==null&&n.item.value!==""),s=e.computed(()=>!!(n.item.tooltip||a["label-tooltip"])),c=e.computed(()=>n.item.type===F.Json||n.item.type===F.JsonArray),d=e.computed(()=>n.item.type===F.JsonArray),u=e.computed(()=>{switch(n.item.type){case F.ID:return{tag:"CopyUuid",attrs:{"data-testid":`${n.item.key}-copy-uuid`,"success-tooltip":r("baseConfigCard.copy.success"),tooltip:r("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,uuid:n.item.value,notify:()=>{}}};case F.IdArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{"success-tooltip":r("baseConfigCard.copy.success"),tooltip:r("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,notify:()=>{}}};case F.Redacted:return{tag:"CopyUuid",attrs:{"data-testid":`${n.item.key}-copy-uuid-redacted`,format:"redacted","success-tooltip":r("baseConfigCard.copy.success"),tooltip:r("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,uuid:n.item.value,notify:()=>{}}};case F.RedactedArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{format:"redacted","success-tooltip":r("baseConfigCard.copy.success"),tooltip:r("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,notify:()=>{}}};case F.Date:return{tag:"div",attrs:{"data-testid":`${n.item.key}-date`},text:l(n.item.value)};case F.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${n.item.key}-badge-status`,status:n.item.value}};case F.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case F.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case F.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${n.item.key}-internal-link`,item:n.item,onNavigationClick:y=>{o("navigation-click",y)}}};case F.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${n.item.key}-external-link`,href:n.item.value},text:n.item.value};case F.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${n.item.key}-json-content`,item:n.item}};case F.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${n.item.key}-json-array-content`,item:n.item}};default:return{tag:"div",attrs:{"data-testid":`${n.item.key}-plain-text`},text:n.item.value}}}),p=e.ref(),{isTruncated:g}=R.useTruncationDetector(p);return(y,C)=>{const b=e.resolveComponent("KLabel"),f=e.resolveComponent("KBadge"),h=e.resolveComponent("KMethodBadge"),m=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("div",lo,[e.createElementVNode("div",{class:"config-card-details-label","data-testid":`${t.item.key}-label`},[e.renderSlot(y.$slots,"label",{item:t.item},()=>[e.createVNode(b,{"tooltip-attributes":{maxWidth:"500px"}},e.createSlots({default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.label)+" ",1)]),_:2},[s.value?{name:"tooltip",fn:e.withCtx(()=>[e.createElementVNode("div",{"data-testid":`${t.item.key}-label-tooltip`},[e.renderSlot(y.$slots,"label-tooltip",{},()=>[e.createTextVNode(e.toDisplayString(t.item.tooltip),1)],!0)],8,co)]),key:"0"}:void 0]),1024)],!0)],8,so),e.createElementVNode("div",{class:"config-card-details-value","data-testid":`${t.item.key}-property-value`},[e.renderSlot(y.$slots,t.item.key,{rowValue:t.item.value},()=>[i.value?(e.openBlock(),e.createElementBlock("div",fo,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value.tag),e.normalizeProps(e.guardReactiveProps(u.value.attrs)),{default:e.withCtx(()=>[u.value.additionalComponent==="KBadge"?(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-badge-tags`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(k,x)=>(e.openBlock(),e.createBlock(f,{key:`${t.item.key}-badge-tag-${x}`,class:"config-badge","data-testid":`${t.item.key}-badge-tag-${x}`,"truncation-tooltip":k},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))],8,mo)):e.createCommentVNode("",!0),u.value.additionalComponent==="CopyUuid"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${t.item.key}-copy-uuid-array`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(k,x)=>(e.openBlock(),e.createBlock(e.unref(ie),e.mergeProps(u.value.childAttrs,{key:`${t.item.key}-copy-uuid-${x}`,"data-testid":`${t.item.key}-copy-uuid-${x}`,uuid:k}),null,16,["data-testid","uuid"]))),128))],8,yo)):u.value.additionalComponent==="KMethodBadge"?(e.openBlock(),e.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${t.item.key}-badge-methods`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(k,x)=>(e.openBlock(),e.createBlock(h,{key:`${t.item.key}-badge-method-${x}`,class:"config-badge","data-testid":`${t.item.key}-badge-method-${x}`,"is-rounded":"",label:k,method:e.unref(gn.MethodsArray).includes(k.toLowerCase())?k.toLowerCase():"custom"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k),1)]),_:2},1032,["data-testid","label","method"]))),128))],8,go)):e.createCommentVNode("",!0),u.value.additionalComponent==="JsonCardItem"?(e.openBlock(),e.createElementBlock("div",{key:3,"data-testid":`${n.item.key}-json-array-content`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(k,x)=>(e.openBlock(),e.createBlock(le,{key:`json-array-item-${x}`,index:x,"is-array-item":"",item:k},null,8,["index","item"]))),128))],8,ho)):(e.openBlock(),e.createBlock(m,{key:4,label:e.unref(g)?t.item.value:""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"textContent",ref:p,class:e.normalizeClass(["attrs-data-text",{truncated:t.truncated}])},e.toDisplayString(u.value.text),3)]),_:1},8,["label"]))]),_:1},16))])):(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-no-value`}," – ",8,uo))],!0)],8,po)])}}}),$t=Q(bo,[["__scopeId","data-v-307ab96d"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function se(t){return typeof t>"u"||t===null}function Co(t){return typeof t=="object"&&t!==null}function wo(t){return Array.isArray(t)?t:se(t)?[]:[t]}function So(t,o){var n,a,r,l;if(o)for(l=Object.keys(o),n=0,a=l.length;n<a;n+=1)r=l[n],t[r]=o[r];return t}function xo(t,o){var n="",a;for(a=0;a<o;a+=1)n+=t;return n}function Bo(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var Io=se,No=Co,_o=wo,Ao=xo,Eo=Bo,To=So,q={isNothing:Io,isObject:No,toArray:_o,repeat:Ao,isNegativeZero:Eo,extend:To};function ce(t,o){var n="",a=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(n+='in "'+t.mark.name+'" '),n+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!o&&t.mark.snippet&&(n+=`
|
|
2
2
|
|
|
3
3
|
`+t.mark.snippet),a+" "+n):a}function ft(t,o){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=o,this.message=ce(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ft.prototype=Object.create(Error.prototype),ft.prototype.constructor=ft,ft.prototype.toString=function(t){return this.name+": "+ce(this,t)};var Y=ft;function Ot(t,o,n,a,r){var l="",i="",s=Math.floor(r/2)-1;return a-o>s&&(l=" ... ",o=a-s+l.length),n-a>s&&(i=" ...",n=a+s-i.length),{str:l+t.slice(o,n).replace(/\t/g,"→")+i,pos:a-o+l.length}}function Ft(t,o){return q.repeat(" ",o-t.length)+t}function Vo(t,o){if(o=Object.create(o||null),!t.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);for(var n=/\r?\n|\r|\0/g,a=[0],r=[],l,i=-1;l=n.exec(t.buffer);)r.push(l.index),a.push(l.index+l[0].length),t.position<=l.index&&i<0&&(i=a.length-2);i<0&&(i=a.length-1);var s="",c,d,u=Math.min(t.line+o.linesAfter,r.length).toString().length,p=o.maxLength-(o.indent+u+3);for(c=1;c<=o.linesBefore&&!(i-c<0);c++)d=Ot(t.buffer,a[i-c],r[i-c],t.position-(a[i]-a[i-c]),p),s=q.repeat(" ",o.indent)+Ft((t.line-c+1).toString(),u)+" | "+d.str+`
|
|
4
4
|
`+s;for(d=Ot(t.buffer,a[i],r[i],t.position,p),s+=q.repeat(" ",o.indent)+Ft((t.line+1).toString(),u)+" | "+d.str+`
|
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-7410504d] .k-button.navigation-button{font-size:14px;font-weight:400}.kong-ui-copy-uuid[data-v-bfdaf6f7]{display:flex}.kong-ui-copy-uuid .uuid-container[data-v-bfdaf6f7]{margin-right:12px;white-space:nowrap}.kong-ui-copy-uuid .truncated-uuid[data-v-bfdaf6f7]{margin-right:1ch;max-width:10ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-copy-uuid .uuid-icon-wrapper[data-v-bfdaf6f7]{align-items:center;cursor:pointer;display:flex}.kong-ui-copy-uuid .uuid-icon[data-v-bfdaf6f7]{display:flex}.config-card-details-row[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-7410504d] .k-button.navigation-button{font-size:14px;font-weight:400}.kong-ui-copy-uuid[data-v-bfdaf6f7]{display:flex}.kong-ui-copy-uuid .uuid-container[data-v-bfdaf6f7]{margin-right:12px;white-space:nowrap}.kong-ui-copy-uuid .truncated-uuid[data-v-bfdaf6f7]{margin-right:1ch;max-width:10ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-copy-uuid .uuid-icon-wrapper[data-v-bfdaf6f7]{align-items:center;cursor:pointer;display:flex}.kong-ui-copy-uuid .uuid-icon[data-v-bfdaf6f7]{display:flex}.config-card-details-row[data-v-307ab96d]{border-bottom:var(--1df60db4);display:var(--21d1d34e);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-307ab96d]{width:var(--4d3dc7e7)}.config-card-details-row .config-card-details-label label[data-v-307ab96d]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-307ab96d]{width:var(--4d400dc2)}.config-card-details-row .config-card-details-value .truncated[data-v-307ab96d]{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-307ab96d]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-307ab96d] .kong-ui-copy-uuid:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-307ab96d]{display:flex}.config-card-details-row .config-badge[data-v-307ab96d]{margin-right:4px}.config-card-details-row[data-v-307ab96d] .k-input-label{margin-bottom:0}.config-card-details-row[data-v-307ab96d] .k-input-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-307ab96d] .config-card-details-row{width:auto}.config-card-display-json #config-card-codeblock .k-highlighted-code-block code,.config-card-display-yaml #config-card-codeblock .k-highlighted-code-block code{background-color:#232633}.config-card-prop-section-title[data-v-6c45e9e4]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-64349aa2] .k-card-content .k-card-body{font-size:14px}.kong-ui-entity-base-config-card .config-card-actions[data-v-64349aa2]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-64349aa2]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-64349aa2]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-64349aa2] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-64349aa2]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-44a90aae]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-44a90aae]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-44a90aae] .k-button:last-of-type{margin-left:16px}.content-wrapper[data-v-f8a220e9] [role=button]{display:inline}.kong-ui-entity-base-table .toolbar-container[data-v-6bf92df6]{align-items:center}.kong-ui-entity-base-table .toolbar-button-container[data-v-6bf92df6]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-6bf92df6]{float:right}.kong-ui-entity-base-table .actions-container[data-v-6bf92df6] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table .actions-trigger[data-v-6bf92df6]{background-color:#0000!important;border:none!important;cursor:pointer!important;font-weight:400!important}.k-tabs>.tab-container>.kong-ui-entity-base-table,.k-tabs>.tab-container>[class^=kong-ui-entities-]>.kong-ui-entity-base-table{border-top:0}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-1c9a2a07],.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-1c9a2a07]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{margin-top:32px}.kong-ui-entity-delete-error[data-v-1c9a2a07]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-745f38c0]{width:100%}.kong-ui-entity-filter[data-v-745f38c0]{display:flex;position:relative}.kong-ui-entity-filter[data-v-745f38c0] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-745f38c0] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-745f38c0]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-745f38c0]{box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;position:absolute;top:100%;z-index:1060}.kong-ui-entity-filter-menu[data-v-745f38c0] .k-menu-item .menu-button:focus{box-shadow:none}.kong-ui-entity-filter-menu[data-v-745f38c0] .k-menu-item .menu-button:focus-visible{box-shadow:0 0 0 1px #bee2ff}.menu-item-title[data-v-745f38c0]{align-items:center;display:flex}.menu-item-indicator[data-v-745f38c0]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-745f38c0]{align-items:center;display:flex;justify-content:space-between}.menu-item-body[data-v-745f38c0] .k-input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-745f38c0] .k-input-wrapper{width:100%}.menu-item-body[data-v-745f38c0] .k-select-input .k-input{font-size:12px}.menu-item-body[data-v-745f38c0] .k-select-input .k-input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-745f38c0]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-745f38c0]{display:flex;justify-content:space-between;margin:10px 0 6px}fieldset[data-v-8b6dc312]{margin:0;padding:0}.kong-ui-entity-form-section[data-v-8b6dc312]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{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-8b6dc312]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-8b6dc312]{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-8b6dc312]{color:#000933;font-size:18px;font-weight:600;line-height:24px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312] 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-8b6dc312]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-8b6dc312]{border-bottom:1px solid #e0e4ea}.kong-ui-entities-key-sets-list[data-v-a16aa26a]{width:100%}.kong-ui-entities-key-sets-list .kong-ui-entity-filter-input[data-v-a16aa26a]{width:300px}.kong-ui-entities-key-sets-form[data-v-29df09d7]{width:100%}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-key-sets",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-key-sets.umd.js",
|
|
6
6
|
"module": "./dist/entities-key-sets.es.js",
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
"axios": "^1.5.1",
|
|
25
25
|
"vue": "^3.3.4",
|
|
26
26
|
"vue-router": "^4.2.5",
|
|
27
|
-
"@kong-ui-public/
|
|
28
|
-
"@kong-ui-public/
|
|
27
|
+
"@kong-ui-public/copy-uuid": "^1.3.5",
|
|
28
|
+
"@kong-ui-public/i18n": "^0.8.6"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@kong/kongponents": "^8.124.1",
|
|
32
32
|
"axios": "^1.5.1",
|
|
33
33
|
"vue": "^3.3.4",
|
|
34
34
|
"vue-router": "^4.2.5",
|
|
35
|
-
"@kong-ui-public/
|
|
36
|
-
"@kong-ui-public/
|
|
35
|
+
"@kong-ui-public/copy-uuid": "^1.3.5",
|
|
36
|
+
"@kong-ui-public/i18n": "^0.8.6"
|
|
37
37
|
},
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"errorLimit": "500KB"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@kong-ui-public/entities-shared": "^1.6.
|
|
53
|
+
"@kong-ui-public/entities-shared": "^1.6.12"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"dev": "cross-env USE_SANDBOX=true vite",
|