@kong-ui-public/entities-consumers 3.2.3 → 3.2.4
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-consumers.es.js +153 -153
- package/dist/entities-consumers.umd.js +12 -12
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as W, computed as w, openBlock as f, createBlock as V, resolveDynamicComponent as be, normalizeStyle as Ue, withCtx as h, createElementBlock as O, toDisplayString as j, createCommentVNode as P, pushScopeId as Re, popScopeId as Ve, createElementVNode as F, ref as B, watch as ke, renderSlot as Q, unref as m, onBeforeMount as wt, resolveComponent as R, createSlots as Te, createVNode as T, createTextVNode as H, renderList as pe, withModifiers as gt, withDirectives as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as W, computed as w, openBlock as f, createBlock as V, resolveDynamicComponent as be, normalizeStyle as Ue, withCtx as h, createElementBlock as O, toDisplayString as j, createCommentVNode as P, pushScopeId as Re, popScopeId as Ve, createElementVNode as F, ref as B, watch as ke, renderSlot as Q, unref as m, onBeforeMount as wt, resolveComponent as R, createSlots as Te, createVNode as T, createTextVNode as H, renderList as pe, withModifiers as gt, withDirectives as Ie, vShow as _e, Fragment as fe, normalizeClass as Ae, withKeys as _r, useSlots as It, useCssVars as yn, inject as Sr, onMounted as Ar, onUnmounted as xr, normalizeProps as $r, guardReactiveProps as Nr, mergeProps as Tr, Teleport as jr, reactive as Vt } from "vue";
|
|
2
|
+
import { useRouter as _t } from "vue-router";
|
|
3
3
|
import { createI18n as hn, i18nTComponent as vn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Dt from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as Or } from "@kong/kongponents";
|
|
@@ -8,7 +8,7 @@ const Pt = "24px", Mr = (e, t) => {
|
|
|
8
8
|
for (const [r, a] of t)
|
|
9
9
|
n[r] = a;
|
|
10
10
|
return n;
|
|
11
|
-
}, Er = (e) => (Re("data-v-
|
|
11
|
+
}, Er = (e) => (Re("data-v-f68c7837"), e = e(), Ve(), e), qr = ["aria-hidden"], Fr = {
|
|
12
12
|
key: 0,
|
|
13
13
|
"data-testid": "kui-icon-svg-title"
|
|
14
14
|
}, Br = /* @__PURE__ */ Er(() => /* @__PURE__ */ F("path", {
|
|
@@ -107,7 +107,7 @@ const Pt = "24px", Mr = (e, t) => {
|
|
|
107
107
|
_: 1
|
|
108
108
|
}, 8, ["aria-hidden", "style"]));
|
|
109
109
|
}
|
|
110
|
-
}), Lr = /* @__PURE__ */ Mr(Kr, [["__scopeId", "data-v-
|
|
110
|
+
}), Lr = /* @__PURE__ */ Mr(Kr, [["__scopeId", "data-v-f68c7837"]]), Ur = {
|
|
111
111
|
list: {
|
|
112
112
|
table_headers: {
|
|
113
113
|
username: "Username",
|
|
@@ -489,8 +489,8 @@ function aa(e, t, n, r = {
|
|
|
489
489
|
n || (n = "1000");
|
|
490
490
|
const { axiosInstance: a } = St(e.axiosRequestConfig), { i18n: { t: i } } = it(), { debounce: o } = Pr(), l = o(async (v) => {
|
|
491
491
|
await J(v);
|
|
492
|
-
}, 200), s = B(!1), u = B(""), d = B(""), c = B([]), C = B([]), y = B(void 0),
|
|
493
|
-
let M = `${e.apiBaseUrl}${
|
|
492
|
+
}, 200), s = B(!1), u = B(""), d = B(""), c = B([]), C = B([]), y = B(void 0), I = m(t);
|
|
493
|
+
let M = `${e.apiBaseUrl}${I}`;
|
|
494
494
|
e.app === "konnect" ? M = M.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (M = M.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
495
495
|
const { isValidUuid: k } = Cn(), U = async () => {
|
|
496
496
|
try {
|
|
@@ -519,14 +519,14 @@ function aa(e, t, n, r = {
|
|
|
519
519
|
return [E[r.fetchedItemsKey] ?? E];
|
|
520
520
|
})()) : b.push(
|
|
521
521
|
...r.searchKeys.filter((E) => E !== "id").map(async (E) => {
|
|
522
|
-
const { data:
|
|
523
|
-
return
|
|
522
|
+
const { data: _ } = await a.get(`${M}?${E}=${v}`);
|
|
523
|
+
return _[r.fetchedItemsKey];
|
|
524
524
|
})
|
|
525
525
|
);
|
|
526
526
|
const g = await Promise.all(b), K = /* @__PURE__ */ new Set();
|
|
527
527
|
c.value = [], (S = g == null ? void 0 : g.forEach) == null || S.call(g, (E) => {
|
|
528
|
-
var
|
|
529
|
-
(
|
|
528
|
+
var _;
|
|
529
|
+
(_ = E == null ? void 0 : E.forEach) == null || _.call(E, ($) => {
|
|
530
530
|
K.has($.id) || (K.add($.id), c.value.push($));
|
|
531
531
|
});
|
|
532
532
|
});
|
|
@@ -542,8 +542,8 @@ function aa(e, t, n, r = {
|
|
|
542
542
|
var g;
|
|
543
543
|
let K = !1;
|
|
544
544
|
for (const E of r.searchKeys) {
|
|
545
|
-
const
|
|
546
|
-
|
|
545
|
+
const _ = typeof b[E] == "string" ? (g = b[E]) == null ? void 0 : g.toLowerCase() : b[E];
|
|
546
|
+
_ != null && _.includes(v.toLowerCase()) && (K = !0);
|
|
547
547
|
}
|
|
548
548
|
return K;
|
|
549
549
|
}), (!c.value || !c.value.length) && (d.value = i("debouncedFilter.errors.invalid"))) : c.value = y.value, s.value = !1;
|
|
@@ -615,8 +615,8 @@ function kn(e, t) {
|
|
|
615
615
|
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query: C } = o;
|
|
616
616
|
try {
|
|
617
617
|
let y = new URL(i.value.href);
|
|
618
|
-
return a.value && C ? (y.search = "", y = n.value.isExactMatch ? new URL(`${y.href}/${C}/`) : new URL(`${y.href}?filter[name][contains]=${C}`)) : (a.value || new URLSearchParams(C).forEach((
|
|
619
|
-
y.searchParams.append(M,
|
|
618
|
+
return a.value && C ? (y.search = "", y = n.value.isExactMatch ? new URL(`${y.href}/${C}/`) : new URL(`${y.href}?filter[name][contains]=${C}`)) : (a.value || new URLSearchParams(C).forEach((I, M) => {
|
|
619
|
+
y.searchParams.append(M, I);
|
|
620
620
|
}), d && y.searchParams.append("sort_by", d), c === "desc" && y.searchParams.append("sort_desc", "1"), y.searchParams.append("size", String(s))), u && l !== 1 && y.searchParams.append("offset", String(u)), y.href;
|
|
621
621
|
} catch (y) {
|
|
622
622
|
return console.error("RouteList(fetcher)", y), r.value;
|
|
@@ -639,7 +639,7 @@ function sa(e, t, n = "data") {
|
|
|
639
639
|
const c = d.data, C = n && n.replace(/[^\w-_]/gi, "");
|
|
640
640
|
let y;
|
|
641
641
|
c[C] && Array.isArray(c[C]) ? y = c[C] : Array.isArray(c) ? y = c : y = Object.keys(c).length ? [c] : [];
|
|
642
|
-
const
|
|
642
|
+
const I = {
|
|
643
643
|
data: y,
|
|
644
644
|
total: y.length,
|
|
645
645
|
...c.offset ? {
|
|
@@ -650,8 +650,8 @@ function sa(e, t, n = "data") {
|
|
|
650
650
|
};
|
|
651
651
|
return o.value = {
|
|
652
652
|
status: $e.Idle,
|
|
653
|
-
response:
|
|
654
|
-
},
|
|
653
|
+
response: I
|
|
654
|
+
}, I;
|
|
655
655
|
} catch (u) {
|
|
656
656
|
const d = {
|
|
657
657
|
data: [],
|
|
@@ -704,15 +704,15 @@ const wn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
704
704
|
}, Wt = (e, t, n) => {
|
|
705
705
|
fa(n);
|
|
706
706
|
const r = pa(e, t);
|
|
707
|
-
return
|
|
708
|
-
},
|
|
707
|
+
return In[n].includes(r);
|
|
708
|
+
}, In = {
|
|
709
709
|
">": [1],
|
|
710
710
|
">=": [0, 1],
|
|
711
711
|
"=": [0],
|
|
712
712
|
"<=": [-1, 0],
|
|
713
713
|
"<": [-1],
|
|
714
714
|
"!=": [-1, 1]
|
|
715
|
-
}, Zt = Object.keys(
|
|
715
|
+
}, Zt = Object.keys(In), fa = (e) => {
|
|
716
716
|
if (typeof e != "string")
|
|
717
717
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
718
718
|
if (Zt.indexOf(e) === -1)
|
|
@@ -810,7 +810,7 @@ const ne = {
|
|
|
810
810
|
for (const [r, a] of t)
|
|
811
811
|
n[r] = a;
|
|
812
812
|
return n;
|
|
813
|
-
},
|
|
813
|
+
}, _n = /* @__PURE__ */ me(ba, [["__scopeId", "data-v-68ca83ec"]]), Ca = /* @__PURE__ */ W({
|
|
814
814
|
__name: "InternalLinkItem",
|
|
815
815
|
props: {
|
|
816
816
|
item: {
|
|
@@ -859,9 +859,9 @@ const ne = {
|
|
|
859
859
|
}, 8, ["appearance"]);
|
|
860
860
|
};
|
|
861
861
|
}
|
|
862
|
-
}),
|
|
862
|
+
}), Ia = "#0044f4", _a = "#e0e4ea", Sa = "#afb7c5", Aa = "1px", xa = "20px", $a = { class: "config-card-details-row" }, Na = ["data-testid"], Ta = ["data-testid"], ja = ["data-testid"], Oa = ["data-testid"], Ma = { key: 1 }, Ea = ["data-testid"], qa = ["data-testid"], Fa = ["data-testid"], Ba = ["data-testid"], Ka = {
|
|
863
863
|
name: "ConfigCardItem",
|
|
864
|
-
components: { JsonCardItem:
|
|
864
|
+
components: { JsonCardItem: _n, StatusBadge: wa, InternalLinkItem: ka }
|
|
865
865
|
}, La = /* @__PURE__ */ W({
|
|
866
866
|
...Ka,
|
|
867
867
|
props: {
|
|
@@ -882,13 +882,13 @@ const ne = {
|
|
|
882
882
|
},
|
|
883
883
|
emits: ["navigation-click"],
|
|
884
884
|
setup(e, { emit: t }) {
|
|
885
|
-
yn((
|
|
886
|
-
dc1d91a8: d.value ? "none" : `solid ${m(Aa)} ${m(
|
|
885
|
+
yn((I) => ({
|
|
886
|
+
dc1d91a8: d.value ? "none" : `solid ${m(Aa)} ${m(_a)}`,
|
|
887
887
|
"59ccec5f": u.value && l.value ? "block" : "flex",
|
|
888
888
|
"29318fbe": u.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
889
889
|
"292d0408": u.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
890
890
|
}));
|
|
891
|
-
const n = e, r = t, a =
|
|
891
|
+
const n = e, r = t, a = It(), { i18n: { t: i, formatUnixTimeStamp: o } } = ne.useI18n(), l = w(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), s = w(() => !!(n.item.tooltip || a["label-tooltip"])), u = w(() => n.item.type === Y.Json || n.item.type === Y.JsonArray), d = w(() => n.item.type === Y.JsonArray), c = w(() => {
|
|
892
892
|
switch (n.item.type) {
|
|
893
893
|
case Y.ID:
|
|
894
894
|
return {
|
|
@@ -958,8 +958,8 @@ const ne = {
|
|
|
958
958
|
attrs: {
|
|
959
959
|
"data-testid": `${n.item.key}-internal-link`,
|
|
960
960
|
item: n.item,
|
|
961
|
-
onNavigationClick: (
|
|
962
|
-
r("navigation-click",
|
|
961
|
+
onNavigationClick: (I) => {
|
|
962
|
+
r("navigation-click", I);
|
|
963
963
|
}
|
|
964
964
|
}
|
|
965
965
|
};
|
|
@@ -999,14 +999,14 @@ const ne = {
|
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
1001
|
}), C = B(), { isTruncated: y } = ne.useTruncationDetector(C);
|
|
1002
|
-
return (
|
|
1002
|
+
return (I, M) => {
|
|
1003
1003
|
const k = R("KLabel"), U = R("KBadge"), x = R("KCopy"), J = R("KTooltip");
|
|
1004
1004
|
return f(), O("div", $a, [
|
|
1005
1005
|
F("div", {
|
|
1006
1006
|
class: "config-card-details-label",
|
|
1007
1007
|
"data-testid": `${e.item.key}-label`
|
|
1008
1008
|
}, [
|
|
1009
|
-
Q(
|
|
1009
|
+
Q(I.$slots, "label", { item: e.item }, () => [
|
|
1010
1010
|
T(k, { "tooltip-attributes": { maxWidth: "500px" } }, Te({
|
|
1011
1011
|
default: h(() => [
|
|
1012
1012
|
H(j(e.item.label) + " ", 1)
|
|
@@ -1019,7 +1019,7 @@ const ne = {
|
|
|
1019
1019
|
F("div", {
|
|
1020
1020
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1021
1021
|
}, [
|
|
1022
|
-
Q(
|
|
1022
|
+
Q(I.$slots, "label-tooltip", {}, () => [
|
|
1023
1023
|
H(j(e.item.tooltip), 1)
|
|
1024
1024
|
], !0)
|
|
1025
1025
|
], 8, Ta)
|
|
@@ -1033,7 +1033,7 @@ const ne = {
|
|
|
1033
1033
|
class: "config-card-details-value",
|
|
1034
1034
|
"data-testid": `${e.item.key}-property-value`
|
|
1035
1035
|
}, [
|
|
1036
|
-
Q(
|
|
1036
|
+
Q(I.$slots, e.item.key, {
|
|
1037
1037
|
rowValue: e.item.value
|
|
1038
1038
|
}, () => [
|
|
1039
1039
|
l.value ? (f(), O("div", Ma, [
|
|
@@ -1087,7 +1087,7 @@ const ne = {
|
|
|
1087
1087
|
key: 3,
|
|
1088
1088
|
"data-testid": `${n.item.key}-json-array-content`
|
|
1089
1089
|
}, [
|
|
1090
|
-
(f(!0), O(fe, null, pe(e.item.value, (v, S) => (f(), V(
|
|
1090
|
+
(f(!0), O(fe, null, pe(e.item.value, (v, S) => (f(), V(_n, {
|
|
1091
1091
|
key: `json-array-item-${S}`,
|
|
1092
1092
|
index: S,
|
|
1093
1093
|
"is-array-item": "",
|
|
@@ -1608,14 +1608,14 @@ function wi(e, t) {
|
|
|
1608
1608
|
return "-0.0";
|
|
1609
1609
|
return n = e.toString(10), ki.test(n) ? n.replace("e", ".e") : n;
|
|
1610
1610
|
}
|
|
1611
|
-
function
|
|
1611
|
+
function Ii(e) {
|
|
1612
1612
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || te.isNegativeZero(e));
|
|
1613
1613
|
}
|
|
1614
1614
|
var Bn = new ie("tag:yaml.org,2002:float", {
|
|
1615
1615
|
kind: "scalar",
|
|
1616
1616
|
resolve: bi,
|
|
1617
1617
|
construct: Ci,
|
|
1618
|
-
predicate:
|
|
1618
|
+
predicate: Ii,
|
|
1619
1619
|
represent: wi,
|
|
1620
1620
|
defaultStyle: "lowercase"
|
|
1621
1621
|
}), Kn = Mn.extend({
|
|
@@ -1630,7 +1630,7 @@ var Bn = new ie("tag:yaml.org,2002:float", {
|
|
|
1630
1630
|
), Rn = new RegExp(
|
|
1631
1631
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
1632
1632
|
);
|
|
1633
|
-
function
|
|
1633
|
+
function _i(e) {
|
|
1634
1634
|
return e === null ? !1 : Un.exec(e) !== null || Rn.exec(e) !== null;
|
|
1635
1635
|
}
|
|
1636
1636
|
function Si(e) {
|
|
@@ -1651,7 +1651,7 @@ function Ai(e) {
|
|
|
1651
1651
|
}
|
|
1652
1652
|
var Vn = new ie("tag:yaml.org,2002:timestamp", {
|
|
1653
1653
|
kind: "scalar",
|
|
1654
|
-
resolve:
|
|
1654
|
+
resolve: _i,
|
|
1655
1655
|
construct: Si,
|
|
1656
1656
|
instanceOf: Date,
|
|
1657
1657
|
represent: Ai
|
|
@@ -1984,7 +1984,7 @@ function Xi(e, t) {
|
|
|
1984
1984
|
q(e, "unexpected end of the stream within a double quoted scalar");
|
|
1985
1985
|
}
|
|
1986
1986
|
function eo(e, t) {
|
|
1987
|
-
var n = !0, r, a, i, o = e.tag, l, s = e.anchor, u, d, c, C, y,
|
|
1987
|
+
var n = !0, r, a, i, o = e.tag, l, s = e.anchor, u, d, c, C, y, I = /* @__PURE__ */ Object.create(null), M, k, U, x;
|
|
1988
1988
|
if (x = e.input.charCodeAt(e.position), x === 91)
|
|
1989
1989
|
d = 93, y = !1, l = [];
|
|
1990
1990
|
else if (x === 123)
|
|
@@ -1994,7 +1994,7 @@ function eo(e, t) {
|
|
|
1994
1994
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), x = e.input.charCodeAt(++e.position); x !== 0; ) {
|
|
1995
1995
|
if (ee(e, !0, t), x = e.input.charCodeAt(e.position), x === d)
|
|
1996
1996
|
return e.position++, e.tag = o, e.anchor = s, e.kind = y ? "mapping" : "sequence", e.result = l, !0;
|
|
1997
|
-
n ? x === 44 && q(e, "expected the node content, but found ','") : q(e, "missed comma between flow collection entries"), k = M = U = null, c = C = !1, x === 63 && (u = e.input.charCodeAt(e.position + 1), de(u) && (c = C = !0, e.position++, ee(e, !0, t))), r = e.line, a = e.lineStart, i = e.position, Le(e, t, Xe, !1, !0), k = e.tag, M = e.result, ee(e, !0, t), x = e.input.charCodeAt(e.position), (C || e.line === r) && x === 58 && (c = !0, x = e.input.charCodeAt(++e.position), ee(e, !0, t), Le(e, t, Xe, !1, !0), U = e.result), y ? Ke(e, l,
|
|
1997
|
+
n ? x === 44 && q(e, "expected the node content, but found ','") : q(e, "missed comma between flow collection entries"), k = M = U = null, c = C = !1, x === 63 && (u = e.input.charCodeAt(e.position + 1), de(u) && (c = C = !0, e.position++, ee(e, !0, t))), r = e.line, a = e.lineStart, i = e.position, Le(e, t, Xe, !1, !0), k = e.tag, M = e.result, ee(e, !0, t), x = e.input.charCodeAt(e.position), (C || e.line === r) && x === 58 && (c = !0, x = e.input.charCodeAt(++e.position), ee(e, !0, t), Le(e, t, Xe, !1, !0), U = e.result), y ? Ke(e, l, I, k, M, U, r, a, i) : c ? l.push(Ke(e, null, I, k, M, U, r, a, i)) : l.push(M), ee(e, !0, t), x = e.input.charCodeAt(e.position), x === 44 ? (n = !0, x = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1998
1998
|
}
|
|
1999
1999
|
q(e, "unexpected end of the stream within a flow collection");
|
|
2000
2000
|
}
|
|
@@ -2062,12 +2062,12 @@ function rn(e, t) {
|
|
|
2062
2062
|
return l ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = i, !0) : !1;
|
|
2063
2063
|
}
|
|
2064
2064
|
function no(e, t, n) {
|
|
2065
|
-
var r, a, i, o, l, s, u = e.tag, d = e.anchor, c = {}, C = /* @__PURE__ */ Object.create(null), y = null,
|
|
2065
|
+
var r, a, i, o, l, s, u = e.tag, d = e.anchor, c = {}, C = /* @__PURE__ */ Object.create(null), y = null, I = null, M = null, k = !1, U = !1, x;
|
|
2066
2066
|
if (e.firstTabInLine !== -1)
|
|
2067
2067
|
return !1;
|
|
2068
2068
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), x = e.input.charCodeAt(e.position); x !== 0; ) {
|
|
2069
2069
|
if (!k && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, q(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), i = e.line, (x === 63 || x === 58) && de(r))
|
|
2070
|
-
x === 63 ? (k && (Ke(e, c, C, y,
|
|
2070
|
+
x === 63 ? (k && (Ke(e, c, C, y, I, null, o, l, s), y = I = M = null), U = !0, k = !0, a = !0) : k ? (k = !1, a = !0) : q(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, x = r;
|
|
2071
2071
|
else {
|
|
2072
2072
|
if (o = e.line, l = e.lineStart, s = e.position, !Le(e, n, Jn, !1, !0))
|
|
2073
2073
|
break;
|
|
@@ -2075,7 +2075,7 @@ function no(e, t, n) {
|
|
|
2075
2075
|
for (x = e.input.charCodeAt(e.position); Ne(x); )
|
|
2076
2076
|
x = e.input.charCodeAt(++e.position);
|
|
2077
2077
|
if (x === 58)
|
|
2078
|
-
x = e.input.charCodeAt(++e.position), de(x) || q(e, "a whitespace character is expected after the key-value separator within a block mapping"), k && (Ke(e, c, C, y,
|
|
2078
|
+
x = e.input.charCodeAt(++e.position), de(x) || q(e, "a whitespace character is expected after the key-value separator within a block mapping"), k && (Ke(e, c, C, y, I, null, o, l, s), y = I = M = null), U = !0, k = !1, a = !1, y = e.tag, I = e.result;
|
|
2079
2079
|
else if (U)
|
|
2080
2080
|
q(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2081
2081
|
else
|
|
@@ -2085,12 +2085,12 @@ function no(e, t, n) {
|
|
|
2085
2085
|
else
|
|
2086
2086
|
return e.tag = u, e.anchor = d, !0;
|
|
2087
2087
|
}
|
|
2088
|
-
if ((e.line === i || e.lineIndent > t) && (k && (o = e.line, l = e.lineStart, s = e.position), Le(e, t, et, !0, a) && (k ?
|
|
2088
|
+
if ((e.line === i || e.lineIndent > t) && (k && (o = e.line, l = e.lineStart, s = e.position), Le(e, t, et, !0, a) && (k ? I = e.result : M = e.result), k || (Ke(e, c, C, y, I, M, o, l, s), y = I = M = null), ee(e, !0, -1), x = e.input.charCodeAt(e.position)), (e.line === i || e.lineIndent > t) && x !== 0)
|
|
2089
2089
|
q(e, "bad indentation of a mapping entry");
|
|
2090
2090
|
else if (e.lineIndent < t)
|
|
2091
2091
|
break;
|
|
2092
2092
|
}
|
|
2093
|
-
return k && Ke(e, c, C, y,
|
|
2093
|
+
return k && Ke(e, c, C, y, I, null, o, l, s), U && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), U;
|
|
2094
2094
|
}
|
|
2095
2095
|
function ro(e) {
|
|
2096
2096
|
var t, n = !1, r = !1, a, i, o;
|
|
@@ -2131,7 +2131,7 @@ function io(e) {
|
|
|
2131
2131
|
return e.position === t && q(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), xe.call(e.anchorMap, n) || q(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], ee(e, !0, -1), !0;
|
|
2132
2132
|
}
|
|
2133
2133
|
function Le(e, t, n, r, a) {
|
|
2134
|
-
var i, o, l, s = 1, u = !1, d = !1, c, C, y,
|
|
2134
|
+
var i, o, l, s = 1, u = !1, d = !1, c, C, y, I, M, k;
|
|
2135
2135
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = o = l = et === n || Wn === n, r && ee(e, !0, -1) && (u = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
2136
2136
|
for (; ro(e) || ao(e); )
|
|
2137
2137
|
ee(e, !0, -1) ? (u = !0, l = i, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
@@ -2139,20 +2139,20 @@ function Le(e, t, n, r, a) {
|
|
|
2139
2139
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2140
2140
|
else if (e.tag === "?") {
|
|
2141
2141
|
for (e.result !== null && e.kind !== "scalar" && q(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, C = e.implicitTypes.length; c < C; c += 1)
|
|
2142
|
-
if (
|
|
2143
|
-
e.result =
|
|
2142
|
+
if (I = e.implicitTypes[c], I.resolve(e.result)) {
|
|
2143
|
+
e.result = I.construct(e.result), e.tag = I.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2144
2144
|
break;
|
|
2145
2145
|
}
|
|
2146
2146
|
} else if (e.tag !== "!") {
|
|
2147
2147
|
if (xe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2148
|
-
|
|
2148
|
+
I = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2149
2149
|
else
|
|
2150
|
-
for (
|
|
2150
|
+
for (I = null, y = e.typeMap.multi[e.kind || "fallback"], c = 0, C = y.length; c < C; c += 1)
|
|
2151
2151
|
if (e.tag.slice(0, y[c].tag.length) === y[c].tag) {
|
|
2152
|
-
|
|
2152
|
+
I = y[c];
|
|
2153
2153
|
break;
|
|
2154
2154
|
}
|
|
2155
|
-
|
|
2155
|
+
I || q(e, "unknown tag !<" + e.tag + ">"), e.result !== null && I.kind !== e.kind && q(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + I.kind + '", not "' + e.kind + '"'), I.resolve(e.result, e.tag) ? (e.result = I.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : q(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2156
2156
|
}
|
|
2157
2157
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2158
2158
|
}
|
|
@@ -2216,7 +2216,7 @@ function so(e, t) {
|
|
|
2216
2216
|
var uo = lo, co = so, nr = {
|
|
2217
2217
|
loadAll: uo,
|
|
2218
2218
|
load: co
|
|
2219
|
-
}, rr = Object.prototype.toString, ar = Object.prototype.hasOwnProperty, Tt = 65279, po = 9, Ge = 10, fo = 13, mo = 32, go = 33, yo = 34, vt = 35, ho = 37, vo = 38, bo = 39, Co = 42, ir = 44, ko = 45, nt = 58, wo = 61,
|
|
2219
|
+
}, rr = Object.prototype.toString, ar = Object.prototype.hasOwnProperty, Tt = 65279, po = 9, Ge = 10, fo = 13, mo = 32, go = 33, yo = 34, vt = 35, ho = 37, vo = 38, bo = 39, Co = 42, ir = 44, ko = 45, nt = 58, wo = 61, Io = 62, _o = 63, So = 64, or = 91, lr = 93, Ao = 96, sr = 123, xo = 124, ur = 125, le = {};
|
|
2220
2220
|
le[0] = "\\0";
|
|
2221
2221
|
le[7] = "\\a";
|
|
2222
2222
|
le[8] = "\\b";
|
|
@@ -2312,7 +2312,7 @@ function ln(e, t, n) {
|
|
|
2312
2312
|
);
|
|
2313
2313
|
}
|
|
2314
2314
|
function qo(e) {
|
|
2315
|
-
return Je(e) && e !== Tt && !rt(e) && e !== ko && e !==
|
|
2315
|
+
return Je(e) && e !== Tt && !rt(e) && e !== ko && e !== _o && e !== nt && e !== ir && e !== or && e !== lr && e !== sr && e !== ur && e !== vt && e !== vo && e !== Co && e !== go && e !== xo && e !== wo && e !== Io && e !== bo && e !== yo && e !== ho && e !== So && e !== Ao;
|
|
2316
2316
|
}
|
|
2317
2317
|
function Fo(e) {
|
|
2318
2318
|
return !rt(e) && e !== nt;
|
|
@@ -2327,7 +2327,7 @@ function cr(e) {
|
|
|
2327
2327
|
}
|
|
2328
2328
|
var dr = 1, Ct = 2, pr = 3, fr = 4, Fe = 5;
|
|
2329
2329
|
function Bo(e, t, n, r, a, i, o, l) {
|
|
2330
|
-
var s, u = 0, d = null, c = !1, C = !1, y = r !== -1,
|
|
2330
|
+
var s, u = 0, d = null, c = !1, C = !1, y = r !== -1, I = -1, M = qo(Pe(e, 0)) && Fo(Pe(e, e.length - 1));
|
|
2331
2331
|
if (t || o)
|
|
2332
2332
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2333
2333
|
if (u = Pe(e, s), !Je(u))
|
|
@@ -2338,12 +2338,12 @@ function Bo(e, t, n, r, a, i, o, l) {
|
|
|
2338
2338
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2339
2339
|
if (u = Pe(e, s), u === Ge)
|
|
2340
2340
|
c = !0, y && (C = C || // Foldable line = too long, and not more-indented.
|
|
2341
|
-
s -
|
|
2341
|
+
s - I - 1 > r && e[I + 1] !== " ", I = s);
|
|
2342
2342
|
else if (!Je(u))
|
|
2343
2343
|
return Fe;
|
|
2344
2344
|
M = M && ln(u, d, l), d = u;
|
|
2345
2345
|
}
|
|
2346
|
-
C = C || y && s -
|
|
2346
|
+
C = C || y && s - I - 1 > r && e[I + 1] !== " ";
|
|
2347
2347
|
}
|
|
2348
2348
|
return !c && !C ? M && !o && !a(e) ? dr : i === He ? Fe : Ct : n > 9 && cr(e) ? Fe : o ? i === He ? Fe : Ct : C ? fr : pr;
|
|
2349
2349
|
}
|
|
@@ -2630,7 +2630,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2630
2630
|
}
|
|
2631
2631
|
},
|
|
2632
2632
|
setup(e) {
|
|
2633
|
-
const t = e, n =
|
|
2633
|
+
const t = e, n = It(), { i18n: { t: r } } = ne.useI18n(), a = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), i = w(() => {
|
|
2634
2634
|
if (!t.record)
|
|
2635
2635
|
return t.record;
|
|
2636
2636
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
@@ -2687,7 +2687,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2687
2687
|
for (const [r, a] of t)
|
|
2688
2688
|
n[r] = a;
|
|
2689
2689
|
return n;
|
|
2690
|
-
}, gl = (e) => (Re("data-v-
|
|
2690
|
+
}, gl = (e) => (Re("data-v-f68c7837"), e = e(), Ve(), e), yl = ["aria-hidden"], hl = {
|
|
2691
2691
|
key: 0,
|
|
2692
2692
|
"data-testid": "kui-icon-svg-title"
|
|
2693
2693
|
}, vl = /* @__PURE__ */ gl(() => /* @__PURE__ */ F("path", {
|
|
@@ -2786,10 +2786,10 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2786
2786
|
_: 1
|
|
2787
2787
|
}, 8, ["aria-hidden", "style"]));
|
|
2788
2788
|
}
|
|
2789
|
-
}), Cl = /* @__PURE__ */ We(bl, [["__scopeId", "data-v-
|
|
2789
|
+
}), Cl = /* @__PURE__ */ We(bl, [["__scopeId", "data-v-f68c7837"]]), kl = (e) => (Re("data-v-9af646cc"), e = e(), Ve(), e), wl = ["aria-hidden"], Il = {
|
|
2790
2790
|
key: 0,
|
|
2791
2791
|
"data-testid": "kui-icon-svg-title"
|
|
2792
|
-
},
|
|
2792
|
+
}, _l = /* @__PURE__ */ kl(() => /* @__PURE__ */ F("path", {
|
|
2793
2793
|
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",
|
|
2794
2794
|
fill: "currentColor"
|
|
2795
2795
|
}, null, -1)), Sl = /* @__PURE__ */ W({
|
|
@@ -2878,14 +2878,14 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2878
2878
|
width: "100%",
|
|
2879
2879
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2880
2880
|
}, [
|
|
2881
|
-
e.title ? (f(), O("title",
|
|
2882
|
-
|
|
2881
|
+
e.title ? (f(), O("title", Il, j(e.title), 1)) : P("", !0),
|
|
2882
|
+
_l
|
|
2883
2883
|
], 8, wl))
|
|
2884
2884
|
]),
|
|
2885
2885
|
_: 1
|
|
2886
2886
|
}, 8, ["aria-hidden", "style"]));
|
|
2887
2887
|
}
|
|
2888
|
-
}), Al = /* @__PURE__ */ We(Sl, [["__scopeId", "data-v-
|
|
2888
|
+
}), Al = /* @__PURE__ */ We(Sl, [["__scopeId", "data-v-9af646cc"]]), xl = (e) => (Re("data-v-84c4811e"), e = e(), Ve(), e), $l = ["aria-hidden"], Nl = {
|
|
2889
2889
|
key: 0,
|
|
2890
2890
|
"data-testid": "kui-icon-svg-title"
|
|
2891
2891
|
}, Tl = /* @__PURE__ */ xl(() => /* @__PURE__ */ F("path", {
|
|
@@ -2984,7 +2984,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2984
2984
|
_: 1
|
|
2985
2985
|
}, 8, ["aria-hidden", "style"]));
|
|
2986
2986
|
}
|
|
2987
|
-
}), Ol = /* @__PURE__ */ We(jl, [["__scopeId", "data-v-
|
|
2987
|
+
}), Ol = /* @__PURE__ */ We(jl, [["__scopeId", "data-v-84c4811e"]]), Ml = (e) => (Re("data-v-26ad8dc6"), e = e(), Ve(), e), El = ["aria-hidden"], ql = {
|
|
2988
2988
|
key: 0,
|
|
2989
2989
|
"data-testid": "kui-icon-svg-title"
|
|
2990
2990
|
}, Fl = /* @__PURE__ */ Ml(() => /* @__PURE__ */ F("path", {
|
|
@@ -3083,7 +3083,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3083
3083
|
_: 1
|
|
3084
3084
|
}, 8, ["aria-hidden", "style"]));
|
|
3085
3085
|
}
|
|
3086
|
-
}), Kl = /* @__PURE__ */ We(Bl, [["__scopeId", "data-v-
|
|
3086
|
+
}), Kl = /* @__PURE__ */ We(Bl, [["__scopeId", "data-v-26ad8dc6"]]), Ll = (e) => (Re("data-v-d43c21f8"), e = e(), Ve(), e), Ul = ["aria-hidden"], Rl = {
|
|
3087
3087
|
key: 0,
|
|
3088
3088
|
"data-testid": "kui-icon-svg-title"
|
|
3089
3089
|
}, Vl = /* @__PURE__ */ Ll(() => /* @__PURE__ */ F("path", {
|
|
@@ -3182,7 +3182,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3182
3182
|
_: 1
|
|
3183
3183
|
}, 8, ["aria-hidden", "style"]));
|
|
3184
3184
|
}
|
|
3185
|
-
}), Pl = /* @__PURE__ */ We(Dl, [["__scopeId", "data-v-
|
|
3185
|
+
}), Pl = /* @__PURE__ */ We(Dl, [["__scopeId", "data-v-d43c21f8"]]), zl = {
|
|
3186
3186
|
class: "config-card-title",
|
|
3187
3187
|
"data-testid": "config-card-title"
|
|
3188
3188
|
}, Gl = { class: "config-card-actions" }, Hl = ["href"], Jl = { class: "config-card-details-section" }, Wl = /* @__PURE__ */ W({
|
|
@@ -3314,21 +3314,21 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3314
3314
|
// the last property displayed
|
|
3315
3315
|
section: ce.Basic
|
|
3316
3316
|
}
|
|
3317
|
-
}, y = B(!1),
|
|
3317
|
+
}, y = B(!1), I = B(!1), M = B(""), k = B({}), U = w(() => {
|
|
3318
3318
|
var p, A, b;
|
|
3319
3319
|
if (!k.value)
|
|
3320
3320
|
return [];
|
|
3321
3321
|
const g = [], K = Object.keys(k.value).length;
|
|
3322
3322
|
for (const E in k.value) {
|
|
3323
|
-
const
|
|
3323
|
+
const _ = (A = (p = a.configSchema) == null ? void 0 : p[E]) == null ? void 0 : A.order, $ = (b = C[E]) == null ? void 0 : b.order;
|
|
3324
3324
|
let L = K;
|
|
3325
|
-
($ || $ === 0) && (L = $ === -1 ? K + 1 : $),
|
|
3325
|
+
($ || $ === 0) && (L = $ === -1 ? K + 1 : $), _ && (L = _ === -1 ? K + 1 : _), g.push([E, L]);
|
|
3326
3326
|
}
|
|
3327
|
-
return g.sort(function(E,
|
|
3328
|
-
return E[1] -
|
|
3327
|
+
return g.sort(function(E, _) {
|
|
3328
|
+
return E[1] - _[1];
|
|
3329
3329
|
}), g.map((E) => {
|
|
3330
|
-
var
|
|
3331
|
-
const L = E[0], D = (
|
|
3330
|
+
var _, $;
|
|
3331
|
+
const L = E[0], D = (_ = k.value) == null ? void 0 : _[L], z = (($ = a.configSchema) == null ? void 0 : $[L]) || {}, oe = C[L];
|
|
3332
3332
|
return {
|
|
3333
3333
|
key: L,
|
|
3334
3334
|
value: D,
|
|
@@ -3345,15 +3345,15 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3345
3345
|
return [];
|
|
3346
3346
|
const b = k.value[a.pluginConfigKey] || {}, g = Object.keys(b).length, K = [];
|
|
3347
3347
|
for (const E in b) {
|
|
3348
|
-
const
|
|
3348
|
+
const _ = (A = (p = a.pluginConfigSchema) == null ? void 0 : p[E]) == null ? void 0 : A.order, $ = b[E];
|
|
3349
3349
|
let L = $ != null && $ !== "" ? g - 1 : g;
|
|
3350
|
-
|
|
3350
|
+
_ && (L = _ === -1 ? g + 1 : _), K.push([E, L]);
|
|
3351
3351
|
}
|
|
3352
|
-
return K.sort(function(E,
|
|
3353
|
-
return E[1] -
|
|
3352
|
+
return K.sort(function(E, _) {
|
|
3353
|
+
return E[1] - _[1];
|
|
3354
3354
|
}), K.map((E) => {
|
|
3355
|
-
var
|
|
3356
|
-
const $ = E[0], L = b[$], D = ((
|
|
3355
|
+
var _;
|
|
3356
|
+
const $ = E[0], L = b[$], D = ((_ = a.pluginConfigSchema) == null ? void 0 : _[$]) || {};
|
|
3357
3357
|
return {
|
|
3358
3358
|
key: $,
|
|
3359
3359
|
value: L,
|
|
@@ -3382,7 +3382,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3382
3382
|
return ke(y, (p) => {
|
|
3383
3383
|
r("loading", p);
|
|
3384
3384
|
}, { immediate: !0 }), wt(async () => {
|
|
3385
|
-
|
|
3385
|
+
I.value = !1, y.value = !0;
|
|
3386
3386
|
try {
|
|
3387
3387
|
const { data: p } = await s.get(S.value);
|
|
3388
3388
|
if (a.dataKey)
|
|
@@ -3397,12 +3397,12 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3397
3397
|
}), r("fetch:success", p);
|
|
3398
3398
|
} catch (p) {
|
|
3399
3399
|
const A = o(p);
|
|
3400
|
-
M.value = A.startsWith("code") ? i("baseConfigCard.errors.load") : A,
|
|
3400
|
+
M.value = A.startsWith("code") ? i("baseConfigCard.errors.load") : A, I.value = !0, r("fetch:error", p);
|
|
3401
3401
|
} finally {
|
|
3402
3402
|
y.value = !1;
|
|
3403
3403
|
}
|
|
3404
3404
|
}), (p, A) => {
|
|
3405
|
-
const b = R("KLabel"), g = R("KSelect"), K = R("KButton"), E = R("KSkeleton"),
|
|
3405
|
+
const b = R("KLabel"), g = R("KSelect"), K = R("KButton"), E = R("KSkeleton"), _ = R("KEmptyState"), $ = R("KCard");
|
|
3406
3406
|
return f(), V($, {
|
|
3407
3407
|
class: "kong-ui-entity-base-config-card",
|
|
3408
3408
|
"title-tag": e.titleTag
|
|
@@ -3449,7 +3449,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3449
3449
|
"data-testid": "config-card-loader",
|
|
3450
3450
|
"table-columns": 2,
|
|
3451
3451
|
type: "table"
|
|
3452
|
-
})) :
|
|
3452
|
+
})) : I.value ? (f(), V(_, {
|
|
3453
3453
|
key: 1,
|
|
3454
3454
|
"data-testid": "config-card-fetch-error",
|
|
3455
3455
|
"icon-variant": "error"
|
|
@@ -3568,7 +3568,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3568
3568
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3569
3569
|
setup(e, { emit: t }) {
|
|
3570
3570
|
var n;
|
|
3571
|
-
const r = t, a = e, i =
|
|
3571
|
+
const r = t, a = e, i = _t(), { i18n: { t: o } } = ne.useI18n(), { getMessageFromError: l } = ne.useErrors(), { axiosInstance: s } = ne.useAxios((n = a.config) == null ? void 0 : n.axiosRequestConfig), u = B(!1), d = B(!1), c = B(""), C = w(() => a.canSubmit === !1 || a.isReadonly), y = B(!1), I = w(() => {
|
|
3572
3572
|
var v, S;
|
|
3573
3573
|
let p = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3574
3574
|
return a.config.app === "konnect" ? p = p.replace(/{controlPlaneId}/gi, ((v = a.config) == null ? void 0 : v.controlPlaneId) || "") : a.config.app === "kongManager" && (p = p.replace(/\/{workspace}/gi, (S = a.config) != null && S.workspace ? `/${a.config.workspace}` : "")), a.editId ? (p = p.replace(/{id}/gi, a.editId), p) : (p = p.replace(/\/{id}/gi, ""), p);
|
|
@@ -3596,7 +3596,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3596
3596
|
if (a.editId)
|
|
3597
3597
|
try {
|
|
3598
3598
|
d.value = !1, u.value = !0;
|
|
3599
|
-
const { data: v } = await s.get(
|
|
3599
|
+
const { data: v } = await s.get(I.value);
|
|
3600
3600
|
r("fetch:success", v);
|
|
3601
3601
|
} catch (v) {
|
|
3602
3602
|
const S = l(v);
|
|
@@ -3641,7 +3641,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3641
3641
|
T(g, {
|
|
3642
3642
|
appearance: "tertiary",
|
|
3643
3643
|
"data-testid": "form-view-configuration",
|
|
3644
|
-
onClick: S[0] || (S[0] = (
|
|
3644
|
+
onClick: S[0] || (S[0] = (_) => M())
|
|
3645
3645
|
}, {
|
|
3646
3646
|
default: h(() => [
|
|
3647
3647
|
H(j(m(o)("baseForm.actions.viewConfiguration")), 1)
|
|
@@ -3680,7 +3680,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3680
3680
|
"offset-top": 60,
|
|
3681
3681
|
title: m(o)("baseForm.configuration.title"),
|
|
3682
3682
|
visible: y.value,
|
|
3683
|
-
onClose: S[1] || (S[1] = (
|
|
3683
|
+
onClose: S[1] || (S[1] = (_) => M())
|
|
3684
3684
|
}, {
|
|
3685
3685
|
default: h(() => [
|
|
3686
3686
|
F("div", null, j(m(o)("baseForm.configuration.message")), 1),
|
|
@@ -3691,7 +3691,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3691
3691
|
json: h(() => [
|
|
3692
3692
|
T(An, {
|
|
3693
3693
|
config: e.config,
|
|
3694
|
-
"fetcher-url":
|
|
3694
|
+
"fetcher-url": I.value,
|
|
3695
3695
|
"json-record": a.formFields,
|
|
3696
3696
|
"request-method": a.editId ? "put" : "post"
|
|
3697
3697
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
@@ -3750,7 +3750,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3750
3750
|
J -= (parseFloat(v.paddingLeft) || 0) + (parseFloat(v.paddingRight) || 0);
|
|
3751
3751
|
}
|
|
3752
3752
|
d.value = ((U = r.value) == null ? void 0 : U.getBoundingClientRect().width) || 0, c.value = J, C.value = ((x = u.value) == null ? void 0 : x.innerText) || "";
|
|
3753
|
-
}, u = B({}), d = B(0), c = B(0), C = B(""), y = w(() => [r.value, n.value]),
|
|
3753
|
+
}, u = B({}), d = B(0), c = B(0), C = B(""), y = w(() => [r.value, n.value]), I = ke(
|
|
3754
3754
|
y,
|
|
3755
3755
|
(k) => {
|
|
3756
3756
|
if (i.value && (l(), "ResizeObserver" in window && window)) {
|
|
@@ -3768,7 +3768,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3768
3768
|
return Ar(() => {
|
|
3769
3769
|
s();
|
|
3770
3770
|
}), xr(() => {
|
|
3771
|
-
|
|
3771
|
+
I();
|
|
3772
3772
|
}), (k, U) => {
|
|
3773
3773
|
const x = R("KTooltip");
|
|
3774
3774
|
return f(), O("span", {
|
|
@@ -3958,8 +3958,8 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3958
3958
|
textOverflow: "ellipsis"
|
|
3959
3959
|
}), A;
|
|
3960
3960
|
}, y = () => {
|
|
3961
|
-
r("empty-state-cta-clicked"),
|
|
3962
|
-
},
|
|
3961
|
+
r("empty-state-cta-clicked"), I();
|
|
3962
|
+
}, I = () => {
|
|
3963
3963
|
r("clear-search-input");
|
|
3964
3964
|
}, M = w(() => n.disableRowClick ? void 0 : (p, A) => {
|
|
3965
3965
|
r("click:row", A);
|
|
@@ -4012,23 +4012,23 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4012
4012
|
"table-preferences": J.value,
|
|
4013
4013
|
onEmptyStateActionClick: y,
|
|
4014
4014
|
"onRow:click": M.value,
|
|
4015
|
-
onSort: A[0] || (A[0] = (
|
|
4015
|
+
onSort: A[0] || (A[0] = (_) => k(_)),
|
|
4016
4016
|
"onUpdate:tablePreferences": S
|
|
4017
4017
|
}, Te({
|
|
4018
|
-
toolbar: h(({ state:
|
|
4019
|
-
|
|
4018
|
+
toolbar: h(({ state: _ }) => [
|
|
4019
|
+
Ie(F("div", as, [
|
|
4020
4020
|
Q(p.$slots, "toolbar-filter", {}, void 0, !0),
|
|
4021
4021
|
p.$slots["toolbar-button"] ? (f(), O("div", is, [
|
|
4022
4022
|
Q(p.$slots, "toolbar-button", {}, void 0, !0)
|
|
4023
4023
|
])) : P("", !0)
|
|
4024
4024
|
], 512), [
|
|
4025
|
-
[
|
|
4025
|
+
[_e, l(_)]
|
|
4026
4026
|
])
|
|
4027
4027
|
]),
|
|
4028
|
-
actions: h(({ row:
|
|
4028
|
+
actions: h(({ row: _, rowKey: $, rowValue: L }) => [
|
|
4029
4029
|
F("div", {
|
|
4030
4030
|
class: "actions-container",
|
|
4031
|
-
"data-testid":
|
|
4031
|
+
"data-testid": _.name
|
|
4032
4032
|
}, [
|
|
4033
4033
|
T(g, {
|
|
4034
4034
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
@@ -4036,7 +4036,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4036
4036
|
}, {
|
|
4037
4037
|
items: h(() => [
|
|
4038
4038
|
Q(p.$slots, "actions", {
|
|
4039
|
-
row:
|
|
4039
|
+
row: _,
|
|
4040
4040
|
rowKey: $,
|
|
4041
4041
|
rowValue: L
|
|
4042
4042
|
}, void 0, !0)
|
|
@@ -4061,13 +4061,13 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4061
4061
|
]),
|
|
4062
4062
|
_: 2
|
|
4063
4063
|
}, [
|
|
4064
|
-
pe(e.tableHeaders, (
|
|
4064
|
+
pe(e.tableHeaders, (_, $) => ({
|
|
4065
4065
|
name: $,
|
|
4066
4066
|
fn: h(({ row: L, rowKey: D, rowValue: z }) => [
|
|
4067
4067
|
T(rs, {
|
|
4068
4068
|
"key-name": String($),
|
|
4069
4069
|
"row-el": c(L),
|
|
4070
|
-
tooltip:
|
|
4070
|
+
tooltip: _.tooltip
|
|
4071
4071
|
}, {
|
|
4072
4072
|
default: h(() => [
|
|
4073
4073
|
Q(p.$slots, $, {
|
|
@@ -4214,7 +4214,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4214
4214
|
props: {
|
|
4215
4215
|
color: {
|
|
4216
4216
|
type: String,
|
|
4217
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
4217
|
+
default: `var(--kong-ui-entity-filter-color, ${Ia})`
|
|
4218
4218
|
}
|
|
4219
4219
|
},
|
|
4220
4220
|
setup(e) {
|
|
@@ -4237,7 +4237,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4237
4237
|
}), vs = {
|
|
4238
4238
|
key: 1,
|
|
4239
4239
|
class: "kong-ui-entity-filter"
|
|
4240
|
-
}, bs = { class: "kong-ui-entity-filter-menu" }, Cs = ["data-testid"], ks = ["onClick", "onKeydown"], ws = { class: "menu-item-indicator" },
|
|
4240
|
+
}, bs = { class: "kong-ui-entity-filter-menu" }, Cs = ["data-testid"], ks = ["onClick", "onKeydown"], ws = { class: "menu-item-indicator" }, Is = { class: "menu-item-body" }, _s = ["for"], Ss = { class: "menu-item-buttons" }, As = { class: "filter-clear-button-container" }, xs = /* @__PURE__ */ W({
|
|
4241
4241
|
__name: "EntityFilter",
|
|
4242
4242
|
props: {
|
|
4243
4243
|
// filter config, either exact match or fuzzy match
|
|
@@ -4286,7 +4286,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4286
4286
|
a("update:modelValue", v);
|
|
4287
4287
|
}, y = () => {
|
|
4288
4288
|
C("");
|
|
4289
|
-
},
|
|
4289
|
+
}, I = (v) => `filter-${v}`, M = (v) => {
|
|
4290
4290
|
var S, p;
|
|
4291
4291
|
return (((p = (S = r.config.schema) == null ? void 0 : S[v]) == null ? void 0 : p.values) ?? []).map((A) => ({
|
|
4292
4292
|
value: A,
|
|
@@ -4321,11 +4321,11 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4321
4321
|
T(fn)
|
|
4322
4322
|
]),
|
|
4323
4323
|
after: h(() => [
|
|
4324
|
-
|
|
4324
|
+
Ie(T(m(Kl), {
|
|
4325
4325
|
class: "kong-ui-entity-filter-clear",
|
|
4326
4326
|
onClick: y
|
|
4327
4327
|
}, null, 512), [
|
|
4328
|
-
[
|
|
4328
|
+
[_e, e.modelValue !== ""]
|
|
4329
4329
|
])
|
|
4330
4330
|
]),
|
|
4331
4331
|
_: 1
|
|
@@ -4341,13 +4341,13 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4341
4341
|
]),
|
|
4342
4342
|
_: 1
|
|
4343
4343
|
}),
|
|
4344
|
-
|
|
4344
|
+
Ie(F("div", {
|
|
4345
4345
|
class: "kong-ui-entity-filter-backdrop",
|
|
4346
4346
|
onClick: d
|
|
4347
4347
|
}, null, 512), [
|
|
4348
|
-
[
|
|
4348
|
+
[_e, i.value]
|
|
4349
4349
|
]),
|
|
4350
|
-
|
|
4350
|
+
Ie(F("div", bs, [
|
|
4351
4351
|
(f(!0), O(fe, null, pe(u.value, (g) => {
|
|
4352
4352
|
var K, E;
|
|
4353
4353
|
return f(), O("div", {
|
|
@@ -4359,48 +4359,48 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4359
4359
|
class: Ae(["menu-item-title", { expanded: l.value.has(g.value) }]),
|
|
4360
4360
|
role: "button",
|
|
4361
4361
|
tabindex: "0",
|
|
4362
|
-
onClick: (
|
|
4363
|
-
onKeydown:
|
|
4362
|
+
onClick: (_) => c(g.value),
|
|
4363
|
+
onKeydown: _r((_) => c(g.value), ["enter"])
|
|
4364
4364
|
}, [
|
|
4365
4365
|
H(j(g.label) + " ", 1),
|
|
4366
|
-
|
|
4367
|
-
[
|
|
4366
|
+
Ie(F("span", ws, null, 512), [
|
|
4367
|
+
[_e, s.value.includes(g.value)]
|
|
4368
4368
|
]),
|
|
4369
4369
|
T(m(Ol), {
|
|
4370
4370
|
class: Ae(["menu-item-expand-icon", { expanded: l.value.has(g.value) }]),
|
|
4371
4371
|
color: m(Sa)
|
|
4372
4372
|
}, null, 8, ["class", "color"])
|
|
4373
4373
|
], 42, ks),
|
|
4374
|
-
|
|
4374
|
+
Ie(F("div", Is, [
|
|
4375
4375
|
F("label", {
|
|
4376
4376
|
class: "menu-item-label",
|
|
4377
|
-
for:
|
|
4378
|
-
}, j(m(n)("filter.fieldLabel")), 9,
|
|
4377
|
+
for: I(g.value)
|
|
4378
|
+
}, j(m(n)("filter.fieldLabel")), 9, _s),
|
|
4379
4379
|
((E = (K = e.config.schema) == null ? void 0 : K[g.value]) == null ? void 0 : E.type) === "select" ? (f(), V(b, {
|
|
4380
4380
|
key: 0,
|
|
4381
|
-
id:
|
|
4381
|
+
id: I(g.value),
|
|
4382
4382
|
modelValue: o.value[g.value],
|
|
4383
|
-
"onUpdate:modelValue": (
|
|
4383
|
+
"onUpdate:modelValue": (_) => o.value[g.value] = _,
|
|
4384
4384
|
items: M(g.value),
|
|
4385
4385
|
placeholder: m(n)("filter.selectPlaceholder")
|
|
4386
4386
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (f(), V(p, {
|
|
4387
4387
|
key: 1,
|
|
4388
|
-
id:
|
|
4388
|
+
id: I(g.value),
|
|
4389
4389
|
modelValue: o.value[g.value],
|
|
4390
|
-
"onUpdate:modelValue": (
|
|
4390
|
+
"onUpdate:modelValue": (_) => o.value[g.value] = _,
|
|
4391
4391
|
autocomplete: "off",
|
|
4392
4392
|
placeholder: m(n)("filter.inputPlaceholder"),
|
|
4393
4393
|
type: k(g.value)
|
|
4394
4394
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4395
4395
|
], 512), [
|
|
4396
|
-
[
|
|
4396
|
+
[_e, l.value.has(g.value)]
|
|
4397
4397
|
]),
|
|
4398
|
-
|
|
4398
|
+
Ie(F("div", Ss, [
|
|
4399
4399
|
T(A, {
|
|
4400
4400
|
appearance: "tertiary",
|
|
4401
4401
|
"data-testid": "apply-filter",
|
|
4402
4402
|
size: "small",
|
|
4403
|
-
onClick: S[0] || (S[0] = (
|
|
4403
|
+
onClick: S[0] || (S[0] = (_) => J(!0))
|
|
4404
4404
|
}, {
|
|
4405
4405
|
default: h(() => [
|
|
4406
4406
|
H(j(m(n)("filter.applyButtonText")), 1)
|
|
@@ -4411,7 +4411,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4411
4411
|
appearance: "tertiary",
|
|
4412
4412
|
"data-testid": "clear-filter",
|
|
4413
4413
|
size: "small",
|
|
4414
|
-
onClick: (
|
|
4414
|
+
onClick: (_) => U(g.value)
|
|
4415
4415
|
}, {
|
|
4416
4416
|
default: h(() => [
|
|
4417
4417
|
H(j(m(n)("filter.clearButtonText")), 1)
|
|
@@ -4419,7 +4419,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4419
4419
|
_: 2
|
|
4420
4420
|
}, 1032, ["onClick"])
|
|
4421
4421
|
], 512), [
|
|
4422
|
-
[
|
|
4422
|
+
[_e, l.value.has(g.value)]
|
|
4423
4423
|
])
|
|
4424
4424
|
], 8, Cs);
|
|
4425
4425
|
}), 128)),
|
|
@@ -4436,7 +4436,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4436
4436
|
})
|
|
4437
4437
|
])
|
|
4438
4438
|
], 512), [
|
|
4439
|
-
[
|
|
4439
|
+
[_e, i.value]
|
|
4440
4440
|
])
|
|
4441
4441
|
]));
|
|
4442
4442
|
};
|
|
@@ -4536,7 +4536,7 @@ const Es = ["aria-labelledby"], qs = { class: "form-section-wrapper" }, Fs = {
|
|
|
4536
4536
|
}
|
|
4537
4537
|
},
|
|
4538
4538
|
setup(e) {
|
|
4539
|
-
const t =
|
|
4539
|
+
const t = It(), n = Ms();
|
|
4540
4540
|
return (r, a) => (f(), O("div", {
|
|
4541
4541
|
"aria-labelledby": e.title ? m(n) : void 0,
|
|
4542
4542
|
class: Ae(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
@@ -4572,7 +4572,7 @@ const Es = ["aria-labelledby"], qs = { class: "form-section-wrapper" }, Fs = {
|
|
|
4572
4572
|
])
|
|
4573
4573
|
], 10, Es));
|
|
4574
4574
|
}
|
|
4575
|
-
}), Us = /* @__PURE__ */ me(Ls, [["__scopeId", "data-v-b1f74200"]]), { useAxios: Ot, useDeleteUrlBuilder: Rs, useErrors: Vs, useExternalLinkCreator: vu, useFetchUrlBuilder: bu, useFetcher: Ds, useDebouncedFilter: Ps, useStringHelpers: Cu, useHelpers: ku, useGatewayFeatureSupported: wu, useTruncationDetector:
|
|
4575
|
+
}), Us = /* @__PURE__ */ me(Ls, [["__scopeId", "data-v-b1f74200"]]), { useAxios: Ot, useDeleteUrlBuilder: Rs, useErrors: Vs, useExternalLinkCreator: vu, useFetchUrlBuilder: bu, useFetcher: Ds, useDebouncedFilter: Ps, useStringHelpers: Cu, useHelpers: ku, useGatewayFeatureSupported: wu, useTruncationDetector: Iu, useValidators: _u } = ne, zs = { class: "add-consumer-form-container" }, Gs = { class: "add-consumer-form-cta" }, Hs = { class: "select-item-label" }, Js = {
|
|
4576
4576
|
key: 0,
|
|
4577
4577
|
class: "select-item-desc"
|
|
4578
4578
|
}, Ws = {
|
|
@@ -4595,8 +4595,8 @@ const Es = ["aria-labelledby"], qs = { class: "form-section-wrapper" }, Fs = {
|
|
|
4595
4595
|
},
|
|
4596
4596
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4597
4597
|
setup(e, { emit: t }) {
|
|
4598
|
-
var
|
|
4599
|
-
const { i18n: { t: n } } = at.useI18n(), r = e, a = t, { axiosInstance: i } = Ot((
|
|
4598
|
+
var _;
|
|
4599
|
+
const { i18n: { t: n } } = at.useI18n(), r = e, a = t, { axiosInstance: i } = Ot((_ = r.config) == null ? void 0 : _.axiosRequestConfig), o = B([]), {
|
|
4600
4600
|
debouncedQueryChange: l,
|
|
4601
4601
|
loading: s,
|
|
4602
4602
|
allRecords: u,
|
|
@@ -4611,7 +4611,7 @@ const Es = ["aria-labelledby"], qs = { class: "form-section-wrapper" }, Fs = {
|
|
|
4611
4611
|
fetchedItemsKey: "data",
|
|
4612
4612
|
searchKeys: ["username", "id"]
|
|
4613
4613
|
}
|
|
4614
|
-
), y = ($) => $,
|
|
4614
|
+
), y = ($) => $, I = w(() => d.value ? n("consumers.errors.general") : ""), M = B(0), k = w(() => u.value === void 0), U = w(() => C.value.map(($) => ({
|
|
4615
4615
|
label: $.username || $.customId,
|
|
4616
4616
|
value: $.id,
|
|
4617
4617
|
selected: o.value.includes($.id),
|
|
@@ -4700,14 +4700,14 @@ const Es = ["aria-labelledby"], qs = { class: "form-section-wrapper" }, Fs = {
|
|
|
4700
4700
|
]),
|
|
4701
4701
|
_: 1
|
|
4702
4702
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4703
|
-
p.value ||
|
|
4703
|
+
p.value || I.value || K.value.length ? (f(), O("div", Ws, [
|
|
4704
4704
|
T(z, { appearance: "danger" }, {
|
|
4705
4705
|
default: h(() => [
|
|
4706
4706
|
F("p", null, j(m(n)("consumers.errors.add")), 1),
|
|
4707
4707
|
K.value.length ? (f(), O("ul", Zs, [
|
|
4708
4708
|
(f(!0), O(fe, null, pe(K.value, (ge, lt) => (f(), O("li", { key: lt }, j(ge), 1))), 128))
|
|
4709
4709
|
])) : P("", !0),
|
|
4710
|
-
F("div", null, j(p.value ||
|
|
4710
|
+
F("div", null, j(p.value || I.value), 1)
|
|
4711
4711
|
]),
|
|
4712
4712
|
_: 1
|
|
4713
4713
|
})
|
|
@@ -4770,13 +4770,13 @@ const Es = ["aria-labelledby"], qs = { class: "form-section-wrapper" }, Fs = {
|
|
|
4770
4770
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4771
4771
|
setup(e, { emit: t }) {
|
|
4772
4772
|
var Ut;
|
|
4773
|
-
const n = t, r = e, { i18nT: a, i18n: { t: i } } = at.useI18n(), o =
|
|
4773
|
+
const n = t, r = e, { i18nT: a, i18n: { t: i } } = at.useI18n(), o = _t(), { axiosInstance: l } = Ot((Ut = r.config) == null ? void 0 : Ut.axiosRequestConfig), s = B(1), u = w(() => !!r.config.consumerGroupId), d = w(
|
|
4774
4774
|
() => u.value ? "kong-ui-entities-consumers-list-in-group-page" : "kong-ui-entities-consumers-list"
|
|
4775
4775
|
), c = w(() => r.config.app !== "kongManager" || !!r.config.disableSorting), C = {
|
|
4776
4776
|
username: { label: i("consumers.list.table_headers.username"), searchable: !0, sortable: !0 },
|
|
4777
4777
|
custom_id: { label: i("consumers.list.table_headers.custom_id"), searchable: !0, sortable: !0 },
|
|
4778
4778
|
tags: { label: i("consumers.list.table_headers.tags"), sortable: !1 }
|
|
4779
|
-
}, y = C,
|
|
4779
|
+
}, y = C, I = (N) => ({
|
|
4780
4780
|
"data-testid": N.username ?? N.custom_id ?? N.id
|
|
4781
4781
|
}), M = w(() => {
|
|
4782
4782
|
var G, X, ue, ye;
|
|
@@ -4830,7 +4830,7 @@ const Es = ["aria-labelledby"], qs = { class: "form-section-wrapper" }, Fs = {
|
|
|
4830
4830
|
}, E = async (N) => {
|
|
4831
4831
|
var X;
|
|
4832
4832
|
await ((X = r.canRetrieve) == null ? void 0 : X.call(r, N)) && o.push(r.config.getViewRoute(N.id));
|
|
4833
|
-
},
|
|
4833
|
+
}, _ = (N) => ({
|
|
4834
4834
|
label: i("consumers.actions.view"),
|
|
4835
4835
|
to: r.config.getViewRoute(N)
|
|
4836
4836
|
}), $ = (N) => ({
|
|
@@ -4915,7 +4915,7 @@ const Es = ["aria-labelledby"], qs = { class: "form-section-wrapper" }, Fs = {
|
|
|
4915
4915
|
"pagination-type": "offset",
|
|
4916
4916
|
"preferences-storage-key": d.value,
|
|
4917
4917
|
query: k.value,
|
|
4918
|
-
"row-attributes":
|
|
4918
|
+
"row-attributes": I,
|
|
4919
4919
|
"table-headers": m(y),
|
|
4920
4920
|
"use-action-outside": e.useActionOutside,
|
|
4921
4921
|
onClearSearchInput: S,
|
|
@@ -4940,7 +4940,7 @@ const Es = ["aria-labelledby"], qs = { class: "form-section-wrapper" }, Fs = {
|
|
|
4940
4940
|
"auth-function": () => e.canCreate()
|
|
4941
4941
|
}, {
|
|
4942
4942
|
default: h(() => [
|
|
4943
|
-
|
|
4943
|
+
Ie(T(X, {
|
|
4944
4944
|
appearance: "primary",
|
|
4945
4945
|
"data-testid": "toolbar-add-consumer",
|
|
4946
4946
|
size: "large",
|
|
@@ -4953,7 +4953,7 @@ const Es = ["aria-labelledby"], qs = { class: "form-section-wrapper" }, Fs = {
|
|
|
4953
4953
|
]),
|
|
4954
4954
|
_: 1
|
|
4955
4955
|
}, 8, ["to"]), [
|
|
4956
|
-
[
|
|
4956
|
+
[_e, Lt.value]
|
|
4957
4957
|
])
|
|
4958
4958
|
]),
|
|
4959
4959
|
_: 1
|
|
@@ -4988,7 +4988,7 @@ const Es = ["aria-labelledby"], qs = { class: "form-section-wrapper" }, Fs = {
|
|
|
4988
4988
|
default: h(({ copyToClipboard: Oe }) => [
|
|
4989
4989
|
T(De, {
|
|
4990
4990
|
"data-testid": "action-entity-copy-id",
|
|
4991
|
-
onClick: (
|
|
4991
|
+
onClick: (Ir) => g(Z, Oe)
|
|
4992
4992
|
}, {
|
|
4993
4993
|
default: h(() => [
|
|
4994
4994
|
H(j(m(i)("consumers.actions.copy_id")), 1)
|
|
@@ -5002,7 +5002,7 @@ const Es = ["aria-labelledby"], qs = { class: "form-section-wrapper" }, Fs = {
|
|
|
5002
5002
|
default: h(({ copyToClipboard: Oe }) => [
|
|
5003
5003
|
T(De, {
|
|
5004
5004
|
"data-testid": "action-entity-copy-json",
|
|
5005
|
-
onClick: (
|
|
5005
|
+
onClick: (Ir) => K(Z, Oe)
|
|
5006
5006
|
}, {
|
|
5007
5007
|
default: h(() => [
|
|
5008
5008
|
H(j(m(i)("consumers.actions.copy_json")), 1)
|
|
@@ -5019,7 +5019,7 @@ const Es = ["aria-labelledby"], qs = { class: "form-section-wrapper" }, Fs = {
|
|
|
5019
5019
|
T(De, {
|
|
5020
5020
|
"data-testid": "action-entity-view",
|
|
5021
5021
|
"has-divider": "",
|
|
5022
|
-
item:
|
|
5022
|
+
item: _(Z.id)
|
|
5023
5023
|
}, null, 8, ["item"])
|
|
5024
5024
|
]),
|
|
5025
5025
|
_: 2
|
|
@@ -5161,7 +5161,7 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5161
5161
|
emits: ["update", "error", "loading"],
|
|
5162
5162
|
setup(e, { emit: t }) {
|
|
5163
5163
|
var A;
|
|
5164
|
-
const n = e, r = t, { i18nT: a, i18n: { t: i } } = at.useI18n(), o =
|
|
5164
|
+
const n = e, r = t, { i18nT: a, i18n: { t: i } } = at.useI18n(), o = _t(), { axiosInstance: l } = Ot((A = n.config) == null ? void 0 : A.axiosRequestConfig), { getMessageFromError: s } = Vs(), u = ou(), d = Vt({
|
|
5165
5165
|
fields: {
|
|
5166
5166
|
username: "",
|
|
5167
5167
|
customId: "",
|
|
@@ -5179,19 +5179,19 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5179
5179
|
}), y = () => {
|
|
5180
5180
|
var b;
|
|
5181
5181
|
o.push(((b = n.config) == null ? void 0 : b.cancelRoute) || { name: "consumer-list" });
|
|
5182
|
-
},
|
|
5182
|
+
}, I = (b) => {
|
|
5183
5183
|
r("loading", b);
|
|
5184
5184
|
}, M = (b) => {
|
|
5185
5185
|
r("error", b);
|
|
5186
5186
|
}, k = (b) => {
|
|
5187
|
-
var K, E,
|
|
5187
|
+
var K, E, _;
|
|
5188
5188
|
d.fields.username = ((K = b == null ? void 0 : b.item) == null ? void 0 : K.username) || (b == null ? void 0 : b.username) || "", d.fields.customId = ((E = b == null ? void 0 : b.item) == null ? void 0 : E.custom_id) || (b == null ? void 0 : b.custom_id) || "";
|
|
5189
|
-
const g = ((
|
|
5189
|
+
const g = ((_ = b == null ? void 0 : b.item) == null ? void 0 : _.tags) || (b == null ? void 0 : b.tags) || [];
|
|
5190
5190
|
d.fields.tags = (g == null ? void 0 : g.join(", ")) || "", Object.assign(c, d.fields);
|
|
5191
5191
|
}, U = w(() => n.consumerId ? yt.Edit : yt.Create), x = (b) => {
|
|
5192
|
-
var K, E,
|
|
5192
|
+
var K, E, _, $, L, D;
|
|
5193
5193
|
let g = `${(K = n.config) == null ? void 0 : K.apiBaseUrl}${je.form[(E = n.config) == null ? void 0 : E.app][b]}`;
|
|
5194
|
-
return ((
|
|
5194
|
+
return ((_ = n.config) == null ? void 0 : _.app) === "konnect" ? g = g.replace(/{controlPlaneId}/gi, (($ = n.config) == null ? void 0 : $.controlPlaneId) || "") : ((L = n.config) == null ? void 0 : L.app) === "kongManager" && (g = g.replace(/\/{workspace}/gi, (D = n.config) != null && D.workspace ? `/${n.config.workspace}` : "")), g = g.replace(/{id}/gi, n.consumerId), g;
|
|
5195
5195
|
}, J = w(() => !!d.fields.username || !!d.fields.customId), v = w(() => JSON.stringify(d.fields) !== JSON.stringify(c)), S = w(() => {
|
|
5196
5196
|
var b, g;
|
|
5197
5197
|
return {
|
|
@@ -5223,9 +5223,9 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5223
5223
|
"form-fields": S.value,
|
|
5224
5224
|
"is-readonly": d.readonly,
|
|
5225
5225
|
onCancel: y,
|
|
5226
|
-
"onFetch:error": g[3] || (g[3] = (
|
|
5226
|
+
"onFetch:error": g[3] || (g[3] = (_) => M(_)),
|
|
5227
5227
|
"onFetch:success": k,
|
|
5228
|
-
onLoading: g[4] || (g[4] = (
|
|
5228
|
+
onLoading: g[4] || (g[4] = (_) => I(_)),
|
|
5229
5229
|
onSubmit: p
|
|
5230
5230
|
}, {
|
|
5231
5231
|
default: h(() => [
|
|
@@ -5250,7 +5250,7 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5250
5250
|
}, [
|
|
5251
5251
|
T(K, {
|
|
5252
5252
|
modelValue: d.fields.username,
|
|
5253
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
5253
|
+
"onUpdate:modelValue": g[0] || (g[0] = (_) => d.fields.username = _),
|
|
5254
5254
|
modelModifiers: { trim: !0 },
|
|
5255
5255
|
autocomplete: "off",
|
|
5256
5256
|
class: "username-field",
|
|
@@ -5278,7 +5278,7 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5278
5278
|
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
5279
5279
|
T(K, {
|
|
5280
5280
|
modelValue: d.fields.customId,
|
|
5281
|
-
"onUpdate:modelValue": g[1] || (g[1] = (
|
|
5281
|
+
"onUpdate:modelValue": g[1] || (g[1] = (_) => d.fields.customId = _),
|
|
5282
5282
|
modelModifiers: { trim: !0 },
|
|
5283
5283
|
autocomplete: "off",
|
|
5284
5284
|
"data-testid": "consumer-form-custom-id",
|
|
@@ -5309,7 +5309,7 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5309
5309
|
}),
|
|
5310
5310
|
T(K, {
|
|
5311
5311
|
modelValue: d.fields.tags,
|
|
5312
|
-
"onUpdate:modelValue": g[2] || (g[2] = (
|
|
5312
|
+
"onUpdate:modelValue": g[2] || (g[2] = (_) => d.fields.tags = _),
|
|
5313
5313
|
modelModifiers: { trim: !0 },
|
|
5314
5314
|
autocomplete: "off",
|
|
5315
5315
|
"data-testid": "consumer-form-tags",
|