@kong-ui-public/entities-consumer-groups 2.0.3 → 2.0.4-pr.759.e20864b0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as re, ref as O, computed as T, watch as
|
|
1
|
+
import { defineComponent as re, ref as O, computed as T, watch as xe, renderSlot as W, createCommentVNode as G, unref as y, useSlots as ut, onBeforeMount as Qe, resolveComponent as q, openBlock as m, createBlock as R, createSlots as Te, withCtx as h, createElementVNode as V, createTextVNode as Z, toDisplayString as F, createVNode as K, createElementBlock as $, renderList as ye, Fragment as ve, normalizeClass as Ke, withModifiers as rt, withDirectives as et, vShow as tt, useCssVars as mr, resolveDynamicComponent as Ve, normalizeProps as gr, guardReactiveProps as yr, mergeProps as ht, onMounted as hr, onUnmounted as vr, normalizeStyle as pn, inject as br, pushScopeId as fn, popScopeId as mn, reactive as Pt } from "vue";
|
|
2
2
|
import { useRouter as wt } from "vue-router";
|
|
3
3
|
import { createI18n as It, i18nTComponent as gn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Cr from "axios";
|
|
@@ -162,12 +162,12 @@ function Ar() {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
const ft = "khcp-user-table-preferences",
|
|
165
|
+
const ft = "khcp-user-table-preferences", Sr = {
|
|
166
166
|
pageSize: 30,
|
|
167
167
|
sortColumnKey: void 0,
|
|
168
168
|
sortColumnOrder: void 0
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function xr() {
|
|
171
171
|
const e = (t) => {
|
|
172
172
|
if (typeof t == "string")
|
|
173
173
|
try {
|
|
@@ -191,7 +191,7 @@ function Sr() {
|
|
|
191
191
|
},
|
|
192
192
|
getTablePreferences: (t) => {
|
|
193
193
|
const r = n();
|
|
194
|
-
return (r == null ? void 0 : r.get(t)) || void 0 ||
|
|
194
|
+
return (r == null ? void 0 : r.get(t)) || void 0 || Sr;
|
|
195
195
|
},
|
|
196
196
|
deleteAllTablePreferences: () => {
|
|
197
197
|
localStorage.removeItem(ft);
|
|
@@ -271,10 +271,10 @@ const Tr = {
|
|
|
271
271
|
fetch: "Could not fetch available items",
|
|
272
272
|
invalid: "Please select a valid value"
|
|
273
273
|
}
|
|
274
|
-
},
|
|
274
|
+
}, Kr = {
|
|
275
275
|
unexpected: "An unexpected error has occurred",
|
|
276
276
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
277
|
-
},
|
|
277
|
+
}, Nr = {
|
|
278
278
|
enable: {
|
|
279
279
|
title: "Enable {entityType}",
|
|
280
280
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -293,10 +293,10 @@ const Tr = {
|
|
|
293
293
|
baseConfigCard: Er,
|
|
294
294
|
filter: Or,
|
|
295
295
|
debouncedFilter: Fr,
|
|
296
|
-
errors:
|
|
297
|
-
toggleModal:
|
|
296
|
+
errors: Kr,
|
|
297
|
+
toggleModal: Nr
|
|
298
298
|
};
|
|
299
|
-
function
|
|
299
|
+
function St() {
|
|
300
300
|
const e = It("en-us", Br);
|
|
301
301
|
return {
|
|
302
302
|
i18n: e,
|
|
@@ -355,46 +355,46 @@ function Pr(e, n, t, r = {
|
|
|
355
355
|
t || (t = "100");
|
|
356
356
|
const { axiosInstance: o } = At({
|
|
357
357
|
headers: e.requestHeaders
|
|
358
|
-
}), { i18n: { t: a } } =
|
|
359
|
-
await C(
|
|
360
|
-
}, 200), l = O(!1), c = O(""), d = O(""), u = O([]), g = O([]), f = O(void 0),
|
|
361
|
-
let v = `${e.apiBaseUrl}${
|
|
358
|
+
}), { i18n: { t: a } } = St(), { debounce: i } = Ar(), s = i(async (I) => {
|
|
359
|
+
await C(I);
|
|
360
|
+
}, 200), l = O(!1), c = O(""), d = O(""), u = O([]), g = O([]), f = O(void 0), A = y(n);
|
|
361
|
+
let v = `${e.apiBaseUrl}${A}`;
|
|
362
362
|
e.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
363
|
-
const { isValidUuid: p } = hn(),
|
|
363
|
+
const { isValidUuid: p } = hn(), S = async () => {
|
|
364
364
|
try {
|
|
365
365
|
l.value = !0;
|
|
366
|
-
const { data:
|
|
367
|
-
|
|
366
|
+
const { data: I } = await o.get(`${v}?size=${t}`);
|
|
367
|
+
I != null && I.next || (f.value = r.fetchedItemsKey in I ? I[r.fetchedItemsKey] : []), g.value = r.fetchedItemsKey in I ? I[r.fetchedItemsKey] : [], u.value = g.value;
|
|
368
368
|
} catch {
|
|
369
369
|
u.value = [], c.value = a("debouncedFilter.errors.fetch");
|
|
370
370
|
} finally {
|
|
371
371
|
l.value = !1;
|
|
372
372
|
}
|
|
373
|
-
}, b = O(""), C = async (
|
|
373
|
+
}, b = O(""), C = async (I) => {
|
|
374
374
|
var ne, pe, z;
|
|
375
|
-
if (b.value !==
|
|
376
|
-
if (b.value =
|
|
375
|
+
if (b.value !== I)
|
|
376
|
+
if (b.value = I || "", f.value === void 0)
|
|
377
377
|
try {
|
|
378
378
|
if (l.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
379
379
|
let w = v + "";
|
|
380
|
-
|
|
381
|
-
const { data:
|
|
382
|
-
r.fetchedItemsKey in
|
|
383
|
-
} else if (
|
|
380
|
+
I && (w += `/${I}`);
|
|
381
|
+
const { data: N } = await o.get(`${w}?size=${t}`);
|
|
382
|
+
r.fetchedItemsKey in N ? u.value = N[r.fetchedItemsKey] : N != null && N.id ? u.value = [N] : u.value = [];
|
|
383
|
+
} else if (I) {
|
|
384
384
|
const w = [];
|
|
385
|
-
p(
|
|
386
|
-
const { data: k } = await o.get(`${v}/${
|
|
385
|
+
p(I) && r.searchKeys.includes("id") ? w.push((async () => {
|
|
386
|
+
const { data: k } = await o.get(`${v}/${I}`);
|
|
387
387
|
return [k[r.fetchedItemsKey] ?? k];
|
|
388
388
|
})()) : w.push(
|
|
389
389
|
...r.searchKeys.filter((k) => k !== "id").map(async (k) => {
|
|
390
|
-
const { data:
|
|
391
|
-
return
|
|
390
|
+
const { data: x } = await o.get(`${v}?${k}=${I}`);
|
|
391
|
+
return x[r.fetchedItemsKey];
|
|
392
392
|
})
|
|
393
393
|
);
|
|
394
|
-
const
|
|
395
|
-
u.value = [], (ne =
|
|
396
|
-
var
|
|
397
|
-
(
|
|
394
|
+
const N = await Promise.all(w), B = /* @__PURE__ */ new Set();
|
|
395
|
+
u.value = [], (ne = N == null ? void 0 : N.forEach) == null || ne.call(N, (k) => {
|
|
396
|
+
var x;
|
|
397
|
+
(x = k == null ? void 0 : k.forEach) == null || x.call(k, (j) => {
|
|
398
398
|
B.has(j.id) || (B.add(j.id), u.value.push(j));
|
|
399
399
|
});
|
|
400
400
|
});
|
|
@@ -406,12 +406,12 @@ function Pr(e, n, t, r = {
|
|
|
406
406
|
l.value = !1;
|
|
407
407
|
}
|
|
408
408
|
else
|
|
409
|
-
l.value = !0, d.value = "",
|
|
410
|
-
var
|
|
409
|
+
l.value = !0, d.value = "", I ? (u.value = (z = f.value) == null ? void 0 : z.filter((w) => {
|
|
410
|
+
var N;
|
|
411
411
|
let B = !1;
|
|
412
412
|
for (const k of r.searchKeys) {
|
|
413
|
-
const
|
|
414
|
-
|
|
413
|
+
const x = typeof w[k] == "string" ? (N = w[k]) == null ? void 0 : N.toLowerCase() : w[k];
|
|
414
|
+
x != null && x.includes(I.toLowerCase()) && (B = !0);
|
|
415
415
|
}
|
|
416
416
|
return B;
|
|
417
417
|
}), (!u.value || !u.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : u.value = f.value, l.value = !1;
|
|
@@ -422,7 +422,7 @@ function Pr(e, n, t, r = {
|
|
|
422
422
|
validationError: d,
|
|
423
423
|
results: u,
|
|
424
424
|
allRecords: f,
|
|
425
|
-
loadItems:
|
|
425
|
+
loadItems: S,
|
|
426
426
|
debouncedQueryChange: s
|
|
427
427
|
};
|
|
428
428
|
}
|
|
@@ -433,7 +433,7 @@ function Lr(e, n) {
|
|
|
433
433
|
return r.value.search = "", (o) => `${r.value.href}/${o}`;
|
|
434
434
|
}
|
|
435
435
|
function qr() {
|
|
436
|
-
const { i18n: { t: e } } =
|
|
436
|
+
const { i18n: { t: e } } = St();
|
|
437
437
|
return {
|
|
438
438
|
getMessageFromError: (n) => {
|
|
439
439
|
var t, r, o;
|
|
@@ -481,8 +481,8 @@ function vn(e, n) {
|
|
|
481
481
|
const { page: s, pageSize: l, offset: c, sortColumnKey: d, sortColumnOrder: u, query: g } = i;
|
|
482
482
|
try {
|
|
483
483
|
let f = new URL(a.value.href);
|
|
484
|
-
return o.value && g ? (f.search = "", f = new URL(`${f.href}/${g}/`)) : (o.value || new URLSearchParams(g).forEach((
|
|
485
|
-
f.searchParams.append(v,
|
|
484
|
+
return o.value && g ? (f.search = "", f = new URL(`${f.href}/${g}/`)) : (o.value || new URLSearchParams(g).forEach((A, v) => {
|
|
485
|
+
f.searchParams.append(v, A);
|
|
486
486
|
}), d && f.searchParams.append("sort_by", d), u === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(l))), c && s !== 1 && f.searchParams.append("offset", String(c)), f.href;
|
|
487
487
|
} catch (f) {
|
|
488
488
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
@@ -595,7 +595,7 @@ function Yr(e) {
|
|
|
595
595
|
}
|
|
596
596
|
function Wr(e) {
|
|
597
597
|
const n = O(0), t = O(0), r = O(!1);
|
|
598
|
-
return
|
|
598
|
+
return xe(e, (o) => {
|
|
599
599
|
o && !r.value && (n.value = o.offsetWidth, t.value = o.scrollWidth, r.value = !0);
|
|
600
600
|
}), {
|
|
601
601
|
isTruncated: T(() => n.value < t.value)
|
|
@@ -611,7 +611,7 @@ const ue = {
|
|
|
611
611
|
useFetchUrlBuilder: vn,
|
|
612
612
|
useHelpers: hn,
|
|
613
613
|
useStringHelpers: Rr,
|
|
614
|
-
useI18n:
|
|
614
|
+
useI18n: St,
|
|
615
615
|
useGatewayFeatureSupported: Yr,
|
|
616
616
|
useTruncationDetector: Wr
|
|
617
617
|
}, Zr = {
|
|
@@ -791,7 +791,7 @@ const ue = {
|
|
|
791
791
|
s.value = t.tooltip;
|
|
792
792
|
}, 1800);
|
|
793
793
|
}, u = (g) => {
|
|
794
|
-
var f,
|
|
794
|
+
var f, A;
|
|
795
795
|
if (!g(t.uuid)) {
|
|
796
796
|
typeof o == "function" && o({
|
|
797
797
|
type: "error",
|
|
@@ -799,19 +799,19 @@ const ue = {
|
|
|
799
799
|
}), i.value ? d(r("message.fail")) : n("error", t.uuid);
|
|
800
800
|
return;
|
|
801
801
|
}
|
|
802
|
-
const v = ((f = t.uuid) == null ? void 0 : f.length) > zt, p = t.format === "hidden" || t.format === "redacted" ? r("message.success.prefix") : `"${((
|
|
802
|
+
const v = ((f = t.uuid) == null ? void 0 : f.length) > zt, p = t.format === "hidden" || t.format === "redacted" ? r("message.success.prefix") : `"${((A = t.uuid) == null ? void 0 : A.substring(0, zt)) + (v ? "..." : "")}"`;
|
|
803
803
|
typeof o == "function" && o({
|
|
804
804
|
type: "success",
|
|
805
805
|
message: `${p}${r("message.success.content")}`
|
|
806
806
|
}), i.value ? d(t.successTooltip) : n("success", t.uuid);
|
|
807
807
|
};
|
|
808
808
|
return (g, f) => {
|
|
809
|
-
const
|
|
809
|
+
const A = q("KClipboardProvider");
|
|
810
810
|
return m(), $("div", uo, [
|
|
811
811
|
e.format !== "hidden" ? (m(), R(Ve(e.idTooltip ? "KTooltip" : "div"), ht({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
812
812
|
default: h(() => [
|
|
813
813
|
V("div", {
|
|
814
|
-
class:
|
|
814
|
+
class: Ke([
|
|
815
815
|
"uuid-container",
|
|
816
816
|
e.truncated ? "truncated-uuid" : null,
|
|
817
817
|
e.useMono ? "mono" : null
|
|
@@ -822,7 +822,7 @@ const ue = {
|
|
|
822
822
|
}, 16)) : G("", !0),
|
|
823
823
|
(m(), R(Ve(e.tooltip ? "KTooltip" : "div"), ht(l.value, { class: "uuid-icon-wrapper" }), {
|
|
824
824
|
default: h(() => [
|
|
825
|
-
|
|
825
|
+
K(A, null, {
|
|
826
826
|
default: h(({ copyToClipboard: v }) => [
|
|
827
827
|
V("span", {
|
|
828
828
|
"data-testid": "copy-to-clipboard",
|
|
@@ -830,7 +830,7 @@ const ue = {
|
|
|
830
830
|
tabindex: "0",
|
|
831
831
|
onClick: rt((p) => u(v), ["stop"])
|
|
832
832
|
}, [
|
|
833
|
-
|
|
833
|
+
K(y(so), {
|
|
834
834
|
class: "uuid-icon",
|
|
835
835
|
color: e.iconColor,
|
|
836
836
|
decorative: !!e.tooltip,
|
|
@@ -880,13 +880,13 @@ const ue = {
|
|
|
880
880
|
return n.isArrayItem ? (l = a.value) != null && l.name ? r(a.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
881
881
|
});
|
|
882
882
|
return (l, c) => (m(), R(Ve(e.isArrayItem ? "fieldset" : "div"), {
|
|
883
|
-
class:
|
|
883
|
+
class: Ke(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
884
884
|
}, {
|
|
885
885
|
default: h(() => [
|
|
886
886
|
e.isArrayItem ? (m(), $("legend", mo, [
|
|
887
887
|
V("b", null, F(s.value), 1)
|
|
888
888
|
])) : G("", !0),
|
|
889
|
-
(m(!0), $(ve, null, ye(Object.keys(i.value), (d, u) => (m(), R(
|
|
889
|
+
(m(!0), $(ve, null, ye(Object.keys(i.value), (d, u) => (m(), R(xt, {
|
|
890
890
|
key: `${o.value}-property-${u}`,
|
|
891
891
|
item: {
|
|
892
892
|
key: d,
|
|
@@ -917,7 +917,7 @@ const ue = {
|
|
|
917
917
|
return (t, r) => {
|
|
918
918
|
const o = q("KButton");
|
|
919
919
|
return m(), $("div", null, [
|
|
920
|
-
|
|
920
|
+
K(o, {
|
|
921
921
|
appearance: "tertiary",
|
|
922
922
|
class: "navigation-button",
|
|
923
923
|
onClick: r[0] || (r[0] = (a) => t.$emit("navigation-click", e.item))
|
|
@@ -952,10 +952,10 @@ const ue = {
|
|
|
952
952
|
}, 8, ["appearance"]);
|
|
953
953
|
};
|
|
954
954
|
}
|
|
955
|
-
}), bo = "#0044f4", Co = "#e0e4ea", ko = "#3a3f51", _o = "1px", wo = "20px", Io = { class: "config-card-details-row" }, Ao = ["data-testid"],
|
|
955
|
+
}), bo = "#0044f4", Co = "#e0e4ea", ko = "#3a3f51", _o = "1px", wo = "20px", Io = { class: "config-card-details-row" }, Ao = ["data-testid"], So = ["data-testid"], xo = ["data-testid"], To = ["data-testid"], $o = { key: 1 }, jo = ["data-testid"], Mo = ["data-testid"], Eo = ["data-testid"], Oo = ["data-testid"], Fo = {
|
|
956
956
|
name: "ConfigCardItem",
|
|
957
957
|
components: { CopyUuid: kn, JsonCardItem: _n, StatusBadge: vo, InternalLinkItem: ho }
|
|
958
|
-
},
|
|
958
|
+
}, Ko = /* @__PURE__ */ re({
|
|
959
959
|
...Fo,
|
|
960
960
|
props: {
|
|
961
961
|
item: {
|
|
@@ -1109,15 +1109,15 @@ const ue = {
|
|
|
1109
1109
|
};
|
|
1110
1110
|
}
|
|
1111
1111
|
}), u = O(), { isTruncated: g } = ue.useTruncationDetector(u);
|
|
1112
|
-
return (f,
|
|
1113
|
-
const v = q("KLabel"), p = q("KBadge"),
|
|
1112
|
+
return (f, A) => {
|
|
1113
|
+
const v = q("KLabel"), p = q("KBadge"), S = q("KMethodBadge"), b = q("KTooltip");
|
|
1114
1114
|
return m(), $("div", Io, [
|
|
1115
1115
|
V("div", {
|
|
1116
1116
|
class: "config-card-details-label",
|
|
1117
1117
|
"data-testid": `${e.item.key}-label`
|
|
1118
1118
|
}, [
|
|
1119
1119
|
W(f.$slots, "label", { item: e.item }, () => [
|
|
1120
|
-
|
|
1120
|
+
K(v, { "tooltip-attributes": { maxWidth: "500px" } }, Te({
|
|
1121
1121
|
default: h(() => [
|
|
1122
1122
|
Z(F(e.item.label) + " ", 1)
|
|
1123
1123
|
]),
|
|
@@ -1132,7 +1132,7 @@ const ue = {
|
|
|
1132
1132
|
W(f.$slots, "label-tooltip", {}, () => [
|
|
1133
1133
|
Z(F(e.item.tooltip), 1)
|
|
1134
1134
|
], !0)
|
|
1135
|
-
], 8,
|
|
1135
|
+
], 8, So)
|
|
1136
1136
|
]),
|
|
1137
1137
|
key: "0"
|
|
1138
1138
|
} : void 0
|
|
@@ -1153,10 +1153,10 @@ const ue = {
|
|
|
1153
1153
|
key: 0,
|
|
1154
1154
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1155
1155
|
}, [
|
|
1156
|
-
(m(!0), $(ve, null, ye(e.item.value, (C,
|
|
1157
|
-
key: `${e.item.key}-badge-tag-${
|
|
1156
|
+
(m(!0), $(ve, null, ye(e.item.value, (C, I) => (m(), R(p, {
|
|
1157
|
+
key: `${e.item.key}-badge-tag-${I}`,
|
|
1158
1158
|
class: "config-badge",
|
|
1159
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1159
|
+
"data-testid": `${e.item.key}-badge-tag-${I}`,
|
|
1160
1160
|
"truncation-tooltip": C
|
|
1161
1161
|
}, {
|
|
1162
1162
|
default: h(() => [
|
|
@@ -1170,9 +1170,9 @@ const ue = {
|
|
|
1170
1170
|
class: "copy-uuid-array",
|
|
1171
1171
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1172
1172
|
}, [
|
|
1173
|
-
(m(!0), $(ve, null, ye(e.item.value, (C,
|
|
1174
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1175
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1173
|
+
(m(!0), $(ve, null, ye(e.item.value, (C, I) => (m(), R(y(kn), ht(d.value.childAttrs, {
|
|
1174
|
+
key: `${e.item.key}-copy-uuid-${I}`,
|
|
1175
|
+
"data-testid": `${e.item.key}-copy-uuid-${I}`,
|
|
1176
1176
|
uuid: C
|
|
1177
1177
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1178
1178
|
], 8, Mo)) : d.value.additionalComponent === "KMethodBadge" ? (m(), $("div", {
|
|
@@ -1180,10 +1180,10 @@ const ue = {
|
|
|
1180
1180
|
class: "method-badge-array",
|
|
1181
1181
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1182
1182
|
}, [
|
|
1183
|
-
(m(!0), $(ve, null, ye(e.item.value, (C,
|
|
1184
|
-
key: `${e.item.key}-badge-method-${
|
|
1183
|
+
(m(!0), $(ve, null, ye(e.item.value, (C, I) => (m(), R(S, {
|
|
1184
|
+
key: `${e.item.key}-badge-method-${I}`,
|
|
1185
1185
|
class: "config-badge",
|
|
1186
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1186
|
+
"data-testid": `${e.item.key}-badge-method-${I}`,
|
|
1187
1187
|
"is-rounded": "",
|
|
1188
1188
|
label: C,
|
|
1189
1189
|
method: y(kr).includes(C.toLowerCase()) ? C.toLowerCase() : "custom"
|
|
@@ -1198,9 +1198,9 @@ const ue = {
|
|
|
1198
1198
|
key: 3,
|
|
1199
1199
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1200
1200
|
}, [
|
|
1201
|
-
(m(!0), $(ve, null, ye(e.item.value, (C,
|
|
1202
|
-
key: `json-array-item-${
|
|
1203
|
-
index:
|
|
1201
|
+
(m(!0), $(ve, null, ye(e.item.value, (C, I) => (m(), R(_n, {
|
|
1202
|
+
key: `json-array-item-${I}`,
|
|
1203
|
+
index: I,
|
|
1204
1204
|
"is-array-item": "",
|
|
1205
1205
|
item: C
|
|
1206
1206
|
}, null, 8, ["index", "item"]))), 128))
|
|
@@ -1212,7 +1212,7 @@ const ue = {
|
|
|
1212
1212
|
V("span", {
|
|
1213
1213
|
ref_key: "textContent",
|
|
1214
1214
|
ref: u,
|
|
1215
|
-
class:
|
|
1215
|
+
class: Ke(["attrs-data-text", { truncated: e.truncated }])
|
|
1216
1216
|
}, F(d.value.text), 3)
|
|
1217
1217
|
]),
|
|
1218
1218
|
_: 1
|
|
@@ -1225,16 +1225,16 @@ const ue = {
|
|
|
1225
1225
|
"data-testid": `${e.item.key}-no-value`
|
|
1226
1226
|
}, " – ", 8, To))
|
|
1227
1227
|
], !0)
|
|
1228
|
-
], 8,
|
|
1228
|
+
], 8, xo)
|
|
1229
1229
|
]);
|
|
1230
1230
|
};
|
|
1231
1231
|
}
|
|
1232
|
-
}),
|
|
1232
|
+
}), xt = /* @__PURE__ */ ke(Ko, [["__scopeId", "data-v-307ab96d"]]);
|
|
1233
1233
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1234
1234
|
function wn(e) {
|
|
1235
1235
|
return typeof e > "u" || e === null;
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1237
|
+
function No(e) {
|
|
1238
1238
|
return typeof e == "object" && e !== null;
|
|
1239
1239
|
}
|
|
1240
1240
|
function Bo(e) {
|
|
@@ -1256,7 +1256,7 @@ function Lo(e, n) {
|
|
|
1256
1256
|
function qo(e) {
|
|
1257
1257
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1258
1258
|
}
|
|
1259
|
-
var Uo = wn, Vo =
|
|
1259
|
+
var Uo = wn, Vo = No, Ro = Bo, Do = Lo, Go = qo, zo = Po, se = {
|
|
1260
1260
|
isNothing: Uo,
|
|
1261
1261
|
isObject: Vo,
|
|
1262
1262
|
toArray: Ro,
|
|
@@ -1412,12 +1412,12 @@ vt.prototype.extend = function(e) {
|
|
|
1412
1412
|
var r = Object.create(vt.prototype);
|
|
1413
1413
|
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = Ht(r, "implicit"), r.compiledExplicit = Ht(r, "explicit"), r.compiledTypeMap = Xo(r.compiledImplicit, r.compiledExplicit), r;
|
|
1414
1414
|
};
|
|
1415
|
-
var An = vt,
|
|
1415
|
+
var An = vt, Sn = new de("tag:yaml.org,2002:str", {
|
|
1416
1416
|
kind: "scalar",
|
|
1417
1417
|
construct: function(e) {
|
|
1418
1418
|
return e !== null ? e : "";
|
|
1419
1419
|
}
|
|
1420
|
-
}),
|
|
1420
|
+
}), xn = new de("tag:yaml.org,2002:seq", {
|
|
1421
1421
|
kind: "sequence",
|
|
1422
1422
|
construct: function(e) {
|
|
1423
1423
|
return e !== null ? e : [];
|
|
@@ -1429,8 +1429,8 @@ var An = vt, xn = new de("tag:yaml.org,2002:str", {
|
|
|
1429
1429
|
}
|
|
1430
1430
|
}), $n = new An({
|
|
1431
1431
|
explicit: [
|
|
1432
|
-
xn,
|
|
1433
1432
|
Sn,
|
|
1433
|
+
xn,
|
|
1434
1434
|
Tn
|
|
1435
1435
|
]
|
|
1436
1436
|
});
|
|
@@ -1664,17 +1664,17 @@ var On = new de("tag:yaml.org,2002:float", {
|
|
|
1664
1664
|
En,
|
|
1665
1665
|
On
|
|
1666
1666
|
]
|
|
1667
|
-
}),
|
|
1667
|
+
}), Kn = Fn, Nn = new RegExp(
|
|
1668
1668
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1669
1669
|
), Bn = new RegExp(
|
|
1670
1670
|
"^([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]))?))?$"
|
|
1671
1671
|
);
|
|
1672
1672
|
function va(e) {
|
|
1673
|
-
return e === null ? !1 :
|
|
1673
|
+
return e === null ? !1 : Nn.exec(e) !== null || Bn.exec(e) !== null;
|
|
1674
1674
|
}
|
|
1675
1675
|
function ba(e) {
|
|
1676
1676
|
var n, t, r, o, a, i, s, l = 0, c = null, d, u, g;
|
|
1677
|
-
if (n =
|
|
1677
|
+
if (n = Nn.exec(e), n === null && (n = Bn.exec(e)), n === null)
|
|
1678
1678
|
throw new Error("Date resolve error");
|
|
1679
1679
|
if (t = +n[1], r = +n[2] - 1, o = +n[3], !n[4])
|
|
1680
1680
|
return new Date(Date.UTC(t, r, o));
|
|
@@ -1736,16 +1736,16 @@ var qn = new de("tag:yaml.org,2002:binary", {
|
|
|
1736
1736
|
construct: wa,
|
|
1737
1737
|
predicate: Aa,
|
|
1738
1738
|
represent: Ia
|
|
1739
|
-
}),
|
|
1739
|
+
}), Sa = Object.prototype.hasOwnProperty, xa = Object.prototype.toString;
|
|
1740
1740
|
function Ta(e) {
|
|
1741
1741
|
if (e === null)
|
|
1742
1742
|
return !0;
|
|
1743
1743
|
var n = [], t, r, o, a, i, s = e;
|
|
1744
1744
|
for (t = 0, r = s.length; t < r; t += 1) {
|
|
1745
|
-
if (o = s[t], i = !1,
|
|
1745
|
+
if (o = s[t], i = !1, xa.call(o) !== "[object Object]")
|
|
1746
1746
|
return !1;
|
|
1747
1747
|
for (a in o)
|
|
1748
|
-
if (
|
|
1748
|
+
if (Sa.call(o, a))
|
|
1749
1749
|
if (!i)
|
|
1750
1750
|
i = !0;
|
|
1751
1751
|
else
|
|
@@ -1800,14 +1800,14 @@ function Fa(e) {
|
|
|
1800
1800
|
return !1;
|
|
1801
1801
|
return !0;
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1803
|
+
function Ka(e) {
|
|
1804
1804
|
return e !== null ? e : {};
|
|
1805
1805
|
}
|
|
1806
1806
|
var Rn = new de("tag:yaml.org,2002:set", {
|
|
1807
1807
|
kind: "mapping",
|
|
1808
1808
|
resolve: Fa,
|
|
1809
|
-
construct:
|
|
1810
|
-
}), $t =
|
|
1809
|
+
construct: Ka
|
|
1810
|
+
}), $t = Kn.extend({
|
|
1811
1811
|
implicit: [
|
|
1812
1812
|
Pn,
|
|
1813
1813
|
Ln
|
|
@@ -1818,7 +1818,7 @@ var Rn = new de("tag:yaml.org,2002:set", {
|
|
|
1818
1818
|
Vn,
|
|
1819
1819
|
Rn
|
|
1820
1820
|
]
|
|
1821
|
-
}), Me = Object.prototype.hasOwnProperty, ot = 1, Dn = 2, Gn = 3, at = 4, yt = 1,
|
|
1821
|
+
}), Me = Object.prototype.hasOwnProperty, ot = 1, Dn = 2, Gn = 3, at = 4, yt = 1, Na = 2, Jt = 3, Ba = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Pa = /[\x85\u2028\u2029]/, La = /[,\[\]\{\}]/, zn = /^(?:!|!!|![a-z\-]+!)$/i, Hn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1822
1822
|
function Yt(e) {
|
|
1823
1823
|
return Object.prototype.toString.call(e);
|
|
1824
1824
|
}
|
|
@@ -2023,7 +2023,7 @@ function Ha(e, n) {
|
|
|
2023
2023
|
M(e, "unexpected end of the stream within a double quoted scalar");
|
|
2024
2024
|
}
|
|
2025
2025
|
function Ja(e, n) {
|
|
2026
|
-
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, c, d, u, g, f,
|
|
2026
|
+
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, c, d, u, g, f, A = /* @__PURE__ */ Object.create(null), v, p, S, b;
|
|
2027
2027
|
if (b = e.input.charCodeAt(e.position), b === 91)
|
|
2028
2028
|
d = 93, f = !1, s = [];
|
|
2029
2029
|
else if (b === 123)
|
|
@@ -2033,7 +2033,7 @@ function Ja(e, n) {
|
|
|
2033
2033
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), b = e.input.charCodeAt(++e.position); b !== 0; ) {
|
|
2034
2034
|
if (ae(e, !0, n), b = e.input.charCodeAt(e.position), b === d)
|
|
2035
2035
|
return e.position++, e.tag = i, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
2036
|
-
t ? b === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), p = v =
|
|
2036
|
+
t ? b === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), p = v = S = null, u = g = !1, b === 63 && (c = e.input.charCodeAt(e.position + 1), he(c) && (u = g = !0, e.position++, ae(e, !0, n))), r = e.line, o = e.lineStart, a = e.position, Re(e, n, ot, !1, !0), p = e.tag, v = e.result, ae(e, !0, n), b = e.input.charCodeAt(e.position), (g || e.line === r) && b === 58 && (u = !0, b = e.input.charCodeAt(++e.position), ae(e, !0, n), Re(e, n, ot, !1, !0), S = e.result), f ? Ue(e, s, A, p, v, S, r, o, a) : u ? s.push(Ue(e, null, A, p, v, S, r, o, a)) : s.push(v), ae(e, !0, n), b = e.input.charCodeAt(e.position), b === 44 ? (t = !0, b = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2037
2037
|
}
|
|
2038
2038
|
M(e, "unexpected end of the stream within a flow collection");
|
|
2039
2039
|
}
|
|
@@ -2047,7 +2047,7 @@ function Ya(e, n) {
|
|
|
2047
2047
|
return !1;
|
|
2048
2048
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
2049
2049
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
2050
|
-
yt === o ? o = u === 43 ? Jt :
|
|
2050
|
+
yt === o ? o = u === 43 ? Jt : Na : M(e, "repeat of a chomping mode identifier");
|
|
2051
2051
|
else if ((d = Va(u)) >= 0)
|
|
2052
2052
|
d === 0 ? M(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? M(e, "repeat of an indentation width identifier") : (s = n + d - 1, i = !0);
|
|
2053
2053
|
else
|
|
@@ -2101,12 +2101,12 @@ function Xt(e, n) {
|
|
|
2101
2101
|
return s ? (e.tag = r, e.anchor = o, e.kind = "sequence", e.result = a, !0) : !1;
|
|
2102
2102
|
}
|
|
2103
2103
|
function Wa(e, n, t) {
|
|
2104
|
-
var r, o, a, i, s, l, c = e.tag, d = e.anchor, u = {}, g = /* @__PURE__ */ Object.create(null), f = null,
|
|
2104
|
+
var r, o, a, i, s, l, c = e.tag, d = e.anchor, u = {}, g = /* @__PURE__ */ Object.create(null), f = null, A = null, v = null, p = !1, S = !1, b;
|
|
2105
2105
|
if (e.firstTabInLine !== -1)
|
|
2106
2106
|
return !1;
|
|
2107
2107
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), b = e.input.charCodeAt(e.position); b !== 0; ) {
|
|
2108
2108
|
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (b === 63 || b === 58) && he(r))
|
|
2109
|
-
b === 63 ? (p && (Ue(e, u, g, f,
|
|
2109
|
+
b === 63 ? (p && (Ue(e, u, g, f, A, null, i, s, l), f = A = v = null), S = !0, p = !0, o = !0) : p ? (p = !1, o = !0) : M(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, b = r;
|
|
2110
2110
|
else {
|
|
2111
2111
|
if (i = e.line, s = e.lineStart, l = e.position, !Re(e, t, Dn, !1, !0))
|
|
2112
2112
|
break;
|
|
@@ -2114,22 +2114,22 @@ function Wa(e, n, t) {
|
|
|
2114
2114
|
for (b = e.input.charCodeAt(e.position); Fe(b); )
|
|
2115
2115
|
b = e.input.charCodeAt(++e.position);
|
|
2116
2116
|
if (b === 58)
|
|
2117
|
-
b = e.input.charCodeAt(++e.position), he(b) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ue(e, u, g, f,
|
|
2118
|
-
else if (
|
|
2117
|
+
b = e.input.charCodeAt(++e.position), he(b) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ue(e, u, g, f, A, null, i, s, l), f = A = v = null), S = !0, p = !1, o = !1, f = e.tag, A = e.result;
|
|
2118
|
+
else if (S)
|
|
2119
2119
|
M(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2120
2120
|
else
|
|
2121
2121
|
return e.tag = c, e.anchor = d, !0;
|
|
2122
|
-
} else if (
|
|
2122
|
+
} else if (S)
|
|
2123
2123
|
M(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2124
2124
|
else
|
|
2125
2125
|
return e.tag = c, e.anchor = d, !0;
|
|
2126
2126
|
}
|
|
2127
|
-
if ((e.line === a || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Re(e, n, at, !0, o) && (p ?
|
|
2127
|
+
if ((e.line === a || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Re(e, n, at, !0, o) && (p ? A = e.result : v = e.result), p || (Ue(e, u, g, f, A, v, i, s, l), f = A = v = null), ae(e, !0, -1), b = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > n) && b !== 0)
|
|
2128
2128
|
M(e, "bad indentation of a mapping entry");
|
|
2129
2129
|
else if (e.lineIndent < n)
|
|
2130
2130
|
break;
|
|
2131
2131
|
}
|
|
2132
|
-
return p && Ue(e, u, g, f,
|
|
2132
|
+
return p && Ue(e, u, g, f, A, null, i, s, l), S && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), S;
|
|
2133
2133
|
}
|
|
2134
2134
|
function Za(e) {
|
|
2135
2135
|
var n, t = !1, r = !1, o, a, i;
|
|
@@ -2170,7 +2170,7 @@ function Xa(e) {
|
|
|
2170
2170
|
return e.position === n && M(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), Me.call(e.anchorMap, t) || M(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], ae(e, !0, -1), !0;
|
|
2171
2171
|
}
|
|
2172
2172
|
function Re(e, n, t, r, o) {
|
|
2173
|
-
var a, i, s, l = 1, c = !1, d = !1, u, g, f,
|
|
2173
|
+
var a, i, s, l = 1, c = !1, d = !1, u, g, f, A, v, p;
|
|
2174
2174
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = i = s = at === t || Gn === t, r && ae(e, !0, -1) && (c = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2175
2175
|
for (; Za(e) || Qa(e); )
|
|
2176
2176
|
ae(e, !0, -1) ? (c = !0, s = a, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
@@ -2178,20 +2178,20 @@ function Re(e, n, t, r, o) {
|
|
|
2178
2178
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2179
2179
|
else if (e.tag === "?") {
|
|
2180
2180
|
for (e.result !== null && e.kind !== "scalar" && M(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, g = e.implicitTypes.length; u < g; u += 1)
|
|
2181
|
-
if (
|
|
2182
|
-
e.result =
|
|
2181
|
+
if (A = e.implicitTypes[u], A.resolve(e.result)) {
|
|
2182
|
+
e.result = A.construct(e.result), e.tag = A.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2183
2183
|
break;
|
|
2184
2184
|
}
|
|
2185
2185
|
} else if (e.tag !== "!") {
|
|
2186
2186
|
if (Me.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2187
|
-
|
|
2187
|
+
A = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2188
2188
|
else
|
|
2189
|
-
for (
|
|
2189
|
+
for (A = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, g = f.length; u < g; u += 1)
|
|
2190
2190
|
if (e.tag.slice(0, f[u].tag.length) === f[u].tag) {
|
|
2191
|
-
|
|
2191
|
+
A = f[u];
|
|
2192
2192
|
break;
|
|
2193
2193
|
}
|
|
2194
|
-
|
|
2194
|
+
A || M(e, "unknown tag !<" + e.tag + ">"), e.result !== null && A.kind !== e.kind && M(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + A.kind + '", not "' + e.kind + '"'), A.resolve(e.result, e.tag) ? (e.result = A.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : M(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2195
2195
|
}
|
|
2196
2196
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2197
2197
|
}
|
|
@@ -2310,7 +2310,7 @@ function Ii(e) {
|
|
|
2310
2310
|
return "\\" + t + se.repeat("0", r - n.length) + n;
|
|
2311
2311
|
}
|
|
2312
2312
|
var Ai = 1, We = 2;
|
|
2313
|
-
function
|
|
2313
|
+
function Si(e) {
|
|
2314
2314
|
this.schema = e.schema || $t, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = se.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = wi(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? We : Ai, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
2315
2315
|
}
|
|
2316
2316
|
function en(e, n) {
|
|
@@ -2324,7 +2324,7 @@ function Ct(e, n) {
|
|
|
2324
2324
|
return `
|
|
2325
2325
|
` + se.repeat(" ", e.indent * n);
|
|
2326
2326
|
}
|
|
2327
|
-
function
|
|
2327
|
+
function xi(e, n) {
|
|
2328
2328
|
var t, r, o;
|
|
2329
2329
|
for (t = 0, r = e.implicitTypes.length; t < r; t += 1)
|
|
2330
2330
|
if (o = e.implicitTypes[t], o.resolve(n))
|
|
@@ -2366,7 +2366,7 @@ function ir(e) {
|
|
|
2366
2366
|
}
|
|
2367
2367
|
var sr = 1, kt = 2, lr = 3, ur = 4, Le = 5;
|
|
2368
2368
|
function ji(e, n, t, r, o, a, i, s) {
|
|
2369
|
-
var l, c = 0, d = null, u = !1, g = !1, f = r !== -1,
|
|
2369
|
+
var l, c = 0, d = null, u = !1, g = !1, f = r !== -1, A = -1, v = Ti(He(e, 0)) && $i(He(e, e.length - 1));
|
|
2370
2370
|
if (n || i)
|
|
2371
2371
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2372
2372
|
if (c = He(e, l), !Ze(c))
|
|
@@ -2377,12 +2377,12 @@ function ji(e, n, t, r, o, a, i, s) {
|
|
|
2377
2377
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2378
2378
|
if (c = He(e, l), c === Ye)
|
|
2379
2379
|
u = !0, f && (g = g || // Foldable line = too long, and not more-indented.
|
|
2380
|
-
l -
|
|
2380
|
+
l - A - 1 > r && e[A + 1] !== " ", A = l);
|
|
2381
2381
|
else if (!Ze(c))
|
|
2382
2382
|
return Le;
|
|
2383
2383
|
v = v && nn(c, d, s), d = c;
|
|
2384
2384
|
}
|
|
2385
|
-
g = g || f && l -
|
|
2385
|
+
g = g || f && l - A - 1 > r && e[A + 1] !== " ";
|
|
2386
2386
|
}
|
|
2387
2387
|
return !u && !g ? v && !i && !o(e) ? sr : a === We ? Le : kt : t > 9 && ir(e) ? Le : i ? a === We ? Le : kt : g ? ur : lr;
|
|
2388
2388
|
}
|
|
@@ -2394,7 +2394,7 @@ function Mi(e, n, t, r, o) {
|
|
|
2394
2394
|
return e.quotingType === We ? '"' + n + '"' : "'" + n + "'";
|
|
2395
2395
|
var a = e.indent * Math.max(1, t), i = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), s = r || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2396
2396
|
function l(c) {
|
|
2397
|
-
return
|
|
2397
|
+
return xi(e, c);
|
|
2398
2398
|
}
|
|
2399
2399
|
switch (ji(
|
|
2400
2400
|
n,
|
|
@@ -2464,22 +2464,22 @@ function Oi(e) {
|
|
|
2464
2464
|
function Fi(e, n, t) {
|
|
2465
2465
|
var r = "", o = e.tag, a, i, s;
|
|
2466
2466
|
for (a = 0, i = t.length; a < i; a += 1)
|
|
2467
|
-
s = t[a], e.replacer && (s = e.replacer.call(t, String(a), s)), (
|
|
2467
|
+
s = t[a], e.replacer && (s = e.replacer.call(t, String(a), s)), (Se(e, n, s, !1, !1) || typeof s > "u" && Se(e, n, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2468
2468
|
e.tag = o, e.dump = "[" + r + "]";
|
|
2469
2469
|
}
|
|
2470
2470
|
function sn(e, n, t, r) {
|
|
2471
2471
|
var o = "", a = e.tag, i, s, l;
|
|
2472
2472
|
for (i = 0, s = t.length; i < s; i += 1)
|
|
2473
|
-
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (
|
|
2473
|
+
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (Se(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && Se(e, n + 1, null, !0, !0, !1, !0)) && ((!r || o !== "") && (o += Ct(e, n)), e.dump && Ye === e.dump.charCodeAt(0) ? o += "-" : o += "- ", o += e.dump);
|
|
2474
2474
|
e.tag = a, e.dump = o || "[]";
|
|
2475
2475
|
}
|
|
2476
|
-
function
|
|
2476
|
+
function Ki(e, n, t) {
|
|
2477
2477
|
var r = "", o = e.tag, a = Object.keys(t), i, s, l, c, d;
|
|
2478
2478
|
for (i = 0, s = a.length; i < s; i += 1)
|
|
2479
|
-
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = a[i], c = t[l], e.replacer && (c = e.replacer.call(t, l, c)),
|
|
2479
|
+
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = a[i], c = t[l], e.replacer && (c = e.replacer.call(t, l, c)), Se(e, n, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), Se(e, n, c, !1, !1) && (d += e.dump, r += d));
|
|
2480
2480
|
e.tag = o, e.dump = "{" + r + "}";
|
|
2481
2481
|
}
|
|
2482
|
-
function
|
|
2482
|
+
function Ni(e, n, t, r) {
|
|
2483
2483
|
var o = "", a = e.tag, i = Object.keys(t), s, l, c, d, u, g;
|
|
2484
2484
|
if (e.sortKeys === !0)
|
|
2485
2485
|
i.sort();
|
|
@@ -2488,7 +2488,7 @@ function Ki(e, n, t, r) {
|
|
|
2488
2488
|
else if (e.sortKeys)
|
|
2489
2489
|
throw new me("sortKeys must be a boolean or a function");
|
|
2490
2490
|
for (s = 0, l = i.length; s < l; s += 1)
|
|
2491
|
-
g = "", (!r || o !== "") && (g += Ct(e, n)), c = i[s], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)),
|
|
2491
|
+
g = "", (!r || o !== "") && (g += Ct(e, n)), c = i[s], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)), Se(e, n + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Ye === e.dump.charCodeAt(0) ? g += "?" : g += "? "), g += e.dump, u && (g += Ct(e, n)), Se(e, n + 1, d, !0, u) && (e.dump && Ye === e.dump.charCodeAt(0) ? g += ":" : g += ": ", g += e.dump, o += g));
|
|
2492
2492
|
e.tag = a, e.dump = o || "{}";
|
|
2493
2493
|
}
|
|
2494
2494
|
function ln(e, n, t) {
|
|
@@ -2508,7 +2508,7 @@ function ln(e, n, t) {
|
|
|
2508
2508
|
}
|
|
2509
2509
|
return !1;
|
|
2510
2510
|
}
|
|
2511
|
-
function
|
|
2511
|
+
function Se(e, n, t, r, o, a, i) {
|
|
2512
2512
|
e.tag = null, e.dump = t, ln(e, t, !1) || ln(e, t, !0);
|
|
2513
2513
|
var s = Xn.call(e.dump), l = r, c;
|
|
2514
2514
|
r && (r = e.flowLevel < 0 || e.flowLevel > n);
|
|
@@ -2517,7 +2517,7 @@ function xe(e, n, t, r, o, a, i) {
|
|
|
2517
2517
|
e.dump = "*ref_" + u;
|
|
2518
2518
|
else {
|
|
2519
2519
|
if (d && g && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), s === "[object Object]")
|
|
2520
|
-
r && Object.keys(e.dump).length !== 0 ? (
|
|
2520
|
+
r && Object.keys(e.dump).length !== 0 ? (Ni(e, n, e.dump, o), g && (e.dump = "&ref_" + u + e.dump)) : (Ki(e, n, e.dump), g && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2521
2521
|
else if (s === "[object Array]")
|
|
2522
2522
|
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? sn(e, n - 1, e.dump, o) : sn(e, n, e.dump, o), g && (e.dump = "&ref_" + u + e.dump)) : (Fi(e, n, e.dump), g && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2523
2523
|
else if (s === "[object String]")
|
|
@@ -2553,10 +2553,10 @@ function _t(e, n, t) {
|
|
|
2553
2553
|
}
|
|
2554
2554
|
function Pi(e, n) {
|
|
2555
2555
|
n = n || {};
|
|
2556
|
-
var t = new
|
|
2556
|
+
var t = new Si(n);
|
|
2557
2557
|
t.noRefs || Bi(e, t);
|
|
2558
2558
|
var r = e;
|
|
2559
|
-
return t.replacer && (r = t.replacer.call({ "": r }, "", r)),
|
|
2559
|
+
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), Se(t, 0, r, !0, !0) ? t.dump + `
|
|
2560
2560
|
` : "";
|
|
2561
2561
|
}
|
|
2562
2562
|
var Li = Pi, qi = {
|
|
@@ -2567,7 +2567,7 @@ function Ot(e, n) {
|
|
|
2567
2567
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2568
2568
|
};
|
|
2569
2569
|
}
|
|
2570
|
-
var Ui = de, Vi = An, Ri = $n, Di = Fn, Gi =
|
|
2570
|
+
var Ui = de, Vi = An, Ri = $n, Di = Fn, Gi = Kn, zi = $t, Hi = Qn.load, Ji = Qn.loadAll, Yi = qi.dump, Wi = me, Zi = {
|
|
2571
2571
|
binary: qn,
|
|
2572
2572
|
float: On,
|
|
2573
2573
|
map: Tn,
|
|
@@ -2579,8 +2579,8 @@ var Ui = de, Vi = An, Ri = $n, Di = Fn, Gi = Nn, zi = $t, Hi = Qn.load, Ji = Qn.
|
|
|
2579
2579
|
int: En,
|
|
2580
2580
|
merge: Ln,
|
|
2581
2581
|
omap: Un,
|
|
2582
|
-
seq:
|
|
2583
|
-
str:
|
|
2582
|
+
seq: xn,
|
|
2583
|
+
str: Sn
|
|
2584
2584
|
}, Qi = Ot("safeLoad", "load"), Xi = Ot("safeLoadAll", "loadAll"), es = Ot("safeDump", "dump"), ts = {
|
|
2585
2585
|
Type: Ui,
|
|
2586
2586
|
Schema: Vi,
|
|
@@ -2636,7 +2636,7 @@ const ns = {
|
|
|
2636
2636
|
},
|
|
2637
2637
|
setup(e) {
|
|
2638
2638
|
const n = e, t = ut(), { i18n: { t: r } } = ue.useI18n(), o = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), a = O(""), i = O("");
|
|
2639
|
-
return
|
|
2639
|
+
return xe(() => n.format, (s) => {
|
|
2640
2640
|
s === "json" ? a.value = JSON.stringify(n.record, null, 2) : s === "yaml" && (i.value = ts.dump(n.record));
|
|
2641
2641
|
}, { immediate: !0 }), (s, l) => {
|
|
2642
2642
|
const c = q("KCodeBlock");
|
|
@@ -2644,11 +2644,11 @@ const ns = {
|
|
|
2644
2644
|
e.format === "structured" ? (m(), $("div", ns, [
|
|
2645
2645
|
(m(!0), $(ve, null, ye(e.propListTypes, (d) => (m(), $("div", {
|
|
2646
2646
|
key: `config-card-details-${d}-props`,
|
|
2647
|
-
class:
|
|
2647
|
+
class: Ke(`config-card-details-${d}-props`),
|
|
2648
2648
|
"data-testid": `config-card-details-${d}-props`
|
|
2649
2649
|
}, [
|
|
2650
2650
|
d !== "basic" ? (m(), $("div", os, F(d === "advanced" ? y(r)("baseConfigCard.sections.advanced") : y(r)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
2651
|
-
(m(!0), $(ve, null, ye(e.propertyCollections[d], (u) => (m(), R(
|
|
2651
|
+
(m(!0), $(ve, null, ye(e.propertyCollections[d], (u) => (m(), R(xt, {
|
|
2652
2652
|
key: u.key,
|
|
2653
2653
|
item: u
|
|
2654
2654
|
}, Te({
|
|
@@ -2674,7 +2674,7 @@ const ns = {
|
|
|
2674
2674
|
], 10, rs))), 128))
|
|
2675
2675
|
])) : G("", !0),
|
|
2676
2676
|
e.format === "json" ? (m(), $("div", as, [
|
|
2677
|
-
|
|
2677
|
+
K(c, {
|
|
2678
2678
|
id: "config-card-codeblock",
|
|
2679
2679
|
code: a.value,
|
|
2680
2680
|
language: "json",
|
|
@@ -2682,7 +2682,7 @@ const ns = {
|
|
|
2682
2682
|
}, null, 8, ["code"])
|
|
2683
2683
|
])) : G("", !0),
|
|
2684
2684
|
e.format === "yaml" ? (m(), $("div", is, [
|
|
2685
|
-
|
|
2685
|
+
K(c, {
|
|
2686
2686
|
id: "config-card-codeblock",
|
|
2687
2687
|
code: i.value,
|
|
2688
2688
|
language: "yaml",
|
|
@@ -2932,15 +2932,15 @@ const ns = {
|
|
|
2932
2932
|
// the last property displayed
|
|
2933
2933
|
section: be.Basic
|
|
2934
2934
|
}
|
|
2935
|
-
}, f = O(!1),
|
|
2936
|
-
var w,
|
|
2935
|
+
}, f = O(!1), A = O(!1), v = O(""), p = O(), S = T(() => {
|
|
2936
|
+
var w, N, B;
|
|
2937
2937
|
if (!p.value)
|
|
2938
2938
|
return [];
|
|
2939
|
-
const k = [],
|
|
2939
|
+
const k = [], x = Object.keys(p.value).length;
|
|
2940
2940
|
for (const j in p.value) {
|
|
2941
|
-
const P = (
|
|
2942
|
-
let Q =
|
|
2943
|
-
(J || J === 0) && (Q = J === -1 ?
|
|
2941
|
+
const P = (N = (w = r.configSchema) == null ? void 0 : w[j]) == null ? void 0 : N.order, J = (B = g[j]) == null ? void 0 : B.order;
|
|
2942
|
+
let Q = x;
|
|
2943
|
+
(J || J === 0) && (Q = J === -1 ? x + 1 : J), P && (Q = P === -1 ? x + 1 : P), k.push([j, Q]);
|
|
2944
2944
|
}
|
|
2945
2945
|
return k.sort(function(j, P) {
|
|
2946
2946
|
return j[1] - P[1];
|
|
@@ -2958,18 +2958,18 @@ const ns = {
|
|
|
2958
2958
|
};
|
|
2959
2959
|
}).filter((j) => !j.hidden && j.key !== r.pluginConfigKey);
|
|
2960
2960
|
}), b = T(() => {
|
|
2961
|
-
var w,
|
|
2961
|
+
var w, N;
|
|
2962
2962
|
if (!p.value || !r.pluginConfigKey)
|
|
2963
2963
|
return [];
|
|
2964
|
-
const B = p.value[r.pluginConfigKey] || {}, k = Object.keys(B).length,
|
|
2964
|
+
const B = p.value[r.pluginConfigKey] || {}, k = Object.keys(B).length, x = [];
|
|
2965
2965
|
for (const j in B) {
|
|
2966
|
-
const P = (
|
|
2966
|
+
const P = (N = (w = r.pluginConfigSchema) == null ? void 0 : w[j]) == null ? void 0 : N.order, J = B[j];
|
|
2967
2967
|
let Q = J != null && J !== "" ? k - 1 : k;
|
|
2968
|
-
P && (Q = P === -1 ? k + 1 : P),
|
|
2968
|
+
P && (Q = P === -1 ? k + 1 : P), x.push([j, Q]);
|
|
2969
2969
|
}
|
|
2970
|
-
return
|
|
2970
|
+
return x.sort(function(j, P) {
|
|
2971
2971
|
return j[1] - P[1];
|
|
2972
|
-
}),
|
|
2972
|
+
}), x.map((j) => {
|
|
2973
2973
|
var P;
|
|
2974
2974
|
const J = j[0], Q = B[J], X = ((P = r.pluginConfigSchema) == null ? void 0 : P[J]) || {};
|
|
2975
2975
|
return {
|
|
@@ -2983,26 +2983,26 @@ const ns = {
|
|
|
2983
2983
|
};
|
|
2984
2984
|
}).filter((j) => !j.hidden);
|
|
2985
2985
|
}), C = T(() => {
|
|
2986
|
-
var w,
|
|
2986
|
+
var w, N, B, k;
|
|
2987
2987
|
return {
|
|
2988
|
-
basic: (w =
|
|
2989
|
-
advanced: (
|
|
2990
|
-
plugin: (k = b.value) == null ? void 0 : k.concat((B =
|
|
2988
|
+
basic: (w = S.value) == null ? void 0 : w.filter((x) => x.section === be.Basic),
|
|
2989
|
+
advanced: (N = S.value) == null ? void 0 : N.filter((x) => x.section === be.Advanced),
|
|
2990
|
+
plugin: (k = b.value) == null ? void 0 : k.concat((B = S.value) == null ? void 0 : B.filter((x) => x.section === be.Plugin))
|
|
2991
2991
|
};
|
|
2992
|
-
}),
|
|
2992
|
+
}), I = T(() => {
|
|
2993
2993
|
const w = [];
|
|
2994
2994
|
return C.value.basic.length && w.push("basic"), C.value.advanced.length && w.push("advanced"), C.value.plugin.length && w.push("plugin"), w;
|
|
2995
2995
|
}), ne = (w) => !!(w.tooltip || o[`${w.key}-label-tooltip`]), pe = T(() => {
|
|
2996
|
-
var w,
|
|
2996
|
+
var w, N;
|
|
2997
2997
|
let B = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2998
|
-
return r.config.app === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((w = r.config) == null ? void 0 : w.controlPlaneId) || "") : r.config.app === "kongManager" && (B = B.replace(/\/{workspace}/gi, (
|
|
2998
|
+
return r.config.app === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((w = r.config) == null ? void 0 : w.controlPlaneId) || "") : r.config.app === "kongManager" && (B = B.replace(/\/{workspace}/gi, (N = r.config) != null && N.workspace ? `/${r.config.workspace}` : "")), B = B.replace(/{id}/gi, r.config.entityId), B;
|
|
2999
2999
|
}), z = (w) => {
|
|
3000
3000
|
p.value && w(JSON.stringify(p.value)) ? n("copy:success", p.value) : n("copy:error");
|
|
3001
3001
|
};
|
|
3002
|
-
return
|
|
3002
|
+
return xe(f, (w) => {
|
|
3003
3003
|
n("loading", w);
|
|
3004
3004
|
}, { immediate: !0 }), Qe(async () => {
|
|
3005
|
-
|
|
3005
|
+
A.value = !1, f.value = !0;
|
|
3006
3006
|
try {
|
|
3007
3007
|
const { data: w } = await l.get(pe.value);
|
|
3008
3008
|
if (r.dataKey)
|
|
@@ -3012,17 +3012,17 @@ const ns = {
|
|
|
3012
3012
|
throw new Error(a("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3013
3013
|
else
|
|
3014
3014
|
p.value = { ...w };
|
|
3015
|
-
Object.keys(r.configSchema).filter((
|
|
3016
|
-
p.value && typeof p.value[
|
|
3015
|
+
Object.keys(r.configSchema).filter((N) => r.configSchema[N].forceShow).forEach((N) => {
|
|
3016
|
+
p.value && typeof p.value[N] > "u" && (p.value[N] = null);
|
|
3017
3017
|
}), n("fetch:success", w);
|
|
3018
3018
|
} catch (w) {
|
|
3019
|
-
const
|
|
3020
|
-
v.value =
|
|
3019
|
+
const N = i(w);
|
|
3020
|
+
v.value = N.startsWith("code") ? a("baseConfigCard.errors.load") : N, A.value = !0, n("fetch:error", w);
|
|
3021
3021
|
} finally {
|
|
3022
3022
|
f.value = !1;
|
|
3023
3023
|
}
|
|
3024
|
-
}), (w,
|
|
3025
|
-
const B = q("KLabel"), k = q("KSelect"),
|
|
3024
|
+
}), (w, N) => {
|
|
3025
|
+
const B = q("KLabel"), k = q("KSelect"), x = q("KButton"), j = q("KClipboardProvider"), P = q("KSkeleton"), J = q("KEmptyState"), Q = q("KCard");
|
|
3026
3026
|
return m(), R(Q, { class: "kong-ui-entity-base-config-card" }, Te({
|
|
3027
3027
|
actions: h(() => [
|
|
3028
3028
|
V("div", hs, [
|
|
@@ -3044,7 +3044,7 @@ const ns = {
|
|
|
3044
3044
|
items: c,
|
|
3045
3045
|
onChange: u
|
|
3046
3046
|
})) : G("", !0),
|
|
3047
|
-
r.config.jsonYamlEnabled && e.configCardDoc ? (m(), R(
|
|
3047
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (m(), R(x, {
|
|
3048
3048
|
key: 2,
|
|
3049
3049
|
appearance: "tertiary",
|
|
3050
3050
|
class: "book-icon",
|
|
@@ -3056,14 +3056,14 @@ const ns = {
|
|
|
3056
3056
|
rel: "noopener",
|
|
3057
3057
|
target: "_blank"
|
|
3058
3058
|
}, [
|
|
3059
|
-
|
|
3059
|
+
K(y(gs), { size: y(wo) }, null, 8, ["size"])
|
|
3060
3060
|
], 8, vs)
|
|
3061
3061
|
]),
|
|
3062
3062
|
_: 1
|
|
3063
3063
|
})) : G("", !0),
|
|
3064
3064
|
e.config.jsonYamlEnabled ? G("", !0) : (m(), R(j, { key: 3 }, {
|
|
3065
3065
|
default: h(({ copyToClipboard: X }) => [
|
|
3066
|
-
!f.value && !
|
|
3066
|
+
!f.value && !A.value ? (m(), R(x, {
|
|
3067
3067
|
key: 0,
|
|
3068
3068
|
appearance: "tertiary",
|
|
3069
3069
|
"data-testid": "json-copy-button",
|
|
@@ -3085,7 +3085,7 @@ const ns = {
|
|
|
3085
3085
|
"data-testid": "config-card-loader",
|
|
3086
3086
|
"table-columns": 2,
|
|
3087
3087
|
type: "table"
|
|
3088
|
-
})) :
|
|
3088
|
+
})) : A.value ? (m(), R(J, {
|
|
3089
3089
|
key: 1,
|
|
3090
3090
|
"data-testid": "config-card-fetch-error",
|
|
3091
3091
|
"is-error": ""
|
|
@@ -3096,9 +3096,9 @@ const ns = {
|
|
|
3096
3096
|
_: 1
|
|
3097
3097
|
})) : G("", !0),
|
|
3098
3098
|
e.config.jsonYamlEnabled ? (m(), $("div", bs, [
|
|
3099
|
-
|
|
3099
|
+
K(ls, {
|
|
3100
3100
|
format: d.value,
|
|
3101
|
-
"prop-list-types":
|
|
3101
|
+
"prop-list-types": I.value,
|
|
3102
3102
|
"property-collections": C.value,
|
|
3103
3103
|
record: p.value
|
|
3104
3104
|
}, Te({ _: 2 }, [
|
|
@@ -3113,13 +3113,13 @@ const ns = {
|
|
|
3113
3113
|
}))
|
|
3114
3114
|
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
3115
3115
|
])) : (m(), $("div", Cs, [
|
|
3116
|
-
(m(!0), $(ve, null, ye(
|
|
3116
|
+
(m(!0), $(ve, null, ye(I.value, (X) => (m(), $("div", {
|
|
3117
3117
|
key: `config-card-details-${X}-props`,
|
|
3118
|
-
class:
|
|
3118
|
+
class: Ke(`config-card-details-${X}-props`),
|
|
3119
3119
|
"data-testid": `config-card-details-${X}-props`
|
|
3120
3120
|
}, [
|
|
3121
3121
|
X !== "basic" ? (m(), $("div", _s, F(X === "advanced" ? y(a)("baseConfigCard.sections.advanced") : y(a)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
3122
|
-
(m(!0), $(ve, null, ye(C.value[X], (ee) => (m(), R(
|
|
3122
|
+
(m(!0), $(ve, null, ye(C.value[X], (ee) => (m(), R(xt, {
|
|
3123
3123
|
key: ee.key,
|
|
3124
3124
|
item: ee
|
|
3125
3125
|
}, Te({
|
|
@@ -3161,10 +3161,10 @@ const ns = {
|
|
|
3161
3161
|
]), 1024);
|
|
3162
3162
|
};
|
|
3163
3163
|
}
|
|
3164
|
-
}), Is = /* @__PURE__ */ ke(ws, [["__scopeId", "data-v-24515123"]]), As = ["onReset", "onSubmit"],
|
|
3164
|
+
}), Is = /* @__PURE__ */ ke(ws, [["__scopeId", "data-v-24515123"]]), As = ["onReset", "onSubmit"], Ss = {
|
|
3165
3165
|
class: "form-actions",
|
|
3166
3166
|
"data-testid": "form-actions"
|
|
3167
|
-
},
|
|
3167
|
+
}, xs = /* @__PURE__ */ re({
|
|
3168
3168
|
__name: "EntityBaseForm",
|
|
3169
3169
|
props: {
|
|
3170
3170
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3217,19 +3217,19 @@ const ns = {
|
|
|
3217
3217
|
const r = e, o = wt(), { i18n: { t: a } } = ue.useI18n(), { getMessageFromError: i } = ue.useErrors(), { axiosInstance: s } = ue.useAxios({
|
|
3218
3218
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3219
3219
|
}), l = O(!1), c = O(!1), d = O(""), u = T(() => r.canSubmit === !1 || r.isReadonly), g = T(() => {
|
|
3220
|
-
var p,
|
|
3220
|
+
var p, S;
|
|
3221
3221
|
if (!r.editId)
|
|
3222
3222
|
return "";
|
|
3223
3223
|
let b = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3224
|
-
return r.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (
|
|
3224
|
+
return r.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (S = r.config) != null && S.workspace ? `/${r.config.workspace}` : "")), b = b.replace(/{id}/gi, r.editId), b;
|
|
3225
3225
|
}), f = () => {
|
|
3226
|
-
r.config.cancelRoute ? o.push(r.config.cancelRoute) :
|
|
3227
|
-
},
|
|
3226
|
+
r.config.cancelRoute ? o.push(r.config.cancelRoute) : A();
|
|
3227
|
+
}, A = () => {
|
|
3228
3228
|
n("cancel");
|
|
3229
3229
|
}, v = () => {
|
|
3230
3230
|
u.value || n("submit");
|
|
3231
3231
|
};
|
|
3232
|
-
return
|
|
3232
|
+
return xe(() => l.value, (p) => {
|
|
3233
3233
|
n("loading", p);
|
|
3234
3234
|
}, { immediate: !0 }), Qe(async () => {
|
|
3235
3235
|
if (r.editId)
|
|
@@ -3238,13 +3238,13 @@ const ns = {
|
|
|
3238
3238
|
const { data: p } = await s.get(g.value);
|
|
3239
3239
|
n("fetch:success", p);
|
|
3240
3240
|
} catch (p) {
|
|
3241
|
-
const
|
|
3242
|
-
d.value =
|
|
3241
|
+
const S = i(p);
|
|
3242
|
+
d.value = S.startsWith("code") ? a("baseForm.errors.edit") : S, c.value = !0, n("fetch:error", p);
|
|
3243
3243
|
} finally {
|
|
3244
3244
|
l.value = !1;
|
|
3245
3245
|
}
|
|
3246
|
-
}), (p,
|
|
3247
|
-
const b = q("KSkeleton"), C = q("KEmptyState"),
|
|
3246
|
+
}), (p, S) => {
|
|
3247
|
+
const b = q("KSkeleton"), C = q("KEmptyState"), I = q("KAlert"), ne = q("KButton"), pe = q("KCard");
|
|
3248
3248
|
return m(), R(pe, { class: "kong-ui-entity-base-form" }, {
|
|
3249
3249
|
body: h(() => [
|
|
3250
3250
|
l.value ? (m(), R(b, {
|
|
@@ -3264,19 +3264,19 @@ const ns = {
|
|
|
3264
3264
|
}, 8, ["cta-text"])) : (m(), $("form", {
|
|
3265
3265
|
key: 2,
|
|
3266
3266
|
"data-testid": "form-content",
|
|
3267
|
-
onReset: rt(
|
|
3267
|
+
onReset: rt(A, ["prevent"]),
|
|
3268
3268
|
onSubmit: rt(v, ["prevent"])
|
|
3269
3269
|
}, [
|
|
3270
3270
|
W(p.$slots, "default", {}, void 0, !0),
|
|
3271
|
-
e.errorMessage ? (m(), R(
|
|
3271
|
+
e.errorMessage ? (m(), R(I, {
|
|
3272
3272
|
key: 0,
|
|
3273
3273
|
"alert-message": e.errorMessage,
|
|
3274
3274
|
appearance: "danger",
|
|
3275
3275
|
"data-testid": "form-error"
|
|
3276
3276
|
}, null, 8, ["alert-message"])) : G("", !0),
|
|
3277
|
-
V("div",
|
|
3277
|
+
V("div", Ss, [
|
|
3278
3278
|
W(p.$slots, "form-actions", {}, () => [
|
|
3279
|
-
|
|
3279
|
+
K(ne, {
|
|
3280
3280
|
appearance: "secondary",
|
|
3281
3281
|
"data-testid": "form-cancel",
|
|
3282
3282
|
disabled: e.isReadonly,
|
|
@@ -3287,7 +3287,7 @@ const ns = {
|
|
|
3287
3287
|
]),
|
|
3288
3288
|
_: 1
|
|
3289
3289
|
}, 8, ["disabled"]),
|
|
3290
|
-
|
|
3290
|
+
K(ne, {
|
|
3291
3291
|
appearance: "primary",
|
|
3292
3292
|
"data-testid": "form-submit",
|
|
3293
3293
|
disabled: u.value,
|
|
@@ -3306,7 +3306,7 @@ const ns = {
|
|
|
3306
3306
|
});
|
|
3307
3307
|
};
|
|
3308
3308
|
}
|
|
3309
|
-
}), Ts = /* @__PURE__ */ ke(
|
|
3309
|
+
}), Ts = /* @__PURE__ */ ke(xs, [["__scopeId", "data-v-81612aef"]]), $s = {
|
|
3310
3310
|
key: 0,
|
|
3311
3311
|
"data-testid": "first-col"
|
|
3312
3312
|
}, js = /* @__PURE__ */ re({
|
|
@@ -3330,16 +3330,16 @@ const ns = {
|
|
|
3330
3330
|
return ((v = t.value) == null ? void 0 : v.querySelector('[data-testid="first-col"]')) || null;
|
|
3331
3331
|
}), o = T(() => {
|
|
3332
3332
|
var v, p;
|
|
3333
|
-
const
|
|
3334
|
-
return
|
|
3333
|
+
const S = (v = n.rowEl) == null ? void 0 : v.querySelectorAll("td");
|
|
3334
|
+
return S ? ((p = S[0]) == null ? void 0 : p.getAttribute("data-testid")) === n.keyName : !1;
|
|
3335
3335
|
});
|
|
3336
3336
|
let a;
|
|
3337
3337
|
const i = () => {
|
|
3338
3338
|
a && (a.disconnect(), a = void 0);
|
|
3339
3339
|
}, s = () => {
|
|
3340
|
-
var v, p,
|
|
3341
|
-
c.value = ((v = r.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((
|
|
3342
|
-
}, l = O({}), c = O(0), d = O(0), u = O(""), g = T(() => [r.value, t.value]), f =
|
|
3340
|
+
var v, p, S;
|
|
3341
|
+
c.value = ((v = r.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((S = l.value) == null ? void 0 : S.innerText) || "";
|
|
3342
|
+
}, l = O({}), c = O(0), d = O(0), u = O(""), g = T(() => [r.value, t.value]), f = xe(
|
|
3343
3343
|
g,
|
|
3344
3344
|
(v) => {
|
|
3345
3345
|
if (o.value && (i(), "ResizeObserver" in window && window)) {
|
|
@@ -3353,21 +3353,21 @@ const ns = {
|
|
|
3353
3353
|
}
|
|
3354
3354
|
},
|
|
3355
3355
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3356
|
-
),
|
|
3356
|
+
), A = T(() => o.value ? c.value > d.value : !1);
|
|
3357
3357
|
return hr(() => {
|
|
3358
3358
|
s();
|
|
3359
3359
|
}), vr(() => {
|
|
3360
3360
|
f();
|
|
3361
3361
|
}), (v, p) => {
|
|
3362
|
-
const
|
|
3362
|
+
const S = q("KTooltip");
|
|
3363
3363
|
return m(), $("span", {
|
|
3364
3364
|
ref_key: "contentRef",
|
|
3365
3365
|
ref: l,
|
|
3366
3366
|
class: "content-wrapper"
|
|
3367
3367
|
}, [
|
|
3368
3368
|
o.value ? (m(), $("span", $s, [
|
|
3369
|
-
|
|
3370
|
-
label:
|
|
3369
|
+
K(S, {
|
|
3370
|
+
label: A.value ? u.value : "",
|
|
3371
3371
|
"max-width": "300",
|
|
3372
3372
|
placement: "bottomStart"
|
|
3373
3373
|
}, {
|
|
@@ -3383,7 +3383,7 @@ const ns = {
|
|
|
3383
3383
|
}), Ms = /* @__PURE__ */ ke(js, [["__scopeId", "data-v-e42a20c9"]]), Es = { class: "toolbar-container" }, Os = {
|
|
3384
3384
|
key: 0,
|
|
3385
3385
|
class: "toolbar-button-container"
|
|
3386
|
-
}, Fs = ["data-testid"],
|
|
3386
|
+
}, Fs = ["data-testid"], Ks = /* @__PURE__ */ re({
|
|
3387
3387
|
__name: "EntityBaseTable",
|
|
3388
3388
|
props: {
|
|
3389
3389
|
// table header configuration
|
|
@@ -3494,11 +3494,11 @@ const ns = {
|
|
|
3494
3494
|
setup(e, { emit: n }) {
|
|
3495
3495
|
const t = e, { i18n: { t: r } } = ue.useI18n(), o = T(() => t.cacheIdentifier || t.preferencesStorageKey), a = (C) => C.hasData || !!t.query, i = T(() => {
|
|
3496
3496
|
const C = [];
|
|
3497
|
-
return Object.keys(t.tableHeaders).forEach((
|
|
3498
|
-
const ne = t.tableHeaders[
|
|
3497
|
+
return Object.keys(t.tableHeaders).forEach((I) => {
|
|
3498
|
+
const ne = t.tableHeaders[I];
|
|
3499
3499
|
C.push({
|
|
3500
|
-
label: ne.label ??
|
|
3501
|
-
key:
|
|
3500
|
+
label: ne.label ?? I,
|
|
3501
|
+
key: I,
|
|
3502
3502
|
sortable: ne.sortable ?? !1
|
|
3503
3503
|
});
|
|
3504
3504
|
}), t.enableEntityActions && C.push({
|
|
@@ -3510,27 +3510,27 @@ const ns = {
|
|
|
3510
3510
|
"data-testid": C.name,
|
|
3511
3511
|
...t.rowAttributes(C)
|
|
3512
3512
|
}), l = O({}), c = (C) => {
|
|
3513
|
-
var
|
|
3514
|
-
return (
|
|
3513
|
+
var I;
|
|
3514
|
+
return (I = l.value) == null ? void 0 : I.$el.querySelector(`[data-rowid="${C.id}"]`);
|
|
3515
3515
|
}, d = (C) => {
|
|
3516
|
-
const
|
|
3516
|
+
const I = {
|
|
3517
3517
|
"data-testid": C.headerKey,
|
|
3518
3518
|
...t.cellAttributes(C)
|
|
3519
3519
|
};
|
|
3520
|
-
return C.colIndex === 0 && (
|
|
3520
|
+
return C.colIndex === 0 && (I.style = {
|
|
3521
3521
|
maxWidth: "250px",
|
|
3522
3522
|
overflowX: "hidden",
|
|
3523
3523
|
textOverflow: "ellipsis"
|
|
3524
|
-
}),
|
|
3524
|
+
}), I;
|
|
3525
3525
|
}, u = () => {
|
|
3526
3526
|
n("empty-state-cta-clicked"), g();
|
|
3527
3527
|
}, g = () => {
|
|
3528
3528
|
n("clear-search-input");
|
|
3529
|
-
}, f = T(() => t.disableRowClick ? void 0 : (C,
|
|
3530
|
-
n("click:row",
|
|
3531
|
-
}),
|
|
3529
|
+
}, f = T(() => t.disableRowClick ? void 0 : (C, I) => {
|
|
3530
|
+
n("click:row", I);
|
|
3531
|
+
}), A = (C) => {
|
|
3532
3532
|
n("sort", C);
|
|
3533
|
-
}, { setTablePreferences: v, getTablePreferences: p } =
|
|
3533
|
+
}, { setTablePreferences: v, getTablePreferences: p } = xr(), S = T(() => {
|
|
3534
3534
|
const C = p(t.preferencesStorageKey);
|
|
3535
3535
|
return {
|
|
3536
3536
|
...t.initialFetcherParams,
|
|
@@ -3539,14 +3539,14 @@ const ns = {
|
|
|
3539
3539
|
}), b = (C) => {
|
|
3540
3540
|
t.preferencesStorageKey && v(t.preferencesStorageKey, C);
|
|
3541
3541
|
};
|
|
3542
|
-
return (C,
|
|
3543
|
-
const ne = q("KIcon"), pe = q("KButton"), z = q("KDropdown"), w = q("KTable"),
|
|
3544
|
-
return m(), R(
|
|
3542
|
+
return (C, I) => {
|
|
3543
|
+
const ne = q("KIcon"), pe = q("KButton"), z = q("KDropdown"), w = q("KTable"), N = q("KCard");
|
|
3544
|
+
return m(), R(N, {
|
|
3545
3545
|
class: "kong-ui-entity-base-table",
|
|
3546
3546
|
title: e.title
|
|
3547
3547
|
}, {
|
|
3548
3548
|
body: h(() => [
|
|
3549
|
-
|
|
3549
|
+
K(w, {
|
|
3550
3550
|
ref_key: "tableRefs",
|
|
3551
3551
|
ref: l,
|
|
3552
3552
|
"cache-identifier": o.value,
|
|
@@ -3567,14 +3567,14 @@ const ns = {
|
|
|
3567
3567
|
"has-error": !!e.errorMessage,
|
|
3568
3568
|
headers: i.value,
|
|
3569
3569
|
"hide-pagination-when-optional": "",
|
|
3570
|
-
"initial-fetcher-params":
|
|
3570
|
+
"initial-fetcher-params": S.value,
|
|
3571
3571
|
"is-loading": e.isLoading,
|
|
3572
3572
|
"pagination-type": e.paginationType,
|
|
3573
3573
|
"row-attrs": s,
|
|
3574
3574
|
"search-input": e.query,
|
|
3575
3575
|
onKtableEmptyStateCtaClicked: u,
|
|
3576
3576
|
"onRow:click": f.value,
|
|
3577
|
-
onSort:
|
|
3577
|
+
onSort: I[0] || (I[0] = (B) => A(B)),
|
|
3578
3578
|
"onUpdate:tablePreferences": b
|
|
3579
3579
|
}, Te({
|
|
3580
3580
|
toolbar: h(({ state: B }) => [
|
|
@@ -3587,12 +3587,12 @@ const ns = {
|
|
|
3587
3587
|
[tt, a(B)]
|
|
3588
3588
|
])
|
|
3589
3589
|
]),
|
|
3590
|
-
actions: h(({ row: B, rowKey: k, rowValue:
|
|
3590
|
+
actions: h(({ row: B, rowKey: k, rowValue: x }) => [
|
|
3591
3591
|
V("div", {
|
|
3592
3592
|
class: "actions-container",
|
|
3593
3593
|
"data-testid": B.name
|
|
3594
3594
|
}, [
|
|
3595
|
-
|
|
3595
|
+
K(z, {
|
|
3596
3596
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3597
3597
|
width: e.dropdownMenuWidth
|
|
3598
3598
|
}, {
|
|
@@ -3600,17 +3600,17 @@ const ns = {
|
|
|
3600
3600
|
W(C.$slots, "actions", {
|
|
3601
3601
|
row: B,
|
|
3602
3602
|
rowKey: k,
|
|
3603
|
-
rowValue:
|
|
3603
|
+
rowValue: x
|
|
3604
3604
|
}, void 0, !0)
|
|
3605
3605
|
]),
|
|
3606
3606
|
default: h(() => [
|
|
3607
|
-
|
|
3607
|
+
K(pe, {
|
|
3608
3608
|
class: "actions-trigger",
|
|
3609
3609
|
"data-testid": "overflow-actions-button",
|
|
3610
3610
|
size: "small"
|
|
3611
3611
|
}, {
|
|
3612
3612
|
icon: h(() => [
|
|
3613
|
-
|
|
3613
|
+
K(ne, {
|
|
3614
3614
|
color: y(ko),
|
|
3615
3615
|
icon: "more",
|
|
3616
3616
|
size: "16"
|
|
@@ -3627,14 +3627,14 @@ const ns = {
|
|
|
3627
3627
|
}, [
|
|
3628
3628
|
ye(e.tableHeaders, (B, k) => ({
|
|
3629
3629
|
name: k,
|
|
3630
|
-
fn: h(({ row:
|
|
3631
|
-
|
|
3630
|
+
fn: h(({ row: x, rowKey: j, rowValue: P }) => [
|
|
3631
|
+
K(Ms, {
|
|
3632
3632
|
"key-name": String(k),
|
|
3633
|
-
"row-el": c(
|
|
3633
|
+
"row-el": c(x)
|
|
3634
3634
|
}, {
|
|
3635
3635
|
default: h(() => [
|
|
3636
3636
|
W(C.$slots, k, {
|
|
3637
|
-
row:
|
|
3637
|
+
row: x,
|
|
3638
3638
|
rowKey: j,
|
|
3639
3639
|
rowValue: P
|
|
3640
3640
|
}, () => [
|
|
@@ -3651,7 +3651,7 @@ const ns = {
|
|
|
3651
3651
|
}, 8, ["title"]);
|
|
3652
3652
|
};
|
|
3653
3653
|
}
|
|
3654
|
-
}),
|
|
3654
|
+
}), Ns = /* @__PURE__ */ ke(Ks, [["__scopeId", "data-v-86d2d2a3"]]), Bs = {
|
|
3655
3655
|
key: 0,
|
|
3656
3656
|
class: "kong-ui-entity-delete-error"
|
|
3657
3657
|
}, Ps = {
|
|
@@ -3716,14 +3716,14 @@ const ns = {
|
|
|
3716
3716
|
}, {
|
|
3717
3717
|
"body-content": h(() => [
|
|
3718
3718
|
e.error ? (m(), $("div", Bs, [
|
|
3719
|
-
|
|
3719
|
+
K(c, { appearance: "danger" }, {
|
|
3720
3720
|
alertMessage: h(() => [
|
|
3721
3721
|
Z(F(e.error), 1)
|
|
3722
3722
|
]),
|
|
3723
3723
|
_: 1
|
|
3724
3724
|
})
|
|
3725
3725
|
])) : G("", !0),
|
|
3726
|
-
|
|
3726
|
+
K(y(r), {
|
|
3727
3727
|
class: "message",
|
|
3728
3728
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3729
3729
|
tag: "p"
|
|
@@ -3815,19 +3815,19 @@ const ns = {
|
|
|
3815
3815
|
setup(e, { emit: n }) {
|
|
3816
3816
|
const t = e, { i18n: { t: r } } = ue.useI18n(), o = O(!1), a = O({}), i = T(() => {
|
|
3817
3817
|
const p = [];
|
|
3818
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
3819
|
-
|
|
3818
|
+
return new URLSearchParams(t.modelValue).forEach((S, b) => {
|
|
3819
|
+
S !== "" && p.push(b);
|
|
3820
3820
|
}), p;
|
|
3821
3821
|
}), s = T(() => {
|
|
3822
3822
|
const p = t.config.fields;
|
|
3823
|
-
return Object.keys(p).filter((
|
|
3824
|
-
label: p[
|
|
3825
|
-
value:
|
|
3823
|
+
return Object.keys(p).filter((S) => p[S].searchable).map((S) => ({
|
|
3824
|
+
label: p[S].label || S,
|
|
3825
|
+
value: S
|
|
3826
3826
|
}));
|
|
3827
3827
|
});
|
|
3828
|
-
|
|
3829
|
-
a.value = {}, new URLSearchParams(p).forEach((
|
|
3830
|
-
a.value[b] =
|
|
3828
|
+
xe(() => t.modelValue, (p) => {
|
|
3829
|
+
a.value = {}, new URLSearchParams(p).forEach((S, b) => {
|
|
3830
|
+
a.value[b] = S;
|
|
3831
3831
|
});
|
|
3832
3832
|
});
|
|
3833
3833
|
const l = () => {
|
|
@@ -3835,27 +3835,27 @@ const ns = {
|
|
|
3835
3835
|
}, c = (p) => {
|
|
3836
3836
|
n("update:modelValue", p);
|
|
3837
3837
|
}, d = (p) => `filter-${p}`, u = (p) => {
|
|
3838
|
-
var
|
|
3839
|
-
return (((b = (
|
|
3838
|
+
var S, b;
|
|
3839
|
+
return (((b = (S = t.config.schema) == null ? void 0 : S[p]) == null ? void 0 : b.values) ?? []).map((C) => ({
|
|
3840
3840
|
value: C,
|
|
3841
3841
|
label: C
|
|
3842
3842
|
}));
|
|
3843
3843
|
}, g = (p) => {
|
|
3844
|
-
var
|
|
3845
|
-
return ((b = (
|
|
3844
|
+
var S, b;
|
|
3845
|
+
return ((b = (S = t.config.schema) == null ? void 0 : S[p]) == null ? void 0 : b.type) ?? "text";
|
|
3846
3846
|
}, f = (p) => {
|
|
3847
3847
|
a.value = {
|
|
3848
3848
|
...a.value,
|
|
3849
3849
|
[p]: ""
|
|
3850
3850
|
}, v();
|
|
3851
|
-
},
|
|
3851
|
+
}, A = () => {
|
|
3852
3852
|
a.value = {}, v(!0);
|
|
3853
3853
|
}, v = (p = !1) => {
|
|
3854
|
-
const
|
|
3855
|
-
p && (o.value = !1), n("update:modelValue", new URLSearchParams(
|
|
3854
|
+
const S = Object.keys(a.value).reduce((b, C) => (a.value[C] && (b[C] = `${a.value[C]}`), b), {});
|
|
3855
|
+
p && (o.value = !1), n("update:modelValue", new URLSearchParams(S).toString());
|
|
3856
3856
|
};
|
|
3857
|
-
return (p,
|
|
3858
|
-
const b = q("KInput"), C = q("KButton"),
|
|
3857
|
+
return (p, S) => {
|
|
3858
|
+
const b = q("KInput"), C = q("KButton"), I = q("KSelect"), ne = q("KMenuItem"), pe = q("KMenu");
|
|
3859
3859
|
return e.config.isExactMatch ? (m(), R(b, {
|
|
3860
3860
|
key: 0,
|
|
3861
3861
|
autocomplete: "off",
|
|
@@ -3866,17 +3866,17 @@ const ns = {
|
|
|
3866
3866
|
"onUpdate:modelValue": c
|
|
3867
3867
|
}, {
|
|
3868
3868
|
before: h(() => [
|
|
3869
|
-
|
|
3869
|
+
K(cn)
|
|
3870
3870
|
]),
|
|
3871
3871
|
_: 1
|
|
3872
3872
|
}, 8, ["model-value", "placeholder"])) : (m(), $("div", zs, [
|
|
3873
|
-
|
|
3873
|
+
K(C, {
|
|
3874
3874
|
appearance: "tertiary",
|
|
3875
3875
|
"data-testid": "filter-button",
|
|
3876
3876
|
onClick: l
|
|
3877
3877
|
}, {
|
|
3878
3878
|
default: h(() => [
|
|
3879
|
-
|
|
3879
|
+
K(cn),
|
|
3880
3880
|
Z(" " + F(y(r)("filter.filterButtonText")) + " " + F(i.value.length > 0 ? `(${i.value.length})` : ""), 1)
|
|
3881
3881
|
]),
|
|
3882
3882
|
_: 1
|
|
@@ -3887,7 +3887,7 @@ const ns = {
|
|
|
3887
3887
|
}, null, 512), [
|
|
3888
3888
|
[tt, o.value]
|
|
3889
3889
|
]),
|
|
3890
|
-
et(
|
|
3890
|
+
et(K(pe, { class: "kong-ui-entity-filter-menu" }, {
|
|
3891
3891
|
body: h(() => [
|
|
3892
3892
|
(m(!0), $(ve, null, ye(s.value, (z, w) => (m(), R(ne, {
|
|
3893
3893
|
key: z.value,
|
|
@@ -3904,14 +3904,14 @@ const ns = {
|
|
|
3904
3904
|
])
|
|
3905
3905
|
]),
|
|
3906
3906
|
itemBody: h(() => {
|
|
3907
|
-
var
|
|
3907
|
+
var N, B;
|
|
3908
3908
|
return [
|
|
3909
3909
|
V("div", Ys, [
|
|
3910
3910
|
V("label", {
|
|
3911
3911
|
class: "menu-item-label",
|
|
3912
3912
|
for: d(z.value)
|
|
3913
3913
|
}, F(y(r)("filter.fieldLabel")), 9, Ws),
|
|
3914
|
-
((B = (
|
|
3914
|
+
((B = (N = e.config.schema) == null ? void 0 : N[z.value]) == null ? void 0 : B.type) === "select" ? (m(), R(I, {
|
|
3915
3915
|
key: 0,
|
|
3916
3916
|
id: d(z.value),
|
|
3917
3917
|
modelValue: a.value[z.value],
|
|
@@ -3930,18 +3930,18 @@ const ns = {
|
|
|
3930
3930
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3931
3931
|
]),
|
|
3932
3932
|
V("div", Zs, [
|
|
3933
|
-
|
|
3933
|
+
K(C, {
|
|
3934
3934
|
appearance: "tertiary",
|
|
3935
3935
|
"data-testid": "apply-filter",
|
|
3936
3936
|
size: "small",
|
|
3937
|
-
onClick:
|
|
3937
|
+
onClick: S[0] || (S[0] = (k) => v(!0))
|
|
3938
3938
|
}, {
|
|
3939
3939
|
default: h(() => [
|
|
3940
3940
|
Z(F(y(r)("filter.applyButtonText")), 1)
|
|
3941
3941
|
]),
|
|
3942
3942
|
_: 1
|
|
3943
3943
|
}),
|
|
3944
|
-
|
|
3944
|
+
K(C, {
|
|
3945
3945
|
appearance: "tertiary",
|
|
3946
3946
|
"data-testid": "clear-filter",
|
|
3947
3947
|
size: "small",
|
|
@@ -3960,9 +3960,9 @@ const ns = {
|
|
|
3960
3960
|
]),
|
|
3961
3961
|
actionButton: h(() => [
|
|
3962
3962
|
V("div", Qs, [
|
|
3963
|
-
|
|
3963
|
+
K(C, {
|
|
3964
3964
|
size: "small",
|
|
3965
|
-
onClick:
|
|
3965
|
+
onClick: A
|
|
3966
3966
|
}, {
|
|
3967
3967
|
default: h(() => [
|
|
3968
3968
|
Z(F(y(r)("filter.clearAllButtonText")), 1)
|
|
@@ -4001,7 +4001,7 @@ const ns = {
|
|
|
4001
4001
|
},
|
|
4002
4002
|
setup(e) {
|
|
4003
4003
|
const n = e, t = O(void 0), r = T(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
4004
|
-
return
|
|
4004
|
+
return xe(() => n.authFunction, async () => {
|
|
4005
4005
|
t.value = await n.authFunction();
|
|
4006
4006
|
}, { immediate: !0 }), (o, a) => r.value ? W(o.$slots, "default", {
|
|
4007
4007
|
key: 0,
|
|
@@ -4044,12 +4044,12 @@ const ns = {
|
|
|
4044
4044
|
setup(e) {
|
|
4045
4045
|
const n = ut();
|
|
4046
4046
|
return (t, r) => (m(), $("fieldset", {
|
|
4047
|
-
class:
|
|
4047
|
+
class: Ke(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4048
4048
|
}, [
|
|
4049
4049
|
V("div", tl, [
|
|
4050
4050
|
e.hideInfoHeader ? G("", !0) : (m(), $("div", {
|
|
4051
4051
|
key: 0,
|
|
4052
|
-
class:
|
|
4052
|
+
class: Ke(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4053
4053
|
}, [
|
|
4054
4054
|
e.title ? (m(), $("h4", nl, F(e.title), 1)) : G("", !0),
|
|
4055
4055
|
e.description || y(n).description ? (m(), $("div", rl, [
|
|
@@ -4106,7 +4106,7 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4106
4106
|
fetchedItemsKey: "data",
|
|
4107
4107
|
searchKeys: ["name", "id"]
|
|
4108
4108
|
}
|
|
4109
|
-
), g = T(() => c.value ? r("consumer_groups.errors.general") : ""), f = O(0),
|
|
4109
|
+
), g = T(() => c.value ? r("consumer_groups.errors.general") : ""), f = O(0), A = T(() => l.value === void 0), v = T(() => u.value.map((k) => ({
|
|
4110
4110
|
label: k.name,
|
|
4111
4111
|
value: k.id,
|
|
4112
4112
|
selected: a.value.includes(k.id),
|
|
@@ -4114,53 +4114,53 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4114
4114
|
// we need this to determine whether or not to show the description text
|
|
4115
4115
|
}))), p = (k) => {
|
|
4116
4116
|
var j;
|
|
4117
|
-
const
|
|
4118
|
-
return
|
|
4119
|
-
},
|
|
4120
|
-
|
|
4121
|
-
}, b = O([]), C = O(!1),
|
|
4117
|
+
const x = A.value ? u.value.find((P) => P.id === k) : (j = l.value) == null ? void 0 : j.find((P) => P.id === k);
|
|
4118
|
+
return x ? x.name : k;
|
|
4119
|
+
}, S = () => {
|
|
4120
|
+
I.value = "", b.value = [], w.value = [], n("cancel");
|
|
4121
|
+
}, b = O([]), C = O(!1), I = O(""), ne = async () => {
|
|
4122
4122
|
if (!a.value.length) {
|
|
4123
|
-
|
|
4123
|
+
I.value = "", w.value = [], n("cancel");
|
|
4124
4124
|
return;
|
|
4125
4125
|
}
|
|
4126
|
-
C.value = !0,
|
|
4126
|
+
C.value = !0, I.value = "", b.value = [], w.value = [];
|
|
4127
4127
|
try {
|
|
4128
|
-
const k = a.value.map((P) => z(P)),
|
|
4128
|
+
const k = a.value.map((P) => z(P)), x = await Promise.allSettled(k);
|
|
4129
4129
|
let j = !0;
|
|
4130
|
-
|
|
4130
|
+
x.forEach((P) => {
|
|
4131
4131
|
P.status !== "fulfilled" && (j = !1);
|
|
4132
|
-
}), j ? (b.value = [], w.value = [], n("add:success", a.value), a.value = []) : (b.value.length && n("add:partial-success", b.value), a.value = [],
|
|
4132
|
+
}), j ? (b.value = [], w.value = [], n("add:success", a.value), a.value = []) : (b.value.length && n("add:partial-success", b.value), a.value = [], N(x));
|
|
4133
4133
|
} catch {
|
|
4134
|
-
|
|
4134
|
+
I.value = r("consumer_groups.errors.add"), n("error", I.value);
|
|
4135
4135
|
} finally {
|
|
4136
4136
|
C.value = !1;
|
|
4137
4137
|
}
|
|
4138
4138
|
}, pe = T(() => {
|
|
4139
|
-
var
|
|
4139
|
+
var x, j, P, J;
|
|
4140
4140
|
let k = `${t.config.apiBaseUrl}${$e.list[t.config.app].forConsumer}`;
|
|
4141
|
-
return t.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((
|
|
4141
|
+
return t.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((x = t.config) == null ? void 0 : x.controlPlaneId) || "").replace(/{consumerId}/gi, ((j = t.config) == null ? void 0 : j.consumerId) || "") : t.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (P = t.config) != null && P.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((J = t.config) == null ? void 0 : J.consumerId) || "")), k;
|
|
4142
4142
|
}), z = async (k) => {
|
|
4143
|
-
const
|
|
4143
|
+
const x = {
|
|
4144
4144
|
group: k
|
|
4145
4145
|
};
|
|
4146
4146
|
try {
|
|
4147
|
-
const j = await o.post(pe.value,
|
|
4147
|
+
const j = await o.post(pe.value, x);
|
|
4148
4148
|
return b.value.push(k), j;
|
|
4149
4149
|
} catch (j) {
|
|
4150
4150
|
let P = `${p(k)} - ${j.message}`;
|
|
4151
4151
|
return j.response.status === 409 && (P = `${p(k)} - ${r("consumer_groups.errors.already_added")}`), Promise.reject(Error(P));
|
|
4152
4152
|
}
|
|
4153
|
-
}, w = O([]),
|
|
4154
|
-
w.value = k.map((
|
|
4153
|
+
}, w = O([]), N = (k) => {
|
|
4154
|
+
w.value = k.map((x) => {
|
|
4155
4155
|
var j;
|
|
4156
|
-
return (j =
|
|
4156
|
+
return (j = x.reason) == null ? void 0 : j.message;
|
|
4157
4157
|
}).filter(Boolean);
|
|
4158
4158
|
};
|
|
4159
|
-
return
|
|
4159
|
+
return xe(v, () => {
|
|
4160
4160
|
f.value++;
|
|
4161
4161
|
}, { immediate: !0, deep: !0 }), Qe(async () => {
|
|
4162
4162
|
await d();
|
|
4163
|
-
}), (k,
|
|
4163
|
+
}), (k, x) => {
|
|
4164
4164
|
const j = q("KMultiselect"), P = q("KAlert"), J = q("KPrompt");
|
|
4165
4165
|
return m(), R(J, {
|
|
4166
4166
|
"action-pending": C.value,
|
|
@@ -4168,18 +4168,18 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4168
4168
|
"data-testid": "add-to-group-modal",
|
|
4169
4169
|
"is-visible": e.visible,
|
|
4170
4170
|
title: y(r)("consumer_groups.consumers.add.title"),
|
|
4171
|
-
onCanceled:
|
|
4171
|
+
onCanceled: S,
|
|
4172
4172
|
onProceed: ne
|
|
4173
4173
|
}, {
|
|
4174
4174
|
"body-content": h(() => [
|
|
4175
4175
|
V("div", cl, [
|
|
4176
4176
|
V("p", dl, F(y(r)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4177
|
-
|
|
4177
|
+
K(j, {
|
|
4178
4178
|
modelValue: a.value,
|
|
4179
|
-
"onUpdate:modelValue":
|
|
4179
|
+
"onUpdate:modelValue": x[0] || (x[0] = (Q) => a.value = Q),
|
|
4180
4180
|
autosuggest: "",
|
|
4181
4181
|
"data-testid": "add-to-groups-multiselect",
|
|
4182
|
-
"dropdown-footer-text":
|
|
4182
|
+
"dropdown-footer-text": A.value ? y(r)("consumer_groups.consumers.add.footer") : void 0,
|
|
4183
4183
|
items: v.value,
|
|
4184
4184
|
label: y(r)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
4185
4185
|
loading: y(s),
|
|
@@ -4189,14 +4189,14 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4189
4189
|
width: "100%",
|
|
4190
4190
|
onQueryChange: y(i)
|
|
4191
4191
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4192
|
-
|
|
4193
|
-
|
|
4192
|
+
I.value || g.value || w.value.length ? (m(), $("div", pl, [
|
|
4193
|
+
K(P, { appearance: "danger" }, {
|
|
4194
4194
|
alertMessage: h(() => [
|
|
4195
4195
|
V("p", null, F(y(r)("consumer_groups.errors.add")), 1),
|
|
4196
4196
|
w.value.length ? (m(), $("ul", fl, [
|
|
4197
4197
|
(m(!0), $(ve, null, ye(w.value, (Q, X) => (m(), $("li", { key: X }, F(Q), 1))), 128))
|
|
4198
4198
|
])) : G("", !0),
|
|
4199
|
-
V("div", null, F(
|
|
4199
|
+
V("div", null, F(I.value || g.value), 1)
|
|
4200
4200
|
]),
|
|
4201
4201
|
_: 1
|
|
4202
4202
|
})
|
|
@@ -4208,12 +4208,12 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4208
4208
|
};
|
|
4209
4209
|
}
|
|
4210
4210
|
});
|
|
4211
|
-
const
|
|
4211
|
+
const Kt = (e, n) => {
|
|
4212
4212
|
const t = e.__vccOpts || e;
|
|
4213
4213
|
for (const [r, o] of n)
|
|
4214
4214
|
t[r] = o;
|
|
4215
4215
|
return t;
|
|
4216
|
-
}, gl = /* @__PURE__ */
|
|
4216
|
+
}, gl = /* @__PURE__ */ Kt(ml, [["__scopeId", "data-v-4d30f3c5"]]), yl = { class: "kong-ui-entities-consumer-groups-list" }, hl = { key: 1 }, vl = /* @__PURE__ */ re({
|
|
4217
4217
|
__name: "ConsumerGroupList",
|
|
4218
4218
|
props: {
|
|
4219
4219
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4254,38 +4254,40 @@ const Nt = (e, n) => {
|
|
|
4254
4254
|
},
|
|
4255
4255
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4256
4256
|
setup(e, { emit: n }) {
|
|
4257
|
-
var
|
|
4257
|
+
var Nt;
|
|
4258
4258
|
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } = Ft({
|
|
4259
|
-
headers: (
|
|
4260
|
-
}), s = O(1), l = T(() => !!t.config.consumerId), c = T(
|
|
4259
|
+
headers: (Nt = t.config) == null ? void 0 : Nt.requestHeaders
|
|
4260
|
+
}), s = O(1), l = T(() => !!t.config.consumerId), c = T(
|
|
4261
|
+
() => l.value ? "kong-ui-entities-consumer-groups-list-in-consumer-page" : "kong-ui-entities-consumer-groups-list"
|
|
4262
|
+
), d = T(() => t.config.app !== "kongManager" || !!t.config.disableSorting), u = {
|
|
4261
4263
|
name: { label: o("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4262
4264
|
};
|
|
4263
|
-
t.config.app === "kongManager" && (
|
|
4264
|
-
const
|
|
4265
|
+
t.config.app === "kongManager" && (u.consumers_count = { label: o("consumer_groups.list.table_headers.consumers_count"), searchable: !1, sortable: !1 }), u.tags = { label: o("consumer_groups.list.table_headers.tags"), sortable: !1 };
|
|
4266
|
+
const g = u, f = (E) => ({
|
|
4265
4267
|
"data-testid": E.username ?? E.custom_id ?? E.id
|
|
4266
|
-
}),
|
|
4268
|
+
}), A = T(() => {
|
|
4267
4269
|
var H, le, Ce, Ee;
|
|
4268
4270
|
let E = `${t.config.apiBaseUrl}${$e.list[t.config.app][l.value ? "forConsumer" : "all"]}`;
|
|
4269
4271
|
return t.config.app === "konnect" ? E = E.replace(/{controlPlaneId}/gi, ((H = t.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerId}/gi, ((le = t.config) == null ? void 0 : le.consumerId) || "") : t.config.app === "kongManager" && (E = E.replace(/\/{workspace}/gi, (Ce = t.config) != null && Ce.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), E;
|
|
4270
|
-
}),
|
|
4272
|
+
}), v = O(""), p = T(() => {
|
|
4271
4273
|
const E = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4272
4274
|
return E ? {
|
|
4273
4275
|
isExactMatch: E,
|
|
4274
4276
|
fields: {
|
|
4275
|
-
username:
|
|
4277
|
+
username: u.name,
|
|
4276
4278
|
id: { label: o("consumer_groups.list.table_headers.id") }
|
|
4277
4279
|
},
|
|
4278
4280
|
placeholder: o("consumer_groups.search.placeholder")
|
|
4279
4281
|
} : {
|
|
4280
4282
|
isExactMatch: E,
|
|
4281
4283
|
fields: {
|
|
4282
|
-
name:
|
|
4284
|
+
name: u.name
|
|
4283
4285
|
},
|
|
4284
4286
|
schema: t.config.filterSchema
|
|
4285
4287
|
};
|
|
4286
|
-
}),
|
|
4287
|
-
|
|
4288
|
-
},
|
|
4288
|
+
}), { fetcher: S, fetcherState: b } = ul(t.config, A.value), C = () => {
|
|
4289
|
+
v.value = "";
|
|
4290
|
+
}, I = () => {
|
|
4289
4291
|
s.value++;
|
|
4290
4292
|
}, ne = O(""), pe = (E, H) => {
|
|
4291
4293
|
const le = E.id;
|
|
@@ -4318,22 +4320,22 @@ const Nt = (e, n) => {
|
|
|
4318
4320
|
}, w = async (E) => {
|
|
4319
4321
|
var le;
|
|
4320
4322
|
await ((le = t.canRetrieve) == null ? void 0 : le.call(t, E)) && a.push(t.config.getViewRoute(E.id));
|
|
4321
|
-
},
|
|
4323
|
+
}, N = (E) => ({
|
|
4322
4324
|
label: o("consumer_groups.actions.view"),
|
|
4323
4325
|
to: t.config.getViewRoute(E)
|
|
4324
4326
|
}), B = (E) => ({
|
|
4325
4327
|
label: o("consumer_groups.actions.edit"),
|
|
4326
4328
|
to: t.config.getEditRoute(E)
|
|
4327
|
-
}), k = O(void 0),
|
|
4328
|
-
k.value = E,
|
|
4329
|
+
}), k = O(void 0), x = O(!1), j = O(!1), P = O(""), J = sl(t.config, A.value), Q = (E) => {
|
|
4330
|
+
k.value = E, x.value = !0;
|
|
4329
4331
|
}, X = () => {
|
|
4330
|
-
|
|
4332
|
+
x.value = !1;
|
|
4331
4333
|
}, ee = async () => {
|
|
4332
4334
|
var E, H, le;
|
|
4333
4335
|
if ((E = k.value) != null && E.id) {
|
|
4334
4336
|
j.value = !0;
|
|
4335
4337
|
try {
|
|
4336
|
-
await i.delete(J(k.value.id)), j.value = !1,
|
|
4338
|
+
await i.delete(J(k.value.id)), j.value = !1, x.value = !1, s.value++, n("delete:success", k.value);
|
|
4337
4339
|
} catch (Ce) {
|
|
4338
4340
|
P.value = ((le = (H = Ce.response) == null ? void 0 : H.data) == null ? void 0 : le.message) || Ce.message || o("consumer_groups.errors.delete"), n("error", Ce);
|
|
4339
4341
|
} finally {
|
|
@@ -4352,7 +4354,7 @@ const Nt = (e, n) => {
|
|
|
4352
4354
|
U.value = E, D.value = !0;
|
|
4353
4355
|
}, ce = () => {
|
|
4354
4356
|
D.value = !1, U.value = void 0;
|
|
4355
|
-
},
|
|
4357
|
+
}, Ne = T(() => {
|
|
4356
4358
|
var H, le, Ce, Ee;
|
|
4357
4359
|
let E = `${t.config.apiBaseUrl}${$e.list[t.config.app].oneForConsumer}`;
|
|
4358
4360
|
return t.config.app === "konnect" ? E = E.replace(/{controlPlaneId}/gi, ((H = t.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerId}/gi, ((le = t.config) == null ? void 0 : le.consumerId) || "") : t.config.app === "kongManager" && (E = E.replace(/\/{workspace}/gi, (Ce = t.config) != null && Ce.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), E;
|
|
@@ -4360,7 +4362,7 @@ const Nt = (e, n) => {
|
|
|
4360
4362
|
if (U.value) {
|
|
4361
4363
|
Ge.value = !0;
|
|
4362
4364
|
try {
|
|
4363
|
-
const E =
|
|
4365
|
+
const E = Ne.value.replace(/{consumerGroupId}/gi, U.value.id);
|
|
4364
4366
|
await i.delete(E), n("remove:success", U.value), ce(), s.value++;
|
|
4365
4367
|
} catch (E) {
|
|
4366
4368
|
ge.value = E.message || o("consumer_groups.errors.delete"), n("error", E);
|
|
@@ -4369,7 +4371,7 @@ const Nt = (e, n) => {
|
|
|
4369
4371
|
}
|
|
4370
4372
|
}
|
|
4371
4373
|
};
|
|
4372
|
-
|
|
4374
|
+
xe(b, (E) => {
|
|
4373
4375
|
if (E.status === Oe.Error) {
|
|
4374
4376
|
ne.value = o("consumer_groups.errors.general"), n("error", E.error);
|
|
4375
4377
|
return;
|
|
@@ -4387,40 +4389,39 @@ const Nt = (e, n) => {
|
|
|
4387
4389
|
}), (E, H) => {
|
|
4388
4390
|
const le = q("KButton"), Ce = q("KBadge"), Ee = q("KTruncate"), ze = q("KDropdownItem"), Bt = q("KClipboardProvider"), pr = q("KPrompt");
|
|
4389
4391
|
return m(), $("div", yl, [
|
|
4390
|
-
|
|
4392
|
+
K(y(Ns), {
|
|
4391
4393
|
"cache-identifier": e.cacheIdentifier,
|
|
4392
|
-
"disable-pagination": l.value,
|
|
4393
4394
|
"disable-pagination-page-jump": "",
|
|
4394
|
-
"disable-sorting":
|
|
4395
|
+
"disable-sorting": d.value,
|
|
4395
4396
|
"empty-state-options": pt.value,
|
|
4396
4397
|
"enable-entity-actions": "",
|
|
4397
4398
|
"error-message": ne.value,
|
|
4398
|
-
fetcher: y(
|
|
4399
|
+
fetcher: y(S),
|
|
4399
4400
|
"fetcher-cache-key": s.value,
|
|
4400
4401
|
"pagination-type": "offset",
|
|
4401
|
-
"preferences-storage-key":
|
|
4402
|
-
query:
|
|
4403
|
-
"row-attributes":
|
|
4404
|
-
"table-headers": y(
|
|
4402
|
+
"preferences-storage-key": c.value,
|
|
4403
|
+
query: v.value,
|
|
4404
|
+
"row-attributes": f,
|
|
4405
|
+
"table-headers": y(g),
|
|
4405
4406
|
onClearSearchInput: C,
|
|
4406
4407
|
"onClick:row": H[3] || (H[3] = (Y) => w(Y)),
|
|
4407
4408
|
onEmptyStateCtaClicked: oe,
|
|
4408
|
-
onSort:
|
|
4409
|
+
onSort: I
|
|
4409
4410
|
}, {
|
|
4410
4411
|
"toolbar-filter": h(() => [
|
|
4411
4412
|
l.value ? G("", !0) : (m(), R(y(el), {
|
|
4412
4413
|
key: 0,
|
|
4413
|
-
modelValue:
|
|
4414
|
-
"onUpdate:modelValue": H[0] || (H[0] = (Y) =>
|
|
4415
|
-
config:
|
|
4414
|
+
modelValue: v.value,
|
|
4415
|
+
"onUpdate:modelValue": H[0] || (H[0] = (Y) => v.value = Y),
|
|
4416
|
+
config: p.value
|
|
4416
4417
|
}, null, 8, ["modelValue", "config"]))
|
|
4417
4418
|
]),
|
|
4418
4419
|
"toolbar-button": h(() => [
|
|
4419
|
-
|
|
4420
|
+
K(y(Xe), {
|
|
4420
4421
|
"auth-function": () => e.canCreate()
|
|
4421
4422
|
}, {
|
|
4422
4423
|
default: h(() => [
|
|
4423
|
-
|
|
4424
|
+
K(le, {
|
|
4424
4425
|
appearance: "primary",
|
|
4425
4426
|
"data-testid": "toolbar-add-consumer-group",
|
|
4426
4427
|
icon: "plus",
|
|
@@ -4460,9 +4461,9 @@ const Nt = (e, n) => {
|
|
|
4460
4461
|
}, 1024)) : (m(), $("span", hl, "-"))
|
|
4461
4462
|
]),
|
|
4462
4463
|
actions: h(({ row: Y }) => [
|
|
4463
|
-
|
|
4464
|
+
K(Bt, null, {
|
|
4464
4465
|
default: h(({ copyToClipboard: Be }) => [
|
|
4465
|
-
|
|
4466
|
+
K(ze, {
|
|
4466
4467
|
"data-testid": "action-entity-copy-id",
|
|
4467
4468
|
onClick: (fr) => pe(Y, Be)
|
|
4468
4469
|
}, {
|
|
@@ -4474,9 +4475,9 @@ const Nt = (e, n) => {
|
|
|
4474
4475
|
]),
|
|
4475
4476
|
_: 2
|
|
4476
4477
|
}, 1024),
|
|
4477
|
-
|
|
4478
|
+
K(Bt, null, {
|
|
4478
4479
|
default: h(({ copyToClipboard: Be }) => [
|
|
4479
|
-
|
|
4480
|
+
K(ze, {
|
|
4480
4481
|
"data-testid": "action-entity-copy-json",
|
|
4481
4482
|
onClick: (fr) => z(Y, Be)
|
|
4482
4483
|
}, {
|
|
@@ -4488,34 +4489,34 @@ const Nt = (e, n) => {
|
|
|
4488
4489
|
]),
|
|
4489
4490
|
_: 2
|
|
4490
4491
|
}, 1024),
|
|
4491
|
-
|
|
4492
|
+
K(y(Xe), {
|
|
4492
4493
|
"auth-function": () => e.canRetrieve(Y)
|
|
4493
4494
|
}, {
|
|
4494
4495
|
default: h(() => [
|
|
4495
|
-
|
|
4496
|
+
K(ze, {
|
|
4496
4497
|
"data-testid": "action-entity-view",
|
|
4497
4498
|
"has-divider": "",
|
|
4498
|
-
item:
|
|
4499
|
+
item: N(Y.id)
|
|
4499
4500
|
}, null, 8, ["item"])
|
|
4500
4501
|
]),
|
|
4501
4502
|
_: 2
|
|
4502
4503
|
}, 1032, ["auth-function"]),
|
|
4503
|
-
|
|
4504
|
+
K(y(Xe), {
|
|
4504
4505
|
"auth-function": () => e.canEdit(Y)
|
|
4505
4506
|
}, {
|
|
4506
4507
|
default: h(() => [
|
|
4507
|
-
|
|
4508
|
+
K(ze, {
|
|
4508
4509
|
"data-testid": "action-entity-edit",
|
|
4509
4510
|
item: B(Y.id)
|
|
4510
4511
|
}, null, 8, ["item"])
|
|
4511
4512
|
]),
|
|
4512
4513
|
_: 2
|
|
4513
4514
|
}, 1032, ["auth-function"]),
|
|
4514
|
-
|
|
4515
|
+
K(y(Xe), {
|
|
4515
4516
|
"auth-function": () => e.canDelete(Y)
|
|
4516
4517
|
}, {
|
|
4517
4518
|
default: h(() => [
|
|
4518
|
-
|
|
4519
|
+
K(ze, {
|
|
4519
4520
|
danger: "",
|
|
4520
4521
|
"data-testid": "action-entity-delete",
|
|
4521
4522
|
"has-divider": "",
|
|
@@ -4531,8 +4532,8 @@ const Nt = (e, n) => {
|
|
|
4531
4532
|
}, 1032, ["auth-function"])
|
|
4532
4533
|
]),
|
|
4533
4534
|
_: 1
|
|
4534
|
-
}, 8, ["cache-identifier", "disable-
|
|
4535
|
-
|
|
4535
|
+
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "preferences-storage-key", "query", "table-headers"]),
|
|
4536
|
+
K(y(qs), {
|
|
4536
4537
|
"action-pending": j.value,
|
|
4537
4538
|
"data-testid": "delete-consumer-group-modal",
|
|
4538
4539
|
description: y(o)("consumer_groups.delete.description"),
|
|
@@ -4540,7 +4541,7 @@ const Nt = (e, n) => {
|
|
|
4540
4541
|
"entity-type": y(yn).ConsumerGroup,
|
|
4541
4542
|
error: P.value,
|
|
4542
4543
|
title: y(o)("consumer_groups.delete.title"),
|
|
4543
|
-
visible:
|
|
4544
|
+
visible: x.value,
|
|
4544
4545
|
onCancel: X,
|
|
4545
4546
|
onProceed: ee
|
|
4546
4547
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
@@ -4563,7 +4564,7 @@ const Nt = (e, n) => {
|
|
|
4563
4564
|
onProceed: dr
|
|
4564
4565
|
}, {
|
|
4565
4566
|
"body-content": h(() => [
|
|
4566
|
-
|
|
4567
|
+
K(y(r), {
|
|
4567
4568
|
class: "exit-modal-message",
|
|
4568
4569
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
4569
4570
|
tag: "p"
|
|
@@ -4589,7 +4590,7 @@ const Nt = (e, n) => {
|
|
|
4589
4590
|
};
|
|
4590
4591
|
}
|
|
4591
4592
|
});
|
|
4592
|
-
const
|
|
4593
|
+
const Kl = /* @__PURE__ */ Kt(vl, [["__scopeId", "data-v-b1690c3e"]]), bl = { class: "kong-ui-entities-consumer-group-form" }, Cl = { class: "select-item-label" }, kl = {
|
|
4593
4594
|
key: 0,
|
|
4594
4595
|
class: "select-item-desc"
|
|
4595
4596
|
}, _l = /* @__PURE__ */ re({
|
|
@@ -4634,7 +4635,7 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4634
4635
|
searchKeys: ["username", "custom_id", "id"]
|
|
4635
4636
|
}), { axiosInstance: g } = Ft({
|
|
4636
4637
|
headers: (De = t.config) == null ? void 0 : De.requestHeaders
|
|
4637
|
-
}), { getMessageFromError: f } = ll(),
|
|
4638
|
+
}), { getMessageFromError: f } = ll(), A = T(() => u.value.map((_) => ({
|
|
4638
4639
|
label: _.username || _.custom_id,
|
|
4639
4640
|
value: _.id,
|
|
4640
4641
|
selected: a.fields.consumers.includes(_.id),
|
|
@@ -4643,11 +4644,11 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4643
4644
|
}))), v = T(() => {
|
|
4644
4645
|
var _, L;
|
|
4645
4646
|
return (L = $e.form[(_ = t.config) == null ? void 0 : _.app]) == null ? void 0 : L.edit;
|
|
4646
|
-
}), p = T(() => t.consumerGroupId ? nt.Edit : nt.Create),
|
|
4647
|
-
var D, ge, _e, ce,
|
|
4647
|
+
}), p = T(() => t.consumerGroupId ? nt.Edit : nt.Create), S = T(() => !!a.fields.name && !w.value), b = T(() => JSON.stringify(a.fields) !== JSON.stringify(i)), C = (_, L = "", oe = "") => {
|
|
4648
|
+
var D, ge, _e, ce, Ne, Ge;
|
|
4648
4649
|
let U = `${(D = t.config) == null ? void 0 : D.apiBaseUrl}${$e.form[(ge = t.config) == null ? void 0 : ge.app][_]}`;
|
|
4649
|
-
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? U = U.replace(/{controlPlaneId}/gi, ((ce = t.config) == null ? void 0 : ce.controlPlaneId) || "") : ((
|
|
4650
|
-
},
|
|
4650
|
+
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? U = U.replace(/{controlPlaneId}/gi, ((ce = t.config) == null ? void 0 : ce.controlPlaneId) || "") : ((Ne = t.config) == null ? void 0 : Ne.app) === "kongManager" && (U = U.replace(/\/{workspace}/gi, (Ge = t.config) != null && Ge.workspace ? `/${t.config.workspace}` : "")), U = U.replace(/{id}/gi, L || t.consumerGroupId), (_ === "addConsumer" || _ === "removeConsumer") && (U = U.replace(/{consumerId}/gi, oe)), U;
|
|
4651
|
+
}, I = () => {
|
|
4651
4652
|
var _;
|
|
4652
4653
|
o.push(((_ = t.config) == null ? void 0 : _.cancelRoute) || { name: "consumer-group-list" });
|
|
4653
4654
|
}, ne = (_) => {
|
|
@@ -4663,50 +4664,50 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4663
4664
|
else
|
|
4664
4665
|
try {
|
|
4665
4666
|
const { data: ce } = await g.get(C("getConsumers"));
|
|
4666
|
-
a.fields.consumers = "consumers" in ce ? (_e = ce == null ? void 0 : ce.consumers) == null ? void 0 : _e.map((
|
|
4667
|
+
a.fields.consumers = "consumers" in ce ? (_e = ce == null ? void 0 : ce.consumers) == null ? void 0 : _e.map((Ne) => Ne.id) : [];
|
|
4667
4668
|
} catch (ce) {
|
|
4668
|
-
|
|
4669
|
+
x(ce);
|
|
4669
4670
|
}
|
|
4670
4671
|
Object.assign(i, a.fields);
|
|
4671
|
-
}, w = T(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")),
|
|
4672
|
+
}, w = T(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")), N = () => {
|
|
4672
4673
|
var _, L;
|
|
4673
4674
|
return {
|
|
4674
4675
|
name: a.fields.name,
|
|
4675
4676
|
tags: (L = (_ = a.fields.tags.split(",")) == null ? void 0 : _.map((oe) => String(oe || "").trim())) == null ? void 0 : L.filter((oe) => oe !== "")
|
|
4676
4677
|
};
|
|
4677
|
-
}, B = async (_, L = "") => await g.post(C("addConsumer", L, _), { consumer: _ }), k = async (_, L = "") => await g.delete(C("removeConsumer", L, _)),
|
|
4678
|
+
}, B = async (_, L = "") => await g.post(C("addConsumer", L, _), { consumer: _ }), k = async (_, L = "") => await g.delete(C("removeConsumer", L, _)), x = (_) => {
|
|
4678
4679
|
a.errorMessage = f(_), n("error", _);
|
|
4679
4680
|
}, j = (_ = t.consumerGroupId) => {
|
|
4680
4681
|
Object.assign(i, a.fields), n("update", { ...a.fields, id: _ });
|
|
4681
4682
|
}, P = (_, L, oe = t.consumerGroupId) => {
|
|
4682
4683
|
const U = _ == null ? void 0 : _.find((D) => D.status !== "fulfilled");
|
|
4683
|
-
U ?
|
|
4684
|
+
U ? x({
|
|
4684
4685
|
code: U.status,
|
|
4685
4686
|
message: L
|
|
4686
4687
|
}) : j(oe);
|
|
4687
4688
|
}, J = async () => {
|
|
4688
4689
|
let _ = "";
|
|
4689
4690
|
try {
|
|
4690
|
-
const { data: L } = await g.post(C("create"),
|
|
4691
|
+
const { data: L } = await g.post(C("create"), N());
|
|
4691
4692
|
_ = "item" in L ? L.item.id : L.id;
|
|
4692
4693
|
} catch (L) {
|
|
4693
|
-
|
|
4694
|
+
x(L);
|
|
4694
4695
|
}
|
|
4695
4696
|
if (a.fields.consumers.length > 0 && _)
|
|
4696
4697
|
try {
|
|
4697
4698
|
const L = a.fields.consumers.map((U) => B(U, _)), oe = await Promise.allSettled(L);
|
|
4698
4699
|
P(oe, r("consumer_groups.errors.add_consumer"), _);
|
|
4699
4700
|
} catch (L) {
|
|
4700
|
-
|
|
4701
|
+
x(L);
|
|
4701
4702
|
}
|
|
4702
4703
|
else
|
|
4703
4704
|
a.fields.consumers.length === 0 && _ && j(_);
|
|
4704
4705
|
}, Q = async () => {
|
|
4705
4706
|
var oe;
|
|
4706
4707
|
try {
|
|
4707
|
-
((oe = t.config) == null ? void 0 : oe.app) === "konnect" ? await g.put(C("edit"),
|
|
4708
|
+
((oe = t.config) == null ? void 0 : oe.app) === "konnect" ? await g.put(C("edit"), N()) : await g.patch(C("edit"), N());
|
|
4708
4709
|
} catch (U) {
|
|
4709
|
-
|
|
4710
|
+
x(U);
|
|
4710
4711
|
}
|
|
4711
4712
|
const _ = a.fields.consumers.filter((U) => !i.consumers.includes(U)), L = i.consumers.filter((U) => !a.fields.consumers.includes(U));
|
|
4712
4713
|
if (L.length === 0 && _.length === 0)
|
|
@@ -4717,14 +4718,14 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4717
4718
|
const U = L.map((ge) => k(ge)), D = await Promise.allSettled(U);
|
|
4718
4719
|
P(D, r("consumer_groups.errors.remove_consumer"));
|
|
4719
4720
|
} catch (U) {
|
|
4720
|
-
|
|
4721
|
+
x(U);
|
|
4721
4722
|
}
|
|
4722
4723
|
if (_.length > 0)
|
|
4723
4724
|
try {
|
|
4724
4725
|
const U = _.map((ge) => B(ge)), D = await Promise.allSettled(U);
|
|
4725
4726
|
P(D, r("consumer_groups.errors.add_consumer"));
|
|
4726
4727
|
} catch (U) {
|
|
4727
|
-
|
|
4728
|
+
x(U);
|
|
4728
4729
|
}
|
|
4729
4730
|
}
|
|
4730
4731
|
}, X = async () => {
|
|
@@ -4739,26 +4740,26 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4739
4740
|
}), (_, L) => {
|
|
4740
4741
|
const oe = q("KInput"), U = q("KMultiselect");
|
|
4741
4742
|
return m(), $("div", bl, [
|
|
4742
|
-
|
|
4743
|
-
"can-submit":
|
|
4743
|
+
K(y(Ts), {
|
|
4744
|
+
"can-submit": S.value && b.value,
|
|
4744
4745
|
config: e.config,
|
|
4745
4746
|
"edit-id": e.consumerGroupId,
|
|
4746
4747
|
"error-message": a.errorMessage || y(c) || w.value,
|
|
4747
4748
|
"fetch-url": v.value,
|
|
4748
4749
|
"is-readonly": a.readonly,
|
|
4749
|
-
onCancel:
|
|
4750
|
+
onCancel: I,
|
|
4750
4751
|
"onFetch:error": L[3] || (L[3] = (D) => ne(D)),
|
|
4751
4752
|
"onFetch:success": z,
|
|
4752
4753
|
onLoading: L[4] || (L[4] = (D) => pe(D)),
|
|
4753
4754
|
onSubmit: X
|
|
4754
4755
|
}, {
|
|
4755
4756
|
default: h(() => [
|
|
4756
|
-
|
|
4757
|
+
K(y(dn), {
|
|
4757
4758
|
description: y(r)("consumer_groups.form.general_info.description"),
|
|
4758
4759
|
title: y(r)("consumer_groups.form.general_info.title")
|
|
4759
4760
|
}, {
|
|
4760
4761
|
default: h(() => [
|
|
4761
|
-
|
|
4762
|
+
K(oe, {
|
|
4762
4763
|
modelValue: a.fields.name,
|
|
4763
4764
|
"onUpdate:modelValue": L[0] || (L[0] = (D) => a.fields.name = D),
|
|
4764
4765
|
modelModifiers: { trim: !0 },
|
|
@@ -4769,7 +4770,7 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4769
4770
|
required: "",
|
|
4770
4771
|
type: "text"
|
|
4771
4772
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
4772
|
-
|
|
4773
|
+
K(oe, {
|
|
4773
4774
|
modelValue: a.fields.tags,
|
|
4774
4775
|
"onUpdate:modelValue": L[1] || (L[1] = (D) => a.fields.tags = D),
|
|
4775
4776
|
modelModifiers: { trim: !0 },
|
|
@@ -4787,19 +4788,19 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4787
4788
|
]),
|
|
4788
4789
|
_: 1
|
|
4789
4790
|
}, 8, ["description", "title"]),
|
|
4790
|
-
|
|
4791
|
+
K(y(dn), {
|
|
4791
4792
|
description: y(r)("consumer_groups.form.consumers.description"),
|
|
4792
4793
|
"has-divider": "",
|
|
4793
4794
|
title: y(r)("consumer_groups.form.consumers.title")
|
|
4794
4795
|
}, {
|
|
4795
4796
|
default: h(() => [
|
|
4796
|
-
|
|
4797
|
+
K(U, {
|
|
4797
4798
|
modelValue: a.fields.consumers,
|
|
4798
4799
|
"onUpdate:modelValue": L[2] || (L[2] = (D) => a.fields.consumers = D),
|
|
4799
4800
|
appearance: "select",
|
|
4800
4801
|
autosuggest: "",
|
|
4801
4802
|
"expand-selected": "",
|
|
4802
|
-
items:
|
|
4803
|
+
items: A.value,
|
|
4803
4804
|
label: y(r)("consumer_groups.form.fields.consumers.label"),
|
|
4804
4805
|
loading: y(l),
|
|
4805
4806
|
placeholder: y(r)("consumer_groups.form.fields.consumers.placeholder"),
|
|
@@ -4825,7 +4826,7 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4825
4826
|
};
|
|
4826
4827
|
}
|
|
4827
4828
|
});
|
|
4828
|
-
const
|
|
4829
|
+
const Nl = /* @__PURE__ */ Kt(_l, [["__scopeId", "data-v-102d40d2"]]), wl = { class: "kong-ui-consumer-group-entity-config-card" }, Bl = /* @__PURE__ */ re({
|
|
4829
4830
|
__name: "ConsumerGroupConfigCard",
|
|
4830
4831
|
props: {
|
|
4831
4832
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4862,7 +4863,7 @@ const Kl = /* @__PURE__ */ Nt(_l, [["__scopeId", "data-v-102d40d2"]]), wl = { cl
|
|
|
4862
4863
|
}
|
|
4863
4864
|
});
|
|
4864
4865
|
return (a, i) => (m(), $("div", wl, [
|
|
4865
|
-
|
|
4866
|
+
K(y(Is), {
|
|
4866
4867
|
config: e.config,
|
|
4867
4868
|
"config-card-doc": e.configCardDoc,
|
|
4868
4869
|
"config-schema": o.value,
|
|
@@ -4879,6 +4880,6 @@ const Kl = /* @__PURE__ */ Nt(_l, [["__scopeId", "data-v-102d40d2"]]), wl = { cl
|
|
|
4879
4880
|
});
|
|
4880
4881
|
export {
|
|
4881
4882
|
Bl as ConsumerGroupConfigCard,
|
|
4882
|
-
|
|
4883
|
-
|
|
4883
|
+
Nl as ConsumerGroupForm,
|
|
4884
|
+
Kl as ConsumerGroupList
|
|
4884
4885
|
};
|