@kong-ui-public/entities-consumer-groups 2.0.4-pr.920.df7fcfd1.0 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as re, ref as O, computed as T, watch as Se, renderSlot as W, createCommentVNode as G, unref as y, useSlots as ut, onBeforeMount as Qe, resolveComponent as q, openBlock as m, createBlock as R, createSlots as Te, withCtx as h, createElementVNode as V, createTextVNode as Z, toDisplayString as F, createVNode as N, createElementBlock as $, renderList as ye, Fragment as ve, normalizeClass as Ne, withModifiers as rt, withDirectives as et, vShow as tt, useCssVars as mr, resolveDynamicComponent as Ve, normalizeProps as gr, guardReactiveProps as yr, mergeProps as ht, onMounted as hr, onUnmounted as vr, normalizeStyle as pn, inject as br, pushScopeId as fn, popScopeId as mn, reactive as Pt } from "vue";
|
|
2
2
|
import { useRouter as wt } from "vue-router";
|
|
3
3
|
import { createI18n as It, i18nTComponent as gn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Cr from "axios";
|
|
@@ -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 || {}), te = /* @__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))(te || {}), be = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(be || {});
|
|
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
|
+
}, jr = {
|
|
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
|
+
}, Mr = {
|
|
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
|
+
}, Fr = {
|
|
270
270
|
errors: {
|
|
271
271
|
fetch: "Could not fetch available items",
|
|
272
272
|
invalid: "Please select a valid value"
|
|
273
273
|
}
|
|
274
|
-
},
|
|
274
|
+
}, Nr = {
|
|
275
275
|
unexpected: "An unexpected error has occurred",
|
|
276
276
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
277
|
-
},
|
|
277
|
+
}, Kr = {
|
|
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: jr,
|
|
292
|
+
baseTable: Mr,
|
|
293
293
|
baseConfigCard: Er,
|
|
294
294
|
filter: Or,
|
|
295
|
-
debouncedFilter:
|
|
296
|
-
errors:
|
|
297
|
-
toggleModal:
|
|
295
|
+
debouncedFilter: Fr,
|
|
296
|
+
errors: Nr,
|
|
297
|
+
toggleModal: Kr
|
|
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 Pr(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 (A) => {
|
|
359
|
+
await C(A);
|
|
360
|
+
}, 200), l = O(!1), c = O(""), d = O(""), u = O([]), g = O([]), f = O(void 0), I = y(n);
|
|
361
|
+
let v = `${e.apiBaseUrl}${I}`;
|
|
362
|
+
e.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
363
|
+
const { isValidUuid: p } = hn(), x = async () => {
|
|
364
364
|
try {
|
|
365
365
|
l.value = !0;
|
|
366
|
-
const { data:
|
|
367
|
-
|
|
366
|
+
const { data: A } = await o.get(`${v}?size=${t}`);
|
|
367
|
+
A != null && A.next || (f.value = r.fetchedItemsKey in A ? A[r.fetchedItemsKey] : []), g.value = r.fetchedItemsKey in A ? A[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
|
+
}, b = O(""), C = async (A) => {
|
|
374
|
+
var ne, pe, z;
|
|
375
|
+
if (b.value !== A)
|
|
376
|
+
if (b.value = A || "", 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 = v + "";
|
|
380
|
+
A && (w += `/${A}`);
|
|
381
|
+
const { data: K } = await o.get(`${w}?size=${t}`);
|
|
382
|
+
r.fetchedItemsKey in K ? u.value = K[r.fetchedItemsKey] : K != null && K.id ? u.value = [K] : u.value = [];
|
|
383
|
+
} else if (A) {
|
|
384
384
|
const w = [];
|
|
385
|
-
p(
|
|
386
|
-
const { data:
|
|
387
|
-
return [
|
|
385
|
+
p(A) && r.searchKeys.includes("id") ? w.push((async () => {
|
|
386
|
+
const { data: k } = await o.get(`${v}/${A}`);
|
|
387
|
+
return [k[r.fetchedItemsKey] ?? k];
|
|
388
388
|
})()) : w.push(
|
|
389
|
-
...r.searchKeys.filter((
|
|
390
|
-
const { data:
|
|
391
|
-
return
|
|
389
|
+
...r.searchKeys.filter((k) => k !== "id").map(async (k) => {
|
|
390
|
+
const { data: S } = await o.get(`${v}?${k}=${A}`);
|
|
391
|
+
return S[r.fetchedItemsKey];
|
|
392
392
|
})
|
|
393
393
|
);
|
|
394
|
-
const
|
|
395
|
-
u.value = [], (
|
|
396
|
-
var
|
|
397
|
-
(
|
|
398
|
-
|
|
394
|
+
const K = await Promise.all(w), B = /* @__PURE__ */ new Set();
|
|
395
|
+
u.value = [], (ne = K == null ? void 0 : K.forEach) == null || ne.call(K, (k) => {
|
|
396
|
+
var S;
|
|
397
|
+
(S = k == null ? void 0 : k.forEach) == null || S.call(k, (j) => {
|
|
398
|
+
B.has(j.id) || (B.add(j.id), u.value.push(j));
|
|
399
399
|
});
|
|
400
400
|
});
|
|
401
401
|
} else
|
|
402
402
|
u.value = g.value;
|
|
403
403
|
} catch (w) {
|
|
404
|
-
((
|
|
404
|
+
((pe = w == null ? void 0 : w.response) == null ? void 0 : pe.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 = "", A ? (u.value = (z = f.value) == null ? void 0 : z.filter((w) => {
|
|
410
|
+
var K;
|
|
411
|
+
let B = !1;
|
|
412
|
+
for (const k of r.searchKeys) {
|
|
413
|
+
const S = typeof w[k] == "string" ? (K = w[k]) == null ? void 0 : K.toLowerCase() : w[k];
|
|
414
|
+
S != null && S.includes(A.toLowerCase()) && (B = !0);
|
|
415
415
|
}
|
|
416
|
-
return
|
|
416
|
+
return B;
|
|
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 qr(e, n, t, r = {
|
|
|
422
422
|
validationError: d,
|
|
423
423
|
results: u,
|
|
424
424
|
allRecords: f,
|
|
425
|
-
loadItems:
|
|
425
|
+
loadItems: x,
|
|
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 qr() {
|
|
436
436
|
const { i18n: { t: e } } = xt();
|
|
437
437
|
return {
|
|
438
438
|
getMessageFromError: (n) => {
|
|
@@ -460,11 +460,11 @@ function Pr() {
|
|
|
460
460
|
}
|
|
461
461
|
};
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function Ur(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() === "");
|
|
467
|
-
if (
|
|
467
|
+
if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(o) && !a && new URL(o))
|
|
468
468
|
return `${t}${r}`;
|
|
469
469
|
throw new Error("Invalid url");
|
|
470
470
|
} catch (r) {
|
|
@@ -472,7 +472,7 @@ function Vr(e) {
|
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
function vn(e, n) {
|
|
475
|
-
const t =
|
|
475
|
+
const t = O(y(e)), r = O(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, v) => {
|
|
485
|
+
f.searchParams.append(v, 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 Vr(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 = O({
|
|
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
|
+
}, qt = (e) => e === "*" || e === "x" || e === "X", Ut = (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 (qt(e) || qt(n))
|
|
553
553
|
return 0;
|
|
554
|
-
const [t, r] = Dr(
|
|
554
|
+
const [t, r] = Dr(Ut(e), Ut(n));
|
|
555
555
|
return t > r ? 1 : t < r ? -1 : 0;
|
|
556
|
-
},
|
|
556
|
+
}, Vt = (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
|
+
}, zr = (e, n) => {
|
|
564
|
+
const t = Lt(e), r = Lt(n), o = t.pop(), a = r.pop(), i = Vt(t, r);
|
|
565
|
+
return i !== 0 ? i : o && a ? Vt(o.split("."), a.split(".")) : o || a ? o ? -1 : 1 : 0;
|
|
566
566
|
}, Rt = (e, n, t) => {
|
|
567
|
-
|
|
568
|
-
const r =
|
|
567
|
+
Hr(t);
|
|
568
|
+
const r = zr(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), Hr = (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 = O(0), t = O(0), r = O(!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 ue = {
|
|
605
605
|
useAxios: At,
|
|
606
|
-
useDebouncedFilter:
|
|
606
|
+
useDebouncedFilter: Pr,
|
|
607
607
|
useDeleteUrlBuilder: Lr,
|
|
608
|
-
useErrors:
|
|
609
|
-
useExternalLinkCreator:
|
|
610
|
-
useFetcher:
|
|
608
|
+
useErrors: qr,
|
|
609
|
+
useExternalLinkCreator: Ur,
|
|
610
|
+
useFetcher: Vr,
|
|
611
611
|
useFetchUrlBuilder: vn,
|
|
612
612
|
useHelpers: hn,
|
|
613
613
|
useStringHelpers: Rr,
|
|
@@ -634,7 +634,7 @@ const ce = {
|
|
|
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__ */ re({
|
|
638
638
|
__name: "CopyIcon",
|
|
639
639
|
props: {
|
|
640
640
|
/** The accessibility text provided to screen readers */
|
|
@@ -703,13 +703,13 @@ const ce = {
|
|
|
703
703
|
lineHeight: "0",
|
|
704
704
|
width: t.value
|
|
705
705
|
}));
|
|
706
|
-
return (o, a) => (m(), R(
|
|
706
|
+
return (o, a) => (m(), R(Ve(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: h(() => [
|
|
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 ce = {
|
|
|
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, F(e.title), 1)) : G("", !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"], zt = 15, po = /* @__PURE__ */ re({
|
|
731
731
|
__name: "CopyUuid",
|
|
732
732
|
props: {
|
|
733
733
|
uuid: {
|
|
@@ -778,7 +778,7 @@ const ce = {
|
|
|
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 = O(t.tooltip), l = T(() => t.tooltip ? {
|
|
782
782
|
label: s.value,
|
|
783
783
|
positionFixed: !0,
|
|
784
784
|
maxWidth: "500px",
|
|
@@ -799,38 +799,38 @@ const ce = {
|
|
|
799
799
|
}), i.value ? d(r("message.fail")) : n("error", t.uuid);
|
|
800
800
|
return;
|
|
801
801
|
}
|
|
802
|
-
const
|
|
802
|
+
const v = ((f = t.uuid) == null ? void 0 : f.length) > zt, p = t.format === "hidden" || t.format === "redacted" ? r("message.success.prefix") : `"${((I = t.uuid) == null ? void 0 : I.substring(0, zt)) + (v ? "..." : "")}"`;
|
|
803
803
|
typeof o == "function" && o({
|
|
804
804
|
type: "success",
|
|
805
805
|
message: `${p}${r("message.success.content")}`
|
|
806
806
|
}), i.value ? d(t.successTooltip) : n("success", t.uuid);
|
|
807
807
|
};
|
|
808
808
|
return (g, f) => {
|
|
809
|
-
const I =
|
|
809
|
+
const I = q("KClipboardProvider");
|
|
810
810
|
return m(), $("div", uo, [
|
|
811
|
-
e.format !== "hidden" ? (m(), R(
|
|
812
|
-
default:
|
|
811
|
+
e.format !== "hidden" ? (m(), R(Ve(e.idTooltip ? "KTooltip" : "div"), ht({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
812
|
+
default: h(() => [
|
|
813
813
|
V("div", {
|
|
814
|
-
class:
|
|
814
|
+
class: Ne([
|
|
815
815
|
"uuid-container",
|
|
816
816
|
e.truncated ? "truncated-uuid" : null,
|
|
817
817
|
e.useMono ? "mono" : null
|
|
818
818
|
])
|
|
819
|
-
},
|
|
819
|
+
}, F(c.value), 3)
|
|
820
820
|
]),
|
|
821
821
|
_: 1
|
|
822
|
-
}, 16)) :
|
|
823
|
-
(m(), R(
|
|
824
|
-
default:
|
|
825
|
-
|
|
826
|
-
default:
|
|
822
|
+
}, 16)) : G("", !0),
|
|
823
|
+
(m(), R(Ve(e.tooltip ? "KTooltip" : "div"), ht(l.value, { class: "uuid-icon-wrapper" }), {
|
|
824
|
+
default: h(() => [
|
|
825
|
+
N(I, null, {
|
|
826
|
+
default: h(({ copyToClipboard: v }) => [
|
|
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(v), ["stop"])
|
|
832
832
|
}, [
|
|
833
|
-
|
|
833
|
+
N(y(so), {
|
|
834
834
|
class: "uuid-icon",
|
|
835
835
|
color: e.iconColor,
|
|
836
836
|
decorative: !!e.tooltip,
|
|
@@ -855,7 +855,7 @@ const ce = {
|
|
|
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__ */ re({
|
|
859
859
|
__name: "JsonCardItem",
|
|
860
860
|
props: {
|
|
861
861
|
item: {
|
|
@@ -872,21 +872,21 @@ const ce = {
|
|
|
872
872
|
}
|
|
873
873
|
},
|
|
874
874
|
setup(e) {
|
|
875
|
-
const n = e, { i18n: { t } } =
|
|
875
|
+
const n = e, { i18n: { t } } = ue.useI18n(), { convertKeyToTitle: r } = ue.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(Ve(e.isArrayItem ? "fieldset" : "div"), {
|
|
883
|
+
class: Ne(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
884
884
|
}, {
|
|
885
|
-
default:
|
|
885
|
+
default: h(() => [
|
|
886
886
|
e.isArrayItem ? (m(), $("legend", mo, [
|
|
887
|
-
V("b", null,
|
|
888
|
-
])) :
|
|
889
|
-
(m(!0), $(
|
|
887
|
+
V("b", null, F(s.value), 1)
|
|
888
|
+
])) : G("", !0),
|
|
889
|
+
(m(!0), $(ve, null, ye(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 ce = {
|
|
|
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__ */ re({
|
|
907
907
|
__name: "InternalLinkItem",
|
|
908
908
|
props: {
|
|
909
909
|
item: {
|
|
@@ -913,24 +913,24 @@ const ce = {
|
|
|
913
913
|
},
|
|
914
914
|
emits: ["navigation-click"],
|
|
915
915
|
setup(e) {
|
|
916
|
-
const { i18n: { t: n } } =
|
|
916
|
+
const { i18n: { t: n } } = ue.useI18n();
|
|
917
917
|
return (t, r) => {
|
|
918
|
-
const o =
|
|
918
|
+
const o = q("KButton");
|
|
919
919
|
return m(), $("div", null, [
|
|
920
|
-
|
|
920
|
+
N(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: h(() => [
|
|
926
|
+
Z(F(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__ */ re({
|
|
934
934
|
__name: "StatusBadge",
|
|
935
935
|
props: {
|
|
936
936
|
status: {
|
|
@@ -939,24 +939,24 @@ const ce = {
|
|
|
939
939
|
}
|
|
940
940
|
},
|
|
941
941
|
setup(e) {
|
|
942
|
-
const { i18n: { t: n } } =
|
|
942
|
+
const { i18n: { t: n } } = ue.useI18n();
|
|
943
943
|
return (t, r) => {
|
|
944
|
-
const o =
|
|
944
|
+
const o = q("KBadge");
|
|
945
945
|
return m(), R(o, {
|
|
946
946
|
appearance: e.status ? "success" : "neutral"
|
|
947
947
|
}, {
|
|
948
|
-
default:
|
|
949
|
-
|
|
948
|
+
default: h(() => [
|
|
949
|
+
Z(F(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 }, jo = ["data-testid"], Mo = ["data-testid"], Eo = ["data-testid"], Oo = ["data-testid"], Fo = {
|
|
956
956
|
name: "ConfigCardItem",
|
|
957
957
|
components: { CopyUuid: kn, JsonCardItem: _n, StatusBadge: vo, InternalLinkItem: ho }
|
|
958
|
-
},
|
|
959
|
-
...
|
|
958
|
+
}, No = /* @__PURE__ */ re({
|
|
959
|
+
...Fo,
|
|
960
960
|
props: {
|
|
961
961
|
item: {
|
|
962
962
|
type: Object,
|
|
@@ -982,9 +982,9 @@ const ce = {
|
|
|
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 } } = ue.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 === te.Json || t.item.type === te.JsonArray), c = T(() => t.item.type === te.JsonArray), d = T(() => {
|
|
986
986
|
switch (t.item.type) {
|
|
987
|
-
case
|
|
987
|
+
case te.ID:
|
|
988
988
|
return {
|
|
989
989
|
tag: "CopyUuid",
|
|
990
990
|
attrs: {
|
|
@@ -997,7 +997,7 @@ const ce = {
|
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
};
|
|
1000
|
-
case
|
|
1000
|
+
case te.IdArray:
|
|
1001
1001
|
return {
|
|
1002
1002
|
tag: "div",
|
|
1003
1003
|
additionalComponent: "CopyUuid",
|
|
@@ -1009,7 +1009,7 @@ const ce = {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
}
|
|
1011
1011
|
};
|
|
1012
|
-
case
|
|
1012
|
+
case te.Redacted:
|
|
1013
1013
|
return {
|
|
1014
1014
|
tag: "CopyUuid",
|
|
1015
1015
|
attrs: {
|
|
@@ -1023,7 +1023,7 @@ const ce = {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
}
|
|
1025
1025
|
};
|
|
1026
|
-
case
|
|
1026
|
+
case te.RedactedArray:
|
|
1027
1027
|
return {
|
|
1028
1028
|
tag: "div",
|
|
1029
1029
|
additionalComponent: "CopyUuid",
|
|
@@ -1036,7 +1036,7 @@ const ce = {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
}
|
|
1038
1038
|
};
|
|
1039
|
-
case
|
|
1039
|
+
case te.Date:
|
|
1040
1040
|
return {
|
|
1041
1041
|
tag: "div",
|
|
1042
1042
|
attrs: {
|
|
@@ -1044,7 +1044,7 @@ const ce = {
|
|
|
1044
1044
|
},
|
|
1045
1045
|
text: a(t.item.value)
|
|
1046
1046
|
};
|
|
1047
|
-
case
|
|
1047
|
+
case te.BadgeStatus:
|
|
1048
1048
|
return {
|
|
1049
1049
|
tag: "StatusBadge",
|
|
1050
1050
|
attrs: {
|
|
@@ -1052,17 +1052,17 @@ const ce = {
|
|
|
1052
1052
|
status: t.item.value
|
|
1053
1053
|
}
|
|
1054
1054
|
};
|
|
1055
|
-
case
|
|
1055
|
+
case te.BadgeTag:
|
|
1056
1056
|
return {
|
|
1057
1057
|
tag: "div",
|
|
1058
1058
|
additionalComponent: "KBadge"
|
|
1059
1059
|
};
|
|
1060
|
-
case
|
|
1060
|
+
case te.BadgeMethod:
|
|
1061
1061
|
return {
|
|
1062
1062
|
tag: "div",
|
|
1063
1063
|
additionalComponent: "KMethodBadge"
|
|
1064
1064
|
};
|
|
1065
|
-
case
|
|
1065
|
+
case te.LinkInternal:
|
|
1066
1066
|
return {
|
|
1067
1067
|
tag: "InternalLinkItem",
|
|
1068
1068
|
attrs: {
|
|
@@ -1073,7 +1073,7 @@ const ce = {
|
|
|
1073
1073
|
}
|
|
1074
1074
|
}
|
|
1075
1075
|
};
|
|
1076
|
-
case
|
|
1076
|
+
case te.LinkExternal:
|
|
1077
1077
|
return {
|
|
1078
1078
|
tag: "KExternalLink",
|
|
1079
1079
|
attrs: {
|
|
@@ -1082,7 +1082,7 @@ const ce = {
|
|
|
1082
1082
|
},
|
|
1083
1083
|
text: t.item.value
|
|
1084
1084
|
};
|
|
1085
|
-
case
|
|
1085
|
+
case te.Json:
|
|
1086
1086
|
return {
|
|
1087
1087
|
tag: "JsonCardItem",
|
|
1088
1088
|
attrs: {
|
|
@@ -1090,7 +1090,7 @@ const ce = {
|
|
|
1090
1090
|
item: t.item
|
|
1091
1091
|
}
|
|
1092
1092
|
};
|
|
1093
|
-
case
|
|
1093
|
+
case te.JsonArray:
|
|
1094
1094
|
return {
|
|
1095
1095
|
tag: "div",
|
|
1096
1096
|
additionalComponent: "JsonCardItem",
|
|
@@ -1108,29 +1108,29 @@ const ce = {
|
|
|
1108
1108
|
text: t.item.value
|
|
1109
1109
|
};
|
|
1110
1110
|
}
|
|
1111
|
-
}), u =
|
|
1111
|
+
}), u = O(), { isTruncated: g } = ue.useTruncationDetector(u);
|
|
1112
1112
|
return (f, I) => {
|
|
1113
|
-
const
|
|
1113
|
+
const v = q("KLabel"), p = q("KBadge"), x = q("KMethodBadge"), b = q("KTooltip");
|
|
1114
1114
|
return m(), $("div", Io, [
|
|
1115
1115
|
V("div", {
|
|
1116
1116
|
class: "config-card-details-label",
|
|
1117
1117
|
"data-testid": `${e.item.key}-label`
|
|
1118
1118
|
}, [
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
default:
|
|
1122
|
-
|
|
1119
|
+
W(f.$slots, "label", { item: e.item }, () => [
|
|
1120
|
+
N(v, { "tooltip-attributes": { maxWidth: "500px" } }, Te({
|
|
1121
|
+
default: h(() => [
|
|
1122
|
+
Z(F(e.item.label) + " ", 1)
|
|
1123
1123
|
]),
|
|
1124
1124
|
_: 2
|
|
1125
1125
|
}, [
|
|
1126
1126
|
s.value ? {
|
|
1127
1127
|
name: "tooltip",
|
|
1128
|
-
fn:
|
|
1128
|
+
fn: h(() => [
|
|
1129
1129
|
V("div", {
|
|
1130
1130
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1131
1131
|
}, [
|
|
1132
|
-
|
|
1133
|
-
|
|
1132
|
+
W(f.$slots, "label-tooltip", {}, () => [
|
|
1133
|
+
Z(F(e.item.tooltip), 1)
|
|
1134
1134
|
], !0)
|
|
1135
1135
|
], 8, xo)
|
|
1136
1136
|
]),
|
|
@@ -1143,77 +1143,77 @@ const ce = {
|
|
|
1143
1143
|
class: "config-card-details-value",
|
|
1144
1144
|
"data-testid": `${e.item.key}-property-value`
|
|
1145
1145
|
}, [
|
|
1146
|
-
|
|
1146
|
+
W(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(Ve(d.value.tag), gr(yr(d.value.attrs)), {
|
|
1151
|
+
default: h(() => [
|
|
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), $(ve, null, ye(e.item.value, (C, A) => (m(), R(p, {
|
|
1157
|
+
key: `${e.item.key}-badge-tag-${A}`,
|
|
1158
1158
|
class: "config-badge",
|
|
1159
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1160
|
-
"truncation-tooltip":
|
|
1159
|
+
"data-testid": `${e.item.key}-badge-tag-${A}`,
|
|
1160
|
+
"truncation-tooltip": C
|
|
1161
1161
|
}, {
|
|
1162
|
-
default:
|
|
1163
|
-
|
|
1162
|
+
default: h(() => [
|
|
1163
|
+
Z(F(C), 1)
|
|
1164
1164
|
]),
|
|
1165
1165
|
_: 2
|
|
1166
1166
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
1167
|
-
], 8,
|
|
1167
|
+
], 8, jo)) : G("", !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), $(ve, null, ye(e.item.value, (C, A) => (m(), R(y(kn), ht(d.value.childAttrs, {
|
|
1174
|
+
key: `${e.item.key}-copy-uuid-${A}`,
|
|
1175
|
+
"data-testid": `${e.item.key}-copy-uuid-${A}`,
|
|
1176
|
+
uuid: C
|
|
1177
1177
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1178
|
-
], 8,
|
|
1178
|
+
], 8, Mo)) : 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), $(ve, null, ye(e.item.value, (C, A) => (m(), R(x, {
|
|
1184
|
+
key: `${e.item.key}-badge-method-${A}`,
|
|
1185
1185
|
class: "config-badge",
|
|
1186
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1186
|
+
"data-testid": `${e.item.key}-badge-method-${A}`,
|
|
1187
1187
|
"is-rounded": "",
|
|
1188
|
-
label:
|
|
1189
|
-
method: y(kr).includes(
|
|
1188
|
+
label: C,
|
|
1189
|
+
method: y(kr).includes(C.toLowerCase()) ? C.toLowerCase() : "custom"
|
|
1190
1190
|
}, {
|
|
1191
|
-
default:
|
|
1192
|
-
|
|
1191
|
+
default: h(() => [
|
|
1192
|
+
Z(F(C), 1)
|
|
1193
1193
|
]),
|
|
1194
1194
|
_: 2
|
|
1195
1195
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
1196
|
-
], 8, Eo)) :
|
|
1196
|
+
], 8, Eo)) : G("", !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), $(ve, null, ye(e.item.value, (C, A) => (m(), R(_n, {
|
|
1202
|
+
key: `json-array-item-${A}`,
|
|
1203
|
+
index: A,
|
|
1204
1204
|
"is-array-item": "",
|
|
1205
|
-
item:
|
|
1205
|
+
item: C
|
|
1206
1206
|
}, null, 8, ["index", "item"]))), 128))
|
|
1207
|
-
], 8, Oo)) : (m(), R(
|
|
1207
|
+
], 8, Oo)) : (m(), R(b, {
|
|
1208
1208
|
key: 4,
|
|
1209
1209
|
label: y(g) ? e.item.value : ""
|
|
1210
1210
|
}, {
|
|
1211
|
-
default:
|
|
1211
|
+
default: h(() => [
|
|
1212
1212
|
V("span", {
|
|
1213
1213
|
ref_key: "textContent",
|
|
1214
1214
|
ref: u,
|
|
1215
|
-
class:
|
|
1216
|
-
},
|
|
1215
|
+
class: Ne(["attrs-data-text", { truncated: e.truncated }])
|
|
1216
|
+
}, F(d.value.text), 3)
|
|
1217
1217
|
]),
|
|
1218
1218
|
_: 1
|
|
1219
1219
|
}, 8, ["label"]))
|
|
@@ -1229,18 +1229,18 @@ const ce = {
|
|
|
1229
1229
|
]);
|
|
1230
1230
|
};
|
|
1231
1231
|
}
|
|
1232
|
-
}), St = /* @__PURE__ */ ke(
|
|
1232
|
+
}), St = /* @__PURE__ */ ke(No, [["__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 Ko(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 Po(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 qo(e) {
|
|
1257
1257
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1258
1258
|
}
|
|
1259
|
-
var
|
|
1260
|
-
isNothing:
|
|
1261
|
-
isObject:
|
|
1259
|
+
var Uo = wn, Vo = Ko, Ro = Bo, Do = Lo, Go = qo, zo = Po, se = {
|
|
1260
|
+
isNothing: Uo,
|
|
1261
|
+
isObject: Vo,
|
|
1262
1262
|
toArray: Ro,
|
|
1263
1263
|
repeat: Do,
|
|
1264
1264
|
isNegativeZero: Go,
|
|
1265
|
-
extend:
|
|
1265
|
+
extend: zo
|
|
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 se.repeat(" ", n - e.length) + e;
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function Ho(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 zo(e, n) {
|
|
|
1305
1305
|
o[i - l],
|
|
1306
1306
|
e.position - (r[i] - r[i - l]),
|
|
1307
1307
|
u
|
|
1308
|
-
), s =
|
|
1308
|
+
), s = se.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 += se.repeat(" ", n.indent) + gt((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1311
|
+
`, s += se.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 zo(e, n) {
|
|
|
1316
1316
|
o[i + l],
|
|
1317
1317
|
e.position - (r[i] - r[i + l]),
|
|
1318
1318
|
u
|
|
1319
|
-
), s +=
|
|
1319
|
+
), s += se.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 = Ho, 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 de = Qo;
|
|
1359
|
+
function Ht(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 de)
|
|
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 de))
|
|
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 de))
|
|
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 = Ht(r, "implicit"), r.compiledExplicit = Ht(r, "explicit"), r.compiledTypeMap = Xo(r.compiledImplicit, r.compiledExplicit), r;
|
|
1414
1414
|
};
|
|
1415
|
-
var An = vt, xn = new
|
|
1415
|
+
var An = vt, xn = new de("tag:yaml.org,2002:str", {
|
|
1416
1416
|
kind: "scalar",
|
|
1417
1417
|
construct: function(e) {
|
|
1418
1418
|
return e !== null ? e : "";
|
|
1419
1419
|
}
|
|
1420
|
-
}), Sn = new
|
|
1420
|
+
}), Sn = new de("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 de("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 jn = new de("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 Mn = new de("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 && !se.isNegativeZero(e);
|
|
1575
1575
|
}
|
|
1576
|
-
var En = new
|
|
1576
|
+
var En = new de("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 (se.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 || se.isNegativeZero(e));
|
|
1652
1652
|
}
|
|
1653
|
-
var On = new
|
|
1653
|
+
var On = new de("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
|
+
}), Fn = $n.extend({
|
|
1661
1661
|
implicit: [
|
|
1662
|
-
Mn,
|
|
1663
1662
|
jn,
|
|
1663
|
+
Mn,
|
|
1664
1664
|
En,
|
|
1665
1665
|
On
|
|
1666
1666
|
]
|
|
1667
|
-
}),
|
|
1667
|
+
}), Nn = Fn, Kn = 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 : Kn.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 = Kn.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 Pn = new de("tag:yaml.org,2002:timestamp", {
|
|
1692
1692
|
kind: "scalar",
|
|
1693
1693
|
resolve: va,
|
|
1694
1694
|
construct: ba,
|
|
@@ -1698,7 +1698,7 @@ var qn = new pe("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 de("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 qn = new de("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 Un = new de("tag:yaml.org,2002:omap", {
|
|
1766
1766
|
kind: "sequence",
|
|
1767
1767
|
resolve: Ta,
|
|
1768
1768
|
construct: $a
|
|
1769
|
-
}),
|
|
1770
|
-
function
|
|
1769
|
+
}), ja = Object.prototype.toString;
|
|
1770
|
+
function Ma(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], ja.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 Vn = new de("tag:yaml.org,2002:pairs", {
|
|
1790
1790
|
kind: "sequence",
|
|
1791
|
-
resolve:
|
|
1791
|
+
resolve: Ma,
|
|
1792
1792
|
construct: Ea
|
|
1793
1793
|
}), Oa = Object.prototype.hasOwnProperty;
|
|
1794
|
-
function
|
|
1794
|
+
function Fa(e) {
|
|
1795
1795
|
if (e === null)
|
|
1796
1796
|
return !0;
|
|
1797
1797
|
var n, t = e;
|
|
@@ -1800,48 +1800,48 @@ function Ka(e) {
|
|
|
1800
1800
|
return !1;
|
|
1801
1801
|
return !0;
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1803
|
+
function Na(e) {
|
|
1804
1804
|
return e !== null ? e : {};
|
|
1805
1805
|
}
|
|
1806
|
-
var Rn = new
|
|
1806
|
+
var Rn = new de("tag:yaml.org,2002:set", {
|
|
1807
1807
|
kind: "mapping",
|
|
1808
|
-
resolve:
|
|
1809
|
-
construct:
|
|
1810
|
-
}), $t =
|
|
1808
|
+
resolve: Fa,
|
|
1809
|
+
construct: Na
|
|
1810
|
+
}), $t = Nn.extend({
|
|
1811
1811
|
implicit: [
|
|
1812
|
-
|
|
1812
|
+
Pn,
|
|
1813
1813
|
Ln
|
|
1814
1814
|
],
|
|
1815
1815
|
explicit: [
|
|
1816
|
-
|
|
1817
|
-
Vn,
|
|
1816
|
+
qn,
|
|
1818
1817
|
Un,
|
|
1818
|
+
Vn,
|
|
1819
1819
|
Rn
|
|
1820
1820
|
]
|
|
1821
|
-
}),
|
|
1821
|
+
}), Me = Object.prototype.hasOwnProperty, ot = 1, Dn = 2, Gn = 3, at = 4, yt = 1, Ka = 2, Jt = 3, Ba = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Pa = /[\x85\u2028\u2029]/, La = /[,\[\]\{\}]/, zn = /^(?:!|!!|![a-z\-]+!)$/i, Hn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1822
1822
|
function Yt(e) {
|
|
1823
1823
|
return Object.prototype.toString.call(e);
|
|
1824
1824
|
}
|
|
1825
1825
|
function we(e) {
|
|
1826
1826
|
return e === 10 || e === 13;
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1828
|
+
function Fe(e) {
|
|
1829
1829
|
return e === 9 || e === 32;
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1831
|
+
function he(e) {
|
|
1832
1832
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1833
1833
|
}
|
|
1834
|
-
function
|
|
1834
|
+
function qe(e) {
|
|
1835
1835
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1836
1836
|
}
|
|
1837
|
-
function
|
|
1837
|
+
function qa(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 Ua(e) {
|
|
1842
1842
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1844
|
+
function Va(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 Pe = 0; Pe < 256; Pe++)
|
|
1859
|
+
Jn[Pe] = Wt(Pe) ? 1 : 0, Yn[Pe] = Wt(Pe);
|
|
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], zn.test(r) || M(e, "ill-formed tag handle (first argument) of the TAG directive"), Me.call(e.tagMap, r) && M(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Hn.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 je(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 Me(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 (se.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], Me.call(n, a) || (n[a] = t[a], r[a] = !0);
|
|
1911
1911
|
}
|
|
1912
|
-
function
|
|
1912
|
+
function Ue(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 Ve(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 && !Me.call(t, o) && Me.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 Ve(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 jt(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 ae(e, n, t) {
|
|
1937
1937
|
for (var r = 0, o = e.input.charCodeAt(e.position); o !== 0; ) {
|
|
1938
|
-
for (;
|
|
1938
|
+
for (; Fe(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 (jt(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 ie(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 || he(t)));
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1957
|
-
n === 1 ? e.result += " " : n > 1 && (e.result +=
|
|
1956
|
+
function Mt(e, n) {
|
|
1957
|
+
n === 1 ? e.result += " " : n > 1 && (e.result += se.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), he(f) || qe(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), he(o) || t && qe(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), he(o) || t && qe(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), he(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 && qe(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, ae(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 && (je(e, a, i, !1), Mt(e, e.line - l), a = i = e.position, s = !1), Fe(f) || (i = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1984
1984
|
}
|
|
1985
|
-
return
|
|
1985
|
+
return je(e, a, i, !1), e.result ? !0 : (e.kind = u, e.result = g, !1);
|
|
1986
1986
|
}
|
|
1987
|
-
function
|
|
1987
|
+
function za(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 (je(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) ? (je(e, r, o, !0), Mt(e, ae(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 Ha(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 je(e, t, e.position, !0), e.position++, !0;
|
|
2008
2008
|
if (s === 92) {
|
|
2009
|
-
if (
|
|
2010
|
-
|
|
2009
|
+
if (je(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), we(s))
|
|
2010
|
+
ae(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 = Ua(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 = qa(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) ? (je(e, t, r, !0), Mt(e, ae(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), v, p, x, b;
|
|
2027
|
+
if (b = e.input.charCodeAt(e.position), b === 91)
|
|
2028
2028
|
d = 93, f = !1, s = [];
|
|
2029
|
-
else if (
|
|
2029
|
+
else if (b === 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), b = e.input.charCodeAt(++e.position); b !== 0; ) {
|
|
2034
|
+
if (ae(e, !0, n), b = e.input.charCodeAt(e.position), b === d)
|
|
2035
2035
|
return e.position++, e.tag = i, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
2036
|
-
t ?
|
|
2036
|
+
t ? b === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), p = v = x = null, u = g = !1, b === 63 && (c = e.input.charCodeAt(e.position + 1), he(c) && (u = g = !0, e.position++, ae(e, !0, n))), r = e.line, o = e.lineStart, a = e.position, Re(e, n, ot, !1, !0), p = e.tag, v = e.result, ae(e, !0, n), b = e.input.charCodeAt(e.position), (g || e.line === r) && b === 58 && (u = !0, b = e.input.charCodeAt(++e.position), ae(e, !0, n), Re(e, n, ot, !1, !0), x = e.result), f ? Ue(e, s, I, p, v, x, r, o, a) : u ? s.push(Ue(e, null, I, p, v, x, r, o, a)) : s.push(v), ae(e, !0, n), b = e.input.charCodeAt(e.position), b === 44 ? (t = !0, b = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2037
2037
|
}
|
|
2038
2038
|
M(e, "unexpected end of the stream within a flow collection");
|
|
2039
2039
|
}
|
|
@@ -2047,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 : Ka : M(e, "repeat of a chomping mode identifier");
|
|
2051
|
+
else if ((d = Va(u)) >= 0)
|
|
2052
2052
|
d === 0 ? M(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? M(e, "repeat of an indentation width identifier") : (s = n + d - 1, i = !0);
|
|
2053
2053
|
else
|
|
2054
2054
|
break;
|
|
2055
|
-
if (
|
|
2055
|
+
if (Fe(u)) {
|
|
2056
2056
|
do
|
|
2057
2057
|
u = e.input.charCodeAt(++e.position);
|
|
2058
|
-
while (
|
|
2058
|
+
while (Fe(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 (jt(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 += se.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 ? Fe(u) ? (c = !0, e.result += se.repeat(`
|
|
2078
|
+
`, a ? 1 + l : l)) : c ? (c = !1, e.result += se.repeat(`
|
|
2079
|
+
`, l + 1)) : l === 0 ? a && (e.result += " ") : e.result += se.repeat(`
|
|
2080
|
+
`, l) : e.result += se.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
|
+
je(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), !he(i)))); ) {
|
|
2092
|
+
if (s = !0, e.position++, ae(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), ae(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, v = null, p = !1, x = !1, b;
|
|
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), b = e.input.charCodeAt(e.position); b !== 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, (b === 63 || b === 58) && he(r))
|
|
2109
|
+
b === 63 ? (p && (Ue(e, u, g, f, I, null, i, s, l), f = I = v = null), x = !0, p = !0, o = !0) : p ? (p = !1, o = !0) : M(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, b = r;
|
|
2110
2110
|
else {
|
|
2111
2111
|
if (i = e.line, s = e.lineStart, l = e.position, !Re(e, t, Dn, !1, !0))
|
|
2112
2112
|
break;
|
|
2113
2113
|
if (e.line === a) {
|
|
2114
|
-
for (
|
|
2115
|
-
|
|
2116
|
-
if (
|
|
2117
|
-
|
|
2118
|
-
else if (
|
|
2114
|
+
for (b = e.input.charCodeAt(e.position); Fe(b); )
|
|
2115
|
+
b = e.input.charCodeAt(++e.position);
|
|
2116
|
+
if (b === 58)
|
|
2117
|
+
b = e.input.charCodeAt(++e.position), he(b) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ue(e, u, g, f, I, null, i, s, l), f = I = v = null), x = !0, p = !1, o = !1, f = e.tag, I = e.result;
|
|
2118
|
+
else if (x)
|
|
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 (x)
|
|
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 : v = e.result), p || (Ue(e, u, g, f, I, v, i, s, l), f = I = v = null), ae(e, !0, -1), b = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > n) && b !== 0)
|
|
2128
2128
|
M(e, "bad indentation of a mapping entry");
|
|
2129
2129
|
else if (e.lineIndent < n)
|
|
2130
2130
|
break;
|
|
2131
2131
|
}
|
|
2132
|
-
return p &&
|
|
2132
|
+
return p && Ue(e, u, g, f, I, null, i, s, l), x && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), x;
|
|
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 && !he(i); )
|
|
2145
|
+
i === 33 && (r ? M(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(n - 1, e.position + 1), zn.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 && !Hn.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 : Me.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 && !he(t) && !qe(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 && !he(r) && !qe(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), Me.call(e.anchorMap, t) || M(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], ae(e, !0, -1), !0;
|
|
2171
2171
|
}
|
|
2172
2172
|
function Re(e, n, t, r, o) {
|
|
2173
|
-
var a, i, s, l = 1, c = !1, d = !1, u, g, f, 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, v, 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 && ae(e, !0, -1) && (c = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2175
2175
|
for (; Za(e) || Qa(e); )
|
|
2176
|
-
|
|
2177
|
-
if (s && (s = c || o), (l === 1 || at === t) && (ot === t || Dn === t ?
|
|
2176
|
+
ae(e, !0, -1) ? (c = !0, s = a, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2177
|
+
if (s && (s = c || o), (l === 1 || at === t) && (ot === t || Dn === t ? v = n : v = n + 1, p = e.position - e.lineStart, l === 1 ? s && (Xt(e, p) || Wa(e, p, v)) || Ja(e, v) ? d = !0 : (i && Ya(e, v) || za(e, v) || Ha(e, v) ? d = !0 : Xa(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && M(e, "alias node should not have any properties")) : Ga(e, v, 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 (Me.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 && (ae(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 && !he(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 (; Fe(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 && !he(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 && jt(e), Me.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 (ae(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, ae(e, !0, -1)) : a && M(e, "directives end mark is expected"), Re(e, e.lineIndent - 1, at, !1, !0), ae(e, !0, -1), e.checkLineBreaks && Pa.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, ae(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 + se.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 = se.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = wi(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? We : Ai, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
2315
2315
|
}
|
|
2316
2316
|
function en(e, n) {
|
|
2317
|
-
for (var t =
|
|
2317
|
+
for (var t = se.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
|
+
` + se.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 He(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 ji(e, n, t, r, o, a, i, s) {
|
|
2369
|
+
var l, c = 0, d = null, u = !1, g = !1, f = r !== -1, I = -1, v = Ti(He(e, 0)) && $i(He(e, e.length - 1));
|
|
2370
2370
|
if (n || i)
|
|
2371
2371
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2372
|
-
if (c =
|
|
2372
|
+
if (c = He(e, l), !Ze(c))
|
|
2373
2373
|
return Le;
|
|
2374
|
-
|
|
2374
|
+
v = v && 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 = He(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
|
+
v = v && 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 ? v && !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 Mi(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 ji(e, n, t, r, o) {
|
|
|
2396
2396
|
function l(c) {
|
|
2397
2397
|
return Si(e, c);
|
|
2398
2398
|
}
|
|
2399
|
-
switch (
|
|
2399
|
+
switch (ji(
|
|
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 = He(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 Fi(e, n, t) {
|
|
2465
2465
|
var r = "", o = e.tag, a, i, s;
|
|
2466
2466
|
for (a = 0, i = t.length; a < i; a += 1)
|
|
2467
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 Ni(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 Ki(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 ? (Ki(e, n, e.dump, o), g && (e.dump = "&ref_" + u + e.dump)) : (Ni(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)) : (Fi(e, n, e.dump), g && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2523
2523
|
else if (s === "[object String]")
|
|
2524
|
-
e.tag !== "?" &&
|
|
2524
|
+
e.tag !== "?" && Mi(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 Pi(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 qi(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 = Pi, qi = {
|
|
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 Ui = de, Vi = An, Ri = $n, Di = Fn, Gi = Nn, zi = $t, Hi = Qn.load, Ji = Qn.loadAll, Yi = qi.dump, Wi = me, Zi = {
|
|
2571
|
+
binary: qn,
|
|
2572
2572
|
float: On,
|
|
2573
2573
|
map: Tn,
|
|
2574
|
-
null:
|
|
2575
|
-
pairs:
|
|
2574
|
+
null: jn,
|
|
2575
|
+
pairs: Vn,
|
|
2576
2576
|
set: Rn,
|
|
2577
|
-
timestamp:
|
|
2578
|
-
bool:
|
|
2577
|
+
timestamp: Pn,
|
|
2578
|
+
bool: Mn,
|
|
2579
2579
|
int: En,
|
|
2580
2580
|
merge: Ln,
|
|
2581
|
-
omap:
|
|
2581
|
+
omap: Un,
|
|
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: Ui,
|
|
2586
|
+
Schema: Vi,
|
|
2587
2587
|
FAILSAFE_SCHEMA: Ri,
|
|
2588
2588
|
JSON_SCHEMA: Di,
|
|
2589
2589
|
CORE_SCHEMA: Gi,
|
|
2590
|
-
DEFAULT_SCHEMA:
|
|
2591
|
-
load:
|
|
2590
|
+
DEFAULT_SCHEMA: zi,
|
|
2591
|
+
load: Hi,
|
|
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__ */ re({
|
|
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 } } = ue.useI18n(), o = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), a = O(""), i = O("");
|
|
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 = q("KCodeBlock");
|
|
2643
|
+
return m(), $(ve, null, [
|
|
2644
2644
|
e.format === "structured" ? (m(), $("div", ns, [
|
|
2645
|
-
(m(!0), $(
|
|
2645
|
+
(m(!0), $(ve, null, ye(e.propListTypes, (d) => (m(), $("div", {
|
|
2646
2646
|
key: `config-card-details-${d}-props`,
|
|
2647
|
-
class:
|
|
2647
|
+
class: Ne(`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, F(d === "advanced" ? y(r)("baseConfigCard.sections.advanced") : y(r)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
2651
|
+
(m(!0), $(ve, null, ye(e.propertyCollections[d], (u) => (m(), R(St, {
|
|
2652
2652
|
key: u.key,
|
|
2653
2653
|
item: u
|
|
2654
2654
|
}, Te({
|
|
2655
|
-
label:
|
|
2656
|
-
|
|
2655
|
+
label: h(() => [
|
|
2656
|
+
W(s.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2657
2657
|
]),
|
|
2658
|
-
[u.key]:
|
|
2659
|
-
|
|
2658
|
+
[u.key]: h(({ rowValue: g }) => [
|
|
2659
|
+
W(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: h(() => [
|
|
2669
|
+
W(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
|
+
])) : G("", !0),
|
|
2676
2676
|
e.format === "json" ? (m(), $("div", as, [
|
|
2677
|
-
|
|
2677
|
+
N(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
|
+
])) : G("", !0),
|
|
2684
2684
|
e.format === "yaml" ? (m(), $("div", is, [
|
|
2685
|
-
|
|
2685
|
+
N(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
|
+
])) : G("", !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__ */ re({
|
|
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(Ve(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: h(() => [
|
|
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, F(e.title), 1)) : G("", !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__ */ re({
|
|
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 } } = ue.useI18n(), { getMessageFromError: i } = ue.useErrors(), { convertKeyToTitle: s } = ue.useStringHelpers(), { axiosInstance: l } = ue.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 = O("structured"), u = (w) => {
|
|
2900
2900
|
d.value = w == null ? void 0 : w.value;
|
|
2901
2901
|
}, g = {
|
|
2902
2902
|
id: {
|
|
2903
|
-
type:
|
|
2903
|
+
type: te.ID,
|
|
2904
2904
|
label: a("baseConfigCard.commonFields.id_label"),
|
|
2905
2905
|
order: 0,
|
|
2906
|
-
section:
|
|
2906
|
+
section: be.Basic
|
|
2907
2907
|
},
|
|
2908
2908
|
name: {
|
|
2909
2909
|
order: 1,
|
|
2910
|
-
section:
|
|
2910
|
+
section: be.Basic
|
|
2911
2911
|
},
|
|
2912
2912
|
enabled: {
|
|
2913
|
-
type:
|
|
2913
|
+
type: te.BadgeStatus,
|
|
2914
2914
|
order: 2,
|
|
2915
|
-
section:
|
|
2915
|
+
section: be.Basic
|
|
2916
2916
|
},
|
|
2917
2917
|
updated_at: {
|
|
2918
|
-
type:
|
|
2918
|
+
type: te.Date,
|
|
2919
2919
|
label: a("baseConfigCard.commonFields.updated_at_label"),
|
|
2920
2920
|
order: 3,
|
|
2921
|
-
section:
|
|
2921
|
+
section: be.Basic
|
|
2922
2922
|
},
|
|
2923
2923
|
created_at: {
|
|
2924
|
-
type:
|
|
2924
|
+
type: te.Date,
|
|
2925
2925
|
label: a("baseConfigCard.commonFields.created_at_label"),
|
|
2926
2926
|
order: 4,
|
|
2927
|
-
section:
|
|
2927
|
+
section: be.Basic
|
|
2928
2928
|
},
|
|
2929
2929
|
tags: {
|
|
2930
|
-
type:
|
|
2930
|
+
type: te.BadgeTag,
|
|
2931
2931
|
order: -1,
|
|
2932
2932
|
// the last property displayed
|
|
2933
|
-
section:
|
|
2933
|
+
section: be.Basic
|
|
2934
2934
|
}
|
|
2935
|
-
}, f =
|
|
2936
|
-
var w,
|
|
2935
|
+
}, f = O(!1), I = O(!1), v = O(""), p = O(), x = T(() => {
|
|
2936
|
+
var w, K, B;
|
|
2937
2937
|
if (!p.value)
|
|
2938
2938
|
return [];
|
|
2939
|
-
const
|
|
2940
|
-
for (const
|
|
2941
|
-
const
|
|
2942
|
-
let
|
|
2943
|
-
(J || J === 0) && (
|
|
2939
|
+
const k = [], S = Object.keys(p.value).length;
|
|
2940
|
+
for (const j in p.value) {
|
|
2941
|
+
const P = (K = (w = r.configSchema) == null ? void 0 : w[j]) == null ? void 0 : K.order, J = (B = g[j]) == null ? void 0 : B.order;
|
|
2942
|
+
let Q = S;
|
|
2943
|
+
(J || J === 0) && (Q = J === -1 ? S + 1 : J), P && (Q = P === -1 ? S + 1 : P), k.push([j, Q]);
|
|
2944
2944
|
}
|
|
2945
|
-
return
|
|
2946
|
-
return
|
|
2947
|
-
}),
|
|
2948
|
-
var
|
|
2949
|
-
const
|
|
2945
|
+
return k.sort(function(j, P) {
|
|
2946
|
+
return j[1] - P[1];
|
|
2947
|
+
}), k.map((j) => {
|
|
2948
|
+
var P, J;
|
|
2949
|
+
const Q = j[0], X = (P = p.value) == null ? void 0 : P[Q], ee = ((J = r.configSchema) == null ? void 0 : J[Q]) || {}, ie = g[Q];
|
|
2950
2950
|
return {
|
|
2951
|
-
key:
|
|
2952
|
-
value:
|
|
2953
|
-
hidden:
|
|
2954
|
-
type:
|
|
2955
|
-
label:
|
|
2956
|
-
tooltip:
|
|
2957
|
-
section:
|
|
2951
|
+
key: Q,
|
|
2952
|
+
value: X,
|
|
2953
|
+
hidden: ee.hidden || !1,
|
|
2954
|
+
type: ee.type ?? ((ie == null ? void 0 : ie.type) || te.Text),
|
|
2955
|
+
label: ee.label ?? ((ie == null ? void 0 : ie.label) || s(Q)),
|
|
2956
|
+
tooltip: ee.tooltip ?? ((ie == null ? void 0 : ie.tooltip) || void 0),
|
|
2957
|
+
section: ee.section ?? ((ie == null ? void 0 : ie.section) || be.Advanced)
|
|
2958
2958
|
};
|
|
2959
|
-
}).filter((
|
|
2960
|
-
}),
|
|
2961
|
-
var w,
|
|
2959
|
+
}).filter((j) => !j.hidden && j.key !== r.pluginConfigKey);
|
|
2960
|
+
}), b = T(() => {
|
|
2961
|
+
var w, K;
|
|
2962
2962
|
if (!p.value || !r.pluginConfigKey)
|
|
2963
2963
|
return [];
|
|
2964
|
-
const
|
|
2965
|
-
for (const
|
|
2966
|
-
const
|
|
2967
|
-
let
|
|
2968
|
-
|
|
2964
|
+
const B = p.value[r.pluginConfigKey] || {}, k = Object.keys(B).length, S = [];
|
|
2965
|
+
for (const j in B) {
|
|
2966
|
+
const P = (K = (w = r.pluginConfigSchema) == null ? void 0 : w[j]) == null ? void 0 : K.order, J = B[j];
|
|
2967
|
+
let Q = J != null && J !== "" ? k - 1 : k;
|
|
2968
|
+
P && (Q = P === -1 ? k + 1 : P), S.push([j, Q]);
|
|
2969
2969
|
}
|
|
2970
|
-
return
|
|
2971
|
-
return
|
|
2972
|
-
}),
|
|
2973
|
-
var
|
|
2974
|
-
const J =
|
|
2970
|
+
return S.sort(function(j, P) {
|
|
2971
|
+
return j[1] - P[1];
|
|
2972
|
+
}), S.map((j) => {
|
|
2973
|
+
var P;
|
|
2974
|
+
const J = j[0], Q = B[J], X = ((P = r.pluginConfigSchema) == null ? void 0 : P[J]) || {};
|
|
2975
2975
|
return {
|
|
2976
2976
|
key: J,
|
|
2977
|
-
value:
|
|
2978
|
-
hidden:
|
|
2979
|
-
type:
|
|
2980
|
-
label:
|
|
2981
|
-
tooltip:
|
|
2982
|
-
section:
|
|
2977
|
+
value: Q,
|
|
2978
|
+
hidden: X.hidden || !1,
|
|
2979
|
+
type: X.type ?? te.Text,
|
|
2980
|
+
label: X.label ?? s(J),
|
|
2981
|
+
tooltip: X.tooltip ?? void 0,
|
|
2982
|
+
section: be.Plugin
|
|
2983
2983
|
};
|
|
2984
|
-
}).filter((
|
|
2985
|
-
}),
|
|
2986
|
-
var w,
|
|
2984
|
+
}).filter((j) => !j.hidden);
|
|
2985
|
+
}), C = T(() => {
|
|
2986
|
+
var w, K, B, k;
|
|
2987
2987
|
return {
|
|
2988
|
-
basic: (w =
|
|
2989
|
-
advanced: (
|
|
2990
|
-
plugin: (
|
|
2988
|
+
basic: (w = x.value) == null ? void 0 : w.filter((S) => S.section === be.Basic),
|
|
2989
|
+
advanced: (K = x.value) == null ? void 0 : K.filter((S) => S.section === be.Advanced),
|
|
2990
|
+
plugin: (k = b.value) == null ? void 0 : k.concat((B = x.value) == null ? void 0 : B.filter((S) => S.section === be.Plugin))
|
|
2991
2991
|
};
|
|
2992
|
-
}),
|
|
2992
|
+
}), A = T(() => {
|
|
2993
2993
|
const w = [];
|
|
2994
|
-
return
|
|
2995
|
-
}),
|
|
2996
|
-
var w,
|
|
2997
|
-
let
|
|
2998
|
-
return r.config.app === "konnect" ?
|
|
2999
|
-
}),
|
|
2994
|
+
return C.value.basic.length && w.push("basic"), C.value.advanced.length && w.push("advanced"), C.value.plugin.length && w.push("plugin"), w;
|
|
2995
|
+
}), ne = (w) => !!(w.tooltip || o[`${w.key}-label-tooltip`]), pe = T(() => {
|
|
2996
|
+
var w, K;
|
|
2997
|
+
let B = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2998
|
+
return r.config.app === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((w = r.config) == null ? void 0 : w.controlPlaneId) || "") : r.config.app === "kongManager" && (B = B.replace(/\/{workspace}/gi, (K = r.config) != null && K.workspace ? `/${r.config.workspace}` : "")), B = B.replace(/{id}/gi, r.config.entityId), B;
|
|
2999
|
+
}), z = (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(pe.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((K) => r.configSchema[K].forceShow).forEach((K) => {
|
|
3016
|
+
p.value && typeof p.value[K] > "u" && (p.value[K] = null);
|
|
3017
3017
|
}), n("fetch:success", w);
|
|
3018
3018
|
} catch (w) {
|
|
3019
|
-
const
|
|
3020
|
-
|
|
3019
|
+
const K = i(w);
|
|
3020
|
+
v.value = K.startsWith("code") ? a("baseConfigCard.errors.load") : K, 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, K) => {
|
|
3025
|
+
const B = q("KLabel"), k = q("KSelect"), S = q("KButton"), j = q("KClipboardProvider"), P = q("KSkeleton"), J = q("KEmptyState"), Q = q("KCard");
|
|
3026
|
+
return m(), R(Q, { class: "kong-ui-entity-base-config-card" }, Te({
|
|
3027
|
+
actions: h(() => [
|
|
3028
3028
|
V("div", hs, [
|
|
3029
|
-
|
|
3030
|
-
e.config.jsonYamlEnabled ? (m(), R(
|
|
3029
|
+
W(w.$slots, "actions", {}, void 0, !0),
|
|
3030
|
+
e.config.jsonYamlEnabled ? (m(), R(B, {
|
|
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: h(() => [
|
|
3036
|
+
Z(F(e.label), 1)
|
|
3037
3037
|
]),
|
|
3038
3038
|
_: 1
|
|
3039
|
-
})) :
|
|
3040
|
-
e.config.jsonYamlEnabled ? (m(), R(
|
|
3039
|
+
})) : G("", !0),
|
|
3040
|
+
e.config.jsonYamlEnabled ? (m(), R(k, {
|
|
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
|
+
})) : G("", !0),
|
|
3047
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (m(), R(S, {
|
|
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: h(() => [
|
|
3054
3054
|
V("a", {
|
|
3055
3055
|
href: e.configCardDoc,
|
|
3056
3056
|
rel: "noopener",
|
|
3057
3057
|
target: "_blank"
|
|
3058
3058
|
}, [
|
|
3059
|
-
|
|
3059
|
+
N(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
|
+
})) : G("", !0),
|
|
3064
|
+
e.config.jsonYamlEnabled ? G("", !0) : (m(), R(j, { key: 3 }, {
|
|
3065
|
+
default: h(({ copyToClipboard: X }) => [
|
|
3066
|
+
!f.value && !I.value ? (m(), R(S, {
|
|
3067
3067
|
key: 0,
|
|
3068
3068
|
appearance: "tertiary",
|
|
3069
3069
|
"data-testid": "json-copy-button",
|
|
3070
|
-
onClick: (
|
|
3070
|
+
onClick: (ee) => z(X)
|
|
3071
3071
|
}, {
|
|
3072
|
-
default:
|
|
3073
|
-
|
|
3072
|
+
default: h(() => [
|
|
3073
|
+
Z(F(y(a)("baseConfigCard.actions.copy")), 1)
|
|
3074
3074
|
]),
|
|
3075
3075
|
_: 2
|
|
3076
|
-
}, 1032, ["onClick"])) :
|
|
3076
|
+
}, 1032, ["onClick"])) : G("", !0)
|
|
3077
3077
|
]),
|
|
3078
3078
|
_: 1
|
|
3079
3079
|
}))
|
|
3080
3080
|
])
|
|
3081
3081
|
]),
|
|
3082
|
-
body:
|
|
3083
|
-
f.value ? (m(), R(
|
|
3082
|
+
body: h(() => [
|
|
3083
|
+
f.value ? (m(), R(P, {
|
|
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: h(() => [
|
|
3094
|
+
V("h3", null, F(v.value), 1)
|
|
3095
3095
|
]),
|
|
3096
3096
|
_: 1
|
|
3097
|
-
})) :
|
|
3097
|
+
})) : G("", !0),
|
|
3098
3098
|
e.config.jsonYamlEnabled ? (m(), $("div", bs, [
|
|
3099
|
-
|
|
3099
|
+
N(ls, {
|
|
3100
3100
|
format: d.value,
|
|
3101
|
-
"prop-list-types":
|
|
3102
|
-
"property-collections":
|
|
3101
|
+
"prop-list-types": A.value,
|
|
3102
|
+
"property-collections": C.value,
|
|
3103
3103
|
record: p.value
|
|
3104
3104
|
}, Te({ _: 2 }, [
|
|
3105
|
-
|
|
3106
|
-
name:
|
|
3107
|
-
fn:
|
|
3108
|
-
|
|
3109
|
-
row:
|
|
3110
|
-
rowValue:
|
|
3105
|
+
ye(Object.keys(w.$slots), (X) => ({
|
|
3106
|
+
name: X,
|
|
3107
|
+
fn: h(({ row: ee, rowValue: ie }) => [
|
|
3108
|
+
W(w.$slots, X, {
|
|
3109
|
+
row: ee,
|
|
3110
|
+
rowValue: ie
|
|
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), $(ve, null, ye(A.value, (X) => (m(), $("div", {
|
|
3117
|
+
key: `config-card-details-${X}-props`,
|
|
3118
|
+
class: Ne(`config-card-details-${X}-props`),
|
|
3119
|
+
"data-testid": `config-card-details-${X}-props`
|
|
3120
3120
|
}, [
|
|
3121
|
-
|
|
3122
|
-
(m(!0), $(
|
|
3123
|
-
key:
|
|
3124
|
-
item:
|
|
3121
|
+
X !== "basic" ? (m(), $("div", _s, F(X === "advanced" ? y(a)("baseConfigCard.sections.advanced") : y(a)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
3122
|
+
(m(!0), $(ve, null, ye(C.value[X], (ee) => (m(), R(St, {
|
|
3123
|
+
key: ee.key,
|
|
3124
|
+
item: ee
|
|
3125
3125
|
}, Te({
|
|
3126
|
-
label:
|
|
3127
|
-
|
|
3126
|
+
label: h(() => [
|
|
3127
|
+
W(w.$slots, `${ee.key}-label`, { row: ee }, void 0, !0)
|
|
3128
3128
|
]),
|
|
3129
|
-
[
|
|
3130
|
-
|
|
3131
|
-
row:
|
|
3132
|
-
rowValue:
|
|
3129
|
+
[ee.key]: h(({ rowValue: ie }) => [
|
|
3130
|
+
W(w.$slots, ee.key, {
|
|
3131
|
+
row: ee,
|
|
3132
|
+
rowValue: ie
|
|
3133
3133
|
}, void 0, !0)
|
|
3134
3134
|
]),
|
|
3135
3135
|
_: 2
|
|
3136
3136
|
}, [
|
|
3137
|
-
|
|
3137
|
+
ne(ee) ? {
|
|
3138
3138
|
name: "label-tooltip",
|
|
3139
|
-
fn:
|
|
3140
|
-
|
|
3139
|
+
fn: h(() => [
|
|
3140
|
+
W(w.$slots, `${ee.key}-label-tooltip`, { row: ee }, 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: h(() => [
|
|
3153
3153
|
V("div", ys, [
|
|
3154
|
-
|
|
3155
|
-
|
|
3154
|
+
W(w.$slots, "title", {}, () => [
|
|
3155
|
+
Z(F(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__ */ re({
|
|
3168
3168
|
__name: "EntityBaseForm",
|
|
3169
3169
|
props: {
|
|
3170
3170
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -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 } } = ue.useI18n(), { getMessageFromError: i } = ue.useErrors(), { axiosInstance: s } = ue.useAxios({
|
|
3218
3218
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3219
|
-
}), l =
|
|
3220
|
-
var p,
|
|
3219
|
+
}), l = O(!1), c = O(!1), d = O(""), u = T(() => r.canSubmit === !1 || r.isReadonly), g = T(() => {
|
|
3220
|
+
var p, x;
|
|
3221
3221
|
if (!r.editId)
|
|
3222
3222
|
return "";
|
|
3223
|
-
let
|
|
3224
|
-
return r.config.app === "konnect" ?
|
|
3223
|
+
let b = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3224
|
+
return r.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (x = r.config) != null && x.workspace ? `/${r.config.workspace}` : "")), b = b.replace(/{id}/gi, r.editId), b;
|
|
3225
3225
|
}), f = () => {
|
|
3226
3226
|
r.config.cancelRoute ? o.push(r.config.cancelRoute) : I();
|
|
3227
3227
|
}, I = () => {
|
|
3228
3228
|
n("cancel");
|
|
3229
|
-
},
|
|
3229
|
+
}, v = () => {
|
|
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 x = i(p);
|
|
3242
|
+
d.value = x.startsWith("code") ? a("baseForm.errors.edit") : x, 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, x) => {
|
|
3247
|
+
const b = q("KSkeleton"), C = q("KEmptyState"), A = q("KAlert"), ne = q("KButton"), pe = q("KCard");
|
|
3248
|
+
return m(), R(pe, { class: "kong-ui-entity-base-form" }, {
|
|
3249
|
+
body: h(() => [
|
|
3250
|
+
l.value ? (m(), R(b, {
|
|
3251
3251
|
key: 0,
|
|
3252
3252
|
type: "form"
|
|
3253
|
-
})) : c.value ? (m(), R(
|
|
3253
|
+
})) : c.value ? (m(), R(C, {
|
|
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: h(() => [
|
|
3261
|
+
V("h3", null, F(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(v, ["prevent"])
|
|
3269
3269
|
}, [
|
|
3270
|
-
|
|
3271
|
-
e.errorMessage ? (m(), R(
|
|
3270
|
+
W(p.$slots, "default", {}, void 0, !0),
|
|
3271
|
+
e.errorMessage ? (m(), R(A, {
|
|
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"])) : G("", !0),
|
|
3277
3277
|
V("div", xs, [
|
|
3278
|
-
|
|
3279
|
-
|
|
3278
|
+
W(p.$slots, "form-actions", {}, () => [
|
|
3279
|
+
N(ne, {
|
|
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: h(() => [
|
|
3286
|
+
Z(F(y(a)("baseForm.actions.cancel")), 1)
|
|
3287
3287
|
]),
|
|
3288
3288
|
_: 1
|
|
3289
3289
|
}, 8, ["disabled"]),
|
|
3290
|
-
|
|
3290
|
+
N(ne, {
|
|
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: h(() => [
|
|
3297
|
+
Z(F(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
|
+
}, js = /* @__PURE__ */ re({
|
|
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 v;
|
|
3327
|
+
return ((v = n.rowEl) == null ? void 0 : v.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3328
3328
|
}), r = T(() => {
|
|
3329
|
-
var
|
|
3330
|
-
return ((
|
|
3329
|
+
var v;
|
|
3330
|
+
return ((v = t.value) == null ? void 0 : v.querySelector('[data-testid="first-col"]')) || null;
|
|
3331
3331
|
}), o = T(() => {
|
|
3332
|
-
var
|
|
3333
|
-
const
|
|
3334
|
-
return
|
|
3332
|
+
var v, p;
|
|
3333
|
+
const x = (v = n.rowEl) == null ? void 0 : v.querySelectorAll("td");
|
|
3334
|
+
return x ? ((p = x[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 v, p, x;
|
|
3341
|
+
c.value = ((v = r.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((x = l.value) == null ? void 0 : x.innerText) || "";
|
|
3342
|
+
}, l = O({}), c = O(0), d = O(0), u = O(""), g = T(() => [r.value, t.value]), f = Se(
|
|
3343
3343
|
g,
|
|
3344
|
-
(
|
|
3344
|
+
(v) => {
|
|
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 v)
|
|
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
|
+
}), (v, p) => {
|
|
3362
|
+
const x = q("KTooltip");
|
|
3363
3363
|
return m(), $("span", {
|
|
3364
3364
|
ref_key: "contentRef",
|
|
3365
3365
|
ref: l,
|
|
3366
3366
|
class: "content-wrapper"
|
|
3367
3367
|
}, [
|
|
3368
3368
|
o.value ? (m(), $("span", $s, [
|
|
3369
|
-
|
|
3369
|
+
N(x, {
|
|
3370
3370
|
label: I.value ? u.value : "",
|
|
3371
3371
|
"max-width": "300",
|
|
3372
3372
|
placement: "bottomStart"
|
|
3373
3373
|
}, {
|
|
3374
|
-
default:
|
|
3375
|
-
|
|
3374
|
+
default: h(() => [
|
|
3375
|
+
W(v.$slots, "default", {}, void 0, !0)
|
|
3376
3376
|
]),
|
|
3377
3377
|
_: 3
|
|
3378
3378
|
}, 8, ["label"])
|
|
3379
|
-
])) :
|
|
3379
|
+
])) : W(v.$slots, "default", { key: 1 }, void 0, !0)
|
|
3380
3380
|
], 512);
|
|
3381
3381
|
};
|
|
3382
3382
|
}
|
|
3383
|
-
}),
|
|
3383
|
+
}), Ms = /* @__PURE__ */ ke(js, [["__scopeId", "data-v-e42a20c9"]]), Es = { class: "toolbar-container" }, Os = {
|
|
3384
3384
|
key: 0,
|
|
3385
3385
|
class: "toolbar-button-container"
|
|
3386
|
-
},
|
|
3386
|
+
}, Fs = ["data-testid"], Ns = /* @__PURE__ */ re({
|
|
3387
3387
|
__name: "EntityBaseTable",
|
|
3388
3388
|
props: {
|
|
3389
3389
|
// table header configuration
|
|
@@ -3443,8 +3443,8 @@ const ns = {
|
|
|
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
3445
|
errorMessage: {
|
|
3446
|
-
type:
|
|
3447
|
-
default:
|
|
3446
|
+
type: String,
|
|
3447
|
+
default: ""
|
|
3448
3448
|
},
|
|
3449
3449
|
disablePaginationPageJump: {
|
|
3450
3450
|
type: Boolean,
|
|
@@ -3492,76 +3492,65 @@ const ns = {
|
|
|
3492
3492
|
},
|
|
3493
3493
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3494
3494
|
setup(e, { emit: n }) {
|
|
3495
|
-
const t = e, { i18n: { t: r } } =
|
|
3496
|
-
|
|
3497
|
-
return
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
title: (h = t.errorMessage) == null ? void 0 : h.title,
|
|
3504
|
-
message: (D = t.errorMessage) == null ? void 0 : D.message
|
|
3505
|
-
};
|
|
3506
|
-
}), a = T(() => t.cacheIdentifier || t.preferencesStorageKey), i = (h) => h.hasData || !!t.query, s = T(() => {
|
|
3507
|
-
const h = [];
|
|
3508
|
-
return Object.keys(t.tableHeaders).forEach((D) => {
|
|
3509
|
-
const se = t.tableHeaders[D];
|
|
3510
|
-
h.push({
|
|
3511
|
-
label: se.label ?? D,
|
|
3512
|
-
key: D,
|
|
3513
|
-
sortable: se.sortable ?? !1
|
|
3495
|
+
const t = e, { i18n: { t: r } } = ue.useI18n(), o = T(() => t.cacheIdentifier || t.preferencesStorageKey), a = (C) => C.hasData || !!t.query, i = T(() => {
|
|
3496
|
+
const C = [];
|
|
3497
|
+
return Object.keys(t.tableHeaders).forEach((A) => {
|
|
3498
|
+
const ne = t.tableHeaders[A];
|
|
3499
|
+
C.push({
|
|
3500
|
+
label: ne.label ?? A,
|
|
3501
|
+
key: A,
|
|
3502
|
+
sortable: ne.sortable ?? !1
|
|
3514
3503
|
});
|
|
3515
|
-
}), t.enableEntityActions &&
|
|
3504
|
+
}), t.enableEntityActions && C.push({
|
|
3516
3505
|
key: "actions",
|
|
3517
3506
|
hideLabel: !0
|
|
3518
|
-
}),
|
|
3519
|
-
}),
|
|
3520
|
-
"data-rowid":
|
|
3521
|
-
"data-testid":
|
|
3522
|
-
...t.rowAttributes(
|
|
3523
|
-
}),
|
|
3524
|
-
var
|
|
3525
|
-
return (
|
|
3526
|
-
},
|
|
3527
|
-
const
|
|
3528
|
-
"data-testid":
|
|
3529
|
-
...t.cellAttributes(
|
|
3507
|
+
}), C;
|
|
3508
|
+
}), s = (C) => ({
|
|
3509
|
+
"data-rowid": C.id,
|
|
3510
|
+
"data-testid": C.name,
|
|
3511
|
+
...t.rowAttributes(C)
|
|
3512
|
+
}), l = O({}), c = (C) => {
|
|
3513
|
+
var A;
|
|
3514
|
+
return (A = l.value) == null ? void 0 : A.$el.querySelector(`[data-rowid="${C.id}"]`);
|
|
3515
|
+
}, d = (C) => {
|
|
3516
|
+
const A = {
|
|
3517
|
+
"data-testid": C.headerKey,
|
|
3518
|
+
...t.cellAttributes(C)
|
|
3530
3519
|
};
|
|
3531
|
-
return
|
|
3520
|
+
return C.colIndex === 0 && (A.style = {
|
|
3532
3521
|
maxWidth: "250px",
|
|
3533
3522
|
overflowX: "hidden",
|
|
3534
3523
|
textOverflow: "ellipsis"
|
|
3535
|
-
}),
|
|
3524
|
+
}), A;
|
|
3525
|
+
}, u = () => {
|
|
3526
|
+
n("empty-state-cta-clicked"), g();
|
|
3536
3527
|
}, g = () => {
|
|
3537
|
-
n("empty-state-cta-clicked"), f();
|
|
3538
|
-
}, f = () => {
|
|
3539
3528
|
n("clear-search-input");
|
|
3540
|
-
},
|
|
3541
|
-
n("click:row",
|
|
3542
|
-
}),
|
|
3543
|
-
n("sort",
|
|
3544
|
-
}, { setTablePreferences:
|
|
3545
|
-
const
|
|
3529
|
+
}, f = T(() => t.disableRowClick ? void 0 : (C, A) => {
|
|
3530
|
+
n("click:row", A);
|
|
3531
|
+
}), I = (C) => {
|
|
3532
|
+
n("sort", C);
|
|
3533
|
+
}, { setTablePreferences: v, getTablePreferences: p } = Sr(), x = T(() => {
|
|
3534
|
+
const C = p(t.preferencesStorageKey);
|
|
3546
3535
|
return {
|
|
3547
3536
|
...t.initialFetcherParams,
|
|
3548
|
-
...
|
|
3537
|
+
...C
|
|
3549
3538
|
};
|
|
3550
|
-
}),
|
|
3551
|
-
t.preferencesStorageKey &&
|
|
3539
|
+
}), b = (C) => {
|
|
3540
|
+
t.preferencesStorageKey && v(t.preferencesStorageKey, C);
|
|
3552
3541
|
};
|
|
3553
|
-
return (
|
|
3554
|
-
const
|
|
3555
|
-
return m(), R(
|
|
3542
|
+
return (C, A) => {
|
|
3543
|
+
const ne = q("KIcon"), pe = q("KButton"), z = q("KDropdown"), w = q("KTable"), K = q("KCard");
|
|
3544
|
+
return m(), R(K, {
|
|
3556
3545
|
class: "kong-ui-entity-base-table",
|
|
3557
3546
|
title: e.title
|
|
3558
3547
|
}, {
|
|
3559
|
-
body:
|
|
3560
|
-
|
|
3548
|
+
body: h(() => [
|
|
3549
|
+
N(w, {
|
|
3561
3550
|
ref_key: "tableRefs",
|
|
3562
|
-
ref:
|
|
3563
|
-
"cache-identifier":
|
|
3564
|
-
"cell-attrs":
|
|
3551
|
+
ref: l,
|
|
3552
|
+
"cache-identifier": o.value,
|
|
3553
|
+
"cell-attrs": d,
|
|
3565
3554
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3566
3555
|
"disable-sorting": e.disableSorting,
|
|
3567
3556
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
@@ -3572,57 +3561,56 @@ const ns = {
|
|
|
3572
3561
|
"empty-state-message": e.query ? y(r)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3573
3562
|
"empty-state-title": e.query ? y(r)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3574
3563
|
"enable-client-sort": e.enableClientSort,
|
|
3575
|
-
"error-state-
|
|
3576
|
-
"error-state-title": o.value.title,
|
|
3564
|
+
"error-state-title": e.errorMessage,
|
|
3577
3565
|
fetcher: e.fetcher,
|
|
3578
3566
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3579
|
-
"has-error":
|
|
3580
|
-
headers:
|
|
3567
|
+
"has-error": !!e.errorMessage,
|
|
3568
|
+
headers: i.value,
|
|
3581
3569
|
"hide-pagination-when-optional": "",
|
|
3582
|
-
"initial-fetcher-params":
|
|
3570
|
+
"initial-fetcher-params": x.value,
|
|
3583
3571
|
"is-loading": e.isLoading,
|
|
3584
3572
|
"pagination-type": e.paginationType,
|
|
3585
|
-
"row-attrs":
|
|
3573
|
+
"row-attrs": s,
|
|
3586
3574
|
"search-input": e.query,
|
|
3587
|
-
onKtableEmptyStateCtaClicked:
|
|
3588
|
-
"onRow:click":
|
|
3589
|
-
onSort:
|
|
3590
|
-
"onUpdate:tablePreferences":
|
|
3575
|
+
onKtableEmptyStateCtaClicked: u,
|
|
3576
|
+
"onRow:click": f.value,
|
|
3577
|
+
onSort: A[0] || (A[0] = (B) => I(B)),
|
|
3578
|
+
"onUpdate:tablePreferences": b
|
|
3591
3579
|
}, Te({
|
|
3592
|
-
toolbar:
|
|
3580
|
+
toolbar: h(({ state: B }) => [
|
|
3593
3581
|
et(V("div", Es, [
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
])) :
|
|
3582
|
+
W(C.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3583
|
+
C.$slots["toolbar-button"] ? (m(), $("div", Os, [
|
|
3584
|
+
W(C.$slots, "toolbar-button", {}, void 0, !0)
|
|
3585
|
+
])) : G("", !0)
|
|
3598
3586
|
], 512), [
|
|
3599
|
-
[tt,
|
|
3587
|
+
[tt, a(B)]
|
|
3600
3588
|
])
|
|
3601
3589
|
]),
|
|
3602
|
-
actions:
|
|
3590
|
+
actions: h(({ row: B, rowKey: k, rowValue: S }) => [
|
|
3603
3591
|
V("div", {
|
|
3604
3592
|
class: "actions-container",
|
|
3605
|
-
"data-testid":
|
|
3593
|
+
"data-testid": B.name
|
|
3606
3594
|
}, [
|
|
3607
|
-
|
|
3595
|
+
N(z, {
|
|
3608
3596
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3609
3597
|
width: e.dropdownMenuWidth
|
|
3610
3598
|
}, {
|
|
3611
|
-
items:
|
|
3612
|
-
|
|
3613
|
-
row:
|
|
3614
|
-
rowKey:
|
|
3599
|
+
items: h(() => [
|
|
3600
|
+
W(C.$slots, "actions", {
|
|
3601
|
+
row: B,
|
|
3602
|
+
rowKey: k,
|
|
3615
3603
|
rowValue: S
|
|
3616
3604
|
}, void 0, !0)
|
|
3617
3605
|
]),
|
|
3618
|
-
default:
|
|
3619
|
-
|
|
3606
|
+
default: h(() => [
|
|
3607
|
+
N(pe, {
|
|
3620
3608
|
class: "actions-trigger",
|
|
3621
3609
|
"data-testid": "overflow-actions-button",
|
|
3622
3610
|
size: "small"
|
|
3623
3611
|
}, {
|
|
3624
|
-
icon:
|
|
3625
|
-
|
|
3612
|
+
icon: h(() => [
|
|
3613
|
+
N(ne, {
|
|
3626
3614
|
color: y(ko),
|
|
3627
3615
|
icon: "more",
|
|
3628
3616
|
size: "16"
|
|
@@ -3633,43 +3621,43 @@ const ns = {
|
|
|
3633
3621
|
]),
|
|
3634
3622
|
_: 2
|
|
3635
3623
|
}, 1032, ["width"])
|
|
3636
|
-
], 8,
|
|
3624
|
+
], 8, Fs)
|
|
3637
3625
|
]),
|
|
3638
3626
|
_: 2
|
|
3639
3627
|
}, [
|
|
3640
|
-
|
|
3641
|
-
name:
|
|
3642
|
-
fn:
|
|
3643
|
-
|
|
3644
|
-
"key-name": String(
|
|
3645
|
-
"row-el":
|
|
3628
|
+
ye(e.tableHeaders, (B, k) => ({
|
|
3629
|
+
name: k,
|
|
3630
|
+
fn: h(({ row: S, rowKey: j, rowValue: P }) => [
|
|
3631
|
+
N(Ms, {
|
|
3632
|
+
"key-name": String(k),
|
|
3633
|
+
"row-el": c(S)
|
|
3646
3634
|
}, {
|
|
3647
|
-
default:
|
|
3648
|
-
|
|
3635
|
+
default: h(() => [
|
|
3636
|
+
W(C.$slots, k, {
|
|
3649
3637
|
row: S,
|
|
3650
|
-
rowKey:
|
|
3651
|
-
rowValue:
|
|
3638
|
+
rowKey: j,
|
|
3639
|
+
rowValue: P
|
|
3652
3640
|
}, () => [
|
|
3653
|
-
|
|
3641
|
+
Z(F(P), 1)
|
|
3654
3642
|
], !0)
|
|
3655
3643
|
]),
|
|
3656
3644
|
_: 2
|
|
3657
3645
|
}, 1032, ["key-name", "row-el"])
|
|
3658
3646
|
])
|
|
3659
3647
|
}))
|
|
3660
|
-
]), 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-
|
|
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
3649
|
]),
|
|
3662
3650
|
_: 3
|
|
3663
3651
|
}, 8, ["title"]);
|
|
3664
3652
|
};
|
|
3665
3653
|
}
|
|
3666
|
-
}),
|
|
3654
|
+
}), Ks = /* @__PURE__ */ ke(Ns, [["__scopeId", "data-v-86d2d2a3"]]), Bs = {
|
|
3667
3655
|
key: 0,
|
|
3668
3656
|
class: "kong-ui-entity-delete-error"
|
|
3669
|
-
},
|
|
3657
|
+
}, Ps = {
|
|
3670
3658
|
key: 1,
|
|
3671
3659
|
class: "description"
|
|
3672
|
-
}, Ls = /* @__PURE__ */
|
|
3660
|
+
}, Ls = /* @__PURE__ */ re({
|
|
3673
3661
|
__name: "EntityDeleteModal",
|
|
3674
3662
|
props: {
|
|
3675
3663
|
visible: {
|
|
@@ -3708,13 +3696,13 @@ const ns = {
|
|
|
3708
3696
|
},
|
|
3709
3697
|
emits: ["cancel", "proceed"],
|
|
3710
3698
|
setup(e, { emit: n }) {
|
|
3711
|
-
const t = e, { i18nT: r } =
|
|
3699
|
+
const t = e, { i18nT: r } = ue.useI18n(), o = T(() => t.needConfirm ? t.entityName : ""), a = () => {
|
|
3712
3700
|
n("cancel");
|
|
3713
3701
|
}, i = () => {
|
|
3714
3702
|
n("proceed");
|
|
3715
3703
|
};
|
|
3716
3704
|
return (s, l) => {
|
|
3717
|
-
const c =
|
|
3705
|
+
const c = q("KAlert"), d = q("KPrompt");
|
|
3718
3706
|
return m(), R(d, {
|
|
3719
3707
|
"action-button-text": "Yes, delete",
|
|
3720
3708
|
"action-pending": e.actionPending,
|
|
@@ -3726,50 +3714,50 @@ const ns = {
|
|
|
3726
3714
|
onCanceled: a,
|
|
3727
3715
|
onProceed: i
|
|
3728
3716
|
}, {
|
|
3729
|
-
"body-content":
|
|
3717
|
+
"body-content": h(() => [
|
|
3730
3718
|
e.error ? (m(), $("div", Bs, [
|
|
3731
|
-
|
|
3732
|
-
alertMessage:
|
|
3733
|
-
|
|
3719
|
+
N(c, { appearance: "danger" }, {
|
|
3720
|
+
alertMessage: h(() => [
|
|
3721
|
+
Z(F(e.error), 1)
|
|
3734
3722
|
]),
|
|
3735
3723
|
_: 1
|
|
3736
3724
|
})
|
|
3737
|
-
])) :
|
|
3738
|
-
|
|
3725
|
+
])) : G("", !0),
|
|
3726
|
+
N(y(r), {
|
|
3739
3727
|
class: "message",
|
|
3740
3728
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3741
3729
|
tag: "p"
|
|
3742
3730
|
}, Te({
|
|
3743
|
-
entityType:
|
|
3744
|
-
|
|
3731
|
+
entityType: h(() => [
|
|
3732
|
+
Z(F(t.entityType), 1)
|
|
3745
3733
|
]),
|
|
3746
3734
|
_: 2
|
|
3747
3735
|
}, [
|
|
3748
3736
|
t.entityName ? {
|
|
3749
3737
|
name: "entityName",
|
|
3750
|
-
fn:
|
|
3751
|
-
V("strong", null,
|
|
3738
|
+
fn: h(() => [
|
|
3739
|
+
V("strong", null, F(t.entityName), 1)
|
|
3752
3740
|
]),
|
|
3753
3741
|
key: "0"
|
|
3754
3742
|
} : void 0
|
|
3755
3743
|
]), 1032, ["keypath"]),
|
|
3756
|
-
t.description || s.$slots.description ? (m(), $("div",
|
|
3757
|
-
|
|
3758
|
-
V("p", null,
|
|
3744
|
+
t.description || s.$slots.description ? (m(), $("div", Ps, [
|
|
3745
|
+
W(s.$slots, "description", {}, () => [
|
|
3746
|
+
V("p", null, F(t.description), 1)
|
|
3759
3747
|
], !0)
|
|
3760
|
-
])) :
|
|
3748
|
+
])) : G("", !0)
|
|
3761
3749
|
]),
|
|
3762
3750
|
_: 3
|
|
3763
3751
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3764
3752
|
};
|
|
3765
3753
|
}
|
|
3766
|
-
}),
|
|
3754
|
+
}), qs = /* @__PURE__ */ ke(Ls, [["__scopeId", "data-v-1c9a2a07"]]), Us = {
|
|
3767
3755
|
fill: "none",
|
|
3768
3756
|
height: "20",
|
|
3769
3757
|
viewBox: "0 0 20 20",
|
|
3770
3758
|
width: "20",
|
|
3771
3759
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3772
|
-
},
|
|
3760
|
+
}, Vs = {
|
|
3773
3761
|
id: "mask0_180_20349",
|
|
3774
3762
|
height: "20",
|
|
3775
3763
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3777,7 +3765,7 @@ const ns = {
|
|
|
3777
3765
|
width: "20",
|
|
3778
3766
|
x: "0",
|
|
3779
3767
|
y: "0"
|
|
3780
|
-
}, Rs = ["fill"], Ds = { mask: "url(#mask0_180_20349)" }, Gs = ["fill"], cn = /* @__PURE__ */
|
|
3768
|
+
}, Rs = ["fill"], Ds = { mask: "url(#mask0_180_20349)" }, Gs = ["fill"], cn = /* @__PURE__ */ re({
|
|
3781
3769
|
__name: "IconFilter",
|
|
3782
3770
|
props: {
|
|
3783
3771
|
color: {
|
|
@@ -3786,8 +3774,8 @@ const ns = {
|
|
|
3786
3774
|
}
|
|
3787
3775
|
},
|
|
3788
3776
|
setup(e) {
|
|
3789
|
-
return (n, t) => (m(), $("svg",
|
|
3790
|
-
V("mask",
|
|
3777
|
+
return (n, t) => (m(), $("svg", Us, [
|
|
3778
|
+
V("mask", Vs, [
|
|
3791
3779
|
V("rect", {
|
|
3792
3780
|
fill: e.color,
|
|
3793
3781
|
height: "20",
|
|
@@ -3802,10 +3790,10 @@ const ns = {
|
|
|
3802
3790
|
])
|
|
3803
3791
|
]));
|
|
3804
3792
|
}
|
|
3805
|
-
}),
|
|
3793
|
+
}), zs = {
|
|
3806
3794
|
key: 1,
|
|
3807
3795
|
class: "kong-ui-entity-filter"
|
|
3808
|
-
},
|
|
3796
|
+
}, Hs = { 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__ */ re({
|
|
3809
3797
|
__name: "EntityFilter",
|
|
3810
3798
|
props: {
|
|
3811
3799
|
// filter config, either exact match or fuzzy match
|
|
@@ -3825,21 +3813,21 @@ const ns = {
|
|
|
3825
3813
|
},
|
|
3826
3814
|
emits: ["update:modelValue"],
|
|
3827
3815
|
setup(e, { emit: n }) {
|
|
3828
|
-
const t = e, { i18n: { t: r } } =
|
|
3816
|
+
const t = e, { i18n: { t: r } } = ue.useI18n(), o = O(!1), a = O({}), i = T(() => {
|
|
3829
3817
|
const p = [];
|
|
3830
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
3831
|
-
|
|
3818
|
+
return new URLSearchParams(t.modelValue).forEach((x, b) => {
|
|
3819
|
+
x !== "" && p.push(b);
|
|
3832
3820
|
}), p;
|
|
3833
3821
|
}), s = T(() => {
|
|
3834
3822
|
const p = t.config.fields;
|
|
3835
|
-
return Object.keys(p).filter((
|
|
3836
|
-
label: p[
|
|
3837
|
-
value:
|
|
3823
|
+
return Object.keys(p).filter((x) => p[x].searchable).map((x) => ({
|
|
3824
|
+
label: p[x].label || x,
|
|
3825
|
+
value: x
|
|
3838
3826
|
}));
|
|
3839
3827
|
});
|
|
3840
3828
|
Se(() => t.modelValue, (p) => {
|
|
3841
|
-
a.value = {}, new URLSearchParams(p).forEach((
|
|
3842
|
-
a.value[
|
|
3829
|
+
a.value = {}, new URLSearchParams(p).forEach((x, b) => {
|
|
3830
|
+
a.value[b] = x;
|
|
3843
3831
|
});
|
|
3844
3832
|
});
|
|
3845
3833
|
const l = () => {
|
|
@@ -3847,28 +3835,28 @@ const ns = {
|
|
|
3847
3835
|
}, c = (p) => {
|
|
3848
3836
|
n("update:modelValue", p);
|
|
3849
3837
|
}, d = (p) => `filter-${p}`, u = (p) => {
|
|
3850
|
-
var
|
|
3851
|
-
return (((
|
|
3852
|
-
value:
|
|
3853
|
-
label:
|
|
3838
|
+
var x, b;
|
|
3839
|
+
return (((b = (x = t.config.schema) == null ? void 0 : x[p]) == null ? void 0 : b.values) ?? []).map((C) => ({
|
|
3840
|
+
value: C,
|
|
3841
|
+
label: C
|
|
3854
3842
|
}));
|
|
3855
3843
|
}, g = (p) => {
|
|
3856
|
-
var
|
|
3857
|
-
return ((
|
|
3844
|
+
var x, b;
|
|
3845
|
+
return ((b = (x = t.config.schema) == null ? void 0 : x[p]) == null ? void 0 : b.type) ?? "text";
|
|
3858
3846
|
}, f = (p) => {
|
|
3859
3847
|
a.value = {
|
|
3860
3848
|
...a.value,
|
|
3861
3849
|
[p]: ""
|
|
3862
|
-
},
|
|
3850
|
+
}, v();
|
|
3863
3851
|
}, I = () => {
|
|
3864
|
-
a.value = {},
|
|
3865
|
-
},
|
|
3866
|
-
const
|
|
3867
|
-
p && (o.value = !1), n("update:modelValue", new URLSearchParams(
|
|
3852
|
+
a.value = {}, v(!0);
|
|
3853
|
+
}, v = (p = !1) => {
|
|
3854
|
+
const x = Object.keys(a.value).reduce((b, C) => (a.value[C] && (b[C] = `${a.value[C]}`), b), {});
|
|
3855
|
+
p && (o.value = !1), n("update:modelValue", new URLSearchParams(x).toString());
|
|
3868
3856
|
};
|
|
3869
|
-
return (p,
|
|
3870
|
-
const
|
|
3871
|
-
return e.config.isExactMatch ? (m(), R(
|
|
3857
|
+
return (p, x) => {
|
|
3858
|
+
const b = q("KInput"), C = q("KButton"), A = q("KSelect"), ne = q("KMenuItem"), pe = q("KMenu");
|
|
3859
|
+
return e.config.isExactMatch ? (m(), R(b, {
|
|
3872
3860
|
key: 0,
|
|
3873
3861
|
autocomplete: "off",
|
|
3874
3862
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3877,19 +3865,19 @@ const ns = {
|
|
|
3877
3865
|
placeholder: e.config.placeholder,
|
|
3878
3866
|
"onUpdate:modelValue": c
|
|
3879
3867
|
}, {
|
|
3880
|
-
before:
|
|
3881
|
-
|
|
3868
|
+
before: h(() => [
|
|
3869
|
+
N(cn)
|
|
3882
3870
|
]),
|
|
3883
3871
|
_: 1
|
|
3884
|
-
}, 8, ["model-value", "placeholder"])) : (m(), $("div",
|
|
3885
|
-
|
|
3872
|
+
}, 8, ["model-value", "placeholder"])) : (m(), $("div", zs, [
|
|
3873
|
+
N(C, {
|
|
3886
3874
|
appearance: "tertiary",
|
|
3887
3875
|
"data-testid": "filter-button",
|
|
3888
3876
|
onClick: l
|
|
3889
3877
|
}, {
|
|
3890
|
-
default:
|
|
3891
|
-
|
|
3892
|
-
|
|
3878
|
+
default: h(() => [
|
|
3879
|
+
N(cn),
|
|
3880
|
+
Z(" " + F(y(r)("filter.filterButtonText")) + " " + F(i.value.length > 0 ? `(${i.value.length})` : ""), 1)
|
|
3893
3881
|
]),
|
|
3894
3882
|
_: 1
|
|
3895
3883
|
}),
|
|
@@ -3899,68 +3887,68 @@ const ns = {
|
|
|
3899
3887
|
}, null, 512), [
|
|
3900
3888
|
[tt, o.value]
|
|
3901
3889
|
]),
|
|
3902
|
-
et(
|
|
3903
|
-
body:
|
|
3904
|
-
(m(!0), $(
|
|
3905
|
-
key:
|
|
3906
|
-
"data-testid":
|
|
3890
|
+
et(N(pe, { class: "kong-ui-entity-filter-menu" }, {
|
|
3891
|
+
body: h(() => [
|
|
3892
|
+
(m(!0), $(ve, null, ye(s.value, (z, w) => (m(), R(ne, {
|
|
3893
|
+
key: z.value,
|
|
3894
|
+
"data-testid": z.value,
|
|
3907
3895
|
expandable: "",
|
|
3908
3896
|
"last-menu-item": w === s.value.length - 1
|
|
3909
3897
|
}, {
|
|
3910
|
-
itemTitle:
|
|
3911
|
-
V("span",
|
|
3912
|
-
|
|
3898
|
+
itemTitle: h(() => [
|
|
3899
|
+
V("span", Hs, [
|
|
3900
|
+
Z(F(z.label) + " ", 1),
|
|
3913
3901
|
et(V("span", Js, null, 512), [
|
|
3914
|
-
[tt, i.value.includes(
|
|
3902
|
+
[tt, i.value.includes(z.value)]
|
|
3915
3903
|
])
|
|
3916
3904
|
])
|
|
3917
3905
|
]),
|
|
3918
|
-
itemBody:
|
|
3919
|
-
var
|
|
3906
|
+
itemBody: h(() => {
|
|
3907
|
+
var K, B;
|
|
3920
3908
|
return [
|
|
3921
3909
|
V("div", Ys, [
|
|
3922
3910
|
V("label", {
|
|
3923
3911
|
class: "menu-item-label",
|
|
3924
|
-
for: d(
|
|
3925
|
-
},
|
|
3926
|
-
((
|
|
3912
|
+
for: d(z.value)
|
|
3913
|
+
}, F(y(r)("filter.fieldLabel")), 9, Ws),
|
|
3914
|
+
((B = (K = e.config.schema) == null ? void 0 : K[z.value]) == null ? void 0 : B.type) === "select" ? (m(), R(A, {
|
|
3927
3915
|
key: 0,
|
|
3928
|
-
id: d(
|
|
3929
|
-
modelValue: a.value[
|
|
3930
|
-
"onUpdate:modelValue": (
|
|
3916
|
+
id: d(z.value),
|
|
3917
|
+
modelValue: a.value[z.value],
|
|
3918
|
+
"onUpdate:modelValue": (k) => a.value[z.value] = k,
|
|
3931
3919
|
appearance: "select",
|
|
3932
|
-
items: u(
|
|
3920
|
+
items: u(z.value),
|
|
3933
3921
|
placeholder: y(r)("filter.selectPlaceholder")
|
|
3934
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), R(
|
|
3922
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), R(b, {
|
|
3935
3923
|
key: 1,
|
|
3936
|
-
id: d(
|
|
3937
|
-
modelValue: a.value[
|
|
3938
|
-
"onUpdate:modelValue": (
|
|
3924
|
+
id: d(z.value),
|
|
3925
|
+
modelValue: a.value[z.value],
|
|
3926
|
+
"onUpdate:modelValue": (k) => a.value[z.value] = k,
|
|
3939
3927
|
autocomplete: "off",
|
|
3940
3928
|
placeholder: y(r)("filter.inputPlaceholder"),
|
|
3941
|
-
type: g(
|
|
3929
|
+
type: g(z.value)
|
|
3942
3930
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3943
3931
|
]),
|
|
3944
3932
|
V("div", Zs, [
|
|
3945
|
-
|
|
3933
|
+
N(C, {
|
|
3946
3934
|
appearance: "tertiary",
|
|
3947
3935
|
"data-testid": "apply-filter",
|
|
3948
3936
|
size: "small",
|
|
3949
|
-
onClick:
|
|
3937
|
+
onClick: x[0] || (x[0] = (k) => v(!0))
|
|
3950
3938
|
}, {
|
|
3951
|
-
default:
|
|
3952
|
-
|
|
3939
|
+
default: h(() => [
|
|
3940
|
+
Z(F(y(r)("filter.applyButtonText")), 1)
|
|
3953
3941
|
]),
|
|
3954
3942
|
_: 1
|
|
3955
3943
|
}),
|
|
3956
|
-
|
|
3944
|
+
N(C, {
|
|
3957
3945
|
appearance: "tertiary",
|
|
3958
3946
|
"data-testid": "clear-filter",
|
|
3959
3947
|
size: "small",
|
|
3960
|
-
onClick: (
|
|
3948
|
+
onClick: (k) => f(z.value)
|
|
3961
3949
|
}, {
|
|
3962
|
-
default:
|
|
3963
|
-
|
|
3950
|
+
default: h(() => [
|
|
3951
|
+
Z(F(y(r)("filter.clearButtonText")), 1)
|
|
3964
3952
|
]),
|
|
3965
3953
|
_: 2
|
|
3966
3954
|
}, 1032, ["onClick"])
|
|
@@ -3970,14 +3958,14 @@ const ns = {
|
|
|
3970
3958
|
_: 2
|
|
3971
3959
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
3972
3960
|
]),
|
|
3973
|
-
actionButton:
|
|
3961
|
+
actionButton: h(() => [
|
|
3974
3962
|
V("div", Qs, [
|
|
3975
|
-
|
|
3963
|
+
N(C, {
|
|
3976
3964
|
size: "small",
|
|
3977
3965
|
onClick: I
|
|
3978
3966
|
}, {
|
|
3979
|
-
default:
|
|
3980
|
-
|
|
3967
|
+
default: h(() => [
|
|
3968
|
+
Z(F(y(r)("filter.clearAllButtonText")), 1)
|
|
3981
3969
|
]),
|
|
3982
3970
|
_: 1
|
|
3983
3971
|
})
|
|
@@ -3990,7 +3978,7 @@ const ns = {
|
|
|
3990
3978
|
]));
|
|
3991
3979
|
};
|
|
3992
3980
|
}
|
|
3993
|
-
}), el = /* @__PURE__ */ ke(Xs, [["__scopeId", "data-v-4ea260f0"]]), Xe = /* @__PURE__ */
|
|
3981
|
+
}), el = /* @__PURE__ */ ke(Xs, [["__scopeId", "data-v-4ea260f0"]]), Xe = /* @__PURE__ */ re({
|
|
3994
3982
|
__name: "PermissionsWrapper",
|
|
3995
3983
|
props: {
|
|
3996
3984
|
/**
|
|
@@ -4012,13 +4000,13 @@ const ns = {
|
|
|
4012
4000
|
}
|
|
4013
4001
|
},
|
|
4014
4002
|
setup(e) {
|
|
4015
|
-
const n = e, t =
|
|
4003
|
+
const n = e, t = O(void 0), r = T(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
4016
4004
|
return Se(() => n.authFunction, async () => {
|
|
4017
4005
|
t.value = await n.authFunction();
|
|
4018
|
-
}, { immediate: !0 }), (o, a) => r.value ?
|
|
4006
|
+
}, { immediate: !0 }), (o, a) => r.value ? W(o.$slots, "default", {
|
|
4019
4007
|
key: 0,
|
|
4020
4008
|
isAllowed: t.value
|
|
4021
|
-
}) :
|
|
4009
|
+
}) : G("", !0);
|
|
4022
4010
|
}
|
|
4023
4011
|
}), tl = { class: "form-section-wrapper" }, nl = {
|
|
4024
4012
|
key: 0,
|
|
@@ -4029,7 +4017,7 @@ const ns = {
|
|
|
4029
4017
|
}, ol = {
|
|
4030
4018
|
key: 2,
|
|
4031
4019
|
class: "form-section-footer"
|
|
4032
|
-
}, al = { class: "form-section-content" }, il = /* @__PURE__ */
|
|
4020
|
+
}, al = { class: "form-section-content" }, il = /* @__PURE__ */ re({
|
|
4033
4021
|
__name: "EntityFormSection",
|
|
4034
4022
|
props: {
|
|
4035
4023
|
title: {
|
|
@@ -4056,34 +4044,34 @@ const ns = {
|
|
|
4056
4044
|
setup(e) {
|
|
4057
4045
|
const n = ut();
|
|
4058
4046
|
return (t, r) => (m(), $("fieldset", {
|
|
4059
|
-
class:
|
|
4047
|
+
class: Ne(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4060
4048
|
}, [
|
|
4061
4049
|
V("div", tl, [
|
|
4062
|
-
e.hideInfoHeader ?
|
|
4050
|
+
e.hideInfoHeader ? G("", !0) : (m(), $("div", {
|
|
4063
4051
|
key: 0,
|
|
4064
|
-
class:
|
|
4052
|
+
class: Ne(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4065
4053
|
}, [
|
|
4066
|
-
e.title ? (m(), $("h4", nl,
|
|
4054
|
+
e.title ? (m(), $("h4", nl, F(e.title), 1)) : G("", !0),
|
|
4067
4055
|
e.description || y(n).description ? (m(), $("div", rl, [
|
|
4068
|
-
|
|
4069
|
-
V("p", null,
|
|
4056
|
+
W(t.$slots, "description", {}, () => [
|
|
4057
|
+
V("p", null, F(e.description), 1)
|
|
4070
4058
|
], !0)
|
|
4071
|
-
])) :
|
|
4059
|
+
])) : G("", !0),
|
|
4072
4060
|
y(n).footer ? (m(), $("div", ol, [
|
|
4073
|
-
|
|
4074
|
-
])) :
|
|
4061
|
+
W(t.$slots, "footer", {}, void 0, !0)
|
|
4062
|
+
])) : G("", !0)
|
|
4075
4063
|
], 2)),
|
|
4076
4064
|
V("div", al, [
|
|
4077
|
-
|
|
4065
|
+
W(t.$slots, "default", {}, void 0, !0)
|
|
4078
4066
|
])
|
|
4079
4067
|
])
|
|
4080
4068
|
], 2));
|
|
4081
4069
|
}
|
|
4082
|
-
}), dn = /* @__PURE__ */ ke(il, [["__scopeId", "data-v-8b6dc312"]]), { useAxios:
|
|
4070
|
+
}), dn = /* @__PURE__ */ ke(il, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Ft, useDeleteUrlBuilder: sl, useErrors: ll, useExternalLinkCreator: $l, useFetchUrlBuilder: jl, useFetcher: ul, useDebouncedFilter: cr, useStringHelpers: Ml, useHelpers: El, useGatewayFeatureSupported: Ol, useTruncationDetector: Fl } = ue;
|
|
4083
4071
|
const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group-cta-text" }, pl = {
|
|
4084
4072
|
key: 0,
|
|
4085
4073
|
class: "kong-ui-entity-add-to-groups-error"
|
|
4086
|
-
}, fl = { key: 0 }, ml = /* @__PURE__ */
|
|
4074
|
+
}, fl = { key: 0 }, ml = /* @__PURE__ */ re({
|
|
4087
4075
|
__name: "AddToGroupModal",
|
|
4088
4076
|
props: {
|
|
4089
4077
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4100,10 +4088,10 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4100
4088
|
},
|
|
4101
4089
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4102
4090
|
setup(e, { emit: n }) {
|
|
4103
|
-
var
|
|
4104
|
-
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } =
|
|
4105
|
-
headers: (
|
|
4106
|
-
}), a =
|
|
4091
|
+
var B;
|
|
4092
|
+
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } = Ft({
|
|
4093
|
+
headers: (B = t.config) == null ? void 0 : B.requestHeaders
|
|
4094
|
+
}), a = O([]), {
|
|
4107
4095
|
debouncedQueryChange: i,
|
|
4108
4096
|
loading: s,
|
|
4109
4097
|
allRecords: l,
|
|
@@ -4118,101 +4106,101 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4118
4106
|
fetchedItemsKey: "data",
|
|
4119
4107
|
searchKeys: ["name", "id"]
|
|
4120
4108
|
}
|
|
4121
|
-
), g = T(() => c.value ? r("consumer_groups.errors.general") : ""), f =
|
|
4122
|
-
label:
|
|
4123
|
-
value:
|
|
4124
|
-
selected: a.value.includes(
|
|
4125
|
-
data:
|
|
4109
|
+
), g = T(() => c.value ? r("consumer_groups.errors.general") : ""), f = O(0), I = T(() => l.value === void 0), v = T(() => u.value.map((k) => ({
|
|
4110
|
+
label: k.name,
|
|
4111
|
+
value: k.id,
|
|
4112
|
+
selected: a.value.includes(k.id),
|
|
4113
|
+
data: k
|
|
4126
4114
|
// we need this to determine whether or not to show the description text
|
|
4127
|
-
}))), p = (
|
|
4128
|
-
var
|
|
4129
|
-
const
|
|
4130
|
-
return
|
|
4131
|
-
},
|
|
4132
|
-
|
|
4133
|
-
},
|
|
4115
|
+
}))), p = (k) => {
|
|
4116
|
+
var j;
|
|
4117
|
+
const S = I.value ? u.value.find((P) => P.id === k) : (j = l.value) == null ? void 0 : j.find((P) => P.id === k);
|
|
4118
|
+
return S ? S.name : k;
|
|
4119
|
+
}, x = () => {
|
|
4120
|
+
A.value = "", b.value = [], w.value = [], n("cancel");
|
|
4121
|
+
}, b = O([]), C = O(!1), A = O(""), ne = async () => {
|
|
4134
4122
|
if (!a.value.length) {
|
|
4135
|
-
|
|
4123
|
+
A.value = "", w.value = [], n("cancel");
|
|
4136
4124
|
return;
|
|
4137
4125
|
}
|
|
4138
|
-
|
|
4126
|
+
C.value = !0, A.value = "", b.value = [], w.value = [];
|
|
4139
4127
|
try {
|
|
4140
|
-
const
|
|
4141
|
-
let
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
}),
|
|
4128
|
+
const k = a.value.map((P) => z(P)), S = await Promise.allSettled(k);
|
|
4129
|
+
let j = !0;
|
|
4130
|
+
S.forEach((P) => {
|
|
4131
|
+
P.status !== "fulfilled" && (j = !1);
|
|
4132
|
+
}), j ? (b.value = [], w.value = [], n("add:success", a.value), a.value = []) : (b.value.length && n("add:partial-success", b.value), a.value = [], K(S));
|
|
4145
4133
|
} catch {
|
|
4146
|
-
|
|
4134
|
+
A.value = r("consumer_groups.errors.add"), n("error", A.value);
|
|
4147
4135
|
} finally {
|
|
4148
|
-
|
|
4136
|
+
C.value = !1;
|
|
4149
4137
|
}
|
|
4150
|
-
},
|
|
4151
|
-
var
|
|
4152
|
-
let
|
|
4153
|
-
return t.config.app === "konnect" ?
|
|
4154
|
-
}),
|
|
4155
|
-
const
|
|
4156
|
-
group:
|
|
4138
|
+
}, pe = T(() => {
|
|
4139
|
+
var S, j, P, J;
|
|
4140
|
+
let k = `${t.config.apiBaseUrl}${$e.list[t.config.app].forConsumer}`;
|
|
4141
|
+
return t.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((S = t.config) == null ? void 0 : S.controlPlaneId) || "").replace(/{consumerId}/gi, ((j = t.config) == null ? void 0 : j.consumerId) || "") : t.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (P = t.config) != null && P.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((J = t.config) == null ? void 0 : J.consumerId) || "")), k;
|
|
4142
|
+
}), z = async (k) => {
|
|
4143
|
+
const S = {
|
|
4144
|
+
group: k
|
|
4157
4145
|
};
|
|
4158
4146
|
try {
|
|
4159
|
-
const
|
|
4160
|
-
return
|
|
4161
|
-
} catch (
|
|
4162
|
-
let
|
|
4163
|
-
return
|
|
4147
|
+
const j = await o.post(pe.value, S);
|
|
4148
|
+
return b.value.push(k), j;
|
|
4149
|
+
} catch (j) {
|
|
4150
|
+
let P = `${p(k)} - ${j.message}`;
|
|
4151
|
+
return j.response.status === 409 && (P = `${p(k)} - ${r("consumer_groups.errors.already_added")}`), Promise.reject(Error(P));
|
|
4164
4152
|
}
|
|
4165
|
-
}, w =
|
|
4166
|
-
w.value =
|
|
4167
|
-
var
|
|
4168
|
-
return (
|
|
4153
|
+
}, w = O([]), K = (k) => {
|
|
4154
|
+
w.value = k.map((S) => {
|
|
4155
|
+
var j;
|
|
4156
|
+
return (j = S.reason) == null ? void 0 : j.message;
|
|
4169
4157
|
}).filter(Boolean);
|
|
4170
4158
|
};
|
|
4171
|
-
return Se(
|
|
4159
|
+
return Se(v, () => {
|
|
4172
4160
|
f.value++;
|
|
4173
4161
|
}, { immediate: !0, deep: !0 }), Qe(async () => {
|
|
4174
4162
|
await d();
|
|
4175
|
-
}), (
|
|
4176
|
-
const
|
|
4163
|
+
}), (k, S) => {
|
|
4164
|
+
const j = q("KMultiselect"), P = q("KAlert"), J = q("KPrompt");
|
|
4177
4165
|
return m(), R(J, {
|
|
4178
|
-
"action-pending":
|
|
4166
|
+
"action-pending": C.value,
|
|
4179
4167
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
4180
4168
|
"data-testid": "add-to-group-modal",
|
|
4181
4169
|
"is-visible": e.visible,
|
|
4182
4170
|
title: y(r)("consumer_groups.consumers.add.title"),
|
|
4183
|
-
onCanceled:
|
|
4184
|
-
onProceed:
|
|
4171
|
+
onCanceled: x,
|
|
4172
|
+
onProceed: ne
|
|
4185
4173
|
}, {
|
|
4186
|
-
"body-content":
|
|
4174
|
+
"body-content": h(() => [
|
|
4187
4175
|
V("div", cl, [
|
|
4188
|
-
V("p", dl,
|
|
4189
|
-
|
|
4176
|
+
V("p", dl, F(y(r)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4177
|
+
N(j, {
|
|
4190
4178
|
modelValue: a.value,
|
|
4191
|
-
"onUpdate:modelValue":
|
|
4179
|
+
"onUpdate:modelValue": S[0] || (S[0] = (Q) => a.value = Q),
|
|
4192
4180
|
autosuggest: "",
|
|
4193
4181
|
"data-testid": "add-to-groups-multiselect",
|
|
4194
4182
|
"dropdown-footer-text": I.value ? y(r)("consumer_groups.consumers.add.footer") : void 0,
|
|
4195
|
-
items:
|
|
4183
|
+
items: v.value,
|
|
4196
4184
|
label: y(r)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
4197
4185
|
loading: y(s),
|
|
4198
4186
|
placeholder: y(r)("consumer_groups.consumers.add.consumer_group_placeholder"),
|
|
4199
|
-
readonly:
|
|
4187
|
+
readonly: C.value,
|
|
4200
4188
|
required: "",
|
|
4201
4189
|
width: "100%",
|
|
4202
4190
|
onQueryChange: y(i)
|
|
4203
4191
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
alertMessage:
|
|
4207
|
-
V("p", null,
|
|
4192
|
+
A.value || g.value || w.value.length ? (m(), $("div", pl, [
|
|
4193
|
+
N(P, { appearance: "danger" }, {
|
|
4194
|
+
alertMessage: h(() => [
|
|
4195
|
+
V("p", null, F(y(r)("consumer_groups.errors.add")), 1),
|
|
4208
4196
|
w.value.length ? (m(), $("ul", fl, [
|
|
4209
|
-
(m(!0), $(
|
|
4210
|
-
])) :
|
|
4211
|
-
V("div", null,
|
|
4197
|
+
(m(!0), $(ve, null, ye(w.value, (Q, X) => (m(), $("li", { key: X }, F(Q), 1))), 128))
|
|
4198
|
+
])) : G("", !0),
|
|
4199
|
+
V("div", null, F(A.value || g.value), 1)
|
|
4212
4200
|
]),
|
|
4213
4201
|
_: 1
|
|
4214
4202
|
})
|
|
4215
|
-
])) :
|
|
4203
|
+
])) : G("", !0)
|
|
4216
4204
|
])
|
|
4217
4205
|
]),
|
|
4218
4206
|
_: 1
|
|
@@ -4220,12 +4208,12 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4220
4208
|
};
|
|
4221
4209
|
}
|
|
4222
4210
|
});
|
|
4223
|
-
const
|
|
4211
|
+
const Nt = (e, n) => {
|
|
4224
4212
|
const t = e.__vccOpts || e;
|
|
4225
4213
|
for (const [r, o] of n)
|
|
4226
4214
|
t[r] = o;
|
|
4227
4215
|
return t;
|
|
4228
|
-
}, gl = /* @__PURE__ */
|
|
4216
|
+
}, gl = /* @__PURE__ */ Nt(ml, [["__scopeId", "data-v-4d30f3c5"]]), yl = { class: "kong-ui-entities-consumer-groups-list" }, hl = { key: 1 }, vl = /* @__PURE__ */ re({
|
|
4229
4217
|
__name: "ConsumerGroupList",
|
|
4230
4218
|
props: {
|
|
4231
4219
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4266,132 +4254,129 @@ const Ft = (e, n) => {
|
|
|
4266
4254
|
},
|
|
4267
4255
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4268
4256
|
setup(e, { emit: n }) {
|
|
4269
|
-
var
|
|
4270
|
-
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } =
|
|
4271
|
-
headers: (
|
|
4272
|
-
}), s =
|
|
4257
|
+
var Kt;
|
|
4258
|
+
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } = Ft({
|
|
4259
|
+
headers: (Kt = t.config) == null ? void 0 : Kt.requestHeaders
|
|
4260
|
+
}), s = O(1), l = T(() => !!t.config.consumerId), c = T(() => t.config.app !== "kongManager" || !!t.config.disableSorting), d = {
|
|
4273
4261
|
name: { label: o("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4274
4262
|
};
|
|
4275
4263
|
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 };
|
|
4276
|
-
const u = d, g = (
|
|
4277
|
-
"data-testid":
|
|
4264
|
+
const u = d, g = (E) => ({
|
|
4265
|
+
"data-testid": E.username ?? E.custom_id ?? E.id
|
|
4278
4266
|
}), f = T(() => {
|
|
4279
|
-
var
|
|
4280
|
-
let
|
|
4281
|
-
return t.config.app === "konnect" ?
|
|
4282
|
-
}), I =
|
|
4283
|
-
const
|
|
4284
|
-
return
|
|
4285
|
-
isExactMatch:
|
|
4267
|
+
var H, le, Ce, Ee;
|
|
4268
|
+
let E = `${t.config.apiBaseUrl}${$e.list[t.config.app][l.value ? "forConsumer" : "all"]}`;
|
|
4269
|
+
return t.config.app === "konnect" ? E = E.replace(/{controlPlaneId}/gi, ((H = t.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerId}/gi, ((le = t.config) == null ? void 0 : le.consumerId) || "") : t.config.app === "kongManager" && (E = E.replace(/\/{workspace}/gi, (Ce = t.config) != null && Ce.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), E;
|
|
4270
|
+
}), I = O(""), v = T(() => {
|
|
4271
|
+
const E = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4272
|
+
return E ? {
|
|
4273
|
+
isExactMatch: E,
|
|
4286
4274
|
fields: {
|
|
4287
4275
|
username: d.name,
|
|
4288
4276
|
id: { label: o("consumer_groups.list.table_headers.id") }
|
|
4289
4277
|
},
|
|
4290
4278
|
placeholder: o("consumer_groups.search.placeholder")
|
|
4291
4279
|
} : {
|
|
4292
|
-
isExactMatch:
|
|
4280
|
+
isExactMatch: E,
|
|
4293
4281
|
fields: {
|
|
4294
4282
|
name: d.name
|
|
4295
4283
|
},
|
|
4296
4284
|
schema: t.config.filterSchema
|
|
4297
4285
|
};
|
|
4298
|
-
}), p = T(() => l.value ? "consumer_groups" : void 0), { fetcher:
|
|
4286
|
+
}), p = T(() => l.value ? "consumer_groups" : void 0), { fetcher: x, fetcherState: b } = ul(t.config, f.value, p.value), C = () => {
|
|
4299
4287
|
I.value = "";
|
|
4300
|
-
},
|
|
4288
|
+
}, A = () => {
|
|
4301
4289
|
s.value++;
|
|
4302
|
-
},
|
|
4303
|
-
const
|
|
4304
|
-
if (!
|
|
4290
|
+
}, ne = O(""), pe = (E, H) => {
|
|
4291
|
+
const le = E.id;
|
|
4292
|
+
if (!H(le)) {
|
|
4305
4293
|
n("copy:error", {
|
|
4306
|
-
entity:
|
|
4294
|
+
entity: E,
|
|
4307
4295
|
field: "id",
|
|
4308
4296
|
message: o("consumer_groups.errors.copy")
|
|
4309
4297
|
});
|
|
4310
4298
|
return;
|
|
4311
4299
|
}
|
|
4312
4300
|
n("copy:success", {
|
|
4313
|
-
entity:
|
|
4301
|
+
entity: E,
|
|
4314
4302
|
field: "id",
|
|
4315
|
-
message: o("consumer_groups.copy.success", { val:
|
|
4303
|
+
message: o("consumer_groups.copy.success", { val: le })
|
|
4316
4304
|
});
|
|
4317
|
-
},
|
|
4318
|
-
const
|
|
4319
|
-
if (!
|
|
4305
|
+
}, z = (E, H) => {
|
|
4306
|
+
const le = JSON.stringify(E);
|
|
4307
|
+
if (!H(le)) {
|
|
4320
4308
|
n("copy:error", {
|
|
4321
|
-
entity:
|
|
4309
|
+
entity: E,
|
|
4322
4310
|
message: o("consumer_groups.errors.copy")
|
|
4323
4311
|
});
|
|
4324
4312
|
return;
|
|
4325
4313
|
}
|
|
4326
4314
|
n("copy:success", {
|
|
4327
|
-
entity:
|
|
4315
|
+
entity: E,
|
|
4328
4316
|
message: o("consumer_groups.copy.success_brief")
|
|
4329
4317
|
});
|
|
4330
|
-
}, w = async (
|
|
4331
|
-
var
|
|
4332
|
-
await ((
|
|
4333
|
-
},
|
|
4318
|
+
}, w = async (E) => {
|
|
4319
|
+
var le;
|
|
4320
|
+
await ((le = t.canRetrieve) == null ? void 0 : le.call(t, E)) && a.push(t.config.getViewRoute(E.id));
|
|
4321
|
+
}, K = (E) => ({
|
|
4334
4322
|
label: o("consumer_groups.actions.view"),
|
|
4335
|
-
to: t.config.getViewRoute(
|
|
4336
|
-
}),
|
|
4323
|
+
to: t.config.getViewRoute(E)
|
|
4324
|
+
}), B = (E) => ({
|
|
4337
4325
|
label: o("consumer_groups.actions.edit"),
|
|
4338
|
-
to: t.config.getEditRoute(
|
|
4339
|
-
}),
|
|
4340
|
-
|
|
4341
|
-
},
|
|
4342
|
-
|
|
4343
|
-
},
|
|
4344
|
-
var
|
|
4345
|
-
if ((
|
|
4346
|
-
|
|
4326
|
+
to: t.config.getEditRoute(E)
|
|
4327
|
+
}), k = O(void 0), S = O(!1), j = O(!1), P = O(""), J = sl(t.config, f.value), Q = (E) => {
|
|
4328
|
+
k.value = E, S.value = !0;
|
|
4329
|
+
}, X = () => {
|
|
4330
|
+
S.value = !1;
|
|
4331
|
+
}, ee = async () => {
|
|
4332
|
+
var E, H, le;
|
|
4333
|
+
if ((E = k.value) != null && E.id) {
|
|
4334
|
+
j.value = !0;
|
|
4347
4335
|
try {
|
|
4348
|
-
await i.delete(J(
|
|
4349
|
-
} catch (
|
|
4350
|
-
|
|
4336
|
+
await i.delete(J(k.value.id)), j.value = !1, S.value = !1, s.value++, n("delete:success", k.value);
|
|
4337
|
+
} catch (Ce) {
|
|
4338
|
+
P.value = ((le = (H = Ce.response) == null ? void 0 : H.data) == null ? void 0 : le.message) || Ce.message || o("consumer_groups.errors.delete"), n("error", Ce);
|
|
4351
4339
|
} finally {
|
|
4352
|
-
|
|
4340
|
+
j.value = !1;
|
|
4353
4341
|
}
|
|
4354
4342
|
}
|
|
4355
|
-
},
|
|
4356
|
-
|
|
4343
|
+
}, ie = O(!1), De = () => {
|
|
4344
|
+
ie.value = !0;
|
|
4357
4345
|
}, _ = () => {
|
|
4358
|
-
|
|
4359
|
-
},
|
|
4360
|
-
|
|
4361
|
-
},
|
|
4346
|
+
ie.value = !1;
|
|
4347
|
+
}, L = (E, H) => {
|
|
4348
|
+
H || _(), s.value++, n("add:success", E);
|
|
4349
|
+
}, oe = () => {
|
|
4362
4350
|
l.value && De();
|
|
4363
|
-
},
|
|
4364
|
-
|
|
4365
|
-
},
|
|
4366
|
-
|
|
4367
|
-
},
|
|
4368
|
-
var
|
|
4369
|
-
let
|
|
4370
|
-
return t.config.app === "konnect" ?
|
|
4371
|
-
}), Ge =
|
|
4372
|
-
if (
|
|
4351
|
+
}, U = O(void 0), D = O(!1), ge = O(""), _e = (E) => {
|
|
4352
|
+
U.value = E, D.value = !0;
|
|
4353
|
+
}, ce = () => {
|
|
4354
|
+
D.value = !1, U.value = void 0;
|
|
4355
|
+
}, Ke = T(() => {
|
|
4356
|
+
var H, le, Ce, Ee;
|
|
4357
|
+
let E = `${t.config.apiBaseUrl}${$e.list[t.config.app].oneForConsumer}`;
|
|
4358
|
+
return t.config.app === "konnect" ? E = E.replace(/{controlPlaneId}/gi, ((H = t.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerId}/gi, ((le = t.config) == null ? void 0 : le.consumerId) || "") : t.config.app === "kongManager" && (E = E.replace(/\/{workspace}/gi, (Ce = t.config) != null && Ce.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), E;
|
|
4359
|
+
}), Ge = O(!1), dr = async () => {
|
|
4360
|
+
if (U.value) {
|
|
4373
4361
|
Ge.value = !0;
|
|
4374
4362
|
try {
|
|
4375
|
-
const
|
|
4376
|
-
await i.delete(
|
|
4377
|
-
} catch (
|
|
4378
|
-
ge.value =
|
|
4363
|
+
const E = Ke.value.replace(/{consumerGroupId}/gi, U.value.id);
|
|
4364
|
+
await i.delete(E), n("remove:success", U.value), ce(), s.value++;
|
|
4365
|
+
} catch (E) {
|
|
4366
|
+
ge.value = E.message || o("consumer_groups.errors.delete"), n("error", E);
|
|
4379
4367
|
} finally {
|
|
4380
4368
|
Ge.value = !1;
|
|
4381
4369
|
}
|
|
4382
4370
|
}
|
|
4383
4371
|
};
|
|
4384
|
-
Se(
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
D.value = {
|
|
4388
|
-
title: o("consumer_groups.errors.general")
|
|
4389
|
-
}, (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);
|
|
4372
|
+
Se(b, (E) => {
|
|
4373
|
+
if (E.status === Oe.Error) {
|
|
4374
|
+
ne.value = o("consumer_groups.errors.general"), n("error", E.error);
|
|
4390
4375
|
return;
|
|
4391
4376
|
}
|
|
4392
|
-
|
|
4377
|
+
ne.value = "";
|
|
4393
4378
|
});
|
|
4394
|
-
const pt =
|
|
4379
|
+
const pt = O({
|
|
4395
4380
|
ctaPath: l.value ? void 0 : t.config.createRoute,
|
|
4396
4381
|
ctaText: void 0,
|
|
4397
4382
|
message: o("consumer_groups.list.empty_state.description"),
|
|
@@ -4399,51 +4384,51 @@ const Ft = (e, n) => {
|
|
|
4399
4384
|
});
|
|
4400
4385
|
return Qe(async () => {
|
|
4401
4386
|
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"));
|
|
4402
|
-
}), (
|
|
4403
|
-
const
|
|
4387
|
+
}), (E, H) => {
|
|
4388
|
+
const le = q("KButton"), Ce = q("KBadge"), Ee = q("KTruncate"), ze = q("KDropdownItem"), Bt = q("KClipboardProvider"), pr = q("KPrompt");
|
|
4404
4389
|
return m(), $("div", yl, [
|
|
4405
|
-
|
|
4390
|
+
N(y(Ks), {
|
|
4406
4391
|
"cache-identifier": e.cacheIdentifier,
|
|
4407
4392
|
"disable-pagination": l.value,
|
|
4408
4393
|
"disable-pagination-page-jump": "",
|
|
4409
4394
|
"disable-sorting": c.value,
|
|
4410
4395
|
"empty-state-options": pt.value,
|
|
4411
4396
|
"enable-entity-actions": "",
|
|
4412
|
-
"error-message":
|
|
4413
|
-
fetcher: y(
|
|
4397
|
+
"error-message": ne.value,
|
|
4398
|
+
fetcher: y(x),
|
|
4414
4399
|
"fetcher-cache-key": s.value,
|
|
4415
4400
|
"pagination-type": "offset",
|
|
4416
4401
|
"preferences-storage-key": "kong-ui-entities-consumer-groups-list",
|
|
4417
4402
|
query: I.value,
|
|
4418
4403
|
"row-attributes": g,
|
|
4419
4404
|
"table-headers": y(u),
|
|
4420
|
-
onClearSearchInput:
|
|
4421
|
-
"onClick:row":
|
|
4422
|
-
onEmptyStateCtaClicked:
|
|
4423
|
-
onSort:
|
|
4405
|
+
onClearSearchInput: C,
|
|
4406
|
+
"onClick:row": H[3] || (H[3] = (Y) => w(Y)),
|
|
4407
|
+
onEmptyStateCtaClicked: oe,
|
|
4408
|
+
onSort: A
|
|
4424
4409
|
}, {
|
|
4425
|
-
"toolbar-filter":
|
|
4426
|
-
l.value ?
|
|
4410
|
+
"toolbar-filter": h(() => [
|
|
4411
|
+
l.value ? G("", !0) : (m(), R(y(el), {
|
|
4427
4412
|
key: 0,
|
|
4428
4413
|
modelValue: I.value,
|
|
4429
|
-
"onUpdate:modelValue":
|
|
4430
|
-
config:
|
|
4414
|
+
"onUpdate:modelValue": H[0] || (H[0] = (Y) => I.value = Y),
|
|
4415
|
+
config: v.value
|
|
4431
4416
|
}, null, 8, ["modelValue", "config"]))
|
|
4432
4417
|
]),
|
|
4433
|
-
"toolbar-button":
|
|
4434
|
-
|
|
4418
|
+
"toolbar-button": h(() => [
|
|
4419
|
+
N(y(Xe), {
|
|
4435
4420
|
"auth-function": () => e.canCreate()
|
|
4436
4421
|
}, {
|
|
4437
|
-
default:
|
|
4438
|
-
|
|
4422
|
+
default: h(() => [
|
|
4423
|
+
N(le, {
|
|
4439
4424
|
appearance: "primary",
|
|
4440
4425
|
"data-testid": "toolbar-add-consumer-group",
|
|
4441
4426
|
icon: "plus",
|
|
4442
4427
|
to: e.config.consumerId ? void 0 : e.config.createRoute,
|
|
4443
|
-
onClick:
|
|
4428
|
+
onClick: H[1] || (H[1] = () => e.config.consumerId ? De() : void 0)
|
|
4444
4429
|
}, {
|
|
4445
|
-
default:
|
|
4446
|
-
|
|
4430
|
+
default: h(() => [
|
|
4431
|
+
Z(F(e.config.consumerId ? y(o)("consumer_groups.actions.add_to_group") : y(o)("consumer_groups.list.toolbar_actions.new_consumer_group")), 1)
|
|
4447
4432
|
]),
|
|
4448
4433
|
_: 1
|
|
4449
4434
|
}, 8, ["to"])
|
|
@@ -4451,22 +4436,22 @@ const Ft = (e, n) => {
|
|
|
4451
4436
|
_: 1
|
|
4452
4437
|
}, 8, ["auth-function"])
|
|
4453
4438
|
]),
|
|
4454
|
-
name:
|
|
4455
|
-
V("b", null,
|
|
4439
|
+
name: h(({ rowValue: Y }) => [
|
|
4440
|
+
V("b", null, F(Y ?? "-"), 1)
|
|
4456
4441
|
]),
|
|
4457
|
-
consumers_count:
|
|
4458
|
-
|
|
4442
|
+
consumers_count: h(({ rowValue: Y }) => [
|
|
4443
|
+
Z(F(Y ?? "-"), 1)
|
|
4459
4444
|
]),
|
|
4460
|
-
tags:
|
|
4461
|
-
(
|
|
4462
|
-
default:
|
|
4463
|
-
(m(!0), $(
|
|
4445
|
+
tags: h(({ rowValue: Y }) => [
|
|
4446
|
+
(Y == null ? void 0 : Y.length) > 0 ? (m(), R(Ee, { key: 0 }, {
|
|
4447
|
+
default: h(() => [
|
|
4448
|
+
(m(!0), $(ve, null, ye(Y, (Be) => (m(), R(Ce, {
|
|
4464
4449
|
key: Be,
|
|
4465
|
-
onClick:
|
|
4450
|
+
onClick: H[2] || (H[2] = rt(() => {
|
|
4466
4451
|
}, ["stop"]))
|
|
4467
4452
|
}, {
|
|
4468
|
-
default:
|
|
4469
|
-
|
|
4453
|
+
default: h(() => [
|
|
4454
|
+
Z(F(Be), 1)
|
|
4470
4455
|
]),
|
|
4471
4456
|
_: 2
|
|
4472
4457
|
}, 1024))), 128))
|
|
@@ -4474,70 +4459,70 @@ const Ft = (e, n) => {
|
|
|
4474
4459
|
_: 2
|
|
4475
4460
|
}, 1024)) : (m(), $("span", hl, "-"))
|
|
4476
4461
|
]),
|
|
4477
|
-
actions:
|
|
4478
|
-
|
|
4479
|
-
default:
|
|
4480
|
-
|
|
4462
|
+
actions: h(({ row: Y }) => [
|
|
4463
|
+
N(Bt, null, {
|
|
4464
|
+
default: h(({ copyToClipboard: Be }) => [
|
|
4465
|
+
N(ze, {
|
|
4481
4466
|
"data-testid": "action-entity-copy-id",
|
|
4482
|
-
onClick: (fr) =>
|
|
4467
|
+
onClick: (fr) => pe(Y, Be)
|
|
4483
4468
|
}, {
|
|
4484
|
-
default:
|
|
4485
|
-
|
|
4469
|
+
default: h(() => [
|
|
4470
|
+
Z(F(y(o)("consumer_groups.actions.copy_id")), 1)
|
|
4486
4471
|
]),
|
|
4487
4472
|
_: 2
|
|
4488
4473
|
}, 1032, ["onClick"])
|
|
4489
4474
|
]),
|
|
4490
4475
|
_: 2
|
|
4491
4476
|
}, 1024),
|
|
4492
|
-
|
|
4493
|
-
default:
|
|
4494
|
-
|
|
4477
|
+
N(Bt, null, {
|
|
4478
|
+
default: h(({ copyToClipboard: Be }) => [
|
|
4479
|
+
N(ze, {
|
|
4495
4480
|
"data-testid": "action-entity-copy-json",
|
|
4496
|
-
onClick: (fr) => Y
|
|
4481
|
+
onClick: (fr) => z(Y, Be)
|
|
4497
4482
|
}, {
|
|
4498
|
-
default:
|
|
4499
|
-
|
|
4483
|
+
default: h(() => [
|
|
4484
|
+
Z(F(y(o)("consumer_groups.actions.copy_json")), 1)
|
|
4500
4485
|
]),
|
|
4501
4486
|
_: 2
|
|
4502
4487
|
}, 1032, ["onClick"])
|
|
4503
4488
|
]),
|
|
4504
4489
|
_: 2
|
|
4505
4490
|
}, 1024),
|
|
4506
|
-
|
|
4507
|
-
"auth-function": () => e.canRetrieve(
|
|
4491
|
+
N(y(Xe), {
|
|
4492
|
+
"auth-function": () => e.canRetrieve(Y)
|
|
4508
4493
|
}, {
|
|
4509
|
-
default:
|
|
4510
|
-
|
|
4494
|
+
default: h(() => [
|
|
4495
|
+
N(ze, {
|
|
4511
4496
|
"data-testid": "action-entity-view",
|
|
4512
4497
|
"has-divider": "",
|
|
4513
|
-
item:
|
|
4498
|
+
item: K(Y.id)
|
|
4514
4499
|
}, null, 8, ["item"])
|
|
4515
4500
|
]),
|
|
4516
4501
|
_: 2
|
|
4517
4502
|
}, 1032, ["auth-function"]),
|
|
4518
|
-
|
|
4519
|
-
"auth-function": () => e.canEdit(
|
|
4503
|
+
N(y(Xe), {
|
|
4504
|
+
"auth-function": () => e.canEdit(Y)
|
|
4520
4505
|
}, {
|
|
4521
|
-
default:
|
|
4522
|
-
|
|
4506
|
+
default: h(() => [
|
|
4507
|
+
N(ze, {
|
|
4523
4508
|
"data-testid": "action-entity-edit",
|
|
4524
|
-
item:
|
|
4509
|
+
item: B(Y.id)
|
|
4525
4510
|
}, null, 8, ["item"])
|
|
4526
4511
|
]),
|
|
4527
4512
|
_: 2
|
|
4528
4513
|
}, 1032, ["auth-function"]),
|
|
4529
|
-
|
|
4530
|
-
"auth-function": () => e.canDelete(
|
|
4514
|
+
N(y(Xe), {
|
|
4515
|
+
"auth-function": () => e.canDelete(Y)
|
|
4531
4516
|
}, {
|
|
4532
|
-
default:
|
|
4533
|
-
|
|
4517
|
+
default: h(() => [
|
|
4518
|
+
N(ze, {
|
|
4534
4519
|
danger: "",
|
|
4535
4520
|
"data-testid": "action-entity-delete",
|
|
4536
4521
|
"has-divider": "",
|
|
4537
|
-
onClick: () => e.config.consumerId ? _e(
|
|
4522
|
+
onClick: () => e.config.consumerId ? _e(Y) : Q(Y)
|
|
4538
4523
|
}, {
|
|
4539
|
-
default:
|
|
4540
|
-
|
|
4524
|
+
default: h(() => [
|
|
4525
|
+
Z(F(e.config.consumerId ? y(o)("consumer_groups.actions.exit") : y(o)("consumer_groups.actions.delete")), 1)
|
|
4541
4526
|
]),
|
|
4542
4527
|
_: 2
|
|
4543
4528
|
}, 1032, ["onClick"])
|
|
@@ -4547,67 +4532,67 @@ const Ft = (e, n) => {
|
|
|
4547
4532
|
]),
|
|
4548
4533
|
_: 1
|
|
4549
4534
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4550
|
-
|
|
4551
|
-
"action-pending":
|
|
4535
|
+
N(y(qs), {
|
|
4536
|
+
"action-pending": j.value,
|
|
4552
4537
|
"data-testid": "delete-consumer-group-modal",
|
|
4553
4538
|
description: y(o)("consumer_groups.delete.description"),
|
|
4554
|
-
"entity-name":
|
|
4539
|
+
"entity-name": k.value && (k.value.name || k.value.id),
|
|
4555
4540
|
"entity-type": y(yn).ConsumerGroup,
|
|
4556
|
-
error:
|
|
4541
|
+
error: P.value,
|
|
4557
4542
|
title: y(o)("consumer_groups.delete.title"),
|
|
4558
|
-
visible:
|
|
4559
|
-
onCancel:
|
|
4560
|
-
onProceed:
|
|
4543
|
+
visible: S.value,
|
|
4544
|
+
onCancel: X,
|
|
4545
|
+
onProceed: ee
|
|
4561
4546
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4562
4547
|
e.config.consumerId ? (m(), R(gl, {
|
|
4563
4548
|
key: 0,
|
|
4564
4549
|
config: e.config,
|
|
4565
4550
|
"data-testid": "add-to-group-modal",
|
|
4566
|
-
visible:
|
|
4567
|
-
"onAdd:partialSuccess":
|
|
4568
|
-
"onAdd:success":
|
|
4551
|
+
visible: ie.value,
|
|
4552
|
+
"onAdd:partialSuccess": H[4] || (H[4] = (Y) => L(Y, !0)),
|
|
4553
|
+
"onAdd:success": H[5] || (H[5] = (Y) => L(Y)),
|
|
4569
4554
|
onCancel: _
|
|
4570
|
-
}, null, 8, ["config", "visible"])) :
|
|
4571
|
-
e.config.consumerId &&
|
|
4555
|
+
}, null, 8, ["config", "visible"])) : G("", !0),
|
|
4556
|
+
e.config.consumerId && U.value ? (m(), R(pr, {
|
|
4572
4557
|
key: 1,
|
|
4573
4558
|
"data-testid": "exit-group-modal",
|
|
4574
|
-
"is-visible":
|
|
4559
|
+
"is-visible": D.value,
|
|
4575
4560
|
title: y(o)("consumer_groups.consumers.exit.title"),
|
|
4576
4561
|
type: "danger",
|
|
4577
|
-
onCanceled:
|
|
4562
|
+
onCanceled: ce,
|
|
4578
4563
|
onProceed: dr
|
|
4579
4564
|
}, {
|
|
4580
|
-
"body-content":
|
|
4581
|
-
|
|
4565
|
+
"body-content": h(() => [
|
|
4566
|
+
N(y(r), {
|
|
4582
4567
|
class: "exit-modal-message",
|
|
4583
4568
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
4584
4569
|
tag: "p"
|
|
4585
4570
|
}, Te({
|
|
4586
|
-
consumerGroup:
|
|
4587
|
-
V("strong", null,
|
|
4571
|
+
consumerGroup: h(() => [
|
|
4572
|
+
V("strong", null, F(U.value.name || U.value.id), 1)
|
|
4588
4573
|
]),
|
|
4589
4574
|
_: 2
|
|
4590
4575
|
}, [
|
|
4591
4576
|
e.config.consumerUsername ? {
|
|
4592
4577
|
name: "consumer",
|
|
4593
|
-
fn:
|
|
4594
|
-
V("strong", null,
|
|
4578
|
+
fn: h(() => [
|
|
4579
|
+
V("strong", null, F(e.config.consumerUsername), 1)
|
|
4595
4580
|
]),
|
|
4596
4581
|
key: "0"
|
|
4597
4582
|
} : void 0
|
|
4598
4583
|
]), 1032, ["keypath"]),
|
|
4599
|
-
V("p", null,
|
|
4584
|
+
V("p", null, F(y(o)("consumer_groups.consumers.exit.description")), 1)
|
|
4600
4585
|
]),
|
|
4601
4586
|
_: 1
|
|
4602
|
-
}, 8, ["is-visible", "title"])) :
|
|
4587
|
+
}, 8, ["is-visible", "title"])) : G("", !0)
|
|
4603
4588
|
]);
|
|
4604
4589
|
};
|
|
4605
4590
|
}
|
|
4606
4591
|
});
|
|
4607
|
-
const
|
|
4592
|
+
const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { class: "kong-ui-entities-consumer-group-form" }, Cl = { class: "select-item-label" }, kl = {
|
|
4608
4593
|
key: 0,
|
|
4609
4594
|
class: "select-item-desc"
|
|
4610
|
-
}, _l = /* @__PURE__ */
|
|
4595
|
+
}, _l = /* @__PURE__ */ re({
|
|
4611
4596
|
__name: "ConsumerGroupForm",
|
|
4612
4597
|
props: {
|
|
4613
4598
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4625,8 +4610,8 @@ const Fl = /* @__PURE__ */ Ft(vl, [["__scopeId", "data-v-69c5dd3a"]]), bl = { cl
|
|
|
4625
4610
|
},
|
|
4626
4611
|
emits: ["update", "error", "loading"],
|
|
4627
4612
|
setup(e, { emit: n }) {
|
|
4628
|
-
var
|
|
4629
|
-
const t = e, { i18n: { t: r } } = ct.useI18n(), o = wt(), a =
|
|
4613
|
+
var ee, ie, De;
|
|
4614
|
+
const t = e, { i18n: { t: r } } = ct.useI18n(), o = wt(), a = Pt({
|
|
4630
4615
|
fields: {
|
|
4631
4616
|
name: "",
|
|
4632
4617
|
tags: "",
|
|
@@ -4634,7 +4619,7 @@ const Fl = /* @__PURE__ */ Ft(vl, [["__scopeId", "data-v-69c5dd3a"]]), bl = { cl
|
|
|
4634
4619
|
},
|
|
4635
4620
|
errorMessage: "",
|
|
4636
4621
|
readonly: !1
|
|
4637
|
-
}), i =
|
|
4622
|
+
}), i = Pt({
|
|
4638
4623
|
name: "",
|
|
4639
4624
|
tags: "",
|
|
4640
4625
|
consumers: []
|
|
@@ -4644,10 +4629,10 @@ const Fl = /* @__PURE__ */ Ft(vl, [["__scopeId", "data-v-69c5dd3a"]]), bl = { cl
|
|
|
4644
4629
|
error: c,
|
|
4645
4630
|
loadItems: d,
|
|
4646
4631
|
results: u
|
|
4647
|
-
} = cr(t.config, (
|
|
4632
|
+
} = cr(t.config, (ie = $e.form[(ee = t.config) == null ? void 0 : ee.app]) == null ? void 0 : ie.consumersList, "", {
|
|
4648
4633
|
fetchedItemsKey: "data",
|
|
4649
4634
|
searchKeys: ["username", "custom_id", "id"]
|
|
4650
|
-
}), { axiosInstance: g } =
|
|
4635
|
+
}), { axiosInstance: g } = Ft({
|
|
4651
4636
|
headers: (De = t.config) == null ? void 0 : De.requestHeaders
|
|
4652
4637
|
}), { getMessageFromError: f } = ll(), I = T(() => u.value.map((_) => ({
|
|
4653
4638
|
label: _.username || _.custom_id,
|
|
@@ -4655,127 +4640,127 @@ const Fl = /* @__PURE__ */ Ft(vl, [["__scopeId", "data-v-69c5dd3a"]]), bl = { cl
|
|
|
4655
4640
|
selected: a.fields.consumers.includes(_.id),
|
|
4656
4641
|
data: _
|
|
4657
4642
|
// we need this to determine whether or not to show the description text
|
|
4658
|
-
}))),
|
|
4659
|
-
var _,
|
|
4660
|
-
return (
|
|
4661
|
-
}), p = T(() => t.consumerGroupId ? nt.Edit : nt.Create),
|
|
4662
|
-
var
|
|
4663
|
-
let
|
|
4664
|
-
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ?
|
|
4665
|
-
},
|
|
4643
|
+
}))), v = T(() => {
|
|
4644
|
+
var _, L;
|
|
4645
|
+
return (L = $e.form[(_ = t.config) == null ? void 0 : _.app]) == null ? void 0 : L.edit;
|
|
4646
|
+
}), p = T(() => t.consumerGroupId ? nt.Edit : nt.Create), x = T(() => !!a.fields.name && !w.value), b = T(() => JSON.stringify(a.fields) !== JSON.stringify(i)), C = (_, L = "", oe = "") => {
|
|
4647
|
+
var D, ge, _e, ce, Ke, Ge;
|
|
4648
|
+
let U = `${(D = t.config) == null ? void 0 : D.apiBaseUrl}${$e.form[(ge = t.config) == null ? void 0 : ge.app][_]}`;
|
|
4649
|
+
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? U = U.replace(/{controlPlaneId}/gi, ((ce = t.config) == null ? void 0 : ce.controlPlaneId) || "") : ((Ke = t.config) == null ? void 0 : Ke.app) === "kongManager" && (U = U.replace(/\/{workspace}/gi, (Ge = t.config) != null && Ge.workspace ? `/${t.config.workspace}` : "")), U = U.replace(/{id}/gi, L || t.consumerGroupId), (_ === "addConsumer" || _ === "removeConsumer") && (U = U.replace(/{consumerId}/gi, oe)), U;
|
|
4650
|
+
}, A = () => {
|
|
4666
4651
|
var _;
|
|
4667
4652
|
o.push(((_ = t.config) == null ? void 0 : _.cancelRoute) || { name: "consumer-group-list" });
|
|
4668
|
-
},
|
|
4653
|
+
}, ne = (_) => {
|
|
4669
4654
|
n("error", _);
|
|
4670
|
-
},
|
|
4655
|
+
}, pe = (_) => {
|
|
4671
4656
|
n("loading", _);
|
|
4672
|
-
},
|
|
4673
|
-
var
|
|
4674
|
-
a.fields.name = ((
|
|
4675
|
-
const
|
|
4676
|
-
if (a.fields.tags = (
|
|
4677
|
-
a.fields.consumers = ((ge = _ == null ? void 0 : _.consumers) == null ? void 0 : ge.map((
|
|
4657
|
+
}, z = async (_) => {
|
|
4658
|
+
var oe, U, D, ge, _e;
|
|
4659
|
+
a.fields.name = ((oe = _ == null ? void 0 : _.item) == null ? void 0 : oe.name) || ((U = _ == null ? void 0 : _.consumer_group) == null ? void 0 : U.name) || (_ == null ? void 0 : _.name) || "";
|
|
4660
|
+
const L = ((D = _ == null ? void 0 : _.item) == null ? void 0 : D.tags) || (_ == null ? void 0 : _.consumer_group.tags) || (_ == null ? void 0 : _.tags) || [];
|
|
4661
|
+
if (a.fields.tags = (L == null ? void 0 : L.join(", ")) || "", "consumers" in _)
|
|
4662
|
+
a.fields.consumers = ((ge = _ == null ? void 0 : _.consumers) == null ? void 0 : ge.map((ce) => ce.id)) || [];
|
|
4678
4663
|
else
|
|
4679
4664
|
try {
|
|
4680
|
-
const { data:
|
|
4681
|
-
a.fields.consumers = "consumers" in
|
|
4682
|
-
} catch (
|
|
4683
|
-
|
|
4665
|
+
const { data: ce } = await g.get(C("getConsumers"));
|
|
4666
|
+
a.fields.consumers = "consumers" in ce ? (_e = ce == null ? void 0 : ce.consumers) == null ? void 0 : _e.map((Ke) => Ke.id) : [];
|
|
4667
|
+
} catch (ce) {
|
|
4668
|
+
S(ce);
|
|
4684
4669
|
}
|
|
4685
4670
|
Object.assign(i, a.fields);
|
|
4686
|
-
}, w = T(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")),
|
|
4687
|
-
var _,
|
|
4671
|
+
}, w = T(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")), K = () => {
|
|
4672
|
+
var _, L;
|
|
4688
4673
|
return {
|
|
4689
4674
|
name: a.fields.name,
|
|
4690
|
-
tags: (
|
|
4675
|
+
tags: (L = (_ = a.fields.tags.split(",")) == null ? void 0 : _.map((oe) => String(oe || "").trim())) == null ? void 0 : L.filter((oe) => oe !== "")
|
|
4691
4676
|
};
|
|
4692
|
-
},
|
|
4677
|
+
}, B = async (_, L = "") => await g.post(C("addConsumer", L, _), { consumer: _ }), k = async (_, L = "") => await g.delete(C("removeConsumer", L, _)), S = (_) => {
|
|
4693
4678
|
a.errorMessage = f(_), n("error", _);
|
|
4694
|
-
},
|
|
4679
|
+
}, j = (_ = t.consumerGroupId) => {
|
|
4695
4680
|
Object.assign(i, a.fields), n("update", { ...a.fields, id: _ });
|
|
4696
|
-
},
|
|
4697
|
-
const
|
|
4698
|
-
|
|
4699
|
-
code:
|
|
4700
|
-
message:
|
|
4701
|
-
}) :
|
|
4681
|
+
}, P = (_, L, oe = t.consumerGroupId) => {
|
|
4682
|
+
const U = _ == null ? void 0 : _.find((D) => D.status !== "fulfilled");
|
|
4683
|
+
U ? S({
|
|
4684
|
+
code: U.status,
|
|
4685
|
+
message: L
|
|
4686
|
+
}) : j(oe);
|
|
4702
4687
|
}, J = async () => {
|
|
4703
4688
|
let _ = "";
|
|
4704
4689
|
try {
|
|
4705
|
-
const { data:
|
|
4706
|
-
_ = "item" in
|
|
4707
|
-
} catch (
|
|
4708
|
-
|
|
4690
|
+
const { data: L } = await g.post(C("create"), K());
|
|
4691
|
+
_ = "item" in L ? L.item.id : L.id;
|
|
4692
|
+
} catch (L) {
|
|
4693
|
+
S(L);
|
|
4709
4694
|
}
|
|
4710
4695
|
if (a.fields.consumers.length > 0 && _)
|
|
4711
4696
|
try {
|
|
4712
|
-
const
|
|
4713
|
-
|
|
4714
|
-
} catch (
|
|
4715
|
-
|
|
4697
|
+
const L = a.fields.consumers.map((U) => B(U, _)), oe = await Promise.allSettled(L);
|
|
4698
|
+
P(oe, r("consumer_groups.errors.add_consumer"), _);
|
|
4699
|
+
} catch (L) {
|
|
4700
|
+
S(L);
|
|
4716
4701
|
}
|
|
4717
4702
|
else
|
|
4718
|
-
a.fields.consumers.length === 0 && _ &&
|
|
4719
|
-
},
|
|
4720
|
-
var
|
|
4703
|
+
a.fields.consumers.length === 0 && _ && j(_);
|
|
4704
|
+
}, Q = async () => {
|
|
4705
|
+
var oe;
|
|
4721
4706
|
try {
|
|
4722
|
-
((
|
|
4723
|
-
} catch (
|
|
4724
|
-
|
|
4707
|
+
((oe = t.config) == null ? void 0 : oe.app) === "konnect" ? await g.put(C("edit"), K()) : await g.patch(C("edit"), K());
|
|
4708
|
+
} catch (U) {
|
|
4709
|
+
S(U);
|
|
4725
4710
|
}
|
|
4726
|
-
const _ = a.fields.consumers.filter((
|
|
4727
|
-
if (
|
|
4728
|
-
|
|
4711
|
+
const _ = a.fields.consumers.filter((U) => !i.consumers.includes(U)), L = i.consumers.filter((U) => !a.fields.consumers.includes(U));
|
|
4712
|
+
if (L.length === 0 && _.length === 0)
|
|
4713
|
+
j();
|
|
4729
4714
|
else {
|
|
4730
|
-
if (
|
|
4715
|
+
if (L.length > 0)
|
|
4731
4716
|
try {
|
|
4732
|
-
const
|
|
4733
|
-
|
|
4734
|
-
} catch (
|
|
4735
|
-
|
|
4717
|
+
const U = L.map((ge) => k(ge)), D = await Promise.allSettled(U);
|
|
4718
|
+
P(D, r("consumer_groups.errors.remove_consumer"));
|
|
4719
|
+
} catch (U) {
|
|
4720
|
+
S(U);
|
|
4736
4721
|
}
|
|
4737
4722
|
if (_.length > 0)
|
|
4738
4723
|
try {
|
|
4739
|
-
const
|
|
4740
|
-
|
|
4741
|
-
} catch (
|
|
4742
|
-
|
|
4724
|
+
const U = _.map((ge) => B(ge)), D = await Promise.allSettled(U);
|
|
4725
|
+
P(D, r("consumer_groups.errors.add_consumer"));
|
|
4726
|
+
} catch (U) {
|
|
4727
|
+
S(U);
|
|
4743
4728
|
}
|
|
4744
4729
|
}
|
|
4745
|
-
},
|
|
4730
|
+
}, X = async () => {
|
|
4746
4731
|
try {
|
|
4747
|
-
a.readonly = !0, p.value === nt.Create ? await J() : await
|
|
4732
|
+
a.readonly = !0, p.value === nt.Create ? await J() : await Q();
|
|
4748
4733
|
} finally {
|
|
4749
4734
|
a.readonly = !1;
|
|
4750
4735
|
}
|
|
4751
4736
|
};
|
|
4752
4737
|
return Qe(async () => {
|
|
4753
4738
|
await d();
|
|
4754
|
-
}), (_,
|
|
4755
|
-
const
|
|
4739
|
+
}), (_, L) => {
|
|
4740
|
+
const oe = q("KInput"), U = q("KMultiselect");
|
|
4756
4741
|
return m(), $("div", bl, [
|
|
4757
|
-
|
|
4758
|
-
"can-submit":
|
|
4742
|
+
N(y(Ts), {
|
|
4743
|
+
"can-submit": x.value && b.value,
|
|
4759
4744
|
config: e.config,
|
|
4760
4745
|
"edit-id": e.consumerGroupId,
|
|
4761
4746
|
"error-message": a.errorMessage || y(c) || w.value,
|
|
4762
|
-
"fetch-url":
|
|
4747
|
+
"fetch-url": v.value,
|
|
4763
4748
|
"is-readonly": a.readonly,
|
|
4764
|
-
onCancel:
|
|
4765
|
-
"onFetch:error":
|
|
4766
|
-
"onFetch:success":
|
|
4767
|
-
onLoading:
|
|
4768
|
-
onSubmit:
|
|
4749
|
+
onCancel: A,
|
|
4750
|
+
"onFetch:error": L[3] || (L[3] = (D) => ne(D)),
|
|
4751
|
+
"onFetch:success": z,
|
|
4752
|
+
onLoading: L[4] || (L[4] = (D) => pe(D)),
|
|
4753
|
+
onSubmit: X
|
|
4769
4754
|
}, {
|
|
4770
|
-
default:
|
|
4771
|
-
|
|
4755
|
+
default: h(() => [
|
|
4756
|
+
N(y(dn), {
|
|
4772
4757
|
description: y(r)("consumer_groups.form.general_info.description"),
|
|
4773
4758
|
title: y(r)("consumer_groups.form.general_info.title")
|
|
4774
4759
|
}, {
|
|
4775
|
-
default:
|
|
4776
|
-
|
|
4760
|
+
default: h(() => [
|
|
4761
|
+
N(oe, {
|
|
4777
4762
|
modelValue: a.fields.name,
|
|
4778
|
-
"onUpdate:modelValue":
|
|
4763
|
+
"onUpdate:modelValue": L[0] || (L[0] = (D) => a.fields.name = D),
|
|
4779
4764
|
modelModifiers: { trim: !0 },
|
|
4780
4765
|
autocomplete: "off",
|
|
4781
4766
|
"data-testid": "consumer-group-form-name",
|
|
@@ -4784,9 +4769,9 @@ const Fl = /* @__PURE__ */ Ft(vl, [["__scopeId", "data-v-69c5dd3a"]]), bl = { cl
|
|
|
4784
4769
|
required: "",
|
|
4785
4770
|
type: "text"
|
|
4786
4771
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
4787
|
-
|
|
4772
|
+
N(oe, {
|
|
4788
4773
|
modelValue: a.fields.tags,
|
|
4789
|
-
"onUpdate:modelValue":
|
|
4774
|
+
"onUpdate:modelValue": L[1] || (L[1] = (D) => a.fields.tags = D),
|
|
4790
4775
|
modelModifiers: { trim: !0 },
|
|
4791
4776
|
autocomplete: "off",
|
|
4792
4777
|
"data-testid": "consumer-group-form-tags",
|
|
@@ -4802,15 +4787,15 @@ const Fl = /* @__PURE__ */ Ft(vl, [["__scopeId", "data-v-69c5dd3a"]]), bl = { cl
|
|
|
4802
4787
|
]),
|
|
4803
4788
|
_: 1
|
|
4804
4789
|
}, 8, ["description", "title"]),
|
|
4805
|
-
|
|
4790
|
+
N(y(dn), {
|
|
4806
4791
|
description: y(r)("consumer_groups.form.consumers.description"),
|
|
4807
4792
|
"has-divider": "",
|
|
4808
4793
|
title: y(r)("consumer_groups.form.consumers.title")
|
|
4809
4794
|
}, {
|
|
4810
|
-
default:
|
|
4811
|
-
|
|
4795
|
+
default: h(() => [
|
|
4796
|
+
N(U, {
|
|
4812
4797
|
modelValue: a.fields.consumers,
|
|
4813
|
-
"onUpdate:modelValue":
|
|
4798
|
+
"onUpdate:modelValue": L[2] || (L[2] = (D) => a.fields.consumers = D),
|
|
4814
4799
|
appearance: "select",
|
|
4815
4800
|
autosuggest: "",
|
|
4816
4801
|
"expand-selected": "",
|
|
@@ -4821,11 +4806,11 @@ const Fl = /* @__PURE__ */ Ft(vl, [["__scopeId", "data-v-69c5dd3a"]]), bl = { cl
|
|
|
4821
4806
|
width: "auto",
|
|
4822
4807
|
onQueryChange: y(s)
|
|
4823
4808
|
}, {
|
|
4824
|
-
"item-template":
|
|
4825
|
-
var ge, _e,
|
|
4809
|
+
"item-template": h(({ item: D }) => {
|
|
4810
|
+
var ge, _e, ce;
|
|
4826
4811
|
return [
|
|
4827
|
-
V("div", Cl,
|
|
4828
|
-
(ge =
|
|
4812
|
+
V("div", Cl, F(D.label), 1),
|
|
4813
|
+
(ge = D == null ? void 0 : D.data) != null && ge.username && ((_e = D == null ? void 0 : D.data) != null && _e.custom_id) ? (m(), $("div", kl, F((ce = D == null ? void 0 : D.data) == null ? void 0 : ce.custom_id), 1)) : G("", !0)
|
|
4829
4814
|
];
|
|
4830
4815
|
}),
|
|
4831
4816
|
_: 1
|
|
@@ -4840,7 +4825,7 @@ const Fl = /* @__PURE__ */ Ft(vl, [["__scopeId", "data-v-69c5dd3a"]]), bl = { cl
|
|
|
4840
4825
|
};
|
|
4841
4826
|
}
|
|
4842
4827
|
});
|
|
4843
|
-
const
|
|
4828
|
+
const Kl = /* @__PURE__ */ Nt(_l, [["__scopeId", "data-v-102d40d2"]]), wl = { class: "kong-ui-consumer-group-entity-config-card" }, Bl = /* @__PURE__ */ re({
|
|
4844
4829
|
__name: "ConsumerGroupConfigCard",
|
|
4845
4830
|
props: {
|
|
4846
4831
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4867,7 +4852,7 @@ const Nl = /* @__PURE__ */ Ft(_l, [["__scopeId", "data-v-102d40d2"]]), wl = { cl
|
|
|
4867
4852
|
},
|
|
4868
4853
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
4869
4854
|
setup(e) {
|
|
4870
|
-
const n = e, { i18n: { t } } = ct.useI18n(), r = T(() => $e.form[n.config.app].edit), o =
|
|
4855
|
+
const n = e, { i18n: { t } } = ct.useI18n(), r = T(() => $e.form[n.config.app].edit), o = O({
|
|
4871
4856
|
id: {},
|
|
4872
4857
|
name: {},
|
|
4873
4858
|
created_at: {},
|
|
@@ -4877,7 +4862,7 @@ const Nl = /* @__PURE__ */ Ft(_l, [["__scopeId", "data-v-102d40d2"]]), wl = { cl
|
|
|
4877
4862
|
}
|
|
4878
4863
|
});
|
|
4879
4864
|
return (a, i) => (m(), $("div", wl, [
|
|
4880
|
-
|
|
4865
|
+
N(y(Is), {
|
|
4881
4866
|
config: e.config,
|
|
4882
4867
|
"config-card-doc": e.configCardDoc,
|
|
4883
4868
|
"config-schema": o.value,
|
|
@@ -4894,6 +4879,6 @@ const Nl = /* @__PURE__ */ Ft(_l, [["__scopeId", "data-v-102d40d2"]]), wl = { cl
|
|
|
4894
4879
|
});
|
|
4895
4880
|
export {
|
|
4896
4881
|
Bl as ConsumerGroupConfigCard,
|
|
4897
|
-
|
|
4898
|
-
|
|
4882
|
+
Kl as ConsumerGroupForm,
|
|
4883
|
+
Nl as ConsumerGroupList
|
|
4899
4884
|
};
|