@kong-ui-public/entities-consumer-groups 3.3.13-pr.1503.b032bfa4.0 → 3.3.13
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,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as X, computed as w, openBlock as m, createBlock as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as X, computed as w, openBlock as m, createBlock as D, resolveDynamicComponent as xe, normalizeStyle as He, withCtx as v, createElementBlock as $, toDisplayString as q, createCommentVNode as W, pushScopeId as Je, popScopeId as We, createElementVNode as L, ref as M, watch as $e, renderSlot as ne, unref as g, onBeforeMount as gt, resolveComponent as R, createSlots as Be, createVNode as j, createTextVNode as Z, renderList as ve, withModifiers as xt, withDirectives as Ne, vShow as je, Fragment as be, normalizeClass as Ee, withKeys as wr, useSlots as jt, useCssVars as bn, inject as _r, onMounted as Sr, onUnmounted as xr, normalizeProps as Ir, guardReactiveProps as Ar, mergeProps as $r, Teleport as Tr, reactive as zt } from "vue";
|
|
2
|
+
import { useRouter as Ot } from "vue-router";
|
|
3
3
|
import { createI18n as kn, i18nTComponent as Cn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Gt from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as Nr } from "@kong/kongponents";
|
|
@@ -8,13 +8,13 @@ const Ht = "24px", jr = (e, t) => {
|
|
|
8
8
|
for (const [r, a] of t)
|
|
9
9
|
n[r] = a;
|
|
10
10
|
return n;
|
|
11
|
-
},
|
|
11
|
+
}, Or = (e) => (Je("data-v-c1f7c39c"), e = e(), We(), e), Mr = ["aria-hidden"], Er = {
|
|
12
12
|
key: 0,
|
|
13
13
|
"data-testid": "kui-icon-svg-title"
|
|
14
|
-
},
|
|
14
|
+
}, Fr = /* @__PURE__ */ Or(() => /* @__PURE__ */ L("path", {
|
|
15
15
|
d: "M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",
|
|
16
16
|
fill: "currentColor"
|
|
17
|
-
}, null, -1)),
|
|
17
|
+
}, null, -1)), qr = /* @__PURE__ */ X({
|
|
18
18
|
__name: "AddIcon",
|
|
19
19
|
props: {
|
|
20
20
|
/** The accessibility text provided to screen readers */
|
|
@@ -84,14 +84,14 @@ const Ht = "24px", jr = (e, t) => {
|
|
|
84
84
|
lineHeight: "0",
|
|
85
85
|
width: n.value
|
|
86
86
|
}));
|
|
87
|
-
return (a, i) => (m(),
|
|
87
|
+
return (a, i) => (m(), D(xe(e.as), {
|
|
88
88
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
89
89
|
class: "kui-icon add-icon",
|
|
90
90
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
91
91
|
style: He(r.value)
|
|
92
92
|
}, {
|
|
93
|
-
default:
|
|
94
|
-
(m(),
|
|
93
|
+
default: v(() => [
|
|
94
|
+
(m(), $("svg", {
|
|
95
95
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
96
96
|
"data-testid": "kui-icon-svg-add-icon",
|
|
97
97
|
fill: "none",
|
|
@@ -101,14 +101,14 @@ const Ht = "24px", jr = (e, t) => {
|
|
|
101
101
|
width: "100%",
|
|
102
102
|
xmlns: "http://www.w3.org/2000/svg"
|
|
103
103
|
}, [
|
|
104
|
-
e.title ? (m(),
|
|
105
|
-
|
|
106
|
-
], 8,
|
|
104
|
+
e.title ? (m(), $("title", Er, q(e.title), 1)) : W("", !0),
|
|
105
|
+
Fr
|
|
106
|
+
], 8, Mr))
|
|
107
107
|
]),
|
|
108
108
|
_: 1
|
|
109
109
|
}, 8, ["aria-hidden", "style"]));
|
|
110
110
|
}
|
|
111
|
-
}),
|
|
111
|
+
}), Kr = /* @__PURE__ */ jr(qr, [["__scopeId", "data-v-c1f7c39c"]]), Br = {
|
|
112
112
|
list: {
|
|
113
113
|
table_headers: {
|
|
114
114
|
name: "Name",
|
|
@@ -198,7 +198,7 @@ const Ht = "24px", jr = (e, t) => {
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
}, Lr = {
|
|
201
|
-
consumer_groups:
|
|
201
|
+
consumer_groups: Br
|
|
202
202
|
};
|
|
203
203
|
function Ur() {
|
|
204
204
|
const e = kn("en-us", Lr);
|
|
@@ -210,7 +210,7 @@ function Ur() {
|
|
|
210
210
|
}
|
|
211
211
|
const yt = {
|
|
212
212
|
useI18n: Ur
|
|
213
|
-
}, Ie = "/v2/control-planes/{controlPlaneId}/core-entities", Ae = "/{workspace}",
|
|
213
|
+
}, Ie = "/v2/control-planes/{controlPlaneId}/core-entities", Ae = "/{workspace}", Oe = {
|
|
214
214
|
list: {
|
|
215
215
|
konnect: {
|
|
216
216
|
all: `${Ie}/consumer_groups`,
|
|
@@ -242,8 +242,8 @@ const yt = {
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
};
|
|
245
|
-
var wn = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e.Secret = "secret", e))(wn || {}), ut = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ut || {}),
|
|
246
|
-
function
|
|
245
|
+
var wn = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e.Secret = "secret", e))(wn || {}), ut = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ut || {}), qe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(qe || {}), ee = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(ee || {}), he = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(he || {});
|
|
246
|
+
function Vr() {
|
|
247
247
|
return {
|
|
248
248
|
getAxiosInstance: (e = {}) => {
|
|
249
249
|
try {
|
|
@@ -267,7 +267,7 @@ function Rr() {
|
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Pr() {
|
|
271
271
|
return {
|
|
272
272
|
debounce: (e, t) => {
|
|
273
273
|
let n;
|
|
@@ -279,7 +279,7 @@ function Vr() {
|
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
|
-
const Ct = "khcp-user-table-preferences",
|
|
282
|
+
const Ct = "khcp-user-table-preferences", Rr = {
|
|
283
283
|
pageSize: 30,
|
|
284
284
|
sortColumnKey: void 0,
|
|
285
285
|
sortColumnOrder: void 0,
|
|
@@ -310,15 +310,15 @@ function Dr() {
|
|
|
310
310
|
},
|
|
311
311
|
getTablePreferences: (n) => {
|
|
312
312
|
const r = t();
|
|
313
|
-
return (r == null ? void 0 : r.get(n)) || void 0 ||
|
|
313
|
+
return (r == null ? void 0 : r.get(n)) || void 0 || Rr;
|
|
314
314
|
},
|
|
315
315
|
deleteAllTablePreferences: () => {
|
|
316
316
|
localStorage.removeItem(Ct);
|
|
317
317
|
}
|
|
318
318
|
};
|
|
319
319
|
}
|
|
320
|
-
function
|
|
321
|
-
const { getAxiosInstance: t } =
|
|
320
|
+
function Mt(e = {}) {
|
|
321
|
+
const { getAxiosInstance: t } = Vr();
|
|
322
322
|
return {
|
|
323
323
|
axiosInstance: t(e)
|
|
324
324
|
};
|
|
@@ -486,72 +486,66 @@ function na(e, t, n, r = {
|
|
|
486
486
|
searchKeys: ["id"]
|
|
487
487
|
}) {
|
|
488
488
|
n || (n = "1000");
|
|
489
|
-
const { axiosInstance: a } =
|
|
490
|
-
await
|
|
491
|
-
}, 200), s =
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
489
|
+
const { axiosInstance: a } = Mt(e.axiosRequestConfig), { i18n: { t: i } } = ht(), { debounce: o } = Pr(), l = o(async (h) => {
|
|
490
|
+
await J(h);
|
|
491
|
+
}, 200), s = M(!1), u = M(""), p = M(""), c = M([]), y = M([]), f = M(void 0), x = g(t);
|
|
492
|
+
let T = `${e.apiBaseUrl}${x}`;
|
|
493
|
+
e.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (T = T.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
494
|
+
const { isValidUuid: C } = _n(), U = async () => {
|
|
495
495
|
try {
|
|
496
496
|
s.value = !0;
|
|
497
|
-
const { data:
|
|
498
|
-
|
|
497
|
+
const { data: h } = await a.get(`${T}?size=${n}`);
|
|
498
|
+
h != null && h.next || (f.value = r.fetchedItemsKey in h ? h[r.fetchedItemsKey] : []), y.value = r.fetchedItemsKey in h ? h[r.fetchedItemsKey] : [], c.value = y.value;
|
|
499
499
|
} catch {
|
|
500
500
|
c.value = [], u.value = i("debouncedFilter.errors.fetch");
|
|
501
501
|
} finally {
|
|
502
502
|
s.value = !1;
|
|
503
503
|
}
|
|
504
|
-
},
|
|
505
|
-
var
|
|
506
|
-
if (
|
|
507
|
-
if (
|
|
508
|
-
c.value = y.value;
|
|
509
|
-
return;
|
|
510
|
-
} else
|
|
511
|
-
L.value = j || "";
|
|
512
|
-
if (f.value === void 0)
|
|
504
|
+
}, N = M(""), J = async (h) => {
|
|
505
|
+
var _, d, S;
|
|
506
|
+
if (N.value !== h)
|
|
507
|
+
if (N.value = h || "", f.value === void 0)
|
|
513
508
|
try {
|
|
514
509
|
if (s.value = !0, u.value = "", p.value = "", e.app === "konnect") {
|
|
515
|
-
let
|
|
516
|
-
|
|
517
|
-
const { data:
|
|
518
|
-
r.fetchedItemsKey in
|
|
519
|
-
} else if (
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
const { data:
|
|
523
|
-
return [
|
|
524
|
-
})()) :
|
|
525
|
-
...r.searchKeys.filter((
|
|
526
|
-
const { data:
|
|
527
|
-
return
|
|
510
|
+
let B = T + "";
|
|
511
|
+
h && (B += `/${h}`);
|
|
512
|
+
const { data: I } = await a.get(`${B}?size=${n}`);
|
|
513
|
+
r.fetchedItemsKey in I ? c.value = I[r.fetchedItemsKey] : I != null && I.id ? c.value = [I] : c.value = [];
|
|
514
|
+
} else if (h) {
|
|
515
|
+
const B = [];
|
|
516
|
+
C(h) && r.searchKeys.includes("id") ? B.push((async () => {
|
|
517
|
+
const { data: E } = await a.get(`${T}/${h}`);
|
|
518
|
+
return [E[r.fetchedItemsKey] ?? E];
|
|
519
|
+
})()) : B.push(
|
|
520
|
+
...r.searchKeys.filter((E) => E !== "id").map(async (E) => {
|
|
521
|
+
const { data: b } = await a.get(`${T}?${E}=${h}`);
|
|
522
|
+
return b[r.fetchedItemsKey];
|
|
528
523
|
})
|
|
529
524
|
);
|
|
530
|
-
const
|
|
531
|
-
c.value = [], (
|
|
532
|
-
var
|
|
533
|
-
(
|
|
534
|
-
|
|
525
|
+
const I = await Promise.all(B), G = /* @__PURE__ */ new Set();
|
|
526
|
+
c.value = [], (_ = I == null ? void 0 : I.forEach) == null || _.call(I, (E) => {
|
|
527
|
+
var b;
|
|
528
|
+
(b = E == null ? void 0 : E.forEach) == null || b.call(E, (K) => {
|
|
529
|
+
G.has(K.id) || (G.add(K.id), c.value.push(K));
|
|
535
530
|
});
|
|
536
531
|
});
|
|
537
532
|
} else
|
|
538
533
|
c.value = y.value;
|
|
539
|
-
} catch (
|
|
540
|
-
((
|
|
534
|
+
} catch (B) {
|
|
535
|
+
((d = B == null ? void 0 : B.response) == null ? void 0 : d.status) === 404 ? p.value = i("debouncedFilter.errors.invalid") : (c.value = [], u.value = i("debouncedFilter.errors.fetch"));
|
|
541
536
|
} finally {
|
|
542
537
|
s.value = !1;
|
|
543
538
|
}
|
|
544
539
|
else
|
|
545
|
-
s.value = !0, p.value = "",
|
|
546
|
-
var
|
|
547
|
-
let
|
|
548
|
-
for (const
|
|
549
|
-
const
|
|
550
|
-
|
|
540
|
+
s.value = !0, p.value = "", h ? (c.value = (S = f.value) == null ? void 0 : S.filter((B) => {
|
|
541
|
+
var I;
|
|
542
|
+
let G = !1;
|
|
543
|
+
for (const E of r.searchKeys) {
|
|
544
|
+
const b = typeof B[E] == "string" ? (I = B[E]) == null ? void 0 : I.toLowerCase() : B[E];
|
|
545
|
+
b != null && b.includes(h.toLowerCase()) && (G = !0);
|
|
551
546
|
}
|
|
552
|
-
return
|
|
547
|
+
return G;
|
|
553
548
|
}), (!c.value || !c.value.length) && (p.value = i("debouncedFilter.errors.invalid"))) : c.value = f.value, s.value = !1;
|
|
554
|
-
}
|
|
555
549
|
};
|
|
556
550
|
return {
|
|
557
551
|
loading: s,
|
|
@@ -559,7 +553,7 @@ function na(e, t, n, r = {
|
|
|
559
553
|
validationError: p,
|
|
560
554
|
results: c,
|
|
561
555
|
allRecords: f,
|
|
562
|
-
loadItems:
|
|
556
|
+
loadItems: U,
|
|
563
557
|
debouncedQueryChange: l
|
|
564
558
|
};
|
|
565
559
|
}
|
|
@@ -610,8 +604,8 @@ function oa(e) {
|
|
|
610
604
|
return console.warn("Failed to build valid URL:", r), "";
|
|
611
605
|
}
|
|
612
606
|
}
|
|
613
|
-
function
|
|
614
|
-
const n =
|
|
607
|
+
function Sn(e, t) {
|
|
608
|
+
const n = M(g(e)), r = M(g(t)), a = w(
|
|
615
609
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
616
610
|
), i = w(
|
|
617
611
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
@@ -620,8 +614,8 @@ function xn(e, t) {
|
|
|
620
614
|
const { page: l, pageSize: s, offset: u, sortColumnKey: p, sortColumnOrder: c, query: y } = o;
|
|
621
615
|
try {
|
|
622
616
|
let f = new URL(i.value.href);
|
|
623
|
-
return a.value && y ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${y}/`) : new URL(`${f.href}?filter[name][contains]=${y}`)) : (a.value || new URLSearchParams(y).forEach((
|
|
624
|
-
f.searchParams.append(
|
|
617
|
+
return a.value && y ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${y}/`) : new URL(`${f.href}?filter[name][contains]=${y}`)) : (a.value || new URLSearchParams(y).forEach((x, T) => {
|
|
618
|
+
f.searchParams.append(T, x);
|
|
625
619
|
}), p && f.searchParams.append("sort_by", p), c === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(s))), u && l !== 1 && f.searchParams.append("offset", String(u)), f.href;
|
|
626
620
|
} catch (f) {
|
|
627
621
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
@@ -629,13 +623,13 @@ function xn(e, t) {
|
|
|
629
623
|
};
|
|
630
624
|
}
|
|
631
625
|
function ia(e, t, n = "data") {
|
|
632
|
-
const r = g(t), { axiosInstance: a } =
|
|
633
|
-
status:
|
|
626
|
+
const r = g(t), { axiosInstance: a } = Mt(e.axiosRequestConfig), i = Sn(e, r), o = M({
|
|
627
|
+
status: qe.Idle
|
|
634
628
|
});
|
|
635
629
|
return { fetcher: async (l) => {
|
|
636
630
|
var s;
|
|
637
631
|
try {
|
|
638
|
-
o.value = { status:
|
|
632
|
+
o.value = { status: qe.Loading };
|
|
639
633
|
let u = i(l);
|
|
640
634
|
u.includes("filter[name]") && (u = `${u}&page[size]=${l.pageSize}&page[number]=${l.page}`);
|
|
641
635
|
const p = await a.get(u);
|
|
@@ -644,7 +638,7 @@ function ia(e, t, n = "data") {
|
|
|
644
638
|
const c = p.data, y = n && n.replace(/[^\w-_]/gi, "");
|
|
645
639
|
let f;
|
|
646
640
|
c[y] && Array.isArray(c[y]) ? f = c[y] : Array.isArray(c) ? f = c : f = Object.keys(c).length ? [c] : [];
|
|
647
|
-
const
|
|
641
|
+
const x = {
|
|
648
642
|
data: f,
|
|
649
643
|
total: f.length,
|
|
650
644
|
...c.offset ? {
|
|
@@ -654,20 +648,20 @@ function ia(e, t, n = "data") {
|
|
|
654
648
|
} : null
|
|
655
649
|
};
|
|
656
650
|
return o.value = {
|
|
657
|
-
status:
|
|
658
|
-
response:
|
|
659
|
-
},
|
|
651
|
+
status: qe.Idle,
|
|
652
|
+
response: x
|
|
653
|
+
}, x;
|
|
660
654
|
} catch (u) {
|
|
661
655
|
const p = {
|
|
662
656
|
data: [],
|
|
663
657
|
total: 0
|
|
664
658
|
};
|
|
665
659
|
return l.query && (((s = u.response) == null ? void 0 : s.status) === 404 || u.status === 404) ? (o.value = {
|
|
666
|
-
status:
|
|
660
|
+
status: qe.NoResults,
|
|
667
661
|
response: p,
|
|
668
662
|
error: u.response ? u : { response: u }
|
|
669
663
|
}, p) : (o.value = {
|
|
670
|
-
status:
|
|
664
|
+
status: qe.Error,
|
|
671
665
|
response: p,
|
|
672
666
|
error: u.response ? u : { response: u }
|
|
673
667
|
}, p);
|
|
@@ -681,10 +675,10 @@ function la() {
|
|
|
681
675
|
convertKeyToTitle: e
|
|
682
676
|
};
|
|
683
677
|
}
|
|
684
|
-
const
|
|
678
|
+
const xn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Jt = (e) => {
|
|
685
679
|
if (typeof e != "string")
|
|
686
680
|
throw new TypeError("Invalid argument expected string");
|
|
687
|
-
const t = e.match(
|
|
681
|
+
const t = e.match(xn);
|
|
688
682
|
if (!t)
|
|
689
683
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
690
684
|
return t.shift(), t;
|
|
@@ -722,7 +716,7 @@ const Sn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
722
716
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
723
717
|
if (Xt.indexOf(e) === -1)
|
|
724
718
|
throw new Error(`Invalid operator, expected one of ${Xt.join("|")}`);
|
|
725
|
-
}, pa = (e) => typeof e == "string" && /^[v\d]/.test(e) &&
|
|
719
|
+
}, pa = (e) => typeof e == "string" && /^[v\d]/.test(e) && xn.test(e);
|
|
726
720
|
function fa(e) {
|
|
727
721
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
728
722
|
if (!t)
|
|
@@ -737,8 +731,8 @@ function fa(e) {
|
|
|
737
731
|
return !(o && Qt(a, o, "<") || l && Qt(a, l, ">"));
|
|
738
732
|
}
|
|
739
733
|
function ma(e) {
|
|
740
|
-
const t =
|
|
741
|
-
return
|
|
734
|
+
const t = M(0), n = M(0), r = M(!1);
|
|
735
|
+
return $e(e, (a) => {
|
|
742
736
|
a && !r.value && (t.value = a.offsetWidth, n.value = a.scrollWidth, r.value = !0);
|
|
743
737
|
}), {
|
|
744
738
|
isTruncated: w(() => t.value < n.value)
|
|
@@ -751,13 +745,13 @@ function ga() {
|
|
|
751
745
|
};
|
|
752
746
|
}
|
|
753
747
|
const le = {
|
|
754
|
-
useAxios:
|
|
748
|
+
useAxios: Mt,
|
|
755
749
|
useDebouncedFilter: na,
|
|
756
750
|
useDeleteUrlBuilder: ra,
|
|
757
751
|
useErrors: aa,
|
|
758
752
|
useExternalLinkCreator: oa,
|
|
759
753
|
useFetcher: ia,
|
|
760
|
-
useFetchUrlBuilder:
|
|
754
|
+
useFetchUrlBuilder: Sn,
|
|
761
755
|
useHelpers: _n,
|
|
762
756
|
useStringHelpers: la,
|
|
763
757
|
useI18n: ht,
|
|
@@ -791,14 +785,14 @@ const le = {
|
|
|
791
785
|
var s;
|
|
792
786
|
return t.isArrayItem ? (s = i.value) != null && s.name ? r(i.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
793
787
|
});
|
|
794
|
-
return (s, u) => (m(),
|
|
795
|
-
class:
|
|
788
|
+
return (s, u) => (m(), D(xe(e.isArrayItem ? "fieldset" : "div"), {
|
|
789
|
+
class: Ee(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
796
790
|
}, {
|
|
797
|
-
default:
|
|
798
|
-
e.isArrayItem ? (m(),
|
|
799
|
-
|
|
791
|
+
default: v(() => [
|
|
792
|
+
e.isArrayItem ? (m(), $("legend", ya, [
|
|
793
|
+
L("b", null, q(l.value), 1)
|
|
800
794
|
])) : W("", !0),
|
|
801
|
-
(m(!0),
|
|
795
|
+
(m(!0), $(be, null, ve(Object.keys(o.value), (p, c) => (m(), D($n, {
|
|
802
796
|
key: `${a.value}-property-${c}`,
|
|
803
797
|
item: {
|
|
804
798
|
key: p,
|
|
@@ -827,14 +821,14 @@ const le = {
|
|
|
827
821
|
setup(e) {
|
|
828
822
|
const { i18n: { t } } = le.useI18n();
|
|
829
823
|
return (n, r) => {
|
|
830
|
-
const a =
|
|
831
|
-
return m(),
|
|
832
|
-
|
|
824
|
+
const a = R("KButton");
|
|
825
|
+
return m(), $("div", null, [
|
|
826
|
+
j(a, {
|
|
833
827
|
appearance: "tertiary",
|
|
834
828
|
class: "navigation-button",
|
|
835
829
|
onClick: r[0] || (r[0] = (i) => n.$emit("navigation-click", e.item))
|
|
836
830
|
}, {
|
|
837
|
-
default:
|
|
831
|
+
default: v(() => [
|
|
838
832
|
Z(q(e.item.value || g(t)("baseConfigCard.commonFields.link")), 1)
|
|
839
833
|
]),
|
|
840
834
|
_: 1
|
|
@@ -853,22 +847,22 @@ const le = {
|
|
|
853
847
|
setup(e) {
|
|
854
848
|
const { i18n: { t } } = le.useI18n();
|
|
855
849
|
return (n, r) => {
|
|
856
|
-
const a =
|
|
857
|
-
return m(),
|
|
850
|
+
const a = R("KBadge");
|
|
851
|
+
return m(), D(a, {
|
|
858
852
|
appearance: e.status ? "success" : "neutral"
|
|
859
853
|
}, {
|
|
860
|
-
default:
|
|
854
|
+
default: v(() => [
|
|
861
855
|
Z(q(e.status ? g(t)("baseConfigCard.statusBadge.enabledLabel") : g(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
862
856
|
]),
|
|
863
857
|
_: 1
|
|
864
858
|
}, 8, ["appearance"]);
|
|
865
859
|
};
|
|
866
860
|
}
|
|
867
|
-
}), Ca = "#0044f4", wa = "#e0e4ea", _a = "#afb7c5",
|
|
861
|
+
}), Ca = "#0044f4", wa = "#e0e4ea", _a = "#afb7c5", Sa = "1px", xa = "20px", Ia = { class: "config-card-details-row" }, Aa = ["data-testid"], $a = ["data-testid"], Ta = ["data-testid"], Na = ["data-testid"], ja = { key: 1 }, Oa = ["data-testid"], Ma = ["data-testid"], Ea = ["data-testid"], Fa = ["data-testid"], qa = {
|
|
868
862
|
name: "ConfigCardItem",
|
|
869
863
|
components: { JsonCardItem: An, StatusBadge: ka, InternalLinkItem: ba }
|
|
870
|
-
},
|
|
871
|
-
...
|
|
864
|
+
}, Ka = /* @__PURE__ */ X({
|
|
865
|
+
...qa,
|
|
872
866
|
props: {
|
|
873
867
|
item: {
|
|
874
868
|
type: Object,
|
|
@@ -887,8 +881,8 @@ const le = {
|
|
|
887
881
|
},
|
|
888
882
|
emits: ["navigation-click"],
|
|
889
883
|
setup(e, { emit: t }) {
|
|
890
|
-
bn((
|
|
891
|
-
dc1d91a8: p.value ? "none" : `solid ${g(
|
|
884
|
+
bn((x) => ({
|
|
885
|
+
dc1d91a8: p.value ? "none" : `solid ${g(Sa)} ${g(wa)}`,
|
|
892
886
|
"59ccec5f": u.value && l.value ? "block" : "flex",
|
|
893
887
|
"29318fbe": u.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
894
888
|
"292d0408": u.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
@@ -963,8 +957,8 @@ const le = {
|
|
|
963
957
|
attrs: {
|
|
964
958
|
"data-testid": `${n.item.key}-internal-link`,
|
|
965
959
|
item: n.item,
|
|
966
|
-
onNavigationClick: (
|
|
967
|
-
r("navigation-click",
|
|
960
|
+
onNavigationClick: (x) => {
|
|
961
|
+
r("navigation-click", x);
|
|
968
962
|
}
|
|
969
963
|
}
|
|
970
964
|
};
|
|
@@ -1003,110 +997,110 @@ const le = {
|
|
|
1003
997
|
text: n.item.value
|
|
1004
998
|
};
|
|
1005
999
|
}
|
|
1006
|
-
}), y =
|
|
1007
|
-
return (
|
|
1008
|
-
const C =
|
|
1009
|
-
return m(),
|
|
1010
|
-
|
|
1000
|
+
}), y = M(), { isTruncated: f } = le.useTruncationDetector(y);
|
|
1001
|
+
return (x, T) => {
|
|
1002
|
+
const C = R("KLabel"), U = R("KBadge"), N = R("KCopy"), J = R("KTooltip");
|
|
1003
|
+
return m(), $("div", Ia, [
|
|
1004
|
+
L("div", {
|
|
1011
1005
|
class: "config-card-details-label",
|
|
1012
1006
|
"data-testid": `${e.item.key}-label`
|
|
1013
1007
|
}, [
|
|
1014
|
-
ne(
|
|
1015
|
-
|
|
1016
|
-
default:
|
|
1008
|
+
ne(x.$slots, "label", { item: e.item }, () => [
|
|
1009
|
+
j(C, { "tooltip-attributes": { maxWidth: "500px" } }, Be({
|
|
1010
|
+
default: v(() => [
|
|
1017
1011
|
Z(q(e.item.label) + " ", 1)
|
|
1018
1012
|
]),
|
|
1019
1013
|
_: 2
|
|
1020
1014
|
}, [
|
|
1021
1015
|
s.value ? {
|
|
1022
1016
|
name: "tooltip",
|
|
1023
|
-
fn:
|
|
1024
|
-
|
|
1017
|
+
fn: v(() => [
|
|
1018
|
+
L("div", {
|
|
1025
1019
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1026
1020
|
}, [
|
|
1027
|
-
ne(
|
|
1021
|
+
ne(x.$slots, "label-tooltip", {}, () => [
|
|
1028
1022
|
Z(q(e.item.tooltip), 1)
|
|
1029
1023
|
], !0)
|
|
1030
|
-
], 8,
|
|
1024
|
+
], 8, $a)
|
|
1031
1025
|
]),
|
|
1032
1026
|
key: "0"
|
|
1033
1027
|
} : void 0
|
|
1034
1028
|
]), 1024)
|
|
1035
1029
|
], !0)
|
|
1036
1030
|
], 8, Aa),
|
|
1037
|
-
|
|
1031
|
+
L("div", {
|
|
1038
1032
|
class: "config-card-details-value",
|
|
1039
1033
|
"data-testid": `${e.item.key}-property-value`
|
|
1040
1034
|
}, [
|
|
1041
|
-
ne(
|
|
1035
|
+
ne(x.$slots, e.item.key, {
|
|
1042
1036
|
rowValue: e.item.value
|
|
1043
1037
|
}, () => [
|
|
1044
|
-
l.value ? (m(),
|
|
1045
|
-
(m(),
|
|
1046
|
-
default:
|
|
1047
|
-
c.value.additionalComponent === "KBadge" ? (m(),
|
|
1038
|
+
l.value ? (m(), $("div", ja, [
|
|
1039
|
+
(m(), D(xe(c.value.tag), Ir(Ar(c.value.attrs)), {
|
|
1040
|
+
default: v(() => [
|
|
1041
|
+
c.value.additionalComponent === "KBadge" ? (m(), $("div", {
|
|
1048
1042
|
key: 0,
|
|
1049
1043
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1050
1044
|
}, [
|
|
1051
|
-
(m(!0),
|
|
1052
|
-
key: `${e.item.key}-badge-tag-${
|
|
1045
|
+
(m(!0), $(be, null, ve(e.item.value, (h, _) => (m(), D(U, {
|
|
1046
|
+
key: `${e.item.key}-badge-tag-${_}`,
|
|
1053
1047
|
class: "config-badge",
|
|
1054
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1055
|
-
tooltip:
|
|
1048
|
+
"data-testid": `${e.item.key}-badge-tag-${_}`,
|
|
1049
|
+
tooltip: h,
|
|
1056
1050
|
"truncation-tooltip": ""
|
|
1057
1051
|
}, {
|
|
1058
|
-
default:
|
|
1059
|
-
Z(q(
|
|
1052
|
+
default: v(() => [
|
|
1053
|
+
Z(q(h), 1)
|
|
1060
1054
|
]),
|
|
1061
1055
|
_: 2
|
|
1062
1056
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
1063
|
-
], 8,
|
|
1064
|
-
c.value.additionalComponent === "KCopy" ? (m(),
|
|
1057
|
+
], 8, Oa)) : W("", !0),
|
|
1058
|
+
c.value.additionalComponent === "KCopy" ? (m(), $("div", {
|
|
1065
1059
|
key: 1,
|
|
1066
1060
|
class: "copy-uuid-array",
|
|
1067
1061
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1068
1062
|
}, [
|
|
1069
|
-
(m(!0),
|
|
1070
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1071
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1072
|
-
text:
|
|
1063
|
+
(m(!0), $(be, null, ve(e.item.value, (h, _) => (m(), D(N, $r({ ref_for: !0 }, c.value.childAttrs, {
|
|
1064
|
+
key: `${e.item.key}-copy-uuid-${_}`,
|
|
1065
|
+
"data-testid": `${e.item.key}-copy-uuid-${_}`,
|
|
1066
|
+
text: h
|
|
1073
1067
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
1074
|
-
], 8,
|
|
1068
|
+
], 8, Ma)) : c.value.additionalComponent === "KMethodBadge" ? (m(), $("div", {
|
|
1075
1069
|
key: 2,
|
|
1076
1070
|
class: "method-badge-array",
|
|
1077
1071
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1078
1072
|
}, [
|
|
1079
|
-
(m(!0),
|
|
1080
|
-
key: `${e.item.key}-badge-method-${
|
|
1081
|
-
appearance: Object.values(g(Nr)).includes(
|
|
1073
|
+
(m(!0), $(be, null, ve(e.item.value, (h, _) => (m(), D(U, {
|
|
1074
|
+
key: `${e.item.key}-badge-method-${_}`,
|
|
1075
|
+
appearance: Object.values(g(Nr)).includes(h.toLowerCase()) ? h.toLowerCase() : "custom",
|
|
1082
1076
|
class: "config-badge",
|
|
1083
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1077
|
+
"data-testid": `${e.item.key}-badge-method-${_}`
|
|
1084
1078
|
}, {
|
|
1085
|
-
default:
|
|
1086
|
-
Z(q(
|
|
1079
|
+
default: v(() => [
|
|
1080
|
+
Z(q(h), 1)
|
|
1087
1081
|
]),
|
|
1088
1082
|
_: 2
|
|
1089
1083
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1090
|
-
], 8,
|
|
1091
|
-
c.value.additionalComponent === "JsonCardItem" ? (m(),
|
|
1084
|
+
], 8, Ea)) : W("", !0),
|
|
1085
|
+
c.value.additionalComponent === "JsonCardItem" ? (m(), $("div", {
|
|
1092
1086
|
key: 3,
|
|
1093
1087
|
"data-testid": `${n.item.key}-json-array-content`
|
|
1094
1088
|
}, [
|
|
1095
|
-
(m(!0),
|
|
1096
|
-
key: `json-array-item-${
|
|
1097
|
-
index:
|
|
1089
|
+
(m(!0), $(be, null, ve(e.item.value, (h, _) => (m(), D(An, {
|
|
1090
|
+
key: `json-array-item-${_}`,
|
|
1091
|
+
index: _,
|
|
1098
1092
|
"is-array-item": "",
|
|
1099
|
-
item:
|
|
1093
|
+
item: h
|
|
1100
1094
|
}, null, 8, ["index", "item"]))), 128))
|
|
1101
|
-
], 8,
|
|
1095
|
+
], 8, Fa)) : (m(), D(J, {
|
|
1102
1096
|
key: 4,
|
|
1103
1097
|
text: g(f) ? e.item.value : ""
|
|
1104
1098
|
}, {
|
|
1105
|
-
default:
|
|
1106
|
-
|
|
1099
|
+
default: v(() => [
|
|
1100
|
+
L("span", {
|
|
1107
1101
|
ref_key: "textContent",
|
|
1108
1102
|
ref: y,
|
|
1109
|
-
class:
|
|
1103
|
+
class: Ee(["attrs-data-text", { truncated: e.truncated }])
|
|
1110
1104
|
}, q(c.value.text), 3)
|
|
1111
1105
|
]),
|
|
1112
1106
|
_: 1
|
|
@@ -1114,19 +1108,19 @@ const le = {
|
|
|
1114
1108
|
]),
|
|
1115
1109
|
_: 1
|
|
1116
1110
|
}, 16))
|
|
1117
|
-
])) : (m(),
|
|
1111
|
+
])) : (m(), $("div", {
|
|
1118
1112
|
key: 0,
|
|
1119
1113
|
"data-testid": `${e.item.key}-no-value`
|
|
1120
1114
|
}, " – ", 8, Na))
|
|
1121
1115
|
], !0)
|
|
1122
|
-
], 8,
|
|
1116
|
+
], 8, Ta)
|
|
1123
1117
|
]);
|
|
1124
1118
|
};
|
|
1125
1119
|
}
|
|
1126
|
-
}),
|
|
1120
|
+
}), $n = /* @__PURE__ */ ke(Ka, [["__scopeId", "data-v-d268261c"]]), Ba = { class: "json-config" }, La = {
|
|
1127
1121
|
key: 0,
|
|
1128
1122
|
class: "json-endpoint"
|
|
1129
|
-
},
|
|
1123
|
+
}, Tn = /* @__PURE__ */ X({
|
|
1130
1124
|
__name: "JsonCodeBlock",
|
|
1131
1125
|
props: {
|
|
1132
1126
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1165,18 +1159,18 @@ const le = {
|
|
|
1165
1159
|
return i.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? i[i.length - 1] : i[i.length - 2]).length;
|
|
1166
1160
|
});
|
|
1167
1161
|
return (a, i) => {
|
|
1168
|
-
const o =
|
|
1169
|
-
return m(),
|
|
1170
|
-
t.fetcherUrl ? (m(),
|
|
1171
|
-
|
|
1162
|
+
const o = R("KBadge"), l = R("KCodeBlock");
|
|
1163
|
+
return m(), $("div", Ba, [
|
|
1164
|
+
t.fetcherUrl ? (m(), $("div", La, [
|
|
1165
|
+
j(o, {
|
|
1172
1166
|
appearance: t.requestMethod
|
|
1173
1167
|
}, {
|
|
1174
|
-
default:
|
|
1168
|
+
default: v(() => [
|
|
1175
1169
|
Z(q(t.requestMethod), 1)
|
|
1176
1170
|
]),
|
|
1177
1171
|
_: 1
|
|
1178
1172
|
}, 8, ["appearance"]),
|
|
1179
|
-
|
|
1173
|
+
j(l, {
|
|
1180
1174
|
id: "json-endpoint-codeblock",
|
|
1181
1175
|
code: t.fetcherUrl,
|
|
1182
1176
|
language: "json",
|
|
@@ -1184,10 +1178,10 @@ const le = {
|
|
|
1184
1178
|
theme: "dark"
|
|
1185
1179
|
}, null, 8, ["code"])
|
|
1186
1180
|
])) : W("", !0),
|
|
1187
|
-
t.jsonRecord ? (m(),
|
|
1181
|
+
t.jsonRecord ? (m(), D(l, {
|
|
1188
1182
|
key: 1,
|
|
1189
1183
|
id: "json-codeblock",
|
|
1190
|
-
class:
|
|
1184
|
+
class: Ee({ "json-content": t.fetcherUrl }),
|
|
1191
1185
|
code: JSON.stringify(n.value, null, 2),
|
|
1192
1186
|
language: "json",
|
|
1193
1187
|
theme: "dark"
|
|
@@ -1203,17 +1197,17 @@ function Nn(e) {
|
|
|
1203
1197
|
function Ua(e) {
|
|
1204
1198
|
return typeof e == "object" && e !== null;
|
|
1205
1199
|
}
|
|
1206
|
-
function
|
|
1200
|
+
function Va(e) {
|
|
1207
1201
|
return Array.isArray(e) ? e : Nn(e) ? [] : [e];
|
|
1208
1202
|
}
|
|
1209
|
-
function
|
|
1203
|
+
function Pa(e, t) {
|
|
1210
1204
|
var n, r, a, i;
|
|
1211
1205
|
if (t)
|
|
1212
1206
|
for (i = Object.keys(t), n = 0, r = i.length; n < r; n += 1)
|
|
1213
1207
|
a = i[n], e[a] = t[a];
|
|
1214
1208
|
return e;
|
|
1215
1209
|
}
|
|
1216
|
-
function
|
|
1210
|
+
function Ra(e, t) {
|
|
1217
1211
|
var n = "", r;
|
|
1218
1212
|
for (r = 0; r < t; r += 1)
|
|
1219
1213
|
n += e;
|
|
@@ -1222,7 +1216,7 @@ function Pa(e, t) {
|
|
|
1222
1216
|
function Da(e) {
|
|
1223
1217
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1224
1218
|
}
|
|
1225
|
-
var za = Nn, Ga = Ua, Ha =
|
|
1219
|
+
var za = Nn, Ga = Ua, Ha = Va, Ja = Ra, Wa = Da, Ya = Pa, ie = {
|
|
1226
1220
|
isNothing: za,
|
|
1227
1221
|
isObject: Ga,
|
|
1228
1222
|
toArray: Ha,
|
|
@@ -1377,26 +1371,26 @@ It.prototype.extend = function(e) {
|
|
|
1377
1371
|
var r = Object.create(It.prototype);
|
|
1378
1372
|
return r.implicit = (this.implicit || []).concat(t), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit = en(r, "implicit"), r.compiledExplicit = en(r, "explicit"), r.compiledTypeMap = ro(r.compiledImplicit, r.compiledExplicit), r;
|
|
1379
1373
|
};
|
|
1380
|
-
var
|
|
1374
|
+
var On = It, Mn = new ce("tag:yaml.org,2002:str", {
|
|
1381
1375
|
kind: "scalar",
|
|
1382
1376
|
construct: function(e) {
|
|
1383
1377
|
return e !== null ? e : "";
|
|
1384
1378
|
}
|
|
1385
|
-
}),
|
|
1379
|
+
}), En = new ce("tag:yaml.org,2002:seq", {
|
|
1386
1380
|
kind: "sequence",
|
|
1387
1381
|
construct: function(e) {
|
|
1388
1382
|
return e !== null ? e : [];
|
|
1389
1383
|
}
|
|
1390
|
-
}),
|
|
1384
|
+
}), Fn = new ce("tag:yaml.org,2002:map", {
|
|
1391
1385
|
kind: "mapping",
|
|
1392
1386
|
construct: function(e) {
|
|
1393
1387
|
return e !== null ? e : {};
|
|
1394
1388
|
}
|
|
1395
|
-
}),
|
|
1389
|
+
}), qn = new On({
|
|
1396
1390
|
explicit: [
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1391
|
+
Mn,
|
|
1392
|
+
En,
|
|
1393
|
+
Fn
|
|
1400
1394
|
]
|
|
1401
1395
|
});
|
|
1402
1396
|
function ao(e) {
|
|
@@ -1410,7 +1404,7 @@ function oo() {
|
|
|
1410
1404
|
function io(e) {
|
|
1411
1405
|
return e === null;
|
|
1412
1406
|
}
|
|
1413
|
-
var
|
|
1407
|
+
var Kn = new ce("tag:yaml.org,2002:null", {
|
|
1414
1408
|
kind: "scalar",
|
|
1415
1409
|
resolve: ao,
|
|
1416
1410
|
construct: oo,
|
|
@@ -1445,7 +1439,7 @@ function so(e) {
|
|
|
1445
1439
|
function uo(e) {
|
|
1446
1440
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1447
1441
|
}
|
|
1448
|
-
var
|
|
1442
|
+
var Bn = new ce("tag:yaml.org,2002:bool", {
|
|
1449
1443
|
kind: "scalar",
|
|
1450
1444
|
resolve: lo,
|
|
1451
1445
|
construct: so,
|
|
@@ -1609,24 +1603,24 @@ var Un = new ce("tag:yaml.org,2002:float", {
|
|
|
1609
1603
|
predicate: wo,
|
|
1610
1604
|
represent: Co,
|
|
1611
1605
|
defaultStyle: "lowercase"
|
|
1612
|
-
}),
|
|
1606
|
+
}), Vn = qn.extend({
|
|
1613
1607
|
implicit: [
|
|
1614
|
-
Bn,
|
|
1615
1608
|
Kn,
|
|
1609
|
+
Bn,
|
|
1616
1610
|
Ln,
|
|
1617
1611
|
Un
|
|
1618
1612
|
]
|
|
1619
|
-
}),
|
|
1613
|
+
}), Pn = Vn, Rn = new RegExp(
|
|
1620
1614
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1621
1615
|
), Dn = new RegExp(
|
|
1622
1616
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
1623
1617
|
);
|
|
1624
1618
|
function _o(e) {
|
|
1625
|
-
return e === null ? !1 :
|
|
1619
|
+
return e === null ? !1 : Rn.exec(e) !== null || Dn.exec(e) !== null;
|
|
1626
1620
|
}
|
|
1627
|
-
function
|
|
1621
|
+
function So(e) {
|
|
1628
1622
|
var t, n, r, a, i, o, l, s = 0, u = null, p, c, y;
|
|
1629
|
-
if (t =
|
|
1623
|
+
if (t = Rn.exec(e), t === null && (t = Dn.exec(e)), t === null) throw new Error("Date resolve error");
|
|
1630
1624
|
if (n = +t[1], r = +t[2] - 1, a = +t[3], !t[4])
|
|
1631
1625
|
return new Date(Date.UTC(n, r, a));
|
|
1632
1626
|
if (i = +t[4], o = +t[5], l = +t[6], t[7]) {
|
|
@@ -1636,15 +1630,15 @@ function xo(e) {
|
|
|
1636
1630
|
}
|
|
1637
1631
|
return t[9] && (p = +t[10], c = +(t[11] || 0), u = (p * 60 + c) * 6e4, t[9] === "-" && (u = -u)), y = new Date(Date.UTC(n, r, a, i, o, l, s)), u && y.setTime(y.getTime() - u), y;
|
|
1638
1632
|
}
|
|
1639
|
-
function
|
|
1633
|
+
function xo(e) {
|
|
1640
1634
|
return e.toISOString();
|
|
1641
1635
|
}
|
|
1642
1636
|
var zn = new ce("tag:yaml.org,2002:timestamp", {
|
|
1643
1637
|
kind: "scalar",
|
|
1644
1638
|
resolve: _o,
|
|
1645
|
-
construct:
|
|
1639
|
+
construct: So,
|
|
1646
1640
|
instanceOf: Date,
|
|
1647
|
-
represent:
|
|
1641
|
+
represent: xo
|
|
1648
1642
|
});
|
|
1649
1643
|
function Io(e) {
|
|
1650
1644
|
return e === "<<" || e === null;
|
|
@@ -1652,11 +1646,11 @@ function Io(e) {
|
|
|
1652
1646
|
var Gn = new ce("tag:yaml.org,2002:merge", {
|
|
1653
1647
|
kind: "scalar",
|
|
1654
1648
|
resolve: Io
|
|
1655
|
-
}),
|
|
1649
|
+
}), Et = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1656
1650
|
\r`;
|
|
1657
1651
|
function Ao(e) {
|
|
1658
1652
|
if (e === null) return !1;
|
|
1659
|
-
var t, n, r = 0, a = e.length, i =
|
|
1653
|
+
var t, n, r = 0, a = e.length, i = Et;
|
|
1660
1654
|
for (n = 0; n < a; n++)
|
|
1661
1655
|
if (t = i.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1662
1656
|
if (t < 0) return !1;
|
|
@@ -1664,14 +1658,14 @@ function Ao(e) {
|
|
|
1664
1658
|
}
|
|
1665
1659
|
return r % 8 === 0;
|
|
1666
1660
|
}
|
|
1667
|
-
function
|
|
1668
|
-
var t, n, r = e.replace(/[\r\n=]/g, ""), a = r.length, i =
|
|
1661
|
+
function $o(e) {
|
|
1662
|
+
var t, n, r = e.replace(/[\r\n=]/g, ""), a = r.length, i = Et, o = 0, l = [];
|
|
1669
1663
|
for (t = 0; t < a; t++)
|
|
1670
1664
|
t % 4 === 0 && t && (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)), o = o << 6 | i.indexOf(r.charAt(t));
|
|
1671
1665
|
return n = a % 4 * 6, n === 0 ? (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)) : n === 18 ? (l.push(o >> 10 & 255), l.push(o >> 2 & 255)) : n === 12 && l.push(o >> 4 & 255), new Uint8Array(l);
|
|
1672
1666
|
}
|
|
1673
|
-
function
|
|
1674
|
-
var t = "", n = 0, r, a, i = e.length, o =
|
|
1667
|
+
function To(e) {
|
|
1668
|
+
var t = "", n = 0, r, a, i = e.length, o = Et;
|
|
1675
1669
|
for (r = 0; r < i; r++)
|
|
1676
1670
|
r % 3 === 0 && r && (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]), n = (n << 8) + e[r];
|
|
1677
1671
|
return a = i % 3, a === 0 ? (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]) : a === 2 ? (t += o[n >> 10 & 63], t += o[n >> 4 & 63], t += o[n << 2 & 63], t += o[64]) : a === 1 && (t += o[n >> 2 & 63], t += o[n << 4 & 63], t += o[64], t += o[64]), t;
|
|
@@ -1682,15 +1676,15 @@ function No(e) {
|
|
|
1682
1676
|
var Hn = new ce("tag:yaml.org,2002:binary", {
|
|
1683
1677
|
kind: "scalar",
|
|
1684
1678
|
resolve: Ao,
|
|
1685
|
-
construct:
|
|
1679
|
+
construct: $o,
|
|
1686
1680
|
predicate: No,
|
|
1687
|
-
represent:
|
|
1688
|
-
}), jo = Object.prototype.hasOwnProperty,
|
|
1689
|
-
function
|
|
1681
|
+
represent: To
|
|
1682
|
+
}), jo = Object.prototype.hasOwnProperty, Oo = Object.prototype.toString;
|
|
1683
|
+
function Mo(e) {
|
|
1690
1684
|
if (e === null) return !0;
|
|
1691
1685
|
var t = [], n, r, a, i, o, l = e;
|
|
1692
1686
|
for (n = 0, r = l.length; n < r; n += 1) {
|
|
1693
|
-
if (a = l[n], o = !1,
|
|
1687
|
+
if (a = l[n], o = !1, Oo.call(a) !== "[object Object]") return !1;
|
|
1694
1688
|
for (i in a)
|
|
1695
1689
|
if (jo.call(a, i))
|
|
1696
1690
|
if (!o) o = !0;
|
|
@@ -1701,24 +1695,24 @@ function Oo(e) {
|
|
|
1701
1695
|
}
|
|
1702
1696
|
return !0;
|
|
1703
1697
|
}
|
|
1704
|
-
function
|
|
1698
|
+
function Eo(e) {
|
|
1705
1699
|
return e !== null ? e : [];
|
|
1706
1700
|
}
|
|
1707
1701
|
var Jn = new ce("tag:yaml.org,2002:omap", {
|
|
1708
1702
|
kind: "sequence",
|
|
1709
|
-
resolve:
|
|
1710
|
-
construct:
|
|
1711
|
-
}),
|
|
1712
|
-
function
|
|
1703
|
+
resolve: Mo,
|
|
1704
|
+
construct: Eo
|
|
1705
|
+
}), Fo = Object.prototype.toString;
|
|
1706
|
+
function qo(e) {
|
|
1713
1707
|
if (e === null) return !0;
|
|
1714
1708
|
var t, n, r, a, i, o = e;
|
|
1715
1709
|
for (i = new Array(o.length), t = 0, n = o.length; t < n; t += 1) {
|
|
1716
|
-
if (r = o[t],
|
|
1710
|
+
if (r = o[t], Fo.call(r) !== "[object Object]" || (a = Object.keys(r), a.length !== 1)) return !1;
|
|
1717
1711
|
i[t] = [a[0], r[a[0]]];
|
|
1718
1712
|
}
|
|
1719
1713
|
return !0;
|
|
1720
1714
|
}
|
|
1721
|
-
function
|
|
1715
|
+
function Ko(e) {
|
|
1722
1716
|
if (e === null) return [];
|
|
1723
1717
|
var t, n, r, a, i, o = e;
|
|
1724
1718
|
for (i = new Array(o.length), t = 0, n = o.length; t < n; t += 1)
|
|
@@ -1727,14 +1721,14 @@ function Bo(e) {
|
|
|
1727
1721
|
}
|
|
1728
1722
|
var Wn = new ce("tag:yaml.org,2002:pairs", {
|
|
1729
1723
|
kind: "sequence",
|
|
1730
|
-
resolve:
|
|
1731
|
-
construct:
|
|
1732
|
-
}),
|
|
1724
|
+
resolve: qo,
|
|
1725
|
+
construct: Ko
|
|
1726
|
+
}), Bo = Object.prototype.hasOwnProperty;
|
|
1733
1727
|
function Lo(e) {
|
|
1734
1728
|
if (e === null) return !0;
|
|
1735
1729
|
var t, n = e;
|
|
1736
1730
|
for (t in n)
|
|
1737
|
-
if (
|
|
1731
|
+
if (Bo.call(n, t) && n[t] !== null)
|
|
1738
1732
|
return !1;
|
|
1739
1733
|
return !0;
|
|
1740
1734
|
}
|
|
@@ -1745,7 +1739,7 @@ var Yn = new ce("tag:yaml.org,2002:set", {
|
|
|
1745
1739
|
kind: "mapping",
|
|
1746
1740
|
resolve: Lo,
|
|
1747
1741
|
construct: Uo
|
|
1748
|
-
}),
|
|
1742
|
+
}), Ft = Pn.extend({
|
|
1749
1743
|
implicit: [
|
|
1750
1744
|
zn,
|
|
1751
1745
|
Gn
|
|
@@ -1756,14 +1750,14 @@ var Yn = new ce("tag:yaml.org,2002:set", {
|
|
|
1756
1750
|
Wn,
|
|
1757
1751
|
Yn
|
|
1758
1752
|
]
|
|
1759
|
-
}),
|
|
1753
|
+
}), Fe = Object.prototype.hasOwnProperty, ct = 1, Zn = 2, Qn = 3, dt = 4, St = 1, Vo = 2, tn = 3, Po = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Ro = /[\x85\u2028\u2029]/, Do = /[,\[\]\{\}]/, Xn = /^(?:!|!!|![a-z\-]+!)$/i, er = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1760
1754
|
function nn(e) {
|
|
1761
1755
|
return Object.prototype.toString.call(e);
|
|
1762
1756
|
}
|
|
1763
1757
|
function _e(e) {
|
|
1764
1758
|
return e === 10 || e === 13;
|
|
1765
1759
|
}
|
|
1766
|
-
function
|
|
1760
|
+
function Ke(e) {
|
|
1767
1761
|
return e === 9 || e === 32;
|
|
1768
1762
|
}
|
|
1769
1763
|
function ye(e) {
|
|
@@ -1793,10 +1787,10 @@ function Jo(e) {
|
|
|
1793
1787
|
);
|
|
1794
1788
|
}
|
|
1795
1789
|
var tr = new Array(256), nr = new Array(256);
|
|
1796
|
-
for (var
|
|
1797
|
-
tr[
|
|
1790
|
+
for (var Pe = 0; Pe < 256; Pe++)
|
|
1791
|
+
tr[Pe] = rn(Pe) ? 1 : 0, nr[Pe] = rn(Pe);
|
|
1798
1792
|
function Wo(e, t) {
|
|
1799
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema ||
|
|
1793
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || Ft, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.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 = [];
|
|
1800
1794
|
}
|
|
1801
1795
|
function rr(e, t) {
|
|
1802
1796
|
var n = {
|
|
@@ -1809,7 +1803,7 @@ function rr(e, t) {
|
|
|
1809
1803
|
};
|
|
1810
1804
|
return n.snippet = Qa(n), new fe(t, n);
|
|
1811
1805
|
}
|
|
1812
|
-
function
|
|
1806
|
+
function O(e, t) {
|
|
1813
1807
|
throw rr(e, t);
|
|
1814
1808
|
}
|
|
1815
1809
|
function pt(e, t) {
|
|
@@ -1818,39 +1812,39 @@ function pt(e, t) {
|
|
|
1818
1812
|
var an = {
|
|
1819
1813
|
YAML: function(e, t, n) {
|
|
1820
1814
|
var r, a, i;
|
|
1821
|
-
e.version !== null &&
|
|
1815
|
+
e.version !== null && O(e, "duplication of %YAML directive"), n.length !== 1 && O(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), r === null && O(e, "ill-formed argument of the YAML directive"), a = parseInt(r[1], 10), i = parseInt(r[2], 10), a !== 1 && O(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = i < 2, i !== 1 && i !== 2 && pt(e, "unsupported YAML version of the document");
|
|
1822
1816
|
},
|
|
1823
1817
|
TAG: function(e, t, n) {
|
|
1824
1818
|
var r, a;
|
|
1825
|
-
n.length !== 2 &&
|
|
1819
|
+
n.length !== 2 && O(e, "TAG directive accepts exactly two arguments"), r = n[0], a = n[1], Xn.test(r) || O(e, "ill-formed tag handle (first argument) of the TAG directive"), Fe.call(e.tagMap, r) && O(e, 'there is a previously declared suffix for "' + r + '" tag handle'), er.test(a) || O(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1826
1820
|
try {
|
|
1827
1821
|
a = decodeURIComponent(a);
|
|
1828
1822
|
} catch {
|
|
1829
|
-
|
|
1823
|
+
O(e, "tag prefix is malformed: " + a);
|
|
1830
1824
|
}
|
|
1831
1825
|
e.tagMap[r] = a;
|
|
1832
1826
|
}
|
|
1833
1827
|
};
|
|
1834
|
-
function
|
|
1828
|
+
function Me(e, t, n, r) {
|
|
1835
1829
|
var a, i, o, l;
|
|
1836
1830
|
if (t < n) {
|
|
1837
1831
|
if (l = e.input.slice(t, n), r)
|
|
1838
1832
|
for (a = 0, i = l.length; a < i; a += 1)
|
|
1839
|
-
o = l.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 ||
|
|
1840
|
-
else
|
|
1833
|
+
o = l.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 || O(e, "expected valid JSON character");
|
|
1834
|
+
else Po.test(l) && O(e, "the stream contains non-printable characters");
|
|
1841
1835
|
e.result += l;
|
|
1842
1836
|
}
|
|
1843
1837
|
}
|
|
1844
1838
|
function on(e, t, n, r) {
|
|
1845
1839
|
var a, i, o, l;
|
|
1846
|
-
for (ie.isObject(n) ||
|
|
1847
|
-
i = a[o],
|
|
1840
|
+
for (ie.isObject(n) || O(e, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(n), o = 0, l = a.length; o < l; o += 1)
|
|
1841
|
+
i = a[o], Fe.call(t, i) || (t[i] = n[i], r[i] = !0);
|
|
1848
1842
|
}
|
|
1849
1843
|
function ze(e, t, n, r, a, i, o, l, s) {
|
|
1850
1844
|
var u, p;
|
|
1851
1845
|
if (Array.isArray(a))
|
|
1852
1846
|
for (a = Array.prototype.slice.call(a), u = 0, p = a.length; u < p; u += 1)
|
|
1853
|
-
Array.isArray(a[u]) &&
|
|
1847
|
+
Array.isArray(a[u]) && O(e, "nested arrays are not supported inside keys"), typeof a == "object" && nn(a[u]) === "[object Object]" && (a[u] = "[object Object]");
|
|
1854
1848
|
if (typeof a == "object" && nn(a) === "[object Object]" && (a = "[object Object]"), a = String(a), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1855
1849
|
if (Array.isArray(i))
|
|
1856
1850
|
for (u = 0, p = i.length; u < p; u += 1)
|
|
@@ -1858,7 +1852,7 @@ function ze(e, t, n, r, a, i, o, l, s) {
|
|
|
1858
1852
|
else
|
|
1859
1853
|
on(e, t, i, n);
|
|
1860
1854
|
else
|
|
1861
|
-
!e.json && !
|
|
1855
|
+
!e.json && !Fe.call(n, a) && Fe.call(t, a) && (e.line = o || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, O(e, "duplicated mapping key")), a === "__proto__" ? Object.defineProperty(t, a, {
|
|
1862
1856
|
configurable: !0,
|
|
1863
1857
|
enumerable: !0,
|
|
1864
1858
|
writable: !0,
|
|
@@ -1866,20 +1860,20 @@ function ze(e, t, n, r, a, i, o, l, s) {
|
|
|
1866
1860
|
}) : t[a] = i, delete n[a];
|
|
1867
1861
|
return t;
|
|
1868
1862
|
}
|
|
1869
|
-
function
|
|
1863
|
+
function qt(e) {
|
|
1870
1864
|
var t;
|
|
1871
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1865
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : O(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1872
1866
|
}
|
|
1873
1867
|
function oe(e, t, n) {
|
|
1874
1868
|
for (var r = 0, a = e.input.charCodeAt(e.position); a !== 0; ) {
|
|
1875
|
-
for (;
|
|
1869
|
+
for (; Ke(a); )
|
|
1876
1870
|
a === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), a = e.input.charCodeAt(++e.position);
|
|
1877
1871
|
if (t && a === 35)
|
|
1878
1872
|
do
|
|
1879
1873
|
a = e.input.charCodeAt(++e.position);
|
|
1880
1874
|
while (a !== 10 && a !== 13 && a !== 0);
|
|
1881
1875
|
if (_e(a))
|
|
1882
|
-
for (
|
|
1876
|
+
for (qt(e), a = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; a === 32; )
|
|
1883
1877
|
e.lineIndent++, a = e.input.charCodeAt(++e.position);
|
|
1884
1878
|
else
|
|
1885
1879
|
break;
|
|
@@ -1890,7 +1884,7 @@ function vt(e) {
|
|
|
1890
1884
|
var t = e.position, n;
|
|
1891
1885
|
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || ye(n)));
|
|
1892
1886
|
}
|
|
1893
|
-
function
|
|
1887
|
+
function Kt(e, t) {
|
|
1894
1888
|
t === 1 ? e.result += " " : t > 1 && (e.result += ie.repeat(`
|
|
1895
1889
|
`, t - 1));
|
|
1896
1890
|
}
|
|
@@ -1917,9 +1911,9 @@ function Yo(e, t, n) {
|
|
|
1917
1911
|
break;
|
|
1918
1912
|
}
|
|
1919
1913
|
}
|
|
1920
|
-
l && (
|
|
1914
|
+
l && (Me(e, i, o, !1), Kt(e, e.line - s), i = o = e.position, l = !1), Ke(f) || (o = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1921
1915
|
}
|
|
1922
|
-
return
|
|
1916
|
+
return Me(e, i, o, !1), e.result ? !0 : (e.kind = c, e.result = y, !1);
|
|
1923
1917
|
}
|
|
1924
1918
|
function Zo(e, t) {
|
|
1925
1919
|
var n, r, a;
|
|
@@ -1927,12 +1921,12 @@ function Zo(e, t) {
|
|
|
1927
1921
|
return !1;
|
|
1928
1922
|
for (e.kind = "scalar", e.result = "", e.position++, r = a = e.position; (n = e.input.charCodeAt(e.position)) !== 0; )
|
|
1929
1923
|
if (n === 39)
|
|
1930
|
-
if (
|
|
1924
|
+
if (Me(e, r, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39)
|
|
1931
1925
|
r = e.position, e.position++, a = e.position;
|
|
1932
1926
|
else
|
|
1933
1927
|
return !0;
|
|
1934
|
-
else _e(n) ? (
|
|
1935
|
-
|
|
1928
|
+
else _e(n) ? (Me(e, r, a, !0), Kt(e, oe(e, !1, t)), r = a = e.position) : e.position === e.lineStart && vt(e) ? O(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
|
|
1929
|
+
O(e, "unexpected end of the stream within a single quoted scalar");
|
|
1936
1930
|
}
|
|
1937
1931
|
function Qo(e, t) {
|
|
1938
1932
|
var n, r, a, i, o, l;
|
|
@@ -1940,40 +1934,40 @@ function Qo(e, t) {
|
|
|
1940
1934
|
return !1;
|
|
1941
1935
|
for (e.kind = "scalar", e.result = "", e.position++, n = r = e.position; (l = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1942
1936
|
if (l === 34)
|
|
1943
|
-
return
|
|
1937
|
+
return Me(e, n, e.position, !0), e.position++, !0;
|
|
1944
1938
|
if (l === 92) {
|
|
1945
|
-
if (
|
|
1939
|
+
if (Me(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), _e(l))
|
|
1946
1940
|
oe(e, !1, t);
|
|
1947
1941
|
else if (l < 256 && tr[l])
|
|
1948
1942
|
e.result += nr[l], e.position++;
|
|
1949
1943
|
else if ((o = Go(l)) > 0) {
|
|
1950
1944
|
for (a = o, i = 0; a > 0; a--)
|
|
1951
|
-
l = e.input.charCodeAt(++e.position), (o = zo(l)) >= 0 ? i = (i << 4) + o :
|
|
1945
|
+
l = e.input.charCodeAt(++e.position), (o = zo(l)) >= 0 ? i = (i << 4) + o : O(e, "expected hexadecimal character");
|
|
1952
1946
|
e.result += Jo(i), e.position++;
|
|
1953
1947
|
} else
|
|
1954
|
-
|
|
1948
|
+
O(e, "unknown escape sequence");
|
|
1955
1949
|
n = r = e.position;
|
|
1956
|
-
} else _e(l) ? (
|
|
1950
|
+
} else _e(l) ? (Me(e, n, r, !0), Kt(e, oe(e, !1, t)), n = r = e.position) : e.position === e.lineStart && vt(e) ? O(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1957
1951
|
}
|
|
1958
|
-
|
|
1952
|
+
O(e, "unexpected end of the stream within a double quoted scalar");
|
|
1959
1953
|
}
|
|
1960
1954
|
function Xo(e, t) {
|
|
1961
|
-
var n = !0, r, a, i, o = e.tag, l, s = e.anchor, u, p, c, y, f,
|
|
1962
|
-
if (
|
|
1955
|
+
var n = !0, r, a, i, o = e.tag, l, s = e.anchor, u, p, c, y, f, x = /* @__PURE__ */ Object.create(null), T, C, U, N;
|
|
1956
|
+
if (N = e.input.charCodeAt(e.position), N === 91)
|
|
1963
1957
|
p = 93, f = !1, l = [];
|
|
1964
|
-
else if (
|
|
1958
|
+
else if (N === 123)
|
|
1965
1959
|
p = 125, f = !0, l = {};
|
|
1966
1960
|
else
|
|
1967
1961
|
return !1;
|
|
1968
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1969
|
-
if (oe(e, !0, t),
|
|
1962
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), N = e.input.charCodeAt(++e.position); N !== 0; ) {
|
|
1963
|
+
if (oe(e, !0, t), N = e.input.charCodeAt(e.position), N === p)
|
|
1970
1964
|
return e.position++, e.tag = o, e.anchor = s, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1971
|
-
n ?
|
|
1965
|
+
n ? N === 44 && O(e, "expected the node content, but found ','") : O(e, "missed comma between flow collection entries"), C = T = U = null, c = y = !1, N === 63 && (u = e.input.charCodeAt(e.position + 1), ye(u) && (c = y = !0, e.position++, oe(e, !0, t))), r = e.line, a = e.lineStart, i = e.position, Ge(e, t, ct, !1, !0), C = e.tag, T = e.result, oe(e, !0, t), N = e.input.charCodeAt(e.position), (y || e.line === r) && N === 58 && (c = !0, N = e.input.charCodeAt(++e.position), oe(e, !0, t), Ge(e, t, ct, !1, !0), U = e.result), f ? ze(e, l, x, C, T, U, r, a, i) : c ? l.push(ze(e, null, x, C, T, U, r, a, i)) : l.push(T), oe(e, !0, t), N = e.input.charCodeAt(e.position), N === 44 ? (n = !0, N = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1972
1966
|
}
|
|
1973
|
-
|
|
1967
|
+
O(e, "unexpected end of the stream within a flow collection");
|
|
1974
1968
|
}
|
|
1975
1969
|
function ei(e, t) {
|
|
1976
|
-
var n, r, a =
|
|
1970
|
+
var n, r, a = St, i = !1, o = !1, l = t, s = 0, u = !1, p, c;
|
|
1977
1971
|
if (c = e.input.charCodeAt(e.position), c === 124)
|
|
1978
1972
|
r = !1;
|
|
1979
1973
|
else if (c === 62)
|
|
@@ -1982,22 +1976,22 @@ function ei(e, t) {
|
|
|
1982
1976
|
return !1;
|
|
1983
1977
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
1984
1978
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
1985
|
-
|
|
1979
|
+
St === a ? a = c === 43 ? tn : Vo : O(e, "repeat of a chomping mode identifier");
|
|
1986
1980
|
else if ((p = Ho(c)) >= 0)
|
|
1987
|
-
p === 0 ?
|
|
1981
|
+
p === 0 ? O(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? O(e, "repeat of an indentation width identifier") : (l = t + p - 1, o = !0);
|
|
1988
1982
|
else
|
|
1989
1983
|
break;
|
|
1990
|
-
if (
|
|
1984
|
+
if (Ke(c)) {
|
|
1991
1985
|
do
|
|
1992
1986
|
c = e.input.charCodeAt(++e.position);
|
|
1993
|
-
while (
|
|
1987
|
+
while (Ke(c));
|
|
1994
1988
|
if (c === 35)
|
|
1995
1989
|
do
|
|
1996
1990
|
c = e.input.charCodeAt(++e.position);
|
|
1997
1991
|
while (!_e(c) && c !== 0);
|
|
1998
1992
|
}
|
|
1999
1993
|
for (; c !== 0; ) {
|
|
2000
|
-
for (
|
|
1994
|
+
for (qt(e), e.lineIndent = 0, c = e.input.charCodeAt(e.position); (!o || e.lineIndent < l) && c === 32; )
|
|
2001
1995
|
e.lineIndent++, c = e.input.charCodeAt(++e.position);
|
|
2002
1996
|
if (!o && e.lineIndent > l && (l = e.lineIndent), _e(c)) {
|
|
2003
1997
|
s++;
|
|
@@ -2005,123 +1999,123 @@ function ei(e, t) {
|
|
|
2005
1999
|
}
|
|
2006
2000
|
if (e.lineIndent < l) {
|
|
2007
2001
|
a === tn ? e.result += ie.repeat(`
|
|
2008
|
-
`, i ? 1 + s : s) : a ===
|
|
2002
|
+
`, i ? 1 + s : s) : a === St && i && (e.result += `
|
|
2009
2003
|
`);
|
|
2010
2004
|
break;
|
|
2011
2005
|
}
|
|
2012
|
-
for (r ?
|
|
2006
|
+
for (r ? Ke(c) ? (u = !0, e.result += ie.repeat(`
|
|
2013
2007
|
`, i ? 1 + s : s)) : u ? (u = !1, e.result += ie.repeat(`
|
|
2014
2008
|
`, s + 1)) : s === 0 ? i && (e.result += " ") : e.result += ie.repeat(`
|
|
2015
2009
|
`, s) : e.result += ie.repeat(`
|
|
2016
2010
|
`, i ? 1 + s : s), i = !0, o = !0, s = 0, n = e.position; !_e(c) && c !== 0; )
|
|
2017
2011
|
c = e.input.charCodeAt(++e.position);
|
|
2018
|
-
|
|
2012
|
+
Me(e, n, e.position, !1);
|
|
2019
2013
|
}
|
|
2020
2014
|
return !0;
|
|
2021
2015
|
}
|
|
2022
2016
|
function ln(e, t) {
|
|
2023
2017
|
var n, r = e.tag, a = e.anchor, i = [], o, l = !1, s;
|
|
2024
2018
|
if (e.firstTabInLine !== -1) return !1;
|
|
2025
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2019
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, O(e, "tab characters must not be used in indentation")), !(s !== 45 || (o = e.input.charCodeAt(e.position + 1), !ye(o)))); ) {
|
|
2026
2020
|
if (l = !0, e.position++, oe(e, !0, -1) && e.lineIndent <= t) {
|
|
2027
2021
|
i.push(null), s = e.input.charCodeAt(e.position);
|
|
2028
2022
|
continue;
|
|
2029
2023
|
}
|
|
2030
2024
|
if (n = e.line, Ge(e, t, Qn, !1, !0), i.push(e.result), oe(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
2031
|
-
|
|
2025
|
+
O(e, "bad indentation of a sequence entry");
|
|
2032
2026
|
else if (e.lineIndent < t)
|
|
2033
2027
|
break;
|
|
2034
2028
|
}
|
|
2035
2029
|
return l ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = i, !0) : !1;
|
|
2036
2030
|
}
|
|
2037
2031
|
function ti(e, t, n) {
|
|
2038
|
-
var r, a, i, o, l, s, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), f = null,
|
|
2032
|
+
var r, a, i, o, l, s, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), f = null, x = null, T = null, C = !1, U = !1, N;
|
|
2039
2033
|
if (e.firstTabInLine !== -1) return !1;
|
|
2040
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = c),
|
|
2041
|
-
if (!C && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2042
|
-
|
|
2034
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), N = e.input.charCodeAt(e.position); N !== 0; ) {
|
|
2035
|
+
if (!C && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, O(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), i = e.line, (N === 63 || N === 58) && ye(r))
|
|
2036
|
+
N === 63 ? (C && (ze(e, c, y, f, x, null, o, l, s), f = x = T = null), U = !0, C = !0, a = !0) : C ? (C = !1, a = !0) : O(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, N = r;
|
|
2043
2037
|
else {
|
|
2044
2038
|
if (o = e.line, l = e.lineStart, s = e.position, !Ge(e, n, Zn, !1, !0))
|
|
2045
2039
|
break;
|
|
2046
2040
|
if (e.line === i) {
|
|
2047
|
-
for (
|
|
2048
|
-
|
|
2049
|
-
if (
|
|
2050
|
-
|
|
2051
|
-
else if (
|
|
2052
|
-
|
|
2041
|
+
for (N = e.input.charCodeAt(e.position); Ke(N); )
|
|
2042
|
+
N = e.input.charCodeAt(++e.position);
|
|
2043
|
+
if (N === 58)
|
|
2044
|
+
N = e.input.charCodeAt(++e.position), ye(N) || O(e, "a whitespace character is expected after the key-value separator within a block mapping"), C && (ze(e, c, y, f, x, null, o, l, s), f = x = T = null), U = !0, C = !1, a = !1, f = e.tag, x = e.result;
|
|
2045
|
+
else if (U)
|
|
2046
|
+
O(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2053
2047
|
else
|
|
2054
2048
|
return e.tag = u, e.anchor = p, !0;
|
|
2055
|
-
} else if (
|
|
2056
|
-
|
|
2049
|
+
} else if (U)
|
|
2050
|
+
O(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2057
2051
|
else
|
|
2058
2052
|
return e.tag = u, e.anchor = p, !0;
|
|
2059
2053
|
}
|
|
2060
|
-
if ((e.line === i || e.lineIndent > t) && (C && (o = e.line, l = e.lineStart, s = e.position), Ge(e, t, dt, !0, a) && (C ?
|
|
2061
|
-
|
|
2054
|
+
if ((e.line === i || e.lineIndent > t) && (C && (o = e.line, l = e.lineStart, s = e.position), Ge(e, t, dt, !0, a) && (C ? x = e.result : T = e.result), C || (ze(e, c, y, f, x, T, o, l, s), f = x = T = null), oe(e, !0, -1), N = e.input.charCodeAt(e.position)), (e.line === i || e.lineIndent > t) && N !== 0)
|
|
2055
|
+
O(e, "bad indentation of a mapping entry");
|
|
2062
2056
|
else if (e.lineIndent < t)
|
|
2063
2057
|
break;
|
|
2064
2058
|
}
|
|
2065
|
-
return C && ze(e, c, y, f,
|
|
2059
|
+
return C && ze(e, c, y, f, x, null, o, l, s), U && (e.tag = u, e.anchor = p, e.kind = "mapping", e.result = c), U;
|
|
2066
2060
|
}
|
|
2067
2061
|
function ni(e) {
|
|
2068
2062
|
var t, n = !1, r = !1, a, i, o;
|
|
2069
2063
|
if (o = e.input.charCodeAt(e.position), o !== 33) return !1;
|
|
2070
|
-
if (e.tag !== null &&
|
|
2064
|
+
if (e.tag !== null && O(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (n = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (r = !0, a = "!!", o = e.input.charCodeAt(++e.position)) : a = "!", t = e.position, n) {
|
|
2071
2065
|
do
|
|
2072
2066
|
o = e.input.charCodeAt(++e.position);
|
|
2073
2067
|
while (o !== 0 && o !== 62);
|
|
2074
|
-
e.position < e.length ? (i = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) :
|
|
2068
|
+
e.position < e.length ? (i = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) : O(e, "unexpected end of the stream within a verbatim tag");
|
|
2075
2069
|
} else {
|
|
2076
2070
|
for (; o !== 0 && !ye(o); )
|
|
2077
|
-
o === 33 && (r ?
|
|
2078
|
-
i = e.input.slice(t, e.position), Do.test(i) &&
|
|
2071
|
+
o === 33 && (r ? O(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(t - 1, e.position + 1), Xn.test(a) || O(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
2072
|
+
i = e.input.slice(t, e.position), Do.test(i) && O(e, "tag suffix cannot contain flow indicator characters");
|
|
2079
2073
|
}
|
|
2080
|
-
i && !er.test(i) &&
|
|
2074
|
+
i && !er.test(i) && O(e, "tag name cannot contain such characters: " + i);
|
|
2081
2075
|
try {
|
|
2082
2076
|
i = decodeURIComponent(i);
|
|
2083
2077
|
} catch {
|
|
2084
|
-
|
|
2078
|
+
O(e, "tag name is malformed: " + i);
|
|
2085
2079
|
}
|
|
2086
|
-
return n ? e.tag = i :
|
|
2080
|
+
return n ? e.tag = i : Fe.call(e.tagMap, a) ? e.tag = e.tagMap[a] + i : a === "!" ? e.tag = "!" + i : a === "!!" ? e.tag = "tag:yaml.org,2002:" + i : O(e, 'undeclared tag handle "' + a + '"'), !0;
|
|
2087
2081
|
}
|
|
2088
2082
|
function ri(e) {
|
|
2089
2083
|
var t, n;
|
|
2090
2084
|
if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
|
|
2091
|
-
for (e.anchor !== null &&
|
|
2085
|
+
for (e.anchor !== null && O(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !ye(n) && !De(n); )
|
|
2092
2086
|
n = e.input.charCodeAt(++e.position);
|
|
2093
|
-
return e.position === t &&
|
|
2087
|
+
return e.position === t && O(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
2094
2088
|
}
|
|
2095
2089
|
function ai(e) {
|
|
2096
2090
|
var t, n, r;
|
|
2097
2091
|
if (r = e.input.charCodeAt(e.position), r !== 42) return !1;
|
|
2098
2092
|
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !ye(r) && !De(r); )
|
|
2099
2093
|
r = e.input.charCodeAt(++e.position);
|
|
2100
|
-
return e.position === t &&
|
|
2094
|
+
return e.position === t && O(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), Fe.call(e.anchorMap, n) || O(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], oe(e, !0, -1), !0;
|
|
2101
2095
|
}
|
|
2102
2096
|
function Ge(e, t, n, r, a) {
|
|
2103
|
-
var i, o, l, s = 1, u = !1, p = !1, c, y, f,
|
|
2097
|
+
var i, o, l, s = 1, u = !1, p = !1, c, y, f, x, T, C;
|
|
2104
2098
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = o = l = dt === n || Qn === n, r && oe(e, !0, -1) && (u = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
2105
2099
|
for (; ni(e) || ri(e); )
|
|
2106
2100
|
oe(e, !0, -1) ? (u = !0, l = i, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
2107
|
-
if (l && (l = u || a), (s === 1 || dt === n) && (ct === n || Zn === n ?
|
|
2101
|
+
if (l && (l = u || a), (s === 1 || dt === n) && (ct === n || Zn === n ? T = t : T = t + 1, C = e.position - e.lineStart, s === 1 ? l && (ln(e, C) || ti(e, C, T)) || Xo(e, T) ? p = !0 : (o && ei(e, T) || Zo(e, T) || Qo(e, T) ? p = !0 : ai(e) ? (p = !0, (e.tag !== null || e.anchor !== null) && O(e, "alias node should not have any properties")) : Yo(e, T, ct === n) && (p = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (p = l && ln(e, C))), e.tag === null)
|
|
2108
2102
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2109
2103
|
else if (e.tag === "?") {
|
|
2110
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2111
|
-
if (
|
|
2112
|
-
e.result =
|
|
2104
|
+
for (e.result !== null && e.kind !== "scalar" && O(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, y = e.implicitTypes.length; c < y; c += 1)
|
|
2105
|
+
if (x = e.implicitTypes[c], x.resolve(e.result)) {
|
|
2106
|
+
e.result = x.construct(e.result), e.tag = x.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2113
2107
|
break;
|
|
2114
2108
|
}
|
|
2115
2109
|
} else if (e.tag !== "!") {
|
|
2116
|
-
if (
|
|
2117
|
-
|
|
2110
|
+
if (Fe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2111
|
+
x = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2118
2112
|
else
|
|
2119
|
-
for (
|
|
2113
|
+
for (x = null, f = e.typeMap.multi[e.kind || "fallback"], c = 0, y = f.length; c < y; c += 1)
|
|
2120
2114
|
if (e.tag.slice(0, f[c].tag.length) === f[c].tag) {
|
|
2121
|
-
|
|
2115
|
+
x = f[c];
|
|
2122
2116
|
break;
|
|
2123
2117
|
}
|
|
2124
|
-
|
|
2118
|
+
x || O(e, "unknown tag !<" + e.tag + ">"), e.result !== null && x.kind !== e.kind && O(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + x.kind + '", not "' + e.kind + '"'), x.resolve(e.result, e.tag) ? (e.result = x.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : O(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2125
2119
|
}
|
|
2126
2120
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || p;
|
|
2127
2121
|
}
|
|
@@ -2130,8 +2124,8 @@ function oi(e) {
|
|
|
2130
2124
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (oe(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
2131
2125
|
for (i = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !ye(o); )
|
|
2132
2126
|
o = e.input.charCodeAt(++e.position);
|
|
2133
|
-
for (r = e.input.slice(n, e.position), a = [], r.length < 1 &&
|
|
2134
|
-
for (;
|
|
2127
|
+
for (r = e.input.slice(n, e.position), a = [], r.length < 1 && O(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
2128
|
+
for (; Ke(o); )
|
|
2135
2129
|
o = e.input.charCodeAt(++e.position);
|
|
2136
2130
|
if (o === 35) {
|
|
2137
2131
|
do
|
|
@@ -2144,14 +2138,14 @@ function oi(e) {
|
|
|
2144
2138
|
o = e.input.charCodeAt(++e.position);
|
|
2145
2139
|
a.push(e.input.slice(n, e.position));
|
|
2146
2140
|
}
|
|
2147
|
-
o !== 0 &&
|
|
2141
|
+
o !== 0 && qt(e), Fe.call(an, r) ? an[r](e, r, a) : pt(e, 'unknown document directive "' + r + '"');
|
|
2148
2142
|
}
|
|
2149
|
-
if (oe(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, oe(e, !0, -1)) : i &&
|
|
2143
|
+
if (oe(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, oe(e, !0, -1)) : i && O(e, "directives end mark is expected"), Ge(e, e.lineIndent - 1, dt, !1, !0), oe(e, !0, -1), e.checkLineBreaks && Ro.test(e.input.slice(t, e.position)) && pt(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && vt(e)) {
|
|
2150
2144
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, oe(e, !0, -1));
|
|
2151
2145
|
return;
|
|
2152
2146
|
}
|
|
2153
2147
|
if (e.position < e.length - 1)
|
|
2154
|
-
|
|
2148
|
+
O(e, "end of the stream or a document separator is expected");
|
|
2155
2149
|
else
|
|
2156
2150
|
return;
|
|
2157
2151
|
}
|
|
@@ -2159,7 +2153,7 @@ function ar(e, t) {
|
|
|
2159
2153
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2160
2154
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2161
2155
|
var n = new Wo(e, t), r = e.indexOf("\0");
|
|
2162
|
-
for (r !== -1 && (n.position = r,
|
|
2156
|
+
for (r !== -1 && (n.position = r, O(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2163
2157
|
n.lineIndent += 1, n.position += 1;
|
|
2164
2158
|
for (; n.position < n.length - 1; )
|
|
2165
2159
|
oi(n);
|
|
@@ -2184,7 +2178,7 @@ function li(e, t) {
|
|
|
2184
2178
|
var si = ii, ui = li, or = {
|
|
2185
2179
|
loadAll: si,
|
|
2186
2180
|
load: ui
|
|
2187
|
-
}, ir = Object.prototype.toString, lr = Object.prototype.hasOwnProperty,
|
|
2181
|
+
}, ir = Object.prototype.toString, lr = Object.prototype.hasOwnProperty, Bt = 65279, ci = 9, nt = 10, di = 13, pi = 32, fi = 33, mi = 34, At = 35, gi = 37, yi = 38, hi = 39, vi = 42, sr = 44, bi = 45, ft = 58, ki = 61, Ci = 62, wi = 63, _i = 64, ur = 91, cr = 93, Si = 96, dr = 123, xi = 124, pr = 125, pe = {};
|
|
2188
2182
|
pe[0] = "\\0";
|
|
2189
2183
|
pe[7] = "\\a";
|
|
2190
2184
|
pe[8] = "\\b";
|
|
@@ -2218,14 +2212,14 @@ var Ii = [
|
|
|
2218
2212
|
"Off",
|
|
2219
2213
|
"OFF"
|
|
2220
2214
|
], Ai = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2221
|
-
function
|
|
2215
|
+
function $i(e, t) {
|
|
2222
2216
|
var n, r, a, i, o, l, s;
|
|
2223
2217
|
if (t === null) return {};
|
|
2224
2218
|
for (n = {}, r = Object.keys(t), a = 0, i = r.length; a < i; a += 1)
|
|
2225
2219
|
o = r[a], l = String(t[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), s = e.compiledTypeMap.fallback[o], s && lr.call(s.styleAliases, l) && (l = s.styleAliases[l]), n[o] = l;
|
|
2226
2220
|
return n;
|
|
2227
2221
|
}
|
|
2228
|
-
function
|
|
2222
|
+
function Ti(e) {
|
|
2229
2223
|
var t, n, r;
|
|
2230
2224
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
2231
2225
|
n = "x", r = 2;
|
|
@@ -2239,7 +2233,7 @@ function $i(e) {
|
|
|
2239
2233
|
}
|
|
2240
2234
|
var Ni = 1, rt = 2;
|
|
2241
2235
|
function ji(e) {
|
|
2242
|
-
this.schema = e.schema ||
|
|
2236
|
+
this.schema = e.schema || Ft, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ie.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = $i(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 === '"' ? rt : Ni, 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;
|
|
2243
2237
|
}
|
|
2244
2238
|
function sn(e, t) {
|
|
2245
2239
|
for (var n = ie.repeat(" ", t), r = 0, a = -1, i = "", o, l = e.length; r < l; )
|
|
@@ -2248,11 +2242,11 @@ function sn(e, t) {
|
|
|
2248
2242
|
` && (i += n), i += o;
|
|
2249
2243
|
return i;
|
|
2250
2244
|
}
|
|
2251
|
-
function
|
|
2245
|
+
function $t(e, t) {
|
|
2252
2246
|
return `
|
|
2253
2247
|
` + ie.repeat(" ", e.indent * t);
|
|
2254
2248
|
}
|
|
2255
|
-
function
|
|
2249
|
+
function Oi(e, t) {
|
|
2256
2250
|
var n, r, a;
|
|
2257
2251
|
for (n = 0, r = e.implicitTypes.length; n < r; n += 1)
|
|
2258
2252
|
if (a = e.implicitTypes[n], a.resolve(t))
|
|
@@ -2263,10 +2257,10 @@ function mt(e) {
|
|
|
2263
2257
|
return e === pi || e === ci;
|
|
2264
2258
|
}
|
|
2265
2259
|
function at(e) {
|
|
2266
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2260
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Bt || 65536 <= e && e <= 1114111;
|
|
2267
2261
|
}
|
|
2268
2262
|
function un(e) {
|
|
2269
|
-
return at(e) && e !==
|
|
2263
|
+
return at(e) && e !== Bt && e !== di && e !== nt;
|
|
2270
2264
|
}
|
|
2271
2265
|
function cn(e, t, n) {
|
|
2272
2266
|
var r = un(e), a = r && !mt(e);
|
|
@@ -2278,10 +2272,10 @@ function cn(e, t, n) {
|
|
|
2278
2272
|
) : r && e !== sr && e !== ur && e !== cr && e !== dr && e !== pr) && e !== At && !(t === ft && !a) || un(t) && !mt(t) && e === At || t === ft && a
|
|
2279
2273
|
);
|
|
2280
2274
|
}
|
|
2281
|
-
function
|
|
2282
|
-
return at(e) && e !==
|
|
2275
|
+
function Mi(e) {
|
|
2276
|
+
return at(e) && e !== Bt && !mt(e) && e !== bi && e !== wi && e !== ft && e !== sr && e !== ur && e !== cr && e !== dr && e !== pr && e !== At && e !== yi && e !== vi && e !== fi && e !== xi && e !== ki && e !== Ci && e !== hi && e !== mi && e !== gi && e !== _i && e !== Si;
|
|
2283
2277
|
}
|
|
2284
|
-
function
|
|
2278
|
+
function Ei(e) {
|
|
2285
2279
|
return !mt(e) && e !== ft;
|
|
2286
2280
|
}
|
|
2287
2281
|
function et(e, t) {
|
|
@@ -2292,29 +2286,29 @@ function fr(e) {
|
|
|
2292
2286
|
var t = /^\n* /;
|
|
2293
2287
|
return t.test(e);
|
|
2294
2288
|
}
|
|
2295
|
-
var mr = 1,
|
|
2296
|
-
function
|
|
2297
|
-
var s, u = 0, p = null, c = !1, y = !1, f = r !== -1,
|
|
2289
|
+
var mr = 1, Tt = 2, gr = 3, yr = 4, Re = 5;
|
|
2290
|
+
function Fi(e, t, n, r, a, i, o, l) {
|
|
2291
|
+
var s, u = 0, p = null, c = !1, y = !1, f = r !== -1, x = -1, T = Mi(et(e, 0)) && Ei(et(e, e.length - 1));
|
|
2298
2292
|
if (t || o)
|
|
2299
2293
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2300
2294
|
if (u = et(e, s), !at(u))
|
|
2301
|
-
return
|
|
2302
|
-
|
|
2295
|
+
return Re;
|
|
2296
|
+
T = T && cn(u, p, l), p = u;
|
|
2303
2297
|
}
|
|
2304
2298
|
else {
|
|
2305
2299
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2306
2300
|
if (u = et(e, s), u === nt)
|
|
2307
2301
|
c = !0, f && (y = y || // Foldable line = too long, and not more-indented.
|
|
2308
|
-
s -
|
|
2302
|
+
s - x - 1 > r && e[x + 1] !== " ", x = s);
|
|
2309
2303
|
else if (!at(u))
|
|
2310
|
-
return
|
|
2311
|
-
|
|
2304
|
+
return Re;
|
|
2305
|
+
T = T && cn(u, p, l), p = u;
|
|
2312
2306
|
}
|
|
2313
|
-
y = y || f && s -
|
|
2307
|
+
y = y || f && s - x - 1 > r && e[x + 1] !== " ";
|
|
2314
2308
|
}
|
|
2315
|
-
return !c && !y ?
|
|
2309
|
+
return !c && !y ? T && !o && !a(e) ? mr : i === rt ? Re : Tt : n > 9 && fr(e) ? Re : o ? i === rt ? Re : Tt : y ? yr : gr;
|
|
2316
2310
|
}
|
|
2317
|
-
function
|
|
2311
|
+
function qi(e, t, n, r, a) {
|
|
2318
2312
|
e.dump = function() {
|
|
2319
2313
|
if (t.length === 0)
|
|
2320
2314
|
return e.quotingType === rt ? '""' : "''";
|
|
@@ -2322,9 +2316,9 @@ function Ei(e, t, n, r, a) {
|
|
|
2322
2316
|
return e.quotingType === rt ? '"' + t + '"' : "'" + t + "'";
|
|
2323
2317
|
var i = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - i), l = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2324
2318
|
function s(u) {
|
|
2325
|
-
return
|
|
2319
|
+
return Oi(e, u);
|
|
2326
2320
|
}
|
|
2327
|
-
switch (
|
|
2321
|
+
switch (Fi(
|
|
2328
2322
|
t,
|
|
2329
2323
|
l,
|
|
2330
2324
|
e.indent,
|
|
@@ -2336,14 +2330,14 @@ function Ei(e, t, n, r, a) {
|
|
|
2336
2330
|
)) {
|
|
2337
2331
|
case mr:
|
|
2338
2332
|
return t;
|
|
2339
|
-
case
|
|
2333
|
+
case Tt:
|
|
2340
2334
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
2341
2335
|
case gr:
|
|
2342
2336
|
return "|" + dn(t, e.indent) + pn(sn(t, i));
|
|
2343
2337
|
case yr:
|
|
2344
|
-
return ">" + dn(t, e.indent) + pn(sn(
|
|
2345
|
-
case
|
|
2346
|
-
return '"' +
|
|
2338
|
+
return ">" + dn(t, e.indent) + pn(sn(Ki(t, o), i));
|
|
2339
|
+
case Re:
|
|
2340
|
+
return '"' + Bi(t) + '"';
|
|
2347
2341
|
default:
|
|
2348
2342
|
throw new fe("impossible error: invalid scalar style");
|
|
2349
2343
|
}
|
|
@@ -2361,7 +2355,7 @@ function pn(e) {
|
|
|
2361
2355
|
return e[e.length - 1] === `
|
|
2362
2356
|
` ? e.slice(0, -1) : e;
|
|
2363
2357
|
}
|
|
2364
|
-
function
|
|
2358
|
+
function Ki(e, t) {
|
|
2365
2359
|
for (var n = /(\n+)([^\n]*)/g, r = function() {
|
|
2366
2360
|
var u = e.indexOf(`
|
|
2367
2361
|
`);
|
|
@@ -2383,30 +2377,30 @@ function fn(e, t) {
|
|
|
2383
2377
|
`, e.length - a > t && o > a ? s += e.slice(a, o) + `
|
|
2384
2378
|
` + e.slice(o + 1) : s += e.slice(a), s.slice(1);
|
|
2385
2379
|
}
|
|
2386
|
-
function
|
|
2380
|
+
function Bi(e) {
|
|
2387
2381
|
for (var t = "", n = 0, r, a = 0; a < e.length; n >= 65536 ? a += 2 : a++)
|
|
2388
|
-
n = et(e, a), r = pe[n], !r && at(n) ? (t += e[a], n >= 65536 && (t += e[a + 1])) : t += r ||
|
|
2382
|
+
n = et(e, a), r = pe[n], !r && at(n) ? (t += e[a], n >= 65536 && (t += e[a + 1])) : t += r || Ti(n);
|
|
2389
2383
|
return t;
|
|
2390
2384
|
}
|
|
2391
2385
|
function Li(e, t, n) {
|
|
2392
2386
|
var r = "", a = e.tag, i, o, l;
|
|
2393
2387
|
for (i = 0, o = n.length; i < o; i += 1)
|
|
2394
|
-
l = n[i], e.replacer && (l = e.replacer.call(n, String(i), l)), (
|
|
2388
|
+
l = n[i], e.replacer && (l = e.replacer.call(n, String(i), l)), (Te(e, t, l, !1, !1) || typeof l > "u" && Te(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2395
2389
|
e.tag = a, e.dump = "[" + r + "]";
|
|
2396
2390
|
}
|
|
2397
2391
|
function mn(e, t, n, r) {
|
|
2398
2392
|
var a = "", i = e.tag, o, l, s;
|
|
2399
2393
|
for (o = 0, l = n.length; o < l; o += 1)
|
|
2400
|
-
s = n[o], e.replacer && (s = e.replacer.call(n, String(o), s)), (
|
|
2394
|
+
s = n[o], e.replacer && (s = e.replacer.call(n, String(o), s)), (Te(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && Te(e, t + 1, null, !0, !0, !1, !0)) && ((!r || a !== "") && (a += $t(e, t)), e.dump && nt === e.dump.charCodeAt(0) ? a += "-" : a += "- ", a += e.dump);
|
|
2401
2395
|
e.tag = i, e.dump = a || "[]";
|
|
2402
2396
|
}
|
|
2403
2397
|
function Ui(e, t, n) {
|
|
2404
2398
|
var r = "", a = e.tag, i = Object.keys(n), o, l, s, u, p;
|
|
2405
2399
|
for (o = 0, l = i.length; o < l; o += 1)
|
|
2406
|
-
p = "", r !== "" && (p += ", "), e.condenseFlow && (p += '"'), s = i[o], u = n[s], e.replacer && (u = e.replacer.call(n, s, u)),
|
|
2400
|
+
p = "", r !== "" && (p += ", "), e.condenseFlow && (p += '"'), s = i[o], u = n[s], e.replacer && (u = e.replacer.call(n, s, u)), Te(e, t, s, !1, !1) && (e.dump.length > 1024 && (p += "? "), p += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), Te(e, t, u, !1, !1) && (p += e.dump, r += p));
|
|
2407
2401
|
e.tag = a, e.dump = "{" + r + "}";
|
|
2408
2402
|
}
|
|
2409
|
-
function
|
|
2403
|
+
function Vi(e, t, n, r) {
|
|
2410
2404
|
var a = "", i = e.tag, o = Object.keys(n), l, s, u, p, c, y;
|
|
2411
2405
|
if (e.sortKeys === !0)
|
|
2412
2406
|
o.sort();
|
|
@@ -2415,7 +2409,7 @@ function Ri(e, t, n, r) {
|
|
|
2415
2409
|
else if (e.sortKeys)
|
|
2416
2410
|
throw new fe("sortKeys must be a boolean or a function");
|
|
2417
2411
|
for (l = 0, s = o.length; l < s; l += 1)
|
|
2418
|
-
y = "", (!r || a !== "") && (y +=
|
|
2412
|
+
y = "", (!r || a !== "") && (y += $t(e, t)), u = o[l], p = n[u], e.replacer && (p = e.replacer.call(n, u, p)), Te(e, t + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && nt === e.dump.charCodeAt(0) ? y += "?" : y += "? "), y += e.dump, c && (y += $t(e, t)), Te(e, t + 1, p, !0, c) && (e.dump && nt === e.dump.charCodeAt(0) ? y += ":" : y += ": ", y += e.dump, a += y));
|
|
2419
2413
|
e.tag = i, e.dump = a || "{}";
|
|
2420
2414
|
}
|
|
2421
2415
|
function gn(e, t, n) {
|
|
@@ -2435,7 +2429,7 @@ function gn(e, t, n) {
|
|
|
2435
2429
|
}
|
|
2436
2430
|
return !1;
|
|
2437
2431
|
}
|
|
2438
|
-
function
|
|
2432
|
+
function Te(e, t, n, r, a, i, o) {
|
|
2439
2433
|
e.tag = null, e.dump = n, gn(e, n, !1) || gn(e, n, !0);
|
|
2440
2434
|
var l = ir.call(e.dump), s = r, u;
|
|
2441
2435
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
@@ -2444,11 +2438,11 @@ function $e(e, t, n, r, a, i, o) {
|
|
|
2444
2438
|
e.dump = "*ref_" + c;
|
|
2445
2439
|
else {
|
|
2446
2440
|
if (p && y && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), l === "[object Object]")
|
|
2447
|
-
r && Object.keys(e.dump).length !== 0 ? (
|
|
2441
|
+
r && Object.keys(e.dump).length !== 0 ? (Vi(e, t, e.dump, a), y && (e.dump = "&ref_" + c + e.dump)) : (Ui(e, t, e.dump), y && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2448
2442
|
else if (l === "[object Array]")
|
|
2449
2443
|
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? mn(e, t - 1, e.dump, a) : mn(e, t, e.dump, a), y && (e.dump = "&ref_" + c + e.dump)) : (Li(e, t, e.dump), y && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2450
2444
|
else if (l === "[object String]")
|
|
2451
|
-
e.tag !== "?" &&
|
|
2445
|
+
e.tag !== "?" && qi(e, e.dump, t, i, s);
|
|
2452
2446
|
else {
|
|
2453
2447
|
if (l === "[object Undefined]" || e.skipInvalid) return !1;
|
|
2454
2448
|
throw new fe("unacceptable kind of an object to dump " + l);
|
|
@@ -2459,7 +2453,7 @@ function $e(e, t, n, r, a, i, o) {
|
|
|
2459
2453
|
}
|
|
2460
2454
|
return !0;
|
|
2461
2455
|
}
|
|
2462
|
-
function
|
|
2456
|
+
function Pi(e, t) {
|
|
2463
2457
|
var n = [], r = [], a, i;
|
|
2464
2458
|
for (Nt(e, n, r), a = 0, i = r.length; a < i; a += 1)
|
|
2465
2459
|
t.duplicates.push(n[r[a]]);
|
|
@@ -2477,15 +2471,15 @@ function Nt(e, t, n) {
|
|
|
2477
2471
|
for (r = Object.keys(e), a = 0, i = r.length; a < i; a += 1)
|
|
2478
2472
|
Nt(e[r[a]], t, n);
|
|
2479
2473
|
}
|
|
2480
|
-
function
|
|
2474
|
+
function Ri(e, t) {
|
|
2481
2475
|
t = t || {};
|
|
2482
2476
|
var n = new ji(t);
|
|
2483
|
-
n.noRefs ||
|
|
2477
|
+
n.noRefs || Pi(e, n);
|
|
2484
2478
|
var r = e;
|
|
2485
|
-
return n.replacer && (r = n.replacer.call({ "": r }, "", r)),
|
|
2479
|
+
return n.replacer && (r = n.replacer.call({ "": r }, "", r)), Te(n, 0, r, !0, !0) ? n.dump + `
|
|
2486
2480
|
` : "";
|
|
2487
2481
|
}
|
|
2488
|
-
var Di =
|
|
2482
|
+
var Di = Ri, zi = {
|
|
2489
2483
|
dump: Di
|
|
2490
2484
|
};
|
|
2491
2485
|
function Lt(e, t) {
|
|
@@ -2493,20 +2487,20 @@ function Lt(e, t) {
|
|
|
2493
2487
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2494
2488
|
};
|
|
2495
2489
|
}
|
|
2496
|
-
var Gi = ce, Hi =
|
|
2490
|
+
var Gi = ce, Hi = On, Ji = qn, Wi = Vn, Yi = Pn, Zi = Ft, Qi = or.load, Xi = or.loadAll, el = zi.dump, tl = fe, nl = {
|
|
2497
2491
|
binary: Hn,
|
|
2498
2492
|
float: Un,
|
|
2499
|
-
map:
|
|
2500
|
-
null:
|
|
2493
|
+
map: Fn,
|
|
2494
|
+
null: Kn,
|
|
2501
2495
|
pairs: Wn,
|
|
2502
2496
|
set: Yn,
|
|
2503
2497
|
timestamp: zn,
|
|
2504
|
-
bool:
|
|
2498
|
+
bool: Bn,
|
|
2505
2499
|
int: Ln,
|
|
2506
2500
|
merge: Gn,
|
|
2507
2501
|
omap: Jn,
|
|
2508
|
-
seq:
|
|
2509
|
-
str:
|
|
2502
|
+
seq: En,
|
|
2503
|
+
str: Mn
|
|
2510
2504
|
}, rl = Lt("safeLoad", "load"), al = Lt("safeLoadAll", "loadAll"), ol = Lt("safeDump", "dump"), il = {
|
|
2511
2505
|
Type: Gi,
|
|
2512
2506
|
Schema: Hi,
|
|
@@ -2538,9 +2532,9 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2538
2532
|
return Object.keys(r).length === 0 && r.constructor === Object ? "" : il.dump(r).trim();
|
|
2539
2533
|
});
|
|
2540
2534
|
return (r, a) => {
|
|
2541
|
-
const i =
|
|
2542
|
-
return m(),
|
|
2543
|
-
t.yamlRecord ? (m(),
|
|
2535
|
+
const i = R("KCodeBlock");
|
|
2536
|
+
return m(), $("div", ll, [
|
|
2537
|
+
t.yamlRecord ? (m(), D(i, {
|
|
2544
2538
|
key: 0,
|
|
2545
2539
|
id: "yaml-codeblock",
|
|
2546
2540
|
code: n.value,
|
|
@@ -2601,22 +2595,22 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2601
2595
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
2602
2596
|
return delete o.created_at, delete o.updated_at, o;
|
|
2603
2597
|
});
|
|
2604
|
-
return (o, l) => (m(),
|
|
2605
|
-
e.format === "structured" ? (m(),
|
|
2606
|
-
(m(!0),
|
|
2598
|
+
return (o, l) => (m(), $(be, null, [
|
|
2599
|
+
e.format === "structured" ? (m(), $("div", sl, [
|
|
2600
|
+
(m(!0), $(be, null, ve(e.propListTypes, (s) => (m(), $("div", {
|
|
2607
2601
|
key: `config-card-details-${s}-props`,
|
|
2608
|
-
class:
|
|
2602
|
+
class: Ee(`config-card-details-${s}-props`),
|
|
2609
2603
|
"data-testid": `config-card-details-${s}-props`
|
|
2610
2604
|
}, [
|
|
2611
|
-
s !== "basic" ? (m(),
|
|
2612
|
-
(m(!0),
|
|
2605
|
+
s !== "basic" ? (m(), $("div", cl, q(s === "advanced" ? g(r)("baseConfigCard.sections.advanced") : g(r)("baseConfigCard.sections.plugin")), 1)) : W("", !0),
|
|
2606
|
+
(m(!0), $(be, null, ve(e.propertyCollections[s], (u) => (m(), D($n, {
|
|
2613
2607
|
key: u.key,
|
|
2614
2608
|
item: u
|
|
2615
|
-
},
|
|
2616
|
-
label:
|
|
2609
|
+
}, Be({
|
|
2610
|
+
label: v(() => [
|
|
2617
2611
|
ne(o.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2618
2612
|
]),
|
|
2619
|
-
[u.key]:
|
|
2613
|
+
[u.key]: v(({ rowValue: p }) => [
|
|
2620
2614
|
ne(o.$slots, u.key, {
|
|
2621
2615
|
row: u,
|
|
2622
2616
|
rowValue: p
|
|
@@ -2626,7 +2620,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2626
2620
|
}, [
|
|
2627
2621
|
a(u) ? {
|
|
2628
2622
|
name: "label-tooltip",
|
|
2629
|
-
fn:
|
|
2623
|
+
fn: v(() => [
|
|
2630
2624
|
ne(o.$slots, `${u.key}-label-tooltip`, { row: u }, void 0, !0)
|
|
2631
2625
|
]),
|
|
2632
2626
|
key: "0"
|
|
@@ -2634,20 +2628,20 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2634
2628
|
]), 1032, ["item"]))), 128))
|
|
2635
2629
|
], 10, ul))), 128))
|
|
2636
2630
|
])) : W("", !0),
|
|
2637
|
-
e.format === "json" && t.record ? (m(),
|
|
2631
|
+
e.format === "json" && t.record ? (m(), D(Tn, {
|
|
2638
2632
|
key: 1,
|
|
2639
2633
|
config: t.config,
|
|
2640
2634
|
"fetcher-url": t.fetcherUrl,
|
|
2641
2635
|
"json-record": i.value,
|
|
2642
2636
|
"request-method": "get"
|
|
2643
2637
|
}, null, 8, ["config", "fetcher-url", "json-record"])) : W("", !0),
|
|
2644
|
-
e.format === "yaml" && t.record ? (m(),
|
|
2638
|
+
e.format === "yaml" && t.record ? (m(), D(hr, {
|
|
2645
2639
|
key: 2,
|
|
2646
2640
|
"yaml-record": i.value
|
|
2647
2641
|
}, null, 8, ["yaml-record"])) : W("", !0)
|
|
2648
2642
|
], 64));
|
|
2649
2643
|
}
|
|
2650
|
-
}), pl = /* @__PURE__ */ ke(dl, [["__scopeId", "data-v-2052238b"]]),
|
|
2644
|
+
}), pl = /* @__PURE__ */ ke(dl, [["__scopeId", "data-v-2052238b"]]), Se = "24px", ot = (e, t) => {
|
|
2651
2645
|
const n = e.__vccOpts || e;
|
|
2652
2646
|
for (const [r, a] of t)
|
|
2653
2647
|
n[r] = a;
|
|
@@ -2655,7 +2649,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2655
2649
|
}, fl = (e) => (Je("data-v-c1f7c39c"), e = e(), We(), e), ml = ["aria-hidden"], gl = {
|
|
2656
2650
|
key: 0,
|
|
2657
2651
|
"data-testid": "kui-icon-svg-title"
|
|
2658
|
-
}, yl = /* @__PURE__ */ fl(() => /* @__PURE__ */
|
|
2652
|
+
}, yl = /* @__PURE__ */ fl(() => /* @__PURE__ */ L("path", {
|
|
2659
2653
|
d: "M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",
|
|
2660
2654
|
fill: "currentColor"
|
|
2661
2655
|
}, null, -1)), hl = /* @__PURE__ */ X({
|
|
@@ -2689,7 +2683,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2689
2683
|
size: {
|
|
2690
2684
|
type: [Number, String],
|
|
2691
2685
|
required: !1,
|
|
2692
|
-
default:
|
|
2686
|
+
default: Se,
|
|
2693
2687
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2694
2688
|
validator: (e) => {
|
|
2695
2689
|
if (typeof e == "number" && e > 0)
|
|
@@ -2718,7 +2712,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2718
2712
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2719
2713
|
return `${i}px`;
|
|
2720
2714
|
}
|
|
2721
|
-
return
|
|
2715
|
+
return Se;
|
|
2722
2716
|
}), r = w(() => ({
|
|
2723
2717
|
boxSizing: "border-box",
|
|
2724
2718
|
color: t.color,
|
|
@@ -2728,14 +2722,14 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2728
2722
|
lineHeight: "0",
|
|
2729
2723
|
width: n.value
|
|
2730
2724
|
}));
|
|
2731
|
-
return (a, i) => (m(),
|
|
2725
|
+
return (a, i) => (m(), D(xe(e.as), {
|
|
2732
2726
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2733
2727
|
class: "kui-icon add-icon",
|
|
2734
2728
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
2735
2729
|
style: He(r.value)
|
|
2736
2730
|
}, {
|
|
2737
|
-
default:
|
|
2738
|
-
(m(),
|
|
2731
|
+
default: v(() => [
|
|
2732
|
+
(m(), $("svg", {
|
|
2739
2733
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2740
2734
|
"data-testid": "kui-icon-svg-add-icon",
|
|
2741
2735
|
fill: "none",
|
|
@@ -2745,7 +2739,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2745
2739
|
width: "100%",
|
|
2746
2740
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2747
2741
|
}, [
|
|
2748
|
-
e.title ? (m(),
|
|
2742
|
+
e.title ? (m(), $("title", gl, q(e.title), 1)) : W("", !0),
|
|
2749
2743
|
yl
|
|
2750
2744
|
], 8, ml))
|
|
2751
2745
|
]),
|
|
@@ -2755,7 +2749,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2755
2749
|
}), vl = /* @__PURE__ */ ot(hl, [["__scopeId", "data-v-c1f7c39c"]]), bl = (e) => (Je("data-v-fbe6ddff"), e = e(), We(), e), kl = ["aria-hidden"], Cl = {
|
|
2756
2750
|
key: 0,
|
|
2757
2751
|
"data-testid": "kui-icon-svg-title"
|
|
2758
|
-
}, wl = /* @__PURE__ */ bl(() => /* @__PURE__ */
|
|
2752
|
+
}, wl = /* @__PURE__ */ bl(() => /* @__PURE__ */ L("path", {
|
|
2759
2753
|
d: "M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",
|
|
2760
2754
|
fill: "currentColor"
|
|
2761
2755
|
}, null, -1)), _l = /* @__PURE__ */ X({
|
|
@@ -2789,7 +2783,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2789
2783
|
size: {
|
|
2790
2784
|
type: [Number, String],
|
|
2791
2785
|
required: !1,
|
|
2792
|
-
default:
|
|
2786
|
+
default: Se,
|
|
2793
2787
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2794
2788
|
validator: (e) => {
|
|
2795
2789
|
if (typeof e == "number" && e > 0)
|
|
@@ -2818,7 +2812,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2818
2812
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2819
2813
|
return `${i}px`;
|
|
2820
2814
|
}
|
|
2821
|
-
return
|
|
2815
|
+
return Se;
|
|
2822
2816
|
}), r = w(() => ({
|
|
2823
2817
|
boxSizing: "border-box",
|
|
2824
2818
|
color: t.color,
|
|
@@ -2828,14 +2822,14 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2828
2822
|
lineHeight: "0",
|
|
2829
2823
|
width: n.value
|
|
2830
2824
|
}));
|
|
2831
|
-
return (a, i) => (m(),
|
|
2825
|
+
return (a, i) => (m(), D(xe(e.as), {
|
|
2832
2826
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2833
2827
|
class: "kui-icon book-icon",
|
|
2834
2828
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2835
2829
|
style: He(r.value)
|
|
2836
2830
|
}, {
|
|
2837
|
-
default:
|
|
2838
|
-
(m(),
|
|
2831
|
+
default: v(() => [
|
|
2832
|
+
(m(), $("svg", {
|
|
2839
2833
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2840
2834
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2841
2835
|
fill: "none",
|
|
@@ -2845,20 +2839,20 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2845
2839
|
width: "100%",
|
|
2846
2840
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2847
2841
|
}, [
|
|
2848
|
-
e.title ? (m(),
|
|
2842
|
+
e.title ? (m(), $("title", Cl, q(e.title), 1)) : W("", !0),
|
|
2849
2843
|
wl
|
|
2850
2844
|
], 8, kl))
|
|
2851
2845
|
]),
|
|
2852
2846
|
_: 1
|
|
2853
2847
|
}, 8, ["aria-hidden", "style"]));
|
|
2854
2848
|
}
|
|
2855
|
-
}),
|
|
2849
|
+
}), Sl = /* @__PURE__ */ ot(_l, [["__scopeId", "data-v-fbe6ddff"]]), xl = (e) => (Je("data-v-745761f6"), e = e(), We(), e), Il = ["aria-hidden"], Al = {
|
|
2856
2850
|
key: 0,
|
|
2857
2851
|
"data-testid": "kui-icon-svg-title"
|
|
2858
|
-
},
|
|
2852
|
+
}, $l = /* @__PURE__ */ xl(() => /* @__PURE__ */ L("path", {
|
|
2859
2853
|
d: "M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",
|
|
2860
2854
|
fill: "currentColor"
|
|
2861
|
-
}, null, -1)),
|
|
2855
|
+
}, null, -1)), Tl = /* @__PURE__ */ X({
|
|
2862
2856
|
__name: "ChevronDownIcon",
|
|
2863
2857
|
props: {
|
|
2864
2858
|
/** The accessibility text provided to screen readers */
|
|
@@ -2889,7 +2883,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2889
2883
|
size: {
|
|
2890
2884
|
type: [Number, String],
|
|
2891
2885
|
required: !1,
|
|
2892
|
-
default:
|
|
2886
|
+
default: Se,
|
|
2893
2887
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2894
2888
|
validator: (e) => {
|
|
2895
2889
|
if (typeof e == "number" && e > 0)
|
|
@@ -2918,7 +2912,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2918
2912
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2919
2913
|
return `${i}px`;
|
|
2920
2914
|
}
|
|
2921
|
-
return
|
|
2915
|
+
return Se;
|
|
2922
2916
|
}), r = w(() => ({
|
|
2923
2917
|
boxSizing: "border-box",
|
|
2924
2918
|
color: t.color,
|
|
@@ -2928,14 +2922,14 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2928
2922
|
lineHeight: "0",
|
|
2929
2923
|
width: n.value
|
|
2930
2924
|
}));
|
|
2931
|
-
return (a, i) => (m(),
|
|
2925
|
+
return (a, i) => (m(), D(xe(e.as), {
|
|
2932
2926
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2933
2927
|
class: "kui-icon chevron-down-icon",
|
|
2934
2928
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
2935
2929
|
style: He(r.value)
|
|
2936
2930
|
}, {
|
|
2937
|
-
default:
|
|
2938
|
-
(m(),
|
|
2931
|
+
default: v(() => [
|
|
2932
|
+
(m(), $("svg", {
|
|
2939
2933
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2940
2934
|
"data-testid": "kui-icon-svg-chevron-down-icon",
|
|
2941
2935
|
fill: "none",
|
|
@@ -2945,20 +2939,20 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2945
2939
|
width: "100%",
|
|
2946
2940
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2947
2941
|
}, [
|
|
2948
|
-
e.title ? (m(),
|
|
2949
|
-
|
|
2942
|
+
e.title ? (m(), $("title", Al, q(e.title), 1)) : W("", !0),
|
|
2943
|
+
$l
|
|
2950
2944
|
], 8, Il))
|
|
2951
2945
|
]),
|
|
2952
2946
|
_: 1
|
|
2953
2947
|
}, 8, ["aria-hidden", "style"]));
|
|
2954
2948
|
}
|
|
2955
|
-
}), Nl = /* @__PURE__ */ ot(
|
|
2949
|
+
}), Nl = /* @__PURE__ */ ot(Tl, [["__scopeId", "data-v-745761f6"]]), jl = (e) => (Je("data-v-863d10eb"), e = e(), We(), e), Ol = ["aria-hidden"], Ml = {
|
|
2956
2950
|
key: 0,
|
|
2957
2951
|
"data-testid": "kui-icon-svg-title"
|
|
2958
|
-
},
|
|
2952
|
+
}, El = /* @__PURE__ */ jl(() => /* @__PURE__ */ L("path", {
|
|
2959
2953
|
d: "M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",
|
|
2960
2954
|
fill: "currentColor"
|
|
2961
|
-
}, null, -1)),
|
|
2955
|
+
}, null, -1)), Fl = /* @__PURE__ */ X({
|
|
2962
2956
|
__name: "CloseIcon",
|
|
2963
2957
|
props: {
|
|
2964
2958
|
/** The accessibility text provided to screen readers */
|
|
@@ -2989,7 +2983,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2989
2983
|
size: {
|
|
2990
2984
|
type: [Number, String],
|
|
2991
2985
|
required: !1,
|
|
2992
|
-
default:
|
|
2986
|
+
default: Se,
|
|
2993
2987
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2994
2988
|
validator: (e) => {
|
|
2995
2989
|
if (typeof e == "number" && e > 0)
|
|
@@ -3018,7 +3012,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3018
3012
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
3019
3013
|
return `${i}px`;
|
|
3020
3014
|
}
|
|
3021
|
-
return
|
|
3015
|
+
return Se;
|
|
3022
3016
|
}), r = w(() => ({
|
|
3023
3017
|
boxSizing: "border-box",
|
|
3024
3018
|
color: t.color,
|
|
@@ -3028,14 +3022,14 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3028
3022
|
lineHeight: "0",
|
|
3029
3023
|
width: n.value
|
|
3030
3024
|
}));
|
|
3031
|
-
return (a, i) => (m(),
|
|
3025
|
+
return (a, i) => (m(), D(xe(e.as), {
|
|
3032
3026
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3033
3027
|
class: "kui-icon close-icon",
|
|
3034
3028
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
3035
3029
|
style: He(r.value)
|
|
3036
3030
|
}, {
|
|
3037
|
-
default:
|
|
3038
|
-
(m(),
|
|
3031
|
+
default: v(() => [
|
|
3032
|
+
(m(), $("svg", {
|
|
3039
3033
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3040
3034
|
"data-testid": "kui-icon-svg-close-icon",
|
|
3041
3035
|
fill: "none",
|
|
@@ -3045,20 +3039,20 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3045
3039
|
width: "100%",
|
|
3046
3040
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3047
3041
|
}, [
|
|
3048
|
-
e.title ? (m(),
|
|
3049
|
-
|
|
3050
|
-
], 8,
|
|
3042
|
+
e.title ? (m(), $("title", Ml, q(e.title), 1)) : W("", !0),
|
|
3043
|
+
El
|
|
3044
|
+
], 8, Ol))
|
|
3051
3045
|
]),
|
|
3052
3046
|
_: 1
|
|
3053
3047
|
}, 8, ["aria-hidden", "style"]));
|
|
3054
3048
|
}
|
|
3055
|
-
}),
|
|
3049
|
+
}), ql = /* @__PURE__ */ ot(Fl, [["__scopeId", "data-v-863d10eb"]]), Kl = (e) => (Je("data-v-d9894a05"), e = e(), We(), e), Bl = ["aria-hidden"], Ll = {
|
|
3056
3050
|
key: 0,
|
|
3057
3051
|
"data-testid": "kui-icon-svg-title"
|
|
3058
|
-
}, Ul = /* @__PURE__ */
|
|
3052
|
+
}, Ul = /* @__PURE__ */ Kl(() => /* @__PURE__ */ L("path", {
|
|
3059
3053
|
d: "M12 20C11.45 20 10.9792 19.8042 10.5875 19.4125C10.1958 19.0208 10 18.55 10 18C10 17.45 10.1958 16.9792 10.5875 16.5875C10.9792 16.1958 11.45 16 12 16C12.55 16 13.0208 16.1958 13.4125 16.5875C13.8042 16.9792 14 17.45 14 18C14 18.55 13.8042 19.0208 13.4125 19.4125C13.0208 19.8042 12.55 20 12 20ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14ZM12 8C11.45 8 10.9792 7.80417 10.5875 7.4125C10.1958 7.02083 10 6.55 10 6C10 5.45 10.1958 4.97917 10.5875 4.5875C10.9792 4.19583 11.45 4 12 4C12.55 4 13.0208 4.19583 13.4125 4.5875C13.8042 4.97917 14 5.45 14 6C14 6.55 13.8042 7.02083 13.4125 7.4125C13.0208 7.80417 12.55 8 12 8Z",
|
|
3060
3054
|
fill: "currentColor"
|
|
3061
|
-
}, null, -1)),
|
|
3055
|
+
}, null, -1)), Vl = /* @__PURE__ */ X({
|
|
3062
3056
|
__name: "MoreIcon",
|
|
3063
3057
|
props: {
|
|
3064
3058
|
/** The accessibility text provided to screen readers */
|
|
@@ -3089,7 +3083,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3089
3083
|
size: {
|
|
3090
3084
|
type: [Number, String],
|
|
3091
3085
|
required: !1,
|
|
3092
|
-
default:
|
|
3086
|
+
default: Se,
|
|
3093
3087
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
3094
3088
|
validator: (e) => {
|
|
3095
3089
|
if (typeof e == "number" && e > 0)
|
|
@@ -3118,7 +3112,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3118
3112
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
3119
3113
|
return `${i}px`;
|
|
3120
3114
|
}
|
|
3121
|
-
return
|
|
3115
|
+
return Se;
|
|
3122
3116
|
}), r = w(() => ({
|
|
3123
3117
|
boxSizing: "border-box",
|
|
3124
3118
|
color: t.color,
|
|
@@ -3128,14 +3122,14 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3128
3122
|
lineHeight: "0",
|
|
3129
3123
|
width: n.value
|
|
3130
3124
|
}));
|
|
3131
|
-
return (a, i) => (m(),
|
|
3125
|
+
return (a, i) => (m(), D(xe(e.as), {
|
|
3132
3126
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3133
3127
|
class: "kui-icon more-icon",
|
|
3134
3128
|
"data-testid": "kui-icon-wrapper-more-icon",
|
|
3135
3129
|
style: He(r.value)
|
|
3136
3130
|
}, {
|
|
3137
|
-
default:
|
|
3138
|
-
(m(),
|
|
3131
|
+
default: v(() => [
|
|
3132
|
+
(m(), $("svg", {
|
|
3139
3133
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3140
3134
|
"data-testid": "kui-icon-svg-more-icon",
|
|
3141
3135
|
fill: "none",
|
|
@@ -3145,14 +3139,14 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3145
3139
|
width: "100%",
|
|
3146
3140
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3147
3141
|
}, [
|
|
3148
|
-
e.title ? (m(),
|
|
3142
|
+
e.title ? (m(), $("title", Ll, q(e.title), 1)) : W("", !0),
|
|
3149
3143
|
Ul
|
|
3150
|
-
], 8,
|
|
3144
|
+
], 8, Bl))
|
|
3151
3145
|
]),
|
|
3152
3146
|
_: 1
|
|
3153
3147
|
}, 8, ["aria-hidden", "style"]));
|
|
3154
3148
|
}
|
|
3155
|
-
}),
|
|
3149
|
+
}), Pl = /* @__PURE__ */ ot(Vl, [["__scopeId", "data-v-d9894a05"]]), Rl = {
|
|
3156
3150
|
class: "config-card-title",
|
|
3157
3151
|
"data-testid": "config-card-title"
|
|
3158
3152
|
}, Dl = { class: "config-card-actions" }, zl = ["href"], Gl = { class: "config-card-details-section" }, Hl = /* @__PURE__ */ X({
|
|
@@ -3248,7 +3242,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3248
3242
|
label: "YAML",
|
|
3249
3243
|
value: "yaml"
|
|
3250
3244
|
}
|
|
3251
|
-
], p =
|
|
3245
|
+
], p = M("structured"), c = (d) => {
|
|
3252
3246
|
p.value = d == null ? void 0 : d.value;
|
|
3253
3247
|
}, y = {
|
|
3254
3248
|
id: {
|
|
@@ -3284,77 +3278,77 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3284
3278
|
// the last property displayed
|
|
3285
3279
|
section: he.Basic
|
|
3286
3280
|
}
|
|
3287
|
-
}, f =
|
|
3288
|
-
var d,
|
|
3281
|
+
}, f = M(!1), x = M(!1), T = M(""), C = M({}), U = w(() => {
|
|
3282
|
+
var d, S, B;
|
|
3289
3283
|
if (!C.value)
|
|
3290
3284
|
return [];
|
|
3291
|
-
const I = [],
|
|
3292
|
-
for (const
|
|
3293
|
-
const
|
|
3294
|
-
let F =
|
|
3295
|
-
(K || K === 0) && (F = K === -1 ?
|
|
3285
|
+
const I = [], G = Object.keys(C.value).length;
|
|
3286
|
+
for (const E in C.value) {
|
|
3287
|
+
const b = (S = (d = a.configSchema) == null ? void 0 : d[E]) == null ? void 0 : S.order, K = (B = y[E]) == null ? void 0 : B.order;
|
|
3288
|
+
let F = G;
|
|
3289
|
+
(K || K === 0) && (F = K === -1 ? G + 1 : K), b && (F = b === -1 ? G + 1 : b), I.push([E, F]);
|
|
3296
3290
|
}
|
|
3297
|
-
return I.sort(function(
|
|
3298
|
-
return
|
|
3299
|
-
}), I.map((
|
|
3300
|
-
var
|
|
3301
|
-
const F =
|
|
3291
|
+
return I.sort(function(E, b) {
|
|
3292
|
+
return E[1] - b[1];
|
|
3293
|
+
}), I.map((E) => {
|
|
3294
|
+
var b, K;
|
|
3295
|
+
const F = E[0], H = (b = C.value) == null ? void 0 : b[F], te = ((K = a.configSchema) == null ? void 0 : K[F]) || {}, de = y[F];
|
|
3302
3296
|
return {
|
|
3303
3297
|
key: F,
|
|
3304
|
-
value:
|
|
3298
|
+
value: H,
|
|
3305
3299
|
hidden: te.hidden || !1,
|
|
3306
3300
|
type: te.type ?? ((de == null ? void 0 : de.type) || ee.Text),
|
|
3307
3301
|
label: te.label ?? ((de == null ? void 0 : de.label) || l(F)),
|
|
3308
3302
|
tooltip: te.tooltip ?? ((de == null ? void 0 : de.tooltip) || void 0),
|
|
3309
3303
|
section: te.section ?? ((de == null ? void 0 : de.section) || he.Advanced)
|
|
3310
3304
|
};
|
|
3311
|
-
}).filter((
|
|
3312
|
-
}),
|
|
3313
|
-
var d,
|
|
3305
|
+
}).filter((E) => !E.hidden && E.key !== a.pluginConfigKey);
|
|
3306
|
+
}), N = w(() => {
|
|
3307
|
+
var d, S;
|
|
3314
3308
|
if (!C.value || !a.pluginConfigKey)
|
|
3315
3309
|
return [];
|
|
3316
|
-
const B = C.value[a.pluginConfigKey] || {}, I = Object.keys(B).length,
|
|
3317
|
-
for (const
|
|
3318
|
-
const
|
|
3310
|
+
const B = C.value[a.pluginConfigKey] || {}, I = Object.keys(B).length, G = [];
|
|
3311
|
+
for (const E in B) {
|
|
3312
|
+
const b = (S = (d = a.pluginConfigSchema) == null ? void 0 : d[E]) == null ? void 0 : S.order, K = B[E];
|
|
3319
3313
|
let F = K != null && K !== "" ? I - 1 : I;
|
|
3320
|
-
|
|
3314
|
+
b && (F = b === -1 ? I + 1 : b), G.push([E, F]);
|
|
3321
3315
|
}
|
|
3322
|
-
return
|
|
3323
|
-
return
|
|
3324
|
-
}),
|
|
3325
|
-
var
|
|
3326
|
-
const K =
|
|
3316
|
+
return G.sort(function(E, b) {
|
|
3317
|
+
return E[1] - b[1];
|
|
3318
|
+
}), G.map((E) => {
|
|
3319
|
+
var b;
|
|
3320
|
+
const K = E[0], F = B[K], H = ((b = a.pluginConfigSchema) == null ? void 0 : b[K]) || {};
|
|
3327
3321
|
return {
|
|
3328
3322
|
key: K,
|
|
3329
3323
|
value: F,
|
|
3330
|
-
hidden:
|
|
3331
|
-
type:
|
|
3332
|
-
label:
|
|
3333
|
-
tooltip:
|
|
3324
|
+
hidden: H.hidden || !1,
|
|
3325
|
+
type: H.type ?? ee.Text,
|
|
3326
|
+
label: H.label ?? l(K),
|
|
3327
|
+
tooltip: H.tooltip ?? void 0,
|
|
3334
3328
|
section: he.Plugin
|
|
3335
3329
|
};
|
|
3336
|
-
}).filter((
|
|
3337
|
-
}),
|
|
3338
|
-
var d,
|
|
3330
|
+
}).filter((E) => !E.hidden);
|
|
3331
|
+
}), J = w(() => {
|
|
3332
|
+
var d, S, B, I;
|
|
3339
3333
|
return {
|
|
3340
|
-
basic: (d =
|
|
3341
|
-
advanced: (
|
|
3342
|
-
plugin: (I =
|
|
3334
|
+
basic: (d = U.value) == null ? void 0 : d.filter((G) => G.section === he.Basic),
|
|
3335
|
+
advanced: (S = U.value) == null ? void 0 : S.filter((G) => G.section === he.Advanced),
|
|
3336
|
+
plugin: (I = N.value) == null ? void 0 : I.concat((B = U.value) == null ? void 0 : B.filter((G) => G.section === he.Plugin))
|
|
3343
3337
|
};
|
|
3344
|
-
}),
|
|
3338
|
+
}), h = w(() => {
|
|
3345
3339
|
const d = [];
|
|
3346
|
-
return
|
|
3347
|
-
}),
|
|
3348
|
-
var d,
|
|
3340
|
+
return J.value.basic.length && d.push("basic"), J.value.advanced.length && d.push("advanced"), J.value.plugin.length && d.push("plugin"), d;
|
|
3341
|
+
}), _ = w(() => {
|
|
3342
|
+
var d, S;
|
|
3349
3343
|
let B = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3350
|
-
return a.config.app === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((d = a.config) == null ? void 0 : d.controlPlaneId) || "") : a.config.app === "kongManager" && (B = B.replace(/\/{workspace}/gi, (
|
|
3344
|
+
return a.config.app === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((d = a.config) == null ? void 0 : d.controlPlaneId) || "") : a.config.app === "kongManager" && (B = B.replace(/\/{workspace}/gi, (S = a.config) != null && S.workspace ? `/${a.config.workspace}` : "")), B = B.replace(/{id}/gi, a.config.entityId), B;
|
|
3351
3345
|
});
|
|
3352
|
-
return
|
|
3346
|
+
return $e(f, (d) => {
|
|
3353
3347
|
r("loading", d);
|
|
3354
3348
|
}, { immediate: !0 }), gt(async () => {
|
|
3355
|
-
|
|
3349
|
+
x.value = !1, f.value = !0;
|
|
3356
3350
|
try {
|
|
3357
|
-
const { data: d } = await s.get(
|
|
3351
|
+
const { data: d } = await s.get(_.value);
|
|
3358
3352
|
if (a.dataKey)
|
|
3359
3353
|
if (typeof d[a.dataKey] < "u")
|
|
3360
3354
|
C.value = { ...d[a.dataKey] };
|
|
@@ -3362,87 +3356,87 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3362
3356
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: a.dataKey }));
|
|
3363
3357
|
else
|
|
3364
3358
|
C.value = { ...d };
|
|
3365
|
-
Object.keys(a.configSchema).filter((
|
|
3366
|
-
C.value && typeof C.value[
|
|
3359
|
+
Object.keys(a.configSchema).filter((S) => a.configSchema[S].forceShow).forEach((S) => {
|
|
3360
|
+
C.value && typeof C.value[S] > "u" && (C.value[S] = null);
|
|
3367
3361
|
}), r("fetch:success", d);
|
|
3368
3362
|
} catch (d) {
|
|
3369
|
-
const
|
|
3370
|
-
|
|
3363
|
+
const S = o(d);
|
|
3364
|
+
T.value = S.startsWith("code") ? i("baseConfigCard.errors.load") : S, x.value = !0, r("fetch:error", d);
|
|
3371
3365
|
} finally {
|
|
3372
3366
|
f.value = !1;
|
|
3373
3367
|
}
|
|
3374
|
-
}), (d,
|
|
3375
|
-
const B =
|
|
3376
|
-
return m(),
|
|
3368
|
+
}), (d, S) => {
|
|
3369
|
+
const B = R("KLabel"), I = R("KSelect"), G = R("KButton"), E = R("KSkeleton"), b = R("KEmptyState"), K = R("KCard");
|
|
3370
|
+
return m(), D(K, {
|
|
3377
3371
|
class: "kong-ui-entity-base-config-card",
|
|
3378
3372
|
"title-tag": e.titleTag
|
|
3379
|
-
},
|
|
3380
|
-
actions:
|
|
3381
|
-
|
|
3373
|
+
}, Be({
|
|
3374
|
+
actions: v(() => [
|
|
3375
|
+
L("div", Dl, [
|
|
3382
3376
|
ne(d.$slots, "actions", {}, void 0, !0),
|
|
3383
|
-
|
|
3377
|
+
j(B, {
|
|
3384
3378
|
class: "config-format-select-label",
|
|
3385
3379
|
"data-testid": "config-format-select-label"
|
|
3386
3380
|
}, {
|
|
3387
|
-
default:
|
|
3381
|
+
default: v(() => [
|
|
3388
3382
|
Z(q(e.label), 1)
|
|
3389
3383
|
]),
|
|
3390
3384
|
_: 1
|
|
3391
3385
|
}),
|
|
3392
|
-
|
|
3386
|
+
j(I, {
|
|
3393
3387
|
"data-testid": "select-config-format",
|
|
3394
3388
|
items: u,
|
|
3395
3389
|
onChange: c
|
|
3396
3390
|
}),
|
|
3397
|
-
e.configCardDoc ? (m(), G
|
|
3391
|
+
e.configCardDoc ? (m(), D(G, {
|
|
3398
3392
|
key: 0,
|
|
3399
3393
|
appearance: "tertiary",
|
|
3400
3394
|
class: "book-icon",
|
|
3401
3395
|
"data-testid": "book-icon"
|
|
3402
3396
|
}, {
|
|
3403
|
-
default:
|
|
3404
|
-
|
|
3397
|
+
default: v(() => [
|
|
3398
|
+
L("a", {
|
|
3405
3399
|
href: e.configCardDoc,
|
|
3406
3400
|
rel: "noopener",
|
|
3407
3401
|
target: "_blank"
|
|
3408
3402
|
}, [
|
|
3409
|
-
|
|
3403
|
+
j(g(Sl), { size: g(xa) }, null, 8, ["size"])
|
|
3410
3404
|
], 8, zl)
|
|
3411
3405
|
]),
|
|
3412
3406
|
_: 1
|
|
3413
3407
|
})) : W("", !0)
|
|
3414
3408
|
])
|
|
3415
3409
|
]),
|
|
3416
|
-
default:
|
|
3417
|
-
f.value ? (m(),
|
|
3410
|
+
default: v(() => [
|
|
3411
|
+
f.value ? (m(), D(E, {
|
|
3418
3412
|
key: 0,
|
|
3419
3413
|
"data-testid": "config-card-loader",
|
|
3420
3414
|
"table-columns": 2,
|
|
3421
3415
|
type: "table"
|
|
3422
|
-
})) :
|
|
3416
|
+
})) : x.value ? (m(), D(b, {
|
|
3423
3417
|
key: 1,
|
|
3424
3418
|
"data-testid": "config-card-fetch-error",
|
|
3425
3419
|
"icon-variant": "error"
|
|
3426
3420
|
}, {
|
|
3427
|
-
default:
|
|
3428
|
-
|
|
3421
|
+
default: v(() => [
|
|
3422
|
+
L("h3", null, q(T.value), 1)
|
|
3429
3423
|
]),
|
|
3430
3424
|
_: 1
|
|
3431
3425
|
})) : W("", !0),
|
|
3432
|
-
|
|
3433
|
-
|
|
3426
|
+
L("div", Gl, [
|
|
3427
|
+
j(pl, {
|
|
3434
3428
|
config: e.config,
|
|
3435
|
-
"fetcher-url":
|
|
3429
|
+
"fetcher-url": _.value,
|
|
3436
3430
|
format: p.value,
|
|
3437
|
-
"prop-list-types":
|
|
3438
|
-
"property-collections":
|
|
3431
|
+
"prop-list-types": h.value,
|
|
3432
|
+
"property-collections": J.value,
|
|
3439
3433
|
record: C.value
|
|
3440
|
-
},
|
|
3434
|
+
}, Be({ _: 2 }, [
|
|
3441
3435
|
ve(Object.keys(d.$slots), (F) => ({
|
|
3442
3436
|
name: F,
|
|
3443
|
-
fn:
|
|
3437
|
+
fn: v(({ row: H, rowValue: te }) => [
|
|
3444
3438
|
ne(d.$slots, F, {
|
|
3445
|
-
row:
|
|
3439
|
+
row: H,
|
|
3446
3440
|
rowValue: te
|
|
3447
3441
|
}, void 0, !0)
|
|
3448
3442
|
])
|
|
@@ -3454,8 +3448,8 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3454
3448
|
}, [
|
|
3455
3449
|
e.hideTitle ? void 0 : {
|
|
3456
3450
|
name: "title",
|
|
3457
|
-
fn:
|
|
3458
|
-
|
|
3451
|
+
fn: v(() => [
|
|
3452
|
+
L("span", Rl, [
|
|
3459
3453
|
ne(d.$slots, "title", {}, () => [
|
|
3460
3454
|
Z(q(g(i)("baseConfigCard.title")), 1)
|
|
3461
3455
|
], !0)
|
|
@@ -3538,19 +3532,19 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3538
3532
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3539
3533
|
setup(e, { emit: t }) {
|
|
3540
3534
|
var n;
|
|
3541
|
-
const r = t, a = e, i =
|
|
3542
|
-
var
|
|
3535
|
+
const r = t, a = e, i = Ot(), { i18n: { t: o } } = le.useI18n(), { getMessageFromError: l } = le.useErrors(), { axiosInstance: s } = le.useAxios((n = a.config) == null ? void 0 : n.axiosRequestConfig), u = M(!1), p = M(!1), c = M(""), y = w(() => a.canSubmit === !1 || a.isReadonly), f = M(!1), x = w(() => {
|
|
3536
|
+
var h, _;
|
|
3543
3537
|
let d = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3544
|
-
return a.config.app === "konnect" ? d = d.replace(/{controlPlaneId}/gi, ((
|
|
3545
|
-
}),
|
|
3538
|
+
return a.config.app === "konnect" ? d = d.replace(/{controlPlaneId}/gi, ((h = a.config) == null ? void 0 : h.controlPlaneId) || "") : a.config.app === "kongManager" && (d = d.replace(/\/{workspace}/gi, (_ = a.config) != null && _.workspace ? `/${a.config.workspace}` : "")), a.editId ? (d = d.replace(/{id}/gi, a.editId), d) : (d = d.replace(/\/{id}/gi, ""), d);
|
|
3539
|
+
}), T = () => {
|
|
3546
3540
|
f.value = !f.value;
|
|
3547
3541
|
}, C = () => {
|
|
3548
|
-
a.config.cancelRoute ? i.push(a.config.cancelRoute) :
|
|
3549
|
-
},
|
|
3542
|
+
a.config.cancelRoute ? i.push(a.config.cancelRoute) : U();
|
|
3543
|
+
}, U = () => {
|
|
3550
3544
|
r("cancel");
|
|
3551
|
-
},
|
|
3545
|
+
}, N = () => {
|
|
3552
3546
|
y.value || r("submit");
|
|
3553
|
-
},
|
|
3547
|
+
}, J = M([
|
|
3554
3548
|
{
|
|
3555
3549
|
title: o("baseForm.configuration.yaml"),
|
|
3556
3550
|
hash: "#yaml"
|
|
@@ -3560,82 +3554,82 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3560
3554
|
hash: "#json"
|
|
3561
3555
|
}
|
|
3562
3556
|
]);
|
|
3563
|
-
return
|
|
3564
|
-
r("loading",
|
|
3557
|
+
return $e(() => u.value, (h) => {
|
|
3558
|
+
r("loading", h);
|
|
3565
3559
|
}, { immediate: !0 }), gt(async () => {
|
|
3566
3560
|
if (a.editId)
|
|
3567
3561
|
try {
|
|
3568
3562
|
p.value = !1, u.value = !0;
|
|
3569
|
-
const { data:
|
|
3570
|
-
r("fetch:success",
|
|
3571
|
-
} catch (
|
|
3572
|
-
const
|
|
3573
|
-
c.value =
|
|
3563
|
+
const { data: h } = await s.get(x.value);
|
|
3564
|
+
r("fetch:success", h);
|
|
3565
|
+
} catch (h) {
|
|
3566
|
+
const _ = l(h);
|
|
3567
|
+
c.value = _.startsWith("code") ? o("baseForm.errors.edit") : _, p.value = !0, r("fetch:error", h);
|
|
3574
3568
|
} finally {
|
|
3575
3569
|
u.value = !1;
|
|
3576
3570
|
}
|
|
3577
|
-
}), (
|
|
3578
|
-
const d =
|
|
3579
|
-
return m(),
|
|
3580
|
-
default:
|
|
3581
|
-
u.value ? (m(),
|
|
3571
|
+
}), (h, _) => {
|
|
3572
|
+
const d = R("KSkeleton"), S = R("KEmptyState"), B = R("KAlert"), I = R("KButton"), G = R("KTabs"), E = R("KSlideout");
|
|
3573
|
+
return m(), D(xe(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3574
|
+
default: v(() => [
|
|
3575
|
+
u.value ? (m(), D(d, {
|
|
3582
3576
|
key: 0,
|
|
3583
3577
|
type: "form"
|
|
3584
|
-
})) : p.value ? (m(),
|
|
3578
|
+
})) : p.value ? (m(), D(S, {
|
|
3585
3579
|
key: 1,
|
|
3586
3580
|
"action-button-text": g(o)("baseForm.actions.back"),
|
|
3587
3581
|
"data-testid": "form-fetch-error",
|
|
3588
3582
|
"icon-variant": "error",
|
|
3589
3583
|
onClickAction: C
|
|
3590
3584
|
}, {
|
|
3591
|
-
default:
|
|
3592
|
-
|
|
3585
|
+
default: v(() => [
|
|
3586
|
+
L("h3", null, q(c.value), 1)
|
|
3593
3587
|
]),
|
|
3594
3588
|
_: 1
|
|
3595
|
-
}, 8, ["action-button-text"])) : (m(),
|
|
3589
|
+
}, 8, ["action-button-text"])) : (m(), $("form", {
|
|
3596
3590
|
key: 2,
|
|
3597
3591
|
"data-testid": "form-content",
|
|
3598
3592
|
novalidate: a.noValidate,
|
|
3599
|
-
onReset:
|
|
3600
|
-
onSubmit:
|
|
3593
|
+
onReset: xt(U, ["prevent"]),
|
|
3594
|
+
onSubmit: xt(N, ["prevent"])
|
|
3601
3595
|
}, [
|
|
3602
|
-
ne(
|
|
3603
|
-
e.errorMessage ? (m(),
|
|
3596
|
+
ne(h.$slots, "default", {}, void 0, !0),
|
|
3597
|
+
e.errorMessage ? (m(), D(B, {
|
|
3604
3598
|
key: 0,
|
|
3605
3599
|
appearance: "danger",
|
|
3606
3600
|
"data-testid": "form-error",
|
|
3607
3601
|
message: e.errorMessage
|
|
3608
3602
|
}, null, 8, ["message"])) : W("", !0),
|
|
3609
|
-
|
|
3610
|
-
ne(
|
|
3611
|
-
|
|
3603
|
+
L("div", Yl, [
|
|
3604
|
+
ne(h.$slots, "form-actions", {}, () => [
|
|
3605
|
+
j(I, {
|
|
3612
3606
|
appearance: "tertiary",
|
|
3613
3607
|
"data-testid": "form-view-configuration",
|
|
3614
|
-
onClick:
|
|
3608
|
+
onClick: _[0] || (_[0] = (b) => T())
|
|
3615
3609
|
}, {
|
|
3616
|
-
default:
|
|
3610
|
+
default: v(() => [
|
|
3617
3611
|
Z(q(g(o)("baseForm.actions.viewConfiguration")), 1)
|
|
3618
3612
|
]),
|
|
3619
3613
|
_: 1
|
|
3620
3614
|
}),
|
|
3621
|
-
|
|
3615
|
+
j(I, {
|
|
3622
3616
|
appearance: "secondary",
|
|
3623
3617
|
"data-testid": "form-cancel",
|
|
3624
3618
|
disabled: e.isReadonly,
|
|
3625
3619
|
type: "reset"
|
|
3626
3620
|
}, {
|
|
3627
|
-
default:
|
|
3621
|
+
default: v(() => [
|
|
3628
3622
|
Z(q(g(o)("baseForm.actions.cancel")), 1)
|
|
3629
3623
|
]),
|
|
3630
3624
|
_: 1
|
|
3631
3625
|
}, 8, ["disabled"]),
|
|
3632
|
-
|
|
3626
|
+
j(I, {
|
|
3633
3627
|
appearance: "primary",
|
|
3634
3628
|
"data-testid": "form-submit",
|
|
3635
3629
|
disabled: y.value,
|
|
3636
3630
|
type: "submit"
|
|
3637
3631
|
}, {
|
|
3638
|
-
default:
|
|
3632
|
+
default: v(() => [
|
|
3639
3633
|
Z(q(g(o)("baseForm.actions.save")), 1)
|
|
3640
3634
|
]),
|
|
3641
3635
|
_: 1
|
|
@@ -3643,31 +3637,31 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3643
3637
|
], !0)
|
|
3644
3638
|
])
|
|
3645
3639
|
], 40, Wl)),
|
|
3646
|
-
|
|
3640
|
+
j(E, {
|
|
3647
3641
|
"close-on-blur": !1,
|
|
3648
3642
|
"data-testid": "form-view-configuration-slideout",
|
|
3649
3643
|
"has-overlay": !1,
|
|
3650
3644
|
"offset-top": 60,
|
|
3651
3645
|
title: g(o)("baseForm.configuration.title"),
|
|
3652
3646
|
visible: f.value,
|
|
3653
|
-
onClose:
|
|
3647
|
+
onClose: _[1] || (_[1] = (b) => T())
|
|
3654
3648
|
}, {
|
|
3655
|
-
default:
|
|
3656
|
-
|
|
3657
|
-
|
|
3649
|
+
default: v(() => [
|
|
3650
|
+
L("div", null, q(g(o)("baseForm.configuration.message")), 1),
|
|
3651
|
+
j(G, {
|
|
3658
3652
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3659
|
-
tabs:
|
|
3653
|
+
tabs: J.value
|
|
3660
3654
|
}, {
|
|
3661
|
-
json:
|
|
3662
|
-
|
|
3655
|
+
json: v(() => [
|
|
3656
|
+
j(Tn, {
|
|
3663
3657
|
config: e.config,
|
|
3664
|
-
"fetcher-url":
|
|
3658
|
+
"fetcher-url": x.value,
|
|
3665
3659
|
"json-record": a.formFields,
|
|
3666
3660
|
"request-method": a.editId ? "put" : "post"
|
|
3667
3661
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3668
3662
|
]),
|
|
3669
|
-
yaml:
|
|
3670
|
-
|
|
3663
|
+
yaml: v(() => [
|
|
3664
|
+
j(hr, {
|
|
3671
3665
|
"yaml-record": a.formFields
|
|
3672
3666
|
}, null, 8, ["yaml-record"])
|
|
3673
3667
|
]),
|
|
@@ -3705,57 +3699,57 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3705
3699
|
var C;
|
|
3706
3700
|
return ((C = n.value) == null ? void 0 : C.querySelector('[data-truncate="true"]')) || null;
|
|
3707
3701
|
}), a = w(() => {
|
|
3708
|
-
var C,
|
|
3709
|
-
const
|
|
3710
|
-
return
|
|
3702
|
+
var C, U;
|
|
3703
|
+
const N = (C = t.rowEl) == null ? void 0 : C.querySelectorAll("td");
|
|
3704
|
+
return N ? ((U = N[0]) == null ? void 0 : U.getAttribute("data-testid")) === t.keyName : !0;
|
|
3711
3705
|
}), i = w(() => a.value || t.tooltip);
|
|
3712
3706
|
let o;
|
|
3713
3707
|
const l = () => {
|
|
3714
3708
|
o && (o.disconnect(), o = void 0);
|
|
3715
3709
|
}, s = () => {
|
|
3716
|
-
var C,
|
|
3717
|
-
let
|
|
3710
|
+
var C, U, N;
|
|
3711
|
+
let J = ((C = n.value) == null ? void 0 : C.clientWidth) || 0;
|
|
3718
3712
|
if (n.value && "getComputedStyle" in window) {
|
|
3719
|
-
const
|
|
3720
|
-
|
|
3713
|
+
const h = window.getComputedStyle(n.value);
|
|
3714
|
+
J -= (parseFloat(h.paddingLeft) || 0) + (parseFloat(h.paddingRight) || 0);
|
|
3721
3715
|
}
|
|
3722
|
-
p.value = ((
|
|
3723
|
-
}, u =
|
|
3716
|
+
p.value = ((U = r.value) == null ? void 0 : U.getBoundingClientRect().width) || 0, c.value = J, y.value = ((N = u.value) == null ? void 0 : N.innerText) || "";
|
|
3717
|
+
}, u = M({}), p = M(0), c = M(0), y = M(""), f = w(() => [r.value, n.value]), x = $e(
|
|
3724
3718
|
f,
|
|
3725
3719
|
(C) => {
|
|
3726
3720
|
if (i.value && (l(), "ResizeObserver" in window && window)) {
|
|
3727
|
-
o = new ResizeObserver((
|
|
3721
|
+
o = new ResizeObserver((U) => {
|
|
3728
3722
|
window.requestAnimationFrame(() => {
|
|
3729
|
-
!Array.isArray(
|
|
3723
|
+
!Array.isArray(U) || !U.length || s();
|
|
3730
3724
|
});
|
|
3731
3725
|
});
|
|
3732
|
-
for (const
|
|
3733
|
-
|
|
3726
|
+
for (const U of C)
|
|
3727
|
+
U && o.observe(U);
|
|
3734
3728
|
}
|
|
3735
3729
|
},
|
|
3736
3730
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3737
|
-
),
|
|
3738
|
-
return
|
|
3731
|
+
), T = w(() => i.value ? p.value > c.value : !1);
|
|
3732
|
+
return Sr(() => {
|
|
3739
3733
|
s();
|
|
3740
|
-
}),
|
|
3741
|
-
|
|
3742
|
-
}), (C,
|
|
3743
|
-
const
|
|
3744
|
-
return m(),
|
|
3734
|
+
}), xr(() => {
|
|
3735
|
+
x();
|
|
3736
|
+
}), (C, U) => {
|
|
3737
|
+
const N = R("KTooltip");
|
|
3738
|
+
return m(), $("span", {
|
|
3745
3739
|
ref_key: "contentRef",
|
|
3746
3740
|
ref: u,
|
|
3747
3741
|
class: "content-wrapper"
|
|
3748
3742
|
}, [
|
|
3749
|
-
i.value ? (m(),
|
|
3743
|
+
i.value ? (m(), $("span", {
|
|
3750
3744
|
key: 0,
|
|
3751
3745
|
"data-truncate": i.value || void 0
|
|
3752
3746
|
}, [
|
|
3753
|
-
N
|
|
3747
|
+
j(N, {
|
|
3754
3748
|
"max-width": "300",
|
|
3755
3749
|
placement: "bottom-start",
|
|
3756
|
-
text:
|
|
3750
|
+
text: T.value ? y.value : ""
|
|
3757
3751
|
}, {
|
|
3758
|
-
default:
|
|
3752
|
+
default: v(() => [
|
|
3759
3753
|
ne(C.$slots, "default", {}, void 0, !0)
|
|
3760
3754
|
]),
|
|
3761
3755
|
_: 3
|
|
@@ -3886,7 +3880,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3886
3880
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3887
3881
|
setup(e, { emit: t }) {
|
|
3888
3882
|
const n = e, r = t, { i18n: { t: a } } = le.useI18n(), i = w(() => {
|
|
3889
|
-
var d,
|
|
3883
|
+
var d, S;
|
|
3890
3884
|
return typeof n.errorMessage == "string" ? {
|
|
3891
3885
|
hasError: !!n.errorMessage,
|
|
3892
3886
|
title: n.errorMessage,
|
|
@@ -3894,15 +3888,15 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3894
3888
|
} : {
|
|
3895
3889
|
hasError: !!n.errorMessage,
|
|
3896
3890
|
title: (d = n.errorMessage) == null ? void 0 : d.title,
|
|
3897
|
-
message: (
|
|
3891
|
+
message: (S = n.errorMessage) == null ? void 0 : S.message
|
|
3898
3892
|
};
|
|
3899
3893
|
}), o = w(() => n.cacheIdentifier || n.preferencesStorageKey), l = (d) => d.hasData || !!n.query, s = w(() => {
|
|
3900
3894
|
const d = [];
|
|
3901
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3902
|
-
const B = n.tableHeaders[
|
|
3895
|
+
return Object.keys(n.tableHeaders).forEach((S) => {
|
|
3896
|
+
const B = n.tableHeaders[S];
|
|
3903
3897
|
d.push({
|
|
3904
|
-
label: B.label ??
|
|
3905
|
-
key:
|
|
3898
|
+
label: B.label ?? S,
|
|
3899
|
+
key: S,
|
|
3906
3900
|
sortable: B.sortable ?? !1,
|
|
3907
3901
|
hidable: B.hidable ?? !0
|
|
3908
3902
|
});
|
|
@@ -3914,47 +3908,47 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3914
3908
|
"data-rowid": d.id,
|
|
3915
3909
|
"data-testid": d.name,
|
|
3916
3910
|
...n.rowAttributes(d)
|
|
3917
|
-
}), p =
|
|
3918
|
-
var
|
|
3919
|
-
return (
|
|
3911
|
+
}), p = M({}), c = (d) => {
|
|
3912
|
+
var S;
|
|
3913
|
+
return (S = p.value) == null ? void 0 : S.$el.querySelector(`[data-rowid="${d.id}"]`);
|
|
3920
3914
|
}, y = (d) => {
|
|
3921
|
-
const
|
|
3915
|
+
const S = {
|
|
3922
3916
|
"data-testid": d.headerKey,
|
|
3923
3917
|
...n.cellAttributes(d)
|
|
3924
3918
|
};
|
|
3925
|
-
return d.colIndex === 0 && (
|
|
3919
|
+
return d.colIndex === 0 && (S.style = {
|
|
3926
3920
|
maxWidth: "250px",
|
|
3927
3921
|
overflowX: "hidden",
|
|
3928
3922
|
textOverflow: "ellipsis"
|
|
3929
|
-
}),
|
|
3923
|
+
}), S;
|
|
3930
3924
|
}, f = () => {
|
|
3931
|
-
r("empty-state-cta-clicked"),
|
|
3932
|
-
},
|
|
3925
|
+
r("empty-state-cta-clicked"), x();
|
|
3926
|
+
}, x = () => {
|
|
3933
3927
|
r("clear-search-input");
|
|
3934
|
-
},
|
|
3935
|
-
r("click:row",
|
|
3928
|
+
}, T = w(() => n.disableRowClick ? void 0 : (d, S) => {
|
|
3929
|
+
r("click:row", S);
|
|
3936
3930
|
}), C = (d) => {
|
|
3937
3931
|
r("sort", d);
|
|
3938
|
-
}, { setTablePreferences:
|
|
3939
|
-
const d =
|
|
3932
|
+
}, { setTablePreferences: U, getTablePreferences: N } = Dr(), J = M(N(o.value)), h = w(() => {
|
|
3933
|
+
const d = N(o.value);
|
|
3940
3934
|
return {
|
|
3941
3935
|
...n.initialFetcherParams,
|
|
3942
3936
|
...d
|
|
3943
3937
|
};
|
|
3944
|
-
}),
|
|
3945
|
-
|
|
3946
|
-
!("hidable" in
|
|
3947
|
-
}), o.value &&
|
|
3938
|
+
}), _ = (d) => {
|
|
3939
|
+
J.value = d, s.value.forEach((S) => {
|
|
3940
|
+
!("hidable" in S) || !J.value.columnVisibility || S.hidable === !1 && (J.value.columnVisibility[S.key] = !0);
|
|
3941
|
+
}), o.value && U(o.value, d);
|
|
3948
3942
|
};
|
|
3949
|
-
return (d,
|
|
3950
|
-
const B =
|
|
3951
|
-
return m(),
|
|
3943
|
+
return (d, S) => {
|
|
3944
|
+
const B = R("KButton"), I = R("KDropdown"), G = R("KTable"), E = R("KCard");
|
|
3945
|
+
return m(), D(E, {
|
|
3952
3946
|
class: "kong-ui-entity-base-table",
|
|
3953
3947
|
title: e.title,
|
|
3954
3948
|
"title-tag": e.titleTag
|
|
3955
3949
|
}, {
|
|
3956
|
-
default:
|
|
3957
|
-
|
|
3950
|
+
default: v(() => [
|
|
3951
|
+
j(G, {
|
|
3958
3952
|
ref_key: "tableRefs",
|
|
3959
3953
|
ref: p,
|
|
3960
3954
|
"cache-identifier": o.value,
|
|
@@ -3973,7 +3967,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3973
3967
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3974
3968
|
headers: s.value,
|
|
3975
3969
|
"hide-pagination-when-optional": "",
|
|
3976
|
-
"initial-fetcher-params":
|
|
3970
|
+
"initial-fetcher-params": h.value,
|
|
3977
3971
|
loading: e.isLoading,
|
|
3978
3972
|
"pagination-offset": e.paginationType === "offset",
|
|
3979
3973
|
"resize-columns": "",
|
|
@@ -3981,48 +3975,48 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3981
3975
|
"search-input": e.query,
|
|
3982
3976
|
"sort-handler-function": e.enableClientSort ? e.sortHandlerFunction : void 0,
|
|
3983
3977
|
sortable: !e.disableSorting,
|
|
3984
|
-
"table-preferences":
|
|
3978
|
+
"table-preferences": J.value,
|
|
3985
3979
|
onEmptyStateActionClick: f,
|
|
3986
|
-
"onRow:click":
|
|
3987
|
-
onSort:
|
|
3988
|
-
"onUpdate:tablePreferences":
|
|
3989
|
-
},
|
|
3990
|
-
toolbar:
|
|
3991
|
-
Ne(
|
|
3980
|
+
"onRow:click": T.value,
|
|
3981
|
+
onSort: S[0] || (S[0] = (b) => C(b)),
|
|
3982
|
+
"onUpdate:tablePreferences": _
|
|
3983
|
+
}, Be({
|
|
3984
|
+
toolbar: v(({ state: b }) => [
|
|
3985
|
+
Ne(L("div", ns, [
|
|
3992
3986
|
ne(d.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3993
|
-
d.$slots["toolbar-button"] ? (m(),
|
|
3987
|
+
d.$slots["toolbar-button"] ? (m(), $("div", rs, [
|
|
3994
3988
|
ne(d.$slots, "toolbar-button", {}, void 0, !0)
|
|
3995
3989
|
])) : W("", !0)
|
|
3996
3990
|
], 512), [
|
|
3997
|
-
[je, l(
|
|
3991
|
+
[je, l(b)]
|
|
3998
3992
|
])
|
|
3999
3993
|
]),
|
|
4000
|
-
actions:
|
|
4001
|
-
|
|
3994
|
+
actions: v(({ row: b, rowKey: K, rowValue: F }) => [
|
|
3995
|
+
L("div", {
|
|
4002
3996
|
class: "actions-container",
|
|
4003
|
-
"data-testid":
|
|
3997
|
+
"data-testid": b.name
|
|
4004
3998
|
}, [
|
|
4005
|
-
|
|
3999
|
+
j(I, {
|
|
4006
4000
|
"kpop-attributes": { placement: "bottom-end" },
|
|
4007
4001
|
width: e.dropdownMenuWidth
|
|
4008
4002
|
}, {
|
|
4009
|
-
items:
|
|
4003
|
+
items: v(() => [
|
|
4010
4004
|
ne(d.$slots, "actions", {
|
|
4011
|
-
row:
|
|
4005
|
+
row: b,
|
|
4012
4006
|
rowKey: K,
|
|
4013
4007
|
rowValue: F
|
|
4014
4008
|
}, void 0, !0)
|
|
4015
4009
|
]),
|
|
4016
|
-
default:
|
|
4017
|
-
|
|
4010
|
+
default: v(() => [
|
|
4011
|
+
j(B, {
|
|
4018
4012
|
appearance: "tertiary",
|
|
4019
4013
|
class: "actions-trigger",
|
|
4020
4014
|
"data-testid": "overflow-actions-button",
|
|
4021
4015
|
icon: "",
|
|
4022
4016
|
size: "small"
|
|
4023
4017
|
}, {
|
|
4024
|
-
default:
|
|
4025
|
-
|
|
4018
|
+
default: v(() => [
|
|
4019
|
+
j(g(Pl))
|
|
4026
4020
|
]),
|
|
4027
4021
|
_: 1
|
|
4028
4022
|
})
|
|
@@ -4033,18 +4027,18 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4033
4027
|
]),
|
|
4034
4028
|
_: 2
|
|
4035
4029
|
}, [
|
|
4036
|
-
ve(e.tableHeaders, (
|
|
4030
|
+
ve(e.tableHeaders, (b, K) => ({
|
|
4037
4031
|
name: K,
|
|
4038
|
-
fn:
|
|
4039
|
-
|
|
4032
|
+
fn: v(({ row: F, rowKey: H, rowValue: te }) => [
|
|
4033
|
+
j(ts, {
|
|
4040
4034
|
"key-name": String(K),
|
|
4041
4035
|
"row-el": c(F),
|
|
4042
|
-
tooltip:
|
|
4036
|
+
tooltip: b.tooltip
|
|
4043
4037
|
}, {
|
|
4044
|
-
default:
|
|
4038
|
+
default: v(() => [
|
|
4045
4039
|
ne(d.$slots, K, {
|
|
4046
4040
|
row: F,
|
|
4047
|
-
rowKey:
|
|
4041
|
+
rowKey: H,
|
|
4048
4042
|
rowValue: te
|
|
4049
4043
|
}, () => [
|
|
4050
4044
|
Z(q(te), 1)
|
|
@@ -4056,8 +4050,8 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4056
4050
|
})),
|
|
4057
4051
|
e.query ? void 0 : {
|
|
4058
4052
|
name: "empty-state-action-icon",
|
|
4059
|
-
fn:
|
|
4060
|
-
|
|
4053
|
+
fn: v(() => [
|
|
4054
|
+
j(g(vl))
|
|
4061
4055
|
]),
|
|
4062
4056
|
key: "0"
|
|
4063
4057
|
}
|
|
@@ -4118,8 +4112,8 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4118
4112
|
a("proceed");
|
|
4119
4113
|
};
|
|
4120
4114
|
return (s, u) => {
|
|
4121
|
-
const p =
|
|
4122
|
-
return m(),
|
|
4115
|
+
const p = R("KAlert"), c = R("KPrompt");
|
|
4116
|
+
return m(), D(c, {
|
|
4123
4117
|
"action-button-appearance": "danger",
|
|
4124
4118
|
"action-button-disabled": e.actionPending,
|
|
4125
4119
|
"action-button-text": "Yes, delete",
|
|
@@ -4130,36 +4124,36 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4130
4124
|
onCancel: o,
|
|
4131
4125
|
onProceed: l
|
|
4132
4126
|
}, {
|
|
4133
|
-
default:
|
|
4134
|
-
e.error ? (m(),
|
|
4135
|
-
|
|
4136
|
-
default:
|
|
4127
|
+
default: v(() => [
|
|
4128
|
+
e.error ? (m(), $("div", ls, [
|
|
4129
|
+
j(p, { appearance: "danger" }, {
|
|
4130
|
+
default: v(() => [
|
|
4137
4131
|
Z(q(e.error), 1)
|
|
4138
4132
|
]),
|
|
4139
4133
|
_: 1
|
|
4140
4134
|
})
|
|
4141
4135
|
])) : W("", !0),
|
|
4142
|
-
|
|
4136
|
+
j(g(n), {
|
|
4143
4137
|
class: "message",
|
|
4144
4138
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
4145
4139
|
tag: "p"
|
|
4146
|
-
},
|
|
4147
|
-
entityType:
|
|
4140
|
+
}, Be({
|
|
4141
|
+
entityType: v(() => [
|
|
4148
4142
|
Z(q(r.entityType), 1)
|
|
4149
4143
|
]),
|
|
4150
4144
|
_: 2
|
|
4151
4145
|
}, [
|
|
4152
4146
|
r.entityName ? {
|
|
4153
4147
|
name: "entityName",
|
|
4154
|
-
fn:
|
|
4155
|
-
|
|
4148
|
+
fn: v(() => [
|
|
4149
|
+
L("strong", null, q(r.entityName), 1)
|
|
4156
4150
|
]),
|
|
4157
4151
|
key: "0"
|
|
4158
4152
|
} : void 0
|
|
4159
4153
|
]), 1032, ["keypath"]),
|
|
4160
|
-
r.description || s.$slots.description ? (m(),
|
|
4154
|
+
r.description || s.$slots.description ? (m(), $("div", ss, [
|
|
4161
4155
|
ne(s.$slots, "description", {}, () => [
|
|
4162
|
-
|
|
4156
|
+
L("p", null, q(r.description), 1)
|
|
4163
4157
|
], !0)
|
|
4164
4158
|
])) : W("", !0)
|
|
4165
4159
|
]),
|
|
@@ -4190,16 +4184,16 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4190
4184
|
}
|
|
4191
4185
|
},
|
|
4192
4186
|
setup(e) {
|
|
4193
|
-
return (t, n) => (m(),
|
|
4194
|
-
|
|
4195
|
-
|
|
4187
|
+
return (t, n) => (m(), $("svg", ds, [
|
|
4188
|
+
L("mask", ps, [
|
|
4189
|
+
L("rect", {
|
|
4196
4190
|
fill: e.color,
|
|
4197
4191
|
height: "20",
|
|
4198
4192
|
width: "20"
|
|
4199
4193
|
}, null, 8, fs)
|
|
4200
4194
|
]),
|
|
4201
|
-
|
|
4202
|
-
|
|
4195
|
+
L("g", ms, [
|
|
4196
|
+
L("path", {
|
|
4203
4197
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
4204
4198
|
fill: e.color
|
|
4205
4199
|
}, null, 8, gs)
|
|
@@ -4209,7 +4203,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4209
4203
|
}), ys = {
|
|
4210
4204
|
key: 1,
|
|
4211
4205
|
class: "kong-ui-entity-filter"
|
|
4212
|
-
}, hs = { class: "kong-ui-entity-filter-menu" }, vs = ["data-testid"], bs = ["onClick", "onKeydown"], ks = { class: "menu-item-indicator" }, Cs = { class: "menu-item-body" }, ws = ["for"], _s = { class: "menu-item-buttons" },
|
|
4206
|
+
}, hs = { class: "kong-ui-entity-filter-menu" }, vs = ["data-testid"], bs = ["onClick", "onKeydown"], ks = { class: "menu-item-indicator" }, Cs = { class: "menu-item-body" }, ws = ["for"], _s = { class: "menu-item-buttons" }, Ss = { class: "filter-clear-button-container" }, xs = /* @__PURE__ */ X({
|
|
4213
4207
|
__name: "EntityFilter",
|
|
4214
4208
|
props: {
|
|
4215
4209
|
// filter config, either exact match or fuzzy match
|
|
@@ -4229,58 +4223,58 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4229
4223
|
},
|
|
4230
4224
|
emits: ["update:modelValue"],
|
|
4231
4225
|
setup(e, { emit: t }) {
|
|
4232
|
-
const { i18n: { t: n } } = le.useI18n(), r = e, a = t, i =
|
|
4233
|
-
const
|
|
4234
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
4235
|
-
|
|
4236
|
-
}),
|
|
4226
|
+
const { i18n: { t: n } } = le.useI18n(), r = e, a = t, i = M(!1), o = M({}), l = M(/* @__PURE__ */ new Set()), s = w(() => {
|
|
4227
|
+
const h = [];
|
|
4228
|
+
return new URLSearchParams(r.modelValue).forEach((_, d) => {
|
|
4229
|
+
_ !== "" && h.push(d);
|
|
4230
|
+
}), h;
|
|
4237
4231
|
}), u = w(() => {
|
|
4238
|
-
const
|
|
4239
|
-
return Object.keys(
|
|
4232
|
+
const h = r.config.fields;
|
|
4233
|
+
return Object.keys(h).filter((_) => {
|
|
4240
4234
|
var d;
|
|
4241
|
-
return (d =
|
|
4242
|
-
}).map((
|
|
4243
|
-
label:
|
|
4244
|
-
value:
|
|
4235
|
+
return (d = h == null ? void 0 : h[_]) == null ? void 0 : d.searchable;
|
|
4236
|
+
}).map((_) => ({
|
|
4237
|
+
label: h[_].label || _,
|
|
4238
|
+
value: _,
|
|
4245
4239
|
expanded: !1
|
|
4246
4240
|
}));
|
|
4247
4241
|
});
|
|
4248
|
-
|
|
4249
|
-
o.value = {}, new URLSearchParams(
|
|
4250
|
-
o.value[d] =
|
|
4242
|
+
$e(() => r.modelValue, (h) => {
|
|
4243
|
+
o.value = {}, new URLSearchParams(h).forEach((_, d) => {
|
|
4244
|
+
o.value[d] = _;
|
|
4251
4245
|
});
|
|
4252
4246
|
});
|
|
4253
4247
|
const p = () => {
|
|
4254
4248
|
i.value = !i.value;
|
|
4255
|
-
}, c = (
|
|
4256
|
-
l.value.has(
|
|
4257
|
-
}, y = (
|
|
4258
|
-
a("update:modelValue",
|
|
4249
|
+
}, c = (h) => {
|
|
4250
|
+
l.value.has(h) ? l.value.delete(h) : l.value.add(h);
|
|
4251
|
+
}, y = (h) => {
|
|
4252
|
+
a("update:modelValue", h);
|
|
4259
4253
|
}, f = () => {
|
|
4260
4254
|
y("");
|
|
4261
|
-
},
|
|
4262
|
-
var
|
|
4263
|
-
return (((d = (
|
|
4264
|
-
value:
|
|
4265
|
-
label:
|
|
4255
|
+
}, x = (h) => `filter-${h}`, T = (h) => {
|
|
4256
|
+
var _, d;
|
|
4257
|
+
return (((d = (_ = r.config.schema) == null ? void 0 : _[h]) == null ? void 0 : d.values) ?? []).map((S) => ({
|
|
4258
|
+
value: S,
|
|
4259
|
+
label: S
|
|
4266
4260
|
}));
|
|
4267
|
-
}, C = (
|
|
4268
|
-
var
|
|
4269
|
-
return ((d = (
|
|
4270
|
-
},
|
|
4261
|
+
}, C = (h) => {
|
|
4262
|
+
var _, d;
|
|
4263
|
+
return ((d = (_ = r.config.schema) == null ? void 0 : _[h]) == null ? void 0 : d.type) ?? "text";
|
|
4264
|
+
}, U = (h) => {
|
|
4271
4265
|
o.value = {
|
|
4272
4266
|
...o.value,
|
|
4273
|
-
[
|
|
4274
|
-
},
|
|
4275
|
-
},
|
|
4276
|
-
o.value = {},
|
|
4277
|
-
},
|
|
4278
|
-
const
|
|
4279
|
-
|
|
4267
|
+
[h]: ""
|
|
4268
|
+
}, J();
|
|
4269
|
+
}, N = () => {
|
|
4270
|
+
o.value = {}, J(!0);
|
|
4271
|
+
}, J = (h = !1) => {
|
|
4272
|
+
const _ = Object.keys(o.value).reduce((d, S) => (o.value[S] && (d[S] = `${o.value[S]}`), d), {});
|
|
4273
|
+
h && (i.value = !1), a("update:modelValue", new URLSearchParams(_).toString());
|
|
4280
4274
|
};
|
|
4281
|
-
return (
|
|
4282
|
-
const d =
|
|
4283
|
-
return e.config.isExactMatch ? (m(),
|
|
4275
|
+
return (h, _) => {
|
|
4276
|
+
const d = R("KInput"), S = R("KButton"), B = R("KSelect");
|
|
4277
|
+
return e.config.isExactMatch ? (m(), D(d, {
|
|
4284
4278
|
key: 0,
|
|
4285
4279
|
autocomplete: "off",
|
|
4286
4280
|
class: "kong-ui-entity-filter-input",
|
|
@@ -4289,11 +4283,11 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4289
4283
|
placeholder: e.config.placeholder,
|
|
4290
4284
|
"onUpdate:modelValue": y
|
|
4291
4285
|
}, {
|
|
4292
|
-
before:
|
|
4293
|
-
|
|
4286
|
+
before: v(() => [
|
|
4287
|
+
j(yn)
|
|
4294
4288
|
]),
|
|
4295
|
-
after:
|
|
4296
|
-
Ne(
|
|
4289
|
+
after: v(() => [
|
|
4290
|
+
Ne(j(g(ql), {
|
|
4297
4291
|
class: "kong-ui-entity-filter-clear",
|
|
4298
4292
|
onClick: f
|
|
4299
4293
|
}, null, 512), [
|
|
@@ -4301,65 +4295,65 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4301
4295
|
])
|
|
4302
4296
|
]),
|
|
4303
4297
|
_: 1
|
|
4304
|
-
}, 8, ["model-value", "placeholder"])) : (m(),
|
|
4305
|
-
|
|
4298
|
+
}, 8, ["model-value", "placeholder"])) : (m(), $("div", ys, [
|
|
4299
|
+
j(S, {
|
|
4306
4300
|
appearance: "tertiary",
|
|
4307
4301
|
"data-testid": "filter-button",
|
|
4308
4302
|
onClick: p
|
|
4309
4303
|
}, {
|
|
4310
|
-
default:
|
|
4311
|
-
|
|
4304
|
+
default: v(() => [
|
|
4305
|
+
j(yn),
|
|
4312
4306
|
Z(" " + q(g(n)("filter.filterButtonText")) + " " + q(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
4313
4307
|
]),
|
|
4314
4308
|
_: 1
|
|
4315
4309
|
}),
|
|
4316
|
-
Ne(
|
|
4310
|
+
Ne(L("div", {
|
|
4317
4311
|
class: "kong-ui-entity-filter-backdrop",
|
|
4318
4312
|
onClick: p
|
|
4319
4313
|
}, null, 512), [
|
|
4320
4314
|
[je, i.value]
|
|
4321
4315
|
]),
|
|
4322
|
-
Ne(
|
|
4323
|
-
(m(!0),
|
|
4324
|
-
var
|
|
4325
|
-
return m(),
|
|
4316
|
+
Ne(L("div", hs, [
|
|
4317
|
+
(m(!0), $(be, null, ve(u.value, (I) => {
|
|
4318
|
+
var G, E;
|
|
4319
|
+
return m(), $("div", {
|
|
4326
4320
|
key: I.value,
|
|
4327
4321
|
class: "kong-ui-entity-filter-menu-item",
|
|
4328
4322
|
"data-testid": I.value
|
|
4329
4323
|
}, [
|
|
4330
|
-
|
|
4331
|
-
class:
|
|
4324
|
+
L("span", {
|
|
4325
|
+
class: Ee(["menu-item-title", { expanded: l.value.has(I.value) }]),
|
|
4332
4326
|
role: "button",
|
|
4333
4327
|
tabindex: "0",
|
|
4334
|
-
onClick: (
|
|
4335
|
-
onKeydown: wr((
|
|
4328
|
+
onClick: (b) => c(I.value),
|
|
4329
|
+
onKeydown: wr((b) => c(I.value), ["enter"])
|
|
4336
4330
|
}, [
|
|
4337
4331
|
Z(q(I.label) + " ", 1),
|
|
4338
|
-
Ne(
|
|
4332
|
+
Ne(L("span", ks, null, 512), [
|
|
4339
4333
|
[je, s.value.includes(I.value)]
|
|
4340
4334
|
]),
|
|
4341
|
-
|
|
4342
|
-
class:
|
|
4335
|
+
j(g(Nl), {
|
|
4336
|
+
class: Ee(["menu-item-expand-icon", { expanded: l.value.has(I.value) }]),
|
|
4343
4337
|
color: g(_a)
|
|
4344
4338
|
}, null, 8, ["class", "color"])
|
|
4345
4339
|
], 42, bs),
|
|
4346
|
-
Ne(
|
|
4347
|
-
|
|
4340
|
+
Ne(L("div", Cs, [
|
|
4341
|
+
L("label", {
|
|
4348
4342
|
class: "menu-item-label",
|
|
4349
|
-
for:
|
|
4343
|
+
for: x(I.value)
|
|
4350
4344
|
}, q(g(n)("filter.fieldLabel")), 9, ws),
|
|
4351
|
-
((
|
|
4345
|
+
((E = (G = e.config.schema) == null ? void 0 : G[I.value]) == null ? void 0 : E.type) === "select" ? (m(), D(B, {
|
|
4352
4346
|
key: 0,
|
|
4353
|
-
id:
|
|
4347
|
+
id: x(I.value),
|
|
4354
4348
|
modelValue: o.value[I.value],
|
|
4355
|
-
"onUpdate:modelValue": (
|
|
4356
|
-
items:
|
|
4349
|
+
"onUpdate:modelValue": (b) => o.value[I.value] = b,
|
|
4350
|
+
items: T(I.value),
|
|
4357
4351
|
placeholder: g(n)("filter.selectPlaceholder")
|
|
4358
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(),
|
|
4352
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), D(d, {
|
|
4359
4353
|
key: 1,
|
|
4360
|
-
id:
|
|
4354
|
+
id: x(I.value),
|
|
4361
4355
|
modelValue: o.value[I.value],
|
|
4362
|
-
"onUpdate:modelValue": (
|
|
4356
|
+
"onUpdate:modelValue": (b) => o.value[I.value] = b,
|
|
4363
4357
|
autocomplete: "off",
|
|
4364
4358
|
placeholder: g(n)("filter.inputPlaceholder"),
|
|
4365
4359
|
type: C(I.value)
|
|
@@ -4367,25 +4361,25 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4367
4361
|
], 512), [
|
|
4368
4362
|
[je, l.value.has(I.value)]
|
|
4369
4363
|
]),
|
|
4370
|
-
Ne(
|
|
4371
|
-
|
|
4364
|
+
Ne(L("div", _s, [
|
|
4365
|
+
j(S, {
|
|
4372
4366
|
appearance: "tertiary",
|
|
4373
4367
|
"data-testid": "apply-filter",
|
|
4374
4368
|
size: "small",
|
|
4375
|
-
onClick:
|
|
4369
|
+
onClick: _[0] || (_[0] = (b) => J(!0))
|
|
4376
4370
|
}, {
|
|
4377
|
-
default:
|
|
4371
|
+
default: v(() => [
|
|
4378
4372
|
Z(q(g(n)("filter.applyButtonText")), 1)
|
|
4379
4373
|
]),
|
|
4380
4374
|
_: 1
|
|
4381
4375
|
}),
|
|
4382
|
-
|
|
4376
|
+
j(S, {
|
|
4383
4377
|
appearance: "tertiary",
|
|
4384
4378
|
"data-testid": "clear-filter",
|
|
4385
4379
|
size: "small",
|
|
4386
|
-
onClick: (
|
|
4380
|
+
onClick: (b) => U(I.value)
|
|
4387
4381
|
}, {
|
|
4388
|
-
default:
|
|
4382
|
+
default: v(() => [
|
|
4389
4383
|
Z(q(g(n)("filter.clearButtonText")), 1)
|
|
4390
4384
|
]),
|
|
4391
4385
|
_: 2
|
|
@@ -4395,13 +4389,13 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4395
4389
|
])
|
|
4396
4390
|
], 8, vs);
|
|
4397
4391
|
}), 128)),
|
|
4398
|
-
|
|
4399
|
-
|
|
4392
|
+
L("div", Ss, [
|
|
4393
|
+
j(S, {
|
|
4400
4394
|
appearance: "tertiary",
|
|
4401
4395
|
size: "small",
|
|
4402
|
-
onClick:
|
|
4396
|
+
onClick: N
|
|
4403
4397
|
}, {
|
|
4404
|
-
default:
|
|
4398
|
+
default: v(() => [
|
|
4405
4399
|
Z(q(g(n)("filter.clearAllButtonText")), 1)
|
|
4406
4400
|
]),
|
|
4407
4401
|
_: 1
|
|
@@ -4413,7 +4407,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4413
4407
|
]));
|
|
4414
4408
|
};
|
|
4415
4409
|
}
|
|
4416
|
-
}), Is = /* @__PURE__ */ ke(
|
|
4410
|
+
}), Is = /* @__PURE__ */ ke(xs, [["__scopeId", "data-v-94990087"]]), lt = /* @__PURE__ */ X({
|
|
4417
4411
|
__name: "PermissionsWrapper",
|
|
4418
4412
|
props: {
|
|
4419
4413
|
/**
|
|
@@ -4435,8 +4429,8 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4435
4429
|
}
|
|
4436
4430
|
},
|
|
4437
4431
|
setup(e) {
|
|
4438
|
-
const t = e, n =
|
|
4439
|
-
return
|
|
4432
|
+
const t = e, n = M(void 0), r = w(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4433
|
+
return $e(() => t.authFunction, async () => {
|
|
4440
4434
|
n.value = await t.authFunction();
|
|
4441
4435
|
}, { immediate: !0 }), (a, i) => r.value ? ne(a.$slots, "default", {
|
|
4442
4436
|
key: 0,
|
|
@@ -4446,7 +4440,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4446
4440
|
});
|
|
4447
4441
|
let st;
|
|
4448
4442
|
const As = new Uint8Array(16);
|
|
4449
|
-
function
|
|
4443
|
+
function $s() {
|
|
4450
4444
|
if (!st && (st = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !st))
|
|
4451
4445
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
4452
4446
|
return st(As);
|
|
@@ -4454,7 +4448,7 @@ function Ts() {
|
|
|
4454
4448
|
const ue = [];
|
|
4455
4449
|
for (let e = 0; e < 256; ++e)
|
|
4456
4450
|
ue.push((e + 256).toString(16).slice(1));
|
|
4457
|
-
function
|
|
4451
|
+
function Ts(e, t = 0) {
|
|
4458
4452
|
return ue[e[t + 0]] + ue[e[t + 1]] + ue[e[t + 2]] + ue[e[t + 3]] + "-" + ue[e[t + 4]] + ue[e[t + 5]] + "-" + ue[e[t + 6]] + ue[e[t + 7]] + "-" + ue[e[t + 8]] + ue[e[t + 9]] + "-" + ue[e[t + 10]] + ue[e[t + 11]] + ue[e[t + 12]] + ue[e[t + 13]] + ue[e[t + 14]] + ue[e[t + 15]];
|
|
4459
4453
|
}
|
|
4460
4454
|
const Ns = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), hn = {
|
|
@@ -4464,22 +4458,22 @@ function js(e, t, n) {
|
|
|
4464
4458
|
if (hn.randomUUID && !t && !e)
|
|
4465
4459
|
return hn.randomUUID();
|
|
4466
4460
|
e = e || {};
|
|
4467
|
-
const r = e.random || (e.rng ||
|
|
4461
|
+
const r = e.random || (e.rng || $s)();
|
|
4468
4462
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
4469
4463
|
n = n || 0;
|
|
4470
4464
|
for (let a = 0; a < 16; ++a)
|
|
4471
4465
|
t[n + a] = r[a];
|
|
4472
4466
|
return t;
|
|
4473
4467
|
}
|
|
4474
|
-
return
|
|
4468
|
+
return Ts(r);
|
|
4475
4469
|
}
|
|
4476
|
-
const
|
|
4470
|
+
const Os = ["aria-labelledby"], Ms = { class: "form-section-wrapper" }, Es = {
|
|
4477
4471
|
key: 1,
|
|
4478
4472
|
class: "form-section-description"
|
|
4479
|
-
},
|
|
4473
|
+
}, Fs = {
|
|
4480
4474
|
key: 2,
|
|
4481
4475
|
class: "form-section-footer"
|
|
4482
|
-
},
|
|
4476
|
+
}, qs = { class: "form-section-content" }, Ks = /* @__PURE__ */ X({
|
|
4483
4477
|
__name: "EntityFormSection",
|
|
4484
4478
|
props: {
|
|
4485
4479
|
title: {
|
|
@@ -4509,42 +4503,42 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4509
4503
|
},
|
|
4510
4504
|
setup(e) {
|
|
4511
4505
|
const t = jt(), n = js();
|
|
4512
|
-
return (r, a) => (m(),
|
|
4506
|
+
return (r, a) => (m(), $("div", {
|
|
4513
4507
|
"aria-labelledby": e.title ? g(n) : void 0,
|
|
4514
|
-
class:
|
|
4508
|
+
class: Ee(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4515
4509
|
role: "group"
|
|
4516
4510
|
}, [
|
|
4517
|
-
|
|
4518
|
-
e.hideInfoHeader ? W("", !0) : (m(),
|
|
4511
|
+
L("div", Ms, [
|
|
4512
|
+
e.hideInfoHeader ? W("", !0) : (m(), $("div", {
|
|
4519
4513
|
key: 0,
|
|
4520
|
-
class:
|
|
4514
|
+
class: Ee(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4521
4515
|
}, [
|
|
4522
|
-
e.title ? (m(),
|
|
4516
|
+
e.title ? (m(), D(xe(e.titleTag), {
|
|
4523
4517
|
key: 0,
|
|
4524
4518
|
id: g(n),
|
|
4525
4519
|
class: "form-section-title"
|
|
4526
4520
|
}, {
|
|
4527
|
-
default:
|
|
4521
|
+
default: v(() => [
|
|
4528
4522
|
Z(q(e.title), 1)
|
|
4529
4523
|
]),
|
|
4530
4524
|
_: 1
|
|
4531
4525
|
}, 8, ["id"])) : W("", !0),
|
|
4532
|
-
e.description || g(t).description ? (m(),
|
|
4526
|
+
e.description || g(t).description ? (m(), $("div", Es, [
|
|
4533
4527
|
ne(r.$slots, "description", {}, () => [
|
|
4534
|
-
|
|
4528
|
+
L("p", null, q(e.description), 1)
|
|
4535
4529
|
], !0)
|
|
4536
4530
|
])) : W("", !0),
|
|
4537
|
-
g(t).footer ? (m(),
|
|
4531
|
+
g(t).footer ? (m(), $("div", Fs, [
|
|
4538
4532
|
ne(r.$slots, "footer", {}, void 0, !0)
|
|
4539
4533
|
])) : W("", !0)
|
|
4540
4534
|
], 2)),
|
|
4541
|
-
|
|
4535
|
+
L("div", qs, [
|
|
4542
4536
|
ne(r.$slots, "default", {}, void 0, !0)
|
|
4543
4537
|
])
|
|
4544
4538
|
])
|
|
4545
|
-
], 10,
|
|
4539
|
+
], 10, Os));
|
|
4546
4540
|
}
|
|
4547
|
-
}), vn = /* @__PURE__ */ ke(
|
|
4541
|
+
}), vn = /* @__PURE__ */ ke(Ks, [["__scopeId", "data-v-b1f74200"]]), { useAxios: Ut, useDeleteUrlBuilder: Bs, useErrors: Ls, useExternalLinkCreator: su, useFetchUrlBuilder: uu, useFetcher: Us, useDebouncedFilter: vr, useStringHelpers: cu, useHelpers: du, useGatewayFeatureSupported: pu, useTruncationDetector: fu, useValidators: Vs } = le, Ps = { class: "add-to-group-form-container" }, Rs = { class: "add-to-group-cta-text" }, Ds = {
|
|
4548
4542
|
key: 0,
|
|
4549
4543
|
class: "kong-ui-entity-add-to-groups-error"
|
|
4550
4544
|
}, zs = { key: 0 }, Gs = /* @__PURE__ */ X({
|
|
@@ -4564,8 +4558,8 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4564
4558
|
},
|
|
4565
4559
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4566
4560
|
setup(e, { emit: t }) {
|
|
4567
|
-
var
|
|
4568
|
-
const { i18n: { t: n } } = yt.useI18n(), r = e, a = t, { axiosInstance: i } = Ut((
|
|
4561
|
+
var E;
|
|
4562
|
+
const { i18n: { t: n } } = yt.useI18n(), r = e, a = t, { axiosInstance: i } = Ut((E = r.config) == null ? void 0 : E.axiosRequestConfig), o = M([]), {
|
|
4569
4563
|
debouncedQueryChange: l,
|
|
4570
4564
|
loading: s,
|
|
4571
4565
|
allRecords: u,
|
|
@@ -4574,103 +4568,103 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4574
4568
|
results: y
|
|
4575
4569
|
} = vr(
|
|
4576
4570
|
r.config,
|
|
4577
|
-
|
|
4571
|
+
Oe.list[r.config.app].all,
|
|
4578
4572
|
"",
|
|
4579
4573
|
{
|
|
4580
4574
|
fetchedItemsKey: "data",
|
|
4581
4575
|
searchKeys: ["name", "id"]
|
|
4582
4576
|
}
|
|
4583
|
-
), f = w(() => p.value ? n("consumer_groups.errors.general") : ""),
|
|
4584
|
-
label:
|
|
4585
|
-
value:
|
|
4586
|
-
selected: o.value.includes(
|
|
4587
|
-
data:
|
|
4577
|
+
), f = w(() => p.value ? n("consumer_groups.errors.general") : ""), x = M(0), T = w(() => u.value === void 0), C = w(() => y.value.map((b) => ({
|
|
4578
|
+
label: b.name,
|
|
4579
|
+
value: b.id,
|
|
4580
|
+
selected: o.value.includes(b.id),
|
|
4581
|
+
data: b
|
|
4588
4582
|
// we need this to determine whether or not to show the description text
|
|
4589
|
-
}))),
|
|
4583
|
+
}))), U = (b) => {
|
|
4590
4584
|
var F;
|
|
4591
|
-
const K =
|
|
4592
|
-
return K ? K.name :
|
|
4593
|
-
},
|
|
4594
|
-
|
|
4595
|
-
},
|
|
4585
|
+
const K = T.value ? y.value.find((H) => H.id === b) : (F = u.value) == null ? void 0 : F.find((H) => H.id === b);
|
|
4586
|
+
return K ? K.name : b;
|
|
4587
|
+
}, N = () => {
|
|
4588
|
+
_.value = "", J.value = [], I.value = [], a("cancel");
|
|
4589
|
+
}, J = M([]), h = M(!1), _ = M(""), d = async () => {
|
|
4596
4590
|
if (!o.value.length) {
|
|
4597
|
-
|
|
4591
|
+
_.value = "", I.value = [], a("cancel");
|
|
4598
4592
|
return;
|
|
4599
4593
|
}
|
|
4600
|
-
|
|
4594
|
+
h.value = !0, _.value = "", J.value = [], I.value = [];
|
|
4601
4595
|
try {
|
|
4602
|
-
const
|
|
4596
|
+
const b = o.value.map((H) => B(H)), K = await Promise.allSettled(b);
|
|
4603
4597
|
let F = !0;
|
|
4604
|
-
K.forEach((
|
|
4605
|
-
|
|
4606
|
-
}), F ? (
|
|
4598
|
+
K.forEach((H) => {
|
|
4599
|
+
H.status !== "fulfilled" && (F = !1);
|
|
4600
|
+
}), F ? (J.value = [], I.value = [], a("add:success", o.value), o.value = []) : (J.value.length && a("add:partial-success", J.value), o.value = [], G(K));
|
|
4607
4601
|
} catch {
|
|
4608
|
-
|
|
4602
|
+
_.value = n("consumer_groups.errors.add"), a("error", _.value);
|
|
4609
4603
|
} finally {
|
|
4610
|
-
|
|
4604
|
+
h.value = !1;
|
|
4611
4605
|
}
|
|
4612
|
-
},
|
|
4613
|
-
var K, F,
|
|
4614
|
-
let
|
|
4615
|
-
return r.config.app === "konnect" ?
|
|
4616
|
-
}), B = async (
|
|
4606
|
+
}, S = w(() => {
|
|
4607
|
+
var K, F, H, te;
|
|
4608
|
+
let b = `${r.config.apiBaseUrl}${Oe.list[r.config.app].forConsumer}`;
|
|
4609
|
+
return r.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((K = r.config) == null ? void 0 : K.controlPlaneId) || "").replace(/{consumerId}/gi, ((F = r.config) == null ? void 0 : F.consumerId) || "") : r.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (H = r.config) != null && H.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((te = r.config) == null ? void 0 : te.consumerId) || "")), b;
|
|
4610
|
+
}), B = async (b) => {
|
|
4617
4611
|
const K = {
|
|
4618
|
-
group:
|
|
4612
|
+
group: b
|
|
4619
4613
|
};
|
|
4620
4614
|
try {
|
|
4621
|
-
const F = await i.post(
|
|
4622
|
-
return
|
|
4615
|
+
const F = await i.post(S.value, K);
|
|
4616
|
+
return J.value.push(b), F;
|
|
4623
4617
|
} catch (F) {
|
|
4624
|
-
let
|
|
4625
|
-
return F.response.status === 409 && (
|
|
4618
|
+
let H = `${U(b)} - ${F.message}`;
|
|
4619
|
+
return F.response.status === 409 && (H = `${U(b)} - ${n("consumer_groups.errors.already_added")}`), Promise.reject(Error(H));
|
|
4626
4620
|
}
|
|
4627
|
-
}, I =
|
|
4628
|
-
I.value =
|
|
4621
|
+
}, I = M([]), G = (b) => {
|
|
4622
|
+
I.value = b.map((K) => {
|
|
4629
4623
|
var F;
|
|
4630
4624
|
return (F = K.reason) == null ? void 0 : F.message;
|
|
4631
4625
|
}).filter(Boolean);
|
|
4632
4626
|
};
|
|
4633
|
-
return
|
|
4634
|
-
|
|
4635
|
-
}, { immediate: !0, deep: !0 }),
|
|
4627
|
+
return $e(C, () => {
|
|
4628
|
+
x.value++;
|
|
4629
|
+
}, { immediate: !0, deep: !0 }), $e(() => r.visible, () => {
|
|
4636
4630
|
r.visible && c();
|
|
4637
|
-
}, { immediate: !0 }), (
|
|
4638
|
-
const F =
|
|
4639
|
-
return m(),
|
|
4640
|
-
"action-button-disabled":
|
|
4631
|
+
}, { immediate: !0 }), (b, K) => {
|
|
4632
|
+
const F = R("KMultiselect"), H = R("KAlert"), te = R("KPrompt");
|
|
4633
|
+
return m(), D(te, {
|
|
4634
|
+
"action-button-disabled": h.value,
|
|
4641
4635
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
4642
4636
|
"data-testid": "add-to-group-modal",
|
|
4643
4637
|
title: g(n)("consumer_groups.consumers.add.title"),
|
|
4644
4638
|
visible: e.visible,
|
|
4645
|
-
onCancel:
|
|
4639
|
+
onCancel: N,
|
|
4646
4640
|
onProceed: d
|
|
4647
4641
|
}, {
|
|
4648
|
-
default:
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4642
|
+
default: v(() => [
|
|
4643
|
+
L("div", Ps, [
|
|
4644
|
+
L("p", Rs, q(g(n)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4645
|
+
j(F, {
|
|
4652
4646
|
modelValue: o.value,
|
|
4653
4647
|
"onUpdate:modelValue": K[0] || (K[0] = (de) => o.value = de),
|
|
4654
4648
|
autosuggest: "",
|
|
4655
4649
|
"data-testid": "add-to-groups-multiselect",
|
|
4656
|
-
"dropdown-footer-text":
|
|
4650
|
+
"dropdown-footer-text": T.value ? g(n)("consumer_groups.consumers.add.footer") : void 0,
|
|
4657
4651
|
items: C.value,
|
|
4658
4652
|
label: g(n)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
4659
4653
|
loading: g(s),
|
|
4660
4654
|
placeholder: g(n)("consumer_groups.consumers.add.consumer_group_placeholder"),
|
|
4661
|
-
readonly:
|
|
4655
|
+
readonly: h.value,
|
|
4662
4656
|
required: "",
|
|
4663
4657
|
width: "100%",
|
|
4664
4658
|
onQueryChange: g(l)
|
|
4665
4659
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
default:
|
|
4669
|
-
|
|
4670
|
-
I.value.length ? (m(),
|
|
4671
|
-
(m(!0),
|
|
4660
|
+
_.value || f.value || I.value.length ? (m(), $("div", Ds, [
|
|
4661
|
+
j(H, { appearance: "danger" }, {
|
|
4662
|
+
default: v(() => [
|
|
4663
|
+
L("p", null, q(g(n)("consumer_groups.errors.add")), 1),
|
|
4664
|
+
I.value.length ? (m(), $("ul", zs, [
|
|
4665
|
+
(m(!0), $(be, null, ve(I.value, (de, Ye) => (m(), $("li", { key: Ye }, q(de), 1))), 128))
|
|
4672
4666
|
])) : W("", !0),
|
|
4673
|
-
|
|
4667
|
+
L("div", null, q(_.value || f.value), 1)
|
|
4674
4668
|
]),
|
|
4675
4669
|
_: 1
|
|
4676
4670
|
})
|
|
@@ -4681,12 +4675,12 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4681
4675
|
}, 8, ["action-button-disabled", "title", "visible"]);
|
|
4682
4676
|
};
|
|
4683
4677
|
}
|
|
4684
|
-
}),
|
|
4678
|
+
}), Vt = (e, t) => {
|
|
4685
4679
|
const n = e.__vccOpts || e;
|
|
4686
4680
|
for (const [r, a] of t)
|
|
4687
4681
|
n[r] = a;
|
|
4688
4682
|
return n;
|
|
4689
|
-
}, Hs = /* @__PURE__ */
|
|
4683
|
+
}, Hs = /* @__PURE__ */ Vt(Gs, [["__scopeId", "data-v-bb0a8037"]]), Js = { class: "kong-ui-entities-consumer-groups-list" }, Ws = { key: 1 }, Ys = /* @__PURE__ */ X({
|
|
4690
4684
|
__name: "ConsumerGroupList",
|
|
4691
4685
|
props: {
|
|
4692
4686
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4732,21 +4726,21 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4732
4726
|
},
|
|
4733
4727
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4734
4728
|
setup(e, { emit: t }) {
|
|
4735
|
-
var
|
|
4736
|
-
const n = t, r = e, { i18nT: a, i18n: { t: i } } = yt.useI18n(), o =
|
|
4729
|
+
var Rt;
|
|
4730
|
+
const n = t, r = e, { i18nT: a, i18n: { t: i } } = yt.useI18n(), o = Ot(), { axiosInstance: l } = Ut((Rt = r.config) == null ? void 0 : Rt.axiosRequestConfig), s = M(1), u = w(() => !!r.config.consumerId), p = w(
|
|
4737
4731
|
() => u.value ? "kong-ui-entities-consumer-groups-list-in-consumer-page" : "kong-ui-entities-consumer-groups-list"
|
|
4738
4732
|
), c = w(() => r.config.app !== "kongManager" || !!r.config.disableSorting), y = {
|
|
4739
4733
|
// the Name column is non-hidable
|
|
4740
4734
|
name: { label: i("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 }
|
|
4741
4735
|
};
|
|
4742
4736
|
r.config.app === "kongManager" && (y.consumers_count = { label: i("consumer_groups.list.table_headers.consumers_count"), searchable: !1, sortable: !1 }), y.tags = { label: i("consumer_groups.list.table_headers.tags"), sortable: !1 };
|
|
4743
|
-
const f = y,
|
|
4737
|
+
const f = y, x = (A) => ({
|
|
4744
4738
|
"data-testid": A.username ?? A.custom_id ?? A.id
|
|
4745
|
-
}),
|
|
4739
|
+
}), T = w(() => {
|
|
4746
4740
|
var Y, re, ge, we;
|
|
4747
|
-
let A = `${r.config.apiBaseUrl}${
|
|
4741
|
+
let A = `${r.config.apiBaseUrl}${Oe.list[r.config.app][u.value ? "forConsumer" : "all"]}`;
|
|
4748
4742
|
return r.config.app === "konnect" ? A = A.replace(/{controlPlaneId}/gi, ((Y = r.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = r.config) == null ? void 0 : re.consumerId) || "") : r.config.app === "kongManager" && (A = A.replace(/\/{workspace}/gi, (ge = r.config) != null && ge.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((we = r.config) == null ? void 0 : we.consumerId) || "")), A;
|
|
4749
|
-
}), C =
|
|
4743
|
+
}), C = M(""), U = w(() => {
|
|
4750
4744
|
const A = r.config.app === "konnect" || r.config.isExactMatch;
|
|
4751
4745
|
return A ? {
|
|
4752
4746
|
isExactMatch: A,
|
|
@@ -4762,11 +4756,11 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4762
4756
|
},
|
|
4763
4757
|
schema: r.config.filterSchema
|
|
4764
4758
|
};
|
|
4765
|
-
}),
|
|
4759
|
+
}), N = w(() => u.value && !r.config.paginatedEndpoint ? "consumer_groups" : void 0), { fetcher: J, fetcherState: h } = Us(r.config, T.value, N.value), _ = () => {
|
|
4766
4760
|
C.value = "";
|
|
4767
4761
|
}, d = () => {
|
|
4768
4762
|
s.value++;
|
|
4769
|
-
},
|
|
4763
|
+
}, S = M(null), B = (A, Y) => {
|
|
4770
4764
|
const re = A.id;
|
|
4771
4765
|
if (!Y(re)) {
|
|
4772
4766
|
n("copy:error", {
|
|
@@ -4794,71 +4788,71 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4794
4788
|
entity: A,
|
|
4795
4789
|
message: i("consumer_groups.copy.success_brief")
|
|
4796
4790
|
});
|
|
4797
|
-
},
|
|
4791
|
+
}, G = async (A) => {
|
|
4798
4792
|
var re;
|
|
4799
4793
|
await ((re = r.canRetrieve) == null ? void 0 : re.call(r, A)) && o.push(r.config.getViewRoute(A.id));
|
|
4800
|
-
},
|
|
4794
|
+
}, E = (A) => ({
|
|
4801
4795
|
label: i("consumer_groups.actions.view"),
|
|
4802
4796
|
to: r.config.getViewRoute(A)
|
|
4803
|
-
}),
|
|
4797
|
+
}), b = (A) => ({
|
|
4804
4798
|
label: i("consumer_groups.actions.edit"),
|
|
4805
4799
|
to: r.config.getEditRoute(A)
|
|
4806
|
-
}), K =
|
|
4800
|
+
}), K = M(void 0), F = M(!1), H = M(!1), te = M(""), de = Bs(r.config, T.value), Ye = (A) => {
|
|
4807
4801
|
K.value = A, F.value = !0;
|
|
4808
4802
|
}, bt = () => {
|
|
4809
4803
|
F.value = !1;
|
|
4810
4804
|
}, it = async () => {
|
|
4811
4805
|
var A, Y, re;
|
|
4812
4806
|
if ((A = K.value) != null && A.id) {
|
|
4813
|
-
|
|
4807
|
+
H.value = !0;
|
|
4814
4808
|
try {
|
|
4815
|
-
await l.delete(de(K.value.id)),
|
|
4809
|
+
await l.delete(de(K.value.id)), H.value = !1, F.value = !1, s.value++, n("delete:success", K.value);
|
|
4816
4810
|
} catch (ge) {
|
|
4817
4811
|
te.value = ((re = (Y = ge.response) == null ? void 0 : Y.data) == null ? void 0 : re.message) || ge.message || i("consumer_groups.errors.delete"), n("error", ge);
|
|
4818
4812
|
} finally {
|
|
4819
|
-
|
|
4813
|
+
H.value = !1;
|
|
4820
4814
|
}
|
|
4821
4815
|
}
|
|
4822
|
-
}, Le =
|
|
4816
|
+
}, Le = M(!1), Ze = () => {
|
|
4823
4817
|
Le.value = !0;
|
|
4824
|
-
},
|
|
4818
|
+
}, k = () => {
|
|
4825
4819
|
Le.value = !1;
|
|
4826
4820
|
}, V = (A, Y) => {
|
|
4827
|
-
Y ||
|
|
4821
|
+
Y || k(), s.value++, n("add:success", A);
|
|
4828
4822
|
}, ae = () => {
|
|
4829
4823
|
u.value && Ze();
|
|
4830
|
-
},
|
|
4831
|
-
|
|
4824
|
+
}, P = M(void 0), z = M(!1), me = M(""), Ce = (A) => {
|
|
4825
|
+
P.value = A, z.value = !0;
|
|
4832
4826
|
}, se = () => {
|
|
4833
|
-
|
|
4827
|
+
z.value = !1, P.value = void 0;
|
|
4834
4828
|
}, Ue = w(() => {
|
|
4835
4829
|
var Y, re, ge, we;
|
|
4836
|
-
let A = `${r.config.apiBaseUrl}${
|
|
4830
|
+
let A = `${r.config.apiBaseUrl}${Oe.list[r.config.app].oneForConsumer}`;
|
|
4837
4831
|
return r.config.app === "konnect" ? A = A.replace(/{controlPlaneId}/gi, ((Y = r.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = r.config) == null ? void 0 : re.consumerId) || "") : r.config.app === "kongManager" && (A = A.replace(/\/{workspace}/gi, (ge = r.config) != null && ge.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((we = r.config) == null ? void 0 : we.consumerId) || "")), A;
|
|
4838
|
-
}), Qe =
|
|
4839
|
-
if (
|
|
4832
|
+
}), Qe = M(!1), br = async () => {
|
|
4833
|
+
if (P.value) {
|
|
4840
4834
|
Qe.value = !0;
|
|
4841
4835
|
try {
|
|
4842
|
-
const A = Ue.value.replace(/{consumerGroupId}/gi,
|
|
4843
|
-
await l.delete(A), n("remove:success",
|
|
4836
|
+
const A = Ue.value.replace(/{consumerGroupId}/gi, P.value.id);
|
|
4837
|
+
await l.delete(A), n("remove:success", P.value), se(), s.value++;
|
|
4844
4838
|
} catch (A) {
|
|
4845
4839
|
me.value = A.message || i("consumer_groups.errors.delete"), n("error", A);
|
|
4846
4840
|
} finally {
|
|
4847
4841
|
Qe.value = !1;
|
|
4848
4842
|
}
|
|
4849
4843
|
}
|
|
4850
|
-
},
|
|
4851
|
-
|
|
4844
|
+
}, Pt = M(!1);
|
|
4845
|
+
$e(h, (A) => {
|
|
4852
4846
|
var Y, re, ge, we;
|
|
4853
|
-
if (Array.isArray((Y = A == null ? void 0 : A.response) == null ? void 0 : Y.data) && (
|
|
4854
|
-
|
|
4847
|
+
if (Array.isArray((Y = A == null ? void 0 : A.response) == null ? void 0 : Y.data) && (Pt.value = A.response.data.length > 0), A.status === qe.Error) {
|
|
4848
|
+
S.value = {
|
|
4855
4849
|
title: i("consumer_groups.errors.general")
|
|
4856
|
-
}, (we = (ge = (re = A.error) == null ? void 0 : re.response) == null ? void 0 : ge.data) != null && we.message && (
|
|
4850
|
+
}, (we = (ge = (re = A.error) == null ? void 0 : re.response) == null ? void 0 : ge.data) != null && we.message && (S.value.message = A.error.response.data.message), n("error", A.error);
|
|
4857
4851
|
return;
|
|
4858
4852
|
}
|
|
4859
|
-
|
|
4853
|
+
S.value = null;
|
|
4860
4854
|
});
|
|
4861
|
-
const kt =
|
|
4855
|
+
const kt = M({
|
|
4862
4856
|
ctaPath: u.value ? void 0 : r.config.createRoute,
|
|
4863
4857
|
ctaText: void 0,
|
|
4864
4858
|
message: `${i("consumer_groups.list.empty_state.description")}${r.config.additionMessageForEmptyState ? ` ${r.config.additionMessageForEmptyState}` : ""}`,
|
|
@@ -4867,97 +4861,97 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4867
4861
|
return gt(async () => {
|
|
4868
4862
|
await r.canCreate() && (kt.value.title = u.value ? i("consumer_groups.list.empty_state.title_for_consumer") : i("consumer_groups.list.empty_state.title"), kt.value.ctaText = u.value ? i("consumer_groups.actions.add_to_group") : i("consumer_groups.actions.create"));
|
|
4869
4863
|
}), (A, Y) => {
|
|
4870
|
-
const re =
|
|
4871
|
-
return m(),
|
|
4872
|
-
|
|
4864
|
+
const re = R("KButton"), ge = R("KBadge"), we = R("KTruncate"), Xe = R("KDropdownItem"), Dt = R("KClipboardProvider"), kr = R("KPrompt");
|
|
4865
|
+
return m(), $("div", Js, [
|
|
4866
|
+
j(g(is), {
|
|
4873
4867
|
"cache-identifier": e.cacheIdentifier,
|
|
4874
4868
|
"disable-pagination": u.value && !e.config.paginatedEndpoint,
|
|
4875
4869
|
"disable-pagination-page-jump": "",
|
|
4876
4870
|
"disable-sorting": c.value,
|
|
4877
4871
|
"empty-state-options": kt.value,
|
|
4878
4872
|
"enable-entity-actions": "",
|
|
4879
|
-
"error-message":
|
|
4880
|
-
fetcher: g(
|
|
4873
|
+
"error-message": S.value,
|
|
4874
|
+
fetcher: g(J),
|
|
4881
4875
|
"fetcher-cache-key": s.value,
|
|
4882
4876
|
"pagination-type": "offset",
|
|
4883
4877
|
"preferences-storage-key": p.value,
|
|
4884
4878
|
query: C.value,
|
|
4885
|
-
"row-attributes":
|
|
4879
|
+
"row-attributes": x,
|
|
4886
4880
|
"table-headers": g(f),
|
|
4887
4881
|
"use-action-outside": e.useActionOutside,
|
|
4888
|
-
onClearSearchInput:
|
|
4889
|
-
"onClick:row": Y[3] || (Y[3] = (Q) =>
|
|
4882
|
+
onClearSearchInput: _,
|
|
4883
|
+
"onClick:row": Y[3] || (Y[3] = (Q) => G(Q)),
|
|
4890
4884
|
onEmptyStateCtaClicked: ae,
|
|
4891
4885
|
onSort: d
|
|
4892
4886
|
}, {
|
|
4893
|
-
"toolbar-filter":
|
|
4894
|
-
u.value ? W("", !0) : (m(),
|
|
4887
|
+
"toolbar-filter": v(() => [
|
|
4888
|
+
u.value ? W("", !0) : (m(), D(g(Is), {
|
|
4895
4889
|
key: 0,
|
|
4896
4890
|
modelValue: C.value,
|
|
4897
4891
|
"onUpdate:modelValue": Y[0] || (Y[0] = (Q) => C.value = Q),
|
|
4898
|
-
config:
|
|
4892
|
+
config: U.value
|
|
4899
4893
|
}, null, 8, ["modelValue", "config"]))
|
|
4900
4894
|
]),
|
|
4901
|
-
"toolbar-button":
|
|
4902
|
-
(m(),
|
|
4895
|
+
"toolbar-button": v(() => [
|
|
4896
|
+
(m(), D(Tr, {
|
|
4903
4897
|
disabled: !e.useActionOutside,
|
|
4904
4898
|
to: "#kong-ui-app-page-header-action-button"
|
|
4905
4899
|
}, [
|
|
4906
|
-
|
|
4900
|
+
j(g(lt), {
|
|
4907
4901
|
"auth-function": () => e.canCreate()
|
|
4908
4902
|
}, {
|
|
4909
|
-
default:
|
|
4910
|
-
Ne(
|
|
4903
|
+
default: v(() => [
|
|
4904
|
+
Ne(j(re, {
|
|
4911
4905
|
appearance: "primary",
|
|
4912
4906
|
"data-testid": "toolbar-add-consumer-group",
|
|
4913
4907
|
size: "large",
|
|
4914
4908
|
to: e.config.consumerId ? void 0 : e.config.createRoute,
|
|
4915
4909
|
onClick: Y[1] || (Y[1] = () => e.config.consumerId ? Ze() : void 0)
|
|
4916
4910
|
}, {
|
|
4917
|
-
default:
|
|
4918
|
-
|
|
4911
|
+
default: v(() => [
|
|
4912
|
+
j(g(Kr)),
|
|
4919
4913
|
Z(" " + q(e.config.consumerId ? g(i)("consumer_groups.actions.add_to_group") : g(i)("consumer_groups.list.toolbar_actions.new_consumer_group")), 1)
|
|
4920
4914
|
]),
|
|
4921
4915
|
_: 1
|
|
4922
4916
|
}, 8, ["to"]), [
|
|
4923
|
-
[je,
|
|
4917
|
+
[je, Pt.value]
|
|
4924
4918
|
])
|
|
4925
4919
|
]),
|
|
4926
4920
|
_: 1
|
|
4927
4921
|
}, 8, ["auth-function"])
|
|
4928
4922
|
], 8, ["disabled"]))
|
|
4929
4923
|
]),
|
|
4930
|
-
name:
|
|
4931
|
-
|
|
4924
|
+
name: v(({ rowValue: Q }) => [
|
|
4925
|
+
L("b", null, q(Q ?? "-"), 1)
|
|
4932
4926
|
]),
|
|
4933
|
-
consumers_count:
|
|
4927
|
+
consumers_count: v(({ rowValue: Q }) => [
|
|
4934
4928
|
Z(q(Q ?? "-"), 1)
|
|
4935
4929
|
]),
|
|
4936
|
-
tags:
|
|
4937
|
-
(Q == null ? void 0 : Q.length) > 0 ? (m(),
|
|
4938
|
-
default:
|
|
4939
|
-
(m(!0),
|
|
4940
|
-
key:
|
|
4941
|
-
onClick: Y[2] || (Y[2] =
|
|
4930
|
+
tags: v(({ rowValue: Q }) => [
|
|
4931
|
+
(Q == null ? void 0 : Q.length) > 0 ? (m(), D(we, { key: 0 }, {
|
|
4932
|
+
default: v(() => [
|
|
4933
|
+
(m(!0), $(be, null, ve(Q, (Ve) => (m(), D(ge, {
|
|
4934
|
+
key: Ve,
|
|
4935
|
+
onClick: Y[2] || (Y[2] = xt(() => {
|
|
4942
4936
|
}, ["stop"]))
|
|
4943
4937
|
}, {
|
|
4944
|
-
default:
|
|
4945
|
-
Z(q(
|
|
4938
|
+
default: v(() => [
|
|
4939
|
+
Z(q(Ve), 1)
|
|
4946
4940
|
]),
|
|
4947
4941
|
_: 2
|
|
4948
4942
|
}, 1024))), 128))
|
|
4949
4943
|
]),
|
|
4950
4944
|
_: 2
|
|
4951
|
-
}, 1024)) : (m(),
|
|
4945
|
+
}, 1024)) : (m(), $("span", Ws, "-"))
|
|
4952
4946
|
]),
|
|
4953
|
-
actions:
|
|
4954
|
-
|
|
4955
|
-
default:
|
|
4956
|
-
|
|
4947
|
+
actions: v(({ row: Q }) => [
|
|
4948
|
+
j(Dt, null, {
|
|
4949
|
+
default: v(({ copyToClipboard: Ve }) => [
|
|
4950
|
+
j(Xe, {
|
|
4957
4951
|
"data-testid": "action-entity-copy-id",
|
|
4958
|
-
onClick: (Cr) => B(Q,
|
|
4952
|
+
onClick: (Cr) => B(Q, Ve)
|
|
4959
4953
|
}, {
|
|
4960
|
-
default:
|
|
4954
|
+
default: v(() => [
|
|
4961
4955
|
Z(q(g(i)("consumer_groups.actions.copy_id")), 1)
|
|
4962
4956
|
]),
|
|
4963
4957
|
_: 2
|
|
@@ -4965,13 +4959,13 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4965
4959
|
]),
|
|
4966
4960
|
_: 2
|
|
4967
4961
|
}, 1024),
|
|
4968
|
-
|
|
4969
|
-
default:
|
|
4970
|
-
|
|
4962
|
+
j(Dt, null, {
|
|
4963
|
+
default: v(({ copyToClipboard: Ve }) => [
|
|
4964
|
+
j(Xe, {
|
|
4971
4965
|
"data-testid": "action-entity-copy-json",
|
|
4972
|
-
onClick: (Cr) => I(Q,
|
|
4966
|
+
onClick: (Cr) => I(Q, Ve)
|
|
4973
4967
|
}, {
|
|
4974
|
-
default:
|
|
4968
|
+
default: v(() => [
|
|
4975
4969
|
Z(q(g(i)("consumer_groups.actions.copy_json")), 1)
|
|
4976
4970
|
]),
|
|
4977
4971
|
_: 2
|
|
@@ -4979,40 +4973,40 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4979
4973
|
]),
|
|
4980
4974
|
_: 2
|
|
4981
4975
|
}, 1024),
|
|
4982
|
-
|
|
4976
|
+
j(g(lt), {
|
|
4983
4977
|
"auth-function": () => e.canRetrieve(Q)
|
|
4984
4978
|
}, {
|
|
4985
|
-
default:
|
|
4986
|
-
|
|
4979
|
+
default: v(() => [
|
|
4980
|
+
j(Xe, {
|
|
4987
4981
|
"data-testid": "action-entity-view",
|
|
4988
4982
|
"has-divider": "",
|
|
4989
|
-
item:
|
|
4983
|
+
item: E(Q.id)
|
|
4990
4984
|
}, null, 8, ["item"])
|
|
4991
4985
|
]),
|
|
4992
4986
|
_: 2
|
|
4993
4987
|
}, 1032, ["auth-function"]),
|
|
4994
|
-
|
|
4988
|
+
j(g(lt), {
|
|
4995
4989
|
"auth-function": () => e.canEdit(Q)
|
|
4996
4990
|
}, {
|
|
4997
|
-
default:
|
|
4998
|
-
|
|
4991
|
+
default: v(() => [
|
|
4992
|
+
j(Xe, {
|
|
4999
4993
|
"data-testid": "action-entity-edit",
|
|
5000
|
-
item:
|
|
4994
|
+
item: b(Q.id)
|
|
5001
4995
|
}, null, 8, ["item"])
|
|
5002
4996
|
]),
|
|
5003
4997
|
_: 2
|
|
5004
4998
|
}, 1032, ["auth-function"]),
|
|
5005
|
-
|
|
4999
|
+
j(g(lt), {
|
|
5006
5000
|
"auth-function": () => e.canDelete(Q)
|
|
5007
5001
|
}, {
|
|
5008
|
-
default:
|
|
5009
|
-
|
|
5002
|
+
default: v(() => [
|
|
5003
|
+
j(Xe, {
|
|
5010
5004
|
danger: "",
|
|
5011
5005
|
"data-testid": "action-entity-delete",
|
|
5012
5006
|
"has-divider": "",
|
|
5013
5007
|
onClick: () => e.config.consumerId ? Ce(Q) : Ye(Q)
|
|
5014
5008
|
}, {
|
|
5015
|
-
default:
|
|
5009
|
+
default: v(() => [
|
|
5016
5010
|
Z(q(e.config.consumerId ? g(i)("consumer_groups.actions.exit") : g(i)("consumer_groups.actions.delete")), 1)
|
|
5017
5011
|
]),
|
|
5018
5012
|
_: 2
|
|
@@ -5023,8 +5017,8 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5023
5017
|
]),
|
|
5024
5018
|
_: 1
|
|
5025
5019
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "preferences-storage-key", "query", "table-headers", "use-action-outside"]),
|
|
5026
|
-
|
|
5027
|
-
"action-pending":
|
|
5020
|
+
j(g(cs), {
|
|
5021
|
+
"action-pending": H.value,
|
|
5028
5022
|
"data-testid": "delete-consumer-group-modal",
|
|
5029
5023
|
description: g(i)("consumer_groups.delete.description"),
|
|
5030
5024
|
"entity-name": K.value && (K.value.name || K.value.id),
|
|
@@ -5035,51 +5029,51 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5035
5029
|
onCancel: bt,
|
|
5036
5030
|
onProceed: it
|
|
5037
5031
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
5038
|
-
e.config.consumerId ? (m(),
|
|
5032
|
+
e.config.consumerId ? (m(), D(Hs, {
|
|
5039
5033
|
key: 0,
|
|
5040
5034
|
config: e.config,
|
|
5041
5035
|
"data-testid": "add-to-group-modal",
|
|
5042
5036
|
visible: Le.value,
|
|
5043
5037
|
"onAdd:partialSuccess": Y[4] || (Y[4] = (Q) => V(Q, !0)),
|
|
5044
5038
|
"onAdd:success": Y[5] || (Y[5] = (Q) => V(Q)),
|
|
5045
|
-
onCancel:
|
|
5039
|
+
onCancel: k
|
|
5046
5040
|
}, null, 8, ["config", "visible"])) : W("", !0),
|
|
5047
|
-
e.config.consumerId &&
|
|
5041
|
+
e.config.consumerId && P.value ? (m(), D(kr, {
|
|
5048
5042
|
key: 1,
|
|
5049
5043
|
"action-button-appearance": "danger",
|
|
5050
5044
|
"data-testid": "exit-group-modal",
|
|
5051
5045
|
title: g(i)("consumer_groups.consumers.exit.title"),
|
|
5052
|
-
visible:
|
|
5046
|
+
visible: z.value,
|
|
5053
5047
|
onCancel: se,
|
|
5054
5048
|
onProceed: br
|
|
5055
5049
|
}, {
|
|
5056
|
-
default:
|
|
5057
|
-
|
|
5050
|
+
default: v(() => [
|
|
5051
|
+
j(g(a), {
|
|
5058
5052
|
class: "exit-modal-message",
|
|
5059
5053
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
5060
5054
|
tag: "p"
|
|
5061
|
-
},
|
|
5062
|
-
consumerGroup:
|
|
5063
|
-
|
|
5055
|
+
}, Be({
|
|
5056
|
+
consumerGroup: v(() => [
|
|
5057
|
+
L("strong", null, q(P.value.name || P.value.id), 1)
|
|
5064
5058
|
]),
|
|
5065
5059
|
_: 2
|
|
5066
5060
|
}, [
|
|
5067
5061
|
e.config.consumerUsername ? {
|
|
5068
5062
|
name: "consumer",
|
|
5069
|
-
fn:
|
|
5070
|
-
|
|
5063
|
+
fn: v(() => [
|
|
5064
|
+
L("strong", null, q(e.config.consumerUsername), 1)
|
|
5071
5065
|
]),
|
|
5072
5066
|
key: "0"
|
|
5073
5067
|
} : void 0
|
|
5074
5068
|
]), 1032, ["keypath"]),
|
|
5075
|
-
|
|
5069
|
+
L("p", null, q(g(i)("consumer_groups.consumers.exit.description")), 1)
|
|
5076
5070
|
]),
|
|
5077
5071
|
_: 1
|
|
5078
5072
|
}, 8, ["title", "visible"])) : W("", !0)
|
|
5079
5073
|
]);
|
|
5080
5074
|
};
|
|
5081
5075
|
}
|
|
5082
|
-
}), mu = /* @__PURE__ */
|
|
5076
|
+
}), mu = /* @__PURE__ */ Vt(Ys, [["__scopeId", "data-v-37eae4bf"]]), Zs = { class: "kong-ui-entities-consumer-group-form" }, Qs = { class: "select-item-container" }, Xs = { class: "select-item-label" }, eu = {
|
|
5083
5077
|
key: 0,
|
|
5084
5078
|
class: "select-item-description"
|
|
5085
5079
|
}, tu = /* @__PURE__ */ X({
|
|
@@ -5101,7 +5095,7 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5101
5095
|
emits: ["update", "error", "loading"],
|
|
5102
5096
|
setup(e, { emit: t }) {
|
|
5103
5097
|
var it, Le, Ze;
|
|
5104
|
-
const n = e, r = t, { i18n: { t: a } } = yt.useI18n(), i =
|
|
5098
|
+
const n = e, r = t, { i18n: { t: a } } = yt.useI18n(), i = Ot(), o = zt({
|
|
5105
5099
|
fields: {
|
|
5106
5100
|
name: "",
|
|
5107
5101
|
tags: "",
|
|
@@ -5119,136 +5113,136 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5119
5113
|
error: p,
|
|
5120
5114
|
loadItems: c,
|
|
5121
5115
|
results: y
|
|
5122
|
-
} = vr(n.config, (Le =
|
|
5116
|
+
} = vr(n.config, (Le = Oe.form[(it = n.config) == null ? void 0 : it.app]) == null ? void 0 : Le.consumersList, "", {
|
|
5123
5117
|
fetchedItemsKey: "data",
|
|
5124
5118
|
searchKeys: ["username", "custom_id", "id"]
|
|
5125
|
-
}), { axiosInstance: f } = Ut((Ze = n.config) == null ? void 0 : Ze.axiosRequestConfig), { getMessageFromError:
|
|
5126
|
-
label:
|
|
5127
|
-
value:
|
|
5128
|
-
selected: o.fields.consumers.includes(
|
|
5129
|
-
data:
|
|
5119
|
+
}), { axiosInstance: f } = Ut((Ze = n.config) == null ? void 0 : Ze.axiosRequestConfig), { getMessageFromError: x } = Ls(), T = Vs(), C = w(() => y.value.map((k) => ({
|
|
5120
|
+
label: k.username || k.custom_id,
|
|
5121
|
+
value: k.id,
|
|
5122
|
+
selected: o.fields.consumers.includes(k.id),
|
|
5123
|
+
data: k
|
|
5130
5124
|
// we need this to determine whether or not to show the description text
|
|
5131
|
-
}))),
|
|
5132
|
-
var
|
|
5133
|
-
return (V =
|
|
5134
|
-
}),
|
|
5135
|
-
var
|
|
5136
|
-
let
|
|
5137
|
-
return ((Ce = n.config) == null ? void 0 : Ce.app) === "konnect" ?
|
|
5125
|
+
}))), U = w(() => {
|
|
5126
|
+
var k, V;
|
|
5127
|
+
return (V = Oe.form[(k = n.config) == null ? void 0 : k.app]) == null ? void 0 : V.edit;
|
|
5128
|
+
}), N = w(() => n.consumerGroupId ? ut.Edit : ut.Create), J = w(() => !!o.fields.name && !G.value), h = w(() => JSON.stringify(o.fields) !== JSON.stringify(l)), _ = (k, V = "", ae = "") => {
|
|
5129
|
+
var z, me, Ce, se, Ue, Qe;
|
|
5130
|
+
let P = `${(z = n.config) == null ? void 0 : z.apiBaseUrl}${Oe.form[(me = n.config) == null ? void 0 : me.app][k]}`;
|
|
5131
|
+
return ((Ce = n.config) == null ? void 0 : Ce.app) === "konnect" ? P = P.replace(/{controlPlaneId}/gi, ((se = n.config) == null ? void 0 : se.controlPlaneId) || "") : ((Ue = n.config) == null ? void 0 : Ue.app) === "kongManager" && (P = P.replace(/\/{workspace}/gi, (Qe = n.config) != null && Qe.workspace ? `/${n.config.workspace}` : "")), P = P.replace(/{id}/gi, V || n.consumerGroupId), (k === "addConsumer" || k === "removeConsumer") && (P = P.replace(/{consumerId}/gi, ae)), P;
|
|
5138
5132
|
}, d = () => {
|
|
5139
|
-
var
|
|
5140
|
-
i.push(((
|
|
5141
|
-
},
|
|
5142
|
-
r("error",
|
|
5143
|
-
}, B = (
|
|
5144
|
-
r("loading",
|
|
5145
|
-
}, I = async (
|
|
5146
|
-
var ae,
|
|
5147
|
-
o.fields.name = ((ae =
|
|
5148
|
-
const V = ((
|
|
5149
|
-
if (o.fields.tags = (V == null ? void 0 : V.join(", ")) || "", "consumers" in
|
|
5150
|
-
o.fields.consumers = ((me =
|
|
5133
|
+
var k;
|
|
5134
|
+
i.push(((k = n.config) == null ? void 0 : k.cancelRoute) || { name: "consumer-group-list" });
|
|
5135
|
+
}, S = (k) => {
|
|
5136
|
+
r("error", k);
|
|
5137
|
+
}, B = (k) => {
|
|
5138
|
+
r("loading", k);
|
|
5139
|
+
}, I = async (k) => {
|
|
5140
|
+
var ae, P, z, me, Ce;
|
|
5141
|
+
o.fields.name = ((ae = k == null ? void 0 : k.item) == null ? void 0 : ae.name) || ((P = k == null ? void 0 : k.consumer_group) == null ? void 0 : P.name) || (k == null ? void 0 : k.name) || "";
|
|
5142
|
+
const V = ((z = k == null ? void 0 : k.item) == null ? void 0 : z.tags) || (k == null ? void 0 : k.consumer_group.tags) || (k == null ? void 0 : k.tags) || [];
|
|
5143
|
+
if (o.fields.tags = (V == null ? void 0 : V.join(", ")) || "", "consumers" in k)
|
|
5144
|
+
o.fields.consumers = ((me = k == null ? void 0 : k.consumers) == null ? void 0 : me.map((se) => se.id)) || [];
|
|
5151
5145
|
else
|
|
5152
5146
|
try {
|
|
5153
|
-
const { data: se } = await f.get(
|
|
5147
|
+
const { data: se } = await f.get(_("getConsumers"));
|
|
5154
5148
|
o.fields.consumers = "consumers" in se ? (Ce = se == null ? void 0 : se.consumers) == null ? void 0 : Ce.map((Ue) => Ue.id) : [];
|
|
5155
5149
|
} catch (se) {
|
|
5156
5150
|
F(se);
|
|
5157
5151
|
}
|
|
5158
5152
|
Object.assign(l, o.fields);
|
|
5159
|
-
},
|
|
5160
|
-
var
|
|
5153
|
+
}, G = w(() => T.utf8Name(o.fields.name)), E = w(() => {
|
|
5154
|
+
var k, V;
|
|
5161
5155
|
return {
|
|
5162
5156
|
name: o.fields.name,
|
|
5163
|
-
tags: (V = (
|
|
5157
|
+
tags: (V = (k = o.fields.tags.split(",")) == null ? void 0 : k.map((ae) => String(ae || "").trim())) == null ? void 0 : V.filter((ae) => ae !== "")
|
|
5164
5158
|
};
|
|
5165
|
-
}),
|
|
5166
|
-
o.errorMessage =
|
|
5167
|
-
},
|
|
5168
|
-
Object.assign(l, o.fields), r("update", { ...o.fields, id:
|
|
5169
|
-
}, te = (
|
|
5170
|
-
const
|
|
5171
|
-
|
|
5172
|
-
code:
|
|
5159
|
+
}), b = async (k, V = "") => await f.post(_("addConsumer", V, k), { consumer: k }), K = async (k, V = "") => await f.delete(_("removeConsumer", V, k)), F = (k) => {
|
|
5160
|
+
o.errorMessage = x(k), r("error", k);
|
|
5161
|
+
}, H = (k = n.consumerGroupId) => {
|
|
5162
|
+
Object.assign(l, o.fields), r("update", { ...o.fields, id: k });
|
|
5163
|
+
}, te = (k, V, ae = n.consumerGroupId) => {
|
|
5164
|
+
const P = k == null ? void 0 : k.find((z) => z.status !== "fulfilled");
|
|
5165
|
+
P ? F({
|
|
5166
|
+
code: P.status,
|
|
5173
5167
|
message: V
|
|
5174
|
-
}) :
|
|
5168
|
+
}) : H(ae);
|
|
5175
5169
|
}, de = async () => {
|
|
5176
|
-
let
|
|
5170
|
+
let k = "";
|
|
5177
5171
|
try {
|
|
5178
|
-
const { data: V } = await f.post(
|
|
5179
|
-
|
|
5172
|
+
const { data: V } = await f.post(_("create"), E.value);
|
|
5173
|
+
k = "item" in V ? V.item.id : V.id;
|
|
5180
5174
|
} catch (V) {
|
|
5181
5175
|
F(V);
|
|
5182
5176
|
}
|
|
5183
|
-
if (o.fields.consumers.length > 0 &&
|
|
5177
|
+
if (o.fields.consumers.length > 0 && k)
|
|
5184
5178
|
try {
|
|
5185
|
-
const V = o.fields.consumers.map((
|
|
5186
|
-
te(ae, a("consumer_groups.errors.add_consumer"),
|
|
5179
|
+
const V = o.fields.consumers.map((P) => b(P, k)), ae = await Promise.allSettled(V);
|
|
5180
|
+
te(ae, a("consumer_groups.errors.add_consumer"), k);
|
|
5187
5181
|
} catch (V) {
|
|
5188
5182
|
F(V);
|
|
5189
5183
|
}
|
|
5190
|
-
else o.fields.consumers.length === 0 &&
|
|
5184
|
+
else o.fields.consumers.length === 0 && k && H(k);
|
|
5191
5185
|
}, Ye = async () => {
|
|
5192
5186
|
var ae;
|
|
5193
5187
|
try {
|
|
5194
|
-
((ae = n.config) == null ? void 0 : ae.app) === "konnect" ? await f.put(
|
|
5195
|
-
} catch (
|
|
5196
|
-
F(
|
|
5188
|
+
((ae = n.config) == null ? void 0 : ae.app) === "konnect" ? await f.put(_("edit"), E.value) : await f.patch(_("edit"), E.value);
|
|
5189
|
+
} catch (P) {
|
|
5190
|
+
F(P);
|
|
5197
5191
|
}
|
|
5198
|
-
const
|
|
5199
|
-
if (V.length === 0 &&
|
|
5200
|
-
|
|
5192
|
+
const k = o.fields.consumers.filter((P) => !l.consumers.includes(P)), V = l.consumers.filter((P) => !o.fields.consumers.includes(P));
|
|
5193
|
+
if (V.length === 0 && k.length === 0)
|
|
5194
|
+
H();
|
|
5201
5195
|
else {
|
|
5202
5196
|
if (V.length > 0)
|
|
5203
5197
|
try {
|
|
5204
|
-
const
|
|
5205
|
-
te(
|
|
5206
|
-
} catch (
|
|
5207
|
-
F(
|
|
5198
|
+
const P = V.map((me) => K(me)), z = await Promise.allSettled(P);
|
|
5199
|
+
te(z, a("consumer_groups.errors.remove_consumer"));
|
|
5200
|
+
} catch (P) {
|
|
5201
|
+
F(P);
|
|
5208
5202
|
}
|
|
5209
|
-
if (
|
|
5203
|
+
if (k.length > 0)
|
|
5210
5204
|
try {
|
|
5211
|
-
const
|
|
5212
|
-
te(
|
|
5213
|
-
} catch (
|
|
5214
|
-
F(
|
|
5205
|
+
const P = k.map((me) => b(me)), z = await Promise.allSettled(P);
|
|
5206
|
+
te(z, a("consumer_groups.errors.add_consumer"));
|
|
5207
|
+
} catch (P) {
|
|
5208
|
+
F(P);
|
|
5215
5209
|
}
|
|
5216
5210
|
}
|
|
5217
5211
|
}, bt = async () => {
|
|
5218
5212
|
try {
|
|
5219
|
-
o.readonly = !0,
|
|
5213
|
+
o.readonly = !0, N.value === ut.Create ? await de() : await Ye();
|
|
5220
5214
|
} finally {
|
|
5221
5215
|
o.readonly = !1;
|
|
5222
5216
|
}
|
|
5223
5217
|
};
|
|
5224
5218
|
return gt(async () => {
|
|
5225
5219
|
await c();
|
|
5226
|
-
}), (
|
|
5227
|
-
const ae =
|
|
5228
|
-
return m(),
|
|
5229
|
-
|
|
5230
|
-
"can-submit":
|
|
5220
|
+
}), (k, V) => {
|
|
5221
|
+
const ae = R("KInput"), P = R("KMultiselect");
|
|
5222
|
+
return m(), $("div", Zs, [
|
|
5223
|
+
j(g(Ql), {
|
|
5224
|
+
"can-submit": J.value && h.value,
|
|
5231
5225
|
config: e.config,
|
|
5232
5226
|
"edit-id": e.consumerGroupId,
|
|
5233
|
-
"error-message": o.errorMessage || g(p) ||
|
|
5234
|
-
"fetch-url":
|
|
5235
|
-
"form-fields":
|
|
5227
|
+
"error-message": o.errorMessage || g(p) || G.value,
|
|
5228
|
+
"fetch-url": U.value,
|
|
5229
|
+
"form-fields": E.value,
|
|
5236
5230
|
"is-readonly": o.readonly,
|
|
5237
5231
|
onCancel: d,
|
|
5238
|
-
"onFetch:error": V[3] || (V[3] = (
|
|
5232
|
+
"onFetch:error": V[3] || (V[3] = (z) => S(z)),
|
|
5239
5233
|
"onFetch:success": I,
|
|
5240
|
-
onLoading: V[4] || (V[4] = (
|
|
5234
|
+
onLoading: V[4] || (V[4] = (z) => B(z)),
|
|
5241
5235
|
onSubmit: bt
|
|
5242
5236
|
}, {
|
|
5243
|
-
default:
|
|
5244
|
-
|
|
5237
|
+
default: v(() => [
|
|
5238
|
+
j(g(vn), {
|
|
5245
5239
|
description: g(a)("consumer_groups.form.general_info.description"),
|
|
5246
5240
|
title: g(a)("consumer_groups.form.general_info.title")
|
|
5247
5241
|
}, {
|
|
5248
|
-
default:
|
|
5249
|
-
|
|
5242
|
+
default: v(() => [
|
|
5243
|
+
j(ae, {
|
|
5250
5244
|
modelValue: o.fields.name,
|
|
5251
|
-
"onUpdate:modelValue": V[0] || (V[0] = (
|
|
5245
|
+
"onUpdate:modelValue": V[0] || (V[0] = (z) => o.fields.name = z),
|
|
5252
5246
|
modelModifiers: { trim: !0 },
|
|
5253
5247
|
autocomplete: "off",
|
|
5254
5248
|
"data-testid": "consumer-group-form-name",
|
|
@@ -5257,9 +5251,9 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5257
5251
|
required: "",
|
|
5258
5252
|
type: "text"
|
|
5259
5253
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
5260
|
-
|
|
5254
|
+
j(ae, {
|
|
5261
5255
|
modelValue: o.fields.tags,
|
|
5262
|
-
"onUpdate:modelValue": V[1] || (V[1] = (
|
|
5256
|
+
"onUpdate:modelValue": V[1] || (V[1] = (z) => o.fields.tags = z),
|
|
5263
5257
|
modelModifiers: { trim: !0 },
|
|
5264
5258
|
autocomplete: "off",
|
|
5265
5259
|
"data-testid": "consumer-group-form-tags",
|
|
@@ -5275,15 +5269,15 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5275
5269
|
]),
|
|
5276
5270
|
_: 1
|
|
5277
5271
|
}, 8, ["description", "title"]),
|
|
5278
|
-
|
|
5272
|
+
j(g(vn), {
|
|
5279
5273
|
description: g(a)("consumer_groups.form.consumers.description"),
|
|
5280
5274
|
"has-divider": "",
|
|
5281
5275
|
title: g(a)("consumer_groups.form.consumers.title")
|
|
5282
5276
|
}, {
|
|
5283
|
-
default:
|
|
5284
|
-
|
|
5277
|
+
default: v(() => [
|
|
5278
|
+
j(P, {
|
|
5285
5279
|
modelValue: o.fields.consumers,
|
|
5286
|
-
"onUpdate:modelValue": V[2] || (V[2] = (
|
|
5280
|
+
"onUpdate:modelValue": V[2] || (V[2] = (z) => o.fields.consumers = z),
|
|
5287
5281
|
appearance: "select",
|
|
5288
5282
|
autosuggest: "",
|
|
5289
5283
|
items: C.value,
|
|
@@ -5293,12 +5287,12 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5293
5287
|
width: "auto",
|
|
5294
5288
|
onQueryChange: g(s)
|
|
5295
5289
|
}, {
|
|
5296
|
-
"item-template":
|
|
5290
|
+
"item-template": v(({ item: z }) => {
|
|
5297
5291
|
var me, Ce, se;
|
|
5298
5292
|
return [
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
(me =
|
|
5293
|
+
L("div", Qs, [
|
|
5294
|
+
L("div", Xs, q(z.label), 1),
|
|
5295
|
+
(me = z == null ? void 0 : z.data) != null && me.username && ((Ce = z == null ? void 0 : z.data) != null && Ce.custom_id) ? (m(), $("div", eu, q((se = z == null ? void 0 : z.data) == null ? void 0 : se.custom_id), 1)) : W("", !0)
|
|
5302
5296
|
])
|
|
5303
5297
|
];
|
|
5304
5298
|
}),
|
|
@@ -5313,7 +5307,7 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5313
5307
|
]);
|
|
5314
5308
|
};
|
|
5315
5309
|
}
|
|
5316
|
-
}), gu = /* @__PURE__ */
|
|
5310
|
+
}), gu = /* @__PURE__ */ Vt(tu, [["__scopeId", "data-v-9681165d"]]), nu = { class: "kong-ui-consumer-group-entity-config-card" }, yu = /* @__PURE__ */ X({
|
|
5317
5311
|
__name: "ConsumerGroupConfigCard",
|
|
5318
5312
|
props: {
|
|
5319
5313
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5340,7 +5334,7 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5340
5334
|
},
|
|
5341
5335
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
5342
5336
|
setup(e) {
|
|
5343
|
-
const t = e, { i18n: { t: n } } = yt.useI18n(), r = w(() =>
|
|
5337
|
+
const t = e, { i18n: { t: n } } = yt.useI18n(), r = w(() => Oe.form[t.config.app].edit), a = M({
|
|
5344
5338
|
id: {},
|
|
5345
5339
|
name: {},
|
|
5346
5340
|
created_at: {},
|
|
@@ -5349,8 +5343,8 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5349
5343
|
tooltip: n("consumer_groups.form.fields.tags.tooltip")
|
|
5350
5344
|
}
|
|
5351
5345
|
});
|
|
5352
|
-
return (i, o) => (m(),
|
|
5353
|
-
|
|
5346
|
+
return (i, o) => (m(), $("div", nu, [
|
|
5347
|
+
j(g(Jl), {
|
|
5354
5348
|
config: e.config,
|
|
5355
5349
|
"config-card-doc": e.configCardDoc,
|
|
5356
5350
|
"config-schema": a.value,
|