@kong-ui-public/entities-keys 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-keys.es.js +818 -788
- package/dist/entities-keys.umd.js +10 -10
- package/dist/style.css +1 -1
- package/dist/types/components/KeyConfigCard.vue.d.ts +15 -0
- package/dist/types/components/KeyConfigCard.vue.d.ts.map +1 -1
- package/dist/types/components/KeyForm.vue.d.ts +13 -0
- package/dist/types/components/KeyForm.vue.d.ts.map +1 -1
- package/dist/types/keys-endpoints.d.ts +16 -4
- package/dist/types/keys-endpoints.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/entities-keys.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as re, ref as
|
|
1
|
+
import { defineComponent as re, ref as $, computed as x, watch as ke, renderSlot as X, createCommentVNode as D, unref as g, resolveComponent as N, openBlock as m, createElementBlock as j, createVNode as K, withCtx as k, createTextVNode as te, toDisplayString as E, useCssVars as Ha, useSlots as et, createElementVNode as q, createSlots as Ie, createBlock as L, resolveDynamicComponent as Pe, normalizeProps as za, guardReactiveProps as Ya, Fragment as me, renderList as ye, mergeProps as lt, normalizeClass as xe, onBeforeMount as tt, withModifiers as ze, withDirectives as We, vShow as He, onMounted as Ga, onUnmounted as Za, inject as Xa, normalizeStyle as Qa, pushScopeId as en, popScopeId as tn, reactive as It } from "vue";
|
|
2
2
|
import { useRouter as ft } from "vue-router";
|
|
3
3
|
import { createI18n as yt, i18nTComponent as Gt } from "@kong-ui-public/i18n";
|
|
4
4
|
import an from "axios";
|
|
@@ -128,7 +128,7 @@ function ln() {
|
|
|
128
128
|
}
|
|
129
129
|
const mt = {
|
|
130
130
|
useI18n: ln
|
|
131
|
-
},
|
|
131
|
+
}, Se = {
|
|
132
132
|
list: {
|
|
133
133
|
konnect: {
|
|
134
134
|
all: "/api/runtime_groups/{controlPlaneId}/keys",
|
|
@@ -141,20 +141,32 @@ const mt = {
|
|
|
141
141
|
},
|
|
142
142
|
form: {
|
|
143
143
|
konnect: {
|
|
144
|
-
create:
|
|
145
|
-
|
|
144
|
+
create: {
|
|
145
|
+
all: "/api/runtime_groups/{controlPlaneId}/keys",
|
|
146
|
+
forKeySet: "/api/runtime_groups/{controlPlaneId}/key-sets/{keySetId}/keys"
|
|
147
|
+
},
|
|
148
|
+
edit: {
|
|
149
|
+
all: "/api/runtime_groups/{controlPlaneId}/keys/{id}",
|
|
150
|
+
forKeySet: "/api/runtime_groups/{controlPlaneId}/key-sets/{keySetId}/keys/{id}"
|
|
151
|
+
},
|
|
146
152
|
keySets: "/api/runtime_groups/{controlPlaneId}/key-sets",
|
|
147
153
|
getKeySet: "/api/runtime_groups/{controlPlaneId}/key-sets/{keySetId}"
|
|
148
154
|
},
|
|
149
155
|
kongManager: {
|
|
150
|
-
create:
|
|
151
|
-
|
|
156
|
+
create: {
|
|
157
|
+
all: "/{workspace}/keys",
|
|
158
|
+
forKeySet: "/{workspace}/key-sets/{keySetId}/keys"
|
|
159
|
+
},
|
|
160
|
+
edit: {
|
|
161
|
+
all: "/{workspace}/keys/{id}",
|
|
162
|
+
forKeySet: "/{workspace}/key-sets/{keySetId}/keys/{id}"
|
|
163
|
+
},
|
|
152
164
|
keySets: "/{workspace}/key-sets",
|
|
153
165
|
getKeySet: "/{workspace}/key-sets/{keySetId}"
|
|
154
166
|
}
|
|
155
167
|
}
|
|
156
168
|
};
|
|
157
|
-
var Zt = /* @__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))(Zt || {}), Be = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(Be || {}),
|
|
169
|
+
var Zt = /* @__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))(Zt || {}), Be = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(Be || {}), je = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(je || {}), G = /* @__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))(G || {}), pe = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(pe || {});
|
|
158
170
|
function gt(e = {}) {
|
|
159
171
|
return {
|
|
160
172
|
axiosInstance: an.create({
|
|
@@ -334,79 +346,79 @@ function bn(e, a, t, n = {
|
|
|
334
346
|
t || (t = "100");
|
|
335
347
|
const { axiosInstance: i } = gt({
|
|
336
348
|
headers: e.requestHeaders
|
|
337
|
-
}), { i18n: { t: o } } = ht(), { debounce: r } = sn(), s = r(async (
|
|
338
|
-
await w
|
|
339
|
-
}, 200), c =
|
|
349
|
+
}), { i18n: { t: o } } = ht(), { debounce: r } = sn(), s = r(async (w) => {
|
|
350
|
+
await _(w);
|
|
351
|
+
}, 200), c = $(!1), l = $(""), d = $(""), u = $([]), h = $([]), y = $(void 0), I = g(a);
|
|
340
352
|
let C = `${e.apiBaseUrl}${I}`;
|
|
341
353
|
e.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
342
|
-
const { isValidUuid: p } = Xt(),
|
|
354
|
+
const { isValidUuid: p } = Xt(), f = async () => {
|
|
343
355
|
try {
|
|
344
356
|
c.value = !0;
|
|
345
|
-
const { data:
|
|
346
|
-
|
|
357
|
+
const { data: w } = await i.get(`${C}?size=${t}`);
|
|
358
|
+
w != null && w.next || (y.value = n.fetchedItemsKey in w ? w[n.fetchedItemsKey] : []), h.value = n.fetchedItemsKey in w ? w[n.fetchedItemsKey] : [], u.value = h.value;
|
|
347
359
|
} catch {
|
|
348
360
|
u.value = [], l.value = o("debouncedFilter.errors.fetch");
|
|
349
361
|
} finally {
|
|
350
362
|
c.value = !1;
|
|
351
363
|
}
|
|
352
|
-
}, v =
|
|
353
|
-
var
|
|
354
|
-
if (v.value !==
|
|
355
|
-
if (v.value =
|
|
364
|
+
}, v = $(""), _ = async (w) => {
|
|
365
|
+
var Z, P, W;
|
|
366
|
+
if (v.value !== w)
|
|
367
|
+
if (v.value = w || "", y.value === void 0)
|
|
356
368
|
try {
|
|
357
369
|
if (c.value = !0, l.value = "", d.value = "", e.app === "konnect") {
|
|
358
370
|
let S = C + "";
|
|
359
|
-
|
|
360
|
-
const { data:
|
|
361
|
-
n.fetchedItemsKey in
|
|
362
|
-
} else if (
|
|
371
|
+
w && (S += `/${w}`);
|
|
372
|
+
const { data: B } = await i.get(`${S}?size=${t}`);
|
|
373
|
+
n.fetchedItemsKey in B ? u.value = B[n.fetchedItemsKey] : B != null && B.id ? u.value = [B] : u.value = [];
|
|
374
|
+
} else if (w) {
|
|
363
375
|
const S = [];
|
|
364
|
-
p(
|
|
365
|
-
const { data:
|
|
366
|
-
return [
|
|
376
|
+
p(w) && n.searchKeys.includes("id") ? S.push((async () => {
|
|
377
|
+
const { data: M } = await i.get(`${C}/${w}`);
|
|
378
|
+
return [M[n.fetchedItemsKey] ?? M];
|
|
367
379
|
})()) : S.push(
|
|
368
|
-
...n.searchKeys.filter((
|
|
369
|
-
const { data:
|
|
370
|
-
return
|
|
380
|
+
...n.searchKeys.filter((M) => M !== "id").map(async (M) => {
|
|
381
|
+
const { data: R } = await i.get(`${C}?${M}=${w}`);
|
|
382
|
+
return R[n.fetchedItemsKey];
|
|
371
383
|
})
|
|
372
384
|
);
|
|
373
|
-
const
|
|
374
|
-
u.value = [], (
|
|
375
|
-
var
|
|
376
|
-
(
|
|
385
|
+
const B = await Promise.all(S), O = /* @__PURE__ */ new Set();
|
|
386
|
+
u.value = [], (Z = B == null ? void 0 : B.forEach) == null || Z.call(B, (M) => {
|
|
387
|
+
var R;
|
|
388
|
+
(R = M == null ? void 0 : M.forEach) == null || R.call(M, (U) => {
|
|
377
389
|
O.has(U.id) || (O.add(U.id), u.value.push(U));
|
|
378
390
|
});
|
|
379
391
|
});
|
|
380
392
|
} else
|
|
381
393
|
u.value = h.value;
|
|
382
394
|
} catch (S) {
|
|
383
|
-
((
|
|
395
|
+
((P = S == null ? void 0 : S.response) == null ? void 0 : P.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (u.value = [], l.value = o("debouncedFilter.errors.fetch"));
|
|
384
396
|
} finally {
|
|
385
397
|
c.value = !1;
|
|
386
398
|
}
|
|
387
399
|
else
|
|
388
|
-
c.value = !0, d.value = "",
|
|
389
|
-
var
|
|
400
|
+
c.value = !0, d.value = "", w ? (u.value = (W = y.value) == null ? void 0 : W.filter((S) => {
|
|
401
|
+
var B;
|
|
390
402
|
let O = !1;
|
|
391
|
-
for (const
|
|
392
|
-
const
|
|
393
|
-
|
|
403
|
+
for (const M of n.searchKeys) {
|
|
404
|
+
const R = typeof S[M] == "string" ? (B = S[M]) == null ? void 0 : B.toLowerCase() : S[M];
|
|
405
|
+
R != null && R.includes(w.toLowerCase()) && (O = !0);
|
|
394
406
|
}
|
|
395
407
|
return O;
|
|
396
|
-
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid"))) : u.value =
|
|
408
|
+
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid"))) : u.value = y.value, c.value = !1;
|
|
397
409
|
};
|
|
398
410
|
return {
|
|
399
411
|
loading: c,
|
|
400
412
|
error: l,
|
|
401
413
|
validationError: d,
|
|
402
414
|
results: u,
|
|
403
|
-
allRecords:
|
|
404
|
-
loadItems:
|
|
415
|
+
allRecords: y,
|
|
416
|
+
loadItems: f,
|
|
405
417
|
debouncedQueryChange: s
|
|
406
418
|
};
|
|
407
419
|
}
|
|
408
420
|
function Cn(e, a) {
|
|
409
|
-
const t =
|
|
421
|
+
const t = g(a), n = x(
|
|
410
422
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
411
423
|
);
|
|
412
424
|
return n.value.search = "", (i) => `${n.value.href}/${i}`;
|
|
@@ -440,7 +452,7 @@ function wn() {
|
|
|
440
452
|
};
|
|
441
453
|
}
|
|
442
454
|
function Qt(e, a) {
|
|
443
|
-
const t =
|
|
455
|
+
const t = $(g(e)), n = $(g(a)), i = x(
|
|
444
456
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
445
457
|
), o = x(
|
|
446
458
|
() => n.value.startsWith("/") ? new URL(`${window.location.origin}${n.value}`) : new URL(n.value)
|
|
@@ -448,24 +460,24 @@ function Qt(e, a) {
|
|
|
448
460
|
return (r) => {
|
|
449
461
|
const { page: s, pageSize: c, offset: l, sortColumnKey: d, sortColumnOrder: u, query: h } = r;
|
|
450
462
|
try {
|
|
451
|
-
let
|
|
452
|
-
return i.value && h ? (
|
|
453
|
-
|
|
454
|
-
}), d &&
|
|
455
|
-
} catch (
|
|
456
|
-
return console.error("RouteList(fetcher)",
|
|
463
|
+
let y = new URL(o.value.href);
|
|
464
|
+
return i.value && h ? (y.search = "", y = new URL(`${y.href}/${h}/`)) : (i.value || new URLSearchParams(h).forEach((I, C) => {
|
|
465
|
+
y.searchParams.append(C, I);
|
|
466
|
+
}), d && y.searchParams.append("sort_by", d), u === "desc" && y.searchParams.append("sort_desc", "1"), y.searchParams.append("size", String(c))), l && s !== 1 && y.searchParams.append("offset", String(l)), y.href;
|
|
467
|
+
} catch (y) {
|
|
468
|
+
return console.error("RouteList(fetcher)", y), n.value;
|
|
457
469
|
}
|
|
458
470
|
};
|
|
459
471
|
}
|
|
460
472
|
function _n(e, a, t = "data") {
|
|
461
|
-
const n =
|
|
473
|
+
const n = g(a), { axiosInstance: i } = gt({
|
|
462
474
|
headers: e.requestHeaders
|
|
463
|
-
}), o = Qt(e, n), r =
|
|
464
|
-
status:
|
|
475
|
+
}), o = Qt(e, n), r = $({
|
|
476
|
+
status: je.Idle
|
|
465
477
|
});
|
|
466
478
|
return { fetcher: async (s) => {
|
|
467
479
|
try {
|
|
468
|
-
r.value = { status:
|
|
480
|
+
r.value = { status: je.Loading };
|
|
469
481
|
const c = o(s), { data: l } = await i.get(c), d = t && t.replace(/[^\w-_]/gi, "");
|
|
470
482
|
let u;
|
|
471
483
|
l[d] && Array.isArray(l[d]) ? u = l[d] : u = Object.keys(l).length ? [l] : [];
|
|
@@ -479,7 +491,7 @@ function _n(e, a, t = "data") {
|
|
|
479
491
|
} : null
|
|
480
492
|
};
|
|
481
493
|
return r.value = {
|
|
482
|
-
status:
|
|
494
|
+
status: je.Idle,
|
|
483
495
|
response: h
|
|
484
496
|
}, h;
|
|
485
497
|
} catch (c) {
|
|
@@ -488,11 +500,11 @@ function _n(e, a, t = "data") {
|
|
|
488
500
|
total: 0
|
|
489
501
|
};
|
|
490
502
|
return s.query && c.response.status === 404 ? (r.value = {
|
|
491
|
-
status:
|
|
503
|
+
status: je.NoResults,
|
|
492
504
|
response: l,
|
|
493
505
|
error: c
|
|
494
506
|
}, l) : (r.value = {
|
|
495
|
-
status:
|
|
507
|
+
status: je.Error,
|
|
496
508
|
response: l,
|
|
497
509
|
error: c
|
|
498
510
|
}, l);
|
|
@@ -529,7 +541,7 @@ const ea = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
529
541
|
}, xn = (e, a) => {
|
|
530
542
|
const t = At(e), n = At(a), i = t.pop(), o = n.pop(), r = jt(t, n);
|
|
531
543
|
return r !== 0 ? r : i && o ? jt(i.split("."), o.split(".")) : i || o ? i ? -1 : 1 : 0;
|
|
532
|
-
},
|
|
544
|
+
}, Kt = (e, a, t) => {
|
|
533
545
|
Tn(t);
|
|
534
546
|
const n = xn(e, a);
|
|
535
547
|
return ta[t].includes(n);
|
|
@@ -540,13 +552,13 @@ const ea = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
540
552
|
"<=": [-1, 0],
|
|
541
553
|
"<": [-1],
|
|
542
554
|
"!=": [-1, 1]
|
|
543
|
-
},
|
|
555
|
+
}, $t = Object.keys(ta), Tn = (e) => {
|
|
544
556
|
if (typeof e != "string")
|
|
545
557
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
546
|
-
if (
|
|
547
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
558
|
+
if ($t.indexOf(e) === -1)
|
|
559
|
+
throw new Error(`Invalid operator, expected one of ${$t.join("|")}`);
|
|
548
560
|
}, jn = (e) => typeof e == "string" && /^[v\d]/.test(e) && ea.test(e);
|
|
549
|
-
function
|
|
561
|
+
function Kn(e) {
|
|
550
562
|
const { gatewayInfo: a, supportedRange: t } = e;
|
|
551
563
|
if (!a)
|
|
552
564
|
return !0;
|
|
@@ -557,11 +569,11 @@ function $n(e) {
|
|
|
557
569
|
if (!o)
|
|
558
570
|
return !1;
|
|
559
571
|
const [r, s] = o;
|
|
560
|
-
return !(r &&
|
|
572
|
+
return !(r && Kt(i, r, "<") || s && Kt(i, s, ">"));
|
|
561
573
|
}
|
|
562
|
-
function
|
|
563
|
-
const a =
|
|
564
|
-
return
|
|
574
|
+
function $n(e) {
|
|
575
|
+
const a = $(0), t = $(0), n = $(!1);
|
|
576
|
+
return ke(e, (i) => {
|
|
565
577
|
i && !n.value && (a.value = i.offsetWidth, t.value = i.scrollWidth, n.value = !0);
|
|
566
578
|
}), {
|
|
567
579
|
isTruncated: x(() => a.value < t.value)
|
|
@@ -577,8 +589,8 @@ const se = {
|
|
|
577
589
|
useHelpers: Xt,
|
|
578
590
|
useStringHelpers: Sn,
|
|
579
591
|
useI18n: ht,
|
|
580
|
-
useGatewayFeatureSupported:
|
|
581
|
-
useTruncationDetector:
|
|
592
|
+
useGatewayFeatureSupported: Kn,
|
|
593
|
+
useTruncationDetector: $n
|
|
582
594
|
}, On = {
|
|
583
595
|
fail: "Failed to copy id to clipboard",
|
|
584
596
|
success: {
|
|
@@ -639,7 +651,7 @@ const se = {
|
|
|
639
651
|
placement: "bottomStart"
|
|
640
652
|
} : {
|
|
641
653
|
title: t.uuid
|
|
642
|
-
}), r = x(() => !!(t.tooltip && t.successTooltip)), s =
|
|
654
|
+
}), r = x(() => !!(t.tooltip && t.successTooltip)), s = $(t.tooltip), c = x(() => t.tooltip ? {
|
|
643
655
|
label: s.value,
|
|
644
656
|
positionFixed: !0,
|
|
645
657
|
maxWidth: "500px",
|
|
@@ -656,44 +668,44 @@ const se = {
|
|
|
656
668
|
}), r.value ? d(n("message.fail")) : a("error", t.uuid);
|
|
657
669
|
return;
|
|
658
670
|
}
|
|
659
|
-
const
|
|
671
|
+
const y = t.uuid.length > Ot, I = t.format === "hidden" || t.format === "redacted" ? n("message.success.prefix") : `"${t.uuid.substring(0, Ot) + (y ? "..." : "")}"`;
|
|
660
672
|
typeof i == "function" && i({
|
|
661
673
|
type: "success",
|
|
662
674
|
message: `${I}${n("message.success.content")}`
|
|
663
675
|
}), r.value ? d(t.successTooltip) : a("success", t.uuid);
|
|
664
676
|
};
|
|
665
|
-
return (h,
|
|
666
|
-
const I =
|
|
667
|
-
return
|
|
668
|
-
e.format !== "hidden" ? (
|
|
677
|
+
return (h, y) => {
|
|
678
|
+
const I = N("KIcon"), C = N("KClipboardProvider");
|
|
679
|
+
return m(), j("div", Nn, [
|
|
680
|
+
e.format !== "hidden" ? (m(), L(Pe(e.idTooltip ? "KTooltip" : "div"), lt({ key: 0 }, o.value, { "data-testid": "copy-id" }), {
|
|
669
681
|
default: k(() => [
|
|
670
|
-
|
|
671
|
-
class:
|
|
682
|
+
q("div", {
|
|
683
|
+
class: xe([
|
|
672
684
|
"uuid-container",
|
|
673
685
|
e.truncated ? "truncated-uuid" : null,
|
|
674
686
|
e.useMono ? "mono" : null
|
|
675
687
|
])
|
|
676
|
-
},
|
|
688
|
+
}, E(l.value), 3)
|
|
677
689
|
]),
|
|
678
690
|
_: 1
|
|
679
691
|
}, 16)) : D("", !0),
|
|
680
|
-
(
|
|
692
|
+
(m(), L(Pe(e.tooltip ? "KTooltip" : "div"), lt(c.value, { class: "uuid-icon-wrapper" }), {
|
|
681
693
|
default: k(() => [
|
|
682
|
-
|
|
694
|
+
K(C, null, {
|
|
683
695
|
default: k(({ copyToClipboard: p }) => [
|
|
684
|
-
|
|
696
|
+
q("span", {
|
|
685
697
|
"data-testid": "copy-to-clipboard",
|
|
686
698
|
role: "button",
|
|
687
699
|
tabindex: "0",
|
|
688
|
-
onClick: ze((
|
|
700
|
+
onClick: ze((f) => u(p), ["stop"])
|
|
689
701
|
}, [
|
|
690
|
-
|
|
702
|
+
K(I, {
|
|
691
703
|
class: "uuid-icon",
|
|
692
704
|
color: e.iconColor,
|
|
693
705
|
"hide-title": !!e.tooltip || void 0,
|
|
694
706
|
icon: "copy",
|
|
695
707
|
size: "16",
|
|
696
|
-
title:
|
|
708
|
+
title: g(n)("iconTitle")
|
|
697
709
|
}, null, 8, ["color", "hide-title", "title"])
|
|
698
710
|
], 8, Bn)
|
|
699
711
|
]),
|
|
@@ -710,10 +722,10 @@ const se = {
|
|
|
710
722
|
for (const [n, i] of a)
|
|
711
723
|
t[n] = i;
|
|
712
724
|
return t;
|
|
713
|
-
}, aa = /* @__PURE__ */ Pn(Ln, [["__scopeId", "data-v-bfdaf6f7"]]),
|
|
725
|
+
}, aa = /* @__PURE__ */ Pn(Ln, [["__scopeId", "data-v-bfdaf6f7"]]), qn = {
|
|
714
726
|
key: 0,
|
|
715
727
|
class: "config-card-fieldset-title"
|
|
716
|
-
},
|
|
728
|
+
}, Rn = /* @__PURE__ */ re({
|
|
717
729
|
__name: "JsonCardItem",
|
|
718
730
|
props: {
|
|
719
731
|
item: {
|
|
@@ -737,18 +749,18 @@ const se = {
|
|
|
737
749
|
var c;
|
|
738
750
|
return a.isArrayItem ? (c = o.value) != null && c.name ? n(o.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: a.index }) : "";
|
|
739
751
|
});
|
|
740
|
-
return (c, l) => (
|
|
741
|
-
class:
|
|
752
|
+
return (c, l) => (m(), L(Pe(e.isArrayItem ? "fieldset" : "div"), {
|
|
753
|
+
class: xe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
742
754
|
}, {
|
|
743
755
|
default: k(() => [
|
|
744
|
-
e.isArrayItem ? (
|
|
745
|
-
|
|
756
|
+
e.isArrayItem ? (m(), j("legend", qn, [
|
|
757
|
+
q("b", null, E(s.value), 1)
|
|
746
758
|
])) : D("", !0),
|
|
747
|
-
(
|
|
759
|
+
(m(!0), j(me, null, ye(Object.keys(r.value), (d, u) => (m(), L(qe, {
|
|
748
760
|
key: `${i.value}-property-${u}`,
|
|
749
761
|
item: {
|
|
750
762
|
key: d,
|
|
751
|
-
label:
|
|
763
|
+
label: g(n)(d),
|
|
752
764
|
value: r.value[d]
|
|
753
765
|
}
|
|
754
766
|
}, null, 8, ["item"]))), 128))
|
|
@@ -761,7 +773,7 @@ const se = {
|
|
|
761
773
|
for (const [n, i] of a)
|
|
762
774
|
t[n] = i;
|
|
763
775
|
return t;
|
|
764
|
-
}, na = /* @__PURE__ */ Ce(
|
|
776
|
+
}, na = /* @__PURE__ */ Ce(Rn, [["__scopeId", "data-v-68ca83ec"]]), Un = /* @__PURE__ */ re({
|
|
765
777
|
__name: "InternalLinkItem",
|
|
766
778
|
props: {
|
|
767
779
|
item: {
|
|
@@ -773,15 +785,15 @@ const se = {
|
|
|
773
785
|
setup(e) {
|
|
774
786
|
const { i18n: { t: a } } = se.useI18n();
|
|
775
787
|
return (t, n) => {
|
|
776
|
-
const i =
|
|
777
|
-
return
|
|
778
|
-
|
|
788
|
+
const i = N("KButton");
|
|
789
|
+
return m(), j("div", null, [
|
|
790
|
+
K(i, {
|
|
779
791
|
appearance: "btn-link",
|
|
780
792
|
class: "navigation-button",
|
|
781
793
|
onClick: n[0] || (n[0] = (o) => t.$emit("navigation-click", e.item))
|
|
782
794
|
}, {
|
|
783
795
|
default: k(() => [
|
|
784
|
-
te(
|
|
796
|
+
te(E(e.item.value || g(a)("baseConfigCard.commonFields.link")), 1)
|
|
785
797
|
]),
|
|
786
798
|
_: 1
|
|
787
799
|
})
|
|
@@ -799,12 +811,12 @@ const se = {
|
|
|
799
811
|
setup(e) {
|
|
800
812
|
const { i18n: { t: a } } = se.useI18n();
|
|
801
813
|
return (t, n) => {
|
|
802
|
-
const i =
|
|
803
|
-
return
|
|
814
|
+
const i = N("KBadge");
|
|
815
|
+
return m(), L(i, {
|
|
804
816
|
appearance: e.status ? "success" : "neutral"
|
|
805
817
|
}, {
|
|
806
818
|
default: k(() => [
|
|
807
|
-
te(
|
|
819
|
+
te(E(e.status ? g(a)("baseConfigCard.statusBadge.enabledLabel") : g(a)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
808
820
|
]),
|
|
809
821
|
_: 1
|
|
810
822
|
}, 8, ["appearance"]);
|
|
@@ -834,15 +846,15 @@ const se = {
|
|
|
834
846
|
emits: ["navigation-click"],
|
|
835
847
|
setup(e, { emit: a }) {
|
|
836
848
|
const t = e;
|
|
837
|
-
Ha((
|
|
838
|
-
"1df60db4": l.value ? "none" : `solid ${
|
|
849
|
+
Ha((y) => ({
|
|
850
|
+
"1df60db4": l.value ? "none" : `solid ${g(Hn)} ${g(Jn)}`,
|
|
839
851
|
"21d1d34e": c.value && r.value ? "block" : "flex",
|
|
840
852
|
"4d3dc7e7": c.value && r.value ? "100%" : t.slim ? "50%" : "25%",
|
|
841
853
|
"4d400dc2": c.value && r.value ? "100%" : t.slim ? "50%" : "75%"
|
|
842
854
|
}));
|
|
843
|
-
const n = et(), { i18n: { t: i, formatUnixTimeStamp: o } } = se.useI18n(), r = x(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = x(() => !!(t.item.tooltip || n["label-tooltip"])), c = x(() => t.item.type ===
|
|
855
|
+
const n = et(), { i18n: { t: i, formatUnixTimeStamp: o } } = se.useI18n(), r = x(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = x(() => !!(t.item.tooltip || n["label-tooltip"])), c = x(() => t.item.type === G.Json || t.item.type === G.JsonArray), l = x(() => t.item.type === G.JsonArray), d = x(() => {
|
|
844
856
|
switch (t.item.type) {
|
|
845
|
-
case
|
|
857
|
+
case G.ID:
|
|
846
858
|
return {
|
|
847
859
|
tag: "CopyUuid",
|
|
848
860
|
attrs: {
|
|
@@ -855,7 +867,7 @@ const se = {
|
|
|
855
867
|
}
|
|
856
868
|
}
|
|
857
869
|
};
|
|
858
|
-
case
|
|
870
|
+
case G.IdArray:
|
|
859
871
|
return {
|
|
860
872
|
tag: "div",
|
|
861
873
|
additionalComponent: "CopyUuid",
|
|
@@ -867,7 +879,7 @@ const se = {
|
|
|
867
879
|
}
|
|
868
880
|
}
|
|
869
881
|
};
|
|
870
|
-
case
|
|
882
|
+
case G.Redacted:
|
|
871
883
|
return {
|
|
872
884
|
tag: "CopyUuid",
|
|
873
885
|
attrs: {
|
|
@@ -881,7 +893,7 @@ const se = {
|
|
|
881
893
|
}
|
|
882
894
|
}
|
|
883
895
|
};
|
|
884
|
-
case
|
|
896
|
+
case G.RedactedArray:
|
|
885
897
|
return {
|
|
886
898
|
tag: "div",
|
|
887
899
|
additionalComponent: "CopyUuid",
|
|
@@ -894,7 +906,7 @@ const se = {
|
|
|
894
906
|
}
|
|
895
907
|
}
|
|
896
908
|
};
|
|
897
|
-
case
|
|
909
|
+
case G.Date:
|
|
898
910
|
return {
|
|
899
911
|
tag: "div",
|
|
900
912
|
attrs: {
|
|
@@ -902,7 +914,7 @@ const se = {
|
|
|
902
914
|
},
|
|
903
915
|
text: o(t.item.value)
|
|
904
916
|
};
|
|
905
|
-
case
|
|
917
|
+
case G.BadgeStatus:
|
|
906
918
|
return {
|
|
907
919
|
tag: "StatusBadge",
|
|
908
920
|
attrs: {
|
|
@@ -910,28 +922,28 @@ const se = {
|
|
|
910
922
|
status: t.item.value
|
|
911
923
|
}
|
|
912
924
|
};
|
|
913
|
-
case
|
|
925
|
+
case G.BadgeTag:
|
|
914
926
|
return {
|
|
915
927
|
tag: "div",
|
|
916
928
|
additionalComponent: "KBadge"
|
|
917
929
|
};
|
|
918
|
-
case
|
|
930
|
+
case G.BadgeMethod:
|
|
919
931
|
return {
|
|
920
932
|
tag: "div",
|
|
921
933
|
additionalComponent: "KMethodBadge"
|
|
922
934
|
};
|
|
923
|
-
case
|
|
935
|
+
case G.LinkInternal:
|
|
924
936
|
return {
|
|
925
937
|
tag: "InternalLinkItem",
|
|
926
938
|
attrs: {
|
|
927
939
|
"data-testid": `${t.item.key}-internal-link`,
|
|
928
940
|
item: t.item,
|
|
929
|
-
onNavigationClick: (
|
|
930
|
-
a("navigation-click",
|
|
941
|
+
onNavigationClick: (y) => {
|
|
942
|
+
a("navigation-click", y);
|
|
931
943
|
}
|
|
932
944
|
}
|
|
933
945
|
};
|
|
934
|
-
case
|
|
946
|
+
case G.LinkExternal:
|
|
935
947
|
return {
|
|
936
948
|
tag: "KExternalLink",
|
|
937
949
|
attrs: {
|
|
@@ -940,7 +952,7 @@ const se = {
|
|
|
940
952
|
},
|
|
941
953
|
text: t.item.value
|
|
942
954
|
};
|
|
943
|
-
case
|
|
955
|
+
case G.Json:
|
|
944
956
|
return {
|
|
945
957
|
tag: "JsonCardItem",
|
|
946
958
|
attrs: {
|
|
@@ -948,7 +960,7 @@ const se = {
|
|
|
948
960
|
item: t.item
|
|
949
961
|
}
|
|
950
962
|
};
|
|
951
|
-
case
|
|
963
|
+
case G.JsonArray:
|
|
952
964
|
return {
|
|
953
965
|
tag: "div",
|
|
954
966
|
additionalComponent: "JsonCardItem",
|
|
@@ -966,29 +978,29 @@ const se = {
|
|
|
966
978
|
text: t.item.value
|
|
967
979
|
};
|
|
968
980
|
}
|
|
969
|
-
}), u =
|
|
970
|
-
return (
|
|
971
|
-
const C =
|
|
972
|
-
return
|
|
973
|
-
|
|
981
|
+
}), u = $(), { isTruncated: h } = se.useTruncationDetector(u);
|
|
982
|
+
return (y, I) => {
|
|
983
|
+
const C = N("KLabel"), p = N("KBadge"), f = N("KMethodBadge"), v = N("KTooltip");
|
|
984
|
+
return m(), j("div", Yn, [
|
|
985
|
+
q("div", {
|
|
974
986
|
class: "config-card-details-label",
|
|
975
987
|
"data-testid": `${e.item.key}-label`
|
|
976
988
|
}, [
|
|
977
|
-
X(
|
|
978
|
-
|
|
989
|
+
X(y.$slots, "label", { item: e.item }, () => [
|
|
990
|
+
K(C, { "tooltip-attributes": { maxWidth: "500px" } }, Ie({
|
|
979
991
|
default: k(() => [
|
|
980
|
-
te(
|
|
992
|
+
te(E(e.item.label) + " ", 1)
|
|
981
993
|
]),
|
|
982
994
|
_: 2
|
|
983
995
|
}, [
|
|
984
996
|
s.value ? {
|
|
985
997
|
name: "tooltip",
|
|
986
998
|
fn: k(() => [
|
|
987
|
-
|
|
999
|
+
q("div", {
|
|
988
1000
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
989
1001
|
}, [
|
|
990
|
-
X(
|
|
991
|
-
te(
|
|
1002
|
+
X(y.$slots, "label-tooltip", {}, () => [
|
|
1003
|
+
te(E(e.item.tooltip), 1)
|
|
992
1004
|
], !0)
|
|
993
1005
|
], 8, Zn)
|
|
994
1006
|
]),
|
|
@@ -997,88 +1009,88 @@ const se = {
|
|
|
997
1009
|
]), 1024)
|
|
998
1010
|
], !0)
|
|
999
1011
|
], 8, Gn),
|
|
1000
|
-
|
|
1012
|
+
q("div", {
|
|
1001
1013
|
class: "config-card-details-value",
|
|
1002
1014
|
"data-testid": `${e.item.key}-property-value`
|
|
1003
1015
|
}, [
|
|
1004
|
-
X(
|
|
1016
|
+
X(y.$slots, e.item.key, {
|
|
1005
1017
|
rowValue: e.item.value
|
|
1006
1018
|
}, () => [
|
|
1007
|
-
r.value ? (
|
|
1008
|
-
(
|
|
1019
|
+
r.value ? (m(), j("div", ei, [
|
|
1020
|
+
(m(), L(Pe(d.value.tag), za(Ya(d.value.attrs)), {
|
|
1009
1021
|
default: k(() => [
|
|
1010
|
-
d.value.additionalComponent === "KBadge" ? (
|
|
1022
|
+
d.value.additionalComponent === "KBadge" ? (m(), j("div", {
|
|
1011
1023
|
key: 0,
|
|
1012
1024
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1013
1025
|
}, [
|
|
1014
|
-
(
|
|
1015
|
-
key: `${e.item.key}-badge-tag-${
|
|
1026
|
+
(m(!0), j(me, null, ye(e.item.value, (_, w) => (m(), L(p, {
|
|
1027
|
+
key: `${e.item.key}-badge-tag-${w}`,
|
|
1016
1028
|
class: "config-badge",
|
|
1017
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1018
|
-
"truncation-tooltip":
|
|
1029
|
+
"data-testid": `${e.item.key}-badge-tag-${w}`,
|
|
1030
|
+
"truncation-tooltip": _
|
|
1019
1031
|
}, {
|
|
1020
1032
|
default: k(() => [
|
|
1021
|
-
te(
|
|
1033
|
+
te(E(_), 1)
|
|
1022
1034
|
]),
|
|
1023
1035
|
_: 2
|
|
1024
1036
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
1025
1037
|
], 8, ti)) : D("", !0),
|
|
1026
|
-
d.value.additionalComponent === "CopyUuid" ? (
|
|
1038
|
+
d.value.additionalComponent === "CopyUuid" ? (m(), j("div", {
|
|
1027
1039
|
key: 1,
|
|
1028
1040
|
class: "copy-uuid-array",
|
|
1029
1041
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1030
1042
|
}, [
|
|
1031
|
-
(
|
|
1032
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1033
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1034
|
-
uuid:
|
|
1043
|
+
(m(!0), j(me, null, ye(e.item.value, (_, w) => (m(), L(g(aa), lt(d.value.childAttrs, {
|
|
1044
|
+
key: `${e.item.key}-copy-uuid-${w}`,
|
|
1045
|
+
"data-testid": `${e.item.key}-copy-uuid-${w}`,
|
|
1046
|
+
uuid: _
|
|
1035
1047
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1036
|
-
], 8, ai)) : d.value.additionalComponent === "KMethodBadge" ? (
|
|
1048
|
+
], 8, ai)) : d.value.additionalComponent === "KMethodBadge" ? (m(), j("div", {
|
|
1037
1049
|
key: 2,
|
|
1038
1050
|
class: "method-badge-array",
|
|
1039
1051
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1040
1052
|
}, [
|
|
1041
|
-
(
|
|
1042
|
-
key: `${e.item.key}-badge-method-${
|
|
1053
|
+
(m(!0), j(me, null, ye(e.item.value, (_, w) => (m(), L(f, {
|
|
1054
|
+
key: `${e.item.key}-badge-method-${w}`,
|
|
1043
1055
|
class: "config-badge",
|
|
1044
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1056
|
+
"data-testid": `${e.item.key}-badge-method-${w}`,
|
|
1045
1057
|
"is-rounded": "",
|
|
1046
|
-
label:
|
|
1047
|
-
method:
|
|
1058
|
+
label: _,
|
|
1059
|
+
method: g(nn).includes(_.toLowerCase()) ? _.toLowerCase() : "custom"
|
|
1048
1060
|
}, {
|
|
1049
1061
|
default: k(() => [
|
|
1050
|
-
te(
|
|
1062
|
+
te(E(_), 1)
|
|
1051
1063
|
]),
|
|
1052
1064
|
_: 2
|
|
1053
1065
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
1054
1066
|
], 8, ni)) : D("", !0),
|
|
1055
|
-
d.value.additionalComponent === "JsonCardItem" ? (
|
|
1067
|
+
d.value.additionalComponent === "JsonCardItem" ? (m(), j("div", {
|
|
1056
1068
|
key: 3,
|
|
1057
1069
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1058
1070
|
}, [
|
|
1059
|
-
(
|
|
1060
|
-
key: `json-array-item-${
|
|
1061
|
-
index:
|
|
1071
|
+
(m(!0), j(me, null, ye(e.item.value, (_, w) => (m(), L(na, {
|
|
1072
|
+
key: `json-array-item-${w}`,
|
|
1073
|
+
index: w,
|
|
1062
1074
|
"is-array-item": "",
|
|
1063
|
-
item:
|
|
1075
|
+
item: _
|
|
1064
1076
|
}, null, 8, ["index", "item"]))), 128))
|
|
1065
|
-
], 8, ii)) : (
|
|
1077
|
+
], 8, ii)) : (m(), L(v, {
|
|
1066
1078
|
key: 4,
|
|
1067
|
-
label:
|
|
1079
|
+
label: g(h) ? e.item.value : ""
|
|
1068
1080
|
}, {
|
|
1069
1081
|
default: k(() => [
|
|
1070
|
-
|
|
1082
|
+
q("span", {
|
|
1071
1083
|
ref_key: "textContent",
|
|
1072
1084
|
ref: u,
|
|
1073
|
-
class:
|
|
1074
|
-
},
|
|
1085
|
+
class: xe(["attrs-data-text", { truncated: e.truncated }])
|
|
1086
|
+
}, E(d.value.text), 3)
|
|
1075
1087
|
]),
|
|
1076
1088
|
_: 1
|
|
1077
1089
|
}, 8, ["label"]))
|
|
1078
1090
|
]),
|
|
1079
1091
|
_: 1
|
|
1080
1092
|
}, 16))
|
|
1081
|
-
])) : (
|
|
1093
|
+
])) : (m(), j("div", {
|
|
1082
1094
|
key: 0,
|
|
1083
1095
|
"data-testid": `${e.item.key}-no-value`
|
|
1084
1096
|
}, " – ", 8, Qn))
|
|
@@ -1087,7 +1099,7 @@ const se = {
|
|
|
1087
1099
|
]);
|
|
1088
1100
|
};
|
|
1089
1101
|
}
|
|
1090
|
-
}),
|
|
1102
|
+
}), qe = /* @__PURE__ */ Ce(ri, [["__scopeId", "data-v-307ab96d"]]);
|
|
1091
1103
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1092
1104
|
function oa(e) {
|
|
1093
1105
|
return typeof e > "u" || e === null;
|
|
@@ -1128,15 +1140,15 @@ function ra(e, a) {
|
|
|
1128
1140
|
|
|
1129
1141
|
` + e.mark.snippet), n + " " + t) : n;
|
|
1130
1142
|
}
|
|
1131
|
-
function
|
|
1143
|
+
function Re(e, a) {
|
|
1132
1144
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = a, this.message = ra(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1133
1145
|
}
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1146
|
+
Re.prototype = Object.create(Error.prototype);
|
|
1147
|
+
Re.prototype.constructor = Re;
|
|
1148
|
+
Re.prototype.toString = function(e) {
|
|
1137
1149
|
return this.name + ": " + ra(this, e);
|
|
1138
1150
|
};
|
|
1139
|
-
var fe =
|
|
1151
|
+
var fe = Re;
|
|
1140
1152
|
function it(e, a, t, n, i) {
|
|
1141
1153
|
var o = "", r = "", s = Math.floor(i / 2) - 1;
|
|
1142
1154
|
return n - a > s && (o = " ... ", a = n - s + o.length), t - n > s && (r = " ...", t = n + s - r.length), {
|
|
@@ -1337,14 +1349,14 @@ function Ti(e) {
|
|
|
1337
1349
|
function ji(e) {
|
|
1338
1350
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1339
1351
|
}
|
|
1340
|
-
function
|
|
1352
|
+
function Ki(e) {
|
|
1341
1353
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1342
1354
|
}
|
|
1343
1355
|
var fa = new ue("tag:yaml.org,2002:bool", {
|
|
1344
1356
|
kind: "scalar",
|
|
1345
1357
|
resolve: Ti,
|
|
1346
1358
|
construct: ji,
|
|
1347
|
-
predicate:
|
|
1359
|
+
predicate: Ki,
|
|
1348
1360
|
represent: {
|
|
1349
1361
|
lowercase: function(e) {
|
|
1350
1362
|
return e ? "true" : "false";
|
|
@@ -1358,7 +1370,7 @@ var fa = new ue("tag:yaml.org,2002:bool", {
|
|
|
1358
1370
|
},
|
|
1359
1371
|
defaultStyle: "lowercase"
|
|
1360
1372
|
});
|
|
1361
|
-
function
|
|
1373
|
+
function $i(e) {
|
|
1362
1374
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1363
1375
|
}
|
|
1364
1376
|
function Oi(e) {
|
|
@@ -1388,7 +1400,7 @@ function Ei(e) {
|
|
|
1388
1400
|
if (i === "x") {
|
|
1389
1401
|
for (t++; t < a; t++)
|
|
1390
1402
|
if (i = e[t], i !== "_") {
|
|
1391
|
-
if (
|
|
1403
|
+
if (!$i(e.charCodeAt(t)))
|
|
1392
1404
|
return !1;
|
|
1393
1405
|
n = !0;
|
|
1394
1406
|
}
|
|
@@ -1471,8 +1483,8 @@ function Pi(e) {
|
|
|
1471
1483
|
var a, t;
|
|
1472
1484
|
return a = e.replace(/_/g, "").toLowerCase(), t = a[0] === "-" ? -1 : 1, "+-".indexOf(a[0]) >= 0 && (a = a.slice(1)), a === ".inf" ? t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : a === ".nan" ? NaN : t * parseFloat(a, 10);
|
|
1473
1485
|
}
|
|
1474
|
-
var
|
|
1475
|
-
function
|
|
1486
|
+
var qi = /^[-+]?[0-9]+e/;
|
|
1487
|
+
function Ri(e, a) {
|
|
1476
1488
|
var t;
|
|
1477
1489
|
if (isNaN(e))
|
|
1478
1490
|
switch (a) {
|
|
@@ -1503,7 +1515,7 @@ function qi(e, a) {
|
|
|
1503
1515
|
}
|
|
1504
1516
|
else if (oe.isNegativeZero(e))
|
|
1505
1517
|
return "-0.0";
|
|
1506
|
-
return t = e.toString(10),
|
|
1518
|
+
return t = e.toString(10), qi.test(t) ? t.replace("e", ".e") : t;
|
|
1507
1519
|
}
|
|
1508
1520
|
function Ui(e) {
|
|
1509
1521
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || oe.isNegativeZero(e));
|
|
@@ -1513,7 +1525,7 @@ var ma = new ue("tag:yaml.org,2002:float", {
|
|
|
1513
1525
|
resolve: Li,
|
|
1514
1526
|
construct: Pi,
|
|
1515
1527
|
predicate: Ui,
|
|
1516
|
-
represent:
|
|
1528
|
+
represent: Ri,
|
|
1517
1529
|
defaultStyle: "lowercase"
|
|
1518
1530
|
}), ga = da.extend({
|
|
1519
1531
|
implicit: [
|
|
@@ -1676,20 +1688,20 @@ var Ia = new ue("tag:yaml.org,2002:set", {
|
|
|
1676
1688
|
Sa,
|
|
1677
1689
|
Ia
|
|
1678
1690
|
]
|
|
1679
|
-
}),
|
|
1691
|
+
}), Te = Object.prototype.hasOwnProperty, Ye = 1, Aa = 2, xa = 3, Ge = 4, rt = 1, lo = 2, Et = 3, so = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, co = /[\x85\u2028\u2029]/, uo = /[,\[\]\{\}]/, Ta = /^(?:!|!!|![a-z\-]+!)$/i, ja = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1680
1692
|
function Ft(e) {
|
|
1681
1693
|
return Object.prototype.toString.call(e);
|
|
1682
1694
|
}
|
|
1683
1695
|
function we(e) {
|
|
1684
1696
|
return e === 10 || e === 13;
|
|
1685
1697
|
}
|
|
1686
|
-
function
|
|
1698
|
+
function Ke(e) {
|
|
1687
1699
|
return e === 9 || e === 32;
|
|
1688
1700
|
}
|
|
1689
1701
|
function ge(e) {
|
|
1690
1702
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1691
1703
|
}
|
|
1692
|
-
function
|
|
1704
|
+
function Me(e) {
|
|
1693
1705
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1694
1706
|
}
|
|
1695
1707
|
function po(e) {
|
|
@@ -1712,9 +1724,9 @@ function mo(e) {
|
|
|
1712
1724
|
(e - 65536 & 1023) + 56320
|
|
1713
1725
|
);
|
|
1714
1726
|
}
|
|
1715
|
-
var
|
|
1727
|
+
var Ka = new Array(256), $a = new Array(256);
|
|
1716
1728
|
for (var $e = 0; $e < 256; $e++)
|
|
1717
|
-
|
|
1729
|
+
Ka[$e] = Nt($e) ? 1 : 0, $a[$e] = Nt($e);
|
|
1718
1730
|
function go(e, a) {
|
|
1719
1731
|
this.input = e, this.filename = a.filename || null, this.schema = a.schema || kt, this.onWarning = a.onWarning || null, this.legacy = a.legacy || !1, this.json = a.json || !1, this.listener = a.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 = [];
|
|
1720
1732
|
}
|
|
@@ -1742,7 +1754,7 @@ var Bt = {
|
|
|
1742
1754
|
},
|
|
1743
1755
|
TAG: function(e, a, t) {
|
|
1744
1756
|
var n, i;
|
|
1745
|
-
t.length !== 2 && A(e, "TAG directive accepts exactly two arguments"), n = t[0], i = t[1], Ta.test(n) || A(e, "ill-formed tag handle (first argument) of the TAG directive"),
|
|
1757
|
+
t.length !== 2 && A(e, "TAG directive accepts exactly two arguments"), n = t[0], i = t[1], Ta.test(n) || A(e, "ill-formed tag handle (first argument) of the TAG directive"), Te.call(e.tagMap, n) && A(e, 'there is a previously declared suffix for "' + n + '" tag handle'), ja.test(i) || A(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1746
1758
|
try {
|
|
1747
1759
|
i = decodeURIComponent(i);
|
|
1748
1760
|
} catch {
|
|
@@ -1751,7 +1763,7 @@ var Bt = {
|
|
|
1751
1763
|
e.tagMap[n] = i;
|
|
1752
1764
|
}
|
|
1753
1765
|
};
|
|
1754
|
-
function
|
|
1766
|
+
function Ae(e, a, t, n) {
|
|
1755
1767
|
var i, o, r, s;
|
|
1756
1768
|
if (a < t) {
|
|
1757
1769
|
if (s = e.input.slice(a, t), n)
|
|
@@ -1765,9 +1777,9 @@ function Ie(e, a, t, n) {
|
|
|
1765
1777
|
function Lt(e, a, t, n) {
|
|
1766
1778
|
var i, o, r, s;
|
|
1767
1779
|
for (oe.isObject(t) || A(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(t), r = 0, s = i.length; r < s; r += 1)
|
|
1768
|
-
o = i[r],
|
|
1780
|
+
o = i[r], Te.call(a, o) || (a[o] = t[o], n[o] = !0);
|
|
1769
1781
|
}
|
|
1770
|
-
function
|
|
1782
|
+
function Ee(e, a, t, n, i, o, r, s, c) {
|
|
1771
1783
|
var l, d;
|
|
1772
1784
|
if (Array.isArray(i))
|
|
1773
1785
|
for (i = Array.prototype.slice.call(i), l = 0, d = i.length; l < d; l += 1)
|
|
@@ -1779,7 +1791,7 @@ function Me(e, a, t, n, i, o, r, s, c) {
|
|
|
1779
1791
|
else
|
|
1780
1792
|
Lt(e, a, o, t);
|
|
1781
1793
|
else
|
|
1782
|
-
!e.json && !
|
|
1794
|
+
!e.json && !Te.call(t, i) && Te.call(a, i) && (e.line = r || e.line, e.lineStart = s || e.lineStart, e.position = c || e.position, A(e, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(a, i, {
|
|
1783
1795
|
configurable: !0,
|
|
1784
1796
|
enumerable: !0,
|
|
1785
1797
|
writable: !0,
|
|
@@ -1793,7 +1805,7 @@ function bt(e) {
|
|
|
1793
1805
|
}
|
|
1794
1806
|
function ie(e, a, t) {
|
|
1795
1807
|
for (var n = 0, i = e.input.charCodeAt(e.position); i !== 0; ) {
|
|
1796
|
-
for (;
|
|
1808
|
+
for (; Ke(i); )
|
|
1797
1809
|
i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
|
|
1798
1810
|
if (a && i === 35)
|
|
1799
1811
|
do
|
|
@@ -1816,31 +1828,31 @@ function Ct(e, a) {
|
|
|
1816
1828
|
`, a - 1));
|
|
1817
1829
|
}
|
|
1818
1830
|
function ho(e, a, t) {
|
|
1819
|
-
var n, i, o, r, s, c, l, d, u = e.kind, h = e.result,
|
|
1820
|
-
if (
|
|
1831
|
+
var n, i, o, r, s, c, l, d, u = e.kind, h = e.result, y;
|
|
1832
|
+
if (y = e.input.charCodeAt(e.position), ge(y) || Me(y) || y === 35 || y === 38 || y === 42 || y === 33 || y === 124 || y === 62 || y === 39 || y === 34 || y === 37 || y === 64 || y === 96 || (y === 63 || y === 45) && (i = e.input.charCodeAt(e.position + 1), ge(i) || t && Me(i)))
|
|
1821
1833
|
return !1;
|
|
1822
|
-
for (e.kind = "scalar", e.result = "", o = r = e.position, s = !1;
|
|
1823
|
-
if (
|
|
1824
|
-
if (i = e.input.charCodeAt(e.position + 1), ge(i) || t &&
|
|
1834
|
+
for (e.kind = "scalar", e.result = "", o = r = e.position, s = !1; y !== 0; ) {
|
|
1835
|
+
if (y === 58) {
|
|
1836
|
+
if (i = e.input.charCodeAt(e.position + 1), ge(i) || t && Me(i))
|
|
1825
1837
|
break;
|
|
1826
|
-
} else if (
|
|
1838
|
+
} else if (y === 35) {
|
|
1827
1839
|
if (n = e.input.charCodeAt(e.position - 1), ge(n))
|
|
1828
1840
|
break;
|
|
1829
1841
|
} else {
|
|
1830
|
-
if (e.position === e.lineStart && at(e) || t &&
|
|
1842
|
+
if (e.position === e.lineStart && at(e) || t && Me(y))
|
|
1831
1843
|
break;
|
|
1832
|
-
if (we(
|
|
1844
|
+
if (we(y))
|
|
1833
1845
|
if (c = e.line, l = e.lineStart, d = e.lineIndent, ie(e, !1, -1), e.lineIndent >= a) {
|
|
1834
|
-
s = !0,
|
|
1846
|
+
s = !0, y = e.input.charCodeAt(e.position);
|
|
1835
1847
|
continue;
|
|
1836
1848
|
} else {
|
|
1837
1849
|
e.position = r, e.line = c, e.lineStart = l, e.lineIndent = d;
|
|
1838
1850
|
break;
|
|
1839
1851
|
}
|
|
1840
1852
|
}
|
|
1841
|
-
s && (
|
|
1853
|
+
s && (Ae(e, o, r, !1), Ct(e, e.line - c), o = r = e.position, s = !1), Ke(y) || (r = e.position + 1), y = e.input.charCodeAt(++e.position);
|
|
1842
1854
|
}
|
|
1843
|
-
return
|
|
1855
|
+
return Ae(e, o, r, !1), e.result ? !0 : (e.kind = u, e.result = h, !1);
|
|
1844
1856
|
}
|
|
1845
1857
|
function vo(e, a) {
|
|
1846
1858
|
var t, n, i;
|
|
@@ -1848,12 +1860,12 @@ function vo(e, a) {
|
|
|
1848
1860
|
return !1;
|
|
1849
1861
|
for (e.kind = "scalar", e.result = "", e.position++, n = i = e.position; (t = e.input.charCodeAt(e.position)) !== 0; )
|
|
1850
1862
|
if (t === 39)
|
|
1851
|
-
if (
|
|
1863
|
+
if (Ae(e, n, e.position, !0), t = e.input.charCodeAt(++e.position), t === 39)
|
|
1852
1864
|
n = e.position, e.position++, i = e.position;
|
|
1853
1865
|
else
|
|
1854
1866
|
return !0;
|
|
1855
1867
|
else
|
|
1856
|
-
we(t) ? (
|
|
1868
|
+
we(t) ? (Ae(e, n, i, !0), Ct(e, ie(e, !1, a)), n = i = e.position) : e.position === e.lineStart && at(e) ? A(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
1857
1869
|
A(e, "unexpected end of the stream within a single quoted scalar");
|
|
1858
1870
|
}
|
|
1859
1871
|
function ko(e, a) {
|
|
@@ -1862,12 +1874,12 @@ function ko(e, a) {
|
|
|
1862
1874
|
return !1;
|
|
1863
1875
|
for (e.kind = "scalar", e.result = "", e.position++, t = n = e.position; (s = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1864
1876
|
if (s === 34)
|
|
1865
|
-
return
|
|
1877
|
+
return Ae(e, t, e.position, !0), e.position++, !0;
|
|
1866
1878
|
if (s === 92) {
|
|
1867
|
-
if (
|
|
1879
|
+
if (Ae(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), we(s))
|
|
1868
1880
|
ie(e, !1, a);
|
|
1869
|
-
else if (s < 256 &&
|
|
1870
|
-
e.result +=
|
|
1881
|
+
else if (s < 256 && Ka[s])
|
|
1882
|
+
e.result += $a[s], e.position++;
|
|
1871
1883
|
else if ((r = fo(s)) > 0) {
|
|
1872
1884
|
for (i = r, o = 0; i > 0; i--)
|
|
1873
1885
|
s = e.input.charCodeAt(++e.position), (r = po(s)) >= 0 ? o = (o << 4) + r : A(e, "expected hexadecimal character");
|
|
@@ -1876,22 +1888,22 @@ function ko(e, a) {
|
|
|
1876
1888
|
A(e, "unknown escape sequence");
|
|
1877
1889
|
t = n = e.position;
|
|
1878
1890
|
} else
|
|
1879
|
-
we(s) ? (
|
|
1891
|
+
we(s) ? (Ae(e, t, n, !0), Ct(e, ie(e, !1, a)), t = n = e.position) : e.position === e.lineStart && at(e) ? A(e, "unexpected end of the document within a double quoted scalar") : (e.position++, n = e.position);
|
|
1880
1892
|
}
|
|
1881
1893
|
A(e, "unexpected end of the stream within a double quoted scalar");
|
|
1882
1894
|
}
|
|
1883
1895
|
function bo(e, a) {
|
|
1884
|
-
var t = !0, n, i, o, r = e.tag, s, c = e.anchor, l, d, u, h,
|
|
1896
|
+
var t = !0, n, i, o, r = e.tag, s, c = e.anchor, l, d, u, h, y, I = /* @__PURE__ */ Object.create(null), C, p, f, v;
|
|
1885
1897
|
if (v = e.input.charCodeAt(e.position), v === 91)
|
|
1886
|
-
d = 93,
|
|
1898
|
+
d = 93, y = !1, s = [];
|
|
1887
1899
|
else if (v === 123)
|
|
1888
|
-
d = 125,
|
|
1900
|
+
d = 125, y = !0, s = {};
|
|
1889
1901
|
else
|
|
1890
1902
|
return !1;
|
|
1891
1903
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), v = e.input.charCodeAt(++e.position); v !== 0; ) {
|
|
1892
1904
|
if (ie(e, !0, a), v = e.input.charCodeAt(e.position), v === d)
|
|
1893
|
-
return e.position++, e.tag = r, e.anchor = c, e.kind =
|
|
1894
|
-
t ? v === 44 && A(e, "expected the node content, but found ','") : A(e, "missed comma between flow collection entries"), p = C =
|
|
1905
|
+
return e.position++, e.tag = r, e.anchor = c, e.kind = y ? "mapping" : "sequence", e.result = s, !0;
|
|
1906
|
+
t ? v === 44 && A(e, "expected the node content, but found ','") : A(e, "missed comma between flow collection entries"), p = C = f = null, u = h = !1, v === 63 && (l = e.input.charCodeAt(e.position + 1), ge(l) && (u = h = !0, e.position++, ie(e, !0, a))), n = e.line, i = e.lineStart, o = e.position, Fe(e, a, Ye, !1, !0), p = e.tag, C = e.result, ie(e, !0, a), v = e.input.charCodeAt(e.position), (h || e.line === n) && v === 58 && (u = !0, v = e.input.charCodeAt(++e.position), ie(e, !0, a), Fe(e, a, Ye, !1, !0), f = e.result), y ? Ee(e, s, I, p, C, f, n, i, o) : u ? s.push(Ee(e, null, I, p, C, f, n, i, o)) : s.push(C), ie(e, !0, a), v = e.input.charCodeAt(e.position), v === 44 ? (t = !0, v = e.input.charCodeAt(++e.position)) : t = !1;
|
|
1895
1907
|
}
|
|
1896
1908
|
A(e, "unexpected end of the stream within a flow collection");
|
|
1897
1909
|
}
|
|
@@ -1910,10 +1922,10 @@ function Co(e, a) {
|
|
|
1910
1922
|
d === 0 ? A(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : r ? A(e, "repeat of an indentation width identifier") : (s = a + d - 1, r = !0);
|
|
1911
1923
|
else
|
|
1912
1924
|
break;
|
|
1913
|
-
if (
|
|
1925
|
+
if (Ke(u)) {
|
|
1914
1926
|
do
|
|
1915
1927
|
u = e.input.charCodeAt(++e.position);
|
|
1916
|
-
while (
|
|
1928
|
+
while (Ke(u));
|
|
1917
1929
|
if (u === 35)
|
|
1918
1930
|
do
|
|
1919
1931
|
u = e.input.charCodeAt(++e.position);
|
|
@@ -1932,13 +1944,13 @@ function Co(e, a) {
|
|
|
1932
1944
|
`);
|
|
1933
1945
|
break;
|
|
1934
1946
|
}
|
|
1935
|
-
for (n ?
|
|
1947
|
+
for (n ? Ke(u) ? (l = !0, e.result += oe.repeat(`
|
|
1936
1948
|
`, o ? 1 + c : c)) : l ? (l = !1, e.result += oe.repeat(`
|
|
1937
1949
|
`, c + 1)) : c === 0 ? o && (e.result += " ") : e.result += oe.repeat(`
|
|
1938
1950
|
`, c) : e.result += oe.repeat(`
|
|
1939
1951
|
`, o ? 1 + c : c), o = !0, r = !0, c = 0, t = e.position; !we(u) && u !== 0; )
|
|
1940
1952
|
u = e.input.charCodeAt(++e.position);
|
|
1941
|
-
|
|
1953
|
+
Ae(e, t, e.position, !1);
|
|
1942
1954
|
}
|
|
1943
1955
|
return !0;
|
|
1944
1956
|
}
|
|
@@ -1959,35 +1971,35 @@ function Pt(e, a) {
|
|
|
1959
1971
|
return s ? (e.tag = n, e.anchor = i, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1960
1972
|
}
|
|
1961
1973
|
function wo(e, a, t) {
|
|
1962
|
-
var n, i, o, r, s, c, l = e.tag, d = e.anchor, u = {}, h = /* @__PURE__ */ Object.create(null),
|
|
1974
|
+
var n, i, o, r, s, c, l = e.tag, d = e.anchor, u = {}, h = /* @__PURE__ */ Object.create(null), y = null, I = null, C = null, p = !1, f = !1, v;
|
|
1963
1975
|
if (e.firstTabInLine !== -1)
|
|
1964
1976
|
return !1;
|
|
1965
1977
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), v = e.input.charCodeAt(e.position); v !== 0; ) {
|
|
1966
1978
|
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, A(e, "tab characters must not be used in indentation")), n = e.input.charCodeAt(e.position + 1), o = e.line, (v === 63 || v === 58) && ge(n))
|
|
1967
|
-
v === 63 ? (p && (
|
|
1979
|
+
v === 63 ? (p && (Ee(e, u, h, y, I, null, r, s, c), y = I = C = null), f = !0, p = !0, i = !0) : p ? (p = !1, i = !0) : A(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, v = n;
|
|
1968
1980
|
else {
|
|
1969
1981
|
if (r = e.line, s = e.lineStart, c = e.position, !Fe(e, t, Aa, !1, !0))
|
|
1970
1982
|
break;
|
|
1971
1983
|
if (e.line === o) {
|
|
1972
|
-
for (v = e.input.charCodeAt(e.position);
|
|
1984
|
+
for (v = e.input.charCodeAt(e.position); Ke(v); )
|
|
1973
1985
|
v = e.input.charCodeAt(++e.position);
|
|
1974
1986
|
if (v === 58)
|
|
1975
|
-
v = e.input.charCodeAt(++e.position), ge(v) || A(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (
|
|
1976
|
-
else if (
|
|
1987
|
+
v = e.input.charCodeAt(++e.position), ge(v) || A(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ee(e, u, h, y, I, null, r, s, c), y = I = C = null), f = !0, p = !1, i = !1, y = e.tag, I = e.result;
|
|
1988
|
+
else if (f)
|
|
1977
1989
|
A(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1978
1990
|
else
|
|
1979
1991
|
return e.tag = l, e.anchor = d, !0;
|
|
1980
|
-
} else if (
|
|
1992
|
+
} else if (f)
|
|
1981
1993
|
A(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1982
1994
|
else
|
|
1983
1995
|
return e.tag = l, e.anchor = d, !0;
|
|
1984
1996
|
}
|
|
1985
|
-
if ((e.line === o || e.lineIndent > a) && (p && (r = e.line, s = e.lineStart, c = e.position), Fe(e, a, Ge, !0, i) && (p ? I = e.result : C = e.result), p || (
|
|
1997
|
+
if ((e.line === o || e.lineIndent > a) && (p && (r = e.line, s = e.lineStart, c = e.position), Fe(e, a, Ge, !0, i) && (p ? I = e.result : C = e.result), p || (Ee(e, u, h, y, I, C, r, s, c), y = I = C = null), ie(e, !0, -1), v = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > a) && v !== 0)
|
|
1986
1998
|
A(e, "bad indentation of a mapping entry");
|
|
1987
1999
|
else if (e.lineIndent < a)
|
|
1988
2000
|
break;
|
|
1989
2001
|
}
|
|
1990
|
-
return p &&
|
|
2002
|
+
return p && Ee(e, u, h, y, I, null, r, s, c), f && (e.tag = l, e.anchor = d, e.kind = "mapping", e.result = u), f;
|
|
1991
2003
|
}
|
|
1992
2004
|
function _o(e) {
|
|
1993
2005
|
var a, t = !1, n = !1, i, o, r;
|
|
@@ -2009,13 +2021,13 @@ function _o(e) {
|
|
|
2009
2021
|
} catch {
|
|
2010
2022
|
A(e, "tag name is malformed: " + o);
|
|
2011
2023
|
}
|
|
2012
|
-
return t ? e.tag = o :
|
|
2024
|
+
return t ? e.tag = o : Te.call(e.tagMap, i) ? e.tag = e.tagMap[i] + o : i === "!" ? e.tag = "!" + o : i === "!!" ? e.tag = "tag:yaml.org,2002:" + o : A(e, 'undeclared tag handle "' + i + '"'), !0;
|
|
2013
2025
|
}
|
|
2014
2026
|
function So(e) {
|
|
2015
2027
|
var a, t;
|
|
2016
2028
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2017
2029
|
return !1;
|
|
2018
|
-
for (e.anchor !== null && A(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), a = e.position; t !== 0 && !ge(t) && !
|
|
2030
|
+
for (e.anchor !== null && A(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), a = e.position; t !== 0 && !ge(t) && !Me(t); )
|
|
2019
2031
|
t = e.input.charCodeAt(++e.position);
|
|
2020
2032
|
return e.position === a && A(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(a, e.position), !0;
|
|
2021
2033
|
}
|
|
@@ -2023,12 +2035,12 @@ function Io(e) {
|
|
|
2023
2035
|
var a, t, n;
|
|
2024
2036
|
if (n = e.input.charCodeAt(e.position), n !== 42)
|
|
2025
2037
|
return !1;
|
|
2026
|
-
for (n = e.input.charCodeAt(++e.position), a = e.position; n !== 0 && !ge(n) && !
|
|
2038
|
+
for (n = e.input.charCodeAt(++e.position), a = e.position; n !== 0 && !ge(n) && !Me(n); )
|
|
2027
2039
|
n = e.input.charCodeAt(++e.position);
|
|
2028
|
-
return e.position === a && A(e, "name of an alias node must contain at least one character"), t = e.input.slice(a, e.position),
|
|
2040
|
+
return e.position === a && A(e, "name of an alias node must contain at least one character"), t = e.input.slice(a, e.position), Te.call(e.anchorMap, t) || A(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], ie(e, !0, -1), !0;
|
|
2029
2041
|
}
|
|
2030
2042
|
function Fe(e, a, t, n, i) {
|
|
2031
|
-
var o, r, s, c = 1, l = !1, d = !1, u, h,
|
|
2043
|
+
var o, r, s, c = 1, l = !1, d = !1, u, h, y, I, C, p;
|
|
2032
2044
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = r = s = Ge === t || xa === t, n && ie(e, !0, -1) && (l = !0, e.lineIndent > a ? c = 1 : e.lineIndent === a ? c = 0 : e.lineIndent < a && (c = -1)), c === 1)
|
|
2033
2045
|
for (; _o(e) || So(e); )
|
|
2034
2046
|
ie(e, !0, -1) ? (l = !0, s = o, e.lineIndent > a ? c = 1 : e.lineIndent === a ? c = 0 : e.lineIndent < a && (c = -1)) : s = !1;
|
|
@@ -2041,12 +2053,12 @@ function Fe(e, a, t, n, i) {
|
|
|
2041
2053
|
break;
|
|
2042
2054
|
}
|
|
2043
2055
|
} else if (e.tag !== "!") {
|
|
2044
|
-
if (
|
|
2056
|
+
if (Te.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2045
2057
|
I = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2046
2058
|
else
|
|
2047
|
-
for (I = null,
|
|
2048
|
-
if (e.tag.slice(0,
|
|
2049
|
-
I =
|
|
2059
|
+
for (I = null, y = e.typeMap.multi[e.kind || "fallback"], u = 0, h = y.length; u < h; u += 1)
|
|
2060
|
+
if (e.tag.slice(0, y[u].tag.length) === y[u].tag) {
|
|
2061
|
+
I = y[u];
|
|
2050
2062
|
break;
|
|
2051
2063
|
}
|
|
2052
2064
|
I || A(e, "unknown tag !<" + e.tag + ">"), e.result !== null && I.kind !== e.kind && A(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)) : A(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
@@ -2059,7 +2071,7 @@ function Ao(e) {
|
|
|
2059
2071
|
for (o = !0, r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !ge(r); )
|
|
2060
2072
|
r = e.input.charCodeAt(++e.position);
|
|
2061
2073
|
for (n = e.input.slice(t, e.position), i = [], n.length < 1 && A(e, "directive name must not be less than one character in length"); r !== 0; ) {
|
|
2062
|
-
for (;
|
|
2074
|
+
for (; Ke(r); )
|
|
2063
2075
|
r = e.input.charCodeAt(++e.position);
|
|
2064
2076
|
if (r === 35) {
|
|
2065
2077
|
do
|
|
@@ -2073,7 +2085,7 @@ function Ao(e) {
|
|
|
2073
2085
|
r = e.input.charCodeAt(++e.position);
|
|
2074
2086
|
i.push(e.input.slice(t, e.position));
|
|
2075
2087
|
}
|
|
2076
|
-
r !== 0 && bt(e),
|
|
2088
|
+
r !== 0 && bt(e), Te.call(Bt, n) ? Bt[n](e, n, i) : Ze(e, 'unknown document directive "' + n + '"');
|
|
2077
2089
|
}
|
|
2078
2090
|
if (ie(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, ie(e, !0, -1)) : o && A(e, "directives end mark is expected"), Fe(e, e.lineIndent - 1, Ge, !1, !0), ie(e, !0, -1), e.checkLineBreaks && co.test(e.input.slice(a, e.position)) && Ze(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && at(e)) {
|
|
2079
2091
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ie(e, !0, -1));
|
|
@@ -2110,10 +2122,10 @@ function To(e, a) {
|
|
|
2110
2122
|
throw new fe("expected a single document in the stream, but found more");
|
|
2111
2123
|
}
|
|
2112
2124
|
}
|
|
2113
|
-
var jo = xo,
|
|
2125
|
+
var jo = xo, Ko = To, Ea = {
|
|
2114
2126
|
loadAll: jo,
|
|
2115
|
-
load:
|
|
2116
|
-
}, Fa = Object.prototype.toString, Na = Object.prototype.hasOwnProperty, wt = 65279,
|
|
2127
|
+
load: Ko
|
|
2128
|
+
}, Fa = Object.prototype.toString, Na = Object.prototype.hasOwnProperty, wt = 65279, $o = 9, Ue = 10, Oo = 13, Mo = 32, Eo = 33, Fo = 34, ct = 35, No = 37, Bo = 38, Lo = 39, Po = 42, Ba = 44, qo = 45, Xe = 58, Ro = 61, Uo = 62, Vo = 63, Do = 64, La = 91, Pa = 93, Jo = 96, qa = 123, Wo = 124, Ra = 125, de = {};
|
|
2117
2129
|
de[0] = "\\0";
|
|
2118
2130
|
de[7] = "\\a";
|
|
2119
2131
|
de[8] = "\\b";
|
|
@@ -2171,7 +2183,7 @@ var Zo = 1, Ve = 2;
|
|
|
2171
2183
|
function Xo(e) {
|
|
2172
2184
|
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 = oe.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Yo(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 === '"' ? Ve : Zo, 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;
|
|
2173
2185
|
}
|
|
2174
|
-
function
|
|
2186
|
+
function qt(e, a) {
|
|
2175
2187
|
for (var t = oe.repeat(" ", a), n = 0, i = -1, o = "", r, s = e.length; n < s; )
|
|
2176
2188
|
i = e.indexOf(`
|
|
2177
2189
|
`, n), i === -1 ? (r = e.slice(n), n = s) : (r = e.slice(n, i + 1), n = i + 1), r.length && r !== `
|
|
@@ -2190,26 +2202,26 @@ function Qo(e, a) {
|
|
|
2190
2202
|
return !1;
|
|
2191
2203
|
}
|
|
2192
2204
|
function Qe(e) {
|
|
2193
|
-
return e === Mo || e ===
|
|
2205
|
+
return e === Mo || e === $o;
|
|
2194
2206
|
}
|
|
2195
2207
|
function De(e) {
|
|
2196
2208
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== wt || 65536 <= e && e <= 1114111;
|
|
2197
2209
|
}
|
|
2198
|
-
function
|
|
2210
|
+
function Rt(e) {
|
|
2199
2211
|
return De(e) && e !== wt && e !== Oo && e !== Ue;
|
|
2200
2212
|
}
|
|
2201
2213
|
function Ut(e, a, t) {
|
|
2202
|
-
var n =
|
|
2214
|
+
var n = Rt(e), i = n && !Qe(e);
|
|
2203
2215
|
return (
|
|
2204
2216
|
// ns-plain-safe
|
|
2205
2217
|
(t ? (
|
|
2206
2218
|
// c = flow-in
|
|
2207
2219
|
n
|
|
2208
|
-
) : n && e !== Ba && e !== La && e !== Pa && e !==
|
|
2220
|
+
) : n && e !== Ba && e !== La && e !== Pa && e !== qa && e !== Ra) && e !== ct && !(a === Xe && !i) || Rt(a) && !Qe(a) && e === ct || a === Xe && i
|
|
2209
2221
|
);
|
|
2210
2222
|
}
|
|
2211
2223
|
function er(e) {
|
|
2212
|
-
return De(e) && e !== wt && !Qe(e) && e !==
|
|
2224
|
+
return De(e) && e !== wt && !Qe(e) && e !== qo && e !== Vo && e !== Xe && e !== Ba && e !== La && e !== Pa && e !== qa && e !== Ra && e !== ct && e !== Bo && e !== Po && e !== Eo && e !== Wo && e !== Ro && e !== Uo && e !== Lo && e !== Fo && e !== No && e !== Do && e !== Jo;
|
|
2213
2225
|
}
|
|
2214
2226
|
function tr(e) {
|
|
2215
2227
|
return !Qe(e) && e !== Xe;
|
|
@@ -2222,27 +2234,27 @@ function Ua(e) {
|
|
|
2222
2234
|
var a = /^\n* /;
|
|
2223
2235
|
return a.test(e);
|
|
2224
2236
|
}
|
|
2225
|
-
var Va = 1, dt = 2, Da = 3, Ja = 4,
|
|
2237
|
+
var Va = 1, dt = 2, Da = 3, Ja = 4, Oe = 5;
|
|
2226
2238
|
function ar(e, a, t, n, i, o, r, s) {
|
|
2227
|
-
var c, l = 0, d = null, u = !1, h = !1,
|
|
2239
|
+
var c, l = 0, d = null, u = !1, h = !1, y = n !== -1, I = -1, C = er(Le(e, 0)) && tr(Le(e, e.length - 1));
|
|
2228
2240
|
if (a || r)
|
|
2229
2241
|
for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
|
|
2230
2242
|
if (l = Le(e, c), !De(l))
|
|
2231
|
-
return
|
|
2243
|
+
return Oe;
|
|
2232
2244
|
C = C && Ut(l, d, s), d = l;
|
|
2233
2245
|
}
|
|
2234
2246
|
else {
|
|
2235
2247
|
for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
|
|
2236
2248
|
if (l = Le(e, c), l === Ue)
|
|
2237
|
-
u = !0,
|
|
2249
|
+
u = !0, y && (h = h || // Foldable line = too long, and not more-indented.
|
|
2238
2250
|
c - I - 1 > n && e[I + 1] !== " ", I = c);
|
|
2239
2251
|
else if (!De(l))
|
|
2240
|
-
return
|
|
2252
|
+
return Oe;
|
|
2241
2253
|
C = C && Ut(l, d, s), d = l;
|
|
2242
2254
|
}
|
|
2243
|
-
h = h ||
|
|
2255
|
+
h = h || y && c - I - 1 > n && e[I + 1] !== " ";
|
|
2244
2256
|
}
|
|
2245
|
-
return !u && !h ? C && !r && !i(e) ? Va : o === Ve ?
|
|
2257
|
+
return !u && !h ? C && !r && !i(e) ? Va : o === Ve ? Oe : dt : t > 9 && Ua(e) ? Oe : r ? o === Ve ? Oe : dt : h ? Ja : Da;
|
|
2246
2258
|
}
|
|
2247
2259
|
function nr(e, a, t, n, i) {
|
|
2248
2260
|
e.dump = function() {
|
|
@@ -2269,10 +2281,10 @@ function nr(e, a, t, n, i) {
|
|
|
2269
2281
|
case dt:
|
|
2270
2282
|
return "'" + a.replace(/'/g, "''") + "'";
|
|
2271
2283
|
case Da:
|
|
2272
|
-
return "|" + Vt(a, e.indent) + Dt(
|
|
2284
|
+
return "|" + Vt(a, e.indent) + Dt(qt(a, o));
|
|
2273
2285
|
case Ja:
|
|
2274
|
-
return ">" + Vt(a, e.indent) + Dt(
|
|
2275
|
-
case
|
|
2286
|
+
return ">" + Vt(a, e.indent) + Dt(qt(ir(a, r), o));
|
|
2287
|
+
case Oe:
|
|
2276
2288
|
return '"' + or(a) + '"';
|
|
2277
2289
|
default:
|
|
2278
2290
|
throw new fe("impossible error: invalid scalar style");
|
|
@@ -2458,10 +2470,10 @@ var fr = ue, yr = la, mr = da, gr = ga, hr = ha, vr = kt, kr = Ea.load, br = Ea.
|
|
|
2458
2470
|
const Tr = {
|
|
2459
2471
|
key: 0,
|
|
2460
2472
|
class: "config-card-display-form"
|
|
2461
|
-
}, jr = ["data-testid"],
|
|
2473
|
+
}, jr = ["data-testid"], Kr = {
|
|
2462
2474
|
key: 0,
|
|
2463
2475
|
class: "config-card-prop-section-title"
|
|
2464
|
-
},
|
|
2476
|
+
}, $r = {
|
|
2465
2477
|
key: 1,
|
|
2466
2478
|
class: "config-card-display-json"
|
|
2467
2479
|
}, Or = {
|
|
@@ -2493,23 +2505,23 @@ const Tr = {
|
|
|
2493
2505
|
}
|
|
2494
2506
|
},
|
|
2495
2507
|
setup(e) {
|
|
2496
|
-
const a = e, t = et(), { i18n: { t: n } } = se.useI18n(), i = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), o =
|
|
2497
|
-
return
|
|
2508
|
+
const a = e, t = et(), { i18n: { t: n } } = se.useI18n(), i = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), o = $(""), r = $("");
|
|
2509
|
+
return ke(() => a.format, (s) => {
|
|
2498
2510
|
s === "json" ? o.value = JSON.stringify(a.record, null, 2) : s === "yaml" && (r.value = xr.dump(a.record));
|
|
2499
2511
|
}, { immediate: !0 }), (s, c) => {
|
|
2500
|
-
const l =
|
|
2501
|
-
return
|
|
2502
|
-
e.format === "structured" ? (
|
|
2503
|
-
(
|
|
2512
|
+
const l = N("KCodeBlock");
|
|
2513
|
+
return m(), j(me, null, [
|
|
2514
|
+
e.format === "structured" ? (m(), j("div", Tr, [
|
|
2515
|
+
(m(!0), j(me, null, ye(e.propListTypes, (d) => (m(), j("div", {
|
|
2504
2516
|
key: `config-card-details-${d}-props`,
|
|
2505
|
-
class:
|
|
2517
|
+
class: xe(`config-card-details-${d}-props`),
|
|
2506
2518
|
"data-testid": `config-card-details-${d}-props`
|
|
2507
2519
|
}, [
|
|
2508
|
-
d !== "basic" ? (
|
|
2509
|
-
(
|
|
2520
|
+
d !== "basic" ? (m(), j("div", Kr, E(d === "advanced" ? g(n)("baseConfigCard.sections.advanced") : g(n)("baseConfigCard.sections.plugin")), 1)) : D("", !0),
|
|
2521
|
+
(m(!0), j(me, null, ye(e.propertyCollections[d], (u) => (m(), L(qe, {
|
|
2510
2522
|
key: u.key,
|
|
2511
2523
|
item: u
|
|
2512
|
-
},
|
|
2524
|
+
}, Ie({
|
|
2513
2525
|
label: k(() => [
|
|
2514
2526
|
X(s.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2515
2527
|
]),
|
|
@@ -2531,16 +2543,16 @@ const Tr = {
|
|
|
2531
2543
|
]), 1032, ["item"]))), 128))
|
|
2532
2544
|
], 10, jr))), 128))
|
|
2533
2545
|
])) : D("", !0),
|
|
2534
|
-
e.format === "json" ? (
|
|
2535
|
-
|
|
2546
|
+
e.format === "json" ? (m(), j("div", $r, [
|
|
2547
|
+
K(l, {
|
|
2536
2548
|
id: "config-card-codeblock",
|
|
2537
2549
|
code: o.value,
|
|
2538
2550
|
language: "json",
|
|
2539
2551
|
theme: "dark"
|
|
2540
2552
|
}, null, 8, ["code"])
|
|
2541
2553
|
])) : D("", !0),
|
|
2542
|
-
e.format === "yaml" ? (
|
|
2543
|
-
|
|
2554
|
+
e.format === "yaml" ? (m(), j("div", Or, [
|
|
2555
|
+
K(l, {
|
|
2544
2556
|
id: "config-card-codeblock",
|
|
2545
2557
|
code: r.value,
|
|
2546
2558
|
language: "yaml",
|
|
@@ -2558,10 +2570,10 @@ const Tr = {
|
|
|
2558
2570
|
}, Nr = (e) => (en("data-v-dd88a2bb"), e = e(), tn(), e), Br = ["aria-hidden"], Lr = {
|
|
2559
2571
|
key: 0,
|
|
2560
2572
|
"data-testid": "kui-icon-svg-title"
|
|
2561
|
-
}, Pr = /* @__PURE__ */ Nr(() => /* @__PURE__ */
|
|
2573
|
+
}, Pr = /* @__PURE__ */ Nr(() => /* @__PURE__ */ q("path", {
|
|
2562
2574
|
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",
|
|
2563
2575
|
fill: "currentColor"
|
|
2564
|
-
}, null, -1)),
|
|
2576
|
+
}, null, -1)), qr = /* @__PURE__ */ re({
|
|
2565
2577
|
__name: "BookIcon",
|
|
2566
2578
|
props: {
|
|
2567
2579
|
/** The accessibility text provided to screen readers */
|
|
@@ -2630,14 +2642,14 @@ const Tr = {
|
|
|
2630
2642
|
lineHeight: "0",
|
|
2631
2643
|
width: t.value
|
|
2632
2644
|
}));
|
|
2633
|
-
return (i, o) => (
|
|
2645
|
+
return (i, o) => (m(), L(Pe(e.as), {
|
|
2634
2646
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2635
2647
|
class: "kui-icon book-icon",
|
|
2636
2648
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2637
2649
|
style: Qa(n.value)
|
|
2638
2650
|
}, {
|
|
2639
2651
|
default: k(() => [
|
|
2640
|
-
(
|
|
2652
|
+
(m(), j("svg", {
|
|
2641
2653
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2642
2654
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2643
2655
|
fill: "none",
|
|
@@ -2647,14 +2659,14 @@ const Tr = {
|
|
|
2647
2659
|
width: "100%",
|
|
2648
2660
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2649
2661
|
}, [
|
|
2650
|
-
e.title ? (
|
|
2662
|
+
e.title ? (m(), j("title", Lr, E(e.title), 1)) : D("", !0),
|
|
2651
2663
|
Pr
|
|
2652
2664
|
], 8, Br))
|
|
2653
2665
|
]),
|
|
2654
2666
|
_: 1
|
|
2655
2667
|
}, 8, ["aria-hidden", "style"]));
|
|
2656
2668
|
}
|
|
2657
|
-
}),
|
|
2669
|
+
}), Rr = /* @__PURE__ */ Fr(qr, [["__scopeId", "data-v-dd88a2bb"]]), Ur = { "data-testid": "config-card-title" }, Vr = { class: "config-card-actions" }, Dr = ["href"], Jr = {
|
|
2658
2670
|
key: 2,
|
|
2659
2671
|
class: "config-card-details-section"
|
|
2660
2672
|
}, Wr = {
|
|
@@ -2754,11 +2766,11 @@ const Tr = {
|
|
|
2754
2766
|
label: "YAML",
|
|
2755
2767
|
value: "yaml"
|
|
2756
2768
|
}
|
|
2757
|
-
], d =
|
|
2769
|
+
], d = $("structured"), u = (S) => {
|
|
2758
2770
|
d.value = S == null ? void 0 : S.value;
|
|
2759
2771
|
}, h = {
|
|
2760
2772
|
id: {
|
|
2761
|
-
type:
|
|
2773
|
+
type: G.ID,
|
|
2762
2774
|
label: o("baseConfigCard.commonFields.id_label"),
|
|
2763
2775
|
order: 0,
|
|
2764
2776
|
section: pe.Basic
|
|
@@ -2768,101 +2780,101 @@ const Tr = {
|
|
|
2768
2780
|
section: pe.Basic
|
|
2769
2781
|
},
|
|
2770
2782
|
enabled: {
|
|
2771
|
-
type:
|
|
2783
|
+
type: G.BadgeStatus,
|
|
2772
2784
|
order: 2,
|
|
2773
2785
|
section: pe.Basic
|
|
2774
2786
|
},
|
|
2775
2787
|
updated_at: {
|
|
2776
|
-
type:
|
|
2788
|
+
type: G.Date,
|
|
2777
2789
|
label: o("baseConfigCard.commonFields.updated_at_label"),
|
|
2778
2790
|
order: 3,
|
|
2779
2791
|
section: pe.Basic
|
|
2780
2792
|
},
|
|
2781
2793
|
created_at: {
|
|
2782
|
-
type:
|
|
2794
|
+
type: G.Date,
|
|
2783
2795
|
label: o("baseConfigCard.commonFields.created_at_label"),
|
|
2784
2796
|
order: 4,
|
|
2785
2797
|
section: pe.Basic
|
|
2786
2798
|
},
|
|
2787
2799
|
tags: {
|
|
2788
|
-
type:
|
|
2800
|
+
type: G.BadgeTag,
|
|
2789
2801
|
order: -1,
|
|
2790
2802
|
// the last property displayed
|
|
2791
2803
|
section: pe.Basic
|
|
2792
2804
|
}
|
|
2793
|
-
},
|
|
2794
|
-
var S,
|
|
2805
|
+
}, y = $(!1), I = $(!1), C = $(""), p = $(), f = x(() => {
|
|
2806
|
+
var S, B, O;
|
|
2795
2807
|
if (!p.value)
|
|
2796
2808
|
return [];
|
|
2797
|
-
const
|
|
2809
|
+
const M = [], R = Object.keys(p.value).length;
|
|
2798
2810
|
for (const U in p.value) {
|
|
2799
|
-
const
|
|
2800
|
-
let ne =
|
|
2801
|
-
(ae || ae === 0) && (ne = ae === -1 ?
|
|
2811
|
+
const H = (B = (S = n.configSchema) == null ? void 0 : S[U]) == null ? void 0 : B.order, ae = (O = h[U]) == null ? void 0 : O.order;
|
|
2812
|
+
let ne = R;
|
|
2813
|
+
(ae || ae === 0) && (ne = ae === -1 ? R + 1 : ae), H && (ne = H === -1 ? R + 1 : H), M.push([U, ne]);
|
|
2802
2814
|
}
|
|
2803
|
-
return
|
|
2804
|
-
return U[1] -
|
|
2805
|
-
}),
|
|
2806
|
-
var
|
|
2807
|
-
const ne = U[0], Q = (
|
|
2815
|
+
return M.sort(function(U, H) {
|
|
2816
|
+
return U[1] - H[1];
|
|
2817
|
+
}), M.map((U) => {
|
|
2818
|
+
var H, ae;
|
|
2819
|
+
const ne = U[0], Q = (H = p.value) == null ? void 0 : H[ne], z = ((ae = n.configSchema) == null ? void 0 : ae[ne]) || {}, ce = h[ne];
|
|
2808
2820
|
return {
|
|
2809
2821
|
key: ne,
|
|
2810
2822
|
value: Q,
|
|
2811
|
-
hidden:
|
|
2812
|
-
type:
|
|
2813
|
-
label:
|
|
2814
|
-
tooltip:
|
|
2815
|
-
section:
|
|
2823
|
+
hidden: z.hidden || !1,
|
|
2824
|
+
type: z.type ?? ((ce == null ? void 0 : ce.type) || G.Text),
|
|
2825
|
+
label: z.label ?? ((ce == null ? void 0 : ce.label) || s(ne)),
|
|
2826
|
+
tooltip: z.tooltip ?? ((ce == null ? void 0 : ce.tooltip) || void 0),
|
|
2827
|
+
section: z.section ?? ((ce == null ? void 0 : ce.section) || pe.Advanced)
|
|
2816
2828
|
};
|
|
2817
2829
|
}).filter((U) => !U.hidden && U.key !== n.pluginConfigKey);
|
|
2818
2830
|
}), v = x(() => {
|
|
2819
|
-
var S,
|
|
2831
|
+
var S, B;
|
|
2820
2832
|
if (!p.value || !n.pluginConfigKey)
|
|
2821
2833
|
return [];
|
|
2822
|
-
const O = p.value[n.pluginConfigKey] || {},
|
|
2834
|
+
const O = p.value[n.pluginConfigKey] || {}, M = Object.keys(O).length, R = [];
|
|
2823
2835
|
for (const U in O) {
|
|
2824
|
-
const
|
|
2825
|
-
let ne = ae != null && ae !== "" ?
|
|
2826
|
-
|
|
2836
|
+
const H = (B = (S = n.pluginConfigSchema) == null ? void 0 : S[U]) == null ? void 0 : B.order, ae = O[U];
|
|
2837
|
+
let ne = ae != null && ae !== "" ? M - 1 : M;
|
|
2838
|
+
H && (ne = H === -1 ? M + 1 : H), R.push([U, ne]);
|
|
2827
2839
|
}
|
|
2828
|
-
return
|
|
2829
|
-
return U[1] -
|
|
2830
|
-
}),
|
|
2831
|
-
var
|
|
2832
|
-
const ae = U[0], ne = O[ae], Q = ((
|
|
2840
|
+
return R.sort(function(U, H) {
|
|
2841
|
+
return U[1] - H[1];
|
|
2842
|
+
}), R.map((U) => {
|
|
2843
|
+
var H;
|
|
2844
|
+
const ae = U[0], ne = O[ae], Q = ((H = n.pluginConfigSchema) == null ? void 0 : H[ae]) || {};
|
|
2833
2845
|
return {
|
|
2834
2846
|
key: ae,
|
|
2835
2847
|
value: ne,
|
|
2836
2848
|
hidden: Q.hidden || !1,
|
|
2837
|
-
type: Q.type ??
|
|
2849
|
+
type: Q.type ?? G.Text,
|
|
2838
2850
|
label: Q.label ?? s(ae),
|
|
2839
2851
|
tooltip: Q.tooltip ?? void 0,
|
|
2840
2852
|
section: pe.Plugin
|
|
2841
2853
|
};
|
|
2842
2854
|
}).filter((U) => !U.hidden);
|
|
2843
|
-
}),
|
|
2844
|
-
var S,
|
|
2855
|
+
}), _ = x(() => {
|
|
2856
|
+
var S, B, O, M;
|
|
2845
2857
|
return {
|
|
2846
|
-
basic: (S =
|
|
2847
|
-
advanced: (
|
|
2848
|
-
plugin: (
|
|
2858
|
+
basic: (S = f.value) == null ? void 0 : S.filter((R) => R.section === pe.Basic),
|
|
2859
|
+
advanced: (B = f.value) == null ? void 0 : B.filter((R) => R.section === pe.Advanced),
|
|
2860
|
+
plugin: (M = v.value) == null ? void 0 : M.concat((O = f.value) == null ? void 0 : O.filter((R) => R.section === pe.Plugin))
|
|
2849
2861
|
};
|
|
2850
|
-
}),
|
|
2862
|
+
}), w = x(() => {
|
|
2851
2863
|
const S = [];
|
|
2852
|
-
return
|
|
2853
|
-
}),
|
|
2854
|
-
var S,
|
|
2864
|
+
return _.value.basic.length && S.push("basic"), _.value.advanced.length && S.push("advanced"), _.value.plugin.length && S.push("plugin"), S;
|
|
2865
|
+
}), Z = (S) => !!(S.tooltip || i[`${S.key}-label-tooltip`]), P = x(() => {
|
|
2866
|
+
var S, B;
|
|
2855
2867
|
let O = `${n.config.apiBaseUrl}${n.fetchUrl}`;
|
|
2856
|
-
return n.config.app === "konnect" ? O = O.replace(/{controlPlaneId}/gi, ((S = n.config) == null ? void 0 : S.controlPlaneId) || "") : n.config.app === "kongManager" && (O = O.replace(/\/{workspace}/gi, (
|
|
2857
|
-
}),
|
|
2868
|
+
return n.config.app === "konnect" ? O = O.replace(/{controlPlaneId}/gi, ((S = n.config) == null ? void 0 : S.controlPlaneId) || "") : n.config.app === "kongManager" && (O = O.replace(/\/{workspace}/gi, (B = n.config) != null && B.workspace ? `/${n.config.workspace}` : "")), O = O.replace(/{id}/gi, n.config.entityId), O;
|
|
2869
|
+
}), W = (S) => {
|
|
2858
2870
|
p.value && S(JSON.stringify(p.value)) ? a("copy:success", p.value) : a("copy:error");
|
|
2859
2871
|
};
|
|
2860
|
-
return
|
|
2872
|
+
return ke(y, (S) => {
|
|
2861
2873
|
a("loading", S);
|
|
2862
2874
|
}, { immediate: !0 }), tt(async () => {
|
|
2863
|
-
I.value = !1,
|
|
2875
|
+
I.value = !1, y.value = !0;
|
|
2864
2876
|
try {
|
|
2865
|
-
const { data: S } = await c.get(
|
|
2877
|
+
const { data: S } = await c.get(P.value);
|
|
2866
2878
|
if (n.dataKey)
|
|
2867
2879
|
if (typeof S[n.dataKey] < "u")
|
|
2868
2880
|
p.value = { ...S[n.dataKey] };
|
|
@@ -2870,65 +2882,65 @@ const Tr = {
|
|
|
2870
2882
|
throw new Error(o("errors.dataKeyUndefined", { dataKey: n.dataKey }));
|
|
2871
2883
|
else
|
|
2872
2884
|
p.value = { ...S };
|
|
2873
|
-
Object.keys(n.configSchema).filter((
|
|
2874
|
-
p.value && typeof p.value[
|
|
2885
|
+
Object.keys(n.configSchema).filter((B) => n.configSchema[B].forceShow).forEach((B) => {
|
|
2886
|
+
p.value && typeof p.value[B] > "u" && (p.value[B] = null);
|
|
2875
2887
|
}), a("fetch:success", S);
|
|
2876
2888
|
} catch (S) {
|
|
2877
|
-
const
|
|
2878
|
-
C.value =
|
|
2889
|
+
const B = r(S);
|
|
2890
|
+
C.value = B.startsWith("code") ? o("baseConfigCard.errors.load") : B, I.value = !0, a("fetch:error", S);
|
|
2879
2891
|
} finally {
|
|
2880
|
-
|
|
2892
|
+
y.value = !1;
|
|
2881
2893
|
}
|
|
2882
|
-
}), (S,
|
|
2883
|
-
const O =
|
|
2884
|
-
return
|
|
2894
|
+
}), (S, B) => {
|
|
2895
|
+
const O = N("KLabel"), M = N("KSelect"), R = N("KButton"), U = N("KClipboardProvider"), H = N("KSkeleton"), ae = N("KEmptyState"), ne = N("KCard");
|
|
2896
|
+
return m(), L(ne, { class: "kong-ui-entity-base-config-card" }, Ie({
|
|
2885
2897
|
actions: k(() => [
|
|
2886
|
-
|
|
2898
|
+
q("div", Vr, [
|
|
2887
2899
|
X(S.$slots, "actions", {}, void 0, !0),
|
|
2888
|
-
e.config.jsonYamlEnabled ? (
|
|
2900
|
+
e.config.jsonYamlEnabled ? (m(), L(O, {
|
|
2889
2901
|
key: 0,
|
|
2890
2902
|
class: "config-format-select-label",
|
|
2891
2903
|
"data-testid": "config-format-select-label"
|
|
2892
2904
|
}, {
|
|
2893
2905
|
default: k(() => [
|
|
2894
|
-
te(
|
|
2906
|
+
te(E(e.label), 1)
|
|
2895
2907
|
]),
|
|
2896
2908
|
_: 1
|
|
2897
2909
|
})) : D("", !0),
|
|
2898
|
-
e.config.jsonYamlEnabled ? (
|
|
2910
|
+
e.config.jsonYamlEnabled ? (m(), L(M, {
|
|
2899
2911
|
key: 1,
|
|
2900
2912
|
appearance: "select",
|
|
2901
2913
|
"data-testid": "select-config-format",
|
|
2902
2914
|
items: l,
|
|
2903
2915
|
onChange: u
|
|
2904
2916
|
})) : D("", !0),
|
|
2905
|
-
n.config.jsonYamlEnabled && e.configCardDoc ? (
|
|
2917
|
+
n.config.jsonYamlEnabled && e.configCardDoc ? (m(), L(R, {
|
|
2906
2918
|
key: 2,
|
|
2907
2919
|
appearance: "btn-link",
|
|
2908
2920
|
class: "book-icon",
|
|
2909
2921
|
"data-testid": "book-icon"
|
|
2910
2922
|
}, {
|
|
2911
2923
|
default: k(() => [
|
|
2912
|
-
|
|
2924
|
+
q("a", {
|
|
2913
2925
|
href: e.configCardDoc,
|
|
2914
2926
|
rel: "noopener",
|
|
2915
2927
|
target: "_blank"
|
|
2916
2928
|
}, [
|
|
2917
|
-
|
|
2929
|
+
K(g(Rr), { size: g(zn) }, null, 8, ["size"])
|
|
2918
2930
|
], 8, Dr)
|
|
2919
2931
|
]),
|
|
2920
2932
|
_: 1
|
|
2921
2933
|
})) : D("", !0),
|
|
2922
|
-
e.config.jsonYamlEnabled ? D("", !0) : (
|
|
2934
|
+
e.config.jsonYamlEnabled ? D("", !0) : (m(), L(U, { key: 3 }, {
|
|
2923
2935
|
default: k(({ copyToClipboard: Q }) => [
|
|
2924
|
-
!
|
|
2936
|
+
!y.value && !I.value ? (m(), L(R, {
|
|
2925
2937
|
key: 0,
|
|
2926
2938
|
appearance: "btn-link",
|
|
2927
2939
|
"data-testid": "json-copy-button",
|
|
2928
|
-
onClick: (
|
|
2940
|
+
onClick: (z) => W(Q)
|
|
2929
2941
|
}, {
|
|
2930
2942
|
default: k(() => [
|
|
2931
|
-
te(
|
|
2943
|
+
te(E(g(o)("baseConfigCard.actions.copy")), 1)
|
|
2932
2944
|
]),
|
|
2933
2945
|
_: 2
|
|
2934
2946
|
}, 1032, ["onClick"])) : D("", !0)
|
|
@@ -2938,64 +2950,64 @@ const Tr = {
|
|
|
2938
2950
|
])
|
|
2939
2951
|
]),
|
|
2940
2952
|
body: k(() => [
|
|
2941
|
-
|
|
2953
|
+
y.value ? (m(), L(H, {
|
|
2942
2954
|
key: 0,
|
|
2943
2955
|
"data-testid": "config-card-loader",
|
|
2944
2956
|
"table-columns": 2,
|
|
2945
2957
|
type: "table"
|
|
2946
|
-
})) : I.value ? (
|
|
2958
|
+
})) : I.value ? (m(), L(ae, {
|
|
2947
2959
|
key: 1,
|
|
2948
2960
|
"data-testid": "config-card-fetch-error",
|
|
2949
2961
|
"is-error": ""
|
|
2950
2962
|
}, {
|
|
2951
2963
|
message: k(() => [
|
|
2952
|
-
|
|
2964
|
+
q("h3", null, E(C.value), 1)
|
|
2953
2965
|
]),
|
|
2954
2966
|
_: 1
|
|
2955
2967
|
})) : D("", !0),
|
|
2956
|
-
e.config.jsonYamlEnabled ? (
|
|
2957
|
-
|
|
2968
|
+
e.config.jsonYamlEnabled ? (m(), j("div", Jr, [
|
|
2969
|
+
K(Er, {
|
|
2958
2970
|
format: d.value,
|
|
2959
|
-
"prop-list-types":
|
|
2960
|
-
"property-collections":
|
|
2971
|
+
"prop-list-types": w.value,
|
|
2972
|
+
"property-collections": _.value,
|
|
2961
2973
|
record: p.value
|
|
2962
|
-
},
|
|
2974
|
+
}, Ie({ _: 2 }, [
|
|
2963
2975
|
ye(Object.keys(S.$slots), (Q) => ({
|
|
2964
2976
|
name: Q,
|
|
2965
|
-
fn: k(({ row:
|
|
2977
|
+
fn: k(({ row: z, rowValue: ce }) => [
|
|
2966
2978
|
X(S.$slots, Q, {
|
|
2967
|
-
row:
|
|
2979
|
+
row: z,
|
|
2968
2980
|
rowValue: ce
|
|
2969
2981
|
}, void 0, !0)
|
|
2970
2982
|
])
|
|
2971
2983
|
}))
|
|
2972
2984
|
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
2973
|
-
])) : (
|
|
2974
|
-
(
|
|
2985
|
+
])) : (m(), j("div", Wr, [
|
|
2986
|
+
(m(!0), j(me, null, ye(w.value, (Q) => (m(), j("div", {
|
|
2975
2987
|
key: `config-card-details-${Q}-props`,
|
|
2976
|
-
class:
|
|
2988
|
+
class: xe(`config-card-details-${Q}-props`),
|
|
2977
2989
|
"data-testid": `config-card-details-${Q}-props`
|
|
2978
2990
|
}, [
|
|
2979
|
-
Q !== "basic" ? (
|
|
2980
|
-
(
|
|
2981
|
-
key:
|
|
2982
|
-
item:
|
|
2983
|
-
},
|
|
2991
|
+
Q !== "basic" ? (m(), j("div", zr, E(Q === "advanced" ? g(o)("baseConfigCard.sections.advanced") : g(o)("baseConfigCard.sections.plugin")), 1)) : D("", !0),
|
|
2992
|
+
(m(!0), j(me, null, ye(_.value[Q], (z) => (m(), L(qe, {
|
|
2993
|
+
key: z.key,
|
|
2994
|
+
item: z
|
|
2995
|
+
}, Ie({
|
|
2984
2996
|
label: k(() => [
|
|
2985
|
-
X(S.$slots, `${
|
|
2997
|
+
X(S.$slots, `${z.key}-label`, { row: z }, void 0, !0)
|
|
2986
2998
|
]),
|
|
2987
|
-
[
|
|
2988
|
-
X(S.$slots,
|
|
2989
|
-
row:
|
|
2999
|
+
[z.key]: k(({ rowValue: ce }) => [
|
|
3000
|
+
X(S.$slots, z.key, {
|
|
3001
|
+
row: z,
|
|
2990
3002
|
rowValue: ce
|
|
2991
3003
|
}, void 0, !0)
|
|
2992
3004
|
]),
|
|
2993
3005
|
_: 2
|
|
2994
3006
|
}, [
|
|
2995
|
-
|
|
3007
|
+
Z(z) ? {
|
|
2996
3008
|
name: "label-tooltip",
|
|
2997
3009
|
fn: k(() => [
|
|
2998
|
-
X(S.$slots, `${
|
|
3010
|
+
X(S.$slots, `${z.key}-label-tooltip`, { row: z }, void 0, !0)
|
|
2999
3011
|
]),
|
|
3000
3012
|
key: "0"
|
|
3001
3013
|
} : void 0
|
|
@@ -3008,9 +3020,9 @@ const Tr = {
|
|
|
3008
3020
|
e.hideTitle ? void 0 : {
|
|
3009
3021
|
name: "title",
|
|
3010
3022
|
fn: k(() => [
|
|
3011
|
-
|
|
3023
|
+
q("div", Ur, [
|
|
3012
3024
|
X(S.$slots, "title", {}, () => [
|
|
3013
|
-
te(
|
|
3025
|
+
te(E(g(o)("baseConfigCard.title")), 1)
|
|
3014
3026
|
], !0)
|
|
3015
3027
|
])
|
|
3016
3028
|
]),
|
|
@@ -3074,20 +3086,20 @@ const Tr = {
|
|
|
3074
3086
|
var t;
|
|
3075
3087
|
const n = e, i = ft(), { i18n: { t: o } } = se.useI18n(), { getMessageFromError: r } = se.useErrors(), { axiosInstance: s } = se.useAxios({
|
|
3076
3088
|
headers: (t = n.config) == null ? void 0 : t.requestHeaders
|
|
3077
|
-
}), c =
|
|
3078
|
-
var p,
|
|
3089
|
+
}), c = $(!1), l = $(!1), d = $(""), u = x(() => n.canSubmit === !1 || n.isReadonly), h = x(() => {
|
|
3090
|
+
var p, f;
|
|
3079
3091
|
if (!n.editId)
|
|
3080
3092
|
return "";
|
|
3081
3093
|
let v = `${n.config.apiBaseUrl}${n.fetchUrl}`;
|
|
3082
|
-
return n.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((p = n.config) == null ? void 0 : p.controlPlaneId) || "") : n.config.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, (
|
|
3083
|
-
}),
|
|
3094
|
+
return n.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((p = n.config) == null ? void 0 : p.controlPlaneId) || "") : n.config.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, (f = n.config) != null && f.workspace ? `/${n.config.workspace}` : "")), v = v.replace(/{id}/gi, n.editId), v;
|
|
3095
|
+
}), y = () => {
|
|
3084
3096
|
n.config.cancelRoute ? i.push(n.config.cancelRoute) : I();
|
|
3085
3097
|
}, I = () => {
|
|
3086
3098
|
a("cancel");
|
|
3087
3099
|
}, C = () => {
|
|
3088
3100
|
u.value || a("submit");
|
|
3089
3101
|
};
|
|
3090
|
-
return
|
|
3102
|
+
return ke(() => c.value, (p) => {
|
|
3091
3103
|
a("loading", p);
|
|
3092
3104
|
}, { immediate: !0 }), tt(async () => {
|
|
3093
3105
|
if (n.editId)
|
|
@@ -3096,63 +3108,63 @@ const Tr = {
|
|
|
3096
3108
|
const { data: p } = await s.get(h.value);
|
|
3097
3109
|
a("fetch:success", p);
|
|
3098
3110
|
} catch (p) {
|
|
3099
|
-
const
|
|
3100
|
-
d.value =
|
|
3111
|
+
const f = r(p);
|
|
3112
|
+
d.value = f.startsWith("code") ? o("baseForm.errors.edit") : f, l.value = !0, a("fetch:error", p);
|
|
3101
3113
|
} finally {
|
|
3102
3114
|
c.value = !1;
|
|
3103
3115
|
}
|
|
3104
|
-
}), (p,
|
|
3105
|
-
const v =
|
|
3106
|
-
return
|
|
3116
|
+
}), (p, f) => {
|
|
3117
|
+
const v = N("KSkeleton"), _ = N("KEmptyState"), w = N("KAlert"), Z = N("KButton"), P = N("KCard");
|
|
3118
|
+
return m(), L(P, { class: "kong-ui-entity-base-form" }, {
|
|
3107
3119
|
body: k(() => [
|
|
3108
|
-
c.value ? (
|
|
3120
|
+
c.value ? (m(), L(v, {
|
|
3109
3121
|
key: 0,
|
|
3110
3122
|
type: "form"
|
|
3111
|
-
})) : l.value ? (
|
|
3123
|
+
})) : l.value ? (m(), L(_, {
|
|
3112
3124
|
key: 1,
|
|
3113
|
-
"cta-text":
|
|
3125
|
+
"cta-text": g(o)("baseForm.actions.back"),
|
|
3114
3126
|
"data-testid": "form-fetch-error",
|
|
3115
|
-
"handle-click":
|
|
3127
|
+
"handle-click": y,
|
|
3116
3128
|
"is-error": !0
|
|
3117
3129
|
}, {
|
|
3118
3130
|
message: k(() => [
|
|
3119
|
-
|
|
3131
|
+
q("h3", null, E(d.value), 1)
|
|
3120
3132
|
]),
|
|
3121
3133
|
_: 1
|
|
3122
|
-
}, 8, ["cta-text"])) : (
|
|
3134
|
+
}, 8, ["cta-text"])) : (m(), j("form", {
|
|
3123
3135
|
key: 2,
|
|
3124
3136
|
"data-testid": "form-content",
|
|
3125
3137
|
onReset: ze(I, ["prevent"]),
|
|
3126
3138
|
onSubmit: ze(C, ["prevent"])
|
|
3127
3139
|
}, [
|
|
3128
3140
|
X(p.$slots, "default", {}, void 0, !0),
|
|
3129
|
-
e.errorMessage ? (
|
|
3141
|
+
e.errorMessage ? (m(), L(w, {
|
|
3130
3142
|
key: 0,
|
|
3131
3143
|
"alert-message": e.errorMessage,
|
|
3132
3144
|
appearance: "danger",
|
|
3133
3145
|
"data-testid": "form-error"
|
|
3134
3146
|
}, null, 8, ["alert-message"])) : D("", !0),
|
|
3135
|
-
|
|
3147
|
+
q("div", Xr, [
|
|
3136
3148
|
X(p.$slots, "form-actions", {}, () => [
|
|
3137
|
-
|
|
3149
|
+
K(Z, {
|
|
3138
3150
|
appearance: "outline",
|
|
3139
3151
|
"data-testid": "form-cancel",
|
|
3140
3152
|
disabled: e.isReadonly,
|
|
3141
3153
|
type: "reset"
|
|
3142
3154
|
}, {
|
|
3143
3155
|
default: k(() => [
|
|
3144
|
-
te(
|
|
3156
|
+
te(E(g(o)("baseForm.actions.cancel")), 1)
|
|
3145
3157
|
]),
|
|
3146
3158
|
_: 1
|
|
3147
3159
|
}, 8, ["disabled"]),
|
|
3148
|
-
|
|
3160
|
+
K(Z, {
|
|
3149
3161
|
appearance: "primary",
|
|
3150
3162
|
"data-testid": "form-submit",
|
|
3151
3163
|
disabled: u.value,
|
|
3152
3164
|
type: "submit"
|
|
3153
3165
|
}, {
|
|
3154
3166
|
default: k(() => [
|
|
3155
|
-
te(
|
|
3167
|
+
te(E(g(o)("baseForm.actions.save")), 1)
|
|
3156
3168
|
]),
|
|
3157
3169
|
_: 1
|
|
3158
3170
|
}, 8, ["disabled"])
|
|
@@ -3188,16 +3200,16 @@ const Tr = {
|
|
|
3188
3200
|
return ((C = t.value) == null ? void 0 : C.querySelector('[data-testid="first-col"]')) || null;
|
|
3189
3201
|
}), i = x(() => {
|
|
3190
3202
|
var C, p;
|
|
3191
|
-
const
|
|
3192
|
-
return
|
|
3203
|
+
const f = (C = a.rowEl) == null ? void 0 : C.querySelectorAll("td");
|
|
3204
|
+
return f ? ((p = f[0]) == null ? void 0 : p.getAttribute("data-testid")) === a.keyName : !1;
|
|
3193
3205
|
});
|
|
3194
3206
|
let o;
|
|
3195
3207
|
const r = () => {
|
|
3196
3208
|
o && (o.disconnect(), o = void 0);
|
|
3197
3209
|
}, s = () => {
|
|
3198
|
-
var C, p,
|
|
3199
|
-
l.value = ((C = n.value) == null ? void 0 : C.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((
|
|
3200
|
-
}, c =
|
|
3210
|
+
var C, p, f;
|
|
3211
|
+
l.value = ((C = n.value) == null ? void 0 : C.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((f = c.value) == null ? void 0 : f.innerText) || "";
|
|
3212
|
+
}, c = $({}), l = $(0), d = $(0), u = $(""), h = x(() => [n.value, t.value]), y = ke(
|
|
3201
3213
|
h,
|
|
3202
3214
|
(C) => {
|
|
3203
3215
|
if (i.value && (r(), "ResizeObserver" in window && window)) {
|
|
@@ -3215,16 +3227,16 @@ const Tr = {
|
|
|
3215
3227
|
return Ga(() => {
|
|
3216
3228
|
s();
|
|
3217
3229
|
}), Za(() => {
|
|
3218
|
-
|
|
3230
|
+
y();
|
|
3219
3231
|
}), (C, p) => {
|
|
3220
|
-
const
|
|
3221
|
-
return
|
|
3232
|
+
const f = N("KTooltip");
|
|
3233
|
+
return m(), j("span", {
|
|
3222
3234
|
ref_key: "contentRef",
|
|
3223
3235
|
ref: c,
|
|
3224
3236
|
class: "content-wrapper"
|
|
3225
3237
|
}, [
|
|
3226
|
-
i.value ? (
|
|
3227
|
-
|
|
3238
|
+
i.value ? (m(), j("span", tl, [
|
|
3239
|
+
K(f, {
|
|
3228
3240
|
label: I.value ? u.value : "",
|
|
3229
3241
|
"max-width": "300",
|
|
3230
3242
|
placement: "bottomStart"
|
|
@@ -3350,61 +3362,61 @@ const Tr = {
|
|
|
3350
3362
|
},
|
|
3351
3363
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3352
3364
|
setup(e, { emit: a }) {
|
|
3353
|
-
const t = e, { i18n: { t: n } } = se.useI18n(), i = x(() => t.cacheIdentifier || t.preferencesStorageKey), o = (
|
|
3354
|
-
const
|
|
3355
|
-
return Object.keys(t.tableHeaders).forEach((
|
|
3356
|
-
const
|
|
3357
|
-
|
|
3358
|
-
label:
|
|
3359
|
-
key:
|
|
3360
|
-
sortable:
|
|
3365
|
+
const t = e, { i18n: { t: n } } = se.useI18n(), i = x(() => t.cacheIdentifier || t.preferencesStorageKey), o = (_) => _.hasData || !!t.query, r = x(() => {
|
|
3366
|
+
const _ = [];
|
|
3367
|
+
return Object.keys(t.tableHeaders).forEach((w) => {
|
|
3368
|
+
const Z = t.tableHeaders[w];
|
|
3369
|
+
_.push({
|
|
3370
|
+
label: Z.label ?? w,
|
|
3371
|
+
key: w,
|
|
3372
|
+
sortable: Z.sortable ?? !1
|
|
3361
3373
|
});
|
|
3362
|
-
}), t.enableEntityActions &&
|
|
3374
|
+
}), t.enableEntityActions && _.push({
|
|
3363
3375
|
key: "actions",
|
|
3364
3376
|
hideLabel: !0
|
|
3365
|
-
}),
|
|
3366
|
-
}), s = (
|
|
3367
|
-
"data-rowid":
|
|
3368
|
-
"data-testid":
|
|
3369
|
-
...t.rowAttributes(
|
|
3370
|
-
}), c =
|
|
3371
|
-
var
|
|
3372
|
-
return (
|
|
3373
|
-
}, d = (
|
|
3374
|
-
const
|
|
3375
|
-
"data-testid":
|
|
3376
|
-
...t.cellAttributes(
|
|
3377
|
+
}), _;
|
|
3378
|
+
}), s = (_) => ({
|
|
3379
|
+
"data-rowid": _.id,
|
|
3380
|
+
"data-testid": _.name,
|
|
3381
|
+
...t.rowAttributes(_)
|
|
3382
|
+
}), c = $({}), l = (_) => {
|
|
3383
|
+
var w;
|
|
3384
|
+
return (w = c.value) == null ? void 0 : w.$el.querySelector(`[data-rowid="${_.id}"]`);
|
|
3385
|
+
}, d = (_) => {
|
|
3386
|
+
const w = {
|
|
3387
|
+
"data-testid": _.headerKey,
|
|
3388
|
+
...t.cellAttributes(_)
|
|
3377
3389
|
};
|
|
3378
|
-
return
|
|
3390
|
+
return _.colIndex === 0 && (w.style = {
|
|
3379
3391
|
maxWidth: "250px",
|
|
3380
3392
|
overflowX: "hidden",
|
|
3381
3393
|
textOverflow: "ellipsis"
|
|
3382
|
-
}),
|
|
3394
|
+
}), w;
|
|
3383
3395
|
}, u = () => {
|
|
3384
3396
|
a("empty-state-cta-clicked"), h();
|
|
3385
3397
|
}, h = () => {
|
|
3386
3398
|
a("clear-search-input");
|
|
3387
|
-
},
|
|
3388
|
-
a("click:row",
|
|
3389
|
-
}), I = (
|
|
3390
|
-
a("sort",
|
|
3391
|
-
}, { setTablePreferences: C, getTablePreferences: p } = un(),
|
|
3392
|
-
const
|
|
3399
|
+
}, y = x(() => t.disableRowClick ? void 0 : (_, w) => {
|
|
3400
|
+
a("click:row", w);
|
|
3401
|
+
}), I = (_) => {
|
|
3402
|
+
a("sort", _);
|
|
3403
|
+
}, { setTablePreferences: C, getTablePreferences: p } = un(), f = x(() => {
|
|
3404
|
+
const _ = p(t.preferencesStorageKey);
|
|
3393
3405
|
return {
|
|
3394
3406
|
...t.initialFetcherParams,
|
|
3395
|
-
...
|
|
3407
|
+
..._
|
|
3396
3408
|
};
|
|
3397
|
-
}), v = (
|
|
3398
|
-
t.preferencesStorageKey && C(t.preferencesStorageKey,
|
|
3409
|
+
}), v = (_) => {
|
|
3410
|
+
t.preferencesStorageKey && C(t.preferencesStorageKey, _);
|
|
3399
3411
|
};
|
|
3400
|
-
return (
|
|
3401
|
-
const
|
|
3402
|
-
return
|
|
3412
|
+
return (_, w) => {
|
|
3413
|
+
const Z = N("KIcon"), P = N("KButton"), W = N("KDropdownMenu"), S = N("KTable"), B = N("KCard");
|
|
3414
|
+
return m(), L(B, {
|
|
3403
3415
|
class: "kong-ui-entity-base-table",
|
|
3404
3416
|
title: e.title
|
|
3405
3417
|
}, {
|
|
3406
3418
|
body: k(() => [
|
|
3407
|
-
|
|
3419
|
+
K(S, {
|
|
3408
3420
|
ref_key: "tableRefs",
|
|
3409
3421
|
ref: c,
|
|
3410
3422
|
"cache-identifier": i.value,
|
|
@@ -3412,12 +3424,12 @@ const Tr = {
|
|
|
3412
3424
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3413
3425
|
"disable-sorting": e.disableSorting,
|
|
3414
3426
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
3415
|
-
"empty-state-action-message": e.query ?
|
|
3427
|
+
"empty-state-action-message": e.query ? g(n)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3416
3428
|
"empty-state-action-route": e.query ? "" : e.emptyStateOptions.ctaPath,
|
|
3417
3429
|
"empty-state-icon": e.query ? "stateNoSearchResults" : "stateGruceo",
|
|
3418
3430
|
"empty-state-icon-size": "96",
|
|
3419
|
-
"empty-state-message": e.query ?
|
|
3420
|
-
"empty-state-title": e.query ?
|
|
3431
|
+
"empty-state-message": e.query ? g(n)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3432
|
+
"empty-state-title": e.query ? g(n)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3421
3433
|
"enable-client-sort": e.enableClientSort,
|
|
3422
3434
|
"error-state-title": e.errorMessage,
|
|
3423
3435
|
fetcher: e.fetcher,
|
|
@@ -3425,51 +3437,51 @@ const Tr = {
|
|
|
3425
3437
|
"has-error": !!e.errorMessage,
|
|
3426
3438
|
headers: r.value,
|
|
3427
3439
|
"hide-pagination-when-optional": "",
|
|
3428
|
-
"initial-fetcher-params":
|
|
3440
|
+
"initial-fetcher-params": f.value,
|
|
3429
3441
|
"is-loading": e.isLoading,
|
|
3430
3442
|
"pagination-type": e.paginationType,
|
|
3431
3443
|
"row-attrs": s,
|
|
3432
3444
|
"search-input": e.query,
|
|
3433
3445
|
onKtableEmptyStateCtaClicked: u,
|
|
3434
|
-
"onRow:click":
|
|
3435
|
-
onSort:
|
|
3446
|
+
"onRow:click": y.value,
|
|
3447
|
+
onSort: w[0] || (w[0] = (O) => I(O)),
|
|
3436
3448
|
"onUpdate:tablePreferences": v
|
|
3437
|
-
},
|
|
3449
|
+
}, Ie({
|
|
3438
3450
|
toolbar: k(({ state: O }) => [
|
|
3439
|
-
We(
|
|
3440
|
-
X(
|
|
3441
|
-
|
|
3442
|
-
X(
|
|
3451
|
+
We(q("div", il, [
|
|
3452
|
+
X(_.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3453
|
+
_.$slots["toolbar-button"] ? (m(), j("div", ol, [
|
|
3454
|
+
X(_.$slots, "toolbar-button", {}, void 0, !0)
|
|
3443
3455
|
])) : D("", !0)
|
|
3444
3456
|
], 512), [
|
|
3445
3457
|
[He, o(O)]
|
|
3446
3458
|
])
|
|
3447
3459
|
]),
|
|
3448
|
-
actions: k(({ row: O, rowKey:
|
|
3449
|
-
|
|
3460
|
+
actions: k(({ row: O, rowKey: M, rowValue: R }) => [
|
|
3461
|
+
q("div", {
|
|
3450
3462
|
class: "actions-container",
|
|
3451
3463
|
"data-testid": O.name
|
|
3452
3464
|
}, [
|
|
3453
|
-
|
|
3465
|
+
K(W, {
|
|
3454
3466
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3455
3467
|
width: e.dropdownMenuWidth
|
|
3456
3468
|
}, {
|
|
3457
3469
|
items: k(() => [
|
|
3458
|
-
X(
|
|
3470
|
+
X(_.$slots, "actions", {
|
|
3459
3471
|
row: O,
|
|
3460
|
-
rowKey:
|
|
3461
|
-
rowValue:
|
|
3472
|
+
rowKey: M,
|
|
3473
|
+
rowValue: R
|
|
3462
3474
|
}, void 0, !0)
|
|
3463
3475
|
]),
|
|
3464
3476
|
default: k(() => [
|
|
3465
|
-
|
|
3477
|
+
K(P, {
|
|
3466
3478
|
class: "actions-trigger",
|
|
3467
3479
|
"data-testid": "overflow-actions-button",
|
|
3468
3480
|
size: "small"
|
|
3469
3481
|
}, {
|
|
3470
3482
|
icon: k(() => [
|
|
3471
|
-
|
|
3472
|
-
color:
|
|
3483
|
+
K(Z, {
|
|
3484
|
+
color: g(Wn),
|
|
3473
3485
|
icon: "more",
|
|
3474
3486
|
size: "16"
|
|
3475
3487
|
}, null, 8, ["color"])
|
|
@@ -3483,20 +3495,20 @@ const Tr = {
|
|
|
3483
3495
|
]),
|
|
3484
3496
|
_: 2
|
|
3485
3497
|
}, [
|
|
3486
|
-
ye(e.tableHeaders, (O,
|
|
3487
|
-
name:
|
|
3488
|
-
fn: k(({ row:
|
|
3489
|
-
|
|
3490
|
-
"key-name": String(
|
|
3491
|
-
"row-el": l(
|
|
3498
|
+
ye(e.tableHeaders, (O, M) => ({
|
|
3499
|
+
name: M,
|
|
3500
|
+
fn: k(({ row: R, rowKey: U, rowValue: H }) => [
|
|
3501
|
+
K(nl, {
|
|
3502
|
+
"key-name": String(M),
|
|
3503
|
+
"row-el": l(R)
|
|
3492
3504
|
}, {
|
|
3493
3505
|
default: k(() => [
|
|
3494
|
-
X(
|
|
3495
|
-
row:
|
|
3506
|
+
X(_.$slots, M, {
|
|
3507
|
+
row: R,
|
|
3496
3508
|
rowKey: U,
|
|
3497
|
-
rowValue:
|
|
3509
|
+
rowValue: H
|
|
3498
3510
|
}, () => [
|
|
3499
|
-
te(
|
|
3511
|
+
te(E(H), 1)
|
|
3500
3512
|
], !0)
|
|
3501
3513
|
]),
|
|
3502
3514
|
_: 2
|
|
@@ -3560,8 +3572,8 @@ const Tr = {
|
|
|
3560
3572
|
a("proceed");
|
|
3561
3573
|
};
|
|
3562
3574
|
return (s, c) => {
|
|
3563
|
-
const l =
|
|
3564
|
-
return
|
|
3575
|
+
const l = N("KAlert"), d = N("KPrompt");
|
|
3576
|
+
return m(), L(d, {
|
|
3565
3577
|
"action-button-text": "Yes, delete",
|
|
3566
3578
|
"action-pending": e.actionPending,
|
|
3567
3579
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3573,35 +3585,35 @@ const Tr = {
|
|
|
3573
3585
|
onProceed: r
|
|
3574
3586
|
}, {
|
|
3575
3587
|
"body-content": k(() => [
|
|
3576
|
-
e.error ? (
|
|
3577
|
-
|
|
3588
|
+
e.error ? (m(), j("div", cl, [
|
|
3589
|
+
K(l, { appearance: "danger" }, {
|
|
3578
3590
|
alertMessage: k(() => [
|
|
3579
|
-
te(
|
|
3591
|
+
te(E(e.error), 1)
|
|
3580
3592
|
]),
|
|
3581
3593
|
_: 1
|
|
3582
3594
|
})
|
|
3583
3595
|
])) : D("", !0),
|
|
3584
|
-
|
|
3596
|
+
K(g(n), {
|
|
3585
3597
|
class: "message",
|
|
3586
3598
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3587
3599
|
tag: "p"
|
|
3588
|
-
},
|
|
3600
|
+
}, Ie({
|
|
3589
3601
|
entityType: k(() => [
|
|
3590
|
-
te(
|
|
3602
|
+
te(E(t.entityType), 1)
|
|
3591
3603
|
]),
|
|
3592
3604
|
_: 2
|
|
3593
3605
|
}, [
|
|
3594
3606
|
t.entityName ? {
|
|
3595
3607
|
name: "entityName",
|
|
3596
3608
|
fn: k(() => [
|
|
3597
|
-
|
|
3609
|
+
q("strong", null, E(t.entityName), 1)
|
|
3598
3610
|
]),
|
|
3599
3611
|
key: "0"
|
|
3600
3612
|
} : void 0
|
|
3601
3613
|
]), 1032, ["keypath"]),
|
|
3602
|
-
t.description || s.$slots.description ? (
|
|
3614
|
+
t.description || s.$slots.description ? (m(), j("div", ul, [
|
|
3603
3615
|
X(s.$slots, "description", {}, () => [
|
|
3604
|
-
|
|
3616
|
+
q("p", null, E(t.description), 1)
|
|
3605
3617
|
], !0)
|
|
3606
3618
|
])) : D("", !0)
|
|
3607
3619
|
]),
|
|
@@ -3632,16 +3644,16 @@ const Tr = {
|
|
|
3632
3644
|
}
|
|
3633
3645
|
},
|
|
3634
3646
|
setup(e) {
|
|
3635
|
-
return (a, t) => (
|
|
3636
|
-
|
|
3637
|
-
|
|
3647
|
+
return (a, t) => (m(), j("svg", fl, [
|
|
3648
|
+
q("mask", yl, [
|
|
3649
|
+
q("rect", {
|
|
3638
3650
|
fill: e.color,
|
|
3639
3651
|
height: "20",
|
|
3640
3652
|
width: "20"
|
|
3641
3653
|
}, null, 8, ml)
|
|
3642
3654
|
]),
|
|
3643
|
-
|
|
3644
|
-
|
|
3655
|
+
q("g", gl, [
|
|
3656
|
+
q("path", {
|
|
3645
3657
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3646
3658
|
fill: e.color
|
|
3647
3659
|
}, null, 8, hl)
|
|
@@ -3671,21 +3683,21 @@ const Tr = {
|
|
|
3671
3683
|
},
|
|
3672
3684
|
emits: ["update:modelValue"],
|
|
3673
3685
|
setup(e, { emit: a }) {
|
|
3674
|
-
const t = e, { i18n: { t: n } } = se.useI18n(), i =
|
|
3686
|
+
const t = e, { i18n: { t: n } } = se.useI18n(), i = $(!1), o = $({}), r = x(() => {
|
|
3675
3687
|
const p = [];
|
|
3676
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
3677
|
-
|
|
3688
|
+
return new URLSearchParams(t.modelValue).forEach((f, v) => {
|
|
3689
|
+
f !== "" && p.push(v);
|
|
3678
3690
|
}), p;
|
|
3679
3691
|
}), s = x(() => {
|
|
3680
3692
|
const p = t.config.fields;
|
|
3681
|
-
return Object.keys(p).filter((
|
|
3682
|
-
label: p[
|
|
3683
|
-
value:
|
|
3693
|
+
return Object.keys(p).filter((f) => p[f].searchable).map((f) => ({
|
|
3694
|
+
label: p[f].label || f,
|
|
3695
|
+
value: f
|
|
3684
3696
|
}));
|
|
3685
3697
|
});
|
|
3686
|
-
|
|
3687
|
-
o.value = {}, new URLSearchParams(p).forEach((
|
|
3688
|
-
o.value[v] =
|
|
3698
|
+
ke(() => t.modelValue, (p) => {
|
|
3699
|
+
o.value = {}, new URLSearchParams(p).forEach((f, v) => {
|
|
3700
|
+
o.value[v] = f;
|
|
3689
3701
|
});
|
|
3690
3702
|
});
|
|
3691
3703
|
const c = () => {
|
|
@@ -3693,15 +3705,15 @@ const Tr = {
|
|
|
3693
3705
|
}, l = (p) => {
|
|
3694
3706
|
a("update:modelValue", p);
|
|
3695
3707
|
}, d = (p) => `filter-${p}`, u = (p) => {
|
|
3696
|
-
var
|
|
3697
|
-
return (((v = (
|
|
3698
|
-
value:
|
|
3699
|
-
label:
|
|
3708
|
+
var f, v;
|
|
3709
|
+
return (((v = (f = t.config.schema) == null ? void 0 : f[p]) == null ? void 0 : v.values) ?? []).map((_) => ({
|
|
3710
|
+
value: _,
|
|
3711
|
+
label: _
|
|
3700
3712
|
}));
|
|
3701
3713
|
}, h = (p) => {
|
|
3702
|
-
var
|
|
3703
|
-
return ((v = (
|
|
3704
|
-
},
|
|
3714
|
+
var f, v;
|
|
3715
|
+
return ((v = (f = t.config.schema) == null ? void 0 : f[p]) == null ? void 0 : v.type) ?? "text";
|
|
3716
|
+
}, y = (p) => {
|
|
3705
3717
|
o.value = {
|
|
3706
3718
|
...o.value,
|
|
3707
3719
|
[p]: ""
|
|
@@ -3709,12 +3721,12 @@ const Tr = {
|
|
|
3709
3721
|
}, I = () => {
|
|
3710
3722
|
o.value = {}, C(!0);
|
|
3711
3723
|
}, C = (p = !1) => {
|
|
3712
|
-
const
|
|
3713
|
-
p && (i.value = !1), a("update:modelValue", new URLSearchParams(
|
|
3724
|
+
const f = Object.keys(o.value).reduce((v, _) => (o.value[_] && (v[_] = `${o.value[_]}`), v), {});
|
|
3725
|
+
p && (i.value = !1), a("update:modelValue", new URLSearchParams(f).toString());
|
|
3714
3726
|
};
|
|
3715
|
-
return (p,
|
|
3716
|
-
const v =
|
|
3717
|
-
return e.config.isExactMatch ? (
|
|
3727
|
+
return (p, f) => {
|
|
3728
|
+
const v = N("KInput"), _ = N("KButton"), w = N("KSelect"), Z = N("KMenuItem"), P = N("KMenu");
|
|
3729
|
+
return e.config.isExactMatch ? (m(), L(v, {
|
|
3718
3730
|
key: 0,
|
|
3719
3731
|
autocomplete: "off",
|
|
3720
3732
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3724,90 +3736,90 @@ const Tr = {
|
|
|
3724
3736
|
"onUpdate:modelValue": l
|
|
3725
3737
|
}, {
|
|
3726
3738
|
icon: k(() => [
|
|
3727
|
-
|
|
3739
|
+
K(vl)
|
|
3728
3740
|
]),
|
|
3729
3741
|
_: 1
|
|
3730
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
3731
|
-
|
|
3742
|
+
}, 8, ["model-value", "placeholder"])) : (m(), j("div", kl, [
|
|
3743
|
+
K(_, {
|
|
3732
3744
|
appearance: "btn-link",
|
|
3733
3745
|
"data-testid": "filter-button",
|
|
3734
3746
|
icon: "filter",
|
|
3735
3747
|
onClick: c
|
|
3736
3748
|
}, {
|
|
3737
3749
|
default: k(() => [
|
|
3738
|
-
te(
|
|
3750
|
+
te(E(g(n)("filter.filterButtonText")) + " " + E(r.value.length > 0 ? `(${r.value.length})` : ""), 1)
|
|
3739
3751
|
]),
|
|
3740
3752
|
_: 1
|
|
3741
3753
|
}),
|
|
3742
|
-
We(
|
|
3754
|
+
We(q("div", {
|
|
3743
3755
|
class: "kong-ui-entity-filter-backdrop",
|
|
3744
3756
|
onClick: c
|
|
3745
3757
|
}, null, 512), [
|
|
3746
3758
|
[He, i.value]
|
|
3747
3759
|
]),
|
|
3748
|
-
We(
|
|
3760
|
+
We(K(P, { class: "kong-ui-entity-filter-menu" }, {
|
|
3749
3761
|
body: k(() => [
|
|
3750
|
-
(
|
|
3751
|
-
key:
|
|
3752
|
-
"data-testid":
|
|
3762
|
+
(m(!0), j(me, null, ye(s.value, (W, S) => (m(), L(Z, {
|
|
3763
|
+
key: W.value,
|
|
3764
|
+
"data-testid": W.value,
|
|
3753
3765
|
expandable: "",
|
|
3754
3766
|
"last-menu-item": S === s.value.length - 1
|
|
3755
3767
|
}, {
|
|
3756
3768
|
itemTitle: k(() => [
|
|
3757
|
-
|
|
3758
|
-
te(
|
|
3759
|
-
We(
|
|
3760
|
-
[He, r.value.includes(
|
|
3769
|
+
q("span", bl, [
|
|
3770
|
+
te(E(W.label) + " ", 1),
|
|
3771
|
+
We(q("span", Cl, null, 512), [
|
|
3772
|
+
[He, r.value.includes(W.value)]
|
|
3761
3773
|
])
|
|
3762
3774
|
])
|
|
3763
3775
|
]),
|
|
3764
3776
|
itemBody: k(() => {
|
|
3765
|
-
var
|
|
3777
|
+
var B, O;
|
|
3766
3778
|
return [
|
|
3767
|
-
|
|
3768
|
-
|
|
3779
|
+
q("div", wl, [
|
|
3780
|
+
q("label", {
|
|
3769
3781
|
class: "menu-item-label",
|
|
3770
|
-
for: d(
|
|
3771
|
-
},
|
|
3772
|
-
((O = (
|
|
3782
|
+
for: d(W.value)
|
|
3783
|
+
}, E(g(n)("filter.fieldLabel")), 9, _l),
|
|
3784
|
+
((O = (B = e.config.schema) == null ? void 0 : B[W.value]) == null ? void 0 : O.type) === "select" ? (m(), L(w, {
|
|
3773
3785
|
key: 0,
|
|
3774
|
-
id: d(
|
|
3775
|
-
modelValue: o.value[
|
|
3776
|
-
"onUpdate:modelValue": (
|
|
3786
|
+
id: d(W.value),
|
|
3787
|
+
modelValue: o.value[W.value],
|
|
3788
|
+
"onUpdate:modelValue": (M) => o.value[W.value] = M,
|
|
3777
3789
|
appearance: "select",
|
|
3778
|
-
items: u(
|
|
3779
|
-
placeholder:
|
|
3780
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
3790
|
+
items: u(W.value),
|
|
3791
|
+
placeholder: g(n)("filter.selectPlaceholder")
|
|
3792
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), L(v, {
|
|
3781
3793
|
key: 1,
|
|
3782
|
-
id: d(
|
|
3783
|
-
modelValue: o.value[
|
|
3784
|
-
"onUpdate:modelValue": (
|
|
3794
|
+
id: d(W.value),
|
|
3795
|
+
modelValue: o.value[W.value],
|
|
3796
|
+
"onUpdate:modelValue": (M) => o.value[W.value] = M,
|
|
3785
3797
|
autocomplete: "off",
|
|
3786
|
-
placeholder:
|
|
3798
|
+
placeholder: g(n)("filter.inputPlaceholder"),
|
|
3787
3799
|
size: "small",
|
|
3788
|
-
type: h(
|
|
3800
|
+
type: h(W.value)
|
|
3789
3801
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3790
3802
|
]),
|
|
3791
|
-
|
|
3792
|
-
|
|
3803
|
+
q("div", Sl, [
|
|
3804
|
+
K(_, {
|
|
3793
3805
|
appearance: "btn-link",
|
|
3794
3806
|
"data-testid": "apply-filter",
|
|
3795
3807
|
size: "small",
|
|
3796
|
-
onClick:
|
|
3808
|
+
onClick: f[0] || (f[0] = (M) => C(!0))
|
|
3797
3809
|
}, {
|
|
3798
3810
|
default: k(() => [
|
|
3799
|
-
te(
|
|
3811
|
+
te(E(g(n)("filter.applyButtonText")), 1)
|
|
3800
3812
|
]),
|
|
3801
3813
|
_: 1
|
|
3802
3814
|
}),
|
|
3803
|
-
|
|
3815
|
+
K(_, {
|
|
3804
3816
|
appearance: "btn-link",
|
|
3805
3817
|
"data-testid": "clear-filter",
|
|
3806
3818
|
size: "small",
|
|
3807
|
-
onClick: (
|
|
3819
|
+
onClick: (M) => y(W.value)
|
|
3808
3820
|
}, {
|
|
3809
3821
|
default: k(() => [
|
|
3810
|
-
te(
|
|
3822
|
+
te(E(g(n)("filter.clearButtonText")), 1)
|
|
3811
3823
|
]),
|
|
3812
3824
|
_: 2
|
|
3813
3825
|
}, 1032, ["onClick"])
|
|
@@ -3818,9 +3830,9 @@ const Tr = {
|
|
|
3818
3830
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
3819
3831
|
]),
|
|
3820
3832
|
actionButton: k(() => [
|
|
3821
|
-
|
|
3833
|
+
K(_, { onClick: I }, {
|
|
3822
3834
|
default: k(() => [
|
|
3823
|
-
te(
|
|
3835
|
+
te(E(g(n)("filter.clearAllButtonText")), 1)
|
|
3824
3836
|
]),
|
|
3825
3837
|
_: 1
|
|
3826
3838
|
})
|
|
@@ -3854,8 +3866,8 @@ const Tr = {
|
|
|
3854
3866
|
}
|
|
3855
3867
|
},
|
|
3856
3868
|
setup(e) {
|
|
3857
|
-
const a = e, t =
|
|
3858
|
-
return
|
|
3869
|
+
const a = e, t = $(void 0), n = x(() => t.value === !0 || t.value !== void 0 && a.forceShow === !0);
|
|
3870
|
+
return ke(() => a.authFunction, async () => {
|
|
3859
3871
|
t.value = await a.authFunction();
|
|
3860
3872
|
}, { immediate: !0 }), (i, o) => n.value ? X(i.$slots, "default", {
|
|
3861
3873
|
key: 0,
|
|
@@ -3868,10 +3880,10 @@ const Tr = {
|
|
|
3868
3880
|
}, jl = {
|
|
3869
3881
|
key: 1,
|
|
3870
3882
|
class: "form-section-description"
|
|
3871
|
-
},
|
|
3883
|
+
}, Kl = {
|
|
3872
3884
|
key: 2,
|
|
3873
3885
|
class: "form-section-footer"
|
|
3874
|
-
},
|
|
3886
|
+
}, $l = { class: "form-section-content" }, Ol = /* @__PURE__ */ re({
|
|
3875
3887
|
__name: "EntityFormSection",
|
|
3876
3888
|
props: {
|
|
3877
3889
|
title: {
|
|
@@ -3897,32 +3909,32 @@ const Tr = {
|
|
|
3897
3909
|
},
|
|
3898
3910
|
setup(e) {
|
|
3899
3911
|
const a = et();
|
|
3900
|
-
return (t, n) => (
|
|
3901
|
-
class:
|
|
3912
|
+
return (t, n) => (m(), j("fieldset", {
|
|
3913
|
+
class: xe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
3902
3914
|
}, [
|
|
3903
|
-
|
|
3904
|
-
e.hideInfoHeader ? D("", !0) : (
|
|
3915
|
+
q("div", xl, [
|
|
3916
|
+
e.hideInfoHeader ? D("", !0) : (m(), j("div", {
|
|
3905
3917
|
key: 0,
|
|
3906
|
-
class:
|
|
3918
|
+
class: xe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
3907
3919
|
}, [
|
|
3908
|
-
e.title ? (
|
|
3909
|
-
e.description ||
|
|
3920
|
+
e.title ? (m(), j("h4", Tl, E(e.title), 1)) : D("", !0),
|
|
3921
|
+
e.description || g(a).description ? (m(), j("div", jl, [
|
|
3910
3922
|
X(t.$slots, "description", {}, () => [
|
|
3911
|
-
|
|
3923
|
+
q("p", null, E(e.description), 1)
|
|
3912
3924
|
], !0)
|
|
3913
3925
|
])) : D("", !0),
|
|
3914
|
-
|
|
3926
|
+
g(a).footer ? (m(), j("div", Kl, [
|
|
3915
3927
|
X(t.$slots, "footer", {}, void 0, !0)
|
|
3916
3928
|
])) : D("", !0)
|
|
3917
3929
|
], 2)),
|
|
3918
|
-
|
|
3930
|
+
q("div", $l, [
|
|
3919
3931
|
X(t.$slots, "default", {}, void 0, !0)
|
|
3920
3932
|
])
|
|
3921
3933
|
])
|
|
3922
3934
|
], 2));
|
|
3923
3935
|
}
|
|
3924
3936
|
}), Yt = /* @__PURE__ */ Ce(Ol, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: St, useDeleteUrlBuilder: Ml, useErrors: El, useFetchUrlBuilder: ts, useFetcher: Fl, useDebouncedFilter: Nl, useStringHelpers: Bl, useHelpers: as, useGatewayFeatureSupported: ns, useTruncationDetector: is } = se;
|
|
3925
|
-
const Ll = { class: "kong-ui-entities-keys-list" }, Pl = { key: 1 },
|
|
3937
|
+
const Ll = { class: "kong-ui-entities-keys-list" }, Pl = { key: 1 }, ql = /* @__PURE__ */ re({
|
|
3926
3938
|
__name: "KeyList",
|
|
3927
3939
|
props: {
|
|
3928
3940
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3966,148 +3978,148 @@ const Ll = { class: "kong-ui-entities-keys-list" }, Pl = { key: 1 }, Rl = /* @__
|
|
|
3966
3978
|
var ce;
|
|
3967
3979
|
const t = e, { i18n: { t: n } } = mt.useI18n(), i = ft(), { axiosInstance: o } = St({
|
|
3968
3980
|
headers: (ce = t.config) == null ? void 0 : ce.requestHeaders
|
|
3969
|
-
}), r =
|
|
3981
|
+
}), r = $(1), s = x(() => t.config.app !== "kongManager" || !!t.config.disableSorting), c = {
|
|
3970
3982
|
name: { label: n("keys.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
3971
3983
|
kid: { label: n("keys.list.table_headers.key_id"), sortable: !0 },
|
|
3972
3984
|
tags: { label: n("keys.list.table_headers.tags") },
|
|
3973
3985
|
id: { label: n("keys.list.table_headers.id"), sortable: !0 }
|
|
3974
3986
|
}, l = c, d = x(() => {
|
|
3975
3987
|
var b, T, ee, he;
|
|
3976
|
-
let
|
|
3977
|
-
return t.config.app === "konnect" ?
|
|
3978
|
-
}), u =
|
|
3979
|
-
const
|
|
3980
|
-
if (
|
|
3988
|
+
let F = `${t.config.apiBaseUrl}${Se.list[t.config.app][t.config.keySetId ? "forKeySet" : "all"]}`;
|
|
3989
|
+
return t.config.app === "konnect" ? F = F.replace(/{controlPlaneId}/gi, ((b = t.config) == null ? void 0 : b.controlPlaneId) || "").replace(/{keySetId}/gi, ((T = t.config) == null ? void 0 : T.keySetId) || "") : t.config.app === "kongManager" && (F = F.replace(/\/{workspace}/gi, (ee = t.config) != null && ee.workspace ? `/${t.config.workspace}` : "").replace(/{keySetId}/gi, ((he = t.config) == null ? void 0 : he.keySetId) || "")), F;
|
|
3990
|
+
}), u = $(""), h = x(() => {
|
|
3991
|
+
const F = t.config.app === "konnect" || t.config.isExactMatch;
|
|
3992
|
+
if (F)
|
|
3981
3993
|
return {
|
|
3982
|
-
isExactMatch:
|
|
3994
|
+
isExactMatch: F,
|
|
3983
3995
|
placeholder: n("keys.search.placeholder")
|
|
3984
3996
|
};
|
|
3985
3997
|
const b = { name: c.name };
|
|
3986
3998
|
return {
|
|
3987
|
-
isExactMatch:
|
|
3999
|
+
isExactMatch: F,
|
|
3988
4000
|
fields: b,
|
|
3989
4001
|
schema: t.config.filterSchema
|
|
3990
4002
|
};
|
|
3991
|
-
}), { fetcher:
|
|
4003
|
+
}), { fetcher: y, fetcherState: I } = Fl(t.config, d.value), C = () => {
|
|
3992
4004
|
u.value = "";
|
|
3993
4005
|
}, p = () => {
|
|
3994
4006
|
r.value++;
|
|
3995
|
-
},
|
|
3996
|
-
const T =
|
|
4007
|
+
}, f = $(""), v = (F, b) => {
|
|
4008
|
+
const T = F.id;
|
|
3997
4009
|
if (!b(T)) {
|
|
3998
|
-
|
|
4010
|
+
P(F, "id");
|
|
3999
4011
|
return;
|
|
4000
4012
|
}
|
|
4001
|
-
|
|
4002
|
-
},
|
|
4003
|
-
const T = JSON.stringify(
|
|
4013
|
+
Z(F, "id");
|
|
4014
|
+
}, _ = (F, b) => {
|
|
4015
|
+
const T = JSON.stringify(F);
|
|
4004
4016
|
if (!b(T)) {
|
|
4005
4017
|
a("copy:error", {
|
|
4006
|
-
entity:
|
|
4018
|
+
entity: F,
|
|
4007
4019
|
message: n("keys.errors.copy")
|
|
4008
4020
|
});
|
|
4009
4021
|
return;
|
|
4010
4022
|
}
|
|
4011
4023
|
a("copy:success", {
|
|
4012
|
-
entity:
|
|
4024
|
+
entity: F,
|
|
4013
4025
|
message: n("keys.copy.success_brief")
|
|
4014
4026
|
});
|
|
4015
|
-
},
|
|
4016
|
-
const { type: ee } =
|
|
4017
|
-
ee === "success" ?
|
|
4018
|
-
},
|
|
4027
|
+
}, w = (F, b, T) => {
|
|
4028
|
+
const { type: ee } = F;
|
|
4029
|
+
ee === "success" ? Z(b, T) : P(b, T);
|
|
4030
|
+
}, Z = (F, b) => {
|
|
4019
4031
|
a("copy:success", {
|
|
4020
|
-
entity:
|
|
4032
|
+
entity: F,
|
|
4021
4033
|
field: b,
|
|
4022
|
-
message: n("keys.copy.success", { val:
|
|
4034
|
+
message: n("keys.copy.success", { val: F[b] })
|
|
4023
4035
|
});
|
|
4024
|
-
},
|
|
4036
|
+
}, P = (F, b) => {
|
|
4025
4037
|
a("copy:error", {
|
|
4026
|
-
entity:
|
|
4038
|
+
entity: F,
|
|
4027
4039
|
field: b,
|
|
4028
4040
|
message: n("keys.errors.copy")
|
|
4029
4041
|
});
|
|
4030
|
-
},
|
|
4042
|
+
}, W = async (F) => {
|
|
4031
4043
|
var T;
|
|
4032
|
-
await ((T = t.canRetrieve) == null ? void 0 : T.call(t,
|
|
4033
|
-
}, S = (
|
|
4044
|
+
await ((T = t.canRetrieve) == null ? void 0 : T.call(t, F)) && i.push(t.config.getViewRoute(F.id));
|
|
4045
|
+
}, S = (F) => ({
|
|
4034
4046
|
label: n("keys.actions.view"),
|
|
4035
|
-
to: t.config.getViewRoute(
|
|
4036
|
-
}),
|
|
4047
|
+
to: t.config.getViewRoute(F)
|
|
4048
|
+
}), B = (F) => ({
|
|
4037
4049
|
label: n("keys.actions.edit"),
|
|
4038
|
-
to: t.config.getEditRoute(
|
|
4039
|
-
}), O =
|
|
4040
|
-
O.value =
|
|
4050
|
+
to: t.config.getEditRoute(F)
|
|
4051
|
+
}), O = $(void 0), M = $(!1), R = $(!1), U = $(""), H = Ml(t.config, d.value), ae = (F) => {
|
|
4052
|
+
O.value = F, M.value = !0;
|
|
4041
4053
|
}, ne = () => {
|
|
4042
|
-
|
|
4054
|
+
M.value = !1;
|
|
4043
4055
|
}, Q = async () => {
|
|
4044
|
-
var
|
|
4045
|
-
if ((
|
|
4046
|
-
|
|
4056
|
+
var F, b, T;
|
|
4057
|
+
if ((F = O.value) != null && F.id) {
|
|
4058
|
+
R.value = !0;
|
|
4047
4059
|
try {
|
|
4048
|
-
await o.delete(
|
|
4060
|
+
await o.delete(H(O.value.id)), R.value = !1, M.value = !1, r.value++, a("delete:success", O.value);
|
|
4049
4061
|
} catch (ee) {
|
|
4050
4062
|
U.value = ((T = (b = ee.response) == null ? void 0 : b.data) == null ? void 0 : T.message) || ee.message || n("keys.errors.delete"), a("error", ee);
|
|
4051
4063
|
} finally {
|
|
4052
|
-
|
|
4064
|
+
R.value = !1;
|
|
4053
4065
|
}
|
|
4054
4066
|
}
|
|
4055
4067
|
};
|
|
4056
|
-
|
|
4057
|
-
if (
|
|
4058
|
-
|
|
4068
|
+
ke(I, (F) => {
|
|
4069
|
+
if (F.status === je.Error) {
|
|
4070
|
+
f.value = n("keys.errors.general"), a("error", F.error);
|
|
4059
4071
|
return;
|
|
4060
4072
|
}
|
|
4061
|
-
|
|
4073
|
+
f.value = "";
|
|
4062
4074
|
});
|
|
4063
|
-
const
|
|
4075
|
+
const z = $({
|
|
4064
4076
|
ctaPath: t.config.createRoute,
|
|
4065
4077
|
ctaText: void 0,
|
|
4066
4078
|
message: n("keys.list.empty_state.description"),
|
|
4067
4079
|
title: n("keys.title")
|
|
4068
4080
|
});
|
|
4069
4081
|
return tt(async () => {
|
|
4070
|
-
await t.canCreate() && (
|
|
4071
|
-
}), (
|
|
4072
|
-
const T =
|
|
4073
|
-
return
|
|
4074
|
-
|
|
4082
|
+
await t.canCreate() && (z.value.title = n("keys.list.empty_state.title"), z.value.ctaText = n("keys.actions.create"));
|
|
4083
|
+
}), (F, b) => {
|
|
4084
|
+
const T = N("KButton"), ee = N("CopyUuid"), he = N("KBadge"), be = N("KTruncate"), V = N("KDropdownItem"), Ne = N("KClipboardProvider");
|
|
4085
|
+
return m(), j("div", Ll, [
|
|
4086
|
+
K(g(sl), {
|
|
4075
4087
|
"cache-identifier": e.cacheIdentifier,
|
|
4076
4088
|
"disable-pagination-page-jump": "",
|
|
4077
4089
|
"disable-sorting": s.value,
|
|
4078
|
-
"empty-state-options":
|
|
4090
|
+
"empty-state-options": z.value,
|
|
4079
4091
|
"enable-entity-actions": "",
|
|
4080
|
-
"error-message":
|
|
4081
|
-
fetcher:
|
|
4092
|
+
"error-message": f.value,
|
|
4093
|
+
fetcher: g(y),
|
|
4082
4094
|
"fetcher-cache-key": r.value,
|
|
4083
4095
|
"pagination-type": "offset",
|
|
4084
4096
|
"preferences-storage-key": "kong-ui-entities-keys-list",
|
|
4085
4097
|
query: u.value,
|
|
4086
|
-
"table-headers":
|
|
4098
|
+
"table-headers": g(l),
|
|
4087
4099
|
onClearSearchInput: C,
|
|
4088
|
-
"onClick:row": b[2] || (b[2] = (
|
|
4100
|
+
"onClick:row": b[2] || (b[2] = (Y) => W(Y)),
|
|
4089
4101
|
onSort: p
|
|
4090
4102
|
}, {
|
|
4091
4103
|
"toolbar-filter": k(() => [
|
|
4092
|
-
|
|
4104
|
+
K(g(Al), {
|
|
4093
4105
|
modelValue: u.value,
|
|
4094
|
-
"onUpdate:modelValue": b[0] || (b[0] = (
|
|
4106
|
+
"onUpdate:modelValue": b[0] || (b[0] = (Y) => u.value = Y),
|
|
4095
4107
|
config: h.value
|
|
4096
4108
|
}, null, 8, ["modelValue", "config"])
|
|
4097
4109
|
]),
|
|
4098
4110
|
"toolbar-button": k(() => [
|
|
4099
|
-
|
|
4111
|
+
K(g(Je), {
|
|
4100
4112
|
"auth-function": () => e.canCreate()
|
|
4101
4113
|
}, {
|
|
4102
4114
|
default: k(() => [
|
|
4103
|
-
|
|
4115
|
+
K(T, {
|
|
4104
4116
|
appearance: "primary",
|
|
4105
4117
|
"data-testid": "toolbar-add-key",
|
|
4106
4118
|
icon: "plus",
|
|
4107
4119
|
to: e.config.createRoute
|
|
4108
4120
|
}, {
|
|
4109
4121
|
default: k(() => [
|
|
4110
|
-
te(
|
|
4122
|
+
te(E(g(n)("keys.list.toolbar_actions.new_key")), 1)
|
|
4111
4123
|
]),
|
|
4112
4124
|
_: 1
|
|
4113
4125
|
}, 8, ["to"])
|
|
@@ -4115,102 +4127,102 @@ const Ll = { class: "kong-ui-entities-keys-list" }, Pl = { key: 1 }, Rl = /* @__
|
|
|
4115
4127
|
_: 1
|
|
4116
4128
|
}, 8, ["auth-function"])
|
|
4117
4129
|
]),
|
|
4118
|
-
name: k(({ rowValue:
|
|
4119
|
-
|
|
4130
|
+
name: k(({ rowValue: Y }) => [
|
|
4131
|
+
q("b", null, E(Y ?? "-"), 1)
|
|
4120
4132
|
]),
|
|
4121
|
-
kid: k(({ row:
|
|
4122
|
-
|
|
4123
|
-
notify: (ve) =>
|
|
4133
|
+
kid: k(({ row: Y, rowValue: le }) => [
|
|
4134
|
+
K(ee, {
|
|
4135
|
+
notify: (ve) => w(ve, Y, "kid"),
|
|
4124
4136
|
uuid: le
|
|
4125
4137
|
}, null, 8, ["notify", "uuid"])
|
|
4126
4138
|
]),
|
|
4127
|
-
tags: k(({ rowValue:
|
|
4128
|
-
(
|
|
4139
|
+
tags: k(({ rowValue: Y }) => [
|
|
4140
|
+
(Y == null ? void 0 : Y.length) > 0 ? (m(), L(be, { key: 0 }, {
|
|
4129
4141
|
default: k(() => [
|
|
4130
|
-
(
|
|
4142
|
+
(m(!0), j(me, null, ye(Y, (le) => (m(), L(he, {
|
|
4131
4143
|
key: le,
|
|
4132
4144
|
onClick: b[1] || (b[1] = ze(() => {
|
|
4133
4145
|
}, ["stop"]))
|
|
4134
4146
|
}, {
|
|
4135
4147
|
default: k(() => [
|
|
4136
|
-
te(
|
|
4148
|
+
te(E(le), 1)
|
|
4137
4149
|
]),
|
|
4138
4150
|
_: 2
|
|
4139
4151
|
}, 1024))), 128))
|
|
4140
4152
|
]),
|
|
4141
4153
|
_: 2
|
|
4142
|
-
}, 1024)) : (
|
|
4154
|
+
}, 1024)) : (m(), j("span", Pl, "-"))
|
|
4143
4155
|
]),
|
|
4144
|
-
id: k(({ row:
|
|
4145
|
-
|
|
4146
|
-
notify: (ve) =>
|
|
4156
|
+
id: k(({ row: Y, rowValue: le }) => [
|
|
4157
|
+
K(ee, {
|
|
4158
|
+
notify: (ve) => w(ve, Y, "id"),
|
|
4147
4159
|
uuid: le
|
|
4148
4160
|
}, null, 8, ["notify", "uuid"])
|
|
4149
4161
|
]),
|
|
4150
|
-
actions: k(({ row:
|
|
4151
|
-
|
|
4162
|
+
actions: k(({ row: Y }) => [
|
|
4163
|
+
K(Ne, null, {
|
|
4152
4164
|
default: k(({ copyToClipboard: le }) => [
|
|
4153
|
-
|
|
4165
|
+
K(V, {
|
|
4154
4166
|
"data-testid": "action-entity-copy-id",
|
|
4155
|
-
onClick: (ve) => v(
|
|
4167
|
+
onClick: (ve) => v(Y, le)
|
|
4156
4168
|
}, {
|
|
4157
4169
|
default: k(() => [
|
|
4158
|
-
te(
|
|
4170
|
+
te(E(g(n)("keys.actions.copy_id")), 1)
|
|
4159
4171
|
]),
|
|
4160
4172
|
_: 2
|
|
4161
4173
|
}, 1032, ["onClick"])
|
|
4162
4174
|
]),
|
|
4163
4175
|
_: 2
|
|
4164
4176
|
}, 1024),
|
|
4165
|
-
|
|
4177
|
+
K(Ne, null, {
|
|
4166
4178
|
default: k(({ copyToClipboard: le }) => [
|
|
4167
|
-
|
|
4179
|
+
K(V, {
|
|
4168
4180
|
"data-testid": "action-entity-copy-json",
|
|
4169
|
-
onClick: (ve) =>
|
|
4181
|
+
onClick: (ve) => _(Y, le)
|
|
4170
4182
|
}, {
|
|
4171
4183
|
default: k(() => [
|
|
4172
|
-
te(
|
|
4184
|
+
te(E(g(n)("keys.actions.copy_json")), 1)
|
|
4173
4185
|
]),
|
|
4174
4186
|
_: 2
|
|
4175
4187
|
}, 1032, ["onClick"])
|
|
4176
4188
|
]),
|
|
4177
4189
|
_: 2
|
|
4178
4190
|
}, 1024),
|
|
4179
|
-
|
|
4180
|
-
"auth-function": () => e.canRetrieve(
|
|
4191
|
+
K(g(Je), {
|
|
4192
|
+
"auth-function": () => e.canRetrieve(Y)
|
|
4181
4193
|
}, {
|
|
4182
4194
|
default: k(() => [
|
|
4183
|
-
|
|
4195
|
+
K(V, {
|
|
4184
4196
|
"data-testid": "action-entity-view",
|
|
4185
4197
|
"has-divider": "",
|
|
4186
|
-
item: S(
|
|
4198
|
+
item: S(Y.id)
|
|
4187
4199
|
}, null, 8, ["item"])
|
|
4188
4200
|
]),
|
|
4189
4201
|
_: 2
|
|
4190
4202
|
}, 1032, ["auth-function"]),
|
|
4191
|
-
|
|
4192
|
-
"auth-function": () => e.canEdit(
|
|
4203
|
+
K(g(Je), {
|
|
4204
|
+
"auth-function": () => e.canEdit(Y)
|
|
4193
4205
|
}, {
|
|
4194
4206
|
default: k(() => [
|
|
4195
|
-
|
|
4207
|
+
K(V, {
|
|
4196
4208
|
"data-testid": "action-entity-edit",
|
|
4197
|
-
item:
|
|
4209
|
+
item: B(Y.id)
|
|
4198
4210
|
}, null, 8, ["item"])
|
|
4199
4211
|
]),
|
|
4200
4212
|
_: 2
|
|
4201
4213
|
}, 1032, ["auth-function"]),
|
|
4202
|
-
|
|
4203
|
-
"auth-function": () => e.canDelete(
|
|
4214
|
+
K(g(Je), {
|
|
4215
|
+
"auth-function": () => e.canDelete(Y)
|
|
4204
4216
|
}, {
|
|
4205
4217
|
default: k(() => [
|
|
4206
|
-
|
|
4218
|
+
K(V, {
|
|
4207
4219
|
"data-testid": "action-entity-delete",
|
|
4208
4220
|
"has-divider": "",
|
|
4209
4221
|
"is-dangerous": "",
|
|
4210
|
-
onClick: (le) => ae(
|
|
4222
|
+
onClick: (le) => ae(Y)
|
|
4211
4223
|
}, {
|
|
4212
4224
|
default: k(() => [
|
|
4213
|
-
te(
|
|
4225
|
+
te(E(g(n)("keys.actions.delete")), 1)
|
|
4214
4226
|
]),
|
|
4215
4227
|
_: 2
|
|
4216
4228
|
}, 1032, ["onClick"])
|
|
@@ -4220,15 +4232,15 @@ const Ll = { class: "kong-ui-entities-keys-list" }, Pl = { key: 1 }, Rl = /* @__
|
|
|
4220
4232
|
]),
|
|
4221
4233
|
_: 1
|
|
4222
4234
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4223
|
-
|
|
4224
|
-
"action-pending":
|
|
4225
|
-
description:
|
|
4235
|
+
K(g(pl), {
|
|
4236
|
+
"action-pending": R.value,
|
|
4237
|
+
description: g(n)("keys.delete.description"),
|
|
4226
4238
|
"entity-name": O.value && (O.value.name || O.value.id),
|
|
4227
|
-
"entity-type":
|
|
4239
|
+
"entity-type": g(Zt).Key,
|
|
4228
4240
|
error: U.value,
|
|
4229
4241
|
"need-confirm": !1,
|
|
4230
|
-
title:
|
|
4231
|
-
visible:
|
|
4242
|
+
title: g(n)("keys.delete.title"),
|
|
4243
|
+
visible: M.value,
|
|
4232
4244
|
onCancel: ne,
|
|
4233
4245
|
onProceed: Q
|
|
4234
4246
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
@@ -4241,7 +4253,7 @@ const Wa = (e, a) => {
|
|
|
4241
4253
|
for (const [n, i] of a)
|
|
4242
4254
|
t[n] = i;
|
|
4243
4255
|
return t;
|
|
4244
|
-
}, os = /* @__PURE__ */ Wa(
|
|
4256
|
+
}, os = /* @__PURE__ */ Wa(ql, [["__scopeId", "data-v-bede4326"]]), Rl = { class: "kong-ui-entities-keys-form" }, Ul = { "data-testid": "no-search-results" }, Vl = { class: "select-item-label" }, Dl = { class: "select-item-desc" }, Jl = {
|
|
4245
4257
|
key: 0,
|
|
4246
4258
|
class: "invalid-key-set-message",
|
|
4247
4259
|
"data-testid": "invalid-key-set-message"
|
|
@@ -4260,6 +4272,12 @@ const Wa = (e, a) => {
|
|
|
4260
4272
|
required: !1,
|
|
4261
4273
|
default: ""
|
|
4262
4274
|
},
|
|
4275
|
+
/** Specific the keyset Id if the key entity is a scoped entity [both create and edit form] */
|
|
4276
|
+
keySetId: {
|
|
4277
|
+
type: String,
|
|
4278
|
+
required: !1,
|
|
4279
|
+
default: null
|
|
4280
|
+
},
|
|
4263
4281
|
/** Pre-select the Key Set field and mark it as read-only [create form only] */
|
|
4264
4282
|
fixedKeySetId: {
|
|
4265
4283
|
type: String,
|
|
@@ -4269,10 +4287,10 @@ const Wa = (e, a) => {
|
|
|
4269
4287
|
},
|
|
4270
4288
|
emits: ["update", "error", "loading"],
|
|
4271
4289
|
setup(e, { emit: a }) {
|
|
4272
|
-
var
|
|
4290
|
+
var F;
|
|
4273
4291
|
const t = e, n = ft(), { i18n: { t: i } } = mt.useI18n(), { getMessageFromError: o } = El(), { axiosInstance: r } = St({
|
|
4274
|
-
headers: (
|
|
4275
|
-
}), s = x(() =>
|
|
4292
|
+
headers: (F = t.config) == null ? void 0 : F.requestHeaders
|
|
4293
|
+
}), s = x(() => t.keySetId ? Se.form[t.config.app].edit.forKeySet.replace(/{keySetId}/gi, t.keySetId) : Se.form[t.config.app].edit.all), c = x(() => t.keyId ? Be.Edit : Be.Create), l = It({
|
|
4276
4294
|
fields: {
|
|
4277
4295
|
name: "",
|
|
4278
4296
|
tags: "",
|
|
@@ -4303,35 +4321,35 @@ const Wa = (e, a) => {
|
|
|
4303
4321
|
label: i("keys.form.fields.key_format.options.pem"),
|
|
4304
4322
|
value: "pem"
|
|
4305
4323
|
}
|
|
4306
|
-
], h = x(() => l.isReadonly || c.value === Be.Create && !!t.fixedKeySetId),
|
|
4307
|
-
|
|
4324
|
+
], h = x(() => l.isReadonly || c.value === Be.Create && !!t.fixedKeySetId), y = x(() => !h.value);
|
|
4325
|
+
ke(() => t.fixedKeySetId, (b) => {
|
|
4308
4326
|
c.value === Be.Create && (l.fields.key_set = b);
|
|
4309
4327
|
}, { immediate: !0 });
|
|
4310
4328
|
const I = x(() => JSON.stringify(l.fields) !== JSON.stringify(d) && !!l.fields.key_id && !!l.fields.key_format && (l.fields.key_format === "jwk" && !!l.fields.jwk || l.fields.key_format === "pem" && !!l.fields.private_key && !!l.fields.public_key)), C = (b) => {
|
|
4311
|
-
var T, ee, he,
|
|
4312
|
-
l.fields.key_id = (b == null ? void 0 : b.kid) || "", l.fields.name = (b == null ? void 0 : b.name) || "", l.fields.tags = ((T = b == null ? void 0 : b.tags) == null ? void 0 : T.join(", ")) || "", l.fields.key_set = ((ee = b == null ? void 0 : b.set) == null ? void 0 : ee.id) || "", l.fields.key_format = b != null && b.pem ? "pem" : "jwk", l.fields.jwk = (b == null ? void 0 : b.jwk) || "", l.fields.private_key = ((he = b == null ? void 0 : b.pem) == null ? void 0 : he.private_key) || "", l.fields.public_key = ((
|
|
4329
|
+
var T, ee, he, be;
|
|
4330
|
+
l.fields.key_id = (b == null ? void 0 : b.kid) || "", l.fields.name = (b == null ? void 0 : b.name) || "", l.fields.tags = ((T = b == null ? void 0 : b.tags) == null ? void 0 : T.join(", ")) || "", l.fields.key_set = ((ee = b == null ? void 0 : b.set) == null ? void 0 : ee.id) || "", l.fields.key_format = b != null && b.pem ? "pem" : "jwk", l.fields.jwk = (b == null ? void 0 : b.jwk) || "", l.fields.private_key = ((he = b == null ? void 0 : b.pem) == null ? void 0 : he.private_key) || "", l.fields.public_key = ((be = b == null ? void 0 : b.pem) == null ? void 0 : be.public_key) || "", l.fields.key_set && (O.value = !1), Object.assign(d, l.fields);
|
|
4313
4331
|
}, p = () => {
|
|
4314
4332
|
n.push(t.config.cancelRoute);
|
|
4315
|
-
},
|
|
4333
|
+
}, f = x(() => {
|
|
4316
4334
|
var T, ee;
|
|
4317
|
-
let b = `${t.config.apiBaseUrl}${
|
|
4318
|
-
return t.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((T = t.config) == null ? void 0 : T.controlPlaneId) || "") : t.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (ee = t.config) != null && ee.workspace ? `/${t.config.workspace}` : "")), b = b.replace(/{id}/gi, t.keyId), b;
|
|
4335
|
+
let b = `${t.config.apiBaseUrl}${Se.form[t.config.app][c.value][t.keySetId ? "forKeySet" : "all"]}`;
|
|
4336
|
+
return t.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((T = t.config) == null ? void 0 : T.controlPlaneId) || "") : t.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (ee = t.config) != null && ee.workspace ? `/${t.config.workspace}` : "")), b = b.replace(/{id}/gi, t.keyId).replace(/{keySetId}/gi, t.keySetId || ""), b;
|
|
4319
4337
|
}), v = async () => {
|
|
4320
|
-
var b, T, ee, he,
|
|
4338
|
+
var b, T, ee, he, be, V, Ne, Y;
|
|
4321
4339
|
try {
|
|
4322
4340
|
l.isReadonly = !0;
|
|
4323
4341
|
const le = {
|
|
4324
4342
|
kid: l.fields.key_id,
|
|
4325
4343
|
name: l.fields.name || null,
|
|
4326
|
-
tags: ((ee = (T = (b = l.fields.tags) == null ? void 0 : b.split(",")) == null ? void 0 : T.map((
|
|
4344
|
+
tags: ((ee = (T = (b = l.fields.tags) == null ? void 0 : b.split(",")) == null ? void 0 : T.map((J) => String(J || "").trim())) == null ? void 0 : ee.filter((J) => J !== "")) || [],
|
|
4327
4345
|
set: l.fields.key_set ? { id: l.fields.key_set } : null,
|
|
4328
4346
|
jwk: l.fields.key_format === "jwk" ? l.fields.jwk : null,
|
|
4329
4347
|
pem: l.fields.key_format === "pem" ? { private_key: l.fields.private_key, public_key: l.fields.public_key } : null
|
|
4330
4348
|
};
|
|
4331
4349
|
let ve;
|
|
4332
|
-
if (c.value === "create" ? ve = await r.post(
|
|
4333
|
-
const { data:
|
|
4334
|
-
l.fields.key_id = (
|
|
4350
|
+
if (c.value === "create" ? ve = await r.post(f.value, le) : c.value === "edit" && (ve = ((he = t.config) == null ? void 0 : he.app) === "konnect" ? await r.put(f.value, le) : await r.patch(f.value, le)), ve) {
|
|
4351
|
+
const { data: J } = ve;
|
|
4352
|
+
l.fields.key_id = (J == null ? void 0 : J.kid) || "", l.fields.name = (J == null ? void 0 : J.name) || "", l.fields.tags = ((be = J == null ? void 0 : J.tags) == null ? void 0 : be.join(", ")) || "", l.fields.key_set = ((V = J == null ? void 0 : J.set) == null ? void 0 : V.id) || "", l.fields.key_format = J != null && J.pem ? "pem" : "jwk", l.fields.jwk = (J == null ? void 0 : J.jwk) || "", l.fields.private_key = ((Ne = J == null ? void 0 : J.pem) == null ? void 0 : Ne.private_key) || "", l.fields.public_key = ((Y = J == null ? void 0 : J.pem) == null ? void 0 : Y.public_key) || "", Object.assign(d, l.fields), a("update", ve == null ? void 0 : ve.data);
|
|
4335
4353
|
}
|
|
4336
4354
|
} catch (le) {
|
|
4337
4355
|
l.errorMessage = o(le), a("error", le);
|
|
@@ -4339,22 +4357,22 @@ const Wa = (e, a) => {
|
|
|
4339
4357
|
l.isReadonly = !1;
|
|
4340
4358
|
}
|
|
4341
4359
|
}, {
|
|
4342
|
-
debouncedQueryChange:
|
|
4343
|
-
loading:
|
|
4344
|
-
allRecords:
|
|
4345
|
-
error:
|
|
4346
|
-
validationError:
|
|
4360
|
+
debouncedQueryChange: _,
|
|
4361
|
+
loading: w,
|
|
4362
|
+
allRecords: Z,
|
|
4363
|
+
error: P,
|
|
4364
|
+
validationError: W,
|
|
4347
4365
|
loadItems: S,
|
|
4348
|
-
results:
|
|
4349
|
-
} = Nl(t.config,
|
|
4366
|
+
results: B
|
|
4367
|
+
} = Nl(t.config, Se.form[t.config.app].keySets, void 0, {
|
|
4350
4368
|
fetchedItemsKey: "data",
|
|
4351
4369
|
searchKeys: ["id", "name"]
|
|
4352
|
-
}), O =
|
|
4353
|
-
O.value = !b, (!b || b !== l.fields.key_set && b !== d.key_set) &&
|
|
4354
|
-
},
|
|
4370
|
+
}), O = $(!0), M = (b) => {
|
|
4371
|
+
O.value = !b, (!b || b !== l.fields.key_set && b !== d.key_set) && _(b);
|
|
4372
|
+
}, R = x(() => P.value ? i("keys.errors.key_sets.fetch") : ""), U = x(() => W.value ? i("keys.errors.key_sets.invalid") : ""), H = $(0), ae = x(() => Z.value === void 0), ne = x(() => {
|
|
4355
4373
|
if (ae.value)
|
|
4356
4374
|
return t.config.app === "konnect" ? i("keys.form.fields.key_set.footer") : void 0;
|
|
4357
|
-
}), Q =
|
|
4375
|
+
}), Q = $(/* @__PURE__ */ new Set()), z = x(() => Array.from(Q.value).map((T) => ({
|
|
4358
4376
|
name: T.name || "",
|
|
4359
4377
|
// can't use name for label or it tries to search => 404
|
|
4360
4378
|
label: "",
|
|
@@ -4367,20 +4385,20 @@ const Wa = (e, a) => {
|
|
|
4367
4385
|
for (T of b)
|
|
4368
4386
|
Q.value.add(T);
|
|
4369
4387
|
};
|
|
4370
|
-
return
|
|
4388
|
+
return ke(B, (b) => {
|
|
4371
4389
|
ce(b);
|
|
4372
|
-
}, { immediate: !0, deep: !0 }),
|
|
4373
|
-
|
|
4390
|
+
}, { immediate: !0, deep: !0 }), ke(z, () => {
|
|
4391
|
+
H.value++;
|
|
4374
4392
|
}, { immediate: !0, deep: !0 }), tt(async () => {
|
|
4375
4393
|
await S();
|
|
4376
4394
|
}), (b, T) => {
|
|
4377
|
-
const ee =
|
|
4378
|
-
return
|
|
4379
|
-
|
|
4395
|
+
const ee = N("KInput"), he = N("KSelect"), be = N("KTextArea");
|
|
4396
|
+
return m(), j("div", Rl, [
|
|
4397
|
+
K(g(el), {
|
|
4380
4398
|
"can-submit": I.value,
|
|
4381
4399
|
config: e.config,
|
|
4382
4400
|
"edit-id": e.keyId,
|
|
4383
|
-
"error-message": l.errorMessage ||
|
|
4401
|
+
"error-message": l.errorMessage || R.value,
|
|
4384
4402
|
"fetch-url": s.value,
|
|
4385
4403
|
"is-readonly": l.isReadonly,
|
|
4386
4404
|
onCancel: p,
|
|
@@ -4390,139 +4408,139 @@ const Wa = (e, a) => {
|
|
|
4390
4408
|
onSubmit: v
|
|
4391
4409
|
}, {
|
|
4392
4410
|
default: k(() => [
|
|
4393
|
-
|
|
4394
|
-
description:
|
|
4395
|
-
title:
|
|
4411
|
+
K(g(Yt), {
|
|
4412
|
+
description: g(i)("keys.form.sections.general.description"),
|
|
4413
|
+
title: g(i)("keys.form.sections.general.title")
|
|
4396
4414
|
}, {
|
|
4397
4415
|
default: k(() => [
|
|
4398
|
-
|
|
4416
|
+
K(ee, {
|
|
4399
4417
|
modelValue: l.fields.key_id,
|
|
4400
4418
|
"onUpdate:modelValue": T[0] || (T[0] = (V) => l.fields.key_id = V),
|
|
4401
4419
|
modelModifiers: { trim: !0 },
|
|
4402
4420
|
autocomplete: "off",
|
|
4403
4421
|
"data-testid": "key-form-id",
|
|
4404
|
-
help:
|
|
4405
|
-
label:
|
|
4406
|
-
"label-attributes": { info:
|
|
4407
|
-
placeholder:
|
|
4422
|
+
help: g(i)("keys.form.fields.id.help"),
|
|
4423
|
+
label: g(i)("keys.form.fields.id.label"),
|
|
4424
|
+
"label-attributes": { info: g(i)("keys.form.fields.id.tooltip") },
|
|
4425
|
+
placeholder: g(i)("keys.form.fields.id.placeholder"),
|
|
4408
4426
|
readonly: l.isReadonly,
|
|
4409
4427
|
required: "",
|
|
4410
4428
|
type: "text"
|
|
4411
4429
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"]),
|
|
4412
|
-
|
|
4430
|
+
K(ee, {
|
|
4413
4431
|
modelValue: l.fields.name,
|
|
4414
4432
|
"onUpdate:modelValue": T[1] || (T[1] = (V) => l.fields.name = V),
|
|
4415
4433
|
modelModifiers: { trim: !0 },
|
|
4416
4434
|
autocomplete: "off",
|
|
4417
4435
|
"data-testid": "key-form-name",
|
|
4418
|
-
label:
|
|
4419
|
-
placeholder:
|
|
4436
|
+
label: g(i)("keys.form.fields.name.label"),
|
|
4437
|
+
placeholder: g(i)("keys.form.fields.name.placeholder"),
|
|
4420
4438
|
readonly: l.isReadonly,
|
|
4421
4439
|
type: "text"
|
|
4422
4440
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
4423
|
-
|
|
4441
|
+
K(he, {
|
|
4424
4442
|
modelValue: l.fields.key_set,
|
|
4425
4443
|
"onUpdate:modelValue": T[2] || (T[2] = (V) => l.fields.key_set = V),
|
|
4426
4444
|
appearance: "select",
|
|
4427
4445
|
autosuggest: "",
|
|
4428
|
-
class:
|
|
4429
|
-
clearable:
|
|
4446
|
+
class: xe({ "k-select-placeholder": O.value }),
|
|
4447
|
+
clearable: y.value,
|
|
4430
4448
|
"data-testid": "key-form-key-set",
|
|
4431
4449
|
"dropdown-footer-text": ne.value,
|
|
4432
4450
|
"enable-filtering": "",
|
|
4433
|
-
items:
|
|
4434
|
-
label:
|
|
4435
|
-
loading:
|
|
4436
|
-
placeholder:
|
|
4451
|
+
items: z.value,
|
|
4452
|
+
label: g(i)("keys.form.fields.key_set.label"),
|
|
4453
|
+
loading: g(w),
|
|
4454
|
+
placeholder: g(i)("keys.form.fields.key_set.placeholder"),
|
|
4437
4455
|
readonly: h.value,
|
|
4438
4456
|
width: "100%",
|
|
4439
|
-
onQueryChange:
|
|
4457
|
+
onQueryChange: M
|
|
4440
4458
|
}, {
|
|
4441
4459
|
loading: k(() => [
|
|
4442
|
-
|
|
4460
|
+
q("div", null, E(g(i)("keys.actions.loading")), 1)
|
|
4443
4461
|
]),
|
|
4444
4462
|
empty: k(() => [
|
|
4445
|
-
|
|
4463
|
+
q("div", Ul, E(g(i)("keys.search.no_results")), 1)
|
|
4446
4464
|
]),
|
|
4447
4465
|
"selected-item-template": k(({ item: V }) => [
|
|
4448
|
-
|
|
4466
|
+
q("div", null, E(V.name), 1)
|
|
4449
4467
|
]),
|
|
4450
4468
|
"item-template": k(({ item: V }) => [
|
|
4451
|
-
|
|
4452
|
-
|
|
4469
|
+
q("div", Vl, E(V.name), 1),
|
|
4470
|
+
q("div", Dl, E(V.value), 1)
|
|
4453
4471
|
]),
|
|
4454
4472
|
_: 1
|
|
4455
4473
|
}, 8, ["modelValue", "class", "clearable", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly"]),
|
|
4456
|
-
U.value ? (
|
|
4457
|
-
|
|
4474
|
+
U.value ? (m(), j("p", Jl, E(U.value), 1)) : D("", !0),
|
|
4475
|
+
K(ee, {
|
|
4458
4476
|
modelValue: l.fields.tags,
|
|
4459
4477
|
"onUpdate:modelValue": T[3] || (T[3] = (V) => l.fields.tags = V),
|
|
4460
4478
|
modelModifiers: { trim: !0 },
|
|
4461
4479
|
autocomplete: "off",
|
|
4462
4480
|
"data-testid": "key-form-tags",
|
|
4463
|
-
help:
|
|
4464
|
-
label:
|
|
4465
|
-
"label-attributes": { info:
|
|
4466
|
-
placeholder:
|
|
4481
|
+
help: g(i)("keys.form.fields.tags.help"),
|
|
4482
|
+
label: g(i)("keys.form.fields.tags.label"),
|
|
4483
|
+
"label-attributes": { info: g(i)("keys.form.fields.tags.tooltip") },
|
|
4484
|
+
placeholder: g(i)("keys.form.fields.tags.placeholder"),
|
|
4467
4485
|
readonly: l.isReadonly,
|
|
4468
4486
|
type: "text"
|
|
4469
4487
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
4470
4488
|
]),
|
|
4471
4489
|
_: 1
|
|
4472
4490
|
}, 8, ["description", "title"]),
|
|
4473
|
-
|
|
4474
|
-
description:
|
|
4491
|
+
K(g(Yt), {
|
|
4492
|
+
description: g(i)("keys.form.sections.keys.description"),
|
|
4475
4493
|
"has-divider": "",
|
|
4476
|
-
title:
|
|
4494
|
+
title: g(i)("keys.form.sections.keys.title")
|
|
4477
4495
|
}, {
|
|
4478
4496
|
default: k(() => [
|
|
4479
|
-
|
|
4480
|
-
|
|
4497
|
+
q("div", Wl, [
|
|
4498
|
+
K(he, {
|
|
4481
4499
|
modelValue: l.fields.key_format,
|
|
4482
4500
|
"onUpdate:modelValue": T[4] || (T[4] = (V) => l.fields.key_format = V),
|
|
4483
4501
|
appearance: "select",
|
|
4484
4502
|
"data-testid": "key-form-key-format",
|
|
4485
4503
|
items: u,
|
|
4486
|
-
label:
|
|
4504
|
+
label: g(i)("keys.form.fields.key_format.label"),
|
|
4487
4505
|
readonly: l.isReadonly,
|
|
4488
4506
|
required: "",
|
|
4489
4507
|
width: "100%"
|
|
4490
4508
|
}, null, 8, ["modelValue", "label", "readonly"])
|
|
4491
4509
|
]),
|
|
4492
|
-
l.fields.key_format === "jwk" ? (
|
|
4510
|
+
l.fields.key_format === "jwk" ? (m(), L(be, {
|
|
4493
4511
|
key: 0,
|
|
4494
4512
|
modelValue: l.fields.jwk,
|
|
4495
4513
|
"onUpdate:modelValue": T[5] || (T[5] = (V) => l.fields.jwk = V),
|
|
4496
4514
|
modelModifiers: { trim: !0 },
|
|
4497
4515
|
class: "key-form-textarea",
|
|
4498
4516
|
"data-testid": "key-form-jwk",
|
|
4499
|
-
label:
|
|
4500
|
-
"label-attributes": { info:
|
|
4501
|
-
placeholder:
|
|
4517
|
+
label: g(i)("keys.form.fields.jwk.label"),
|
|
4518
|
+
"label-attributes": { info: g(i)("keys.form.fields.jwk.tooltip") },
|
|
4519
|
+
placeholder: g(i)("keys.form.fields.jwk.placeholder"),
|
|
4502
4520
|
readonly: l.isReadonly,
|
|
4503
4521
|
required: ""
|
|
4504
4522
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])) : D("", !0),
|
|
4505
|
-
l.fields.key_format === "pem" ? (
|
|
4523
|
+
l.fields.key_format === "pem" ? (m(), L(be, {
|
|
4506
4524
|
key: 1,
|
|
4507
4525
|
modelValue: l.fields.private_key,
|
|
4508
4526
|
"onUpdate:modelValue": T[6] || (T[6] = (V) => l.fields.private_key = V),
|
|
4509
4527
|
modelModifiers: { trim: !0 },
|
|
4510
4528
|
class: "key-form-textarea",
|
|
4511
4529
|
"data-testid": "key-form-private-key",
|
|
4512
|
-
label:
|
|
4513
|
-
placeholder:
|
|
4530
|
+
label: g(i)("keys.form.fields.private_key.label"),
|
|
4531
|
+
placeholder: g(i)("keys.form.fields.private_key.placeholder"),
|
|
4514
4532
|
readonly: l.isReadonly,
|
|
4515
4533
|
required: ""
|
|
4516
4534
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"])) : D("", !0),
|
|
4517
|
-
l.fields.key_format === "pem" ? (
|
|
4535
|
+
l.fields.key_format === "pem" ? (m(), L(be, {
|
|
4518
4536
|
key: 2,
|
|
4519
4537
|
modelValue: l.fields.public_key,
|
|
4520
4538
|
"onUpdate:modelValue": T[7] || (T[7] = (V) => l.fields.public_key = V),
|
|
4521
4539
|
modelModifiers: { trim: !0 },
|
|
4522
4540
|
class: "key-form-textarea",
|
|
4523
4541
|
"data-testid": "key-form-public-key",
|
|
4524
|
-
label:
|
|
4525
|
-
placeholder:
|
|
4542
|
+
label: g(i)("keys.form.fields.public_key.label"),
|
|
4543
|
+
placeholder: g(i)("keys.form.fields.public_key.placeholder"),
|
|
4526
4544
|
readonly: l.isReadonly,
|
|
4527
4545
|
required: ""
|
|
4528
4546
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"])) : D("", !0)
|
|
@@ -4536,7 +4554,7 @@ const Wa = (e, a) => {
|
|
|
4536
4554
|
};
|
|
4537
4555
|
}
|
|
4538
4556
|
});
|
|
4539
|
-
const rs = /* @__PURE__ */ Wa(Hl, [["__scopeId", "data-v-
|
|
4557
|
+
const rs = /* @__PURE__ */ Wa(Hl, [["__scopeId", "data-v-99391058"]]), zl = { class: "kong-ui-entities-keys-entity-config-card" }, Yl = { key: 2 }, ls = /* @__PURE__ */ re({
|
|
4540
4558
|
__name: "KeyConfigCard",
|
|
4541
4559
|
props: {
|
|
4542
4560
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4559,6 +4577,13 @@ const rs = /* @__PURE__ */ Wa(Hl, [["__scopeId", "data-v-8b9f6e5c"]]), zl = { cl
|
|
|
4559
4577
|
hideTitle: {
|
|
4560
4578
|
type: Boolean,
|
|
4561
4579
|
default: !1
|
|
4580
|
+
},
|
|
4581
|
+
/**
|
|
4582
|
+
* Keyset id for scoped key entity
|
|
4583
|
+
*/
|
|
4584
|
+
keySetId: {
|
|
4585
|
+
type: String,
|
|
4586
|
+
default: null
|
|
4562
4587
|
}
|
|
4563
4588
|
},
|
|
4564
4589
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success", "navigation-click"],
|
|
@@ -4566,45 +4591,50 @@ const rs = /* @__PURE__ */ Wa(Hl, [["__scopeId", "data-v-8b9f6e5c"]]), zl = { cl
|
|
|
4566
4591
|
var p;
|
|
4567
4592
|
const t = e, { axiosInstance: n } = St({
|
|
4568
4593
|
headers: (p = t.config) == null ? void 0 : p.requestHeaders
|
|
4569
|
-
}), { convertKeyToTitle: i } = Bl(), { i18n: { t: o } } = mt.useI18n(), r = x(() =>
|
|
4570
|
-
var
|
|
4571
|
-
return (
|
|
4572
|
-
}), c =
|
|
4573
|
-
var
|
|
4574
|
-
|
|
4594
|
+
}), { convertKeyToTitle: i } = Bl(), { i18n: { t: o } } = mt.useI18n(), r = x(() => t.keySetId ? `${Se.form[t.config.app].edit.forKeySet}`.replace(/{keySetId}/gi, t.keySetId) : Se.form[t.config.app].edit.all), s = x(() => {
|
|
4595
|
+
var f;
|
|
4596
|
+
return (f = Se.form[t.config.app]) == null ? void 0 : f.getKeySet;
|
|
4597
|
+
}), c = $(), l = $({}), d = $(t.keySetId || ""), u = $(""), h = $(!1), y = async (f) => {
|
|
4598
|
+
var v;
|
|
4599
|
+
c.value = f, d.value = (v = f == null ? void 0 : f.set) == null ? void 0 : v.id, a("fetch:success", f), I(f);
|
|
4600
|
+
};
|
|
4601
|
+
ke(d, async () => {
|
|
4602
|
+
var v, _;
|
|
4603
|
+
if (!d.value)
|
|
4575
4604
|
return;
|
|
4576
|
-
let
|
|
4577
|
-
t.config.app === "konnect" ?
|
|
4605
|
+
let f = `${t.config.apiBaseUrl}${s.value}`;
|
|
4606
|
+
t.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((v = t.config) == null ? void 0 : v.controlPlaneId) || "").replace(/{keySetId}/gi, d.value || "") : t.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (_ = t.config) != null && _.workspace ? `/${t.config.workspace}` : "").replace(/{keySetId}/gi, d.value || ""));
|
|
4578
4607
|
try {
|
|
4579
4608
|
h.value = !0;
|
|
4580
|
-
const { data:
|
|
4581
|
-
u.value = (
|
|
4582
|
-
} catch (
|
|
4583
|
-
a("fetch:error",
|
|
4609
|
+
const { data: w } = await n.get(f);
|
|
4610
|
+
u.value = (w == null ? void 0 : w.name) || (w == null ? void 0 : w.id);
|
|
4611
|
+
} catch (w) {
|
|
4612
|
+
a("fetch:error", w);
|
|
4584
4613
|
} finally {
|
|
4585
4614
|
h.value = !1;
|
|
4586
4615
|
}
|
|
4587
|
-
},
|
|
4588
|
-
|
|
4616
|
+
}, { immediate: !0 });
|
|
4617
|
+
const I = (f) => {
|
|
4618
|
+
var v, _;
|
|
4589
4619
|
try {
|
|
4590
|
-
if (
|
|
4591
|
-
const
|
|
4592
|
-
Object.keys(
|
|
4620
|
+
if (f.jwk) {
|
|
4621
|
+
const w = JSON.parse(f.jwk);
|
|
4622
|
+
Object.keys(w).forEach((Z) => {
|
|
4593
4623
|
l.value = {
|
|
4594
4624
|
...l.value,
|
|
4595
|
-
[`jwk.${
|
|
4625
|
+
[`jwk.${Z}`]: w[Z]
|
|
4596
4626
|
};
|
|
4597
4627
|
});
|
|
4598
4628
|
} else
|
|
4599
4629
|
l.value = {
|
|
4600
|
-
"pem.public_key": (v =
|
|
4601
|
-
"pem.private_key": (
|
|
4630
|
+
"pem.public_key": (v = f == null ? void 0 : f.pem) == null ? void 0 : v.public_key,
|
|
4631
|
+
"pem.private_key": (_ = f == null ? void 0 : f.pem) == null ? void 0 : _.private_key
|
|
4602
4632
|
};
|
|
4603
|
-
} catch (
|
|
4604
|
-
a("fetch:error",
|
|
4633
|
+
} catch (w) {
|
|
4634
|
+
a("fetch:error", w);
|
|
4605
4635
|
}
|
|
4606
4636
|
return l;
|
|
4607
|
-
}, C =
|
|
4637
|
+
}, C = $({
|
|
4608
4638
|
id: {},
|
|
4609
4639
|
name: {
|
|
4610
4640
|
tooltip: o("keys.form.fields.name.tooltip")
|
|
@@ -4628,71 +4658,71 @@ const rs = /* @__PURE__ */ Wa(Hl, [["__scopeId", "data-v-8b9f6e5c"]]), zl = { cl
|
|
|
4628
4658
|
// advanced fields
|
|
4629
4659
|
jwk: {
|
|
4630
4660
|
label: o("keys.form.fields.jwk.label"),
|
|
4631
|
-
type:
|
|
4661
|
+
type: G.Json
|
|
4632
4662
|
},
|
|
4633
4663
|
pem: {
|
|
4634
4664
|
section: pe.Advanced,
|
|
4635
4665
|
label: o("keys.form.fields.key_format.options.pem"),
|
|
4636
|
-
type:
|
|
4666
|
+
type: G.Json
|
|
4637
4667
|
}
|
|
4638
4668
|
});
|
|
4639
|
-
return (
|
|
4640
|
-
var
|
|
4641
|
-
const
|
|
4642
|
-
return
|
|
4643
|
-
|
|
4669
|
+
return (f, v) => {
|
|
4670
|
+
var w, Z;
|
|
4671
|
+
const _ = N("KSkeleton");
|
|
4672
|
+
return m(), j("div", zl, [
|
|
4673
|
+
K(g(Gr), {
|
|
4644
4674
|
config: e.config,
|
|
4645
4675
|
"config-card-doc": e.configCardDoc,
|
|
4646
4676
|
"config-schema": C.value,
|
|
4647
4677
|
"fetch-url": r.value,
|
|
4648
4678
|
"hide-title": e.hideTitle,
|
|
4649
|
-
"onCopy:success": v[0] || (v[0] = (
|
|
4650
|
-
"onFetch:error": v[1] || (v[1] = (
|
|
4651
|
-
"onFetch:success":
|
|
4652
|
-
onLoading: v[2] || (v[2] = (
|
|
4653
|
-
},
|
|
4654
|
-
set: k(({ row:
|
|
4655
|
-
h.value ? (
|
|
4679
|
+
"onCopy:success": v[0] || (v[0] = (P) => f.$emit("copy:success", P)),
|
|
4680
|
+
"onFetch:error": v[1] || (v[1] = (P) => f.$emit("fetch:error", P)),
|
|
4681
|
+
"onFetch:success": y,
|
|
4682
|
+
onLoading: v[2] || (v[2] = (P) => f.$emit("loading", P))
|
|
4683
|
+
}, Ie({
|
|
4684
|
+
set: k(({ row: P }) => [
|
|
4685
|
+
h.value ? (m(), L(_, {
|
|
4656
4686
|
key: 0,
|
|
4657
4687
|
"data-testid": "key-set-name-loader",
|
|
4658
4688
|
type: "spinner"
|
|
4659
|
-
})) :
|
|
4689
|
+
})) : P.value && P.value.id === d.value && u.value ? (m(), L(g(ia), {
|
|
4660
4690
|
key: 1,
|
|
4661
4691
|
item: {
|
|
4662
|
-
key:
|
|
4692
|
+
key: P.value.id,
|
|
4663
4693
|
value: u.value,
|
|
4664
|
-
type:
|
|
4694
|
+
type: g(G).LinkInternal
|
|
4665
4695
|
},
|
|
4666
|
-
onClick: (
|
|
4667
|
-
}, null, 8, ["item", "onClick"])) : (
|
|
4696
|
+
onClick: (W) => f.$emit("navigation-click", P.value.id, "key-sets")
|
|
4697
|
+
}, null, 8, ["item", "onClick"])) : (m(), j("div", Yl, E("–")))
|
|
4668
4698
|
]),
|
|
4669
4699
|
_: 2
|
|
4670
4700
|
}, [
|
|
4671
|
-
(
|
|
4701
|
+
(w = c.value) != null && w.jwk ? {
|
|
4672
4702
|
name: "jwk",
|
|
4673
4703
|
fn: k(() => [
|
|
4674
|
-
(
|
|
4675
|
-
key:
|
|
4676
|
-
"data-testid": `${
|
|
4704
|
+
(m(!0), j(me, null, ye(Object.keys(l.value), (P) => (m(), L(g(qe), {
|
|
4705
|
+
key: P,
|
|
4706
|
+
"data-testid": `${P}`,
|
|
4677
4707
|
item: {
|
|
4678
|
-
key:
|
|
4679
|
-
label:
|
|
4680
|
-
value: l.value[
|
|
4708
|
+
key: P,
|
|
4709
|
+
label: g(i)(P),
|
|
4710
|
+
value: l.value[P]
|
|
4681
4711
|
}
|
|
4682
4712
|
}, null, 8, ["data-testid", "item"]))), 128))
|
|
4683
4713
|
]),
|
|
4684
4714
|
key: "0"
|
|
4685
4715
|
} : void 0,
|
|
4686
|
-
(
|
|
4716
|
+
(Z = c.value) != null && Z.pem ? {
|
|
4687
4717
|
name: "pem",
|
|
4688
4718
|
fn: k(() => [
|
|
4689
|
-
(
|
|
4690
|
-
key:
|
|
4691
|
-
"data-testid": `${
|
|
4719
|
+
(m(!0), j(me, null, ye(Object.keys(l.value), (P) => (m(), L(g(qe), {
|
|
4720
|
+
key: P,
|
|
4721
|
+
"data-testid": `${P}`,
|
|
4692
4722
|
item: {
|
|
4693
|
-
key:
|
|
4694
|
-
label:
|
|
4695
|
-
value: l.value[
|
|
4723
|
+
key: P,
|
|
4724
|
+
label: g(i)(P),
|
|
4725
|
+
value: l.value[P]
|
|
4696
4726
|
}
|
|
4697
4727
|
}, null, 8, ["data-testid", "item"]))), 128))
|
|
4698
4728
|
]),
|