@kong-ui-public/entities-gateway-services 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as oe, ref as F, computed as
|
|
1
|
+
import { defineComponent as oe, ref as F, computed as x, resolveComponent as L, openBlock as b, createBlock as R, Teleport as ir, createVNode as S, withCtx as y, unref as m, createTextVNode as J, toDisplayString as j, createElementVNode as O, watch as we, renderSlot as Q, createCommentVNode as H, useSlots as tt, onBeforeMount as yt, createSlots as xe, createElementBlock as $, renderList as ve, Fragment as he, normalizeClass as $e, withModifiers as Ne, withDirectives as Ge, vShow as Je, useCssVars as rr, resolveDynamicComponent as Ke, normalizeProps as or, guardReactiveProps as ar, mergeProps as ct, onMounted as ti, onUnmounted as nr, normalizeStyle as ii, inject as lr, pushScopeId as ri, popScopeId as oi, reactive as Tt } from "vue";
|
|
2
2
|
import { useRouter as vt } from "vue-router";
|
|
3
3
|
import { createI18n as ht, i18nTComponent as ai } from "@kong-ui-public/i18n";
|
|
4
4
|
import sr from "axios";
|
|
@@ -167,18 +167,18 @@ const ur = {
|
|
|
167
167
|
}, mr = {
|
|
168
168
|
success: "Copied {val} to clipboard",
|
|
169
169
|
success_brief: "Successfully copied to clipboard"
|
|
170
|
-
}, yr = {
|
|
171
|
-
gateway_services: "gateway services"
|
|
172
170
|
}, gr = {
|
|
171
|
+
gateway_services: "gateway services"
|
|
172
|
+
}, yr = {
|
|
173
173
|
actions: ur,
|
|
174
174
|
search: dr,
|
|
175
175
|
gateway_services: pr,
|
|
176
176
|
errors: fr,
|
|
177
177
|
copy: mr,
|
|
178
|
-
glossary:
|
|
178
|
+
glossary: gr
|
|
179
179
|
};
|
|
180
180
|
function vr() {
|
|
181
|
-
const e = ht("en-us",
|
|
181
|
+
const e = ht("en-us", yr);
|
|
182
182
|
return {
|
|
183
183
|
i18n: e,
|
|
184
184
|
i18nT: ai(e)
|
|
@@ -210,7 +210,7 @@ function hr() {
|
|
|
210
210
|
const We = {
|
|
211
211
|
useI18n: vr,
|
|
212
212
|
usePortFromProtocol: hr
|
|
213
|
-
},
|
|
213
|
+
}, Pe = {
|
|
214
214
|
list: {
|
|
215
215
|
konnect: {
|
|
216
216
|
all: "/api/runtime_groups/{controlPlaneId}/services"
|
|
@@ -366,7 +366,7 @@ const kr = {
|
|
|
366
366
|
}, $r = {
|
|
367
367
|
unexpected: "An unexpected error has occurred",
|
|
368
368
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
369
|
-
},
|
|
369
|
+
}, Mr = {
|
|
370
370
|
enable: {
|
|
371
371
|
title: "Enable {entityType}",
|
|
372
372
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -386,7 +386,7 @@ const kr = {
|
|
|
386
386
|
filter: xr,
|
|
387
387
|
debouncedFilter: Tr,
|
|
388
388
|
errors: $r,
|
|
389
|
-
toggleModal:
|
|
389
|
+
toggleModal: Mr
|
|
390
390
|
};
|
|
391
391
|
function _t() {
|
|
392
392
|
const e = ht("en-us", Er);
|
|
@@ -440,72 +440,72 @@ function li() {
|
|
|
440
440
|
isValidUuid: (t) => t ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(t) : !1
|
|
441
441
|
};
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function jr(e, i, t, r = {
|
|
444
444
|
fetchedItemsKey: "data",
|
|
445
445
|
searchKeys: ["id"]
|
|
446
446
|
}) {
|
|
447
447
|
t || (t = "100");
|
|
448
448
|
const { axiosInstance: o } = bt({
|
|
449
449
|
headers: e.requestHeaders
|
|
450
|
-
}), { i18n: { t: a } } = _t(), { debounce: l } = br(), n = l(async (
|
|
451
|
-
await
|
|
450
|
+
}), { i18n: { t: a } } = _t(), { debounce: l } = br(), n = l(async (C) => {
|
|
451
|
+
await E(C);
|
|
452
452
|
}, 200), c = F(!1), d = F(""), f = F(""), p = F([]), _ = F([]), h = F(void 0), I = m(i);
|
|
453
|
-
let
|
|
454
|
-
e.app === "konnect" ?
|
|
455
|
-
const { isValidUuid: v } = li(),
|
|
453
|
+
let k = `${e.apiBaseUrl}${I}`;
|
|
454
|
+
e.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
455
|
+
const { isValidUuid: v } = li(), T = async () => {
|
|
456
456
|
try {
|
|
457
457
|
c.value = !0;
|
|
458
|
-
const { data:
|
|
459
|
-
|
|
458
|
+
const { data: C } = await o.get(`${k}?size=${t}`);
|
|
459
|
+
C != null && C.next || (h.value = r.fetchedItemsKey in C ? C[r.fetchedItemsKey] : []), _.value = r.fetchedItemsKey in C ? C[r.fetchedItemsKey] : [], p.value = _.value;
|
|
460
460
|
} catch {
|
|
461
461
|
p.value = [], d.value = a("debouncedFilter.errors.fetch");
|
|
462
462
|
} finally {
|
|
463
463
|
c.value = !1;
|
|
464
464
|
}
|
|
465
|
-
}, s = F(""),
|
|
466
|
-
var
|
|
467
|
-
if (s.value !==
|
|
468
|
-
if (s.value =
|
|
465
|
+
}, s = F(""), E = async (C) => {
|
|
466
|
+
var P, ae, Y;
|
|
467
|
+
if (s.value !== C)
|
|
468
|
+
if (s.value = C || "", h.value === void 0)
|
|
469
469
|
try {
|
|
470
470
|
if (c.value = !0, d.value = "", f.value = "", e.app === "konnect") {
|
|
471
|
-
let A =
|
|
472
|
-
|
|
473
|
-
const { data:
|
|
474
|
-
r.fetchedItemsKey in
|
|
475
|
-
} else if (
|
|
471
|
+
let A = k + "";
|
|
472
|
+
C && (A += `/${C}`);
|
|
473
|
+
const { data: q } = await o.get(`${A}?size=${t}`);
|
|
474
|
+
r.fetchedItemsKey in q ? p.value = q[r.fetchedItemsKey] : q != null && q.id ? p.value = [q] : p.value = [];
|
|
475
|
+
} else if (C) {
|
|
476
476
|
const A = [];
|
|
477
|
-
v(
|
|
478
|
-
const { data:
|
|
479
|
-
return [
|
|
477
|
+
v(C) && r.searchKeys.includes("id") ? A.push((async () => {
|
|
478
|
+
const { data: N } = await o.get(`${k}/${C}`);
|
|
479
|
+
return [N[r.fetchedItemsKey] ?? N];
|
|
480
480
|
})()) : A.push(
|
|
481
|
-
...r.searchKeys.filter((
|
|
482
|
-
const { data:
|
|
483
|
-
return
|
|
481
|
+
...r.searchKeys.filter((N) => N !== "id").map(async (N) => {
|
|
482
|
+
const { data: z } = await o.get(`${k}?${N}=${C}`);
|
|
483
|
+
return z[r.fetchedItemsKey];
|
|
484
484
|
})
|
|
485
485
|
);
|
|
486
|
-
const
|
|
487
|
-
p.value = [], (
|
|
488
|
-
var
|
|
489
|
-
(
|
|
490
|
-
|
|
486
|
+
const q = await Promise.all(A), U = /* @__PURE__ */ new Set();
|
|
487
|
+
p.value = [], (P = q == null ? void 0 : q.forEach) == null || P.call(q, (N) => {
|
|
488
|
+
var z;
|
|
489
|
+
(z = N == null ? void 0 : N.forEach) == null || z.call(N, (D) => {
|
|
490
|
+
U.has(D.id) || (U.add(D.id), p.value.push(D));
|
|
491
491
|
});
|
|
492
492
|
});
|
|
493
493
|
} else
|
|
494
494
|
p.value = _.value;
|
|
495
495
|
} catch (A) {
|
|
496
|
-
((
|
|
496
|
+
((ae = A == null ? void 0 : A.response) == null ? void 0 : ae.status) === 404 ? f.value = a("debouncedFilter.errors.invalid") : (p.value = [], d.value = a("debouncedFilter.errors.fetch"));
|
|
497
497
|
} finally {
|
|
498
498
|
c.value = !1;
|
|
499
499
|
}
|
|
500
500
|
else
|
|
501
|
-
c.value = !0, f.value = "",
|
|
502
|
-
var
|
|
503
|
-
let
|
|
504
|
-
for (const
|
|
505
|
-
const
|
|
506
|
-
|
|
501
|
+
c.value = !0, f.value = "", C ? (p.value = (Y = h.value) == null ? void 0 : Y.filter((A) => {
|
|
502
|
+
var q;
|
|
503
|
+
let U = !1;
|
|
504
|
+
for (const N of r.searchKeys) {
|
|
505
|
+
const z = typeof A[N] == "string" ? (q = A[N]) == null ? void 0 : q.toLowerCase() : A[N];
|
|
506
|
+
z != null && z.includes(C.toLowerCase()) && (U = !0);
|
|
507
507
|
}
|
|
508
|
-
return
|
|
508
|
+
return U;
|
|
509
509
|
}), (!p.value || !p.value.length) && (f.value = a("debouncedFilter.errors.invalid"))) : p.value = h.value, c.value = !1;
|
|
510
510
|
};
|
|
511
511
|
return {
|
|
@@ -514,12 +514,12 @@ function Mr(e, i, t, r = {
|
|
|
514
514
|
validationError: f,
|
|
515
515
|
results: p,
|
|
516
516
|
allRecords: h,
|
|
517
|
-
loadItems:
|
|
517
|
+
loadItems: T,
|
|
518
518
|
debouncedQueryChange: n
|
|
519
519
|
};
|
|
520
520
|
}
|
|
521
521
|
function Vr(e, i) {
|
|
522
|
-
const t = m(i), r =
|
|
522
|
+
const t = m(i), r = x(
|
|
523
523
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
524
524
|
);
|
|
525
525
|
return r.value.search = "", (o) => `${r.value.href}/${o}`;
|
|
@@ -564,17 +564,17 @@ function Fr(e) {
|
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
function si(e, i) {
|
|
567
|
-
const t = F(m(e)), r = F(m(i)), o =
|
|
567
|
+
const t = F(m(e)), r = F(m(i)), o = x(
|
|
568
568
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
569
|
-
), a =
|
|
569
|
+
), a = x(
|
|
570
570
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
571
571
|
);
|
|
572
572
|
return (l) => {
|
|
573
573
|
const { page: n, pageSize: c, offset: d, sortColumnKey: f, sortColumnOrder: p, query: _ } = l;
|
|
574
574
|
try {
|
|
575
575
|
let h = new URL(a.value.href);
|
|
576
|
-
return o.value && _ ? (h.search = "", h = new URL(`${h.href}/${_}/`)) : (o.value || new URLSearchParams(_).forEach((I,
|
|
577
|
-
h.searchParams.append(
|
|
576
|
+
return o.value && _ ? (h.search = "", h = new URL(`${h.href}/${_}/`)) : (o.value || new URLSearchParams(_).forEach((I, k) => {
|
|
577
|
+
h.searchParams.append(k, I);
|
|
578
578
|
}), f && h.searchParams.append("sort_by", f), p === "desc" && h.searchParams.append("sort_desc", "1"), h.searchParams.append("size", String(c))), d && n !== 1 && h.searchParams.append("offset", String(d)), h.href;
|
|
579
579
|
} catch (h) {
|
|
580
580
|
return console.error("RouteList(fetcher)", h), r.value;
|
|
@@ -637,26 +637,26 @@ const ci = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
637
637
|
if (!i)
|
|
638
638
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
639
639
|
return i.shift(), i;
|
|
640
|
-
},
|
|
640
|
+
}, Mt = (e) => e === "*" || e === "x" || e === "X", Et = (e) => {
|
|
641
641
|
const i = parseInt(e, 10);
|
|
642
642
|
return isNaN(i) ? e : i;
|
|
643
|
-
},
|
|
644
|
-
if (
|
|
643
|
+
}, Lr = (e, i) => typeof e != typeof i ? [String(e), String(i)] : [e, i], qr = (e, i) => {
|
|
644
|
+
if (Mt(e) || Mt(i))
|
|
645
645
|
return 0;
|
|
646
|
-
const [t, r] =
|
|
646
|
+
const [t, r] = Lr(Et(e), Et(i));
|
|
647
647
|
return t > r ? 1 : t < r ? -1 : 0;
|
|
648
|
-
},
|
|
648
|
+
}, jt = (e, i) => {
|
|
649
649
|
for (let t = 0; t < Math.max(e.length, i.length); t++) {
|
|
650
|
-
const r =
|
|
650
|
+
const r = qr(e[t] || "0", i[t] || "0");
|
|
651
651
|
if (r !== 0)
|
|
652
652
|
return r;
|
|
653
653
|
}
|
|
654
654
|
return 0;
|
|
655
655
|
}, Br = (e, i) => {
|
|
656
|
-
const t = $t(e), r = $t(i), o = t.pop(), a = r.pop(), l =
|
|
657
|
-
return l !== 0 ? l : o && a ?
|
|
656
|
+
const t = $t(e), r = $t(i), o = t.pop(), a = r.pop(), l = jt(t, r);
|
|
657
|
+
return l !== 0 ? l : o && a ? jt(o.split("."), a.split(".")) : o || a ? o ? -1 : 1 : 0;
|
|
658
658
|
}, Vt = (e, i, t) => {
|
|
659
|
-
|
|
659
|
+
Pr(t);
|
|
660
660
|
const r = Br(e, i);
|
|
661
661
|
return ui[t].includes(r);
|
|
662
662
|
}, ui = {
|
|
@@ -666,18 +666,18 @@ const ci = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
666
666
|
"<=": [-1, 0],
|
|
667
667
|
"<": [-1],
|
|
668
668
|
"!=": [-1, 1]
|
|
669
|
-
}, Ot = Object.keys(ui),
|
|
669
|
+
}, Ot = Object.keys(ui), Pr = (e) => {
|
|
670
670
|
if (typeof e != "string")
|
|
671
671
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
672
672
|
if (Ot.indexOf(e) === -1)
|
|
673
673
|
throw new Error(`Invalid operator, expected one of ${Ot.join("|")}`);
|
|
674
|
-
},
|
|
674
|
+
}, Ur = (e) => typeof e == "string" && /^[v\d]/.test(e) && ci.test(e);
|
|
675
675
|
function Rr(e) {
|
|
676
676
|
const { gatewayInfo: i, supportedRange: t } = e;
|
|
677
677
|
if (!i)
|
|
678
678
|
return !0;
|
|
679
679
|
const { edition: r, version: o } = i;
|
|
680
|
-
if (!
|
|
680
|
+
if (!Ur(o))
|
|
681
681
|
return console.error("Invalid version"), !1;
|
|
682
682
|
const a = t[r];
|
|
683
683
|
if (!a)
|
|
@@ -690,12 +690,12 @@ function Dr(e) {
|
|
|
690
690
|
return we(e, (o) => {
|
|
691
691
|
o && !r.value && (i.value = o.offsetWidth, t.value = o.scrollWidth, r.value = !0);
|
|
692
692
|
}), {
|
|
693
|
-
isTruncated:
|
|
693
|
+
isTruncated: x(() => i.value < t.value)
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
|
-
const
|
|
696
|
+
const ce = {
|
|
697
697
|
useAxios: bt,
|
|
698
|
-
useDebouncedFilter:
|
|
698
|
+
useDebouncedFilter: jr,
|
|
699
699
|
useDeleteUrlBuilder: Vr,
|
|
700
700
|
useErrors: Or,
|
|
701
701
|
useExternalLinkCreator: Fr,
|
|
@@ -706,24 +706,24 @@ const se = {
|
|
|
706
706
|
useI18n: _t,
|
|
707
707
|
useGatewayFeatureSupported: Rr,
|
|
708
708
|
useTruncationDetector: Dr
|
|
709
|
-
},
|
|
709
|
+
}, Hr = {
|
|
710
710
|
fail: "Failed to copy id to clipboard",
|
|
711
711
|
success: {
|
|
712
712
|
prefix: "Successfully",
|
|
713
713
|
content: " copied to clipboard"
|
|
714
714
|
}
|
|
715
|
-
},
|
|
716
|
-
message:
|
|
717
|
-
iconTitle:
|
|
715
|
+
}, zr = "Copy to clipboard", Gr = {
|
|
716
|
+
message: Hr,
|
|
717
|
+
iconTitle: zr
|
|
718
718
|
}, Jr = "kong-ui-copy-uuid-notify", Ft = "24px", Wr = (e, i) => {
|
|
719
719
|
const t = e.__vccOpts || e;
|
|
720
720
|
for (const [r, o] of i)
|
|
721
721
|
t[r] = o;
|
|
722
722
|
return t;
|
|
723
|
-
}, Yr = (e) => (ri("data-v-9971cc79"), e = e(), oi(), e), Zr = ["aria-hidden"],
|
|
723
|
+
}, Yr = (e) => (ri("data-v-9971cc79"), e = e(), oi(), e), Zr = ["aria-hidden"], Qr = {
|
|
724
724
|
key: 0,
|
|
725
725
|
"data-testid": "kui-icon-svg-title"
|
|
726
|
-
},
|
|
726
|
+
}, Xr = /* @__PURE__ */ Yr(() => /* @__PURE__ */ O("path", {
|
|
727
727
|
d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
|
|
728
728
|
fill: "currentColor"
|
|
729
729
|
}, null, -1)), eo = /* @__PURE__ */ oe({
|
|
@@ -778,7 +778,7 @@ const se = {
|
|
|
778
778
|
}
|
|
779
779
|
},
|
|
780
780
|
setup(e) {
|
|
781
|
-
const i = e, t =
|
|
781
|
+
const i = e, t = x(() => {
|
|
782
782
|
if (typeof i.size == "number" && i.size > 0)
|
|
783
783
|
return `${i.size}px`;
|
|
784
784
|
if (typeof i.size == "string") {
|
|
@@ -787,7 +787,7 @@ const se = {
|
|
|
787
787
|
return `${a}px`;
|
|
788
788
|
}
|
|
789
789
|
return Ft;
|
|
790
|
-
}), r =
|
|
790
|
+
}), r = x(() => ({
|
|
791
791
|
boxSizing: "border-box",
|
|
792
792
|
color: i.color,
|
|
793
793
|
display: i.display,
|
|
@@ -795,13 +795,13 @@ const se = {
|
|
|
795
795
|
lineHeight: "0",
|
|
796
796
|
width: t.value
|
|
797
797
|
}));
|
|
798
|
-
return (o, a) => (b(),
|
|
798
|
+
return (o, a) => (b(), R(Ke(e.as), {
|
|
799
799
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
800
800
|
class: "kui-icon copy-icon",
|
|
801
801
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
802
802
|
style: ii(r.value)
|
|
803
803
|
}, {
|
|
804
|
-
default:
|
|
804
|
+
default: y(() => [
|
|
805
805
|
(b(), $("svg", {
|
|
806
806
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
807
807
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
@@ -812,8 +812,8 @@ const se = {
|
|
|
812
812
|
width: "100%",
|
|
813
813
|
xmlns: "http://www.w3.org/2000/svg"
|
|
814
814
|
}, [
|
|
815
|
-
e.title ? (b(), $("title",
|
|
816
|
-
|
|
815
|
+
e.title ? (b(), $("title", Qr, j(e.title), 1)) : H("", !0),
|
|
816
|
+
Xr
|
|
817
817
|
], 8, Zr))
|
|
818
818
|
]),
|
|
819
819
|
_: 1
|
|
@@ -864,18 +864,18 @@ const se = {
|
|
|
864
864
|
emits: ["success", "error"],
|
|
865
865
|
setup(e, { emit: i }) {
|
|
866
866
|
const t = e, { t: r } = ht("en-us", Gr), o = t.notify || lr(Jr, () => {
|
|
867
|
-
}), a =
|
|
867
|
+
}), a = x(() => t.idTooltip ? {
|
|
868
868
|
label: t.idTooltip,
|
|
869
869
|
positionFixed: !0,
|
|
870
870
|
placement: "bottomStart"
|
|
871
871
|
} : {
|
|
872
872
|
title: t.uuid
|
|
873
|
-
}), l =
|
|
873
|
+
}), l = x(() => !!(t.tooltip && t.successTooltip)), n = F(t.tooltip), c = x(() => t.tooltip ? {
|
|
874
874
|
label: n.value,
|
|
875
875
|
positionFixed: !0,
|
|
876
876
|
maxWidth: "500px",
|
|
877
877
|
placement: "bottomStart"
|
|
878
|
-
} : {}), d =
|
|
878
|
+
} : {}), d = x(() => {
|
|
879
879
|
var _;
|
|
880
880
|
return t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${(_ = t.uuid) == null ? void 0 : _.substring(0, 5)}` : t.uuid;
|
|
881
881
|
}), f = (_) => {
|
|
@@ -891,36 +891,36 @@ const se = {
|
|
|
891
891
|
}), l.value ? f(r("message.fail")) : i("error", t.uuid);
|
|
892
892
|
return;
|
|
893
893
|
}
|
|
894
|
-
const
|
|
894
|
+
const k = ((h = t.uuid) == null ? void 0 : h.length) > Nt, v = t.format === "hidden" || t.format === "redacted" ? r("message.success.prefix") : `"${((I = t.uuid) == null ? void 0 : I.substring(0, Nt)) + (k ? "..." : "")}"`;
|
|
895
895
|
typeof o == "function" && o({
|
|
896
896
|
type: "success",
|
|
897
897
|
message: `${v}${r("message.success.content")}`
|
|
898
898
|
}), l.value ? f(t.successTooltip) : i("success", t.uuid);
|
|
899
899
|
};
|
|
900
900
|
return (_, h) => {
|
|
901
|
-
const I =
|
|
901
|
+
const I = L("KClipboardProvider");
|
|
902
902
|
return b(), $("div", ro, [
|
|
903
|
-
e.format !== "hidden" ? (b(),
|
|
904
|
-
default:
|
|
903
|
+
e.format !== "hidden" ? (b(), R(Ke(e.idTooltip ? "KTooltip" : "div"), ct({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
904
|
+
default: y(() => [
|
|
905
905
|
O("div", {
|
|
906
906
|
class: $e([
|
|
907
907
|
"uuid-container",
|
|
908
908
|
e.truncated ? "truncated-uuid" : null,
|
|
909
909
|
e.useMono ? "mono" : null
|
|
910
910
|
])
|
|
911
|
-
},
|
|
911
|
+
}, j(d.value), 3)
|
|
912
912
|
]),
|
|
913
913
|
_: 1
|
|
914
|
-
}, 16)) :
|
|
915
|
-
(b(),
|
|
916
|
-
default:
|
|
914
|
+
}, 16)) : H("", !0),
|
|
915
|
+
(b(), R(Ke(e.tooltip ? "KTooltip" : "div"), ct(c.value, { class: "uuid-icon-wrapper" }), {
|
|
916
|
+
default: y(() => [
|
|
917
917
|
S(I, null, {
|
|
918
|
-
default:
|
|
918
|
+
default: y(({ copyToClipboard: k }) => [
|
|
919
919
|
O("span", {
|
|
920
920
|
"data-testid": "copy-to-clipboard",
|
|
921
921
|
role: "button",
|
|
922
922
|
tabindex: "0",
|
|
923
|
-
onClick: Ne((v) => p(
|
|
923
|
+
onClick: Ne((v) => p(k), ["stop"])
|
|
924
924
|
}, [
|
|
925
925
|
S(m(to), {
|
|
926
926
|
class: "uuid-icon",
|
|
@@ -964,21 +964,21 @@ const se = {
|
|
|
964
964
|
}
|
|
965
965
|
},
|
|
966
966
|
setup(e) {
|
|
967
|
-
const i = e, { i18n: { t } } =
|
|
967
|
+
const i = e, { i18n: { t } } = ce.useI18n(), { convertKeyToTitle: r } = ce.useStringHelpers(), o = x(() => i.item.key ?? "json-array-item"), a = x(() => i.item.value ?? i.item), l = x(() => {
|
|
968
968
|
const c = JSON.parse(JSON.stringify(a.value));
|
|
969
969
|
return i.isArrayItem && delete c.name, c;
|
|
970
|
-
}), n =
|
|
970
|
+
}), n = x(() => {
|
|
971
971
|
var c;
|
|
972
972
|
return i.isArrayItem ? (c = a.value) != null && c.name ? r(a.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: i.index }) : "";
|
|
973
973
|
});
|
|
974
|
-
return (c, d) => (b(),
|
|
974
|
+
return (c, d) => (b(), R(Ke(e.isArrayItem ? "fieldset" : "div"), {
|
|
975
975
|
class: $e(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
976
976
|
}, {
|
|
977
|
-
default:
|
|
977
|
+
default: y(() => [
|
|
978
978
|
e.isArrayItem ? (b(), $("legend", lo, [
|
|
979
|
-
O("b", null,
|
|
980
|
-
])) :
|
|
981
|
-
(b(!0), $(he, null, ve(Object.keys(l.value), (f, p) => (b(),
|
|
979
|
+
O("b", null, j(n.value), 1)
|
|
980
|
+
])) : H("", !0),
|
|
981
|
+
(b(!0), $(he, null, ve(Object.keys(l.value), (f, p) => (b(), R(wt, {
|
|
982
982
|
key: `${o.value}-property-${p}`,
|
|
983
983
|
item: {
|
|
984
984
|
key: f,
|
|
@@ -1005,17 +1005,17 @@ const se = {
|
|
|
1005
1005
|
},
|
|
1006
1006
|
emits: ["navigation-click"],
|
|
1007
1007
|
setup(e) {
|
|
1008
|
-
const { i18n: { t: i } } =
|
|
1008
|
+
const { i18n: { t: i } } = ce.useI18n();
|
|
1009
1009
|
return (t, r) => {
|
|
1010
|
-
const o =
|
|
1010
|
+
const o = L("KButton");
|
|
1011
1011
|
return b(), $("div", null, [
|
|
1012
1012
|
S(o, {
|
|
1013
1013
|
appearance: "tertiary",
|
|
1014
1014
|
class: "navigation-button",
|
|
1015
1015
|
onClick: r[0] || (r[0] = (a) => t.$emit("navigation-click", e.item))
|
|
1016
1016
|
}, {
|
|
1017
|
-
default:
|
|
1018
|
-
|
|
1017
|
+
default: y(() => [
|
|
1018
|
+
J(j(e.item.value || m(i)("baseConfigCard.commonFields.link")), 1)
|
|
1019
1019
|
]),
|
|
1020
1020
|
_: 1
|
|
1021
1021
|
})
|
|
@@ -1031,20 +1031,20 @@ const se = {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
},
|
|
1033
1033
|
setup(e) {
|
|
1034
|
-
const { i18n: { t: i } } =
|
|
1034
|
+
const { i18n: { t: i } } = ce.useI18n();
|
|
1035
1035
|
return (t, r) => {
|
|
1036
|
-
const o =
|
|
1037
|
-
return b(),
|
|
1036
|
+
const o = L("KBadge");
|
|
1037
|
+
return b(), R(o, {
|
|
1038
1038
|
appearance: e.status ? "success" : "neutral"
|
|
1039
1039
|
}, {
|
|
1040
|
-
default:
|
|
1041
|
-
|
|
1040
|
+
default: y(() => [
|
|
1041
|
+
J(j(e.status ? m(i)("baseConfigCard.statusBadge.enabledLabel") : m(i)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
1042
1042
|
]),
|
|
1043
1043
|
_: 1
|
|
1044
1044
|
}, 8, ["appearance"]);
|
|
1045
1045
|
};
|
|
1046
1046
|
}
|
|
1047
|
-
}), fo = "#0044f4", mo = "#e0e4ea",
|
|
1047
|
+
}), fo = "#0044f4", mo = "#e0e4ea", go = "#3a3f51", yo = "1px", vo = "20px", ho = { class: "config-card-details-row" }, bo = ["data-testid"], _o = ["data-testid"], wo = ["data-testid"], ko = ["data-testid"], Co = { key: 1 }, So = ["data-testid"], Io = ["data-testid"], Ao = ["data-testid"], xo = ["data-testid"], To = {
|
|
1048
1048
|
name: "ConfigCardItem",
|
|
1049
1049
|
components: { CopyUuid: di, JsonCardItem: pi, StatusBadge: po, InternalLinkItem: uo }
|
|
1050
1050
|
}, $o = /* @__PURE__ */ oe({
|
|
@@ -1069,12 +1069,12 @@ const se = {
|
|
|
1069
1069
|
setup(e, { emit: i }) {
|
|
1070
1070
|
const t = e;
|
|
1071
1071
|
rr((h) => ({
|
|
1072
|
-
"1df60db4": d.value ? "none" : `solid ${m(
|
|
1072
|
+
"1df60db4": d.value ? "none" : `solid ${m(yo)} ${m(mo)}`,
|
|
1073
1073
|
"21d1d34e": c.value && l.value ? "block" : "flex",
|
|
1074
1074
|
"4d3dc7e7": c.value && l.value ? "100%" : t.slim ? "50%" : "25%",
|
|
1075
1075
|
"4d400dc2": c.value && l.value ? "100%" : t.slim ? "50%" : "75%"
|
|
1076
1076
|
}));
|
|
1077
|
-
const r = tt(), { i18n: { t: o, formatUnixTimeStamp: a } } =
|
|
1077
|
+
const r = tt(), { i18n: { t: o, formatUnixTimeStamp: a } } = ce.useI18n(), l = x(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), n = x(() => !!(t.item.tooltip || r["label-tooltip"])), c = x(() => t.item.type === te.Json || t.item.type === te.JsonArray), d = x(() => t.item.type === te.JsonArray), f = x(() => {
|
|
1078
1078
|
switch (t.item.type) {
|
|
1079
1079
|
case te.ID:
|
|
1080
1080
|
return {
|
|
@@ -1200,29 +1200,29 @@ const se = {
|
|
|
1200
1200
|
text: t.item.value
|
|
1201
1201
|
};
|
|
1202
1202
|
}
|
|
1203
|
-
}), p = F(), { isTruncated: _ } =
|
|
1203
|
+
}), p = F(), { isTruncated: _ } = ce.useTruncationDetector(p);
|
|
1204
1204
|
return (h, I) => {
|
|
1205
|
-
const
|
|
1205
|
+
const k = L("KLabel"), v = L("KBadge"), T = L("KMethodBadge"), s = L("KTooltip");
|
|
1206
1206
|
return b(), $("div", ho, [
|
|
1207
1207
|
O("div", {
|
|
1208
1208
|
class: "config-card-details-label",
|
|
1209
1209
|
"data-testid": `${e.item.key}-label`
|
|
1210
1210
|
}, [
|
|
1211
1211
|
Q(h.$slots, "label", { item: e.item }, () => [
|
|
1212
|
-
S(
|
|
1213
|
-
default:
|
|
1214
|
-
|
|
1212
|
+
S(k, { "tooltip-attributes": { maxWidth: "500px" } }, xe({
|
|
1213
|
+
default: y(() => [
|
|
1214
|
+
J(j(e.item.label) + " ", 1)
|
|
1215
1215
|
]),
|
|
1216
1216
|
_: 2
|
|
1217
1217
|
}, [
|
|
1218
1218
|
n.value ? {
|
|
1219
1219
|
name: "tooltip",
|
|
1220
|
-
fn:
|
|
1220
|
+
fn: y(() => [
|
|
1221
1221
|
O("div", {
|
|
1222
1222
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1223
1223
|
}, [
|
|
1224
1224
|
Q(h.$slots, "label-tooltip", {}, () => [
|
|
1225
|
-
|
|
1225
|
+
J(j(e.item.tooltip), 1)
|
|
1226
1226
|
], !0)
|
|
1227
1227
|
], 8, _o)
|
|
1228
1228
|
]),
|
|
@@ -1239,73 +1239,73 @@ const se = {
|
|
|
1239
1239
|
rowValue: e.item.value
|
|
1240
1240
|
}, () => [
|
|
1241
1241
|
l.value ? (b(), $("div", Co, [
|
|
1242
|
-
(b(),
|
|
1243
|
-
default:
|
|
1242
|
+
(b(), R(Ke(f.value.tag), or(ar(f.value.attrs)), {
|
|
1243
|
+
default: y(() => [
|
|
1244
1244
|
f.value.additionalComponent === "KBadge" ? (b(), $("div", {
|
|
1245
1245
|
key: 0,
|
|
1246
1246
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1247
1247
|
}, [
|
|
1248
|
-
(b(!0), $(he, null, ve(e.item.value, (
|
|
1249
|
-
key: `${e.item.key}-badge-tag-${
|
|
1248
|
+
(b(!0), $(he, null, ve(e.item.value, (E, C) => (b(), R(v, {
|
|
1249
|
+
key: `${e.item.key}-badge-tag-${C}`,
|
|
1250
1250
|
class: "config-badge",
|
|
1251
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1252
|
-
"truncation-tooltip":
|
|
1251
|
+
"data-testid": `${e.item.key}-badge-tag-${C}`,
|
|
1252
|
+
"truncation-tooltip": E
|
|
1253
1253
|
}, {
|
|
1254
|
-
default:
|
|
1255
|
-
|
|
1254
|
+
default: y(() => [
|
|
1255
|
+
J(j(E), 1)
|
|
1256
1256
|
]),
|
|
1257
1257
|
_: 2
|
|
1258
1258
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
1259
|
-
], 8, So)) :
|
|
1259
|
+
], 8, So)) : H("", !0),
|
|
1260
1260
|
f.value.additionalComponent === "CopyUuid" ? (b(), $("div", {
|
|
1261
1261
|
key: 1,
|
|
1262
1262
|
class: "copy-uuid-array",
|
|
1263
1263
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1264
1264
|
}, [
|
|
1265
|
-
(b(!0), $(he, null, ve(e.item.value, (
|
|
1266
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1267
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1268
|
-
uuid:
|
|
1265
|
+
(b(!0), $(he, null, ve(e.item.value, (E, C) => (b(), R(m(di), ct(f.value.childAttrs, {
|
|
1266
|
+
key: `${e.item.key}-copy-uuid-${C}`,
|
|
1267
|
+
"data-testid": `${e.item.key}-copy-uuid-${C}`,
|
|
1268
|
+
uuid: E
|
|
1269
1269
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1270
1270
|
], 8, Io)) : f.value.additionalComponent === "KMethodBadge" ? (b(), $("div", {
|
|
1271
1271
|
key: 2,
|
|
1272
1272
|
class: "method-badge-array",
|
|
1273
1273
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1274
1274
|
}, [
|
|
1275
|
-
(b(!0), $(he, null, ve(e.item.value, (
|
|
1276
|
-
key: `${e.item.key}-badge-method-${
|
|
1275
|
+
(b(!0), $(he, null, ve(e.item.value, (E, C) => (b(), R(T, {
|
|
1276
|
+
key: `${e.item.key}-badge-method-${C}`,
|
|
1277
1277
|
class: "config-badge",
|
|
1278
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1278
|
+
"data-testid": `${e.item.key}-badge-method-${C}`,
|
|
1279
1279
|
"is-rounded": "",
|
|
1280
|
-
label:
|
|
1281
|
-
method: m(cr).includes(
|
|
1280
|
+
label: E,
|
|
1281
|
+
method: m(cr).includes(E.toLowerCase()) ? E.toLowerCase() : "custom"
|
|
1282
1282
|
}, {
|
|
1283
|
-
default:
|
|
1284
|
-
|
|
1283
|
+
default: y(() => [
|
|
1284
|
+
J(j(E), 1)
|
|
1285
1285
|
]),
|
|
1286
1286
|
_: 2
|
|
1287
1287
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
1288
|
-
], 8, Ao)) :
|
|
1288
|
+
], 8, Ao)) : H("", !0),
|
|
1289
1289
|
f.value.additionalComponent === "JsonCardItem" ? (b(), $("div", {
|
|
1290
1290
|
key: 3,
|
|
1291
1291
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1292
1292
|
}, [
|
|
1293
|
-
(b(!0), $(he, null, ve(e.item.value, (
|
|
1294
|
-
key: `json-array-item-${
|
|
1295
|
-
index:
|
|
1293
|
+
(b(!0), $(he, null, ve(e.item.value, (E, C) => (b(), R(pi, {
|
|
1294
|
+
key: `json-array-item-${C}`,
|
|
1295
|
+
index: C,
|
|
1296
1296
|
"is-array-item": "",
|
|
1297
|
-
item:
|
|
1297
|
+
item: E
|
|
1298
1298
|
}, null, 8, ["index", "item"]))), 128))
|
|
1299
|
-
], 8, xo)) : (b(),
|
|
1299
|
+
], 8, xo)) : (b(), R(s, {
|
|
1300
1300
|
key: 4,
|
|
1301
1301
|
label: m(_) ? e.item.value : ""
|
|
1302
1302
|
}, {
|
|
1303
|
-
default:
|
|
1303
|
+
default: y(() => [
|
|
1304
1304
|
O("span", {
|
|
1305
1305
|
ref_key: "textContent",
|
|
1306
1306
|
ref: p,
|
|
1307
1307
|
class: $e(["attrs-data-text", { truncated: e.truncated }])
|
|
1308
|
-
},
|
|
1308
|
+
}, j(f.value.text), 3)
|
|
1309
1309
|
]),
|
|
1310
1310
|
_: 1
|
|
1311
1311
|
}, 8, ["label"]))
|
|
@@ -1326,13 +1326,13 @@ const se = {
|
|
|
1326
1326
|
function fi(e) {
|
|
1327
1327
|
return typeof e > "u" || e === null;
|
|
1328
1328
|
}
|
|
1329
|
-
function
|
|
1329
|
+
function Mo(e) {
|
|
1330
1330
|
return typeof e == "object" && e !== null;
|
|
1331
1331
|
}
|
|
1332
1332
|
function Eo(e) {
|
|
1333
1333
|
return Array.isArray(e) ? e : fi(e) ? [] : [e];
|
|
1334
1334
|
}
|
|
1335
|
-
function
|
|
1335
|
+
function jo(e, i) {
|
|
1336
1336
|
var t, r, o, a;
|
|
1337
1337
|
if (i)
|
|
1338
1338
|
for (a = Object.keys(i), t = 0, r = a.length; t < r; t += 1)
|
|
@@ -1348,12 +1348,12 @@ function Vo(e, i) {
|
|
|
1348
1348
|
function Oo(e) {
|
|
1349
1349
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1350
1350
|
}
|
|
1351
|
-
var Fo = fi, No =
|
|
1351
|
+
var Fo = fi, No = Mo, Ko = Eo, Lo = Vo, qo = Oo, Bo = jo, se = {
|
|
1352
1352
|
isNothing: Fo,
|
|
1353
1353
|
isObject: No,
|
|
1354
1354
|
toArray: Ko,
|
|
1355
|
-
repeat:
|
|
1356
|
-
isNegativeZero:
|
|
1355
|
+
repeat: Lo,
|
|
1356
|
+
isNegativeZero: qo,
|
|
1357
1357
|
extend: Bo
|
|
1358
1358
|
};
|
|
1359
1359
|
function mi(e, i) {
|
|
@@ -1362,15 +1362,15 @@ function mi(e, i) {
|
|
|
1362
1362
|
|
|
1363
1363
|
` + e.mark.snippet), r + " " + t) : r;
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1365
|
+
function Ue(e, i) {
|
|
1366
1366
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = i, this.message = mi(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1367
1367
|
}
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1368
|
+
Ue.prototype = Object.create(Error.prototype);
|
|
1369
|
+
Ue.prototype.constructor = Ue;
|
|
1370
|
+
Ue.prototype.toString = function(e) {
|
|
1371
1371
|
return this.name + ": " + mi(this, e);
|
|
1372
1372
|
};
|
|
1373
|
-
var
|
|
1373
|
+
var ge = Ue;
|
|
1374
1374
|
function nt(e, i, t, r, o) {
|
|
1375
1375
|
var a = "", l = "", n = Math.floor(o / 2) - 1;
|
|
1376
1376
|
return r - i > n && (a = " ... ", i = r - n + a.length), t - r > n && (l = " ...", t = r + n - l.length), {
|
|
@@ -1380,9 +1380,9 @@ function nt(e, i, t, r, o) {
|
|
|
1380
1380
|
};
|
|
1381
1381
|
}
|
|
1382
1382
|
function lt(e, i) {
|
|
1383
|
-
return
|
|
1383
|
+
return se.repeat(" ", i - e.length) + e;
|
|
1384
1384
|
}
|
|
1385
|
-
function
|
|
1385
|
+
function Po(e, i) {
|
|
1386
1386
|
if (i = Object.create(i || null), !e.buffer)
|
|
1387
1387
|
return null;
|
|
1388
1388
|
i.maxLength || (i.maxLength = 79), typeof i.indent != "number" && (i.indent = 1), typeof i.linesBefore != "number" && (i.linesBefore = 3), typeof i.linesAfter != "number" && (i.linesAfter = 2);
|
|
@@ -1397,10 +1397,10 @@ function Uo(e, i) {
|
|
|
1397
1397
|
o[l - c],
|
|
1398
1398
|
e.position - (r[l] - r[l - c]),
|
|
1399
1399
|
p
|
|
1400
|
-
), n =
|
|
1400
|
+
), n = se.repeat(" ", i.indent) + lt((e.line - c + 1).toString(), f) + " | " + d.str + `
|
|
1401
1401
|
` + n;
|
|
1402
|
-
for (d = nt(e.buffer, r[l], o[l], e.position, p), n +=
|
|
1403
|
-
`, n +=
|
|
1402
|
+
for (d = nt(e.buffer, r[l], o[l], e.position, p), n += se.repeat(" ", i.indent) + lt((e.line + 1).toString(), f) + " | " + d.str + `
|
|
1403
|
+
`, n += se.repeat("-", i.indent + f + 3 + d.pos) + `^
|
|
1404
1404
|
`, c = 1; c <= i.linesAfter && !(l + c >= o.length); c++)
|
|
1405
1405
|
d = nt(
|
|
1406
1406
|
e.buffer,
|
|
@@ -1408,11 +1408,11 @@ function Uo(e, i) {
|
|
|
1408
1408
|
o[l + c],
|
|
1409
1409
|
e.position - (r[l] - r[l + c]),
|
|
1410
1410
|
p
|
|
1411
|
-
), n +=
|
|
1411
|
+
), n += se.repeat(" ", i.indent) + lt((e.line + c + 1).toString(), f) + " | " + d.str + `
|
|
1412
1412
|
`;
|
|
1413
1413
|
return n.replace(/\n$/, "");
|
|
1414
1414
|
}
|
|
1415
|
-
var
|
|
1415
|
+
var Uo = Po, Ro = [
|
|
1416
1416
|
"kind",
|
|
1417
1417
|
"multi",
|
|
1418
1418
|
"resolve",
|
|
@@ -1428,7 +1428,7 @@ var qo = Uo, Ro = [
|
|
|
1428
1428
|
"sequence",
|
|
1429
1429
|
"mapping"
|
|
1430
1430
|
];
|
|
1431
|
-
function
|
|
1431
|
+
function Ho(e) {
|
|
1432
1432
|
var i = {};
|
|
1433
1433
|
return e !== null && Object.keys(e).forEach(function(t) {
|
|
1434
1434
|
e[t].forEach(function(r) {
|
|
@@ -1436,18 +1436,18 @@ function zo(e) {
|
|
|
1436
1436
|
});
|
|
1437
1437
|
}), i;
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function zo(e, i) {
|
|
1440
1440
|
if (i = i || {}, Object.keys(i).forEach(function(t) {
|
|
1441
1441
|
if (Ro.indexOf(t) === -1)
|
|
1442
|
-
throw new
|
|
1442
|
+
throw new ge('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1443
1443
|
}), this.options = i, this.tag = e, this.kind = i.kind || null, this.resolve = i.resolve || function() {
|
|
1444
1444
|
return !0;
|
|
1445
1445
|
}, this.construct = i.construct || function(t) {
|
|
1446
1446
|
return t;
|
|
1447
|
-
}, this.instanceOf = i.instanceOf || null, this.predicate = i.predicate || null, this.represent = i.represent || null, this.representName = i.representName || null, this.defaultStyle = i.defaultStyle || null, this.multi = i.multi || !1, this.styleAliases =
|
|
1448
|
-
throw new
|
|
1447
|
+
}, this.instanceOf = i.instanceOf || null, this.predicate = i.predicate || null, this.represent = i.represent || null, this.representName = i.representName || null, this.defaultStyle = i.defaultStyle || null, this.multi = i.multi || !1, this.styleAliases = Ho(i.styleAliases || null), Do.indexOf(this.kind) === -1)
|
|
1448
|
+
throw new ge('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1449
1449
|
}
|
|
1450
|
-
var pe =
|
|
1450
|
+
var pe = zo;
|
|
1451
1451
|
function Kt(e, i) {
|
|
1452
1452
|
var t = [];
|
|
1453
1453
|
return e[i].forEach(function(r) {
|
|
@@ -1489,22 +1489,22 @@ dt.prototype.extend = function(e) {
|
|
|
1489
1489
|
else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit)))
|
|
1490
1490
|
e.implicit && (i = i.concat(e.implicit)), e.explicit && (t = t.concat(e.explicit));
|
|
1491
1491
|
else
|
|
1492
|
-
throw new
|
|
1492
|
+
throw new ge("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1493
1493
|
i.forEach(function(o) {
|
|
1494
1494
|
if (!(o instanceof pe))
|
|
1495
|
-
throw new
|
|
1495
|
+
throw new ge("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1496
1496
|
if (o.loadKind && o.loadKind !== "scalar")
|
|
1497
|
-
throw new
|
|
1497
|
+
throw new ge("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1498
1498
|
if (o.multi)
|
|
1499
|
-
throw new
|
|
1499
|
+
throw new ge("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1500
1500
|
}), t.forEach(function(o) {
|
|
1501
1501
|
if (!(o instanceof pe))
|
|
1502
|
-
throw new
|
|
1502
|
+
throw new ge("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1503
1503
|
});
|
|
1504
1504
|
var r = Object.create(dt.prototype);
|
|
1505
1505
|
return r.implicit = (this.implicit || []).concat(i), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = Kt(r, "implicit"), r.compiledExplicit = Kt(r, "explicit"), r.compiledTypeMap = Go(r.compiledImplicit, r.compiledExplicit), r;
|
|
1506
1506
|
};
|
|
1507
|
-
var
|
|
1507
|
+
var gi = dt, yi = new pe("tag:yaml.org,2002:str", {
|
|
1508
1508
|
kind: "scalar",
|
|
1509
1509
|
construct: function(e) {
|
|
1510
1510
|
return e !== null ? e : "";
|
|
@@ -1519,9 +1519,9 @@ var yi = dt, gi = new pe("tag:yaml.org,2002:str", {
|
|
|
1519
1519
|
construct: function(e) {
|
|
1520
1520
|
return e !== null ? e : {};
|
|
1521
1521
|
}
|
|
1522
|
-
}), bi = new
|
|
1522
|
+
}), bi = new gi({
|
|
1523
1523
|
explicit: [
|
|
1524
|
-
|
|
1524
|
+
yi,
|
|
1525
1525
|
vi,
|
|
1526
1526
|
hi
|
|
1527
1527
|
]
|
|
@@ -1568,17 +1568,17 @@ function Zo(e) {
|
|
|
1568
1568
|
var i = e.length;
|
|
1569
1569
|
return i === 4 && (e === "true" || e === "True" || e === "TRUE") || i === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1571
|
+
function Qo(e) {
|
|
1572
1572
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1573
1573
|
}
|
|
1574
|
-
function
|
|
1574
|
+
function Xo(e) {
|
|
1575
1575
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1576
1576
|
}
|
|
1577
1577
|
var wi = new pe("tag:yaml.org,2002:bool", {
|
|
1578
1578
|
kind: "scalar",
|
|
1579
1579
|
resolve: Zo,
|
|
1580
|
-
construct:
|
|
1581
|
-
predicate:
|
|
1580
|
+
construct: Qo,
|
|
1581
|
+
predicate: Xo,
|
|
1582
1582
|
represent: {
|
|
1583
1583
|
lowercase: function(e) {
|
|
1584
1584
|
return e ? "true" : "false";
|
|
@@ -1663,7 +1663,7 @@ function oa(e) {
|
|
|
1663
1663
|
return t * parseInt(i, 10);
|
|
1664
1664
|
}
|
|
1665
1665
|
function aa(e) {
|
|
1666
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !
|
|
1666
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !se.isNegativeZero(e);
|
|
1667
1667
|
}
|
|
1668
1668
|
var ki = new pe("tag:yaml.org,2002:int", {
|
|
1669
1669
|
kind: "scalar",
|
|
@@ -1735,12 +1735,12 @@ function ua(e, i) {
|
|
|
1735
1735
|
case "camelcase":
|
|
1736
1736
|
return "-.Inf";
|
|
1737
1737
|
}
|
|
1738
|
-
else if (
|
|
1738
|
+
else if (se.isNegativeZero(e))
|
|
1739
1739
|
return "-0.0";
|
|
1740
1740
|
return t = e.toString(10), ca.test(t) ? t.replace("e", ".e") : t;
|
|
1741
1741
|
}
|
|
1742
1742
|
function da(e) {
|
|
1743
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 ||
|
|
1743
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || se.isNegativeZero(e));
|
|
1744
1744
|
}
|
|
1745
1745
|
var Ci = new pe("tag:yaml.org,2002:float", {
|
|
1746
1746
|
kind: "scalar",
|
|
@@ -1787,15 +1787,15 @@ var Ti = new pe("tag:yaml.org,2002:timestamp", {
|
|
|
1787
1787
|
instanceOf: Date,
|
|
1788
1788
|
represent: ma
|
|
1789
1789
|
});
|
|
1790
|
-
function
|
|
1790
|
+
function ga(e) {
|
|
1791
1791
|
return e === "<<" || e === null;
|
|
1792
1792
|
}
|
|
1793
1793
|
var $i = new pe("tag:yaml.org,2002:merge", {
|
|
1794
1794
|
kind: "scalar",
|
|
1795
|
-
resolve:
|
|
1795
|
+
resolve: ga
|
|
1796
1796
|
}), kt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1797
1797
|
\r`;
|
|
1798
|
-
function
|
|
1798
|
+
function ya(e) {
|
|
1799
1799
|
if (e === null)
|
|
1800
1800
|
return !1;
|
|
1801
1801
|
var i, t, r = 0, o = e.length, a = kt;
|
|
@@ -1822,9 +1822,9 @@ function ha(e) {
|
|
|
1822
1822
|
function ba(e) {
|
|
1823
1823
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1824
1824
|
}
|
|
1825
|
-
var
|
|
1825
|
+
var Mi = new pe("tag:yaml.org,2002:binary", {
|
|
1826
1826
|
kind: "scalar",
|
|
1827
|
-
resolve:
|
|
1827
|
+
resolve: ya,
|
|
1828
1828
|
construct: va,
|
|
1829
1829
|
predicate: ba,
|
|
1830
1830
|
represent: ha
|
|
@@ -1878,7 +1878,7 @@ function Aa(e) {
|
|
|
1878
1878
|
r = l[i], o = Object.keys(r), a[i] = [o[0], r[o[0]]];
|
|
1879
1879
|
return a;
|
|
1880
1880
|
}
|
|
1881
|
-
var
|
|
1881
|
+
var ji = new pe("tag:yaml.org,2002:pairs", {
|
|
1882
1882
|
kind: "sequence",
|
|
1883
1883
|
resolve: Ia,
|
|
1884
1884
|
construct: Aa
|
|
@@ -1905,13 +1905,13 @@ var Vi = new pe("tag:yaml.org,2002:set", {
|
|
|
1905
1905
|
$i
|
|
1906
1906
|
],
|
|
1907
1907
|
explicit: [
|
|
1908
|
-
ji,
|
|
1909
|
-
Ei,
|
|
1910
1908
|
Mi,
|
|
1909
|
+
Ei,
|
|
1910
|
+
ji,
|
|
1911
1911
|
Vi
|
|
1912
1912
|
]
|
|
1913
|
-
}), Ie = Object.prototype.hasOwnProperty, Ye = 1, Oi = 2, Fi = 3, Ze = 4, st = 1,
|
|
1914
|
-
function
|
|
1913
|
+
}), Ie = Object.prototype.hasOwnProperty, Ye = 1, Oi = 2, Fi = 3, Ze = 4, st = 1, Ma = 2, Lt = 3, Ea = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, ja = /[\x85\u2028\u2029]/, Va = /[,\[\]\{\}]/, Ni = /^(?:!|!!|![a-z\-]+!)$/i, Ki = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1914
|
+
function qt(e) {
|
|
1915
1915
|
return Object.prototype.toString.call(e);
|
|
1916
1916
|
}
|
|
1917
1917
|
function _e(e) {
|
|
@@ -1920,7 +1920,7 @@ function _e(e) {
|
|
|
1920
1920
|
function Te(e) {
|
|
1921
1921
|
return e === 9 || e === 32;
|
|
1922
1922
|
}
|
|
1923
|
-
function
|
|
1923
|
+
function ye(e) {
|
|
1924
1924
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1925
1925
|
}
|
|
1926
1926
|
function Oe(e) {
|
|
@@ -1946,10 +1946,10 @@ function Ka(e) {
|
|
|
1946
1946
|
(e - 65536 & 1023) + 56320
|
|
1947
1947
|
);
|
|
1948
1948
|
}
|
|
1949
|
-
var
|
|
1950
|
-
for (var
|
|
1951
|
-
|
|
1952
|
-
function
|
|
1949
|
+
var Li = new Array(256), qi = new Array(256);
|
|
1950
|
+
for (var je = 0; je < 256; je++)
|
|
1951
|
+
Li[je] = Bt(je) ? 1 : 0, qi[je] = Bt(je);
|
|
1952
|
+
function La(e, i) {
|
|
1953
1953
|
this.input = e, this.filename = i.filename || null, this.schema = i.schema || Ct, this.onWarning = i.onWarning || null, this.legacy = i.legacy || !1, this.json = i.json || !1, this.listener = i.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 = [];
|
|
1954
1954
|
}
|
|
1955
1955
|
function Bi(e, i) {
|
|
@@ -1961,26 +1961,26 @@ function Bi(e, i) {
|
|
|
1961
1961
|
line: e.line,
|
|
1962
1962
|
column: e.position - e.lineStart
|
|
1963
1963
|
};
|
|
1964
|
-
return t.snippet =
|
|
1964
|
+
return t.snippet = Uo(t), new ge(i, t);
|
|
1965
1965
|
}
|
|
1966
|
-
function
|
|
1966
|
+
function M(e, i) {
|
|
1967
1967
|
throw Bi(e, i);
|
|
1968
1968
|
}
|
|
1969
|
-
function
|
|
1969
|
+
function Qe(e, i) {
|
|
1970
1970
|
e.onWarning && e.onWarning.call(null, Bi(e, i));
|
|
1971
1971
|
}
|
|
1972
|
-
var
|
|
1972
|
+
var Pt = {
|
|
1973
1973
|
YAML: function(e, i, t) {
|
|
1974
1974
|
var r, o, a;
|
|
1975
|
-
e.version !== null &&
|
|
1975
|
+
e.version !== null && M(e, "duplication of %YAML directive"), t.length !== 1 && M(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), r === null && M(e, "ill-formed argument of the YAML directive"), o = parseInt(r[1], 10), a = parseInt(r[2], 10), o !== 1 && M(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && Qe(e, "unsupported YAML version of the document");
|
|
1976
1976
|
},
|
|
1977
1977
|
TAG: function(e, i, t) {
|
|
1978
1978
|
var r, o;
|
|
1979
|
-
t.length !== 2 &&
|
|
1979
|
+
t.length !== 2 && M(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1], Ni.test(r) || M(e, "ill-formed tag handle (first argument) of the TAG directive"), Ie.call(e.tagMap, r) && M(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Ki.test(o) || M(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1980
1980
|
try {
|
|
1981
1981
|
o = decodeURIComponent(o);
|
|
1982
1982
|
} catch {
|
|
1983
|
-
|
|
1983
|
+
M(e, "tag prefix is malformed: " + o);
|
|
1984
1984
|
}
|
|
1985
1985
|
e.tagMap[r] = o;
|
|
1986
1986
|
}
|
|
@@ -1990,30 +1990,30 @@ function Se(e, i, t, r) {
|
|
|
1990
1990
|
if (i < t) {
|
|
1991
1991
|
if (n = e.input.slice(i, t), r)
|
|
1992
1992
|
for (o = 0, a = n.length; o < a; o += 1)
|
|
1993
|
-
l = n.charCodeAt(o), l === 9 || 32 <= l && l <= 1114111 ||
|
|
1993
|
+
l = n.charCodeAt(o), l === 9 || 32 <= l && l <= 1114111 || M(e, "expected valid JSON character");
|
|
1994
1994
|
else
|
|
1995
|
-
Ea.test(n) &&
|
|
1995
|
+
Ea.test(n) && M(e, "the stream contains non-printable characters");
|
|
1996
1996
|
e.result += n;
|
|
1997
1997
|
}
|
|
1998
1998
|
}
|
|
1999
|
-
function
|
|
1999
|
+
function Ut(e, i, t, r) {
|
|
2000
2000
|
var o, a, l, n;
|
|
2001
|
-
for (
|
|
2001
|
+
for (se.isObject(t) || M(e, "cannot merge mappings; the provided source object is unacceptable"), o = Object.keys(t), l = 0, n = o.length; l < n; l += 1)
|
|
2002
2002
|
a = o[l], Ie.call(i, a) || (i[a] = t[a], r[a] = !0);
|
|
2003
2003
|
}
|
|
2004
2004
|
function Fe(e, i, t, r, o, a, l, n, c) {
|
|
2005
2005
|
var d, f;
|
|
2006
2006
|
if (Array.isArray(o))
|
|
2007
2007
|
for (o = Array.prototype.slice.call(o), d = 0, f = o.length; d < f; d += 1)
|
|
2008
|
-
Array.isArray(o[d]) &&
|
|
2009
|
-
if (typeof o == "object" &&
|
|
2008
|
+
Array.isArray(o[d]) && M(e, "nested arrays are not supported inside keys"), typeof o == "object" && qt(o[d]) === "[object Object]" && (o[d] = "[object Object]");
|
|
2009
|
+
if (typeof o == "object" && qt(o) === "[object Object]" && (o = "[object Object]"), o = String(o), i === null && (i = {}), r === "tag:yaml.org,2002:merge")
|
|
2010
2010
|
if (Array.isArray(a))
|
|
2011
2011
|
for (d = 0, f = a.length; d < f; d += 1)
|
|
2012
|
-
|
|
2012
|
+
Ut(e, i, a[d], t);
|
|
2013
2013
|
else
|
|
2014
|
-
|
|
2014
|
+
Ut(e, i, a, t);
|
|
2015
2015
|
else
|
|
2016
|
-
!e.json && !Ie.call(t, o) && Ie.call(i, o) && (e.line = l || e.line, e.lineStart = n || e.lineStart, e.position = c || e.position,
|
|
2016
|
+
!e.json && !Ie.call(t, o) && Ie.call(i, o) && (e.line = l || e.line, e.lineStart = n || e.lineStart, e.position = c || e.position, M(e, "duplicated mapping key")), o === "__proto__" ? Object.defineProperty(i, o, {
|
|
2017
2017
|
configurable: !0,
|
|
2018
2018
|
enumerable: !0,
|
|
2019
2019
|
writable: !0,
|
|
@@ -2023,9 +2023,9 @@ function Fe(e, i, t, r, o, a, l, n, c) {
|
|
|
2023
2023
|
}
|
|
2024
2024
|
function St(e) {
|
|
2025
2025
|
var i;
|
|
2026
|
-
i = e.input.charCodeAt(e.position), i === 10 ? e.position++ : i === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
2026
|
+
i = e.input.charCodeAt(e.position), i === 10 ? e.position++ : i === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : M(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2028
|
+
function le(e, i, t) {
|
|
2029
2029
|
for (var r = 0, o = e.input.charCodeAt(e.position); o !== 0; ) {
|
|
2030
2030
|
for (; Te(o); )
|
|
2031
2031
|
o === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), o = e.input.charCodeAt(++e.position);
|
|
@@ -2039,32 +2039,32 @@ function ne(e, i, t) {
|
|
|
2039
2039
|
else
|
|
2040
2040
|
break;
|
|
2041
2041
|
}
|
|
2042
|
-
return t !== -1 && r !== 0 && e.lineIndent < t &&
|
|
2042
|
+
return t !== -1 && r !== 0 && e.lineIndent < t && Qe(e, "deficient indentation"), r;
|
|
2043
2043
|
}
|
|
2044
2044
|
function it(e) {
|
|
2045
2045
|
var i = e.position, t;
|
|
2046
|
-
return t = e.input.charCodeAt(i), !!((t === 45 || t === 46) && t === e.input.charCodeAt(i + 1) && t === e.input.charCodeAt(i + 2) && (i += 3, t = e.input.charCodeAt(i), t === 0 ||
|
|
2046
|
+
return t = e.input.charCodeAt(i), !!((t === 45 || t === 46) && t === e.input.charCodeAt(i + 1) && t === e.input.charCodeAt(i + 2) && (i += 3, t = e.input.charCodeAt(i), t === 0 || ye(t)));
|
|
2047
2047
|
}
|
|
2048
2048
|
function It(e, i) {
|
|
2049
|
-
i === 1 ? e.result += " " : i > 1 && (e.result +=
|
|
2049
|
+
i === 1 ? e.result += " " : i > 1 && (e.result += se.repeat(`
|
|
2050
2050
|
`, i - 1));
|
|
2051
2051
|
}
|
|
2052
|
-
function
|
|
2052
|
+
function qa(e, i, t) {
|
|
2053
2053
|
var r, o, a, l, n, c, d, f, p = e.kind, _ = e.result, h;
|
|
2054
|
-
if (h = e.input.charCodeAt(e.position),
|
|
2054
|
+
if (h = e.input.charCodeAt(e.position), ye(h) || Oe(h) || h === 35 || h === 38 || h === 42 || h === 33 || h === 124 || h === 62 || h === 39 || h === 34 || h === 37 || h === 64 || h === 96 || (h === 63 || h === 45) && (o = e.input.charCodeAt(e.position + 1), ye(o) || t && Oe(o)))
|
|
2055
2055
|
return !1;
|
|
2056
2056
|
for (e.kind = "scalar", e.result = "", a = l = e.position, n = !1; h !== 0; ) {
|
|
2057
2057
|
if (h === 58) {
|
|
2058
|
-
if (o = e.input.charCodeAt(e.position + 1),
|
|
2058
|
+
if (o = e.input.charCodeAt(e.position + 1), ye(o) || t && Oe(o))
|
|
2059
2059
|
break;
|
|
2060
2060
|
} else if (h === 35) {
|
|
2061
|
-
if (r = e.input.charCodeAt(e.position - 1),
|
|
2061
|
+
if (r = e.input.charCodeAt(e.position - 1), ye(r))
|
|
2062
2062
|
break;
|
|
2063
2063
|
} else {
|
|
2064
2064
|
if (e.position === e.lineStart && it(e) || t && Oe(h))
|
|
2065
2065
|
break;
|
|
2066
2066
|
if (_e(h))
|
|
2067
|
-
if (c = e.line, d = e.lineStart, f = e.lineIndent,
|
|
2067
|
+
if (c = e.line, d = e.lineStart, f = e.lineIndent, le(e, !1, -1), e.lineIndent >= i) {
|
|
2068
2068
|
n = !0, h = e.input.charCodeAt(e.position);
|
|
2069
2069
|
continue;
|
|
2070
2070
|
} else {
|
|
@@ -2087,10 +2087,10 @@ function Ba(e, i) {
|
|
|
2087
2087
|
else
|
|
2088
2088
|
return !0;
|
|
2089
2089
|
else
|
|
2090
|
-
_e(t) ? (Se(e, r, o, !0), It(e,
|
|
2091
|
-
|
|
2090
|
+
_e(t) ? (Se(e, r, o, !0), It(e, le(e, !1, i)), r = o = e.position) : e.position === e.lineStart && it(e) ? M(e, "unexpected end of the document within a single quoted scalar") : (e.position++, o = e.position);
|
|
2091
|
+
M(e, "unexpected end of the stream within a single quoted scalar");
|
|
2092
2092
|
}
|
|
2093
|
-
function
|
|
2093
|
+
function Pa(e, i) {
|
|
2094
2094
|
var t, r, o, a, l, n;
|
|
2095
2095
|
if (n = e.input.charCodeAt(e.position), n !== 34)
|
|
2096
2096
|
return !1;
|
|
@@ -2099,23 +2099,23 @@ function Ua(e, i) {
|
|
|
2099
2099
|
return Se(e, t, e.position, !0), e.position++, !0;
|
|
2100
2100
|
if (n === 92) {
|
|
2101
2101
|
if (Se(e, t, e.position, !0), n = e.input.charCodeAt(++e.position), _e(n))
|
|
2102
|
-
|
|
2103
|
-
else if (n < 256 &&
|
|
2104
|
-
e.result +=
|
|
2102
|
+
le(e, !1, i);
|
|
2103
|
+
else if (n < 256 && Li[n])
|
|
2104
|
+
e.result += qi[n], e.position++;
|
|
2105
2105
|
else if ((l = Fa(n)) > 0) {
|
|
2106
2106
|
for (o = l, a = 0; o > 0; o--)
|
|
2107
|
-
n = e.input.charCodeAt(++e.position), (l = Oa(n)) >= 0 ? a = (a << 4) + l :
|
|
2107
|
+
n = e.input.charCodeAt(++e.position), (l = Oa(n)) >= 0 ? a = (a << 4) + l : M(e, "expected hexadecimal character");
|
|
2108
2108
|
e.result += Ka(a), e.position++;
|
|
2109
2109
|
} else
|
|
2110
|
-
|
|
2110
|
+
M(e, "unknown escape sequence");
|
|
2111
2111
|
t = r = e.position;
|
|
2112
2112
|
} else
|
|
2113
|
-
_e(n) ? (Se(e, t, r, !0), It(e,
|
|
2113
|
+
_e(n) ? (Se(e, t, r, !0), It(e, le(e, !1, i)), t = r = e.position) : e.position === e.lineStart && it(e) ? M(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
2114
2114
|
}
|
|
2115
|
-
|
|
2115
|
+
M(e, "unexpected end of the stream within a double quoted scalar");
|
|
2116
2116
|
}
|
|
2117
|
-
function
|
|
2118
|
-
var t = !0, r, o, a, l = e.tag, n, c = e.anchor, d, f, p, _, h, I = /* @__PURE__ */ Object.create(null),
|
|
2117
|
+
function Ua(e, i) {
|
|
2118
|
+
var t = !0, r, o, a, l = e.tag, n, c = e.anchor, d, f, p, _, h, I = /* @__PURE__ */ Object.create(null), k, v, T, s;
|
|
2119
2119
|
if (s = e.input.charCodeAt(e.position), s === 91)
|
|
2120
2120
|
f = 93, h = !1, n = [];
|
|
2121
2121
|
else if (s === 123)
|
|
@@ -2123,11 +2123,11 @@ function qa(e, i) {
|
|
|
2123
2123
|
else
|
|
2124
2124
|
return !1;
|
|
2125
2125
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = n), s = e.input.charCodeAt(++e.position); s !== 0; ) {
|
|
2126
|
-
if (
|
|
2126
|
+
if (le(e, !0, i), s = e.input.charCodeAt(e.position), s === f)
|
|
2127
2127
|
return e.position++, e.tag = l, e.anchor = c, e.kind = h ? "mapping" : "sequence", e.result = n, !0;
|
|
2128
|
-
t ? s === 44 &&
|
|
2128
|
+
t ? s === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), v = k = T = null, p = _ = !1, s === 63 && (d = e.input.charCodeAt(e.position + 1), ye(d) && (p = _ = !0, e.position++, le(e, !0, i))), r = e.line, o = e.lineStart, a = e.position, Le(e, i, Ye, !1, !0), v = e.tag, k = e.result, le(e, !0, i), s = e.input.charCodeAt(e.position), (_ || e.line === r) && s === 58 && (p = !0, s = e.input.charCodeAt(++e.position), le(e, !0, i), Le(e, i, Ye, !1, !0), T = e.result), h ? Fe(e, n, I, v, k, T, r, o, a) : p ? n.push(Fe(e, null, I, v, k, T, r, o, a)) : n.push(k), le(e, !0, i), s = e.input.charCodeAt(e.position), s === 44 ? (t = !0, s = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2129
2129
|
}
|
|
2130
|
-
|
|
2130
|
+
M(e, "unexpected end of the stream within a flow collection");
|
|
2131
2131
|
}
|
|
2132
2132
|
function Ra(e, i) {
|
|
2133
2133
|
var t, r, o = st, a = !1, l = !1, n = i, c = 0, d = !1, f, p;
|
|
@@ -2139,9 +2139,9 @@ function Ra(e, i) {
|
|
|
2139
2139
|
return !1;
|
|
2140
2140
|
for (e.kind = "scalar", e.result = ""; p !== 0; )
|
|
2141
2141
|
if (p = e.input.charCodeAt(++e.position), p === 43 || p === 45)
|
|
2142
|
-
st === o ? o = p === 43 ?
|
|
2142
|
+
st === o ? o = p === 43 ? Lt : Ma : M(e, "repeat of a chomping mode identifier");
|
|
2143
2143
|
else if ((f = Na(p)) >= 0)
|
|
2144
|
-
f === 0 ?
|
|
2144
|
+
f === 0 ? M(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : l ? M(e, "repeat of an indentation width identifier") : (n = i + f - 1, l = !0);
|
|
2145
2145
|
else
|
|
2146
2146
|
break;
|
|
2147
2147
|
if (Te(p)) {
|
|
@@ -2161,15 +2161,15 @@ function Ra(e, i) {
|
|
|
2161
2161
|
continue;
|
|
2162
2162
|
}
|
|
2163
2163
|
if (e.lineIndent < n) {
|
|
2164
|
-
o ===
|
|
2164
|
+
o === Lt ? e.result += se.repeat(`
|
|
2165
2165
|
`, a ? 1 + c : c) : o === st && a && (e.result += `
|
|
2166
2166
|
`);
|
|
2167
2167
|
break;
|
|
2168
2168
|
}
|
|
2169
|
-
for (r ? Te(p) ? (d = !0, e.result +=
|
|
2170
|
-
`, a ? 1 + c : c)) : d ? (d = !1, e.result +=
|
|
2171
|
-
`, c + 1)) : c === 0 ? a && (e.result += " ") : e.result +=
|
|
2172
|
-
`, c) : e.result +=
|
|
2169
|
+
for (r ? Te(p) ? (d = !0, e.result += se.repeat(`
|
|
2170
|
+
`, a ? 1 + c : c)) : d ? (d = !1, e.result += se.repeat(`
|
|
2171
|
+
`, c + 1)) : c === 0 ? a && (e.result += " ") : e.result += se.repeat(`
|
|
2172
|
+
`, c) : e.result += se.repeat(`
|
|
2173
2173
|
`, a ? 1 + c : c), a = !0, l = !0, c = 0, t = e.position; !_e(p) && p !== 0; )
|
|
2174
2174
|
p = e.input.charCodeAt(++e.position);
|
|
2175
2175
|
Se(e, t, e.position, !1);
|
|
@@ -2180,96 +2180,96 @@ function Rt(e, i) {
|
|
|
2180
2180
|
var t, r = e.tag, o = e.anchor, a = [], l, n = !1, c;
|
|
2181
2181
|
if (e.firstTabInLine !== -1)
|
|
2182
2182
|
return !1;
|
|
2183
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2184
|
-
if (n = !0, e.position++,
|
|
2183
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), !(c !== 45 || (l = e.input.charCodeAt(e.position + 1), !ye(l)))); ) {
|
|
2184
|
+
if (n = !0, e.position++, le(e, !0, -1) && e.lineIndent <= i) {
|
|
2185
2185
|
a.push(null), c = e.input.charCodeAt(e.position);
|
|
2186
2186
|
continue;
|
|
2187
2187
|
}
|
|
2188
|
-
if (t = e.line,
|
|
2189
|
-
|
|
2188
|
+
if (t = e.line, Le(e, i, Fi, !1, !0), a.push(e.result), le(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > i) && c !== 0)
|
|
2189
|
+
M(e, "bad indentation of a sequence entry");
|
|
2190
2190
|
else if (e.lineIndent < i)
|
|
2191
2191
|
break;
|
|
2192
2192
|
}
|
|
2193
2193
|
return n ? (e.tag = r, e.anchor = o, e.kind = "sequence", e.result = a, !0) : !1;
|
|
2194
2194
|
}
|
|
2195
2195
|
function Da(e, i, t) {
|
|
2196
|
-
var r, o, a, l, n, c, d = e.tag, f = e.anchor, p = {}, _ = /* @__PURE__ */ Object.create(null), h = null, I = null,
|
|
2196
|
+
var r, o, a, l, n, c, d = e.tag, f = e.anchor, p = {}, _ = /* @__PURE__ */ Object.create(null), h = null, I = null, k = null, v = !1, T = !1, s;
|
|
2197
2197
|
if (e.firstTabInLine !== -1)
|
|
2198
2198
|
return !1;
|
|
2199
2199
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = p), s = e.input.charCodeAt(e.position); s !== 0; ) {
|
|
2200
|
-
if (!v && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2201
|
-
s === 63 ? (v && (Fe(e, p, _, h, I, null, l, n, c), h = I =
|
|
2200
|
+
if (!v && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (s === 63 || s === 58) && ye(r))
|
|
2201
|
+
s === 63 ? (v && (Fe(e, p, _, h, I, null, l, n, c), h = I = k = null), T = !0, v = !0, o = !0) : v ? (v = !1, o = !0) : M(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, s = r;
|
|
2202
2202
|
else {
|
|
2203
|
-
if (l = e.line, n = e.lineStart, c = e.position, !
|
|
2203
|
+
if (l = e.line, n = e.lineStart, c = e.position, !Le(e, t, Oi, !1, !0))
|
|
2204
2204
|
break;
|
|
2205
2205
|
if (e.line === a) {
|
|
2206
2206
|
for (s = e.input.charCodeAt(e.position); Te(s); )
|
|
2207
2207
|
s = e.input.charCodeAt(++e.position);
|
|
2208
2208
|
if (s === 58)
|
|
2209
|
-
s = e.input.charCodeAt(++e.position),
|
|
2210
|
-
else if (
|
|
2211
|
-
|
|
2209
|
+
s = e.input.charCodeAt(++e.position), ye(s) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (Fe(e, p, _, h, I, null, l, n, c), h = I = k = null), T = !0, v = !1, o = !1, h = e.tag, I = e.result;
|
|
2210
|
+
else if (T)
|
|
2211
|
+
M(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2212
2212
|
else
|
|
2213
2213
|
return e.tag = d, e.anchor = f, !0;
|
|
2214
|
-
} else if (
|
|
2215
|
-
|
|
2214
|
+
} else if (T)
|
|
2215
|
+
M(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2216
2216
|
else
|
|
2217
2217
|
return e.tag = d, e.anchor = f, !0;
|
|
2218
2218
|
}
|
|
2219
|
-
if ((e.line === a || e.lineIndent > i) && (v && (l = e.line, n = e.lineStart, c = e.position),
|
|
2220
|
-
|
|
2219
|
+
if ((e.line === a || e.lineIndent > i) && (v && (l = e.line, n = e.lineStart, c = e.position), Le(e, i, Ze, !0, o) && (v ? I = e.result : k = e.result), v || (Fe(e, p, _, h, I, k, l, n, c), h = I = k = null), le(e, !0, -1), s = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > i) && s !== 0)
|
|
2220
|
+
M(e, "bad indentation of a mapping entry");
|
|
2221
2221
|
else if (e.lineIndent < i)
|
|
2222
2222
|
break;
|
|
2223
2223
|
}
|
|
2224
|
-
return v && Fe(e, p, _, h, I, null, l, n, c),
|
|
2224
|
+
return v && Fe(e, p, _, h, I, null, l, n, c), T && (e.tag = d, e.anchor = f, e.kind = "mapping", e.result = p), T;
|
|
2225
2225
|
}
|
|
2226
|
-
function
|
|
2226
|
+
function Ha(e) {
|
|
2227
2227
|
var i, t = !1, r = !1, o, a, l;
|
|
2228
2228
|
if (l = e.input.charCodeAt(e.position), l !== 33)
|
|
2229
2229
|
return !1;
|
|
2230
|
-
if (e.tag !== null &&
|
|
2230
|
+
if (e.tag !== null && M(e, "duplication of a tag property"), l = e.input.charCodeAt(++e.position), l === 60 ? (t = !0, l = e.input.charCodeAt(++e.position)) : l === 33 ? (r = !0, o = "!!", l = e.input.charCodeAt(++e.position)) : o = "!", i = e.position, t) {
|
|
2231
2231
|
do
|
|
2232
2232
|
l = e.input.charCodeAt(++e.position);
|
|
2233
2233
|
while (l !== 0 && l !== 62);
|
|
2234
|
-
e.position < e.length ? (a = e.input.slice(i, e.position), l = e.input.charCodeAt(++e.position)) :
|
|
2234
|
+
e.position < e.length ? (a = e.input.slice(i, e.position), l = e.input.charCodeAt(++e.position)) : M(e, "unexpected end of the stream within a verbatim tag");
|
|
2235
2235
|
} else {
|
|
2236
|
-
for (; l !== 0 && !
|
|
2237
|
-
l === 33 && (r ?
|
|
2238
|
-
a = e.input.slice(i, e.position), Va.test(a) &&
|
|
2236
|
+
for (; l !== 0 && !ye(l); )
|
|
2237
|
+
l === 33 && (r ? M(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(i - 1, e.position + 1), Ni.test(o) || M(e, "named tag handle cannot contain such characters"), r = !0, i = e.position + 1)), l = e.input.charCodeAt(++e.position);
|
|
2238
|
+
a = e.input.slice(i, e.position), Va.test(a) && M(e, "tag suffix cannot contain flow indicator characters");
|
|
2239
2239
|
}
|
|
2240
|
-
a && !Ki.test(a) &&
|
|
2240
|
+
a && !Ki.test(a) && M(e, "tag name cannot contain such characters: " + a);
|
|
2241
2241
|
try {
|
|
2242
2242
|
a = decodeURIComponent(a);
|
|
2243
2243
|
} catch {
|
|
2244
|
-
|
|
2244
|
+
M(e, "tag name is malformed: " + a);
|
|
2245
2245
|
}
|
|
2246
|
-
return t ? e.tag = a : Ie.call(e.tagMap, o) ? e.tag = e.tagMap[o] + a : o === "!" ? e.tag = "!" + a : o === "!!" ? e.tag = "tag:yaml.org,2002:" + a :
|
|
2246
|
+
return t ? e.tag = a : Ie.call(e.tagMap, o) ? e.tag = e.tagMap[o] + a : o === "!" ? e.tag = "!" + a : o === "!!" ? e.tag = "tag:yaml.org,2002:" + a : M(e, 'undeclared tag handle "' + o + '"'), !0;
|
|
2247
2247
|
}
|
|
2248
|
-
function
|
|
2248
|
+
function za(e) {
|
|
2249
2249
|
var i, t;
|
|
2250
2250
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2251
2251
|
return !1;
|
|
2252
|
-
for (e.anchor !== null &&
|
|
2252
|
+
for (e.anchor !== null && M(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), i = e.position; t !== 0 && !ye(t) && !Oe(t); )
|
|
2253
2253
|
t = e.input.charCodeAt(++e.position);
|
|
2254
|
-
return e.position === i &&
|
|
2254
|
+
return e.position === i && M(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(i, e.position), !0;
|
|
2255
2255
|
}
|
|
2256
2256
|
function Ga(e) {
|
|
2257
2257
|
var i, t, r;
|
|
2258
2258
|
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
2259
2259
|
return !1;
|
|
2260
|
-
for (r = e.input.charCodeAt(++e.position), i = e.position; r !== 0 && !
|
|
2260
|
+
for (r = e.input.charCodeAt(++e.position), i = e.position; r !== 0 && !ye(r) && !Oe(r); )
|
|
2261
2261
|
r = e.input.charCodeAt(++e.position);
|
|
2262
|
-
return e.position === i &&
|
|
2263
|
-
}
|
|
2264
|
-
function
|
|
2265
|
-
var a, l, n, c = 1, d = !1, f = !1, p, _, h, I,
|
|
2266
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = l = n = Ze === t || Fi === t, r &&
|
|
2267
|
-
for (;
|
|
2268
|
-
|
|
2269
|
-
if (n && (n = d || o), (c === 1 || Ze === t) && (Ye === t || Oi === t ?
|
|
2262
|
+
return e.position === i && M(e, "name of an alias node must contain at least one character"), t = e.input.slice(i, e.position), Ie.call(e.anchorMap, t) || M(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], le(e, !0, -1), !0;
|
|
2263
|
+
}
|
|
2264
|
+
function Le(e, i, t, r, o) {
|
|
2265
|
+
var a, l, n, c = 1, d = !1, f = !1, p, _, h, I, k, v;
|
|
2266
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = l = n = Ze === t || Fi === t, r && le(e, !0, -1) && (d = !0, e.lineIndent > i ? c = 1 : e.lineIndent === i ? c = 0 : e.lineIndent < i && (c = -1)), c === 1)
|
|
2267
|
+
for (; Ha(e) || za(e); )
|
|
2268
|
+
le(e, !0, -1) ? (d = !0, n = a, e.lineIndent > i ? c = 1 : e.lineIndent === i ? c = 0 : e.lineIndent < i && (c = -1)) : n = !1;
|
|
2269
|
+
if (n && (n = d || o), (c === 1 || Ze === t) && (Ye === t || Oi === t ? k = i : k = i + 1, v = e.position - e.lineStart, c === 1 ? n && (Rt(e, v) || Da(e, v, k)) || Ua(e, k) ? f = !0 : (l && Ra(e, k) || Ba(e, k) || Pa(e, k) ? f = !0 : Ga(e) ? (f = !0, (e.tag !== null || e.anchor !== null) && M(e, "alias node should not have any properties")) : qa(e, k, Ye === t) && (f = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (f = n && Rt(e, v))), e.tag === null)
|
|
2270
2270
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2271
2271
|
else if (e.tag === "?") {
|
|
2272
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2272
|
+
for (e.result !== null && e.kind !== "scalar" && M(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), p = 0, _ = e.implicitTypes.length; p < _; p += 1)
|
|
2273
2273
|
if (I = e.implicitTypes[p], I.resolve(e.result)) {
|
|
2274
2274
|
e.result = I.construct(e.result), e.tag = I.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2275
2275
|
break;
|
|
@@ -2283,16 +2283,16 @@ function Pe(e, i, t, r, o) {
|
|
|
2283
2283
|
I = h[p];
|
|
2284
2284
|
break;
|
|
2285
2285
|
}
|
|
2286
|
-
I ||
|
|
2286
|
+
I || M(e, "unknown tag !<" + e.tag + ">"), e.result !== null && I.kind !== e.kind && M(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)) : M(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2287
2287
|
}
|
|
2288
2288
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || f;
|
|
2289
2289
|
}
|
|
2290
2290
|
function Ja(e) {
|
|
2291
2291
|
var i = e.position, t, r, o, a = !1, l;
|
|
2292
|
-
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (l = e.input.charCodeAt(e.position)) !== 0 && (
|
|
2293
|
-
for (a = !0, l = e.input.charCodeAt(++e.position), t = e.position; l !== 0 && !
|
|
2292
|
+
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (l = e.input.charCodeAt(e.position)) !== 0 && (le(e, !0, -1), l = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || l !== 37)); ) {
|
|
2293
|
+
for (a = !0, l = e.input.charCodeAt(++e.position), t = e.position; l !== 0 && !ye(l); )
|
|
2294
2294
|
l = e.input.charCodeAt(++e.position);
|
|
2295
|
-
for (r = e.input.slice(t, e.position), o = [], r.length < 1 &&
|
|
2295
|
+
for (r = e.input.slice(t, e.position), o = [], r.length < 1 && M(e, "directive name must not be less than one character in length"); l !== 0; ) {
|
|
2296
2296
|
for (; Te(l); )
|
|
2297
2297
|
l = e.input.charCodeAt(++e.position);
|
|
2298
2298
|
if (l === 35) {
|
|
@@ -2303,26 +2303,26 @@ function Ja(e) {
|
|
|
2303
2303
|
}
|
|
2304
2304
|
if (_e(l))
|
|
2305
2305
|
break;
|
|
2306
|
-
for (t = e.position; l !== 0 && !
|
|
2306
|
+
for (t = e.position; l !== 0 && !ye(l); )
|
|
2307
2307
|
l = e.input.charCodeAt(++e.position);
|
|
2308
2308
|
o.push(e.input.slice(t, e.position));
|
|
2309
2309
|
}
|
|
2310
|
-
l !== 0 && St(e), Ie.call(
|
|
2310
|
+
l !== 0 && St(e), Ie.call(Pt, r) ? Pt[r](e, r, o) : Qe(e, 'unknown document directive "' + r + '"');
|
|
2311
2311
|
}
|
|
2312
|
-
if (
|
|
2313
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
2312
|
+
if (le(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, le(e, !0, -1)) : a && M(e, "directives end mark is expected"), Le(e, e.lineIndent - 1, Ze, !1, !0), le(e, !0, -1), e.checkLineBreaks && ja.test(e.input.slice(i, e.position)) && Qe(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && it(e)) {
|
|
2313
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, le(e, !0, -1));
|
|
2314
2314
|
return;
|
|
2315
2315
|
}
|
|
2316
2316
|
if (e.position < e.length - 1)
|
|
2317
|
-
|
|
2317
|
+
M(e, "end of the stream or a document separator is expected");
|
|
2318
2318
|
else
|
|
2319
2319
|
return;
|
|
2320
2320
|
}
|
|
2321
|
-
function
|
|
2321
|
+
function Pi(e, i) {
|
|
2322
2322
|
e = String(e), i = i || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2323
2323
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2324
|
-
var t = new
|
|
2325
|
-
for (r !== -1 && (t.position = r,
|
|
2324
|
+
var t = new La(e, i), r = e.indexOf("\0");
|
|
2325
|
+
for (r !== -1 && (t.position = r, M(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2326
2326
|
t.lineIndent += 1, t.position += 1;
|
|
2327
2327
|
for (; t.position < t.length - 1; )
|
|
2328
2328
|
Ja(t);
|
|
@@ -2330,24 +2330,24 @@ function Ui(e, i) {
|
|
|
2330
2330
|
}
|
|
2331
2331
|
function Wa(e, i, t) {
|
|
2332
2332
|
i !== null && typeof i == "object" && typeof t > "u" && (t = i, i = null);
|
|
2333
|
-
var r =
|
|
2333
|
+
var r = Pi(e, t);
|
|
2334
2334
|
if (typeof i != "function")
|
|
2335
2335
|
return r;
|
|
2336
2336
|
for (var o = 0, a = r.length; o < a; o += 1)
|
|
2337
2337
|
i(r[o]);
|
|
2338
2338
|
}
|
|
2339
2339
|
function Ya(e, i) {
|
|
2340
|
-
var t =
|
|
2340
|
+
var t = Pi(e, i);
|
|
2341
2341
|
if (t.length !== 0) {
|
|
2342
2342
|
if (t.length === 1)
|
|
2343
2343
|
return t[0];
|
|
2344
|
-
throw new
|
|
2344
|
+
throw new ge("expected a single document in the stream, but found more");
|
|
2345
2345
|
}
|
|
2346
2346
|
}
|
|
2347
|
-
var Za = Wa,
|
|
2347
|
+
var Za = Wa, Qa = Ya, Ui = {
|
|
2348
2348
|
loadAll: Za,
|
|
2349
|
-
load:
|
|
2350
|
-
}, Ri = Object.prototype.toString, Di = Object.prototype.hasOwnProperty, At = 65279,
|
|
2349
|
+
load: Qa
|
|
2350
|
+
}, Ri = Object.prototype.toString, Di = Object.prototype.hasOwnProperty, At = 65279, Xa = 9, Re = 10, en = 13, tn = 32, rn = 33, on = 34, pt = 35, an = 37, nn = 38, ln = 39, sn = 42, Hi = 44, cn = 45, Xe = 58, un = 61, dn = 62, pn = 63, fn = 64, zi = 91, Gi = 93, mn = 96, Ji = 123, gn = 124, Wi = 125, me = {};
|
|
2351
2351
|
me[0] = "\\0";
|
|
2352
2352
|
me[7] = "\\a";
|
|
2353
2353
|
me[8] = "\\b";
|
|
@@ -2363,7 +2363,7 @@ me[133] = "\\N";
|
|
|
2363
2363
|
me[160] = "\\_";
|
|
2364
2364
|
me[8232] = "\\L";
|
|
2365
2365
|
me[8233] = "\\P";
|
|
2366
|
-
var
|
|
2366
|
+
var yn = [
|
|
2367
2367
|
"y",
|
|
2368
2368
|
"Y",
|
|
2369
2369
|
"yes",
|
|
@@ -2398,15 +2398,15 @@ function bn(e) {
|
|
|
2398
2398
|
else if (e <= 4294967295)
|
|
2399
2399
|
t = "U", r = 8;
|
|
2400
2400
|
else
|
|
2401
|
-
throw new
|
|
2402
|
-
return "\\" + t +
|
|
2401
|
+
throw new ge("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2402
|
+
return "\\" + t + se.repeat("0", r - i.length) + i;
|
|
2403
2403
|
}
|
|
2404
2404
|
var _n = 1, De = 2;
|
|
2405
2405
|
function wn(e) {
|
|
2406
|
-
this.schema = e.schema || Ct, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel =
|
|
2406
|
+
this.schema = e.schema || Ct, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = se.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = hn(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 === '"' ? De : _n, 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;
|
|
2407
2407
|
}
|
|
2408
2408
|
function Dt(e, i) {
|
|
2409
|
-
for (var t =
|
|
2409
|
+
for (var t = se.repeat(" ", i), r = 0, o = -1, a = "", l, n = e.length; r < n; )
|
|
2410
2410
|
o = e.indexOf(`
|
|
2411
2411
|
`, r), o === -1 ? (l = e.slice(r), r = n) : (l = e.slice(r, o + 1), r = o + 1), l.length && l !== `
|
|
2412
2412
|
` && (a += t), a += l;
|
|
@@ -2414,7 +2414,7 @@ function Dt(e, i) {
|
|
|
2414
2414
|
}
|
|
2415
2415
|
function ft(e, i) {
|
|
2416
2416
|
return `
|
|
2417
|
-
` +
|
|
2417
|
+
` + se.repeat(" ", e.indent * i);
|
|
2418
2418
|
}
|
|
2419
2419
|
function kn(e, i) {
|
|
2420
2420
|
var t, r, o;
|
|
@@ -2424,29 +2424,29 @@ function kn(e, i) {
|
|
|
2424
2424
|
return !1;
|
|
2425
2425
|
}
|
|
2426
2426
|
function et(e) {
|
|
2427
|
-
return e === tn || e ===
|
|
2427
|
+
return e === tn || e === Xa;
|
|
2428
2428
|
}
|
|
2429
|
-
function
|
|
2429
|
+
function He(e) {
|
|
2430
2430
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== At || 65536 <= e && e <= 1114111;
|
|
2431
2431
|
}
|
|
2432
|
-
function
|
|
2433
|
-
return
|
|
2432
|
+
function Ht(e) {
|
|
2433
|
+
return He(e) && e !== At && e !== en && e !== Re;
|
|
2434
2434
|
}
|
|
2435
|
-
function
|
|
2436
|
-
var r =
|
|
2435
|
+
function zt(e, i, t) {
|
|
2436
|
+
var r = Ht(e), o = r && !et(e);
|
|
2437
2437
|
return (
|
|
2438
2438
|
// ns-plain-safe
|
|
2439
2439
|
(t ? (
|
|
2440
2440
|
// c = flow-in
|
|
2441
2441
|
r
|
|
2442
|
-
) : r && e !==
|
|
2442
|
+
) : r && e !== Hi && e !== zi && e !== Gi && e !== Ji && e !== Wi) && e !== pt && !(i === Xe && !o) || Ht(i) && !et(i) && e === pt || i === Xe && o
|
|
2443
2443
|
);
|
|
2444
2444
|
}
|
|
2445
2445
|
function Cn(e) {
|
|
2446
|
-
return
|
|
2446
|
+
return He(e) && e !== At && !et(e) && e !== cn && e !== pn && e !== Xe && e !== Hi && e !== zi && e !== Gi && e !== Ji && e !== Wi && e !== pt && e !== nn && e !== sn && e !== rn && e !== gn && e !== un && e !== dn && e !== ln && e !== on && e !== an && e !== fn && e !== mn;
|
|
2447
2447
|
}
|
|
2448
2448
|
function Sn(e) {
|
|
2449
|
-
return !et(e) && e !==
|
|
2449
|
+
return !et(e) && e !== Xe;
|
|
2450
2450
|
}
|
|
2451
2451
|
function Be(e, i) {
|
|
2452
2452
|
var t = e.charCodeAt(i), r;
|
|
@@ -2456,33 +2456,33 @@ function Yi(e) {
|
|
|
2456
2456
|
var i = /^\n* /;
|
|
2457
2457
|
return i.test(e);
|
|
2458
2458
|
}
|
|
2459
|
-
var Zi = 1, mt = 2,
|
|
2459
|
+
var Zi = 1, mt = 2, Qi = 3, Xi = 4, Ve = 5;
|
|
2460
2460
|
function In(e, i, t, r, o, a, l, n) {
|
|
2461
|
-
var c, d = 0, f = null, p = !1, _ = !1, h = r !== -1, I = -1,
|
|
2461
|
+
var c, d = 0, f = null, p = !1, _ = !1, h = r !== -1, I = -1, k = Cn(Be(e, 0)) && Sn(Be(e, e.length - 1));
|
|
2462
2462
|
if (i || l)
|
|
2463
2463
|
for (c = 0; c < e.length; d >= 65536 ? c += 2 : c++) {
|
|
2464
|
-
if (d = Be(e, c), !
|
|
2464
|
+
if (d = Be(e, c), !He(d))
|
|
2465
2465
|
return Ve;
|
|
2466
|
-
|
|
2466
|
+
k = k && zt(d, f, n), f = d;
|
|
2467
2467
|
}
|
|
2468
2468
|
else {
|
|
2469
2469
|
for (c = 0; c < e.length; d >= 65536 ? c += 2 : c++) {
|
|
2470
2470
|
if (d = Be(e, c), d === Re)
|
|
2471
2471
|
p = !0, h && (_ = _ || // Foldable line = too long, and not more-indented.
|
|
2472
2472
|
c - I - 1 > r && e[I + 1] !== " ", I = c);
|
|
2473
|
-
else if (!
|
|
2473
|
+
else if (!He(d))
|
|
2474
2474
|
return Ve;
|
|
2475
|
-
|
|
2475
|
+
k = k && zt(d, f, n), f = d;
|
|
2476
2476
|
}
|
|
2477
2477
|
_ = _ || h && c - I - 1 > r && e[I + 1] !== " ";
|
|
2478
2478
|
}
|
|
2479
|
-
return !p && !_ ?
|
|
2479
|
+
return !p && !_ ? k && !l && !o(e) ? Zi : a === De ? Ve : mt : t > 9 && Yi(e) ? Ve : l ? a === De ? Ve : mt : _ ? Xi : Qi;
|
|
2480
2480
|
}
|
|
2481
2481
|
function An(e, i, t, r, o) {
|
|
2482
2482
|
e.dump = function() {
|
|
2483
2483
|
if (i.length === 0)
|
|
2484
2484
|
return e.quotingType === De ? '""' : "''";
|
|
2485
|
-
if (!e.noCompatMode && (
|
|
2485
|
+
if (!e.noCompatMode && (yn.indexOf(i) !== -1 || vn.test(i)))
|
|
2486
2486
|
return e.quotingType === De ? '"' + i + '"' : "'" + i + "'";
|
|
2487
2487
|
var a = e.indent * Math.max(1, t), l = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), n = r || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2488
2488
|
function c(d) {
|
|
@@ -2502,14 +2502,14 @@ function An(e, i, t, r, o) {
|
|
|
2502
2502
|
return i;
|
|
2503
2503
|
case mt:
|
|
2504
2504
|
return "'" + i.replace(/'/g, "''") + "'";
|
|
2505
|
-
case Xi:
|
|
2506
|
-
return "|" + Gt(i, e.indent) + Jt(Dt(i, a));
|
|
2507
2505
|
case Qi:
|
|
2506
|
+
return "|" + Gt(i, e.indent) + Jt(Dt(i, a));
|
|
2507
|
+
case Xi:
|
|
2508
2508
|
return ">" + Gt(i, e.indent) + Jt(Dt(xn(i, l), a));
|
|
2509
2509
|
case Ve:
|
|
2510
2510
|
return '"' + Tn(i) + '"';
|
|
2511
2511
|
default:
|
|
2512
|
-
throw new
|
|
2512
|
+
throw new ge("impossible error: invalid scalar style");
|
|
2513
2513
|
}
|
|
2514
2514
|
}();
|
|
2515
2515
|
}
|
|
@@ -2550,7 +2550,7 @@ function Wt(e, i) {
|
|
|
2550
2550
|
}
|
|
2551
2551
|
function Tn(e) {
|
|
2552
2552
|
for (var i = "", t = 0, r, o = 0; o < e.length; t >= 65536 ? o += 2 : o++)
|
|
2553
|
-
t = Be(e, o), r = me[t], !r &&
|
|
2553
|
+
t = Be(e, o), r = me[t], !r && He(t) ? (i += e[o], t >= 65536 && (i += e[o + 1])) : i += r || bn(t);
|
|
2554
2554
|
return i;
|
|
2555
2555
|
}
|
|
2556
2556
|
function $n(e, i, t) {
|
|
@@ -2565,7 +2565,7 @@ function Yt(e, i, t, r) {
|
|
|
2565
2565
|
c = t[l], e.replacer && (c = e.replacer.call(t, String(l), c)), (ke(e, i + 1, c, !0, !0, !1, !0) || typeof c > "u" && ke(e, i + 1, null, !0, !0, !1, !0)) && ((!r || o !== "") && (o += ft(e, i)), e.dump && Re === e.dump.charCodeAt(0) ? o += "-" : o += "- ", o += e.dump);
|
|
2566
2566
|
e.tag = a, e.dump = o || "[]";
|
|
2567
2567
|
}
|
|
2568
|
-
function
|
|
2568
|
+
function Mn(e, i, t) {
|
|
2569
2569
|
var r = "", o = e.tag, a = Object.keys(t), l, n, c, d, f;
|
|
2570
2570
|
for (l = 0, n = a.length; l < n; l += 1)
|
|
2571
2571
|
f = "", r !== "" && (f += ", "), e.condenseFlow && (f += '"'), c = a[l], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)), ke(e, i, c, !1, !1) && (e.dump.length > 1024 && (f += "? "), f += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ke(e, i, d, !1, !1) && (f += e.dump, r += f));
|
|
@@ -2578,7 +2578,7 @@ function En(e, i, t, r) {
|
|
|
2578
2578
|
else if (typeof e.sortKeys == "function")
|
|
2579
2579
|
l.sort(e.sortKeys);
|
|
2580
2580
|
else if (e.sortKeys)
|
|
2581
|
-
throw new
|
|
2581
|
+
throw new ge("sortKeys must be a boolean or a function");
|
|
2582
2582
|
for (n = 0, c = l.length; n < c; n += 1)
|
|
2583
2583
|
_ = "", (!r || o !== "") && (_ += ft(e, i)), d = l[n], f = t[d], e.replacer && (f = e.replacer.call(t, d, f)), ke(e, i + 1, d, !0, !0, !0) && (p = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, p && (e.dump && Re === e.dump.charCodeAt(0) ? _ += "?" : _ += "? "), _ += e.dump, p && (_ += ft(e, i)), ke(e, i + 1, f, !0, p) && (e.dump && Re === e.dump.charCodeAt(0) ? _ += ":" : _ += ": ", _ += e.dump, o += _));
|
|
2584
2584
|
e.tag = a, e.dump = o || "{}";
|
|
@@ -2593,7 +2593,7 @@ function Zt(e, i, t) {
|
|
|
2593
2593
|
else if (Di.call(n.represent, c))
|
|
2594
2594
|
r = n.represent[c](i, c);
|
|
2595
2595
|
else
|
|
2596
|
-
throw new
|
|
2596
|
+
throw new ge("!<" + n.tag + '> tag resolver accepts not "' + c + '" style');
|
|
2597
2597
|
e.dump = r;
|
|
2598
2598
|
}
|
|
2599
2599
|
return !0;
|
|
@@ -2609,7 +2609,7 @@ function ke(e, i, t, r, o, a, l) {
|
|
|
2609
2609
|
e.dump = "*ref_" + p;
|
|
2610
2610
|
else {
|
|
2611
2611
|
if (f && _ && !e.usedDuplicates[p] && (e.usedDuplicates[p] = !0), n === "[object Object]")
|
|
2612
|
-
r && Object.keys(e.dump).length !== 0 ? (En(e, i, e.dump, o), _ && (e.dump = "&ref_" + p + e.dump)) : (
|
|
2612
|
+
r && Object.keys(e.dump).length !== 0 ? (En(e, i, e.dump, o), _ && (e.dump = "&ref_" + p + e.dump)) : (Mn(e, i, e.dump), _ && (e.dump = "&ref_" + p + " " + e.dump));
|
|
2613
2613
|
else if (n === "[object Array]")
|
|
2614
2614
|
r && e.dump.length !== 0 ? (e.noArrayIndent && !l && i > 0 ? Yt(e, i - 1, e.dump, o) : Yt(e, i, e.dump, o), _ && (e.dump = "&ref_" + p + e.dump)) : ($n(e, i, e.dump), _ && (e.dump = "&ref_" + p + " " + e.dump));
|
|
2615
2615
|
else if (n === "[object String]")
|
|
@@ -2617,7 +2617,7 @@ function ke(e, i, t, r, o, a, l) {
|
|
|
2617
2617
|
else {
|
|
2618
2618
|
if (n === "[object Undefined]" || e.skipInvalid)
|
|
2619
2619
|
return !1;
|
|
2620
|
-
throw new
|
|
2620
|
+
throw new ge("unacceptable kind of an object to dump " + n);
|
|
2621
2621
|
}
|
|
2622
2622
|
e.tag !== null && e.tag !== "?" && (d = encodeURI(
|
|
2623
2623
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
@@ -2625,28 +2625,28 @@ function ke(e, i, t, r, o, a, l) {
|
|
|
2625
2625
|
}
|
|
2626
2626
|
return !0;
|
|
2627
2627
|
}
|
|
2628
|
-
function
|
|
2628
|
+
function jn(e, i) {
|
|
2629
2629
|
var t = [], r = [], o, a;
|
|
2630
|
-
for (
|
|
2630
|
+
for (gt(e, t, r), o = 0, a = r.length; o < a; o += 1)
|
|
2631
2631
|
i.duplicates.push(t[r[o]]);
|
|
2632
2632
|
i.usedDuplicates = new Array(a);
|
|
2633
2633
|
}
|
|
2634
|
-
function
|
|
2634
|
+
function gt(e, i, t) {
|
|
2635
2635
|
var r, o, a;
|
|
2636
2636
|
if (e !== null && typeof e == "object")
|
|
2637
2637
|
if (o = i.indexOf(e), o !== -1)
|
|
2638
2638
|
t.indexOf(o) === -1 && t.push(o);
|
|
2639
2639
|
else if (i.push(e), Array.isArray(e))
|
|
2640
2640
|
for (o = 0, a = e.length; o < a; o += 1)
|
|
2641
|
-
|
|
2641
|
+
gt(e[o], i, t);
|
|
2642
2642
|
else
|
|
2643
2643
|
for (r = Object.keys(e), o = 0, a = r.length; o < a; o += 1)
|
|
2644
|
-
|
|
2644
|
+
gt(e[r[o]], i, t);
|
|
2645
2645
|
}
|
|
2646
2646
|
function Vn(e, i) {
|
|
2647
2647
|
i = i || {};
|
|
2648
2648
|
var t = new wn(i);
|
|
2649
|
-
t.noRefs ||
|
|
2649
|
+
t.noRefs || jn(e, t);
|
|
2650
2650
|
var r = e;
|
|
2651
2651
|
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), ke(t, 0, r, !0, !0) ? t.dump + `
|
|
2652
2652
|
` : "";
|
|
@@ -2659,12 +2659,12 @@ function xt(e, i) {
|
|
|
2659
2659
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + i + " instead, which is now safe by default.");
|
|
2660
2660
|
};
|
|
2661
2661
|
}
|
|
2662
|
-
var Nn = pe, Kn =
|
|
2663
|
-
binary:
|
|
2662
|
+
var Nn = pe, Kn = gi, Ln = bi, qn = Si, Bn = Ii, Pn = Ct, Un = Ui.load, Rn = Ui.loadAll, Dn = Fn.dump, Hn = ge, zn = {
|
|
2663
|
+
binary: Mi,
|
|
2664
2664
|
float: Ci,
|
|
2665
2665
|
map: hi,
|
|
2666
2666
|
null: _i,
|
|
2667
|
-
pairs:
|
|
2667
|
+
pairs: ji,
|
|
2668
2668
|
set: Vi,
|
|
2669
2669
|
timestamp: Ti,
|
|
2670
2670
|
bool: wi,
|
|
@@ -2672,19 +2672,19 @@ var Nn = pe, Kn = yi, Pn = bi, Ln = Si, Bn = Ii, Un = Ct, qn = qi.load, Rn = qi.
|
|
|
2672
2672
|
merge: $i,
|
|
2673
2673
|
omap: Ei,
|
|
2674
2674
|
seq: vi,
|
|
2675
|
-
str:
|
|
2675
|
+
str: yi
|
|
2676
2676
|
}, Gn = xt("safeLoad", "load"), Jn = xt("safeLoadAll", "loadAll"), Wn = xt("safeDump", "dump"), Yn = {
|
|
2677
2677
|
Type: Nn,
|
|
2678
2678
|
Schema: Kn,
|
|
2679
|
-
FAILSAFE_SCHEMA:
|
|
2680
|
-
JSON_SCHEMA:
|
|
2679
|
+
FAILSAFE_SCHEMA: Ln,
|
|
2680
|
+
JSON_SCHEMA: qn,
|
|
2681
2681
|
CORE_SCHEMA: Bn,
|
|
2682
|
-
DEFAULT_SCHEMA:
|
|
2683
|
-
load:
|
|
2682
|
+
DEFAULT_SCHEMA: Pn,
|
|
2683
|
+
load: Un,
|
|
2684
2684
|
loadAll: Rn,
|
|
2685
2685
|
dump: Dn,
|
|
2686
|
-
YAMLException:
|
|
2687
|
-
types:
|
|
2686
|
+
YAMLException: Hn,
|
|
2687
|
+
types: zn,
|
|
2688
2688
|
safeLoad: Gn,
|
|
2689
2689
|
safeLoadAll: Jn,
|
|
2690
2690
|
safeDump: Wn
|
|
@@ -2692,7 +2692,7 @@ var Nn = pe, Kn = yi, Pn = bi, Ln = Si, Bn = Ii, Un = Ct, qn = qi.load, Rn = qi.
|
|
|
2692
2692
|
const Zn = {
|
|
2693
2693
|
key: 0,
|
|
2694
2694
|
class: "config-card-display-form"
|
|
2695
|
-
},
|
|
2695
|
+
}, Qn = ["data-testid"], Xn = {
|
|
2696
2696
|
key: 0,
|
|
2697
2697
|
class: "config-card-prop-section-title"
|
|
2698
2698
|
}, el = {
|
|
@@ -2727,11 +2727,11 @@ const Zn = {
|
|
|
2727
2727
|
}
|
|
2728
2728
|
},
|
|
2729
2729
|
setup(e) {
|
|
2730
|
-
const i = e, t = tt(), { i18n: { t: r } } =
|
|
2730
|
+
const i = e, t = tt(), { i18n: { t: r } } = ce.useI18n(), o = (n) => !!(n.tooltip || t[`${n.key}-label-tooltip`]), a = F(""), l = F("");
|
|
2731
2731
|
return we(() => i.format, (n) => {
|
|
2732
2732
|
n === "json" ? a.value = JSON.stringify(i.record, null, 2) : n === "yaml" && (l.value = Yn.dump(i.record));
|
|
2733
2733
|
}, { immediate: !0 }), (n, c) => {
|
|
2734
|
-
const d =
|
|
2734
|
+
const d = L("KCodeBlock");
|
|
2735
2735
|
return b(), $(he, null, [
|
|
2736
2736
|
e.format === "structured" ? (b(), $("div", Zn, [
|
|
2737
2737
|
(b(!0), $(he, null, ve(e.propListTypes, (f) => (b(), $("div", {
|
|
@@ -2739,15 +2739,15 @@ const Zn = {
|
|
|
2739
2739
|
class: $e(`config-card-details-${f}-props`),
|
|
2740
2740
|
"data-testid": `config-card-details-${f}-props`
|
|
2741
2741
|
}, [
|
|
2742
|
-
f !== "basic" ? (b(), $("div",
|
|
2743
|
-
(b(!0), $(he, null, ve(e.propertyCollections[f], (p) => (b(),
|
|
2742
|
+
f !== "basic" ? (b(), $("div", Xn, j(f === "advanced" ? m(r)("baseConfigCard.sections.advanced") : m(r)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
2743
|
+
(b(!0), $(he, null, ve(e.propertyCollections[f], (p) => (b(), R(wt, {
|
|
2744
2744
|
key: p.key,
|
|
2745
2745
|
item: p
|
|
2746
2746
|
}, xe({
|
|
2747
|
-
label:
|
|
2747
|
+
label: y(() => [
|
|
2748
2748
|
Q(n.$slots, `${p.key}-label`, { row: p }, void 0, !0)
|
|
2749
2749
|
]),
|
|
2750
|
-
[p.key]:
|
|
2750
|
+
[p.key]: y(({ rowValue: _ }) => [
|
|
2751
2751
|
Q(n.$slots, p.key, {
|
|
2752
2752
|
row: p,
|
|
2753
2753
|
rowValue: _
|
|
@@ -2757,14 +2757,14 @@ const Zn = {
|
|
|
2757
2757
|
}, [
|
|
2758
2758
|
o(p) ? {
|
|
2759
2759
|
name: "label-tooltip",
|
|
2760
|
-
fn:
|
|
2760
|
+
fn: y(() => [
|
|
2761
2761
|
Q(n.$slots, `${p.key}-label-tooltip`, { row: p }, void 0, !0)
|
|
2762
2762
|
]),
|
|
2763
2763
|
key: "0"
|
|
2764
2764
|
} : void 0
|
|
2765
2765
|
]), 1032, ["item"]))), 128))
|
|
2766
|
-
], 10,
|
|
2767
|
-
])) :
|
|
2766
|
+
], 10, Qn))), 128))
|
|
2767
|
+
])) : H("", !0),
|
|
2768
2768
|
e.format === "json" ? (b(), $("div", el, [
|
|
2769
2769
|
S(d, {
|
|
2770
2770
|
id: "config-card-codeblock",
|
|
@@ -2772,7 +2772,7 @@ const Zn = {
|
|
|
2772
2772
|
language: "json",
|
|
2773
2773
|
theme: "dark"
|
|
2774
2774
|
}, null, 8, ["code"])
|
|
2775
|
-
])) :
|
|
2775
|
+
])) : H("", !0),
|
|
2776
2776
|
e.format === "yaml" ? (b(), $("div", tl, [
|
|
2777
2777
|
S(d, {
|
|
2778
2778
|
id: "config-card-codeblock",
|
|
@@ -2780,11 +2780,11 @@ const Zn = {
|
|
|
2780
2780
|
language: "yaml",
|
|
2781
2781
|
theme: "dark"
|
|
2782
2782
|
}, null, 8, ["code"])
|
|
2783
|
-
])) :
|
|
2783
|
+
])) : H("", !0)
|
|
2784
2784
|
], 64);
|
|
2785
2785
|
};
|
|
2786
2786
|
}
|
|
2787
|
-
}), rl = /* @__PURE__ */ be(il, [["__scopeId", "data-v-6c45e9e4"]]),
|
|
2787
|
+
}), rl = /* @__PURE__ */ be(il, [["__scopeId", "data-v-6c45e9e4"]]), Qt = "24px", ol = (e, i) => {
|
|
2788
2788
|
const t = e.__vccOpts || e;
|
|
2789
2789
|
for (const [r, o] of i)
|
|
2790
2790
|
t[r] = o;
|
|
@@ -2826,7 +2826,7 @@ const Zn = {
|
|
|
2826
2826
|
size: {
|
|
2827
2827
|
type: [Number, String],
|
|
2828
2828
|
required: !1,
|
|
2829
|
-
default:
|
|
2829
|
+
default: Qt,
|
|
2830
2830
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2831
2831
|
validator: (e) => {
|
|
2832
2832
|
if (typeof e == "number" && e > 0)
|
|
@@ -2847,7 +2847,7 @@ const Zn = {
|
|
|
2847
2847
|
}
|
|
2848
2848
|
},
|
|
2849
2849
|
setup(e) {
|
|
2850
|
-
const i = e, t =
|
|
2850
|
+
const i = e, t = x(() => {
|
|
2851
2851
|
if (typeof i.size == "number" && i.size > 0)
|
|
2852
2852
|
return `${i.size}px`;
|
|
2853
2853
|
if (typeof i.size == "string") {
|
|
@@ -2855,8 +2855,8 @@ const Zn = {
|
|
|
2855
2855
|
if (a && !isNaN(a) && Number.isInteger(a) && a > 0)
|
|
2856
2856
|
return `${a}px`;
|
|
2857
2857
|
}
|
|
2858
|
-
return
|
|
2859
|
-
}), r =
|
|
2858
|
+
return Qt;
|
|
2859
|
+
}), r = x(() => ({
|
|
2860
2860
|
boxSizing: "border-box",
|
|
2861
2861
|
color: i.color,
|
|
2862
2862
|
display: i.display,
|
|
@@ -2864,13 +2864,13 @@ const Zn = {
|
|
|
2864
2864
|
lineHeight: "0",
|
|
2865
2865
|
width: t.value
|
|
2866
2866
|
}));
|
|
2867
|
-
return (o, a) => (b(),
|
|
2867
|
+
return (o, a) => (b(), R(Ke(e.as), {
|
|
2868
2868
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2869
2869
|
class: "kui-icon book-icon",
|
|
2870
2870
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2871
2871
|
style: ii(r.value)
|
|
2872
2872
|
}, {
|
|
2873
|
-
default:
|
|
2873
|
+
default: y(() => [
|
|
2874
2874
|
(b(), $("svg", {
|
|
2875
2875
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2876
2876
|
"data-testid": "kui-icon-svg-book-icon",
|
|
@@ -2881,7 +2881,7 @@ const Zn = {
|
|
|
2881
2881
|
width: "100%",
|
|
2882
2882
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2883
2883
|
}, [
|
|
2884
|
-
e.title ? (b(), $("title", ll,
|
|
2884
|
+
e.title ? (b(), $("title", ll, j(e.title), 1)) : H("", !0),
|
|
2885
2885
|
sl
|
|
2886
2886
|
], 8, nl))
|
|
2887
2887
|
]),
|
|
@@ -2891,10 +2891,10 @@ const Zn = {
|
|
|
2891
2891
|
}), ul = /* @__PURE__ */ ol(cl, [["__scopeId", "data-v-dd88a2bb"]]), dl = { "data-testid": "config-card-title" }, pl = { class: "config-card-actions" }, fl = ["href"], ml = {
|
|
2892
2892
|
key: 2,
|
|
2893
2893
|
class: "config-card-details-section"
|
|
2894
|
-
},
|
|
2894
|
+
}, gl = {
|
|
2895
2895
|
key: 3,
|
|
2896
2896
|
class: "config-card-details-section"
|
|
2897
|
-
},
|
|
2897
|
+
}, yl = ["data-testid"], vl = {
|
|
2898
2898
|
key: 0,
|
|
2899
2899
|
class: "config-card-prop-section-title"
|
|
2900
2900
|
}, hl = /* @__PURE__ */ oe({
|
|
@@ -2972,7 +2972,7 @@ const Zn = {
|
|
|
2972
2972
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
2973
2973
|
setup(e, { emit: i }) {
|
|
2974
2974
|
var t;
|
|
2975
|
-
const r = e, o = tt(), { i18n: { t: a } } =
|
|
2975
|
+
const r = e, o = tt(), { i18n: { t: a } } = ce.useI18n(), { getMessageFromError: l } = ce.useErrors(), { convertKeyToTitle: n } = ce.useStringHelpers(), { axiosInstance: c } = ce.useAxios({
|
|
2976
2976
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
2977
2977
|
}), d = [
|
|
2978
2978
|
{
|
|
@@ -3024,79 +3024,79 @@ const Zn = {
|
|
|
3024
3024
|
// the last property displayed
|
|
3025
3025
|
section: fe.Basic
|
|
3026
3026
|
}
|
|
3027
|
-
}, h = F(!1), I = F(!1),
|
|
3028
|
-
var A,
|
|
3027
|
+
}, h = F(!1), I = F(!1), k = F(""), v = F(), T = x(() => {
|
|
3028
|
+
var A, q, U;
|
|
3029
3029
|
if (!v.value)
|
|
3030
3030
|
return [];
|
|
3031
|
-
const
|
|
3032
|
-
for (const
|
|
3033
|
-
const
|
|
3034
|
-
let ie =
|
|
3035
|
-
(
|
|
3031
|
+
const N = [], z = Object.keys(v.value).length;
|
|
3032
|
+
for (const D in v.value) {
|
|
3033
|
+
const X = (q = (A = r.configSchema) == null ? void 0 : A[D]) == null ? void 0 : q.order, G = (U = _[D]) == null ? void 0 : U.order;
|
|
3034
|
+
let ie = z;
|
|
3035
|
+
(G || G === 0) && (ie = G === -1 ? z + 1 : G), X && (ie = X === -1 ? z + 1 : X), N.push([D, ie]);
|
|
3036
3036
|
}
|
|
3037
|
-
return
|
|
3038
|
-
return
|
|
3039
|
-
}),
|
|
3040
|
-
var
|
|
3041
|
-
const ie =
|
|
3037
|
+
return N.sort(function(D, X) {
|
|
3038
|
+
return D[1] - X[1];
|
|
3039
|
+
}), N.map((D) => {
|
|
3040
|
+
var X, G;
|
|
3041
|
+
const ie = D[0], Z = (X = v.value) == null ? void 0 : X[ie], ee = ((G = r.configSchema) == null ? void 0 : G[ie]) || {}, de = _[ie];
|
|
3042
3042
|
return {
|
|
3043
3043
|
key: ie,
|
|
3044
|
-
value:
|
|
3044
|
+
value: Z,
|
|
3045
3045
|
hidden: ee.hidden || !1,
|
|
3046
3046
|
type: ee.type ?? ((de == null ? void 0 : de.type) || te.Text),
|
|
3047
3047
|
label: ee.label ?? ((de == null ? void 0 : de.label) || n(ie)),
|
|
3048
3048
|
tooltip: ee.tooltip ?? ((de == null ? void 0 : de.tooltip) || void 0),
|
|
3049
3049
|
section: ee.section ?? ((de == null ? void 0 : de.section) || fe.Advanced)
|
|
3050
3050
|
};
|
|
3051
|
-
}).filter((
|
|
3052
|
-
}), s =
|
|
3053
|
-
var A,
|
|
3051
|
+
}).filter((D) => !D.hidden && D.key !== r.pluginConfigKey);
|
|
3052
|
+
}), s = x(() => {
|
|
3053
|
+
var A, q;
|
|
3054
3054
|
if (!v.value || !r.pluginConfigKey)
|
|
3055
3055
|
return [];
|
|
3056
|
-
const
|
|
3057
|
-
for (const
|
|
3058
|
-
const
|
|
3059
|
-
let ie =
|
|
3060
|
-
|
|
3056
|
+
const U = v.value[r.pluginConfigKey] || {}, N = Object.keys(U).length, z = [];
|
|
3057
|
+
for (const D in U) {
|
|
3058
|
+
const X = (q = (A = r.pluginConfigSchema) == null ? void 0 : A[D]) == null ? void 0 : q.order, G = U[D];
|
|
3059
|
+
let ie = G != null && G !== "" ? N - 1 : N;
|
|
3060
|
+
X && (ie = X === -1 ? N + 1 : X), z.push([D, ie]);
|
|
3061
3061
|
}
|
|
3062
|
-
return
|
|
3063
|
-
return
|
|
3064
|
-
}),
|
|
3065
|
-
var
|
|
3066
|
-
const
|
|
3062
|
+
return z.sort(function(D, X) {
|
|
3063
|
+
return D[1] - X[1];
|
|
3064
|
+
}), z.map((D) => {
|
|
3065
|
+
var X;
|
|
3066
|
+
const G = D[0], ie = U[G], Z = ((X = r.pluginConfigSchema) == null ? void 0 : X[G]) || {};
|
|
3067
3067
|
return {
|
|
3068
|
-
key:
|
|
3068
|
+
key: G,
|
|
3069
3069
|
value: ie,
|
|
3070
|
-
hidden:
|
|
3071
|
-
type:
|
|
3072
|
-
label:
|
|
3073
|
-
tooltip:
|
|
3070
|
+
hidden: Z.hidden || !1,
|
|
3071
|
+
type: Z.type ?? te.Text,
|
|
3072
|
+
label: Z.label ?? n(G),
|
|
3073
|
+
tooltip: Z.tooltip ?? void 0,
|
|
3074
3074
|
section: fe.Plugin
|
|
3075
3075
|
};
|
|
3076
|
-
}).filter((
|
|
3077
|
-
}),
|
|
3078
|
-
var A,
|
|
3076
|
+
}).filter((D) => !D.hidden);
|
|
3077
|
+
}), E = x(() => {
|
|
3078
|
+
var A, q, U, N;
|
|
3079
3079
|
return {
|
|
3080
|
-
basic: (A =
|
|
3081
|
-
advanced: (
|
|
3082
|
-
plugin: (
|
|
3080
|
+
basic: (A = T.value) == null ? void 0 : A.filter((z) => z.section === fe.Basic),
|
|
3081
|
+
advanced: (q = T.value) == null ? void 0 : q.filter((z) => z.section === fe.Advanced),
|
|
3082
|
+
plugin: (N = s.value) == null ? void 0 : N.concat((U = T.value) == null ? void 0 : U.filter((z) => z.section === fe.Plugin))
|
|
3083
3083
|
};
|
|
3084
|
-
}),
|
|
3084
|
+
}), C = x(() => {
|
|
3085
3085
|
const A = [];
|
|
3086
|
-
return
|
|
3087
|
-
}),
|
|
3088
|
-
var A,
|
|
3089
|
-
let
|
|
3090
|
-
return r.config.app === "konnect" ?
|
|
3086
|
+
return E.value.basic.length && A.push("basic"), E.value.advanced.length && A.push("advanced"), E.value.plugin.length && A.push("plugin"), A;
|
|
3087
|
+
}), P = (A) => !!(A.tooltip || o[`${A.key}-label-tooltip`]), ae = x(() => {
|
|
3088
|
+
var A, q;
|
|
3089
|
+
let U = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3090
|
+
return r.config.app === "konnect" ? U = U.replace(/{controlPlaneId}/gi, ((A = r.config) == null ? void 0 : A.controlPlaneId) || "") : r.config.app === "kongManager" && (U = U.replace(/\/{workspace}/gi, (q = r.config) != null && q.workspace ? `/${r.config.workspace}` : "")), U = U.replace(/{id}/gi, r.config.entityId), U;
|
|
3091
3091
|
}), Y = (A) => {
|
|
3092
3092
|
v.value && A(JSON.stringify(v.value)) ? i("copy:success", v.value) : i("copy:error");
|
|
3093
3093
|
};
|
|
3094
3094
|
return we(h, (A) => {
|
|
3095
3095
|
i("loading", A);
|
|
3096
|
-
}, { immediate: !0 }),
|
|
3096
|
+
}, { immediate: !0 }), yt(async () => {
|
|
3097
3097
|
I.value = !1, h.value = !0;
|
|
3098
3098
|
try {
|
|
3099
|
-
const { data: A } = await c.get(
|
|
3099
|
+
const { data: A } = await c.get(ae.value);
|
|
3100
3100
|
if (r.dataKey)
|
|
3101
3101
|
if (typeof A[r.dataKey] < "u")
|
|
3102
3102
|
v.value = { ...A[r.dataKey] };
|
|
@@ -3104,45 +3104,45 @@ const Zn = {
|
|
|
3104
3104
|
throw new Error(a("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3105
3105
|
else
|
|
3106
3106
|
v.value = { ...A };
|
|
3107
|
-
Object.keys(r.configSchema).filter((
|
|
3108
|
-
v.value && typeof v.value[
|
|
3107
|
+
Object.keys(r.configSchema).filter((q) => r.configSchema[q].forceShow).forEach((q) => {
|
|
3108
|
+
v.value && typeof v.value[q] > "u" && (v.value[q] = null);
|
|
3109
3109
|
}), i("fetch:success", A);
|
|
3110
3110
|
} catch (A) {
|
|
3111
|
-
const
|
|
3112
|
-
|
|
3111
|
+
const q = l(A);
|
|
3112
|
+
k.value = q.startsWith("code") ? a("baseConfigCard.errors.load") : q, I.value = !0, i("fetch:error", A);
|
|
3113
3113
|
} finally {
|
|
3114
3114
|
h.value = !1;
|
|
3115
3115
|
}
|
|
3116
|
-
}), (A,
|
|
3117
|
-
const
|
|
3118
|
-
return b(),
|
|
3119
|
-
actions:
|
|
3116
|
+
}), (A, q) => {
|
|
3117
|
+
const U = L("KLabel"), N = L("KSelect"), z = L("KButton"), D = L("KClipboardProvider"), X = L("KSkeleton"), G = L("KEmptyState"), ie = L("KCard");
|
|
3118
|
+
return b(), R(ie, { class: "kong-ui-entity-base-config-card" }, xe({
|
|
3119
|
+
actions: y(() => [
|
|
3120
3120
|
O("div", pl, [
|
|
3121
3121
|
Q(A.$slots, "actions", {}, void 0, !0),
|
|
3122
|
-
e.config.jsonYamlEnabled ? (b(),
|
|
3122
|
+
e.config.jsonYamlEnabled ? (b(), R(U, {
|
|
3123
3123
|
key: 0,
|
|
3124
3124
|
class: "config-format-select-label",
|
|
3125
3125
|
"data-testid": "config-format-select-label"
|
|
3126
3126
|
}, {
|
|
3127
|
-
default:
|
|
3128
|
-
|
|
3127
|
+
default: y(() => [
|
|
3128
|
+
J(j(e.label), 1)
|
|
3129
3129
|
]),
|
|
3130
3130
|
_: 1
|
|
3131
|
-
})) :
|
|
3132
|
-
e.config.jsonYamlEnabled ? (b(),
|
|
3131
|
+
})) : H("", !0),
|
|
3132
|
+
e.config.jsonYamlEnabled ? (b(), R(N, {
|
|
3133
3133
|
key: 1,
|
|
3134
3134
|
appearance: "select",
|
|
3135
3135
|
"data-testid": "select-config-format",
|
|
3136
3136
|
items: d,
|
|
3137
3137
|
onChange: p
|
|
3138
|
-
})) :
|
|
3139
|
-
r.config.jsonYamlEnabled && e.configCardDoc ? (b(),
|
|
3138
|
+
})) : H("", !0),
|
|
3139
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (b(), R(z, {
|
|
3140
3140
|
key: 2,
|
|
3141
3141
|
appearance: "tertiary",
|
|
3142
3142
|
class: "book-icon",
|
|
3143
3143
|
"data-testid": "book-icon"
|
|
3144
3144
|
}, {
|
|
3145
|
-
default:
|
|
3145
|
+
default: y(() => [
|
|
3146
3146
|
O("a", {
|
|
3147
3147
|
href: e.configCardDoc,
|
|
3148
3148
|
rel: "noopener",
|
|
@@ -3152,73 +3152,73 @@ const Zn = {
|
|
|
3152
3152
|
], 8, fl)
|
|
3153
3153
|
]),
|
|
3154
3154
|
_: 1
|
|
3155
|
-
})) :
|
|
3156
|
-
e.config.jsonYamlEnabled ?
|
|
3157
|
-
default:
|
|
3158
|
-
!h.value && !I.value ? (b(),
|
|
3155
|
+
})) : H("", !0),
|
|
3156
|
+
e.config.jsonYamlEnabled ? H("", !0) : (b(), R(D, { key: 3 }, {
|
|
3157
|
+
default: y(({ copyToClipboard: Z }) => [
|
|
3158
|
+
!h.value && !I.value ? (b(), R(z, {
|
|
3159
3159
|
key: 0,
|
|
3160
3160
|
appearance: "tertiary",
|
|
3161
3161
|
"data-testid": "json-copy-button",
|
|
3162
|
-
onClick: (ee) => Y(
|
|
3162
|
+
onClick: (ee) => Y(Z)
|
|
3163
3163
|
}, {
|
|
3164
|
-
default:
|
|
3165
|
-
|
|
3164
|
+
default: y(() => [
|
|
3165
|
+
J(j(m(a)("baseConfigCard.actions.copy")), 1)
|
|
3166
3166
|
]),
|
|
3167
3167
|
_: 2
|
|
3168
|
-
}, 1032, ["onClick"])) :
|
|
3168
|
+
}, 1032, ["onClick"])) : H("", !0)
|
|
3169
3169
|
]),
|
|
3170
3170
|
_: 1
|
|
3171
3171
|
}))
|
|
3172
3172
|
])
|
|
3173
3173
|
]),
|
|
3174
|
-
body:
|
|
3175
|
-
h.value ? (b(),
|
|
3174
|
+
body: y(() => [
|
|
3175
|
+
h.value ? (b(), R(X, {
|
|
3176
3176
|
key: 0,
|
|
3177
3177
|
"data-testid": "config-card-loader",
|
|
3178
3178
|
"table-columns": 2,
|
|
3179
3179
|
type: "table"
|
|
3180
|
-
})) : I.value ? (b(),
|
|
3180
|
+
})) : I.value ? (b(), R(G, {
|
|
3181
3181
|
key: 1,
|
|
3182
3182
|
"data-testid": "config-card-fetch-error",
|
|
3183
3183
|
"is-error": ""
|
|
3184
3184
|
}, {
|
|
3185
|
-
message:
|
|
3186
|
-
O("h3", null,
|
|
3185
|
+
message: y(() => [
|
|
3186
|
+
O("h3", null, j(k.value), 1)
|
|
3187
3187
|
]),
|
|
3188
3188
|
_: 1
|
|
3189
|
-
})) :
|
|
3189
|
+
})) : H("", !0),
|
|
3190
3190
|
e.config.jsonYamlEnabled ? (b(), $("div", ml, [
|
|
3191
3191
|
S(rl, {
|
|
3192
3192
|
format: f.value,
|
|
3193
|
-
"prop-list-types":
|
|
3194
|
-
"property-collections":
|
|
3193
|
+
"prop-list-types": C.value,
|
|
3194
|
+
"property-collections": E.value,
|
|
3195
3195
|
record: v.value
|
|
3196
3196
|
}, xe({ _: 2 }, [
|
|
3197
|
-
ve(Object.keys(A.$slots), (
|
|
3198
|
-
name:
|
|
3199
|
-
fn:
|
|
3200
|
-
Q(A.$slots,
|
|
3197
|
+
ve(Object.keys(A.$slots), (Z) => ({
|
|
3198
|
+
name: Z,
|
|
3199
|
+
fn: y(({ row: ee, rowValue: de }) => [
|
|
3200
|
+
Q(A.$slots, Z, {
|
|
3201
3201
|
row: ee,
|
|
3202
3202
|
rowValue: de
|
|
3203
3203
|
}, void 0, !0)
|
|
3204
3204
|
])
|
|
3205
3205
|
}))
|
|
3206
3206
|
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
3207
|
-
])) : (b(), $("div",
|
|
3208
|
-
(b(!0), $(he, null, ve(
|
|
3209
|
-
key: `config-card-details-${
|
|
3210
|
-
class: $e(`config-card-details-${
|
|
3211
|
-
"data-testid": `config-card-details-${
|
|
3207
|
+
])) : (b(), $("div", gl, [
|
|
3208
|
+
(b(!0), $(he, null, ve(C.value, (Z) => (b(), $("div", {
|
|
3209
|
+
key: `config-card-details-${Z}-props`,
|
|
3210
|
+
class: $e(`config-card-details-${Z}-props`),
|
|
3211
|
+
"data-testid": `config-card-details-${Z}-props`
|
|
3212
3212
|
}, [
|
|
3213
|
-
|
|
3214
|
-
(b(!0), $(he, null, ve(
|
|
3213
|
+
Z !== "basic" ? (b(), $("div", vl, j(Z === "advanced" ? m(a)("baseConfigCard.sections.advanced") : m(a)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
3214
|
+
(b(!0), $(he, null, ve(E.value[Z], (ee) => (b(), R(wt, {
|
|
3215
3215
|
key: ee.key,
|
|
3216
3216
|
item: ee
|
|
3217
3217
|
}, xe({
|
|
3218
|
-
label:
|
|
3218
|
+
label: y(() => [
|
|
3219
3219
|
Q(A.$slots, `${ee.key}-label`, { row: ee }, void 0, !0)
|
|
3220
3220
|
]),
|
|
3221
|
-
[ee.key]:
|
|
3221
|
+
[ee.key]: y(({ rowValue: de }) => [
|
|
3222
3222
|
Q(A.$slots, ee.key, {
|
|
3223
3223
|
row: ee,
|
|
3224
3224
|
rowValue: de
|
|
@@ -3226,25 +3226,25 @@ const Zn = {
|
|
|
3226
3226
|
]),
|
|
3227
3227
|
_: 2
|
|
3228
3228
|
}, [
|
|
3229
|
-
|
|
3229
|
+
P(ee) ? {
|
|
3230
3230
|
name: "label-tooltip",
|
|
3231
|
-
fn:
|
|
3231
|
+
fn: y(() => [
|
|
3232
3232
|
Q(A.$slots, `${ee.key}-label-tooltip`, { row: ee }, void 0, !0)
|
|
3233
3233
|
]),
|
|
3234
3234
|
key: "0"
|
|
3235
3235
|
} : void 0
|
|
3236
3236
|
]), 1032, ["item"]))), 128))
|
|
3237
|
-
], 10,
|
|
3237
|
+
], 10, yl))), 128))
|
|
3238
3238
|
]))
|
|
3239
3239
|
]),
|
|
3240
3240
|
_: 2
|
|
3241
3241
|
}, [
|
|
3242
3242
|
e.hideTitle ? void 0 : {
|
|
3243
3243
|
name: "title",
|
|
3244
|
-
fn:
|
|
3244
|
+
fn: y(() => [
|
|
3245
3245
|
O("div", dl, [
|
|
3246
3246
|
Q(A.$slots, "title", {}, () => [
|
|
3247
|
-
|
|
3247
|
+
J(j(m(a)("baseConfigCard.title")), 1)
|
|
3248
3248
|
], !0)
|
|
3249
3249
|
])
|
|
3250
3250
|
]),
|
|
@@ -3306,87 +3306,87 @@ const Zn = {
|
|
|
3306
3306
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3307
3307
|
setup(e, { emit: i }) {
|
|
3308
3308
|
var t;
|
|
3309
|
-
const r = e, o = vt(), { i18n: { t: a } } =
|
|
3309
|
+
const r = e, o = vt(), { i18n: { t: a } } = ce.useI18n(), { getMessageFromError: l } = ce.useErrors(), { axiosInstance: n } = ce.useAxios({
|
|
3310
3310
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3311
|
-
}), c = F(!1), d = F(!1), f = F(""), p =
|
|
3312
|
-
var v,
|
|
3311
|
+
}), c = F(!1), d = F(!1), f = F(""), p = x(() => r.canSubmit === !1 || r.isReadonly), _ = x(() => {
|
|
3312
|
+
var v, T;
|
|
3313
3313
|
if (!r.editId)
|
|
3314
3314
|
return "";
|
|
3315
3315
|
let s = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3316
|
-
return r.config.app === "konnect" ? s = s.replace(/{controlPlaneId}/gi, ((v = r.config) == null ? void 0 : v.controlPlaneId) || "") : r.config.app === "kongManager" && (s = s.replace(/\/{workspace}/gi, (
|
|
3316
|
+
return r.config.app === "konnect" ? s = s.replace(/{controlPlaneId}/gi, ((v = r.config) == null ? void 0 : v.controlPlaneId) || "") : r.config.app === "kongManager" && (s = s.replace(/\/{workspace}/gi, (T = r.config) != null && T.workspace ? `/${r.config.workspace}` : "")), s = s.replace(/{id}/gi, r.editId), s;
|
|
3317
3317
|
}), h = () => {
|
|
3318
3318
|
r.config.cancelRoute ? o.push(r.config.cancelRoute) : I();
|
|
3319
3319
|
}, I = () => {
|
|
3320
3320
|
i("cancel");
|
|
3321
|
-
},
|
|
3321
|
+
}, k = () => {
|
|
3322
3322
|
p.value || i("submit");
|
|
3323
3323
|
};
|
|
3324
3324
|
return we(() => c.value, (v) => {
|
|
3325
3325
|
i("loading", v);
|
|
3326
|
-
}, { immediate: !0 }),
|
|
3326
|
+
}, { immediate: !0 }), yt(async () => {
|
|
3327
3327
|
if (r.editId)
|
|
3328
3328
|
try {
|
|
3329
3329
|
d.value = !1, c.value = !0;
|
|
3330
3330
|
const { data: v } = await n.get(_.value);
|
|
3331
3331
|
i("fetch:success", v);
|
|
3332
3332
|
} catch (v) {
|
|
3333
|
-
const
|
|
3334
|
-
f.value =
|
|
3333
|
+
const T = l(v);
|
|
3334
|
+
f.value = T.startsWith("code") ? a("baseForm.errors.edit") : T, d.value = !0, i("fetch:error", v);
|
|
3335
3335
|
} finally {
|
|
3336
3336
|
c.value = !1;
|
|
3337
3337
|
}
|
|
3338
|
-
}), (v,
|
|
3339
|
-
const s =
|
|
3340
|
-
return b(),
|
|
3341
|
-
body:
|
|
3342
|
-
c.value ? (b(),
|
|
3338
|
+
}), (v, T) => {
|
|
3339
|
+
const s = L("KSkeleton"), E = L("KEmptyState"), C = L("KAlert"), P = L("KButton"), ae = L("KCard");
|
|
3340
|
+
return b(), R(ae, { class: "kong-ui-entity-base-form" }, {
|
|
3341
|
+
body: y(() => [
|
|
3342
|
+
c.value ? (b(), R(s, {
|
|
3343
3343
|
key: 0,
|
|
3344
3344
|
type: "form"
|
|
3345
|
-
})) : d.value ? (b(),
|
|
3345
|
+
})) : d.value ? (b(), R(E, {
|
|
3346
3346
|
key: 1,
|
|
3347
3347
|
"cta-text": m(a)("baseForm.actions.back"),
|
|
3348
3348
|
"data-testid": "form-fetch-error",
|
|
3349
3349
|
"handle-click": h,
|
|
3350
3350
|
"is-error": !0
|
|
3351
3351
|
}, {
|
|
3352
|
-
message:
|
|
3353
|
-
O("h3", null,
|
|
3352
|
+
message: y(() => [
|
|
3353
|
+
O("h3", null, j(f.value), 1)
|
|
3354
3354
|
]),
|
|
3355
3355
|
_: 1
|
|
3356
3356
|
}, 8, ["cta-text"])) : (b(), $("form", {
|
|
3357
3357
|
key: 2,
|
|
3358
3358
|
"data-testid": "form-content",
|
|
3359
3359
|
onReset: Ne(I, ["prevent"]),
|
|
3360
|
-
onSubmit: Ne(
|
|
3360
|
+
onSubmit: Ne(k, ["prevent"])
|
|
3361
3361
|
}, [
|
|
3362
3362
|
Q(v.$slots, "default", {}, void 0, !0),
|
|
3363
|
-
e.errorMessage ? (b(),
|
|
3363
|
+
e.errorMessage ? (b(), R(C, {
|
|
3364
3364
|
key: 0,
|
|
3365
3365
|
"alert-message": e.errorMessage,
|
|
3366
3366
|
appearance: "danger",
|
|
3367
3367
|
"data-testid": "form-error"
|
|
3368
|
-
}, null, 8, ["alert-message"])) :
|
|
3368
|
+
}, null, 8, ["alert-message"])) : H("", !0),
|
|
3369
3369
|
O("div", wl, [
|
|
3370
3370
|
Q(v.$slots, "form-actions", {}, () => [
|
|
3371
|
-
S(
|
|
3371
|
+
S(P, {
|
|
3372
3372
|
appearance: "secondary",
|
|
3373
3373
|
"data-testid": "form-cancel",
|
|
3374
3374
|
disabled: e.isReadonly,
|
|
3375
3375
|
type: "reset"
|
|
3376
3376
|
}, {
|
|
3377
|
-
default:
|
|
3378
|
-
|
|
3377
|
+
default: y(() => [
|
|
3378
|
+
J(j(m(a)("baseForm.actions.cancel")), 1)
|
|
3379
3379
|
]),
|
|
3380
3380
|
_: 1
|
|
3381
3381
|
}, 8, ["disabled"]),
|
|
3382
|
-
S(
|
|
3382
|
+
S(P, {
|
|
3383
3383
|
appearance: "primary",
|
|
3384
3384
|
"data-testid": "form-submit",
|
|
3385
3385
|
disabled: p.value,
|
|
3386
3386
|
type: "submit"
|
|
3387
3387
|
}, {
|
|
3388
|
-
default:
|
|
3389
|
-
|
|
3388
|
+
default: y(() => [
|
|
3389
|
+
J(j(m(a)("baseForm.actions.save")), 1)
|
|
3390
3390
|
]),
|
|
3391
3391
|
_: 1
|
|
3392
3392
|
}, 8, ["disabled"])
|
|
@@ -3414,68 +3414,68 @@ const Zn = {
|
|
|
3414
3414
|
}
|
|
3415
3415
|
},
|
|
3416
3416
|
setup(e) {
|
|
3417
|
-
const i = e, t =
|
|
3418
|
-
var
|
|
3419
|
-
return ((
|
|
3420
|
-
}), r =
|
|
3421
|
-
var
|
|
3422
|
-
return ((
|
|
3423
|
-
}), o =
|
|
3424
|
-
var
|
|
3425
|
-
const
|
|
3426
|
-
return
|
|
3417
|
+
const i = e, t = x(() => {
|
|
3418
|
+
var k;
|
|
3419
|
+
return ((k = i.rowEl) == null ? void 0 : k.querySelector(`[data-testid="${i.keyName}"]`)) || null;
|
|
3420
|
+
}), r = x(() => {
|
|
3421
|
+
var k;
|
|
3422
|
+
return ((k = t.value) == null ? void 0 : k.querySelector('[data-testid="first-col"]')) || null;
|
|
3423
|
+
}), o = x(() => {
|
|
3424
|
+
var k, v;
|
|
3425
|
+
const T = (k = i.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3426
|
+
return T ? ((v = T[0]) == null ? void 0 : v.getAttribute("data-testid")) === i.keyName : !1;
|
|
3427
3427
|
});
|
|
3428
3428
|
let a;
|
|
3429
3429
|
const l = () => {
|
|
3430
3430
|
a && (a.disconnect(), a = void 0);
|
|
3431
3431
|
}, n = () => {
|
|
3432
|
-
var
|
|
3433
|
-
d.value = ((
|
|
3434
|
-
}, c = F({}), d = F(0), f = F(0), p = F(""), _ =
|
|
3432
|
+
var k, v, T;
|
|
3433
|
+
d.value = ((k = r.value) == null ? void 0 : k.getBoundingClientRect().width) || 0, f.value = ((v = t.value) == null ? void 0 : v.clientWidth) || 0, p.value = ((T = c.value) == null ? void 0 : T.innerText) || "";
|
|
3434
|
+
}, c = F({}), d = F(0), f = F(0), p = F(""), _ = x(() => [r.value, t.value]), h = we(
|
|
3435
3435
|
_,
|
|
3436
|
-
(
|
|
3436
|
+
(k) => {
|
|
3437
3437
|
if (o.value && (l(), "ResizeObserver" in window && window)) {
|
|
3438
3438
|
a = new ResizeObserver((v) => {
|
|
3439
3439
|
window.requestAnimationFrame(() => {
|
|
3440
3440
|
!Array.isArray(v) || !v.length || n();
|
|
3441
3441
|
});
|
|
3442
3442
|
});
|
|
3443
|
-
for (const v of
|
|
3443
|
+
for (const v of k)
|
|
3444
3444
|
v && a.observe(v);
|
|
3445
3445
|
}
|
|
3446
3446
|
},
|
|
3447
3447
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3448
|
-
), I =
|
|
3448
|
+
), I = x(() => o.value ? d.value > f.value : !1);
|
|
3449
3449
|
return ti(() => {
|
|
3450
3450
|
n();
|
|
3451
3451
|
}), nr(() => {
|
|
3452
3452
|
h();
|
|
3453
|
-
}), (
|
|
3454
|
-
const
|
|
3453
|
+
}), (k, v) => {
|
|
3454
|
+
const T = L("KTooltip");
|
|
3455
3455
|
return b(), $("span", {
|
|
3456
3456
|
ref_key: "contentRef",
|
|
3457
3457
|
ref: c,
|
|
3458
3458
|
class: "content-wrapper"
|
|
3459
3459
|
}, [
|
|
3460
3460
|
o.value ? (b(), $("span", Sl, [
|
|
3461
|
-
S(
|
|
3461
|
+
S(T, {
|
|
3462
3462
|
label: I.value ? p.value : "",
|
|
3463
3463
|
"max-width": "300",
|
|
3464
3464
|
placement: "bottomStart"
|
|
3465
3465
|
}, {
|
|
3466
|
-
default:
|
|
3467
|
-
Q(
|
|
3466
|
+
default: y(() => [
|
|
3467
|
+
Q(k.$slots, "default", {}, void 0, !0)
|
|
3468
3468
|
]),
|
|
3469
3469
|
_: 3
|
|
3470
3470
|
}, 8, ["label"])
|
|
3471
|
-
])) : Q(
|
|
3471
|
+
])) : Q(k.$slots, "default", { key: 1 }, void 0, !0)
|
|
3472
3472
|
], 512);
|
|
3473
3473
|
};
|
|
3474
3474
|
}
|
|
3475
3475
|
}), Al = /* @__PURE__ */ be(Il, [["__scopeId", "data-v-e42a20c9"]]), xl = { class: "toolbar-container" }, Tl = {
|
|
3476
3476
|
key: 0,
|
|
3477
3477
|
class: "toolbar-button-container"
|
|
3478
|
-
}, $l = ["data-testid"],
|
|
3478
|
+
}, $l = ["data-testid"], Ml = /* @__PURE__ */ oe({
|
|
3479
3479
|
__name: "EntityBaseTable",
|
|
3480
3480
|
props: {
|
|
3481
3481
|
// table header configuration
|
|
@@ -3534,9 +3534,10 @@ const Zn = {
|
|
|
3534
3534
|
},
|
|
3535
3535
|
// error message to show in the error state
|
|
3536
3536
|
// this prop being set (or empty) determines if the KTable is in an error state
|
|
3537
|
+
// please use `TableErrorMessage` since `string` is only for backwards compatibility
|
|
3537
3538
|
errorMessage: {
|
|
3538
|
-
type: String,
|
|
3539
|
-
default:
|
|
3539
|
+
type: [String, Object],
|
|
3540
|
+
default: null
|
|
3540
3541
|
},
|
|
3541
3542
|
disablePaginationPageJump: {
|
|
3542
3543
|
type: Boolean,
|
|
@@ -3584,65 +3585,76 @@ const Zn = {
|
|
|
3584
3585
|
},
|
|
3585
3586
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3586
3587
|
setup(e, { emit: i }) {
|
|
3587
|
-
const t = e, { i18n: { t: r } } =
|
|
3588
|
-
|
|
3589
|
-
return
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3588
|
+
const t = e, { i18n: { t: r } } = ce.useI18n(), o = x(() => {
|
|
3589
|
+
var C, P;
|
|
3590
|
+
return typeof t.errorMessage == "string" ? {
|
|
3591
|
+
hasError: !!t.errorMessage,
|
|
3592
|
+
title: t.errorMessage,
|
|
3593
|
+
message: void 0
|
|
3594
|
+
} : {
|
|
3595
|
+
hasError: !!t.errorMessage,
|
|
3596
|
+
title: (C = t.errorMessage) == null ? void 0 : C.title,
|
|
3597
|
+
message: (P = t.errorMessage) == null ? void 0 : P.message
|
|
3598
|
+
};
|
|
3599
|
+
}), a = x(() => t.cacheIdentifier || t.preferencesStorageKey), l = (C) => C.hasData || !!t.query, n = x(() => {
|
|
3600
|
+
const C = [];
|
|
3601
|
+
return Object.keys(t.tableHeaders).forEach((P) => {
|
|
3602
|
+
const ae = t.tableHeaders[P];
|
|
3603
|
+
C.push({
|
|
3604
|
+
label: ae.label ?? P,
|
|
3605
|
+
key: P,
|
|
3606
|
+
sortable: ae.sortable ?? !1
|
|
3595
3607
|
});
|
|
3596
|
-
}), t.enableEntityActions &&
|
|
3608
|
+
}), t.enableEntityActions && C.push({
|
|
3597
3609
|
key: "actions",
|
|
3598
3610
|
hideLabel: !0
|
|
3599
|
-
}),
|
|
3600
|
-
}),
|
|
3601
|
-
"data-rowid":
|
|
3602
|
-
"data-testid":
|
|
3603
|
-
...t.rowAttributes(
|
|
3604
|
-
}),
|
|
3605
|
-
var
|
|
3606
|
-
return (
|
|
3607
|
-
},
|
|
3608
|
-
const
|
|
3609
|
-
"data-testid":
|
|
3610
|
-
...t.cellAttributes(
|
|
3611
|
+
}), C;
|
|
3612
|
+
}), c = (C) => ({
|
|
3613
|
+
"data-rowid": C.id,
|
|
3614
|
+
"data-testid": C.name,
|
|
3615
|
+
...t.rowAttributes(C)
|
|
3616
|
+
}), d = F({}), f = (C) => {
|
|
3617
|
+
var P;
|
|
3618
|
+
return (P = d.value) == null ? void 0 : P.$el.querySelector(`[data-rowid="${C.id}"]`);
|
|
3619
|
+
}, p = (C) => {
|
|
3620
|
+
const P = {
|
|
3621
|
+
"data-testid": C.headerKey,
|
|
3622
|
+
...t.cellAttributes(C)
|
|
3611
3623
|
};
|
|
3612
|
-
return
|
|
3624
|
+
return C.colIndex === 0 && (P.style = {
|
|
3613
3625
|
maxWidth: "250px",
|
|
3614
3626
|
overflowX: "hidden",
|
|
3615
3627
|
textOverflow: "ellipsis"
|
|
3616
|
-
}),
|
|
3617
|
-
}, p = () => {
|
|
3618
|
-
i("empty-state-cta-clicked"), _();
|
|
3628
|
+
}), P;
|
|
3619
3629
|
}, _ = () => {
|
|
3630
|
+
i("empty-state-cta-clicked"), h();
|
|
3631
|
+
}, h = () => {
|
|
3620
3632
|
i("clear-search-input");
|
|
3621
|
-
},
|
|
3622
|
-
i("click:row",
|
|
3623
|
-
}),
|
|
3624
|
-
i("sort",
|
|
3625
|
-
}, { setTablePreferences:
|
|
3626
|
-
const
|
|
3633
|
+
}, I = x(() => t.disableRowClick ? void 0 : (C, P) => {
|
|
3634
|
+
i("click:row", P);
|
|
3635
|
+
}), k = (C) => {
|
|
3636
|
+
i("sort", C);
|
|
3637
|
+
}, { setTablePreferences: v, getTablePreferences: T } = wr(), s = x(() => {
|
|
3638
|
+
const C = T(t.preferencesStorageKey);
|
|
3627
3639
|
return {
|
|
3628
3640
|
...t.initialFetcherParams,
|
|
3629
|
-
...
|
|
3641
|
+
...C
|
|
3630
3642
|
};
|
|
3631
|
-
}),
|
|
3632
|
-
t.preferencesStorageKey &&
|
|
3643
|
+
}), E = (C) => {
|
|
3644
|
+
t.preferencesStorageKey && v(t.preferencesStorageKey, C);
|
|
3633
3645
|
};
|
|
3634
|
-
return (
|
|
3635
|
-
const
|
|
3636
|
-
return b(),
|
|
3646
|
+
return (C, P) => {
|
|
3647
|
+
const ae = L("KIcon"), Y = L("KButton"), A = L("KDropdown"), q = L("KTable"), U = L("KCard");
|
|
3648
|
+
return b(), R(U, {
|
|
3637
3649
|
class: "kong-ui-entity-base-table",
|
|
3638
3650
|
title: e.title
|
|
3639
3651
|
}, {
|
|
3640
|
-
body:
|
|
3641
|
-
S(
|
|
3652
|
+
body: y(() => [
|
|
3653
|
+
S(q, {
|
|
3642
3654
|
ref_key: "tableRefs",
|
|
3643
|
-
ref:
|
|
3644
|
-
"cache-identifier":
|
|
3645
|
-
"cell-attrs":
|
|
3655
|
+
ref: d,
|
|
3656
|
+
"cache-identifier": a.value,
|
|
3657
|
+
"cell-attrs": p,
|
|
3646
3658
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3647
3659
|
"disable-sorting": e.disableSorting,
|
|
3648
3660
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
@@ -3653,57 +3665,58 @@ const Zn = {
|
|
|
3653
3665
|
"empty-state-message": e.query ? m(r)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3654
3666
|
"empty-state-title": e.query ? m(r)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3655
3667
|
"enable-client-sort": e.enableClientSort,
|
|
3656
|
-
"error-state-
|
|
3668
|
+
"error-state-message": o.value.message,
|
|
3669
|
+
"error-state-title": o.value.title,
|
|
3657
3670
|
fetcher: e.fetcher,
|
|
3658
3671
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3659
|
-
"has-error":
|
|
3660
|
-
headers:
|
|
3672
|
+
"has-error": o.value.hasError,
|
|
3673
|
+
headers: n.value,
|
|
3661
3674
|
"hide-pagination-when-optional": "",
|
|
3662
|
-
"initial-fetcher-params":
|
|
3675
|
+
"initial-fetcher-params": s.value,
|
|
3663
3676
|
"is-loading": e.isLoading,
|
|
3664
3677
|
"pagination-type": e.paginationType,
|
|
3665
|
-
"row-attrs":
|
|
3678
|
+
"row-attrs": c,
|
|
3666
3679
|
"search-input": e.query,
|
|
3667
|
-
onKtableEmptyStateCtaClicked:
|
|
3668
|
-
"onRow:click":
|
|
3669
|
-
onSort:
|
|
3670
|
-
"onUpdate:tablePreferences":
|
|
3680
|
+
onKtableEmptyStateCtaClicked: _,
|
|
3681
|
+
"onRow:click": I.value,
|
|
3682
|
+
onSort: P[0] || (P[0] = (N) => k(N)),
|
|
3683
|
+
"onUpdate:tablePreferences": E
|
|
3671
3684
|
}, xe({
|
|
3672
|
-
toolbar:
|
|
3685
|
+
toolbar: y(({ state: N }) => [
|
|
3673
3686
|
Ge(O("div", xl, [
|
|
3674
|
-
Q(
|
|
3675
|
-
|
|
3676
|
-
Q(
|
|
3677
|
-
])) :
|
|
3687
|
+
Q(C.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3688
|
+
C.$slots["toolbar-button"] ? (b(), $("div", Tl, [
|
|
3689
|
+
Q(C.$slots, "toolbar-button", {}, void 0, !0)
|
|
3690
|
+
])) : H("", !0)
|
|
3678
3691
|
], 512), [
|
|
3679
|
-
[Je,
|
|
3692
|
+
[Je, l(N)]
|
|
3680
3693
|
])
|
|
3681
3694
|
]),
|
|
3682
|
-
actions:
|
|
3695
|
+
actions: y(({ row: N, rowKey: z, rowValue: D }) => [
|
|
3683
3696
|
O("div", {
|
|
3684
3697
|
class: "actions-container",
|
|
3685
|
-
"data-testid":
|
|
3698
|
+
"data-testid": N.name
|
|
3686
3699
|
}, [
|
|
3687
|
-
S(
|
|
3700
|
+
S(A, {
|
|
3688
3701
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3689
3702
|
width: e.dropdownMenuWidth
|
|
3690
3703
|
}, {
|
|
3691
|
-
items:
|
|
3692
|
-
Q(
|
|
3693
|
-
row:
|
|
3694
|
-
rowKey:
|
|
3704
|
+
items: y(() => [
|
|
3705
|
+
Q(C.$slots, "actions", {
|
|
3706
|
+
row: N,
|
|
3707
|
+
rowKey: z,
|
|
3695
3708
|
rowValue: D
|
|
3696
3709
|
}, void 0, !0)
|
|
3697
3710
|
]),
|
|
3698
|
-
default:
|
|
3699
|
-
S(
|
|
3711
|
+
default: y(() => [
|
|
3712
|
+
S(Y, {
|
|
3700
3713
|
class: "actions-trigger",
|
|
3701
3714
|
"data-testid": "overflow-actions-button",
|
|
3702
3715
|
size: "small"
|
|
3703
3716
|
}, {
|
|
3704
|
-
icon:
|
|
3705
|
-
S(
|
|
3706
|
-
color: m(
|
|
3717
|
+
icon: y(() => [
|
|
3718
|
+
S(ae, {
|
|
3719
|
+
color: m(go),
|
|
3707
3720
|
icon: "more",
|
|
3708
3721
|
size: "16"
|
|
3709
3722
|
}, null, 8, ["color"])
|
|
@@ -3717,33 +3730,33 @@ const Zn = {
|
|
|
3717
3730
|
]),
|
|
3718
3731
|
_: 2
|
|
3719
3732
|
}, [
|
|
3720
|
-
ve(e.tableHeaders, (
|
|
3721
|
-
name:
|
|
3722
|
-
fn:
|
|
3733
|
+
ve(e.tableHeaders, (N, z) => ({
|
|
3734
|
+
name: z,
|
|
3735
|
+
fn: y(({ row: D, rowKey: X, rowValue: G }) => [
|
|
3723
3736
|
S(Al, {
|
|
3724
|
-
"key-name": String(
|
|
3725
|
-
"row-el":
|
|
3737
|
+
"key-name": String(z),
|
|
3738
|
+
"row-el": f(D)
|
|
3726
3739
|
}, {
|
|
3727
|
-
default:
|
|
3728
|
-
Q(
|
|
3740
|
+
default: y(() => [
|
|
3741
|
+
Q(C.$slots, z, {
|
|
3729
3742
|
row: D,
|
|
3730
|
-
rowKey:
|
|
3731
|
-
rowValue:
|
|
3743
|
+
rowKey: X,
|
|
3744
|
+
rowValue: G
|
|
3732
3745
|
}, () => [
|
|
3733
|
-
|
|
3746
|
+
J(j(G), 1)
|
|
3734
3747
|
], !0)
|
|
3735
3748
|
]),
|
|
3736
3749
|
_: 2
|
|
3737
3750
|
}, 1032, ["key-name", "row-el"])
|
|
3738
3751
|
])
|
|
3739
3752
|
}))
|
|
3740
|
-
]), 1032, ["cache-identifier", "disable-pagination-page-jump", "disable-sorting", "empty-state-action-button-icon", "empty-state-action-message", "empty-state-action-route", "empty-state-icon", "empty-state-message", "empty-state-title", "enable-client-sort", "error-state-title", "fetcher", "fetcher-cache-key", "has-error", "headers", "initial-fetcher-params", "is-loading", "pagination-type", "search-input", "onRow:click"])
|
|
3753
|
+
]), 1032, ["cache-identifier", "disable-pagination-page-jump", "disable-sorting", "empty-state-action-button-icon", "empty-state-action-message", "empty-state-action-route", "empty-state-icon", "empty-state-message", "empty-state-title", "enable-client-sort", "error-state-message", "error-state-title", "fetcher", "fetcher-cache-key", "has-error", "headers", "initial-fetcher-params", "is-loading", "pagination-type", "search-input", "onRow:click"])
|
|
3741
3754
|
]),
|
|
3742
3755
|
_: 3
|
|
3743
3756
|
}, 8, ["title"]);
|
|
3744
3757
|
};
|
|
3745
3758
|
}
|
|
3746
|
-
}), El = /* @__PURE__ */ be(
|
|
3759
|
+
}), El = /* @__PURE__ */ be(Ml, [["__scopeId", "data-v-499a771c"]]), jl = {
|
|
3747
3760
|
key: 0,
|
|
3748
3761
|
class: "kong-ui-entity-delete-error"
|
|
3749
3762
|
}, Vl = {
|
|
@@ -3788,14 +3801,14 @@ const Zn = {
|
|
|
3788
3801
|
},
|
|
3789
3802
|
emits: ["cancel", "proceed"],
|
|
3790
3803
|
setup(e, { emit: i }) {
|
|
3791
|
-
const t = e, { i18nT: r } =
|
|
3804
|
+
const t = e, { i18nT: r } = ce.useI18n(), o = x(() => t.needConfirm ? t.entityName : ""), a = () => {
|
|
3792
3805
|
i("cancel");
|
|
3793
3806
|
}, l = () => {
|
|
3794
3807
|
i("proceed");
|
|
3795
3808
|
};
|
|
3796
3809
|
return (n, c) => {
|
|
3797
|
-
const d =
|
|
3798
|
-
return b(),
|
|
3810
|
+
const d = L("KAlert"), f = L("KPrompt");
|
|
3811
|
+
return b(), R(f, {
|
|
3799
3812
|
"action-button-text": "Yes, delete",
|
|
3800
3813
|
"action-pending": e.actionPending,
|
|
3801
3814
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3806,38 +3819,38 @@ const Zn = {
|
|
|
3806
3819
|
onCanceled: a,
|
|
3807
3820
|
onProceed: l
|
|
3808
3821
|
}, {
|
|
3809
|
-
"body-content":
|
|
3810
|
-
e.error ? (b(), $("div",
|
|
3822
|
+
"body-content": y(() => [
|
|
3823
|
+
e.error ? (b(), $("div", jl, [
|
|
3811
3824
|
S(d, { appearance: "danger" }, {
|
|
3812
|
-
alertMessage:
|
|
3813
|
-
|
|
3825
|
+
alertMessage: y(() => [
|
|
3826
|
+
J(j(e.error), 1)
|
|
3814
3827
|
]),
|
|
3815
3828
|
_: 1
|
|
3816
3829
|
})
|
|
3817
|
-
])) :
|
|
3830
|
+
])) : H("", !0),
|
|
3818
3831
|
S(m(r), {
|
|
3819
3832
|
class: "message",
|
|
3820
3833
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3821
3834
|
tag: "p"
|
|
3822
3835
|
}, xe({
|
|
3823
|
-
entityType:
|
|
3824
|
-
|
|
3836
|
+
entityType: y(() => [
|
|
3837
|
+
J(j(t.entityType), 1)
|
|
3825
3838
|
]),
|
|
3826
3839
|
_: 2
|
|
3827
3840
|
}, [
|
|
3828
3841
|
t.entityName ? {
|
|
3829
3842
|
name: "entityName",
|
|
3830
|
-
fn:
|
|
3831
|
-
O("strong", null,
|
|
3843
|
+
fn: y(() => [
|
|
3844
|
+
O("strong", null, j(t.entityName), 1)
|
|
3832
3845
|
]),
|
|
3833
3846
|
key: "0"
|
|
3834
3847
|
} : void 0
|
|
3835
3848
|
]), 1032, ["keypath"]),
|
|
3836
3849
|
t.description || n.$slots.description ? (b(), $("div", Vl, [
|
|
3837
3850
|
Q(n.$slots, "description", {}, () => [
|
|
3838
|
-
O("p", null,
|
|
3851
|
+
O("p", null, j(t.description), 1)
|
|
3839
3852
|
], !0)
|
|
3840
|
-
])) :
|
|
3853
|
+
])) : H("", !0)
|
|
3841
3854
|
]),
|
|
3842
3855
|
_: 3
|
|
3843
3856
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
@@ -3857,7 +3870,7 @@ const Zn = {
|
|
|
3857
3870
|
width: "20",
|
|
3858
3871
|
x: "0",
|
|
3859
3872
|
y: "0"
|
|
3860
|
-
},
|
|
3873
|
+
}, Ll = ["fill"], ql = { mask: "url(#mask0_180_20349)" }, Bl = ["fill"], Xt = /* @__PURE__ */ oe({
|
|
3861
3874
|
__name: "IconFilter",
|
|
3862
3875
|
props: {
|
|
3863
3876
|
color: {
|
|
@@ -3872,9 +3885,9 @@ const Zn = {
|
|
|
3872
3885
|
fill: e.color,
|
|
3873
3886
|
height: "20",
|
|
3874
3887
|
width: "20"
|
|
3875
|
-
}, null, 8,
|
|
3888
|
+
}, null, 8, Ll)
|
|
3876
3889
|
]),
|
|
3877
|
-
O("g",
|
|
3890
|
+
O("g", ql, [
|
|
3878
3891
|
O("path", {
|
|
3879
3892
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3880
3893
|
fill: e.color
|
|
@@ -3882,10 +3895,10 @@ const Zn = {
|
|
|
3882
3895
|
])
|
|
3883
3896
|
]));
|
|
3884
3897
|
}
|
|
3885
|
-
}),
|
|
3898
|
+
}), Pl = {
|
|
3886
3899
|
key: 1,
|
|
3887
3900
|
class: "kong-ui-entity-filter"
|
|
3888
|
-
},
|
|
3901
|
+
}, Ul = { class: "menu-item-title" }, Rl = { class: "menu-item-indicator" }, Dl = { class: "menu-item-body" }, Hl = ["for"], zl = { class: "menu-item-buttons" }, Gl = { class: "filter-clear-button-container" }, Jl = /* @__PURE__ */ oe({
|
|
3889
3902
|
__name: "EntityFilter",
|
|
3890
3903
|
props: {
|
|
3891
3904
|
// filter config, either exact match or fuzzy match
|
|
@@ -3905,21 +3918,21 @@ const Zn = {
|
|
|
3905
3918
|
},
|
|
3906
3919
|
emits: ["update:modelValue"],
|
|
3907
3920
|
setup(e, { emit: i }) {
|
|
3908
|
-
const t = e, { i18n: { t: r } } =
|
|
3921
|
+
const t = e, { i18n: { t: r } } = ce.useI18n(), o = F(!1), a = F({}), l = x(() => {
|
|
3909
3922
|
const v = [];
|
|
3910
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
3911
|
-
|
|
3923
|
+
return new URLSearchParams(t.modelValue).forEach((T, s) => {
|
|
3924
|
+
T !== "" && v.push(s);
|
|
3912
3925
|
}), v;
|
|
3913
|
-
}), n =
|
|
3926
|
+
}), n = x(() => {
|
|
3914
3927
|
const v = t.config.fields;
|
|
3915
|
-
return Object.keys(v).filter((
|
|
3916
|
-
label: v[
|
|
3917
|
-
value:
|
|
3928
|
+
return Object.keys(v).filter((T) => v[T].searchable).map((T) => ({
|
|
3929
|
+
label: v[T].label || T,
|
|
3930
|
+
value: T
|
|
3918
3931
|
}));
|
|
3919
3932
|
});
|
|
3920
3933
|
we(() => t.modelValue, (v) => {
|
|
3921
|
-
a.value = {}, new URLSearchParams(v).forEach((
|
|
3922
|
-
a.value[s] =
|
|
3934
|
+
a.value = {}, new URLSearchParams(v).forEach((T, s) => {
|
|
3935
|
+
a.value[s] = T;
|
|
3923
3936
|
});
|
|
3924
3937
|
});
|
|
3925
3938
|
const c = () => {
|
|
@@ -3927,28 +3940,28 @@ const Zn = {
|
|
|
3927
3940
|
}, d = (v) => {
|
|
3928
3941
|
i("update:modelValue", v);
|
|
3929
3942
|
}, f = (v) => `filter-${v}`, p = (v) => {
|
|
3930
|
-
var
|
|
3931
|
-
return (((s = (
|
|
3932
|
-
value:
|
|
3933
|
-
label:
|
|
3943
|
+
var T, s;
|
|
3944
|
+
return (((s = (T = t.config.schema) == null ? void 0 : T[v]) == null ? void 0 : s.values) ?? []).map((E) => ({
|
|
3945
|
+
value: E,
|
|
3946
|
+
label: E
|
|
3934
3947
|
}));
|
|
3935
3948
|
}, _ = (v) => {
|
|
3936
|
-
var
|
|
3937
|
-
return ((s = (
|
|
3949
|
+
var T, s;
|
|
3950
|
+
return ((s = (T = t.config.schema) == null ? void 0 : T[v]) == null ? void 0 : s.type) ?? "text";
|
|
3938
3951
|
}, h = (v) => {
|
|
3939
3952
|
a.value = {
|
|
3940
3953
|
...a.value,
|
|
3941
3954
|
[v]: ""
|
|
3942
|
-
},
|
|
3955
|
+
}, k();
|
|
3943
3956
|
}, I = () => {
|
|
3944
|
-
a.value = {},
|
|
3945
|
-
},
|
|
3946
|
-
const
|
|
3947
|
-
v && (o.value = !1), i("update:modelValue", new URLSearchParams(
|
|
3957
|
+
a.value = {}, k(!0);
|
|
3958
|
+
}, k = (v = !1) => {
|
|
3959
|
+
const T = Object.keys(a.value).reduce((s, E) => (a.value[E] && (s[E] = `${a.value[E]}`), s), {});
|
|
3960
|
+
v && (o.value = !1), i("update:modelValue", new URLSearchParams(T).toString());
|
|
3948
3961
|
};
|
|
3949
|
-
return (v,
|
|
3950
|
-
const s =
|
|
3951
|
-
return e.config.isExactMatch ? (b(),
|
|
3962
|
+
return (v, T) => {
|
|
3963
|
+
const s = L("KInput"), E = L("KButton"), C = L("KSelect"), P = L("KMenuItem"), ae = L("KMenu");
|
|
3964
|
+
return e.config.isExactMatch ? (b(), R(s, {
|
|
3952
3965
|
key: 0,
|
|
3953
3966
|
autocomplete: "off",
|
|
3954
3967
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3957,19 +3970,19 @@ const Zn = {
|
|
|
3957
3970
|
placeholder: e.config.placeholder,
|
|
3958
3971
|
"onUpdate:modelValue": d
|
|
3959
3972
|
}, {
|
|
3960
|
-
before:
|
|
3961
|
-
S(
|
|
3973
|
+
before: y(() => [
|
|
3974
|
+
S(Xt)
|
|
3962
3975
|
]),
|
|
3963
3976
|
_: 1
|
|
3964
|
-
}, 8, ["model-value", "placeholder"])) : (b(), $("div",
|
|
3965
|
-
S(
|
|
3977
|
+
}, 8, ["model-value", "placeholder"])) : (b(), $("div", Pl, [
|
|
3978
|
+
S(E, {
|
|
3966
3979
|
appearance: "tertiary",
|
|
3967
3980
|
"data-testid": "filter-button",
|
|
3968
3981
|
onClick: c
|
|
3969
3982
|
}, {
|
|
3970
|
-
default:
|
|
3971
|
-
S(
|
|
3972
|
-
|
|
3983
|
+
default: y(() => [
|
|
3984
|
+
S(Xt),
|
|
3985
|
+
J(" " + j(m(r)("filter.filterButtonText")) + " " + j(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
3973
3986
|
]),
|
|
3974
3987
|
_: 1
|
|
3975
3988
|
}),
|
|
@@ -3979,68 +3992,68 @@ const Zn = {
|
|
|
3979
3992
|
}, null, 512), [
|
|
3980
3993
|
[Je, o.value]
|
|
3981
3994
|
]),
|
|
3982
|
-
Ge(S(
|
|
3983
|
-
body:
|
|
3984
|
-
(b(!0), $(he, null, ve(n.value, (Y, A) => (b(),
|
|
3995
|
+
Ge(S(ae, { class: "kong-ui-entity-filter-menu" }, {
|
|
3996
|
+
body: y(() => [
|
|
3997
|
+
(b(!0), $(he, null, ve(n.value, (Y, A) => (b(), R(P, {
|
|
3985
3998
|
key: Y.value,
|
|
3986
3999
|
"data-testid": Y.value,
|
|
3987
4000
|
expandable: "",
|
|
3988
4001
|
"last-menu-item": A === n.value.length - 1
|
|
3989
4002
|
}, {
|
|
3990
|
-
itemTitle:
|
|
3991
|
-
O("span",
|
|
3992
|
-
|
|
4003
|
+
itemTitle: y(() => [
|
|
4004
|
+
O("span", Ul, [
|
|
4005
|
+
J(j(Y.label) + " ", 1),
|
|
3993
4006
|
Ge(O("span", Rl, null, 512), [
|
|
3994
4007
|
[Je, l.value.includes(Y.value)]
|
|
3995
4008
|
])
|
|
3996
4009
|
])
|
|
3997
4010
|
]),
|
|
3998
|
-
itemBody:
|
|
3999
|
-
var
|
|
4011
|
+
itemBody: y(() => {
|
|
4012
|
+
var q, U;
|
|
4000
4013
|
return [
|
|
4001
4014
|
O("div", Dl, [
|
|
4002
4015
|
O("label", {
|
|
4003
4016
|
class: "menu-item-label",
|
|
4004
4017
|
for: f(Y.value)
|
|
4005
|
-
},
|
|
4006
|
-
((
|
|
4018
|
+
}, j(m(r)("filter.fieldLabel")), 9, Hl),
|
|
4019
|
+
((U = (q = e.config.schema) == null ? void 0 : q[Y.value]) == null ? void 0 : U.type) === "select" ? (b(), R(C, {
|
|
4007
4020
|
key: 0,
|
|
4008
4021
|
id: f(Y.value),
|
|
4009
4022
|
modelValue: a.value[Y.value],
|
|
4010
|
-
"onUpdate:modelValue": (
|
|
4023
|
+
"onUpdate:modelValue": (N) => a.value[Y.value] = N,
|
|
4011
4024
|
appearance: "select",
|
|
4012
4025
|
items: p(Y.value),
|
|
4013
4026
|
placeholder: m(r)("filter.selectPlaceholder")
|
|
4014
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (b(),
|
|
4027
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (b(), R(s, {
|
|
4015
4028
|
key: 1,
|
|
4016
4029
|
id: f(Y.value),
|
|
4017
4030
|
modelValue: a.value[Y.value],
|
|
4018
|
-
"onUpdate:modelValue": (
|
|
4031
|
+
"onUpdate:modelValue": (N) => a.value[Y.value] = N,
|
|
4019
4032
|
autocomplete: "off",
|
|
4020
4033
|
placeholder: m(r)("filter.inputPlaceholder"),
|
|
4021
4034
|
type: _(Y.value)
|
|
4022
4035
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4023
4036
|
]),
|
|
4024
|
-
O("div",
|
|
4025
|
-
S(
|
|
4037
|
+
O("div", zl, [
|
|
4038
|
+
S(E, {
|
|
4026
4039
|
appearance: "tertiary",
|
|
4027
4040
|
"data-testid": "apply-filter",
|
|
4028
4041
|
size: "small",
|
|
4029
|
-
onClick:
|
|
4042
|
+
onClick: T[0] || (T[0] = (N) => k(!0))
|
|
4030
4043
|
}, {
|
|
4031
|
-
default:
|
|
4032
|
-
|
|
4044
|
+
default: y(() => [
|
|
4045
|
+
J(j(m(r)("filter.applyButtonText")), 1)
|
|
4033
4046
|
]),
|
|
4034
4047
|
_: 1
|
|
4035
4048
|
}),
|
|
4036
|
-
S(
|
|
4049
|
+
S(E, {
|
|
4037
4050
|
appearance: "tertiary",
|
|
4038
4051
|
"data-testid": "clear-filter",
|
|
4039
4052
|
size: "small",
|
|
4040
|
-
onClick: (
|
|
4053
|
+
onClick: (N) => h(Y.value)
|
|
4041
4054
|
}, {
|
|
4042
|
-
default:
|
|
4043
|
-
|
|
4055
|
+
default: y(() => [
|
|
4056
|
+
J(j(m(r)("filter.clearButtonText")), 1)
|
|
4044
4057
|
]),
|
|
4045
4058
|
_: 2
|
|
4046
4059
|
}, 1032, ["onClick"])
|
|
@@ -4050,14 +4063,14 @@ const Zn = {
|
|
|
4050
4063
|
_: 2
|
|
4051
4064
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
4052
4065
|
]),
|
|
4053
|
-
actionButton:
|
|
4066
|
+
actionButton: y(() => [
|
|
4054
4067
|
O("div", Gl, [
|
|
4055
|
-
S(
|
|
4068
|
+
S(E, {
|
|
4056
4069
|
size: "small",
|
|
4057
4070
|
onClick: I
|
|
4058
4071
|
}, {
|
|
4059
|
-
default:
|
|
4060
|
-
|
|
4072
|
+
default: y(() => [
|
|
4073
|
+
J(j(m(r)("filter.clearAllButtonText")), 1)
|
|
4061
4074
|
]),
|
|
4062
4075
|
_: 1
|
|
4063
4076
|
})
|
|
@@ -4102,9 +4115,9 @@ const Zn = {
|
|
|
4102
4115
|
},
|
|
4103
4116
|
emits: ["canceled", "proceed"],
|
|
4104
4117
|
setup(e, { emit: i }) {
|
|
4105
|
-
const t = e, { i18n: { t: r }, i18nT: o } =
|
|
4118
|
+
const t = e, { i18n: { t: r }, i18nT: o } = ce.useI18n(), a = F(!1), l = x(
|
|
4106
4119
|
() => t.action === "enable" ? r("toggleModal.enable.title", { entityType: t.entityType }) : r("toggleModal.disable.title", { entityType: t.entityType })
|
|
4107
|
-
), n =
|
|
4120
|
+
), n = x(
|
|
4108
4121
|
() => t.action === "enable" ? r("toggleModal.enable.confirmText") : r("toggleModal.disable.confirmText")
|
|
4109
4122
|
), c = () => i("canceled"), d = async () => {
|
|
4110
4123
|
if (t.onConfirm) {
|
|
@@ -4119,8 +4132,8 @@ const Zn = {
|
|
|
4119
4132
|
}
|
|
4120
4133
|
};
|
|
4121
4134
|
return (f, p) => {
|
|
4122
|
-
const _ =
|
|
4123
|
-
return b(),
|
|
4135
|
+
const _ = L("KPrompt");
|
|
4136
|
+
return b(), R(ir, { to: "body" }, [
|
|
4124
4137
|
S(_, {
|
|
4125
4138
|
"action-button-text": n.value,
|
|
4126
4139
|
"action-pending": a.value,
|
|
@@ -4131,16 +4144,16 @@ const Zn = {
|
|
|
4131
4144
|
onCanceled: c,
|
|
4132
4145
|
onProceed: d
|
|
4133
4146
|
}, {
|
|
4134
|
-
"body-content":
|
|
4147
|
+
"body-content": y(() => [
|
|
4135
4148
|
S(m(o), {
|
|
4136
4149
|
keypath: `toggleModal.${t.action}.message`,
|
|
4137
4150
|
scope: "global"
|
|
4138
4151
|
}, {
|
|
4139
|
-
entityType:
|
|
4140
|
-
|
|
4152
|
+
entityType: y(() => [
|
|
4153
|
+
J(j(e.entityType), 1)
|
|
4141
4154
|
]),
|
|
4142
|
-
entityName:
|
|
4143
|
-
O("strong", null,
|
|
4155
|
+
entityName: y(() => [
|
|
4156
|
+
O("strong", null, j(e.entityName), 1)
|
|
4144
4157
|
]),
|
|
4145
4158
|
_: 1
|
|
4146
4159
|
}, 8, ["keypath"])
|
|
@@ -4150,7 +4163,7 @@ const Zn = {
|
|
|
4150
4163
|
]);
|
|
4151
4164
|
};
|
|
4152
4165
|
}
|
|
4153
|
-
}),
|
|
4166
|
+
}), qe = /* @__PURE__ */ oe({
|
|
4154
4167
|
__name: "PermissionsWrapper",
|
|
4155
4168
|
props: {
|
|
4156
4169
|
/**
|
|
@@ -4172,18 +4185,18 @@ const Zn = {
|
|
|
4172
4185
|
}
|
|
4173
4186
|
},
|
|
4174
4187
|
setup(e) {
|
|
4175
|
-
const i = e, t = F(void 0), r =
|
|
4188
|
+
const i = e, t = F(void 0), r = x(() => t.value === !0 || t.value !== void 0 && i.forceShow === !0);
|
|
4176
4189
|
return we(() => i.authFunction, async () => {
|
|
4177
4190
|
t.value = await i.authFunction();
|
|
4178
4191
|
}, { immediate: !0 }), (o, a) => r.value ? Q(o.$slots, "default", {
|
|
4179
4192
|
key: 0,
|
|
4180
4193
|
isAllowed: t.value
|
|
4181
|
-
}) :
|
|
4194
|
+
}) : H("", !0);
|
|
4182
4195
|
}
|
|
4183
|
-
}), Zl = { class: "form-section-wrapper" },
|
|
4196
|
+
}), Zl = { class: "form-section-wrapper" }, Ql = {
|
|
4184
4197
|
key: 0,
|
|
4185
4198
|
class: "form-section-title"
|
|
4186
|
-
},
|
|
4199
|
+
}, Xl = {
|
|
4187
4200
|
key: 1,
|
|
4188
4201
|
class: "form-section-description"
|
|
4189
4202
|
}, es = {
|
|
@@ -4219,19 +4232,19 @@ const Zn = {
|
|
|
4219
4232
|
class: $e(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4220
4233
|
}, [
|
|
4221
4234
|
O("div", Zl, [
|
|
4222
|
-
e.hideInfoHeader ?
|
|
4235
|
+
e.hideInfoHeader ? H("", !0) : (b(), $("div", {
|
|
4223
4236
|
key: 0,
|
|
4224
4237
|
class: $e(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4225
4238
|
}, [
|
|
4226
|
-
e.title ? (b(), $("h4",
|
|
4227
|
-
e.description || m(i).description ? (b(), $("div",
|
|
4239
|
+
e.title ? (b(), $("h4", Ql, j(e.title), 1)) : H("", !0),
|
|
4240
|
+
e.description || m(i).description ? (b(), $("div", Xl, [
|
|
4228
4241
|
Q(t.$slots, "description", {}, () => [
|
|
4229
|
-
O("p", null,
|
|
4242
|
+
O("p", null, j(e.description), 1)
|
|
4230
4243
|
], !0)
|
|
4231
|
-
])) :
|
|
4244
|
+
])) : H("", !0),
|
|
4232
4245
|
m(i).footer ? (b(), $("div", es, [
|
|
4233
4246
|
Q(t.$slots, "footer", {}, void 0, !0)
|
|
4234
|
-
])) :
|
|
4247
|
+
])) : H("", !0)
|
|
4235
4248
|
], 2)),
|
|
4236
4249
|
O("div", ts, [
|
|
4237
4250
|
Q(t.$slots, "default", {}, void 0, !0)
|
|
@@ -4239,7 +4252,7 @@ const Zn = {
|
|
|
4239
4252
|
])
|
|
4240
4253
|
], 2));
|
|
4241
4254
|
}
|
|
4242
|
-
}), ei = /* @__PURE__ */ be(is, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: er, useDeleteUrlBuilder: rs, useErrors: os, useExternalLinkCreator: Fs, useFetchUrlBuilder: Ns, useFetcher: as, useDebouncedFilter: Ks, useStringHelpers:
|
|
4255
|
+
}), ei = /* @__PURE__ */ be(is, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: er, useDeleteUrlBuilder: rs, useErrors: os, useExternalLinkCreator: Fs, useFetchUrlBuilder: Ns, useFetcher: as, useDebouncedFilter: Ks, useStringHelpers: Ls, useHelpers: ns, useGatewayFeatureSupported: ls, useTruncationDetector: qs } = ce;
|
|
4243
4256
|
const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 }, us = /* @__PURE__ */ oe({
|
|
4244
4257
|
__name: "GatewayServiceList",
|
|
4245
4258
|
props: {
|
|
@@ -4284,7 +4297,7 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4284
4297
|
var Ee;
|
|
4285
4298
|
const t = e, { i18n: { t: r } } = We.useI18n(), o = vt(), { axiosInstance: a } = er({
|
|
4286
4299
|
headers: (Ee = t.config) == null ? void 0 : Ee.requestHeaders
|
|
4287
|
-
}), l = F(1), n =
|
|
4300
|
+
}), l = F(1), n = x(() => t.config.app !== "kongManager" || !!t.config.disableSorting), c = {
|
|
4288
4301
|
name: { label: r("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
4289
4302
|
protocol: { label: r("gateway_services.list.table_headers.protocol"), searchable: !0, sortable: !0 },
|
|
4290
4303
|
host: { label: r("gateway_services.list.table_headers.host"), searchable: !0, sortable: !0 },
|
|
@@ -4292,131 +4305,134 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4292
4305
|
path: { label: r("gateway_services.list.table_headers.path"), searchable: !0, sortable: !0 },
|
|
4293
4306
|
enabled: { label: r("gateway_services.list.table_headers.enabled"), searchable: !0, sortable: !0 },
|
|
4294
4307
|
tags: { label: r("gateway_services.list.table_headers.tags"), sortable: !1 }
|
|
4295
|
-
}, d = c, f =
|
|
4296
|
-
var u,
|
|
4297
|
-
let
|
|
4298
|
-
return t.config.app === "konnect" ?
|
|
4299
|
-
}), p =
|
|
4300
|
-
const
|
|
4301
|
-
if (
|
|
4308
|
+
}, d = c, f = x(() => {
|
|
4309
|
+
var u, g;
|
|
4310
|
+
let K = `${t.config.apiBaseUrl}${Pe.list[t.config.app].all}`;
|
|
4311
|
+
return t.config.app === "konnect" ? K = K.replace(/{controlPlaneId}/gi, ((u = t.config) == null ? void 0 : u.controlPlaneId) || "") : t.config.app === "kongManager" && (K = K.replace(/\/{workspace}/gi, (g = t.config) != null && g.workspace ? `/${t.config.workspace}` : "")), K;
|
|
4312
|
+
}), p = x(() => t.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${f.value}`) : new URL(f.value)), _ = F(""), h = x(() => {
|
|
4313
|
+
const K = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4314
|
+
if (K)
|
|
4302
4315
|
return {
|
|
4303
|
-
isExactMatch:
|
|
4316
|
+
isExactMatch: K,
|
|
4304
4317
|
placeholder: r("search.placeholder")
|
|
4305
4318
|
};
|
|
4306
|
-
const { name: u, enabled:
|
|
4319
|
+
const { name: u, enabled: g, protocol: B, host: ne, port: re, path: ue } = c;
|
|
4307
4320
|
return {
|
|
4308
|
-
isExactMatch:
|
|
4309
|
-
fields: { name: u, enabled:
|
|
4321
|
+
isExactMatch: K,
|
|
4322
|
+
fields: { name: u, enabled: g, protocol: B, host: ne, port: re, path: ue },
|
|
4310
4323
|
schema: t.config.filterSchema
|
|
4311
4324
|
};
|
|
4312
|
-
}), { fetcher: I, fetcherState:
|
|
4325
|
+
}), { fetcher: I, fetcherState: k } = as(t.config, f.value), v = () => {
|
|
4313
4326
|
_.value = "";
|
|
4314
|
-
},
|
|
4327
|
+
}, T = () => {
|
|
4315
4328
|
l.value++;
|
|
4316
|
-
}, s = F(
|
|
4329
|
+
}, s = F(null), E = x(() => ({
|
|
4317
4330
|
ctaPath: t.config.createRoute,
|
|
4318
4331
|
ctaText: Ce.value ? r("actions.create") : void 0,
|
|
4319
4332
|
message: r("gateway_services.list.empty_state.description"),
|
|
4320
4333
|
title: Ce.value ? r("gateway_services.list.empty_state.title") : ""
|
|
4321
|
-
})),
|
|
4322
|
-
const
|
|
4334
|
+
})), C = F(!1), P = F(null), ae = x(() => {
|
|
4335
|
+
const K = {
|
|
4323
4336
|
action: "disable",
|
|
4324
4337
|
id: "",
|
|
4325
4338
|
name: ""
|
|
4326
4339
|
};
|
|
4327
|
-
if (
|
|
4328
|
-
const { enabled: u, id:
|
|
4329
|
-
|
|
4340
|
+
if (P.value) {
|
|
4341
|
+
const { enabled: u, id: g, name: B } = P.value;
|
|
4342
|
+
K.action = u ? "disable" : "enable", K.id = g, K.name = B || g;
|
|
4330
4343
|
}
|
|
4331
|
-
return
|
|
4332
|
-
}), Y = (
|
|
4333
|
-
|
|
4344
|
+
return K;
|
|
4345
|
+
}), Y = (K) => {
|
|
4346
|
+
C.value = !0, P.value = K;
|
|
4334
4347
|
}, A = () => {
|
|
4335
|
-
|
|
4336
|
-
},
|
|
4337
|
-
var
|
|
4338
|
-
if (!await ((
|
|
4348
|
+
C.value = !1, P.value = null;
|
|
4349
|
+
}, q = async () => {
|
|
4350
|
+
var B, ne;
|
|
4351
|
+
if (!await ((B = t.canEdit) == null ? void 0 : B.call(t, P.value)) || !P.value)
|
|
4339
4352
|
return;
|
|
4340
|
-
const u = `${p.value.href}/${
|
|
4353
|
+
const u = `${p.value.href}/${P.value.id}`, g = !P.value.enabled;
|
|
4341
4354
|
try {
|
|
4342
|
-
const { data: re } = ((
|
|
4355
|
+
const { data: re } = ((ne = t.config) == null ? void 0 : ne.app) === "konnect" ? await a.put(u, { ...P.value, enabled: g }) : await a.patch(u, { ...P.value, enabled: g });
|
|
4343
4356
|
i("toggle:success", re);
|
|
4344
4357
|
} catch (re) {
|
|
4345
4358
|
i("error", re);
|
|
4346
4359
|
}
|
|
4347
|
-
|
|
4348
|
-
},
|
|
4349
|
-
const
|
|
4350
|
-
if (!u(
|
|
4360
|
+
P.value.enabled = g;
|
|
4361
|
+
}, U = (K, u) => {
|
|
4362
|
+
const g = K.id;
|
|
4363
|
+
if (!u(g)) {
|
|
4351
4364
|
i("copy:error", {
|
|
4352
|
-
entity:
|
|
4365
|
+
entity: K,
|
|
4353
4366
|
field: "id",
|
|
4354
4367
|
message: r("errors.copy")
|
|
4355
4368
|
});
|
|
4356
4369
|
return;
|
|
4357
4370
|
}
|
|
4358
4371
|
i("copy:success", {
|
|
4359
|
-
entity:
|
|
4372
|
+
entity: K,
|
|
4360
4373
|
field: "id",
|
|
4361
|
-
message: r("copy.success", { val:
|
|
4374
|
+
message: r("copy.success", { val: g })
|
|
4362
4375
|
});
|
|
4363
|
-
},
|
|
4364
|
-
const
|
|
4365
|
-
if (!u(
|
|
4376
|
+
}, N = (K, u) => {
|
|
4377
|
+
const g = JSON.stringify(K);
|
|
4378
|
+
if (!u(g)) {
|
|
4366
4379
|
i("copy:error", {
|
|
4367
|
-
entity:
|
|
4380
|
+
entity: K,
|
|
4368
4381
|
message: r("errors.copy")
|
|
4369
4382
|
});
|
|
4370
4383
|
return;
|
|
4371
4384
|
}
|
|
4372
4385
|
i("copy:success", {
|
|
4373
|
-
entity:
|
|
4386
|
+
entity: K,
|
|
4374
4387
|
message: r("copy.success_brief")
|
|
4375
4388
|
});
|
|
4376
|
-
},
|
|
4377
|
-
var
|
|
4378
|
-
await ((
|
|
4379
|
-
},
|
|
4389
|
+
}, z = async (K) => {
|
|
4390
|
+
var g;
|
|
4391
|
+
await ((g = t.canRetrieve) == null ? void 0 : g.call(t, K)) && o.push(t.config.getViewRoute(K.id));
|
|
4392
|
+
}, D = (K) => ({
|
|
4380
4393
|
label: r("actions.view"),
|
|
4381
|
-
to: t.config.getViewRoute(
|
|
4382
|
-
}),
|
|
4394
|
+
to: t.config.getViewRoute(K)
|
|
4395
|
+
}), X = (K) => ({
|
|
4383
4396
|
label: r("actions.edit"),
|
|
4384
|
-
to: t.config.getEditRoute(
|
|
4385
|
-
}),
|
|
4386
|
-
|
|
4387
|
-
},
|
|
4388
|
-
ie.value = !1,
|
|
4397
|
+
to: t.config.getEditRoute(K)
|
|
4398
|
+
}), G = F(void 0), ie = F(!1), Z = F(!1), ee = F(""), de = rs(t.config, f.value), rt = (K) => {
|
|
4399
|
+
G.value = K, ie.value = !0;
|
|
4400
|
+
}, Me = () => {
|
|
4401
|
+
ie.value = !1, G.value = void 0;
|
|
4389
4402
|
}, ot = async () => {
|
|
4390
|
-
var
|
|
4391
|
-
if ((
|
|
4392
|
-
|
|
4403
|
+
var K, u, g;
|
|
4404
|
+
if ((K = G.value) != null && K.id) {
|
|
4405
|
+
Z.value = !0;
|
|
4393
4406
|
try {
|
|
4394
|
-
await a.delete(de(
|
|
4395
|
-
} catch (
|
|
4396
|
-
ee.value = ((
|
|
4407
|
+
await a.delete(de(G.value.id)), i("delete:success", G.value), Me(), l.value++;
|
|
4408
|
+
} catch (B) {
|
|
4409
|
+
ee.value = ((g = (u = B.response) == null ? void 0 : u.data) == null ? void 0 : g.message) || B.message || r("errors.delete"), i("error", B);
|
|
4397
4410
|
} finally {
|
|
4398
|
-
|
|
4411
|
+
Z.value = !1;
|
|
4399
4412
|
}
|
|
4400
4413
|
}
|
|
4401
4414
|
};
|
|
4402
|
-
we(
|
|
4403
|
-
|
|
4404
|
-
|
|
4415
|
+
we(k, (K) => {
|
|
4416
|
+
var u, g, B;
|
|
4417
|
+
if (K.status === Ae.Error) {
|
|
4418
|
+
s.value = {
|
|
4419
|
+
title: r("errors.general")
|
|
4420
|
+
}, (B = (g = (u = K.error) == null ? void 0 : u.response) == null ? void 0 : g.data) != null && B.message && (s.value.message = K.error.response.data.message), i("error", K.error);
|
|
4405
4421
|
return;
|
|
4406
4422
|
}
|
|
4407
|
-
s.value =
|
|
4423
|
+
s.value = null;
|
|
4408
4424
|
});
|
|
4409
4425
|
const Ce = F(!1);
|
|
4410
|
-
return
|
|
4426
|
+
return yt(async () => {
|
|
4411
4427
|
Ce.value = await t.canCreate();
|
|
4412
|
-
}), (
|
|
4413
|
-
const
|
|
4428
|
+
}), (K, u) => {
|
|
4429
|
+
const g = L("KButton"), B = L("KInputSwitch"), ne = L("KBadge"), re = L("KTruncate"), ue = L("KDropdownItem"), w = L("KClipboardProvider");
|
|
4414
4430
|
return b(), $("div", ss, [
|
|
4415
4431
|
S(m(El), {
|
|
4416
4432
|
"cache-identifier": e.cacheIdentifier,
|
|
4417
4433
|
"disable-pagination-page-jump": "",
|
|
4418
4434
|
"disable-sorting": n.value,
|
|
4419
|
-
"empty-state-options":
|
|
4435
|
+
"empty-state-options": E.value,
|
|
4420
4436
|
"enable-entity-actions": "",
|
|
4421
4437
|
"error-message": s.value,
|
|
4422
4438
|
fetcher: m(I),
|
|
@@ -4426,28 +4442,28 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4426
4442
|
query: _.value,
|
|
4427
4443
|
"table-headers": m(d),
|
|
4428
4444
|
onClearSearchInput: v,
|
|
4429
|
-
"onClick:row": u[3] || (u[3] = (W) =>
|
|
4430
|
-
onSort:
|
|
4445
|
+
"onClick:row": u[3] || (u[3] = (W) => z(W)),
|
|
4446
|
+
onSort: T
|
|
4431
4447
|
}, {
|
|
4432
|
-
"toolbar-filter":
|
|
4448
|
+
"toolbar-filter": y(() => [
|
|
4433
4449
|
S(m(Wl), {
|
|
4434
4450
|
modelValue: _.value,
|
|
4435
4451
|
"onUpdate:modelValue": u[0] || (u[0] = (W) => _.value = W),
|
|
4436
4452
|
config: h.value
|
|
4437
4453
|
}, null, 8, ["modelValue", "config"])
|
|
4438
4454
|
]),
|
|
4439
|
-
"toolbar-button":
|
|
4440
|
-
S(m(
|
|
4455
|
+
"toolbar-button": y(() => [
|
|
4456
|
+
S(m(qe), {
|
|
4441
4457
|
"auth-function": () => e.canCreate()
|
|
4442
4458
|
}, {
|
|
4443
|
-
default:
|
|
4444
|
-
S(
|
|
4459
|
+
default: y(() => [
|
|
4460
|
+
S(g, {
|
|
4445
4461
|
appearance: "primary",
|
|
4446
4462
|
icon: "plus",
|
|
4447
4463
|
to: e.config.createRoute
|
|
4448
4464
|
}, {
|
|
4449
|
-
default:
|
|
4450
|
-
|
|
4465
|
+
default: y(() => [
|
|
4466
|
+
J(j(m(r)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
4451
4467
|
]),
|
|
4452
4468
|
_: 1
|
|
4453
4469
|
}, 8, ["to"])
|
|
@@ -4455,42 +4471,42 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4455
4471
|
_: 1
|
|
4456
4472
|
}, 8, ["auth-function"])
|
|
4457
4473
|
]),
|
|
4458
|
-
name:
|
|
4459
|
-
O("b", null,
|
|
4474
|
+
name: y(({ rowValue: W }) => [
|
|
4475
|
+
O("b", null, j(W ?? "-"), 1)
|
|
4460
4476
|
]),
|
|
4461
|
-
enabled:
|
|
4462
|
-
S(m(
|
|
4477
|
+
enabled: y(({ row: W }) => [
|
|
4478
|
+
S(m(qe), {
|
|
4463
4479
|
"auth-function": () => e.canEdit(W),
|
|
4464
4480
|
"force-show": ""
|
|
4465
4481
|
}, {
|
|
4466
|
-
default:
|
|
4482
|
+
default: y(({ isAllowed: V }) => [
|
|
4467
4483
|
O("div", {
|
|
4468
4484
|
onClick: u[1] || (u[1] = Ne(() => {
|
|
4469
4485
|
}, ["stop"]))
|
|
4470
4486
|
}, [
|
|
4471
|
-
S(
|
|
4487
|
+
S(B, {
|
|
4472
4488
|
modelValue: W.enabled,
|
|
4473
|
-
"onUpdate:modelValue": (
|
|
4489
|
+
"onUpdate:modelValue": (ze) => W.enabled = ze,
|
|
4474
4490
|
"data-testid": `row-${W.id}-toggle-input`,
|
|
4475
4491
|
disabled: !V,
|
|
4476
4492
|
label: W.enabled ? m(r)("actions.enable.enabled_label") : m(r)("actions.enable.disabled_label"),
|
|
4477
|
-
onClick: Ne((
|
|
4493
|
+
onClick: Ne((ze) => Y(W), ["prevent"])
|
|
4478
4494
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "label", "onClick"])
|
|
4479
4495
|
])
|
|
4480
4496
|
]),
|
|
4481
4497
|
_: 2
|
|
4482
4498
|
}, 1032, ["auth-function"])
|
|
4483
4499
|
]),
|
|
4484
|
-
tags:
|
|
4485
|
-
(W == null ? void 0 : W.length) > 0 ? (b(),
|
|
4486
|
-
default:
|
|
4487
|
-
(b(!0), $(he, null, ve(W, (V) => (b(),
|
|
4500
|
+
tags: y(({ rowValue: W }) => [
|
|
4501
|
+
(W == null ? void 0 : W.length) > 0 ? (b(), R(re, { key: 0 }, {
|
|
4502
|
+
default: y(() => [
|
|
4503
|
+
(b(!0), $(he, null, ve(W, (V) => (b(), R(ne, {
|
|
4488
4504
|
key: V,
|
|
4489
4505
|
onClick: u[2] || (u[2] = Ne(() => {
|
|
4490
4506
|
}, ["stop"]))
|
|
4491
4507
|
}, {
|
|
4492
|
-
default:
|
|
4493
|
-
|
|
4508
|
+
default: y(() => [
|
|
4509
|
+
J(j(V), 1)
|
|
4494
4510
|
]),
|
|
4495
4511
|
_: 2
|
|
4496
4512
|
}, 1024))), 128))
|
|
@@ -4498,15 +4514,15 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4498
4514
|
_: 2
|
|
4499
4515
|
}, 1024)) : (b(), $("span", cs, "-"))
|
|
4500
4516
|
]),
|
|
4501
|
-
actions:
|
|
4517
|
+
actions: y(({ row: W }) => [
|
|
4502
4518
|
S(w, null, {
|
|
4503
|
-
default:
|
|
4504
|
-
S(
|
|
4519
|
+
default: y(({ copyToClipboard: V }) => [
|
|
4520
|
+
S(ue, {
|
|
4505
4521
|
"data-testid": "action-entity-copy-id",
|
|
4506
|
-
onClick: (
|
|
4522
|
+
onClick: (ze) => U(W, V)
|
|
4507
4523
|
}, {
|
|
4508
|
-
default:
|
|
4509
|
-
|
|
4524
|
+
default: y(() => [
|
|
4525
|
+
J(j(m(r)("actions.copy_id")), 1)
|
|
4510
4526
|
]),
|
|
4511
4527
|
_: 2
|
|
4512
4528
|
}, 1032, ["onClick"])
|
|
@@ -4514,54 +4530,54 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4514
4530
|
_: 2
|
|
4515
4531
|
}, 1024),
|
|
4516
4532
|
S(w, null, {
|
|
4517
|
-
default:
|
|
4518
|
-
S(
|
|
4533
|
+
default: y(({ copyToClipboard: V }) => [
|
|
4534
|
+
S(ue, {
|
|
4519
4535
|
"data-testid": "action-entity-copy-json",
|
|
4520
|
-
onClick: (
|
|
4536
|
+
onClick: (ze) => N(W, V)
|
|
4521
4537
|
}, {
|
|
4522
|
-
default:
|
|
4523
|
-
|
|
4538
|
+
default: y(() => [
|
|
4539
|
+
J(j(m(r)("actions.copy_json")), 1)
|
|
4524
4540
|
]),
|
|
4525
4541
|
_: 2
|
|
4526
4542
|
}, 1032, ["onClick"])
|
|
4527
4543
|
]),
|
|
4528
4544
|
_: 2
|
|
4529
4545
|
}, 1024),
|
|
4530
|
-
S(m(
|
|
4546
|
+
S(m(qe), {
|
|
4531
4547
|
"auth-function": () => e.canRetrieve(W)
|
|
4532
4548
|
}, {
|
|
4533
|
-
default:
|
|
4534
|
-
S(
|
|
4549
|
+
default: y(() => [
|
|
4550
|
+
S(ue, {
|
|
4535
4551
|
"data-testid": "action-entity-view",
|
|
4536
4552
|
"has-divider": "",
|
|
4537
|
-
item:
|
|
4553
|
+
item: D(W.id)
|
|
4538
4554
|
}, null, 8, ["item"])
|
|
4539
4555
|
]),
|
|
4540
4556
|
_: 2
|
|
4541
4557
|
}, 1032, ["auth-function"]),
|
|
4542
|
-
S(m(
|
|
4558
|
+
S(m(qe), {
|
|
4543
4559
|
"auth-function": () => e.canEdit(W)
|
|
4544
4560
|
}, {
|
|
4545
|
-
default:
|
|
4546
|
-
S(
|
|
4561
|
+
default: y(() => [
|
|
4562
|
+
S(ue, {
|
|
4547
4563
|
"data-testid": "action-entity-edit",
|
|
4548
|
-
item:
|
|
4564
|
+
item: X(W.id)
|
|
4549
4565
|
}, null, 8, ["item"])
|
|
4550
4566
|
]),
|
|
4551
4567
|
_: 2
|
|
4552
4568
|
}, 1032, ["auth-function"]),
|
|
4553
|
-
S(m(
|
|
4569
|
+
S(m(qe), {
|
|
4554
4570
|
"auth-function": () => e.canDelete(W)
|
|
4555
4571
|
}, {
|
|
4556
|
-
default:
|
|
4557
|
-
S(
|
|
4572
|
+
default: y(() => [
|
|
4573
|
+
S(ue, {
|
|
4558
4574
|
danger: "",
|
|
4559
4575
|
"data-testid": "action-entity-delete",
|
|
4560
4576
|
"has-divider": "",
|
|
4561
4577
|
onClick: (V) => rt(W)
|
|
4562
4578
|
}, {
|
|
4563
|
-
default:
|
|
4564
|
-
|
|
4579
|
+
default: y(() => [
|
|
4580
|
+
J(j(m(r)("actions.delete.menu_label")), 1)
|
|
4565
4581
|
]),
|
|
4566
4582
|
_: 2
|
|
4567
4583
|
}, 1032, ["onClick"])
|
|
@@ -4572,24 +4588,24 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4572
4588
|
_: 1
|
|
4573
4589
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4574
4590
|
S(m(Yl), {
|
|
4575
|
-
action:
|
|
4576
|
-
"entity-id":
|
|
4577
|
-
"entity-name":
|
|
4591
|
+
action: ae.value.action,
|
|
4592
|
+
"entity-id": ae.value.id,
|
|
4593
|
+
"entity-name": ae.value.name,
|
|
4578
4594
|
"entity-type": m(r)("glossary.gateway_services"),
|
|
4579
|
-
"on-confirm":
|
|
4580
|
-
visible:
|
|
4595
|
+
"on-confirm": q,
|
|
4596
|
+
visible: C.value,
|
|
4581
4597
|
onCanceled: A,
|
|
4582
4598
|
onProceed: A
|
|
4583
4599
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
4584
4600
|
S(m(Fl), {
|
|
4585
|
-
"action-pending":
|
|
4601
|
+
"action-pending": Z.value,
|
|
4586
4602
|
description: m(r)("actions.delete.description"),
|
|
4587
|
-
"entity-name":
|
|
4603
|
+
"entity-name": G.value && (G.value.name || G.value.id),
|
|
4588
4604
|
"entity-type": m(ni).GatewayService,
|
|
4589
4605
|
error: ee.value,
|
|
4590
4606
|
title: m(r)("actions.delete.title"),
|
|
4591
4607
|
visible: ie.value,
|
|
4592
|
-
onCancel:
|
|
4608
|
+
onCancel: Me,
|
|
4593
4609
|
onProceed: ot
|
|
4594
4610
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
4595
4611
|
]);
|
|
@@ -4601,7 +4617,7 @@ const tr = (e, i) => {
|
|
|
4601
4617
|
for (const [r, o] of i)
|
|
4602
4618
|
t[r] = o;
|
|
4603
4619
|
return t;
|
|
4604
|
-
}, Bs = /* @__PURE__ */ tr(us, [["__scopeId", "data-v-
|
|
4620
|
+
}, Bs = /* @__PURE__ */ tr(us, [["__scopeId", "data-v-6437d75d"]]), ds = { class: "kong-ui-entities-gateway-service-form" }, ps = { key: 0 }, fs = { class: "gateway-service-form-traffic-label" }, ms = { class: "gateway-service-form-margin-bottom" }, gs = { key: 0 }, ys = { key: 1 }, vs = { key: 0 }, hs = { class: "gateway-service-form-margin-top" }, bs = { class: "gateway-service-form-margin-bottom" }, _s = { class: "gateway-service-form-margin-bottom" }, ws = { class: "gateway-service-form-margin-bottom" }, ks = { class: "gateway-service-form-margin-bottom" }, Cs = {
|
|
4605
4621
|
key: 0,
|
|
4606
4622
|
class: "gateway-service-form-margin-bottom"
|
|
4607
4623
|
}, Ss = {
|
|
@@ -4640,10 +4656,10 @@ const tr = (e, i) => {
|
|
|
4640
4656
|
},
|
|
4641
4657
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
4642
4658
|
setup(e, { expose: i, emit: t }) {
|
|
4643
|
-
var
|
|
4659
|
+
var K;
|
|
4644
4660
|
const r = e, o = F(!0), a = vt(), { i18nT: l, i18n: { t: n } } = We.useI18n(), { getMessageFromError: c } = os(), { axiosInstance: d } = er({
|
|
4645
|
-
headers: (
|
|
4646
|
-
}), f =
|
|
4661
|
+
headers: (K = r.config) == null ? void 0 : K.requestHeaders
|
|
4662
|
+
}), f = x(() => Pe.form[r.config.app].edit), p = x(() => r.gatewayServiceId ? ut.Edit : ut.Create), _ = F(!1), h = x(() => !!r.gatewayServiceId), I = F(h.value ? "protocol" : "url"), k = We.usePortFromProtocol(), v = F(""), T = x(() => !!v.value), s = Tt({
|
|
4647
4663
|
fields: {
|
|
4648
4664
|
name: "",
|
|
4649
4665
|
protocol: "http",
|
|
@@ -4663,7 +4679,7 @@ const tr = (e, i) => {
|
|
|
4663
4679
|
},
|
|
4664
4680
|
isReadonly: !1,
|
|
4665
4681
|
errorMessage: ""
|
|
4666
|
-
}),
|
|
4682
|
+
}), E = Tt({
|
|
4667
4683
|
name: "",
|
|
4668
4684
|
protocol: "http",
|
|
4669
4685
|
host: "",
|
|
@@ -4679,13 +4695,13 @@ const tr = (e, i) => {
|
|
|
4679
4695
|
tls_verify_enabled: !1,
|
|
4680
4696
|
tls_verify_value: !1,
|
|
4681
4697
|
tags: ""
|
|
4682
|
-
}),
|
|
4698
|
+
}), C = r.config.app === "konnect" || ls({
|
|
4683
4699
|
gatewayInfo: r.config.gatewayInfo,
|
|
4684
4700
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
4685
4701
|
supportedRange: {
|
|
4686
4702
|
enterprise: ["3.0"]
|
|
4687
4703
|
}
|
|
4688
|
-
}),
|
|
4704
|
+
}), P = [
|
|
4689
4705
|
{
|
|
4690
4706
|
label: n("gateway_services.form.fields.protocol.options.http"),
|
|
4691
4707
|
value: "http",
|
|
@@ -4721,7 +4737,7 @@ const tr = (e, i) => {
|
|
|
4721
4737
|
value: "grpcs",
|
|
4722
4738
|
group: "grpc"
|
|
4723
4739
|
},
|
|
4724
|
-
...
|
|
4740
|
+
...C ? [
|
|
4725
4741
|
{
|
|
4726
4742
|
label: n("gateway_services.form.fields.protocol.options.ws"),
|
|
4727
4743
|
value: "ws",
|
|
@@ -4738,60 +4754,60 @@ const tr = (e, i) => {
|
|
|
4738
4754
|
value: "udp",
|
|
4739
4755
|
group: "udp"
|
|
4740
4756
|
}
|
|
4741
|
-
],
|
|
4742
|
-
|
|
4743
|
-
}, A = (u) => u ? parseFloat(u) : 0,
|
|
4744
|
-
o.value = !0, s.errorMessage = "", s.fields.host =
|
|
4745
|
-
},
|
|
4757
|
+
], ae = { url: "url", protocol: "protocol" }, Y = (u, g) => {
|
|
4758
|
+
g.value;
|
|
4759
|
+
}, A = (u) => u ? parseFloat(u) : 0, q = () => {
|
|
4760
|
+
o.value = !0, s.errorMessage = "", s.fields.host = E.host, s.fields.path = E.path, s.fields.port = E.port, s.fields.protocol = E.protocol, s.fields.url = E.url, s.fields.retries = E.retries, s.fields.connect_timeout = E.connect_timeout, s.fields.write_timeout = E.write_timeout, s.fields.read_timeout = E.read_timeout, s.fields.client_certificate = E.client_certificate, s.fields.ca_certificates = E.ca_certificates, s.fields.tls_verify_enabled = E.tls_verify_enabled, s.fields.tls_verify_value = E.tls_verify_value;
|
|
4761
|
+
}, U = () => {
|
|
4746
4762
|
if (s.fields.url && I.value === "url")
|
|
4747
4763
|
try {
|
|
4748
4764
|
const u = new URL(s.fields.url);
|
|
4749
4765
|
s.errorMessage = "", s.fields.protocol = u.protocol.slice(0, -1), s.fields.host = u.hostname, s.fields.path = u.pathname;
|
|
4750
|
-
const
|
|
4751
|
-
_.value = !!
|
|
4766
|
+
const g = Number(u.port);
|
|
4767
|
+
_.value = !!g, s.fields.port = g || k.getPortFromProtocol(s.fields.protocol), s.errorMessage = "", t("url-valid:success");
|
|
4752
4768
|
} catch (u) {
|
|
4753
4769
|
s.errorMessage = n("errors.urlErrorMessage"), t("url-valid:error", c(u));
|
|
4754
4770
|
}
|
|
4755
4771
|
else
|
|
4756
4772
|
t("url-valid:success"), s.errorMessage = "";
|
|
4757
|
-
},
|
|
4773
|
+
}, N = x(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(s.fields.protocol)), z = x(() => {
|
|
4758
4774
|
if (I.value === "url")
|
|
4759
4775
|
return !0;
|
|
4760
4776
|
const u = ["https", "wss", "tls"].includes(s.fields.protocol);
|
|
4761
4777
|
return I.value === "protocol" && u;
|
|
4762
|
-
}),
|
|
4778
|
+
}), D = x(() => {
|
|
4763
4779
|
if (I.value === "url")
|
|
4764
4780
|
return !0;
|
|
4765
4781
|
const u = ["https", "tls"].includes(s.fields.protocol);
|
|
4766
4782
|
return I.value === "protocol" && u;
|
|
4767
|
-
}),
|
|
4783
|
+
}), X = x(() => {
|
|
4768
4784
|
if (I.value === "url")
|
|
4769
4785
|
return !0;
|
|
4770
4786
|
const u = ["https", "wss", "tls"].includes(s.fields.protocol);
|
|
4771
4787
|
return I.value === "protocol" && u;
|
|
4772
|
-
}),
|
|
4773
|
-
v.value =
|
|
4774
|
-
},
|
|
4775
|
-
var
|
|
4776
|
-
s.fields.name = (u == null ? void 0 : u.name) || "", s.fields.tags = ((
|
|
4788
|
+
}), G = (u) => new RegExp("^[0-9a-zA-Z.\\-_~]*$").test(u) ? "" : n("errors.validationNameError"), ie = (u) => {
|
|
4789
|
+
v.value = G(u);
|
|
4790
|
+
}, Z = x(() => h.value && JSON.stringify(s.fields) !== JSON.stringify(E) || I.value === "url" && !!s.fields.url || I.value === "protocol" && !!s.fields.host), ee = (u) => {
|
|
4791
|
+
var g, B, ne;
|
|
4792
|
+
s.fields.name = (u == null ? void 0 : u.name) || "", s.fields.tags = ((g = u == null ? void 0 : u.tags) == null ? void 0 : g.join(",")) || "", s.fields.protocol = (u == null ? void 0 : u.protocol) || "http", s.fields.path = (u == null ? void 0 : u.path) || "", s.fields.read_timeout = u != null && u.read_timeout || (u == null ? void 0 : u.read_timeout) === 0 ? u == null ? void 0 : u.read_timeout : 6e4, s.fields.retries = u != null && u.retries || (u == null ? void 0 : u.retries) === 0 ? u == null ? void 0 : u.retries : 5, s.fields.host = (u == null ? void 0 : u.host) || "", s.fields.connect_timeout = u != null && u.connect_timeout || (u == null ? void 0 : u.connect_timeout) === 0 ? u == null ? void 0 : u.connect_timeout : 6e4, s.fields.tls_verify_enabled = (u == null ? void 0 : u.tls_verify) !== "" && (u == null ? void 0 : u.tls_verify) !== null && (u == null ? void 0 : u.tls_verify) !== void 0, s.fields.tls_verify_value = u != null && u.tls_verify ? u == null ? void 0 : u.tls_verify : !1, s.fields.ca_certificates = ((B = u == null ? void 0 : u.ca_certificates) == null ? void 0 : B.join(",")) || "", s.fields.client_certificate = ((ne = u == null ? void 0 : u.client_certificate) == null ? void 0 : ne.id) || "", s.fields.write_timeout = u != null && u.write_timeout || (u == null ? void 0 : u.write_timeout) === 0 ? u == null ? void 0 : u.write_timeout : 6e4, s.fields.port = u != null && u.port || (u == null ? void 0 : u.port) === 0 ? u == null ? void 0 : u.port : 80, Object.assign(E, s.fields);
|
|
4777
4793
|
}, de = () => {
|
|
4778
4794
|
a.push(r.config.cancelRoute);
|
|
4779
|
-
}, rt =
|
|
4780
|
-
var
|
|
4781
|
-
let u = `${r.config.apiBaseUrl}${
|
|
4782
|
-
return r.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((
|
|
4783
|
-
}),
|
|
4784
|
-
var
|
|
4785
|
-
let u = `${r.config.apiBaseUrl}${
|
|
4786
|
-
return r.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((
|
|
4795
|
+
}, rt = x(() => {
|
|
4796
|
+
var g, B;
|
|
4797
|
+
let u = `${r.config.apiBaseUrl}${Pe.form[r.config.app].validate}`;
|
|
4798
|
+
return r.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((g = r.config) == null ? void 0 : g.controlPlaneId) || "") : r.config.app === "kongManager" && (u = u.replace(/\/{workspace}/gi, (B = r.config) != null && B.workspace ? `/${r.config.workspace}` : "")), u = u.replace(/{id}/gi, r.gatewayServiceId), u;
|
|
4799
|
+
}), Me = x(() => {
|
|
4800
|
+
var g, B;
|
|
4801
|
+
let u = `${r.config.apiBaseUrl}${Pe.form[r.config.app][p.value]}`;
|
|
4802
|
+
return r.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((g = r.config) == null ? void 0 : g.controlPlaneId) || "") : r.config.app === "kongManager" && (u = u.replace(/\/{workspace}/gi, (B = r.config) != null && B.workspace ? `/${r.config.workspace}` : "")), u = u.replace(/{id}/gi, r.gatewayServiceId), u;
|
|
4787
4803
|
}), ot = (u) => {
|
|
4788
|
-
let
|
|
4789
|
-
u.url && (
|
|
4804
|
+
let g = "";
|
|
4805
|
+
u.url && (g = new URL(u.url).protocol), (["https", "wss", "tls"].includes(u.protocol) || ["https", "wss", "tls"].includes(g)) && (u.tls_verify = u.tls_verify_enabled ? u.tls_verify_value : null), delete u.tls_verify_enabled, delete u.tls_verify_value;
|
|
4790
4806
|
}, Ce = () => {
|
|
4791
|
-
var
|
|
4807
|
+
var g, B;
|
|
4792
4808
|
const u = {
|
|
4793
4809
|
name: s.fields.name || null,
|
|
4794
|
-
tags: s.fields.tags ? (
|
|
4810
|
+
tags: s.fields.tags ? (g = s.fields.tags) == null ? void 0 : g.split(",").filter((ne) => ne !== "") : null,
|
|
4795
4811
|
protocol: s.fields.protocol,
|
|
4796
4812
|
path: s.fields.path || null,
|
|
4797
4813
|
read_timeout: s.fields.read_timeout,
|
|
@@ -4800,24 +4816,24 @@ const tr = (e, i) => {
|
|
|
4800
4816
|
connect_timeout: s.fields.connect_timeout,
|
|
4801
4817
|
tls_verify_value: s.fields.tls_verify_value,
|
|
4802
4818
|
tls_verify_enabled: s.fields.tls_verify_enabled,
|
|
4803
|
-
ca_certificates: s.fields.ca_certificates ? (
|
|
4819
|
+
ca_certificates: s.fields.ca_certificates ? (B = s.fields.ca_certificates) == null ? void 0 : B.split(",").filter((ne) => ne !== "") : null,
|
|
4804
4820
|
client_certificate: s.fields.client_certificate ? { id: s.fields.client_certificate } : null,
|
|
4805
4821
|
write_timeout: s.fields.write_timeout,
|
|
4806
4822
|
port: s.fields.port,
|
|
4807
4823
|
url: s.fields.url
|
|
4808
4824
|
};
|
|
4809
|
-
return s.fields.client_certificate && ["https", "wss", "tls"].includes(s.fields.protocol) && (u.client_certificate = { id: s.fields.client_certificate }), s.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(s.fields.protocol) && (u.tls_verify = s.fields.tls_verify_value),
|
|
4825
|
+
return s.fields.client_certificate && ["https", "wss", "tls"].includes(s.fields.protocol) && (u.client_certificate = { id: s.fields.client_certificate }), s.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(s.fields.protocol) && (u.tls_verify = s.fields.tls_verify_value), N.value || (u.path = null), p.value === "create" ? I.value === "url" ? (delete u.protocol, delete u.host, delete u.path, r.config.app === "konnect" && delete u.port) : delete u.url : p.value === "edit" && delete u.url, u;
|
|
4810
4826
|
}, Ee = async () => {
|
|
4811
|
-
var u,
|
|
4827
|
+
var u, g, B, ne;
|
|
4812
4828
|
try {
|
|
4813
|
-
s.isReadonly = !0,
|
|
4829
|
+
s.isReadonly = !0, U();
|
|
4814
4830
|
const re = Ce();
|
|
4815
|
-
let
|
|
4816
|
-
if (ot(re), await d.post(rt.value, re), p.value === "create" ?
|
|
4817
|
-
const { data: w } =
|
|
4818
|
-
s.fields.name = (w == null ? void 0 : w.name) || "", s.fields.port = w.port ||
|
|
4831
|
+
let ue;
|
|
4832
|
+
if (ot(re), await d.post(rt.value, re), p.value === "create" ? ue = await d.post(Me.value, re) : p.value === "edit" && (ue = ((u = r.config) == null ? void 0 : u.app) === "konnect" ? await d.put(Me.value, re) : await d.patch(Me.value, re)), ue) {
|
|
4833
|
+
const { data: w } = ue;
|
|
4834
|
+
s.fields.name = (w == null ? void 0 : w.name) || "", s.fields.port = w.port || k.getPortFromProtocol(w.protocol), s.fields.protocol = (w == null ? void 0 : w.protocol) || "http", s.fields.host = (w == null ? void 0 : w.host) || "", s.fields.path = (w == null ? void 0 : w.path) || "", s.fields.url = (w == null ? void 0 : w.url) || "", s.fields.retries = w != null && w.retries || (w == null ? void 0 : w.retries) === 0 ? w == null ? void 0 : w.retries : 5, s.fields.connect_timeout = w != null && w.connect_timeout || (w == null ? void 0 : w.connect_timeout) === 0 ? w == null ? void 0 : w.connect_timeout : 6e4, s.fields.write_timeout = w != null && w.write_timeout || (w == null ? void 0 : w.write_timeout) === 0 ? w == null ? void 0 : w.write_timeout : 6e4, s.fields.read_timeout = w != null && w.read_timeout || (w == null ? void 0 : w.read_timeout) === 0 ? w == null ? void 0 : w.read_timeout : 6e4, s.fields.client_certificate = ((g = w == null ? void 0 : w.client_certificate) == null ? void 0 : g.id) || "", s.fields.ca_certificates = (B = w == null ? void 0 : w.ca_certificates) != null && B.length ? w == null ? void 0 : w.ca_certificates.join(",") : "", s.fields.tls_verify_enabled = (w == null ? void 0 : w.tls_verify) !== "" && (w == null ? void 0 : w.tls_verify) !== null && (w == null ? void 0 : w.tls_verify) !== void 0, s.fields.tls_verify_value = s.fields.tls_verify_enabled && (w == null ? void 0 : w.tls_verify), s.fields.tags = (ne = w == null ? void 0 : w.tags) != null && ne.length ? w == null ? void 0 : w.tags.join(",") : "", Object.assign(E, s.fields), t("update", ue == null ? void 0 : ue.data);
|
|
4819
4835
|
}
|
|
4820
|
-
return
|
|
4836
|
+
return ue;
|
|
4821
4837
|
} catch (re) {
|
|
4822
4838
|
s.errorMessage = c(re), t("error", re);
|
|
4823
4839
|
} finally {
|
|
@@ -4825,53 +4841,53 @@ const tr = (e, i) => {
|
|
|
4825
4841
|
}
|
|
4826
4842
|
};
|
|
4827
4843
|
return we(() => r.gatewayServiceId, () => {
|
|
4828
|
-
Object.assign(s.fields,
|
|
4844
|
+
Object.assign(s.fields, E);
|
|
4829
4845
|
}), we(s.fields, (u) => {
|
|
4830
|
-
s.fields.port =
|
|
4846
|
+
s.fields.port = k.getPortFromProtocol(u.protocol, String(u.port)), t("model-updated", Ce());
|
|
4831
4847
|
}), ti(() => {
|
|
4832
4848
|
t("model-updated", Ce());
|
|
4833
4849
|
}), i({
|
|
4834
|
-
validateUrl:
|
|
4850
|
+
validateUrl: U,
|
|
4835
4851
|
getPayload: Ce,
|
|
4836
4852
|
saveFormData: Ee,
|
|
4837
|
-
canSubmit:
|
|
4838
|
-
}), (u,
|
|
4839
|
-
const
|
|
4853
|
+
canSubmit: Z
|
|
4854
|
+
}), (u, g) => {
|
|
4855
|
+
const B = L("KInput"), ne = L("KLabel"), re = L("KRadio"), ue = L("KSelect"), w = L("KCheckbox"), W = L("KCollapse");
|
|
4840
4856
|
return b(), $("div", ds, [
|
|
4841
4857
|
S(m(Cl), {
|
|
4842
|
-
"can-submit":
|
|
4858
|
+
"can-submit": Z.value,
|
|
4843
4859
|
config: e.config,
|
|
4844
4860
|
"edit-id": e.gatewayServiceId,
|
|
4845
4861
|
"error-message": s.errorMessage,
|
|
4846
4862
|
"fetch-url": f.value,
|
|
4847
4863
|
"is-readonly": s.isReadonly,
|
|
4848
4864
|
onCancel: de,
|
|
4849
|
-
"onFetch:error":
|
|
4865
|
+
"onFetch:error": g[25] || (g[25] = (V) => u.$emit("error", V)),
|
|
4850
4866
|
"onFetch:success": ee,
|
|
4851
|
-
onLoading:
|
|
4867
|
+
onLoading: g[26] || (g[26] = (V) => u.$emit("loading", V)),
|
|
4852
4868
|
onSubmit: Ee
|
|
4853
4869
|
}, {
|
|
4854
|
-
"form-actions":
|
|
4870
|
+
"form-actions": y(() => [
|
|
4855
4871
|
Q(u.$slots, "form-actions", {
|
|
4856
|
-
canSubmit:
|
|
4872
|
+
canSubmit: Z.value,
|
|
4857
4873
|
cancel: de,
|
|
4858
4874
|
submit: Ee
|
|
4859
4875
|
}, void 0, !0)
|
|
4860
4876
|
]),
|
|
4861
|
-
default:
|
|
4877
|
+
default: y(() => [
|
|
4862
4878
|
S(m(ei), {
|
|
4863
4879
|
description: m(n)("gateway_services.form.sections.general.description"),
|
|
4864
4880
|
"hide-info-header": e.hideSectionsInfo,
|
|
4865
4881
|
title: m(n)("gateway_services.form.sections.general.title")
|
|
4866
4882
|
}, {
|
|
4867
|
-
default:
|
|
4868
|
-
S(
|
|
4883
|
+
default: y(() => [
|
|
4884
|
+
S(B, {
|
|
4869
4885
|
modelValue: s.fields.name,
|
|
4870
|
-
"onUpdate:modelValue":
|
|
4886
|
+
"onUpdate:modelValue": g[0] || (g[0] = (V) => s.fields.name = V),
|
|
4871
4887
|
modelModifiers: { trim: !0 },
|
|
4872
4888
|
autocomplete: "off",
|
|
4873
4889
|
"data-testid": "gateway-service-name-input",
|
|
4874
|
-
error:
|
|
4890
|
+
error: T.value,
|
|
4875
4891
|
"error-message": v.value,
|
|
4876
4892
|
label: m(n)("gateway_services.form.fields.name.label"),
|
|
4877
4893
|
"label-attributes": { info: m(n)("gateway_services.form.fields.name.tooltip") },
|
|
@@ -4881,9 +4897,9 @@ const tr = (e, i) => {
|
|
|
4881
4897
|
type: "text",
|
|
4882
4898
|
onInput: ie
|
|
4883
4899
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
4884
|
-
S(
|
|
4900
|
+
S(B, {
|
|
4885
4901
|
modelValue: s.fields.tags,
|
|
4886
|
-
"onUpdate:modelValue":
|
|
4902
|
+
"onUpdate:modelValue": g[1] || (g[1] = (V) => s.fields.tags = V),
|
|
4887
4903
|
modelModifiers: { trim: !0 },
|
|
4888
4904
|
autocomplete: "off",
|
|
4889
4905
|
"data-testid": "gateway-service-tags-input",
|
|
@@ -4903,12 +4919,12 @@ const tr = (e, i) => {
|
|
|
4903
4919
|
"hide-info-header": e.hideSectionsInfo,
|
|
4904
4920
|
title: m(n)("gateway_services.form.sections.keys.title")
|
|
4905
4921
|
}, {
|
|
4906
|
-
default:
|
|
4907
|
-
h.value ?
|
|
4922
|
+
default: y(() => [
|
|
4923
|
+
h.value ? H("", !0) : (b(), $("div", ps, [
|
|
4908
4924
|
O("div", fs, [
|
|
4909
|
-
S(
|
|
4910
|
-
default:
|
|
4911
|
-
|
|
4925
|
+
S(ne, { required: "" }, {
|
|
4926
|
+
default: y(() => [
|
|
4927
|
+
J(j(m(n)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
|
|
4912
4928
|
]),
|
|
4913
4929
|
_: 1
|
|
4914
4930
|
})
|
|
@@ -4916,19 +4932,19 @@ const tr = (e, i) => {
|
|
|
4916
4932
|
O("div", ms, [
|
|
4917
4933
|
S(re, {
|
|
4918
4934
|
modelValue: I.value,
|
|
4919
|
-
"onUpdate:modelValue":
|
|
4935
|
+
"onUpdate:modelValue": g[2] || (g[2] = (V) => I.value = V),
|
|
4920
4936
|
"data-testid": "gateway-service-url-radio",
|
|
4921
|
-
"selected-value":
|
|
4922
|
-
onChange:
|
|
4937
|
+
"selected-value": ae.url,
|
|
4938
|
+
onChange: q
|
|
4923
4939
|
}, {
|
|
4924
|
-
default:
|
|
4925
|
-
S(
|
|
4940
|
+
default: y(() => [
|
|
4941
|
+
S(ne, {
|
|
4926
4942
|
class: "gateway-service-url-radio-label",
|
|
4927
4943
|
info: m(n)("gateway_services.form.fields.upstream_url.tooltip"),
|
|
4928
4944
|
required: ""
|
|
4929
4945
|
}, {
|
|
4930
|
-
default:
|
|
4931
|
-
|
|
4946
|
+
default: y(() => [
|
|
4947
|
+
J(j(m(n)("gateway_services.form.sections.keys.urlLabel")), 1)
|
|
4932
4948
|
]),
|
|
4933
4949
|
_: 1
|
|
4934
4950
|
}, 8, ["info"])
|
|
@@ -4936,10 +4952,10 @@ const tr = (e, i) => {
|
|
|
4936
4952
|
_: 1
|
|
4937
4953
|
}, 8, ["modelValue", "selected-value"])
|
|
4938
4954
|
]),
|
|
4939
|
-
I.value === "url" ? (b(), $("div",
|
|
4940
|
-
S(
|
|
4955
|
+
I.value === "url" ? (b(), $("div", gs, [
|
|
4956
|
+
S(B, {
|
|
4941
4957
|
modelValue: s.fields.url,
|
|
4942
|
-
"onUpdate:modelValue":
|
|
4958
|
+
"onUpdate:modelValue": g[3] || (g[3] = (V) => s.fields.url = V),
|
|
4943
4959
|
modelModifiers: { trim: !0 },
|
|
4944
4960
|
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
4945
4961
|
"data-testid": "gateway-service-url-input",
|
|
@@ -4948,19 +4964,19 @@ const tr = (e, i) => {
|
|
|
4948
4964
|
required: "",
|
|
4949
4965
|
tooltip: m(n)("gateway_services.form.fields.upstream_url.tooltip")
|
|
4950
4966
|
}, null, 8, ["modelValue", "placeholder", "tooltip"])
|
|
4951
|
-
])) :
|
|
4967
|
+
])) : H("", !0),
|
|
4952
4968
|
S(re, {
|
|
4953
4969
|
modelValue: I.value,
|
|
4954
|
-
"onUpdate:modelValue":
|
|
4970
|
+
"onUpdate:modelValue": g[4] || (g[4] = (V) => I.value = V),
|
|
4955
4971
|
"checked-group": "protocol",
|
|
4956
4972
|
"data-testid": "gateway-service-protocol-radio",
|
|
4957
|
-
"selected-value":
|
|
4958
|
-
onChange:
|
|
4973
|
+
"selected-value": ae.protocol,
|
|
4974
|
+
onChange: q
|
|
4959
4975
|
}, {
|
|
4960
|
-
default:
|
|
4961
|
-
S(
|
|
4962
|
-
default:
|
|
4963
|
-
|
|
4976
|
+
default: y(() => [
|
|
4977
|
+
S(ne, { class: "gateway-service-protocol-radio-label" }, {
|
|
4978
|
+
default: y(() => [
|
|
4979
|
+
J(j(m(n)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
|
|
4964
4980
|
]),
|
|
4965
4981
|
_: 1
|
|
4966
4982
|
})
|
|
@@ -4968,13 +4984,13 @@ const tr = (e, i) => {
|
|
|
4968
4984
|
_: 1
|
|
4969
4985
|
}, 8, ["modelValue", "selected-value"])
|
|
4970
4986
|
])),
|
|
4971
|
-
I.value === "protocol" || h.value ? (b(), $("div",
|
|
4972
|
-
S(
|
|
4987
|
+
I.value === "protocol" || h.value ? (b(), $("div", ys, [
|
|
4988
|
+
S(ue, {
|
|
4973
4989
|
modelValue: s.fields.protocol,
|
|
4974
|
-
"onUpdate:modelValue":
|
|
4990
|
+
"onUpdate:modelValue": g[5] || (g[5] = (V) => s.fields.protocol = V),
|
|
4975
4991
|
appearance: "select",
|
|
4976
4992
|
"data-testid": "gateway-service-protocol-select",
|
|
4977
|
-
items:
|
|
4993
|
+
items: P,
|
|
4978
4994
|
label: m(n)("gateway_services.form.fields.protocol.label"),
|
|
4979
4995
|
"label-attributes": {
|
|
4980
4996
|
info: m(n)("gateway_services.form.fields.protocol.tooltip")
|
|
@@ -4982,11 +4998,11 @@ const tr = (e, i) => {
|
|
|
4982
4998
|
readonly: s.isReadonly,
|
|
4983
4999
|
required: "",
|
|
4984
5000
|
width: "100%",
|
|
4985
|
-
onSelected:
|
|
5001
|
+
onSelected: g[6] || (g[6] = (V) => Y(s.fields.protocol, V))
|
|
4986
5002
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
4987
|
-
S(
|
|
5003
|
+
S(B, {
|
|
4988
5004
|
modelValue: s.fields.host,
|
|
4989
|
-
"onUpdate:modelValue":
|
|
5005
|
+
"onUpdate:modelValue": g[7] || (g[7] = (V) => s.fields.host = V),
|
|
4990
5006
|
modelModifiers: { trim: !0 },
|
|
4991
5007
|
class: "gateway-service-form-margin-top",
|
|
4992
5008
|
"data-testid": "gateway-service-host-input",
|
|
@@ -4998,10 +5014,10 @@ const tr = (e, i) => {
|
|
|
4998
5014
|
placeholder: m(n)("gateway_services.form.fields.host.placeholder"),
|
|
4999
5015
|
required: ""
|
|
5000
5016
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"]),
|
|
5001
|
-
|
|
5002
|
-
S(
|
|
5017
|
+
N.value ? (b(), $("div", vs, [
|
|
5018
|
+
S(B, {
|
|
5003
5019
|
modelValue: s.fields.path,
|
|
5004
|
-
"onUpdate:modelValue":
|
|
5020
|
+
"onUpdate:modelValue": g[8] || (g[8] = (V) => s.fields.path = V),
|
|
5005
5021
|
modelModifiers: { trim: !0 },
|
|
5006
5022
|
class: "gateway-service-form-margin-top",
|
|
5007
5023
|
"data-testid": "gateway-service-path-input",
|
|
@@ -5012,12 +5028,12 @@ const tr = (e, i) => {
|
|
|
5012
5028
|
name: "path",
|
|
5013
5029
|
placeholder: m(n)("gateway_services.form.fields.path.placeholder")
|
|
5014
5030
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
5015
|
-
])) :
|
|
5016
|
-
S(
|
|
5031
|
+
])) : H("", !0),
|
|
5032
|
+
S(B, {
|
|
5017
5033
|
modelValue: s.fields.port,
|
|
5018
5034
|
"onUpdate:modelValue": [
|
|
5019
|
-
|
|
5020
|
-
|
|
5035
|
+
g[9] || (g[9] = (V) => s.fields.port = V),
|
|
5036
|
+
g[10] || (g[10] = () => {
|
|
5021
5037
|
s.fields.port = A(s.fields.port + "");
|
|
5022
5038
|
})
|
|
5023
5039
|
],
|
|
@@ -5031,22 +5047,22 @@ const tr = (e, i) => {
|
|
|
5031
5047
|
tooltip: m(n)("gateway_services.form.fields.port.tooltip"),
|
|
5032
5048
|
type: "number"
|
|
5033
5049
|
}, null, 8, ["modelValue", "label", "label-attributes", "tooltip"])
|
|
5034
|
-
])) :
|
|
5050
|
+
])) : H("", !0),
|
|
5035
5051
|
S(W, {
|
|
5036
5052
|
modelValue: o.value,
|
|
5037
|
-
"onUpdate:modelValue":
|
|
5053
|
+
"onUpdate:modelValue": g[24] || (g[24] = (V) => o.value = V),
|
|
5038
5054
|
"data-testid": "advanced-fields-collapse",
|
|
5039
5055
|
"trigger-alignment": "leading",
|
|
5040
5056
|
"trigger-label": m(n)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
5041
5057
|
}, {
|
|
5042
|
-
default:
|
|
5058
|
+
default: y(() => [
|
|
5043
5059
|
O("div", hs, [
|
|
5044
5060
|
O("div", bs, [
|
|
5045
|
-
S(
|
|
5061
|
+
S(B, {
|
|
5046
5062
|
modelValue: s.fields.retries,
|
|
5047
5063
|
"onUpdate:modelValue": [
|
|
5048
|
-
|
|
5049
|
-
|
|
5064
|
+
g[11] || (g[11] = (V) => s.fields.retries = V),
|
|
5065
|
+
g[12] || (g[12] = () => {
|
|
5050
5066
|
s.fields.retries = A(s.fields.retries + "");
|
|
5051
5067
|
})
|
|
5052
5068
|
],
|
|
@@ -5060,11 +5076,11 @@ const tr = (e, i) => {
|
|
|
5060
5076
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
5061
5077
|
]),
|
|
5062
5078
|
O("div", _s, [
|
|
5063
|
-
S(
|
|
5079
|
+
S(B, {
|
|
5064
5080
|
modelValue: s.fields.connect_timeout,
|
|
5065
5081
|
"onUpdate:modelValue": [
|
|
5066
|
-
|
|
5067
|
-
|
|
5082
|
+
g[13] || (g[13] = (V) => s.fields.connect_timeout = V),
|
|
5083
|
+
g[14] || (g[14] = () => {
|
|
5068
5084
|
s.fields.connect_timeout = A(s.fields.connect_timeout + "");
|
|
5069
5085
|
})
|
|
5070
5086
|
],
|
|
@@ -5078,11 +5094,11 @@ const tr = (e, i) => {
|
|
|
5078
5094
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
5079
5095
|
]),
|
|
5080
5096
|
O("div", ws, [
|
|
5081
|
-
S(
|
|
5097
|
+
S(B, {
|
|
5082
5098
|
modelValue: s.fields.write_timeout,
|
|
5083
5099
|
"onUpdate:modelValue": [
|
|
5084
|
-
|
|
5085
|
-
|
|
5100
|
+
g[15] || (g[15] = (V) => s.fields.write_timeout = V),
|
|
5101
|
+
g[16] || (g[16] = () => {
|
|
5086
5102
|
s.fields.write_timeout = A(s.fields.write_timeout + "");
|
|
5087
5103
|
})
|
|
5088
5104
|
],
|
|
@@ -5096,11 +5112,11 @@ const tr = (e, i) => {
|
|
|
5096
5112
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
5097
5113
|
]),
|
|
5098
5114
|
O("div", ks, [
|
|
5099
|
-
S(
|
|
5115
|
+
S(B, {
|
|
5100
5116
|
modelValue: s.fields.read_timeout,
|
|
5101
5117
|
"onUpdate:modelValue": [
|
|
5102
|
-
|
|
5103
|
-
|
|
5118
|
+
g[17] || (g[17] = (V) => s.fields.read_timeout = V),
|
|
5119
|
+
g[18] || (g[18] = () => {
|
|
5104
5120
|
s.fields.read_timeout = A(s.fields.read_timeout + "");
|
|
5105
5121
|
})
|
|
5106
5122
|
],
|
|
@@ -5113,10 +5129,10 @@ const tr = (e, i) => {
|
|
|
5113
5129
|
type: "number"
|
|
5114
5130
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
5115
5131
|
]),
|
|
5116
|
-
|
|
5117
|
-
S(
|
|
5132
|
+
z.value ? (b(), $("div", Cs, [
|
|
5133
|
+
S(B, {
|
|
5118
5134
|
modelValue: s.fields.client_certificate,
|
|
5119
|
-
"onUpdate:modelValue":
|
|
5135
|
+
"onUpdate:modelValue": g[19] || (g[19] = (V) => s.fields.client_certificate = V),
|
|
5120
5136
|
modelModifiers: { trim: !0 },
|
|
5121
5137
|
autocomplete: "off",
|
|
5122
5138
|
"data-testid": "gateway-service-clientCert-input",
|
|
@@ -5127,11 +5143,11 @@ const tr = (e, i) => {
|
|
|
5127
5143
|
readonly: s.isReadonly,
|
|
5128
5144
|
type: "text"
|
|
5129
5145
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])
|
|
5130
|
-
])) :
|
|
5131
|
-
|
|
5132
|
-
S(
|
|
5146
|
+
])) : H("", !0),
|
|
5147
|
+
D.value ? (b(), $("div", Ss, [
|
|
5148
|
+
S(B, {
|
|
5133
5149
|
modelValue: s.fields.ca_certificates,
|
|
5134
|
-
"onUpdate:modelValue":
|
|
5150
|
+
"onUpdate:modelValue": g[20] || (g[20] = (V) => s.fields.ca_certificates = V),
|
|
5135
5151
|
modelModifiers: { trim: !0 },
|
|
5136
5152
|
autocomplete: "off",
|
|
5137
5153
|
"data-testid": "gateway-service-ca-certs-input",
|
|
@@ -5140,38 +5156,38 @@ const tr = (e, i) => {
|
|
|
5140
5156
|
readonly: s.isReadonly,
|
|
5141
5157
|
type: "text"
|
|
5142
5158
|
}, {
|
|
5143
|
-
"label-tooltip":
|
|
5159
|
+
"label-tooltip": y(() => [
|
|
5144
5160
|
S(m(l), {
|
|
5145
5161
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
5146
5162
|
scope: "global"
|
|
5147
5163
|
}, {
|
|
5148
|
-
code1:
|
|
5149
|
-
O("code", null,
|
|
5164
|
+
code1: y(() => [
|
|
5165
|
+
O("code", null, j(m(n)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
5150
5166
|
]),
|
|
5151
|
-
code2:
|
|
5152
|
-
O("code", null,
|
|
5167
|
+
code2: y(() => [
|
|
5168
|
+
O("code", null, j(m(n)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
5153
5169
|
]),
|
|
5154
5170
|
_: 1
|
|
5155
5171
|
})
|
|
5156
5172
|
]),
|
|
5157
5173
|
_: 1
|
|
5158
5174
|
}, 8, ["modelValue", "label", "placeholder", "readonly"])
|
|
5159
|
-
])) :
|
|
5160
|
-
|
|
5175
|
+
])) : H("", !0),
|
|
5176
|
+
X.value ? (b(), $("div", Is, [
|
|
5161
5177
|
S(w, {
|
|
5162
5178
|
modelValue: s.fields.tls_verify_enabled,
|
|
5163
|
-
"onUpdate:modelValue":
|
|
5179
|
+
"onUpdate:modelValue": g[21] || (g[21] = (V) => s.fields.tls_verify_enabled = V),
|
|
5164
5180
|
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
5165
5181
|
description: m(n)("gateway_services.form.fields.tls_verify_enabled.help"),
|
|
5166
5182
|
label: m(n)("gateway_services.form.fields.tls_verify_enabled.label")
|
|
5167
5183
|
}, {
|
|
5168
|
-
tooltip:
|
|
5184
|
+
tooltip: y(() => [
|
|
5169
5185
|
S(m(l), {
|
|
5170
5186
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
5171
5187
|
scope: "global"
|
|
5172
5188
|
}, {
|
|
5173
|
-
code1:
|
|
5174
|
-
O("code", null,
|
|
5189
|
+
code1: y(() => [
|
|
5190
|
+
O("code", null, j(m(n)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
5175
5191
|
]),
|
|
5176
5192
|
_: 1
|
|
5177
5193
|
})
|
|
@@ -5181,22 +5197,22 @@ const tr = (e, i) => {
|
|
|
5181
5197
|
s.fields.tls_verify_enabled ? (b(), $("div", As, [
|
|
5182
5198
|
S(re, {
|
|
5183
5199
|
modelValue: s.fields.tls_verify_value,
|
|
5184
|
-
"onUpdate:modelValue":
|
|
5200
|
+
"onUpdate:modelValue": g[22] || (g[22] = (V) => s.fields.tls_verify_value = V),
|
|
5185
5201
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
5186
5202
|
label: m(n)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
5187
5203
|
"selected-value": !0
|
|
5188
5204
|
}, null, 8, ["modelValue", "label"])
|
|
5189
|
-
])) :
|
|
5205
|
+
])) : H("", !0),
|
|
5190
5206
|
s.fields.tls_verify_enabled ? (b(), $("div", xs, [
|
|
5191
5207
|
S(re, {
|
|
5192
5208
|
modelValue: s.fields.tls_verify_value,
|
|
5193
|
-
"onUpdate:modelValue":
|
|
5209
|
+
"onUpdate:modelValue": g[23] || (g[23] = (V) => s.fields.tls_verify_value = V),
|
|
5194
5210
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
5195
5211
|
label: m(n)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
5196
5212
|
"selected-value": !1
|
|
5197
5213
|
}, null, 8, ["modelValue", "label"])
|
|
5198
|
-
])) :
|
|
5199
|
-
])) :
|
|
5214
|
+
])) : H("", !0)
|
|
5215
|
+
])) : H("", !0)
|
|
5200
5216
|
])
|
|
5201
5217
|
]),
|
|
5202
5218
|
_: 1
|
|
@@ -5211,7 +5227,7 @@ const tr = (e, i) => {
|
|
|
5211
5227
|
};
|
|
5212
5228
|
}
|
|
5213
5229
|
});
|
|
5214
|
-
const
|
|
5230
|
+
const Ps = /* @__PURE__ */ tr(Ts, [["__scopeId", "data-v-3a7da1e1"]]), $s = { class: "kong-ui-gateway-service-entity-config-card" }, Us = /* @__PURE__ */ oe({
|
|
5215
5231
|
__name: "GatewayServiceConfigCard",
|
|
5216
5232
|
props: {
|
|
5217
5233
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5238,7 +5254,7 @@ const Us = /* @__PURE__ */ tr(Ts, [["__scopeId", "data-v-3a7da1e1"]]), $s = { cl
|
|
|
5238
5254
|
},
|
|
5239
5255
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
5240
5256
|
setup(e) {
|
|
5241
|
-
const i = e, { i18n: { t }, i18nT: r } = We.useI18n(), o =
|
|
5257
|
+
const i = e, { i18n: { t }, i18nT: r } = We.useI18n(), o = x(() => Pe.form[i.config.app].edit), { getPropValue: a } = ns(), l = (c, d) => a(c, d) === !0 ? t("gateway_services.form.fields.tls_verify_option.true.display") : t("gateway_services.form.fields.tls_verify_option.false.display"), n = F({
|
|
5242
5258
|
id: {},
|
|
5243
5259
|
name: {
|
|
5244
5260
|
tooltip: t("gateway_services.form.fields.name.tooltip")
|
|
@@ -5310,50 +5326,50 @@ const Us = /* @__PURE__ */ tr(Ts, [["__scopeId", "data-v-3a7da1e1"]]), $s = { cl
|
|
|
5310
5326
|
"onFetch:success": d[2] || (d[2] = (f) => c.$emit("fetch:success", f)),
|
|
5311
5327
|
onLoading: d[3] || (d[3] = (f) => c.$emit("loading", f))
|
|
5312
5328
|
}, {
|
|
5313
|
-
"enabled-label-tooltip":
|
|
5329
|
+
"enabled-label-tooltip": y(() => [
|
|
5314
5330
|
S(m(r), {
|
|
5315
5331
|
keypath: "gateway_services.form.fields.enabled.tooltip",
|
|
5316
5332
|
scope: "global"
|
|
5317
5333
|
}, {
|
|
5318
|
-
false:
|
|
5319
|
-
O("code", null,
|
|
5334
|
+
false: y(() => [
|
|
5335
|
+
O("code", null, j(m(t)("gateway_services.form.fields.enabled.false")), 1)
|
|
5320
5336
|
]),
|
|
5321
|
-
true:
|
|
5322
|
-
O("code", null,
|
|
5337
|
+
true: y(() => [
|
|
5338
|
+
O("code", null, j(m(t)("gateway_services.form.fields.enabled.true")), 1)
|
|
5323
5339
|
]),
|
|
5324
5340
|
_: 1
|
|
5325
5341
|
})
|
|
5326
5342
|
]),
|
|
5327
|
-
"ca_certificates-label-tooltip":
|
|
5343
|
+
"ca_certificates-label-tooltip": y(() => [
|
|
5328
5344
|
S(m(r), {
|
|
5329
5345
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
5330
5346
|
scope: "global"
|
|
5331
5347
|
}, {
|
|
5332
|
-
code1:
|
|
5333
|
-
O("code", null,
|
|
5348
|
+
code1: y(() => [
|
|
5349
|
+
O("code", null, j(m(t)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
5334
5350
|
]),
|
|
5335
|
-
code2:
|
|
5336
|
-
O("code", null,
|
|
5351
|
+
code2: y(() => [
|
|
5352
|
+
O("code", null, j(m(t)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
5337
5353
|
]),
|
|
5338
5354
|
_: 1
|
|
5339
5355
|
})
|
|
5340
5356
|
]),
|
|
5341
|
-
"tls_verify-label-tooltip":
|
|
5357
|
+
"tls_verify-label-tooltip": y(() => [
|
|
5342
5358
|
S(m(r), {
|
|
5343
5359
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
5344
5360
|
scope: "global"
|
|
5345
5361
|
}, {
|
|
5346
|
-
code1:
|
|
5347
|
-
O("code", null,
|
|
5362
|
+
code1: y(() => [
|
|
5363
|
+
O("code", null, j(m(t)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
5348
5364
|
]),
|
|
5349
5365
|
_: 1
|
|
5350
5366
|
})
|
|
5351
5367
|
]),
|
|
5352
|
-
tls_verify:
|
|
5353
|
-
|
|
5368
|
+
tls_verify: y((f) => [
|
|
5369
|
+
J(j(typeof m(a)("rowValue", f) == "boolean" ? l("rowValue", f) : m(t)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
5354
5370
|
]),
|
|
5355
|
-
client_certificate:
|
|
5356
|
-
|
|
5371
|
+
client_certificate: y((f) => [
|
|
5372
|
+
J(j(m(a)("rowValue", f) ? m(a)("rowValue", f).id : "–"), 1)
|
|
5357
5373
|
]),
|
|
5358
5374
|
_: 1
|
|
5359
5375
|
}, 8, ["config", "config-card-doc", "config-schema", "fetch-url", "hide-title"])
|
|
@@ -5361,7 +5377,7 @@ const Us = /* @__PURE__ */ tr(Ts, [["__scopeId", "data-v-3a7da1e1"]]), $s = { cl
|
|
|
5361
5377
|
}
|
|
5362
5378
|
});
|
|
5363
5379
|
export {
|
|
5364
|
-
|
|
5365
|
-
|
|
5380
|
+
Us as GatewayServiceConfigCard,
|
|
5381
|
+
Ps as GatewayServiceForm,
|
|
5366
5382
|
Bs as GatewayServiceList
|
|
5367
5383
|
};
|