@kong-ui-public/entities-consumers 2.0.4-pr.920.f4b1f2a3.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 ee, ref as N, computed as M, watch as ve, renderSlot as Y, createCommentVNode as G, unref as g, useSlots as Ze, onBeforeMount as Xe, resolveComponent as V, openBlock as m, createBlock as U, createSlots as be, withCtx as y, createElementVNode as K, createTextVNode as W, toDisplayString as $, createVNode as E, createElementBlock as T, renderList as ce, Fragment as pe, normalizeClass as Ae, withModifiers as Ge, withDirectives as Ue, vShow as De, useCssVars as fr, resolveDynamicComponent as Ne, normalizeProps as mr, guardReactiveProps as gr, mergeProps as lt, onMounted as yr, onUnmounted as hr, normalizeStyle as ln, inject as vr, pushScopeId as un, popScopeId as cn, reactive as Ft } from "vue";
|
|
2
2
|
import { useRouter as gt } from "vue-router";
|
|
3
3
|
import { createI18n as yt, i18nTComponent as dn } from "@kong-ui-public/i18n";
|
|
4
4
|
import br from "axios";
|
|
@@ -106,7 +106,7 @@ function _r() {
|
|
|
106
106
|
// Translation component <i18n-t>
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const Qe = {
|
|
110
110
|
useI18n: _r
|
|
111
111
|
}, Te = "/api/runtime_groups/{controlPlaneId}", $e = "/{workspace}", Se = {
|
|
112
112
|
list: {
|
|
@@ -134,7 +134,7 @@ const Xe = {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
|
-
var pn = /* @__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))(pn || {}), ut = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ut || {}), _e = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(_e || {}),
|
|
137
|
+
var pn = /* @__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))(pn || {}), ut = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ut || {}), _e = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(_e || {}), Q = /* @__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))(Q || {}), ue = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ue || {});
|
|
138
138
|
function ht(e = {}) {
|
|
139
139
|
return {
|
|
140
140
|
axiosInstance: br.create({
|
|
@@ -211,13 +211,13 @@ const xr = {
|
|
|
211
211
|
errors: {
|
|
212
212
|
edit: "The entity could not be edited at this time."
|
|
213
213
|
}
|
|
214
|
-
},
|
|
214
|
+
}, jr = {
|
|
215
215
|
emptyState: {
|
|
216
216
|
noSearchResultsTitle: "No results found",
|
|
217
217
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
218
218
|
noSearchResultsCtaText: "Clear"
|
|
219
219
|
}
|
|
220
|
-
},
|
|
220
|
+
}, Mr = {
|
|
221
221
|
title: "Configuration",
|
|
222
222
|
actions: {
|
|
223
223
|
copy: "Copy JSON"
|
|
@@ -252,7 +252,7 @@ const xr = {
|
|
|
252
252
|
entryTitle: "Entry {index}",
|
|
253
253
|
structuredFormat: "Structured"
|
|
254
254
|
}
|
|
255
|
-
},
|
|
255
|
+
}, Or = {
|
|
256
256
|
filterButtonText: "Filter",
|
|
257
257
|
fieldLabel: "Filter by:",
|
|
258
258
|
inputPlaceholder: "Enter a value",
|
|
@@ -260,15 +260,15 @@ const xr = {
|
|
|
260
260
|
applyButtonText: "Apply",
|
|
261
261
|
clearButtonText: "Clear",
|
|
262
262
|
clearAllButtonText: "Clear all filters"
|
|
263
|
-
},
|
|
263
|
+
}, Er = {
|
|
264
264
|
errors: {
|
|
265
265
|
fetch: "Could not fetch available items",
|
|
266
266
|
invalid: "Please select a valid value"
|
|
267
267
|
}
|
|
268
|
-
},
|
|
268
|
+
}, Nr = {
|
|
269
269
|
unexpected: "An unexpected error has occurred",
|
|
270
270
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
271
|
-
},
|
|
271
|
+
}, Fr = {
|
|
272
272
|
enable: {
|
|
273
273
|
title: "Enable {entityType}",
|
|
274
274
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -279,19 +279,19 @@ const xr = {
|
|
|
279
279
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
280
280
|
confirmText: "Yes, disable"
|
|
281
281
|
}
|
|
282
|
-
},
|
|
282
|
+
}, Kr = {
|
|
283
283
|
global: xr,
|
|
284
284
|
deleteModal: Tr,
|
|
285
285
|
baseForm: $r,
|
|
286
|
-
baseTable:
|
|
287
|
-
baseConfigCard:
|
|
288
|
-
filter:
|
|
289
|
-
debouncedFilter:
|
|
290
|
-
errors:
|
|
291
|
-
toggleModal:
|
|
286
|
+
baseTable: jr,
|
|
287
|
+
baseConfigCard: Mr,
|
|
288
|
+
filter: Or,
|
|
289
|
+
debouncedFilter: Er,
|
|
290
|
+
errors: Nr,
|
|
291
|
+
toggleModal: Fr
|
|
292
292
|
};
|
|
293
293
|
function vt() {
|
|
294
|
-
const e = yt("en-us",
|
|
294
|
+
const e = yt("en-us", Kr);
|
|
295
295
|
return {
|
|
296
296
|
i18n: e,
|
|
297
297
|
i18nT: dn(e)
|
|
@@ -349,65 +349,65 @@ function Br(e, n, t, r = {
|
|
|
349
349
|
t || (t = "100");
|
|
350
350
|
const { axiosInstance: a } = ht({
|
|
351
351
|
headers: e.requestHeaders
|
|
352
|
-
}), { i18n: { t: o } } = vt(), { debounce: i } = Ir(), s = i(async (
|
|
353
|
-
await
|
|
354
|
-
}, 200), l =
|
|
355
|
-
let
|
|
356
|
-
e.app === "konnect" ?
|
|
357
|
-
const { isValidUuid: p } = fn(),
|
|
352
|
+
}), { i18n: { t: o } } = vt(), { debounce: i } = Ir(), s = i(async (S) => {
|
|
353
|
+
await k(S);
|
|
354
|
+
}, 200), l = N(!1), c = N(""), d = N(""), u = N([]), h = N([]), f = N(void 0), I = g(n);
|
|
355
|
+
let b = `${e.apiBaseUrl}${I}`;
|
|
356
|
+
e.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
357
|
+
const { isValidUuid: p } = fn(), A = async () => {
|
|
358
358
|
try {
|
|
359
359
|
l.value = !0;
|
|
360
|
-
const { data:
|
|
361
|
-
|
|
360
|
+
const { data: S } = await a.get(`${b}?size=${t}`);
|
|
361
|
+
S != null && S.next || (f.value = r.fetchedItemsKey in S ? S[r.fetchedItemsKey] : []), h.value = r.fetchedItemsKey in S ? S[r.fetchedItemsKey] : [], u.value = h.value;
|
|
362
362
|
} catch {
|
|
363
363
|
u.value = [], c.value = o("debouncedFilter.errors.fetch");
|
|
364
364
|
} finally {
|
|
365
365
|
l.value = !1;
|
|
366
366
|
}
|
|
367
|
-
},
|
|
368
|
-
var
|
|
369
|
-
if (
|
|
370
|
-
if (
|
|
367
|
+
}, w = N(""), k = async (S) => {
|
|
368
|
+
var x, P, R;
|
|
369
|
+
if (w.value !== S)
|
|
370
|
+
if (w.value = S || "", f.value === void 0)
|
|
371
371
|
try {
|
|
372
372
|
if (l.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
373
|
-
let
|
|
374
|
-
|
|
375
|
-
const { data:
|
|
376
|
-
r.fetchedItemsKey in
|
|
377
|
-
} else if (
|
|
378
|
-
const
|
|
379
|
-
p(
|
|
380
|
-
const { data:
|
|
381
|
-
return [
|
|
382
|
-
})()) :
|
|
383
|
-
...r.searchKeys.filter((
|
|
384
|
-
const { data:
|
|
385
|
-
return
|
|
373
|
+
let v = b + "";
|
|
374
|
+
S && (v += `/${S}`);
|
|
375
|
+
const { data: C } = await a.get(`${v}?size=${t}`);
|
|
376
|
+
r.fetchedItemsKey in C ? u.value = C[r.fetchedItemsKey] : C != null && C.id ? u.value = [C] : u.value = [];
|
|
377
|
+
} else if (S) {
|
|
378
|
+
const v = [];
|
|
379
|
+
p(S) && r.searchKeys.includes("id") ? v.push((async () => {
|
|
380
|
+
const { data: q } = await a.get(`${b}/${S}`);
|
|
381
|
+
return [q[r.fetchedItemsKey] ?? q];
|
|
382
|
+
})()) : v.push(
|
|
383
|
+
...r.searchKeys.filter((q) => q !== "id").map(async (q) => {
|
|
384
|
+
const { data: _ } = await a.get(`${b}?${q}=${S}`);
|
|
385
|
+
return _[r.fetchedItemsKey];
|
|
386
386
|
})
|
|
387
387
|
);
|
|
388
|
-
const
|
|
389
|
-
u.value = [], (
|
|
390
|
-
var
|
|
391
|
-
(
|
|
392
|
-
|
|
388
|
+
const C = await Promise.all(v), B = /* @__PURE__ */ new Set();
|
|
389
|
+
u.value = [], (x = C == null ? void 0 : C.forEach) == null || x.call(C, (q) => {
|
|
390
|
+
var _;
|
|
391
|
+
(_ = q == null ? void 0 : q.forEach) == null || _.call(q, (F) => {
|
|
392
|
+
B.has(F.id) || (B.add(F.id), u.value.push(F));
|
|
393
393
|
});
|
|
394
394
|
});
|
|
395
395
|
} else
|
|
396
396
|
u.value = h.value;
|
|
397
|
-
} catch (
|
|
398
|
-
((
|
|
397
|
+
} catch (v) {
|
|
398
|
+
((P = v == null ? void 0 : v.response) == null ? void 0 : P.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (u.value = [], c.value = o("debouncedFilter.errors.fetch"));
|
|
399
399
|
} finally {
|
|
400
400
|
l.value = !1;
|
|
401
401
|
}
|
|
402
402
|
else
|
|
403
|
-
l.value = !0, d.value = "",
|
|
404
|
-
var
|
|
405
|
-
let
|
|
406
|
-
for (const
|
|
407
|
-
const
|
|
408
|
-
|
|
403
|
+
l.value = !0, d.value = "", S ? (u.value = (R = f.value) == null ? void 0 : R.filter((v) => {
|
|
404
|
+
var C;
|
|
405
|
+
let B = !1;
|
|
406
|
+
for (const q of r.searchKeys) {
|
|
407
|
+
const _ = typeof v[q] == "string" ? (C = v[q]) == null ? void 0 : C.toLowerCase() : v[q];
|
|
408
|
+
_ != null && _.includes(S.toLowerCase()) && (B = !0);
|
|
409
409
|
}
|
|
410
|
-
return
|
|
410
|
+
return B;
|
|
411
411
|
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid"))) : u.value = f.value, l.value = !1;
|
|
412
412
|
};
|
|
413
413
|
return {
|
|
@@ -416,12 +416,12 @@ function Br(e, n, t, r = {
|
|
|
416
416
|
validationError: d,
|
|
417
417
|
results: u,
|
|
418
418
|
allRecords: f,
|
|
419
|
-
loadItems:
|
|
419
|
+
loadItems: A,
|
|
420
420
|
debouncedQueryChange: s
|
|
421
421
|
};
|
|
422
422
|
}
|
|
423
423
|
function qr(e, n) {
|
|
424
|
-
const t = g(n), r =
|
|
424
|
+
const t = g(n), r = M(
|
|
425
425
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
426
426
|
);
|
|
427
427
|
return r.value.search = "", (a) => `${r.value.href}/${a}`;
|
|
@@ -458,7 +458,7 @@ function Pr(e) {
|
|
|
458
458
|
const n = window.location.origin, t = n.endsWith("/") ? n : `${n}/`;
|
|
459
459
|
try {
|
|
460
460
|
const r = e.join("/"), a = `${t}${r}`, o = e.some((i) => i.trim() === "");
|
|
461
|
-
if (
|
|
461
|
+
if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(a) && !o && new URL(a))
|
|
462
462
|
return `${t}${r}`;
|
|
463
463
|
throw new Error("Invalid url");
|
|
464
464
|
} catch (r) {
|
|
@@ -466,17 +466,17 @@ function Pr(e) {
|
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
function mn(e, n) {
|
|
469
|
-
const t =
|
|
469
|
+
const t = N(g(e)), r = N(g(n)), a = M(
|
|
470
470
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
471
|
-
), o =
|
|
471
|
+
), o = M(
|
|
472
472
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
473
473
|
);
|
|
474
474
|
return (i) => {
|
|
475
475
|
const { page: s, pageSize: l, offset: c, sortColumnKey: d, sortColumnOrder: u, query: h } = i;
|
|
476
476
|
try {
|
|
477
477
|
let f = new URL(o.value.href);
|
|
478
|
-
return a.value && h ? (f.search = "", f = new URL(`${f.href}/${h}/`)) : (a.value || new URLSearchParams(h).forEach((
|
|
479
|
-
f.searchParams.append(
|
|
478
|
+
return a.value && h ? (f.search = "", f = new URL(`${f.href}/${h}/`)) : (a.value || new URLSearchParams(h).forEach((I, b) => {
|
|
479
|
+
f.searchParams.append(b, I);
|
|
480
480
|
}), 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;
|
|
481
481
|
} catch (f) {
|
|
482
482
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
@@ -486,7 +486,7 @@ function mn(e, n) {
|
|
|
486
486
|
function Vr(e, n, t = "data") {
|
|
487
487
|
const r = g(n), { axiosInstance: a } = ht({
|
|
488
488
|
headers: e.requestHeaders
|
|
489
|
-
}), o = mn(e, r), i =
|
|
489
|
+
}), o = mn(e, r), i = N({
|
|
490
490
|
status: _e.Idle
|
|
491
491
|
});
|
|
492
492
|
return { fetcher: async (s) => {
|
|
@@ -532,7 +532,7 @@ function Rr() {
|
|
|
532
532
|
convertKeyToTitle: e
|
|
533
533
|
};
|
|
534
534
|
}
|
|
535
|
-
const gn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,
|
|
535
|
+
const gn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Kt = (e) => {
|
|
536
536
|
if (typeof e != "string")
|
|
537
537
|
throw new TypeError("Invalid argument expected string");
|
|
538
538
|
const n = e.match(gn);
|
|
@@ -555,7 +555,7 @@ const gn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
555
555
|
}
|
|
556
556
|
return 0;
|
|
557
557
|
}, Gr = (e, n) => {
|
|
558
|
-
const t =
|
|
558
|
+
const t = Kt(e), r = Kt(n), a = t.pop(), o = r.pop(), i = Lt(t, r);
|
|
559
559
|
return i !== 0 ? i : a && o ? Lt(a.split("."), o.split(".")) : a || o ? a ? -1 : 1 : 0;
|
|
560
560
|
}, Pt = (e, n, t) => {
|
|
561
561
|
Hr(t);
|
|
@@ -588,11 +588,11 @@ function Jr(e) {
|
|
|
588
588
|
return !(i && Pt(a, i, "<") || s && Pt(a, s, ">"));
|
|
589
589
|
}
|
|
590
590
|
function Yr(e) {
|
|
591
|
-
const n =
|
|
591
|
+
const n = N(0), t = N(0), r = N(!1);
|
|
592
592
|
return ve(e, (a) => {
|
|
593
593
|
a && !r.value && (n.value = a.offsetWidth, t.value = a.scrollWidth, r.value = !0);
|
|
594
594
|
}), {
|
|
595
|
-
isTruncated:
|
|
595
|
+
isTruncated: M(() => n.value < t.value)
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
598
|
const ae = {
|
|
@@ -614,10 +614,10 @@ const ae = {
|
|
|
614
614
|
prefix: "Successfully",
|
|
615
615
|
content: " copied to clipboard"
|
|
616
616
|
}
|
|
617
|
-
}, Zr = "Copy to clipboard",
|
|
617
|
+
}, Zr = "Copy to clipboard", Xr = {
|
|
618
618
|
message: Wr,
|
|
619
619
|
iconTitle: Zr
|
|
620
|
-
},
|
|
620
|
+
}, Qr = "kong-ui-copy-uuid-notify", Rt = "24px", ea = (e, n) => {
|
|
621
621
|
const t = e.__vccOpts || e;
|
|
622
622
|
for (const [r, a] of n)
|
|
623
623
|
t[r] = a;
|
|
@@ -628,7 +628,7 @@ const ae = {
|
|
|
628
628
|
}, aa = /* @__PURE__ */ ta(() => /* @__PURE__ */ K("path", {
|
|
629
629
|
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",
|
|
630
630
|
fill: "currentColor"
|
|
631
|
-
}, null, -1)), oa = /* @__PURE__ */
|
|
631
|
+
}, null, -1)), oa = /* @__PURE__ */ ee({
|
|
632
632
|
__name: "CopyIcon",
|
|
633
633
|
props: {
|
|
634
634
|
/** The accessibility text provided to screen readers */
|
|
@@ -680,7 +680,7 @@ const ae = {
|
|
|
680
680
|
}
|
|
681
681
|
},
|
|
682
682
|
setup(e) {
|
|
683
|
-
const n = e, t =
|
|
683
|
+
const n = e, t = M(() => {
|
|
684
684
|
if (typeof n.size == "number" && n.size > 0)
|
|
685
685
|
return `${n.size}px`;
|
|
686
686
|
if (typeof n.size == "string") {
|
|
@@ -689,7 +689,7 @@ const ae = {
|
|
|
689
689
|
return `${o}px`;
|
|
690
690
|
}
|
|
691
691
|
return Rt;
|
|
692
|
-
}), r =
|
|
692
|
+
}), r = M(() => ({
|
|
693
693
|
boxSizing: "border-box",
|
|
694
694
|
color: n.color,
|
|
695
695
|
display: n.display,
|
|
@@ -697,7 +697,7 @@ const ae = {
|
|
|
697
697
|
lineHeight: "0",
|
|
698
698
|
width: t.value
|
|
699
699
|
}));
|
|
700
|
-
return (a, o) => (m(),
|
|
700
|
+
return (a, o) => (m(), U(Ne(e.as), {
|
|
701
701
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
702
702
|
class: "kui-icon copy-icon",
|
|
703
703
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
@@ -714,14 +714,14 @@ const ae = {
|
|
|
714
714
|
width: "100%",
|
|
715
715
|
xmlns: "http://www.w3.org/2000/svg"
|
|
716
716
|
}, [
|
|
717
|
-
e.title ? (m(), T("title", ra,
|
|
717
|
+
e.title ? (m(), T("title", ra, $(e.title), 1)) : G("", !0),
|
|
718
718
|
aa
|
|
719
719
|
], 8, na))
|
|
720
720
|
]),
|
|
721
721
|
_: 1
|
|
722
722
|
}, 8, ["aria-hidden", "style"]));
|
|
723
723
|
}
|
|
724
|
-
}), ia = /* @__PURE__ */ ea(oa, [["__scopeId", "data-v-9971cc79"]]), sa = "16px", la = { class: "kong-ui-copy-uuid" }, ua = ["onClick"], Ut = 15, ca = /* @__PURE__ */
|
|
724
|
+
}), ia = /* @__PURE__ */ ea(oa, [["__scopeId", "data-v-9971cc79"]]), sa = "16px", la = { class: "kong-ui-copy-uuid" }, ua = ["onClick"], Ut = 15, ca = /* @__PURE__ */ ee({
|
|
725
725
|
__name: "CopyUuid",
|
|
726
726
|
props: {
|
|
727
727
|
uuid: {
|
|
@@ -765,19 +765,19 @@ const ae = {
|
|
|
765
765
|
},
|
|
766
766
|
emits: ["success", "error"],
|
|
767
767
|
setup(e, { emit: n }) {
|
|
768
|
-
const t = e, { t: r } = yt("en-us",
|
|
769
|
-
}), o =
|
|
768
|
+
const t = e, { t: r } = yt("en-us", Xr), a = t.notify || vr(Qr, () => {
|
|
769
|
+
}), o = M(() => t.idTooltip ? {
|
|
770
770
|
label: t.idTooltip,
|
|
771
771
|
positionFixed: !0,
|
|
772
772
|
placement: "bottomStart"
|
|
773
773
|
} : {
|
|
774
774
|
title: t.uuid
|
|
775
|
-
}), i =
|
|
775
|
+
}), i = M(() => !!(t.tooltip && t.successTooltip)), s = N(t.tooltip), l = M(() => t.tooltip ? {
|
|
776
776
|
label: s.value,
|
|
777
777
|
positionFixed: !0,
|
|
778
778
|
maxWidth: "500px",
|
|
779
779
|
placement: "bottomStart"
|
|
780
|
-
} : {}), c =
|
|
780
|
+
} : {}), c = M(() => {
|
|
781
781
|
var h;
|
|
782
782
|
return t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${(h = t.uuid) == null ? void 0 : h.substring(0, 5)}` : t.uuid;
|
|
783
783
|
}), d = (h) => {
|
|
@@ -785,7 +785,7 @@ const ae = {
|
|
|
785
785
|
s.value = t.tooltip;
|
|
786
786
|
}, 1800);
|
|
787
787
|
}, u = (h) => {
|
|
788
|
-
var f,
|
|
788
|
+
var f, I;
|
|
789
789
|
if (!h(t.uuid)) {
|
|
790
790
|
typeof a == "function" && a({
|
|
791
791
|
type: "error",
|
|
@@ -793,16 +793,16 @@ const ae = {
|
|
|
793
793
|
}), i.value ? d(r("message.fail")) : n("error", t.uuid);
|
|
794
794
|
return;
|
|
795
795
|
}
|
|
796
|
-
const
|
|
796
|
+
const b = ((f = t.uuid) == null ? void 0 : f.length) > Ut, p = t.format === "hidden" || t.format === "redacted" ? r("message.success.prefix") : `"${((I = t.uuid) == null ? void 0 : I.substring(0, Ut)) + (b ? "..." : "")}"`;
|
|
797
797
|
typeof a == "function" && a({
|
|
798
798
|
type: "success",
|
|
799
799
|
message: `${p}${r("message.success.content")}`
|
|
800
800
|
}), i.value ? d(t.successTooltip) : n("success", t.uuid);
|
|
801
801
|
};
|
|
802
802
|
return (h, f) => {
|
|
803
|
-
const
|
|
803
|
+
const I = V("KClipboardProvider");
|
|
804
804
|
return m(), T("div", la, [
|
|
805
|
-
e.format !== "hidden" ? (m(),
|
|
805
|
+
e.format !== "hidden" ? (m(), U(Ne(e.idTooltip ? "KTooltip" : "div"), lt({ key: 0 }, o.value, { "data-testid": "copy-id" }), {
|
|
806
806
|
default: y(() => [
|
|
807
807
|
K("div", {
|
|
808
808
|
class: Ae([
|
|
@@ -810,21 +810,21 @@ const ae = {
|
|
|
810
810
|
e.truncated ? "truncated-uuid" : null,
|
|
811
811
|
e.useMono ? "mono" : null
|
|
812
812
|
])
|
|
813
|
-
},
|
|
813
|
+
}, $(c.value), 3)
|
|
814
814
|
]),
|
|
815
815
|
_: 1
|
|
816
816
|
}, 16)) : G("", !0),
|
|
817
|
-
(m(),
|
|
817
|
+
(m(), U(Ne(e.tooltip ? "KTooltip" : "div"), lt(l.value, { class: "uuid-icon-wrapper" }), {
|
|
818
818
|
default: y(() => [
|
|
819
|
-
|
|
820
|
-
default: y(({ copyToClipboard:
|
|
819
|
+
E(I, null, {
|
|
820
|
+
default: y(({ copyToClipboard: b }) => [
|
|
821
821
|
K("span", {
|
|
822
822
|
"data-testid": "copy-to-clipboard",
|
|
823
823
|
role: "button",
|
|
824
824
|
tabindex: "0",
|
|
825
|
-
onClick: Ge((p) => u(
|
|
825
|
+
onClick: Ge((p) => u(b), ["stop"])
|
|
826
826
|
}, [
|
|
827
|
-
|
|
827
|
+
E(g(ia), {
|
|
828
828
|
class: "uuid-icon",
|
|
829
829
|
color: e.iconColor,
|
|
830
830
|
decorative: !!e.tooltip,
|
|
@@ -849,7 +849,7 @@ const ae = {
|
|
|
849
849
|
}, hn = /* @__PURE__ */ da(ca, [["__scopeId", "data-v-0c07874b"]]), pa = {
|
|
850
850
|
key: 0,
|
|
851
851
|
class: "config-card-fieldset-title"
|
|
852
|
-
}, fa = /* @__PURE__ */
|
|
852
|
+
}, fa = /* @__PURE__ */ ee({
|
|
853
853
|
__name: "JsonCardItem",
|
|
854
854
|
props: {
|
|
855
855
|
item: {
|
|
@@ -866,21 +866,21 @@ const ae = {
|
|
|
866
866
|
}
|
|
867
867
|
},
|
|
868
868
|
setup(e) {
|
|
869
|
-
const n = e, { i18n: { t } } = ae.useI18n(), { convertKeyToTitle: r } = ae.useStringHelpers(), a =
|
|
869
|
+
const n = e, { i18n: { t } } = ae.useI18n(), { convertKeyToTitle: r } = ae.useStringHelpers(), a = M(() => n.item.key ?? "json-array-item"), o = M(() => n.item.value ?? n.item), i = M(() => {
|
|
870
870
|
const l = JSON.parse(JSON.stringify(o.value));
|
|
871
871
|
return n.isArrayItem && delete l.name, l;
|
|
872
|
-
}), s =
|
|
872
|
+
}), s = M(() => {
|
|
873
873
|
var l;
|
|
874
874
|
return n.isArrayItem ? (l = o.value) != null && l.name ? r(o.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
875
875
|
});
|
|
876
|
-
return (l, c) => (m(),
|
|
876
|
+
return (l, c) => (m(), U(Ne(e.isArrayItem ? "fieldset" : "div"), {
|
|
877
877
|
class: Ae(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
878
878
|
}, {
|
|
879
879
|
default: y(() => [
|
|
880
880
|
e.isArrayItem ? (m(), T("legend", pa, [
|
|
881
|
-
K("b", null,
|
|
881
|
+
K("b", null, $(s.value), 1)
|
|
882
882
|
])) : G("", !0),
|
|
883
|
-
(m(!0), T(
|
|
883
|
+
(m(!0), T(pe, null, ce(Object.keys(i.value), (d, u) => (m(), U(bt, {
|
|
884
884
|
key: `${a.value}-property-${u}`,
|
|
885
885
|
item: {
|
|
886
886
|
key: d,
|
|
@@ -897,7 +897,7 @@ const ae = {
|
|
|
897
897
|
for (const [r, a] of n)
|
|
898
898
|
t[r] = a;
|
|
899
899
|
return t;
|
|
900
|
-
}, vn = /* @__PURE__ */ me(fa, [["__scopeId", "data-v-68ca83ec"]]), ma = /* @__PURE__ */
|
|
900
|
+
}, vn = /* @__PURE__ */ me(fa, [["__scopeId", "data-v-68ca83ec"]]), ma = /* @__PURE__ */ ee({
|
|
901
901
|
__name: "InternalLinkItem",
|
|
902
902
|
props: {
|
|
903
903
|
item: {
|
|
@@ -909,22 +909,22 @@ const ae = {
|
|
|
909
909
|
setup(e) {
|
|
910
910
|
const { i18n: { t: n } } = ae.useI18n();
|
|
911
911
|
return (t, r) => {
|
|
912
|
-
const a =
|
|
912
|
+
const a = V("KButton");
|
|
913
913
|
return m(), T("div", null, [
|
|
914
|
-
|
|
914
|
+
E(a, {
|
|
915
915
|
appearance: "tertiary",
|
|
916
916
|
class: "navigation-button",
|
|
917
917
|
onClick: r[0] || (r[0] = (o) => t.$emit("navigation-click", e.item))
|
|
918
918
|
}, {
|
|
919
919
|
default: y(() => [
|
|
920
|
-
W(
|
|
920
|
+
W($(e.item.value || g(n)("baseConfigCard.commonFields.link")), 1)
|
|
921
921
|
]),
|
|
922
922
|
_: 1
|
|
923
923
|
})
|
|
924
924
|
]);
|
|
925
925
|
};
|
|
926
926
|
}
|
|
927
|
-
}), ga = /* @__PURE__ */ me(ma, [["__scopeId", "data-v-c96811e5"]]), ya = /* @__PURE__ */
|
|
927
|
+
}), ga = /* @__PURE__ */ me(ma, [["__scopeId", "data-v-c96811e5"]]), ya = /* @__PURE__ */ ee({
|
|
928
928
|
__name: "StatusBadge",
|
|
929
929
|
props: {
|
|
930
930
|
status: {
|
|
@@ -935,22 +935,22 @@ const ae = {
|
|
|
935
935
|
setup(e) {
|
|
936
936
|
const { i18n: { t: n } } = ae.useI18n();
|
|
937
937
|
return (t, r) => {
|
|
938
|
-
const a =
|
|
939
|
-
return m(),
|
|
938
|
+
const a = V("KBadge");
|
|
939
|
+
return m(), U(a, {
|
|
940
940
|
appearance: e.status ? "success" : "neutral"
|
|
941
941
|
}, {
|
|
942
942
|
default: y(() => [
|
|
943
|
-
W(
|
|
943
|
+
W($(e.status ? g(n)("baseConfigCard.statusBadge.enabledLabel") : g(n)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
944
944
|
]),
|
|
945
945
|
_: 1
|
|
946
946
|
}, 8, ["appearance"]);
|
|
947
947
|
};
|
|
948
948
|
}
|
|
949
|
-
}), ha = "#0044f4", va = "#e0e4ea", ba = "#3a3f51", Ca = "1px", ka = "20px", wa = { class: "config-card-details-row" }, _a = ["data-testid"], Ia = ["data-testid"], Aa = ["data-testid"], Sa = ["data-testid"], xa = { key: 1 }, Ta = ["data-testid"], $a = ["data-testid"],
|
|
949
|
+
}), ha = "#0044f4", va = "#e0e4ea", ba = "#3a3f51", Ca = "1px", ka = "20px", wa = { class: "config-card-details-row" }, _a = ["data-testid"], Ia = ["data-testid"], Aa = ["data-testid"], Sa = ["data-testid"], xa = { key: 1 }, Ta = ["data-testid"], $a = ["data-testid"], ja = ["data-testid"], Ma = ["data-testid"], Oa = {
|
|
950
950
|
name: "ConfigCardItem",
|
|
951
951
|
components: { CopyUuid: hn, JsonCardItem: vn, StatusBadge: ya, InternalLinkItem: ga }
|
|
952
|
-
},
|
|
953
|
-
...
|
|
952
|
+
}, Ea = /* @__PURE__ */ ee({
|
|
953
|
+
...Oa,
|
|
954
954
|
props: {
|
|
955
955
|
item: {
|
|
956
956
|
type: Object,
|
|
@@ -976,9 +976,9 @@ const ae = {
|
|
|
976
976
|
"4d3dc7e7": l.value && i.value ? "100%" : t.slim ? "50%" : "25%",
|
|
977
977
|
"4d400dc2": l.value && i.value ? "100%" : t.slim ? "50%" : "75%"
|
|
978
978
|
}));
|
|
979
|
-
const r = Ze(), { i18n: { t: a, formatUnixTimeStamp: o } } = ae.useI18n(), i =
|
|
979
|
+
const r = Ze(), { i18n: { t: a, formatUnixTimeStamp: o } } = ae.useI18n(), i = M(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = M(() => !!(t.item.tooltip || r["label-tooltip"])), l = M(() => t.item.type === Q.Json || t.item.type === Q.JsonArray), c = M(() => t.item.type === Q.JsonArray), d = M(() => {
|
|
980
980
|
switch (t.item.type) {
|
|
981
|
-
case
|
|
981
|
+
case Q.ID:
|
|
982
982
|
return {
|
|
983
983
|
tag: "CopyUuid",
|
|
984
984
|
attrs: {
|
|
@@ -991,7 +991,7 @@ const ae = {
|
|
|
991
991
|
}
|
|
992
992
|
}
|
|
993
993
|
};
|
|
994
|
-
case
|
|
994
|
+
case Q.IdArray:
|
|
995
995
|
return {
|
|
996
996
|
tag: "div",
|
|
997
997
|
additionalComponent: "CopyUuid",
|
|
@@ -1003,7 +1003,7 @@ const ae = {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
1005
|
};
|
|
1006
|
-
case
|
|
1006
|
+
case Q.Redacted:
|
|
1007
1007
|
return {
|
|
1008
1008
|
tag: "CopyUuid",
|
|
1009
1009
|
attrs: {
|
|
@@ -1017,7 +1017,7 @@ const ae = {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
}
|
|
1019
1019
|
};
|
|
1020
|
-
case
|
|
1020
|
+
case Q.RedactedArray:
|
|
1021
1021
|
return {
|
|
1022
1022
|
tag: "div",
|
|
1023
1023
|
additionalComponent: "CopyUuid",
|
|
@@ -1030,7 +1030,7 @@ const ae = {
|
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
1032
|
};
|
|
1033
|
-
case
|
|
1033
|
+
case Q.Date:
|
|
1034
1034
|
return {
|
|
1035
1035
|
tag: "div",
|
|
1036
1036
|
attrs: {
|
|
@@ -1038,7 +1038,7 @@ const ae = {
|
|
|
1038
1038
|
},
|
|
1039
1039
|
text: o(t.item.value)
|
|
1040
1040
|
};
|
|
1041
|
-
case
|
|
1041
|
+
case Q.BadgeStatus:
|
|
1042
1042
|
return {
|
|
1043
1043
|
tag: "StatusBadge",
|
|
1044
1044
|
attrs: {
|
|
@@ -1046,17 +1046,17 @@ const ae = {
|
|
|
1046
1046
|
status: t.item.value
|
|
1047
1047
|
}
|
|
1048
1048
|
};
|
|
1049
|
-
case
|
|
1049
|
+
case Q.BadgeTag:
|
|
1050
1050
|
return {
|
|
1051
1051
|
tag: "div",
|
|
1052
1052
|
additionalComponent: "KBadge"
|
|
1053
1053
|
};
|
|
1054
|
-
case
|
|
1054
|
+
case Q.BadgeMethod:
|
|
1055
1055
|
return {
|
|
1056
1056
|
tag: "div",
|
|
1057
1057
|
additionalComponent: "KMethodBadge"
|
|
1058
1058
|
};
|
|
1059
|
-
case
|
|
1059
|
+
case Q.LinkInternal:
|
|
1060
1060
|
return {
|
|
1061
1061
|
tag: "InternalLinkItem",
|
|
1062
1062
|
attrs: {
|
|
@@ -1067,7 +1067,7 @@ const ae = {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
}
|
|
1069
1069
|
};
|
|
1070
|
-
case
|
|
1070
|
+
case Q.LinkExternal:
|
|
1071
1071
|
return {
|
|
1072
1072
|
tag: "KExternalLink",
|
|
1073
1073
|
attrs: {
|
|
@@ -1076,7 +1076,7 @@ const ae = {
|
|
|
1076
1076
|
},
|
|
1077
1077
|
text: t.item.value
|
|
1078
1078
|
};
|
|
1079
|
-
case
|
|
1079
|
+
case Q.Json:
|
|
1080
1080
|
return {
|
|
1081
1081
|
tag: "JsonCardItem",
|
|
1082
1082
|
attrs: {
|
|
@@ -1084,7 +1084,7 @@ const ae = {
|
|
|
1084
1084
|
item: t.item
|
|
1085
1085
|
}
|
|
1086
1086
|
};
|
|
1087
|
-
case
|
|
1087
|
+
case Q.JsonArray:
|
|
1088
1088
|
return {
|
|
1089
1089
|
tag: "div",
|
|
1090
1090
|
additionalComponent: "JsonCardItem",
|
|
@@ -1102,18 +1102,18 @@ const ae = {
|
|
|
1102
1102
|
text: t.item.value
|
|
1103
1103
|
};
|
|
1104
1104
|
}
|
|
1105
|
-
}), u =
|
|
1106
|
-
return (f,
|
|
1107
|
-
const
|
|
1105
|
+
}), u = N(), { isTruncated: h } = ae.useTruncationDetector(u);
|
|
1106
|
+
return (f, I) => {
|
|
1107
|
+
const b = V("KLabel"), p = V("KBadge"), A = V("KMethodBadge"), w = V("KTooltip");
|
|
1108
1108
|
return m(), T("div", wa, [
|
|
1109
1109
|
K("div", {
|
|
1110
1110
|
class: "config-card-details-label",
|
|
1111
1111
|
"data-testid": `${e.item.key}-label`
|
|
1112
1112
|
}, [
|
|
1113
1113
|
Y(f.$slots, "label", { item: e.item }, () => [
|
|
1114
|
-
|
|
1114
|
+
E(b, { "tooltip-attributes": { maxWidth: "500px" } }, be({
|
|
1115
1115
|
default: y(() => [
|
|
1116
|
-
W(
|
|
1116
|
+
W($(e.item.label) + " ", 1)
|
|
1117
1117
|
]),
|
|
1118
1118
|
_: 2
|
|
1119
1119
|
}, [
|
|
@@ -1124,7 +1124,7 @@ const ae = {
|
|
|
1124
1124
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1125
1125
|
}, [
|
|
1126
1126
|
Y(f.$slots, "label-tooltip", {}, () => [
|
|
1127
|
-
W(
|
|
1127
|
+
W($(e.item.tooltip), 1)
|
|
1128
1128
|
], !0)
|
|
1129
1129
|
], 8, Ia)
|
|
1130
1130
|
]),
|
|
@@ -1141,20 +1141,20 @@ const ae = {
|
|
|
1141
1141
|
rowValue: e.item.value
|
|
1142
1142
|
}, () => [
|
|
1143
1143
|
i.value ? (m(), T("div", xa, [
|
|
1144
|
-
(m(),
|
|
1144
|
+
(m(), U(Ne(d.value.tag), mr(gr(d.value.attrs)), {
|
|
1145
1145
|
default: y(() => [
|
|
1146
1146
|
d.value.additionalComponent === "KBadge" ? (m(), T("div", {
|
|
1147
1147
|
key: 0,
|
|
1148
1148
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1149
1149
|
}, [
|
|
1150
|
-
(m(!0), T(
|
|
1151
|
-
key: `${e.item.key}-badge-tag-${
|
|
1150
|
+
(m(!0), T(pe, null, ce(e.item.value, (k, S) => (m(), U(p, {
|
|
1151
|
+
key: `${e.item.key}-badge-tag-${S}`,
|
|
1152
1152
|
class: "config-badge",
|
|
1153
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1154
|
-
"truncation-tooltip":
|
|
1153
|
+
"data-testid": `${e.item.key}-badge-tag-${S}`,
|
|
1154
|
+
"truncation-tooltip": k
|
|
1155
1155
|
}, {
|
|
1156
1156
|
default: y(() => [
|
|
1157
|
-
W(
|
|
1157
|
+
W($(k), 1)
|
|
1158
1158
|
]),
|
|
1159
1159
|
_: 2
|
|
1160
1160
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
@@ -1164,41 +1164,41 @@ const ae = {
|
|
|
1164
1164
|
class: "copy-uuid-array",
|
|
1165
1165
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1166
1166
|
}, [
|
|
1167
|
-
(m(!0), T(
|
|
1168
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1169
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1170
|
-
uuid:
|
|
1167
|
+
(m(!0), T(pe, null, ce(e.item.value, (k, S) => (m(), U(g(hn), lt(d.value.childAttrs, {
|
|
1168
|
+
key: `${e.item.key}-copy-uuid-${S}`,
|
|
1169
|
+
"data-testid": `${e.item.key}-copy-uuid-${S}`,
|
|
1170
|
+
uuid: k
|
|
1171
1171
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1172
1172
|
], 8, $a)) : d.value.additionalComponent === "KMethodBadge" ? (m(), T("div", {
|
|
1173
1173
|
key: 2,
|
|
1174
1174
|
class: "method-badge-array",
|
|
1175
1175
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1176
1176
|
}, [
|
|
1177
|
-
(m(!0), T(
|
|
1178
|
-
key: `${e.item.key}-badge-method-${
|
|
1177
|
+
(m(!0), T(pe, null, ce(e.item.value, (k, S) => (m(), U(A, {
|
|
1178
|
+
key: `${e.item.key}-badge-method-${S}`,
|
|
1179
1179
|
class: "config-badge",
|
|
1180
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1180
|
+
"data-testid": `${e.item.key}-badge-method-${S}`,
|
|
1181
1181
|
"is-rounded": "",
|
|
1182
|
-
label:
|
|
1183
|
-
method: g(Cr).includes(
|
|
1182
|
+
label: k,
|
|
1183
|
+
method: g(Cr).includes(k.toLowerCase()) ? k.toLowerCase() : "custom"
|
|
1184
1184
|
}, {
|
|
1185
1185
|
default: y(() => [
|
|
1186
|
-
W(
|
|
1186
|
+
W($(k), 1)
|
|
1187
1187
|
]),
|
|
1188
1188
|
_: 2
|
|
1189
1189
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
1190
|
-
], 8,
|
|
1190
|
+
], 8, ja)) : G("", !0),
|
|
1191
1191
|
d.value.additionalComponent === "JsonCardItem" ? (m(), T("div", {
|
|
1192
1192
|
key: 3,
|
|
1193
1193
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1194
1194
|
}, [
|
|
1195
|
-
(m(!0), T(
|
|
1196
|
-
key: `json-array-item-${
|
|
1197
|
-
index:
|
|
1195
|
+
(m(!0), T(pe, null, ce(e.item.value, (k, S) => (m(), U(vn, {
|
|
1196
|
+
key: `json-array-item-${S}`,
|
|
1197
|
+
index: S,
|
|
1198
1198
|
"is-array-item": "",
|
|
1199
|
-
item:
|
|
1199
|
+
item: k
|
|
1200
1200
|
}, null, 8, ["index", "item"]))), 128))
|
|
1201
|
-
], 8,
|
|
1201
|
+
], 8, Ma)) : (m(), U(w, {
|
|
1202
1202
|
key: 4,
|
|
1203
1203
|
label: g(h) ? e.item.value : ""
|
|
1204
1204
|
}, {
|
|
@@ -1207,7 +1207,7 @@ const ae = {
|
|
|
1207
1207
|
ref_key: "textContent",
|
|
1208
1208
|
ref: u,
|
|
1209
1209
|
class: Ae(["attrs-data-text", { truncated: e.truncated }])
|
|
1210
|
-
},
|
|
1210
|
+
}, $(d.value.text), 3)
|
|
1211
1211
|
]),
|
|
1212
1212
|
_: 1
|
|
1213
1213
|
}, 8, ["label"]))
|
|
@@ -1223,18 +1223,18 @@ const ae = {
|
|
|
1223
1223
|
]);
|
|
1224
1224
|
};
|
|
1225
1225
|
}
|
|
1226
|
-
}), bt = /* @__PURE__ */ me(
|
|
1226
|
+
}), bt = /* @__PURE__ */ me(Ea, [["__scopeId", "data-v-307ab96d"]]);
|
|
1227
1227
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1228
1228
|
function bn(e) {
|
|
1229
1229
|
return typeof e > "u" || e === null;
|
|
1230
1230
|
}
|
|
1231
|
-
function
|
|
1231
|
+
function Na(e) {
|
|
1232
1232
|
return typeof e == "object" && e !== null;
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1234
|
+
function Fa(e) {
|
|
1235
1235
|
return Array.isArray(e) ? e : bn(e) ? [] : [e];
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1237
|
+
function Ka(e, n) {
|
|
1238
1238
|
var t, r, a, o;
|
|
1239
1239
|
if (n)
|
|
1240
1240
|
for (o = Object.keys(n), t = 0, r = o.length; t < r; t += 1)
|
|
@@ -1250,7 +1250,7 @@ function Ba(e, n) {
|
|
|
1250
1250
|
function qa(e) {
|
|
1251
1251
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1252
1252
|
}
|
|
1253
|
-
var La = bn, Pa =
|
|
1253
|
+
var La = bn, Pa = Na, Va = Fa, Ra = Ba, Ua = qa, Da = Ka, ne = {
|
|
1254
1254
|
isNothing: La,
|
|
1255
1255
|
isObject: Pa,
|
|
1256
1256
|
toArray: Va,
|
|
@@ -1282,7 +1282,7 @@ function ot(e, n, t, r, a) {
|
|
|
1282
1282
|
};
|
|
1283
1283
|
}
|
|
1284
1284
|
function it(e, n) {
|
|
1285
|
-
return
|
|
1285
|
+
return ne.repeat(" ", n - e.length) + e;
|
|
1286
1286
|
}
|
|
1287
1287
|
function Ga(e, n) {
|
|
1288
1288
|
if (n = Object.create(n || null), !e.buffer)
|
|
@@ -1299,10 +1299,10 @@ function Ga(e, n) {
|
|
|
1299
1299
|
a[i - l],
|
|
1300
1300
|
e.position - (r[i] - r[i - l]),
|
|
1301
1301
|
u
|
|
1302
|
-
), s =
|
|
1302
|
+
), s = ne.repeat(" ", n.indent) + it((e.line - l + 1).toString(), d) + " | " + c.str + `
|
|
1303
1303
|
` + s;
|
|
1304
|
-
for (c = ot(e.buffer, r[i], a[i], e.position, u), s +=
|
|
1305
|
-
`, s +=
|
|
1304
|
+
for (c = ot(e.buffer, r[i], a[i], e.position, u), s += ne.repeat(" ", n.indent) + it((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1305
|
+
`, s += ne.repeat("-", n.indent + d + 3 + c.pos) + `^
|
|
1306
1306
|
`, l = 1; l <= n.linesAfter && !(i + l >= a.length); l++)
|
|
1307
1307
|
c = ot(
|
|
1308
1308
|
e.buffer,
|
|
@@ -1310,7 +1310,7 @@ function Ga(e, n) {
|
|
|
1310
1310
|
a[i + l],
|
|
1311
1311
|
e.position - (r[i] - r[i + l]),
|
|
1312
1312
|
u
|
|
1313
|
-
), s +=
|
|
1313
|
+
), s += ne.repeat(" ", n.indent) + it((e.line + l + 1).toString(), d) + " | " + c.str + `
|
|
1314
1314
|
`;
|
|
1315
1315
|
return s.replace(/\n$/, "");
|
|
1316
1316
|
}
|
|
@@ -1428,13 +1428,13 @@ var kn = ct, wn = new oe("tag:yaml.org,2002:str", {
|
|
|
1428
1428
|
In
|
|
1429
1429
|
]
|
|
1430
1430
|
});
|
|
1431
|
-
function
|
|
1431
|
+
function Xa(e) {
|
|
1432
1432
|
if (e === null)
|
|
1433
1433
|
return !0;
|
|
1434
1434
|
var n = e.length;
|
|
1435
1435
|
return n === 1 && e === "~" || n === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1436
1436
|
}
|
|
1437
|
-
function
|
|
1437
|
+
function Qa() {
|
|
1438
1438
|
return null;
|
|
1439
1439
|
}
|
|
1440
1440
|
function eo(e) {
|
|
@@ -1442,8 +1442,8 @@ function eo(e) {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
var Sn = new oe("tag:yaml.org,2002:null", {
|
|
1444
1444
|
kind: "scalar",
|
|
1445
|
-
resolve:
|
|
1446
|
-
construct:
|
|
1445
|
+
resolve: Xa,
|
|
1446
|
+
construct: Qa,
|
|
1447
1447
|
predicate: eo,
|
|
1448
1448
|
represent: {
|
|
1449
1449
|
canonical: function() {
|
|
@@ -1565,7 +1565,7 @@ function lo(e) {
|
|
|
1565
1565
|
return t * parseInt(n, 10);
|
|
1566
1566
|
}
|
|
1567
1567
|
function uo(e) {
|
|
1568
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !
|
|
1568
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ne.isNegativeZero(e);
|
|
1569
1569
|
}
|
|
1570
1570
|
var Tn = new oe("tag:yaml.org,2002:int", {
|
|
1571
1571
|
kind: "scalar",
|
|
@@ -1637,12 +1637,12 @@ function go(e, n) {
|
|
|
1637
1637
|
case "camelcase":
|
|
1638
1638
|
return "-.Inf";
|
|
1639
1639
|
}
|
|
1640
|
-
else if (
|
|
1640
|
+
else if (ne.isNegativeZero(e))
|
|
1641
1641
|
return "-0.0";
|
|
1642
1642
|
return t = e.toString(10), mo.test(t) ? t.replace("e", ".e") : t;
|
|
1643
1643
|
}
|
|
1644
1644
|
function yo(e) {
|
|
1645
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 ||
|
|
1645
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ne.isNegativeZero(e));
|
|
1646
1646
|
}
|
|
1647
1647
|
var $n = new oe("tag:yaml.org,2002:float", {
|
|
1648
1648
|
kind: "scalar",
|
|
@@ -1651,24 +1651,24 @@ var $n = new oe("tag:yaml.org,2002:float", {
|
|
|
1651
1651
|
predicate: yo,
|
|
1652
1652
|
represent: go,
|
|
1653
1653
|
defaultStyle: "lowercase"
|
|
1654
|
-
}),
|
|
1654
|
+
}), jn = An.extend({
|
|
1655
1655
|
implicit: [
|
|
1656
1656
|
Sn,
|
|
1657
1657
|
xn,
|
|
1658
1658
|
Tn,
|
|
1659
1659
|
$n
|
|
1660
1660
|
]
|
|
1661
|
-
}),
|
|
1661
|
+
}), Mn = jn, On = new RegExp(
|
|
1662
1662
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1663
|
-
),
|
|
1663
|
+
), En = new RegExp(
|
|
1664
1664
|
"^([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]))?))?$"
|
|
1665
1665
|
);
|
|
1666
1666
|
function ho(e) {
|
|
1667
|
-
return e === null ? !1 :
|
|
1667
|
+
return e === null ? !1 : On.exec(e) !== null || En.exec(e) !== null;
|
|
1668
1668
|
}
|
|
1669
1669
|
function vo(e) {
|
|
1670
1670
|
var n, t, r, a, o, i, s, l = 0, c = null, d, u, h;
|
|
1671
|
-
if (n =
|
|
1671
|
+
if (n = On.exec(e), n === null && (n = En.exec(e)), n === null)
|
|
1672
1672
|
throw new Error("Date resolve error");
|
|
1673
1673
|
if (t = +n[1], r = +n[2] - 1, a = +n[3], !n[4])
|
|
1674
1674
|
return new Date(Date.UTC(t, r, a));
|
|
@@ -1682,7 +1682,7 @@ function vo(e) {
|
|
|
1682
1682
|
function bo(e) {
|
|
1683
1683
|
return e.toISOString();
|
|
1684
1684
|
}
|
|
1685
|
-
var
|
|
1685
|
+
var Nn = new oe("tag:yaml.org,2002:timestamp", {
|
|
1686
1686
|
kind: "scalar",
|
|
1687
1687
|
resolve: ho,
|
|
1688
1688
|
construct: vo,
|
|
@@ -1692,7 +1692,7 @@ var Fn = new oe("tag:yaml.org,2002:timestamp", {
|
|
|
1692
1692
|
function Co(e) {
|
|
1693
1693
|
return e === "<<" || e === null;
|
|
1694
1694
|
}
|
|
1695
|
-
var
|
|
1695
|
+
var Fn = new oe("tag:yaml.org,2002:merge", {
|
|
1696
1696
|
kind: "scalar",
|
|
1697
1697
|
resolve: Co
|
|
1698
1698
|
}), Ct = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
@@ -1724,7 +1724,7 @@ function _o(e) {
|
|
|
1724
1724
|
function Io(e) {
|
|
1725
1725
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1726
1726
|
}
|
|
1727
|
-
var
|
|
1727
|
+
var Kn = new oe("tag:yaml.org,2002:binary", {
|
|
1728
1728
|
kind: "scalar",
|
|
1729
1729
|
resolve: ko,
|
|
1730
1730
|
construct: wo,
|
|
@@ -1761,7 +1761,7 @@ var Bn = new oe("tag:yaml.org,2002:omap", {
|
|
|
1761
1761
|
resolve: xo,
|
|
1762
1762
|
construct: To
|
|
1763
1763
|
}), $o = Object.prototype.toString;
|
|
1764
|
-
function
|
|
1764
|
+
function jo(e) {
|
|
1765
1765
|
if (e === null)
|
|
1766
1766
|
return !0;
|
|
1767
1767
|
var n, t, r, a, o, i = e;
|
|
@@ -1772,7 +1772,7 @@ function Mo(e) {
|
|
|
1772
1772
|
}
|
|
1773
1773
|
return !0;
|
|
1774
1774
|
}
|
|
1775
|
-
function
|
|
1775
|
+
function Mo(e) {
|
|
1776
1776
|
if (e === null)
|
|
1777
1777
|
return [];
|
|
1778
1778
|
var n, t, r, a, o, i = e;
|
|
@@ -1782,37 +1782,37 @@ function jo(e) {
|
|
|
1782
1782
|
}
|
|
1783
1783
|
var qn = new oe("tag:yaml.org,2002:pairs", {
|
|
1784
1784
|
kind: "sequence",
|
|
1785
|
-
resolve:
|
|
1786
|
-
construct:
|
|
1787
|
-
}),
|
|
1788
|
-
function
|
|
1785
|
+
resolve: jo,
|
|
1786
|
+
construct: Mo
|
|
1787
|
+
}), Oo = Object.prototype.hasOwnProperty;
|
|
1788
|
+
function Eo(e) {
|
|
1789
1789
|
if (e === null)
|
|
1790
1790
|
return !0;
|
|
1791
1791
|
var n, t = e;
|
|
1792
1792
|
for (n in t)
|
|
1793
|
-
if (
|
|
1793
|
+
if (Oo.call(t, n) && t[n] !== null)
|
|
1794
1794
|
return !1;
|
|
1795
1795
|
return !0;
|
|
1796
1796
|
}
|
|
1797
|
-
function
|
|
1797
|
+
function No(e) {
|
|
1798
1798
|
return e !== null ? e : {};
|
|
1799
1799
|
}
|
|
1800
1800
|
var Ln = new oe("tag:yaml.org,2002:set", {
|
|
1801
1801
|
kind: "mapping",
|
|
1802
|
-
resolve:
|
|
1803
|
-
construct:
|
|
1804
|
-
}), kt =
|
|
1802
|
+
resolve: Eo,
|
|
1803
|
+
construct: No
|
|
1804
|
+
}), kt = Mn.extend({
|
|
1805
1805
|
implicit: [
|
|
1806
|
-
|
|
1807
|
-
|
|
1806
|
+
Nn,
|
|
1807
|
+
Fn
|
|
1808
1808
|
],
|
|
1809
1809
|
explicit: [
|
|
1810
|
-
|
|
1810
|
+
Kn,
|
|
1811
1811
|
Bn,
|
|
1812
1812
|
qn,
|
|
1813
1813
|
Ln
|
|
1814
1814
|
]
|
|
1815
|
-
}), ke = Object.prototype.hasOwnProperty, He = 1, Pn = 2, Vn = 3, ze = 4, st = 1,
|
|
1815
|
+
}), ke = Object.prototype.hasOwnProperty, He = 1, Pn = 2, Vn = 3, ze = 4, st = 1, Fo = 2, Gt = 3, Ko = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Bo = /[\x85\u2028\u2029]/, qo = /[,\[\]\{\}]/, Rn = /^(?:!|!!|![a-z\-]+!)$/i, Un = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1816
1816
|
function Ht(e) {
|
|
1817
1817
|
return Object.prototype.toString.call(e);
|
|
1818
1818
|
}
|
|
@@ -1822,10 +1822,10 @@ function ge(e) {
|
|
|
1822
1822
|
function Ie(e) {
|
|
1823
1823
|
return e === 9 || e === 32;
|
|
1824
1824
|
}
|
|
1825
|
-
function
|
|
1825
|
+
function de(e) {
|
|
1826
1826
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1828
|
+
function Oe(e) {
|
|
1829
1829
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1830
1830
|
}
|
|
1831
1831
|
function Lo(e) {
|
|
@@ -1849,8 +1849,8 @@ function Ro(e) {
|
|
|
1849
1849
|
);
|
|
1850
1850
|
}
|
|
1851
1851
|
var Dn = new Array(256), Gn = new Array(256);
|
|
1852
|
-
for (var
|
|
1853
|
-
Dn[
|
|
1852
|
+
for (var je = 0; je < 256; je++)
|
|
1853
|
+
Dn[je] = zt(je) ? 1 : 0, Gn[je] = zt(je);
|
|
1854
1854
|
function Uo(e, n) {
|
|
1855
1855
|
this.input = e, this.filename = n.filename || null, this.schema = n.schema || kt, 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 = [];
|
|
1856
1856
|
}
|
|
@@ -1894,16 +1894,16 @@ function Ce(e, n, t, r) {
|
|
|
1894
1894
|
for (a = 0, o = s.length; a < o; a += 1)
|
|
1895
1895
|
i = s.charCodeAt(a), i === 9 || 32 <= i && i <= 1114111 || j(e, "expected valid JSON character");
|
|
1896
1896
|
else
|
|
1897
|
-
|
|
1897
|
+
Ko.test(s) && j(e, "the stream contains non-printable characters");
|
|
1898
1898
|
e.result += s;
|
|
1899
1899
|
}
|
|
1900
1900
|
}
|
|
1901
1901
|
function Yt(e, n, t, r) {
|
|
1902
1902
|
var a, o, i, s;
|
|
1903
|
-
for (
|
|
1903
|
+
for (ne.isObject(t) || j(e, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(t), i = 0, s = a.length; i < s; i += 1)
|
|
1904
1904
|
o = a[i], ke.call(n, o) || (n[o] = t[o], r[o] = !0);
|
|
1905
1905
|
}
|
|
1906
|
-
function
|
|
1906
|
+
function Ee(e, n, t, r, a, o, i, s, l) {
|
|
1907
1907
|
var c, d;
|
|
1908
1908
|
if (Array.isArray(a))
|
|
1909
1909
|
for (a = Array.prototype.slice.call(a), c = 0, d = a.length; c < d; c += 1)
|
|
@@ -1927,7 +1927,7 @@ function wt(e) {
|
|
|
1927
1927
|
var n;
|
|
1928
1928
|
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : j(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1929
1929
|
}
|
|
1930
|
-
function
|
|
1930
|
+
function te(e, n, t) {
|
|
1931
1931
|
for (var r = 0, a = e.input.charCodeAt(e.position); a !== 0; ) {
|
|
1932
1932
|
for (; Ie(a); )
|
|
1933
1933
|
a === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), a = e.input.charCodeAt(++e.position);
|
|
@@ -1945,28 +1945,28 @@ function ne(e, n, t) {
|
|
|
1945
1945
|
}
|
|
1946
1946
|
function et(e) {
|
|
1947
1947
|
var n = e.position, t;
|
|
1948
|
-
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 ||
|
|
1948
|
+
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 || de(t)));
|
|
1949
1949
|
}
|
|
1950
1950
|
function _t(e, n) {
|
|
1951
|
-
n === 1 ? e.result += " " : n > 1 && (e.result +=
|
|
1951
|
+
n === 1 ? e.result += " " : n > 1 && (e.result += ne.repeat(`
|
|
1952
1952
|
`, n - 1));
|
|
1953
1953
|
}
|
|
1954
1954
|
function Do(e, n, t) {
|
|
1955
1955
|
var r, a, o, i, s, l, c, d, u = e.kind, h = e.result, f;
|
|
1956
|
-
if (f = e.input.charCodeAt(e.position),
|
|
1956
|
+
if (f = e.input.charCodeAt(e.position), de(f) || Oe(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) && (a = e.input.charCodeAt(e.position + 1), de(a) || t && Oe(a)))
|
|
1957
1957
|
return !1;
|
|
1958
1958
|
for (e.kind = "scalar", e.result = "", o = i = e.position, s = !1; f !== 0; ) {
|
|
1959
1959
|
if (f === 58) {
|
|
1960
|
-
if (a = e.input.charCodeAt(e.position + 1),
|
|
1960
|
+
if (a = e.input.charCodeAt(e.position + 1), de(a) || t && Oe(a))
|
|
1961
1961
|
break;
|
|
1962
1962
|
} else if (f === 35) {
|
|
1963
|
-
if (r = e.input.charCodeAt(e.position - 1),
|
|
1963
|
+
if (r = e.input.charCodeAt(e.position - 1), de(r))
|
|
1964
1964
|
break;
|
|
1965
1965
|
} else {
|
|
1966
|
-
if (e.position === e.lineStart && et(e) || t &&
|
|
1966
|
+
if (e.position === e.lineStart && et(e) || t && Oe(f))
|
|
1967
1967
|
break;
|
|
1968
1968
|
if (ge(f))
|
|
1969
|
-
if (l = e.line, c = e.lineStart, d = e.lineIndent,
|
|
1969
|
+
if (l = e.line, c = e.lineStart, d = e.lineIndent, te(e, !1, -1), e.lineIndent >= n) {
|
|
1970
1970
|
s = !0, f = e.input.charCodeAt(e.position);
|
|
1971
1971
|
continue;
|
|
1972
1972
|
} else {
|
|
@@ -1989,7 +1989,7 @@ function Go(e, n) {
|
|
|
1989
1989
|
else
|
|
1990
1990
|
return !0;
|
|
1991
1991
|
else
|
|
1992
|
-
ge(t) ? (Ce(e, r, a, !0), _t(e,
|
|
1992
|
+
ge(t) ? (Ce(e, r, a, !0), _t(e, te(e, !1, n)), r = a = e.position) : e.position === e.lineStart && et(e) ? j(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
|
|
1993
1993
|
j(e, "unexpected end of the stream within a single quoted scalar");
|
|
1994
1994
|
}
|
|
1995
1995
|
function Ho(e, n) {
|
|
@@ -2001,7 +2001,7 @@ function Ho(e, n) {
|
|
|
2001
2001
|
return Ce(e, t, e.position, !0), e.position++, !0;
|
|
2002
2002
|
if (s === 92) {
|
|
2003
2003
|
if (Ce(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), ge(s))
|
|
2004
|
-
|
|
2004
|
+
te(e, !1, n);
|
|
2005
2005
|
else if (s < 256 && Dn[s])
|
|
2006
2006
|
e.result += Gn[s], e.position++;
|
|
2007
2007
|
else if ((i = Po(s)) > 0) {
|
|
@@ -2012,22 +2012,22 @@ function Ho(e, n) {
|
|
|
2012
2012
|
j(e, "unknown escape sequence");
|
|
2013
2013
|
t = r = e.position;
|
|
2014
2014
|
} else
|
|
2015
|
-
ge(s) ? (Ce(e, t, r, !0), _t(e,
|
|
2015
|
+
ge(s) ? (Ce(e, t, r, !0), _t(e, te(e, !1, n)), t = r = e.position) : e.position === e.lineStart && et(e) ? j(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
2016
2016
|
}
|
|
2017
2017
|
j(e, "unexpected end of the stream within a double quoted scalar");
|
|
2018
2018
|
}
|
|
2019
2019
|
function zo(e, n) {
|
|
2020
|
-
var t = !0, r, a, o, i = e.tag, s, l = e.anchor, c, d, u, h, f,
|
|
2021
|
-
if (
|
|
2020
|
+
var t = !0, r, a, o, i = e.tag, s, l = e.anchor, c, d, u, h, f, I = /* @__PURE__ */ Object.create(null), b, p, A, w;
|
|
2021
|
+
if (w = e.input.charCodeAt(e.position), w === 91)
|
|
2022
2022
|
d = 93, f = !1, s = [];
|
|
2023
|
-
else if (
|
|
2023
|
+
else if (w === 123)
|
|
2024
2024
|
d = 125, f = !0, s = {};
|
|
2025
2025
|
else
|
|
2026
2026
|
return !1;
|
|
2027
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = s),
|
|
2028
|
-
if (
|
|
2027
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), w = e.input.charCodeAt(++e.position); w !== 0; ) {
|
|
2028
|
+
if (te(e, !0, n), w = e.input.charCodeAt(e.position), w === d)
|
|
2029
2029
|
return e.position++, e.tag = i, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
2030
|
-
t ?
|
|
2030
|
+
t ? w === 44 && j(e, "expected the node content, but found ','") : j(e, "missed comma between flow collection entries"), p = b = A = null, u = h = !1, w === 63 && (c = e.input.charCodeAt(e.position + 1), de(c) && (u = h = !0, e.position++, te(e, !0, n))), r = e.line, a = e.lineStart, o = e.position, Fe(e, n, He, !1, !0), p = e.tag, b = e.result, te(e, !0, n), w = e.input.charCodeAt(e.position), (h || e.line === r) && w === 58 && (u = !0, w = e.input.charCodeAt(++e.position), te(e, !0, n), Fe(e, n, He, !1, !0), A = e.result), f ? Ee(e, s, I, p, b, A, r, a, o) : u ? s.push(Ee(e, null, I, p, b, A, r, a, o)) : s.push(b), te(e, !0, n), w = e.input.charCodeAt(e.position), w === 44 ? (t = !0, w = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2031
2031
|
}
|
|
2032
2032
|
j(e, "unexpected end of the stream within a flow collection");
|
|
2033
2033
|
}
|
|
@@ -2041,7 +2041,7 @@ function Jo(e, n) {
|
|
|
2041
2041
|
return !1;
|
|
2042
2042
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
2043
2043
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
2044
|
-
st === a ? a = u === 43 ? Gt :
|
|
2044
|
+
st === a ? a = u === 43 ? Gt : Fo : j(e, "repeat of a chomping mode identifier");
|
|
2045
2045
|
else if ((d = Vo(u)) >= 0)
|
|
2046
2046
|
d === 0 ? j(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? j(e, "repeat of an indentation width identifier") : (s = n + d - 1, i = !0);
|
|
2047
2047
|
else
|
|
@@ -2063,15 +2063,15 @@ function Jo(e, n) {
|
|
|
2063
2063
|
continue;
|
|
2064
2064
|
}
|
|
2065
2065
|
if (e.lineIndent < s) {
|
|
2066
|
-
a === Gt ? e.result +=
|
|
2066
|
+
a === Gt ? e.result += ne.repeat(`
|
|
2067
2067
|
`, o ? 1 + l : l) : a === st && o && (e.result += `
|
|
2068
2068
|
`);
|
|
2069
2069
|
break;
|
|
2070
2070
|
}
|
|
2071
|
-
for (r ? Ie(u) ? (c = !0, e.result +=
|
|
2072
|
-
`, o ? 1 + l : l)) : c ? (c = !1, e.result +=
|
|
2073
|
-
`, l + 1)) : l === 0 ? o && (e.result += " ") : e.result +=
|
|
2074
|
-
`, l) : e.result +=
|
|
2071
|
+
for (r ? Ie(u) ? (c = !0, e.result += ne.repeat(`
|
|
2072
|
+
`, o ? 1 + l : l)) : c ? (c = !1, e.result += ne.repeat(`
|
|
2073
|
+
`, l + 1)) : l === 0 ? o && (e.result += " ") : e.result += ne.repeat(`
|
|
2074
|
+
`, l) : e.result += ne.repeat(`
|
|
2075
2075
|
`, o ? 1 + l : l), o = !0, i = !0, l = 0, t = e.position; !ge(u) && u !== 0; )
|
|
2076
2076
|
u = e.input.charCodeAt(++e.position);
|
|
2077
2077
|
Ce(e, t, e.position, !1);
|
|
@@ -2082,12 +2082,12 @@ function Wt(e, n) {
|
|
|
2082
2082
|
var t, r = e.tag, a = e.anchor, o = [], i, s = !1, l;
|
|
2083
2083
|
if (e.firstTabInLine !== -1)
|
|
2084
2084
|
return !1;
|
|
2085
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, j(e, "tab characters must not be used in indentation")), !(l !== 45 || (i = e.input.charCodeAt(e.position + 1), !
|
|
2086
|
-
if (s = !0, e.position++,
|
|
2085
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, j(e, "tab characters must not be used in indentation")), !(l !== 45 || (i = e.input.charCodeAt(e.position + 1), !de(i)))); ) {
|
|
2086
|
+
if (s = !0, e.position++, te(e, !0, -1) && e.lineIndent <= n) {
|
|
2087
2087
|
o.push(null), l = e.input.charCodeAt(e.position);
|
|
2088
2088
|
continue;
|
|
2089
2089
|
}
|
|
2090
|
-
if (t = e.line,
|
|
2090
|
+
if (t = e.line, Fe(e, n, Vn, !1, !0), o.push(e.result), te(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && l !== 0)
|
|
2091
2091
|
j(e, "bad indentation of a sequence entry");
|
|
2092
2092
|
else if (e.lineIndent < n)
|
|
2093
2093
|
break;
|
|
@@ -2095,35 +2095,35 @@ function Wt(e, n) {
|
|
|
2095
2095
|
return s ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = o, !0) : !1;
|
|
2096
2096
|
}
|
|
2097
2097
|
function Yo(e, n, t) {
|
|
2098
|
-
var r, a, o, i, s, l, c = e.tag, d = e.anchor, u = {}, h = /* @__PURE__ */ Object.create(null), f = null,
|
|
2098
|
+
var r, a, o, i, s, l, c = e.tag, d = e.anchor, u = {}, h = /* @__PURE__ */ Object.create(null), f = null, I = null, b = null, p = !1, A = !1, w;
|
|
2099
2099
|
if (e.firstTabInLine !== -1)
|
|
2100
2100
|
return !1;
|
|
2101
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = u),
|
|
2102
|
-
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, j(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (
|
|
2103
|
-
|
|
2101
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), w = e.input.charCodeAt(e.position); w !== 0; ) {
|
|
2102
|
+
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, j(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (w === 63 || w === 58) && de(r))
|
|
2103
|
+
w === 63 ? (p && (Ee(e, u, h, f, I, null, i, s, l), f = I = b = null), A = !0, p = !0, a = !0) : p ? (p = !1, a = !0) : j(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, w = r;
|
|
2104
2104
|
else {
|
|
2105
|
-
if (i = e.line, s = e.lineStart, l = e.position, !
|
|
2105
|
+
if (i = e.line, s = e.lineStart, l = e.position, !Fe(e, t, Pn, !1, !0))
|
|
2106
2106
|
break;
|
|
2107
2107
|
if (e.line === o) {
|
|
2108
|
-
for (
|
|
2109
|
-
|
|
2110
|
-
if (
|
|
2111
|
-
|
|
2112
|
-
else if (
|
|
2108
|
+
for (w = e.input.charCodeAt(e.position); Ie(w); )
|
|
2109
|
+
w = e.input.charCodeAt(++e.position);
|
|
2110
|
+
if (w === 58)
|
|
2111
|
+
w = e.input.charCodeAt(++e.position), de(w) || j(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ee(e, u, h, f, I, null, i, s, l), f = I = b = null), A = !0, p = !1, a = !1, f = e.tag, I = e.result;
|
|
2112
|
+
else if (A)
|
|
2113
2113
|
j(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2114
2114
|
else
|
|
2115
2115
|
return e.tag = c, e.anchor = d, !0;
|
|
2116
|
-
} else if (
|
|
2116
|
+
} else if (A)
|
|
2117
2117
|
j(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2118
2118
|
else
|
|
2119
2119
|
return e.tag = c, e.anchor = d, !0;
|
|
2120
2120
|
}
|
|
2121
|
-
if ((e.line === o || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position),
|
|
2121
|
+
if ((e.line === o || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Fe(e, n, ze, !0, a) && (p ? I = e.result : b = e.result), p || (Ee(e, u, h, f, I, b, i, s, l), f = I = b = null), te(e, !0, -1), w = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && w !== 0)
|
|
2122
2122
|
j(e, "bad indentation of a mapping entry");
|
|
2123
2123
|
else if (e.lineIndent < n)
|
|
2124
2124
|
break;
|
|
2125
2125
|
}
|
|
2126
|
-
return p &&
|
|
2126
|
+
return p && Ee(e, u, h, f, I, null, i, s, l), A && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), A;
|
|
2127
2127
|
}
|
|
2128
2128
|
function Wo(e) {
|
|
2129
2129
|
var n, t = !1, r = !1, a, o, i;
|
|
@@ -2135,7 +2135,7 @@ function Wo(e) {
|
|
|
2135
2135
|
while (i !== 0 && i !== 62);
|
|
2136
2136
|
e.position < e.length ? (o = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) : j(e, "unexpected end of the stream within a verbatim tag");
|
|
2137
2137
|
} else {
|
|
2138
|
-
for (; i !== 0 && !
|
|
2138
|
+
for (; i !== 0 && !de(i); )
|
|
2139
2139
|
i === 33 && (r ? j(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(n - 1, e.position + 1), Rn.test(a) || j(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), i = e.input.charCodeAt(++e.position);
|
|
2140
2140
|
o = e.input.slice(n, e.position), qo.test(o) && j(e, "tag suffix cannot contain flow indicator characters");
|
|
2141
2141
|
}
|
|
@@ -2151,48 +2151,48 @@ function Zo(e) {
|
|
|
2151
2151
|
var n, t;
|
|
2152
2152
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2153
2153
|
return !1;
|
|
2154
|
-
for (e.anchor !== null && j(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !
|
|
2154
|
+
for (e.anchor !== null && j(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !de(t) && !Oe(t); )
|
|
2155
2155
|
t = e.input.charCodeAt(++e.position);
|
|
2156
2156
|
return e.position === n && j(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2157
2157
|
}
|
|
2158
|
-
function
|
|
2158
|
+
function Xo(e) {
|
|
2159
2159
|
var n, t, r;
|
|
2160
2160
|
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
2161
2161
|
return !1;
|
|
2162
|
-
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !
|
|
2162
|
+
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !de(r) && !Oe(r); )
|
|
2163
2163
|
r = e.input.charCodeAt(++e.position);
|
|
2164
|
-
return e.position === n && j(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), ke.call(e.anchorMap, t) || j(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t],
|
|
2164
|
+
return e.position === n && j(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), ke.call(e.anchorMap, t) || j(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], te(e, !0, -1), !0;
|
|
2165
2165
|
}
|
|
2166
|
-
function
|
|
2167
|
-
var o, i, s, l = 1, c = !1, d = !1, u, h, f,
|
|
2168
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = i = s = ze === t || Vn === t, r &&
|
|
2166
|
+
function Fe(e, n, t, r, a) {
|
|
2167
|
+
var o, i, s, l = 1, c = !1, d = !1, u, h, f, I, b, p;
|
|
2168
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = i = s = ze === t || Vn === t, r && te(e, !0, -1) && (c = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2169
2169
|
for (; Wo(e) || Zo(e); )
|
|
2170
|
-
|
|
2171
|
-
if (s && (s = c || a), (l === 1 || ze === t) && (He === t || Pn === t ?
|
|
2170
|
+
te(e, !0, -1) ? (c = !0, s = o, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2171
|
+
if (s && (s = c || a), (l === 1 || ze === t) && (He === t || Pn === t ? b = n : b = n + 1, p = e.position - e.lineStart, l === 1 ? s && (Wt(e, p) || Yo(e, p, b)) || zo(e, b) ? d = !0 : (i && Jo(e, b) || Go(e, b) || Ho(e, b) ? d = !0 : Xo(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && j(e, "alias node should not have any properties")) : Do(e, b, He === t) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && Wt(e, p))), e.tag === null)
|
|
2172
2172
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2173
2173
|
else if (e.tag === "?") {
|
|
2174
2174
|
for (e.result !== null && e.kind !== "scalar" && j(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, h = e.implicitTypes.length; u < h; u += 1)
|
|
2175
|
-
if (
|
|
2176
|
-
e.result =
|
|
2175
|
+
if (I = e.implicitTypes[u], I.resolve(e.result)) {
|
|
2176
|
+
e.result = I.construct(e.result), e.tag = I.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2177
2177
|
break;
|
|
2178
2178
|
}
|
|
2179
2179
|
} else if (e.tag !== "!") {
|
|
2180
2180
|
if (ke.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2181
|
-
|
|
2181
|
+
I = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2182
2182
|
else
|
|
2183
|
-
for (
|
|
2183
|
+
for (I = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, h = f.length; u < h; u += 1)
|
|
2184
2184
|
if (e.tag.slice(0, f[u].tag.length) === f[u].tag) {
|
|
2185
|
-
|
|
2185
|
+
I = f[u];
|
|
2186
2186
|
break;
|
|
2187
2187
|
}
|
|
2188
|
-
|
|
2188
|
+
I || j(e, "unknown tag !<" + e.tag + ">"), e.result !== null && I.kind !== e.kind && j(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + I.kind + '", not "' + e.kind + '"'), I.resolve(e.result, e.tag) ? (e.result = I.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : j(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2189
2189
|
}
|
|
2190
2190
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2191
2191
|
}
|
|
2192
|
-
function
|
|
2192
|
+
function Qo(e) {
|
|
2193
2193
|
var n = e.position, t, r, a, o = !1, i;
|
|
2194
|
-
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 && (
|
|
2195
|
-
for (o = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !
|
|
2194
|
+
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 && (te(e, !0, -1), i = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || i !== 37)); ) {
|
|
2195
|
+
for (o = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !de(i); )
|
|
2196
2196
|
i = e.input.charCodeAt(++e.position);
|
|
2197
2197
|
for (r = e.input.slice(t, e.position), a = [], r.length < 1 && j(e, "directive name must not be less than one character in length"); i !== 0; ) {
|
|
2198
2198
|
for (; Ie(i); )
|
|
@@ -2205,14 +2205,14 @@ function Xo(e) {
|
|
|
2205
2205
|
}
|
|
2206
2206
|
if (ge(i))
|
|
2207
2207
|
break;
|
|
2208
|
-
for (t = e.position; i !== 0 && !
|
|
2208
|
+
for (t = e.position; i !== 0 && !de(i); )
|
|
2209
2209
|
i = e.input.charCodeAt(++e.position);
|
|
2210
2210
|
a.push(e.input.slice(t, e.position));
|
|
2211
2211
|
}
|
|
2212
2212
|
i !== 0 && wt(e), ke.call(Jt, r) ? Jt[r](e, r, a) : Je(e, 'unknown document directive "' + r + '"');
|
|
2213
2213
|
}
|
|
2214
|
-
if (
|
|
2215
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
2214
|
+
if (te(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, te(e, !0, -1)) : o && j(e, "directives end mark is expected"), Fe(e, e.lineIndent - 1, ze, !1, !0), te(e, !0, -1), e.checkLineBreaks && Bo.test(e.input.slice(n, e.position)) && Je(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && et(e)) {
|
|
2215
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, te(e, !0, -1));
|
|
2216
2216
|
return;
|
|
2217
2217
|
}
|
|
2218
2218
|
if (e.position < e.length - 1)
|
|
@@ -2227,7 +2227,7 @@ function zn(e, n) {
|
|
|
2227
2227
|
for (r !== -1 && (t.position = r, j(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2228
2228
|
t.lineIndent += 1, t.position += 1;
|
|
2229
2229
|
for (; t.position < t.length - 1; )
|
|
2230
|
-
|
|
2230
|
+
Qo(t);
|
|
2231
2231
|
return t.documents;
|
|
2232
2232
|
}
|
|
2233
2233
|
function ei(e, n, t) {
|
|
@@ -2249,7 +2249,7 @@ function ti(e, n) {
|
|
|
2249
2249
|
var ni = ei, ri = ti, Jn = {
|
|
2250
2250
|
loadAll: ni,
|
|
2251
2251
|
load: ri
|
|
2252
|
-
}, Yn = Object.prototype.toString, Wn = Object.prototype.hasOwnProperty, It = 65279, ai = 9, Le = 10, oi = 13, ii = 32, si = 33, li = 34, dt = 35, ui = 37, ci = 38, di = 39, pi = 42, Zn = 44, fi = 45, Ye = 58, mi = 61, gi = 62, yi = 63, hi = 64,
|
|
2252
|
+
}, Yn = Object.prototype.toString, Wn = Object.prototype.hasOwnProperty, It = 65279, ai = 9, Le = 10, oi = 13, ii = 32, si = 33, li = 34, dt = 35, ui = 37, ci = 38, di = 39, pi = 42, Zn = 44, fi = 45, Ye = 58, mi = 61, gi = 62, yi = 63, hi = 64, Xn = 91, Qn = 93, vi = 96, er = 123, bi = 124, tr = 125, ie = {};
|
|
2253
2253
|
ie[0] = "\\0";
|
|
2254
2254
|
ie[7] = "\\a";
|
|
2255
2255
|
ie[8] = "\\b";
|
|
@@ -2301,14 +2301,14 @@ function _i(e) {
|
|
|
2301
2301
|
t = "U", r = 8;
|
|
2302
2302
|
else
|
|
2303
2303
|
throw new se("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2304
|
-
return "\\" + t +
|
|
2304
|
+
return "\\" + t + ne.repeat("0", r - n.length) + n;
|
|
2305
2305
|
}
|
|
2306
2306
|
var Ii = 1, Pe = 2;
|
|
2307
2307
|
function Ai(e) {
|
|
2308
|
-
this.schema = e.schema || kt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel =
|
|
2308
|
+
this.schema = e.schema || kt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ne.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 === '"' ? Pe : Ii, 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;
|
|
2309
2309
|
}
|
|
2310
2310
|
function Zt(e, n) {
|
|
2311
|
-
for (var t =
|
|
2311
|
+
for (var t = ne.repeat(" ", n), r = 0, a = -1, o = "", i, s = e.length; r < s; )
|
|
2312
2312
|
a = e.indexOf(`
|
|
2313
2313
|
`, r), a === -1 ? (i = e.slice(r), r = s) : (i = e.slice(r, a + 1), r = a + 1), i.length && i !== `
|
|
2314
2314
|
` && (o += t), o += i;
|
|
@@ -2316,7 +2316,7 @@ function Zt(e, n) {
|
|
|
2316
2316
|
}
|
|
2317
2317
|
function pt(e, n) {
|
|
2318
2318
|
return `
|
|
2319
|
-
` +
|
|
2319
|
+
` + ne.repeat(" ", e.indent * n);
|
|
2320
2320
|
}
|
|
2321
2321
|
function Si(e, n) {
|
|
2322
2322
|
var t, r, a;
|
|
@@ -2331,21 +2331,21 @@ function We(e) {
|
|
|
2331
2331
|
function Ve(e) {
|
|
2332
2332
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== It || 65536 <= e && e <= 1114111;
|
|
2333
2333
|
}
|
|
2334
|
-
function
|
|
2334
|
+
function Xt(e) {
|
|
2335
2335
|
return Ve(e) && e !== It && e !== oi && e !== Le;
|
|
2336
2336
|
}
|
|
2337
|
-
function
|
|
2338
|
-
var r =
|
|
2337
|
+
function Qt(e, n, t) {
|
|
2338
|
+
var r = Xt(e), a = r && !We(e);
|
|
2339
2339
|
return (
|
|
2340
2340
|
// ns-plain-safe
|
|
2341
2341
|
(t ? (
|
|
2342
2342
|
// c = flow-in
|
|
2343
2343
|
r
|
|
2344
|
-
) : r && e !== Zn && e !==
|
|
2344
|
+
) : r && e !== Zn && e !== Xn && e !== Qn && e !== er && e !== tr) && e !== dt && !(n === Ye && !a) || Xt(n) && !We(n) && e === dt || n === Ye && a
|
|
2345
2345
|
);
|
|
2346
2346
|
}
|
|
2347
2347
|
function xi(e) {
|
|
2348
|
-
return Ve(e) && e !== It && !We(e) && e !== fi && e !== yi && e !== Ye && e !== Zn && e !==
|
|
2348
|
+
return Ve(e) && e !== It && !We(e) && e !== fi && e !== yi && e !== Ye && e !== Zn && e !== Xn && e !== Qn && e !== er && e !== tr && e !== dt && e !== ci && e !== pi && e !== si && e !== bi && e !== mi && e !== gi && e !== di && e !== li && e !== ui && e !== hi && e !== vi;
|
|
2349
2349
|
}
|
|
2350
2350
|
function Ti(e) {
|
|
2351
2351
|
return !We(e) && e !== Ye;
|
|
@@ -2358,29 +2358,29 @@ function nr(e) {
|
|
|
2358
2358
|
var n = /^\n* /;
|
|
2359
2359
|
return n.test(e);
|
|
2360
2360
|
}
|
|
2361
|
-
var rr = 1, ft = 2, ar = 3, or = 4,
|
|
2361
|
+
var rr = 1, ft = 2, ar = 3, or = 4, Me = 5;
|
|
2362
2362
|
function $i(e, n, t, r, a, o, i, s) {
|
|
2363
|
-
var l, c = 0, d = null, u = !1, h = !1, f = r !== -1,
|
|
2363
|
+
var l, c = 0, d = null, u = !1, h = !1, f = r !== -1, I = -1, b = xi(Be(e, 0)) && Ti(Be(e, e.length - 1));
|
|
2364
2364
|
if (n || i)
|
|
2365
2365
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2366
2366
|
if (c = Be(e, l), !Ve(c))
|
|
2367
|
-
return
|
|
2368
|
-
|
|
2367
|
+
return Me;
|
|
2368
|
+
b = b && Qt(c, d, s), d = c;
|
|
2369
2369
|
}
|
|
2370
2370
|
else {
|
|
2371
2371
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2372
2372
|
if (c = Be(e, l), c === Le)
|
|
2373
2373
|
u = !0, f && (h = h || // Foldable line = too long, and not more-indented.
|
|
2374
|
-
l -
|
|
2374
|
+
l - I - 1 > r && e[I + 1] !== " ", I = l);
|
|
2375
2375
|
else if (!Ve(c))
|
|
2376
|
-
return
|
|
2377
|
-
|
|
2376
|
+
return Me;
|
|
2377
|
+
b = b && Qt(c, d, s), d = c;
|
|
2378
2378
|
}
|
|
2379
|
-
h = h || f && l -
|
|
2379
|
+
h = h || f && l - I - 1 > r && e[I + 1] !== " ";
|
|
2380
2380
|
}
|
|
2381
|
-
return !u && !h ?
|
|
2381
|
+
return !u && !h ? b && !i && !a(e) ? rr : o === Pe ? Me : ft : t > 9 && nr(e) ? Me : i ? o === Pe ? Me : ft : h ? or : ar;
|
|
2382
2382
|
}
|
|
2383
|
-
function
|
|
2383
|
+
function ji(e, n, t, r, a) {
|
|
2384
2384
|
e.dump = function() {
|
|
2385
2385
|
if (n.length === 0)
|
|
2386
2386
|
return e.quotingType === Pe ? '""' : "''";
|
|
@@ -2407,9 +2407,9 @@ function Mi(e, n, t, r, a) {
|
|
|
2407
2407
|
case ar:
|
|
2408
2408
|
return "|" + en(n, e.indent) + tn(Zt(n, o));
|
|
2409
2409
|
case or:
|
|
2410
|
-
return ">" + en(n, e.indent) + tn(Zt(
|
|
2411
|
-
case
|
|
2412
|
-
return '"' +
|
|
2410
|
+
return ">" + en(n, e.indent) + tn(Zt(Mi(n, i), o));
|
|
2411
|
+
case Me:
|
|
2412
|
+
return '"' + Oi(n) + '"';
|
|
2413
2413
|
default:
|
|
2414
2414
|
throw new se("impossible error: invalid scalar style");
|
|
2415
2415
|
}
|
|
@@ -2427,7 +2427,7 @@ function tn(e) {
|
|
|
2427
2427
|
return e[e.length - 1] === `
|
|
2428
2428
|
` ? e.slice(0, -1) : e;
|
|
2429
2429
|
}
|
|
2430
|
-
function
|
|
2430
|
+
function Mi(e, n) {
|
|
2431
2431
|
for (var t = /(\n+)([^\n]*)/g, r = function() {
|
|
2432
2432
|
var c = e.indexOf(`
|
|
2433
2433
|
`);
|
|
@@ -2450,12 +2450,12 @@ function nn(e, n) {
|
|
|
2450
2450
|
`, e.length - a > n && i > a ? l += e.slice(a, i) + `
|
|
2451
2451
|
` + e.slice(i + 1) : l += e.slice(a), l.slice(1);
|
|
2452
2452
|
}
|
|
2453
|
-
function
|
|
2453
|
+
function Oi(e) {
|
|
2454
2454
|
for (var n = "", t = 0, r, a = 0; a < e.length; t >= 65536 ? a += 2 : a++)
|
|
2455
2455
|
t = Be(e, a), r = ie[t], !r && Ve(t) ? (n += e[a], t >= 65536 && (n += e[a + 1])) : n += r || _i(t);
|
|
2456
2456
|
return n;
|
|
2457
2457
|
}
|
|
2458
|
-
function
|
|
2458
|
+
function Ei(e, n, t) {
|
|
2459
2459
|
var r = "", a = e.tag, o, i, s;
|
|
2460
2460
|
for (o = 0, i = t.length; o < i; o += 1)
|
|
2461
2461
|
s = t[o], e.replacer && (s = e.replacer.call(t, String(o), s)), (he(e, n, s, !1, !1) || typeof s > "u" && he(e, n, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
@@ -2467,13 +2467,13 @@ function rn(e, n, t, r) {
|
|
|
2467
2467
|
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (he(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && he(e, n + 1, null, !0, !0, !1, !0)) && ((!r || a !== "") && (a += pt(e, n)), e.dump && Le === e.dump.charCodeAt(0) ? a += "-" : a += "- ", a += e.dump);
|
|
2468
2468
|
e.tag = o, e.dump = a || "[]";
|
|
2469
2469
|
}
|
|
2470
|
-
function
|
|
2470
|
+
function Ni(e, n, t) {
|
|
2471
2471
|
var r = "", a = e.tag, o = Object.keys(t), i, s, l, c, d;
|
|
2472
2472
|
for (i = 0, s = o.length; i < s; i += 1)
|
|
2473
2473
|
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = o[i], c = t[l], e.replacer && (c = e.replacer.call(t, l, c)), he(e, n, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), he(e, n, c, !1, !1) && (d += e.dump, r += d));
|
|
2474
2474
|
e.tag = a, e.dump = "{" + r + "}";
|
|
2475
2475
|
}
|
|
2476
|
-
function
|
|
2476
|
+
function Fi(e, n, t, r) {
|
|
2477
2477
|
var a = "", o = e.tag, i = Object.keys(t), s, l, c, d, u, h;
|
|
2478
2478
|
if (e.sortKeys === !0)
|
|
2479
2479
|
i.sort();
|
|
@@ -2511,11 +2511,11 @@ function he(e, n, t, r, a, o, i) {
|
|
|
2511
2511
|
e.dump = "*ref_" + u;
|
|
2512
2512
|
else {
|
|
2513
2513
|
if (d && h && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), s === "[object Object]")
|
|
2514
|
-
r && Object.keys(e.dump).length !== 0 ? (
|
|
2514
|
+
r && Object.keys(e.dump).length !== 0 ? (Fi(e, n, e.dump, a), h && (e.dump = "&ref_" + u + e.dump)) : (Ni(e, n, e.dump), h && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2515
2515
|
else if (s === "[object Array]")
|
|
2516
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? rn(e, n - 1, e.dump, a) : rn(e, n, e.dump, a), h && (e.dump = "&ref_" + u + e.dump)) : (
|
|
2516
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? rn(e, n - 1, e.dump, a) : rn(e, n, e.dump, a), h && (e.dump = "&ref_" + u + e.dump)) : (Ei(e, n, e.dump), h && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2517
2517
|
else if (s === "[object String]")
|
|
2518
|
-
e.tag !== "?" &&
|
|
2518
|
+
e.tag !== "?" && ji(e, e.dump, n, o, l);
|
|
2519
2519
|
else {
|
|
2520
2520
|
if (s === "[object Undefined]" || e.skipInvalid)
|
|
2521
2521
|
return !1;
|
|
@@ -2527,7 +2527,7 @@ function he(e, n, t, r, a, o, i) {
|
|
|
2527
2527
|
}
|
|
2528
2528
|
return !0;
|
|
2529
2529
|
}
|
|
2530
|
-
function
|
|
2530
|
+
function Ki(e, n) {
|
|
2531
2531
|
var t = [], r = [], a, o;
|
|
2532
2532
|
for (mt(e, t, r), a = 0, o = r.length; a < o; a += 1)
|
|
2533
2533
|
n.duplicates.push(t[r[a]]);
|
|
@@ -2548,7 +2548,7 @@ function mt(e, n, t) {
|
|
|
2548
2548
|
function Bi(e, n) {
|
|
2549
2549
|
n = n || {};
|
|
2550
2550
|
var t = new Ai(n);
|
|
2551
|
-
t.noRefs ||
|
|
2551
|
+
t.noRefs || Ki(e, t);
|
|
2552
2552
|
var r = e;
|
|
2553
2553
|
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), he(t, 0, r, !0, !0) ? t.dump + `
|
|
2554
2554
|
` : "";
|
|
@@ -2561,21 +2561,21 @@ function At(e, n) {
|
|
|
2561
2561
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2562
2562
|
};
|
|
2563
2563
|
}
|
|
2564
|
-
var Pi = oe, Vi = kn, Ri = An, Ui =
|
|
2565
|
-
binary:
|
|
2564
|
+
var Pi = oe, Vi = kn, Ri = An, Ui = jn, Di = Mn, Gi = kt, Hi = Jn.load, zi = Jn.loadAll, Ji = Li.dump, Yi = se, Wi = {
|
|
2565
|
+
binary: Kn,
|
|
2566
2566
|
float: $n,
|
|
2567
2567
|
map: In,
|
|
2568
2568
|
null: Sn,
|
|
2569
2569
|
pairs: qn,
|
|
2570
2570
|
set: Ln,
|
|
2571
|
-
timestamp:
|
|
2571
|
+
timestamp: Nn,
|
|
2572
2572
|
bool: xn,
|
|
2573
2573
|
int: Tn,
|
|
2574
|
-
merge:
|
|
2574
|
+
merge: Fn,
|
|
2575
2575
|
omap: Bn,
|
|
2576
2576
|
seq: _n,
|
|
2577
2577
|
str: wn
|
|
2578
|
-
}, Zi = At("safeLoad", "load"),
|
|
2578
|
+
}, Zi = At("safeLoad", "load"), Xi = At("safeLoadAll", "loadAll"), Qi = At("safeDump", "dump"), es = {
|
|
2579
2579
|
Type: Pi,
|
|
2580
2580
|
Schema: Vi,
|
|
2581
2581
|
FAILSAFE_SCHEMA: Ri,
|
|
@@ -2588,8 +2588,8 @@ var Pi = oe, Vi = kn, Ri = An, Ui = Mn, Di = jn, Gi = kt, Hi = Jn.load, zi = Jn.
|
|
|
2588
2588
|
YAMLException: Yi,
|
|
2589
2589
|
types: Wi,
|
|
2590
2590
|
safeLoad: Zi,
|
|
2591
|
-
safeLoadAll:
|
|
2592
|
-
safeDump:
|
|
2591
|
+
safeLoadAll: Xi,
|
|
2592
|
+
safeDump: Qi
|
|
2593
2593
|
};
|
|
2594
2594
|
const ts = {
|
|
2595
2595
|
key: 0,
|
|
@@ -2603,7 +2603,7 @@ const ts = {
|
|
|
2603
2603
|
}, os = {
|
|
2604
2604
|
key: 2,
|
|
2605
2605
|
class: "config-card-display-yaml"
|
|
2606
|
-
}, is = /* @__PURE__ */
|
|
2606
|
+
}, is = /* @__PURE__ */ ee({
|
|
2607
2607
|
__name: "ConfigCardDisplay",
|
|
2608
2608
|
props: {
|
|
2609
2609
|
propertyCollections: {
|
|
@@ -2629,20 +2629,20 @@ const ts = {
|
|
|
2629
2629
|
}
|
|
2630
2630
|
},
|
|
2631
2631
|
setup(e) {
|
|
2632
|
-
const n = e, t = Ze(), { i18n: { t: r } } = ae.useI18n(), a = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), o =
|
|
2632
|
+
const n = e, t = Ze(), { i18n: { t: r } } = ae.useI18n(), a = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), o = N(""), i = N("");
|
|
2633
2633
|
return ve(() => n.format, (s) => {
|
|
2634
2634
|
s === "json" ? o.value = JSON.stringify(n.record, null, 2) : s === "yaml" && (i.value = es.dump(n.record));
|
|
2635
2635
|
}, { immediate: !0 }), (s, l) => {
|
|
2636
|
-
const c =
|
|
2637
|
-
return m(), T(
|
|
2636
|
+
const c = V("KCodeBlock");
|
|
2637
|
+
return m(), T(pe, null, [
|
|
2638
2638
|
e.format === "structured" ? (m(), T("div", ts, [
|
|
2639
|
-
(m(!0), T(
|
|
2639
|
+
(m(!0), T(pe, null, ce(e.propListTypes, (d) => (m(), T("div", {
|
|
2640
2640
|
key: `config-card-details-${d}-props`,
|
|
2641
2641
|
class: Ae(`config-card-details-${d}-props`),
|
|
2642
2642
|
"data-testid": `config-card-details-${d}-props`
|
|
2643
2643
|
}, [
|
|
2644
|
-
d !== "basic" ? (m(), T("div", rs,
|
|
2645
|
-
(m(!0), T(
|
|
2644
|
+
d !== "basic" ? (m(), T("div", rs, $(d === "advanced" ? g(r)("baseConfigCard.sections.advanced") : g(r)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
2645
|
+
(m(!0), T(pe, null, ce(e.propertyCollections[d], (u) => (m(), U(bt, {
|
|
2646
2646
|
key: u.key,
|
|
2647
2647
|
item: u
|
|
2648
2648
|
}, be({
|
|
@@ -2668,7 +2668,7 @@ const ts = {
|
|
|
2668
2668
|
], 10, ns))), 128))
|
|
2669
2669
|
])) : G("", !0),
|
|
2670
2670
|
e.format === "json" ? (m(), T("div", as, [
|
|
2671
|
-
|
|
2671
|
+
E(c, {
|
|
2672
2672
|
id: "config-card-codeblock",
|
|
2673
2673
|
code: o.value,
|
|
2674
2674
|
language: "json",
|
|
@@ -2676,7 +2676,7 @@ const ts = {
|
|
|
2676
2676
|
}, null, 8, ["code"])
|
|
2677
2677
|
])) : G("", !0),
|
|
2678
2678
|
e.format === "yaml" ? (m(), T("div", os, [
|
|
2679
|
-
|
|
2679
|
+
E(c, {
|
|
2680
2680
|
id: "config-card-codeblock",
|
|
2681
2681
|
code: i.value,
|
|
2682
2682
|
language: "yaml",
|
|
@@ -2697,7 +2697,7 @@ const ts = {
|
|
|
2697
2697
|
}, ps = /* @__PURE__ */ us(() => /* @__PURE__ */ K("path", {
|
|
2698
2698
|
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",
|
|
2699
2699
|
fill: "currentColor"
|
|
2700
|
-
}, null, -1)), fs = /* @__PURE__ */
|
|
2700
|
+
}, null, -1)), fs = /* @__PURE__ */ ee({
|
|
2701
2701
|
__name: "BookIcon",
|
|
2702
2702
|
props: {
|
|
2703
2703
|
/** The accessibility text provided to screen readers */
|
|
@@ -2749,7 +2749,7 @@ const ts = {
|
|
|
2749
2749
|
}
|
|
2750
2750
|
},
|
|
2751
2751
|
setup(e) {
|
|
2752
|
-
const n = e, t =
|
|
2752
|
+
const n = e, t = M(() => {
|
|
2753
2753
|
if (typeof n.size == "number" && n.size > 0)
|
|
2754
2754
|
return `${n.size}px`;
|
|
2755
2755
|
if (typeof n.size == "string") {
|
|
@@ -2758,7 +2758,7 @@ const ts = {
|
|
|
2758
2758
|
return `${o}px`;
|
|
2759
2759
|
}
|
|
2760
2760
|
return on;
|
|
2761
|
-
}), r =
|
|
2761
|
+
}), r = M(() => ({
|
|
2762
2762
|
boxSizing: "border-box",
|
|
2763
2763
|
color: n.color,
|
|
2764
2764
|
display: n.display,
|
|
@@ -2766,7 +2766,7 @@ const ts = {
|
|
|
2766
2766
|
lineHeight: "0",
|
|
2767
2767
|
width: t.value
|
|
2768
2768
|
}));
|
|
2769
|
-
return (a, o) => (m(),
|
|
2769
|
+
return (a, o) => (m(), U(Ne(e.as), {
|
|
2770
2770
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2771
2771
|
class: "kui-icon book-icon",
|
|
2772
2772
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
@@ -2783,7 +2783,7 @@ const ts = {
|
|
|
2783
2783
|
width: "100%",
|
|
2784
2784
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2785
2785
|
}, [
|
|
2786
|
-
e.title ? (m(), T("title", ds,
|
|
2786
|
+
e.title ? (m(), T("title", ds, $(e.title), 1)) : G("", !0),
|
|
2787
2787
|
ps
|
|
2788
2788
|
], 8, cs))
|
|
2789
2789
|
]),
|
|
@@ -2799,7 +2799,7 @@ const ts = {
|
|
|
2799
2799
|
}, Cs = ["data-testid"], ks = {
|
|
2800
2800
|
key: 0,
|
|
2801
2801
|
class: "config-card-prop-section-title"
|
|
2802
|
-
}, ws = /* @__PURE__ */
|
|
2802
|
+
}, ws = /* @__PURE__ */ ee({
|
|
2803
2803
|
__name: "EntityBaseConfigCard",
|
|
2804
2804
|
props: {
|
|
2805
2805
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2890,155 +2890,155 @@ const ts = {
|
|
|
2890
2890
|
label: "YAML",
|
|
2891
2891
|
value: "yaml"
|
|
2892
2892
|
}
|
|
2893
|
-
], d =
|
|
2894
|
-
d.value =
|
|
2893
|
+
], d = N("structured"), u = (v) => {
|
|
2894
|
+
d.value = v == null ? void 0 : v.value;
|
|
2895
2895
|
}, h = {
|
|
2896
2896
|
id: {
|
|
2897
|
-
type:
|
|
2897
|
+
type: Q.ID,
|
|
2898
2898
|
label: o("baseConfigCard.commonFields.id_label"),
|
|
2899
2899
|
order: 0,
|
|
2900
|
-
section:
|
|
2900
|
+
section: ue.Basic
|
|
2901
2901
|
},
|
|
2902
2902
|
name: {
|
|
2903
2903
|
order: 1,
|
|
2904
|
-
section:
|
|
2904
|
+
section: ue.Basic
|
|
2905
2905
|
},
|
|
2906
2906
|
enabled: {
|
|
2907
|
-
type:
|
|
2907
|
+
type: Q.BadgeStatus,
|
|
2908
2908
|
order: 2,
|
|
2909
|
-
section:
|
|
2909
|
+
section: ue.Basic
|
|
2910
2910
|
},
|
|
2911
2911
|
updated_at: {
|
|
2912
|
-
type:
|
|
2912
|
+
type: Q.Date,
|
|
2913
2913
|
label: o("baseConfigCard.commonFields.updated_at_label"),
|
|
2914
2914
|
order: 3,
|
|
2915
|
-
section:
|
|
2915
|
+
section: ue.Basic
|
|
2916
2916
|
},
|
|
2917
2917
|
created_at: {
|
|
2918
|
-
type:
|
|
2918
|
+
type: Q.Date,
|
|
2919
2919
|
label: o("baseConfigCard.commonFields.created_at_label"),
|
|
2920
2920
|
order: 4,
|
|
2921
|
-
section:
|
|
2921
|
+
section: ue.Basic
|
|
2922
2922
|
},
|
|
2923
2923
|
tags: {
|
|
2924
|
-
type:
|
|
2924
|
+
type: Q.BadgeTag,
|
|
2925
2925
|
order: -1,
|
|
2926
2926
|
// the last property displayed
|
|
2927
|
-
section:
|
|
2927
|
+
section: ue.Basic
|
|
2928
2928
|
}
|
|
2929
|
-
}, f =
|
|
2930
|
-
var
|
|
2929
|
+
}, f = N(!1), I = N(!1), b = N(""), p = N(), A = M(() => {
|
|
2930
|
+
var v, C, B;
|
|
2931
2931
|
if (!p.value)
|
|
2932
2932
|
return [];
|
|
2933
|
-
const
|
|
2934
|
-
for (const
|
|
2935
|
-
const L = (
|
|
2936
|
-
let Z =
|
|
2937
|
-
(
|
|
2933
|
+
const q = [], _ = Object.keys(p.value).length;
|
|
2934
|
+
for (const F in p.value) {
|
|
2935
|
+
const L = (C = (v = r.configSchema) == null ? void 0 : v[F]) == null ? void 0 : C.order, D = (B = h[F]) == null ? void 0 : B.order;
|
|
2936
|
+
let Z = _;
|
|
2937
|
+
(D || D === 0) && (Z = D === -1 ? _ + 1 : D), L && (Z = L === -1 ? _ + 1 : L), q.push([F, Z]);
|
|
2938
2938
|
}
|
|
2939
|
-
return
|
|
2940
|
-
return
|
|
2941
|
-
}),
|
|
2942
|
-
var L,
|
|
2943
|
-
const Z =
|
|
2939
|
+
return q.sort(function(F, L) {
|
|
2940
|
+
return F[1] - L[1];
|
|
2941
|
+
}), q.map((F) => {
|
|
2942
|
+
var L, D;
|
|
2943
|
+
const Z = F[0], H = (L = p.value) == null ? void 0 : L[Z], X = ((D = r.configSchema) == null ? void 0 : D[Z]) || {}, le = h[Z];
|
|
2944
2944
|
return {
|
|
2945
2945
|
key: Z,
|
|
2946
|
-
value:
|
|
2947
|
-
hidden:
|
|
2948
|
-
type:
|
|
2949
|
-
label:
|
|
2950
|
-
tooltip:
|
|
2951
|
-
section:
|
|
2946
|
+
value: H,
|
|
2947
|
+
hidden: X.hidden || !1,
|
|
2948
|
+
type: X.type ?? ((le == null ? void 0 : le.type) || Q.Text),
|
|
2949
|
+
label: X.label ?? ((le == null ? void 0 : le.label) || s(Z)),
|
|
2950
|
+
tooltip: X.tooltip ?? ((le == null ? void 0 : le.tooltip) || void 0),
|
|
2951
|
+
section: X.section ?? ((le == null ? void 0 : le.section) || ue.Advanced)
|
|
2952
2952
|
};
|
|
2953
|
-
}).filter((
|
|
2954
|
-
}),
|
|
2955
|
-
var
|
|
2953
|
+
}).filter((F) => !F.hidden && F.key !== r.pluginConfigKey);
|
|
2954
|
+
}), w = M(() => {
|
|
2955
|
+
var v, C;
|
|
2956
2956
|
if (!p.value || !r.pluginConfigKey)
|
|
2957
2957
|
return [];
|
|
2958
|
-
const
|
|
2959
|
-
for (const
|
|
2960
|
-
const L = (
|
|
2961
|
-
let Z =
|
|
2962
|
-
L && (Z = L === -1 ?
|
|
2958
|
+
const B = p.value[r.pluginConfigKey] || {}, q = Object.keys(B).length, _ = [];
|
|
2959
|
+
for (const F in B) {
|
|
2960
|
+
const L = (C = (v = r.pluginConfigSchema) == null ? void 0 : v[F]) == null ? void 0 : C.order, D = B[F];
|
|
2961
|
+
let Z = D != null && D !== "" ? q - 1 : q;
|
|
2962
|
+
L && (Z = L === -1 ? q + 1 : L), _.push([F, Z]);
|
|
2963
2963
|
}
|
|
2964
|
-
return
|
|
2965
|
-
return
|
|
2966
|
-
}),
|
|
2964
|
+
return _.sort(function(F, L) {
|
|
2965
|
+
return F[1] - L[1];
|
|
2966
|
+
}), _.map((F) => {
|
|
2967
2967
|
var L;
|
|
2968
|
-
const
|
|
2968
|
+
const D = F[0], Z = B[D], H = ((L = r.pluginConfigSchema) == null ? void 0 : L[D]) || {};
|
|
2969
2969
|
return {
|
|
2970
|
-
key:
|
|
2970
|
+
key: D,
|
|
2971
2971
|
value: Z,
|
|
2972
|
-
hidden:
|
|
2973
|
-
type:
|
|
2974
|
-
label:
|
|
2975
|
-
tooltip:
|
|
2976
|
-
section:
|
|
2972
|
+
hidden: H.hidden || !1,
|
|
2973
|
+
type: H.type ?? Q.Text,
|
|
2974
|
+
label: H.label ?? s(D),
|
|
2975
|
+
tooltip: H.tooltip ?? void 0,
|
|
2976
|
+
section: ue.Plugin
|
|
2977
2977
|
};
|
|
2978
|
-
}).filter((
|
|
2979
|
-
}),
|
|
2980
|
-
var
|
|
2978
|
+
}).filter((F) => !F.hidden);
|
|
2979
|
+
}), k = M(() => {
|
|
2980
|
+
var v, C, B, q;
|
|
2981
2981
|
return {
|
|
2982
|
-
basic: (
|
|
2983
|
-
advanced: (
|
|
2984
|
-
plugin: (
|
|
2982
|
+
basic: (v = A.value) == null ? void 0 : v.filter((_) => _.section === ue.Basic),
|
|
2983
|
+
advanced: (C = A.value) == null ? void 0 : C.filter((_) => _.section === ue.Advanced),
|
|
2984
|
+
plugin: (q = w.value) == null ? void 0 : q.concat((B = A.value) == null ? void 0 : B.filter((_) => _.section === ue.Plugin))
|
|
2985
2985
|
};
|
|
2986
|
-
}),
|
|
2987
|
-
const
|
|
2988
|
-
return
|
|
2989
|
-
}),
|
|
2990
|
-
var
|
|
2991
|
-
let
|
|
2992
|
-
return r.config.app === "konnect" ?
|
|
2993
|
-
}), R = (
|
|
2994
|
-
p.value &&
|
|
2986
|
+
}), S = M(() => {
|
|
2987
|
+
const v = [];
|
|
2988
|
+
return k.value.basic.length && v.push("basic"), k.value.advanced.length && v.push("advanced"), k.value.plugin.length && v.push("plugin"), v;
|
|
2989
|
+
}), x = (v) => !!(v.tooltip || a[`${v.key}-label-tooltip`]), P = M(() => {
|
|
2990
|
+
var v, C;
|
|
2991
|
+
let B = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2992
|
+
return r.config.app === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((v = r.config) == null ? void 0 : v.controlPlaneId) || "") : r.config.app === "kongManager" && (B = B.replace(/\/{workspace}/gi, (C = r.config) != null && C.workspace ? `/${r.config.workspace}` : "")), B = B.replace(/{id}/gi, r.config.entityId), B;
|
|
2993
|
+
}), R = (v) => {
|
|
2994
|
+
p.value && v(JSON.stringify(p.value)) ? n("copy:success", p.value) : n("copy:error");
|
|
2995
2995
|
};
|
|
2996
|
-
return ve(f, (
|
|
2997
|
-
n("loading",
|
|
2998
|
-
}, { immediate: !0 }),
|
|
2999
|
-
|
|
2996
|
+
return ve(f, (v) => {
|
|
2997
|
+
n("loading", v);
|
|
2998
|
+
}, { immediate: !0 }), Xe(async () => {
|
|
2999
|
+
I.value = !1, f.value = !0;
|
|
3000
3000
|
try {
|
|
3001
|
-
const { data:
|
|
3001
|
+
const { data: v } = await l.get(P.value);
|
|
3002
3002
|
if (r.dataKey)
|
|
3003
|
-
if (typeof
|
|
3004
|
-
p.value = { ...
|
|
3003
|
+
if (typeof v[r.dataKey] < "u")
|
|
3004
|
+
p.value = { ...v[r.dataKey] };
|
|
3005
3005
|
else
|
|
3006
3006
|
throw new Error(o("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3007
3007
|
else
|
|
3008
|
-
p.value = { ...
|
|
3009
|
-
Object.keys(r.configSchema).filter((
|
|
3010
|
-
p.value && typeof p.value[
|
|
3011
|
-
}), n("fetch:success",
|
|
3012
|
-
} catch (
|
|
3013
|
-
const
|
|
3014
|
-
|
|
3008
|
+
p.value = { ...v };
|
|
3009
|
+
Object.keys(r.configSchema).filter((C) => r.configSchema[C].forceShow).forEach((C) => {
|
|
3010
|
+
p.value && typeof p.value[C] > "u" && (p.value[C] = null);
|
|
3011
|
+
}), n("fetch:success", v);
|
|
3012
|
+
} catch (v) {
|
|
3013
|
+
const C = i(v);
|
|
3014
|
+
b.value = C.startsWith("code") ? o("baseConfigCard.errors.load") : C, I.value = !0, n("fetch:error", v);
|
|
3015
3015
|
} finally {
|
|
3016
3016
|
f.value = !1;
|
|
3017
3017
|
}
|
|
3018
|
-
}), (
|
|
3019
|
-
const
|
|
3020
|
-
return m(),
|
|
3018
|
+
}), (v, C) => {
|
|
3019
|
+
const B = V("KLabel"), q = V("KSelect"), _ = V("KButton"), F = V("KClipboardProvider"), L = V("KSkeleton"), D = V("KEmptyState"), Z = V("KCard");
|
|
3020
|
+
return m(), U(Z, { class: "kong-ui-entity-base-config-card" }, be({
|
|
3021
3021
|
actions: y(() => [
|
|
3022
3022
|
K("div", ys, [
|
|
3023
|
-
Y(
|
|
3024
|
-
e.config.jsonYamlEnabled ? (m(),
|
|
3023
|
+
Y(v.$slots, "actions", {}, void 0, !0),
|
|
3024
|
+
e.config.jsonYamlEnabled ? (m(), U(B, {
|
|
3025
3025
|
key: 0,
|
|
3026
3026
|
class: "config-format-select-label",
|
|
3027
3027
|
"data-testid": "config-format-select-label"
|
|
3028
3028
|
}, {
|
|
3029
3029
|
default: y(() => [
|
|
3030
|
-
W(
|
|
3030
|
+
W($(e.label), 1)
|
|
3031
3031
|
]),
|
|
3032
3032
|
_: 1
|
|
3033
3033
|
})) : G("", !0),
|
|
3034
|
-
e.config.jsonYamlEnabled ? (m(),
|
|
3034
|
+
e.config.jsonYamlEnabled ? (m(), U(q, {
|
|
3035
3035
|
key: 1,
|
|
3036
3036
|
appearance: "select",
|
|
3037
3037
|
"data-testid": "select-config-format",
|
|
3038
3038
|
items: c,
|
|
3039
3039
|
onChange: u
|
|
3040
3040
|
})) : G("", !0),
|
|
3041
|
-
r.config.jsonYamlEnabled && e.configCardDoc ? (m(),
|
|
3041
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (m(), U(_, {
|
|
3042
3042
|
key: 2,
|
|
3043
3043
|
appearance: "tertiary",
|
|
3044
3044
|
class: "book-icon",
|
|
@@ -3050,21 +3050,21 @@ const ts = {
|
|
|
3050
3050
|
rel: "noopener",
|
|
3051
3051
|
target: "_blank"
|
|
3052
3052
|
}, [
|
|
3053
|
-
|
|
3053
|
+
E(g(ms), { size: g(ka) }, null, 8, ["size"])
|
|
3054
3054
|
], 8, hs)
|
|
3055
3055
|
]),
|
|
3056
3056
|
_: 1
|
|
3057
3057
|
})) : G("", !0),
|
|
3058
|
-
e.config.jsonYamlEnabled ? G("", !0) : (m(),
|
|
3059
|
-
default: y(({ copyToClipboard:
|
|
3060
|
-
!f.value && !
|
|
3058
|
+
e.config.jsonYamlEnabled ? G("", !0) : (m(), U(F, { key: 3 }, {
|
|
3059
|
+
default: y(({ copyToClipboard: H }) => [
|
|
3060
|
+
!f.value && !I.value ? (m(), U(_, {
|
|
3061
3061
|
key: 0,
|
|
3062
3062
|
appearance: "tertiary",
|
|
3063
3063
|
"data-testid": "json-copy-button",
|
|
3064
|
-
onClick: (
|
|
3064
|
+
onClick: (X) => R(H)
|
|
3065
3065
|
}, {
|
|
3066
3066
|
default: y(() => [
|
|
3067
|
-
W(
|
|
3067
|
+
W($(g(o)("baseConfigCard.actions.copy")), 1)
|
|
3068
3068
|
]),
|
|
3069
3069
|
_: 2
|
|
3070
3070
|
}, 1032, ["onClick"])) : G("", !0)
|
|
@@ -3074,64 +3074,64 @@ const ts = {
|
|
|
3074
3074
|
])
|
|
3075
3075
|
]),
|
|
3076
3076
|
body: y(() => [
|
|
3077
|
-
f.value ? (m(),
|
|
3077
|
+
f.value ? (m(), U(L, {
|
|
3078
3078
|
key: 0,
|
|
3079
3079
|
"data-testid": "config-card-loader",
|
|
3080
3080
|
"table-columns": 2,
|
|
3081
3081
|
type: "table"
|
|
3082
|
-
})) :
|
|
3082
|
+
})) : I.value ? (m(), U(D, {
|
|
3083
3083
|
key: 1,
|
|
3084
3084
|
"data-testid": "config-card-fetch-error",
|
|
3085
3085
|
"is-error": ""
|
|
3086
3086
|
}, {
|
|
3087
3087
|
message: y(() => [
|
|
3088
|
-
K("h3", null,
|
|
3088
|
+
K("h3", null, $(b.value), 1)
|
|
3089
3089
|
]),
|
|
3090
3090
|
_: 1
|
|
3091
3091
|
})) : G("", !0),
|
|
3092
3092
|
e.config.jsonYamlEnabled ? (m(), T("div", vs, [
|
|
3093
|
-
|
|
3093
|
+
E(ss, {
|
|
3094
3094
|
format: d.value,
|
|
3095
|
-
"prop-list-types":
|
|
3096
|
-
"property-collections":
|
|
3095
|
+
"prop-list-types": S.value,
|
|
3096
|
+
"property-collections": k.value,
|
|
3097
3097
|
record: p.value
|
|
3098
3098
|
}, be({ _: 2 }, [
|
|
3099
|
-
|
|
3100
|
-
name:
|
|
3101
|
-
fn: y(({ row:
|
|
3102
|
-
Y(
|
|
3103
|
-
row:
|
|
3099
|
+
ce(Object.keys(v.$slots), (H) => ({
|
|
3100
|
+
name: H,
|
|
3101
|
+
fn: y(({ row: X, rowValue: le }) => [
|
|
3102
|
+
Y(v.$slots, H, {
|
|
3103
|
+
row: X,
|
|
3104
3104
|
rowValue: le
|
|
3105
3105
|
}, void 0, !0)
|
|
3106
3106
|
])
|
|
3107
3107
|
}))
|
|
3108
3108
|
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
3109
3109
|
])) : (m(), T("div", bs, [
|
|
3110
|
-
(m(!0), T(
|
|
3111
|
-
key: `config-card-details-${
|
|
3112
|
-
class: Ae(`config-card-details-${
|
|
3113
|
-
"data-testid": `config-card-details-${
|
|
3110
|
+
(m(!0), T(pe, null, ce(S.value, (H) => (m(), T("div", {
|
|
3111
|
+
key: `config-card-details-${H}-props`,
|
|
3112
|
+
class: Ae(`config-card-details-${H}-props`),
|
|
3113
|
+
"data-testid": `config-card-details-${H}-props`
|
|
3114
3114
|
}, [
|
|
3115
|
-
|
|
3116
|
-
(m(!0), T(
|
|
3117
|
-
key:
|
|
3118
|
-
item:
|
|
3115
|
+
H !== "basic" ? (m(), T("div", ks, $(H === "advanced" ? g(o)("baseConfigCard.sections.advanced") : g(o)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
3116
|
+
(m(!0), T(pe, null, ce(k.value[H], (X) => (m(), U(bt, {
|
|
3117
|
+
key: X.key,
|
|
3118
|
+
item: X
|
|
3119
3119
|
}, be({
|
|
3120
3120
|
label: y(() => [
|
|
3121
|
-
Y(
|
|
3121
|
+
Y(v.$slots, `${X.key}-label`, { row: X }, void 0, !0)
|
|
3122
3122
|
]),
|
|
3123
|
-
[
|
|
3124
|
-
Y(
|
|
3125
|
-
row:
|
|
3123
|
+
[X.key]: y(({ rowValue: le }) => [
|
|
3124
|
+
Y(v.$slots, X.key, {
|
|
3125
|
+
row: X,
|
|
3126
3126
|
rowValue: le
|
|
3127
3127
|
}, void 0, !0)
|
|
3128
3128
|
]),
|
|
3129
3129
|
_: 2
|
|
3130
3130
|
}, [
|
|
3131
|
-
|
|
3131
|
+
x(X) ? {
|
|
3132
3132
|
name: "label-tooltip",
|
|
3133
3133
|
fn: y(() => [
|
|
3134
|
-
Y(
|
|
3134
|
+
Y(v.$slots, `${X.key}-label-tooltip`, { row: X }, void 0, !0)
|
|
3135
3135
|
]),
|
|
3136
3136
|
key: "0"
|
|
3137
3137
|
} : void 0
|
|
@@ -3145,8 +3145,8 @@ const ts = {
|
|
|
3145
3145
|
name: "title",
|
|
3146
3146
|
fn: y(() => [
|
|
3147
3147
|
K("div", gs, [
|
|
3148
|
-
Y(
|
|
3149
|
-
W(
|
|
3148
|
+
Y(v.$slots, "title", {}, () => [
|
|
3149
|
+
W($(g(o)("baseConfigCard.title")), 1)
|
|
3150
3150
|
], !0)
|
|
3151
3151
|
])
|
|
3152
3152
|
]),
|
|
@@ -3158,7 +3158,7 @@ const ts = {
|
|
|
3158
3158
|
}), _s = /* @__PURE__ */ me(ws, [["__scopeId", "data-v-24515123"]]), Is = ["onReset", "onSubmit"], As = {
|
|
3159
3159
|
class: "form-actions",
|
|
3160
3160
|
"data-testid": "form-actions"
|
|
3161
|
-
}, Ss = /* @__PURE__ */
|
|
3161
|
+
}, Ss = /* @__PURE__ */ ee({
|
|
3162
3162
|
__name: "EntityBaseForm",
|
|
3163
3163
|
props: {
|
|
3164
3164
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3210,41 +3210,41 @@ const ts = {
|
|
|
3210
3210
|
var t;
|
|
3211
3211
|
const r = e, a = gt(), { i18n: { t: o } } = ae.useI18n(), { getMessageFromError: i } = ae.useErrors(), { axiosInstance: s } = ae.useAxios({
|
|
3212
3212
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3213
|
-
}), l =
|
|
3214
|
-
var p,
|
|
3213
|
+
}), l = N(!1), c = N(!1), d = N(""), u = M(() => r.canSubmit === !1 || r.isReadonly), h = M(() => {
|
|
3214
|
+
var p, A;
|
|
3215
3215
|
if (!r.editId)
|
|
3216
3216
|
return "";
|
|
3217
|
-
let
|
|
3218
|
-
return r.config.app === "konnect" ?
|
|
3217
|
+
let w = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3218
|
+
return r.config.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (w = w.replace(/\/{workspace}/gi, (A = r.config) != null && A.workspace ? `/${r.config.workspace}` : "")), w = w.replace(/{id}/gi, r.editId), w;
|
|
3219
3219
|
}), f = () => {
|
|
3220
|
-
r.config.cancelRoute ? a.push(r.config.cancelRoute) :
|
|
3221
|
-
},
|
|
3220
|
+
r.config.cancelRoute ? a.push(r.config.cancelRoute) : I();
|
|
3221
|
+
}, I = () => {
|
|
3222
3222
|
n("cancel");
|
|
3223
|
-
},
|
|
3223
|
+
}, b = () => {
|
|
3224
3224
|
u.value || n("submit");
|
|
3225
3225
|
};
|
|
3226
3226
|
return ve(() => l.value, (p) => {
|
|
3227
3227
|
n("loading", p);
|
|
3228
|
-
}, { immediate: !0 }),
|
|
3228
|
+
}, { immediate: !0 }), Xe(async () => {
|
|
3229
3229
|
if (r.editId)
|
|
3230
3230
|
try {
|
|
3231
3231
|
c.value = !1, l.value = !0;
|
|
3232
3232
|
const { data: p } = await s.get(h.value);
|
|
3233
3233
|
n("fetch:success", p);
|
|
3234
3234
|
} catch (p) {
|
|
3235
|
-
const
|
|
3236
|
-
d.value =
|
|
3235
|
+
const A = i(p);
|
|
3236
|
+
d.value = A.startsWith("code") ? o("baseForm.errors.edit") : A, c.value = !0, n("fetch:error", p);
|
|
3237
3237
|
} finally {
|
|
3238
3238
|
l.value = !1;
|
|
3239
3239
|
}
|
|
3240
|
-
}), (p,
|
|
3241
|
-
const
|
|
3242
|
-
return m(),
|
|
3240
|
+
}), (p, A) => {
|
|
3241
|
+
const w = V("KSkeleton"), k = V("KEmptyState"), S = V("KAlert"), x = V("KButton"), P = V("KCard");
|
|
3242
|
+
return m(), U(P, { class: "kong-ui-entity-base-form" }, {
|
|
3243
3243
|
body: y(() => [
|
|
3244
|
-
l.value ? (m(),
|
|
3244
|
+
l.value ? (m(), U(w, {
|
|
3245
3245
|
key: 0,
|
|
3246
3246
|
type: "form"
|
|
3247
|
-
})) : c.value ? (m(),
|
|
3247
|
+
})) : c.value ? (m(), U(k, {
|
|
3248
3248
|
key: 1,
|
|
3249
3249
|
"cta-text": g(o)("baseForm.actions.back"),
|
|
3250
3250
|
"data-testid": "form-fetch-error",
|
|
@@ -3252,17 +3252,17 @@ const ts = {
|
|
|
3252
3252
|
"is-error": !0
|
|
3253
3253
|
}, {
|
|
3254
3254
|
message: y(() => [
|
|
3255
|
-
K("h3", null,
|
|
3255
|
+
K("h3", null, $(d.value), 1)
|
|
3256
3256
|
]),
|
|
3257
3257
|
_: 1
|
|
3258
3258
|
}, 8, ["cta-text"])) : (m(), T("form", {
|
|
3259
3259
|
key: 2,
|
|
3260
3260
|
"data-testid": "form-content",
|
|
3261
|
-
onReset: Ge(
|
|
3262
|
-
onSubmit: Ge(
|
|
3261
|
+
onReset: Ge(I, ["prevent"]),
|
|
3262
|
+
onSubmit: Ge(b, ["prevent"])
|
|
3263
3263
|
}, [
|
|
3264
3264
|
Y(p.$slots, "default", {}, void 0, !0),
|
|
3265
|
-
e.errorMessage ? (m(),
|
|
3265
|
+
e.errorMessage ? (m(), U(S, {
|
|
3266
3266
|
key: 0,
|
|
3267
3267
|
"alert-message": e.errorMessage,
|
|
3268
3268
|
appearance: "danger",
|
|
@@ -3270,25 +3270,25 @@ const ts = {
|
|
|
3270
3270
|
}, null, 8, ["alert-message"])) : G("", !0),
|
|
3271
3271
|
K("div", As, [
|
|
3272
3272
|
Y(p.$slots, "form-actions", {}, () => [
|
|
3273
|
-
|
|
3273
|
+
E(x, {
|
|
3274
3274
|
appearance: "secondary",
|
|
3275
3275
|
"data-testid": "form-cancel",
|
|
3276
3276
|
disabled: e.isReadonly,
|
|
3277
3277
|
type: "reset"
|
|
3278
3278
|
}, {
|
|
3279
3279
|
default: y(() => [
|
|
3280
|
-
W(
|
|
3280
|
+
W($(g(o)("baseForm.actions.cancel")), 1)
|
|
3281
3281
|
]),
|
|
3282
3282
|
_: 1
|
|
3283
3283
|
}, 8, ["disabled"]),
|
|
3284
|
-
|
|
3284
|
+
E(x, {
|
|
3285
3285
|
appearance: "primary",
|
|
3286
3286
|
"data-testid": "form-submit",
|
|
3287
3287
|
disabled: u.value,
|
|
3288
3288
|
type: "submit"
|
|
3289
3289
|
}, {
|
|
3290
3290
|
default: y(() => [
|
|
3291
|
-
W(
|
|
3291
|
+
W($(g(o)("baseForm.actions.save")), 1)
|
|
3292
3292
|
]),
|
|
3293
3293
|
_: 1
|
|
3294
3294
|
}, 8, ["disabled"])
|
|
@@ -3303,7 +3303,7 @@ const ts = {
|
|
|
3303
3303
|
}), xs = /* @__PURE__ */ me(Ss, [["__scopeId", "data-v-81612aef"]]), Ts = {
|
|
3304
3304
|
key: 0,
|
|
3305
3305
|
"data-testid": "first-col"
|
|
3306
|
-
}, $s = /* @__PURE__ */
|
|
3306
|
+
}, $s = /* @__PURE__ */ ee({
|
|
3307
3307
|
__name: "EntityBaseTableCell",
|
|
3308
3308
|
props: {
|
|
3309
3309
|
keyName: {
|
|
@@ -3316,68 +3316,68 @@ const ts = {
|
|
|
3316
3316
|
}
|
|
3317
3317
|
},
|
|
3318
3318
|
setup(e) {
|
|
3319
|
-
const n = e, t =
|
|
3320
|
-
var
|
|
3321
|
-
return ((
|
|
3322
|
-
}), r =
|
|
3323
|
-
var
|
|
3324
|
-
return ((
|
|
3325
|
-
}), a =
|
|
3326
|
-
var
|
|
3327
|
-
const
|
|
3328
|
-
return
|
|
3319
|
+
const n = e, t = M(() => {
|
|
3320
|
+
var b;
|
|
3321
|
+
return ((b = n.rowEl) == null ? void 0 : b.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3322
|
+
}), r = M(() => {
|
|
3323
|
+
var b;
|
|
3324
|
+
return ((b = t.value) == null ? void 0 : b.querySelector('[data-testid="first-col"]')) || null;
|
|
3325
|
+
}), a = M(() => {
|
|
3326
|
+
var b, p;
|
|
3327
|
+
const A = (b = n.rowEl) == null ? void 0 : b.querySelectorAll("td");
|
|
3328
|
+
return A ? ((p = A[0]) == null ? void 0 : p.getAttribute("data-testid")) === n.keyName : !1;
|
|
3329
3329
|
});
|
|
3330
3330
|
let o;
|
|
3331
3331
|
const i = () => {
|
|
3332
3332
|
o && (o.disconnect(), o = void 0);
|
|
3333
3333
|
}, s = () => {
|
|
3334
|
-
var
|
|
3335
|
-
c.value = ((
|
|
3336
|
-
}, l =
|
|
3334
|
+
var b, p, A;
|
|
3335
|
+
c.value = ((b = r.value) == null ? void 0 : b.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((A = l.value) == null ? void 0 : A.innerText) || "";
|
|
3336
|
+
}, l = N({}), c = N(0), d = N(0), u = N(""), h = M(() => [r.value, t.value]), f = ve(
|
|
3337
3337
|
h,
|
|
3338
|
-
(
|
|
3338
|
+
(b) => {
|
|
3339
3339
|
if (a.value && (i(), "ResizeObserver" in window && window)) {
|
|
3340
3340
|
o = new ResizeObserver((p) => {
|
|
3341
3341
|
window.requestAnimationFrame(() => {
|
|
3342
3342
|
!Array.isArray(p) || !p.length || s();
|
|
3343
3343
|
});
|
|
3344
3344
|
});
|
|
3345
|
-
for (const p of
|
|
3345
|
+
for (const p of b)
|
|
3346
3346
|
p && o.observe(p);
|
|
3347
3347
|
}
|
|
3348
3348
|
},
|
|
3349
3349
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3350
|
-
),
|
|
3350
|
+
), I = M(() => a.value ? c.value > d.value : !1);
|
|
3351
3351
|
return yr(() => {
|
|
3352
3352
|
s();
|
|
3353
3353
|
}), hr(() => {
|
|
3354
3354
|
f();
|
|
3355
|
-
}), (
|
|
3356
|
-
const
|
|
3355
|
+
}), (b, p) => {
|
|
3356
|
+
const A = V("KTooltip");
|
|
3357
3357
|
return m(), T("span", {
|
|
3358
3358
|
ref_key: "contentRef",
|
|
3359
3359
|
ref: l,
|
|
3360
3360
|
class: "content-wrapper"
|
|
3361
3361
|
}, [
|
|
3362
3362
|
a.value ? (m(), T("span", Ts, [
|
|
3363
|
-
|
|
3364
|
-
label:
|
|
3363
|
+
E(A, {
|
|
3364
|
+
label: I.value ? u.value : "",
|
|
3365
3365
|
"max-width": "300",
|
|
3366
3366
|
placement: "bottomStart"
|
|
3367
3367
|
}, {
|
|
3368
3368
|
default: y(() => [
|
|
3369
|
-
Y(
|
|
3369
|
+
Y(b.$slots, "default", {}, void 0, !0)
|
|
3370
3370
|
]),
|
|
3371
3371
|
_: 3
|
|
3372
3372
|
}, 8, ["label"])
|
|
3373
|
-
])) : Y(
|
|
3373
|
+
])) : Y(b.$slots, "default", { key: 1 }, void 0, !0)
|
|
3374
3374
|
], 512);
|
|
3375
3375
|
};
|
|
3376
3376
|
}
|
|
3377
|
-
}),
|
|
3377
|
+
}), js = /* @__PURE__ */ me($s, [["__scopeId", "data-v-e42a20c9"]]), Ms = { class: "toolbar-container" }, Os = {
|
|
3378
3378
|
key: 0,
|
|
3379
3379
|
class: "toolbar-button-container"
|
|
3380
|
-
},
|
|
3380
|
+
}, Es = ["data-testid"], Ns = /* @__PURE__ */ ee({
|
|
3381
3381
|
__name: "EntityBaseTable",
|
|
3382
3382
|
props: {
|
|
3383
3383
|
// table header configuration
|
|
@@ -3437,8 +3437,8 @@ const ts = {
|
|
|
3437
3437
|
// error message to show in the error state
|
|
3438
3438
|
// this prop being set (or empty) determines if the KTable is in an error state
|
|
3439
3439
|
errorMessage: {
|
|
3440
|
-
type:
|
|
3441
|
-
default:
|
|
3440
|
+
type: String,
|
|
3441
|
+
default: ""
|
|
3442
3442
|
},
|
|
3443
3443
|
disablePaginationPageJump: {
|
|
3444
3444
|
type: Boolean,
|
|
@@ -3486,76 +3486,65 @@ const ts = {
|
|
|
3486
3486
|
},
|
|
3487
3487
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3488
3488
|
setup(e, { emit: n }) {
|
|
3489
|
-
const t = e, { i18n: { t: r } } = ae.useI18n(), a =
|
|
3490
|
-
|
|
3491
|
-
return
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
title: (v = t.errorMessage) == null ? void 0 : v.title,
|
|
3498
|
-
message: (w = t.errorMessage) == null ? void 0 : w.message
|
|
3499
|
-
};
|
|
3500
|
-
}), o = $(() => t.cacheIdentifier || t.preferencesStorageKey), i = (v) => v.hasData || !!t.query, s = $(() => {
|
|
3501
|
-
const v = [];
|
|
3502
|
-
return Object.keys(t.tableHeaders).forEach((w) => {
|
|
3503
|
-
const N = t.tableHeaders[w];
|
|
3504
|
-
v.push({
|
|
3505
|
-
label: N.label ?? w,
|
|
3506
|
-
key: w,
|
|
3507
|
-
sortable: N.sortable ?? !1
|
|
3489
|
+
const t = e, { i18n: { t: r } } = ae.useI18n(), a = M(() => t.cacheIdentifier || t.preferencesStorageKey), o = (k) => k.hasData || !!t.query, i = M(() => {
|
|
3490
|
+
const k = [];
|
|
3491
|
+
return Object.keys(t.tableHeaders).forEach((S) => {
|
|
3492
|
+
const x = t.tableHeaders[S];
|
|
3493
|
+
k.push({
|
|
3494
|
+
label: x.label ?? S,
|
|
3495
|
+
key: S,
|
|
3496
|
+
sortable: x.sortable ?? !1
|
|
3508
3497
|
});
|
|
3509
|
-
}), t.enableEntityActions &&
|
|
3498
|
+
}), t.enableEntityActions && k.push({
|
|
3510
3499
|
key: "actions",
|
|
3511
3500
|
hideLabel: !0
|
|
3512
|
-
}),
|
|
3513
|
-
}),
|
|
3514
|
-
"data-rowid":
|
|
3515
|
-
"data-testid":
|
|
3516
|
-
...t.rowAttributes(
|
|
3517
|
-
}),
|
|
3518
|
-
var
|
|
3519
|
-
return (
|
|
3520
|
-
},
|
|
3521
|
-
const
|
|
3522
|
-
"data-testid":
|
|
3523
|
-
...t.cellAttributes(
|
|
3501
|
+
}), k;
|
|
3502
|
+
}), s = (k) => ({
|
|
3503
|
+
"data-rowid": k.id,
|
|
3504
|
+
"data-testid": k.name,
|
|
3505
|
+
...t.rowAttributes(k)
|
|
3506
|
+
}), l = N({}), c = (k) => {
|
|
3507
|
+
var S;
|
|
3508
|
+
return (S = l.value) == null ? void 0 : S.$el.querySelector(`[data-rowid="${k.id}"]`);
|
|
3509
|
+
}, d = (k) => {
|
|
3510
|
+
const S = {
|
|
3511
|
+
"data-testid": k.headerKey,
|
|
3512
|
+
...t.cellAttributes(k)
|
|
3524
3513
|
};
|
|
3525
|
-
return
|
|
3514
|
+
return k.colIndex === 0 && (S.style = {
|
|
3526
3515
|
maxWidth: "250px",
|
|
3527
3516
|
overflowX: "hidden",
|
|
3528
3517
|
textOverflow: "ellipsis"
|
|
3529
|
-
}),
|
|
3518
|
+
}), S;
|
|
3519
|
+
}, u = () => {
|
|
3520
|
+
n("empty-state-cta-clicked"), h();
|
|
3530
3521
|
}, h = () => {
|
|
3531
|
-
n("empty-state-cta-clicked"), f();
|
|
3532
|
-
}, f = () => {
|
|
3533
3522
|
n("clear-search-input");
|
|
3534
|
-
},
|
|
3535
|
-
n("click:row",
|
|
3536
|
-
}),
|
|
3537
|
-
n("sort",
|
|
3538
|
-
}, { setTablePreferences:
|
|
3539
|
-
const
|
|
3523
|
+
}, f = M(() => t.disableRowClick ? void 0 : (k, S) => {
|
|
3524
|
+
n("click:row", S);
|
|
3525
|
+
}), I = (k) => {
|
|
3526
|
+
n("sort", k);
|
|
3527
|
+
}, { setTablePreferences: b, getTablePreferences: p } = Sr(), A = M(() => {
|
|
3528
|
+
const k = p(t.preferencesStorageKey);
|
|
3540
3529
|
return {
|
|
3541
3530
|
...t.initialFetcherParams,
|
|
3542
|
-
...
|
|
3531
|
+
...k
|
|
3543
3532
|
};
|
|
3544
|
-
}),
|
|
3545
|
-
t.preferencesStorageKey &&
|
|
3533
|
+
}), w = (k) => {
|
|
3534
|
+
t.preferencesStorageKey && b(t.preferencesStorageKey, k);
|
|
3546
3535
|
};
|
|
3547
|
-
return (
|
|
3548
|
-
const
|
|
3549
|
-
return m(),
|
|
3536
|
+
return (k, S) => {
|
|
3537
|
+
const x = V("KIcon"), P = V("KButton"), R = V("KDropdown"), v = V("KTable"), C = V("KCard");
|
|
3538
|
+
return m(), U(C, {
|
|
3550
3539
|
class: "kong-ui-entity-base-table",
|
|
3551
3540
|
title: e.title
|
|
3552
3541
|
}, {
|
|
3553
3542
|
body: y(() => [
|
|
3554
|
-
|
|
3543
|
+
E(v, {
|
|
3555
3544
|
ref_key: "tableRefs",
|
|
3556
|
-
ref:
|
|
3557
|
-
"cache-identifier":
|
|
3558
|
-
"cell-attrs":
|
|
3545
|
+
ref: l,
|
|
3546
|
+
"cache-identifier": a.value,
|
|
3547
|
+
"cell-attrs": d,
|
|
3559
3548
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3560
3549
|
"disable-sorting": e.disableSorting,
|
|
3561
3550
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
@@ -3566,57 +3555,56 @@ const ts = {
|
|
|
3566
3555
|
"empty-state-message": e.query ? g(r)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3567
3556
|
"empty-state-title": e.query ? g(r)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3568
3557
|
"enable-client-sort": e.enableClientSort,
|
|
3569
|
-
"error-state-
|
|
3570
|
-
"error-state-title": a.value.title,
|
|
3558
|
+
"error-state-title": e.errorMessage,
|
|
3571
3559
|
fetcher: e.fetcher,
|
|
3572
3560
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3573
|
-
"has-error":
|
|
3574
|
-
headers:
|
|
3561
|
+
"has-error": !!e.errorMessage,
|
|
3562
|
+
headers: i.value,
|
|
3575
3563
|
"hide-pagination-when-optional": "",
|
|
3576
|
-
"initial-fetcher-params":
|
|
3564
|
+
"initial-fetcher-params": A.value,
|
|
3577
3565
|
"is-loading": e.isLoading,
|
|
3578
3566
|
"pagination-type": e.paginationType,
|
|
3579
|
-
"row-attrs":
|
|
3567
|
+
"row-attrs": s,
|
|
3580
3568
|
"search-input": e.query,
|
|
3581
|
-
onKtableEmptyStateCtaClicked:
|
|
3582
|
-
"onRow:click":
|
|
3583
|
-
onSort:
|
|
3584
|
-
"onUpdate:tablePreferences":
|
|
3569
|
+
onKtableEmptyStateCtaClicked: u,
|
|
3570
|
+
"onRow:click": f.value,
|
|
3571
|
+
onSort: S[0] || (S[0] = (B) => I(B)),
|
|
3572
|
+
"onUpdate:tablePreferences": w
|
|
3585
3573
|
}, be({
|
|
3586
3574
|
toolbar: y(({ state: B }) => [
|
|
3587
|
-
Ue(K("div",
|
|
3588
|
-
Y(
|
|
3589
|
-
|
|
3590
|
-
Y(
|
|
3575
|
+
Ue(K("div", Ms, [
|
|
3576
|
+
Y(k.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3577
|
+
k.$slots["toolbar-button"] ? (m(), T("div", Os, [
|
|
3578
|
+
Y(k.$slots, "toolbar-button", {}, void 0, !0)
|
|
3591
3579
|
])) : G("", !0)
|
|
3592
3580
|
], 512), [
|
|
3593
|
-
[De,
|
|
3581
|
+
[De, o(B)]
|
|
3594
3582
|
])
|
|
3595
3583
|
]),
|
|
3596
|
-
actions: y(({ row: B, rowKey:
|
|
3584
|
+
actions: y(({ row: B, rowKey: q, rowValue: _ }) => [
|
|
3597
3585
|
K("div", {
|
|
3598
3586
|
class: "actions-container",
|
|
3599
3587
|
"data-testid": B.name
|
|
3600
3588
|
}, [
|
|
3601
|
-
|
|
3589
|
+
E(R, {
|
|
3602
3590
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3603
3591
|
width: e.dropdownMenuWidth
|
|
3604
3592
|
}, {
|
|
3605
3593
|
items: y(() => [
|
|
3606
|
-
Y(
|
|
3594
|
+
Y(k.$slots, "actions", {
|
|
3607
3595
|
row: B,
|
|
3608
|
-
rowKey:
|
|
3609
|
-
rowValue:
|
|
3596
|
+
rowKey: q,
|
|
3597
|
+
rowValue: _
|
|
3610
3598
|
}, void 0, !0)
|
|
3611
3599
|
]),
|
|
3612
3600
|
default: y(() => [
|
|
3613
|
-
|
|
3601
|
+
E(P, {
|
|
3614
3602
|
class: "actions-trigger",
|
|
3615
3603
|
"data-testid": "overflow-actions-button",
|
|
3616
3604
|
size: "small"
|
|
3617
3605
|
}, {
|
|
3618
3606
|
icon: y(() => [
|
|
3619
|
-
|
|
3607
|
+
E(x, {
|
|
3620
3608
|
color: g(ba),
|
|
3621
3609
|
icon: "more",
|
|
3622
3610
|
size: "16"
|
|
@@ -3627,43 +3615,43 @@ const ts = {
|
|
|
3627
3615
|
]),
|
|
3628
3616
|
_: 2
|
|
3629
3617
|
}, 1032, ["width"])
|
|
3630
|
-
], 8,
|
|
3618
|
+
], 8, Es)
|
|
3631
3619
|
]),
|
|
3632
3620
|
_: 2
|
|
3633
3621
|
}, [
|
|
3634
|
-
|
|
3635
|
-
name:
|
|
3636
|
-
fn: y(({ row:
|
|
3637
|
-
|
|
3638
|
-
"key-name": String(
|
|
3639
|
-
"row-el":
|
|
3622
|
+
ce(e.tableHeaders, (B, q) => ({
|
|
3623
|
+
name: q,
|
|
3624
|
+
fn: y(({ row: _, rowKey: F, rowValue: L }) => [
|
|
3625
|
+
E(js, {
|
|
3626
|
+
"key-name": String(q),
|
|
3627
|
+
"row-el": c(_)
|
|
3640
3628
|
}, {
|
|
3641
3629
|
default: y(() => [
|
|
3642
|
-
Y(
|
|
3643
|
-
row:
|
|
3644
|
-
rowKey:
|
|
3645
|
-
rowValue:
|
|
3630
|
+
Y(k.$slots, q, {
|
|
3631
|
+
row: _,
|
|
3632
|
+
rowKey: F,
|
|
3633
|
+
rowValue: L
|
|
3646
3634
|
}, () => [
|
|
3647
|
-
W(
|
|
3635
|
+
W($(L), 1)
|
|
3648
3636
|
], !0)
|
|
3649
3637
|
]),
|
|
3650
3638
|
_: 2
|
|
3651
3639
|
}, 1032, ["key-name", "row-el"])
|
|
3652
3640
|
])
|
|
3653
3641
|
}))
|
|
3654
|
-
]), 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-
|
|
3642
|
+
]), 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"])
|
|
3655
3643
|
]),
|
|
3656
3644
|
_: 3
|
|
3657
3645
|
}, 8, ["title"]);
|
|
3658
3646
|
};
|
|
3659
3647
|
}
|
|
3660
|
-
}),
|
|
3648
|
+
}), Fs = /* @__PURE__ */ me(Ns, [["__scopeId", "data-v-86d2d2a3"]]), Ks = {
|
|
3661
3649
|
key: 0,
|
|
3662
3650
|
class: "kong-ui-entity-delete-error"
|
|
3663
3651
|
}, Bs = {
|
|
3664
3652
|
key: 1,
|
|
3665
3653
|
class: "description"
|
|
3666
|
-
}, qs = /* @__PURE__ */
|
|
3654
|
+
}, qs = /* @__PURE__ */ ee({
|
|
3667
3655
|
__name: "EntityDeleteModal",
|
|
3668
3656
|
props: {
|
|
3669
3657
|
visible: {
|
|
@@ -3702,14 +3690,14 @@ const ts = {
|
|
|
3702
3690
|
},
|
|
3703
3691
|
emits: ["cancel", "proceed"],
|
|
3704
3692
|
setup(e, { emit: n }) {
|
|
3705
|
-
const t = e, { i18nT: r } = ae.useI18n(), a =
|
|
3693
|
+
const t = e, { i18nT: r } = ae.useI18n(), a = M(() => t.needConfirm ? t.entityName : ""), o = () => {
|
|
3706
3694
|
n("cancel");
|
|
3707
3695
|
}, i = () => {
|
|
3708
3696
|
n("proceed");
|
|
3709
3697
|
};
|
|
3710
3698
|
return (s, l) => {
|
|
3711
|
-
const c =
|
|
3712
|
-
return m(),
|
|
3699
|
+
const c = V("KAlert"), d = V("KPrompt");
|
|
3700
|
+
return m(), U(d, {
|
|
3713
3701
|
"action-button-text": "Yes, delete",
|
|
3714
3702
|
"action-pending": e.actionPending,
|
|
3715
3703
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3721,35 +3709,35 @@ const ts = {
|
|
|
3721
3709
|
onProceed: i
|
|
3722
3710
|
}, {
|
|
3723
3711
|
"body-content": y(() => [
|
|
3724
|
-
e.error ? (m(), T("div",
|
|
3725
|
-
|
|
3712
|
+
e.error ? (m(), T("div", Ks, [
|
|
3713
|
+
E(c, { appearance: "danger" }, {
|
|
3726
3714
|
alertMessage: y(() => [
|
|
3727
|
-
W(
|
|
3715
|
+
W($(e.error), 1)
|
|
3728
3716
|
]),
|
|
3729
3717
|
_: 1
|
|
3730
3718
|
})
|
|
3731
3719
|
])) : G("", !0),
|
|
3732
|
-
|
|
3720
|
+
E(g(r), {
|
|
3733
3721
|
class: "message",
|
|
3734
3722
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3735
3723
|
tag: "p"
|
|
3736
3724
|
}, be({
|
|
3737
3725
|
entityType: y(() => [
|
|
3738
|
-
W(
|
|
3726
|
+
W($(t.entityType), 1)
|
|
3739
3727
|
]),
|
|
3740
3728
|
_: 2
|
|
3741
3729
|
}, [
|
|
3742
3730
|
t.entityName ? {
|
|
3743
3731
|
name: "entityName",
|
|
3744
3732
|
fn: y(() => [
|
|
3745
|
-
K("strong", null,
|
|
3733
|
+
K("strong", null, $(t.entityName), 1)
|
|
3746
3734
|
]),
|
|
3747
3735
|
key: "0"
|
|
3748
3736
|
} : void 0
|
|
3749
3737
|
]), 1032, ["keypath"]),
|
|
3750
3738
|
t.description || s.$slots.description ? (m(), T("div", Bs, [
|
|
3751
3739
|
Y(s.$slots, "description", {}, () => [
|
|
3752
|
-
K("p", null,
|
|
3740
|
+
K("p", null, $(t.description), 1)
|
|
3753
3741
|
], !0)
|
|
3754
3742
|
])) : G("", !0)
|
|
3755
3743
|
]),
|
|
@@ -3771,7 +3759,7 @@ const ts = {
|
|
|
3771
3759
|
width: "20",
|
|
3772
3760
|
x: "0",
|
|
3773
3761
|
y: "0"
|
|
3774
|
-
}, Rs = ["fill"], Us = { mask: "url(#mask0_180_20349)" }, Ds = ["fill"], sn = /* @__PURE__ */
|
|
3762
|
+
}, Rs = ["fill"], Us = { mask: "url(#mask0_180_20349)" }, Ds = ["fill"], sn = /* @__PURE__ */ ee({
|
|
3775
3763
|
__name: "IconFilter",
|
|
3776
3764
|
props: {
|
|
3777
3765
|
color: {
|
|
@@ -3799,7 +3787,7 @@ const ts = {
|
|
|
3799
3787
|
}), Gs = {
|
|
3800
3788
|
key: 1,
|
|
3801
3789
|
class: "kong-ui-entity-filter"
|
|
3802
|
-
}, Hs = { class: "menu-item-title" }, zs = { class: "menu-item-indicator" }, Js = { class: "menu-item-body" }, Ys = ["for"], Ws = { class: "menu-item-buttons" }, Zs = { class: "filter-clear-button-container" },
|
|
3790
|
+
}, Hs = { class: "menu-item-title" }, zs = { class: "menu-item-indicator" }, Js = { class: "menu-item-body" }, Ys = ["for"], Ws = { class: "menu-item-buttons" }, Zs = { class: "filter-clear-button-container" }, Xs = /* @__PURE__ */ ee({
|
|
3803
3791
|
__name: "EntityFilter",
|
|
3804
3792
|
props: {
|
|
3805
3793
|
// filter config, either exact match or fuzzy match
|
|
@@ -3819,21 +3807,21 @@ const ts = {
|
|
|
3819
3807
|
},
|
|
3820
3808
|
emits: ["update:modelValue"],
|
|
3821
3809
|
setup(e, { emit: n }) {
|
|
3822
|
-
const t = e, { i18n: { t: r } } = ae.useI18n(), a =
|
|
3810
|
+
const t = e, { i18n: { t: r } } = ae.useI18n(), a = N(!1), o = N({}), i = M(() => {
|
|
3823
3811
|
const p = [];
|
|
3824
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
3825
|
-
|
|
3812
|
+
return new URLSearchParams(t.modelValue).forEach((A, w) => {
|
|
3813
|
+
A !== "" && p.push(w);
|
|
3826
3814
|
}), p;
|
|
3827
|
-
}), s =
|
|
3815
|
+
}), s = M(() => {
|
|
3828
3816
|
const p = t.config.fields;
|
|
3829
|
-
return Object.keys(p).filter((
|
|
3830
|
-
label: p[
|
|
3831
|
-
value:
|
|
3817
|
+
return Object.keys(p).filter((A) => p[A].searchable).map((A) => ({
|
|
3818
|
+
label: p[A].label || A,
|
|
3819
|
+
value: A
|
|
3832
3820
|
}));
|
|
3833
3821
|
});
|
|
3834
3822
|
ve(() => t.modelValue, (p) => {
|
|
3835
|
-
o.value = {}, new URLSearchParams(p).forEach((
|
|
3836
|
-
o.value[
|
|
3823
|
+
o.value = {}, new URLSearchParams(p).forEach((A, w) => {
|
|
3824
|
+
o.value[w] = A;
|
|
3837
3825
|
});
|
|
3838
3826
|
});
|
|
3839
3827
|
const l = () => {
|
|
@@ -3841,28 +3829,28 @@ const ts = {
|
|
|
3841
3829
|
}, c = (p) => {
|
|
3842
3830
|
n("update:modelValue", p);
|
|
3843
3831
|
}, d = (p) => `filter-${p}`, u = (p) => {
|
|
3844
|
-
var
|
|
3845
|
-
return (((
|
|
3846
|
-
value:
|
|
3847
|
-
label:
|
|
3832
|
+
var A, w;
|
|
3833
|
+
return (((w = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : w.values) ?? []).map((k) => ({
|
|
3834
|
+
value: k,
|
|
3835
|
+
label: k
|
|
3848
3836
|
}));
|
|
3849
3837
|
}, h = (p) => {
|
|
3850
|
-
var
|
|
3851
|
-
return ((
|
|
3838
|
+
var A, w;
|
|
3839
|
+
return ((w = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : w.type) ?? "text";
|
|
3852
3840
|
}, f = (p) => {
|
|
3853
3841
|
o.value = {
|
|
3854
3842
|
...o.value,
|
|
3855
3843
|
[p]: ""
|
|
3856
|
-
},
|
|
3857
|
-
},
|
|
3858
|
-
o.value = {},
|
|
3859
|
-
},
|
|
3860
|
-
const
|
|
3861
|
-
p && (a.value = !1), n("update:modelValue", new URLSearchParams(
|
|
3844
|
+
}, b();
|
|
3845
|
+
}, I = () => {
|
|
3846
|
+
o.value = {}, b(!0);
|
|
3847
|
+
}, b = (p = !1) => {
|
|
3848
|
+
const A = Object.keys(o.value).reduce((w, k) => (o.value[k] && (w[k] = `${o.value[k]}`), w), {});
|
|
3849
|
+
p && (a.value = !1), n("update:modelValue", new URLSearchParams(A).toString());
|
|
3862
3850
|
};
|
|
3863
|
-
return (p,
|
|
3864
|
-
const
|
|
3865
|
-
return e.config.isExactMatch ? (m(),
|
|
3851
|
+
return (p, A) => {
|
|
3852
|
+
const w = V("KInput"), k = V("KButton"), S = V("KSelect"), x = V("KMenuItem"), P = V("KMenu");
|
|
3853
|
+
return e.config.isExactMatch ? (m(), U(w, {
|
|
3866
3854
|
key: 0,
|
|
3867
3855
|
autocomplete: "off",
|
|
3868
3856
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3872,18 +3860,18 @@ const ts = {
|
|
|
3872
3860
|
"onUpdate:modelValue": c
|
|
3873
3861
|
}, {
|
|
3874
3862
|
before: y(() => [
|
|
3875
|
-
|
|
3863
|
+
E(sn)
|
|
3876
3864
|
]),
|
|
3877
3865
|
_: 1
|
|
3878
3866
|
}, 8, ["model-value", "placeholder"])) : (m(), T("div", Gs, [
|
|
3879
|
-
|
|
3867
|
+
E(k, {
|
|
3880
3868
|
appearance: "tertiary",
|
|
3881
3869
|
"data-testid": "filter-button",
|
|
3882
3870
|
onClick: l
|
|
3883
3871
|
}, {
|
|
3884
3872
|
default: y(() => [
|
|
3885
|
-
|
|
3886
|
-
W(" " +
|
|
3873
|
+
E(sn),
|
|
3874
|
+
W(" " + $(g(r)("filter.filterButtonText")) + " " + $(i.value.length > 0 ? `(${i.value.length})` : ""), 1)
|
|
3887
3875
|
]),
|
|
3888
3876
|
_: 1
|
|
3889
3877
|
}),
|
|
@@ -3893,68 +3881,68 @@ const ts = {
|
|
|
3893
3881
|
}, null, 512), [
|
|
3894
3882
|
[De, a.value]
|
|
3895
3883
|
]),
|
|
3896
|
-
Ue(
|
|
3884
|
+
Ue(E(P, { class: "kong-ui-entity-filter-menu" }, {
|
|
3897
3885
|
body: y(() => [
|
|
3898
|
-
(m(!0), T(
|
|
3886
|
+
(m(!0), T(pe, null, ce(s.value, (R, v) => (m(), U(x, {
|
|
3899
3887
|
key: R.value,
|
|
3900
3888
|
"data-testid": R.value,
|
|
3901
3889
|
expandable: "",
|
|
3902
|
-
"last-menu-item":
|
|
3890
|
+
"last-menu-item": v === s.value.length - 1
|
|
3903
3891
|
}, {
|
|
3904
3892
|
itemTitle: y(() => [
|
|
3905
3893
|
K("span", Hs, [
|
|
3906
|
-
W(
|
|
3894
|
+
W($(R.label) + " ", 1),
|
|
3907
3895
|
Ue(K("span", zs, null, 512), [
|
|
3908
3896
|
[De, i.value.includes(R.value)]
|
|
3909
3897
|
])
|
|
3910
3898
|
])
|
|
3911
3899
|
]),
|
|
3912
3900
|
itemBody: y(() => {
|
|
3913
|
-
var
|
|
3901
|
+
var C, B;
|
|
3914
3902
|
return [
|
|
3915
3903
|
K("div", Js, [
|
|
3916
3904
|
K("label", {
|
|
3917
3905
|
class: "menu-item-label",
|
|
3918
3906
|
for: d(R.value)
|
|
3919
|
-
},
|
|
3920
|
-
((
|
|
3907
|
+
}, $(g(r)("filter.fieldLabel")), 9, Ys),
|
|
3908
|
+
((B = (C = e.config.schema) == null ? void 0 : C[R.value]) == null ? void 0 : B.type) === "select" ? (m(), U(S, {
|
|
3921
3909
|
key: 0,
|
|
3922
3910
|
id: d(R.value),
|
|
3923
3911
|
modelValue: o.value[R.value],
|
|
3924
|
-
"onUpdate:modelValue": (
|
|
3912
|
+
"onUpdate:modelValue": (q) => o.value[R.value] = q,
|
|
3925
3913
|
appearance: "select",
|
|
3926
3914
|
items: u(R.value),
|
|
3927
3915
|
placeholder: g(r)("filter.selectPlaceholder")
|
|
3928
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(),
|
|
3916
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), U(w, {
|
|
3929
3917
|
key: 1,
|
|
3930
3918
|
id: d(R.value),
|
|
3931
3919
|
modelValue: o.value[R.value],
|
|
3932
|
-
"onUpdate:modelValue": (
|
|
3920
|
+
"onUpdate:modelValue": (q) => o.value[R.value] = q,
|
|
3933
3921
|
autocomplete: "off",
|
|
3934
3922
|
placeholder: g(r)("filter.inputPlaceholder"),
|
|
3935
3923
|
type: h(R.value)
|
|
3936
3924
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3937
3925
|
]),
|
|
3938
3926
|
K("div", Ws, [
|
|
3939
|
-
|
|
3927
|
+
E(k, {
|
|
3940
3928
|
appearance: "tertiary",
|
|
3941
3929
|
"data-testid": "apply-filter",
|
|
3942
3930
|
size: "small",
|
|
3943
|
-
onClick:
|
|
3931
|
+
onClick: A[0] || (A[0] = (q) => b(!0))
|
|
3944
3932
|
}, {
|
|
3945
3933
|
default: y(() => [
|
|
3946
|
-
W(
|
|
3934
|
+
W($(g(r)("filter.applyButtonText")), 1)
|
|
3947
3935
|
]),
|
|
3948
3936
|
_: 1
|
|
3949
3937
|
}),
|
|
3950
|
-
|
|
3938
|
+
E(k, {
|
|
3951
3939
|
appearance: "tertiary",
|
|
3952
3940
|
"data-testid": "clear-filter",
|
|
3953
3941
|
size: "small",
|
|
3954
|
-
onClick: (
|
|
3942
|
+
onClick: (q) => f(R.value)
|
|
3955
3943
|
}, {
|
|
3956
3944
|
default: y(() => [
|
|
3957
|
-
W(
|
|
3945
|
+
W($(g(r)("filter.clearButtonText")), 1)
|
|
3958
3946
|
]),
|
|
3959
3947
|
_: 2
|
|
3960
3948
|
}, 1032, ["onClick"])
|
|
@@ -3966,12 +3954,12 @@ const ts = {
|
|
|
3966
3954
|
]),
|
|
3967
3955
|
actionButton: y(() => [
|
|
3968
3956
|
K("div", Zs, [
|
|
3969
|
-
|
|
3957
|
+
E(k, {
|
|
3970
3958
|
size: "small",
|
|
3971
|
-
onClick:
|
|
3959
|
+
onClick: I
|
|
3972
3960
|
}, {
|
|
3973
3961
|
default: y(() => [
|
|
3974
|
-
W(
|
|
3962
|
+
W($(g(r)("filter.clearAllButtonText")), 1)
|
|
3975
3963
|
]),
|
|
3976
3964
|
_: 1
|
|
3977
3965
|
})
|
|
@@ -3984,7 +3972,7 @@ const ts = {
|
|
|
3984
3972
|
]));
|
|
3985
3973
|
};
|
|
3986
3974
|
}
|
|
3987
|
-
}),
|
|
3975
|
+
}), Qs = /* @__PURE__ */ me(Xs, [["__scopeId", "data-v-4ea260f0"]]), Re = /* @__PURE__ */ ee({
|
|
3988
3976
|
__name: "PermissionsWrapper",
|
|
3989
3977
|
props: {
|
|
3990
3978
|
/**
|
|
@@ -4006,7 +3994,7 @@ const ts = {
|
|
|
4006
3994
|
}
|
|
4007
3995
|
},
|
|
4008
3996
|
setup(e) {
|
|
4009
|
-
const n = e, t =
|
|
3997
|
+
const n = e, t = N(void 0), r = M(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
4010
3998
|
return ve(() => n.authFunction, async () => {
|
|
4011
3999
|
t.value = await n.authFunction();
|
|
4012
4000
|
}, { immediate: !0 }), (a, o) => r.value ? Y(a.$slots, "default", {
|
|
@@ -4023,7 +4011,7 @@ const ts = {
|
|
|
4023
4011
|
}, rl = {
|
|
4024
4012
|
key: 2,
|
|
4025
4013
|
class: "form-section-footer"
|
|
4026
|
-
}, al = { class: "form-section-content" }, ol = /* @__PURE__ */
|
|
4014
|
+
}, al = { class: "form-section-content" }, ol = /* @__PURE__ */ ee({
|
|
4027
4015
|
__name: "EntityFormSection",
|
|
4028
4016
|
props: {
|
|
4029
4017
|
title: {
|
|
@@ -4057,10 +4045,10 @@ const ts = {
|
|
|
4057
4045
|
key: 0,
|
|
4058
4046
|
class: Ae(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4059
4047
|
}, [
|
|
4060
|
-
e.title ? (m(), T("h4", tl,
|
|
4048
|
+
e.title ? (m(), T("h4", tl, $(e.title), 1)) : G("", !0),
|
|
4061
4049
|
e.description || g(n).description ? (m(), T("div", nl, [
|
|
4062
4050
|
Y(t.$slots, "description", {}, () => [
|
|
4063
|
-
K("p", null,
|
|
4051
|
+
K("p", null, $(e.description), 1)
|
|
4064
4052
|
], !0)
|
|
4065
4053
|
])) : G("", !0),
|
|
4066
4054
|
g(n).footer ? (m(), T("div", rl, [
|
|
@@ -4073,14 +4061,14 @@ const ts = {
|
|
|
4073
4061
|
])
|
|
4074
4062
|
], 2));
|
|
4075
4063
|
}
|
|
4076
|
-
}), il = /* @__PURE__ */ me(ol, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: St, useDeleteUrlBuilder: sl, useErrors: ll, useExternalLinkCreator:
|
|
4064
|
+
}), il = /* @__PURE__ */ me(ol, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: St, useDeleteUrlBuilder: sl, useErrors: ll, useExternalLinkCreator: Ol, useFetchUrlBuilder: El, useFetcher: ul, useDebouncedFilter: cl, useStringHelpers: Nl, useHelpers: Fl, useGatewayFeatureSupported: Kl, useTruncationDetector: Bl } = ae;
|
|
4077
4065
|
const dl = { class: "add-consumer-form-container" }, pl = { class: "add-consumer-form-cta" }, fl = { class: "select-item-label" }, ml = {
|
|
4078
4066
|
key: 0,
|
|
4079
4067
|
class: "select-item-desc"
|
|
4080
4068
|
}, gl = {
|
|
4081
4069
|
key: 0,
|
|
4082
4070
|
class: "kong-ui-entity-add-consumers-error"
|
|
4083
|
-
}, yl = { key: 0 }, hl = /* @__PURE__ */
|
|
4071
|
+
}, yl = { key: 0 }, hl = /* @__PURE__ */ ee({
|
|
4084
4072
|
__name: "AddConsumerModal",
|
|
4085
4073
|
props: {
|
|
4086
4074
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4097,10 +4085,10 @@ const dl = { class: "add-consumer-form-container" }, pl = { class: "add-consumer
|
|
|
4097
4085
|
},
|
|
4098
4086
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4099
4087
|
setup(e, { emit: n }) {
|
|
4100
|
-
var
|
|
4101
|
-
const t = e, { i18n: { t: r } } =
|
|
4102
|
-
headers: (
|
|
4103
|
-
}), o =
|
|
4088
|
+
var q;
|
|
4089
|
+
const t = e, { i18n: { t: r } } = Qe.useI18n(), { axiosInstance: a } = St({
|
|
4090
|
+
headers: (q = t.config) == null ? void 0 : q.requestHeaders
|
|
4091
|
+
}), o = N([]), {
|
|
4104
4092
|
debouncedQueryChange: i,
|
|
4105
4093
|
loading: s,
|
|
4106
4094
|
allRecords: l,
|
|
@@ -4115,103 +4103,103 @@ const dl = { class: "add-consumer-form-container" }, pl = { class: "add-consumer
|
|
|
4115
4103
|
fetchedItemsKey: "data",
|
|
4116
4104
|
searchKeys: ["username", "id"]
|
|
4117
4105
|
}
|
|
4118
|
-
), h = (
|
|
4119
|
-
label:
|
|
4120
|
-
value:
|
|
4121
|
-
selected: o.value.includes(
|
|
4122
|
-
data:
|
|
4106
|
+
), h = (_) => _, f = M(() => c.value ? r("consumers.errors.general") : ""), I = N(0), b = M(() => l.value === void 0), p = M(() => u.value.map((_) => ({
|
|
4107
|
+
label: _.username || _.customId,
|
|
4108
|
+
value: _.id,
|
|
4109
|
+
selected: o.value.includes(_.id),
|
|
4110
|
+
data: _
|
|
4123
4111
|
// we need this to determine whether or not to show the description text
|
|
4124
|
-
}))),
|
|
4112
|
+
}))), A = (_) => {
|
|
4125
4113
|
var L;
|
|
4126
|
-
const
|
|
4127
|
-
return
|
|
4128
|
-
},
|
|
4129
|
-
|
|
4130
|
-
},
|
|
4114
|
+
const F = b.value ? u.value.find((D) => D.id === _) : (L = l.value) == null ? void 0 : L.find((D) => D.id === _);
|
|
4115
|
+
return F ? F.username || F.custom_id : _;
|
|
4116
|
+
}, w = () => {
|
|
4117
|
+
x.value = "", k.value = [], C.value = [], n("cancel");
|
|
4118
|
+
}, k = N([]), S = N(!1), x = N(""), P = async () => {
|
|
4131
4119
|
if (!o.value.length) {
|
|
4132
|
-
|
|
4120
|
+
x.value = "", C.value = [], n("cancel");
|
|
4133
4121
|
return;
|
|
4134
4122
|
}
|
|
4135
|
-
|
|
4123
|
+
S.value = !0, x.value = "", k.value = [], C.value = [];
|
|
4136
4124
|
try {
|
|
4137
|
-
const
|
|
4125
|
+
const _ = o.value.map((D) => v(D)), F = await Promise.allSettled(_);
|
|
4138
4126
|
let L = !0;
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
}), L ? (
|
|
4127
|
+
F.forEach((D) => {
|
|
4128
|
+
D.status !== "fulfilled" && (L = !1);
|
|
4129
|
+
}), L ? (k.value = [], C.value = [], n("add:success", o.value), o.value = []) : (k.value.length && n("add:partial-success", k.value), o.value = [], B(F));
|
|
4142
4130
|
} catch {
|
|
4143
|
-
|
|
4131
|
+
x.value = r("consumers.errors.add"), n("error", x.value);
|
|
4144
4132
|
} finally {
|
|
4145
|
-
|
|
4133
|
+
S.value = !1;
|
|
4146
4134
|
}
|
|
4147
|
-
}, R =
|
|
4148
|
-
var
|
|
4149
|
-
let
|
|
4150
|
-
return t.config.app === "konnect" ?
|
|
4151
|
-
}),
|
|
4152
|
-
const
|
|
4153
|
-
consumer:
|
|
4135
|
+
}, R = M(() => {
|
|
4136
|
+
var F, L, D, Z;
|
|
4137
|
+
let _ = `${t.config.apiBaseUrl}${Se.list[t.config.app].forConsumerGroup}`;
|
|
4138
|
+
return t.config.app === "konnect" ? _ = _.replace(/{controlPlaneId}/gi, ((F = t.config) == null ? void 0 : F.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((L = t.config) == null ? void 0 : L.consumerGroupId) || "") : t.config.app === "kongManager" && (_ = _.replace(/\/{workspace}/gi, (D = t.config) != null && D.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((Z = t.config) == null ? void 0 : Z.consumerGroupId) || "")), _;
|
|
4139
|
+
}), v = async (_) => {
|
|
4140
|
+
const F = {
|
|
4141
|
+
consumer: _
|
|
4154
4142
|
};
|
|
4155
4143
|
try {
|
|
4156
|
-
const L = await a.post(R.value,
|
|
4157
|
-
return
|
|
4144
|
+
const L = await a.post(R.value, F);
|
|
4145
|
+
return k.value.push(_), L;
|
|
4158
4146
|
} catch (L) {
|
|
4159
|
-
let
|
|
4160
|
-
return L.response.status === 409 && (
|
|
4147
|
+
let D = `${A(_)} - ${L.message}`;
|
|
4148
|
+
return L.response.status === 409 && (D = `${A(_)} - ${r("consumers.errors.already_added")}`), Promise.reject(Error(D));
|
|
4161
4149
|
}
|
|
4162
|
-
},
|
|
4163
|
-
|
|
4150
|
+
}, C = N([]), B = (_) => {
|
|
4151
|
+
C.value = _.map((F) => {
|
|
4164
4152
|
var L;
|
|
4165
|
-
return (L =
|
|
4153
|
+
return (L = F.reason) == null ? void 0 : L.message;
|
|
4166
4154
|
}).filter(Boolean);
|
|
4167
4155
|
};
|
|
4168
4156
|
return ve(p, () => {
|
|
4169
|
-
|
|
4170
|
-
}, { immediate: !0, deep: !0 }),
|
|
4157
|
+
I.value++;
|
|
4158
|
+
}, { immediate: !0, deep: !0 }), Xe(async () => {
|
|
4171
4159
|
await d();
|
|
4172
|
-
}), (
|
|
4173
|
-
const L =
|
|
4174
|
-
return m(),
|
|
4175
|
-
"action-pending":
|
|
4160
|
+
}), (_, F) => {
|
|
4161
|
+
const L = V("KMultiselect"), D = V("KAlert"), Z = V("KPrompt");
|
|
4162
|
+
return m(), U(Z, {
|
|
4163
|
+
"action-pending": S.value,
|
|
4176
4164
|
class: "kong-ui-entities-add-consumers-modal",
|
|
4177
4165
|
"data-testid": "add-consumer-modal",
|
|
4178
4166
|
"is-visible": e.visible,
|
|
4179
4167
|
title: g(r)("consumers.consumer_groups.add.title"),
|
|
4180
|
-
onCanceled:
|
|
4181
|
-
onProceed:
|
|
4168
|
+
onCanceled: w,
|
|
4169
|
+
onProceed: P
|
|
4182
4170
|
}, {
|
|
4183
4171
|
"body-content": y(() => [
|
|
4184
4172
|
K("div", dl, [
|
|
4185
|
-
K("p", pl,
|
|
4186
|
-
|
|
4173
|
+
K("p", pl, $(g(r)("consumers.consumer_groups.add.ctaText")), 1),
|
|
4174
|
+
E(L, {
|
|
4187
4175
|
modelValue: o.value,
|
|
4188
|
-
"onUpdate:modelValue":
|
|
4176
|
+
"onUpdate:modelValue": F[0] || (F[0] = (H) => o.value = H),
|
|
4189
4177
|
autosuggest: "",
|
|
4190
4178
|
"data-testid": "add-consumers-multiselect",
|
|
4191
|
-
"dropdown-footer-text":
|
|
4179
|
+
"dropdown-footer-text": b.value ? g(r)("consumers.consumer_groups.add.footer") : void 0,
|
|
4192
4180
|
items: p.value,
|
|
4193
4181
|
label: g(r)("consumers.consumer_groups.add.consumers_label"),
|
|
4194
4182
|
loading: g(s),
|
|
4195
4183
|
placeholder: g(r)("consumers.consumer_groups.add.consumer_placeholder"),
|
|
4196
|
-
readonly:
|
|
4184
|
+
readonly: S.value,
|
|
4197
4185
|
required: "",
|
|
4198
4186
|
width: "100%",
|
|
4199
4187
|
onQueryChange: g(i)
|
|
4200
4188
|
}, {
|
|
4201
|
-
"item-template": y(({ item:
|
|
4202
|
-
K("div", fl,
|
|
4203
|
-
h(
|
|
4189
|
+
"item-template": y(({ item: H }) => [
|
|
4190
|
+
K("div", fl, $(H.label), 1),
|
|
4191
|
+
h(H).data.username && h(H).data.custom_id ? (m(), T("div", ml, $(h(H).data.custom_id), 1)) : G("", !0)
|
|
4204
4192
|
]),
|
|
4205
4193
|
_: 1
|
|
4206
4194
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4207
|
-
|
|
4208
|
-
|
|
4195
|
+
x.value || f.value || C.value.length ? (m(), T("div", gl, [
|
|
4196
|
+
E(D, { appearance: "danger" }, {
|
|
4209
4197
|
alertMessage: y(() => [
|
|
4210
|
-
K("p", null,
|
|
4211
|
-
|
|
4212
|
-
(m(!0), T(
|
|
4198
|
+
K("p", null, $(g(r)("consumers.errors.add")), 1),
|
|
4199
|
+
C.value.length ? (m(), T("ul", yl, [
|
|
4200
|
+
(m(!0), T(pe, null, ce(C.value, (H, X) => (m(), T("li", { key: X }, $(H), 1))), 128))
|
|
4213
4201
|
])) : G("", !0),
|
|
4214
|
-
K("div", null,
|
|
4202
|
+
K("div", null, $(x.value || f.value), 1)
|
|
4215
4203
|
]),
|
|
4216
4204
|
_: 1
|
|
4217
4205
|
})
|
|
@@ -4228,7 +4216,7 @@ const xt = (e, n) => {
|
|
|
4228
4216
|
for (const [r, a] of n)
|
|
4229
4217
|
t[r] = a;
|
|
4230
4218
|
return t;
|
|
4231
|
-
}, vl = /* @__PURE__ */ xt(hl, [["__scopeId", "data-v-86f09821"]]), bl = { class: "kong-ui-entities-consumers-list" }, Cl = { key: 1 }, kl = /* @__PURE__ */
|
|
4219
|
+
}, vl = /* @__PURE__ */ xt(hl, [["__scopeId", "data-v-86f09821"]]), bl = { class: "kong-ui-entities-consumers-list" }, Cl = { key: 1 }, kl = /* @__PURE__ */ ee({
|
|
4232
4220
|
__name: "ConsumerList",
|
|
4233
4221
|
props: {
|
|
4234
4222
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4269,181 +4257,178 @@ const xt = (e, n) => {
|
|
|
4269
4257
|
},
|
|
4270
4258
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4271
4259
|
setup(e, { emit: n }) {
|
|
4272
|
-
var
|
|
4273
|
-
const t = e, { i18nT: r, i18n: { t: a } } =
|
|
4274
|
-
headers: (
|
|
4275
|
-
}), s =
|
|
4260
|
+
var Et;
|
|
4261
|
+
const t = e, { i18nT: r, i18n: { t: a } } = Qe.useI18n(), o = gt(), { axiosInstance: i } = St({
|
|
4262
|
+
headers: (Et = t.config) == null ? void 0 : Et.requestHeaders
|
|
4263
|
+
}), s = N(1), l = M(() => !!t.config.consumerGroupId), c = M(() => t.config.app !== "kongManager" || !!t.config.disableSorting), d = {
|
|
4276
4264
|
username: { label: a("consumers.list.table_headers.username"), searchable: !0, sortable: !0 },
|
|
4277
4265
|
custom_id: { label: a("consumers.list.table_headers.custom_id"), searchable: !0, sortable: !0 },
|
|
4278
4266
|
tags: { label: a("consumers.list.table_headers.tags"), sortable: !1 }
|
|
4279
|
-
}, u = d, h = (
|
|
4280
|
-
"data-testid":
|
|
4281
|
-
}), f =
|
|
4282
|
-
var
|
|
4283
|
-
let
|
|
4284
|
-
return t.config.app === "konnect" ?
|
|
4285
|
-
}),
|
|
4286
|
-
const
|
|
4287
|
-
return
|
|
4288
|
-
isExactMatch:
|
|
4267
|
+
}, u = d, h = (O) => ({
|
|
4268
|
+
"data-testid": O.username ?? O.custom_id ?? O.id
|
|
4269
|
+
}), f = M(() => {
|
|
4270
|
+
var z, re, fe, we;
|
|
4271
|
+
let O = `${t.config.apiBaseUrl}${Se.list[t.config.app][l.value ? "forConsumerGroup" : "all"]}`;
|
|
4272
|
+
return t.config.app === "konnect" ? O = O.replace(/{controlPlaneId}/gi, ((z = t.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((re = t.config) == null ? void 0 : re.consumerGroupId) || "") : t.config.app === "kongManager" && (O = O.replace(/\/{workspace}/gi, (fe = t.config) != null && fe.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((we = t.config) == null ? void 0 : we.consumerGroupId) || "")), O;
|
|
4273
|
+
}), I = N(""), b = M(() => {
|
|
4274
|
+
const O = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4275
|
+
return O ? {
|
|
4276
|
+
isExactMatch: O,
|
|
4289
4277
|
placeholder: a("consumers.search.placeholder")
|
|
4290
4278
|
} : {
|
|
4291
|
-
isExactMatch:
|
|
4279
|
+
isExactMatch: O,
|
|
4292
4280
|
fields: {
|
|
4293
4281
|
username: d.username,
|
|
4294
4282
|
custom_id: d.custom_id
|
|
4295
4283
|
},
|
|
4296
4284
|
schema: t.config.filterSchema
|
|
4297
4285
|
};
|
|
4298
|
-
}), p =
|
|
4299
|
-
|
|
4300
|
-
},
|
|
4286
|
+
}), p = M(() => l.value ? "consumers" : void 0), { fetcher: A, fetcherState: w } = ul(t.config, f.value, p.value), k = () => {
|
|
4287
|
+
I.value = "";
|
|
4288
|
+
}, S = () => {
|
|
4301
4289
|
s.value++;
|
|
4302
|
-
},
|
|
4303
|
-
const
|
|
4304
|
-
if (!
|
|
4290
|
+
}, x = (O) => O ?? "-", P = N(""), R = (O, z) => {
|
|
4291
|
+
const re = O.id;
|
|
4292
|
+
if (!z(re)) {
|
|
4305
4293
|
n("copy:error", {
|
|
4306
|
-
entity:
|
|
4294
|
+
entity: O,
|
|
4307
4295
|
field: "id",
|
|
4308
4296
|
message: a("consumers.errors.copy")
|
|
4309
4297
|
});
|
|
4310
4298
|
return;
|
|
4311
4299
|
}
|
|
4312
4300
|
n("copy:success", {
|
|
4313
|
-
entity:
|
|
4301
|
+
entity: O,
|
|
4314
4302
|
field: "id",
|
|
4315
|
-
message: a("consumers.copy.success", { val:
|
|
4303
|
+
message: a("consumers.copy.success", { val: re })
|
|
4316
4304
|
});
|
|
4317
|
-
},
|
|
4318
|
-
const
|
|
4319
|
-
if (!
|
|
4305
|
+
}, v = (O, z) => {
|
|
4306
|
+
const re = JSON.stringify(O);
|
|
4307
|
+
if (!z(re)) {
|
|
4320
4308
|
n("copy:error", {
|
|
4321
|
-
entity:
|
|
4309
|
+
entity: O,
|
|
4322
4310
|
message: a("consumers.errors.copy")
|
|
4323
4311
|
});
|
|
4324
4312
|
return;
|
|
4325
4313
|
}
|
|
4326
4314
|
n("copy:success", {
|
|
4327
|
-
entity:
|
|
4315
|
+
entity: O,
|
|
4328
4316
|
message: a("consumers.copy.success_brief")
|
|
4329
4317
|
});
|
|
4330
|
-
},
|
|
4331
|
-
var
|
|
4332
|
-
await ((
|
|
4333
|
-
},
|
|
4318
|
+
}, C = async (O) => {
|
|
4319
|
+
var re;
|
|
4320
|
+
await ((re = t.canRetrieve) == null ? void 0 : re.call(t, O)) && o.push(t.config.getViewRoute(O.id));
|
|
4321
|
+
}, B = (O) => ({
|
|
4334
4322
|
label: a("consumers.actions.view"),
|
|
4335
|
-
to: t.config.getViewRoute(
|
|
4336
|
-
}),
|
|
4323
|
+
to: t.config.getViewRoute(O)
|
|
4324
|
+
}), q = (O) => ({
|
|
4337
4325
|
label: a("consumers.actions.edit"),
|
|
4338
|
-
to: t.config.getEditRoute(
|
|
4339
|
-
}),
|
|
4340
|
-
|
|
4341
|
-
},
|
|
4342
|
-
|
|
4326
|
+
to: t.config.getEditRoute(O)
|
|
4327
|
+
}), _ = N(void 0), F = N(!1), L = N(!1), D = N(""), Z = sl(t.config, f.value), H = (O) => {
|
|
4328
|
+
_.value = O, F.value = !0;
|
|
4329
|
+
}, X = () => {
|
|
4330
|
+
F.value = !1;
|
|
4343
4331
|
}, le = async () => {
|
|
4344
|
-
var
|
|
4345
|
-
if ((
|
|
4332
|
+
var O, z, re;
|
|
4333
|
+
if ((O = _.value) != null && O.id) {
|
|
4346
4334
|
L.value = !0;
|
|
4347
4335
|
try {
|
|
4348
|
-
await i.delete(Z(
|
|
4349
|
-
} catch (
|
|
4350
|
-
|
|
4336
|
+
await i.delete(Z(_.value.id)), L.value = !1, F.value = !1, s.value++, n("delete:success", _.value);
|
|
4337
|
+
} catch (fe) {
|
|
4338
|
+
D.value = ((re = (z = fe.response) == null ? void 0 : z.data) == null ? void 0 : re.message) || fe.message || a("consumers.errors.delete"), n("error", fe);
|
|
4351
4339
|
} finally {
|
|
4352
4340
|
L.value = !1;
|
|
4353
4341
|
}
|
|
4354
4342
|
}
|
|
4355
|
-
}, tt =
|
|
4343
|
+
}, tt = N(!1), Tt = () => {
|
|
4356
4344
|
tt.value = !0;
|
|
4357
4345
|
}, $t = () => {
|
|
4358
4346
|
tt.value = !1;
|
|
4359
|
-
},
|
|
4360
|
-
|
|
4347
|
+
}, jt = (O, z) => {
|
|
4348
|
+
z || $t(), s.value++, n("add:success", O);
|
|
4361
4349
|
}, ir = () => {
|
|
4362
4350
|
l.value && Tt();
|
|
4363
|
-
}, ye =
|
|
4364
|
-
ye.value =
|
|
4365
|
-
},
|
|
4351
|
+
}, ye = N(void 0), nt = N(!1), sr = N(""), lr = (O) => {
|
|
4352
|
+
ye.value = O, nt.value = !0;
|
|
4353
|
+
}, Mt = () => {
|
|
4366
4354
|
nt.value = !1, ye.value = void 0;
|
|
4367
|
-
}, ur =
|
|
4368
|
-
var
|
|
4369
|
-
let
|
|
4370
|
-
return t.config.app === "konnect" ?
|
|
4371
|
-
}),
|
|
4355
|
+
}, ur = M(() => {
|
|
4356
|
+
var z, re, fe, we;
|
|
4357
|
+
let O = `${t.config.apiBaseUrl}${Se.list[t.config.app].oneForConsumerGroup}`;
|
|
4358
|
+
return t.config.app === "konnect" ? O = O.replace(/{controlPlaneId}/gi, ((z = t.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((re = t.config) == null ? void 0 : re.consumerGroupId) || "") : t.config.app === "kongManager" && (O = O.replace(/\/{workspace}/gi, (fe = t.config) != null && fe.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((we = t.config) == null ? void 0 : we.consumerGroupId) || "")), O;
|
|
4359
|
+
}), Ot = N(!1), cr = async () => {
|
|
4372
4360
|
if (ye.value) {
|
|
4373
|
-
|
|
4361
|
+
Ot.value = !0;
|
|
4374
4362
|
try {
|
|
4375
|
-
const
|
|
4376
|
-
await i.delete(
|
|
4377
|
-
} catch (
|
|
4378
|
-
sr.value =
|
|
4363
|
+
const O = ur.value.replace(/{consumerId}/gi, ye.value.id);
|
|
4364
|
+
await i.delete(O), n("remove:success", ye.value), Mt(), s.value++;
|
|
4365
|
+
} catch (O) {
|
|
4366
|
+
sr.value = O.message || a("consumers.errors.delete"), n("error", O);
|
|
4379
4367
|
} finally {
|
|
4380
|
-
|
|
4368
|
+
Ot.value = !1;
|
|
4381
4369
|
}
|
|
4382
4370
|
}
|
|
4383
4371
|
};
|
|
4384
|
-
ve(
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
N.value = {
|
|
4388
|
-
title: a("consumers.errors.general")
|
|
4389
|
-
}, (ue = (ee = (H = x.error) == null ? void 0 : H.response) == null ? void 0 : ee.data) != null && ue.message && (N.value.message = x.error.response.data.message), n("error", x.error);
|
|
4372
|
+
ve(w, (O) => {
|
|
4373
|
+
if (O.status === _e.Error) {
|
|
4374
|
+
P.value = a("consumers.errors.general"), n("error", O.error);
|
|
4390
4375
|
return;
|
|
4391
4376
|
}
|
|
4392
|
-
|
|
4377
|
+
P.value = "";
|
|
4393
4378
|
});
|
|
4394
|
-
const rt =
|
|
4379
|
+
const rt = N({
|
|
4395
4380
|
ctaPath: l.value ? void 0 : t.config.createRoute,
|
|
4396
4381
|
ctaText: void 0,
|
|
4397
4382
|
message: a("consumers.list.empty_state.description"),
|
|
4398
4383
|
title: a("consumers.title")
|
|
4399
4384
|
});
|
|
4400
|
-
return
|
|
4385
|
+
return Xe(async () => {
|
|
4401
4386
|
await t.canCreate() && (rt.value.title = l.value ? a("consumers.list.empty_state.title_for_consumer_group") : a("consumers.list.empty_state.title"), rt.value.ctaText = l.value ? a("consumers.actions.add_consumer") : a("consumers.actions.create"));
|
|
4402
|
-
}), (
|
|
4403
|
-
const
|
|
4387
|
+
}), (O, z) => {
|
|
4388
|
+
const re = V("KButton"), fe = V("KBadge"), we = V("KTruncate"), Ke = V("KDropdownItem"), Nt = V("KClipboardProvider"), dr = V("KPrompt");
|
|
4404
4389
|
return m(), T("div", bl, [
|
|
4405
|
-
|
|
4390
|
+
E(g(Fs), {
|
|
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": rt.value,
|
|
4411
4396
|
"enable-entity-actions": "",
|
|
4412
|
-
"error-message":
|
|
4413
|
-
fetcher: g(
|
|
4397
|
+
"error-message": P.value,
|
|
4398
|
+
fetcher: g(A),
|
|
4414
4399
|
"fetcher-cache-key": s.value,
|
|
4415
4400
|
"pagination-type": "offset",
|
|
4416
4401
|
"preferences-storage-key": "kong-ui-entities-consumers-list",
|
|
4417
|
-
query:
|
|
4402
|
+
query: I.value,
|
|
4418
4403
|
"row-attributes": h,
|
|
4419
4404
|
"table-headers": g(u),
|
|
4420
|
-
onClearSearchInput:
|
|
4421
|
-
"onClick:row":
|
|
4405
|
+
onClearSearchInput: k,
|
|
4406
|
+
"onClick:row": z[3] || (z[3] = (J) => C(J)),
|
|
4422
4407
|
onEmptyStateCtaClicked: ir,
|
|
4423
|
-
onSort:
|
|
4408
|
+
onSort: S
|
|
4424
4409
|
}, {
|
|
4425
4410
|
"toolbar-filter": y(() => [
|
|
4426
|
-
l.value ? G("", !0) : (m(),
|
|
4411
|
+
l.value ? G("", !0) : (m(), U(g(Qs), {
|
|
4427
4412
|
key: 0,
|
|
4428
|
-
modelValue:
|
|
4429
|
-
"onUpdate:modelValue":
|
|
4430
|
-
config:
|
|
4413
|
+
modelValue: I.value,
|
|
4414
|
+
"onUpdate:modelValue": z[0] || (z[0] = (J) => I.value = J),
|
|
4415
|
+
config: b.value
|
|
4431
4416
|
}, null, 8, ["modelValue", "config"]))
|
|
4432
4417
|
]),
|
|
4433
4418
|
"toolbar-button": y(() => [
|
|
4434
|
-
|
|
4419
|
+
E(g(Re), {
|
|
4435
4420
|
"auth-function": () => e.canCreate()
|
|
4436
4421
|
}, {
|
|
4437
4422
|
default: y(() => [
|
|
4438
|
-
|
|
4423
|
+
E(re, {
|
|
4439
4424
|
appearance: "primary",
|
|
4440
4425
|
"data-testid": "toolbar-add-consumer",
|
|
4441
4426
|
icon: "plus",
|
|
4442
4427
|
to: e.config.consumerGroupId ? void 0 : e.config.createRoute,
|
|
4443
|
-
onClick:
|
|
4428
|
+
onClick: z[1] || (z[1] = () => e.config.consumerGroupId ? Tt() : void 0)
|
|
4444
4429
|
}, {
|
|
4445
4430
|
default: y(() => [
|
|
4446
|
-
W(
|
|
4431
|
+
W($(e.config.consumerGroupId ? g(a)("consumers.actions.add_consumer") : g(a)("consumers.list.toolbar_actions.new_consumer")), 1)
|
|
4447
4432
|
]),
|
|
4448
4433
|
_: 1
|
|
4449
4434
|
}, 8, ["to"])
|
|
@@ -4452,21 +4437,21 @@ const xt = (e, n) => {
|
|
|
4452
4437
|
}, 8, ["auth-function"])
|
|
4453
4438
|
]),
|
|
4454
4439
|
username: y(({ rowValue: J }) => [
|
|
4455
|
-
K("b", null,
|
|
4440
|
+
K("b", null, $(x(J)), 1)
|
|
4456
4441
|
]),
|
|
4457
4442
|
custom_id: y(({ rowValue: J }) => [
|
|
4458
|
-
W(
|
|
4443
|
+
W($(x(J)), 1)
|
|
4459
4444
|
]),
|
|
4460
4445
|
tags: y(({ rowValue: J }) => [
|
|
4461
|
-
J && J.length > 0 ? (m(),
|
|
4446
|
+
J && J.length > 0 ? (m(), U(we, { key: 0 }, {
|
|
4462
4447
|
default: y(() => [
|
|
4463
|
-
(m(!0), T(
|
|
4448
|
+
(m(!0), T(pe, null, ce(J, (xe) => (m(), U(fe, {
|
|
4464
4449
|
key: xe,
|
|
4465
|
-
onClick:
|
|
4450
|
+
onClick: z[2] || (z[2] = Ge(() => {
|
|
4466
4451
|
}, ["stop"]))
|
|
4467
4452
|
}, {
|
|
4468
4453
|
default: y(() => [
|
|
4469
|
-
W(
|
|
4454
|
+
W($(xe), 1)
|
|
4470
4455
|
]),
|
|
4471
4456
|
_: 2
|
|
4472
4457
|
}, 1024))), 128))
|
|
@@ -4475,69 +4460,69 @@ const xt = (e, n) => {
|
|
|
4475
4460
|
}, 1024)) : (m(), T("span", Cl, "-"))
|
|
4476
4461
|
]),
|
|
4477
4462
|
actions: y(({ row: J }) => [
|
|
4478
|
-
|
|
4463
|
+
E(Nt, null, {
|
|
4479
4464
|
default: y(({ copyToClipboard: xe }) => [
|
|
4480
|
-
|
|
4465
|
+
E(Ke, {
|
|
4481
4466
|
"data-testid": "action-entity-copy-id",
|
|
4482
4467
|
onClick: (pr) => R(J, xe)
|
|
4483
4468
|
}, {
|
|
4484
4469
|
default: y(() => [
|
|
4485
|
-
W(
|
|
4470
|
+
W($(g(a)("consumers.actions.copy_id")), 1)
|
|
4486
4471
|
]),
|
|
4487
4472
|
_: 2
|
|
4488
4473
|
}, 1032, ["onClick"])
|
|
4489
4474
|
]),
|
|
4490
4475
|
_: 2
|
|
4491
4476
|
}, 1024),
|
|
4492
|
-
|
|
4477
|
+
E(Nt, null, {
|
|
4493
4478
|
default: y(({ copyToClipboard: xe }) => [
|
|
4494
|
-
|
|
4479
|
+
E(Ke, {
|
|
4495
4480
|
"data-testid": "action-entity-copy-json",
|
|
4496
|
-
onClick: (pr) =>
|
|
4481
|
+
onClick: (pr) => v(J, xe)
|
|
4497
4482
|
}, {
|
|
4498
4483
|
default: y(() => [
|
|
4499
|
-
W(
|
|
4484
|
+
W($(g(a)("consumers.actions.copy_json")), 1)
|
|
4500
4485
|
]),
|
|
4501
4486
|
_: 2
|
|
4502
4487
|
}, 1032, ["onClick"])
|
|
4503
4488
|
]),
|
|
4504
4489
|
_: 2
|
|
4505
4490
|
}, 1024),
|
|
4506
|
-
|
|
4491
|
+
E(g(Re), {
|
|
4507
4492
|
"auth-function": () => e.canRetrieve(J)
|
|
4508
4493
|
}, {
|
|
4509
4494
|
default: y(() => [
|
|
4510
|
-
|
|
4495
|
+
E(Ke, {
|
|
4511
4496
|
"data-testid": "action-entity-view",
|
|
4512
4497
|
"has-divider": "",
|
|
4513
|
-
item:
|
|
4498
|
+
item: B(J.id)
|
|
4514
4499
|
}, null, 8, ["item"])
|
|
4515
4500
|
]),
|
|
4516
4501
|
_: 2
|
|
4517
4502
|
}, 1032, ["auth-function"]),
|
|
4518
|
-
|
|
4503
|
+
E(g(Re), {
|
|
4519
4504
|
"auth-function": () => e.canEdit(J)
|
|
4520
4505
|
}, {
|
|
4521
4506
|
default: y(() => [
|
|
4522
|
-
|
|
4507
|
+
E(Ke, {
|
|
4523
4508
|
"data-testid": "action-entity-edit",
|
|
4524
|
-
item:
|
|
4509
|
+
item: q(J.id)
|
|
4525
4510
|
}, null, 8, ["item"])
|
|
4526
4511
|
]),
|
|
4527
4512
|
_: 2
|
|
4528
4513
|
}, 1032, ["auth-function"]),
|
|
4529
|
-
|
|
4514
|
+
E(g(Re), {
|
|
4530
4515
|
"auth-function": () => e.canDelete(J)
|
|
4531
4516
|
}, {
|
|
4532
4517
|
default: y(() => [
|
|
4533
|
-
|
|
4518
|
+
E(Ke, {
|
|
4534
4519
|
danger: "",
|
|
4535
4520
|
"data-testid": "action-entity-delete",
|
|
4536
4521
|
"has-divider": "",
|
|
4537
|
-
onClick: () => e.config.consumerGroupId ? lr(J) :
|
|
4522
|
+
onClick: () => e.config.consumerGroupId ? lr(J) : H(J)
|
|
4538
4523
|
}, {
|
|
4539
4524
|
default: y(() => [
|
|
4540
|
-
W(
|
|
4525
|
+
W($(e.config.consumerGroupId ? g(a)("consumers.actions.remove") : g(a)("consumers.actions.delete")), 1)
|
|
4541
4526
|
]),
|
|
4542
4527
|
_: 2
|
|
4543
4528
|
}, 1032, ["onClick"])
|
|
@@ -4547,56 +4532,56 @@ const xt = (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
|
-
|
|
4535
|
+
E(g(Ls), {
|
|
4551
4536
|
"action-pending": L.value,
|
|
4552
4537
|
"data-testid": "delete-consumer-modal",
|
|
4553
4538
|
description: g(a)("consumers.delete.description"),
|
|
4554
|
-
"entity-name":
|
|
4539
|
+
"entity-name": _.value && (_.value.username || _.value.custom_id || _.value.id),
|
|
4555
4540
|
"entity-type": g(pn).Consumer,
|
|
4556
|
-
error:
|
|
4541
|
+
error: D.value,
|
|
4557
4542
|
title: g(a)("consumers.delete.title"),
|
|
4558
|
-
visible:
|
|
4559
|
-
onCancel:
|
|
4543
|
+
visible: F.value,
|
|
4544
|
+
onCancel: X,
|
|
4560
4545
|
onProceed: le
|
|
4561
4546
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4562
|
-
e.config.consumerGroupId ? (m(),
|
|
4547
|
+
e.config.consumerGroupId ? (m(), U(vl, {
|
|
4563
4548
|
key: 0,
|
|
4564
4549
|
config: e.config,
|
|
4565
4550
|
"data-testid": "add-consumer-modal",
|
|
4566
4551
|
visible: tt.value,
|
|
4567
|
-
"onAdd:partialSuccess":
|
|
4568
|
-
"onAdd:success":
|
|
4552
|
+
"onAdd:partialSuccess": z[4] || (z[4] = (J) => jt(J, !0)),
|
|
4553
|
+
"onAdd:success": z[5] || (z[5] = (J) => jt(J)),
|
|
4569
4554
|
onCancel: $t
|
|
4570
4555
|
}, null, 8, ["config", "visible"])) : G("", !0),
|
|
4571
|
-
e.config.consumerGroupId && ye.value ? (m(),
|
|
4556
|
+
e.config.consumerGroupId && ye.value ? (m(), U(dr, {
|
|
4572
4557
|
key: 1,
|
|
4573
4558
|
"data-testid": "remove-consumer-modal",
|
|
4574
4559
|
"is-visible": nt.value,
|
|
4575
4560
|
title: g(a)("consumers.consumer_groups.remove.title"),
|
|
4576
4561
|
type: "danger",
|
|
4577
|
-
onCanceled:
|
|
4562
|
+
onCanceled: Mt,
|
|
4578
4563
|
onProceed: cr
|
|
4579
4564
|
}, {
|
|
4580
4565
|
"body-content": y(() => [
|
|
4581
|
-
|
|
4566
|
+
E(g(r), {
|
|
4582
4567
|
class: "message",
|
|
4583
4568
|
keypath: e.config.consumerGroupName ? "consumers.consumer_groups.remove.confirmation" : "consumers.consumer_groups.remove.confirmationNoCG",
|
|
4584
4569
|
tag: "p"
|
|
4585
4570
|
}, be({
|
|
4586
4571
|
consumer: y(() => [
|
|
4587
|
-
K("strong", null,
|
|
4572
|
+
K("strong", null, $(ye.value.username || ye.value.custom_id || ye.value.id), 1)
|
|
4588
4573
|
]),
|
|
4589
4574
|
_: 2
|
|
4590
4575
|
}, [
|
|
4591
4576
|
e.config.consumerGroupName ? {
|
|
4592
4577
|
name: "consumerGroup",
|
|
4593
4578
|
fn: y(() => [
|
|
4594
|
-
K("strong", null,
|
|
4579
|
+
K("strong", null, $(e.config.consumerGroupName), 1)
|
|
4595
4580
|
]),
|
|
4596
4581
|
key: "0"
|
|
4597
4582
|
} : void 0
|
|
4598
4583
|
]), 1032, ["keypath"]),
|
|
4599
|
-
K("p", null,
|
|
4584
|
+
K("p", null, $(g(a)("consumers.consumer_groups.remove.description")), 1)
|
|
4600
4585
|
]),
|
|
4601
4586
|
_: 1
|
|
4602
4587
|
}, 8, ["is-visible", "title"])) : G("", !0)
|
|
@@ -4604,7 +4589,7 @@ const xt = (e, n) => {
|
|
|
4604
4589
|
};
|
|
4605
4590
|
}
|
|
4606
4591
|
});
|
|
4607
|
-
const ql = /* @__PURE__ */ xt(kl, [["__scopeId", "data-v-
|
|
4592
|
+
const ql = /* @__PURE__ */ xt(kl, [["__scopeId", "data-v-b084add6"]]), wl = { class: "kong-ui-entities-consumer-form" }, _l = { class: "fields-group-title" }, Il = { class: "fields-group-text" }, Al = /* @__PURE__ */ ee({
|
|
4608
4593
|
__name: "ConsumerForm",
|
|
4609
4594
|
props: {
|
|
4610
4595
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4622,10 +4607,10 @@ const ql = /* @__PURE__ */ xt(kl, [["__scopeId", "data-v-17811e46"]]), wl = { cl
|
|
|
4622
4607
|
},
|
|
4623
4608
|
emits: ["update", "error", "loading"],
|
|
4624
4609
|
setup(e, { emit: n }) {
|
|
4625
|
-
var
|
|
4626
|
-
const t = e, { i18nT: r, i18n: { t: a } } =
|
|
4627
|
-
headers: (
|
|
4628
|
-
}), { getMessageFromError: s } = ll(), l =
|
|
4610
|
+
var S;
|
|
4611
|
+
const t = e, { i18nT: r, i18n: { t: a } } = Qe.useI18n(), o = gt(), { axiosInstance: i } = St({
|
|
4612
|
+
headers: (S = t.config) == null ? void 0 : S.requestHeaders
|
|
4613
|
+
}), { getMessageFromError: s } = ll(), l = Ft({
|
|
4629
4614
|
fields: {
|
|
4630
4615
|
username: "",
|
|
4631
4616
|
customId: "",
|
|
@@ -4633,79 +4618,79 @@ const ql = /* @__PURE__ */ xt(kl, [["__scopeId", "data-v-17811e46"]]), wl = { cl
|
|
|
4633
4618
|
},
|
|
4634
4619
|
readonly: !1,
|
|
4635
4620
|
errorMessage: ""
|
|
4636
|
-
}), c =
|
|
4621
|
+
}), c = Ft({
|
|
4637
4622
|
username: "",
|
|
4638
4623
|
customId: "",
|
|
4639
4624
|
tags: ""
|
|
4640
|
-
}), d =
|
|
4641
|
-
var
|
|
4642
|
-
return (
|
|
4625
|
+
}), d = M(() => {
|
|
4626
|
+
var x, P;
|
|
4627
|
+
return (P = Se.form[(x = t.config) == null ? void 0 : x.app]) == null ? void 0 : P.edit;
|
|
4643
4628
|
}), u = () => {
|
|
4644
|
-
var
|
|
4645
|
-
o.push(((
|
|
4646
|
-
}, h = (
|
|
4647
|
-
n("loading",
|
|
4648
|
-
}, f = (
|
|
4649
|
-
n("error",
|
|
4650
|
-
},
|
|
4651
|
-
var R,
|
|
4652
|
-
l.fields.username = ((R =
|
|
4653
|
-
const
|
|
4654
|
-
l.fields.tags = (
|
|
4655
|
-
},
|
|
4656
|
-
var R,
|
|
4657
|
-
let
|
|
4658
|
-
return ((
|
|
4659
|
-
},
|
|
4660
|
-
var
|
|
4629
|
+
var x;
|
|
4630
|
+
o.push(((x = t.config) == null ? void 0 : x.cancelRoute) || { name: "consumer-list" });
|
|
4631
|
+
}, h = (x) => {
|
|
4632
|
+
n("loading", x);
|
|
4633
|
+
}, f = (x) => {
|
|
4634
|
+
n("error", x);
|
|
4635
|
+
}, I = (x) => {
|
|
4636
|
+
var R, v, C;
|
|
4637
|
+
l.fields.username = ((R = x == null ? void 0 : x.item) == null ? void 0 : R.username) || (x == null ? void 0 : x.username) || "", l.fields.customId = ((v = x == null ? void 0 : x.item) == null ? void 0 : v.custom_id) || (x == null ? void 0 : x.custom_id) || "";
|
|
4638
|
+
const P = ((C = x == null ? void 0 : x.item) == null ? void 0 : C.tags) || (x == null ? void 0 : x.tags) || [];
|
|
4639
|
+
l.fields.tags = (P == null ? void 0 : P.join(", ")) || "", Object.assign(c, l.fields);
|
|
4640
|
+
}, b = M(() => t.consumerId ? ut.Edit : ut.Create), p = (x) => {
|
|
4641
|
+
var R, v, C, B, q, _;
|
|
4642
|
+
let P = `${(R = t.config) == null ? void 0 : R.apiBaseUrl}${Se.form[(v = t.config) == null ? void 0 : v.app][x]}`;
|
|
4643
|
+
return ((C = t.config) == null ? void 0 : C.app) === "konnect" ? P = P.replace(/{controlPlaneId}/gi, ((B = t.config) == null ? void 0 : B.controlPlaneId) || "") : ((q = t.config) == null ? void 0 : q.app) === "kongManager" && (P = P.replace(/\/{workspace}/gi, (_ = t.config) != null && _.workspace ? `/${t.config.workspace}` : "")), P = P.replace(/{id}/gi, t.consumerId), P;
|
|
4644
|
+
}, A = M(() => !!l.fields.username || !!l.fields.customId), w = M(() => JSON.stringify(l.fields) !== JSON.stringify(c)), k = async () => {
|
|
4645
|
+
var x, P, R;
|
|
4661
4646
|
try {
|
|
4662
4647
|
l.readonly = !0;
|
|
4663
|
-
const
|
|
4648
|
+
const v = {
|
|
4664
4649
|
username: l.fields.username || null,
|
|
4665
4650
|
custom_id: l.fields.customId || null,
|
|
4666
|
-
tags: (
|
|
4651
|
+
tags: (P = (x = l.fields.tags.split(",")) == null ? void 0 : x.map((B) => String(B || "").trim())) == null ? void 0 : P.filter((B) => B !== "")
|
|
4667
4652
|
};
|
|
4668
|
-
let
|
|
4669
|
-
await i.post(p("validate"),
|
|
4670
|
-
} catch (
|
|
4671
|
-
l.errorMessage = s(
|
|
4653
|
+
let C;
|
|
4654
|
+
await i.post(p("validate"), v), b.value === "create" ? C = await i.post(p("create"), v) : b.value === "edit" && (C = ((R = t.config) == null ? void 0 : R.app) === "konnect" ? await i.put(p("edit"), v) : await i.patch(p("edit"), v)), I(C == null ? void 0 : C.data), n("update", C == null ? void 0 : C.data);
|
|
4655
|
+
} catch (v) {
|
|
4656
|
+
l.errorMessage = s(v), n("error", v);
|
|
4672
4657
|
} finally {
|
|
4673
4658
|
l.readonly = !1;
|
|
4674
4659
|
}
|
|
4675
4660
|
};
|
|
4676
|
-
return (
|
|
4677
|
-
const R =
|
|
4661
|
+
return (x, P) => {
|
|
4662
|
+
const R = V("KInput"), v = V("KCard");
|
|
4678
4663
|
return m(), T("div", wl, [
|
|
4679
|
-
|
|
4680
|
-
"can-submit":
|
|
4664
|
+
E(g(xs), {
|
|
4665
|
+
"can-submit": A.value && w.value,
|
|
4681
4666
|
config: e.config,
|
|
4682
4667
|
"edit-id": e.consumerId,
|
|
4683
4668
|
"error-message": l.errorMessage,
|
|
4684
4669
|
"fetch-url": d.value,
|
|
4685
4670
|
"is-readonly": l.readonly,
|
|
4686
4671
|
onCancel: u,
|
|
4687
|
-
"onFetch:error":
|
|
4688
|
-
"onFetch:success":
|
|
4689
|
-
onLoading:
|
|
4690
|
-
onSubmit:
|
|
4672
|
+
"onFetch:error": P[3] || (P[3] = (C) => f(C)),
|
|
4673
|
+
"onFetch:success": I,
|
|
4674
|
+
onLoading: P[4] || (P[4] = (C) => h(C)),
|
|
4675
|
+
onSubmit: k
|
|
4691
4676
|
}, {
|
|
4692
4677
|
default: y(() => [
|
|
4693
4678
|
K("div", null, [
|
|
4694
|
-
|
|
4679
|
+
E(g(il), {
|
|
4695
4680
|
description: g(a)("consumers.form.info.description"),
|
|
4696
4681
|
"has-divider": "",
|
|
4697
4682
|
title: g(a)("consumers.form.info.title")
|
|
4698
4683
|
}, {
|
|
4699
4684
|
default: y(() => [
|
|
4700
4685
|
K("div", null, [
|
|
4701
|
-
K("h5", _l,
|
|
4702
|
-
K("p", Il,
|
|
4686
|
+
K("h5", _l, $(g(a)("consumers.form.consumer_identification.title")) + "* ", 1),
|
|
4687
|
+
K("p", Il, $(g(a)("consumers.form.consumer_identification.description")), 1)
|
|
4703
4688
|
]),
|
|
4704
|
-
|
|
4689
|
+
E(v, null, {
|
|
4705
4690
|
body: y(() => [
|
|
4706
|
-
|
|
4691
|
+
E(R, {
|
|
4707
4692
|
modelValue: l.fields.username,
|
|
4708
|
-
"onUpdate:modelValue":
|
|
4693
|
+
"onUpdate:modelValue": P[0] || (P[0] = (C) => l.fields.username = C),
|
|
4709
4694
|
modelModifiers: { trim: !0 },
|
|
4710
4695
|
autocomplete: "off",
|
|
4711
4696
|
class: "username-field",
|
|
@@ -4719,21 +4704,21 @@ const ql = /* @__PURE__ */ xt(kl, [["__scopeId", "data-v-17811e46"]]), wl = { cl
|
|
|
4719
4704
|
type: "text"
|
|
4720
4705
|
}, {
|
|
4721
4706
|
"label-tooltip": y(() => [
|
|
4722
|
-
|
|
4707
|
+
E(g(r), {
|
|
4723
4708
|
keypath: "consumers.fields.username.tooltip",
|
|
4724
4709
|
scope: "global"
|
|
4725
4710
|
}, {
|
|
4726
4711
|
custom_id: y(() => [
|
|
4727
|
-
K("code", null,
|
|
4712
|
+
K("code", null, $(g(a)("consumers.fields.username.custom_id")), 1)
|
|
4728
4713
|
]),
|
|
4729
4714
|
_: 1
|
|
4730
4715
|
})
|
|
4731
4716
|
]),
|
|
4732
4717
|
_: 1
|
|
4733
4718
|
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
4734
|
-
|
|
4719
|
+
E(R, {
|
|
4735
4720
|
modelValue: l.fields.customId,
|
|
4736
|
-
"onUpdate:modelValue":
|
|
4721
|
+
"onUpdate:modelValue": P[1] || (P[1] = (C) => l.fields.customId = C),
|
|
4737
4722
|
modelModifiers: { trim: !0 },
|
|
4738
4723
|
autocomplete: "off",
|
|
4739
4724
|
"data-testid": "consumer-form-custom-id",
|
|
@@ -4746,12 +4731,12 @@ const ql = /* @__PURE__ */ xt(kl, [["__scopeId", "data-v-17811e46"]]), wl = { cl
|
|
|
4746
4731
|
type: "text"
|
|
4747
4732
|
}, {
|
|
4748
4733
|
"label-tooltip": y(() => [
|
|
4749
|
-
|
|
4734
|
+
E(g(r), {
|
|
4750
4735
|
keypath: "consumers.fields.custom_id.tooltip",
|
|
4751
4736
|
scope: "global"
|
|
4752
4737
|
}, {
|
|
4753
4738
|
username: y(() => [
|
|
4754
|
-
K("code", null,
|
|
4739
|
+
K("code", null, $(g(a)("consumers.fields.custom_id.username")), 1)
|
|
4755
4740
|
]),
|
|
4756
4741
|
_: 1
|
|
4757
4742
|
})
|
|
@@ -4761,9 +4746,9 @@ const ql = /* @__PURE__ */ xt(kl, [["__scopeId", "data-v-17811e46"]]), wl = { cl
|
|
|
4761
4746
|
]),
|
|
4762
4747
|
_: 1
|
|
4763
4748
|
}),
|
|
4764
|
-
|
|
4749
|
+
E(R, {
|
|
4765
4750
|
modelValue: l.fields.tags,
|
|
4766
|
-
"onUpdate:modelValue":
|
|
4751
|
+
"onUpdate:modelValue": P[2] || (P[2] = (C) => l.fields.tags = C),
|
|
4767
4752
|
modelModifiers: { trim: !0 },
|
|
4768
4753
|
autocomplete: "off",
|
|
4769
4754
|
"data-testid": "consumer-form-tags",
|
|
@@ -4788,7 +4773,7 @@ const ql = /* @__PURE__ */ xt(kl, [["__scopeId", "data-v-17811e46"]]), wl = { cl
|
|
|
4788
4773
|
};
|
|
4789
4774
|
}
|
|
4790
4775
|
});
|
|
4791
|
-
const Ll = /* @__PURE__ */ xt(Al, [["__scopeId", "data-v-335659fc"]]), Sl = { class: "kong-ui-consumer-entity-config-card" }, Pl = /* @__PURE__ */
|
|
4776
|
+
const Ll = /* @__PURE__ */ xt(Al, [["__scopeId", "data-v-335659fc"]]), Sl = { class: "kong-ui-consumer-entity-config-card" }, Pl = /* @__PURE__ */ ee({
|
|
4792
4777
|
__name: "ConsumerConfigCard",
|
|
4793
4778
|
props: {
|
|
4794
4779
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4815,15 +4800,15 @@ const Ll = /* @__PURE__ */ xt(Al, [["__scopeId", "data-v-335659fc"]]), Sl = { cl
|
|
|
4815
4800
|
},
|
|
4816
4801
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
4817
4802
|
setup(e) {
|
|
4818
|
-
const n = e, { i18n: { t }, i18nT: r } =
|
|
4803
|
+
const n = e, { i18n: { t }, i18nT: r } = Qe.useI18n(), a = M(() => Se.form[n.config.app].edit), o = N({
|
|
4819
4804
|
id: {},
|
|
4820
4805
|
username: {
|
|
4821
|
-
section:
|
|
4806
|
+
section: ue.Basic,
|
|
4822
4807
|
tooltip: t("consumers.fields.username.tooltip"),
|
|
4823
4808
|
order: 1
|
|
4824
4809
|
},
|
|
4825
4810
|
custom_id: {
|
|
4826
|
-
section:
|
|
4811
|
+
section: ue.Basic,
|
|
4827
4812
|
tooltip: t("consumers.fields.custom_id.tooltip"),
|
|
4828
4813
|
label: t("consumers.fields.custom_id.label"),
|
|
4829
4814
|
order: 2
|
|
@@ -4841,7 +4826,7 @@ const Ll = /* @__PURE__ */ xt(Al, [["__scopeId", "data-v-335659fc"]]), Sl = { cl
|
|
|
4841
4826
|
}
|
|
4842
4827
|
});
|
|
4843
4828
|
return (i, s) => (m(), T("div", Sl, [
|
|
4844
|
-
|
|
4829
|
+
E(g(_s), {
|
|
4845
4830
|
config: e.config,
|
|
4846
4831
|
"config-card-doc": e.configCardDoc,
|
|
4847
4832
|
"config-schema": o.value,
|
|
@@ -4853,23 +4838,23 @@ const Ll = /* @__PURE__ */ xt(Al, [["__scopeId", "data-v-335659fc"]]), Sl = { cl
|
|
|
4853
4838
|
onLoading: s[3] || (s[3] = (l) => i.$emit("loading", l))
|
|
4854
4839
|
}, {
|
|
4855
4840
|
"username-label-tooltip": y(() => [
|
|
4856
|
-
|
|
4841
|
+
E(g(r), {
|
|
4857
4842
|
keypath: "consumers.fields.username.tooltip",
|
|
4858
4843
|
scope: "global"
|
|
4859
4844
|
}, {
|
|
4860
4845
|
custom_id: y(() => [
|
|
4861
|
-
K("code", null,
|
|
4846
|
+
K("code", null, $(g(t)("consumers.fields.username.custom_id")), 1)
|
|
4862
4847
|
]),
|
|
4863
4848
|
_: 1
|
|
4864
4849
|
})
|
|
4865
4850
|
]),
|
|
4866
4851
|
"custom_id-label-tooltip": y(() => [
|
|
4867
|
-
|
|
4852
|
+
E(g(r), {
|
|
4868
4853
|
keypath: "consumers.fields.custom_id.tooltip",
|
|
4869
4854
|
scope: "global"
|
|
4870
4855
|
}, {
|
|
4871
4856
|
username: y(() => [
|
|
4872
|
-
K("code", null,
|
|
4857
|
+
K("code", null, $(g(t)("consumers.fields.custom_id.username")), 1)
|
|
4873
4858
|
]),
|
|
4874
4859
|
_: 1
|
|
4875
4860
|
})
|