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