@kong-ui-public/entities-consumer-groups 2.3.11-pr.1069.9fcd6ba1.0 → 2.4.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,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as ae, ref as F, computed as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { createI18n as
|
|
1
|
+
import { defineComponent as ae, ref as F, computed as A, watch as Te, renderSlot as X, createCommentVNode as z, unref as m, useSlots as ut, onBeforeMount as ct, resolveComponent as q, openBlock as d, createBlock as P, createSlots as je, withCtx as g, createElementVNode as D, createTextVNode as Z, toDisplayString as N, createVNode as E, createElementBlock as j, renderList as ve, Fragment as Ce, normalizeClass as Ee, withModifiers as rt, withDirectives as Je, vShow as Ye, useCssVars as gn, resolveDynamicComponent as Be, normalizeProps as Cr, guardReactiveProps as kr, mergeProps as vt, onMounted as wr, onUnmounted as _r, normalizeStyle as yn, inject as Ir, pushScopeId as hn, popScopeId as vn, reactive as Pt } from "vue";
|
|
2
|
+
import { useRouter as It } from "vue-router";
|
|
3
|
+
import { createI18n as At, i18nTComponent as bn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Ar from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as Sr } from "@kong/kongponents";
|
|
6
6
|
const xr = {
|
|
@@ -99,14 +99,14 @@ const xr = {
|
|
|
99
99
|
consumer_groups: xr
|
|
100
100
|
};
|
|
101
101
|
function $r() {
|
|
102
|
-
const e =
|
|
102
|
+
const e = At("en-us", Tr);
|
|
103
103
|
return {
|
|
104
104
|
i18n: e,
|
|
105
105
|
i18nT: bn(e)
|
|
106
106
|
// Translation component <i18n-t>
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const dt = {
|
|
110
110
|
useI18n: $r
|
|
111
111
|
}, Se = "/api/runtime_groups/{controlPlaneId}", xe = "/{workspace}", Me = {
|
|
112
112
|
list: {
|
|
@@ -141,7 +141,7 @@ const pt = {
|
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
143
|
var Cn = /* @__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))(Cn || {}), nt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(nt || {}), Ke = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Ke || {}), oe = /* @__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))(oe || {}), ke = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ke || {});
|
|
144
|
-
function
|
|
144
|
+
function St(e = {}) {
|
|
145
145
|
return {
|
|
146
146
|
axiosInstance: Ar.create({
|
|
147
147
|
withCredentials: !0,
|
|
@@ -162,7 +162,7 @@ function jr() {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
const
|
|
165
|
+
const mt = "khcp-user-table-preferences", Mr = {
|
|
166
166
|
pageSize: 30,
|
|
167
167
|
sortColumnKey: void 0,
|
|
168
168
|
sortColumnOrder: void 0
|
|
@@ -177,14 +177,14 @@ function Or() {
|
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
}, n = () => {
|
|
180
|
-
const t = e(localStorage.getItem(
|
|
180
|
+
const t = e(localStorage.getItem(mt));
|
|
181
181
|
return !t || !Object.keys(t).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(t));
|
|
182
182
|
};
|
|
183
183
|
return {
|
|
184
184
|
setTablePreferences: (t, r) => {
|
|
185
185
|
try {
|
|
186
186
|
const o = n();
|
|
187
|
-
o.set(t, r), localStorage.setItem(
|
|
187
|
+
o.set(t, r), localStorage.setItem(mt, JSON.stringify(Object.fromEntries(o.entries())));
|
|
188
188
|
} catch (o) {
|
|
189
189
|
console.error("useTablePreferences(setTablePreferences)", o);
|
|
190
190
|
}
|
|
@@ -194,7 +194,7 @@ function Or() {
|
|
|
194
194
|
return (r == null ? void 0 : r.get(t)) || void 0 || Mr;
|
|
195
195
|
},
|
|
196
196
|
deleteAllTablePreferences: () => {
|
|
197
|
-
localStorage.removeItem(
|
|
197
|
+
localStorage.removeItem(mt);
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
200
|
}
|
|
@@ -292,7 +292,7 @@ const Er = {
|
|
|
292
292
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
293
293
|
confirmText: "Yes, disable"
|
|
294
294
|
}
|
|
295
|
-
},
|
|
295
|
+
}, Vr = {
|
|
296
296
|
global: Er,
|
|
297
297
|
deleteModal: Fr,
|
|
298
298
|
baseForm: Nr,
|
|
@@ -303,8 +303,8 @@ const Er = {
|
|
|
303
303
|
errors: Ur,
|
|
304
304
|
toggleModal: Pr
|
|
305
305
|
};
|
|
306
|
-
function
|
|
307
|
-
const e =
|
|
306
|
+
function xt() {
|
|
307
|
+
const e = At("en-us", Vr);
|
|
308
308
|
return {
|
|
309
309
|
i18n: e,
|
|
310
310
|
i18nT: bn(e)
|
|
@@ -355,19 +355,19 @@ function kn() {
|
|
|
355
355
|
isValidUuid: (t) => t ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(t) : !1
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function Dr(e, n, t, r = {
|
|
359
359
|
fetchedItemsKey: "data",
|
|
360
360
|
searchKeys: ["id"]
|
|
361
361
|
}) {
|
|
362
362
|
t || (t = "100");
|
|
363
|
-
const { axiosInstance: o } =
|
|
363
|
+
const { axiosInstance: o } = St({
|
|
364
364
|
headers: e.requestHeaders
|
|
365
|
-
}), { i18n: { t: i } } =
|
|
365
|
+
}), { i18n: { t: i } } = xt(), { debounce: a } = jr(), s = a(async (v) => {
|
|
366
366
|
await L(v);
|
|
367
|
-
}, 200), l = F(!1), u = F(""), p = F(""), c = F([]), y = F([]), f = F(void 0),
|
|
368
|
-
let h = `${e.apiBaseUrl}${
|
|
367
|
+
}, 200), l = F(!1), u = F(""), p = F(""), c = F([]), y = F([]), f = F(void 0), _ = m(n);
|
|
368
|
+
let h = `${e.apiBaseUrl}${_}`;
|
|
369
369
|
e.app === "konnect" ? h = h.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (h = h.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
370
|
-
const { isValidUuid:
|
|
370
|
+
const { isValidUuid: S } = kn(), b = async () => {
|
|
371
371
|
try {
|
|
372
372
|
l.value = !0;
|
|
373
373
|
const { data: v } = await o.get(`${h}?size=${t}`);
|
|
@@ -377,50 +377,50 @@ function Vr(e, n, t, r = {
|
|
|
377
377
|
} finally {
|
|
378
378
|
l.value = !1;
|
|
379
379
|
}
|
|
380
|
-
},
|
|
381
|
-
var
|
|
382
|
-
if (
|
|
383
|
-
if (
|
|
380
|
+
}, w = F(""), L = async (v) => {
|
|
381
|
+
var x, V, re;
|
|
382
|
+
if (w.value !== v)
|
|
383
|
+
if (w.value = v || "", f.value === void 0)
|
|
384
384
|
try {
|
|
385
385
|
if (l.value = !0, u.value = "", p.value = "", e.app === "konnect") {
|
|
386
|
-
let
|
|
387
|
-
v && (
|
|
388
|
-
const { data: C } = await o.get(`${
|
|
386
|
+
let G = h + "";
|
|
387
|
+
v && (G += `/${v}`);
|
|
388
|
+
const { data: C } = await o.get(`${G}?size=${t}`);
|
|
389
389
|
r.fetchedItemsKey in C ? c.value = C[r.fetchedItemsKey] : C != null && C.id ? c.value = [C] : c.value = [];
|
|
390
390
|
} else if (v) {
|
|
391
|
-
const
|
|
392
|
-
|
|
391
|
+
const G = [];
|
|
392
|
+
S(v) && r.searchKeys.includes("id") ? G.push((async () => {
|
|
393
393
|
const { data: K } = await o.get(`${h}/${v}`);
|
|
394
394
|
return [K[r.fetchedItemsKey] ?? K];
|
|
395
|
-
})()) :
|
|
395
|
+
})()) : G.push(
|
|
396
396
|
...r.searchKeys.filter((K) => K !== "id").map(async (K) => {
|
|
397
397
|
const { data: I } = await o.get(`${h}?${K}=${v}`);
|
|
398
398
|
return I[r.fetchedItemsKey];
|
|
399
399
|
})
|
|
400
400
|
);
|
|
401
|
-
const C = await Promise.all(
|
|
402
|
-
c.value = [], (
|
|
401
|
+
const C = await Promise.all(G), R = /* @__PURE__ */ new Set();
|
|
402
|
+
c.value = [], (x = C == null ? void 0 : C.forEach) == null || x.call(C, (K) => {
|
|
403
403
|
var I;
|
|
404
404
|
(I = K == null ? void 0 : K.forEach) == null || I.call(K, (T) => {
|
|
405
|
-
|
|
405
|
+
R.has(T.id) || (R.add(T.id), c.value.push(T));
|
|
406
406
|
});
|
|
407
407
|
});
|
|
408
408
|
} else
|
|
409
409
|
c.value = y.value;
|
|
410
|
-
} catch (
|
|
411
|
-
((V =
|
|
410
|
+
} catch (G) {
|
|
411
|
+
((V = G == null ? void 0 : G.response) == null ? void 0 : V.status) === 404 ? p.value = i("debouncedFilter.errors.invalid") : (c.value = [], u.value = i("debouncedFilter.errors.fetch"));
|
|
412
412
|
} finally {
|
|
413
413
|
l.value = !1;
|
|
414
414
|
}
|
|
415
415
|
else
|
|
416
|
-
l.value = !0, p.value = "", v ? (c.value = (re = f.value) == null ? void 0 : re.filter((
|
|
416
|
+
l.value = !0, p.value = "", v ? (c.value = (re = f.value) == null ? void 0 : re.filter((G) => {
|
|
417
417
|
var C;
|
|
418
|
-
let
|
|
418
|
+
let R = !1;
|
|
419
419
|
for (const K of r.searchKeys) {
|
|
420
|
-
const I = typeof
|
|
421
|
-
I != null && I.includes(v.toLowerCase()) && (
|
|
420
|
+
const I = typeof G[K] == "string" ? (C = G[K]) == null ? void 0 : C.toLowerCase() : G[K];
|
|
421
|
+
I != null && I.includes(v.toLowerCase()) && (R = !0);
|
|
422
422
|
}
|
|
423
|
-
return
|
|
423
|
+
return R;
|
|
424
424
|
}), (!c.value || !c.value.length) && (p.value = i("debouncedFilter.errors.invalid"))) : c.value = f.value, l.value = !1;
|
|
425
425
|
};
|
|
426
426
|
return {
|
|
@@ -434,13 +434,13 @@ function Vr(e, n, t, r = {
|
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
436
|
function Rr(e, n) {
|
|
437
|
-
const t = m(n), r =
|
|
437
|
+
const t = m(n), r = A(
|
|
438
438
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
439
439
|
);
|
|
440
440
|
return r.value.search = "", (o) => `${r.value.href}/${o}`;
|
|
441
441
|
}
|
|
442
442
|
function Gr() {
|
|
443
|
-
const { i18n: { t: e } } =
|
|
443
|
+
const { i18n: { t: e } } = xt();
|
|
444
444
|
return {
|
|
445
445
|
getMessageFromError: (n) => {
|
|
446
446
|
var t, r, o, i;
|
|
@@ -480,18 +480,18 @@ function Hr(e) {
|
|
|
480
480
|
return console.warn("Failed to build valid URL:", r), "";
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
function
|
|
484
|
-
const t = F(m(e)), r = F(m(n)), o =
|
|
483
|
+
function wn(e, n) {
|
|
484
|
+
const t = F(m(e)), r = F(m(n)), o = A(
|
|
485
485
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
486
|
-
), i =
|
|
486
|
+
), i = A(
|
|
487
487
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
488
488
|
);
|
|
489
489
|
return (a) => {
|
|
490
490
|
const { page: s, pageSize: l, offset: u, sortColumnKey: p, sortColumnOrder: c, query: y } = a;
|
|
491
491
|
try {
|
|
492
492
|
let f = new URL(i.value.href);
|
|
493
|
-
return o.value && y ? (f.search = "", f = t.value.app === "konnect" ? new URL(`${f.href}?filter[name][contains]=${y}`) : new URL(`${f.href}/${y}/`)) : (o.value || new URLSearchParams(y).forEach((
|
|
494
|
-
f.searchParams.append(h,
|
|
493
|
+
return o.value && y ? (f.search = "", f = t.value.app === "konnect" ? new URL(`${f.href}?filter[name][contains]=${y}`) : new URL(`${f.href}/${y}/`)) : (o.value || new URLSearchParams(y).forEach((_, h) => {
|
|
494
|
+
f.searchParams.append(h, _);
|
|
495
495
|
}), p && f.searchParams.append("sort_by", p), c === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(l))), u && s !== 1 && f.searchParams.append("offset", String(u)), f.href;
|
|
496
496
|
} catch (f) {
|
|
497
497
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
@@ -499,9 +499,9 @@ function _n(e, n) {
|
|
|
499
499
|
};
|
|
500
500
|
}
|
|
501
501
|
function zr(e, n, t = "data") {
|
|
502
|
-
const r = m(n), { axiosInstance: o } =
|
|
502
|
+
const r = m(n), { axiosInstance: o } = St({
|
|
503
503
|
headers: e.requestHeaders
|
|
504
|
-
}), i =
|
|
504
|
+
}), i = wn(e, r), a = F({
|
|
505
505
|
status: Ke.Idle
|
|
506
506
|
});
|
|
507
507
|
return { fetcher: async (s) => {
|
|
@@ -549,18 +549,18 @@ function Jr() {
|
|
|
549
549
|
convertKeyToTitle: e
|
|
550
550
|
};
|
|
551
551
|
}
|
|
552
|
-
const
|
|
552
|
+
const _n = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Vt = (e) => {
|
|
553
553
|
if (typeof e != "string")
|
|
554
554
|
throw new TypeError("Invalid argument expected string");
|
|
555
|
-
const n = e.match(
|
|
555
|
+
const n = e.match(_n);
|
|
556
556
|
if (!n)
|
|
557
557
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
558
558
|
return n.shift(), n;
|
|
559
|
-
},
|
|
559
|
+
}, Dt = (e) => e === "*" || e === "x" || e === "X", Rt = (e) => {
|
|
560
560
|
const n = parseInt(e, 10);
|
|
561
561
|
return isNaN(n) ? e : n;
|
|
562
562
|
}, Yr = (e, n) => typeof e != typeof n ? [String(e), String(n)] : [e, n], Wr = (e, n) => {
|
|
563
|
-
if (
|
|
563
|
+
if (Dt(e) || Dt(n))
|
|
564
564
|
return 0;
|
|
565
565
|
const [t, r] = Yr(Rt(e), Rt(n));
|
|
566
566
|
return t > r ? 1 : t < r ? -1 : 0;
|
|
@@ -572,7 +572,7 @@ const wn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
572
572
|
}
|
|
573
573
|
return 0;
|
|
574
574
|
}, Zr = (e, n) => {
|
|
575
|
-
const t =
|
|
575
|
+
const t = Vt(e), r = Vt(n), o = t.pop(), i = r.pop(), a = Gt(t, r);
|
|
576
576
|
return a !== 0 ? a : o && i ? Gt(o.split("."), i.split(".")) : o || i ? o ? -1 : 1 : 0;
|
|
577
577
|
}, Ht = (e, n, t) => {
|
|
578
578
|
Qr(t);
|
|
@@ -590,7 +590,7 @@ const wn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
590
590
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
591
591
|
if (zt.indexOf(e) === -1)
|
|
592
592
|
throw new Error(`Invalid operator, expected one of ${zt.join("|")}`);
|
|
593
|
-
}, Xr = (e) => typeof e == "string" && /^[v\d]/.test(e) &&
|
|
593
|
+
}, Xr = (e) => typeof e == "string" && /^[v\d]/.test(e) && _n.test(e);
|
|
594
594
|
function eo(e) {
|
|
595
595
|
const { gatewayInfo: n, supportedRange: t } = e;
|
|
596
596
|
if (!n)
|
|
@@ -609,20 +609,20 @@ function to(e) {
|
|
|
609
609
|
return Te(e, (o) => {
|
|
610
610
|
o && !r.value && (n.value = o.offsetWidth, t.value = o.scrollWidth, r.value = !0);
|
|
611
611
|
}), {
|
|
612
|
-
isTruncated:
|
|
612
|
+
isTruncated: A(() => n.value < t.value)
|
|
613
613
|
};
|
|
614
614
|
}
|
|
615
615
|
const ce = {
|
|
616
|
-
useAxios:
|
|
617
|
-
useDebouncedFilter:
|
|
616
|
+
useAxios: St,
|
|
617
|
+
useDebouncedFilter: Dr,
|
|
618
618
|
useDeleteUrlBuilder: Rr,
|
|
619
619
|
useErrors: Gr,
|
|
620
620
|
useExternalLinkCreator: Hr,
|
|
621
621
|
useFetcher: zr,
|
|
622
|
-
useFetchUrlBuilder:
|
|
622
|
+
useFetchUrlBuilder: wn,
|
|
623
623
|
useHelpers: kn,
|
|
624
624
|
useStringHelpers: Jr,
|
|
625
|
-
useI18n:
|
|
625
|
+
useI18n: xt,
|
|
626
626
|
useGatewayFeatureSupported: eo,
|
|
627
627
|
useTruncationDetector: to
|
|
628
628
|
}, no = {
|
|
@@ -697,7 +697,7 @@ const ce = {
|
|
|
697
697
|
}
|
|
698
698
|
},
|
|
699
699
|
setup(e) {
|
|
700
|
-
const n = e, t =
|
|
700
|
+
const n = e, t = A(() => {
|
|
701
701
|
if (typeof n.size == "number" && n.size > 0)
|
|
702
702
|
return `${n.size}px`;
|
|
703
703
|
if (typeof n.size == "string") {
|
|
@@ -706,7 +706,7 @@ const ce = {
|
|
|
706
706
|
return `${i}px`;
|
|
707
707
|
}
|
|
708
708
|
return Jt;
|
|
709
|
-
}), r =
|
|
709
|
+
}), r = A(() => ({
|
|
710
710
|
boxSizing: "border-box",
|
|
711
711
|
color: n.color,
|
|
712
712
|
display: n.display,
|
|
@@ -782,19 +782,19 @@ const ce = {
|
|
|
782
782
|
},
|
|
783
783
|
emits: ["success", "error"],
|
|
784
784
|
setup(e, { emit: n }) {
|
|
785
|
-
const { t } =
|
|
786
|
-
}), a =
|
|
785
|
+
const { t } = At("en-us", oo), r = e, o = n, i = r.notify || Ir(ao, () => {
|
|
786
|
+
}), a = A(() => r.idTooltip ? {
|
|
787
787
|
label: r.idTooltip,
|
|
788
788
|
positionFixed: !0,
|
|
789
789
|
placement: "bottomStart"
|
|
790
790
|
} : {
|
|
791
791
|
title: r.uuid
|
|
792
|
-
}), s =
|
|
792
|
+
}), s = A(() => !!(r.tooltip && r.successTooltip)), l = F(r.tooltip), u = A(() => r.tooltip ? {
|
|
793
793
|
label: l.value,
|
|
794
794
|
positionFixed: !0,
|
|
795
795
|
maxWidth: "500px",
|
|
796
796
|
placement: "bottomStart"
|
|
797
|
-
} : {}), p =
|
|
797
|
+
} : {}), p = A(() => {
|
|
798
798
|
var f;
|
|
799
799
|
return r.format === "redacted" ? "*****" : r.format === "deleted" ? `*${(f = r.uuid) == null ? void 0 : f.substring(0, 5)}` : r.uuid;
|
|
800
800
|
}), c = (f) => {
|
|
@@ -802,7 +802,7 @@ const ce = {
|
|
|
802
802
|
l.value = r.tooltip;
|
|
803
803
|
}, 1800);
|
|
804
804
|
}, y = (f) => {
|
|
805
|
-
var
|
|
805
|
+
var _, h;
|
|
806
806
|
if (!f(r.uuid)) {
|
|
807
807
|
typeof i == "function" && i({
|
|
808
808
|
type: "error",
|
|
@@ -810,16 +810,16 @@ const ce = {
|
|
|
810
810
|
}), s.value ? c(t("message.fail")) : o("error", r.uuid);
|
|
811
811
|
return;
|
|
812
812
|
}
|
|
813
|
-
const
|
|
813
|
+
const S = ((_ = r.uuid) == null ? void 0 : _.length) > Yt, b = r.format === "hidden" || r.format === "redacted" ? t("message.success.prefix") : `"${((h = r.uuid) == null ? void 0 : h.substring(0, Yt)) + (S ? "..." : "")}"`;
|
|
814
814
|
typeof i == "function" && i({
|
|
815
815
|
type: "success",
|
|
816
816
|
message: `${b}${t("message.success.content")}`
|
|
817
817
|
}), s.value ? c(r.successTooltip) : o("success", r.uuid);
|
|
818
818
|
};
|
|
819
|
-
return (f,
|
|
819
|
+
return (f, _) => {
|
|
820
820
|
const h = q("KClipboardProvider");
|
|
821
821
|
return d(), j("div", go, [
|
|
822
|
-
e.format !== "hidden" ? (d(), P(Be(e.idTooltip ? "KTooltip" : "div"),
|
|
822
|
+
e.format !== "hidden" ? (d(), P(Be(e.idTooltip ? "KTooltip" : "div"), vt({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
823
823
|
default: g(() => [
|
|
824
824
|
D("div", {
|
|
825
825
|
class: Ee([
|
|
@@ -831,15 +831,15 @@ const ce = {
|
|
|
831
831
|
]),
|
|
832
832
|
_: 1
|
|
833
833
|
}, 16)) : z("", !0),
|
|
834
|
-
(d(), P(Be(e.tooltip ? "KTooltip" : "div"),
|
|
834
|
+
(d(), P(Be(e.tooltip ? "KTooltip" : "div"), vt(u.value, { class: "uuid-icon-wrapper" }), {
|
|
835
835
|
default: g(() => [
|
|
836
836
|
E(h, null, {
|
|
837
|
-
default: g(({ copyToClipboard:
|
|
837
|
+
default: g(({ copyToClipboard: S }) => [
|
|
838
838
|
D("span", {
|
|
839
839
|
"data-testid": "copy-to-clipboard",
|
|
840
840
|
role: "button",
|
|
841
841
|
tabindex: "0",
|
|
842
|
-
onClick: rt((b) => y(
|
|
842
|
+
onClick: rt((b) => y(S), ["stop"])
|
|
843
843
|
}, [
|
|
844
844
|
E(m(fo), {
|
|
845
845
|
class: "uuid-icon",
|
|
@@ -883,10 +883,10 @@ const ce = {
|
|
|
883
883
|
}
|
|
884
884
|
},
|
|
885
885
|
setup(e) {
|
|
886
|
-
const n = e, { i18n: { t } } = ce.useI18n(), { convertKeyToTitle: r } = ce.useStringHelpers(), o =
|
|
886
|
+
const n = e, { i18n: { t } } = ce.useI18n(), { convertKeyToTitle: r } = ce.useStringHelpers(), o = A(() => n.item.key ?? "json-array-item"), i = A(() => n.item.value ?? n.item), a = A(() => {
|
|
887
887
|
const l = JSON.parse(JSON.stringify(i.value));
|
|
888
888
|
return n.isArrayItem && delete l.name, l;
|
|
889
|
-
}), s =
|
|
889
|
+
}), s = A(() => {
|
|
890
890
|
var l;
|
|
891
891
|
return n.isArrayItem ? (l = i.value) != null && l.name ? r(i.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
892
892
|
});
|
|
@@ -897,7 +897,7 @@ const ce = {
|
|
|
897
897
|
e.isArrayItem ? (d(), j("legend", bo, [
|
|
898
898
|
D("b", null, N(s.value), 1)
|
|
899
899
|
])) : z("", !0),
|
|
900
|
-
(d(!0), j(Ce, null, ve(Object.keys(a.value), (p, c) => (d(), P(
|
|
900
|
+
(d(!0), j(Ce, null, ve(Object.keys(a.value), (p, c) => (d(), P(Tt, {
|
|
901
901
|
key: `${o.value}-property-${c}`,
|
|
902
902
|
item: {
|
|
903
903
|
key: p,
|
|
@@ -909,12 +909,12 @@ const ce = {
|
|
|
909
909
|
_: 1
|
|
910
910
|
}, 8, ["class"]));
|
|
911
911
|
}
|
|
912
|
-
}),
|
|
912
|
+
}), we = (e, n) => {
|
|
913
913
|
const t = e.__vccOpts || e;
|
|
914
914
|
for (const [r, o] of n)
|
|
915
915
|
t[r] = o;
|
|
916
916
|
return t;
|
|
917
|
-
}, Sn = /* @__PURE__ */
|
|
917
|
+
}, Sn = /* @__PURE__ */ we(Co, [["__scopeId", "data-v-68ca83ec"]]), ko = /* @__PURE__ */ ae({
|
|
918
918
|
__name: "InternalLinkItem",
|
|
919
919
|
props: {
|
|
920
920
|
item: {
|
|
@@ -941,7 +941,7 @@ const ce = {
|
|
|
941
941
|
]);
|
|
942
942
|
};
|
|
943
943
|
}
|
|
944
|
-
}),
|
|
944
|
+
}), wo = /* @__PURE__ */ we(ko, [["__scopeId", "data-v-c96811e5"]]), _o = /* @__PURE__ */ ae({
|
|
945
945
|
__name: "StatusBadge",
|
|
946
946
|
props: {
|
|
947
947
|
status: {
|
|
@@ -965,7 +965,7 @@ const ce = {
|
|
|
965
965
|
}
|
|
966
966
|
}), Io = "#0044f4", Ao = "#e0e4ea", So = "#3a3f51", xo = "1px", To = "20px", $o = { class: "config-card-details-row" }, jo = ["data-testid"], Mo = ["data-testid"], Oo = ["data-testid"], Eo = ["data-testid"], Fo = { key: 1 }, No = ["data-testid"], Ko = ["data-testid"], qo = ["data-testid"], Bo = ["data-testid"], Lo = {
|
|
967
967
|
name: "ConfigCardItem",
|
|
968
|
-
components: { CopyUuid: An, JsonCardItem: Sn, StatusBadge:
|
|
968
|
+
components: { CopyUuid: An, JsonCardItem: Sn, StatusBadge: _o, InternalLinkItem: wo }
|
|
969
969
|
}, Uo = /* @__PURE__ */ ae({
|
|
970
970
|
...Lo,
|
|
971
971
|
props: {
|
|
@@ -986,13 +986,13 @@ const ce = {
|
|
|
986
986
|
},
|
|
987
987
|
emits: ["navigation-click"],
|
|
988
988
|
setup(e, { emit: n }) {
|
|
989
|
-
gn((
|
|
989
|
+
gn((_) => ({
|
|
990
990
|
"0da74440": p.value ? "none" : `solid ${m(xo)} ${m(Ao)}`,
|
|
991
991
|
"02a039da": u.value && s.value ? "block" : "flex",
|
|
992
992
|
"690f3ced": u.value && s.value ? "100%" : t.slim ? "50%" : "25%",
|
|
993
993
|
"691182c8": u.value && s.value ? "100%" : t.slim ? "50%" : "75%"
|
|
994
994
|
}));
|
|
995
|
-
const t = e, r = n, o =
|
|
995
|
+
const t = e, r = n, o = ut(), { i18n: { t: i, formatUnixTimeStamp: a } } = ce.useI18n(), s = A(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), l = A(() => !!(t.item.tooltip || o["label-tooltip"])), u = A(() => t.item.type === oe.Json || t.item.type === oe.JsonArray), p = A(() => t.item.type === oe.JsonArray), c = A(() => {
|
|
996
996
|
switch (t.item.type) {
|
|
997
997
|
case oe.ID:
|
|
998
998
|
return {
|
|
@@ -1078,8 +1078,8 @@ const ce = {
|
|
|
1078
1078
|
attrs: {
|
|
1079
1079
|
"data-testid": `${t.item.key}-internal-link`,
|
|
1080
1080
|
item: t.item,
|
|
1081
|
-
onNavigationClick: (
|
|
1082
|
-
r("navigation-click",
|
|
1081
|
+
onNavigationClick: (_) => {
|
|
1082
|
+
r("navigation-click", _);
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
1085
1085
|
};
|
|
@@ -1119,15 +1119,15 @@ const ce = {
|
|
|
1119
1119
|
};
|
|
1120
1120
|
}
|
|
1121
1121
|
}), y = F(), { isTruncated: f } = ce.useTruncationDetector(y);
|
|
1122
|
-
return (
|
|
1123
|
-
const
|
|
1122
|
+
return (_, h) => {
|
|
1123
|
+
const S = q("KLabel"), b = q("KBadge"), w = q("KTooltip");
|
|
1124
1124
|
return d(), j("div", $o, [
|
|
1125
1125
|
D("div", {
|
|
1126
1126
|
class: "config-card-details-label",
|
|
1127
1127
|
"data-testid": `${e.item.key}-label`
|
|
1128
1128
|
}, [
|
|
1129
|
-
X(
|
|
1130
|
-
E(
|
|
1129
|
+
X(_.$slots, "label", { item: e.item }, () => [
|
|
1130
|
+
E(S, { "tooltip-attributes": { maxWidth: "500px" } }, je({
|
|
1131
1131
|
default: g(() => [
|
|
1132
1132
|
Z(N(e.item.label) + " ", 1)
|
|
1133
1133
|
]),
|
|
@@ -1139,7 +1139,7 @@ const ce = {
|
|
|
1139
1139
|
D("div", {
|
|
1140
1140
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1141
1141
|
}, [
|
|
1142
|
-
X(
|
|
1142
|
+
X(_.$slots, "label-tooltip", {}, () => [
|
|
1143
1143
|
Z(N(e.item.tooltip), 1)
|
|
1144
1144
|
], !0)
|
|
1145
1145
|
], 8, Mo)
|
|
@@ -1153,7 +1153,7 @@ const ce = {
|
|
|
1153
1153
|
class: "config-card-details-value",
|
|
1154
1154
|
"data-testid": `${e.item.key}-property-value`
|
|
1155
1155
|
}, [
|
|
1156
|
-
X(
|
|
1156
|
+
X(_.$slots, e.item.key, {
|
|
1157
1157
|
rowValue: e.item.value
|
|
1158
1158
|
}, () => [
|
|
1159
1159
|
s.value ? (d(), j("div", Fo, [
|
|
@@ -1181,7 +1181,7 @@ const ce = {
|
|
|
1181
1181
|
class: "copy-uuid-array",
|
|
1182
1182
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1183
1183
|
}, [
|
|
1184
|
-
(d(!0), j(Ce, null, ve(e.item.value, (L, v) => (d(), P(m(An),
|
|
1184
|
+
(d(!0), j(Ce, null, ve(e.item.value, (L, v) => (d(), P(m(An), vt(c.value.childAttrs, {
|
|
1185
1185
|
key: `${e.item.key}-copy-uuid-${v}`,
|
|
1186
1186
|
"data-testid": `${e.item.key}-copy-uuid-${v}`,
|
|
1187
1187
|
uuid: L
|
|
@@ -1213,7 +1213,7 @@ const ce = {
|
|
|
1213
1213
|
"is-array-item": "",
|
|
1214
1214
|
item: L
|
|
1215
1215
|
}, null, 8, ["index", "item"]))), 128))
|
|
1216
|
-
], 8, Bo)) : (d(), P(
|
|
1216
|
+
], 8, Bo)) : (d(), P(w, {
|
|
1217
1217
|
key: 4,
|
|
1218
1218
|
label: m(f) ? e.item.value : ""
|
|
1219
1219
|
}, {
|
|
@@ -1238,7 +1238,7 @@ const ce = {
|
|
|
1238
1238
|
]);
|
|
1239
1239
|
};
|
|
1240
1240
|
}
|
|
1241
|
-
}),
|
|
1241
|
+
}), Tt = /* @__PURE__ */ we(Uo, [["__scopeId", "data-v-9c87856b"]]), Po = { class: "json-config" }, Vo = {
|
|
1242
1242
|
key: 0,
|
|
1243
1243
|
class: "json-endpoint"
|
|
1244
1244
|
}, xn = /* @__PURE__ */ ae({
|
|
@@ -1270,9 +1270,9 @@ const ce = {
|
|
|
1270
1270
|
},
|
|
1271
1271
|
setup(e) {
|
|
1272
1272
|
gn((o) => ({
|
|
1273
|
-
|
|
1273
|
+
"2d178975": `${r.value}ch`
|
|
1274
1274
|
}));
|
|
1275
|
-
const n = e, t =
|
|
1275
|
+
const n = e, t = A(() => n.jsonRecord), r = A(() => {
|
|
1276
1276
|
var o;
|
|
1277
1277
|
if (!n.fetcherUrl)
|
|
1278
1278
|
return 0;
|
|
@@ -1283,7 +1283,7 @@ const ce = {
|
|
|
1283
1283
|
var a;
|
|
1284
1284
|
const s = q("KBadge"), l = q("KCodeBlock");
|
|
1285
1285
|
return d(), j("div", Po, [
|
|
1286
|
-
n.fetcherUrl && (a = n.config) != null && a.jsonYamlFormsEnabled ? (d(), j("div",
|
|
1286
|
+
n.fetcherUrl && (a = n.config) != null && a.jsonYamlFormsEnabled ? (d(), j("div", Vo, [
|
|
1287
1287
|
E(s, {
|
|
1288
1288
|
appearance: n.requestMethod
|
|
1289
1289
|
}, {
|
|
@@ -1304,7 +1304,7 @@ const ce = {
|
|
|
1304
1304
|
key: 1,
|
|
1305
1305
|
id: "json-codeblock",
|
|
1306
1306
|
class: Ee({ "json-content": n.fetcherUrl }),
|
|
1307
|
-
code: JSON.stringify(t, null, 2),
|
|
1307
|
+
code: JSON.stringify(t.value, null, 2),
|
|
1308
1308
|
language: "json",
|
|
1309
1309
|
theme: "dark"
|
|
1310
1310
|
}, null, 8, ["class", "code"])) : z("", !0)
|
|
@@ -1316,7 +1316,7 @@ const ce = {
|
|
|
1316
1316
|
function Tn(e) {
|
|
1317
1317
|
return typeof e > "u" || e === null;
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function Do(e) {
|
|
1320
1320
|
return typeof e == "object" && e !== null;
|
|
1321
1321
|
}
|
|
1322
1322
|
function Ro(e) {
|
|
@@ -1338,7 +1338,7 @@ function Ho(e, n) {
|
|
|
1338
1338
|
function zo(e) {
|
|
1339
1339
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1340
1340
|
}
|
|
1341
|
-
var Jo = Tn, Yo =
|
|
1341
|
+
var Jo = Tn, Yo = Do, Wo = Ro, Zo = Ho, Qo = zo, Xo = Go, ue = {
|
|
1342
1342
|
isNothing: Jo,
|
|
1343
1343
|
isObject: Yo,
|
|
1344
1344
|
toArray: Wo,
|
|
@@ -1361,7 +1361,7 @@ We.prototype.toString = function(e) {
|
|
|
1361
1361
|
return this.name + ": " + $n(this, e);
|
|
1362
1362
|
};
|
|
1363
1363
|
var ye = We;
|
|
1364
|
-
function
|
|
1364
|
+
function gt(e, n, t, r, o) {
|
|
1365
1365
|
var i = "", a = "", s = Math.floor(o / 2) - 1;
|
|
1366
1366
|
return r - n > s && (i = " ... ", n = r - s + i.length), t - r > s && (a = " ...", t = r + s - a.length), {
|
|
1367
1367
|
str: i + e.slice(n, t).replace(/\t/g, "→") + a,
|
|
@@ -1369,7 +1369,7 @@ function yt(e, n, t, r, o) {
|
|
|
1369
1369
|
// relative position
|
|
1370
1370
|
};
|
|
1371
1371
|
}
|
|
1372
|
-
function
|
|
1372
|
+
function yt(e, n) {
|
|
1373
1373
|
return ue.repeat(" ", n - e.length) + e;
|
|
1374
1374
|
}
|
|
1375
1375
|
function ea(e, n) {
|
|
@@ -1381,24 +1381,24 @@ function ea(e, n) {
|
|
|
1381
1381
|
a < 0 && (a = r.length - 1);
|
|
1382
1382
|
var s = "", l, u, p = Math.min(e.line + n.linesAfter, o.length).toString().length, c = n.maxLength - (n.indent + p + 3);
|
|
1383
1383
|
for (l = 1; l <= n.linesBefore && !(a - l < 0); l++)
|
|
1384
|
-
u =
|
|
1384
|
+
u = gt(
|
|
1385
1385
|
e.buffer,
|
|
1386
1386
|
r[a - l],
|
|
1387
1387
|
o[a - l],
|
|
1388
1388
|
e.position - (r[a] - r[a - l]),
|
|
1389
1389
|
c
|
|
1390
|
-
), s = ue.repeat(" ", n.indent) +
|
|
1390
|
+
), s = ue.repeat(" ", n.indent) + yt((e.line - l + 1).toString(), p) + " | " + u.str + `
|
|
1391
1391
|
` + s;
|
|
1392
|
-
for (u =
|
|
1392
|
+
for (u = gt(e.buffer, r[a], o[a], e.position, c), s += ue.repeat(" ", n.indent) + yt((e.line + 1).toString(), p) + " | " + u.str + `
|
|
1393
1393
|
`, s += ue.repeat("-", n.indent + p + 3 + u.pos) + `^
|
|
1394
1394
|
`, l = 1; l <= n.linesAfter && !(a + l >= o.length); l++)
|
|
1395
|
-
u =
|
|
1395
|
+
u = gt(
|
|
1396
1396
|
e.buffer,
|
|
1397
1397
|
r[a + l],
|
|
1398
1398
|
o[a + l],
|
|
1399
1399
|
e.position - (r[a] - r[a + l]),
|
|
1400
1400
|
c
|
|
1401
|
-
), s += ue.repeat(" ", n.indent) +
|
|
1401
|
+
), s += ue.repeat(" ", n.indent) + yt((e.line + l + 1).toString(), p) + " | " + u.str + `
|
|
1402
1402
|
`;
|
|
1403
1403
|
return s.replace(/\n$/, "");
|
|
1404
1404
|
}
|
|
@@ -1467,10 +1467,10 @@ function ia() {
|
|
|
1467
1467
|
arguments[n].forEach(r);
|
|
1468
1468
|
return e;
|
|
1469
1469
|
}
|
|
1470
|
-
function
|
|
1470
|
+
function bt(e) {
|
|
1471
1471
|
return this.extend(e);
|
|
1472
1472
|
}
|
|
1473
|
-
|
|
1473
|
+
bt.prototype.extend = function(e) {
|
|
1474
1474
|
var n = [], t = [];
|
|
1475
1475
|
if (e instanceof pe)
|
|
1476
1476
|
t.push(e);
|
|
@@ -1491,10 +1491,10 @@ Ct.prototype.extend = function(e) {
|
|
|
1491
1491
|
if (!(o instanceof pe))
|
|
1492
1492
|
throw new ye("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1493
1493
|
});
|
|
1494
|
-
var r = Object.create(
|
|
1494
|
+
var r = Object.create(bt.prototype);
|
|
1495
1495
|
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = Wt(r, "implicit"), r.compiledExplicit = Wt(r, "explicit"), r.compiledTypeMap = ia(r.compiledImplicit, r.compiledExplicit), r;
|
|
1496
1496
|
};
|
|
1497
|
-
var jn =
|
|
1497
|
+
var jn = bt, Mn = new pe("tag:yaml.org,2002:str", {
|
|
1498
1498
|
kind: "scalar",
|
|
1499
1499
|
construct: function(e) {
|
|
1500
1500
|
return e !== null ? e : "";
|
|
@@ -1695,8 +1695,8 @@ function ka(e) {
|
|
|
1695
1695
|
var n, t;
|
|
1696
1696
|
return n = e.replace(/_/g, "").toLowerCase(), t = n[0] === "-" ? -1 : 1, "+-".indexOf(n[0]) >= 0 && (n = n.slice(1)), n === ".inf" ? t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : n === ".nan" ? NaN : t * parseFloat(n, 10);
|
|
1697
1697
|
}
|
|
1698
|
-
var
|
|
1699
|
-
function
|
|
1698
|
+
var wa = /^[-+]?[0-9]+e/;
|
|
1699
|
+
function _a(e, n) {
|
|
1700
1700
|
var t;
|
|
1701
1701
|
if (isNaN(e))
|
|
1702
1702
|
switch (n) {
|
|
@@ -1727,7 +1727,7 @@ function wa(e, n) {
|
|
|
1727
1727
|
}
|
|
1728
1728
|
else if (ue.isNegativeZero(e))
|
|
1729
1729
|
return "-0.0";
|
|
1730
|
-
return t = e.toString(10),
|
|
1730
|
+
return t = e.toString(10), wa.test(t) ? t.replace("e", ".e") : t;
|
|
1731
1731
|
}
|
|
1732
1732
|
function Ia(e) {
|
|
1733
1733
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ue.isNegativeZero(e));
|
|
@@ -1737,7 +1737,7 @@ var Bn = new pe("tag:yaml.org,2002:float", {
|
|
|
1737
1737
|
resolve: Ca,
|
|
1738
1738
|
construct: ka,
|
|
1739
1739
|
predicate: Ia,
|
|
1740
|
-
represent:
|
|
1740
|
+
represent: _a,
|
|
1741
1741
|
defaultStyle: "lowercase"
|
|
1742
1742
|
}), Ln = Fn.extend({
|
|
1743
1743
|
implicit: [
|
|
@@ -1748,15 +1748,15 @@ var Bn = new pe("tag:yaml.org,2002:float", {
|
|
|
1748
1748
|
]
|
|
1749
1749
|
}), Un = Ln, Pn = new RegExp(
|
|
1750
1750
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1751
|
-
),
|
|
1751
|
+
), Vn = new RegExp(
|
|
1752
1752
|
"^([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]))?))?$"
|
|
1753
1753
|
);
|
|
1754
1754
|
function Aa(e) {
|
|
1755
|
-
return e === null ? !1 : Pn.exec(e) !== null ||
|
|
1755
|
+
return e === null ? !1 : Pn.exec(e) !== null || Vn.exec(e) !== null;
|
|
1756
1756
|
}
|
|
1757
1757
|
function Sa(e) {
|
|
1758
1758
|
var n, t, r, o, i, a, s, l = 0, u = null, p, c, y;
|
|
1759
|
-
if (n = Pn.exec(e), n === null && (n =
|
|
1759
|
+
if (n = Pn.exec(e), n === null && (n = Vn.exec(e)), n === null)
|
|
1760
1760
|
throw new Error("Date resolve error");
|
|
1761
1761
|
if (t = +n[1], r = +n[2] - 1, o = +n[3], !n[4])
|
|
1762
1762
|
return new Date(Date.UTC(t, r, o));
|
|
@@ -1770,7 +1770,7 @@ function Sa(e) {
|
|
|
1770
1770
|
function xa(e) {
|
|
1771
1771
|
return e.toISOString();
|
|
1772
1772
|
}
|
|
1773
|
-
var
|
|
1773
|
+
var Dn = new pe("tag:yaml.org,2002:timestamp", {
|
|
1774
1774
|
kind: "scalar",
|
|
1775
1775
|
resolve: Aa,
|
|
1776
1776
|
construct: Sa,
|
|
@@ -1783,12 +1783,12 @@ function Ta(e) {
|
|
|
1783
1783
|
var Rn = new pe("tag:yaml.org,2002:merge", {
|
|
1784
1784
|
kind: "scalar",
|
|
1785
1785
|
resolve: Ta
|
|
1786
|
-
}),
|
|
1786
|
+
}), $t = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1787
1787
|
\r`;
|
|
1788
1788
|
function $a(e) {
|
|
1789
1789
|
if (e === null)
|
|
1790
1790
|
return !1;
|
|
1791
|
-
var n, t, r = 0, o = e.length, i =
|
|
1791
|
+
var n, t, r = 0, o = e.length, i = $t;
|
|
1792
1792
|
for (t = 0; t < o; t++)
|
|
1793
1793
|
if (n = i.indexOf(e.charAt(t)), !(n > 64)) {
|
|
1794
1794
|
if (n < 0)
|
|
@@ -1798,13 +1798,13 @@ function $a(e) {
|
|
|
1798
1798
|
return r % 8 === 0;
|
|
1799
1799
|
}
|
|
1800
1800
|
function ja(e) {
|
|
1801
|
-
var n, t, r = e.replace(/[\r\n=]/g, ""), o = r.length, i =
|
|
1801
|
+
var n, t, r = e.replace(/[\r\n=]/g, ""), o = r.length, i = $t, a = 0, s = [];
|
|
1802
1802
|
for (n = 0; n < o; n++)
|
|
1803
1803
|
n % 4 === 0 && n && (s.push(a >> 16 & 255), s.push(a >> 8 & 255), s.push(a & 255)), a = a << 6 | i.indexOf(r.charAt(n));
|
|
1804
1804
|
return t = o % 4 * 6, t === 0 ? (s.push(a >> 16 & 255), s.push(a >> 8 & 255), s.push(a & 255)) : t === 18 ? (s.push(a >> 10 & 255), s.push(a >> 2 & 255)) : t === 12 && s.push(a >> 4 & 255), new Uint8Array(s);
|
|
1805
1805
|
}
|
|
1806
1806
|
function Ma(e) {
|
|
1807
|
-
var n = "", t = 0, r, o, i = e.length, a =
|
|
1807
|
+
var n = "", t = 0, r, o, i = e.length, a = $t;
|
|
1808
1808
|
for (r = 0; r < i; r++)
|
|
1809
1809
|
r % 3 === 0 && r && (n += a[t >> 18 & 63], n += a[t >> 12 & 63], n += a[t >> 6 & 63], n += a[t & 63]), t = (t << 8) + e[r];
|
|
1810
1810
|
return o = i % 3, o === 0 ? (n += a[t >> 18 & 63], n += a[t >> 12 & 63], n += a[t >> 6 & 63], n += a[t & 63]) : o === 2 ? (n += a[t >> 10 & 63], n += a[t >> 4 & 63], n += a[t << 2 & 63], n += a[64]) : o === 1 && (n += a[t >> 2 & 63], n += a[t << 4 & 63], n += a[64], n += a[64]), n;
|
|
@@ -1882,16 +1882,16 @@ function Pa(e) {
|
|
|
1882
1882
|
return !1;
|
|
1883
1883
|
return !0;
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function Va(e) {
|
|
1886
1886
|
return e !== null ? e : {};
|
|
1887
1887
|
}
|
|
1888
1888
|
var Jn = new pe("tag:yaml.org,2002:set", {
|
|
1889
1889
|
kind: "mapping",
|
|
1890
1890
|
resolve: Pa,
|
|
1891
|
-
construct:
|
|
1892
|
-
}),
|
|
1891
|
+
construct: Va
|
|
1892
|
+
}), jt = Un.extend({
|
|
1893
1893
|
implicit: [
|
|
1894
|
-
|
|
1894
|
+
Dn,
|
|
1895
1895
|
Rn
|
|
1896
1896
|
],
|
|
1897
1897
|
explicit: [
|
|
@@ -1900,7 +1900,7 @@ var Jn = new pe("tag:yaml.org,2002:set", {
|
|
|
1900
1900
|
zn,
|
|
1901
1901
|
Jn
|
|
1902
1902
|
]
|
|
1903
|
-
}), Fe = Object.prototype.hasOwnProperty,
|
|
1903
|
+
}), Fe = Object.prototype.hasOwnProperty, ot = 1, Yn = 2, Wn = 3, at = 4, ht = 1, Da = 2, Zt = 3, Ra = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Ga = /[\x85\u2028\u2029]/, Ha = /[,\[\]\{\}]/, Zn = /^(?:!|!!|![a-z\-]+!)$/i, Qn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1904
1904
|
function Qt(e) {
|
|
1905
1905
|
return Object.prototype.toString.call(e);
|
|
1906
1906
|
}
|
|
@@ -1913,7 +1913,7 @@ function qe(e) {
|
|
|
1913
1913
|
function be(e) {
|
|
1914
1914
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1915
1915
|
}
|
|
1916
|
-
function
|
|
1916
|
+
function De(e) {
|
|
1917
1917
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1918
1918
|
}
|
|
1919
1919
|
function za(e) {
|
|
@@ -1940,7 +1940,7 @@ var Xn = new Array(256), er = new Array(256);
|
|
|
1940
1940
|
for (var Pe = 0; Pe < 256; Pe++)
|
|
1941
1941
|
Xn[Pe] = Xt(Pe) ? 1 : 0, er[Pe] = Xt(Pe);
|
|
1942
1942
|
function Za(e, n) {
|
|
1943
|
-
this.input = e, this.filename = n.filename || null, this.schema = n.schema ||
|
|
1943
|
+
this.input = e, this.filename = n.filename || null, this.schema = n.schema || jt, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1944
1944
|
}
|
|
1945
1945
|
function tr(e, n) {
|
|
1946
1946
|
var t = {
|
|
@@ -1956,13 +1956,13 @@ function tr(e, n) {
|
|
|
1956
1956
|
function M(e, n) {
|
|
1957
1957
|
throw tr(e, n);
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1959
|
+
function it(e, n) {
|
|
1960
1960
|
e.onWarning && e.onWarning.call(null, tr(e, n));
|
|
1961
1961
|
}
|
|
1962
1962
|
var en = {
|
|
1963
1963
|
YAML: function(e, n, t) {
|
|
1964
1964
|
var r, o, i;
|
|
1965
|
-
e.version !== null && M(e, "duplication of %YAML directive"), t.length !== 1 && M(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), r === null && M(e, "ill-formed argument of the YAML directive"), o = parseInt(r[1], 10), i = parseInt(r[2], 10), o !== 1 && M(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = i < 2, i !== 1 && i !== 2 &&
|
|
1965
|
+
e.version !== null && M(e, "duplication of %YAML directive"), t.length !== 1 && M(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), r === null && M(e, "ill-formed argument of the YAML directive"), o = parseInt(r[1], 10), i = parseInt(r[2], 10), o !== 1 && M(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = i < 2, i !== 1 && i !== 2 && it(e, "unsupported YAML version of the document");
|
|
1966
1966
|
},
|
|
1967
1967
|
TAG: function(e, n, t) {
|
|
1968
1968
|
var r, o;
|
|
@@ -2011,7 +2011,7 @@ function Re(e, n, t, r, o, i, a, s, l) {
|
|
|
2011
2011
|
}) : n[o] = i, delete t[o];
|
|
2012
2012
|
return n;
|
|
2013
2013
|
}
|
|
2014
|
-
function
|
|
2014
|
+
function Mt(e) {
|
|
2015
2015
|
var n;
|
|
2016
2016
|
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 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;
|
|
2017
2017
|
}
|
|
@@ -2024,34 +2024,34 @@ function le(e, n, t) {
|
|
|
2024
2024
|
o = e.input.charCodeAt(++e.position);
|
|
2025
2025
|
while (o !== 10 && o !== 13 && o !== 0);
|
|
2026
2026
|
if (Ae(o))
|
|
2027
|
-
for (
|
|
2027
|
+
for (Mt(e), o = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; o === 32; )
|
|
2028
2028
|
e.lineIndent++, o = e.input.charCodeAt(++e.position);
|
|
2029
2029
|
else
|
|
2030
2030
|
break;
|
|
2031
2031
|
}
|
|
2032
|
-
return t !== -1 && r !== 0 && e.lineIndent < t &&
|
|
2032
|
+
return t !== -1 && r !== 0 && e.lineIndent < t && it(e, "deficient indentation"), r;
|
|
2033
2033
|
}
|
|
2034
|
-
function
|
|
2034
|
+
function pt(e) {
|
|
2035
2035
|
var n = e.position, t;
|
|
2036
2036
|
return t = e.input.charCodeAt(n), !!((t === 45 || t === 46) && t === e.input.charCodeAt(n + 1) && t === e.input.charCodeAt(n + 2) && (n += 3, t = e.input.charCodeAt(n), t === 0 || be(t)));
|
|
2037
2037
|
}
|
|
2038
|
-
function
|
|
2038
|
+
function Ot(e, n) {
|
|
2039
2039
|
n === 1 ? e.result += " " : n > 1 && (e.result += ue.repeat(`
|
|
2040
2040
|
`, n - 1));
|
|
2041
2041
|
}
|
|
2042
2042
|
function Qa(e, n, t) {
|
|
2043
2043
|
var r, o, i, a, s, l, u, p, c = e.kind, y = e.result, f;
|
|
2044
|
-
if (f = e.input.charCodeAt(e.position), be(f) ||
|
|
2044
|
+
if (f = e.input.charCodeAt(e.position), be(f) || De(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (o = e.input.charCodeAt(e.position + 1), be(o) || t && De(o)))
|
|
2045
2045
|
return !1;
|
|
2046
2046
|
for (e.kind = "scalar", e.result = "", i = a = e.position, s = !1; f !== 0; ) {
|
|
2047
2047
|
if (f === 58) {
|
|
2048
|
-
if (o = e.input.charCodeAt(e.position + 1), be(o) || t &&
|
|
2048
|
+
if (o = e.input.charCodeAt(e.position + 1), be(o) || t && De(o))
|
|
2049
2049
|
break;
|
|
2050
2050
|
} else if (f === 35) {
|
|
2051
2051
|
if (r = e.input.charCodeAt(e.position - 1), be(r))
|
|
2052
2052
|
break;
|
|
2053
2053
|
} else {
|
|
2054
|
-
if (e.position === e.lineStart &&
|
|
2054
|
+
if (e.position === e.lineStart && pt(e) || t && De(f))
|
|
2055
2055
|
break;
|
|
2056
2056
|
if (Ae(f))
|
|
2057
2057
|
if (l = e.line, u = e.lineStart, p = e.lineIndent, le(e, !1, -1), e.lineIndent >= n) {
|
|
@@ -2062,7 +2062,7 @@ function Qa(e, n, t) {
|
|
|
2062
2062
|
break;
|
|
2063
2063
|
}
|
|
2064
2064
|
}
|
|
2065
|
-
s && (Oe(e, i, a, !1),
|
|
2065
|
+
s && (Oe(e, i, a, !1), Ot(e, e.line - l), i = a = e.position, s = !1), qe(f) || (a = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
2066
2066
|
}
|
|
2067
2067
|
return Oe(e, i, a, !1), e.result ? !0 : (e.kind = c, e.result = y, !1);
|
|
2068
2068
|
}
|
|
@@ -2077,7 +2077,7 @@ function Xa(e, n) {
|
|
|
2077
2077
|
else
|
|
2078
2078
|
return !0;
|
|
2079
2079
|
else
|
|
2080
|
-
Ae(t) ? (Oe(e, r, o, !0),
|
|
2080
|
+
Ae(t) ? (Oe(e, r, o, !0), Ot(e, le(e, !1, n)), r = o = e.position) : e.position === e.lineStart && pt(e) ? M(e, "unexpected end of the document within a single quoted scalar") : (e.position++, o = e.position);
|
|
2081
2081
|
M(e, "unexpected end of the stream within a single quoted scalar");
|
|
2082
2082
|
}
|
|
2083
2083
|
function ei(e, n) {
|
|
@@ -2100,27 +2100,27 @@ function ei(e, n) {
|
|
|
2100
2100
|
M(e, "unknown escape sequence");
|
|
2101
2101
|
t = r = e.position;
|
|
2102
2102
|
} else
|
|
2103
|
-
Ae(s) ? (Oe(e, t, r, !0),
|
|
2103
|
+
Ae(s) ? (Oe(e, t, r, !0), Ot(e, le(e, !1, n)), t = r = e.position) : e.position === e.lineStart && pt(e) ? M(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
2104
2104
|
}
|
|
2105
2105
|
M(e, "unexpected end of the stream within a double quoted scalar");
|
|
2106
2106
|
}
|
|
2107
2107
|
function ti(e, n) {
|
|
2108
|
-
var t = !0, r, o, i, a = e.tag, s, l = e.anchor, u, p, c, y, f,
|
|
2109
|
-
if (
|
|
2108
|
+
var t = !0, r, o, i, a = e.tag, s, l = e.anchor, u, p, c, y, f, _ = /* @__PURE__ */ Object.create(null), h, S, b, w;
|
|
2109
|
+
if (w = e.input.charCodeAt(e.position), w === 91)
|
|
2110
2110
|
p = 93, f = !1, s = [];
|
|
2111
|
-
else if (
|
|
2111
|
+
else if (w === 123)
|
|
2112
2112
|
p = 125, f = !0, s = {};
|
|
2113
2113
|
else
|
|
2114
2114
|
return !1;
|
|
2115
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = s),
|
|
2116
|
-
if (le(e, !0, n),
|
|
2115
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), w = e.input.charCodeAt(++e.position); w !== 0; ) {
|
|
2116
|
+
if (le(e, !0, n), w = e.input.charCodeAt(e.position), w === p)
|
|
2117
2117
|
return e.position++, e.tag = a, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
2118
|
-
t ?
|
|
2118
|
+
t ? w === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), S = h = b = null, c = y = !1, w === 63 && (u = e.input.charCodeAt(e.position + 1), be(u) && (c = y = !0, e.position++, le(e, !0, n))), r = e.line, o = e.lineStart, i = e.position, Ge(e, n, ot, !1, !0), S = e.tag, h = e.result, le(e, !0, n), w = e.input.charCodeAt(e.position), (y || e.line === r) && w === 58 && (c = !0, w = e.input.charCodeAt(++e.position), le(e, !0, n), Ge(e, n, ot, !1, !0), b = e.result), f ? Re(e, s, _, S, h, b, r, o, i) : c ? s.push(Re(e, null, _, S, h, b, r, o, i)) : s.push(h), le(e, !0, n), w = e.input.charCodeAt(e.position), w === 44 ? (t = !0, w = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2119
2119
|
}
|
|
2120
2120
|
M(e, "unexpected end of the stream within a flow collection");
|
|
2121
2121
|
}
|
|
2122
2122
|
function ni(e, n) {
|
|
2123
|
-
var t, r, o =
|
|
2123
|
+
var t, r, o = ht, i = !1, a = !1, s = n, l = 0, u = !1, p, c;
|
|
2124
2124
|
if (c = e.input.charCodeAt(e.position), c === 124)
|
|
2125
2125
|
r = !1;
|
|
2126
2126
|
else if (c === 62)
|
|
@@ -2129,7 +2129,7 @@ function ni(e, n) {
|
|
|
2129
2129
|
return !1;
|
|
2130
2130
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
2131
2131
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
2132
|
-
|
|
2132
|
+
ht === o ? o = c === 43 ? Zt : Da : M(e, "repeat of a chomping mode identifier");
|
|
2133
2133
|
else if ((p = Ya(c)) >= 0)
|
|
2134
2134
|
p === 0 ? M(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? M(e, "repeat of an indentation width identifier") : (s = n + p - 1, a = !0);
|
|
2135
2135
|
else
|
|
@@ -2144,7 +2144,7 @@ function ni(e, n) {
|
|
|
2144
2144
|
while (!Ae(c) && c !== 0);
|
|
2145
2145
|
}
|
|
2146
2146
|
for (; c !== 0; ) {
|
|
2147
|
-
for (
|
|
2147
|
+
for (Mt(e), e.lineIndent = 0, c = e.input.charCodeAt(e.position); (!a || e.lineIndent < s) && c === 32; )
|
|
2148
2148
|
e.lineIndent++, c = e.input.charCodeAt(++e.position);
|
|
2149
2149
|
if (!a && e.lineIndent > s && (s = e.lineIndent), Ae(c)) {
|
|
2150
2150
|
l++;
|
|
@@ -2152,7 +2152,7 @@ function ni(e, n) {
|
|
|
2152
2152
|
}
|
|
2153
2153
|
if (e.lineIndent < s) {
|
|
2154
2154
|
o === Zt ? e.result += ue.repeat(`
|
|
2155
|
-
`, i ? 1 + l : l) : o ===
|
|
2155
|
+
`, i ? 1 + l : l) : o === ht && i && (e.result += `
|
|
2156
2156
|
`);
|
|
2157
2157
|
break;
|
|
2158
2158
|
}
|
|
@@ -2183,20 +2183,20 @@ function nn(e, n) {
|
|
|
2183
2183
|
return s ? (e.tag = r, e.anchor = o, e.kind = "sequence", e.result = i, !0) : !1;
|
|
2184
2184
|
}
|
|
2185
2185
|
function ri(e, n, t) {
|
|
2186
|
-
var r, o, i, a, s, l, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), f = null,
|
|
2186
|
+
var r, o, i, a, s, l, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), f = null, _ = null, h = null, S = !1, b = !1, w;
|
|
2187
2187
|
if (e.firstTabInLine !== -1)
|
|
2188
2188
|
return !1;
|
|
2189
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = c),
|
|
2190
|
-
if (!
|
|
2191
|
-
|
|
2189
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), w = e.input.charCodeAt(e.position); w !== 0; ) {
|
|
2190
|
+
if (!S && 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, (w === 63 || w === 58) && be(r))
|
|
2191
|
+
w === 63 ? (S && (Re(e, c, y, f, _, null, a, s, l), f = _ = h = null), b = !0, S = !0, o = !0) : S ? (S = !1, o = !0) : M(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, w = r;
|
|
2192
2192
|
else {
|
|
2193
2193
|
if (a = e.line, s = e.lineStart, l = e.position, !Ge(e, t, Yn, !1, !0))
|
|
2194
2194
|
break;
|
|
2195
2195
|
if (e.line === i) {
|
|
2196
|
-
for (
|
|
2197
|
-
|
|
2198
|
-
if (
|
|
2199
|
-
|
|
2196
|
+
for (w = e.input.charCodeAt(e.position); qe(w); )
|
|
2197
|
+
w = e.input.charCodeAt(++e.position);
|
|
2198
|
+
if (w === 58)
|
|
2199
|
+
w = e.input.charCodeAt(++e.position), be(w) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), S && (Re(e, c, y, f, _, null, a, s, l), f = _ = h = null), b = !0, S = !1, o = !1, f = e.tag, _ = e.result;
|
|
2200
2200
|
else if (b)
|
|
2201
2201
|
M(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2202
2202
|
else
|
|
@@ -2206,12 +2206,12 @@ function ri(e, n, t) {
|
|
|
2206
2206
|
else
|
|
2207
2207
|
return e.tag = u, e.anchor = p, !0;
|
|
2208
2208
|
}
|
|
2209
|
-
if ((e.line === i || e.lineIndent > n) && (
|
|
2209
|
+
if ((e.line === i || e.lineIndent > n) && (S && (a = e.line, s = e.lineStart, l = e.position), Ge(e, n, at, !0, o) && (S ? _ = e.result : h = e.result), S || (Re(e, c, y, f, _, h, a, s, l), f = _ = h = null), le(e, !0, -1), w = e.input.charCodeAt(e.position)), (e.line === i || e.lineIndent > n) && w !== 0)
|
|
2210
2210
|
M(e, "bad indentation of a mapping entry");
|
|
2211
2211
|
else if (e.lineIndent < n)
|
|
2212
2212
|
break;
|
|
2213
2213
|
}
|
|
2214
|
-
return
|
|
2214
|
+
return S && Re(e, c, y, f, _, null, a, s, l), b && (e.tag = u, e.anchor = p, e.kind = "mapping", e.result = c), b;
|
|
2215
2215
|
}
|
|
2216
2216
|
function oi(e) {
|
|
2217
2217
|
var n, t = !1, r = !1, o, i, a;
|
|
@@ -2239,7 +2239,7 @@ function ai(e) {
|
|
|
2239
2239
|
var n, t;
|
|
2240
2240
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2241
2241
|
return !1;
|
|
2242
|
-
for (e.anchor !== null && M(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !be(t) && !
|
|
2242
|
+
for (e.anchor !== null && M(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !be(t) && !De(t); )
|
|
2243
2243
|
t = e.input.charCodeAt(++e.position);
|
|
2244
2244
|
return e.position === n && M(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2245
2245
|
}
|
|
@@ -2247,33 +2247,33 @@ function ii(e) {
|
|
|
2247
2247
|
var n, t, r;
|
|
2248
2248
|
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
2249
2249
|
return !1;
|
|
2250
|
-
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !be(r) && !
|
|
2250
|
+
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !be(r) && !De(r); )
|
|
2251
2251
|
r = e.input.charCodeAt(++e.position);
|
|
2252
2252
|
return e.position === n && M(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), Fe.call(e.anchorMap, t) || M(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], le(e, !0, -1), !0;
|
|
2253
2253
|
}
|
|
2254
2254
|
function Ge(e, n, t, r, o) {
|
|
2255
|
-
var i, a, s, l = 1, u = !1, p = !1, c, y, f,
|
|
2256
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = a = s =
|
|
2255
|
+
var i, a, s, l = 1, u = !1, p = !1, c, y, f, _, h, S;
|
|
2256
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = a = s = at === t || Wn === t, r && le(e, !0, -1) && (u = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2257
2257
|
for (; oi(e) || ai(e); )
|
|
2258
2258
|
le(e, !0, -1) ? (u = !0, s = i, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2259
|
-
if (s && (s = u || o), (l === 1 ||
|
|
2259
|
+
if (s && (s = u || o), (l === 1 || at === t) && (ot === t || Yn === t ? h = n : h = n + 1, S = e.position - e.lineStart, l === 1 ? s && (nn(e, S) || ri(e, S, h)) || ti(e, h) ? p = !0 : (a && ni(e, h) || Xa(e, h) || ei(e, h) ? p = !0 : ii(e) ? (p = !0, (e.tag !== null || e.anchor !== null) && M(e, "alias node should not have any properties")) : Qa(e, h, ot === t) && (p = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (p = s && nn(e, S))), e.tag === null)
|
|
2260
2260
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2261
2261
|
else if (e.tag === "?") {
|
|
2262
2262
|
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)
|
|
2263
|
-
if (
|
|
2264
|
-
e.result =
|
|
2263
|
+
if (_ = e.implicitTypes[c], _.resolve(e.result)) {
|
|
2264
|
+
e.result = _.construct(e.result), e.tag = _.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2265
2265
|
break;
|
|
2266
2266
|
}
|
|
2267
2267
|
} else if (e.tag !== "!") {
|
|
2268
2268
|
if (Fe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2269
|
-
|
|
2269
|
+
_ = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2270
2270
|
else
|
|
2271
|
-
for (
|
|
2271
|
+
for (_ = null, f = e.typeMap.multi[e.kind || "fallback"], c = 0, y = f.length; c < y; c += 1)
|
|
2272
2272
|
if (e.tag.slice(0, f[c].tag.length) === f[c].tag) {
|
|
2273
|
-
|
|
2273
|
+
_ = f[c];
|
|
2274
2274
|
break;
|
|
2275
2275
|
}
|
|
2276
|
-
|
|
2276
|
+
_ || 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");
|
|
2277
2277
|
}
|
|
2278
2278
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || p;
|
|
2279
2279
|
}
|
|
@@ -2297,9 +2297,9 @@ function si(e) {
|
|
|
2297
2297
|
a = e.input.charCodeAt(++e.position);
|
|
2298
2298
|
o.push(e.input.slice(t, e.position));
|
|
2299
2299
|
}
|
|
2300
|
-
a !== 0 &&
|
|
2300
|
+
a !== 0 && Mt(e), Fe.call(en, r) ? en[r](e, r, o) : it(e, 'unknown document directive "' + r + '"');
|
|
2301
2301
|
}
|
|
2302
|
-
if (le(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, le(e, !0, -1)) : i && M(e, "directives end mark is expected"), Ge(e, e.lineIndent - 1,
|
|
2302
|
+
if (le(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, le(e, !0, -1)) : i && M(e, "directives end mark is expected"), Ge(e, e.lineIndent - 1, at, !1, !0), le(e, !0, -1), e.checkLineBreaks && Ga.test(e.input.slice(n, e.position)) && it(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && pt(e)) {
|
|
2303
2303
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, le(e, !0, -1));
|
|
2304
2304
|
return;
|
|
2305
2305
|
}
|
|
@@ -2337,7 +2337,7 @@ function ui(e, n) {
|
|
|
2337
2337
|
var ci = li, di = ui, rr = {
|
|
2338
2338
|
loadAll: ci,
|
|
2339
2339
|
load: di
|
|
2340
|
-
}, or = Object.prototype.toString, ar = Object.prototype.hasOwnProperty,
|
|
2340
|
+
}, or = Object.prototype.toString, ar = Object.prototype.hasOwnProperty, Et = 65279, pi = 9, Ze = 10, fi = 13, mi = 32, gi = 33, yi = 34, Ct = 35, hi = 37, vi = 38, bi = 39, Ci = 42, ir = 44, ki = 45, st = 58, wi = 61, _i = 62, Ii = 63, Ai = 64, sr = 91, lr = 93, Si = 96, ur = 123, xi = 124, cr = 125, ge = {};
|
|
2341
2341
|
ge[0] = "\\0";
|
|
2342
2342
|
ge[7] = "\\a";
|
|
2343
2343
|
ge[8] = "\\b";
|
|
@@ -2393,7 +2393,7 @@ function Mi(e) {
|
|
|
2393
2393
|
}
|
|
2394
2394
|
var Oi = 1, Qe = 2;
|
|
2395
2395
|
function Ei(e) {
|
|
2396
|
-
this.schema = e.schema ||
|
|
2396
|
+
this.schema = e.schema || jt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ue.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = ji(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 === '"' ? Qe : Oi, 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;
|
|
2397
2397
|
}
|
|
2398
2398
|
function rn(e, n) {
|
|
2399
2399
|
for (var t = ue.repeat(" ", n), r = 0, o = -1, i = "", a, s = e.length; r < s; )
|
|
@@ -2402,7 +2402,7 @@ function rn(e, n) {
|
|
|
2402
2402
|
` && (i += t), i += a;
|
|
2403
2403
|
return i;
|
|
2404
2404
|
}
|
|
2405
|
-
function
|
|
2405
|
+
function kt(e, n) {
|
|
2406
2406
|
return `
|
|
2407
2407
|
` + ue.repeat(" ", e.indent * n);
|
|
2408
2408
|
}
|
|
@@ -2413,30 +2413,30 @@ function Fi(e, n) {
|
|
|
2413
2413
|
return !0;
|
|
2414
2414
|
return !1;
|
|
2415
2415
|
}
|
|
2416
|
-
function
|
|
2416
|
+
function lt(e) {
|
|
2417
2417
|
return e === mi || e === pi;
|
|
2418
2418
|
}
|
|
2419
2419
|
function Xe(e) {
|
|
2420
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2420
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Et || 65536 <= e && e <= 1114111;
|
|
2421
2421
|
}
|
|
2422
2422
|
function on(e) {
|
|
2423
|
-
return Xe(e) && e !==
|
|
2423
|
+
return Xe(e) && e !== Et && e !== fi && e !== Ze;
|
|
2424
2424
|
}
|
|
2425
2425
|
function an(e, n, t) {
|
|
2426
|
-
var r = on(e), o = r && !
|
|
2426
|
+
var r = on(e), o = r && !lt(e);
|
|
2427
2427
|
return (
|
|
2428
2428
|
// ns-plain-safe
|
|
2429
2429
|
(t ? (
|
|
2430
2430
|
// c = flow-in
|
|
2431
2431
|
r
|
|
2432
|
-
) : r && e !== ir && e !== sr && e !== lr && e !== ur && e !== cr) && e !==
|
|
2432
|
+
) : r && e !== ir && e !== sr && e !== lr && e !== ur && e !== cr) && e !== Ct && !(n === st && !o) || on(n) && !lt(n) && e === Ct || n === st && o
|
|
2433
2433
|
);
|
|
2434
2434
|
}
|
|
2435
2435
|
function Ni(e) {
|
|
2436
|
-
return Xe(e) && e !==
|
|
2436
|
+
return Xe(e) && e !== Et && !lt(e) && e !== ki && e !== Ii && e !== st && e !== ir && e !== sr && e !== lr && e !== ur && e !== cr && e !== Ct && e !== vi && e !== Ci && e !== gi && e !== xi && e !== wi && e !== _i && e !== bi && e !== yi && e !== hi && e !== Ai && e !== Si;
|
|
2437
2437
|
}
|
|
2438
2438
|
function Ki(e) {
|
|
2439
|
-
return !
|
|
2439
|
+
return !lt(e) && e !== st;
|
|
2440
2440
|
}
|
|
2441
2441
|
function ze(e, n) {
|
|
2442
2442
|
var t = e.charCodeAt(n), r;
|
|
@@ -2446,27 +2446,27 @@ function dr(e) {
|
|
|
2446
2446
|
var n = /^\n* /;
|
|
2447
2447
|
return n.test(e);
|
|
2448
2448
|
}
|
|
2449
|
-
var pr = 1, wt = 2, fr = 3, mr = 4,
|
|
2449
|
+
var pr = 1, wt = 2, fr = 3, mr = 4, Ve = 5;
|
|
2450
2450
|
function qi(e, n, t, r, o, i, a, s) {
|
|
2451
|
-
var l, u = 0, p = null, c = !1, y = !1, f = r !== -1,
|
|
2451
|
+
var l, u = 0, p = null, c = !1, y = !1, f = r !== -1, _ = -1, h = Ni(ze(e, 0)) && Ki(ze(e, e.length - 1));
|
|
2452
2452
|
if (n || a)
|
|
2453
2453
|
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2454
2454
|
if (u = ze(e, l), !Xe(u))
|
|
2455
|
-
return
|
|
2455
|
+
return Ve;
|
|
2456
2456
|
h = h && an(u, p, s), p = u;
|
|
2457
2457
|
}
|
|
2458
2458
|
else {
|
|
2459
2459
|
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2460
2460
|
if (u = ze(e, l), u === Ze)
|
|
2461
2461
|
c = !0, f && (y = y || // Foldable line = too long, and not more-indented.
|
|
2462
|
-
l -
|
|
2462
|
+
l - _ - 1 > r && e[_ + 1] !== " ", _ = l);
|
|
2463
2463
|
else if (!Xe(u))
|
|
2464
|
-
return
|
|
2464
|
+
return Ve;
|
|
2465
2465
|
h = h && an(u, p, s), p = u;
|
|
2466
2466
|
}
|
|
2467
|
-
y = y || f && l -
|
|
2467
|
+
y = y || f && l - _ - 1 > r && e[_ + 1] !== " ";
|
|
2468
2468
|
}
|
|
2469
|
-
return !c && !y ? h && !a && !o(e) ? pr : i === Qe ?
|
|
2469
|
+
return !c && !y ? h && !a && !o(e) ? pr : i === Qe ? Ve : wt : t > 9 && dr(e) ? Ve : a ? i === Qe ? Ve : wt : y ? mr : fr;
|
|
2470
2470
|
}
|
|
2471
2471
|
function Bi(e, n, t, r, o) {
|
|
2472
2472
|
e.dump = function() {
|
|
@@ -2496,7 +2496,7 @@ function Bi(e, n, t, r, o) {
|
|
|
2496
2496
|
return "|" + sn(n, e.indent) + ln(rn(n, i));
|
|
2497
2497
|
case mr:
|
|
2498
2498
|
return ">" + sn(n, e.indent) + ln(rn(Li(n, a), i));
|
|
2499
|
-
case
|
|
2499
|
+
case Ve:
|
|
2500
2500
|
return '"' + Ui(n) + '"';
|
|
2501
2501
|
default:
|
|
2502
2502
|
throw new ye("impossible error: invalid scalar style");
|
|
@@ -2552,16 +2552,16 @@ function Pi(e, n, t) {
|
|
|
2552
2552
|
function cn(e, n, t, r) {
|
|
2553
2553
|
var o = "", i = e.tag, a, s, l;
|
|
2554
2554
|
for (a = 0, s = t.length; a < s; a += 1)
|
|
2555
|
-
l = t[a], e.replacer && (l = e.replacer.call(t, String(a), l)), ($e(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && $e(e, n + 1, null, !0, !0, !1, !0)) && ((!r || o !== "") && (o +=
|
|
2555
|
+
l = t[a], e.replacer && (l = e.replacer.call(t, String(a), l)), ($e(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && $e(e, n + 1, null, !0, !0, !1, !0)) && ((!r || o !== "") && (o += kt(e, n)), e.dump && Ze === e.dump.charCodeAt(0) ? o += "-" : o += "- ", o += e.dump);
|
|
2556
2556
|
e.tag = i, e.dump = o || "[]";
|
|
2557
2557
|
}
|
|
2558
|
-
function
|
|
2558
|
+
function Vi(e, n, t) {
|
|
2559
2559
|
var r = "", o = e.tag, i = Object.keys(t), a, s, l, u, p;
|
|
2560
2560
|
for (a = 0, s = i.length; a < s; a += 1)
|
|
2561
2561
|
p = "", r !== "" && (p += ", "), e.condenseFlow && (p += '"'), l = i[a], u = t[l], e.replacer && (u = e.replacer.call(t, l, u)), $e(e, n, l, !1, !1) && (e.dump.length > 1024 && (p += "? "), p += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), $e(e, n, u, !1, !1) && (p += e.dump, r += p));
|
|
2562
2562
|
e.tag = o, e.dump = "{" + r + "}";
|
|
2563
2563
|
}
|
|
2564
|
-
function
|
|
2564
|
+
function Di(e, n, t, r) {
|
|
2565
2565
|
var o = "", i = e.tag, a = Object.keys(t), s, l, u, p, c, y;
|
|
2566
2566
|
if (e.sortKeys === !0)
|
|
2567
2567
|
a.sort();
|
|
@@ -2570,7 +2570,7 @@ function Vi(e, n, t, r) {
|
|
|
2570
2570
|
else if (e.sortKeys)
|
|
2571
2571
|
throw new ye("sortKeys must be a boolean or a function");
|
|
2572
2572
|
for (s = 0, l = a.length; s < l; s += 1)
|
|
2573
|
-
y = "", (!r || o !== "") && (y +=
|
|
2573
|
+
y = "", (!r || o !== "") && (y += kt(e, n)), u = a[s], p = t[u], e.replacer && (p = e.replacer.call(t, u, p)), $e(e, n + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Ze === e.dump.charCodeAt(0) ? y += "?" : y += "? "), y += e.dump, c && (y += kt(e, n)), $e(e, n + 1, p, !0, c) && (e.dump && Ze === e.dump.charCodeAt(0) ? y += ":" : y += ": ", y += e.dump, o += y));
|
|
2574
2574
|
e.tag = i, e.dump = o || "{}";
|
|
2575
2575
|
}
|
|
2576
2576
|
function dn(e, n, t) {
|
|
@@ -2599,7 +2599,7 @@ function $e(e, n, t, r, o, i, a) {
|
|
|
2599
2599
|
e.dump = "*ref_" + c;
|
|
2600
2600
|
else {
|
|
2601
2601
|
if (p && y && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), s === "[object Object]")
|
|
2602
|
-
r && Object.keys(e.dump).length !== 0 ? (
|
|
2602
|
+
r && Object.keys(e.dump).length !== 0 ? (Di(e, n, e.dump, o), y && (e.dump = "&ref_" + c + e.dump)) : (Vi(e, n, e.dump), y && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2603
2603
|
else if (s === "[object Array]")
|
|
2604
2604
|
r && e.dump.length !== 0 ? (e.noArrayIndent && !a && n > 0 ? cn(e, n - 1, e.dump, o) : cn(e, n, e.dump, o), y && (e.dump = "&ref_" + c + e.dump)) : (Pi(e, n, e.dump), y && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2605
2605
|
else if (s === "[object String]")
|
|
@@ -2617,21 +2617,21 @@ function $e(e, n, t, r, o, i, a) {
|
|
|
2617
2617
|
}
|
|
2618
2618
|
function Ri(e, n) {
|
|
2619
2619
|
var t = [], r = [], o, i;
|
|
2620
|
-
for (
|
|
2620
|
+
for (_t(e, t, r), o = 0, i = r.length; o < i; o += 1)
|
|
2621
2621
|
n.duplicates.push(t[r[o]]);
|
|
2622
2622
|
n.usedDuplicates = new Array(i);
|
|
2623
2623
|
}
|
|
2624
|
-
function
|
|
2624
|
+
function _t(e, n, t) {
|
|
2625
2625
|
var r, o, i;
|
|
2626
2626
|
if (e !== null && typeof e == "object")
|
|
2627
2627
|
if (o = n.indexOf(e), o !== -1)
|
|
2628
2628
|
t.indexOf(o) === -1 && t.push(o);
|
|
2629
2629
|
else if (n.push(e), Array.isArray(e))
|
|
2630
2630
|
for (o = 0, i = e.length; o < i; o += 1)
|
|
2631
|
-
|
|
2631
|
+
_t(e[o], n, t);
|
|
2632
2632
|
else
|
|
2633
2633
|
for (r = Object.keys(e), o = 0, i = r.length; o < i; o += 1)
|
|
2634
|
-
|
|
2634
|
+
_t(e[r[o]], n, t);
|
|
2635
2635
|
}
|
|
2636
2636
|
function Gi(e, n) {
|
|
2637
2637
|
n = n || {};
|
|
@@ -2644,26 +2644,26 @@ function Gi(e, n) {
|
|
|
2644
2644
|
var Hi = Gi, zi = {
|
|
2645
2645
|
dump: Hi
|
|
2646
2646
|
};
|
|
2647
|
-
function
|
|
2647
|
+
function Ft(e, n) {
|
|
2648
2648
|
return function() {
|
|
2649
2649
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2650
2650
|
};
|
|
2651
2651
|
}
|
|
2652
|
-
var Ji = pe, Yi = jn, Wi = Fn, Zi = Ln, Qi = Un, Xi =
|
|
2652
|
+
var Ji = pe, Yi = jn, Wi = Fn, Zi = Ln, Qi = Un, Xi = jt, es = rr.load, ts = rr.loadAll, ns = zi.dump, rs = ye, os = {
|
|
2653
2653
|
binary: Gn,
|
|
2654
2654
|
float: Bn,
|
|
2655
2655
|
map: En,
|
|
2656
2656
|
null: Nn,
|
|
2657
2657
|
pairs: zn,
|
|
2658
2658
|
set: Jn,
|
|
2659
|
-
timestamp:
|
|
2659
|
+
timestamp: Dn,
|
|
2660
2660
|
bool: Kn,
|
|
2661
2661
|
int: qn,
|
|
2662
2662
|
merge: Rn,
|
|
2663
2663
|
omap: Hn,
|
|
2664
2664
|
seq: On,
|
|
2665
2665
|
str: Mn
|
|
2666
|
-
}, as =
|
|
2666
|
+
}, as = Ft("safeLoad", "load"), is = Ft("safeLoadAll", "loadAll"), ss = Ft("safeDump", "dump"), ls = {
|
|
2667
2667
|
Type: Ji,
|
|
2668
2668
|
Schema: Yi,
|
|
2669
2669
|
FAILSAFE_SCHEMA: Wi,
|
|
@@ -2689,14 +2689,14 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
2689
2689
|
}
|
|
2690
2690
|
},
|
|
2691
2691
|
setup(e) {
|
|
2692
|
-
const n = e, t =
|
|
2692
|
+
const n = e, t = A(() => n.yamlRecord);
|
|
2693
2693
|
return (r, o) => {
|
|
2694
2694
|
const i = q("KCodeBlock");
|
|
2695
2695
|
return d(), j("div", us, [
|
|
2696
2696
|
n.yamlRecord ? (d(), P(i, {
|
|
2697
2697
|
key: 0,
|
|
2698
2698
|
id: "yaml-codeblock",
|
|
2699
|
-
code: m(ls).dump(t),
|
|
2699
|
+
code: m(ls).dump(t.value),
|
|
2700
2700
|
language: "yaml",
|
|
2701
2701
|
theme: "dark"
|
|
2702
2702
|
}, null, 8, ["code"])) : z("", !0)
|
|
@@ -2748,7 +2748,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
2748
2748
|
}
|
|
2749
2749
|
},
|
|
2750
2750
|
setup(e) {
|
|
2751
|
-
const n = e, t =
|
|
2751
|
+
const n = e, t = ut(), { i18n: { t: r } } = ce.useI18n(), o = (a) => !!(a.tooltip || t[`${a.key}-label-tooltip`]), i = A(() => {
|
|
2752
2752
|
if (!n.record)
|
|
2753
2753
|
return n.record;
|
|
2754
2754
|
const a = JSON.parse(JSON.stringify(n.record));
|
|
@@ -2762,7 +2762,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
2762
2762
|
"data-testid": `config-card-details-${l}-props`
|
|
2763
2763
|
}, [
|
|
2764
2764
|
l !== "basic" ? (d(), j("div", ps, N(l === "advanced" ? m(r)("baseConfigCard.sections.advanced") : m(r)("baseConfigCard.sections.plugin")), 1)) : z("", !0),
|
|
2765
|
-
(d(!0), j(Ce, null, ve(e.propertyCollections[l], (u) => (d(), P(
|
|
2765
|
+
(d(!0), j(Ce, null, ve(e.propertyCollections[l], (u) => (d(), P(Tt, {
|
|
2766
2766
|
key: u.key,
|
|
2767
2767
|
item: u
|
|
2768
2768
|
}, je({
|
|
@@ -2800,7 +2800,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
2800
2800
|
}, null, 8, ["yaml-record"])) : z("", !0)
|
|
2801
2801
|
], 64));
|
|
2802
2802
|
}
|
|
2803
|
-
}), ms = /* @__PURE__ */
|
|
2803
|
+
}), ms = /* @__PURE__ */ we(fs, [["__scopeId", "data-v-2b74ac63"]]), pn = "24px", gs = (e, n) => {
|
|
2804
2804
|
const t = e.__vccOpts || e;
|
|
2805
2805
|
for (const [r, o] of n)
|
|
2806
2806
|
t[r] = o;
|
|
@@ -2863,7 +2863,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
2863
2863
|
}
|
|
2864
2864
|
},
|
|
2865
2865
|
setup(e) {
|
|
2866
|
-
const n = e, t =
|
|
2866
|
+
const n = e, t = A(() => {
|
|
2867
2867
|
if (typeof n.size == "number" && n.size > 0)
|
|
2868
2868
|
return `${n.size}px`;
|
|
2869
2869
|
if (typeof n.size == "string") {
|
|
@@ -2872,7 +2872,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
2872
2872
|
return `${i}px`;
|
|
2873
2873
|
}
|
|
2874
2874
|
return pn;
|
|
2875
|
-
}), r =
|
|
2875
|
+
}), r = A(() => ({
|
|
2876
2876
|
boxSizing: "border-box",
|
|
2877
2877
|
color: n.color,
|
|
2878
2878
|
display: n.display,
|
|
@@ -2904,7 +2904,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
2904
2904
|
_: 1
|
|
2905
2905
|
}, 8, ["aria-hidden", "style"]));
|
|
2906
2906
|
}
|
|
2907
|
-
}), ks = /* @__PURE__ */ gs(Cs, [["__scopeId", "data-v-0cc5a4d3"]]),
|
|
2907
|
+
}), ks = /* @__PURE__ */ gs(Cs, [["__scopeId", "data-v-0cc5a4d3"]]), ws = { "data-testid": "config-card-title" }, _s = { class: "config-card-actions" }, Is = ["href"], As = {
|
|
2908
2908
|
key: 2,
|
|
2909
2909
|
class: "config-card-details-section"
|
|
2910
2910
|
}, Ss = {
|
|
@@ -2988,7 +2988,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
2988
2988
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
2989
2989
|
setup(e, { emit: n }) {
|
|
2990
2990
|
var t;
|
|
2991
|
-
const r = n, o = e, i =
|
|
2991
|
+
const r = n, o = e, i = ut(), { i18n: { t: a } } = ce.useI18n(), { getMessageFromError: s } = ce.useErrors(), { convertKeyToTitle: l } = ce.useStringHelpers(), { axiosInstance: u } = ce.useAxios({
|
|
2992
2992
|
headers: (t = o.config) == null ? void 0 : t.requestHeaders
|
|
2993
2993
|
}), p = [
|
|
2994
2994
|
{
|
|
@@ -3040,13 +3040,13 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3040
3040
|
// the last property displayed
|
|
3041
3041
|
section: ke.Basic
|
|
3042
3042
|
}
|
|
3043
|
-
},
|
|
3044
|
-
var C,
|
|
3043
|
+
}, _ = F(!1), h = F(!1), S = F(""), b = F({}), w = A(() => {
|
|
3044
|
+
var C, R, K;
|
|
3045
3045
|
if (!b.value)
|
|
3046
3046
|
return [];
|
|
3047
3047
|
const I = [], T = Object.keys(b.value).length;
|
|
3048
3048
|
for (const O in b.value) {
|
|
3049
|
-
const B = (
|
|
3049
|
+
const B = (R = (C = o.configSchema) == null ? void 0 : C[O]) == null ? void 0 : R.order, W = (K = f[O]) == null ? void 0 : K.order;
|
|
3050
3050
|
let ee = T;
|
|
3051
3051
|
(W || W === 0) && (ee = W === -1 ? T + 1 : W), B && (ee = B === -1 ? T + 1 : B), I.push([O, ee]);
|
|
3052
3052
|
}
|
|
@@ -3065,13 +3065,13 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3065
3065
|
section: ne.section ?? ((de == null ? void 0 : de.section) || ke.Advanced)
|
|
3066
3066
|
};
|
|
3067
3067
|
}).filter((O) => !O.hidden && O.key !== o.pluginConfigKey);
|
|
3068
|
-
}), L =
|
|
3069
|
-
var C,
|
|
3068
|
+
}), L = A(() => {
|
|
3069
|
+
var C, R;
|
|
3070
3070
|
if (!b.value || !o.pluginConfigKey)
|
|
3071
3071
|
return [];
|
|
3072
3072
|
const K = b.value[o.pluginConfigKey] || {}, I = Object.keys(K).length, T = [];
|
|
3073
3073
|
for (const O in K) {
|
|
3074
|
-
const B = (
|
|
3074
|
+
const B = (R = (C = o.pluginConfigSchema) == null ? void 0 : C[O]) == null ? void 0 : R.order, W = K[O];
|
|
3075
3075
|
let ee = W != null && W !== "" ? I - 1 : I;
|
|
3076
3076
|
B && (ee = B === -1 ? I + 1 : B), T.push([O, ee]);
|
|
3077
3077
|
}
|
|
@@ -3090,27 +3090,27 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3090
3090
|
section: ke.Plugin
|
|
3091
3091
|
};
|
|
3092
3092
|
}).filter((O) => !O.hidden);
|
|
3093
|
-
}), v =
|
|
3094
|
-
var C,
|
|
3093
|
+
}), v = A(() => {
|
|
3094
|
+
var C, R, K, I;
|
|
3095
3095
|
return {
|
|
3096
|
-
basic: (C =
|
|
3097
|
-
advanced: (
|
|
3098
|
-
plugin: (I = L.value) == null ? void 0 : I.concat((K =
|
|
3096
|
+
basic: (C = w.value) == null ? void 0 : C.filter((T) => T.section === ke.Basic),
|
|
3097
|
+
advanced: (R = w.value) == null ? void 0 : R.filter((T) => T.section === ke.Advanced),
|
|
3098
|
+
plugin: (I = L.value) == null ? void 0 : I.concat((K = w.value) == null ? void 0 : K.filter((T) => T.section === ke.Plugin))
|
|
3099
3099
|
};
|
|
3100
|
-
}),
|
|
3100
|
+
}), x = A(() => {
|
|
3101
3101
|
const C = [];
|
|
3102
3102
|
return v.value.basic.length && C.push("basic"), v.value.advanced.length && C.push("advanced"), v.value.plugin.length && C.push("plugin"), C;
|
|
3103
|
-
}), V = (C) => !!(C.tooltip || i[`${C.key}-label-tooltip`]), re =
|
|
3104
|
-
var C,
|
|
3103
|
+
}), V = (C) => !!(C.tooltip || i[`${C.key}-label-tooltip`]), re = A(() => {
|
|
3104
|
+
var C, R;
|
|
3105
3105
|
let K = `${o.config.apiBaseUrl}${o.fetchUrl}`;
|
|
3106
|
-
return o.config.app === "konnect" ? K = K.replace(/{controlPlaneId}/gi, ((C = o.config) == null ? void 0 : C.controlPlaneId) || "") : o.config.app === "kongManager" && (K = K.replace(/\/{workspace}/gi, (
|
|
3107
|
-
}),
|
|
3106
|
+
return o.config.app === "konnect" ? K = K.replace(/{controlPlaneId}/gi, ((C = o.config) == null ? void 0 : C.controlPlaneId) || "") : o.config.app === "kongManager" && (K = K.replace(/\/{workspace}/gi, (R = o.config) != null && R.workspace ? `/${o.config.workspace}` : "")), K = K.replace(/{id}/gi, o.config.entityId), K;
|
|
3107
|
+
}), G = (C) => {
|
|
3108
3108
|
b.value && C(JSON.stringify(b.value)) ? r("copy:success", b.value) : r("copy:error");
|
|
3109
3109
|
};
|
|
3110
|
-
return Te(
|
|
3110
|
+
return Te(_, (C) => {
|
|
3111
3111
|
r("loading", C);
|
|
3112
|
-
}, { immediate: !0 }),
|
|
3113
|
-
h.value = !1,
|
|
3112
|
+
}, { immediate: !0 }), ct(async () => {
|
|
3113
|
+
h.value = !1, _.value = !0;
|
|
3114
3114
|
try {
|
|
3115
3115
|
const { data: C } = await u.get(re.value);
|
|
3116
3116
|
if (o.dataKey)
|
|
@@ -3120,20 +3120,20 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3120
3120
|
throw new Error(a("errors.dataKeyUndefined", { dataKey: o.dataKey }));
|
|
3121
3121
|
else
|
|
3122
3122
|
b.value = { ...C };
|
|
3123
|
-
Object.keys(o.configSchema).filter((
|
|
3124
|
-
b.value && typeof b.value[
|
|
3123
|
+
Object.keys(o.configSchema).filter((R) => o.configSchema[R].forceShow).forEach((R) => {
|
|
3124
|
+
b.value && typeof b.value[R] > "u" && (b.value[R] = null);
|
|
3125
3125
|
}), r("fetch:success", C);
|
|
3126
3126
|
} catch (C) {
|
|
3127
|
-
const
|
|
3128
|
-
|
|
3127
|
+
const R = s(C);
|
|
3128
|
+
S.value = R.startsWith("code") ? a("baseConfigCard.errors.load") : R, h.value = !0, r("fetch:error", C);
|
|
3129
3129
|
} finally {
|
|
3130
|
-
|
|
3130
|
+
_.value = !1;
|
|
3131
3131
|
}
|
|
3132
|
-
}), (C,
|
|
3132
|
+
}), (C, R) => {
|
|
3133
3133
|
const K = q("KLabel"), I = q("KSelect"), T = q("KButton"), O = q("KClipboardProvider"), B = q("KSkeleton"), W = q("KEmptyState"), ee = q("KCard");
|
|
3134
3134
|
return d(), P(ee, { class: "kong-ui-entity-base-config-card" }, je({
|
|
3135
3135
|
actions: g(() => [
|
|
3136
|
-
D("div",
|
|
3136
|
+
D("div", _s, [
|
|
3137
3137
|
X(C.$slots, "actions", {}, void 0, !0),
|
|
3138
3138
|
e.config.jsonYamlEnabled ? (d(), P(K, {
|
|
3139
3139
|
key: 0,
|
|
@@ -3147,6 +3147,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3147
3147
|
})) : z("", !0),
|
|
3148
3148
|
e.config.jsonYamlEnabled ? (d(), P(I, {
|
|
3149
3149
|
key: 1,
|
|
3150
|
+
appearance: "select",
|
|
3150
3151
|
"data-testid": "select-config-format",
|
|
3151
3152
|
items: p,
|
|
3152
3153
|
onChange: y
|
|
@@ -3170,11 +3171,11 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3170
3171
|
})) : z("", !0),
|
|
3171
3172
|
e.config.jsonYamlEnabled ? z("", !0) : (d(), P(O, { key: 3 }, {
|
|
3172
3173
|
default: g(({ copyToClipboard: te }) => [
|
|
3173
|
-
!
|
|
3174
|
+
!_.value && !h.value ? (d(), P(T, {
|
|
3174
3175
|
key: 0,
|
|
3175
3176
|
appearance: "tertiary",
|
|
3176
3177
|
"data-testid": "json-copy-button",
|
|
3177
|
-
onClick: (ne) =>
|
|
3178
|
+
onClick: (ne) => G(te)
|
|
3178
3179
|
}, {
|
|
3179
3180
|
default: g(() => [
|
|
3180
3181
|
Z(N(m(a)("baseConfigCard.actions.copy")), 1)
|
|
@@ -3187,7 +3188,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3187
3188
|
])
|
|
3188
3189
|
]),
|
|
3189
3190
|
default: g(() => [
|
|
3190
|
-
|
|
3191
|
+
_.value ? (d(), P(B, {
|
|
3191
3192
|
key: 0,
|
|
3192
3193
|
"data-testid": "config-card-loader",
|
|
3193
3194
|
"table-columns": 2,
|
|
@@ -3198,7 +3199,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3198
3199
|
"is-error": ""
|
|
3199
3200
|
}, {
|
|
3200
3201
|
message: g(() => [
|
|
3201
|
-
D("h3", null, N(
|
|
3202
|
+
D("h3", null, N(S.value), 1)
|
|
3202
3203
|
]),
|
|
3203
3204
|
_: 1
|
|
3204
3205
|
})) : z("", !0),
|
|
@@ -3207,7 +3208,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3207
3208
|
config: e.config,
|
|
3208
3209
|
"fetcher-url": re.value,
|
|
3209
3210
|
format: c.value,
|
|
3210
|
-
"prop-list-types":
|
|
3211
|
+
"prop-list-types": x.value,
|
|
3211
3212
|
"property-collections": v.value,
|
|
3212
3213
|
record: b.value
|
|
3213
3214
|
}, je({ _: 2 }, [
|
|
@@ -3222,13 +3223,13 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3222
3223
|
}))
|
|
3223
3224
|
]), 1032, ["config", "fetcher-url", "format", "prop-list-types", "property-collections", "record"])
|
|
3224
3225
|
])) : (d(), j("div", Ss, [
|
|
3225
|
-
(d(!0), j(Ce, null, ve(
|
|
3226
|
+
(d(!0), j(Ce, null, ve(x.value, (te) => (d(), j("div", {
|
|
3226
3227
|
key: `config-card-details-${te}-props`,
|
|
3227
3228
|
class: Ee(`config-card-details-${te}-props`),
|
|
3228
3229
|
"data-testid": `config-card-details-${te}-props`
|
|
3229
3230
|
}, [
|
|
3230
3231
|
te !== "basic" ? (d(), j("div", Ts, N(te === "advanced" ? m(a)("baseConfigCard.sections.advanced") : m(a)("baseConfigCard.sections.plugin")), 1)) : z("", !0),
|
|
3231
|
-
(d(!0), j(Ce, null, ve(v.value[te], (ne) => (d(), P(
|
|
3232
|
+
(d(!0), j(Ce, null, ve(v.value[te], (ne) => (d(), P(Tt, {
|
|
3232
3233
|
key: ne.key,
|
|
3233
3234
|
item: ne
|
|
3234
3235
|
}, je({
|
|
@@ -3259,7 +3260,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3259
3260
|
e.hideTitle ? void 0 : {
|
|
3260
3261
|
name: "title",
|
|
3261
3262
|
fn: g(() => [
|
|
3262
|
-
D("div",
|
|
3263
|
+
D("div", ws, [
|
|
3263
3264
|
X(C.$slots, "title", {}, () => [
|
|
3264
3265
|
Z(N(m(a)("baseConfigCard.title")), 1)
|
|
3265
3266
|
], !0)
|
|
@@ -3270,7 +3271,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3270
3271
|
]), 1024);
|
|
3271
3272
|
};
|
|
3272
3273
|
}
|
|
3273
|
-
}), js = /* @__PURE__ */
|
|
3274
|
+
}), js = /* @__PURE__ */ we($s, [["__scopeId", "data-v-068b819b"]]), Ms = {
|
|
3274
3275
|
class: "form-actions",
|
|
3275
3276
|
"data-testid": "form-actions"
|
|
3276
3277
|
}, Os = { key: 0 }, Es = /* @__PURE__ */ ae({
|
|
@@ -3328,19 +3329,19 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3328
3329
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3329
3330
|
setup(e, { emit: n }) {
|
|
3330
3331
|
var t;
|
|
3331
|
-
const r = n, o = e, i =
|
|
3332
|
+
const r = n, o = e, i = It(), { i18n: { t: a } } = ce.useI18n(), { getMessageFromError: s } = ce.useErrors(), { axiosInstance: l } = ce.useAxios({
|
|
3332
3333
|
headers: (t = o.config) == null ? void 0 : t.requestHeaders
|
|
3333
|
-
}), u = F(!1), p = F(!1), c = F(""), y =
|
|
3334
|
-
var v,
|
|
3334
|
+
}), u = F(!1), p = F(!1), c = F(""), y = A(() => o.canSubmit === !1 || o.isReadonly), f = F(!1), _ = A(() => {
|
|
3335
|
+
var v, x;
|
|
3335
3336
|
let V = `${o.config.apiBaseUrl}${o.fetchUrl}`;
|
|
3336
|
-
return o.config.app === "konnect" ? V = V.replace(/{controlPlaneId}/gi, ((v = o.config) == null ? void 0 : v.controlPlaneId) || "") : o.config.app === "kongManager" && (V = V.replace(/\/{workspace}/gi, (
|
|
3337
|
+
return o.config.app === "konnect" ? V = V.replace(/{controlPlaneId}/gi, ((v = o.config) == null ? void 0 : v.controlPlaneId) || "") : o.config.app === "kongManager" && (V = V.replace(/\/{workspace}/gi, (x = o.config) != null && x.workspace ? `/${o.config.workspace}` : "")), o.editId ? (V = V.replace(/{id}/gi, o.editId), V) : (V = V.replace(/\/{id}/gi, ""), V);
|
|
3337
3338
|
}), h = () => {
|
|
3338
3339
|
f.value = !f.value;
|
|
3339
|
-
},
|
|
3340
|
+
}, S = () => {
|
|
3340
3341
|
o.config.cancelRoute ? i.push(o.config.cancelRoute) : b();
|
|
3341
3342
|
}, b = () => {
|
|
3342
3343
|
r("cancel");
|
|
3343
|
-
},
|
|
3344
|
+
}, w = () => {
|
|
3344
3345
|
y.value || r("submit");
|
|
3345
3346
|
}, L = F([
|
|
3346
3347
|
{
|
|
@@ -3354,20 +3355,20 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3354
3355
|
]);
|
|
3355
3356
|
return Te(() => u.value, (v) => {
|
|
3356
3357
|
r("loading", v);
|
|
3357
|
-
}, { immediate: !0 }),
|
|
3358
|
+
}, { immediate: !0 }), ct(async () => {
|
|
3358
3359
|
if (o.editId)
|
|
3359
3360
|
try {
|
|
3360
3361
|
p.value = !1, u.value = !0;
|
|
3361
|
-
const { data: v } = await l.get(
|
|
3362
|
+
const { data: v } = await l.get(_.value);
|
|
3362
3363
|
r("fetch:success", v);
|
|
3363
3364
|
} catch (v) {
|
|
3364
|
-
const
|
|
3365
|
-
c.value =
|
|
3365
|
+
const x = s(v);
|
|
3366
|
+
c.value = x.startsWith("code") ? a("baseForm.errors.edit") : x, p.value = !0, r("fetch:error", v);
|
|
3366
3367
|
} finally {
|
|
3367
3368
|
u.value = !1;
|
|
3368
3369
|
}
|
|
3369
|
-
}), (v,
|
|
3370
|
-
const V = q("KSkeleton"), re = q("KEmptyState"),
|
|
3370
|
+
}), (v, x) => {
|
|
3371
|
+
const V = q("KSkeleton"), re = q("KEmptyState"), G = q("KAlert"), C = q("KButton"), R = q("KTabs"), K = q("KSlideout"), I = q("KCard");
|
|
3371
3372
|
return d(), P(I, { class: "kong-ui-entity-base-form" }, {
|
|
3372
3373
|
default: g(() => [
|
|
3373
3374
|
u.value ? (d(), P(V, {
|
|
@@ -3377,7 +3378,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3377
3378
|
key: 1,
|
|
3378
3379
|
"cta-text": m(a)("baseForm.actions.back"),
|
|
3379
3380
|
"data-testid": "form-fetch-error",
|
|
3380
|
-
"handle-click":
|
|
3381
|
+
"handle-click": S,
|
|
3381
3382
|
"is-error": !0
|
|
3382
3383
|
}, {
|
|
3383
3384
|
message: g(() => [
|
|
@@ -3388,10 +3389,10 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3388
3389
|
key: 2,
|
|
3389
3390
|
"data-testid": "form-content",
|
|
3390
3391
|
onReset: rt(b, ["prevent"]),
|
|
3391
|
-
onSubmit: rt(
|
|
3392
|
+
onSubmit: rt(w, ["prevent"])
|
|
3392
3393
|
}, [
|
|
3393
3394
|
X(v.$slots, "default", {}, void 0, !0),
|
|
3394
|
-
e.errorMessage ? (d(), P(
|
|
3395
|
+
e.errorMessage ? (d(), P(G, {
|
|
3395
3396
|
key: 0,
|
|
3396
3397
|
"alert-message": e.errorMessage,
|
|
3397
3398
|
appearance: "danger",
|
|
@@ -3403,7 +3404,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3403
3404
|
E(C, {
|
|
3404
3405
|
appearance: "tertiary",
|
|
3405
3406
|
"data-testid": "form-view-configuration",
|
|
3406
|
-
onClick:
|
|
3407
|
+
onClick: x[0] || (x[0] = (T) => h())
|
|
3407
3408
|
}, {
|
|
3408
3409
|
default: g(() => [
|
|
3409
3410
|
Z(N(m(a)("baseForm.actions.viewConfiguration")), 1)
|
|
@@ -3443,18 +3444,18 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3443
3444
|
"is-visible": f.value,
|
|
3444
3445
|
"prevent-close-on-blur": "",
|
|
3445
3446
|
title: m(a)("baseForm.configuration.title"),
|
|
3446
|
-
onClose:
|
|
3447
|
+
onClose: x[1] || (x[1] = (T) => h())
|
|
3447
3448
|
}, {
|
|
3448
3449
|
default: g(() => [
|
|
3449
3450
|
D("div", null, N(m(a)("baseForm.configuration.message")), 1),
|
|
3450
|
-
E(
|
|
3451
|
+
E(R, {
|
|
3451
3452
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3452
3453
|
tabs: L.value
|
|
3453
3454
|
}, {
|
|
3454
3455
|
json: g(() => [
|
|
3455
3456
|
E(xn, {
|
|
3456
3457
|
config: e.config,
|
|
3457
|
-
"fetcher-url":
|
|
3458
|
+
"fetcher-url": _.value,
|
|
3458
3459
|
"json-record": o.formFields,
|
|
3459
3460
|
"request-method": o.editId ? "put" : "post"
|
|
3460
3461
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
@@ -3474,7 +3475,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3474
3475
|
});
|
|
3475
3476
|
};
|
|
3476
3477
|
}
|
|
3477
|
-
}), Fs = /* @__PURE__ */
|
|
3478
|
+
}), Fs = /* @__PURE__ */ we(Es, [["__scopeId", "data-v-4ef70725"]]), Ns = {
|
|
3478
3479
|
key: 0,
|
|
3479
3480
|
"data-testid": "first-col"
|
|
3480
3481
|
}, Ks = /* @__PURE__ */ ae({
|
|
@@ -3490,43 +3491,43 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3490
3491
|
}
|
|
3491
3492
|
},
|
|
3492
3493
|
setup(e) {
|
|
3493
|
-
const n = e, t =
|
|
3494
|
+
const n = e, t = A(() => {
|
|
3494
3495
|
var h;
|
|
3495
3496
|
return ((h = n.rowEl) == null ? void 0 : h.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3496
|
-
}), r =
|
|
3497
|
+
}), r = A(() => {
|
|
3497
3498
|
var h;
|
|
3498
3499
|
return ((h = t.value) == null ? void 0 : h.querySelector('[data-testid="first-col"]')) || null;
|
|
3499
|
-
}), o =
|
|
3500
|
-
var h,
|
|
3500
|
+
}), o = A(() => {
|
|
3501
|
+
var h, S;
|
|
3501
3502
|
const b = (h = n.rowEl) == null ? void 0 : h.querySelectorAll("td");
|
|
3502
|
-
return b ? ((
|
|
3503
|
+
return b ? ((S = b[0]) == null ? void 0 : S.getAttribute("data-testid")) === n.keyName : !1;
|
|
3503
3504
|
});
|
|
3504
3505
|
let i;
|
|
3505
3506
|
const a = () => {
|
|
3506
3507
|
i && (i.disconnect(), i = void 0);
|
|
3507
3508
|
}, s = () => {
|
|
3508
|
-
var h,
|
|
3509
|
-
u.value = ((h = r.value) == null ? void 0 : h.getBoundingClientRect().width) || 0, p.value = ((
|
|
3510
|
-
}, l = F({}), u = F(0), p = F(0), c = F(""), y =
|
|
3509
|
+
var h, S, b;
|
|
3510
|
+
u.value = ((h = r.value) == null ? void 0 : h.getBoundingClientRect().width) || 0, p.value = ((S = t.value) == null ? void 0 : S.clientWidth) || 0, c.value = ((b = l.value) == null ? void 0 : b.innerText) || "";
|
|
3511
|
+
}, l = F({}), u = F(0), p = F(0), c = F(""), y = A(() => [r.value, t.value]), f = Te(
|
|
3511
3512
|
y,
|
|
3512
3513
|
(h) => {
|
|
3513
3514
|
if (o.value && (a(), "ResizeObserver" in window && window)) {
|
|
3514
|
-
i = new ResizeObserver((
|
|
3515
|
+
i = new ResizeObserver((S) => {
|
|
3515
3516
|
window.requestAnimationFrame(() => {
|
|
3516
|
-
!Array.isArray(
|
|
3517
|
+
!Array.isArray(S) || !S.length || s();
|
|
3517
3518
|
});
|
|
3518
3519
|
});
|
|
3519
|
-
for (const
|
|
3520
|
-
|
|
3520
|
+
for (const S of h)
|
|
3521
|
+
S && i.observe(S);
|
|
3521
3522
|
}
|
|
3522
3523
|
},
|
|
3523
3524
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3524
|
-
),
|
|
3525
|
-
return
|
|
3525
|
+
), _ = A(() => o.value ? u.value > p.value : !1);
|
|
3526
|
+
return wr(() => {
|
|
3526
3527
|
s();
|
|
3527
|
-
}),
|
|
3528
|
+
}), _r(() => {
|
|
3528
3529
|
f();
|
|
3529
|
-
}), (h,
|
|
3530
|
+
}), (h, S) => {
|
|
3530
3531
|
const b = q("KTooltip");
|
|
3531
3532
|
return d(), j("span", {
|
|
3532
3533
|
ref_key: "contentRef",
|
|
@@ -3535,7 +3536,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3535
3536
|
}, [
|
|
3536
3537
|
o.value ? (d(), j("span", Ns, [
|
|
3537
3538
|
E(b, {
|
|
3538
|
-
label:
|
|
3539
|
+
label: _.value ? c.value : "",
|
|
3539
3540
|
"max-width": "300",
|
|
3540
3541
|
placement: "bottomStart"
|
|
3541
3542
|
}, {
|
|
@@ -3548,7 +3549,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3548
3549
|
], 512);
|
|
3549
3550
|
};
|
|
3550
3551
|
}
|
|
3551
|
-
}), qs = /* @__PURE__ */
|
|
3552
|
+
}), qs = /* @__PURE__ */ we(Ks, [["__scopeId", "data-v-e42a20c9"]]), Bs = { class: "toolbar-container" }, Ls = {
|
|
3552
3553
|
key: 0,
|
|
3553
3554
|
class: "toolbar-button-container"
|
|
3554
3555
|
}, Us = ["data-testid"], Ps = /* @__PURE__ */ ae({
|
|
@@ -3661,72 +3662,72 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3661
3662
|
},
|
|
3662
3663
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3663
3664
|
setup(e, { emit: n }) {
|
|
3664
|
-
const t = e, r = n, { i18n: { t: o } } = ce.useI18n(), i =
|
|
3665
|
-
var
|
|
3665
|
+
const t = e, r = n, { i18n: { t: o } } = ce.useI18n(), i = A(() => {
|
|
3666
|
+
var x, V;
|
|
3666
3667
|
return typeof t.errorMessage == "string" ? {
|
|
3667
3668
|
hasError: !!t.errorMessage,
|
|
3668
3669
|
title: t.errorMessage,
|
|
3669
3670
|
message: void 0
|
|
3670
3671
|
} : {
|
|
3671
3672
|
hasError: !!t.errorMessage,
|
|
3672
|
-
title: (
|
|
3673
|
+
title: (x = t.errorMessage) == null ? void 0 : x.title,
|
|
3673
3674
|
message: (V = t.errorMessage) == null ? void 0 : V.message
|
|
3674
3675
|
};
|
|
3675
|
-
}), a =
|
|
3676
|
-
const
|
|
3676
|
+
}), a = A(() => t.cacheIdentifier || t.preferencesStorageKey), s = (x) => x.hasData || !!t.query, l = A(() => {
|
|
3677
|
+
const x = [];
|
|
3677
3678
|
return Object.keys(t.tableHeaders).forEach((V) => {
|
|
3678
3679
|
const re = t.tableHeaders[V];
|
|
3679
|
-
|
|
3680
|
+
x.push({
|
|
3680
3681
|
label: re.label ?? V,
|
|
3681
3682
|
key: V,
|
|
3682
3683
|
sortable: re.sortable ?? !1
|
|
3683
3684
|
});
|
|
3684
|
-
}), t.enableEntityActions &&
|
|
3685
|
+
}), t.enableEntityActions && x.push({
|
|
3685
3686
|
key: "actions",
|
|
3686
3687
|
hideLabel: !0
|
|
3687
|
-
}),
|
|
3688
|
-
}), u = (
|
|
3689
|
-
"data-rowid":
|
|
3690
|
-
"data-testid":
|
|
3691
|
-
...t.rowAttributes(
|
|
3692
|
-
}), p = F({}), c = (
|
|
3688
|
+
}), x;
|
|
3689
|
+
}), u = (x) => ({
|
|
3690
|
+
"data-rowid": x.id,
|
|
3691
|
+
"data-testid": x.name,
|
|
3692
|
+
...t.rowAttributes(x)
|
|
3693
|
+
}), p = F({}), c = (x) => {
|
|
3693
3694
|
var V;
|
|
3694
|
-
return (V = p.value) == null ? void 0 : V.$el.querySelector(`[data-rowid="${
|
|
3695
|
-
}, y = (
|
|
3695
|
+
return (V = p.value) == null ? void 0 : V.$el.querySelector(`[data-rowid="${x.id}"]`);
|
|
3696
|
+
}, y = (x) => {
|
|
3696
3697
|
const V = {
|
|
3697
|
-
"data-testid":
|
|
3698
|
-
...t.cellAttributes(
|
|
3698
|
+
"data-testid": x.headerKey,
|
|
3699
|
+
...t.cellAttributes(x)
|
|
3699
3700
|
};
|
|
3700
|
-
return
|
|
3701
|
+
return x.colIndex === 0 && (V.style = {
|
|
3701
3702
|
maxWidth: "250px",
|
|
3702
3703
|
overflowX: "hidden",
|
|
3703
3704
|
textOverflow: "ellipsis"
|
|
3704
3705
|
}), V;
|
|
3705
3706
|
}, f = () => {
|
|
3706
|
-
r("empty-state-cta-clicked"),
|
|
3707
|
-
},
|
|
3707
|
+
r("empty-state-cta-clicked"), _();
|
|
3708
|
+
}, _ = () => {
|
|
3708
3709
|
r("clear-search-input");
|
|
3709
|
-
}, h =
|
|
3710
|
+
}, h = A(() => t.disableRowClick ? void 0 : (x, V) => {
|
|
3710
3711
|
r("click:row", V);
|
|
3711
|
-
}),
|
|
3712
|
-
r("sort",
|
|
3713
|
-
}, { setTablePreferences: b, getTablePreferences:
|
|
3714
|
-
const
|
|
3712
|
+
}), S = (x) => {
|
|
3713
|
+
r("sort", x);
|
|
3714
|
+
}, { setTablePreferences: b, getTablePreferences: w } = Or(), L = A(() => {
|
|
3715
|
+
const x = w(t.preferencesStorageKey);
|
|
3715
3716
|
return {
|
|
3716
3717
|
...t.initialFetcherParams,
|
|
3717
|
-
...
|
|
3718
|
+
...x
|
|
3718
3719
|
};
|
|
3719
|
-
}), v = (
|
|
3720
|
-
t.preferencesStorageKey && b(t.preferencesStorageKey,
|
|
3720
|
+
}), v = (x) => {
|
|
3721
|
+
t.preferencesStorageKey && b(t.preferencesStorageKey, x);
|
|
3721
3722
|
};
|
|
3722
|
-
return (
|
|
3723
|
-
const re = q("KIcon"),
|
|
3723
|
+
return (x, V) => {
|
|
3724
|
+
const re = q("KIcon"), G = q("KButton"), C = q("KDropdown"), R = q("KTable"), K = q("KCard");
|
|
3724
3725
|
return d(), P(K, {
|
|
3725
3726
|
class: "kong-ui-entity-base-table",
|
|
3726
3727
|
title: e.title
|
|
3727
3728
|
}, {
|
|
3728
3729
|
default: g(() => [
|
|
3729
|
-
E(
|
|
3730
|
+
E(R, {
|
|
3730
3731
|
ref_key: "tableRefs",
|
|
3731
3732
|
ref: p,
|
|
3732
3733
|
"cache-identifier": a.value,
|
|
@@ -3755,14 +3756,14 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3755
3756
|
"search-input": e.query,
|
|
3756
3757
|
onKtableEmptyStateCtaClicked: f,
|
|
3757
3758
|
"onRow:click": h.value,
|
|
3758
|
-
onSort: V[0] || (V[0] = (I) =>
|
|
3759
|
+
onSort: V[0] || (V[0] = (I) => S(I)),
|
|
3759
3760
|
"onUpdate:tablePreferences": v
|
|
3760
3761
|
}, je({
|
|
3761
3762
|
toolbar: g(({ state: I }) => [
|
|
3762
3763
|
Je(D("div", Bs, [
|
|
3763
|
-
X(
|
|
3764
|
-
|
|
3765
|
-
X(
|
|
3764
|
+
X(x.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3765
|
+
x.$slots["toolbar-button"] ? (d(), j("div", Ls, [
|
|
3766
|
+
X(x.$slots, "toolbar-button", {}, void 0, !0)
|
|
3766
3767
|
])) : z("", !0)
|
|
3767
3768
|
], 512), [
|
|
3768
3769
|
[Ye, s(I)]
|
|
@@ -3778,14 +3779,14 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3778
3779
|
width: e.dropdownMenuWidth
|
|
3779
3780
|
}, {
|
|
3780
3781
|
items: g(() => [
|
|
3781
|
-
X(
|
|
3782
|
+
X(x.$slots, "actions", {
|
|
3782
3783
|
row: I,
|
|
3783
3784
|
rowKey: T,
|
|
3784
3785
|
rowValue: O
|
|
3785
3786
|
}, void 0, !0)
|
|
3786
3787
|
]),
|
|
3787
3788
|
default: g(() => [
|
|
3788
|
-
E(
|
|
3789
|
+
E(G, {
|
|
3789
3790
|
class: "actions-trigger",
|
|
3790
3791
|
"data-testid": "overflow-actions-button",
|
|
3791
3792
|
size: "small"
|
|
@@ -3814,7 +3815,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3814
3815
|
"row-el": c(O)
|
|
3815
3816
|
}, {
|
|
3816
3817
|
default: g(() => [
|
|
3817
|
-
X(
|
|
3818
|
+
X(x.$slots, T, {
|
|
3818
3819
|
row: O,
|
|
3819
3820
|
rowKey: B,
|
|
3820
3821
|
rowValue: W
|
|
@@ -3832,7 +3833,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3832
3833
|
}, 8, ["title"]);
|
|
3833
3834
|
};
|
|
3834
3835
|
}
|
|
3835
|
-
}),
|
|
3836
|
+
}), Vs = /* @__PURE__ */ we(Ps, [["__scopeId", "data-v-57b5a97b"]]), Ds = {
|
|
3836
3837
|
key: 0,
|
|
3837
3838
|
class: "kong-ui-entity-delete-error"
|
|
3838
3839
|
}, Rs = {
|
|
@@ -3877,7 +3878,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3877
3878
|
},
|
|
3878
3879
|
emits: ["cancel", "proceed"],
|
|
3879
3880
|
setup(e, { emit: n }) {
|
|
3880
|
-
const { i18nT: t } = ce.useI18n(), r = e, o = n, i =
|
|
3881
|
+
const { i18nT: t } = ce.useI18n(), r = e, o = n, i = A(() => r.needConfirm ? r.entityName : ""), a = () => {
|
|
3881
3882
|
o("cancel");
|
|
3882
3883
|
}, s = () => {
|
|
3883
3884
|
o("proceed");
|
|
@@ -3896,7 +3897,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3896
3897
|
onProceed: s
|
|
3897
3898
|
}, {
|
|
3898
3899
|
"body-content": g(() => [
|
|
3899
|
-
e.error ? (d(), j("div",
|
|
3900
|
+
e.error ? (d(), j("div", Ds, [
|
|
3900
3901
|
E(p, { appearance: "danger" }, {
|
|
3901
3902
|
alertMessage: g(() => [
|
|
3902
3903
|
Z(N(e.error), 1)
|
|
@@ -3932,7 +3933,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3932
3933
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3933
3934
|
};
|
|
3934
3935
|
}
|
|
3935
|
-
}), Hs = /* @__PURE__ */
|
|
3936
|
+
}), Hs = /* @__PURE__ */ we(Gs, [["__scopeId", "data-v-1c9a2a07"]]), zs = {
|
|
3936
3937
|
fill: "none",
|
|
3937
3938
|
height: "20",
|
|
3938
3939
|
viewBox: "0 0 20 20",
|
|
@@ -3994,21 +3995,21 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3994
3995
|
},
|
|
3995
3996
|
emits: ["update:modelValue"],
|
|
3996
3997
|
setup(e, { emit: n }) {
|
|
3997
|
-
const { i18n: { t } } = ce.useI18n(), r = e, o = n, i = F(!1), a = F({}), s =
|
|
3998
|
+
const { i18n: { t } } = ce.useI18n(), r = e, o = n, i = F(!1), a = F({}), s = A(() => {
|
|
3998
3999
|
const b = [];
|
|
3999
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
4000
|
-
|
|
4000
|
+
return new URLSearchParams(r.modelValue).forEach((w, L) => {
|
|
4001
|
+
w !== "" && b.push(L);
|
|
4001
4002
|
}), b;
|
|
4002
|
-
}), l =
|
|
4003
|
+
}), l = A(() => {
|
|
4003
4004
|
const b = r.config.fields;
|
|
4004
|
-
return Object.keys(b).filter((
|
|
4005
|
-
label: b[
|
|
4006
|
-
value:
|
|
4005
|
+
return Object.keys(b).filter((w) => b[w].searchable).map((w) => ({
|
|
4006
|
+
label: b[w].label || w,
|
|
4007
|
+
value: w
|
|
4007
4008
|
}));
|
|
4008
4009
|
});
|
|
4009
4010
|
Te(() => r.modelValue, (b) => {
|
|
4010
|
-
a.value = {}, new URLSearchParams(b).forEach((
|
|
4011
|
-
a.value[L] =
|
|
4011
|
+
a.value = {}, new URLSearchParams(b).forEach((w, L) => {
|
|
4012
|
+
a.value[L] = w;
|
|
4012
4013
|
});
|
|
4013
4014
|
});
|
|
4014
4015
|
const u = () => {
|
|
@@ -4016,27 +4017,27 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4016
4017
|
}, p = (b) => {
|
|
4017
4018
|
o("update:modelValue", b);
|
|
4018
4019
|
}, c = (b) => `filter-${b}`, y = (b) => {
|
|
4019
|
-
var
|
|
4020
|
-
return (((L = (
|
|
4020
|
+
var w, L;
|
|
4021
|
+
return (((L = (w = r.config.schema) == null ? void 0 : w[b]) == null ? void 0 : L.values) ?? []).map((v) => ({
|
|
4021
4022
|
value: v,
|
|
4022
4023
|
label: v
|
|
4023
4024
|
}));
|
|
4024
4025
|
}, f = (b) => {
|
|
4025
|
-
var
|
|
4026
|
-
return ((L = (
|
|
4027
|
-
},
|
|
4026
|
+
var w, L;
|
|
4027
|
+
return ((L = (w = r.config.schema) == null ? void 0 : w[b]) == null ? void 0 : L.type) ?? "text";
|
|
4028
|
+
}, _ = (b) => {
|
|
4028
4029
|
a.value = {
|
|
4029
4030
|
...a.value,
|
|
4030
4031
|
[b]: ""
|
|
4031
|
-
},
|
|
4032
|
+
}, S();
|
|
4032
4033
|
}, h = () => {
|
|
4033
|
-
a.value = {},
|
|
4034
|
-
},
|
|
4035
|
-
const
|
|
4036
|
-
b && (i.value = !1), o("update:modelValue", new URLSearchParams(
|
|
4034
|
+
a.value = {}, S(!0);
|
|
4035
|
+
}, S = (b = !1) => {
|
|
4036
|
+
const w = Object.keys(a.value).reduce((L, v) => (a.value[v] && (L[v] = `${a.value[v]}`), L), {});
|
|
4037
|
+
b && (i.value = !1), o("update:modelValue", new URLSearchParams(w).toString());
|
|
4037
4038
|
};
|
|
4038
|
-
return (b,
|
|
4039
|
-
const L = q("KInput"), v = q("KButton"),
|
|
4039
|
+
return (b, w) => {
|
|
4040
|
+
const L = q("KInput"), v = q("KButton"), x = q("KSelect"), V = q("KMenuItem"), re = q("KMenu");
|
|
4040
4041
|
return e.config.isExactMatch ? (d(), P(L, {
|
|
4041
4042
|
key: 0,
|
|
4042
4043
|
autocomplete: "off",
|
|
@@ -4070,43 +4071,44 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4070
4071
|
]),
|
|
4071
4072
|
Je(E(re, { class: "kong-ui-entity-filter-menu" }, {
|
|
4072
4073
|
body: g(() => [
|
|
4073
|
-
(d(!0), j(Ce, null, ve(l.value, (
|
|
4074
|
-
key:
|
|
4075
|
-
"data-testid":
|
|
4074
|
+
(d(!0), j(Ce, null, ve(l.value, (G, C) => (d(), P(V, {
|
|
4075
|
+
key: G.value,
|
|
4076
|
+
"data-testid": G.value,
|
|
4076
4077
|
expandable: "",
|
|
4077
4078
|
"last-menu-item": C === l.value.length - 1
|
|
4078
4079
|
}, {
|
|
4079
4080
|
itemTitle: g(() => [
|
|
4080
4081
|
D("span", Xs, [
|
|
4081
|
-
Z(N(
|
|
4082
|
+
Z(N(G.label) + " ", 1),
|
|
4082
4083
|
Je(D("span", el, null, 512), [
|
|
4083
|
-
[Ye, s.value.includes(
|
|
4084
|
+
[Ye, s.value.includes(G.value)]
|
|
4084
4085
|
])
|
|
4085
4086
|
])
|
|
4086
4087
|
]),
|
|
4087
4088
|
itemBody: g(() => {
|
|
4088
|
-
var
|
|
4089
|
+
var R, K;
|
|
4089
4090
|
return [
|
|
4090
4091
|
D("div", tl, [
|
|
4091
4092
|
D("label", {
|
|
4092
4093
|
class: "menu-item-label",
|
|
4093
|
-
for: c(
|
|
4094
|
+
for: c(G.value)
|
|
4094
4095
|
}, N(m(t)("filter.fieldLabel")), 9, nl),
|
|
4095
|
-
((K = (
|
|
4096
|
+
((K = (R = e.config.schema) == null ? void 0 : R[G.value]) == null ? void 0 : K.type) === "select" ? (d(), P(x, {
|
|
4096
4097
|
key: 0,
|
|
4097
|
-
id: c(
|
|
4098
|
-
modelValue: a.value[
|
|
4099
|
-
"onUpdate:modelValue": (I) => a.value[
|
|
4100
|
-
|
|
4098
|
+
id: c(G.value),
|
|
4099
|
+
modelValue: a.value[G.value],
|
|
4100
|
+
"onUpdate:modelValue": (I) => a.value[G.value] = I,
|
|
4101
|
+
appearance: "select",
|
|
4102
|
+
items: y(G.value),
|
|
4101
4103
|
placeholder: m(t)("filter.selectPlaceholder")
|
|
4102
4104
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (d(), P(L, {
|
|
4103
4105
|
key: 1,
|
|
4104
|
-
id: c(
|
|
4105
|
-
modelValue: a.value[
|
|
4106
|
-
"onUpdate:modelValue": (I) => a.value[
|
|
4106
|
+
id: c(G.value),
|
|
4107
|
+
modelValue: a.value[G.value],
|
|
4108
|
+
"onUpdate:modelValue": (I) => a.value[G.value] = I,
|
|
4107
4109
|
autocomplete: "off",
|
|
4108
4110
|
placeholder: m(t)("filter.inputPlaceholder"),
|
|
4109
|
-
type: f(
|
|
4111
|
+
type: f(G.value)
|
|
4110
4112
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4111
4113
|
]),
|
|
4112
4114
|
D("div", rl, [
|
|
@@ -4114,7 +4116,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4114
4116
|
appearance: "tertiary",
|
|
4115
4117
|
"data-testid": "apply-filter",
|
|
4116
4118
|
size: "small",
|
|
4117
|
-
onClick:
|
|
4119
|
+
onClick: w[0] || (w[0] = (I) => S(!0))
|
|
4118
4120
|
}, {
|
|
4119
4121
|
default: g(() => [
|
|
4120
4122
|
Z(N(m(t)("filter.applyButtonText")), 1)
|
|
@@ -4125,7 +4127,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4125
4127
|
appearance: "tertiary",
|
|
4126
4128
|
"data-testid": "clear-filter",
|
|
4127
4129
|
size: "small",
|
|
4128
|
-
onClick: (I) =>
|
|
4130
|
+
onClick: (I) => _(G.value)
|
|
4129
4131
|
}, {
|
|
4130
4132
|
default: g(() => [
|
|
4131
4133
|
Z(N(m(t)("filter.clearButtonText")), 1)
|
|
@@ -4159,7 +4161,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4159
4161
|
]));
|
|
4160
4162
|
};
|
|
4161
4163
|
}
|
|
4162
|
-
}), il = /* @__PURE__ */
|
|
4164
|
+
}), il = /* @__PURE__ */ we(al, [["__scopeId", "data-v-15962ee2"]]), tt = /* @__PURE__ */ ae({
|
|
4163
4165
|
__name: "PermissionsWrapper",
|
|
4164
4166
|
props: {
|
|
4165
4167
|
/**
|
|
@@ -4181,7 +4183,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4181
4183
|
}
|
|
4182
4184
|
},
|
|
4183
4185
|
setup(e) {
|
|
4184
|
-
const n = e, t = F(void 0), r =
|
|
4186
|
+
const n = e, t = F(void 0), r = A(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
4185
4187
|
return Te(() => n.authFunction, async () => {
|
|
4186
4188
|
t.value = await n.authFunction();
|
|
4187
4189
|
}, { immediate: !0 }), (o, i) => r.value ? X(o.$slots, "default", {
|
|
@@ -4223,7 +4225,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4223
4225
|
}
|
|
4224
4226
|
},
|
|
4225
4227
|
setup(e) {
|
|
4226
|
-
const n =
|
|
4228
|
+
const n = ut();
|
|
4227
4229
|
return (t, r) => (d(), j("fieldset", {
|
|
4228
4230
|
class: Ee(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4229
4231
|
}, [
|
|
@@ -4248,7 +4250,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4248
4250
|
])
|
|
4249
4251
|
], 2));
|
|
4250
4252
|
}
|
|
4251
|
-
}), mn = /* @__PURE__ */
|
|
4253
|
+
}), mn = /* @__PURE__ */ we(pl, [["__scopeId", "data-v-3565daa7"]]), { useAxios: Nt, useDeleteUrlBuilder: fl, useErrors: ml, useExternalLinkCreator: Nl, useFetchUrlBuilder: Kl, useFetcher: gl, useDebouncedFilter: yr, useStringHelpers: ql, useHelpers: Bl, useGatewayFeatureSupported: Ll, useTruncationDetector: Ul } = ce, yl = { class: "add-to-group-form-container" }, hl = { class: "add-to-group-cta-text" }, vl = {
|
|
4252
4254
|
key: 0,
|
|
4253
4255
|
class: "kong-ui-entity-add-to-groups-error"
|
|
4254
4256
|
}, bl = { key: 0 }, Cl = /* @__PURE__ */ ae({
|
|
@@ -4269,7 +4271,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4269
4271
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4270
4272
|
setup(e, { emit: n }) {
|
|
4271
4273
|
var K;
|
|
4272
|
-
const { i18n: { t } } =
|
|
4274
|
+
const { i18n: { t } } = dt.useI18n(), r = e, o = n, { axiosInstance: i } = Nt({
|
|
4273
4275
|
headers: (K = r.config) == null ? void 0 : K.requestHeaders
|
|
4274
4276
|
}), a = F([]), {
|
|
4275
4277
|
debouncedQueryChange: s,
|
|
@@ -4286,7 +4288,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4286
4288
|
fetchedItemsKey: "data",
|
|
4287
4289
|
searchKeys: ["name", "id"]
|
|
4288
4290
|
}
|
|
4289
|
-
), f =
|
|
4291
|
+
), f = A(() => p.value ? t("consumer_groups.errors.general") : ""), _ = F(0), h = A(() => u.value === void 0), S = A(() => y.value.map((I) => ({
|
|
4290
4292
|
label: I.name,
|
|
4291
4293
|
value: I.id,
|
|
4292
4294
|
selected: a.value.includes(I.id),
|
|
@@ -4296,30 +4298,30 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4296
4298
|
var O;
|
|
4297
4299
|
const T = h.value ? y.value.find((B) => B.id === I) : (O = u.value) == null ? void 0 : O.find((B) => B.id === I);
|
|
4298
4300
|
return T ? T.name : I;
|
|
4299
|
-
},
|
|
4300
|
-
|
|
4301
|
-
}, L = F([]), v = F(!1),
|
|
4301
|
+
}, w = () => {
|
|
4302
|
+
x.value = "", L.value = [], C.value = [], o("cancel");
|
|
4303
|
+
}, L = F([]), v = F(!1), x = F(""), V = async () => {
|
|
4302
4304
|
if (!a.value.length) {
|
|
4303
|
-
|
|
4305
|
+
x.value = "", C.value = [], o("cancel");
|
|
4304
4306
|
return;
|
|
4305
4307
|
}
|
|
4306
|
-
v.value = !0,
|
|
4308
|
+
v.value = !0, x.value = "", L.value = [], C.value = [];
|
|
4307
4309
|
try {
|
|
4308
|
-
const I = a.value.map((B) =>
|
|
4310
|
+
const I = a.value.map((B) => G(B)), T = await Promise.allSettled(I);
|
|
4309
4311
|
let O = !0;
|
|
4310
4312
|
T.forEach((B) => {
|
|
4311
4313
|
B.status !== "fulfilled" && (O = !1);
|
|
4312
|
-
}), O ? (L.value = [], C.value = [], o("add:success", a.value), a.value = []) : (L.value.length && o("add:partial-success", L.value), a.value = [],
|
|
4314
|
+
}), O ? (L.value = [], C.value = [], o("add:success", a.value), a.value = []) : (L.value.length && o("add:partial-success", L.value), a.value = [], R(T));
|
|
4313
4315
|
} catch {
|
|
4314
|
-
|
|
4316
|
+
x.value = t("consumer_groups.errors.add"), o("error", x.value);
|
|
4315
4317
|
} finally {
|
|
4316
4318
|
v.value = !1;
|
|
4317
4319
|
}
|
|
4318
|
-
}, re =
|
|
4320
|
+
}, re = A(() => {
|
|
4319
4321
|
var T, O, B, W;
|
|
4320
4322
|
let I = `${r.config.apiBaseUrl}${Me.list[r.config.app].forConsumer}`;
|
|
4321
4323
|
return r.config.app === "konnect" ? I = I.replace(/{controlPlaneId}/gi, ((T = r.config) == null ? void 0 : T.controlPlaneId) || "").replace(/{consumerId}/gi, ((O = r.config) == null ? void 0 : O.consumerId) || "") : r.config.app === "kongManager" && (I = I.replace(/\/{workspace}/gi, (B = r.config) != null && B.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((W = r.config) == null ? void 0 : W.consumerId) || "")), I;
|
|
4322
|
-
}),
|
|
4324
|
+
}), G = async (I) => {
|
|
4323
4325
|
const T = {
|
|
4324
4326
|
group: I
|
|
4325
4327
|
};
|
|
@@ -4330,14 +4332,14 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4330
4332
|
let B = `${b(I)} - ${O.message}`;
|
|
4331
4333
|
return O.response.status === 409 && (B = `${b(I)} - ${t("consumer_groups.errors.already_added")}`), Promise.reject(Error(B));
|
|
4332
4334
|
}
|
|
4333
|
-
}, C = F([]),
|
|
4335
|
+
}, C = F([]), R = (I) => {
|
|
4334
4336
|
C.value = I.map((T) => {
|
|
4335
4337
|
var O;
|
|
4336
4338
|
return (O = T.reason) == null ? void 0 : O.message;
|
|
4337
4339
|
}).filter(Boolean);
|
|
4338
4340
|
};
|
|
4339
|
-
return Te(
|
|
4340
|
-
|
|
4341
|
+
return Te(S, () => {
|
|
4342
|
+
_.value++;
|
|
4341
4343
|
}, { immediate: !0, deep: !0 }), Te(() => r.visible, () => {
|
|
4342
4344
|
r.visible && c();
|
|
4343
4345
|
}, { immediate: !0 }), (I, T) => {
|
|
@@ -4348,7 +4350,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4348
4350
|
"data-testid": "add-to-group-modal",
|
|
4349
4351
|
"is-visible": e.visible,
|
|
4350
4352
|
title: m(t)("consumer_groups.consumers.add.title"),
|
|
4351
|
-
onCanceled:
|
|
4353
|
+
onCanceled: w,
|
|
4352
4354
|
onProceed: V
|
|
4353
4355
|
}, {
|
|
4354
4356
|
"body-content": g(() => [
|
|
@@ -4360,7 +4362,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4360
4362
|
autosuggest: "",
|
|
4361
4363
|
"data-testid": "add-to-groups-multiselect",
|
|
4362
4364
|
"dropdown-footer-text": h.value ? m(t)("consumer_groups.consumers.add.footer") : void 0,
|
|
4363
|
-
items:
|
|
4365
|
+
items: S.value,
|
|
4364
4366
|
label: m(t)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
4365
4367
|
loading: m(l),
|
|
4366
4368
|
placeholder: m(t)("consumer_groups.consumers.add.consumer_group_placeholder"),
|
|
@@ -4369,14 +4371,14 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4369
4371
|
width: "100%",
|
|
4370
4372
|
onQueryChange: m(s)
|
|
4371
4373
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4372
|
-
|
|
4374
|
+
x.value || f.value || C.value.length ? (d(), j("div", vl, [
|
|
4373
4375
|
E(B, { appearance: "danger" }, {
|
|
4374
4376
|
alertMessage: g(() => [
|
|
4375
4377
|
D("p", null, N(m(t)("consumer_groups.errors.add")), 1),
|
|
4376
4378
|
C.value.length ? (d(), j("ul", bl, [
|
|
4377
4379
|
(d(!0), j(Ce, null, ve(C.value, (ee, te) => (d(), j("li", { key: te }, N(ee), 1))), 128))
|
|
4378
4380
|
])) : z("", !0),
|
|
4379
|
-
D("div", null, N(
|
|
4381
|
+
D("div", null, N(x.value || f.value), 1)
|
|
4380
4382
|
]),
|
|
4381
4383
|
_: 1
|
|
4382
4384
|
})
|
|
@@ -4387,12 +4389,12 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4387
4389
|
}, 8, ["action-pending", "is-visible", "title"]);
|
|
4388
4390
|
};
|
|
4389
4391
|
}
|
|
4390
|
-
}),
|
|
4392
|
+
}), Kt = (e, n) => {
|
|
4391
4393
|
const t = e.__vccOpts || e;
|
|
4392
4394
|
for (const [r, o] of n)
|
|
4393
4395
|
t[r] = o;
|
|
4394
4396
|
return t;
|
|
4395
|
-
}, kl = /* @__PURE__ */
|
|
4397
|
+
}, kl = /* @__PURE__ */ Kt(Cl, [["__scopeId", "data-v-3808b4c0"]]), wl = { class: "kong-ui-entities-consumer-groups-list" }, _l = { key: 1 }, Il = /* @__PURE__ */ ae({
|
|
4396
4398
|
__name: "ConsumerGroupList",
|
|
4397
4399
|
props: {
|
|
4398
4400
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4438,22 +4440,22 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4438
4440
|
},
|
|
4439
4441
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4440
4442
|
setup(e, { emit: n }) {
|
|
4441
|
-
var
|
|
4442
|
-
const t = n, r = e, { i18nT: o, i18n: { t: i } } =
|
|
4443
|
-
headers: (
|
|
4444
|
-
}), l = F(1), u =
|
|
4443
|
+
var Lt;
|
|
4444
|
+
const t = n, r = e, { i18nT: o, i18n: { t: i } } = dt.useI18n(), a = It(), { axiosInstance: s } = Nt({
|
|
4445
|
+
headers: (Lt = r.config) == null ? void 0 : Lt.requestHeaders
|
|
4446
|
+
}), l = F(1), u = A(() => !!r.config.consumerId), p = A(
|
|
4445
4447
|
() => u.value ? "kong-ui-entities-consumer-groups-list-in-consumer-page" : "kong-ui-entities-consumer-groups-list"
|
|
4446
|
-
), c =
|
|
4448
|
+
), c = A(() => r.config.app !== "kongManager" || !!r.config.disableSorting), y = {
|
|
4447
4449
|
name: { label: i("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4448
4450
|
};
|
|
4449
4451
|
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 };
|
|
4450
|
-
const f = y,
|
|
4452
|
+
const f = y, _ = ($) => ({
|
|
4451
4453
|
"data-testid": $.username ?? $.custom_id ?? $.id
|
|
4452
|
-
}), h =
|
|
4454
|
+
}), h = A(() => {
|
|
4453
4455
|
var Y, se, he, Ie;
|
|
4454
4456
|
let $ = `${r.config.apiBaseUrl}${Me.list[r.config.app][u.value ? "forConsumer" : "all"]}`;
|
|
4455
4457
|
return r.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((Y = r.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((se = r.config) == null ? void 0 : se.consumerId) || "") : r.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (he = r.config) != null && he.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((Ie = r.config) == null ? void 0 : Ie.consumerId) || "")), $;
|
|
4456
|
-
}),
|
|
4458
|
+
}), S = F(""), b = A(() => {
|
|
4457
4459
|
const $ = r.config.app === "konnect" || r.config.isExactMatch;
|
|
4458
4460
|
return $ ? {
|
|
4459
4461
|
isExactMatch: $,
|
|
@@ -4469,11 +4471,11 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4469
4471
|
},
|
|
4470
4472
|
schema: r.config.filterSchema
|
|
4471
4473
|
};
|
|
4472
|
-
}),
|
|
4473
|
-
|
|
4474
|
+
}), w = A(() => u.value && !r.config.paginatedEndpoint ? "consumer_groups" : void 0), { fetcher: L, fetcherState: v } = gl(r.config, h.value, w.value), x = () => {
|
|
4475
|
+
S.value = "";
|
|
4474
4476
|
}, V = () => {
|
|
4475
4477
|
l.value++;
|
|
4476
|
-
}, re = F(null),
|
|
4478
|
+
}, re = F(null), G = ($, Y) => {
|
|
4477
4479
|
const se = $.id;
|
|
4478
4480
|
if (!Y(se)) {
|
|
4479
4481
|
t("copy:error", {
|
|
@@ -4501,7 +4503,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4501
4503
|
entity: $,
|
|
4502
4504
|
message: i("consumer_groups.copy.success_brief")
|
|
4503
4505
|
});
|
|
4504
|
-
},
|
|
4506
|
+
}, R = async ($) => {
|
|
4505
4507
|
var se;
|
|
4506
4508
|
await ((se = r.canRetrieve) == null ? void 0 : se.call(r, $)) && a.push(r.config.getViewRoute($.id));
|
|
4507
4509
|
}, K = ($) => ({
|
|
@@ -4534,30 +4536,30 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4534
4536
|
Y || U(), l.value++, t("add:success", $);
|
|
4535
4537
|
}, J = () => {
|
|
4536
4538
|
u.value && k();
|
|
4537
|
-
}, H = F(void 0), fe = F(!1),
|
|
4539
|
+
}, H = F(void 0), fe = F(!1), _e = F(""), me = ($) => {
|
|
4538
4540
|
H.value = $, fe.value = !0;
|
|
4539
4541
|
}, Ne = () => {
|
|
4540
4542
|
fe.value = !1, H.value = void 0;
|
|
4541
|
-
}, et =
|
|
4543
|
+
}, et = A(() => {
|
|
4542
4544
|
var Y, se, he, Ie;
|
|
4543
4545
|
let $ = `${r.config.apiBaseUrl}${Me.list[r.config.app].oneForConsumer}`;
|
|
4544
4546
|
return r.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((Y = r.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((se = r.config) == null ? void 0 : se.consumerId) || "") : r.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (he = r.config) != null && he.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((Ie = r.config) == null ? void 0 : Ie.consumerId) || "")), $;
|
|
4545
|
-
}),
|
|
4547
|
+
}), qt = F(!1), hr = async () => {
|
|
4546
4548
|
if (H.value) {
|
|
4547
|
-
|
|
4549
|
+
qt.value = !0;
|
|
4548
4550
|
try {
|
|
4549
4551
|
const $ = et.value.replace(/{consumerGroupId}/gi, H.value.id);
|
|
4550
4552
|
await s.delete($), t("remove:success", H.value), Ne(), l.value++;
|
|
4551
4553
|
} catch ($) {
|
|
4552
|
-
|
|
4554
|
+
_e.value = $.message || i("consumer_groups.errors.delete"), t("error", $);
|
|
4553
4555
|
} finally {
|
|
4554
|
-
|
|
4556
|
+
qt.value = !1;
|
|
4555
4557
|
}
|
|
4556
4558
|
}
|
|
4557
|
-
},
|
|
4559
|
+
}, Bt = F(!0);
|
|
4558
4560
|
Te(v, ($) => {
|
|
4559
4561
|
var Y, se, he, Ie;
|
|
4560
|
-
if (Array.isArray((Y = $ == null ? void 0 : $.response) == null ? void 0 : Y.data) && (
|
|
4562
|
+
if (Array.isArray((Y = $ == null ? void 0 : $.response) == null ? void 0 : Y.data) && (Bt.value = $.response.data.length > 0), $.status === Ke.Error) {
|
|
4561
4563
|
re.value = {
|
|
4562
4564
|
title: i("consumer_groups.errors.general")
|
|
4563
4565
|
}, (Ie = (he = (se = $.error) == null ? void 0 : se.response) == null ? void 0 : he.data) != null && Ie.message && (re.value.message = $.error.response.data.message), t("error", $.error);
|
|
@@ -4565,43 +4567,43 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4565
4567
|
}
|
|
4566
4568
|
re.value = null;
|
|
4567
4569
|
});
|
|
4568
|
-
const
|
|
4570
|
+
const ft = F({
|
|
4569
4571
|
ctaPath: u.value ? void 0 : r.config.createRoute,
|
|
4570
4572
|
ctaText: void 0,
|
|
4571
4573
|
message: i("consumer_groups.list.empty_state.description"),
|
|
4572
4574
|
title: i("consumer_groups.title")
|
|
4573
4575
|
});
|
|
4574
|
-
return
|
|
4575
|
-
await r.canCreate() && (
|
|
4576
|
+
return ct(async () => {
|
|
4577
|
+
await r.canCreate() && (ft.value.title = u.value ? i("consumer_groups.list.empty_state.title_for_consumer") : i("consumer_groups.list.empty_state.title"), ft.value.ctaText = u.value ? i("consumer_groups.actions.add_to_group") : i("consumer_groups.actions.create"));
|
|
4576
4578
|
}), ($, Y) => {
|
|
4577
|
-
const se = q("KButton"), he = q("KBadge"), Ie = q("KTruncate"), He = q("KDropdownItem"),
|
|
4578
|
-
return d(), j("div",
|
|
4579
|
-
E(m(
|
|
4579
|
+
const se = q("KButton"), he = q("KBadge"), Ie = q("KTruncate"), He = q("KDropdownItem"), Ut = q("KClipboardProvider"), vr = q("KPrompt");
|
|
4580
|
+
return d(), j("div", wl, [
|
|
4581
|
+
E(m(Vs), {
|
|
4580
4582
|
"cache-identifier": e.cacheIdentifier,
|
|
4581
4583
|
"disable-pagination": u.value && !e.config.paginatedEndpoint,
|
|
4582
4584
|
"disable-pagination-page-jump": "",
|
|
4583
4585
|
"disable-sorting": c.value,
|
|
4584
|
-
"empty-state-options":
|
|
4586
|
+
"empty-state-options": ft.value,
|
|
4585
4587
|
"enable-entity-actions": "",
|
|
4586
4588
|
"error-message": re.value,
|
|
4587
4589
|
fetcher: m(L),
|
|
4588
4590
|
"fetcher-cache-key": l.value,
|
|
4589
4591
|
"pagination-type": "offset",
|
|
4590
4592
|
"preferences-storage-key": p.value,
|
|
4591
|
-
query:
|
|
4592
|
-
"row-attributes":
|
|
4593
|
+
query: S.value,
|
|
4594
|
+
"row-attributes": _,
|
|
4593
4595
|
"table-headers": m(f),
|
|
4594
4596
|
"use-action-outside": e.useActionOutside,
|
|
4595
|
-
onClearSearchInput:
|
|
4596
|
-
"onClick:row": Y[3] || (Y[3] = (Q) =>
|
|
4597
|
+
onClearSearchInput: x,
|
|
4598
|
+
"onClick:row": Y[3] || (Y[3] = (Q) => R(Q)),
|
|
4597
4599
|
onEmptyStateCtaClicked: J,
|
|
4598
4600
|
onSort: V
|
|
4599
4601
|
}, {
|
|
4600
4602
|
"toolbar-filter": g(() => [
|
|
4601
4603
|
u.value ? z("", !0) : (d(), P(m(il), {
|
|
4602
4604
|
key: 0,
|
|
4603
|
-
modelValue:
|
|
4604
|
-
"onUpdate:modelValue": Y[0] || (Y[0] = (Q) =>
|
|
4605
|
+
modelValue: S.value,
|
|
4606
|
+
"onUpdate:modelValue": Y[0] || (Y[0] = (Q) => S.value = Q),
|
|
4605
4607
|
config: b.value
|
|
4606
4608
|
}, null, 8, ["modelValue", "config"]))
|
|
4607
4609
|
]),
|
|
@@ -4626,7 +4628,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4626
4628
|
]),
|
|
4627
4629
|
_: 1
|
|
4628
4630
|
}, 8, ["to"]), [
|
|
4629
|
-
[Ye,
|
|
4631
|
+
[Ye, Bt.value]
|
|
4630
4632
|
])
|
|
4631
4633
|
]),
|
|
4632
4634
|
_: 1
|
|
@@ -4656,14 +4658,14 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4656
4658
|
}, 1024))), 128))
|
|
4657
4659
|
]),
|
|
4658
4660
|
_: 2
|
|
4659
|
-
}, 1024)) : (d(), j("span",
|
|
4661
|
+
}, 1024)) : (d(), j("span", _l, "-"))
|
|
4660
4662
|
]),
|
|
4661
4663
|
actions: g(({ row: Q }) => [
|
|
4662
|
-
E(
|
|
4664
|
+
E(Ut, null, {
|
|
4663
4665
|
default: g(({ copyToClipboard: Ue }) => [
|
|
4664
4666
|
E(He, {
|
|
4665
4667
|
"data-testid": "action-entity-copy-id",
|
|
4666
|
-
onClick: (br) =>
|
|
4668
|
+
onClick: (br) => G(Q, Ue)
|
|
4667
4669
|
}, {
|
|
4668
4670
|
default: g(() => [
|
|
4669
4671
|
Z(N(m(i)("consumer_groups.actions.copy_id")), 1)
|
|
@@ -4673,7 +4675,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4673
4675
|
]),
|
|
4674
4676
|
_: 2
|
|
4675
4677
|
}, 1024),
|
|
4676
|
-
E(
|
|
4678
|
+
E(Ut, null, {
|
|
4677
4679
|
default: g(({ copyToClipboard: Ue }) => [
|
|
4678
4680
|
E(He, {
|
|
4679
4681
|
"data-testid": "action-entity-copy-json",
|
|
@@ -4787,10 +4789,10 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4787
4789
|
]);
|
|
4788
4790
|
};
|
|
4789
4791
|
}
|
|
4790
|
-
}),
|
|
4792
|
+
}), Pl = /* @__PURE__ */ Kt(Il, [["__scopeId", "data-v-5e849c87"]]), Al = { class: "kong-ui-entities-consumer-group-form" }, Sl = { class: "select-item-label" }, xl = {
|
|
4791
4793
|
key: 0,
|
|
4792
|
-
class: "select-item-
|
|
4793
|
-
},
|
|
4794
|
+
class: "select-item-desc"
|
|
4795
|
+
}, Tl = /* @__PURE__ */ ae({
|
|
4794
4796
|
__name: "ConsumerGroupForm",
|
|
4795
4797
|
props: {
|
|
4796
4798
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4809,7 +4811,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4809
4811
|
emits: ["update", "error", "loading"],
|
|
4810
4812
|
setup(e, { emit: n }) {
|
|
4811
4813
|
var ne, de, Le;
|
|
4812
|
-
const t = e, r = n, { i18n: { t: o } } =
|
|
4814
|
+
const t = e, r = n, { i18n: { t: o } } = dt.useI18n(), i = It(), a = Pt({
|
|
4813
4815
|
fields: {
|
|
4814
4816
|
name: "",
|
|
4815
4817
|
tags: "",
|
|
@@ -4817,7 +4819,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4817
4819
|
},
|
|
4818
4820
|
errorMessage: "",
|
|
4819
4821
|
readonly: !1
|
|
4820
|
-
}), s =
|
|
4822
|
+
}), s = Pt({
|
|
4821
4823
|
name: "",
|
|
4822
4824
|
tags: "",
|
|
4823
4825
|
consumers: []
|
|
@@ -4830,30 +4832,30 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4830
4832
|
} = yr(t.config, (de = Me.form[(ne = t.config) == null ? void 0 : ne.app]) == null ? void 0 : de.consumersList, "", {
|
|
4831
4833
|
fetchedItemsKey: "data",
|
|
4832
4834
|
searchKeys: ["username", "custom_id", "id"]
|
|
4833
|
-
}), { axiosInstance: f } =
|
|
4835
|
+
}), { axiosInstance: f } = Nt({
|
|
4834
4836
|
headers: (Le = t.config) == null ? void 0 : Le.requestHeaders
|
|
4835
|
-
}), { getMessageFromError:
|
|
4837
|
+
}), { getMessageFromError: _ } = ml(), h = A(() => y.value.map((k) => ({
|
|
4836
4838
|
label: k.username || k.custom_id,
|
|
4837
4839
|
value: k.id,
|
|
4838
4840
|
selected: a.fields.consumers.includes(k.id),
|
|
4839
4841
|
data: k
|
|
4840
4842
|
// we need this to determine whether or not to show the description text
|
|
4841
|
-
}))),
|
|
4843
|
+
}))), S = A(() => {
|
|
4842
4844
|
var k, U;
|
|
4843
4845
|
return (U = Me.form[(k = t.config) == null ? void 0 : k.app]) == null ? void 0 : U.edit;
|
|
4844
|
-
}), b =
|
|
4845
|
-
var H, fe,
|
|
4846
|
+
}), b = A(() => t.consumerGroupId ? nt.Edit : nt.Create), w = A(() => !!a.fields.name && !C.value), L = A(() => JSON.stringify(a.fields) !== JSON.stringify(s)), v = (k, U = "", ie = "") => {
|
|
4847
|
+
var H, fe, _e, me, Ne, et;
|
|
4846
4848
|
let J = `${(H = t.config) == null ? void 0 : H.apiBaseUrl}${Me.form[(fe = t.config) == null ? void 0 : fe.app][k]}`;
|
|
4847
|
-
return ((
|
|
4848
|
-
},
|
|
4849
|
+
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? J = J.replace(/{controlPlaneId}/gi, ((me = t.config) == null ? void 0 : me.controlPlaneId) || "") : ((Ne = t.config) == null ? void 0 : Ne.app) === "kongManager" && (J = J.replace(/\/{workspace}/gi, (et = t.config) != null && et.workspace ? `/${t.config.workspace}` : "")), J = J.replace(/{id}/gi, U || t.consumerGroupId), (k === "addConsumer" || k === "removeConsumer") && (J = J.replace(/{consumerId}/gi, ie)), J;
|
|
4850
|
+
}, x = () => {
|
|
4849
4851
|
var k;
|
|
4850
4852
|
i.push(((k = t.config) == null ? void 0 : k.cancelRoute) || { name: "consumer-group-list" });
|
|
4851
4853
|
}, V = (k) => {
|
|
4852
4854
|
r("error", k);
|
|
4853
4855
|
}, re = (k) => {
|
|
4854
4856
|
r("loading", k);
|
|
4855
|
-
},
|
|
4856
|
-
var ie, J, H, fe,
|
|
4857
|
+
}, G = async (k) => {
|
|
4858
|
+
var ie, J, H, fe, _e;
|
|
4857
4859
|
a.fields.name = ((ie = k == null ? void 0 : k.item) == null ? void 0 : ie.name) || ((J = k == null ? void 0 : k.consumer_group) == null ? void 0 : J.name) || (k == null ? void 0 : k.name) || "";
|
|
4858
4860
|
const U = ((H = k == null ? void 0 : k.item) == null ? void 0 : H.tags) || (k == null ? void 0 : k.consumer_group.tags) || (k == null ? void 0 : k.tags) || [];
|
|
4859
4861
|
if (a.fields.tags = (U == null ? void 0 : U.join(", ")) || "", "consumers" in k)
|
|
@@ -4861,19 +4863,19 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4861
4863
|
else
|
|
4862
4864
|
try {
|
|
4863
4865
|
const { data: me } = await f.get(v("getConsumers"));
|
|
4864
|
-
a.fields.consumers = "consumers" in me ? (
|
|
4866
|
+
a.fields.consumers = "consumers" in me ? (_e = me == null ? void 0 : me.consumers) == null ? void 0 : _e.map((Ne) => Ne.id) : [];
|
|
4865
4867
|
} catch (me) {
|
|
4866
4868
|
T(me);
|
|
4867
4869
|
}
|
|
4868
4870
|
Object.assign(s, a.fields);
|
|
4869
|
-
}, C =
|
|
4871
|
+
}, C = A(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : o("consumer_groups.form.validation_errors.name")), R = A(() => {
|
|
4870
4872
|
var k, U;
|
|
4871
4873
|
return {
|
|
4872
4874
|
name: a.fields.name,
|
|
4873
4875
|
tags: (U = (k = a.fields.tags.split(",")) == null ? void 0 : k.map((ie) => String(ie || "").trim())) == null ? void 0 : U.filter((ie) => ie !== "")
|
|
4874
4876
|
};
|
|
4875
|
-
}, K = async (k, U = "") => await f.post(v("addConsumer", U, k), { consumer: k }), I = async (k, U = "") => await f.delete(v("removeConsumer", U, k)), T = (k) => {
|
|
4876
|
-
a.errorMessage =
|
|
4877
|
+
}), K = async (k, U = "") => await f.post(v("addConsumer", U, k), { consumer: k }), I = async (k, U = "") => await f.delete(v("removeConsumer", U, k)), T = (k) => {
|
|
4878
|
+
a.errorMessage = _(k), r("error", k);
|
|
4877
4879
|
}, O = (k = t.consumerGroupId) => {
|
|
4878
4880
|
Object.assign(s, a.fields), r("update", { ...a.fields, id: k });
|
|
4879
4881
|
}, B = (k, U, ie = t.consumerGroupId) => {
|
|
@@ -4885,7 +4887,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4885
4887
|
}, W = async () => {
|
|
4886
4888
|
let k = "";
|
|
4887
4889
|
try {
|
|
4888
|
-
const { data: U } = await f.post(v("create"),
|
|
4890
|
+
const { data: U } = await f.post(v("create"), R.value);
|
|
4889
4891
|
k = "item" in U ? U.item.id : U.id;
|
|
4890
4892
|
} catch (U) {
|
|
4891
4893
|
T(U);
|
|
@@ -4902,7 +4904,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4902
4904
|
}, ee = async () => {
|
|
4903
4905
|
var ie;
|
|
4904
4906
|
try {
|
|
4905
|
-
((ie = t.config) == null ? void 0 : ie.app) === "konnect" ? await f.put(v("edit"),
|
|
4907
|
+
((ie = t.config) == null ? void 0 : ie.app) === "konnect" ? await f.put(v("edit"), R.value) : await f.patch(v("edit"), R.value);
|
|
4906
4908
|
} catch (J) {
|
|
4907
4909
|
T(J);
|
|
4908
4910
|
}
|
|
@@ -4932,22 +4934,22 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4932
4934
|
a.readonly = !1;
|
|
4933
4935
|
}
|
|
4934
4936
|
};
|
|
4935
|
-
return
|
|
4937
|
+
return ct(async () => {
|
|
4936
4938
|
await c();
|
|
4937
4939
|
}), (k, U) => {
|
|
4938
4940
|
const ie = q("KInput"), J = q("KMultiselect");
|
|
4939
4941
|
return d(), j("div", Al, [
|
|
4940
4942
|
E(m(Fs), {
|
|
4941
|
-
"can-submit":
|
|
4943
|
+
"can-submit": w.value && L.value,
|
|
4942
4944
|
config: e.config,
|
|
4943
4945
|
"edit-id": e.consumerGroupId,
|
|
4944
4946
|
"error-message": a.errorMessage || m(p) || C.value,
|
|
4945
|
-
"fetch-url":
|
|
4946
|
-
"form-fields":
|
|
4947
|
+
"fetch-url": S.value,
|
|
4948
|
+
"form-fields": R.value,
|
|
4947
4949
|
"is-readonly": a.readonly,
|
|
4948
|
-
onCancel:
|
|
4950
|
+
onCancel: x,
|
|
4949
4951
|
"onFetch:error": U[3] || (U[3] = (H) => V(H)),
|
|
4950
|
-
"onFetch:success":
|
|
4952
|
+
"onFetch:success": G,
|
|
4951
4953
|
onLoading: U[4] || (U[4] = (H) => re(H)),
|
|
4952
4954
|
onSubmit: te
|
|
4953
4955
|
}, {
|
|
@@ -4997,6 +4999,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4997
4999
|
"onUpdate:modelValue": U[2] || (U[2] = (H) => a.fields.consumers = H),
|
|
4998
5000
|
appearance: "select",
|
|
4999
5001
|
autosuggest: "",
|
|
5002
|
+
"expand-selected": "",
|
|
5000
5003
|
items: h.value,
|
|
5001
5004
|
label: m(o)("consumer_groups.form.fields.consumers.label"),
|
|
5002
5005
|
loading: m(u),
|
|
@@ -5005,12 +5008,10 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
5005
5008
|
onQueryChange: m(l)
|
|
5006
5009
|
}, {
|
|
5007
5010
|
"item-template": g(({ item: H }) => {
|
|
5008
|
-
var fe,
|
|
5011
|
+
var fe, _e, me;
|
|
5009
5012
|
return [
|
|
5010
|
-
D("div", Sl,
|
|
5011
|
-
|
|
5012
|
-
(fe = H == null ? void 0 : H.data) != null && fe.username && ((we = H == null ? void 0 : H.data) != null && we.custom_id) ? (d(), j("div", Tl, N((me = H == null ? void 0 : H.data) == null ? void 0 : me.custom_id), 1)) : z("", !0)
|
|
5013
|
-
])
|
|
5013
|
+
D("div", Sl, N(H.label), 1),
|
|
5014
|
+
(fe = H == null ? void 0 : H.data) != null && fe.username && ((_e = H == null ? void 0 : H.data) != null && _e.custom_id) ? (d(), j("div", xl, N((me = H == null ? void 0 : H.data) == null ? void 0 : me.custom_id), 1)) : z("", !0)
|
|
5014
5015
|
];
|
|
5015
5016
|
}),
|
|
5016
5017
|
_: 1
|
|
@@ -5024,7 +5025,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
5024
5025
|
]);
|
|
5025
5026
|
};
|
|
5026
5027
|
}
|
|
5027
|
-
}), Vl = /* @__PURE__ */
|
|
5028
|
+
}), Vl = /* @__PURE__ */ Kt(Tl, [["__scopeId", "data-v-a0ebc12d"]]), $l = { class: "kong-ui-consumer-group-entity-config-card" }, Dl = /* @__PURE__ */ ae({
|
|
5028
5029
|
__name: "ConsumerGroupConfigCard",
|
|
5029
5030
|
props: {
|
|
5030
5031
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5051,7 +5052,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
5051
5052
|
},
|
|
5052
5053
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
5053
5054
|
setup(e) {
|
|
5054
|
-
const n = e, { i18n: { t } } =
|
|
5055
|
+
const n = e, { i18n: { t } } = dt.useI18n(), r = A(() => Me.form[n.config.app].edit), o = F({
|
|
5055
5056
|
id: {},
|
|
5056
5057
|
name: {},
|
|
5057
5058
|
created_at: {},
|
|
@@ -5060,7 +5061,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
5060
5061
|
tooltip: t("consumer_groups.form.fields.tags.tooltip")
|
|
5061
5062
|
}
|
|
5062
5063
|
});
|
|
5063
|
-
return (i, a) => (d(), j("div",
|
|
5064
|
+
return (i, a) => (d(), j("div", $l, [
|
|
5064
5065
|
E(m(js), {
|
|
5065
5066
|
config: e.config,
|
|
5066
5067
|
"config-card-doc": e.configCardDoc,
|
|
@@ -5077,7 +5078,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
5077
5078
|
}
|
|
5078
5079
|
});
|
|
5079
5080
|
export {
|
|
5080
|
-
|
|
5081
|
+
Dl as ConsumerGroupConfigCard,
|
|
5081
5082
|
Vl as ConsumerGroupForm,
|
|
5082
|
-
|
|
5083
|
+
Pl as ConsumerGroupList
|
|
5083
5084
|
};
|