@kong-ui-public/entities-consumer-groups 2.0.4 → 2.0.5
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
|
|
1
|
+
import { defineComponent as oe, ref as E, computed as T, watch as Se, renderSlot as Z, createCommentVNode as H, unref as y, useSlots as ut, onBeforeMount as Qe, resolveComponent as L, openBlock as m, createBlock as R, createSlots as Te, withCtx as v, createElementVNode as V, createTextVNode as Q, toDisplayString as O, createVNode as F, createElementBlock as $, renderList as he, Fragment as be, normalizeClass as Fe, withModifiers as rt, withDirectives as et, vShow as tt, useCssVars as mr, resolveDynamicComponent as Ue, 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 qt } 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";
|
|
@@ -140,7 +140,7 @@ const ct = {
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
|
-
var yn = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e))(yn || {}), nt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(nt || {}), Oe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Oe || {}),
|
|
143
|
+
var yn = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e))(yn || {}), nt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(nt || {}), Oe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Oe || {}), ne = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(ne || {}), Ce = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(Ce || {});
|
|
144
144
|
function At(e = {}) {
|
|
145
145
|
return {
|
|
146
146
|
axiosInstance: Cr.create({
|
|
@@ -208,7 +208,7 @@ const Tr = {
|
|
|
208
208
|
}, $r = {
|
|
209
209
|
message: "Are you sure you want to delete this {entityType}?",
|
|
210
210
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
211
|
-
},
|
|
211
|
+
}, Mr = {
|
|
212
212
|
actions: {
|
|
213
213
|
save: "Save",
|
|
214
214
|
cancel: "Cancel",
|
|
@@ -217,7 +217,7 @@ const Tr = {
|
|
|
217
217
|
errors: {
|
|
218
218
|
edit: "The entity could not be edited at this time."
|
|
219
219
|
}
|
|
220
|
-
},
|
|
220
|
+
}, jr = {
|
|
221
221
|
emptyState: {
|
|
222
222
|
noSearchResultsTitle: "No results found",
|
|
223
223
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
@@ -266,15 +266,15 @@ const Tr = {
|
|
|
266
266
|
applyButtonText: "Apply",
|
|
267
267
|
clearButtonText: "Clear",
|
|
268
268
|
clearAllButtonText: "Clear all filters"
|
|
269
|
-
},
|
|
269
|
+
}, Kr = {
|
|
270
270
|
errors: {
|
|
271
271
|
fetch: "Could not fetch available items",
|
|
272
272
|
invalid: "Please select a valid value"
|
|
273
273
|
}
|
|
274
|
-
},
|
|
274
|
+
}, Fr = {
|
|
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}?",
|
|
@@ -288,13 +288,13 @@ const Tr = {
|
|
|
288
288
|
}, Br = {
|
|
289
289
|
global: Tr,
|
|
290
290
|
deleteModal: $r,
|
|
291
|
-
baseForm:
|
|
292
|
-
baseTable:
|
|
291
|
+
baseForm: Mr,
|
|
292
|
+
baseTable: jr,
|
|
293
293
|
baseConfigCard: Er,
|
|
294
294
|
filter: Or,
|
|
295
|
-
debouncedFilter:
|
|
296
|
-
errors:
|
|
297
|
-
toggleModal:
|
|
295
|
+
debouncedFilter: Kr,
|
|
296
|
+
errors: Fr,
|
|
297
|
+
toggleModal: Nr
|
|
298
298
|
};
|
|
299
299
|
function xt() {
|
|
300
300
|
const e = It("en-us", Br);
|
|
@@ -348,72 +348,72 @@ function hn() {
|
|
|
348
348
|
isValidUuid: (t) => t ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(t) : !1
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function qr(e, n, t, r = {
|
|
352
352
|
fetchedItemsKey: "data",
|
|
353
353
|
searchKeys: ["id"]
|
|
354
354
|
}) {
|
|
355
355
|
t || (t = "100");
|
|
356
356
|
const { axiosInstance: o } = At({
|
|
357
357
|
headers: e.requestHeaders
|
|
358
|
-
}), { i18n: { t: a } } = xt(), { debounce: i } = Ar(), s = i(async (
|
|
359
|
-
await
|
|
360
|
-
}, 200), l =
|
|
361
|
-
let
|
|
362
|
-
e.app === "konnect" ?
|
|
363
|
-
const { isValidUuid: p } = hn(),
|
|
358
|
+
}), { i18n: { t: a } } = xt(), { debounce: i } = Ar(), s = i(async (h) => {
|
|
359
|
+
await K(h);
|
|
360
|
+
}, 200), l = E(!1), c = E(""), d = E(""), u = E([]), g = E([]), f = E(void 0), I = y(n);
|
|
361
|
+
let b = `${e.apiBaseUrl}${I}`;
|
|
362
|
+
e.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
363
|
+
const { isValidUuid: p } = hn(), A = async () => {
|
|
364
364
|
try {
|
|
365
365
|
l.value = !0;
|
|
366
|
-
const { data:
|
|
367
|
-
|
|
366
|
+
const { data: h } = await o.get(`${b}?size=${t}`);
|
|
367
|
+
h != null && h.next || (f.value = r.fetchedItemsKey in h ? h[r.fetchedItemsKey] : []), g.value = r.fetchedItemsKey in h ? h[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
|
-
},
|
|
374
|
-
var
|
|
375
|
-
if (
|
|
376
|
-
if (
|
|
373
|
+
}, k = E(""), K = async (h) => {
|
|
374
|
+
var D, se, Y;
|
|
375
|
+
if (k.value !== h)
|
|
376
|
+
if (k.value = h || "", f.value === void 0)
|
|
377
377
|
try {
|
|
378
378
|
if (l.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
379
|
-
let w =
|
|
380
|
-
|
|
381
|
-
const { data:
|
|
382
|
-
r.fetchedItemsKey in
|
|
383
|
-
} else if (
|
|
379
|
+
let w = b + "";
|
|
380
|
+
h && (w += `/${h}`);
|
|
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 (h) {
|
|
384
384
|
const w = [];
|
|
385
|
-
p(
|
|
386
|
-
const { data:
|
|
387
|
-
return [
|
|
385
|
+
p(h) && r.searchKeys.includes("id") ? w.push((async () => {
|
|
386
|
+
const { data: C } = await o.get(`${b}/${h}`);
|
|
387
|
+
return [C[r.fetchedItemsKey] ?? C];
|
|
388
388
|
})()) : w.push(
|
|
389
|
-
...r.searchKeys.filter((
|
|
390
|
-
const { data:
|
|
391
|
-
return
|
|
389
|
+
...r.searchKeys.filter((C) => C !== "id").map(async (C) => {
|
|
390
|
+
const { data: x } = await o.get(`${b}?${C}=${h}`);
|
|
391
|
+
return x[r.fetchedItemsKey];
|
|
392
392
|
})
|
|
393
393
|
);
|
|
394
|
-
const
|
|
395
|
-
u.value = [], (
|
|
396
|
-
var
|
|
397
|
-
(
|
|
398
|
-
|
|
394
|
+
const N = await Promise.all(w), U = /* @__PURE__ */ new Set();
|
|
395
|
+
u.value = [], (D = N == null ? void 0 : N.forEach) == null || D.call(N, (C) => {
|
|
396
|
+
var x;
|
|
397
|
+
(x = C == null ? void 0 : C.forEach) == null || x.call(C, (S) => {
|
|
398
|
+
U.has(S.id) || (U.add(S.id), u.value.push(S));
|
|
399
399
|
});
|
|
400
400
|
});
|
|
401
401
|
} else
|
|
402
402
|
u.value = g.value;
|
|
403
403
|
} catch (w) {
|
|
404
|
-
((
|
|
404
|
+
((se = w == null ? void 0 : w.response) == null ? void 0 : se.status) === 404 ? d.value = a("debouncedFilter.errors.invalid") : (u.value = [], c.value = a("debouncedFilter.errors.fetch"));
|
|
405
405
|
} finally {
|
|
406
406
|
l.value = !1;
|
|
407
407
|
}
|
|
408
408
|
else
|
|
409
|
-
l.value = !0, d.value = "",
|
|
410
|
-
var
|
|
411
|
-
let
|
|
412
|
-
for (const
|
|
413
|
-
const
|
|
414
|
-
|
|
409
|
+
l.value = !0, d.value = "", h ? (u.value = (Y = f.value) == null ? void 0 : Y.filter((w) => {
|
|
410
|
+
var N;
|
|
411
|
+
let U = !1;
|
|
412
|
+
for (const C of r.searchKeys) {
|
|
413
|
+
const x = typeof w[C] == "string" ? (N = w[C]) == null ? void 0 : N.toLowerCase() : w[C];
|
|
414
|
+
x != null && x.includes(h.toLowerCase()) && (U = !0);
|
|
415
415
|
}
|
|
416
|
-
return
|
|
416
|
+
return U;
|
|
417
417
|
}), (!u.value || !u.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : u.value = f.value, l.value = !1;
|
|
418
418
|
};
|
|
419
419
|
return {
|
|
@@ -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: A,
|
|
426
426
|
debouncedQueryChange: s
|
|
427
427
|
};
|
|
428
428
|
}
|
|
@@ -432,7 +432,7 @@ function Lr(e, n) {
|
|
|
432
432
|
);
|
|
433
433
|
return r.value.search = "", (o) => `${r.value.href}/${o}`;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function Pr() {
|
|
436
436
|
const { i18n: { t: e } } = xt();
|
|
437
437
|
return {
|
|
438
438
|
getMessageFromError: (n) => {
|
|
@@ -460,7 +460,7 @@ function qr() {
|
|
|
460
460
|
}
|
|
461
461
|
};
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function Vr(e) {
|
|
464
464
|
const n = window.location.origin, t = n.endsWith("/") ? n : `${n}/`;
|
|
465
465
|
try {
|
|
466
466
|
const r = e.join("/"), o = `${t}${r}`, a = e.some((i) => i.trim() === "");
|
|
@@ -472,7 +472,7 @@ function Ur(e) {
|
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
function vn(e, n) {
|
|
475
|
-
const t =
|
|
475
|
+
const t = E(y(e)), r = E(y(n)), o = T(
|
|
476
476
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
477
477
|
), a = T(
|
|
478
478
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
@@ -481,18 +481,18 @@ 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((I,
|
|
485
|
-
f.searchParams.append(
|
|
484
|
+
return o.value && g ? (f.search = "", f = new URL(`${f.href}/${g}/`)) : (o.value || new URLSearchParams(g).forEach((I, b) => {
|
|
485
|
+
f.searchParams.append(b, I);
|
|
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;
|
|
489
489
|
}
|
|
490
490
|
};
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function Ur(e, n, t = "data") {
|
|
493
493
|
const r = y(n), { axiosInstance: o } = At({
|
|
494
494
|
headers: e.requestHeaders
|
|
495
|
-
}), a = vn(e, r), i =
|
|
495
|
+
}), a = vn(e, r), i = E({
|
|
496
496
|
status: Oe.Idle
|
|
497
497
|
});
|
|
498
498
|
return { fetcher: async (s) => {
|
|
@@ -545,27 +545,27 @@ const bn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
545
545
|
if (!n)
|
|
546
546
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
547
547
|
return n.shift(), n;
|
|
548
|
-
},
|
|
548
|
+
}, Pt = (e) => e === "*" || e === "x" || e === "X", Vt = (e) => {
|
|
549
549
|
const n = parseInt(e, 10);
|
|
550
550
|
return isNaN(n) ? e : n;
|
|
551
551
|
}, Dr = (e, n) => typeof e != typeof n ? [String(e), String(n)] : [e, n], Gr = (e, n) => {
|
|
552
|
-
if (
|
|
552
|
+
if (Pt(e) || Pt(n))
|
|
553
553
|
return 0;
|
|
554
|
-
const [t, r] = Dr(
|
|
554
|
+
const [t, r] = Dr(Vt(e), Vt(n));
|
|
555
555
|
return t > r ? 1 : t < r ? -1 : 0;
|
|
556
|
-
},
|
|
556
|
+
}, Ut = (e, n) => {
|
|
557
557
|
for (let t = 0; t < Math.max(e.length, n.length); t++) {
|
|
558
558
|
const r = Gr(e[t] || "0", n[t] || "0");
|
|
559
559
|
if (r !== 0)
|
|
560
560
|
return r;
|
|
561
561
|
}
|
|
562
562
|
return 0;
|
|
563
|
-
},
|
|
564
|
-
const t = Lt(e), r = Lt(n), o = t.pop(), a = r.pop(), i =
|
|
565
|
-
return i !== 0 ? i : o && a ?
|
|
563
|
+
}, Hr = (e, n) => {
|
|
564
|
+
const t = Lt(e), r = Lt(n), o = t.pop(), a = r.pop(), i = Ut(t, r);
|
|
565
|
+
return i !== 0 ? i : o && a ? Ut(o.split("."), a.split(".")) : o || a ? o ? -1 : 1 : 0;
|
|
566
566
|
}, Rt = (e, n, t) => {
|
|
567
|
-
|
|
568
|
-
const r =
|
|
567
|
+
zr(t);
|
|
568
|
+
const r = Hr(e, n);
|
|
569
569
|
return Cn[t].includes(r);
|
|
570
570
|
}, Cn = {
|
|
571
571
|
">": [1],
|
|
@@ -574,7 +574,7 @@ const bn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
574
574
|
"<=": [-1, 0],
|
|
575
575
|
"<": [-1],
|
|
576
576
|
"!=": [-1, 1]
|
|
577
|
-
}, Dt = Object.keys(Cn),
|
|
577
|
+
}, Dt = Object.keys(Cn), zr = (e) => {
|
|
578
578
|
if (typeof e != "string")
|
|
579
579
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
580
580
|
if (Dt.indexOf(e) === -1)
|
|
@@ -594,20 +594,20 @@ function Yr(e) {
|
|
|
594
594
|
return !(i && Rt(o, i, "<") || s && Rt(o, s, ">"));
|
|
595
595
|
}
|
|
596
596
|
function Wr(e) {
|
|
597
|
-
const n =
|
|
597
|
+
const n = E(0), t = E(0), r = E(!1);
|
|
598
598
|
return Se(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)
|
|
602
602
|
};
|
|
603
603
|
}
|
|
604
|
-
const
|
|
604
|
+
const ce = {
|
|
605
605
|
useAxios: At,
|
|
606
|
-
useDebouncedFilter:
|
|
606
|
+
useDebouncedFilter: qr,
|
|
607
607
|
useDeleteUrlBuilder: Lr,
|
|
608
|
-
useErrors:
|
|
609
|
-
useExternalLinkCreator:
|
|
610
|
-
useFetcher:
|
|
608
|
+
useErrors: Pr,
|
|
609
|
+
useExternalLinkCreator: Vr,
|
|
610
|
+
useFetcher: Ur,
|
|
611
611
|
useFetchUrlBuilder: vn,
|
|
612
612
|
useHelpers: hn,
|
|
613
613
|
useStringHelpers: Rr,
|
|
@@ -634,7 +634,7 @@ const ue = {
|
|
|
634
634
|
}, ao = /* @__PURE__ */ no(() => /* @__PURE__ */ V("path", {
|
|
635
635
|
d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
|
|
636
636
|
fill: "currentColor"
|
|
637
|
-
}, null, -1)), io = /* @__PURE__ */
|
|
637
|
+
}, null, -1)), io = /* @__PURE__ */ oe({
|
|
638
638
|
__name: "CopyIcon",
|
|
639
639
|
props: {
|
|
640
640
|
/** The accessibility text provided to screen readers */
|
|
@@ -703,13 +703,13 @@ const ue = {
|
|
|
703
703
|
lineHeight: "0",
|
|
704
704
|
width: t.value
|
|
705
705
|
}));
|
|
706
|
-
return (o, a) => (m(), R(
|
|
706
|
+
return (o, a) => (m(), R(Ue(e.as), {
|
|
707
707
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
708
708
|
class: "kui-icon copy-icon",
|
|
709
709
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
710
710
|
style: pn(r.value)
|
|
711
711
|
}, {
|
|
712
|
-
default:
|
|
712
|
+
default: v(() => [
|
|
713
713
|
(m(), $("svg", {
|
|
714
714
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
715
715
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
@@ -720,14 +720,14 @@ const ue = {
|
|
|
720
720
|
width: "100%",
|
|
721
721
|
xmlns: "http://www.w3.org/2000/svg"
|
|
722
722
|
}, [
|
|
723
|
-
e.title ? (m(), $("title", oo,
|
|
723
|
+
e.title ? (m(), $("title", oo, O(e.title), 1)) : H("", !0),
|
|
724
724
|
ao
|
|
725
725
|
], 8, ro))
|
|
726
726
|
]),
|
|
727
727
|
_: 1
|
|
728
728
|
}, 8, ["aria-hidden", "style"]));
|
|
729
729
|
}
|
|
730
|
-
}), so = /* @__PURE__ */ to(io, [["__scopeId", "data-v-9971cc79"]]), lo = "16px", uo = { class: "kong-ui-copy-uuid" }, co = ["onClick"],
|
|
730
|
+
}), so = /* @__PURE__ */ to(io, [["__scopeId", "data-v-9971cc79"]]), lo = "16px", uo = { class: "kong-ui-copy-uuid" }, co = ["onClick"], Ht = 15, po = /* @__PURE__ */ oe({
|
|
731
731
|
__name: "CopyUuid",
|
|
732
732
|
props: {
|
|
733
733
|
uuid: {
|
|
@@ -778,7 +778,7 @@ const ue = {
|
|
|
778
778
|
placement: "bottomStart"
|
|
779
779
|
} : {
|
|
780
780
|
title: t.uuid
|
|
781
|
-
}), i = T(() => !!(t.tooltip && t.successTooltip)), s =
|
|
781
|
+
}), i = T(() => !!(t.tooltip && t.successTooltip)), s = E(t.tooltip), l = T(() => t.tooltip ? {
|
|
782
782
|
label: s.value,
|
|
783
783
|
positionFixed: !0,
|
|
784
784
|
maxWidth: "500px",
|
|
@@ -799,38 +799,38 @@ const ue = {
|
|
|
799
799
|
}), i.value ? d(r("message.fail")) : n("error", t.uuid);
|
|
800
800
|
return;
|
|
801
801
|
}
|
|
802
|
-
const
|
|
802
|
+
const b = ((f = t.uuid) == null ? void 0 : f.length) > Ht, p = t.format === "hidden" || t.format === "redacted" ? r("message.success.prefix") : `"${((I = t.uuid) == null ? void 0 : I.substring(0, Ht)) + (b ? "..." : "")}"`;
|
|
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 I =
|
|
809
|
+
const I = L("KClipboardProvider");
|
|
810
810
|
return m(), $("div", uo, [
|
|
811
|
-
e.format !== "hidden" ? (m(), R(
|
|
812
|
-
default:
|
|
811
|
+
e.format !== "hidden" ? (m(), R(Ue(e.idTooltip ? "KTooltip" : "div"), ht({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
812
|
+
default: v(() => [
|
|
813
813
|
V("div", {
|
|
814
|
-
class:
|
|
814
|
+
class: Fe([
|
|
815
815
|
"uuid-container",
|
|
816
816
|
e.truncated ? "truncated-uuid" : null,
|
|
817
817
|
e.useMono ? "mono" : null
|
|
818
818
|
])
|
|
819
|
-
},
|
|
819
|
+
}, O(c.value), 3)
|
|
820
820
|
]),
|
|
821
821
|
_: 1
|
|
822
|
-
}, 16)) :
|
|
823
|
-
(m(), R(
|
|
824
|
-
default:
|
|
825
|
-
|
|
826
|
-
default:
|
|
822
|
+
}, 16)) : H("", !0),
|
|
823
|
+
(m(), R(Ue(e.tooltip ? "KTooltip" : "div"), ht(l.value, { class: "uuid-icon-wrapper" }), {
|
|
824
|
+
default: v(() => [
|
|
825
|
+
F(I, null, {
|
|
826
|
+
default: v(({ copyToClipboard: b }) => [
|
|
827
827
|
V("span", {
|
|
828
828
|
"data-testid": "copy-to-clipboard",
|
|
829
829
|
role: "button",
|
|
830
830
|
tabindex: "0",
|
|
831
|
-
onClick: rt((p) => u(
|
|
831
|
+
onClick: rt((p) => u(b), ["stop"])
|
|
832
832
|
}, [
|
|
833
|
-
|
|
833
|
+
F(y(so), {
|
|
834
834
|
class: "uuid-icon",
|
|
835
835
|
color: e.iconColor,
|
|
836
836
|
decorative: !!e.tooltip,
|
|
@@ -855,7 +855,7 @@ const ue = {
|
|
|
855
855
|
}, kn = /* @__PURE__ */ fo(po, [["__scopeId", "data-v-0c07874b"]]), mo = {
|
|
856
856
|
key: 0,
|
|
857
857
|
class: "config-card-fieldset-title"
|
|
858
|
-
}, go = /* @__PURE__ */
|
|
858
|
+
}, go = /* @__PURE__ */ oe({
|
|
859
859
|
__name: "JsonCardItem",
|
|
860
860
|
props: {
|
|
861
861
|
item: {
|
|
@@ -872,21 +872,21 @@ const ue = {
|
|
|
872
872
|
}
|
|
873
873
|
},
|
|
874
874
|
setup(e) {
|
|
875
|
-
const n = e, { i18n: { t } } =
|
|
875
|
+
const n = e, { i18n: { t } } = ce.useI18n(), { convertKeyToTitle: r } = ce.useStringHelpers(), o = T(() => n.item.key ?? "json-array-item"), a = T(() => n.item.value ?? n.item), i = T(() => {
|
|
876
876
|
const l = JSON.parse(JSON.stringify(a.value));
|
|
877
877
|
return n.isArrayItem && delete l.name, l;
|
|
878
878
|
}), s = T(() => {
|
|
879
879
|
var l;
|
|
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
|
-
return (l, c) => (m(), R(
|
|
883
|
-
class:
|
|
882
|
+
return (l, c) => (m(), R(Ue(e.isArrayItem ? "fieldset" : "div"), {
|
|
883
|
+
class: Fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
884
884
|
}, {
|
|
885
|
-
default:
|
|
885
|
+
default: v(() => [
|
|
886
886
|
e.isArrayItem ? (m(), $("legend", mo, [
|
|
887
|
-
V("b", null,
|
|
888
|
-
])) :
|
|
889
|
-
(m(!0), $(
|
|
887
|
+
V("b", null, O(s.value), 1)
|
|
888
|
+
])) : H("", !0),
|
|
889
|
+
(m(!0), $(be, null, he(Object.keys(i.value), (d, u) => (m(), R(St, {
|
|
890
890
|
key: `${o.value}-property-${u}`,
|
|
891
891
|
item: {
|
|
892
892
|
key: d,
|
|
@@ -903,7 +903,7 @@ const ue = {
|
|
|
903
903
|
for (const [r, o] of n)
|
|
904
904
|
t[r] = o;
|
|
905
905
|
return t;
|
|
906
|
-
}, _n = /* @__PURE__ */ ke(go, [["__scopeId", "data-v-68ca83ec"]]), yo = /* @__PURE__ */
|
|
906
|
+
}, _n = /* @__PURE__ */ ke(go, [["__scopeId", "data-v-68ca83ec"]]), yo = /* @__PURE__ */ oe({
|
|
907
907
|
__name: "InternalLinkItem",
|
|
908
908
|
props: {
|
|
909
909
|
item: {
|
|
@@ -913,24 +913,24 @@ const ue = {
|
|
|
913
913
|
},
|
|
914
914
|
emits: ["navigation-click"],
|
|
915
915
|
setup(e) {
|
|
916
|
-
const { i18n: { t: n } } =
|
|
916
|
+
const { i18n: { t: n } } = ce.useI18n();
|
|
917
917
|
return (t, r) => {
|
|
918
|
-
const o =
|
|
918
|
+
const o = L("KButton");
|
|
919
919
|
return m(), $("div", null, [
|
|
920
|
-
|
|
920
|
+
F(o, {
|
|
921
921
|
appearance: "tertiary",
|
|
922
922
|
class: "navigation-button",
|
|
923
923
|
onClick: r[0] || (r[0] = (a) => t.$emit("navigation-click", e.item))
|
|
924
924
|
}, {
|
|
925
|
-
default:
|
|
926
|
-
|
|
925
|
+
default: v(() => [
|
|
926
|
+
Q(O(e.item.value || y(n)("baseConfigCard.commonFields.link")), 1)
|
|
927
927
|
]),
|
|
928
928
|
_: 1
|
|
929
929
|
})
|
|
930
930
|
]);
|
|
931
931
|
};
|
|
932
932
|
}
|
|
933
|
-
}), ho = /* @__PURE__ */ ke(yo, [["__scopeId", "data-v-c96811e5"]]), vo = /* @__PURE__ */
|
|
933
|
+
}), ho = /* @__PURE__ */ ke(yo, [["__scopeId", "data-v-c96811e5"]]), vo = /* @__PURE__ */ oe({
|
|
934
934
|
__name: "StatusBadge",
|
|
935
935
|
props: {
|
|
936
936
|
status: {
|
|
@@ -939,24 +939,24 @@ const ue = {
|
|
|
939
939
|
}
|
|
940
940
|
},
|
|
941
941
|
setup(e) {
|
|
942
|
-
const { i18n: { t: n } } =
|
|
942
|
+
const { i18n: { t: n } } = ce.useI18n();
|
|
943
943
|
return (t, r) => {
|
|
944
|
-
const o =
|
|
944
|
+
const o = L("KBadge");
|
|
945
945
|
return m(), R(o, {
|
|
946
946
|
appearance: e.status ? "success" : "neutral"
|
|
947
947
|
}, {
|
|
948
|
-
default:
|
|
949
|
-
|
|
948
|
+
default: v(() => [
|
|
949
|
+
Q(O(e.status ? y(n)("baseConfigCard.statusBadge.enabledLabel") : y(n)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
950
950
|
]),
|
|
951
951
|
_: 1
|
|
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"], xo = ["data-testid"], So = ["data-testid"], To = ["data-testid"], $o = { key: 1 },
|
|
955
|
+
}), bo = "#0044f4", Co = "#e0e4ea", ko = "#3a3f51", _o = "1px", wo = "20px", Io = { class: "config-card-details-row" }, Ao = ["data-testid"], xo = ["data-testid"], So = ["data-testid"], To = ["data-testid"], $o = { key: 1 }, Mo = ["data-testid"], jo = ["data-testid"], Eo = ["data-testid"], Oo = ["data-testid"], Ko = {
|
|
956
956
|
name: "ConfigCardItem",
|
|
957
957
|
components: { CopyUuid: kn, JsonCardItem: _n, StatusBadge: vo, InternalLinkItem: ho }
|
|
958
|
-
},
|
|
959
|
-
...
|
|
958
|
+
}, Fo = /* @__PURE__ */ oe({
|
|
959
|
+
...Ko,
|
|
960
960
|
props: {
|
|
961
961
|
item: {
|
|
962
962
|
type: Object,
|
|
@@ -982,9 +982,9 @@ const ue = {
|
|
|
982
982
|
"4d3dc7e7": l.value && i.value ? "100%" : t.slim ? "50%" : "25%",
|
|
983
983
|
"4d400dc2": l.value && i.value ? "100%" : t.slim ? "50%" : "75%"
|
|
984
984
|
}));
|
|
985
|
-
const r = ut(), { i18n: { t: o, formatUnixTimeStamp: a } } =
|
|
985
|
+
const r = ut(), { i18n: { t: o, formatUnixTimeStamp: a } } = ce.useI18n(), i = T(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = T(() => !!(t.item.tooltip || r["label-tooltip"])), l = T(() => t.item.type === ne.Json || t.item.type === ne.JsonArray), c = T(() => t.item.type === ne.JsonArray), d = T(() => {
|
|
986
986
|
switch (t.item.type) {
|
|
987
|
-
case
|
|
987
|
+
case ne.ID:
|
|
988
988
|
return {
|
|
989
989
|
tag: "CopyUuid",
|
|
990
990
|
attrs: {
|
|
@@ -997,7 +997,7 @@ const ue = {
|
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
};
|
|
1000
|
-
case
|
|
1000
|
+
case ne.IdArray:
|
|
1001
1001
|
return {
|
|
1002
1002
|
tag: "div",
|
|
1003
1003
|
additionalComponent: "CopyUuid",
|
|
@@ -1009,7 +1009,7 @@ const ue = {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
}
|
|
1011
1011
|
};
|
|
1012
|
-
case
|
|
1012
|
+
case ne.Redacted:
|
|
1013
1013
|
return {
|
|
1014
1014
|
tag: "CopyUuid",
|
|
1015
1015
|
attrs: {
|
|
@@ -1023,7 +1023,7 @@ const ue = {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
}
|
|
1025
1025
|
};
|
|
1026
|
-
case
|
|
1026
|
+
case ne.RedactedArray:
|
|
1027
1027
|
return {
|
|
1028
1028
|
tag: "div",
|
|
1029
1029
|
additionalComponent: "CopyUuid",
|
|
@@ -1036,7 +1036,7 @@ const ue = {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
}
|
|
1038
1038
|
};
|
|
1039
|
-
case
|
|
1039
|
+
case ne.Date:
|
|
1040
1040
|
return {
|
|
1041
1041
|
tag: "div",
|
|
1042
1042
|
attrs: {
|
|
@@ -1044,7 +1044,7 @@ const ue = {
|
|
|
1044
1044
|
},
|
|
1045
1045
|
text: a(t.item.value)
|
|
1046
1046
|
};
|
|
1047
|
-
case
|
|
1047
|
+
case ne.BadgeStatus:
|
|
1048
1048
|
return {
|
|
1049
1049
|
tag: "StatusBadge",
|
|
1050
1050
|
attrs: {
|
|
@@ -1052,17 +1052,17 @@ const ue = {
|
|
|
1052
1052
|
status: t.item.value
|
|
1053
1053
|
}
|
|
1054
1054
|
};
|
|
1055
|
-
case
|
|
1055
|
+
case ne.BadgeTag:
|
|
1056
1056
|
return {
|
|
1057
1057
|
tag: "div",
|
|
1058
1058
|
additionalComponent: "KBadge"
|
|
1059
1059
|
};
|
|
1060
|
-
case
|
|
1060
|
+
case ne.BadgeMethod:
|
|
1061
1061
|
return {
|
|
1062
1062
|
tag: "div",
|
|
1063
1063
|
additionalComponent: "KMethodBadge"
|
|
1064
1064
|
};
|
|
1065
|
-
case
|
|
1065
|
+
case ne.LinkInternal:
|
|
1066
1066
|
return {
|
|
1067
1067
|
tag: "InternalLinkItem",
|
|
1068
1068
|
attrs: {
|
|
@@ -1073,7 +1073,7 @@ const ue = {
|
|
|
1073
1073
|
}
|
|
1074
1074
|
}
|
|
1075
1075
|
};
|
|
1076
|
-
case
|
|
1076
|
+
case ne.LinkExternal:
|
|
1077
1077
|
return {
|
|
1078
1078
|
tag: "KExternalLink",
|
|
1079
1079
|
attrs: {
|
|
@@ -1082,7 +1082,7 @@ const ue = {
|
|
|
1082
1082
|
},
|
|
1083
1083
|
text: t.item.value
|
|
1084
1084
|
};
|
|
1085
|
-
case
|
|
1085
|
+
case ne.Json:
|
|
1086
1086
|
return {
|
|
1087
1087
|
tag: "JsonCardItem",
|
|
1088
1088
|
attrs: {
|
|
@@ -1090,7 +1090,7 @@ const ue = {
|
|
|
1090
1090
|
item: t.item
|
|
1091
1091
|
}
|
|
1092
1092
|
};
|
|
1093
|
-
case
|
|
1093
|
+
case ne.JsonArray:
|
|
1094
1094
|
return {
|
|
1095
1095
|
tag: "div",
|
|
1096
1096
|
additionalComponent: "JsonCardItem",
|
|
@@ -1108,29 +1108,29 @@ const ue = {
|
|
|
1108
1108
|
text: t.item.value
|
|
1109
1109
|
};
|
|
1110
1110
|
}
|
|
1111
|
-
}), u =
|
|
1111
|
+
}), u = E(), { isTruncated: g } = ce.useTruncationDetector(u);
|
|
1112
1112
|
return (f, I) => {
|
|
1113
|
-
const
|
|
1113
|
+
const b = L("KLabel"), p = L("KBadge"), A = L("KMethodBadge"), k = L("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
|
-
|
|
1120
|
-
|
|
1121
|
-
default:
|
|
1122
|
-
|
|
1119
|
+
Z(f.$slots, "label", { item: e.item }, () => [
|
|
1120
|
+
F(b, { "tooltip-attributes": { maxWidth: "500px" } }, Te({
|
|
1121
|
+
default: v(() => [
|
|
1122
|
+
Q(O(e.item.label) + " ", 1)
|
|
1123
1123
|
]),
|
|
1124
1124
|
_: 2
|
|
1125
1125
|
}, [
|
|
1126
1126
|
s.value ? {
|
|
1127
1127
|
name: "tooltip",
|
|
1128
|
-
fn:
|
|
1128
|
+
fn: v(() => [
|
|
1129
1129
|
V("div", {
|
|
1130
1130
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1131
1131
|
}, [
|
|
1132
|
-
|
|
1133
|
-
|
|
1132
|
+
Z(f.$slots, "label-tooltip", {}, () => [
|
|
1133
|
+
Q(O(e.item.tooltip), 1)
|
|
1134
1134
|
], !0)
|
|
1135
1135
|
], 8, xo)
|
|
1136
1136
|
]),
|
|
@@ -1143,77 +1143,77 @@ const ue = {
|
|
|
1143
1143
|
class: "config-card-details-value",
|
|
1144
1144
|
"data-testid": `${e.item.key}-property-value`
|
|
1145
1145
|
}, [
|
|
1146
|
-
|
|
1146
|
+
Z(f.$slots, e.item.key, {
|
|
1147
1147
|
rowValue: e.item.value
|
|
1148
1148
|
}, () => [
|
|
1149
1149
|
i.value ? (m(), $("div", $o, [
|
|
1150
|
-
(m(), R(
|
|
1151
|
-
default:
|
|
1150
|
+
(m(), R(Ue(d.value.tag), gr(yr(d.value.attrs)), {
|
|
1151
|
+
default: v(() => [
|
|
1152
1152
|
d.value.additionalComponent === "KBadge" ? (m(), $("div", {
|
|
1153
1153
|
key: 0,
|
|
1154
1154
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1155
1155
|
}, [
|
|
1156
|
-
(m(!0), $(
|
|
1157
|
-
key: `${e.item.key}-badge-tag-${
|
|
1156
|
+
(m(!0), $(be, null, he(e.item.value, (K, h) => (m(), R(p, {
|
|
1157
|
+
key: `${e.item.key}-badge-tag-${h}`,
|
|
1158
1158
|
class: "config-badge",
|
|
1159
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1160
|
-
"truncation-tooltip":
|
|
1159
|
+
"data-testid": `${e.item.key}-badge-tag-${h}`,
|
|
1160
|
+
"truncation-tooltip": K
|
|
1161
1161
|
}, {
|
|
1162
|
-
default:
|
|
1163
|
-
|
|
1162
|
+
default: v(() => [
|
|
1163
|
+
Q(O(K), 1)
|
|
1164
1164
|
]),
|
|
1165
1165
|
_: 2
|
|
1166
1166
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
1167
|
-
], 8,
|
|
1167
|
+
], 8, Mo)) : H("", !0),
|
|
1168
1168
|
d.value.additionalComponent === "CopyUuid" ? (m(), $("div", {
|
|
1169
1169
|
key: 1,
|
|
1170
1170
|
class: "copy-uuid-array",
|
|
1171
1171
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1172
1172
|
}, [
|
|
1173
|
-
(m(!0), $(
|
|
1174
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1175
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1176
|
-
uuid:
|
|
1173
|
+
(m(!0), $(be, null, he(e.item.value, (K, h) => (m(), R(y(kn), ht(d.value.childAttrs, {
|
|
1174
|
+
key: `${e.item.key}-copy-uuid-${h}`,
|
|
1175
|
+
"data-testid": `${e.item.key}-copy-uuid-${h}`,
|
|
1176
|
+
uuid: K
|
|
1177
1177
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1178
|
-
], 8,
|
|
1178
|
+
], 8, jo)) : d.value.additionalComponent === "KMethodBadge" ? (m(), $("div", {
|
|
1179
1179
|
key: 2,
|
|
1180
1180
|
class: "method-badge-array",
|
|
1181
1181
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1182
1182
|
}, [
|
|
1183
|
-
(m(!0), $(
|
|
1184
|
-
key: `${e.item.key}-badge-method-${
|
|
1183
|
+
(m(!0), $(be, null, he(e.item.value, (K, h) => (m(), R(A, {
|
|
1184
|
+
key: `${e.item.key}-badge-method-${h}`,
|
|
1185
1185
|
class: "config-badge",
|
|
1186
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1186
|
+
"data-testid": `${e.item.key}-badge-method-${h}`,
|
|
1187
1187
|
"is-rounded": "",
|
|
1188
|
-
label:
|
|
1189
|
-
method: y(kr).includes(
|
|
1188
|
+
label: K,
|
|
1189
|
+
method: y(kr).includes(K.toLowerCase()) ? K.toLowerCase() : "custom"
|
|
1190
1190
|
}, {
|
|
1191
|
-
default:
|
|
1192
|
-
|
|
1191
|
+
default: v(() => [
|
|
1192
|
+
Q(O(K), 1)
|
|
1193
1193
|
]),
|
|
1194
1194
|
_: 2
|
|
1195
1195
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
1196
|
-
], 8, Eo)) :
|
|
1196
|
+
], 8, Eo)) : H("", !0),
|
|
1197
1197
|
d.value.additionalComponent === "JsonCardItem" ? (m(), $("div", {
|
|
1198
1198
|
key: 3,
|
|
1199
1199
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1200
1200
|
}, [
|
|
1201
|
-
(m(!0), $(
|
|
1202
|
-
key: `json-array-item-${
|
|
1203
|
-
index:
|
|
1201
|
+
(m(!0), $(be, null, he(e.item.value, (K, h) => (m(), R(_n, {
|
|
1202
|
+
key: `json-array-item-${h}`,
|
|
1203
|
+
index: h,
|
|
1204
1204
|
"is-array-item": "",
|
|
1205
|
-
item:
|
|
1205
|
+
item: K
|
|
1206
1206
|
}, null, 8, ["index", "item"]))), 128))
|
|
1207
|
-
], 8, Oo)) : (m(), R(
|
|
1207
|
+
], 8, Oo)) : (m(), R(k, {
|
|
1208
1208
|
key: 4,
|
|
1209
1209
|
label: y(g) ? e.item.value : ""
|
|
1210
1210
|
}, {
|
|
1211
|
-
default:
|
|
1211
|
+
default: v(() => [
|
|
1212
1212
|
V("span", {
|
|
1213
1213
|
ref_key: "textContent",
|
|
1214
1214
|
ref: u,
|
|
1215
|
-
class:
|
|
1216
|
-
},
|
|
1215
|
+
class: Fe(["attrs-data-text", { truncated: e.truncated }])
|
|
1216
|
+
}, O(d.value.text), 3)
|
|
1217
1217
|
]),
|
|
1218
1218
|
_: 1
|
|
1219
1219
|
}, 8, ["label"]))
|
|
@@ -1229,18 +1229,18 @@ const ue = {
|
|
|
1229
1229
|
]);
|
|
1230
1230
|
};
|
|
1231
1231
|
}
|
|
1232
|
-
}), St = /* @__PURE__ */ ke(
|
|
1232
|
+
}), St = /* @__PURE__ */ ke(Fo, [["__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) {
|
|
1241
1241
|
return Array.isArray(e) ? e : wn(e) ? [] : [e];
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function qo(e, n) {
|
|
1244
1244
|
var t, r, o, a;
|
|
1245
1245
|
if (n)
|
|
1246
1246
|
for (a = Object.keys(n), t = 0, r = a.length; t < r; t += 1)
|
|
@@ -1253,16 +1253,16 @@ function Lo(e, n) {
|
|
|
1253
1253
|
t += e;
|
|
1254
1254
|
return t;
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function Po(e) {
|
|
1257
1257
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1258
1258
|
}
|
|
1259
|
-
var
|
|
1260
|
-
isNothing:
|
|
1261
|
-
isObject:
|
|
1259
|
+
var Vo = wn, Uo = No, Ro = Bo, Do = Lo, Go = Po, Ho = qo, ue = {
|
|
1260
|
+
isNothing: Vo,
|
|
1261
|
+
isObject: Uo,
|
|
1262
1262
|
toArray: Ro,
|
|
1263
1263
|
repeat: Do,
|
|
1264
1264
|
isNegativeZero: Go,
|
|
1265
|
-
extend:
|
|
1265
|
+
extend: Ho
|
|
1266
1266
|
};
|
|
1267
1267
|
function In(e, n) {
|
|
1268
1268
|
var t = "", r = e.reason || "(unknown reason)";
|
|
@@ -1288,9 +1288,9 @@ function mt(e, n, t, r, o) {
|
|
|
1288
1288
|
};
|
|
1289
1289
|
}
|
|
1290
1290
|
function gt(e, n) {
|
|
1291
|
-
return
|
|
1291
|
+
return ue.repeat(" ", n - e.length) + e;
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function zo(e, n) {
|
|
1294
1294
|
if (n = Object.create(n || null), !e.buffer)
|
|
1295
1295
|
return null;
|
|
1296
1296
|
n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2);
|
|
@@ -1305,10 +1305,10 @@ function Ho(e, n) {
|
|
|
1305
1305
|
o[i - l],
|
|
1306
1306
|
e.position - (r[i] - r[i - l]),
|
|
1307
1307
|
u
|
|
1308
|
-
), s =
|
|
1308
|
+
), s = ue.repeat(" ", n.indent) + gt((e.line - l + 1).toString(), d) + " | " + c.str + `
|
|
1309
1309
|
` + s;
|
|
1310
|
-
for (c = mt(e.buffer, r[i], o[i], e.position, u), s +=
|
|
1311
|
-
`, s +=
|
|
1310
|
+
for (c = mt(e.buffer, r[i], o[i], e.position, u), s += ue.repeat(" ", n.indent) + gt((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1311
|
+
`, s += ue.repeat("-", n.indent + d + 3 + c.pos) + `^
|
|
1312
1312
|
`, l = 1; l <= n.linesAfter && !(i + l >= o.length); l++)
|
|
1313
1313
|
c = mt(
|
|
1314
1314
|
e.buffer,
|
|
@@ -1316,11 +1316,11 @@ function Ho(e, n) {
|
|
|
1316
1316
|
o[i + l],
|
|
1317
1317
|
e.position - (r[i] - r[i + l]),
|
|
1318
1318
|
u
|
|
1319
|
-
), s +=
|
|
1319
|
+
), s += ue.repeat(" ", n.indent) + gt((e.line + l + 1).toString(), d) + " | " + c.str + `
|
|
1320
1320
|
`;
|
|
1321
1321
|
return s.replace(/\n$/, "");
|
|
1322
1322
|
}
|
|
1323
|
-
var Jo =
|
|
1323
|
+
var Jo = zo, Yo = [
|
|
1324
1324
|
"kind",
|
|
1325
1325
|
"multi",
|
|
1326
1326
|
"resolve",
|
|
@@ -1355,8 +1355,8 @@ function Qo(e, n) {
|
|
|
1355
1355
|
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = Zo(n.styleAliases || null), Wo.indexOf(this.kind) === -1)
|
|
1356
1356
|
throw new me('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1357
1357
|
}
|
|
1358
|
-
var
|
|
1359
|
-
function
|
|
1358
|
+
var pe = Qo;
|
|
1359
|
+
function zt(e, n) {
|
|
1360
1360
|
var t = [];
|
|
1361
1361
|
return e[n].forEach(function(r) {
|
|
1362
1362
|
var o = t.length;
|
|
@@ -1390,7 +1390,7 @@ function vt(e) {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
vt.prototype.extend = function(e) {
|
|
1392
1392
|
var n = [], t = [];
|
|
1393
|
-
if (e instanceof
|
|
1393
|
+
if (e instanceof pe)
|
|
1394
1394
|
t.push(e);
|
|
1395
1395
|
else if (Array.isArray(e))
|
|
1396
1396
|
t = t.concat(e);
|
|
@@ -1399,30 +1399,30 @@ vt.prototype.extend = function(e) {
|
|
|
1399
1399
|
else
|
|
1400
1400
|
throw new me("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1401
1401
|
n.forEach(function(o) {
|
|
1402
|
-
if (!(o instanceof
|
|
1402
|
+
if (!(o instanceof pe))
|
|
1403
1403
|
throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1404
1404
|
if (o.loadKind && o.loadKind !== "scalar")
|
|
1405
1405
|
throw new me("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1406
1406
|
if (o.multi)
|
|
1407
1407
|
throw new me("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1408
1408
|
}), t.forEach(function(o) {
|
|
1409
|
-
if (!(o instanceof
|
|
1409
|
+
if (!(o instanceof pe))
|
|
1410
1410
|
throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1411
1411
|
});
|
|
1412
1412
|
var r = Object.create(vt.prototype);
|
|
1413
|
-
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit =
|
|
1413
|
+
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = zt(r, "implicit"), r.compiledExplicit = zt(r, "explicit"), r.compiledTypeMap = Xo(r.compiledImplicit, r.compiledExplicit), r;
|
|
1414
1414
|
};
|
|
1415
|
-
var An = vt, xn = new
|
|
1415
|
+
var An = vt, xn = new pe("tag:yaml.org,2002:str", {
|
|
1416
1416
|
kind: "scalar",
|
|
1417
1417
|
construct: function(e) {
|
|
1418
1418
|
return e !== null ? e : "";
|
|
1419
1419
|
}
|
|
1420
|
-
}), Sn = new
|
|
1420
|
+
}), Sn = new pe("tag:yaml.org,2002:seq", {
|
|
1421
1421
|
kind: "sequence",
|
|
1422
1422
|
construct: function(e) {
|
|
1423
1423
|
return e !== null ? e : [];
|
|
1424
1424
|
}
|
|
1425
|
-
}), Tn = new
|
|
1425
|
+
}), Tn = new pe("tag:yaml.org,2002:map", {
|
|
1426
1426
|
kind: "mapping",
|
|
1427
1427
|
construct: function(e) {
|
|
1428
1428
|
return e !== null ? e : {};
|
|
@@ -1446,7 +1446,7 @@ function ta() {
|
|
|
1446
1446
|
function na(e) {
|
|
1447
1447
|
return e === null;
|
|
1448
1448
|
}
|
|
1449
|
-
var
|
|
1449
|
+
var Mn = new pe("tag:yaml.org,2002:null", {
|
|
1450
1450
|
kind: "scalar",
|
|
1451
1451
|
resolve: ea,
|
|
1452
1452
|
construct: ta,
|
|
@@ -1482,7 +1482,7 @@ function oa(e) {
|
|
|
1482
1482
|
function aa(e) {
|
|
1483
1483
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1484
1484
|
}
|
|
1485
|
-
var
|
|
1485
|
+
var jn = new pe("tag:yaml.org,2002:bool", {
|
|
1486
1486
|
kind: "scalar",
|
|
1487
1487
|
resolve: ra,
|
|
1488
1488
|
construct: oa,
|
|
@@ -1571,9 +1571,9 @@ function ca(e) {
|
|
|
1571
1571
|
return t * parseInt(n, 10);
|
|
1572
1572
|
}
|
|
1573
1573
|
function da(e) {
|
|
1574
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !
|
|
1574
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ue.isNegativeZero(e);
|
|
1575
1575
|
}
|
|
1576
|
-
var En = new
|
|
1576
|
+
var En = new pe("tag:yaml.org,2002:int", {
|
|
1577
1577
|
kind: "scalar",
|
|
1578
1578
|
resolve: ua,
|
|
1579
1579
|
construct: ca,
|
|
@@ -1643,38 +1643,38 @@ function ya(e, n) {
|
|
|
1643
1643
|
case "camelcase":
|
|
1644
1644
|
return "-.Inf";
|
|
1645
1645
|
}
|
|
1646
|
-
else if (
|
|
1646
|
+
else if (ue.isNegativeZero(e))
|
|
1647
1647
|
return "-0.0";
|
|
1648
1648
|
return t = e.toString(10), ga.test(t) ? t.replace("e", ".e") : t;
|
|
1649
1649
|
}
|
|
1650
1650
|
function ha(e) {
|
|
1651
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 ||
|
|
1651
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ue.isNegativeZero(e));
|
|
1652
1652
|
}
|
|
1653
|
-
var On = new
|
|
1653
|
+
var On = new pe("tag:yaml.org,2002:float", {
|
|
1654
1654
|
kind: "scalar",
|
|
1655
1655
|
resolve: fa,
|
|
1656
1656
|
construct: ma,
|
|
1657
1657
|
predicate: ha,
|
|
1658
1658
|
represent: ya,
|
|
1659
1659
|
defaultStyle: "lowercase"
|
|
1660
|
-
}),
|
|
1660
|
+
}), Kn = $n.extend({
|
|
1661
1661
|
implicit: [
|
|
1662
|
-
jn,
|
|
1663
1662
|
Mn,
|
|
1663
|
+
jn,
|
|
1664
1664
|
En,
|
|
1665
1665
|
On
|
|
1666
1666
|
]
|
|
1667
|
-
}),
|
|
1667
|
+
}), Fn = Kn, 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));
|
|
@@ -1688,7 +1688,7 @@ function ba(e) {
|
|
|
1688
1688
|
function Ca(e) {
|
|
1689
1689
|
return e.toISOString();
|
|
1690
1690
|
}
|
|
1691
|
-
var
|
|
1691
|
+
var qn = new pe("tag:yaml.org,2002:timestamp", {
|
|
1692
1692
|
kind: "scalar",
|
|
1693
1693
|
resolve: va,
|
|
1694
1694
|
construct: ba,
|
|
@@ -1698,7 +1698,7 @@ var Pn = new de("tag:yaml.org,2002:timestamp", {
|
|
|
1698
1698
|
function ka(e) {
|
|
1699
1699
|
return e === "<<" || e === null;
|
|
1700
1700
|
}
|
|
1701
|
-
var Ln = new
|
|
1701
|
+
var Ln = new pe("tag:yaml.org,2002:merge", {
|
|
1702
1702
|
kind: "scalar",
|
|
1703
1703
|
resolve: ka
|
|
1704
1704
|
}), Tt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
@@ -1730,7 +1730,7 @@ function Ia(e) {
|
|
|
1730
1730
|
function Aa(e) {
|
|
1731
1731
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1732
1732
|
}
|
|
1733
|
-
var
|
|
1733
|
+
var Pn = new pe("tag:yaml.org,2002:binary", {
|
|
1734
1734
|
kind: "scalar",
|
|
1735
1735
|
resolve: _a,
|
|
1736
1736
|
construct: wa,
|
|
@@ -1762,17 +1762,17 @@ function Ta(e) {
|
|
|
1762
1762
|
function $a(e) {
|
|
1763
1763
|
return e !== null ? e : [];
|
|
1764
1764
|
}
|
|
1765
|
-
var
|
|
1765
|
+
var Vn = new pe("tag:yaml.org,2002:omap", {
|
|
1766
1766
|
kind: "sequence",
|
|
1767
1767
|
resolve: Ta,
|
|
1768
1768
|
construct: $a
|
|
1769
|
-
}),
|
|
1770
|
-
function
|
|
1769
|
+
}), Ma = Object.prototype.toString;
|
|
1770
|
+
function ja(e) {
|
|
1771
1771
|
if (e === null)
|
|
1772
1772
|
return !0;
|
|
1773
1773
|
var n, t, r, o, a, i = e;
|
|
1774
1774
|
for (a = new Array(i.length), n = 0, t = i.length; n < t; n += 1) {
|
|
1775
|
-
if (r = i[n],
|
|
1775
|
+
if (r = i[n], Ma.call(r) !== "[object Object]" || (o = Object.keys(r), o.length !== 1))
|
|
1776
1776
|
return !1;
|
|
1777
1777
|
a[n] = [o[0], r[o[0]]];
|
|
1778
1778
|
}
|
|
@@ -1786,12 +1786,12 @@ function Ea(e) {
|
|
|
1786
1786
|
r = i[n], o = Object.keys(r), a[n] = [o[0], r[o[0]]];
|
|
1787
1787
|
return a;
|
|
1788
1788
|
}
|
|
1789
|
-
var
|
|
1789
|
+
var Un = new pe("tag:yaml.org,2002:pairs", {
|
|
1790
1790
|
kind: "sequence",
|
|
1791
|
-
resolve:
|
|
1791
|
+
resolve: ja,
|
|
1792
1792
|
construct: Ea
|
|
1793
1793
|
}), Oa = Object.prototype.hasOwnProperty;
|
|
1794
|
-
function
|
|
1794
|
+
function Ka(e) {
|
|
1795
1795
|
if (e === null)
|
|
1796
1796
|
return !0;
|
|
1797
1797
|
var n, t = e;
|
|
@@ -1800,48 +1800,48 @@ function Fa(e) {
|
|
|
1800
1800
|
return !1;
|
|
1801
1801
|
return !0;
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1803
|
+
function Fa(e) {
|
|
1804
1804
|
return e !== null ? e : {};
|
|
1805
1805
|
}
|
|
1806
|
-
var Rn = new
|
|
1806
|
+
var Rn = new pe("tag:yaml.org,2002:set", {
|
|
1807
1807
|
kind: "mapping",
|
|
1808
|
-
resolve:
|
|
1809
|
-
construct:
|
|
1810
|
-
}), $t =
|
|
1808
|
+
resolve: Ka,
|
|
1809
|
+
construct: Fa
|
|
1810
|
+
}), $t = Fn.extend({
|
|
1811
1811
|
implicit: [
|
|
1812
|
-
|
|
1812
|
+
qn,
|
|
1813
1813
|
Ln
|
|
1814
1814
|
],
|
|
1815
1815
|
explicit: [
|
|
1816
|
-
|
|
1817
|
-
Un,
|
|
1816
|
+
Pn,
|
|
1818
1817
|
Vn,
|
|
1818
|
+
Un,
|
|
1819
1819
|
Rn
|
|
1820
1820
|
]
|
|
1821
|
-
}),
|
|
1821
|
+
}), je = 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]/, qa = /[\x85\u2028\u2029]/, La = /[,\[\]\{\}]/, Hn = /^(?:!|!!|![a-z\-]+!)$/i, zn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1822
1822
|
function Yt(e) {
|
|
1823
1823
|
return Object.prototype.toString.call(e);
|
|
1824
1824
|
}
|
|
1825
1825
|
function we(e) {
|
|
1826
1826
|
return e === 10 || e === 13;
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1828
|
+
function Ke(e) {
|
|
1829
1829
|
return e === 9 || e === 32;
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1831
|
+
function ve(e) {
|
|
1832
1832
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1833
1833
|
}
|
|
1834
|
-
function
|
|
1834
|
+
function Pe(e) {
|
|
1835
1835
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1836
1836
|
}
|
|
1837
|
-
function
|
|
1837
|
+
function Pa(e) {
|
|
1838
1838
|
var n;
|
|
1839
1839
|
return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
1840
1840
|
}
|
|
1841
|
-
function
|
|
1841
|
+
function Va(e) {
|
|
1842
1842
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1844
|
+
function Ua(e) {
|
|
1845
1845
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1846
1846
|
}
|
|
1847
1847
|
function Wt(e) {
|
|
@@ -1855,8 +1855,8 @@ function Ra(e) {
|
|
|
1855
1855
|
);
|
|
1856
1856
|
}
|
|
1857
1857
|
var Jn = new Array(256), Yn = new Array(256);
|
|
1858
|
-
for (var
|
|
1859
|
-
Jn[
|
|
1858
|
+
for (var qe = 0; qe < 256; qe++)
|
|
1859
|
+
Jn[qe] = Wt(qe) ? 1 : 0, Yn[qe] = Wt(qe);
|
|
1860
1860
|
function Da(e, n) {
|
|
1861
1861
|
this.input = e, this.filename = n.filename || null, this.schema = n.schema || $t, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1862
1862
|
}
|
|
@@ -1884,7 +1884,7 @@ var Zt = {
|
|
|
1884
1884
|
},
|
|
1885
1885
|
TAG: function(e, n, t) {
|
|
1886
1886
|
var r, o;
|
|
1887
|
-
t.length !== 2 && M(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1],
|
|
1887
|
+
t.length !== 2 && M(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1], Hn.test(r) || M(e, "ill-formed tag handle (first argument) of the TAG directive"), je.call(e.tagMap, r) && M(e, 'there is a previously declared suffix for "' + r + '" tag handle'), zn.test(o) || M(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1888
1888
|
try {
|
|
1889
1889
|
o = decodeURIComponent(o);
|
|
1890
1890
|
} catch {
|
|
@@ -1893,7 +1893,7 @@ var Zt = {
|
|
|
1893
1893
|
e.tagMap[r] = o;
|
|
1894
1894
|
}
|
|
1895
1895
|
};
|
|
1896
|
-
function
|
|
1896
|
+
function Me(e, n, t, r) {
|
|
1897
1897
|
var o, a, i, s;
|
|
1898
1898
|
if (n < t) {
|
|
1899
1899
|
if (s = e.input.slice(n, t), r)
|
|
@@ -1906,10 +1906,10 @@ function je(e, n, t, r) {
|
|
|
1906
1906
|
}
|
|
1907
1907
|
function Qt(e, n, t, r) {
|
|
1908
1908
|
var o, a, i, s;
|
|
1909
|
-
for (
|
|
1910
|
-
a = o[i],
|
|
1909
|
+
for (ue.isObject(t) || M(e, "cannot merge mappings; the provided source object is unacceptable"), o = Object.keys(t), i = 0, s = o.length; i < s; i += 1)
|
|
1910
|
+
a = o[i], je.call(n, a) || (n[a] = t[a], r[a] = !0);
|
|
1911
1911
|
}
|
|
1912
|
-
function
|
|
1912
|
+
function Ve(e, n, t, r, o, a, i, s, l) {
|
|
1913
1913
|
var c, d;
|
|
1914
1914
|
if (Array.isArray(o))
|
|
1915
1915
|
for (o = Array.prototype.slice.call(o), c = 0, d = o.length; c < d; c += 1)
|
|
@@ -1921,7 +1921,7 @@ function Ue(e, n, t, r, o, a, i, s, l) {
|
|
|
1921
1921
|
else
|
|
1922
1922
|
Qt(e, n, a, t);
|
|
1923
1923
|
else
|
|
1924
|
-
!e.json && !
|
|
1924
|
+
!e.json && !je.call(t, o) && je.call(n, o) && (e.line = i || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, M(e, "duplicated mapping key")), o === "__proto__" ? Object.defineProperty(n, o, {
|
|
1925
1925
|
configurable: !0,
|
|
1926
1926
|
enumerable: !0,
|
|
1927
1927
|
writable: !0,
|
|
@@ -1929,20 +1929,20 @@ function Ue(e, n, t, r, o, a, i, s, l) {
|
|
|
1929
1929
|
}) : n[o] = a, delete t[o];
|
|
1930
1930
|
return n;
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function Mt(e) {
|
|
1933
1933
|
var n;
|
|
1934
1934
|
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : M(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1935
1935
|
}
|
|
1936
|
-
function
|
|
1936
|
+
function ie(e, n, t) {
|
|
1937
1937
|
for (var r = 0, o = e.input.charCodeAt(e.position); o !== 0; ) {
|
|
1938
|
-
for (;
|
|
1938
|
+
for (; Ke(o); )
|
|
1939
1939
|
o === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), o = e.input.charCodeAt(++e.position);
|
|
1940
1940
|
if (n && o === 35)
|
|
1941
1941
|
do
|
|
1942
1942
|
o = e.input.charCodeAt(++e.position);
|
|
1943
1943
|
while (o !== 10 && o !== 13 && o !== 0);
|
|
1944
1944
|
if (we(o))
|
|
1945
|
-
for (
|
|
1945
|
+
for (Mt(e), o = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; o === 32; )
|
|
1946
1946
|
e.lineIndent++, o = e.input.charCodeAt(++e.position);
|
|
1947
1947
|
else
|
|
1948
1948
|
break;
|
|
@@ -1951,28 +1951,28 @@ function ae(e, n, t) {
|
|
|
1951
1951
|
}
|
|
1952
1952
|
function dt(e) {
|
|
1953
1953
|
var n = e.position, t;
|
|
1954
|
-
return t = e.input.charCodeAt(n), !!((t === 45 || t === 46) && t === e.input.charCodeAt(n + 1) && t === e.input.charCodeAt(n + 2) && (n += 3, t = e.input.charCodeAt(n), t === 0 ||
|
|
1954
|
+
return t = e.input.charCodeAt(n), !!((t === 45 || t === 46) && t === e.input.charCodeAt(n + 1) && t === e.input.charCodeAt(n + 2) && (n += 3, t = e.input.charCodeAt(n), t === 0 || ve(t)));
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1957
|
-
n === 1 ? e.result += " " : n > 1 && (e.result +=
|
|
1956
|
+
function jt(e, n) {
|
|
1957
|
+
n === 1 ? e.result += " " : n > 1 && (e.result += ue.repeat(`
|
|
1958
1958
|
`, n - 1));
|
|
1959
1959
|
}
|
|
1960
1960
|
function Ga(e, n, t) {
|
|
1961
1961
|
var r, o, a, i, s, l, c, d, u = e.kind, g = e.result, f;
|
|
1962
|
-
if (f = e.input.charCodeAt(e.position),
|
|
1962
|
+
if (f = e.input.charCodeAt(e.position), ve(f) || Pe(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (o = e.input.charCodeAt(e.position + 1), ve(o) || t && Pe(o)))
|
|
1963
1963
|
return !1;
|
|
1964
1964
|
for (e.kind = "scalar", e.result = "", a = i = e.position, s = !1; f !== 0; ) {
|
|
1965
1965
|
if (f === 58) {
|
|
1966
|
-
if (o = e.input.charCodeAt(e.position + 1),
|
|
1966
|
+
if (o = e.input.charCodeAt(e.position + 1), ve(o) || t && Pe(o))
|
|
1967
1967
|
break;
|
|
1968
1968
|
} else if (f === 35) {
|
|
1969
|
-
if (r = e.input.charCodeAt(e.position - 1),
|
|
1969
|
+
if (r = e.input.charCodeAt(e.position - 1), ve(r))
|
|
1970
1970
|
break;
|
|
1971
1971
|
} else {
|
|
1972
|
-
if (e.position === e.lineStart && dt(e) || t &&
|
|
1972
|
+
if (e.position === e.lineStart && dt(e) || t && Pe(f))
|
|
1973
1973
|
break;
|
|
1974
1974
|
if (we(f))
|
|
1975
|
-
if (l = e.line, c = e.lineStart, d = e.lineIndent,
|
|
1975
|
+
if (l = e.line, c = e.lineStart, d = e.lineIndent, ie(e, !1, -1), e.lineIndent >= n) {
|
|
1976
1976
|
s = !0, f = e.input.charCodeAt(e.position);
|
|
1977
1977
|
continue;
|
|
1978
1978
|
} else {
|
|
@@ -1980,60 +1980,60 @@ function Ga(e, n, t) {
|
|
|
1980
1980
|
break;
|
|
1981
1981
|
}
|
|
1982
1982
|
}
|
|
1983
|
-
s && (
|
|
1983
|
+
s && (Me(e, a, i, !1), jt(e, e.line - l), a = i = e.position, s = !1), Ke(f) || (i = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1984
1984
|
}
|
|
1985
|
-
return
|
|
1985
|
+
return Me(e, a, i, !1), e.result ? !0 : (e.kind = u, e.result = g, !1);
|
|
1986
1986
|
}
|
|
1987
|
-
function
|
|
1987
|
+
function Ha(e, n) {
|
|
1988
1988
|
var t, r, o;
|
|
1989
1989
|
if (t = e.input.charCodeAt(e.position), t !== 39)
|
|
1990
1990
|
return !1;
|
|
1991
1991
|
for (e.kind = "scalar", e.result = "", e.position++, r = o = e.position; (t = e.input.charCodeAt(e.position)) !== 0; )
|
|
1992
1992
|
if (t === 39)
|
|
1993
|
-
if (
|
|
1993
|
+
if (Me(e, r, e.position, !0), t = e.input.charCodeAt(++e.position), t === 39)
|
|
1994
1994
|
r = e.position, e.position++, o = e.position;
|
|
1995
1995
|
else
|
|
1996
1996
|
return !0;
|
|
1997
1997
|
else
|
|
1998
|
-
we(t) ? (
|
|
1998
|
+
we(t) ? (Me(e, r, o, !0), jt(e, ie(e, !1, n)), r = o = e.position) : e.position === e.lineStart && dt(e) ? M(e, "unexpected end of the document within a single quoted scalar") : (e.position++, o = e.position);
|
|
1999
1999
|
M(e, "unexpected end of the stream within a single quoted scalar");
|
|
2000
2000
|
}
|
|
2001
|
-
function
|
|
2001
|
+
function za(e, n) {
|
|
2002
2002
|
var t, r, o, a, i, s;
|
|
2003
2003
|
if (s = e.input.charCodeAt(e.position), s !== 34)
|
|
2004
2004
|
return !1;
|
|
2005
2005
|
for (e.kind = "scalar", e.result = "", e.position++, t = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
2006
2006
|
if (s === 34)
|
|
2007
|
-
return
|
|
2007
|
+
return Me(e, t, e.position, !0), e.position++, !0;
|
|
2008
2008
|
if (s === 92) {
|
|
2009
|
-
if (
|
|
2010
|
-
|
|
2009
|
+
if (Me(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), we(s))
|
|
2010
|
+
ie(e, !1, n);
|
|
2011
2011
|
else if (s < 256 && Jn[s])
|
|
2012
2012
|
e.result += Yn[s], e.position++;
|
|
2013
|
-
else if ((i =
|
|
2013
|
+
else if ((i = Va(s)) > 0) {
|
|
2014
2014
|
for (o = i, a = 0; o > 0; o--)
|
|
2015
|
-
s = e.input.charCodeAt(++e.position), (i =
|
|
2015
|
+
s = e.input.charCodeAt(++e.position), (i = Pa(s)) >= 0 ? a = (a << 4) + i : M(e, "expected hexadecimal character");
|
|
2016
2016
|
e.result += Ra(a), e.position++;
|
|
2017
2017
|
} else
|
|
2018
2018
|
M(e, "unknown escape sequence");
|
|
2019
2019
|
t = r = e.position;
|
|
2020
2020
|
} else
|
|
2021
|
-
we(s) ? (
|
|
2021
|
+
we(s) ? (Me(e, t, r, !0), jt(e, ie(e, !1, n)), t = r = e.position) : e.position === e.lineStart && dt(e) ? M(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
2022
2022
|
}
|
|
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, I = /* @__PURE__ */ Object.create(null),
|
|
2027
|
-
if (
|
|
2026
|
+
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, c, d, u, g, f, I = /* @__PURE__ */ Object.create(null), b, p, A, k;
|
|
2027
|
+
if (k = e.input.charCodeAt(e.position), k === 91)
|
|
2028
2028
|
d = 93, f = !1, s = [];
|
|
2029
|
-
else if (
|
|
2029
|
+
else if (k === 123)
|
|
2030
2030
|
d = 125, f = !0, s = {};
|
|
2031
2031
|
else
|
|
2032
2032
|
return !1;
|
|
2033
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = s),
|
|
2034
|
-
if (
|
|
2033
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), k = e.input.charCodeAt(++e.position); k !== 0; ) {
|
|
2034
|
+
if (ie(e, !0, n), k = e.input.charCodeAt(e.position), k === d)
|
|
2035
2035
|
return e.position++, e.tag = i, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
2036
|
-
t ?
|
|
2036
|
+
t ? k === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), p = b = A = null, u = g = !1, k === 63 && (c = e.input.charCodeAt(e.position + 1), ve(c) && (u = g = !0, e.position++, ie(e, !0, n))), r = e.line, o = e.lineStart, a = e.position, Re(e, n, ot, !1, !0), p = e.tag, b = e.result, ie(e, !0, n), k = e.input.charCodeAt(e.position), (g || e.line === r) && k === 58 && (u = !0, k = e.input.charCodeAt(++e.position), ie(e, !0, n), Re(e, n, ot, !1, !0), A = e.result), f ? Ve(e, s, I, p, b, A, r, o, a) : u ? s.push(Ve(e, null, I, p, b, A, r, o, a)) : s.push(b), ie(e, !0, n), k = e.input.charCodeAt(e.position), k === 44 ? (t = !0, k = 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,40 +2047,40 @@ 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 :
|
|
2051
|
-
else if ((d =
|
|
2050
|
+
yt === o ? o = u === 43 ? Jt : Na : M(e, "repeat of a chomping mode identifier");
|
|
2051
|
+
else if ((d = Ua(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
|
|
2054
2054
|
break;
|
|
2055
|
-
if (
|
|
2055
|
+
if (Ke(u)) {
|
|
2056
2056
|
do
|
|
2057
2057
|
u = e.input.charCodeAt(++e.position);
|
|
2058
|
-
while (
|
|
2058
|
+
while (Ke(u));
|
|
2059
2059
|
if (u === 35)
|
|
2060
2060
|
do
|
|
2061
2061
|
u = e.input.charCodeAt(++e.position);
|
|
2062
2062
|
while (!we(u) && u !== 0);
|
|
2063
2063
|
}
|
|
2064
2064
|
for (; u !== 0; ) {
|
|
2065
|
-
for (
|
|
2065
|
+
for (Mt(e), e.lineIndent = 0, u = e.input.charCodeAt(e.position); (!i || e.lineIndent < s) && u === 32; )
|
|
2066
2066
|
e.lineIndent++, u = e.input.charCodeAt(++e.position);
|
|
2067
2067
|
if (!i && e.lineIndent > s && (s = e.lineIndent), we(u)) {
|
|
2068
2068
|
l++;
|
|
2069
2069
|
continue;
|
|
2070
2070
|
}
|
|
2071
2071
|
if (e.lineIndent < s) {
|
|
2072
|
-
o === Jt ? e.result +=
|
|
2072
|
+
o === Jt ? e.result += ue.repeat(`
|
|
2073
2073
|
`, a ? 1 + l : l) : o === yt && a && (e.result += `
|
|
2074
2074
|
`);
|
|
2075
2075
|
break;
|
|
2076
2076
|
}
|
|
2077
|
-
for (r ?
|
|
2078
|
-
`, a ? 1 + l : l)) : c ? (c = !1, e.result +=
|
|
2079
|
-
`, l + 1)) : l === 0 ? a && (e.result += " ") : e.result +=
|
|
2080
|
-
`, l) : e.result +=
|
|
2077
|
+
for (r ? Ke(u) ? (c = !0, e.result += ue.repeat(`
|
|
2078
|
+
`, a ? 1 + l : l)) : c ? (c = !1, e.result += ue.repeat(`
|
|
2079
|
+
`, l + 1)) : l === 0 ? a && (e.result += " ") : e.result += ue.repeat(`
|
|
2080
|
+
`, l) : e.result += ue.repeat(`
|
|
2081
2081
|
`, a ? 1 + l : l), a = !0, i = !0, l = 0, t = e.position; !we(u) && u !== 0; )
|
|
2082
2082
|
u = e.input.charCodeAt(++e.position);
|
|
2083
|
-
|
|
2083
|
+
Me(e, t, e.position, !1);
|
|
2084
2084
|
}
|
|
2085
2085
|
return !0;
|
|
2086
2086
|
}
|
|
@@ -2088,12 +2088,12 @@ function Xt(e, n) {
|
|
|
2088
2088
|
var t, r = e.tag, o = e.anchor, a = [], i, s = !1, l;
|
|
2089
2089
|
if (e.firstTabInLine !== -1)
|
|
2090
2090
|
return !1;
|
|
2091
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), !(l !== 45 || (i = e.input.charCodeAt(e.position + 1), !
|
|
2092
|
-
if (s = !0, e.position++,
|
|
2091
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), !(l !== 45 || (i = e.input.charCodeAt(e.position + 1), !ve(i)))); ) {
|
|
2092
|
+
if (s = !0, e.position++, ie(e, !0, -1) && e.lineIndent <= n) {
|
|
2093
2093
|
a.push(null), l = e.input.charCodeAt(e.position);
|
|
2094
2094
|
continue;
|
|
2095
2095
|
}
|
|
2096
|
-
if (t = e.line, Re(e, n, Gn, !1, !0), a.push(e.result),
|
|
2096
|
+
if (t = e.line, Re(e, n, Gn, !1, !0), a.push(e.result), ie(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && l !== 0)
|
|
2097
2097
|
M(e, "bad indentation of a sequence entry");
|
|
2098
2098
|
else if (e.lineIndent < n)
|
|
2099
2099
|
break;
|
|
@@ -2101,35 +2101,35 @@ 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, I = null,
|
|
2104
|
+
var r, o, a, i, s, l, c = e.tag, d = e.anchor, u = {}, g = /* @__PURE__ */ Object.create(null), f = null, I = null, b = null, p = !1, A = !1, k;
|
|
2105
2105
|
if (e.firstTabInLine !== -1)
|
|
2106
2106
|
return !1;
|
|
2107
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = u),
|
|
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, (
|
|
2109
|
-
|
|
2107
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), k = e.input.charCodeAt(e.position); k !== 0; ) {
|
|
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, (k === 63 || k === 58) && ve(r))
|
|
2109
|
+
k === 63 ? (p && (Ve(e, u, g, f, I, null, i, s, l), f = I = b = null), A = !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, k = 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;
|
|
2113
2113
|
if (e.line === a) {
|
|
2114
|
-
for (
|
|
2115
|
-
|
|
2116
|
-
if (
|
|
2117
|
-
|
|
2118
|
-
else if (
|
|
2114
|
+
for (k = e.input.charCodeAt(e.position); Ke(k); )
|
|
2115
|
+
k = e.input.charCodeAt(++e.position);
|
|
2116
|
+
if (k === 58)
|
|
2117
|
+
k = e.input.charCodeAt(++e.position), ve(k) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ve(e, u, g, f, I, null, i, s, l), f = I = b = null), A = !0, p = !1, o = !1, f = e.tag, I = e.result;
|
|
2118
|
+
else if (A)
|
|
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 (A)
|
|
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 ? I = e.result :
|
|
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 ? I = e.result : b = e.result), p || (Ve(e, u, g, f, I, b, i, s, l), f = I = b = null), ie(e, !0, -1), k = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > n) && k !== 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 &&
|
|
2132
|
+
return p && Ve(e, u, g, f, I, null, i, s, l), A && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), A;
|
|
2133
2133
|
}
|
|
2134
2134
|
function Za(e) {
|
|
2135
2135
|
var n, t = !1, r = !1, o, a, i;
|
|
@@ -2141,23 +2141,23 @@ function Za(e) {
|
|
|
2141
2141
|
while (i !== 0 && i !== 62);
|
|
2142
2142
|
e.position < e.length ? (a = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) : M(e, "unexpected end of the stream within a verbatim tag");
|
|
2143
2143
|
} else {
|
|
2144
|
-
for (; i !== 0 && !
|
|
2145
|
-
i === 33 && (r ? M(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(n - 1, e.position + 1),
|
|
2144
|
+
for (; i !== 0 && !ve(i); )
|
|
2145
|
+
i === 33 && (r ? M(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(n - 1, e.position + 1), Hn.test(o) || M(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), i = e.input.charCodeAt(++e.position);
|
|
2146
2146
|
a = e.input.slice(n, e.position), La.test(a) && M(e, "tag suffix cannot contain flow indicator characters");
|
|
2147
2147
|
}
|
|
2148
|
-
a && !
|
|
2148
|
+
a && !zn.test(a) && M(e, "tag name cannot contain such characters: " + a);
|
|
2149
2149
|
try {
|
|
2150
2150
|
a = decodeURIComponent(a);
|
|
2151
2151
|
} catch {
|
|
2152
2152
|
M(e, "tag name is malformed: " + a);
|
|
2153
2153
|
}
|
|
2154
|
-
return t ? e.tag = a :
|
|
2154
|
+
return t ? e.tag = a : je.call(e.tagMap, o) ? e.tag = e.tagMap[o] + a : o === "!" ? e.tag = "!" + a : o === "!!" ? e.tag = "tag:yaml.org,2002:" + a : M(e, 'undeclared tag handle "' + o + '"'), !0;
|
|
2155
2155
|
}
|
|
2156
2156
|
function Qa(e) {
|
|
2157
2157
|
var n, t;
|
|
2158
2158
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2159
2159
|
return !1;
|
|
2160
|
-
for (e.anchor !== null && M(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !
|
|
2160
|
+
for (e.anchor !== null && M(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !ve(t) && !Pe(t); )
|
|
2161
2161
|
t = e.input.charCodeAt(++e.position);
|
|
2162
2162
|
return e.position === n && M(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2163
2163
|
}
|
|
@@ -2165,16 +2165,16 @@ function Xa(e) {
|
|
|
2165
2165
|
var n, t, r;
|
|
2166
2166
|
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
2167
2167
|
return !1;
|
|
2168
|
-
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !
|
|
2168
|
+
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !ve(r) && !Pe(r); )
|
|
2169
2169
|
r = e.input.charCodeAt(++e.position);
|
|
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),
|
|
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), je.call(e.anchorMap, t) || M(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], ie(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, I,
|
|
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 &&
|
|
2173
|
+
var a, i, s, l = 1, c = !1, d = !1, u, g, f, I, b, p;
|
|
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 && ie(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
|
-
|
|
2177
|
-
if (s && (s = c || o), (l === 1 || at === t) && (ot === t || Dn === t ?
|
|
2176
|
+
ie(e, !0, -1) ? (c = !0, s = a, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2177
|
+
if (s && (s = c || o), (l === 1 || at === t) && (ot === t || Dn === t ? b = n : b = n + 1, p = e.position - e.lineStart, l === 1 ? s && (Xt(e, p) || Wa(e, p, b)) || Ja(e, b) ? d = !0 : (i && Ya(e, b) || Ha(e, b) || za(e, b) ? d = !0 : Xa(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && M(e, "alias node should not have any properties")) : Ga(e, b, ot === t) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && Xt(e, p))), e.tag === null)
|
|
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)
|
|
@@ -2183,7 +2183,7 @@ function Re(e, n, t, r, o) {
|
|
|
2183
2183
|
break;
|
|
2184
2184
|
}
|
|
2185
2185
|
} else if (e.tag !== "!") {
|
|
2186
|
-
if (
|
|
2186
|
+
if (je.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2187
2187
|
I = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2188
2188
|
else
|
|
2189
2189
|
for (I = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, g = f.length; u < g; u += 1)
|
|
@@ -2197,11 +2197,11 @@ function Re(e, n, t, r, o) {
|
|
|
2197
2197
|
}
|
|
2198
2198
|
function ei(e) {
|
|
2199
2199
|
var n = e.position, t, r, o, a = !1, i;
|
|
2200
|
-
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (i = e.input.charCodeAt(e.position)) !== 0 && (
|
|
2201
|
-
for (a = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !
|
|
2200
|
+
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (i = e.input.charCodeAt(e.position)) !== 0 && (ie(e, !0, -1), i = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || i !== 37)); ) {
|
|
2201
|
+
for (a = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !ve(i); )
|
|
2202
2202
|
i = e.input.charCodeAt(++e.position);
|
|
2203
2203
|
for (r = e.input.slice(t, e.position), o = [], r.length < 1 && M(e, "directive name must not be less than one character in length"); i !== 0; ) {
|
|
2204
|
-
for (;
|
|
2204
|
+
for (; Ke(i); )
|
|
2205
2205
|
i = e.input.charCodeAt(++e.position);
|
|
2206
2206
|
if (i === 35) {
|
|
2207
2207
|
do
|
|
@@ -2211,14 +2211,14 @@ function ei(e) {
|
|
|
2211
2211
|
}
|
|
2212
2212
|
if (we(i))
|
|
2213
2213
|
break;
|
|
2214
|
-
for (t = e.position; i !== 0 && !
|
|
2214
|
+
for (t = e.position; i !== 0 && !ve(i); )
|
|
2215
2215
|
i = e.input.charCodeAt(++e.position);
|
|
2216
2216
|
o.push(e.input.slice(t, e.position));
|
|
2217
2217
|
}
|
|
2218
|
-
i !== 0 &&
|
|
2218
|
+
i !== 0 && Mt(e), je.call(Zt, r) ? Zt[r](e, r, o) : it(e, 'unknown document directive "' + r + '"');
|
|
2219
2219
|
}
|
|
2220
|
-
if (
|
|
2221
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
2220
|
+
if (ie(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, ie(e, !0, -1)) : a && M(e, "directives end mark is expected"), Re(e, e.lineIndent - 1, at, !1, !0), ie(e, !0, -1), e.checkLineBreaks && qa.test(e.input.slice(n, e.position)) && it(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && dt(e)) {
|
|
2221
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ie(e, !0, -1));
|
|
2222
2222
|
return;
|
|
2223
2223
|
}
|
|
2224
2224
|
if (e.position < e.length - 1)
|
|
@@ -2307,14 +2307,14 @@ function Ii(e) {
|
|
|
2307
2307
|
t = "U", r = 8;
|
|
2308
2308
|
else
|
|
2309
2309
|
throw new me("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2310
|
-
return "\\" + t +
|
|
2310
|
+
return "\\" + t + ue.repeat("0", r - n.length) + n;
|
|
2311
2311
|
}
|
|
2312
2312
|
var Ai = 1, We = 2;
|
|
2313
2313
|
function xi(e) {
|
|
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 =
|
|
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 = ue.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) {
|
|
2317
|
-
for (var t =
|
|
2317
|
+
for (var t = ue.repeat(" ", n), r = 0, o = -1, a = "", i, s = e.length; r < s; )
|
|
2318
2318
|
o = e.indexOf(`
|
|
2319
2319
|
`, r), o === -1 ? (i = e.slice(r), r = s) : (i = e.slice(r, o + 1), r = o + 1), i.length && i !== `
|
|
2320
2320
|
` && (a += t), a += i;
|
|
@@ -2322,7 +2322,7 @@ function en(e, n) {
|
|
|
2322
2322
|
}
|
|
2323
2323
|
function Ct(e, n) {
|
|
2324
2324
|
return `
|
|
2325
|
-
` +
|
|
2325
|
+
` + ue.repeat(" ", e.indent * n);
|
|
2326
2326
|
}
|
|
2327
2327
|
function Si(e, n) {
|
|
2328
2328
|
var t, r, o;
|
|
@@ -2356,7 +2356,7 @@ function Ti(e) {
|
|
|
2356
2356
|
function $i(e) {
|
|
2357
2357
|
return !lt(e) && e !== st;
|
|
2358
2358
|
}
|
|
2359
|
-
function
|
|
2359
|
+
function ze(e, n) {
|
|
2360
2360
|
var t = e.charCodeAt(n), r;
|
|
2361
2361
|
return t >= 55296 && t <= 56319 && n + 1 < e.length && (r = e.charCodeAt(n + 1), r >= 56320 && r <= 57343) ? (t - 55296) * 1024 + r - 56320 + 65536 : t;
|
|
2362
2362
|
}
|
|
@@ -2365,28 +2365,28 @@ function ir(e) {
|
|
|
2365
2365
|
return n.test(e);
|
|
2366
2366
|
}
|
|
2367
2367
|
var sr = 1, kt = 2, lr = 3, ur = 4, Le = 5;
|
|
2368
|
-
function
|
|
2369
|
-
var l, c = 0, d = null, u = !1, g = !1, f = r !== -1, I = -1,
|
|
2368
|
+
function Mi(e, n, t, r, o, a, i, s) {
|
|
2369
|
+
var l, c = 0, d = null, u = !1, g = !1, f = r !== -1, I = -1, b = Ti(ze(e, 0)) && $i(ze(e, e.length - 1));
|
|
2370
2370
|
if (n || i)
|
|
2371
2371
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2372
|
-
if (c =
|
|
2372
|
+
if (c = ze(e, l), !Ze(c))
|
|
2373
2373
|
return Le;
|
|
2374
|
-
|
|
2374
|
+
b = b && nn(c, d, s), d = c;
|
|
2375
2375
|
}
|
|
2376
2376
|
else {
|
|
2377
2377
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2378
|
-
if (c =
|
|
2378
|
+
if (c = ze(e, l), c === Ye)
|
|
2379
2379
|
u = !0, f && (g = g || // Foldable line = too long, and not more-indented.
|
|
2380
2380
|
l - I - 1 > r && e[I + 1] !== " ", I = l);
|
|
2381
2381
|
else if (!Ze(c))
|
|
2382
2382
|
return Le;
|
|
2383
|
-
|
|
2383
|
+
b = b && nn(c, d, s), d = c;
|
|
2384
2384
|
}
|
|
2385
2385
|
g = g || f && l - I - 1 > r && e[I + 1] !== " ";
|
|
2386
2386
|
}
|
|
2387
|
-
return !u && !g ?
|
|
2387
|
+
return !u && !g ? b && !i && !o(e) ? sr : a === We ? Le : kt : t > 9 && ir(e) ? Le : i ? a === We ? Le : kt : g ? ur : lr;
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2389
|
+
function ji(e, n, t, r, o) {
|
|
2390
2390
|
e.dump = function() {
|
|
2391
2391
|
if (n.length === 0)
|
|
2392
2392
|
return e.quotingType === We ? '""' : "''";
|
|
@@ -2396,7 +2396,7 @@ function Mi(e, n, t, r, o) {
|
|
|
2396
2396
|
function l(c) {
|
|
2397
2397
|
return Si(e, c);
|
|
2398
2398
|
}
|
|
2399
|
-
switch (
|
|
2399
|
+
switch (Mi(
|
|
2400
2400
|
n,
|
|
2401
2401
|
s,
|
|
2402
2402
|
e.indent,
|
|
@@ -2458,10 +2458,10 @@ function an(e, n) {
|
|
|
2458
2458
|
}
|
|
2459
2459
|
function Oi(e) {
|
|
2460
2460
|
for (var n = "", t = 0, r, o = 0; o < e.length; t >= 65536 ? o += 2 : o++)
|
|
2461
|
-
t =
|
|
2461
|
+
t = ze(e, o), r = fe[t], !r && Ze(t) ? (n += e[o], t >= 65536 && (n += e[o + 1])) : n += r || Ii(t);
|
|
2462
2462
|
return n;
|
|
2463
2463
|
}
|
|
2464
|
-
function
|
|
2464
|
+
function Ki(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
2467
|
s = t[a], e.replacer && (s = e.replacer.call(t, String(a), s)), (xe(e, n, s, !1, !1) || typeof s > "u" && xe(e, n, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
@@ -2473,13 +2473,13 @@ function sn(e, n, t, r) {
|
|
|
2473
2473
|
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (xe(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && xe(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 Fi(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
2479
|
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = a[i], c = t[l], e.replacer && (c = e.replacer.call(t, l, c)), xe(e, n, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), xe(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();
|
|
@@ -2517,11 +2517,11 @@ 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)) : (Fi(e, n, e.dump), g && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2521
2521
|
else if (s === "[object Array]")
|
|
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)) : (
|
|
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)) : (Ki(e, n, e.dump), g && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2523
2523
|
else if (s === "[object String]")
|
|
2524
|
-
e.tag !== "?" &&
|
|
2524
|
+
e.tag !== "?" && ji(e, e.dump, n, a, l);
|
|
2525
2525
|
else {
|
|
2526
2526
|
if (s === "[object Undefined]" || e.skipInvalid)
|
|
2527
2527
|
return !1;
|
|
@@ -2551,7 +2551,7 @@ function _t(e, n, t) {
|
|
|
2551
2551
|
for (r = Object.keys(e), o = 0, a = r.length; o < a; o += 1)
|
|
2552
2552
|
_t(e[r[o]], n, t);
|
|
2553
2553
|
}
|
|
2554
|
-
function
|
|
2554
|
+
function qi(e, n) {
|
|
2555
2555
|
n = n || {};
|
|
2556
2556
|
var t = new xi(n);
|
|
2557
2557
|
t.noRefs || Bi(e, t);
|
|
@@ -2559,7 +2559,7 @@ function Pi(e, n) {
|
|
|
2559
2559
|
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), xe(t, 0, r, !0, !0) ? t.dump + `
|
|
2560
2560
|
` : "";
|
|
2561
2561
|
}
|
|
2562
|
-
var Li =
|
|
2562
|
+
var Li = qi, Pi = {
|
|
2563
2563
|
dump: Li
|
|
2564
2564
|
};
|
|
2565
2565
|
function Ot(e, n) {
|
|
@@ -2567,28 +2567,28 @@ 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
|
|
2571
|
-
binary:
|
|
2570
|
+
var Vi = pe, Ui = An, Ri = $n, Di = Kn, Gi = Fn, Hi = $t, zi = Qn.load, Ji = Qn.loadAll, Yi = Pi.dump, Wi = me, Zi = {
|
|
2571
|
+
binary: Pn,
|
|
2572
2572
|
float: On,
|
|
2573
2573
|
map: Tn,
|
|
2574
|
-
null:
|
|
2575
|
-
pairs:
|
|
2574
|
+
null: Mn,
|
|
2575
|
+
pairs: Un,
|
|
2576
2576
|
set: Rn,
|
|
2577
|
-
timestamp:
|
|
2578
|
-
bool:
|
|
2577
|
+
timestamp: qn,
|
|
2578
|
+
bool: jn,
|
|
2579
2579
|
int: En,
|
|
2580
2580
|
merge: Ln,
|
|
2581
|
-
omap:
|
|
2581
|
+
omap: Vn,
|
|
2582
2582
|
seq: Sn,
|
|
2583
2583
|
str: xn
|
|
2584
2584
|
}, Qi = Ot("safeLoad", "load"), Xi = Ot("safeLoadAll", "loadAll"), es = Ot("safeDump", "dump"), ts = {
|
|
2585
|
-
Type:
|
|
2586
|
-
Schema:
|
|
2585
|
+
Type: Vi,
|
|
2586
|
+
Schema: Ui,
|
|
2587
2587
|
FAILSAFE_SCHEMA: Ri,
|
|
2588
2588
|
JSON_SCHEMA: Di,
|
|
2589
2589
|
CORE_SCHEMA: Gi,
|
|
2590
|
-
DEFAULT_SCHEMA:
|
|
2591
|
-
load:
|
|
2590
|
+
DEFAULT_SCHEMA: Hi,
|
|
2591
|
+
load: zi,
|
|
2592
2592
|
loadAll: Ji,
|
|
2593
2593
|
dump: Yi,
|
|
2594
2594
|
YAMLException: Wi,
|
|
@@ -2609,7 +2609,7 @@ const ns = {
|
|
|
2609
2609
|
}, is = {
|
|
2610
2610
|
key: 2,
|
|
2611
2611
|
class: "config-card-display-yaml"
|
|
2612
|
-
}, ss = /* @__PURE__ */
|
|
2612
|
+
}, ss = /* @__PURE__ */ oe({
|
|
2613
2613
|
__name: "ConfigCardDisplay",
|
|
2614
2614
|
props: {
|
|
2615
2615
|
propertyCollections: {
|
|
@@ -2635,28 +2635,28 @@ const ns = {
|
|
|
2635
2635
|
}
|
|
2636
2636
|
},
|
|
2637
2637
|
setup(e) {
|
|
2638
|
-
const n = e, t = ut(), { i18n: { t: r } } =
|
|
2638
|
+
const n = e, t = ut(), { i18n: { t: r } } = ce.useI18n(), o = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), a = E(""), i = E("");
|
|
2639
2639
|
return Se(() => 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
|
-
const c =
|
|
2643
|
-
return m(), $(
|
|
2642
|
+
const c = L("KCodeBlock");
|
|
2643
|
+
return m(), $(be, null, [
|
|
2644
2644
|
e.format === "structured" ? (m(), $("div", ns, [
|
|
2645
|
-
(m(!0), $(
|
|
2645
|
+
(m(!0), $(be, null, he(e.propListTypes, (d) => (m(), $("div", {
|
|
2646
2646
|
key: `config-card-details-${d}-props`,
|
|
2647
|
-
class:
|
|
2647
|
+
class: Fe(`config-card-details-${d}-props`),
|
|
2648
2648
|
"data-testid": `config-card-details-${d}-props`
|
|
2649
2649
|
}, [
|
|
2650
|
-
d !== "basic" ? (m(), $("div", os,
|
|
2651
|
-
(m(!0), $(
|
|
2650
|
+
d !== "basic" ? (m(), $("div", os, O(d === "advanced" ? y(r)("baseConfigCard.sections.advanced") : y(r)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
2651
|
+
(m(!0), $(be, null, he(e.propertyCollections[d], (u) => (m(), R(St, {
|
|
2652
2652
|
key: u.key,
|
|
2653
2653
|
item: u
|
|
2654
2654
|
}, Te({
|
|
2655
|
-
label:
|
|
2656
|
-
|
|
2655
|
+
label: v(() => [
|
|
2656
|
+
Z(s.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2657
2657
|
]),
|
|
2658
|
-
[u.key]:
|
|
2659
|
-
|
|
2658
|
+
[u.key]: v(({ rowValue: g }) => [
|
|
2659
|
+
Z(s.$slots, u.key, {
|
|
2660
2660
|
row: u,
|
|
2661
2661
|
rowValue: g
|
|
2662
2662
|
}, void 0, !0)
|
|
@@ -2665,30 +2665,30 @@ const ns = {
|
|
|
2665
2665
|
}, [
|
|
2666
2666
|
o(u) ? {
|
|
2667
2667
|
name: "label-tooltip",
|
|
2668
|
-
fn:
|
|
2669
|
-
|
|
2668
|
+
fn: v(() => [
|
|
2669
|
+
Z(s.$slots, `${u.key}-label-tooltip`, { row: u }, void 0, !0)
|
|
2670
2670
|
]),
|
|
2671
2671
|
key: "0"
|
|
2672
2672
|
} : void 0
|
|
2673
2673
|
]), 1032, ["item"]))), 128))
|
|
2674
2674
|
], 10, rs))), 128))
|
|
2675
|
-
])) :
|
|
2675
|
+
])) : H("", !0),
|
|
2676
2676
|
e.format === "json" ? (m(), $("div", as, [
|
|
2677
|
-
|
|
2677
|
+
F(c, {
|
|
2678
2678
|
id: "config-card-codeblock",
|
|
2679
2679
|
code: a.value,
|
|
2680
2680
|
language: "json",
|
|
2681
2681
|
theme: "dark"
|
|
2682
2682
|
}, null, 8, ["code"])
|
|
2683
|
-
])) :
|
|
2683
|
+
])) : H("", !0),
|
|
2684
2684
|
e.format === "yaml" ? (m(), $("div", is, [
|
|
2685
|
-
|
|
2685
|
+
F(c, {
|
|
2686
2686
|
id: "config-card-codeblock",
|
|
2687
2687
|
code: i.value,
|
|
2688
2688
|
language: "yaml",
|
|
2689
2689
|
theme: "dark"
|
|
2690
2690
|
}, null, 8, ["code"])
|
|
2691
|
-
])) :
|
|
2691
|
+
])) : H("", !0)
|
|
2692
2692
|
], 64);
|
|
2693
2693
|
};
|
|
2694
2694
|
}
|
|
@@ -2703,7 +2703,7 @@ const ns = {
|
|
|
2703
2703
|
}, fs = /* @__PURE__ */ cs(() => /* @__PURE__ */ V("path", {
|
|
2704
2704
|
d: "M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",
|
|
2705
2705
|
fill: "currentColor"
|
|
2706
|
-
}, null, -1)), ms = /* @__PURE__ */
|
|
2706
|
+
}, null, -1)), ms = /* @__PURE__ */ oe({
|
|
2707
2707
|
__name: "BookIcon",
|
|
2708
2708
|
props: {
|
|
2709
2709
|
/** The accessibility text provided to screen readers */
|
|
@@ -2772,13 +2772,13 @@ const ns = {
|
|
|
2772
2772
|
lineHeight: "0",
|
|
2773
2773
|
width: t.value
|
|
2774
2774
|
}));
|
|
2775
|
-
return (o, a) => (m(), R(
|
|
2775
|
+
return (o, a) => (m(), R(Ue(e.as), {
|
|
2776
2776
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2777
2777
|
class: "kui-icon book-icon",
|
|
2778
2778
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2779
2779
|
style: pn(r.value)
|
|
2780
2780
|
}, {
|
|
2781
|
-
default:
|
|
2781
|
+
default: v(() => [
|
|
2782
2782
|
(m(), $("svg", {
|
|
2783
2783
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2784
2784
|
"data-testid": "kui-icon-svg-book-icon",
|
|
@@ -2789,7 +2789,7 @@ const ns = {
|
|
|
2789
2789
|
width: "100%",
|
|
2790
2790
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2791
2791
|
}, [
|
|
2792
|
-
e.title ? (m(), $("title", ps,
|
|
2792
|
+
e.title ? (m(), $("title", ps, O(e.title), 1)) : H("", !0),
|
|
2793
2793
|
fs
|
|
2794
2794
|
], 8, ds))
|
|
2795
2795
|
]),
|
|
@@ -2805,7 +2805,7 @@ const ns = {
|
|
|
2805
2805
|
}, ks = ["data-testid"], _s = {
|
|
2806
2806
|
key: 0,
|
|
2807
2807
|
class: "config-card-prop-section-title"
|
|
2808
|
-
}, ws = /* @__PURE__ */
|
|
2808
|
+
}, ws = /* @__PURE__ */ oe({
|
|
2809
2809
|
__name: "EntityBaseConfigCard",
|
|
2810
2810
|
props: {
|
|
2811
2811
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2880,7 +2880,7 @@ const ns = {
|
|
|
2880
2880
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
2881
2881
|
setup(e, { emit: n }) {
|
|
2882
2882
|
var t;
|
|
2883
|
-
const r = e, o = ut(), { i18n: { t: a } } =
|
|
2883
|
+
const r = e, o = ut(), { i18n: { t: a } } = ce.useI18n(), { getMessageFromError: i } = ce.useErrors(), { convertKeyToTitle: s } = ce.useStringHelpers(), { axiosInstance: l } = ce.useAxios({
|
|
2884
2884
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
2885
2885
|
}), c = [
|
|
2886
2886
|
{
|
|
@@ -2896,107 +2896,107 @@ const ns = {
|
|
|
2896
2896
|
label: "YAML",
|
|
2897
2897
|
value: "yaml"
|
|
2898
2898
|
}
|
|
2899
|
-
], d =
|
|
2899
|
+
], d = E("structured"), u = (w) => {
|
|
2900
2900
|
d.value = w == null ? void 0 : w.value;
|
|
2901
2901
|
}, g = {
|
|
2902
2902
|
id: {
|
|
2903
|
-
type:
|
|
2903
|
+
type: ne.ID,
|
|
2904
2904
|
label: a("baseConfigCard.commonFields.id_label"),
|
|
2905
2905
|
order: 0,
|
|
2906
|
-
section:
|
|
2906
|
+
section: Ce.Basic
|
|
2907
2907
|
},
|
|
2908
2908
|
name: {
|
|
2909
2909
|
order: 1,
|
|
2910
|
-
section:
|
|
2910
|
+
section: Ce.Basic
|
|
2911
2911
|
},
|
|
2912
2912
|
enabled: {
|
|
2913
|
-
type:
|
|
2913
|
+
type: ne.BadgeStatus,
|
|
2914
2914
|
order: 2,
|
|
2915
|
-
section:
|
|
2915
|
+
section: Ce.Basic
|
|
2916
2916
|
},
|
|
2917
2917
|
updated_at: {
|
|
2918
|
-
type:
|
|
2918
|
+
type: ne.Date,
|
|
2919
2919
|
label: a("baseConfigCard.commonFields.updated_at_label"),
|
|
2920
2920
|
order: 3,
|
|
2921
|
-
section:
|
|
2921
|
+
section: Ce.Basic
|
|
2922
2922
|
},
|
|
2923
2923
|
created_at: {
|
|
2924
|
-
type:
|
|
2924
|
+
type: ne.Date,
|
|
2925
2925
|
label: a("baseConfigCard.commonFields.created_at_label"),
|
|
2926
2926
|
order: 4,
|
|
2927
|
-
section:
|
|
2927
|
+
section: Ce.Basic
|
|
2928
2928
|
},
|
|
2929
2929
|
tags: {
|
|
2930
|
-
type:
|
|
2930
|
+
type: ne.BadgeTag,
|
|
2931
2931
|
order: -1,
|
|
2932
2932
|
// the last property displayed
|
|
2933
|
-
section:
|
|
2933
|
+
section: Ce.Basic
|
|
2934
2934
|
}
|
|
2935
|
-
}, f =
|
|
2936
|
-
var w,
|
|
2935
|
+
}, f = E(!1), I = E(!1), b = E(""), p = E(), A = T(() => {
|
|
2936
|
+
var w, N, U;
|
|
2937
2937
|
if (!p.value)
|
|
2938
2938
|
return [];
|
|
2939
|
-
const
|
|
2940
|
-
for (const
|
|
2941
|
-
const
|
|
2942
|
-
let
|
|
2943
|
-
(J || J === 0) && (
|
|
2939
|
+
const C = [], x = Object.keys(p.value).length;
|
|
2940
|
+
for (const S in p.value) {
|
|
2941
|
+
const q = (N = (w = r.configSchema) == null ? void 0 : w[S]) == null ? void 0 : N.order, J = (U = g[S]) == null ? void 0 : U.order;
|
|
2942
|
+
let X = x;
|
|
2943
|
+
(J || J === 0) && (X = J === -1 ? x + 1 : J), q && (X = q === -1 ? x + 1 : q), C.push([S, X]);
|
|
2944
2944
|
}
|
|
2945
|
-
return
|
|
2946
|
-
return
|
|
2947
|
-
}),
|
|
2948
|
-
var
|
|
2949
|
-
const
|
|
2945
|
+
return C.sort(function(S, q) {
|
|
2946
|
+
return S[1] - q[1];
|
|
2947
|
+
}), C.map((S) => {
|
|
2948
|
+
var q, J;
|
|
2949
|
+
const X = S[0], ee = (q = p.value) == null ? void 0 : q[X], te = ((J = r.configSchema) == null ? void 0 : J[X]) || {}, le = g[X];
|
|
2950
2950
|
return {
|
|
2951
|
-
key:
|
|
2952
|
-
value:
|
|
2953
|
-
hidden:
|
|
2954
|
-
type:
|
|
2955
|
-
label:
|
|
2956
|
-
tooltip:
|
|
2957
|
-
section:
|
|
2951
|
+
key: X,
|
|
2952
|
+
value: ee,
|
|
2953
|
+
hidden: te.hidden || !1,
|
|
2954
|
+
type: te.type ?? ((le == null ? void 0 : le.type) || ne.Text),
|
|
2955
|
+
label: te.label ?? ((le == null ? void 0 : le.label) || s(X)),
|
|
2956
|
+
tooltip: te.tooltip ?? ((le == null ? void 0 : le.tooltip) || void 0),
|
|
2957
|
+
section: te.section ?? ((le == null ? void 0 : le.section) || Ce.Advanced)
|
|
2958
2958
|
};
|
|
2959
|
-
}).filter((
|
|
2960
|
-
}),
|
|
2961
|
-
var w,
|
|
2959
|
+
}).filter((S) => !S.hidden && S.key !== r.pluginConfigKey);
|
|
2960
|
+
}), k = T(() => {
|
|
2961
|
+
var w, N;
|
|
2962
2962
|
if (!p.value || !r.pluginConfigKey)
|
|
2963
2963
|
return [];
|
|
2964
|
-
const
|
|
2965
|
-
for (const
|
|
2966
|
-
const
|
|
2967
|
-
let
|
|
2968
|
-
|
|
2964
|
+
const U = p.value[r.pluginConfigKey] || {}, C = Object.keys(U).length, x = [];
|
|
2965
|
+
for (const S in U) {
|
|
2966
|
+
const q = (N = (w = r.pluginConfigSchema) == null ? void 0 : w[S]) == null ? void 0 : N.order, J = U[S];
|
|
2967
|
+
let X = J != null && J !== "" ? C - 1 : C;
|
|
2968
|
+
q && (X = q === -1 ? C + 1 : q), x.push([S, X]);
|
|
2969
2969
|
}
|
|
2970
|
-
return
|
|
2971
|
-
return
|
|
2972
|
-
}),
|
|
2973
|
-
var
|
|
2974
|
-
const J =
|
|
2970
|
+
return x.sort(function(S, q) {
|
|
2971
|
+
return S[1] - q[1];
|
|
2972
|
+
}), x.map((S) => {
|
|
2973
|
+
var q;
|
|
2974
|
+
const J = S[0], X = U[J], ee = ((q = r.pluginConfigSchema) == null ? void 0 : q[J]) || {};
|
|
2975
2975
|
return {
|
|
2976
2976
|
key: J,
|
|
2977
|
-
value:
|
|
2978
|
-
hidden:
|
|
2979
|
-
type:
|
|
2980
|
-
label:
|
|
2981
|
-
tooltip:
|
|
2982
|
-
section:
|
|
2977
|
+
value: X,
|
|
2978
|
+
hidden: ee.hidden || !1,
|
|
2979
|
+
type: ee.type ?? ne.Text,
|
|
2980
|
+
label: ee.label ?? s(J),
|
|
2981
|
+
tooltip: ee.tooltip ?? void 0,
|
|
2982
|
+
section: Ce.Plugin
|
|
2983
2983
|
};
|
|
2984
|
-
}).filter((
|
|
2985
|
-
}),
|
|
2986
|
-
var w,
|
|
2984
|
+
}).filter((S) => !S.hidden);
|
|
2985
|
+
}), K = T(() => {
|
|
2986
|
+
var w, N, U, C;
|
|
2987
2987
|
return {
|
|
2988
|
-
basic: (w =
|
|
2989
|
-
advanced: (
|
|
2990
|
-
plugin: (
|
|
2988
|
+
basic: (w = A.value) == null ? void 0 : w.filter((x) => x.section === Ce.Basic),
|
|
2989
|
+
advanced: (N = A.value) == null ? void 0 : N.filter((x) => x.section === Ce.Advanced),
|
|
2990
|
+
plugin: (C = k.value) == null ? void 0 : C.concat((U = A.value) == null ? void 0 : U.filter((x) => x.section === Ce.Plugin))
|
|
2991
2991
|
};
|
|
2992
|
-
}),
|
|
2992
|
+
}), h = T(() => {
|
|
2993
2993
|
const w = [];
|
|
2994
|
-
return
|
|
2995
|
-
}),
|
|
2996
|
-
var w,
|
|
2997
|
-
let
|
|
2998
|
-
return r.config.app === "konnect" ?
|
|
2999
|
-
}),
|
|
2994
|
+
return K.value.basic.length && w.push("basic"), K.value.advanced.length && w.push("advanced"), K.value.plugin.length && w.push("plugin"), w;
|
|
2995
|
+
}), D = (w) => !!(w.tooltip || o[`${w.key}-label-tooltip`]), se = T(() => {
|
|
2996
|
+
var w, N;
|
|
2997
|
+
let U = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2998
|
+
return r.config.app === "konnect" ? U = U.replace(/{controlPlaneId}/gi, ((w = r.config) == null ? void 0 : w.controlPlaneId) || "") : r.config.app === "kongManager" && (U = U.replace(/\/{workspace}/gi, (N = r.config) != null && N.workspace ? `/${r.config.workspace}` : "")), U = U.replace(/{id}/gi, r.config.entityId), U;
|
|
2999
|
+
}), Y = (w) => {
|
|
3000
3000
|
p.value && w(JSON.stringify(p.value)) ? n("copy:success", p.value) : n("copy:error");
|
|
3001
3001
|
};
|
|
3002
3002
|
return Se(f, (w) => {
|
|
@@ -3004,7 +3004,7 @@ const ns = {
|
|
|
3004
3004
|
}, { immediate: !0 }), Qe(async () => {
|
|
3005
3005
|
I.value = !1, f.value = !0;
|
|
3006
3006
|
try {
|
|
3007
|
-
const { data: w } = await l.get(
|
|
3007
|
+
const { data: w } = await l.get(se.value);
|
|
3008
3008
|
if (r.dataKey)
|
|
3009
3009
|
if (typeof w[r.dataKey] < "u")
|
|
3010
3010
|
p.value = { ...w[r.dataKey] };
|
|
@@ -3012,75 +3012,75 @@ 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
|
-
|
|
3019
|
+
const N = i(w);
|
|
3020
|
+
b.value = N.startsWith("code") ? a("baseConfigCard.errors.load") : N, I.value = !0, n("fetch:error", w);
|
|
3021
3021
|
} finally {
|
|
3022
3022
|
f.value = !1;
|
|
3023
3023
|
}
|
|
3024
|
-
}), (w,
|
|
3025
|
-
const
|
|
3026
|
-
return m(), R(
|
|
3027
|
-
actions:
|
|
3024
|
+
}), (w, N) => {
|
|
3025
|
+
const U = L("KLabel"), C = L("KSelect"), x = L("KButton"), S = L("KClipboardProvider"), q = L("KSkeleton"), J = L("KEmptyState"), X = L("KCard");
|
|
3026
|
+
return m(), R(X, { class: "kong-ui-entity-base-config-card" }, Te({
|
|
3027
|
+
actions: v(() => [
|
|
3028
3028
|
V("div", hs, [
|
|
3029
|
-
|
|
3030
|
-
e.config.jsonYamlEnabled ? (m(), R(
|
|
3029
|
+
Z(w.$slots, "actions", {}, void 0, !0),
|
|
3030
|
+
e.config.jsonYamlEnabled ? (m(), R(U, {
|
|
3031
3031
|
key: 0,
|
|
3032
3032
|
class: "config-format-select-label",
|
|
3033
3033
|
"data-testid": "config-format-select-label"
|
|
3034
3034
|
}, {
|
|
3035
|
-
default:
|
|
3036
|
-
|
|
3035
|
+
default: v(() => [
|
|
3036
|
+
Q(O(e.label), 1)
|
|
3037
3037
|
]),
|
|
3038
3038
|
_: 1
|
|
3039
|
-
})) :
|
|
3040
|
-
e.config.jsonYamlEnabled ? (m(), R(
|
|
3039
|
+
})) : H("", !0),
|
|
3040
|
+
e.config.jsonYamlEnabled ? (m(), R(C, {
|
|
3041
3041
|
key: 1,
|
|
3042
3042
|
appearance: "select",
|
|
3043
3043
|
"data-testid": "select-config-format",
|
|
3044
3044
|
items: c,
|
|
3045
3045
|
onChange: u
|
|
3046
|
-
})) :
|
|
3047
|
-
r.config.jsonYamlEnabled && e.configCardDoc ? (m(), R(
|
|
3046
|
+
})) : H("", !0),
|
|
3047
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (m(), R(x, {
|
|
3048
3048
|
key: 2,
|
|
3049
3049
|
appearance: "tertiary",
|
|
3050
3050
|
class: "book-icon",
|
|
3051
3051
|
"data-testid": "book-icon"
|
|
3052
3052
|
}, {
|
|
3053
|
-
default:
|
|
3053
|
+
default: v(() => [
|
|
3054
3054
|
V("a", {
|
|
3055
3055
|
href: e.configCardDoc,
|
|
3056
3056
|
rel: "noopener",
|
|
3057
3057
|
target: "_blank"
|
|
3058
3058
|
}, [
|
|
3059
|
-
|
|
3059
|
+
F(y(gs), { size: y(wo) }, null, 8, ["size"])
|
|
3060
3060
|
], 8, vs)
|
|
3061
3061
|
]),
|
|
3062
3062
|
_: 1
|
|
3063
|
-
})) :
|
|
3064
|
-
e.config.jsonYamlEnabled ?
|
|
3065
|
-
default:
|
|
3066
|
-
!f.value && !I.value ? (m(), R(
|
|
3063
|
+
})) : H("", !0),
|
|
3064
|
+
e.config.jsonYamlEnabled ? H("", !0) : (m(), R(S, { key: 3 }, {
|
|
3065
|
+
default: v(({ copyToClipboard: ee }) => [
|
|
3066
|
+
!f.value && !I.value ? (m(), R(x, {
|
|
3067
3067
|
key: 0,
|
|
3068
3068
|
appearance: "tertiary",
|
|
3069
3069
|
"data-testid": "json-copy-button",
|
|
3070
|
-
onClick: (
|
|
3070
|
+
onClick: (te) => Y(ee)
|
|
3071
3071
|
}, {
|
|
3072
|
-
default:
|
|
3073
|
-
|
|
3072
|
+
default: v(() => [
|
|
3073
|
+
Q(O(y(a)("baseConfigCard.actions.copy")), 1)
|
|
3074
3074
|
]),
|
|
3075
3075
|
_: 2
|
|
3076
|
-
}, 1032, ["onClick"])) :
|
|
3076
|
+
}, 1032, ["onClick"])) : H("", !0)
|
|
3077
3077
|
]),
|
|
3078
3078
|
_: 1
|
|
3079
3079
|
}))
|
|
3080
3080
|
])
|
|
3081
3081
|
]),
|
|
3082
|
-
body:
|
|
3083
|
-
f.value ? (m(), R(
|
|
3082
|
+
body: v(() => [
|
|
3083
|
+
f.value ? (m(), R(q, {
|
|
3084
3084
|
key: 0,
|
|
3085
3085
|
"data-testid": "config-card-loader",
|
|
3086
3086
|
"table-columns": 2,
|
|
@@ -3090,54 +3090,54 @@ const ns = {
|
|
|
3090
3090
|
"data-testid": "config-card-fetch-error",
|
|
3091
3091
|
"is-error": ""
|
|
3092
3092
|
}, {
|
|
3093
|
-
message:
|
|
3094
|
-
V("h3", null,
|
|
3093
|
+
message: v(() => [
|
|
3094
|
+
V("h3", null, O(b.value), 1)
|
|
3095
3095
|
]),
|
|
3096
3096
|
_: 1
|
|
3097
|
-
})) :
|
|
3097
|
+
})) : H("", !0),
|
|
3098
3098
|
e.config.jsonYamlEnabled ? (m(), $("div", bs, [
|
|
3099
|
-
|
|
3099
|
+
F(ls, {
|
|
3100
3100
|
format: d.value,
|
|
3101
|
-
"prop-list-types":
|
|
3102
|
-
"property-collections":
|
|
3101
|
+
"prop-list-types": h.value,
|
|
3102
|
+
"property-collections": K.value,
|
|
3103
3103
|
record: p.value
|
|
3104
3104
|
}, Te({ _: 2 }, [
|
|
3105
|
-
|
|
3106
|
-
name:
|
|
3107
|
-
fn:
|
|
3108
|
-
|
|
3109
|
-
row:
|
|
3110
|
-
rowValue:
|
|
3105
|
+
he(Object.keys(w.$slots), (ee) => ({
|
|
3106
|
+
name: ee,
|
|
3107
|
+
fn: v(({ row: te, rowValue: le }) => [
|
|
3108
|
+
Z(w.$slots, ee, {
|
|
3109
|
+
row: te,
|
|
3110
|
+
rowValue: le
|
|
3111
3111
|
}, void 0, !0)
|
|
3112
3112
|
])
|
|
3113
3113
|
}))
|
|
3114
3114
|
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
3115
3115
|
])) : (m(), $("div", Cs, [
|
|
3116
|
-
(m(!0), $(
|
|
3117
|
-
key: `config-card-details-${
|
|
3118
|
-
class:
|
|
3119
|
-
"data-testid": `config-card-details-${
|
|
3116
|
+
(m(!0), $(be, null, he(h.value, (ee) => (m(), $("div", {
|
|
3117
|
+
key: `config-card-details-${ee}-props`,
|
|
3118
|
+
class: Fe(`config-card-details-${ee}-props`),
|
|
3119
|
+
"data-testid": `config-card-details-${ee}-props`
|
|
3120
3120
|
}, [
|
|
3121
|
-
|
|
3122
|
-
(m(!0), $(
|
|
3123
|
-
key:
|
|
3124
|
-
item:
|
|
3121
|
+
ee !== "basic" ? (m(), $("div", _s, O(ee === "advanced" ? y(a)("baseConfigCard.sections.advanced") : y(a)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
3122
|
+
(m(!0), $(be, null, he(K.value[ee], (te) => (m(), R(St, {
|
|
3123
|
+
key: te.key,
|
|
3124
|
+
item: te
|
|
3125
3125
|
}, Te({
|
|
3126
|
-
label:
|
|
3127
|
-
|
|
3126
|
+
label: v(() => [
|
|
3127
|
+
Z(w.$slots, `${te.key}-label`, { row: te }, void 0, !0)
|
|
3128
3128
|
]),
|
|
3129
|
-
[
|
|
3130
|
-
|
|
3131
|
-
row:
|
|
3132
|
-
rowValue:
|
|
3129
|
+
[te.key]: v(({ rowValue: le }) => [
|
|
3130
|
+
Z(w.$slots, te.key, {
|
|
3131
|
+
row: te,
|
|
3132
|
+
rowValue: le
|
|
3133
3133
|
}, void 0, !0)
|
|
3134
3134
|
]),
|
|
3135
3135
|
_: 2
|
|
3136
3136
|
}, [
|
|
3137
|
-
|
|
3137
|
+
D(te) ? {
|
|
3138
3138
|
name: "label-tooltip",
|
|
3139
|
-
fn:
|
|
3140
|
-
|
|
3139
|
+
fn: v(() => [
|
|
3140
|
+
Z(w.$slots, `${te.key}-label-tooltip`, { row: te }, void 0, !0)
|
|
3141
3141
|
]),
|
|
3142
3142
|
key: "0"
|
|
3143
3143
|
} : void 0
|
|
@@ -3149,10 +3149,10 @@ const ns = {
|
|
|
3149
3149
|
}, [
|
|
3150
3150
|
e.hideTitle ? void 0 : {
|
|
3151
3151
|
name: "title",
|
|
3152
|
-
fn:
|
|
3152
|
+
fn: v(() => [
|
|
3153
3153
|
V("div", ys, [
|
|
3154
|
-
|
|
3155
|
-
|
|
3154
|
+
Z(w.$slots, "title", {}, () => [
|
|
3155
|
+
Q(O(y(a)("baseConfigCard.title")), 1)
|
|
3156
3156
|
], !0)
|
|
3157
3157
|
])
|
|
3158
3158
|
]),
|
|
@@ -3164,7 +3164,7 @@ const ns = {
|
|
|
3164
3164
|
}), Is = /* @__PURE__ */ ke(ws, [["__scopeId", "data-v-24515123"]]), As = ["onReset", "onSubmit"], xs = {
|
|
3165
3165
|
class: "form-actions",
|
|
3166
3166
|
"data-testid": "form-actions"
|
|
3167
|
-
}, Ss = /* @__PURE__ */
|
|
3167
|
+
}, Ss = /* @__PURE__ */ oe({
|
|
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. */
|
|
@@ -3214,19 +3214,19 @@ const ns = {
|
|
|
3214
3214
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3215
3215
|
setup(e, { emit: n }) {
|
|
3216
3216
|
var t;
|
|
3217
|
-
const r = e, o = wt(), { i18n: { t: a } } =
|
|
3217
|
+
const r = e, o = wt(), { i18n: { t: a } } = ce.useI18n(), { getMessageFromError: i } = ce.useErrors(), { axiosInstance: s } = ce.useAxios({
|
|
3218
3218
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3219
|
-
}), l =
|
|
3220
|
-
var p,
|
|
3219
|
+
}), l = E(!1), c = E(!1), d = E(""), u = T(() => r.canSubmit === !1 || r.isReadonly), g = T(() => {
|
|
3220
|
+
var p, A;
|
|
3221
3221
|
if (!r.editId)
|
|
3222
3222
|
return "";
|
|
3223
|
-
let
|
|
3224
|
-
return r.config.app === "konnect" ?
|
|
3223
|
+
let k = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3224
|
+
return r.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (A = r.config) != null && A.workspace ? `/${r.config.workspace}` : "")), k = k.replace(/{id}/gi, r.editId), k;
|
|
3225
3225
|
}), f = () => {
|
|
3226
3226
|
r.config.cancelRoute ? o.push(r.config.cancelRoute) : I();
|
|
3227
3227
|
}, I = () => {
|
|
3228
3228
|
n("cancel");
|
|
3229
|
-
},
|
|
3229
|
+
}, b = () => {
|
|
3230
3230
|
u.value || n("submit");
|
|
3231
3231
|
};
|
|
3232
3232
|
return Se(() => l.value, (p) => {
|
|
@@ -3238,63 +3238,63 @@ 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 A = i(p);
|
|
3242
|
+
d.value = A.startsWith("code") ? a("baseForm.errors.edit") : A, c.value = !0, n("fetch:error", p);
|
|
3243
3243
|
} finally {
|
|
3244
3244
|
l.value = !1;
|
|
3245
3245
|
}
|
|
3246
|
-
}), (p,
|
|
3247
|
-
const
|
|
3248
|
-
return m(), R(
|
|
3249
|
-
body:
|
|
3250
|
-
l.value ? (m(), R(
|
|
3246
|
+
}), (p, A) => {
|
|
3247
|
+
const k = L("KSkeleton"), K = L("KEmptyState"), h = L("KAlert"), D = L("KButton"), se = L("KCard");
|
|
3248
|
+
return m(), R(se, { class: "kong-ui-entity-base-form" }, {
|
|
3249
|
+
body: v(() => [
|
|
3250
|
+
l.value ? (m(), R(k, {
|
|
3251
3251
|
key: 0,
|
|
3252
3252
|
type: "form"
|
|
3253
|
-
})) : c.value ? (m(), R(
|
|
3253
|
+
})) : c.value ? (m(), R(K, {
|
|
3254
3254
|
key: 1,
|
|
3255
3255
|
"cta-text": y(a)("baseForm.actions.back"),
|
|
3256
3256
|
"data-testid": "form-fetch-error",
|
|
3257
3257
|
"handle-click": f,
|
|
3258
3258
|
"is-error": !0
|
|
3259
3259
|
}, {
|
|
3260
|
-
message:
|
|
3261
|
-
V("h3", null,
|
|
3260
|
+
message: v(() => [
|
|
3261
|
+
V("h3", null, O(d.value), 1)
|
|
3262
3262
|
]),
|
|
3263
3263
|
_: 1
|
|
3264
3264
|
}, 8, ["cta-text"])) : (m(), $("form", {
|
|
3265
3265
|
key: 2,
|
|
3266
3266
|
"data-testid": "form-content",
|
|
3267
3267
|
onReset: rt(I, ["prevent"]),
|
|
3268
|
-
onSubmit: rt(
|
|
3268
|
+
onSubmit: rt(b, ["prevent"])
|
|
3269
3269
|
}, [
|
|
3270
|
-
|
|
3271
|
-
e.errorMessage ? (m(), R(
|
|
3270
|
+
Z(p.$slots, "default", {}, void 0, !0),
|
|
3271
|
+
e.errorMessage ? (m(), R(h, {
|
|
3272
3272
|
key: 0,
|
|
3273
3273
|
"alert-message": e.errorMessage,
|
|
3274
3274
|
appearance: "danger",
|
|
3275
3275
|
"data-testid": "form-error"
|
|
3276
|
-
}, null, 8, ["alert-message"])) :
|
|
3276
|
+
}, null, 8, ["alert-message"])) : H("", !0),
|
|
3277
3277
|
V("div", xs, [
|
|
3278
|
-
|
|
3279
|
-
|
|
3278
|
+
Z(p.$slots, "form-actions", {}, () => [
|
|
3279
|
+
F(D, {
|
|
3280
3280
|
appearance: "secondary",
|
|
3281
3281
|
"data-testid": "form-cancel",
|
|
3282
3282
|
disabled: e.isReadonly,
|
|
3283
3283
|
type: "reset"
|
|
3284
3284
|
}, {
|
|
3285
|
-
default:
|
|
3286
|
-
|
|
3285
|
+
default: v(() => [
|
|
3286
|
+
Q(O(y(a)("baseForm.actions.cancel")), 1)
|
|
3287
3287
|
]),
|
|
3288
3288
|
_: 1
|
|
3289
3289
|
}, 8, ["disabled"]),
|
|
3290
|
-
|
|
3290
|
+
F(D, {
|
|
3291
3291
|
appearance: "primary",
|
|
3292
3292
|
"data-testid": "form-submit",
|
|
3293
3293
|
disabled: u.value,
|
|
3294
3294
|
type: "submit"
|
|
3295
3295
|
}, {
|
|
3296
|
-
default:
|
|
3297
|
-
|
|
3296
|
+
default: v(() => [
|
|
3297
|
+
Q(O(y(a)("baseForm.actions.save")), 1)
|
|
3298
3298
|
]),
|
|
3299
3299
|
_: 1
|
|
3300
3300
|
}, 8, ["disabled"])
|
|
@@ -3309,7 +3309,7 @@ const ns = {
|
|
|
3309
3309
|
}), Ts = /* @__PURE__ */ ke(Ss, [["__scopeId", "data-v-81612aef"]]), $s = {
|
|
3310
3310
|
key: 0,
|
|
3311
3311
|
"data-testid": "first-col"
|
|
3312
|
-
},
|
|
3312
|
+
}, Ms = /* @__PURE__ */ oe({
|
|
3313
3313
|
__name: "EntityBaseTableCell",
|
|
3314
3314
|
props: {
|
|
3315
3315
|
keyName: {
|
|
@@ -3323,32 +3323,32 @@ const ns = {
|
|
|
3323
3323
|
},
|
|
3324
3324
|
setup(e) {
|
|
3325
3325
|
const n = e, t = T(() => {
|
|
3326
|
-
var
|
|
3327
|
-
return ((
|
|
3326
|
+
var b;
|
|
3327
|
+
return ((b = n.rowEl) == null ? void 0 : b.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3328
3328
|
}), r = T(() => {
|
|
3329
|
-
var
|
|
3330
|
-
return ((
|
|
3329
|
+
var b;
|
|
3330
|
+
return ((b = t.value) == null ? void 0 : b.querySelector('[data-testid="first-col"]')) || null;
|
|
3331
3331
|
}), o = T(() => {
|
|
3332
|
-
var
|
|
3333
|
-
const
|
|
3334
|
-
return
|
|
3332
|
+
var b, p;
|
|
3333
|
+
const A = (b = n.rowEl) == null ? void 0 : b.querySelectorAll("td");
|
|
3334
|
+
return A ? ((p = A[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
|
|
3341
|
-
c.value = ((
|
|
3342
|
-
}, l =
|
|
3340
|
+
var b, p, A;
|
|
3341
|
+
c.value = ((b = r.value) == null ? void 0 : b.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((A = l.value) == null ? void 0 : A.innerText) || "";
|
|
3342
|
+
}, l = E({}), c = E(0), d = E(0), u = E(""), g = T(() => [r.value, t.value]), f = Se(
|
|
3343
3343
|
g,
|
|
3344
|
-
(
|
|
3344
|
+
(b) => {
|
|
3345
3345
|
if (o.value && (i(), "ResizeObserver" in window && window)) {
|
|
3346
3346
|
a = new ResizeObserver((p) => {
|
|
3347
3347
|
window.requestAnimationFrame(() => {
|
|
3348
3348
|
!Array.isArray(p) || !p.length || s();
|
|
3349
3349
|
});
|
|
3350
3350
|
});
|
|
3351
|
-
for (const p of
|
|
3351
|
+
for (const p of b)
|
|
3352
3352
|
p && a.observe(p);
|
|
3353
3353
|
}
|
|
3354
3354
|
},
|
|
@@ -3358,32 +3358,32 @@ const ns = {
|
|
|
3358
3358
|
s();
|
|
3359
3359
|
}), vr(() => {
|
|
3360
3360
|
f();
|
|
3361
|
-
}), (
|
|
3362
|
-
const
|
|
3361
|
+
}), (b, p) => {
|
|
3362
|
+
const A = L("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
|
-
|
|
3369
|
+
F(A, {
|
|
3370
3370
|
label: I.value ? u.value : "",
|
|
3371
3371
|
"max-width": "300",
|
|
3372
3372
|
placement: "bottomStart"
|
|
3373
3373
|
}, {
|
|
3374
|
-
default:
|
|
3375
|
-
|
|
3374
|
+
default: v(() => [
|
|
3375
|
+
Z(b.$slots, "default", {}, void 0, !0)
|
|
3376
3376
|
]),
|
|
3377
3377
|
_: 3
|
|
3378
3378
|
}, 8, ["label"])
|
|
3379
|
-
])) :
|
|
3379
|
+
])) : Z(b.$slots, "default", { key: 1 }, void 0, !0)
|
|
3380
3380
|
], 512);
|
|
3381
3381
|
};
|
|
3382
3382
|
}
|
|
3383
|
-
}),
|
|
3383
|
+
}), js = /* @__PURE__ */ ke(Ms, [["__scopeId", "data-v-e42a20c9"]]), Es = { class: "toolbar-container" }, Os = {
|
|
3384
3384
|
key: 0,
|
|
3385
3385
|
class: "toolbar-button-container"
|
|
3386
|
-
},
|
|
3386
|
+
}, Ks = ["data-testid"], Fs = /* @__PURE__ */ oe({
|
|
3387
3387
|
__name: "EntityBaseTable",
|
|
3388
3388
|
props: {
|
|
3389
3389
|
// table header configuration
|
|
@@ -3442,9 +3442,10 @@ const ns = {
|
|
|
3442
3442
|
},
|
|
3443
3443
|
// error message to show in the error state
|
|
3444
3444
|
// this prop being set (or empty) determines if the KTable is in an error state
|
|
3445
|
+
// please use `TableErrorMessage` since `string` is only for backwards compatibility
|
|
3445
3446
|
errorMessage: {
|
|
3446
|
-
type: String,
|
|
3447
|
-
default:
|
|
3447
|
+
type: [String, Object],
|
|
3448
|
+
default: null
|
|
3448
3449
|
},
|
|
3449
3450
|
disablePaginationPageJump: {
|
|
3450
3451
|
type: Boolean,
|
|
@@ -3492,65 +3493,76 @@ const ns = {
|
|
|
3492
3493
|
},
|
|
3493
3494
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3494
3495
|
setup(e, { emit: n }) {
|
|
3495
|
-
const t = e, { i18n: { t: r } } =
|
|
3496
|
-
|
|
3497
|
-
return
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3496
|
+
const t = e, { i18n: { t: r } } = ce.useI18n(), o = T(() => {
|
|
3497
|
+
var h, D;
|
|
3498
|
+
return typeof t.errorMessage == "string" ? {
|
|
3499
|
+
hasError: !!t.errorMessage,
|
|
3500
|
+
title: t.errorMessage,
|
|
3501
|
+
message: void 0
|
|
3502
|
+
} : {
|
|
3503
|
+
hasError: !!t.errorMessage,
|
|
3504
|
+
title: (h = t.errorMessage) == null ? void 0 : h.title,
|
|
3505
|
+
message: (D = t.errorMessage) == null ? void 0 : D.message
|
|
3506
|
+
};
|
|
3507
|
+
}), a = T(() => t.cacheIdentifier || t.preferencesStorageKey), i = (h) => h.hasData || !!t.query, s = T(() => {
|
|
3508
|
+
const h = [];
|
|
3509
|
+
return Object.keys(t.tableHeaders).forEach((D) => {
|
|
3510
|
+
const se = t.tableHeaders[D];
|
|
3511
|
+
h.push({
|
|
3512
|
+
label: se.label ?? D,
|
|
3513
|
+
key: D,
|
|
3514
|
+
sortable: se.sortable ?? !1
|
|
3503
3515
|
});
|
|
3504
|
-
}), t.enableEntityActions &&
|
|
3516
|
+
}), t.enableEntityActions && h.push({
|
|
3505
3517
|
key: "actions",
|
|
3506
3518
|
hideLabel: !0
|
|
3507
|
-
}),
|
|
3508
|
-
}),
|
|
3509
|
-
"data-rowid":
|
|
3510
|
-
"data-testid":
|
|
3511
|
-
...t.rowAttributes(
|
|
3512
|
-
}),
|
|
3513
|
-
var
|
|
3514
|
-
return (
|
|
3515
|
-
},
|
|
3516
|
-
const
|
|
3517
|
-
"data-testid":
|
|
3518
|
-
...t.cellAttributes(
|
|
3519
|
+
}), h;
|
|
3520
|
+
}), l = (h) => ({
|
|
3521
|
+
"data-rowid": h.id,
|
|
3522
|
+
"data-testid": h.name,
|
|
3523
|
+
...t.rowAttributes(h)
|
|
3524
|
+
}), c = E({}), d = (h) => {
|
|
3525
|
+
var D;
|
|
3526
|
+
return (D = c.value) == null ? void 0 : D.$el.querySelector(`[data-rowid="${h.id}"]`);
|
|
3527
|
+
}, u = (h) => {
|
|
3528
|
+
const D = {
|
|
3529
|
+
"data-testid": h.headerKey,
|
|
3530
|
+
...t.cellAttributes(h)
|
|
3519
3531
|
};
|
|
3520
|
-
return
|
|
3532
|
+
return h.colIndex === 0 && (D.style = {
|
|
3521
3533
|
maxWidth: "250px",
|
|
3522
3534
|
overflowX: "hidden",
|
|
3523
3535
|
textOverflow: "ellipsis"
|
|
3524
|
-
}),
|
|
3525
|
-
}, u = () => {
|
|
3526
|
-
n("empty-state-cta-clicked"), g();
|
|
3536
|
+
}), D;
|
|
3527
3537
|
}, g = () => {
|
|
3538
|
+
n("empty-state-cta-clicked"), f();
|
|
3539
|
+
}, f = () => {
|
|
3528
3540
|
n("clear-search-input");
|
|
3529
|
-
},
|
|
3530
|
-
n("click:row",
|
|
3531
|
-
}),
|
|
3532
|
-
n("sort",
|
|
3533
|
-
}, { setTablePreferences:
|
|
3534
|
-
const
|
|
3541
|
+
}, I = T(() => t.disableRowClick ? void 0 : (h, D) => {
|
|
3542
|
+
n("click:row", D);
|
|
3543
|
+
}), b = (h) => {
|
|
3544
|
+
n("sort", h);
|
|
3545
|
+
}, { setTablePreferences: p, getTablePreferences: A } = Sr(), k = T(() => {
|
|
3546
|
+
const h = A(t.preferencesStorageKey);
|
|
3535
3547
|
return {
|
|
3536
3548
|
...t.initialFetcherParams,
|
|
3537
|
-
...
|
|
3549
|
+
...h
|
|
3538
3550
|
};
|
|
3539
|
-
}),
|
|
3540
|
-
t.preferencesStorageKey &&
|
|
3551
|
+
}), K = (h) => {
|
|
3552
|
+
t.preferencesStorageKey && p(t.preferencesStorageKey, h);
|
|
3541
3553
|
};
|
|
3542
|
-
return (
|
|
3543
|
-
const
|
|
3544
|
-
return m(), R(
|
|
3554
|
+
return (h, D) => {
|
|
3555
|
+
const se = L("KIcon"), Y = L("KButton"), w = L("KDropdown"), N = L("KTable"), U = L("KCard");
|
|
3556
|
+
return m(), R(U, {
|
|
3545
3557
|
class: "kong-ui-entity-base-table",
|
|
3546
3558
|
title: e.title
|
|
3547
3559
|
}, {
|
|
3548
|
-
body:
|
|
3549
|
-
N
|
|
3560
|
+
body: v(() => [
|
|
3561
|
+
F(N, {
|
|
3550
3562
|
ref_key: "tableRefs",
|
|
3551
|
-
ref:
|
|
3552
|
-
"cache-identifier":
|
|
3553
|
-
"cell-attrs":
|
|
3563
|
+
ref: c,
|
|
3564
|
+
"cache-identifier": a.value,
|
|
3565
|
+
"cell-attrs": u,
|
|
3554
3566
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3555
3567
|
"disable-sorting": e.disableSorting,
|
|
3556
3568
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
@@ -3561,56 +3573,57 @@ const ns = {
|
|
|
3561
3573
|
"empty-state-message": e.query ? y(r)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3562
3574
|
"empty-state-title": e.query ? y(r)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3563
3575
|
"enable-client-sort": e.enableClientSort,
|
|
3564
|
-
"error-state-
|
|
3576
|
+
"error-state-message": o.value.message,
|
|
3577
|
+
"error-state-title": o.value.title,
|
|
3565
3578
|
fetcher: e.fetcher,
|
|
3566
3579
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3567
|
-
"has-error":
|
|
3568
|
-
headers:
|
|
3580
|
+
"has-error": o.value.hasError,
|
|
3581
|
+
headers: s.value,
|
|
3569
3582
|
"hide-pagination-when-optional": "",
|
|
3570
|
-
"initial-fetcher-params":
|
|
3583
|
+
"initial-fetcher-params": k.value,
|
|
3571
3584
|
"is-loading": e.isLoading,
|
|
3572
3585
|
"pagination-type": e.paginationType,
|
|
3573
|
-
"row-attrs":
|
|
3586
|
+
"row-attrs": l,
|
|
3574
3587
|
"search-input": e.query,
|
|
3575
|
-
onKtableEmptyStateCtaClicked:
|
|
3576
|
-
"onRow:click":
|
|
3577
|
-
onSort:
|
|
3578
|
-
"onUpdate:tablePreferences":
|
|
3588
|
+
onKtableEmptyStateCtaClicked: g,
|
|
3589
|
+
"onRow:click": I.value,
|
|
3590
|
+
onSort: D[0] || (D[0] = (C) => b(C)),
|
|
3591
|
+
"onUpdate:tablePreferences": K
|
|
3579
3592
|
}, Te({
|
|
3580
|
-
toolbar:
|
|
3593
|
+
toolbar: v(({ state: C }) => [
|
|
3581
3594
|
et(V("div", Es, [
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
])) :
|
|
3595
|
+
Z(h.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3596
|
+
h.$slots["toolbar-button"] ? (m(), $("div", Os, [
|
|
3597
|
+
Z(h.$slots, "toolbar-button", {}, void 0, !0)
|
|
3598
|
+
])) : H("", !0)
|
|
3586
3599
|
], 512), [
|
|
3587
|
-
[tt,
|
|
3600
|
+
[tt, i(C)]
|
|
3588
3601
|
])
|
|
3589
3602
|
]),
|
|
3590
|
-
actions:
|
|
3603
|
+
actions: v(({ row: C, rowKey: x, rowValue: S }) => [
|
|
3591
3604
|
V("div", {
|
|
3592
3605
|
class: "actions-container",
|
|
3593
|
-
"data-testid":
|
|
3606
|
+
"data-testid": C.name
|
|
3594
3607
|
}, [
|
|
3595
|
-
|
|
3608
|
+
F(w, {
|
|
3596
3609
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3597
3610
|
width: e.dropdownMenuWidth
|
|
3598
3611
|
}, {
|
|
3599
|
-
items:
|
|
3600
|
-
|
|
3601
|
-
row:
|
|
3602
|
-
rowKey:
|
|
3612
|
+
items: v(() => [
|
|
3613
|
+
Z(h.$slots, "actions", {
|
|
3614
|
+
row: C,
|
|
3615
|
+
rowKey: x,
|
|
3603
3616
|
rowValue: S
|
|
3604
3617
|
}, void 0, !0)
|
|
3605
3618
|
]),
|
|
3606
|
-
default:
|
|
3607
|
-
|
|
3619
|
+
default: v(() => [
|
|
3620
|
+
F(Y, {
|
|
3608
3621
|
class: "actions-trigger",
|
|
3609
3622
|
"data-testid": "overflow-actions-button",
|
|
3610
3623
|
size: "small"
|
|
3611
3624
|
}, {
|
|
3612
|
-
icon:
|
|
3613
|
-
|
|
3625
|
+
icon: v(() => [
|
|
3626
|
+
F(se, {
|
|
3614
3627
|
color: y(ko),
|
|
3615
3628
|
icon: "more",
|
|
3616
3629
|
size: "16"
|
|
@@ -3621,43 +3634,43 @@ const ns = {
|
|
|
3621
3634
|
]),
|
|
3622
3635
|
_: 2
|
|
3623
3636
|
}, 1032, ["width"])
|
|
3624
|
-
], 8,
|
|
3637
|
+
], 8, Ks)
|
|
3625
3638
|
]),
|
|
3626
3639
|
_: 2
|
|
3627
3640
|
}, [
|
|
3628
|
-
|
|
3629
|
-
name:
|
|
3630
|
-
fn:
|
|
3631
|
-
|
|
3632
|
-
"key-name": String(
|
|
3633
|
-
"row-el":
|
|
3641
|
+
he(e.tableHeaders, (C, x) => ({
|
|
3642
|
+
name: x,
|
|
3643
|
+
fn: v(({ row: S, rowKey: q, rowValue: J }) => [
|
|
3644
|
+
F(js, {
|
|
3645
|
+
"key-name": String(x),
|
|
3646
|
+
"row-el": d(S)
|
|
3634
3647
|
}, {
|
|
3635
|
-
default:
|
|
3636
|
-
|
|
3648
|
+
default: v(() => [
|
|
3649
|
+
Z(h.$slots, x, {
|
|
3637
3650
|
row: S,
|
|
3638
|
-
rowKey:
|
|
3639
|
-
rowValue:
|
|
3651
|
+
rowKey: q,
|
|
3652
|
+
rowValue: J
|
|
3640
3653
|
}, () => [
|
|
3641
|
-
|
|
3654
|
+
Q(O(J), 1)
|
|
3642
3655
|
], !0)
|
|
3643
3656
|
]),
|
|
3644
3657
|
_: 2
|
|
3645
3658
|
}, 1032, ["key-name", "row-el"])
|
|
3646
3659
|
])
|
|
3647
3660
|
}))
|
|
3648
|
-
]), 1032, ["cache-identifier", "disable-pagination-page-jump", "disable-sorting", "empty-state-action-button-icon", "empty-state-action-message", "empty-state-action-route", "empty-state-icon", "empty-state-message", "empty-state-title", "enable-client-sort", "error-state-title", "fetcher", "fetcher-cache-key", "has-error", "headers", "initial-fetcher-params", "is-loading", "pagination-type", "search-input", "onRow:click"])
|
|
3661
|
+
]), 1032, ["cache-identifier", "disable-pagination-page-jump", "disable-sorting", "empty-state-action-button-icon", "empty-state-action-message", "empty-state-action-route", "empty-state-icon", "empty-state-message", "empty-state-title", "enable-client-sort", "error-state-message", "error-state-title", "fetcher", "fetcher-cache-key", "has-error", "headers", "initial-fetcher-params", "is-loading", "pagination-type", "search-input", "onRow:click"])
|
|
3649
3662
|
]),
|
|
3650
3663
|
_: 3
|
|
3651
3664
|
}, 8, ["title"]);
|
|
3652
3665
|
};
|
|
3653
3666
|
}
|
|
3654
|
-
}),
|
|
3667
|
+
}), Ns = /* @__PURE__ */ ke(Fs, [["__scopeId", "data-v-499a771c"]]), Bs = {
|
|
3655
3668
|
key: 0,
|
|
3656
3669
|
class: "kong-ui-entity-delete-error"
|
|
3657
|
-
},
|
|
3670
|
+
}, qs = {
|
|
3658
3671
|
key: 1,
|
|
3659
3672
|
class: "description"
|
|
3660
|
-
}, Ls = /* @__PURE__ */
|
|
3673
|
+
}, Ls = /* @__PURE__ */ oe({
|
|
3661
3674
|
__name: "EntityDeleteModal",
|
|
3662
3675
|
props: {
|
|
3663
3676
|
visible: {
|
|
@@ -3696,13 +3709,13 @@ const ns = {
|
|
|
3696
3709
|
},
|
|
3697
3710
|
emits: ["cancel", "proceed"],
|
|
3698
3711
|
setup(e, { emit: n }) {
|
|
3699
|
-
const t = e, { i18nT: r } =
|
|
3712
|
+
const t = e, { i18nT: r } = ce.useI18n(), o = T(() => t.needConfirm ? t.entityName : ""), a = () => {
|
|
3700
3713
|
n("cancel");
|
|
3701
3714
|
}, i = () => {
|
|
3702
3715
|
n("proceed");
|
|
3703
3716
|
};
|
|
3704
3717
|
return (s, l) => {
|
|
3705
|
-
const c =
|
|
3718
|
+
const c = L("KAlert"), d = L("KPrompt");
|
|
3706
3719
|
return m(), R(d, {
|
|
3707
3720
|
"action-button-text": "Yes, delete",
|
|
3708
3721
|
"action-pending": e.actionPending,
|
|
@@ -3714,50 +3727,50 @@ const ns = {
|
|
|
3714
3727
|
onCanceled: a,
|
|
3715
3728
|
onProceed: i
|
|
3716
3729
|
}, {
|
|
3717
|
-
"body-content":
|
|
3730
|
+
"body-content": v(() => [
|
|
3718
3731
|
e.error ? (m(), $("div", Bs, [
|
|
3719
|
-
|
|
3720
|
-
alertMessage:
|
|
3721
|
-
|
|
3732
|
+
F(c, { appearance: "danger" }, {
|
|
3733
|
+
alertMessage: v(() => [
|
|
3734
|
+
Q(O(e.error), 1)
|
|
3722
3735
|
]),
|
|
3723
3736
|
_: 1
|
|
3724
3737
|
})
|
|
3725
|
-
])) :
|
|
3726
|
-
|
|
3738
|
+
])) : H("", !0),
|
|
3739
|
+
F(y(r), {
|
|
3727
3740
|
class: "message",
|
|
3728
3741
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3729
3742
|
tag: "p"
|
|
3730
3743
|
}, Te({
|
|
3731
|
-
entityType:
|
|
3732
|
-
|
|
3744
|
+
entityType: v(() => [
|
|
3745
|
+
Q(O(t.entityType), 1)
|
|
3733
3746
|
]),
|
|
3734
3747
|
_: 2
|
|
3735
3748
|
}, [
|
|
3736
3749
|
t.entityName ? {
|
|
3737
3750
|
name: "entityName",
|
|
3738
|
-
fn:
|
|
3739
|
-
V("strong", null,
|
|
3751
|
+
fn: v(() => [
|
|
3752
|
+
V("strong", null, O(t.entityName), 1)
|
|
3740
3753
|
]),
|
|
3741
3754
|
key: "0"
|
|
3742
3755
|
} : void 0
|
|
3743
3756
|
]), 1032, ["keypath"]),
|
|
3744
|
-
t.description || s.$slots.description ? (m(), $("div",
|
|
3745
|
-
|
|
3746
|
-
V("p", null,
|
|
3757
|
+
t.description || s.$slots.description ? (m(), $("div", qs, [
|
|
3758
|
+
Z(s.$slots, "description", {}, () => [
|
|
3759
|
+
V("p", null, O(t.description), 1)
|
|
3747
3760
|
], !0)
|
|
3748
|
-
])) :
|
|
3761
|
+
])) : H("", !0)
|
|
3749
3762
|
]),
|
|
3750
3763
|
_: 3
|
|
3751
3764
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3752
3765
|
};
|
|
3753
3766
|
}
|
|
3754
|
-
}),
|
|
3767
|
+
}), Ps = /* @__PURE__ */ ke(Ls, [["__scopeId", "data-v-1c9a2a07"]]), Vs = {
|
|
3755
3768
|
fill: "none",
|
|
3756
3769
|
height: "20",
|
|
3757
3770
|
viewBox: "0 0 20 20",
|
|
3758
3771
|
width: "20",
|
|
3759
3772
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3760
|
-
},
|
|
3773
|
+
}, Us = {
|
|
3761
3774
|
id: "mask0_180_20349",
|
|
3762
3775
|
height: "20",
|
|
3763
3776
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3765,7 +3778,7 @@ const ns = {
|
|
|
3765
3778
|
width: "20",
|
|
3766
3779
|
x: "0",
|
|
3767
3780
|
y: "0"
|
|
3768
|
-
}, Rs = ["fill"], Ds = { mask: "url(#mask0_180_20349)" }, Gs = ["fill"], cn = /* @__PURE__ */
|
|
3781
|
+
}, Rs = ["fill"], Ds = { mask: "url(#mask0_180_20349)" }, Gs = ["fill"], cn = /* @__PURE__ */ oe({
|
|
3769
3782
|
__name: "IconFilter",
|
|
3770
3783
|
props: {
|
|
3771
3784
|
color: {
|
|
@@ -3774,8 +3787,8 @@ const ns = {
|
|
|
3774
3787
|
}
|
|
3775
3788
|
},
|
|
3776
3789
|
setup(e) {
|
|
3777
|
-
return (n, t) => (m(), $("svg",
|
|
3778
|
-
V("mask",
|
|
3790
|
+
return (n, t) => (m(), $("svg", Vs, [
|
|
3791
|
+
V("mask", Us, [
|
|
3779
3792
|
V("rect", {
|
|
3780
3793
|
fill: e.color,
|
|
3781
3794
|
height: "20",
|
|
@@ -3790,10 +3803,10 @@ const ns = {
|
|
|
3790
3803
|
])
|
|
3791
3804
|
]));
|
|
3792
3805
|
}
|
|
3793
|
-
}),
|
|
3806
|
+
}), Hs = {
|
|
3794
3807
|
key: 1,
|
|
3795
3808
|
class: "kong-ui-entity-filter"
|
|
3796
|
-
},
|
|
3809
|
+
}, zs = { class: "menu-item-title" }, Js = { class: "menu-item-indicator" }, Ys = { class: "menu-item-body" }, Ws = ["for"], Zs = { class: "menu-item-buttons" }, Qs = { class: "filter-clear-button-container" }, Xs = /* @__PURE__ */ oe({
|
|
3797
3810
|
__name: "EntityFilter",
|
|
3798
3811
|
props: {
|
|
3799
3812
|
// filter config, either exact match or fuzzy match
|
|
@@ -3813,21 +3826,21 @@ const ns = {
|
|
|
3813
3826
|
},
|
|
3814
3827
|
emits: ["update:modelValue"],
|
|
3815
3828
|
setup(e, { emit: n }) {
|
|
3816
|
-
const t = e, { i18n: { t: r } } =
|
|
3829
|
+
const t = e, { i18n: { t: r } } = ce.useI18n(), o = E(!1), a = E({}), i = T(() => {
|
|
3817
3830
|
const p = [];
|
|
3818
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
3819
|
-
|
|
3831
|
+
return new URLSearchParams(t.modelValue).forEach((A, k) => {
|
|
3832
|
+
A !== "" && p.push(k);
|
|
3820
3833
|
}), p;
|
|
3821
3834
|
}), s = T(() => {
|
|
3822
3835
|
const p = t.config.fields;
|
|
3823
|
-
return Object.keys(p).filter((
|
|
3824
|
-
label: p[
|
|
3825
|
-
value:
|
|
3836
|
+
return Object.keys(p).filter((A) => p[A].searchable).map((A) => ({
|
|
3837
|
+
label: p[A].label || A,
|
|
3838
|
+
value: A
|
|
3826
3839
|
}));
|
|
3827
3840
|
});
|
|
3828
3841
|
Se(() => t.modelValue, (p) => {
|
|
3829
|
-
a.value = {}, new URLSearchParams(p).forEach((
|
|
3830
|
-
a.value[
|
|
3842
|
+
a.value = {}, new URLSearchParams(p).forEach((A, k) => {
|
|
3843
|
+
a.value[k] = A;
|
|
3831
3844
|
});
|
|
3832
3845
|
});
|
|
3833
3846
|
const l = () => {
|
|
@@ -3835,28 +3848,28 @@ const ns = {
|
|
|
3835
3848
|
}, c = (p) => {
|
|
3836
3849
|
n("update:modelValue", p);
|
|
3837
3850
|
}, d = (p) => `filter-${p}`, u = (p) => {
|
|
3838
|
-
var
|
|
3839
|
-
return (((
|
|
3840
|
-
value:
|
|
3841
|
-
label:
|
|
3851
|
+
var A, k;
|
|
3852
|
+
return (((k = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : k.values) ?? []).map((K) => ({
|
|
3853
|
+
value: K,
|
|
3854
|
+
label: K
|
|
3842
3855
|
}));
|
|
3843
3856
|
}, g = (p) => {
|
|
3844
|
-
var
|
|
3845
|
-
return ((
|
|
3857
|
+
var A, k;
|
|
3858
|
+
return ((k = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : k.type) ?? "text";
|
|
3846
3859
|
}, f = (p) => {
|
|
3847
3860
|
a.value = {
|
|
3848
3861
|
...a.value,
|
|
3849
3862
|
[p]: ""
|
|
3850
|
-
},
|
|
3863
|
+
}, b();
|
|
3851
3864
|
}, I = () => {
|
|
3852
|
-
a.value = {},
|
|
3853
|
-
},
|
|
3854
|
-
const
|
|
3855
|
-
p && (o.value = !1), n("update:modelValue", new URLSearchParams(
|
|
3865
|
+
a.value = {}, b(!0);
|
|
3866
|
+
}, b = (p = !1) => {
|
|
3867
|
+
const A = Object.keys(a.value).reduce((k, K) => (a.value[K] && (k[K] = `${a.value[K]}`), k), {});
|
|
3868
|
+
p && (o.value = !1), n("update:modelValue", new URLSearchParams(A).toString());
|
|
3856
3869
|
};
|
|
3857
|
-
return (p,
|
|
3858
|
-
const
|
|
3859
|
-
return e.config.isExactMatch ? (m(), R(
|
|
3870
|
+
return (p, A) => {
|
|
3871
|
+
const k = L("KInput"), K = L("KButton"), h = L("KSelect"), D = L("KMenuItem"), se = L("KMenu");
|
|
3872
|
+
return e.config.isExactMatch ? (m(), R(k, {
|
|
3860
3873
|
key: 0,
|
|
3861
3874
|
autocomplete: "off",
|
|
3862
3875
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3865,19 +3878,19 @@ const ns = {
|
|
|
3865
3878
|
placeholder: e.config.placeholder,
|
|
3866
3879
|
"onUpdate:modelValue": c
|
|
3867
3880
|
}, {
|
|
3868
|
-
before:
|
|
3869
|
-
|
|
3881
|
+
before: v(() => [
|
|
3882
|
+
F(cn)
|
|
3870
3883
|
]),
|
|
3871
3884
|
_: 1
|
|
3872
|
-
}, 8, ["model-value", "placeholder"])) : (m(), $("div",
|
|
3873
|
-
|
|
3885
|
+
}, 8, ["model-value", "placeholder"])) : (m(), $("div", Hs, [
|
|
3886
|
+
F(K, {
|
|
3874
3887
|
appearance: "tertiary",
|
|
3875
3888
|
"data-testid": "filter-button",
|
|
3876
3889
|
onClick: l
|
|
3877
3890
|
}, {
|
|
3878
|
-
default:
|
|
3879
|
-
|
|
3880
|
-
|
|
3891
|
+
default: v(() => [
|
|
3892
|
+
F(cn),
|
|
3893
|
+
Q(" " + O(y(r)("filter.filterButtonText")) + " " + O(i.value.length > 0 ? `(${i.value.length})` : ""), 1)
|
|
3881
3894
|
]),
|
|
3882
3895
|
_: 1
|
|
3883
3896
|
}),
|
|
@@ -3887,68 +3900,68 @@ const ns = {
|
|
|
3887
3900
|
}, null, 512), [
|
|
3888
3901
|
[tt, o.value]
|
|
3889
3902
|
]),
|
|
3890
|
-
et(
|
|
3891
|
-
body:
|
|
3892
|
-
(m(!0), $(
|
|
3893
|
-
key:
|
|
3894
|
-
"data-testid":
|
|
3903
|
+
et(F(se, { class: "kong-ui-entity-filter-menu" }, {
|
|
3904
|
+
body: v(() => [
|
|
3905
|
+
(m(!0), $(be, null, he(s.value, (Y, w) => (m(), R(D, {
|
|
3906
|
+
key: Y.value,
|
|
3907
|
+
"data-testid": Y.value,
|
|
3895
3908
|
expandable: "",
|
|
3896
3909
|
"last-menu-item": w === s.value.length - 1
|
|
3897
3910
|
}, {
|
|
3898
|
-
itemTitle:
|
|
3899
|
-
V("span",
|
|
3900
|
-
|
|
3911
|
+
itemTitle: v(() => [
|
|
3912
|
+
V("span", zs, [
|
|
3913
|
+
Q(O(Y.label) + " ", 1),
|
|
3901
3914
|
et(V("span", Js, null, 512), [
|
|
3902
|
-
[tt, i.value.includes(
|
|
3915
|
+
[tt, i.value.includes(Y.value)]
|
|
3903
3916
|
])
|
|
3904
3917
|
])
|
|
3905
3918
|
]),
|
|
3906
|
-
itemBody:
|
|
3907
|
-
var
|
|
3919
|
+
itemBody: v(() => {
|
|
3920
|
+
var N, U;
|
|
3908
3921
|
return [
|
|
3909
3922
|
V("div", Ys, [
|
|
3910
3923
|
V("label", {
|
|
3911
3924
|
class: "menu-item-label",
|
|
3912
|
-
for: d(
|
|
3913
|
-
},
|
|
3914
|
-
((
|
|
3925
|
+
for: d(Y.value)
|
|
3926
|
+
}, O(y(r)("filter.fieldLabel")), 9, Ws),
|
|
3927
|
+
((U = (N = e.config.schema) == null ? void 0 : N[Y.value]) == null ? void 0 : U.type) === "select" ? (m(), R(h, {
|
|
3915
3928
|
key: 0,
|
|
3916
|
-
id: d(
|
|
3917
|
-
modelValue: a.value[
|
|
3918
|
-
"onUpdate:modelValue": (
|
|
3929
|
+
id: d(Y.value),
|
|
3930
|
+
modelValue: a.value[Y.value],
|
|
3931
|
+
"onUpdate:modelValue": (C) => a.value[Y.value] = C,
|
|
3919
3932
|
appearance: "select",
|
|
3920
|
-
items: u(
|
|
3933
|
+
items: u(Y.value),
|
|
3921
3934
|
placeholder: y(r)("filter.selectPlaceholder")
|
|
3922
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), R(
|
|
3935
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), R(k, {
|
|
3923
3936
|
key: 1,
|
|
3924
|
-
id: d(
|
|
3925
|
-
modelValue: a.value[
|
|
3926
|
-
"onUpdate:modelValue": (
|
|
3937
|
+
id: d(Y.value),
|
|
3938
|
+
modelValue: a.value[Y.value],
|
|
3939
|
+
"onUpdate:modelValue": (C) => a.value[Y.value] = C,
|
|
3927
3940
|
autocomplete: "off",
|
|
3928
3941
|
placeholder: y(r)("filter.inputPlaceholder"),
|
|
3929
|
-
type: g(
|
|
3942
|
+
type: g(Y.value)
|
|
3930
3943
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3931
3944
|
]),
|
|
3932
3945
|
V("div", Zs, [
|
|
3933
|
-
|
|
3946
|
+
F(K, {
|
|
3934
3947
|
appearance: "tertiary",
|
|
3935
3948
|
"data-testid": "apply-filter",
|
|
3936
3949
|
size: "small",
|
|
3937
|
-
onClick:
|
|
3950
|
+
onClick: A[0] || (A[0] = (C) => b(!0))
|
|
3938
3951
|
}, {
|
|
3939
|
-
default:
|
|
3940
|
-
|
|
3952
|
+
default: v(() => [
|
|
3953
|
+
Q(O(y(r)("filter.applyButtonText")), 1)
|
|
3941
3954
|
]),
|
|
3942
3955
|
_: 1
|
|
3943
3956
|
}),
|
|
3944
|
-
|
|
3957
|
+
F(K, {
|
|
3945
3958
|
appearance: "tertiary",
|
|
3946
3959
|
"data-testid": "clear-filter",
|
|
3947
3960
|
size: "small",
|
|
3948
|
-
onClick: (
|
|
3961
|
+
onClick: (C) => f(Y.value)
|
|
3949
3962
|
}, {
|
|
3950
|
-
default:
|
|
3951
|
-
|
|
3963
|
+
default: v(() => [
|
|
3964
|
+
Q(O(y(r)("filter.clearButtonText")), 1)
|
|
3952
3965
|
]),
|
|
3953
3966
|
_: 2
|
|
3954
3967
|
}, 1032, ["onClick"])
|
|
@@ -3958,14 +3971,14 @@ const ns = {
|
|
|
3958
3971
|
_: 2
|
|
3959
3972
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
3960
3973
|
]),
|
|
3961
|
-
actionButton:
|
|
3974
|
+
actionButton: v(() => [
|
|
3962
3975
|
V("div", Qs, [
|
|
3963
|
-
|
|
3976
|
+
F(K, {
|
|
3964
3977
|
size: "small",
|
|
3965
3978
|
onClick: I
|
|
3966
3979
|
}, {
|
|
3967
|
-
default:
|
|
3968
|
-
|
|
3980
|
+
default: v(() => [
|
|
3981
|
+
Q(O(y(r)("filter.clearAllButtonText")), 1)
|
|
3969
3982
|
]),
|
|
3970
3983
|
_: 1
|
|
3971
3984
|
})
|
|
@@ -3978,7 +3991,7 @@ const ns = {
|
|
|
3978
3991
|
]));
|
|
3979
3992
|
};
|
|
3980
3993
|
}
|
|
3981
|
-
}), el = /* @__PURE__ */ ke(Xs, [["__scopeId", "data-v-4ea260f0"]]), Xe = /* @__PURE__ */
|
|
3994
|
+
}), el = /* @__PURE__ */ ke(Xs, [["__scopeId", "data-v-4ea260f0"]]), Xe = /* @__PURE__ */ oe({
|
|
3982
3995
|
__name: "PermissionsWrapper",
|
|
3983
3996
|
props: {
|
|
3984
3997
|
/**
|
|
@@ -4000,13 +4013,13 @@ const ns = {
|
|
|
4000
4013
|
}
|
|
4001
4014
|
},
|
|
4002
4015
|
setup(e) {
|
|
4003
|
-
const n = e, t =
|
|
4016
|
+
const n = e, t = E(void 0), r = T(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
4004
4017
|
return Se(() => n.authFunction, async () => {
|
|
4005
4018
|
t.value = await n.authFunction();
|
|
4006
|
-
}, { immediate: !0 }), (o, a) => r.value ?
|
|
4019
|
+
}, { immediate: !0 }), (o, a) => r.value ? Z(o.$slots, "default", {
|
|
4007
4020
|
key: 0,
|
|
4008
4021
|
isAllowed: t.value
|
|
4009
|
-
}) :
|
|
4022
|
+
}) : H("", !0);
|
|
4010
4023
|
}
|
|
4011
4024
|
}), tl = { class: "form-section-wrapper" }, nl = {
|
|
4012
4025
|
key: 0,
|
|
@@ -4017,7 +4030,7 @@ const ns = {
|
|
|
4017
4030
|
}, ol = {
|
|
4018
4031
|
key: 2,
|
|
4019
4032
|
class: "form-section-footer"
|
|
4020
|
-
}, al = { class: "form-section-content" }, il = /* @__PURE__ */
|
|
4033
|
+
}, al = { class: "form-section-content" }, il = /* @__PURE__ */ oe({
|
|
4021
4034
|
__name: "EntityFormSection",
|
|
4022
4035
|
props: {
|
|
4023
4036
|
title: {
|
|
@@ -4044,34 +4057,34 @@ const ns = {
|
|
|
4044
4057
|
setup(e) {
|
|
4045
4058
|
const n = ut();
|
|
4046
4059
|
return (t, r) => (m(), $("fieldset", {
|
|
4047
|
-
class:
|
|
4060
|
+
class: Fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4048
4061
|
}, [
|
|
4049
4062
|
V("div", tl, [
|
|
4050
|
-
e.hideInfoHeader ?
|
|
4063
|
+
e.hideInfoHeader ? H("", !0) : (m(), $("div", {
|
|
4051
4064
|
key: 0,
|
|
4052
|
-
class:
|
|
4065
|
+
class: Fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4053
4066
|
}, [
|
|
4054
|
-
e.title ? (m(), $("h4", nl,
|
|
4067
|
+
e.title ? (m(), $("h4", nl, O(e.title), 1)) : H("", !0),
|
|
4055
4068
|
e.description || y(n).description ? (m(), $("div", rl, [
|
|
4056
|
-
|
|
4057
|
-
V("p", null,
|
|
4069
|
+
Z(t.$slots, "description", {}, () => [
|
|
4070
|
+
V("p", null, O(e.description), 1)
|
|
4058
4071
|
], !0)
|
|
4059
|
-
])) :
|
|
4072
|
+
])) : H("", !0),
|
|
4060
4073
|
y(n).footer ? (m(), $("div", ol, [
|
|
4061
|
-
|
|
4062
|
-
])) :
|
|
4074
|
+
Z(t.$slots, "footer", {}, void 0, !0)
|
|
4075
|
+
])) : H("", !0)
|
|
4063
4076
|
], 2)),
|
|
4064
4077
|
V("div", al, [
|
|
4065
|
-
|
|
4078
|
+
Z(t.$slots, "default", {}, void 0, !0)
|
|
4066
4079
|
])
|
|
4067
4080
|
])
|
|
4068
4081
|
], 2));
|
|
4069
4082
|
}
|
|
4070
|
-
}), dn = /* @__PURE__ */ ke(il, [["__scopeId", "data-v-8b6dc312"]]), { useAxios:
|
|
4083
|
+
}), dn = /* @__PURE__ */ ke(il, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Kt, useDeleteUrlBuilder: sl, useErrors: ll, useExternalLinkCreator: $l, useFetchUrlBuilder: Ml, useFetcher: ul, useDebouncedFilter: cr, useStringHelpers: jl, useHelpers: El, useGatewayFeatureSupported: Ol, useTruncationDetector: Kl } = ce;
|
|
4071
4084
|
const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group-cta-text" }, pl = {
|
|
4072
4085
|
key: 0,
|
|
4073
4086
|
class: "kong-ui-entity-add-to-groups-error"
|
|
4074
|
-
}, fl = { key: 0 }, ml = /* @__PURE__ */
|
|
4087
|
+
}, fl = { key: 0 }, ml = /* @__PURE__ */ oe({
|
|
4075
4088
|
__name: "AddToGroupModal",
|
|
4076
4089
|
props: {
|
|
4077
4090
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4088,10 +4101,10 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4088
4101
|
},
|
|
4089
4102
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4090
4103
|
setup(e, { emit: n }) {
|
|
4091
|
-
var
|
|
4092
|
-
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } =
|
|
4093
|
-
headers: (
|
|
4094
|
-
}), a =
|
|
4104
|
+
var U;
|
|
4105
|
+
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } = Kt({
|
|
4106
|
+
headers: (U = t.config) == null ? void 0 : U.requestHeaders
|
|
4107
|
+
}), a = E([]), {
|
|
4095
4108
|
debouncedQueryChange: i,
|
|
4096
4109
|
loading: s,
|
|
4097
4110
|
allRecords: l,
|
|
@@ -4106,101 +4119,101 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4106
4119
|
fetchedItemsKey: "data",
|
|
4107
4120
|
searchKeys: ["name", "id"]
|
|
4108
4121
|
}
|
|
4109
|
-
), g = T(() => c.value ? r("consumer_groups.errors.general") : ""), f =
|
|
4110
|
-
label:
|
|
4111
|
-
value:
|
|
4112
|
-
selected: a.value.includes(
|
|
4113
|
-
data:
|
|
4122
|
+
), g = T(() => c.value ? r("consumer_groups.errors.general") : ""), f = E(0), I = T(() => l.value === void 0), b = T(() => u.value.map((C) => ({
|
|
4123
|
+
label: C.name,
|
|
4124
|
+
value: C.id,
|
|
4125
|
+
selected: a.value.includes(C.id),
|
|
4126
|
+
data: C
|
|
4114
4127
|
// we need this to determine whether or not to show the description text
|
|
4115
|
-
}))), p = (
|
|
4116
|
-
var
|
|
4117
|
-
const
|
|
4118
|
-
return
|
|
4119
|
-
},
|
|
4120
|
-
|
|
4121
|
-
},
|
|
4128
|
+
}))), p = (C) => {
|
|
4129
|
+
var S;
|
|
4130
|
+
const x = I.value ? u.value.find((q) => q.id === C) : (S = l.value) == null ? void 0 : S.find((q) => q.id === C);
|
|
4131
|
+
return x ? x.name : C;
|
|
4132
|
+
}, A = () => {
|
|
4133
|
+
h.value = "", k.value = [], w.value = [], n("cancel");
|
|
4134
|
+
}, k = E([]), K = E(!1), h = E(""), D = async () => {
|
|
4122
4135
|
if (!a.value.length) {
|
|
4123
|
-
|
|
4136
|
+
h.value = "", w.value = [], n("cancel");
|
|
4124
4137
|
return;
|
|
4125
4138
|
}
|
|
4126
|
-
|
|
4139
|
+
K.value = !0, h.value = "", k.value = [], w.value = [];
|
|
4127
4140
|
try {
|
|
4128
|
-
const
|
|
4129
|
-
let
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
}),
|
|
4141
|
+
const C = a.value.map((q) => Y(q)), x = await Promise.allSettled(C);
|
|
4142
|
+
let S = !0;
|
|
4143
|
+
x.forEach((q) => {
|
|
4144
|
+
q.status !== "fulfilled" && (S = !1);
|
|
4145
|
+
}), S ? (k.value = [], w.value = [], n("add:success", a.value), a.value = []) : (k.value.length && n("add:partial-success", k.value), a.value = [], N(x));
|
|
4133
4146
|
} catch {
|
|
4134
|
-
|
|
4147
|
+
h.value = r("consumer_groups.errors.add"), n("error", h.value);
|
|
4135
4148
|
} finally {
|
|
4136
|
-
|
|
4149
|
+
K.value = !1;
|
|
4137
4150
|
}
|
|
4138
|
-
},
|
|
4139
|
-
var
|
|
4140
|
-
let
|
|
4141
|
-
return t.config.app === "konnect" ?
|
|
4142
|
-
}),
|
|
4143
|
-
const
|
|
4144
|
-
group:
|
|
4151
|
+
}, se = T(() => {
|
|
4152
|
+
var x, S, q, J;
|
|
4153
|
+
let C = `${t.config.apiBaseUrl}${$e.list[t.config.app].forConsumer}`;
|
|
4154
|
+
return t.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((x = t.config) == null ? void 0 : x.controlPlaneId) || "").replace(/{consumerId}/gi, ((S = t.config) == null ? void 0 : S.consumerId) || "") : t.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (q = t.config) != null && q.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((J = t.config) == null ? void 0 : J.consumerId) || "")), C;
|
|
4155
|
+
}), Y = async (C) => {
|
|
4156
|
+
const x = {
|
|
4157
|
+
group: C
|
|
4145
4158
|
};
|
|
4146
4159
|
try {
|
|
4147
|
-
const
|
|
4148
|
-
return
|
|
4149
|
-
} catch (
|
|
4150
|
-
let
|
|
4151
|
-
return
|
|
4160
|
+
const S = await o.post(se.value, x);
|
|
4161
|
+
return k.value.push(C), S;
|
|
4162
|
+
} catch (S) {
|
|
4163
|
+
let q = `${p(C)} - ${S.message}`;
|
|
4164
|
+
return S.response.status === 409 && (q = `${p(C)} - ${r("consumer_groups.errors.already_added")}`), Promise.reject(Error(q));
|
|
4152
4165
|
}
|
|
4153
|
-
}, w =
|
|
4154
|
-
w.value =
|
|
4155
|
-
var
|
|
4156
|
-
return (
|
|
4166
|
+
}, w = E([]), N = (C) => {
|
|
4167
|
+
w.value = C.map((x) => {
|
|
4168
|
+
var S;
|
|
4169
|
+
return (S = x.reason) == null ? void 0 : S.message;
|
|
4157
4170
|
}).filter(Boolean);
|
|
4158
4171
|
};
|
|
4159
|
-
return Se(
|
|
4172
|
+
return Se(b, () => {
|
|
4160
4173
|
f.value++;
|
|
4161
4174
|
}, { immediate: !0, deep: !0 }), Qe(async () => {
|
|
4162
4175
|
await d();
|
|
4163
|
-
}), (
|
|
4164
|
-
const
|
|
4176
|
+
}), (C, x) => {
|
|
4177
|
+
const S = L("KMultiselect"), q = L("KAlert"), J = L("KPrompt");
|
|
4165
4178
|
return m(), R(J, {
|
|
4166
|
-
"action-pending":
|
|
4179
|
+
"action-pending": K.value,
|
|
4167
4180
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
4168
4181
|
"data-testid": "add-to-group-modal",
|
|
4169
4182
|
"is-visible": e.visible,
|
|
4170
4183
|
title: y(r)("consumer_groups.consumers.add.title"),
|
|
4171
|
-
onCanceled:
|
|
4172
|
-
onProceed:
|
|
4184
|
+
onCanceled: A,
|
|
4185
|
+
onProceed: D
|
|
4173
4186
|
}, {
|
|
4174
|
-
"body-content":
|
|
4187
|
+
"body-content": v(() => [
|
|
4175
4188
|
V("div", cl, [
|
|
4176
|
-
V("p", dl,
|
|
4177
|
-
|
|
4189
|
+
V("p", dl, O(y(r)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4190
|
+
F(S, {
|
|
4178
4191
|
modelValue: a.value,
|
|
4179
|
-
"onUpdate:modelValue":
|
|
4192
|
+
"onUpdate:modelValue": x[0] || (x[0] = (X) => a.value = X),
|
|
4180
4193
|
autosuggest: "",
|
|
4181
4194
|
"data-testid": "add-to-groups-multiselect",
|
|
4182
4195
|
"dropdown-footer-text": I.value ? y(r)("consumer_groups.consumers.add.footer") : void 0,
|
|
4183
|
-
items:
|
|
4196
|
+
items: b.value,
|
|
4184
4197
|
label: y(r)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
4185
4198
|
loading: y(s),
|
|
4186
4199
|
placeholder: y(r)("consumer_groups.consumers.add.consumer_group_placeholder"),
|
|
4187
|
-
readonly:
|
|
4200
|
+
readonly: K.value,
|
|
4188
4201
|
required: "",
|
|
4189
4202
|
width: "100%",
|
|
4190
4203
|
onQueryChange: y(i)
|
|
4191
4204
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
alertMessage:
|
|
4195
|
-
V("p", null,
|
|
4205
|
+
h.value || g.value || w.value.length ? (m(), $("div", pl, [
|
|
4206
|
+
F(q, { appearance: "danger" }, {
|
|
4207
|
+
alertMessage: v(() => [
|
|
4208
|
+
V("p", null, O(y(r)("consumer_groups.errors.add")), 1),
|
|
4196
4209
|
w.value.length ? (m(), $("ul", fl, [
|
|
4197
|
-
(m(!0), $(
|
|
4198
|
-
])) :
|
|
4199
|
-
V("div", null,
|
|
4210
|
+
(m(!0), $(be, null, he(w.value, (X, ee) => (m(), $("li", { key: ee }, O(X), 1))), 128))
|
|
4211
|
+
])) : H("", !0),
|
|
4212
|
+
V("div", null, O(h.value || g.value), 1)
|
|
4200
4213
|
]),
|
|
4201
4214
|
_: 1
|
|
4202
4215
|
})
|
|
4203
|
-
])) :
|
|
4216
|
+
])) : H("", !0)
|
|
4204
4217
|
])
|
|
4205
4218
|
]),
|
|
4206
4219
|
_: 1
|
|
@@ -4208,12 +4221,12 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4208
4221
|
};
|
|
4209
4222
|
}
|
|
4210
4223
|
});
|
|
4211
|
-
const
|
|
4224
|
+
const Ft = (e, n) => {
|
|
4212
4225
|
const t = e.__vccOpts || e;
|
|
4213
4226
|
for (const [r, o] of n)
|
|
4214
4227
|
t[r] = o;
|
|
4215
4228
|
return t;
|
|
4216
|
-
}, gl = /* @__PURE__ */
|
|
4229
|
+
}, gl = /* @__PURE__ */ Ft(ml, [["__scopeId", "data-v-4d30f3c5"]]), yl = { class: "kong-ui-entities-consumer-groups-list" }, hl = { key: 1 }, vl = /* @__PURE__ */ oe({
|
|
4217
4230
|
__name: "ConsumerGroupList",
|
|
4218
4231
|
props: {
|
|
4219
4232
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4254,129 +4267,132 @@ const Nt = (e, n) => {
|
|
|
4254
4267
|
},
|
|
4255
4268
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4256
4269
|
setup(e, { emit: n }) {
|
|
4257
|
-
var
|
|
4258
|
-
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } =
|
|
4259
|
-
headers: (
|
|
4260
|
-
}), s =
|
|
4270
|
+
var Nt;
|
|
4271
|
+
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } = Kt({
|
|
4272
|
+
headers: (Nt = t.config) == null ? void 0 : Nt.requestHeaders
|
|
4273
|
+
}), s = E(1), l = T(() => !!t.config.consumerId), c = T(() => t.config.app !== "kongManager" || !!t.config.disableSorting), d = {
|
|
4261
4274
|
name: { label: o("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4262
4275
|
};
|
|
4263
4276
|
t.config.app === "kongManager" && (d.consumers_count = { label: o("consumer_groups.list.table_headers.consumers_count"), searchable: !1, sortable: !1 }), d.tags = { label: o("consumer_groups.list.table_headers.tags"), sortable: !1 };
|
|
4264
|
-
const u = d, g = (
|
|
4265
|
-
"data-testid":
|
|
4277
|
+
const u = d, g = (j) => ({
|
|
4278
|
+
"data-testid": j.username ?? j.custom_id ?? j.id
|
|
4266
4279
|
}), f = T(() => {
|
|
4267
|
-
var
|
|
4268
|
-
let
|
|
4269
|
-
return t.config.app === "konnect" ?
|
|
4270
|
-
}), I =
|
|
4271
|
-
const
|
|
4272
|
-
return
|
|
4273
|
-
isExactMatch:
|
|
4280
|
+
var z, re, ye, Ee;
|
|
4281
|
+
let j = `${t.config.apiBaseUrl}${$e.list[t.config.app][l.value ? "forConsumer" : "all"]}`;
|
|
4282
|
+
return t.config.app === "konnect" ? j = j.replace(/{controlPlaneId}/gi, ((z = t.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = t.config) == null ? void 0 : re.consumerId) || "") : t.config.app === "kongManager" && (j = j.replace(/\/{workspace}/gi, (ye = t.config) != null && ye.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), j;
|
|
4283
|
+
}), I = E(""), b = T(() => {
|
|
4284
|
+
const j = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4285
|
+
return j ? {
|
|
4286
|
+
isExactMatch: j,
|
|
4274
4287
|
fields: {
|
|
4275
4288
|
username: d.name,
|
|
4276
4289
|
id: { label: o("consumer_groups.list.table_headers.id") }
|
|
4277
4290
|
},
|
|
4278
4291
|
placeholder: o("consumer_groups.search.placeholder")
|
|
4279
4292
|
} : {
|
|
4280
|
-
isExactMatch:
|
|
4293
|
+
isExactMatch: j,
|
|
4281
4294
|
fields: {
|
|
4282
4295
|
name: d.name
|
|
4283
4296
|
},
|
|
4284
4297
|
schema: t.config.filterSchema
|
|
4285
4298
|
};
|
|
4286
|
-
}), p = T(() => l.value ? "consumer_groups" : void 0), { fetcher:
|
|
4299
|
+
}), p = T(() => l.value ? "consumer_groups" : void 0), { fetcher: A, fetcherState: k } = ul(t.config, f.value, p.value), K = () => {
|
|
4287
4300
|
I.value = "";
|
|
4288
|
-
},
|
|
4301
|
+
}, h = () => {
|
|
4289
4302
|
s.value++;
|
|
4290
|
-
},
|
|
4291
|
-
const
|
|
4292
|
-
if (!
|
|
4303
|
+
}, D = E(null), se = (j, z) => {
|
|
4304
|
+
const re = j.id;
|
|
4305
|
+
if (!z(re)) {
|
|
4293
4306
|
n("copy:error", {
|
|
4294
|
-
entity:
|
|
4307
|
+
entity: j,
|
|
4295
4308
|
field: "id",
|
|
4296
4309
|
message: o("consumer_groups.errors.copy")
|
|
4297
4310
|
});
|
|
4298
4311
|
return;
|
|
4299
4312
|
}
|
|
4300
4313
|
n("copy:success", {
|
|
4301
|
-
entity:
|
|
4314
|
+
entity: j,
|
|
4302
4315
|
field: "id",
|
|
4303
|
-
message: o("consumer_groups.copy.success", { val:
|
|
4316
|
+
message: o("consumer_groups.copy.success", { val: re })
|
|
4304
4317
|
});
|
|
4305
|
-
},
|
|
4306
|
-
const
|
|
4307
|
-
if (!
|
|
4318
|
+
}, Y = (j, z) => {
|
|
4319
|
+
const re = JSON.stringify(j);
|
|
4320
|
+
if (!z(re)) {
|
|
4308
4321
|
n("copy:error", {
|
|
4309
|
-
entity:
|
|
4322
|
+
entity: j,
|
|
4310
4323
|
message: o("consumer_groups.errors.copy")
|
|
4311
4324
|
});
|
|
4312
4325
|
return;
|
|
4313
4326
|
}
|
|
4314
4327
|
n("copy:success", {
|
|
4315
|
-
entity:
|
|
4328
|
+
entity: j,
|
|
4316
4329
|
message: o("consumer_groups.copy.success_brief")
|
|
4317
4330
|
});
|
|
4318
|
-
}, w = async (
|
|
4319
|
-
var
|
|
4320
|
-
await ((
|
|
4321
|
-
},
|
|
4331
|
+
}, w = async (j) => {
|
|
4332
|
+
var re;
|
|
4333
|
+
await ((re = t.canRetrieve) == null ? void 0 : re.call(t, j)) && a.push(t.config.getViewRoute(j.id));
|
|
4334
|
+
}, N = (j) => ({
|
|
4322
4335
|
label: o("consumer_groups.actions.view"),
|
|
4323
|
-
to: t.config.getViewRoute(
|
|
4324
|
-
}),
|
|
4336
|
+
to: t.config.getViewRoute(j)
|
|
4337
|
+
}), U = (j) => ({
|
|
4325
4338
|
label: o("consumer_groups.actions.edit"),
|
|
4326
|
-
to: t.config.getEditRoute(
|
|
4327
|
-
}),
|
|
4328
|
-
|
|
4329
|
-
},
|
|
4330
|
-
|
|
4331
|
-
},
|
|
4332
|
-
var
|
|
4333
|
-
if ((
|
|
4334
|
-
|
|
4339
|
+
to: t.config.getEditRoute(j)
|
|
4340
|
+
}), C = E(void 0), x = E(!1), S = E(!1), q = E(""), J = sl(t.config, f.value), X = (j) => {
|
|
4341
|
+
C.value = j, x.value = !0;
|
|
4342
|
+
}, ee = () => {
|
|
4343
|
+
x.value = !1;
|
|
4344
|
+
}, te = async () => {
|
|
4345
|
+
var j, z, re;
|
|
4346
|
+
if ((j = C.value) != null && j.id) {
|
|
4347
|
+
S.value = !0;
|
|
4335
4348
|
try {
|
|
4336
|
-
await i.delete(J(
|
|
4337
|
-
} catch (
|
|
4338
|
-
|
|
4349
|
+
await i.delete(J(C.value.id)), S.value = !1, x.value = !1, s.value++, n("delete:success", C.value);
|
|
4350
|
+
} catch (ye) {
|
|
4351
|
+
q.value = ((re = (z = ye.response) == null ? void 0 : z.data) == null ? void 0 : re.message) || ye.message || o("consumer_groups.errors.delete"), n("error", ye);
|
|
4339
4352
|
} finally {
|
|
4340
|
-
|
|
4353
|
+
S.value = !1;
|
|
4341
4354
|
}
|
|
4342
4355
|
}
|
|
4343
|
-
},
|
|
4344
|
-
|
|
4356
|
+
}, le = E(!1), De = () => {
|
|
4357
|
+
le.value = !0;
|
|
4345
4358
|
}, _ = () => {
|
|
4346
|
-
|
|
4347
|
-
},
|
|
4348
|
-
|
|
4349
|
-
},
|
|
4359
|
+
le.value = !1;
|
|
4360
|
+
}, B = (j, z) => {
|
|
4361
|
+
z || _(), s.value++, n("add:success", j);
|
|
4362
|
+
}, ae = () => {
|
|
4350
4363
|
l.value && De();
|
|
4351
|
-
},
|
|
4352
|
-
|
|
4353
|
-
},
|
|
4354
|
-
|
|
4355
|
-
},
|
|
4356
|
-
var
|
|
4357
|
-
let
|
|
4358
|
-
return t.config.app === "konnect" ?
|
|
4359
|
-
}), Ge =
|
|
4360
|
-
if (
|
|
4364
|
+
}, P = E(void 0), G = E(!1), ge = E(""), _e = (j) => {
|
|
4365
|
+
P.value = j, G.value = !0;
|
|
4366
|
+
}, de = () => {
|
|
4367
|
+
G.value = !1, P.value = void 0;
|
|
4368
|
+
}, Ne = T(() => {
|
|
4369
|
+
var z, re, ye, Ee;
|
|
4370
|
+
let j = `${t.config.apiBaseUrl}${$e.list[t.config.app].oneForConsumer}`;
|
|
4371
|
+
return t.config.app === "konnect" ? j = j.replace(/{controlPlaneId}/gi, ((z = t.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = t.config) == null ? void 0 : re.consumerId) || "") : t.config.app === "kongManager" && (j = j.replace(/\/{workspace}/gi, (ye = t.config) != null && ye.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), j;
|
|
4372
|
+
}), Ge = E(!1), dr = async () => {
|
|
4373
|
+
if (P.value) {
|
|
4361
4374
|
Ge.value = !0;
|
|
4362
4375
|
try {
|
|
4363
|
-
const
|
|
4364
|
-
await i.delete(
|
|
4365
|
-
} catch (
|
|
4366
|
-
ge.value =
|
|
4376
|
+
const j = Ne.value.replace(/{consumerGroupId}/gi, P.value.id);
|
|
4377
|
+
await i.delete(j), n("remove:success", P.value), de(), s.value++;
|
|
4378
|
+
} catch (j) {
|
|
4379
|
+
ge.value = j.message || o("consumer_groups.errors.delete"), n("error", j);
|
|
4367
4380
|
} finally {
|
|
4368
4381
|
Ge.value = !1;
|
|
4369
4382
|
}
|
|
4370
4383
|
}
|
|
4371
4384
|
};
|
|
4372
|
-
Se(
|
|
4373
|
-
|
|
4374
|
-
|
|
4385
|
+
Se(k, (j) => {
|
|
4386
|
+
var z, re, ye;
|
|
4387
|
+
if (j.status === Oe.Error) {
|
|
4388
|
+
D.value = {
|
|
4389
|
+
title: o("consumer_groups.errors.general")
|
|
4390
|
+
}, (ye = (re = (z = j.error) == null ? void 0 : z.response) == null ? void 0 : re.data) != null && ye.message && (D.value.message = j.error.response.data.message), n("error", j.error);
|
|
4375
4391
|
return;
|
|
4376
4392
|
}
|
|
4377
|
-
|
|
4393
|
+
D.value = null;
|
|
4378
4394
|
});
|
|
4379
|
-
const pt =
|
|
4395
|
+
const pt = E({
|
|
4380
4396
|
ctaPath: l.value ? void 0 : t.config.createRoute,
|
|
4381
4397
|
ctaText: void 0,
|
|
4382
4398
|
message: o("consumer_groups.list.empty_state.description"),
|
|
@@ -4384,51 +4400,51 @@ const Nt = (e, n) => {
|
|
|
4384
4400
|
});
|
|
4385
4401
|
return Qe(async () => {
|
|
4386
4402
|
await t.canCreate() && (pt.value.title = l.value ? o("consumer_groups.list.empty_state.title_for_consumer") : o("consumer_groups.list.empty_state.title"), pt.value.ctaText = l.value ? o("consumer_groups.actions.add_to_group") : o("consumer_groups.actions.create"));
|
|
4387
|
-
}), (
|
|
4388
|
-
const
|
|
4403
|
+
}), (j, z) => {
|
|
4404
|
+
const re = L("KButton"), ye = L("KBadge"), Ee = L("KTruncate"), He = L("KDropdownItem"), Bt = L("KClipboardProvider"), pr = L("KPrompt");
|
|
4389
4405
|
return m(), $("div", yl, [
|
|
4390
|
-
|
|
4406
|
+
F(y(Ns), {
|
|
4391
4407
|
"cache-identifier": e.cacheIdentifier,
|
|
4392
4408
|
"disable-pagination": l.value,
|
|
4393
4409
|
"disable-pagination-page-jump": "",
|
|
4394
4410
|
"disable-sorting": c.value,
|
|
4395
4411
|
"empty-state-options": pt.value,
|
|
4396
4412
|
"enable-entity-actions": "",
|
|
4397
|
-
"error-message":
|
|
4398
|
-
fetcher: y(
|
|
4413
|
+
"error-message": D.value,
|
|
4414
|
+
fetcher: y(A),
|
|
4399
4415
|
"fetcher-cache-key": s.value,
|
|
4400
4416
|
"pagination-type": "offset",
|
|
4401
4417
|
"preferences-storage-key": "kong-ui-entities-consumer-groups-list",
|
|
4402
4418
|
query: I.value,
|
|
4403
4419
|
"row-attributes": g,
|
|
4404
4420
|
"table-headers": y(u),
|
|
4405
|
-
onClearSearchInput:
|
|
4406
|
-
"onClick:row":
|
|
4407
|
-
onEmptyStateCtaClicked:
|
|
4408
|
-
onSort:
|
|
4421
|
+
onClearSearchInput: K,
|
|
4422
|
+
"onClick:row": z[3] || (z[3] = (W) => w(W)),
|
|
4423
|
+
onEmptyStateCtaClicked: ae,
|
|
4424
|
+
onSort: h
|
|
4409
4425
|
}, {
|
|
4410
|
-
"toolbar-filter":
|
|
4411
|
-
l.value ?
|
|
4426
|
+
"toolbar-filter": v(() => [
|
|
4427
|
+
l.value ? H("", !0) : (m(), R(y(el), {
|
|
4412
4428
|
key: 0,
|
|
4413
4429
|
modelValue: I.value,
|
|
4414
|
-
"onUpdate:modelValue":
|
|
4415
|
-
config:
|
|
4430
|
+
"onUpdate:modelValue": z[0] || (z[0] = (W) => I.value = W),
|
|
4431
|
+
config: b.value
|
|
4416
4432
|
}, null, 8, ["modelValue", "config"]))
|
|
4417
4433
|
]),
|
|
4418
|
-
"toolbar-button":
|
|
4419
|
-
|
|
4434
|
+
"toolbar-button": v(() => [
|
|
4435
|
+
F(y(Xe), {
|
|
4420
4436
|
"auth-function": () => e.canCreate()
|
|
4421
4437
|
}, {
|
|
4422
|
-
default:
|
|
4423
|
-
|
|
4438
|
+
default: v(() => [
|
|
4439
|
+
F(re, {
|
|
4424
4440
|
appearance: "primary",
|
|
4425
4441
|
"data-testid": "toolbar-add-consumer-group",
|
|
4426
4442
|
icon: "plus",
|
|
4427
4443
|
to: e.config.consumerId ? void 0 : e.config.createRoute,
|
|
4428
|
-
onClick:
|
|
4444
|
+
onClick: z[1] || (z[1] = () => e.config.consumerId ? De() : void 0)
|
|
4429
4445
|
}, {
|
|
4430
|
-
default:
|
|
4431
|
-
|
|
4446
|
+
default: v(() => [
|
|
4447
|
+
Q(O(e.config.consumerId ? y(o)("consumer_groups.actions.add_to_group") : y(o)("consumer_groups.list.toolbar_actions.new_consumer_group")), 1)
|
|
4432
4448
|
]),
|
|
4433
4449
|
_: 1
|
|
4434
4450
|
}, 8, ["to"])
|
|
@@ -4436,22 +4452,22 @@ const Nt = (e, n) => {
|
|
|
4436
4452
|
_: 1
|
|
4437
4453
|
}, 8, ["auth-function"])
|
|
4438
4454
|
]),
|
|
4439
|
-
name:
|
|
4440
|
-
V("b", null,
|
|
4455
|
+
name: v(({ rowValue: W }) => [
|
|
4456
|
+
V("b", null, O(W ?? "-"), 1)
|
|
4441
4457
|
]),
|
|
4442
|
-
consumers_count:
|
|
4443
|
-
|
|
4458
|
+
consumers_count: v(({ rowValue: W }) => [
|
|
4459
|
+
Q(O(W ?? "-"), 1)
|
|
4444
4460
|
]),
|
|
4445
|
-
tags:
|
|
4446
|
-
(
|
|
4447
|
-
default:
|
|
4448
|
-
(m(!0), $(
|
|
4461
|
+
tags: v(({ rowValue: W }) => [
|
|
4462
|
+
(W == null ? void 0 : W.length) > 0 ? (m(), R(Ee, { key: 0 }, {
|
|
4463
|
+
default: v(() => [
|
|
4464
|
+
(m(!0), $(be, null, he(W, (Be) => (m(), R(ye, {
|
|
4449
4465
|
key: Be,
|
|
4450
|
-
onClick:
|
|
4466
|
+
onClick: z[2] || (z[2] = rt(() => {
|
|
4451
4467
|
}, ["stop"]))
|
|
4452
4468
|
}, {
|
|
4453
|
-
default:
|
|
4454
|
-
|
|
4469
|
+
default: v(() => [
|
|
4470
|
+
Q(O(Be), 1)
|
|
4455
4471
|
]),
|
|
4456
4472
|
_: 2
|
|
4457
4473
|
}, 1024))), 128))
|
|
@@ -4459,70 +4475,70 @@ const Nt = (e, n) => {
|
|
|
4459
4475
|
_: 2
|
|
4460
4476
|
}, 1024)) : (m(), $("span", hl, "-"))
|
|
4461
4477
|
]),
|
|
4462
|
-
actions:
|
|
4463
|
-
|
|
4464
|
-
default:
|
|
4465
|
-
|
|
4478
|
+
actions: v(({ row: W }) => [
|
|
4479
|
+
F(Bt, null, {
|
|
4480
|
+
default: v(({ copyToClipboard: Be }) => [
|
|
4481
|
+
F(He, {
|
|
4466
4482
|
"data-testid": "action-entity-copy-id",
|
|
4467
|
-
onClick: (fr) =>
|
|
4483
|
+
onClick: (fr) => se(W, Be)
|
|
4468
4484
|
}, {
|
|
4469
|
-
default:
|
|
4470
|
-
|
|
4485
|
+
default: v(() => [
|
|
4486
|
+
Q(O(y(o)("consumer_groups.actions.copy_id")), 1)
|
|
4471
4487
|
]),
|
|
4472
4488
|
_: 2
|
|
4473
4489
|
}, 1032, ["onClick"])
|
|
4474
4490
|
]),
|
|
4475
4491
|
_: 2
|
|
4476
4492
|
}, 1024),
|
|
4477
|
-
|
|
4478
|
-
default:
|
|
4479
|
-
|
|
4493
|
+
F(Bt, null, {
|
|
4494
|
+
default: v(({ copyToClipboard: Be }) => [
|
|
4495
|
+
F(He, {
|
|
4480
4496
|
"data-testid": "action-entity-copy-json",
|
|
4481
|
-
onClick: (fr) =>
|
|
4497
|
+
onClick: (fr) => Y(W, Be)
|
|
4482
4498
|
}, {
|
|
4483
|
-
default:
|
|
4484
|
-
|
|
4499
|
+
default: v(() => [
|
|
4500
|
+
Q(O(y(o)("consumer_groups.actions.copy_json")), 1)
|
|
4485
4501
|
]),
|
|
4486
4502
|
_: 2
|
|
4487
4503
|
}, 1032, ["onClick"])
|
|
4488
4504
|
]),
|
|
4489
4505
|
_: 2
|
|
4490
4506
|
}, 1024),
|
|
4491
|
-
|
|
4492
|
-
"auth-function": () => e.canRetrieve(
|
|
4507
|
+
F(y(Xe), {
|
|
4508
|
+
"auth-function": () => e.canRetrieve(W)
|
|
4493
4509
|
}, {
|
|
4494
|
-
default:
|
|
4495
|
-
|
|
4510
|
+
default: v(() => [
|
|
4511
|
+
F(He, {
|
|
4496
4512
|
"data-testid": "action-entity-view",
|
|
4497
4513
|
"has-divider": "",
|
|
4498
|
-
item:
|
|
4514
|
+
item: N(W.id)
|
|
4499
4515
|
}, null, 8, ["item"])
|
|
4500
4516
|
]),
|
|
4501
4517
|
_: 2
|
|
4502
4518
|
}, 1032, ["auth-function"]),
|
|
4503
|
-
|
|
4504
|
-
"auth-function": () => e.canEdit(
|
|
4519
|
+
F(y(Xe), {
|
|
4520
|
+
"auth-function": () => e.canEdit(W)
|
|
4505
4521
|
}, {
|
|
4506
|
-
default:
|
|
4507
|
-
|
|
4522
|
+
default: v(() => [
|
|
4523
|
+
F(He, {
|
|
4508
4524
|
"data-testid": "action-entity-edit",
|
|
4509
|
-
item:
|
|
4525
|
+
item: U(W.id)
|
|
4510
4526
|
}, null, 8, ["item"])
|
|
4511
4527
|
]),
|
|
4512
4528
|
_: 2
|
|
4513
4529
|
}, 1032, ["auth-function"]),
|
|
4514
|
-
|
|
4515
|
-
"auth-function": () => e.canDelete(
|
|
4530
|
+
F(y(Xe), {
|
|
4531
|
+
"auth-function": () => e.canDelete(W)
|
|
4516
4532
|
}, {
|
|
4517
|
-
default:
|
|
4518
|
-
|
|
4533
|
+
default: v(() => [
|
|
4534
|
+
F(He, {
|
|
4519
4535
|
danger: "",
|
|
4520
4536
|
"data-testid": "action-entity-delete",
|
|
4521
4537
|
"has-divider": "",
|
|
4522
|
-
onClick: () => e.config.consumerId ? _e(
|
|
4538
|
+
onClick: () => e.config.consumerId ? _e(W) : X(W)
|
|
4523
4539
|
}, {
|
|
4524
|
-
default:
|
|
4525
|
-
|
|
4540
|
+
default: v(() => [
|
|
4541
|
+
Q(O(e.config.consumerId ? y(o)("consumer_groups.actions.exit") : y(o)("consumer_groups.actions.delete")), 1)
|
|
4526
4542
|
]),
|
|
4527
4543
|
_: 2
|
|
4528
4544
|
}, 1032, ["onClick"])
|
|
@@ -4532,67 +4548,67 @@ const Nt = (e, n) => {
|
|
|
4532
4548
|
]),
|
|
4533
4549
|
_: 1
|
|
4534
4550
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4535
|
-
|
|
4536
|
-
"action-pending":
|
|
4551
|
+
F(y(Ps), {
|
|
4552
|
+
"action-pending": S.value,
|
|
4537
4553
|
"data-testid": "delete-consumer-group-modal",
|
|
4538
4554
|
description: y(o)("consumer_groups.delete.description"),
|
|
4539
|
-
"entity-name":
|
|
4555
|
+
"entity-name": C.value && (C.value.name || C.value.id),
|
|
4540
4556
|
"entity-type": y(yn).ConsumerGroup,
|
|
4541
|
-
error:
|
|
4557
|
+
error: q.value,
|
|
4542
4558
|
title: y(o)("consumer_groups.delete.title"),
|
|
4543
|
-
visible:
|
|
4544
|
-
onCancel:
|
|
4545
|
-
onProceed:
|
|
4559
|
+
visible: x.value,
|
|
4560
|
+
onCancel: ee,
|
|
4561
|
+
onProceed: te
|
|
4546
4562
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4547
4563
|
e.config.consumerId ? (m(), R(gl, {
|
|
4548
4564
|
key: 0,
|
|
4549
4565
|
config: e.config,
|
|
4550
4566
|
"data-testid": "add-to-group-modal",
|
|
4551
|
-
visible:
|
|
4552
|
-
"onAdd:partialSuccess":
|
|
4553
|
-
"onAdd:success":
|
|
4567
|
+
visible: le.value,
|
|
4568
|
+
"onAdd:partialSuccess": z[4] || (z[4] = (W) => B(W, !0)),
|
|
4569
|
+
"onAdd:success": z[5] || (z[5] = (W) => B(W)),
|
|
4554
4570
|
onCancel: _
|
|
4555
|
-
}, null, 8, ["config", "visible"])) :
|
|
4556
|
-
e.config.consumerId &&
|
|
4571
|
+
}, null, 8, ["config", "visible"])) : H("", !0),
|
|
4572
|
+
e.config.consumerId && P.value ? (m(), R(pr, {
|
|
4557
4573
|
key: 1,
|
|
4558
4574
|
"data-testid": "exit-group-modal",
|
|
4559
|
-
"is-visible":
|
|
4575
|
+
"is-visible": G.value,
|
|
4560
4576
|
title: y(o)("consumer_groups.consumers.exit.title"),
|
|
4561
4577
|
type: "danger",
|
|
4562
|
-
onCanceled:
|
|
4578
|
+
onCanceled: de,
|
|
4563
4579
|
onProceed: dr
|
|
4564
4580
|
}, {
|
|
4565
|
-
"body-content":
|
|
4566
|
-
|
|
4581
|
+
"body-content": v(() => [
|
|
4582
|
+
F(y(r), {
|
|
4567
4583
|
class: "exit-modal-message",
|
|
4568
4584
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
4569
4585
|
tag: "p"
|
|
4570
4586
|
}, Te({
|
|
4571
|
-
consumerGroup:
|
|
4572
|
-
V("strong", null,
|
|
4587
|
+
consumerGroup: v(() => [
|
|
4588
|
+
V("strong", null, O(P.value.name || P.value.id), 1)
|
|
4573
4589
|
]),
|
|
4574
4590
|
_: 2
|
|
4575
4591
|
}, [
|
|
4576
4592
|
e.config.consumerUsername ? {
|
|
4577
4593
|
name: "consumer",
|
|
4578
|
-
fn:
|
|
4579
|
-
V("strong", null,
|
|
4594
|
+
fn: v(() => [
|
|
4595
|
+
V("strong", null, O(e.config.consumerUsername), 1)
|
|
4580
4596
|
]),
|
|
4581
4597
|
key: "0"
|
|
4582
4598
|
} : void 0
|
|
4583
4599
|
]), 1032, ["keypath"]),
|
|
4584
|
-
V("p", null,
|
|
4600
|
+
V("p", null, O(y(o)("consumer_groups.consumers.exit.description")), 1)
|
|
4585
4601
|
]),
|
|
4586
4602
|
_: 1
|
|
4587
|
-
}, 8, ["is-visible", "title"])) :
|
|
4603
|
+
}, 8, ["is-visible", "title"])) : H("", !0)
|
|
4588
4604
|
]);
|
|
4589
4605
|
};
|
|
4590
4606
|
}
|
|
4591
4607
|
});
|
|
4592
|
-
const
|
|
4608
|
+
const Fl = /* @__PURE__ */ Ft(vl, [["__scopeId", "data-v-69c5dd3a"]]), bl = { class: "kong-ui-entities-consumer-group-form" }, Cl = { class: "select-item-label" }, kl = {
|
|
4593
4609
|
key: 0,
|
|
4594
4610
|
class: "select-item-desc"
|
|
4595
|
-
}, _l = /* @__PURE__ */
|
|
4611
|
+
}, _l = /* @__PURE__ */ oe({
|
|
4596
4612
|
__name: "ConsumerGroupForm",
|
|
4597
4613
|
props: {
|
|
4598
4614
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4610,8 +4626,8 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4610
4626
|
},
|
|
4611
4627
|
emits: ["update", "error", "loading"],
|
|
4612
4628
|
setup(e, { emit: n }) {
|
|
4613
|
-
var
|
|
4614
|
-
const t = e, { i18n: { t: r } } = ct.useI18n(), o = wt(), a =
|
|
4629
|
+
var te, le, De;
|
|
4630
|
+
const t = e, { i18n: { t: r } } = ct.useI18n(), o = wt(), a = qt({
|
|
4615
4631
|
fields: {
|
|
4616
4632
|
name: "",
|
|
4617
4633
|
tags: "",
|
|
@@ -4619,7 +4635,7 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4619
4635
|
},
|
|
4620
4636
|
errorMessage: "",
|
|
4621
4637
|
readonly: !1
|
|
4622
|
-
}), i =
|
|
4638
|
+
}), i = qt({
|
|
4623
4639
|
name: "",
|
|
4624
4640
|
tags: "",
|
|
4625
4641
|
consumers: []
|
|
@@ -4629,10 +4645,10 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4629
4645
|
error: c,
|
|
4630
4646
|
loadItems: d,
|
|
4631
4647
|
results: u
|
|
4632
|
-
} = cr(t.config, (
|
|
4648
|
+
} = cr(t.config, (le = $e.form[(te = t.config) == null ? void 0 : te.app]) == null ? void 0 : le.consumersList, "", {
|
|
4633
4649
|
fetchedItemsKey: "data",
|
|
4634
4650
|
searchKeys: ["username", "custom_id", "id"]
|
|
4635
|
-
}), { axiosInstance: g } =
|
|
4651
|
+
}), { axiosInstance: g } = Kt({
|
|
4636
4652
|
headers: (De = t.config) == null ? void 0 : De.requestHeaders
|
|
4637
4653
|
}), { getMessageFromError: f } = ll(), I = T(() => u.value.map((_) => ({
|
|
4638
4654
|
label: _.username || _.custom_id,
|
|
@@ -4640,127 +4656,127 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4640
4656
|
selected: a.fields.consumers.includes(_.id),
|
|
4641
4657
|
data: _
|
|
4642
4658
|
// we need this to determine whether or not to show the description text
|
|
4643
|
-
}))),
|
|
4644
|
-
var _,
|
|
4645
|
-
return (
|
|
4646
|
-
}), p = T(() => t.consumerGroupId ? nt.Edit : nt.Create),
|
|
4647
|
-
var
|
|
4648
|
-
let
|
|
4649
|
-
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ?
|
|
4650
|
-
},
|
|
4659
|
+
}))), b = T(() => {
|
|
4660
|
+
var _, B;
|
|
4661
|
+
return (B = $e.form[(_ = t.config) == null ? void 0 : _.app]) == null ? void 0 : B.edit;
|
|
4662
|
+
}), p = T(() => t.consumerGroupId ? nt.Edit : nt.Create), A = T(() => !!a.fields.name && !w.value), k = T(() => JSON.stringify(a.fields) !== JSON.stringify(i)), K = (_, B = "", ae = "") => {
|
|
4663
|
+
var G, ge, _e, de, Ne, Ge;
|
|
4664
|
+
let P = `${(G = t.config) == null ? void 0 : G.apiBaseUrl}${$e.form[(ge = t.config) == null ? void 0 : ge.app][_]}`;
|
|
4665
|
+
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? P = P.replace(/{controlPlaneId}/gi, ((de = t.config) == null ? void 0 : de.controlPlaneId) || "") : ((Ne = t.config) == null ? void 0 : Ne.app) === "kongManager" && (P = P.replace(/\/{workspace}/gi, (Ge = t.config) != null && Ge.workspace ? `/${t.config.workspace}` : "")), P = P.replace(/{id}/gi, B || t.consumerGroupId), (_ === "addConsumer" || _ === "removeConsumer") && (P = P.replace(/{consumerId}/gi, ae)), P;
|
|
4666
|
+
}, h = () => {
|
|
4651
4667
|
var _;
|
|
4652
4668
|
o.push(((_ = t.config) == null ? void 0 : _.cancelRoute) || { name: "consumer-group-list" });
|
|
4653
|
-
},
|
|
4669
|
+
}, D = (_) => {
|
|
4654
4670
|
n("error", _);
|
|
4655
|
-
},
|
|
4671
|
+
}, se = (_) => {
|
|
4656
4672
|
n("loading", _);
|
|
4657
|
-
},
|
|
4658
|
-
var
|
|
4659
|
-
a.fields.name = ((
|
|
4660
|
-
const
|
|
4661
|
-
if (a.fields.tags = (
|
|
4662
|
-
a.fields.consumers = ((ge = _ == null ? void 0 : _.consumers) == null ? void 0 : ge.map((
|
|
4673
|
+
}, Y = async (_) => {
|
|
4674
|
+
var ae, P, G, ge, _e;
|
|
4675
|
+
a.fields.name = ((ae = _ == null ? void 0 : _.item) == null ? void 0 : ae.name) || ((P = _ == null ? void 0 : _.consumer_group) == null ? void 0 : P.name) || (_ == null ? void 0 : _.name) || "";
|
|
4676
|
+
const B = ((G = _ == null ? void 0 : _.item) == null ? void 0 : G.tags) || (_ == null ? void 0 : _.consumer_group.tags) || (_ == null ? void 0 : _.tags) || [];
|
|
4677
|
+
if (a.fields.tags = (B == null ? void 0 : B.join(", ")) || "", "consumers" in _)
|
|
4678
|
+
a.fields.consumers = ((ge = _ == null ? void 0 : _.consumers) == null ? void 0 : ge.map((de) => de.id)) || [];
|
|
4663
4679
|
else
|
|
4664
4680
|
try {
|
|
4665
|
-
const { data:
|
|
4666
|
-
a.fields.consumers = "consumers" in
|
|
4667
|
-
} catch (
|
|
4668
|
-
|
|
4681
|
+
const { data: de } = await g.get(K("getConsumers"));
|
|
4682
|
+
a.fields.consumers = "consumers" in de ? (_e = de == null ? void 0 : de.consumers) == null ? void 0 : _e.map((Ne) => Ne.id) : [];
|
|
4683
|
+
} catch (de) {
|
|
4684
|
+
x(de);
|
|
4669
4685
|
}
|
|
4670
4686
|
Object.assign(i, a.fields);
|
|
4671
|
-
}, w = T(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")),
|
|
4672
|
-
var _,
|
|
4687
|
+
}, w = T(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")), N = () => {
|
|
4688
|
+
var _, B;
|
|
4673
4689
|
return {
|
|
4674
4690
|
name: a.fields.name,
|
|
4675
|
-
tags: (
|
|
4691
|
+
tags: (B = (_ = a.fields.tags.split(",")) == null ? void 0 : _.map((ae) => String(ae || "").trim())) == null ? void 0 : B.filter((ae) => ae !== "")
|
|
4676
4692
|
};
|
|
4677
|
-
},
|
|
4693
|
+
}, U = async (_, B = "") => await g.post(K("addConsumer", B, _), { consumer: _ }), C = async (_, B = "") => await g.delete(K("removeConsumer", B, _)), x = (_) => {
|
|
4678
4694
|
a.errorMessage = f(_), n("error", _);
|
|
4679
|
-
},
|
|
4695
|
+
}, S = (_ = t.consumerGroupId) => {
|
|
4680
4696
|
Object.assign(i, a.fields), n("update", { ...a.fields, id: _ });
|
|
4681
|
-
},
|
|
4682
|
-
const
|
|
4683
|
-
|
|
4684
|
-
code:
|
|
4685
|
-
message:
|
|
4686
|
-
}) :
|
|
4697
|
+
}, q = (_, B, ae = t.consumerGroupId) => {
|
|
4698
|
+
const P = _ == null ? void 0 : _.find((G) => G.status !== "fulfilled");
|
|
4699
|
+
P ? x({
|
|
4700
|
+
code: P.status,
|
|
4701
|
+
message: B
|
|
4702
|
+
}) : S(ae);
|
|
4687
4703
|
}, J = async () => {
|
|
4688
4704
|
let _ = "";
|
|
4689
4705
|
try {
|
|
4690
|
-
const { data:
|
|
4691
|
-
_ = "item" in
|
|
4692
|
-
} catch (
|
|
4693
|
-
|
|
4706
|
+
const { data: B } = await g.post(K("create"), N());
|
|
4707
|
+
_ = "item" in B ? B.item.id : B.id;
|
|
4708
|
+
} catch (B) {
|
|
4709
|
+
x(B);
|
|
4694
4710
|
}
|
|
4695
4711
|
if (a.fields.consumers.length > 0 && _)
|
|
4696
4712
|
try {
|
|
4697
|
-
const
|
|
4698
|
-
|
|
4699
|
-
} catch (
|
|
4700
|
-
|
|
4713
|
+
const B = a.fields.consumers.map((P) => U(P, _)), ae = await Promise.allSettled(B);
|
|
4714
|
+
q(ae, r("consumer_groups.errors.add_consumer"), _);
|
|
4715
|
+
} catch (B) {
|
|
4716
|
+
x(B);
|
|
4701
4717
|
}
|
|
4702
4718
|
else
|
|
4703
|
-
a.fields.consumers.length === 0 && _ &&
|
|
4704
|
-
},
|
|
4705
|
-
var
|
|
4719
|
+
a.fields.consumers.length === 0 && _ && S(_);
|
|
4720
|
+
}, X = async () => {
|
|
4721
|
+
var ae;
|
|
4706
4722
|
try {
|
|
4707
|
-
((
|
|
4708
|
-
} catch (
|
|
4709
|
-
|
|
4723
|
+
((ae = t.config) == null ? void 0 : ae.app) === "konnect" ? await g.put(K("edit"), N()) : await g.patch(K("edit"), N());
|
|
4724
|
+
} catch (P) {
|
|
4725
|
+
x(P);
|
|
4710
4726
|
}
|
|
4711
|
-
const _ = a.fields.consumers.filter((
|
|
4712
|
-
if (
|
|
4713
|
-
|
|
4727
|
+
const _ = a.fields.consumers.filter((P) => !i.consumers.includes(P)), B = i.consumers.filter((P) => !a.fields.consumers.includes(P));
|
|
4728
|
+
if (B.length === 0 && _.length === 0)
|
|
4729
|
+
S();
|
|
4714
4730
|
else {
|
|
4715
|
-
if (
|
|
4731
|
+
if (B.length > 0)
|
|
4716
4732
|
try {
|
|
4717
|
-
const
|
|
4718
|
-
|
|
4719
|
-
} catch (
|
|
4720
|
-
|
|
4733
|
+
const P = B.map((ge) => C(ge)), G = await Promise.allSettled(P);
|
|
4734
|
+
q(G, r("consumer_groups.errors.remove_consumer"));
|
|
4735
|
+
} catch (P) {
|
|
4736
|
+
x(P);
|
|
4721
4737
|
}
|
|
4722
4738
|
if (_.length > 0)
|
|
4723
4739
|
try {
|
|
4724
|
-
const
|
|
4725
|
-
|
|
4726
|
-
} catch (
|
|
4727
|
-
|
|
4740
|
+
const P = _.map((ge) => U(ge)), G = await Promise.allSettled(P);
|
|
4741
|
+
q(G, r("consumer_groups.errors.add_consumer"));
|
|
4742
|
+
} catch (P) {
|
|
4743
|
+
x(P);
|
|
4728
4744
|
}
|
|
4729
4745
|
}
|
|
4730
|
-
},
|
|
4746
|
+
}, ee = async () => {
|
|
4731
4747
|
try {
|
|
4732
|
-
a.readonly = !0, p.value === nt.Create ? await J() : await
|
|
4748
|
+
a.readonly = !0, p.value === nt.Create ? await J() : await X();
|
|
4733
4749
|
} finally {
|
|
4734
4750
|
a.readonly = !1;
|
|
4735
4751
|
}
|
|
4736
4752
|
};
|
|
4737
4753
|
return Qe(async () => {
|
|
4738
4754
|
await d();
|
|
4739
|
-
}), (_,
|
|
4740
|
-
const
|
|
4755
|
+
}), (_, B) => {
|
|
4756
|
+
const ae = L("KInput"), P = L("KMultiselect");
|
|
4741
4757
|
return m(), $("div", bl, [
|
|
4742
|
-
|
|
4743
|
-
"can-submit":
|
|
4758
|
+
F(y(Ts), {
|
|
4759
|
+
"can-submit": A.value && k.value,
|
|
4744
4760
|
config: e.config,
|
|
4745
4761
|
"edit-id": e.consumerGroupId,
|
|
4746
4762
|
"error-message": a.errorMessage || y(c) || w.value,
|
|
4747
|
-
"fetch-url":
|
|
4763
|
+
"fetch-url": b.value,
|
|
4748
4764
|
"is-readonly": a.readonly,
|
|
4749
|
-
onCancel:
|
|
4750
|
-
"onFetch:error":
|
|
4751
|
-
"onFetch:success":
|
|
4752
|
-
onLoading:
|
|
4753
|
-
onSubmit:
|
|
4765
|
+
onCancel: h,
|
|
4766
|
+
"onFetch:error": B[3] || (B[3] = (G) => D(G)),
|
|
4767
|
+
"onFetch:success": Y,
|
|
4768
|
+
onLoading: B[4] || (B[4] = (G) => se(G)),
|
|
4769
|
+
onSubmit: ee
|
|
4754
4770
|
}, {
|
|
4755
|
-
default:
|
|
4756
|
-
|
|
4771
|
+
default: v(() => [
|
|
4772
|
+
F(y(dn), {
|
|
4757
4773
|
description: y(r)("consumer_groups.form.general_info.description"),
|
|
4758
4774
|
title: y(r)("consumer_groups.form.general_info.title")
|
|
4759
4775
|
}, {
|
|
4760
|
-
default:
|
|
4761
|
-
|
|
4776
|
+
default: v(() => [
|
|
4777
|
+
F(ae, {
|
|
4762
4778
|
modelValue: a.fields.name,
|
|
4763
|
-
"onUpdate:modelValue":
|
|
4779
|
+
"onUpdate:modelValue": B[0] || (B[0] = (G) => a.fields.name = G),
|
|
4764
4780
|
modelModifiers: { trim: !0 },
|
|
4765
4781
|
autocomplete: "off",
|
|
4766
4782
|
"data-testid": "consumer-group-form-name",
|
|
@@ -4769,9 +4785,9 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4769
4785
|
required: "",
|
|
4770
4786
|
type: "text"
|
|
4771
4787
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
4772
|
-
|
|
4788
|
+
F(ae, {
|
|
4773
4789
|
modelValue: a.fields.tags,
|
|
4774
|
-
"onUpdate:modelValue":
|
|
4790
|
+
"onUpdate:modelValue": B[1] || (B[1] = (G) => a.fields.tags = G),
|
|
4775
4791
|
modelModifiers: { trim: !0 },
|
|
4776
4792
|
autocomplete: "off",
|
|
4777
4793
|
"data-testid": "consumer-group-form-tags",
|
|
@@ -4787,15 +4803,15 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4787
4803
|
]),
|
|
4788
4804
|
_: 1
|
|
4789
4805
|
}, 8, ["description", "title"]),
|
|
4790
|
-
|
|
4806
|
+
F(y(dn), {
|
|
4791
4807
|
description: y(r)("consumer_groups.form.consumers.description"),
|
|
4792
4808
|
"has-divider": "",
|
|
4793
4809
|
title: y(r)("consumer_groups.form.consumers.title")
|
|
4794
4810
|
}, {
|
|
4795
|
-
default:
|
|
4796
|
-
|
|
4811
|
+
default: v(() => [
|
|
4812
|
+
F(P, {
|
|
4797
4813
|
modelValue: a.fields.consumers,
|
|
4798
|
-
"onUpdate:modelValue":
|
|
4814
|
+
"onUpdate:modelValue": B[2] || (B[2] = (G) => a.fields.consumers = G),
|
|
4799
4815
|
appearance: "select",
|
|
4800
4816
|
autosuggest: "",
|
|
4801
4817
|
"expand-selected": "",
|
|
@@ -4806,11 +4822,11 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4806
4822
|
width: "auto",
|
|
4807
4823
|
onQueryChange: y(s)
|
|
4808
4824
|
}, {
|
|
4809
|
-
"item-template":
|
|
4810
|
-
var ge, _e,
|
|
4825
|
+
"item-template": v(({ item: G }) => {
|
|
4826
|
+
var ge, _e, de;
|
|
4811
4827
|
return [
|
|
4812
|
-
V("div", Cl,
|
|
4813
|
-
(ge =
|
|
4828
|
+
V("div", Cl, O(G.label), 1),
|
|
4829
|
+
(ge = G == null ? void 0 : G.data) != null && ge.username && ((_e = G == null ? void 0 : G.data) != null && _e.custom_id) ? (m(), $("div", kl, O((de = G == null ? void 0 : G.data) == null ? void 0 : de.custom_id), 1)) : H("", !0)
|
|
4814
4830
|
];
|
|
4815
4831
|
}),
|
|
4816
4832
|
_: 1
|
|
@@ -4825,7 +4841,7 @@ const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { cl
|
|
|
4825
4841
|
};
|
|
4826
4842
|
}
|
|
4827
4843
|
});
|
|
4828
|
-
const
|
|
4844
|
+
const Nl = /* @__PURE__ */ Ft(_l, [["__scopeId", "data-v-102d40d2"]]), wl = { class: "kong-ui-consumer-group-entity-config-card" }, Bl = /* @__PURE__ */ oe({
|
|
4829
4845
|
__name: "ConsumerGroupConfigCard",
|
|
4830
4846
|
props: {
|
|
4831
4847
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4852,7 +4868,7 @@ const Kl = /* @__PURE__ */ Nt(_l, [["__scopeId", "data-v-102d40d2"]]), wl = { cl
|
|
|
4852
4868
|
},
|
|
4853
4869
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
4854
4870
|
setup(e) {
|
|
4855
|
-
const n = e, { i18n: { t } } = ct.useI18n(), r = T(() => $e.form[n.config.app].edit), o =
|
|
4871
|
+
const n = e, { i18n: { t } } = ct.useI18n(), r = T(() => $e.form[n.config.app].edit), o = E({
|
|
4856
4872
|
id: {},
|
|
4857
4873
|
name: {},
|
|
4858
4874
|
created_at: {},
|
|
@@ -4862,7 +4878,7 @@ const Kl = /* @__PURE__ */ Nt(_l, [["__scopeId", "data-v-102d40d2"]]), wl = { cl
|
|
|
4862
4878
|
}
|
|
4863
4879
|
});
|
|
4864
4880
|
return (a, i) => (m(), $("div", wl, [
|
|
4865
|
-
|
|
4881
|
+
F(y(Is), {
|
|
4866
4882
|
config: e.config,
|
|
4867
4883
|
"config-card-doc": e.configCardDoc,
|
|
4868
4884
|
"config-schema": o.value,
|
|
@@ -4879,6 +4895,6 @@ const Kl = /* @__PURE__ */ Nt(_l, [["__scopeId", "data-v-102d40d2"]]), wl = { cl
|
|
|
4879
4895
|
});
|
|
4880
4896
|
export {
|
|
4881
4897
|
Bl as ConsumerGroupConfigCard,
|
|
4882
|
-
|
|
4883
|
-
|
|
4898
|
+
Nl as ConsumerGroupForm,
|
|
4899
|
+
Fl as ConsumerGroupList
|
|
4884
4900
|
};
|