@kong-ui-public/entities-gateway-services 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 re, ref as U, computed as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { createI18n as
|
|
1
|
+
import { defineComponent as re, ref as U, computed as T, resolveComponent as L, openBlock as v, createBlock as R, Teleport as lr, createVNode as C, withCtx as y, unref as f, createTextVNode as G, toDisplayString as $, createElementVNode as V, watch as ke, renderSlot as X, createCommentVNode as H, useSlots as rt, onBeforeMount as ht, createSlots as je, createElementBlock as j, renderList as he, Fragment as be, normalizeClass as Ie, withModifiers as Le, withDirectives as Re, vShow as De, useCssVars as ri, resolveDynamicComponent as $e, normalizeProps as sr, guardReactiveProps as cr, mergeProps as dt, onMounted as ai, onUnmounted as ur, normalizeStyle as oi, inject as dr, pushScopeId as ni, popScopeId as li, reactive as Mt } from "vue";
|
|
2
|
+
import { useRouter as bt } from "vue-router";
|
|
3
|
+
import { createI18n as wt, i18nTComponent as si } from "@kong-ui-public/i18n";
|
|
4
4
|
import pr from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as fr } from "@kong/kongponents";
|
|
6
6
|
const mr = {
|
|
@@ -183,7 +183,7 @@ const mr = {
|
|
|
183
183
|
glossary: br
|
|
184
184
|
};
|
|
185
185
|
function _r() {
|
|
186
|
-
const e =
|
|
186
|
+
const e = wt("en-us", wr);
|
|
187
187
|
return {
|
|
188
188
|
i18n: e,
|
|
189
189
|
i18nT: si(e)
|
|
@@ -212,7 +212,7 @@ function kr() {
|
|
|
212
212
|
}
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
const
|
|
215
|
+
const Ze = {
|
|
216
216
|
useI18n: _r,
|
|
217
217
|
usePortFromProtocol: kr
|
|
218
218
|
}, He = {
|
|
@@ -237,8 +237,8 @@ const Qe = {
|
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
};
|
|
240
|
-
var ci = /* @__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))(ci || {}),
|
|
241
|
-
function
|
|
240
|
+
var ci = /* @__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))(ci || {}), pt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(pt || {}), Te = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Te || {}), ie = /* @__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))(ie || {}), me = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(me || {});
|
|
241
|
+
function _t(e = {}) {
|
|
242
242
|
return {
|
|
243
243
|
axiosInstance: pr.create({
|
|
244
244
|
withCredentials: !0,
|
|
@@ -259,7 +259,7 @@ function Cr() {
|
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
|
-
const
|
|
262
|
+
const lt = "khcp-user-table-preferences", Sr = {
|
|
263
263
|
pageSize: 30,
|
|
264
264
|
sortColumnKey: void 0,
|
|
265
265
|
sortColumnOrder: void 0
|
|
@@ -274,14 +274,14 @@ function Ir() {
|
|
|
274
274
|
return;
|
|
275
275
|
}
|
|
276
276
|
}, i = () => {
|
|
277
|
-
const t = e(localStorage.getItem(
|
|
277
|
+
const t = e(localStorage.getItem(lt));
|
|
278
278
|
return !t || !Object.keys(t).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(t));
|
|
279
279
|
};
|
|
280
280
|
return {
|
|
281
281
|
setTablePreferences: (t, a) => {
|
|
282
282
|
try {
|
|
283
283
|
const r = i();
|
|
284
|
-
r.set(t, a), localStorage.setItem(
|
|
284
|
+
r.set(t, a), localStorage.setItem(lt, JSON.stringify(Object.fromEntries(r.entries())));
|
|
285
285
|
} catch (r) {
|
|
286
286
|
console.error("useTablePreferences(setTablePreferences)", r);
|
|
287
287
|
}
|
|
@@ -291,7 +291,7 @@ function Ir() {
|
|
|
291
291
|
return (a == null ? void 0 : a.get(t)) || void 0 || Sr;
|
|
292
292
|
},
|
|
293
293
|
deleteAllTablePreferences: () => {
|
|
294
|
-
localStorage.removeItem(
|
|
294
|
+
localStorage.removeItem(lt);
|
|
295
295
|
}
|
|
296
296
|
};
|
|
297
297
|
}
|
|
@@ -400,8 +400,8 @@ const Ar = {
|
|
|
400
400
|
errors: Er,
|
|
401
401
|
toggleModal: Fr
|
|
402
402
|
};
|
|
403
|
-
function
|
|
404
|
-
const e =
|
|
403
|
+
function kt() {
|
|
404
|
+
const e = wt("en-us", Vr);
|
|
405
405
|
return {
|
|
406
406
|
i18n: e,
|
|
407
407
|
i18nT: si(e)
|
|
@@ -457,14 +457,14 @@ function Nr(e, i, t, a = {
|
|
|
457
457
|
searchKeys: ["id"]
|
|
458
458
|
}) {
|
|
459
459
|
t || (t = "100");
|
|
460
|
-
const { axiosInstance: r } =
|
|
460
|
+
const { axiosInstance: r } = _t({
|
|
461
461
|
headers: e.requestHeaders
|
|
462
|
-
}), { i18n: { t: n } } =
|
|
463
|
-
await
|
|
464
|
-
}, 200), l = U(!1), d = U(""), m = U(""), p = U([]), _ = U([]), h = U(void 0),
|
|
465
|
-
let b = `${e.apiBaseUrl}${
|
|
462
|
+
}), { i18n: { t: n } } = kt(), { debounce: o } = Cr(), s = o(async (k) => {
|
|
463
|
+
await c(k);
|
|
464
|
+
}, 200), l = U(!1), d = U(""), m = U(""), p = U([]), _ = U([]), h = U(void 0), A = f(i);
|
|
465
|
+
let b = `${e.apiBaseUrl}${A}`;
|
|
466
466
|
e.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
467
|
-
const { isValidUuid:
|
|
467
|
+
const { isValidUuid: M } = ui(), S = async () => {
|
|
468
468
|
try {
|
|
469
469
|
l.value = !0;
|
|
470
470
|
const { data: k } = await r.get(`${b}?size=${t}`);
|
|
@@ -474,50 +474,50 @@ function Nr(e, i, t, a = {
|
|
|
474
474
|
} finally {
|
|
475
475
|
l.value = !1;
|
|
476
476
|
}
|
|
477
|
-
},
|
|
478
|
-
var
|
|
479
|
-
if (
|
|
480
|
-
if (
|
|
477
|
+
}, x = U(""), c = async (k) => {
|
|
478
|
+
var O, N, oe;
|
|
479
|
+
if (x.value !== k)
|
|
480
|
+
if (x.value = k || "", h.value === void 0)
|
|
481
481
|
try {
|
|
482
482
|
if (l.value = !0, d.value = "", m.value = "", e.app === "konnect") {
|
|
483
|
-
let
|
|
484
|
-
k && (
|
|
485
|
-
const { data: I } = await r.get(`${
|
|
483
|
+
let D = b + "";
|
|
484
|
+
k && (D += `/${k}`);
|
|
485
|
+
const { data: I } = await r.get(`${D}?size=${t}`);
|
|
486
486
|
a.fetchedItemsKey in I ? p.value = I[a.fetchedItemsKey] : I != null && I.id ? p.value = [I] : p.value = [];
|
|
487
487
|
} else if (k) {
|
|
488
|
-
const
|
|
489
|
-
|
|
488
|
+
const D = [];
|
|
489
|
+
M(k) && a.searchKeys.includes("id") ? D.push((async () => {
|
|
490
490
|
const { data: K } = await r.get(`${b}/${k}`);
|
|
491
491
|
return [K[a.fetchedItemsKey] ?? K];
|
|
492
|
-
})()) :
|
|
492
|
+
})()) : D.push(
|
|
493
493
|
...a.searchKeys.filter((K) => K !== "id").map(async (K) => {
|
|
494
|
-
const { data:
|
|
495
|
-
return
|
|
494
|
+
const { data: P } = await r.get(`${b}?${K}=${k}`);
|
|
495
|
+
return P[a.fetchedItemsKey];
|
|
496
496
|
})
|
|
497
497
|
);
|
|
498
|
-
const I = await Promise.all(
|
|
499
|
-
p.value = [], (
|
|
500
|
-
var
|
|
501
|
-
(
|
|
502
|
-
|
|
498
|
+
const I = await Promise.all(D), z = /* @__PURE__ */ new Set();
|
|
499
|
+
p.value = [], (O = I == null ? void 0 : I.forEach) == null || O.call(I, (K) => {
|
|
500
|
+
var P;
|
|
501
|
+
(P = K == null ? void 0 : K.forEach) == null || P.call(K, (J) => {
|
|
502
|
+
z.has(J.id) || (z.add(J.id), p.value.push(J));
|
|
503
503
|
});
|
|
504
504
|
});
|
|
505
505
|
} else
|
|
506
506
|
p.value = _.value;
|
|
507
|
-
} catch (
|
|
508
|
-
((
|
|
507
|
+
} catch (D) {
|
|
508
|
+
((N = D == null ? void 0 : D.response) == null ? void 0 : N.status) === 404 ? m.value = n("debouncedFilter.errors.invalid") : (p.value = [], d.value = n("debouncedFilter.errors.fetch"));
|
|
509
509
|
} finally {
|
|
510
510
|
l.value = !1;
|
|
511
511
|
}
|
|
512
512
|
else
|
|
513
|
-
l.value = !0, m.value = "", k ? (p.value = (oe = h.value) == null ? void 0 : oe.filter((
|
|
513
|
+
l.value = !0, m.value = "", k ? (p.value = (oe = h.value) == null ? void 0 : oe.filter((D) => {
|
|
514
514
|
var I;
|
|
515
|
-
let
|
|
515
|
+
let z = !1;
|
|
516
516
|
for (const K of a.searchKeys) {
|
|
517
|
-
const
|
|
518
|
-
|
|
517
|
+
const P = typeof D[K] == "string" ? (I = D[K]) == null ? void 0 : I.toLowerCase() : D[K];
|
|
518
|
+
P != null && P.includes(k.toLowerCase()) && (z = !0);
|
|
519
519
|
}
|
|
520
|
-
return
|
|
520
|
+
return z;
|
|
521
521
|
}), (!p.value || !p.value.length) && (m.value = n("debouncedFilter.errors.invalid"))) : p.value = h.value, l.value = !1;
|
|
522
522
|
};
|
|
523
523
|
return {
|
|
@@ -531,13 +531,13 @@ function Nr(e, i, t, a = {
|
|
|
531
531
|
};
|
|
532
532
|
}
|
|
533
533
|
function qr(e, i) {
|
|
534
|
-
const t = f(i), a =
|
|
534
|
+
const t = f(i), a = T(
|
|
535
535
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
536
536
|
);
|
|
537
537
|
return a.value.search = "", (r) => `${a.value.href}/${r}`;
|
|
538
538
|
}
|
|
539
539
|
function Ur() {
|
|
540
|
-
const { i18n: { t: e } } =
|
|
540
|
+
const { i18n: { t: e } } = kt();
|
|
541
541
|
return {
|
|
542
542
|
getMessageFromError: (i) => {
|
|
543
543
|
var t, a, r, n;
|
|
@@ -578,17 +578,17 @@ function Lr(e) {
|
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
function di(e, i) {
|
|
581
|
-
const t = U(f(e)), a = U(f(i)), r =
|
|
581
|
+
const t = U(f(e)), a = U(f(i)), r = T(
|
|
582
582
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
583
|
-
), n =
|
|
583
|
+
), n = T(
|
|
584
584
|
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
585
585
|
);
|
|
586
586
|
return (o) => {
|
|
587
587
|
const { page: s, pageSize: l, offset: d, sortColumnKey: m, sortColumnOrder: p, query: _ } = o;
|
|
588
588
|
try {
|
|
589
589
|
let h = new URL(n.value.href);
|
|
590
|
-
return r.value && _ ? (h.search = "", h = t.value.app === "konnect" ? new URL(`${h.href}?filter[name][contains]=${_}`) : new URL(`${h.href}/${_}/`)) : (r.value || new URLSearchParams(_).forEach((
|
|
591
|
-
h.searchParams.append(b,
|
|
590
|
+
return r.value && _ ? (h.search = "", h = t.value.app === "konnect" ? new URL(`${h.href}?filter[name][contains]=${_}`) : new URL(`${h.href}/${_}/`)) : (r.value || new URLSearchParams(_).forEach((A, b) => {
|
|
591
|
+
h.searchParams.append(b, A);
|
|
592
592
|
}), m && h.searchParams.append("sort_by", m), p === "desc" && h.searchParams.append("sort_desc", "1"), h.searchParams.append("size", String(l))), d && s !== 1 && h.searchParams.append("offset", String(d)), h.href;
|
|
593
593
|
} catch (h) {
|
|
594
594
|
return console.error("RouteList(fetcher)", h), a.value;
|
|
@@ -596,7 +596,7 @@ function di(e, i) {
|
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
598
|
function Kr(e, i, t = "data") {
|
|
599
|
-
const a = f(i), { axiosInstance: r } =
|
|
599
|
+
const a = f(i), { axiosInstance: r } = _t({
|
|
600
600
|
headers: e.requestHeaders
|
|
601
601
|
}), n = di(e, a), o = U({
|
|
602
602
|
status: Te.Idle
|
|
@@ -688,7 +688,7 @@ const pi = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
688
688
|
if (Nt.indexOf(e) === -1)
|
|
689
689
|
throw new Error(`Invalid operator, expected one of ${Nt.join("|")}`);
|
|
690
690
|
}, zr = (e) => typeof e == "string" && /^[v\d]/.test(e) && pi.test(e);
|
|
691
|
-
function
|
|
691
|
+
function Jr(e) {
|
|
692
692
|
const { gatewayInfo: i, supportedRange: t } = e;
|
|
693
693
|
if (!i)
|
|
694
694
|
return !0;
|
|
@@ -701,16 +701,16 @@ function Gr(e) {
|
|
|
701
701
|
const [o, s] = n;
|
|
702
702
|
return !(o && Vt(r, o, "<") || s && Vt(r, s, ">"));
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function Gr(e) {
|
|
705
705
|
const i = U(0), t = U(0), a = U(!1);
|
|
706
|
-
return
|
|
706
|
+
return ke(e, (r) => {
|
|
707
707
|
r && !a.value && (i.value = r.offsetWidth, t.value = r.scrollWidth, a.value = !0);
|
|
708
708
|
}), {
|
|
709
|
-
isTruncated:
|
|
709
|
+
isTruncated: T(() => i.value < t.value)
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
|
-
const
|
|
713
|
-
useAxios:
|
|
712
|
+
const ue = {
|
|
713
|
+
useAxios: _t,
|
|
714
714
|
useDebouncedFilter: Nr,
|
|
715
715
|
useDeleteUrlBuilder: qr,
|
|
716
716
|
useErrors: Ur,
|
|
@@ -719,9 +719,9 @@ const se = {
|
|
|
719
719
|
useFetchUrlBuilder: di,
|
|
720
720
|
useHelpers: ui,
|
|
721
721
|
useStringHelpers: Br,
|
|
722
|
-
useI18n:
|
|
723
|
-
useGatewayFeatureSupported:
|
|
724
|
-
useTruncationDetector:
|
|
722
|
+
useI18n: kt,
|
|
723
|
+
useGatewayFeatureSupported: Jr,
|
|
724
|
+
useTruncationDetector: Gr
|
|
725
725
|
}, Yr = {
|
|
726
726
|
fail: "Failed to copy id to clipboard",
|
|
727
727
|
success: {
|
|
@@ -739,7 +739,7 @@ const se = {
|
|
|
739
739
|
}, ea = (e) => (ni("data-v-89becf03"), e = e(), li(), e), ta = ["aria-hidden"], ia = {
|
|
740
740
|
key: 0,
|
|
741
741
|
"data-testid": "kui-icon-svg-title"
|
|
742
|
-
}, ra = /* @__PURE__ */ ea(() => /* @__PURE__ */
|
|
742
|
+
}, ra = /* @__PURE__ */ ea(() => /* @__PURE__ */ V("path", {
|
|
743
743
|
d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
|
|
744
744
|
fill: "currentColor"
|
|
745
745
|
}, null, -1)), aa = /* @__PURE__ */ re({
|
|
@@ -794,7 +794,7 @@ const se = {
|
|
|
794
794
|
}
|
|
795
795
|
},
|
|
796
796
|
setup(e) {
|
|
797
|
-
const i = e, t =
|
|
797
|
+
const i = e, t = T(() => {
|
|
798
798
|
if (typeof i.size == "number" && i.size > 0)
|
|
799
799
|
return `${i.size}px`;
|
|
800
800
|
if (typeof i.size == "string") {
|
|
@@ -803,7 +803,7 @@ const se = {
|
|
|
803
803
|
return `${n}px`;
|
|
804
804
|
}
|
|
805
805
|
return qt;
|
|
806
|
-
}), a =
|
|
806
|
+
}), a = T(() => ({
|
|
807
807
|
boxSizing: "border-box",
|
|
808
808
|
color: i.color,
|
|
809
809
|
display: i.display,
|
|
@@ -811,14 +811,14 @@ const se = {
|
|
|
811
811
|
lineHeight: "0",
|
|
812
812
|
width: t.value
|
|
813
813
|
}));
|
|
814
|
-
return (r, n) => (v(),
|
|
814
|
+
return (r, n) => (v(), R($e(e.as), {
|
|
815
815
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
816
816
|
class: "kui-icon copy-icon",
|
|
817
817
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
818
818
|
style: oi(a.value)
|
|
819
819
|
}, {
|
|
820
820
|
default: y(() => [
|
|
821
|
-
(v(),
|
|
821
|
+
(v(), j("svg", {
|
|
822
822
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
823
823
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
824
824
|
fill: "none",
|
|
@@ -828,7 +828,7 @@ const se = {
|
|
|
828
828
|
width: "100%",
|
|
829
829
|
xmlns: "http://www.w3.org/2000/svg"
|
|
830
830
|
}, [
|
|
831
|
-
e.title ? (v(),
|
|
831
|
+
e.title ? (v(), j("title", ia, $(e.title), 1)) : H("", !0),
|
|
832
832
|
ra
|
|
833
833
|
], 8, ta))
|
|
834
834
|
]),
|
|
@@ -879,19 +879,19 @@ const se = {
|
|
|
879
879
|
},
|
|
880
880
|
emits: ["success", "error"],
|
|
881
881
|
setup(e, { emit: i }) {
|
|
882
|
-
const { t } =
|
|
883
|
-
}), o =
|
|
882
|
+
const { t } = wt("en-us", Zr), a = e, r = i, n = a.notify || dr(Qr, () => {
|
|
883
|
+
}), o = T(() => a.idTooltip ? {
|
|
884
884
|
label: a.idTooltip,
|
|
885
885
|
positionFixed: !0,
|
|
886
886
|
placement: "bottomStart"
|
|
887
887
|
} : {
|
|
888
888
|
title: a.uuid
|
|
889
|
-
}), s =
|
|
889
|
+
}), s = T(() => !!(a.tooltip && a.successTooltip)), l = U(a.tooltip), d = T(() => a.tooltip ? {
|
|
890
890
|
label: l.value,
|
|
891
891
|
positionFixed: !0,
|
|
892
892
|
maxWidth: "500px",
|
|
893
893
|
placement: "bottomStart"
|
|
894
|
-
} : {}), m =
|
|
894
|
+
} : {}), m = T(() => {
|
|
895
895
|
var h;
|
|
896
896
|
return a.format === "redacted" ? "*****" : a.format === "deleted" ? `*${(h = a.uuid) == null ? void 0 : h.substring(0, 5)}` : a.uuid;
|
|
897
897
|
}), p = (h) => {
|
|
@@ -899,7 +899,7 @@ const se = {
|
|
|
899
899
|
l.value = a.tooltip;
|
|
900
900
|
}, 1800);
|
|
901
901
|
}, _ = (h) => {
|
|
902
|
-
var
|
|
902
|
+
var A, b;
|
|
903
903
|
if (!h(a.uuid)) {
|
|
904
904
|
typeof n == "function" && n({
|
|
905
905
|
type: "error",
|
|
@@ -907,36 +907,36 @@ const se = {
|
|
|
907
907
|
}), s.value ? p(t("message.fail")) : r("error", a.uuid);
|
|
908
908
|
return;
|
|
909
909
|
}
|
|
910
|
-
const
|
|
910
|
+
const M = ((A = a.uuid) == null ? void 0 : A.length) > Ut, S = a.format === "hidden" || a.format === "redacted" ? t("message.success.prefix") : `"${((b = a.uuid) == null ? void 0 : b.substring(0, Ut)) + (M ? "..." : "")}"`;
|
|
911
911
|
typeof n == "function" && n({
|
|
912
912
|
type: "success",
|
|
913
913
|
message: `${S}${t("message.success.content")}`
|
|
914
914
|
}), s.value ? p(a.successTooltip) : r("success", a.uuid);
|
|
915
915
|
};
|
|
916
|
-
return (h,
|
|
916
|
+
return (h, A) => {
|
|
917
917
|
const b = L("KClipboardProvider");
|
|
918
|
-
return v(),
|
|
919
|
-
e.format !== "hidden" ? (v(),
|
|
918
|
+
return v(), j("div", la, [
|
|
919
|
+
e.format !== "hidden" ? (v(), R($e(e.idTooltip ? "KTooltip" : "div"), dt({ key: 0 }, o.value, { "data-testid": "copy-id" }), {
|
|
920
920
|
default: y(() => [
|
|
921
|
-
|
|
922
|
-
class:
|
|
921
|
+
V("div", {
|
|
922
|
+
class: Ie([
|
|
923
923
|
"uuid-container",
|
|
924
924
|
e.truncated ? "truncated-uuid" : null,
|
|
925
925
|
e.useMono ? "mono" : null
|
|
926
926
|
])
|
|
927
|
-
},
|
|
927
|
+
}, $(m.value), 3)
|
|
928
928
|
]),
|
|
929
929
|
_: 1
|
|
930
|
-
}, 16)) :
|
|
931
|
-
(v(),
|
|
930
|
+
}, 16)) : H("", !0),
|
|
931
|
+
(v(), R($e(e.tooltip ? "KTooltip" : "div"), dt(d.value, { class: "uuid-icon-wrapper" }), {
|
|
932
932
|
default: y(() => [
|
|
933
933
|
C(b, null, {
|
|
934
|
-
default: y(({ copyToClipboard:
|
|
935
|
-
|
|
934
|
+
default: y(({ copyToClipboard: M }) => [
|
|
935
|
+
V("span", {
|
|
936
936
|
"data-testid": "copy-to-clipboard",
|
|
937
937
|
role: "button",
|
|
938
938
|
tabindex: "0",
|
|
939
|
-
onClick:
|
|
939
|
+
onClick: Le((S) => _(M), ["stop"])
|
|
940
940
|
}, [
|
|
941
941
|
C(f(oa), {
|
|
942
942
|
class: "uuid-icon",
|
|
@@ -980,21 +980,21 @@ const se = {
|
|
|
980
980
|
}
|
|
981
981
|
},
|
|
982
982
|
setup(e) {
|
|
983
|
-
const i = e, { i18n: { t } } =
|
|
983
|
+
const i = e, { i18n: { t } } = ue.useI18n(), { convertKeyToTitle: a } = ue.useStringHelpers(), r = T(() => i.item.key ?? "json-array-item"), n = T(() => i.item.value ?? i.item), o = T(() => {
|
|
984
984
|
const l = JSON.parse(JSON.stringify(n.value));
|
|
985
985
|
return i.isArrayItem && delete l.name, l;
|
|
986
|
-
}), s =
|
|
986
|
+
}), s = T(() => {
|
|
987
987
|
var l;
|
|
988
988
|
return i.isArrayItem ? (l = n.value) != null && l.name ? a(n.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: i.index }) : "";
|
|
989
989
|
});
|
|
990
|
-
return (l, d) => (v(),
|
|
991
|
-
class:
|
|
990
|
+
return (l, d) => (v(), R($e(e.isArrayItem ? "fieldset" : "div"), {
|
|
991
|
+
class: Ie(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
992
992
|
}, {
|
|
993
993
|
default: y(() => [
|
|
994
|
-
e.isArrayItem ? (v(),
|
|
995
|
-
|
|
996
|
-
])) :
|
|
997
|
-
(v(!0),
|
|
994
|
+
e.isArrayItem ? (v(), j("legend", da, [
|
|
995
|
+
V("b", null, $(s.value), 1)
|
|
996
|
+
])) : H("", !0),
|
|
997
|
+
(v(!0), j(be, null, he(Object.keys(o.value), (m, p) => (v(), R(Ct, {
|
|
998
998
|
key: `${r.value}-property-${p}`,
|
|
999
999
|
item: {
|
|
1000
1000
|
key: m,
|
|
@@ -1006,12 +1006,12 @@ const se = {
|
|
|
1006
1006
|
_: 1
|
|
1007
1007
|
}, 8, ["class"]));
|
|
1008
1008
|
}
|
|
1009
|
-
}),
|
|
1009
|
+
}), we = (e, i) => {
|
|
1010
1010
|
const t = e.__vccOpts || e;
|
|
1011
1011
|
for (const [a, r] of i)
|
|
1012
1012
|
t[a] = r;
|
|
1013
1013
|
return t;
|
|
1014
|
-
}, gi = /* @__PURE__ */
|
|
1014
|
+
}, gi = /* @__PURE__ */ we(pa, [["__scopeId", "data-v-68ca83ec"]]), fa = /* @__PURE__ */ re({
|
|
1015
1015
|
__name: "InternalLinkItem",
|
|
1016
1016
|
props: {
|
|
1017
1017
|
item: {
|
|
@@ -1021,24 +1021,24 @@ const se = {
|
|
|
1021
1021
|
},
|
|
1022
1022
|
emits: ["navigation-click"],
|
|
1023
1023
|
setup(e) {
|
|
1024
|
-
const { i18n: { t: i } } =
|
|
1024
|
+
const { i18n: { t: i } } = ue.useI18n();
|
|
1025
1025
|
return (t, a) => {
|
|
1026
1026
|
const r = L("KButton");
|
|
1027
|
-
return v(),
|
|
1027
|
+
return v(), j("div", null, [
|
|
1028
1028
|
C(r, {
|
|
1029
1029
|
appearance: "tertiary",
|
|
1030
1030
|
class: "navigation-button",
|
|
1031
1031
|
onClick: a[0] || (a[0] = (n) => t.$emit("navigation-click", e.item))
|
|
1032
1032
|
}, {
|
|
1033
1033
|
default: y(() => [
|
|
1034
|
-
G(
|
|
1034
|
+
G($(e.item.value || f(i)("baseConfigCard.commonFields.link")), 1)
|
|
1035
1035
|
]),
|
|
1036
1036
|
_: 1
|
|
1037
1037
|
})
|
|
1038
1038
|
]);
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
|
-
}), ma = /* @__PURE__ */
|
|
1041
|
+
}), ma = /* @__PURE__ */ we(fa, [["__scopeId", "data-v-c96811e5"]]), ga = /* @__PURE__ */ re({
|
|
1042
1042
|
__name: "StatusBadge",
|
|
1043
1043
|
props: {
|
|
1044
1044
|
status: {
|
|
@@ -1047,14 +1047,14 @@ const se = {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
},
|
|
1049
1049
|
setup(e) {
|
|
1050
|
-
const { i18n: { t: i } } =
|
|
1050
|
+
const { i18n: { t: i } } = ue.useI18n();
|
|
1051
1051
|
return (t, a) => {
|
|
1052
1052
|
const r = L("KBadge");
|
|
1053
|
-
return v(),
|
|
1053
|
+
return v(), R(r, {
|
|
1054
1054
|
appearance: e.status ? "success" : "neutral"
|
|
1055
1055
|
}, {
|
|
1056
1056
|
default: y(() => [
|
|
1057
|
-
G(
|
|
1057
|
+
G($(e.status ? f(i)("baseConfigCard.statusBadge.enabledLabel") : f(i)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
1058
1058
|
]),
|
|
1059
1059
|
_: 1
|
|
1060
1060
|
}, 8, ["appearance"]);
|
|
@@ -1083,15 +1083,15 @@ const se = {
|
|
|
1083
1083
|
},
|
|
1084
1084
|
emits: ["navigation-click"],
|
|
1085
1085
|
setup(e, { emit: i }) {
|
|
1086
|
-
ri((
|
|
1086
|
+
ri((A) => ({
|
|
1087
1087
|
"0da74440": m.value ? "none" : `solid ${f(ba)} ${f(va)}`,
|
|
1088
1088
|
"02a039da": d.value && s.value ? "block" : "flex",
|
|
1089
1089
|
"690f3ced": d.value && s.value ? "100%" : t.slim ? "50%" : "25%",
|
|
1090
1090
|
"691182c8": d.value && s.value ? "100%" : t.slim ? "50%" : "75%"
|
|
1091
1091
|
}));
|
|
1092
|
-
const t = e, a = i, r =
|
|
1092
|
+
const t = e, a = i, r = rt(), { i18n: { t: n, formatUnixTimeStamp: o } } = ue.useI18n(), s = T(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), l = T(() => !!(t.item.tooltip || r["label-tooltip"])), d = T(() => t.item.type === ie.Json || t.item.type === ie.JsonArray), m = T(() => t.item.type === ie.JsonArray), p = T(() => {
|
|
1093
1093
|
switch (t.item.type) {
|
|
1094
|
-
case
|
|
1094
|
+
case ie.ID:
|
|
1095
1095
|
return {
|
|
1096
1096
|
tag: "CopyUuid",
|
|
1097
1097
|
attrs: {
|
|
@@ -1104,7 +1104,7 @@ const se = {
|
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
1106
|
};
|
|
1107
|
-
case
|
|
1107
|
+
case ie.IdArray:
|
|
1108
1108
|
return {
|
|
1109
1109
|
tag: "div",
|
|
1110
1110
|
additionalComponent: "CopyUuid",
|
|
@@ -1116,7 +1116,7 @@ const se = {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
1118
|
};
|
|
1119
|
-
case
|
|
1119
|
+
case ie.Redacted:
|
|
1120
1120
|
return {
|
|
1121
1121
|
tag: "CopyUuid",
|
|
1122
1122
|
attrs: {
|
|
@@ -1130,7 +1130,7 @@ const se = {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
1132
|
};
|
|
1133
|
-
case
|
|
1133
|
+
case ie.RedactedArray:
|
|
1134
1134
|
return {
|
|
1135
1135
|
tag: "div",
|
|
1136
1136
|
additionalComponent: "CopyUuid",
|
|
@@ -1143,7 +1143,7 @@ const se = {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
1145
1145
|
};
|
|
1146
|
-
case
|
|
1146
|
+
case ie.Date:
|
|
1147
1147
|
return {
|
|
1148
1148
|
tag: "div",
|
|
1149
1149
|
attrs: {
|
|
@@ -1151,7 +1151,7 @@ const se = {
|
|
|
1151
1151
|
},
|
|
1152
1152
|
text: o(t.item.value)
|
|
1153
1153
|
};
|
|
1154
|
-
case
|
|
1154
|
+
case ie.BadgeStatus:
|
|
1155
1155
|
return {
|
|
1156
1156
|
tag: "StatusBadge",
|
|
1157
1157
|
attrs: {
|
|
@@ -1159,28 +1159,28 @@ const se = {
|
|
|
1159
1159
|
status: t.item.value
|
|
1160
1160
|
}
|
|
1161
1161
|
};
|
|
1162
|
-
case
|
|
1162
|
+
case ie.BadgeTag:
|
|
1163
1163
|
return {
|
|
1164
1164
|
tag: "div",
|
|
1165
1165
|
additionalComponent: "KBadge"
|
|
1166
1166
|
};
|
|
1167
|
-
case
|
|
1167
|
+
case ie.BadgeMethod:
|
|
1168
1168
|
return {
|
|
1169
1169
|
tag: "div",
|
|
1170
1170
|
additionalComponent: "KMethodBadge"
|
|
1171
1171
|
};
|
|
1172
|
-
case
|
|
1172
|
+
case ie.LinkInternal:
|
|
1173
1173
|
return {
|
|
1174
1174
|
tag: "InternalLinkItem",
|
|
1175
1175
|
attrs: {
|
|
1176
1176
|
"data-testid": `${t.item.key}-internal-link`,
|
|
1177
1177
|
item: t.item,
|
|
1178
|
-
onNavigationClick: (
|
|
1179
|
-
a("navigation-click",
|
|
1178
|
+
onNavigationClick: (A) => {
|
|
1179
|
+
a("navigation-click", A);
|
|
1180
1180
|
}
|
|
1181
1181
|
}
|
|
1182
1182
|
};
|
|
1183
|
-
case
|
|
1183
|
+
case ie.LinkExternal:
|
|
1184
1184
|
return {
|
|
1185
1185
|
tag: "KExternalLink",
|
|
1186
1186
|
attrs: {
|
|
@@ -1189,7 +1189,7 @@ const se = {
|
|
|
1189
1189
|
},
|
|
1190
1190
|
text: t.item.value
|
|
1191
1191
|
};
|
|
1192
|
-
case
|
|
1192
|
+
case ie.Json:
|
|
1193
1193
|
return {
|
|
1194
1194
|
tag: "JsonCardItem",
|
|
1195
1195
|
attrs: {
|
|
@@ -1197,7 +1197,7 @@ const se = {
|
|
|
1197
1197
|
item: t.item
|
|
1198
1198
|
}
|
|
1199
1199
|
};
|
|
1200
|
-
case
|
|
1200
|
+
case ie.JsonArray:
|
|
1201
1201
|
return {
|
|
1202
1202
|
tag: "div",
|
|
1203
1203
|
additionalComponent: "JsonCardItem",
|
|
@@ -1215,29 +1215,29 @@ const se = {
|
|
|
1215
1215
|
text: t.item.value
|
|
1216
1216
|
};
|
|
1217
1217
|
}
|
|
1218
|
-
}), _ = U(), { isTruncated: h } =
|
|
1219
|
-
return (
|
|
1220
|
-
const
|
|
1221
|
-
return v(),
|
|
1222
|
-
|
|
1218
|
+
}), _ = U(), { isTruncated: h } = ue.useTruncationDetector(_);
|
|
1219
|
+
return (A, b) => {
|
|
1220
|
+
const M = L("KLabel"), S = L("KBadge"), x = L("KTooltip");
|
|
1221
|
+
return v(), j("div", _a, [
|
|
1222
|
+
V("div", {
|
|
1223
1223
|
class: "config-card-details-label",
|
|
1224
1224
|
"data-testid": `${e.item.key}-label`
|
|
1225
1225
|
}, [
|
|
1226
|
-
|
|
1227
|
-
C(
|
|
1226
|
+
X(A.$slots, "label", { item: e.item }, () => [
|
|
1227
|
+
C(M, { "tooltip-attributes": { maxWidth: "500px" } }, je({
|
|
1228
1228
|
default: y(() => [
|
|
1229
|
-
G(
|
|
1229
|
+
G($(e.item.label) + " ", 1)
|
|
1230
1230
|
]),
|
|
1231
1231
|
_: 2
|
|
1232
1232
|
}, [
|
|
1233
1233
|
l.value ? {
|
|
1234
1234
|
name: "tooltip",
|
|
1235
1235
|
fn: y(() => [
|
|
1236
|
-
|
|
1236
|
+
V("div", {
|
|
1237
1237
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1238
1238
|
}, [
|
|
1239
|
-
|
|
1240
|
-
G(
|
|
1239
|
+
X(A.$slots, "label-tooltip", {}, () => [
|
|
1240
|
+
G($(e.item.tooltip), 1)
|
|
1241
1241
|
], !0)
|
|
1242
1242
|
], 8, Ca)
|
|
1243
1243
|
]),
|
|
@@ -1246,87 +1246,87 @@ const se = {
|
|
|
1246
1246
|
]), 1024)
|
|
1247
1247
|
], !0)
|
|
1248
1248
|
], 8, ka),
|
|
1249
|
-
|
|
1249
|
+
V("div", {
|
|
1250
1250
|
class: "config-card-details-value",
|
|
1251
1251
|
"data-testid": `${e.item.key}-property-value`
|
|
1252
1252
|
}, [
|
|
1253
|
-
|
|
1253
|
+
X(A.$slots, e.item.key, {
|
|
1254
1254
|
rowValue: e.item.value
|
|
1255
1255
|
}, () => [
|
|
1256
|
-
s.value ? (v(),
|
|
1257
|
-
(v(),
|
|
1256
|
+
s.value ? (v(), j("div", Aa, [
|
|
1257
|
+
(v(), R($e(p.value.tag), sr(cr(p.value.attrs)), {
|
|
1258
1258
|
default: y(() => [
|
|
1259
|
-
p.value.additionalComponent === "KBadge" ? (v(),
|
|
1259
|
+
p.value.additionalComponent === "KBadge" ? (v(), j("div", {
|
|
1260
1260
|
key: 0,
|
|
1261
1261
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1262
1262
|
}, [
|
|
1263
|
-
(v(!0),
|
|
1263
|
+
(v(!0), j(be, null, he(e.item.value, (c, k) => (v(), R(S, {
|
|
1264
1264
|
key: `${e.item.key}-badge-tag-${k}`,
|
|
1265
1265
|
class: "config-badge",
|
|
1266
1266
|
"data-testid": `${e.item.key}-badge-tag-${k}`,
|
|
1267
|
-
tooltip:
|
|
1267
|
+
tooltip: c,
|
|
1268
1268
|
"truncation-tooltip": ""
|
|
1269
1269
|
}, {
|
|
1270
1270
|
default: y(() => [
|
|
1271
|
-
G(
|
|
1271
|
+
G($(c), 1)
|
|
1272
1272
|
]),
|
|
1273
1273
|
_: 2
|
|
1274
1274
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
1275
|
-
], 8, xa)) :
|
|
1276
|
-
p.value.additionalComponent === "CopyUuid" ? (v(),
|
|
1275
|
+
], 8, xa)) : H("", !0),
|
|
1276
|
+
p.value.additionalComponent === "CopyUuid" ? (v(), j("div", {
|
|
1277
1277
|
key: 1,
|
|
1278
1278
|
class: "copy-uuid-array",
|
|
1279
1279
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1280
1280
|
}, [
|
|
1281
|
-
(v(!0),
|
|
1281
|
+
(v(!0), j(be, null, he(e.item.value, (c, k) => (v(), R(f(mi), dt(p.value.childAttrs, {
|
|
1282
1282
|
key: `${e.item.key}-copy-uuid-${k}`,
|
|
1283
1283
|
"data-testid": `${e.item.key}-copy-uuid-${k}`,
|
|
1284
|
-
uuid:
|
|
1284
|
+
uuid: c
|
|
1285
1285
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1286
|
-
], 8, Ta)) : p.value.additionalComponent === "KMethodBadge" ? (v(),
|
|
1286
|
+
], 8, Ta)) : p.value.additionalComponent === "KMethodBadge" ? (v(), j("div", {
|
|
1287
1287
|
key: 2,
|
|
1288
1288
|
class: "method-badge-array",
|
|
1289
1289
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1290
1290
|
}, [
|
|
1291
|
-
(v(!0),
|
|
1291
|
+
(v(!0), j(be, null, he(e.item.value, (c, k) => (v(), R(S, {
|
|
1292
1292
|
key: `${e.item.key}-badge-method-${k}`,
|
|
1293
|
-
appearance: Object.values(f(fr)).includes(
|
|
1293
|
+
appearance: Object.values(f(fr)).includes(c.toLowerCase()) ? c.toLowerCase() : "custom",
|
|
1294
1294
|
class: "config-badge",
|
|
1295
1295
|
"data-testid": `${e.item.key}-badge-method-${k}`
|
|
1296
1296
|
}, {
|
|
1297
1297
|
default: y(() => [
|
|
1298
|
-
G(
|
|
1298
|
+
G($(c), 1)
|
|
1299
1299
|
]),
|
|
1300
1300
|
_: 2
|
|
1301
1301
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1302
|
-
], 8, ja)) :
|
|
1303
|
-
p.value.additionalComponent === "JsonCardItem" ? (v(),
|
|
1302
|
+
], 8, ja)) : H("", !0),
|
|
1303
|
+
p.value.additionalComponent === "JsonCardItem" ? (v(), j("div", {
|
|
1304
1304
|
key: 3,
|
|
1305
1305
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1306
1306
|
}, [
|
|
1307
|
-
(v(!0),
|
|
1307
|
+
(v(!0), j(be, null, he(e.item.value, (c, k) => (v(), R(gi, {
|
|
1308
1308
|
key: `json-array-item-${k}`,
|
|
1309
1309
|
index: k,
|
|
1310
1310
|
"is-array-item": "",
|
|
1311
|
-
item:
|
|
1311
|
+
item: c
|
|
1312
1312
|
}, null, 8, ["index", "item"]))), 128))
|
|
1313
|
-
], 8, Ma)) : (v(),
|
|
1313
|
+
], 8, Ma)) : (v(), R(x, {
|
|
1314
1314
|
key: 4,
|
|
1315
1315
|
label: f(h) ? e.item.value : ""
|
|
1316
1316
|
}, {
|
|
1317
1317
|
default: y(() => [
|
|
1318
|
-
|
|
1318
|
+
V("span", {
|
|
1319
1319
|
ref_key: "textContent",
|
|
1320
1320
|
ref: _,
|
|
1321
|
-
class:
|
|
1322
|
-
},
|
|
1321
|
+
class: Ie(["attrs-data-text", { truncated: e.truncated }])
|
|
1322
|
+
}, $(p.value.text), 3)
|
|
1323
1323
|
]),
|
|
1324
1324
|
_: 1
|
|
1325
1325
|
}, 8, ["label"]))
|
|
1326
1326
|
]),
|
|
1327
1327
|
_: 1
|
|
1328
1328
|
}, 16))
|
|
1329
|
-
])) : (v(),
|
|
1329
|
+
])) : (v(), j("div", {
|
|
1330
1330
|
key: 0,
|
|
1331
1331
|
"data-testid": `${e.item.key}-no-value`
|
|
1332
1332
|
}, " – ", 8, Ia))
|
|
@@ -1335,7 +1335,7 @@ const se = {
|
|
|
1335
1335
|
]);
|
|
1336
1336
|
};
|
|
1337
1337
|
}
|
|
1338
|
-
}),
|
|
1338
|
+
}), Ct = /* @__PURE__ */ we(Oa, [["__scopeId", "data-v-9c87856b"]]), Ea = { class: "json-config" }, Fa = {
|
|
1339
1339
|
key: 0,
|
|
1340
1340
|
class: "json-endpoint"
|
|
1341
1341
|
}, yi = /* @__PURE__ */ re({
|
|
@@ -1367,9 +1367,9 @@ const se = {
|
|
|
1367
1367
|
},
|
|
1368
1368
|
setup(e) {
|
|
1369
1369
|
ri((r) => ({
|
|
1370
|
-
|
|
1370
|
+
"2d178975": `${a.value}ch`
|
|
1371
1371
|
}));
|
|
1372
|
-
const i = e, t =
|
|
1372
|
+
const i = e, t = T(() => i.jsonRecord), a = T(() => {
|
|
1373
1373
|
var r;
|
|
1374
1374
|
if (!i.fetcherUrl)
|
|
1375
1375
|
return 0;
|
|
@@ -1379,13 +1379,13 @@ const se = {
|
|
|
1379
1379
|
return (r, n) => {
|
|
1380
1380
|
var o;
|
|
1381
1381
|
const s = L("KBadge"), l = L("KCodeBlock");
|
|
1382
|
-
return v(),
|
|
1383
|
-
i.fetcherUrl && (o = i.config) != null && o.jsonYamlFormsEnabled ? (v(),
|
|
1382
|
+
return v(), j("div", Ea, [
|
|
1383
|
+
i.fetcherUrl && (o = i.config) != null && o.jsonYamlFormsEnabled ? (v(), j("div", Fa, [
|
|
1384
1384
|
C(s, {
|
|
1385
1385
|
appearance: i.requestMethod
|
|
1386
1386
|
}, {
|
|
1387
1387
|
default: y(() => [
|
|
1388
|
-
G(
|
|
1388
|
+
G($(i.requestMethod), 1)
|
|
1389
1389
|
]),
|
|
1390
1390
|
_: 1
|
|
1391
1391
|
}, 8, ["appearance"]),
|
|
@@ -1396,15 +1396,15 @@ const se = {
|
|
|
1396
1396
|
language: "json",
|
|
1397
1397
|
theme: "dark"
|
|
1398
1398
|
}, null, 8, ["code"])
|
|
1399
|
-
])) :
|
|
1400
|
-
i.jsonRecord ? (v(),
|
|
1399
|
+
])) : H("", !0),
|
|
1400
|
+
i.jsonRecord ? (v(), R(l, {
|
|
1401
1401
|
key: 1,
|
|
1402
1402
|
id: "json-codeblock",
|
|
1403
|
-
class:
|
|
1404
|
-
code: JSON.stringify(t, null, 2),
|
|
1403
|
+
class: Ie({ "json-content": i.fetcherUrl }),
|
|
1404
|
+
code: JSON.stringify(t.value, null, 2),
|
|
1405
1405
|
language: "json",
|
|
1406
1406
|
theme: "dark"
|
|
1407
|
-
}, null, 8, ["class", "code"])) :
|
|
1407
|
+
}, null, 8, ["class", "code"])) : H("", !0)
|
|
1408
1408
|
]);
|
|
1409
1409
|
};
|
|
1410
1410
|
}
|
|
@@ -1435,7 +1435,7 @@ function Ua(e, i) {
|
|
|
1435
1435
|
function La(e) {
|
|
1436
1436
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1437
1437
|
}
|
|
1438
|
-
var Ka = vi, Ba = Va, Pa = Na, Ra = Ua, Da = La, Ha = qa,
|
|
1438
|
+
var Ka = vi, Ba = Va, Pa = Na, Ra = Ua, Da = La, Ha = qa, ce = {
|
|
1439
1439
|
isNothing: Ka,
|
|
1440
1440
|
isObject: Ba,
|
|
1441
1441
|
toArray: Pa,
|
|
@@ -1457,8 +1457,8 @@ ze.prototype.constructor = ze;
|
|
|
1457
1457
|
ze.prototype.toString = function(e) {
|
|
1458
1458
|
return this.name + ": " + hi(this, e);
|
|
1459
1459
|
};
|
|
1460
|
-
var
|
|
1461
|
-
function
|
|
1460
|
+
var ye = ze;
|
|
1461
|
+
function st(e, i, t, a, r) {
|
|
1462
1462
|
var n = "", o = "", s = Math.floor(r / 2) - 1;
|
|
1463
1463
|
return a - i > s && (n = " ... ", i = a - s + n.length), t - a > s && (o = " ...", t = a + s - o.length), {
|
|
1464
1464
|
str: n + e.slice(i, t).replace(/\t/g, "→") + o,
|
|
@@ -1466,8 +1466,8 @@ function ct(e, i, t, a, r) {
|
|
|
1466
1466
|
// relative position
|
|
1467
1467
|
};
|
|
1468
1468
|
}
|
|
1469
|
-
function
|
|
1470
|
-
return
|
|
1469
|
+
function ct(e, i) {
|
|
1470
|
+
return ce.repeat(" ", i - e.length) + e;
|
|
1471
1471
|
}
|
|
1472
1472
|
function za(e, i) {
|
|
1473
1473
|
if (i = Object.create(i || null), !e.buffer)
|
|
@@ -1478,28 +1478,28 @@ function za(e, i) {
|
|
|
1478
1478
|
o < 0 && (o = a.length - 1);
|
|
1479
1479
|
var s = "", l, d, m = Math.min(e.line + i.linesAfter, r.length).toString().length, p = i.maxLength - (i.indent + m + 3);
|
|
1480
1480
|
for (l = 1; l <= i.linesBefore && !(o - l < 0); l++)
|
|
1481
|
-
d =
|
|
1481
|
+
d = st(
|
|
1482
1482
|
e.buffer,
|
|
1483
1483
|
a[o - l],
|
|
1484
1484
|
r[o - l],
|
|
1485
1485
|
e.position - (a[o] - a[o - l]),
|
|
1486
1486
|
p
|
|
1487
|
-
), s =
|
|
1487
|
+
), s = ce.repeat(" ", i.indent) + ct((e.line - l + 1).toString(), m) + " | " + d.str + `
|
|
1488
1488
|
` + s;
|
|
1489
|
-
for (d =
|
|
1490
|
-
`, s +=
|
|
1489
|
+
for (d = st(e.buffer, a[o], r[o], e.position, p), s += ce.repeat(" ", i.indent) + ct((e.line + 1).toString(), m) + " | " + d.str + `
|
|
1490
|
+
`, s += ce.repeat("-", i.indent + m + 3 + d.pos) + `^
|
|
1491
1491
|
`, l = 1; l <= i.linesAfter && !(o + l >= r.length); l++)
|
|
1492
|
-
d =
|
|
1492
|
+
d = st(
|
|
1493
1493
|
e.buffer,
|
|
1494
1494
|
a[o + l],
|
|
1495
1495
|
r[o + l],
|
|
1496
1496
|
e.position - (a[o] - a[o + l]),
|
|
1497
1497
|
p
|
|
1498
|
-
), s +=
|
|
1498
|
+
), s += ce.repeat(" ", i.indent) + ct((e.line + l + 1).toString(), m) + " | " + d.str + `
|
|
1499
1499
|
`;
|
|
1500
1500
|
return s.replace(/\n$/, "");
|
|
1501
1501
|
}
|
|
1502
|
-
var
|
|
1502
|
+
var Ja = za, Ga = [
|
|
1503
1503
|
"kind",
|
|
1504
1504
|
"multi",
|
|
1505
1505
|
"resolve",
|
|
@@ -1525,16 +1525,16 @@ function Wa(e) {
|
|
|
1525
1525
|
}
|
|
1526
1526
|
function Za(e, i) {
|
|
1527
1527
|
if (i = i || {}, Object.keys(i).forEach(function(t) {
|
|
1528
|
-
if (
|
|
1529
|
-
throw new
|
|
1528
|
+
if (Ga.indexOf(t) === -1)
|
|
1529
|
+
throw new ye('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1530
1530
|
}), this.options = i, this.tag = e, this.kind = i.kind || null, this.resolve = i.resolve || function() {
|
|
1531
1531
|
return !0;
|
|
1532
1532
|
}, this.construct = i.construct || function(t) {
|
|
1533
1533
|
return t;
|
|
1534
1534
|
}, this.instanceOf = i.instanceOf || null, this.predicate = i.predicate || null, this.represent = i.represent || null, this.representName = i.representName || null, this.defaultStyle = i.defaultStyle || null, this.multi = i.multi || !1, this.styleAliases = Wa(i.styleAliases || null), Ya.indexOf(this.kind) === -1)
|
|
1535
|
-
throw new
|
|
1535
|
+
throw new ye('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1536
1536
|
}
|
|
1537
|
-
var
|
|
1537
|
+
var fe = Za;
|
|
1538
1538
|
function Lt(e, i) {
|
|
1539
1539
|
var t = [];
|
|
1540
1540
|
return e[i].forEach(function(a) {
|
|
@@ -1564,44 +1564,44 @@ function Qa() {
|
|
|
1564
1564
|
arguments[i].forEach(a);
|
|
1565
1565
|
return e;
|
|
1566
1566
|
}
|
|
1567
|
-
function
|
|
1567
|
+
function ft(e) {
|
|
1568
1568
|
return this.extend(e);
|
|
1569
1569
|
}
|
|
1570
|
-
|
|
1570
|
+
ft.prototype.extend = function(e) {
|
|
1571
1571
|
var i = [], t = [];
|
|
1572
|
-
if (e instanceof
|
|
1572
|
+
if (e instanceof fe)
|
|
1573
1573
|
t.push(e);
|
|
1574
1574
|
else if (Array.isArray(e))
|
|
1575
1575
|
t = t.concat(e);
|
|
1576
1576
|
else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit)))
|
|
1577
1577
|
e.implicit && (i = i.concat(e.implicit)), e.explicit && (t = t.concat(e.explicit));
|
|
1578
1578
|
else
|
|
1579
|
-
throw new
|
|
1579
|
+
throw new ye("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1580
1580
|
i.forEach(function(r) {
|
|
1581
|
-
if (!(r instanceof
|
|
1582
|
-
throw new
|
|
1581
|
+
if (!(r instanceof fe))
|
|
1582
|
+
throw new ye("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1583
1583
|
if (r.loadKind && r.loadKind !== "scalar")
|
|
1584
|
-
throw new
|
|
1584
|
+
throw new ye("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1585
1585
|
if (r.multi)
|
|
1586
|
-
throw new
|
|
1586
|
+
throw new ye("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1587
1587
|
}), t.forEach(function(r) {
|
|
1588
|
-
if (!(r instanceof
|
|
1589
|
-
throw new
|
|
1588
|
+
if (!(r instanceof fe))
|
|
1589
|
+
throw new ye("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1590
1590
|
});
|
|
1591
|
-
var a = Object.create(
|
|
1591
|
+
var a = Object.create(ft.prototype);
|
|
1592
1592
|
return a.implicit = (this.implicit || []).concat(i), a.explicit = (this.explicit || []).concat(t), a.compiledImplicit = Lt(a, "implicit"), a.compiledExplicit = Lt(a, "explicit"), a.compiledTypeMap = Qa(a.compiledImplicit, a.compiledExplicit), a;
|
|
1593
1593
|
};
|
|
1594
|
-
var bi =
|
|
1594
|
+
var bi = ft, wi = new fe("tag:yaml.org,2002:str", {
|
|
1595
1595
|
kind: "scalar",
|
|
1596
1596
|
construct: function(e) {
|
|
1597
1597
|
return e !== null ? e : "";
|
|
1598
1598
|
}
|
|
1599
|
-
}), _i = new
|
|
1599
|
+
}), _i = new fe("tag:yaml.org,2002:seq", {
|
|
1600
1600
|
kind: "sequence",
|
|
1601
1601
|
construct: function(e) {
|
|
1602
1602
|
return e !== null ? e : [];
|
|
1603
1603
|
}
|
|
1604
|
-
}), ki = new
|
|
1604
|
+
}), ki = new fe("tag:yaml.org,2002:map", {
|
|
1605
1605
|
kind: "mapping",
|
|
1606
1606
|
construct: function(e) {
|
|
1607
1607
|
return e !== null ? e : {};
|
|
@@ -1625,7 +1625,7 @@ function eo() {
|
|
|
1625
1625
|
function to(e) {
|
|
1626
1626
|
return e === null;
|
|
1627
1627
|
}
|
|
1628
|
-
var Si = new
|
|
1628
|
+
var Si = new fe("tag:yaml.org,2002:null", {
|
|
1629
1629
|
kind: "scalar",
|
|
1630
1630
|
resolve: Xa,
|
|
1631
1631
|
construct: eo,
|
|
@@ -1661,7 +1661,7 @@ function ro(e) {
|
|
|
1661
1661
|
function ao(e) {
|
|
1662
1662
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1663
1663
|
}
|
|
1664
|
-
var Ii = new
|
|
1664
|
+
var Ii = new fe("tag:yaml.org,2002:bool", {
|
|
1665
1665
|
kind: "scalar",
|
|
1666
1666
|
resolve: io,
|
|
1667
1667
|
construct: ro,
|
|
@@ -1750,9 +1750,9 @@ function co(e) {
|
|
|
1750
1750
|
return t * parseInt(i, 10);
|
|
1751
1751
|
}
|
|
1752
1752
|
function uo(e) {
|
|
1753
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !
|
|
1753
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ce.isNegativeZero(e);
|
|
1754
1754
|
}
|
|
1755
|
-
var Ai = new
|
|
1755
|
+
var Ai = new fe("tag:yaml.org,2002:int", {
|
|
1756
1756
|
kind: "scalar",
|
|
1757
1757
|
resolve: so,
|
|
1758
1758
|
construct: co,
|
|
@@ -1822,14 +1822,14 @@ function yo(e, i) {
|
|
|
1822
1822
|
case "camelcase":
|
|
1823
1823
|
return "-.Inf";
|
|
1824
1824
|
}
|
|
1825
|
-
else if (
|
|
1825
|
+
else if (ce.isNegativeZero(e))
|
|
1826
1826
|
return "-0.0";
|
|
1827
1827
|
return t = e.toString(10), go.test(t) ? t.replace("e", ".e") : t;
|
|
1828
1828
|
}
|
|
1829
1829
|
function vo(e) {
|
|
1830
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 ||
|
|
1830
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ce.isNegativeZero(e));
|
|
1831
1831
|
}
|
|
1832
|
-
var xi = new
|
|
1832
|
+
var xi = new fe("tag:yaml.org,2002:float", {
|
|
1833
1833
|
kind: "scalar",
|
|
1834
1834
|
resolve: fo,
|
|
1835
1835
|
construct: mo,
|
|
@@ -1867,7 +1867,7 @@ function bo(e) {
|
|
|
1867
1867
|
function wo(e) {
|
|
1868
1868
|
return e.toISOString();
|
|
1869
1869
|
}
|
|
1870
|
-
var Oi = new
|
|
1870
|
+
var Oi = new fe("tag:yaml.org,2002:timestamp", {
|
|
1871
1871
|
kind: "scalar",
|
|
1872
1872
|
resolve: ho,
|
|
1873
1873
|
construct: bo,
|
|
@@ -1877,15 +1877,15 @@ var Oi = new de("tag:yaml.org,2002:timestamp", {
|
|
|
1877
1877
|
function _o(e) {
|
|
1878
1878
|
return e === "<<" || e === null;
|
|
1879
1879
|
}
|
|
1880
|
-
var Ei = new
|
|
1880
|
+
var Ei = new fe("tag:yaml.org,2002:merge", {
|
|
1881
1881
|
kind: "scalar",
|
|
1882
1882
|
resolve: _o
|
|
1883
|
-
}),
|
|
1883
|
+
}), St = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1884
1884
|
\r`;
|
|
1885
1885
|
function ko(e) {
|
|
1886
1886
|
if (e === null)
|
|
1887
1887
|
return !1;
|
|
1888
|
-
var i, t, a = 0, r = e.length, n =
|
|
1888
|
+
var i, t, a = 0, r = e.length, n = St;
|
|
1889
1889
|
for (t = 0; t < r; t++)
|
|
1890
1890
|
if (i = n.indexOf(e.charAt(t)), !(i > 64)) {
|
|
1891
1891
|
if (i < 0)
|
|
@@ -1895,13 +1895,13 @@ function ko(e) {
|
|
|
1895
1895
|
return a % 8 === 0;
|
|
1896
1896
|
}
|
|
1897
1897
|
function Co(e) {
|
|
1898
|
-
var i, t, a = e.replace(/[\r\n=]/g, ""), r = a.length, n =
|
|
1898
|
+
var i, t, a = e.replace(/[\r\n=]/g, ""), r = a.length, n = St, o = 0, s = [];
|
|
1899
1899
|
for (i = 0; i < r; i++)
|
|
1900
1900
|
i % 4 === 0 && i && (s.push(o >> 16 & 255), s.push(o >> 8 & 255), s.push(o & 255)), o = o << 6 | n.indexOf(a.charAt(i));
|
|
1901
1901
|
return t = r % 4 * 6, t === 0 ? (s.push(o >> 16 & 255), s.push(o >> 8 & 255), s.push(o & 255)) : t === 18 ? (s.push(o >> 10 & 255), s.push(o >> 2 & 255)) : t === 12 && s.push(o >> 4 & 255), new Uint8Array(s);
|
|
1902
1902
|
}
|
|
1903
1903
|
function So(e) {
|
|
1904
|
-
var i = "", t = 0, a, r, n = e.length, o =
|
|
1904
|
+
var i = "", t = 0, a, r, n = e.length, o = St;
|
|
1905
1905
|
for (a = 0; a < n; a++)
|
|
1906
1906
|
a % 3 === 0 && a && (i += o[t >> 18 & 63], i += o[t >> 12 & 63], i += o[t >> 6 & 63], i += o[t & 63]), t = (t << 8) + e[a];
|
|
1907
1907
|
return r = n % 3, r === 0 ? (i += o[t >> 18 & 63], i += o[t >> 12 & 63], i += o[t >> 6 & 63], i += o[t & 63]) : r === 2 ? (i += o[t >> 10 & 63], i += o[t >> 4 & 63], i += o[t << 2 & 63], i += o[64]) : r === 1 && (i += o[t >> 2 & 63], i += o[t << 4 & 63], i += o[64], i += o[64]), i;
|
|
@@ -1909,7 +1909,7 @@ function So(e) {
|
|
|
1909
1909
|
function Io(e) {
|
|
1910
1910
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1911
1911
|
}
|
|
1912
|
-
var Fi = new
|
|
1912
|
+
var Fi = new fe("tag:yaml.org,2002:binary", {
|
|
1913
1913
|
kind: "scalar",
|
|
1914
1914
|
resolve: ko,
|
|
1915
1915
|
construct: Co,
|
|
@@ -1941,7 +1941,7 @@ function To(e) {
|
|
|
1941
1941
|
function jo(e) {
|
|
1942
1942
|
return e !== null ? e : [];
|
|
1943
1943
|
}
|
|
1944
|
-
var Vi = new
|
|
1944
|
+
var Vi = new fe("tag:yaml.org,2002:omap", {
|
|
1945
1945
|
kind: "sequence",
|
|
1946
1946
|
resolve: To,
|
|
1947
1947
|
construct: jo
|
|
@@ -1965,7 +1965,7 @@ function Oo(e) {
|
|
|
1965
1965
|
a = o[i], r = Object.keys(a), n[i] = [r[0], a[r[0]]];
|
|
1966
1966
|
return n;
|
|
1967
1967
|
}
|
|
1968
|
-
var Ni = new
|
|
1968
|
+
var Ni = new fe("tag:yaml.org,2002:pairs", {
|
|
1969
1969
|
kind: "sequence",
|
|
1970
1970
|
resolve: $o,
|
|
1971
1971
|
construct: Oo
|
|
@@ -1982,11 +1982,11 @@ function Fo(e) {
|
|
|
1982
1982
|
function Vo(e) {
|
|
1983
1983
|
return e !== null ? e : {};
|
|
1984
1984
|
}
|
|
1985
|
-
var qi = new
|
|
1985
|
+
var qi = new fe("tag:yaml.org,2002:set", {
|
|
1986
1986
|
kind: "mapping",
|
|
1987
1987
|
resolve: Fo,
|
|
1988
1988
|
construct: Vo
|
|
1989
|
-
}),
|
|
1989
|
+
}), It = ji.extend({
|
|
1990
1990
|
implicit: [
|
|
1991
1991
|
Oi,
|
|
1992
1992
|
Ei
|
|
@@ -1997,20 +1997,20 @@ var qi = new de("tag:yaml.org,2002:set", {
|
|
|
1997
1997
|
Ni,
|
|
1998
1998
|
qi
|
|
1999
1999
|
]
|
|
2000
|
-
}),
|
|
2000
|
+
}), Ae = Object.prototype.hasOwnProperty, Qe = 1, Ui = 2, Li = 3, Xe = 4, ut = 1, No = 2, Kt = 3, qo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Uo = /[\x85\u2028\u2029]/, Lo = /[,\[\]\{\}]/, Ki = /^(?:!|!!|![a-z\-]+!)$/i, Bi = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
2001
2001
|
function Bt(e) {
|
|
2002
2002
|
return Object.prototype.toString.call(e);
|
|
2003
2003
|
}
|
|
2004
|
-
function
|
|
2004
|
+
function _e(e) {
|
|
2005
2005
|
return e === 10 || e === 13;
|
|
2006
2006
|
}
|
|
2007
2007
|
function Me(e) {
|
|
2008
2008
|
return e === 9 || e === 32;
|
|
2009
2009
|
}
|
|
2010
|
-
function
|
|
2010
|
+
function ve(e) {
|
|
2011
2011
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
2012
2012
|
}
|
|
2013
|
-
function
|
|
2013
|
+
function qe(e) {
|
|
2014
2014
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
2015
2015
|
}
|
|
2016
2016
|
function Ko(e) {
|
|
@@ -2034,10 +2034,10 @@ function Ro(e) {
|
|
|
2034
2034
|
);
|
|
2035
2035
|
}
|
|
2036
2036
|
var Pi = new Array(256), Ri = new Array(256);
|
|
2037
|
-
for (var
|
|
2038
|
-
Pi[
|
|
2037
|
+
for (var Ve = 0; Ve < 256; Ve++)
|
|
2038
|
+
Pi[Ve] = Pt(Ve) ? 1 : 0, Ri[Ve] = Pt(Ve);
|
|
2039
2039
|
function Do(e, i) {
|
|
2040
|
-
this.input = e, this.filename = i.filename || null, this.schema = i.schema ||
|
|
2040
|
+
this.input = e, this.filename = i.filename || null, this.schema = i.schema || It, this.onWarning = i.onWarning || null, this.legacy = i.legacy || !1, this.json = i.json || !1, this.listener = i.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
2041
2041
|
}
|
|
2042
2042
|
function Di(e, i) {
|
|
2043
2043
|
var t = {
|
|
@@ -2048,51 +2048,51 @@ function Di(e, i) {
|
|
|
2048
2048
|
line: e.line,
|
|
2049
2049
|
column: e.position - e.lineStart
|
|
2050
2050
|
};
|
|
2051
|
-
return t.snippet =
|
|
2051
|
+
return t.snippet = Ja(t), new ye(i, t);
|
|
2052
2052
|
}
|
|
2053
|
-
function
|
|
2053
|
+
function E(e, i) {
|
|
2054
2054
|
throw Di(e, i);
|
|
2055
2055
|
}
|
|
2056
|
-
function
|
|
2056
|
+
function et(e, i) {
|
|
2057
2057
|
e.onWarning && e.onWarning.call(null, Di(e, i));
|
|
2058
2058
|
}
|
|
2059
2059
|
var Rt = {
|
|
2060
2060
|
YAML: function(e, i, t) {
|
|
2061
2061
|
var a, r, n;
|
|
2062
|
-
e.version !== null &&
|
|
2062
|
+
e.version !== null && E(e, "duplication of %YAML directive"), t.length !== 1 && E(e, "YAML directive accepts exactly one argument"), a = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), a === null && E(e, "ill-formed argument of the YAML directive"), r = parseInt(a[1], 10), n = parseInt(a[2], 10), r !== 1 && E(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = n < 2, n !== 1 && n !== 2 && et(e, "unsupported YAML version of the document");
|
|
2063
2063
|
},
|
|
2064
2064
|
TAG: function(e, i, t) {
|
|
2065
2065
|
var a, r;
|
|
2066
|
-
t.length !== 2 &&
|
|
2066
|
+
t.length !== 2 && E(e, "TAG directive accepts exactly two arguments"), a = t[0], r = t[1], Ki.test(a) || E(e, "ill-formed tag handle (first argument) of the TAG directive"), Ae.call(e.tagMap, a) && E(e, 'there is a previously declared suffix for "' + a + '" tag handle'), Bi.test(r) || E(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
2067
2067
|
try {
|
|
2068
2068
|
r = decodeURIComponent(r);
|
|
2069
2069
|
} catch {
|
|
2070
|
-
|
|
2070
|
+
E(e, "tag prefix is malformed: " + r);
|
|
2071
2071
|
}
|
|
2072
2072
|
e.tagMap[a] = r;
|
|
2073
2073
|
}
|
|
2074
2074
|
};
|
|
2075
|
-
function
|
|
2075
|
+
function Se(e, i, t, a) {
|
|
2076
2076
|
var r, n, o, s;
|
|
2077
2077
|
if (i < t) {
|
|
2078
2078
|
if (s = e.input.slice(i, t), a)
|
|
2079
2079
|
for (r = 0, n = s.length; r < n; r += 1)
|
|
2080
|
-
o = s.charCodeAt(r), o === 9 || 32 <= o && o <= 1114111 ||
|
|
2080
|
+
o = s.charCodeAt(r), o === 9 || 32 <= o && o <= 1114111 || E(e, "expected valid JSON character");
|
|
2081
2081
|
else
|
|
2082
|
-
qo.test(s) &&
|
|
2082
|
+
qo.test(s) && E(e, "the stream contains non-printable characters");
|
|
2083
2083
|
e.result += s;
|
|
2084
2084
|
}
|
|
2085
2085
|
}
|
|
2086
2086
|
function Dt(e, i, t, a) {
|
|
2087
2087
|
var r, n, o, s;
|
|
2088
|
-
for (
|
|
2089
|
-
n = r[o],
|
|
2088
|
+
for (ce.isObject(t) || E(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(t), o = 0, s = r.length; o < s; o += 1)
|
|
2089
|
+
n = r[o], Ae.call(i, n) || (i[n] = t[n], a[n] = !0);
|
|
2090
2090
|
}
|
|
2091
|
-
function
|
|
2091
|
+
function Ue(e, i, t, a, r, n, o, s, l) {
|
|
2092
2092
|
var d, m;
|
|
2093
2093
|
if (Array.isArray(r))
|
|
2094
2094
|
for (r = Array.prototype.slice.call(r), d = 0, m = r.length; d < m; d += 1)
|
|
2095
|
-
Array.isArray(r[d]) &&
|
|
2095
|
+
Array.isArray(r[d]) && E(e, "nested arrays are not supported inside keys"), typeof r == "object" && Bt(r[d]) === "[object Object]" && (r[d] = "[object Object]");
|
|
2096
2096
|
if (typeof r == "object" && Bt(r) === "[object Object]" && (r = "[object Object]"), r = String(r), i === null && (i = {}), a === "tag:yaml.org,2002:merge")
|
|
2097
2097
|
if (Array.isArray(n))
|
|
2098
2098
|
for (d = 0, m = n.length; d < m; d += 1)
|
|
@@ -2100,7 +2100,7 @@ function Ne(e, i, t, a, r, n, o, s, l) {
|
|
|
2100
2100
|
else
|
|
2101
2101
|
Dt(e, i, n, t);
|
|
2102
2102
|
else
|
|
2103
|
-
!e.json && !
|
|
2103
|
+
!e.json && !Ae.call(t, r) && Ae.call(i, r) && (e.line = o || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, E(e, "duplicated mapping key")), r === "__proto__" ? Object.defineProperty(i, r, {
|
|
2104
2104
|
configurable: !0,
|
|
2105
2105
|
enumerable: !0,
|
|
2106
2106
|
writable: !0,
|
|
@@ -2108,11 +2108,11 @@ function Ne(e, i, t, a, r, n, o, s, l) {
|
|
|
2108
2108
|
}) : i[r] = n, delete t[r];
|
|
2109
2109
|
return i;
|
|
2110
2110
|
}
|
|
2111
|
-
function
|
|
2111
|
+
function At(e) {
|
|
2112
2112
|
var i;
|
|
2113
|
-
i = e.input.charCodeAt(e.position), i === 10 ? e.position++ : i === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
2113
|
+
i = e.input.charCodeAt(e.position), i === 10 ? e.position++ : i === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : E(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
2114
2114
|
}
|
|
2115
|
-
function
|
|
2115
|
+
function se(e, i, t) {
|
|
2116
2116
|
for (var a = 0, r = e.input.charCodeAt(e.position); r !== 0; ) {
|
|
2117
2117
|
for (; Me(r); )
|
|
2118
2118
|
r === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), r = e.input.charCodeAt(++e.position);
|
|
@@ -2120,38 +2120,38 @@ function ne(e, i, t) {
|
|
|
2120
2120
|
do
|
|
2121
2121
|
r = e.input.charCodeAt(++e.position);
|
|
2122
2122
|
while (r !== 10 && r !== 13 && r !== 0);
|
|
2123
|
-
if (
|
|
2124
|
-
for (
|
|
2123
|
+
if (_e(r))
|
|
2124
|
+
for (At(e), r = e.input.charCodeAt(e.position), a++, e.lineIndent = 0; r === 32; )
|
|
2125
2125
|
e.lineIndent++, r = e.input.charCodeAt(++e.position);
|
|
2126
2126
|
else
|
|
2127
2127
|
break;
|
|
2128
2128
|
}
|
|
2129
|
-
return t !== -1 && a !== 0 && e.lineIndent < t &&
|
|
2129
|
+
return t !== -1 && a !== 0 && e.lineIndent < t && et(e, "deficient indentation"), a;
|
|
2130
2130
|
}
|
|
2131
|
-
function
|
|
2131
|
+
function at(e) {
|
|
2132
2132
|
var i = e.position, t;
|
|
2133
|
-
return t = e.input.charCodeAt(i), !!((t === 45 || t === 46) && t === e.input.charCodeAt(i + 1) && t === e.input.charCodeAt(i + 2) && (i += 3, t = e.input.charCodeAt(i), t === 0 ||
|
|
2133
|
+
return t = e.input.charCodeAt(i), !!((t === 45 || t === 46) && t === e.input.charCodeAt(i + 1) && t === e.input.charCodeAt(i + 2) && (i += 3, t = e.input.charCodeAt(i), t === 0 || ve(t)));
|
|
2134
2134
|
}
|
|
2135
|
-
function
|
|
2136
|
-
i === 1 ? e.result += " " : i > 1 && (e.result +=
|
|
2135
|
+
function xt(e, i) {
|
|
2136
|
+
i === 1 ? e.result += " " : i > 1 && (e.result += ce.repeat(`
|
|
2137
2137
|
`, i - 1));
|
|
2138
2138
|
}
|
|
2139
2139
|
function Ho(e, i, t) {
|
|
2140
2140
|
var a, r, n, o, s, l, d, m, p = e.kind, _ = e.result, h;
|
|
2141
|
-
if (h = e.input.charCodeAt(e.position),
|
|
2141
|
+
if (h = e.input.charCodeAt(e.position), ve(h) || qe(h) || h === 35 || h === 38 || h === 42 || h === 33 || h === 124 || h === 62 || h === 39 || h === 34 || h === 37 || h === 64 || h === 96 || (h === 63 || h === 45) && (r = e.input.charCodeAt(e.position + 1), ve(r) || t && qe(r)))
|
|
2142
2142
|
return !1;
|
|
2143
2143
|
for (e.kind = "scalar", e.result = "", n = o = e.position, s = !1; h !== 0; ) {
|
|
2144
2144
|
if (h === 58) {
|
|
2145
|
-
if (r = e.input.charCodeAt(e.position + 1),
|
|
2145
|
+
if (r = e.input.charCodeAt(e.position + 1), ve(r) || t && qe(r))
|
|
2146
2146
|
break;
|
|
2147
2147
|
} else if (h === 35) {
|
|
2148
|
-
if (a = e.input.charCodeAt(e.position - 1),
|
|
2148
|
+
if (a = e.input.charCodeAt(e.position - 1), ve(a))
|
|
2149
2149
|
break;
|
|
2150
2150
|
} else {
|
|
2151
|
-
if (e.position === e.lineStart &&
|
|
2151
|
+
if (e.position === e.lineStart && at(e) || t && qe(h))
|
|
2152
2152
|
break;
|
|
2153
|
-
if (
|
|
2154
|
-
if (l = e.line, d = e.lineStart, m = e.lineIndent,
|
|
2153
|
+
if (_e(h))
|
|
2154
|
+
if (l = e.line, d = e.lineStart, m = e.lineIndent, se(e, !1, -1), e.lineIndent >= i) {
|
|
2155
2155
|
s = !0, h = e.input.charCodeAt(e.position);
|
|
2156
2156
|
continue;
|
|
2157
2157
|
} else {
|
|
@@ -2159,9 +2159,9 @@ function Ho(e, i, t) {
|
|
|
2159
2159
|
break;
|
|
2160
2160
|
}
|
|
2161
2161
|
}
|
|
2162
|
-
s && (
|
|
2162
|
+
s && (Se(e, n, o, !1), xt(e, e.line - l), n = o = e.position, s = !1), Me(h) || (o = e.position + 1), h = e.input.charCodeAt(++e.position);
|
|
2163
2163
|
}
|
|
2164
|
-
return
|
|
2164
|
+
return Se(e, n, o, !1), e.result ? !0 : (e.kind = p, e.result = _, !1);
|
|
2165
2165
|
}
|
|
2166
2166
|
function zo(e, i) {
|
|
2167
2167
|
var t, a, r;
|
|
@@ -2169,55 +2169,55 @@ function zo(e, i) {
|
|
|
2169
2169
|
return !1;
|
|
2170
2170
|
for (e.kind = "scalar", e.result = "", e.position++, a = r = e.position; (t = e.input.charCodeAt(e.position)) !== 0; )
|
|
2171
2171
|
if (t === 39)
|
|
2172
|
-
if (
|
|
2172
|
+
if (Se(e, a, e.position, !0), t = e.input.charCodeAt(++e.position), t === 39)
|
|
2173
2173
|
a = e.position, e.position++, r = e.position;
|
|
2174
2174
|
else
|
|
2175
2175
|
return !0;
|
|
2176
2176
|
else
|
|
2177
|
-
|
|
2178
|
-
|
|
2177
|
+
_e(t) ? (Se(e, a, r, !0), xt(e, se(e, !1, i)), a = r = e.position) : e.position === e.lineStart && at(e) ? E(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
2178
|
+
E(e, "unexpected end of the stream within a single quoted scalar");
|
|
2179
2179
|
}
|
|
2180
|
-
function
|
|
2180
|
+
function Jo(e, i) {
|
|
2181
2181
|
var t, a, r, n, o, s;
|
|
2182
2182
|
if (s = e.input.charCodeAt(e.position), s !== 34)
|
|
2183
2183
|
return !1;
|
|
2184
2184
|
for (e.kind = "scalar", e.result = "", e.position++, t = a = e.position; (s = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
2185
2185
|
if (s === 34)
|
|
2186
|
-
return
|
|
2186
|
+
return Se(e, t, e.position, !0), e.position++, !0;
|
|
2187
2187
|
if (s === 92) {
|
|
2188
|
-
if (
|
|
2189
|
-
|
|
2188
|
+
if (Se(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), _e(s))
|
|
2189
|
+
se(e, !1, i);
|
|
2190
2190
|
else if (s < 256 && Pi[s])
|
|
2191
2191
|
e.result += Ri[s], e.position++;
|
|
2192
2192
|
else if ((o = Bo(s)) > 0) {
|
|
2193
2193
|
for (r = o, n = 0; r > 0; r--)
|
|
2194
|
-
s = e.input.charCodeAt(++e.position), (o = Ko(s)) >= 0 ? n = (n << 4) + o :
|
|
2194
|
+
s = e.input.charCodeAt(++e.position), (o = Ko(s)) >= 0 ? n = (n << 4) + o : E(e, "expected hexadecimal character");
|
|
2195
2195
|
e.result += Ro(n), e.position++;
|
|
2196
2196
|
} else
|
|
2197
|
-
|
|
2197
|
+
E(e, "unknown escape sequence");
|
|
2198
2198
|
t = a = e.position;
|
|
2199
2199
|
} else
|
|
2200
|
-
|
|
2200
|
+
_e(s) ? (Se(e, t, a, !0), xt(e, se(e, !1, i)), t = a = e.position) : e.position === e.lineStart && at(e) ? E(e, "unexpected end of the document within a double quoted scalar") : (e.position++, a = e.position);
|
|
2201
2201
|
}
|
|
2202
|
-
|
|
2202
|
+
E(e, "unexpected end of the stream within a double quoted scalar");
|
|
2203
2203
|
}
|
|
2204
|
-
function
|
|
2205
|
-
var t = !0, a, r, n, o = e.tag, s, l = e.anchor, d, m, p, _, h,
|
|
2206
|
-
if (
|
|
2204
|
+
function Go(e, i) {
|
|
2205
|
+
var t = !0, a, r, n, o = e.tag, s, l = e.anchor, d, m, p, _, h, A = /* @__PURE__ */ Object.create(null), b, M, S, x;
|
|
2206
|
+
if (x = e.input.charCodeAt(e.position), x === 91)
|
|
2207
2207
|
m = 93, h = !1, s = [];
|
|
2208
|
-
else if (
|
|
2208
|
+
else if (x === 123)
|
|
2209
2209
|
m = 125, h = !0, s = {};
|
|
2210
2210
|
else
|
|
2211
2211
|
return !1;
|
|
2212
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = s),
|
|
2213
|
-
if (
|
|
2212
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), x = e.input.charCodeAt(++e.position); x !== 0; ) {
|
|
2213
|
+
if (se(e, !0, i), x = e.input.charCodeAt(e.position), x === m)
|
|
2214
2214
|
return e.position++, e.tag = o, e.anchor = l, e.kind = h ? "mapping" : "sequence", e.result = s, !0;
|
|
2215
|
-
t ?
|
|
2215
|
+
t ? x === 44 && E(e, "expected the node content, but found ','") : E(e, "missed comma between flow collection entries"), M = b = S = null, p = _ = !1, x === 63 && (d = e.input.charCodeAt(e.position + 1), ve(d) && (p = _ = !0, e.position++, se(e, !0, i))), a = e.line, r = e.lineStart, n = e.position, Ke(e, i, Qe, !1, !0), M = e.tag, b = e.result, se(e, !0, i), x = e.input.charCodeAt(e.position), (_ || e.line === a) && x === 58 && (p = !0, x = e.input.charCodeAt(++e.position), se(e, !0, i), Ke(e, i, Qe, !1, !0), S = e.result), h ? Ue(e, s, A, M, b, S, a, r, n) : p ? s.push(Ue(e, null, A, M, b, S, a, r, n)) : s.push(b), se(e, !0, i), x = e.input.charCodeAt(e.position), x === 44 ? (t = !0, x = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2216
2216
|
}
|
|
2217
|
-
|
|
2217
|
+
E(e, "unexpected end of the stream within a flow collection");
|
|
2218
2218
|
}
|
|
2219
2219
|
function Yo(e, i) {
|
|
2220
|
-
var t, a, r =
|
|
2220
|
+
var t, a, r = ut, n = !1, o = !1, s = i, l = 0, d = !1, m, p;
|
|
2221
2221
|
if (p = e.input.charCodeAt(e.position), p === 124)
|
|
2222
2222
|
a = !1;
|
|
2223
2223
|
else if (p === 62)
|
|
@@ -2226,9 +2226,9 @@ function Yo(e, i) {
|
|
|
2226
2226
|
return !1;
|
|
2227
2227
|
for (e.kind = "scalar", e.result = ""; p !== 0; )
|
|
2228
2228
|
if (p = e.input.charCodeAt(++e.position), p === 43 || p === 45)
|
|
2229
|
-
|
|
2229
|
+
ut === r ? r = p === 43 ? Kt : No : E(e, "repeat of a chomping mode identifier");
|
|
2230
2230
|
else if ((m = Po(p)) >= 0)
|
|
2231
|
-
m === 0 ?
|
|
2231
|
+
m === 0 ? E(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? E(e, "repeat of an indentation width identifier") : (s = i + m - 1, o = !0);
|
|
2232
2232
|
else
|
|
2233
2233
|
break;
|
|
2234
2234
|
if (Me(p)) {
|
|
@@ -2238,28 +2238,28 @@ function Yo(e, i) {
|
|
|
2238
2238
|
if (p === 35)
|
|
2239
2239
|
do
|
|
2240
2240
|
p = e.input.charCodeAt(++e.position);
|
|
2241
|
-
while (!
|
|
2241
|
+
while (!_e(p) && p !== 0);
|
|
2242
2242
|
}
|
|
2243
2243
|
for (; p !== 0; ) {
|
|
2244
|
-
for (
|
|
2244
|
+
for (At(e), e.lineIndent = 0, p = e.input.charCodeAt(e.position); (!o || e.lineIndent < s) && p === 32; )
|
|
2245
2245
|
e.lineIndent++, p = e.input.charCodeAt(++e.position);
|
|
2246
|
-
if (!o && e.lineIndent > s && (s = e.lineIndent),
|
|
2246
|
+
if (!o && e.lineIndent > s && (s = e.lineIndent), _e(p)) {
|
|
2247
2247
|
l++;
|
|
2248
2248
|
continue;
|
|
2249
2249
|
}
|
|
2250
2250
|
if (e.lineIndent < s) {
|
|
2251
|
-
r === Kt ? e.result +=
|
|
2252
|
-
`, n ? 1 + l : l) : r ===
|
|
2251
|
+
r === Kt ? e.result += ce.repeat(`
|
|
2252
|
+
`, n ? 1 + l : l) : r === ut && n && (e.result += `
|
|
2253
2253
|
`);
|
|
2254
2254
|
break;
|
|
2255
2255
|
}
|
|
2256
|
-
for (a ? Me(p) ? (d = !0, e.result +=
|
|
2257
|
-
`, n ? 1 + l : l)) : d ? (d = !1, e.result +=
|
|
2258
|
-
`, l + 1)) : l === 0 ? n && (e.result += " ") : e.result +=
|
|
2259
|
-
`, l) : e.result +=
|
|
2260
|
-
`, n ? 1 + l : l), n = !0, o = !0, l = 0, t = e.position; !
|
|
2256
|
+
for (a ? Me(p) ? (d = !0, e.result += ce.repeat(`
|
|
2257
|
+
`, n ? 1 + l : l)) : d ? (d = !1, e.result += ce.repeat(`
|
|
2258
|
+
`, l + 1)) : l === 0 ? n && (e.result += " ") : e.result += ce.repeat(`
|
|
2259
|
+
`, l) : e.result += ce.repeat(`
|
|
2260
|
+
`, n ? 1 + l : l), n = !0, o = !0, l = 0, t = e.position; !_e(p) && p !== 0; )
|
|
2261
2261
|
p = e.input.charCodeAt(++e.position);
|
|
2262
|
-
|
|
2262
|
+
Se(e, t, e.position, !1);
|
|
2263
2263
|
}
|
|
2264
2264
|
return !0;
|
|
2265
2265
|
}
|
|
@@ -2267,141 +2267,141 @@ function Ht(e, i) {
|
|
|
2267
2267
|
var t, a = e.tag, r = e.anchor, n = [], o, s = !1, l;
|
|
2268
2268
|
if (e.firstTabInLine !== -1)
|
|
2269
2269
|
return !1;
|
|
2270
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = n), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2271
|
-
if (s = !0, e.position++,
|
|
2270
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = n), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, E(e, "tab characters must not be used in indentation")), !(l !== 45 || (o = e.input.charCodeAt(e.position + 1), !ve(o)))); ) {
|
|
2271
|
+
if (s = !0, e.position++, se(e, !0, -1) && e.lineIndent <= i) {
|
|
2272
2272
|
n.push(null), l = e.input.charCodeAt(e.position);
|
|
2273
2273
|
continue;
|
|
2274
2274
|
}
|
|
2275
|
-
if (t = e.line,
|
|
2276
|
-
|
|
2275
|
+
if (t = e.line, Ke(e, i, Li, !1, !0), n.push(e.result), se(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > i) && l !== 0)
|
|
2276
|
+
E(e, "bad indentation of a sequence entry");
|
|
2277
2277
|
else if (e.lineIndent < i)
|
|
2278
2278
|
break;
|
|
2279
2279
|
}
|
|
2280
2280
|
return s ? (e.tag = a, e.anchor = r, e.kind = "sequence", e.result = n, !0) : !1;
|
|
2281
2281
|
}
|
|
2282
2282
|
function Wo(e, i, t) {
|
|
2283
|
-
var a, r, n, o, s, l, d = e.tag, m = e.anchor, p = {}, _ = /* @__PURE__ */ Object.create(null), h = null,
|
|
2283
|
+
var a, r, n, o, s, l, d = e.tag, m = e.anchor, p = {}, _ = /* @__PURE__ */ Object.create(null), h = null, A = null, b = null, M = !1, S = !1, x;
|
|
2284
2284
|
if (e.firstTabInLine !== -1)
|
|
2285
2285
|
return !1;
|
|
2286
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = p),
|
|
2287
|
-
if (
|
|
2288
|
-
|
|
2286
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = p), x = e.input.charCodeAt(e.position); x !== 0; ) {
|
|
2287
|
+
if (!M && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, E(e, "tab characters must not be used in indentation")), a = e.input.charCodeAt(e.position + 1), n = e.line, (x === 63 || x === 58) && ve(a))
|
|
2288
|
+
x === 63 ? (M && (Ue(e, p, _, h, A, null, o, s, l), h = A = b = null), S = !0, M = !0, r = !0) : M ? (M = !1, r = !0) : E(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, x = a;
|
|
2289
2289
|
else {
|
|
2290
|
-
if (o = e.line, s = e.lineStart, l = e.position, !
|
|
2290
|
+
if (o = e.line, s = e.lineStart, l = e.position, !Ke(e, t, Ui, !1, !0))
|
|
2291
2291
|
break;
|
|
2292
2292
|
if (e.line === n) {
|
|
2293
|
-
for (
|
|
2294
|
-
|
|
2295
|
-
if (
|
|
2296
|
-
|
|
2293
|
+
for (x = e.input.charCodeAt(e.position); Me(x); )
|
|
2294
|
+
x = e.input.charCodeAt(++e.position);
|
|
2295
|
+
if (x === 58)
|
|
2296
|
+
x = e.input.charCodeAt(++e.position), ve(x) || E(e, "a whitespace character is expected after the key-value separator within a block mapping"), M && (Ue(e, p, _, h, A, null, o, s, l), h = A = b = null), S = !0, M = !1, r = !1, h = e.tag, A = e.result;
|
|
2297
2297
|
else if (S)
|
|
2298
|
-
|
|
2298
|
+
E(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2299
2299
|
else
|
|
2300
2300
|
return e.tag = d, e.anchor = m, !0;
|
|
2301
2301
|
} else if (S)
|
|
2302
|
-
|
|
2302
|
+
E(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2303
2303
|
else
|
|
2304
2304
|
return e.tag = d, e.anchor = m, !0;
|
|
2305
2305
|
}
|
|
2306
|
-
if ((e.line === n || e.lineIndent > i) && (
|
|
2307
|
-
|
|
2306
|
+
if ((e.line === n || e.lineIndent > i) && (M && (o = e.line, s = e.lineStart, l = e.position), Ke(e, i, Xe, !0, r) && (M ? A = e.result : b = e.result), M || (Ue(e, p, _, h, A, b, o, s, l), h = A = b = null), se(e, !0, -1), x = e.input.charCodeAt(e.position)), (e.line === n || e.lineIndent > i) && x !== 0)
|
|
2307
|
+
E(e, "bad indentation of a mapping entry");
|
|
2308
2308
|
else if (e.lineIndent < i)
|
|
2309
2309
|
break;
|
|
2310
2310
|
}
|
|
2311
|
-
return
|
|
2311
|
+
return M && Ue(e, p, _, h, A, null, o, s, l), S && (e.tag = d, e.anchor = m, e.kind = "mapping", e.result = p), S;
|
|
2312
2312
|
}
|
|
2313
2313
|
function Zo(e) {
|
|
2314
2314
|
var i, t = !1, a = !1, r, n, o;
|
|
2315
2315
|
if (o = e.input.charCodeAt(e.position), o !== 33)
|
|
2316
2316
|
return !1;
|
|
2317
|
-
if (e.tag !== null &&
|
|
2317
|
+
if (e.tag !== null && E(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (t = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (a = !0, r = "!!", o = e.input.charCodeAt(++e.position)) : r = "!", i = e.position, t) {
|
|
2318
2318
|
do
|
|
2319
2319
|
o = e.input.charCodeAt(++e.position);
|
|
2320
2320
|
while (o !== 0 && o !== 62);
|
|
2321
|
-
e.position < e.length ? (n = e.input.slice(i, e.position), o = e.input.charCodeAt(++e.position)) :
|
|
2321
|
+
e.position < e.length ? (n = e.input.slice(i, e.position), o = e.input.charCodeAt(++e.position)) : E(e, "unexpected end of the stream within a verbatim tag");
|
|
2322
2322
|
} else {
|
|
2323
|
-
for (; o !== 0 && !
|
|
2324
|
-
o === 33 && (a ?
|
|
2325
|
-
n = e.input.slice(i, e.position), Lo.test(n) &&
|
|
2323
|
+
for (; o !== 0 && !ve(o); )
|
|
2324
|
+
o === 33 && (a ? E(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(i - 1, e.position + 1), Ki.test(r) || E(e, "named tag handle cannot contain such characters"), a = !0, i = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
2325
|
+
n = e.input.slice(i, e.position), Lo.test(n) && E(e, "tag suffix cannot contain flow indicator characters");
|
|
2326
2326
|
}
|
|
2327
|
-
n && !Bi.test(n) &&
|
|
2327
|
+
n && !Bi.test(n) && E(e, "tag name cannot contain such characters: " + n);
|
|
2328
2328
|
try {
|
|
2329
2329
|
n = decodeURIComponent(n);
|
|
2330
2330
|
} catch {
|
|
2331
|
-
|
|
2331
|
+
E(e, "tag name is malformed: " + n);
|
|
2332
2332
|
}
|
|
2333
|
-
return t ? e.tag = n :
|
|
2333
|
+
return t ? e.tag = n : Ae.call(e.tagMap, r) ? e.tag = e.tagMap[r] + n : r === "!" ? e.tag = "!" + n : r === "!!" ? e.tag = "tag:yaml.org,2002:" + n : E(e, 'undeclared tag handle "' + r + '"'), !0;
|
|
2334
2334
|
}
|
|
2335
2335
|
function Qo(e) {
|
|
2336
2336
|
var i, t;
|
|
2337
2337
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2338
2338
|
return !1;
|
|
2339
|
-
for (e.anchor !== null &&
|
|
2339
|
+
for (e.anchor !== null && E(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), i = e.position; t !== 0 && !ve(t) && !qe(t); )
|
|
2340
2340
|
t = e.input.charCodeAt(++e.position);
|
|
2341
|
-
return e.position === i &&
|
|
2341
|
+
return e.position === i && E(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(i, e.position), !0;
|
|
2342
2342
|
}
|
|
2343
2343
|
function Xo(e) {
|
|
2344
2344
|
var i, t, a;
|
|
2345
2345
|
if (a = e.input.charCodeAt(e.position), a !== 42)
|
|
2346
2346
|
return !1;
|
|
2347
|
-
for (a = e.input.charCodeAt(++e.position), i = e.position; a !== 0 && !
|
|
2347
|
+
for (a = e.input.charCodeAt(++e.position), i = e.position; a !== 0 && !ve(a) && !qe(a); )
|
|
2348
2348
|
a = e.input.charCodeAt(++e.position);
|
|
2349
|
-
return e.position === i &&
|
|
2349
|
+
return e.position === i && E(e, "name of an alias node must contain at least one character"), t = e.input.slice(i, e.position), Ae.call(e.anchorMap, t) || E(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], se(e, !0, -1), !0;
|
|
2350
2350
|
}
|
|
2351
|
-
function
|
|
2352
|
-
var n, o, s, l = 1, d = !1, m = !1, p, _, h,
|
|
2353
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, n = o = s =
|
|
2351
|
+
function Ke(e, i, t, a, r) {
|
|
2352
|
+
var n, o, s, l = 1, d = !1, m = !1, p, _, h, A, b, M;
|
|
2353
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, n = o = s = Xe === t || Li === t, a && se(e, !0, -1) && (d = !0, e.lineIndent > i ? l = 1 : e.lineIndent === i ? l = 0 : e.lineIndent < i && (l = -1)), l === 1)
|
|
2354
2354
|
for (; Zo(e) || Qo(e); )
|
|
2355
|
-
|
|
2356
|
-
if (s && (s = d || r), (l === 1 ||
|
|
2355
|
+
se(e, !0, -1) ? (d = !0, s = n, e.lineIndent > i ? l = 1 : e.lineIndent === i ? l = 0 : e.lineIndent < i && (l = -1)) : s = !1;
|
|
2356
|
+
if (s && (s = d || r), (l === 1 || Xe === t) && (Qe === t || Ui === t ? b = i : b = i + 1, M = e.position - e.lineStart, l === 1 ? s && (Ht(e, M) || Wo(e, M, b)) || Go(e, b) ? m = !0 : (o && Yo(e, b) || zo(e, b) || Jo(e, b) ? m = !0 : Xo(e) ? (m = !0, (e.tag !== null || e.anchor !== null) && E(e, "alias node should not have any properties")) : Ho(e, b, Qe === t) && (m = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (m = s && Ht(e, M))), e.tag === null)
|
|
2357
2357
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2358
2358
|
else if (e.tag === "?") {
|
|
2359
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2360
|
-
if (
|
|
2361
|
-
e.result =
|
|
2359
|
+
for (e.result !== null && e.kind !== "scalar" && E(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), p = 0, _ = e.implicitTypes.length; p < _; p += 1)
|
|
2360
|
+
if (A = e.implicitTypes[p], A.resolve(e.result)) {
|
|
2361
|
+
e.result = A.construct(e.result), e.tag = A.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2362
2362
|
break;
|
|
2363
2363
|
}
|
|
2364
2364
|
} else if (e.tag !== "!") {
|
|
2365
|
-
if (
|
|
2366
|
-
|
|
2365
|
+
if (Ae.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2366
|
+
A = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2367
2367
|
else
|
|
2368
|
-
for (
|
|
2368
|
+
for (A = null, h = e.typeMap.multi[e.kind || "fallback"], p = 0, _ = h.length; p < _; p += 1)
|
|
2369
2369
|
if (e.tag.slice(0, h[p].tag.length) === h[p].tag) {
|
|
2370
|
-
|
|
2370
|
+
A = h[p];
|
|
2371
2371
|
break;
|
|
2372
2372
|
}
|
|
2373
|
-
|
|
2373
|
+
A || E(e, "unknown tag !<" + e.tag + ">"), e.result !== null && A.kind !== e.kind && E(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + A.kind + '", not "' + e.kind + '"'), A.resolve(e.result, e.tag) ? (e.result = A.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : E(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2374
2374
|
}
|
|
2375
2375
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || m;
|
|
2376
2376
|
}
|
|
2377
2377
|
function en(e) {
|
|
2378
2378
|
var i = e.position, t, a, r, n = !1, o;
|
|
2379
|
-
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (
|
|
2380
|
-
for (n = !0, o = e.input.charCodeAt(++e.position), t = e.position; o !== 0 && !
|
|
2379
|
+
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (se(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
2380
|
+
for (n = !0, o = e.input.charCodeAt(++e.position), t = e.position; o !== 0 && !ve(o); )
|
|
2381
2381
|
o = e.input.charCodeAt(++e.position);
|
|
2382
|
-
for (a = e.input.slice(t, e.position), r = [], a.length < 1 &&
|
|
2382
|
+
for (a = e.input.slice(t, e.position), r = [], a.length < 1 && E(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
2383
2383
|
for (; Me(o); )
|
|
2384
2384
|
o = e.input.charCodeAt(++e.position);
|
|
2385
2385
|
if (o === 35) {
|
|
2386
2386
|
do
|
|
2387
2387
|
o = e.input.charCodeAt(++e.position);
|
|
2388
|
-
while (o !== 0 && !
|
|
2388
|
+
while (o !== 0 && !_e(o));
|
|
2389
2389
|
break;
|
|
2390
2390
|
}
|
|
2391
|
-
if (
|
|
2391
|
+
if (_e(o))
|
|
2392
2392
|
break;
|
|
2393
|
-
for (t = e.position; o !== 0 && !
|
|
2393
|
+
for (t = e.position; o !== 0 && !ve(o); )
|
|
2394
2394
|
o = e.input.charCodeAt(++e.position);
|
|
2395
2395
|
r.push(e.input.slice(t, e.position));
|
|
2396
2396
|
}
|
|
2397
|
-
o !== 0 &&
|
|
2397
|
+
o !== 0 && At(e), Ae.call(Rt, a) ? Rt[a](e, a, r) : et(e, 'unknown document directive "' + a + '"');
|
|
2398
2398
|
}
|
|
2399
|
-
if (
|
|
2400
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
2399
|
+
if (se(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, se(e, !0, -1)) : n && E(e, "directives end mark is expected"), Ke(e, e.lineIndent - 1, Xe, !1, !0), se(e, !0, -1), e.checkLineBreaks && Uo.test(e.input.slice(i, e.position)) && et(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && at(e)) {
|
|
2400
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, se(e, !0, -1));
|
|
2401
2401
|
return;
|
|
2402
2402
|
}
|
|
2403
2403
|
if (e.position < e.length - 1)
|
|
2404
|
-
|
|
2404
|
+
E(e, "end of the stream or a document separator is expected");
|
|
2405
2405
|
else
|
|
2406
2406
|
return;
|
|
2407
2407
|
}
|
|
@@ -2409,7 +2409,7 @@ function Hi(e, i) {
|
|
|
2409
2409
|
e = String(e), i = i || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2410
2410
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2411
2411
|
var t = new Do(e, i), a = e.indexOf("\0");
|
|
2412
|
-
for (a !== -1 && (t.position = a,
|
|
2412
|
+
for (a !== -1 && (t.position = a, E(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2413
2413
|
t.lineIndent += 1, t.position += 1;
|
|
2414
2414
|
for (; t.position < t.length - 1; )
|
|
2415
2415
|
en(t);
|
|
@@ -2428,28 +2428,28 @@ function rn(e, i) {
|
|
|
2428
2428
|
if (t.length !== 0) {
|
|
2429
2429
|
if (t.length === 1)
|
|
2430
2430
|
return t[0];
|
|
2431
|
-
throw new
|
|
2431
|
+
throw new ye("expected a single document in the stream, but found more");
|
|
2432
2432
|
}
|
|
2433
2433
|
}
|
|
2434
2434
|
var an = tn, on = rn, zi = {
|
|
2435
2435
|
loadAll: an,
|
|
2436
2436
|
load: on
|
|
2437
|
-
},
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2437
|
+
}, Ji = Object.prototype.toString, Gi = Object.prototype.hasOwnProperty, Tt = 65279, nn = 9, Je = 10, ln = 13, sn = 32, cn = 33, un = 34, mt = 35, dn = 37, pn = 38, fn = 39, mn = 42, Yi = 44, gn = 45, tt = 58, yn = 61, vn = 62, hn = 63, bn = 64, Wi = 91, Zi = 93, wn = 96, Qi = 123, _n = 124, Xi = 125, ge = {};
|
|
2438
|
+
ge[0] = "\\0";
|
|
2439
|
+
ge[7] = "\\a";
|
|
2440
|
+
ge[8] = "\\b";
|
|
2441
|
+
ge[9] = "\\t";
|
|
2442
|
+
ge[10] = "\\n";
|
|
2443
|
+
ge[11] = "\\v";
|
|
2444
|
+
ge[12] = "\\f";
|
|
2445
|
+
ge[13] = "\\r";
|
|
2446
|
+
ge[27] = "\\e";
|
|
2447
|
+
ge[34] = '\\"';
|
|
2448
|
+
ge[92] = "\\\\";
|
|
2449
|
+
ge[133] = "\\N";
|
|
2450
|
+
ge[160] = "\\_";
|
|
2451
|
+
ge[8232] = "\\L";
|
|
2452
|
+
ge[8233] = "\\P";
|
|
2453
2453
|
var kn = [
|
|
2454
2454
|
"y",
|
|
2455
2455
|
"Y",
|
|
@@ -2473,7 +2473,7 @@ function Sn(e, i) {
|
|
|
2473
2473
|
if (i === null)
|
|
2474
2474
|
return {};
|
|
2475
2475
|
for (t = {}, a = Object.keys(i), r = 0, n = a.length; r < n; r += 1)
|
|
2476
|
-
o = a[r], s = String(i[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), l = e.compiledTypeMap.fallback[o], l &&
|
|
2476
|
+
o = a[r], s = String(i[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), l = e.compiledTypeMap.fallback[o], l && Gi.call(l.styleAliases, s) && (s = l.styleAliases[s]), t[o] = s;
|
|
2477
2477
|
return t;
|
|
2478
2478
|
}
|
|
2479
2479
|
function In(e) {
|
|
@@ -2485,23 +2485,23 @@ function In(e) {
|
|
|
2485
2485
|
else if (e <= 4294967295)
|
|
2486
2486
|
t = "U", a = 8;
|
|
2487
2487
|
else
|
|
2488
|
-
throw new
|
|
2489
|
-
return "\\" + t +
|
|
2488
|
+
throw new ye("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2489
|
+
return "\\" + t + ce.repeat("0", a - i.length) + i;
|
|
2490
2490
|
}
|
|
2491
|
-
var An = 1,
|
|
2491
|
+
var An = 1, Ge = 2;
|
|
2492
2492
|
function xn(e) {
|
|
2493
|
-
this.schema = e.schema ||
|
|
2493
|
+
this.schema = e.schema || It, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ce.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Sn(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 === '"' ? Ge : An, 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;
|
|
2494
2494
|
}
|
|
2495
2495
|
function zt(e, i) {
|
|
2496
|
-
for (var t =
|
|
2496
|
+
for (var t = ce.repeat(" ", i), a = 0, r = -1, n = "", o, s = e.length; a < s; )
|
|
2497
2497
|
r = e.indexOf(`
|
|
2498
2498
|
`, a), r === -1 ? (o = e.slice(a), a = s) : (o = e.slice(a, r + 1), a = r + 1), o.length && o !== `
|
|
2499
2499
|
` && (n += t), n += o;
|
|
2500
2500
|
return n;
|
|
2501
2501
|
}
|
|
2502
|
-
function
|
|
2502
|
+
function gt(e, i) {
|
|
2503
2503
|
return `
|
|
2504
|
-
` +
|
|
2504
|
+
` + ce.repeat(" ", e.indent * i);
|
|
2505
2505
|
}
|
|
2506
2506
|
function Tn(e, i) {
|
|
2507
2507
|
var t, a, r;
|
|
@@ -2510,30 +2510,30 @@ function Tn(e, i) {
|
|
|
2510
2510
|
return !0;
|
|
2511
2511
|
return !1;
|
|
2512
2512
|
}
|
|
2513
|
-
function
|
|
2513
|
+
function it(e) {
|
|
2514
2514
|
return e === sn || e === nn;
|
|
2515
2515
|
}
|
|
2516
2516
|
function Ye(e) {
|
|
2517
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2517
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Tt || 65536 <= e && e <= 1114111;
|
|
2518
2518
|
}
|
|
2519
|
-
function
|
|
2520
|
-
return Ye(e) && e !==
|
|
2519
|
+
function Jt(e) {
|
|
2520
|
+
return Ye(e) && e !== Tt && e !== ln && e !== Je;
|
|
2521
2521
|
}
|
|
2522
|
-
function
|
|
2523
|
-
var a =
|
|
2522
|
+
function Gt(e, i, t) {
|
|
2523
|
+
var a = Jt(e), r = a && !it(e);
|
|
2524
2524
|
return (
|
|
2525
2525
|
// ns-plain-safe
|
|
2526
2526
|
(t ? (
|
|
2527
2527
|
// c = flow-in
|
|
2528
2528
|
a
|
|
2529
|
-
) : a && e !== Yi && e !== Wi && e !== Zi && e !== Qi && e !== Xi) && e !==
|
|
2529
|
+
) : a && e !== Yi && e !== Wi && e !== Zi && e !== Qi && e !== Xi) && e !== mt && !(i === tt && !r) || Jt(i) && !it(i) && e === mt || i === tt && r
|
|
2530
2530
|
);
|
|
2531
2531
|
}
|
|
2532
2532
|
function jn(e) {
|
|
2533
|
-
return Ye(e) && e !==
|
|
2533
|
+
return Ye(e) && e !== Tt && !it(e) && e !== gn && e !== hn && e !== tt && e !== Yi && e !== Wi && e !== Zi && e !== Qi && e !== Xi && e !== mt && e !== pn && e !== mn && e !== cn && e !== _n && e !== yn && e !== vn && e !== fn && e !== un && e !== dn && e !== bn && e !== wn;
|
|
2534
2534
|
}
|
|
2535
2535
|
function Mn(e) {
|
|
2536
|
-
return !
|
|
2536
|
+
return !it(e) && e !== tt;
|
|
2537
2537
|
}
|
|
2538
2538
|
function Pe(e, i) {
|
|
2539
2539
|
var t = e.charCodeAt(i), a;
|
|
@@ -2543,34 +2543,34 @@ function er(e) {
|
|
|
2543
2543
|
var i = /^\n* /;
|
|
2544
2544
|
return i.test(e);
|
|
2545
2545
|
}
|
|
2546
|
-
var tr = 1,
|
|
2546
|
+
var tr = 1, yt = 2, ir = 3, rr = 4, Ne = 5;
|
|
2547
2547
|
function $n(e, i, t, a, r, n, o, s) {
|
|
2548
|
-
var l, d = 0, m = null, p = !1, _ = !1, h = a !== -1,
|
|
2548
|
+
var l, d = 0, m = null, p = !1, _ = !1, h = a !== -1, A = -1, b = jn(Pe(e, 0)) && Mn(Pe(e, e.length - 1));
|
|
2549
2549
|
if (i || o)
|
|
2550
2550
|
for (l = 0; l < e.length; d >= 65536 ? l += 2 : l++) {
|
|
2551
2551
|
if (d = Pe(e, l), !Ye(d))
|
|
2552
|
-
return
|
|
2553
|
-
b = b &&
|
|
2552
|
+
return Ne;
|
|
2553
|
+
b = b && Gt(d, m, s), m = d;
|
|
2554
2554
|
}
|
|
2555
2555
|
else {
|
|
2556
2556
|
for (l = 0; l < e.length; d >= 65536 ? l += 2 : l++) {
|
|
2557
|
-
if (d = Pe(e, l), d ===
|
|
2557
|
+
if (d = Pe(e, l), d === Je)
|
|
2558
2558
|
p = !0, h && (_ = _ || // Foldable line = too long, and not more-indented.
|
|
2559
|
-
l -
|
|
2559
|
+
l - A - 1 > a && e[A + 1] !== " ", A = l);
|
|
2560
2560
|
else if (!Ye(d))
|
|
2561
|
-
return
|
|
2562
|
-
b = b &&
|
|
2561
|
+
return Ne;
|
|
2562
|
+
b = b && Gt(d, m, s), m = d;
|
|
2563
2563
|
}
|
|
2564
|
-
_ = _ || h && l -
|
|
2564
|
+
_ = _ || h && l - A - 1 > a && e[A + 1] !== " ";
|
|
2565
2565
|
}
|
|
2566
|
-
return !p && !_ ? b && !o && !r(e) ? tr : n ===
|
|
2566
|
+
return !p && !_ ? b && !o && !r(e) ? tr : n === Ge ? Ne : yt : t > 9 && er(e) ? Ne : o ? n === Ge ? Ne : yt : _ ? rr : ir;
|
|
2567
2567
|
}
|
|
2568
2568
|
function On(e, i, t, a, r) {
|
|
2569
2569
|
e.dump = function() {
|
|
2570
2570
|
if (i.length === 0)
|
|
2571
|
-
return e.quotingType ===
|
|
2571
|
+
return e.quotingType === Ge ? '""' : "''";
|
|
2572
2572
|
if (!e.noCompatMode && (kn.indexOf(i) !== -1 || Cn.test(i)))
|
|
2573
|
-
return e.quotingType ===
|
|
2573
|
+
return e.quotingType === Ge ? '"' + i + '"' : "'" + i + "'";
|
|
2574
2574
|
var n = e.indent * Math.max(1, t), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - n), s = a || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2575
2575
|
function l(d) {
|
|
2576
2576
|
return Tn(e, d);
|
|
@@ -2587,16 +2587,16 @@ function On(e, i, t, a, r) {
|
|
|
2587
2587
|
)) {
|
|
2588
2588
|
case tr:
|
|
2589
2589
|
return i;
|
|
2590
|
-
case
|
|
2590
|
+
case yt:
|
|
2591
2591
|
return "'" + i.replace(/'/g, "''") + "'";
|
|
2592
2592
|
case ir:
|
|
2593
2593
|
return "|" + Yt(i, e.indent) + Wt(zt(i, n));
|
|
2594
2594
|
case rr:
|
|
2595
2595
|
return ">" + Yt(i, e.indent) + Wt(zt(En(i, o), n));
|
|
2596
|
-
case
|
|
2596
|
+
case Ne:
|
|
2597
2597
|
return '"' + Fn(i) + '"';
|
|
2598
2598
|
default:
|
|
2599
|
-
throw new
|
|
2599
|
+
throw new ye("impossible error: invalid scalar style");
|
|
2600
2600
|
}
|
|
2601
2601
|
}();
|
|
2602
2602
|
}
|
|
@@ -2637,25 +2637,25 @@ function Zt(e, i) {
|
|
|
2637
2637
|
}
|
|
2638
2638
|
function Fn(e) {
|
|
2639
2639
|
for (var i = "", t = 0, a, r = 0; r < e.length; t >= 65536 ? r += 2 : r++)
|
|
2640
|
-
t = Pe(e, r), a =
|
|
2640
|
+
t = Pe(e, r), a = ge[t], !a && Ye(t) ? (i += e[r], t >= 65536 && (i += e[r + 1])) : i += a || In(t);
|
|
2641
2641
|
return i;
|
|
2642
2642
|
}
|
|
2643
2643
|
function Vn(e, i, t) {
|
|
2644
2644
|
var a = "", r = e.tag, n, o, s;
|
|
2645
2645
|
for (n = 0, o = t.length; n < o; n += 1)
|
|
2646
|
-
s = t[n], e.replacer && (s = e.replacer.call(t, String(n), s)), (
|
|
2646
|
+
s = t[n], e.replacer && (s = e.replacer.call(t, String(n), s)), (Ce(e, i, s, !1, !1) || typeof s > "u" && Ce(e, i, null, !1, !1)) && (a !== "" && (a += "," + (e.condenseFlow ? "" : " ")), a += e.dump);
|
|
2647
2647
|
e.tag = r, e.dump = "[" + a + "]";
|
|
2648
2648
|
}
|
|
2649
2649
|
function Qt(e, i, t, a) {
|
|
2650
2650
|
var r = "", n = e.tag, o, s, l;
|
|
2651
2651
|
for (o = 0, s = t.length; o < s; o += 1)
|
|
2652
|
-
l = t[o], e.replacer && (l = e.replacer.call(t, String(o), l)), (
|
|
2652
|
+
l = t[o], e.replacer && (l = e.replacer.call(t, String(o), l)), (Ce(e, i + 1, l, !0, !0, !1, !0) || typeof l > "u" && Ce(e, i + 1, null, !0, !0, !1, !0)) && ((!a || r !== "") && (r += gt(e, i)), e.dump && Je === e.dump.charCodeAt(0) ? r += "-" : r += "- ", r += e.dump);
|
|
2653
2653
|
e.tag = n, e.dump = r || "[]";
|
|
2654
2654
|
}
|
|
2655
2655
|
function Nn(e, i, t) {
|
|
2656
2656
|
var a = "", r = e.tag, n = Object.keys(t), o, s, l, d, m;
|
|
2657
2657
|
for (o = 0, s = n.length; o < s; o += 1)
|
|
2658
|
-
m = "", a !== "" && (m += ", "), e.condenseFlow && (m += '"'), l = n[o], d = t[l], e.replacer && (d = e.replacer.call(t, l, d)),
|
|
2658
|
+
m = "", a !== "" && (m += ", "), e.condenseFlow && (m += '"'), l = n[o], d = t[l], e.replacer && (d = e.replacer.call(t, l, d)), Ce(e, i, l, !1, !1) && (e.dump.length > 1024 && (m += "? "), m += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), Ce(e, i, d, !1, !1) && (m += e.dump, a += m));
|
|
2659
2659
|
e.tag = r, e.dump = "{" + a + "}";
|
|
2660
2660
|
}
|
|
2661
2661
|
function qn(e, i, t, a) {
|
|
@@ -2665,9 +2665,9 @@ function qn(e, i, t, a) {
|
|
|
2665
2665
|
else if (typeof e.sortKeys == "function")
|
|
2666
2666
|
o.sort(e.sortKeys);
|
|
2667
2667
|
else if (e.sortKeys)
|
|
2668
|
-
throw new
|
|
2668
|
+
throw new ye("sortKeys must be a boolean or a function");
|
|
2669
2669
|
for (s = 0, l = o.length; s < l; s += 1)
|
|
2670
|
-
_ = "", (!a || r !== "") && (_ +=
|
|
2670
|
+
_ = "", (!a || r !== "") && (_ += gt(e, i)), d = o[s], m = t[d], e.replacer && (m = e.replacer.call(t, d, m)), Ce(e, i + 1, d, !0, !0, !0) && (p = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, p && (e.dump && Je === e.dump.charCodeAt(0) ? _ += "?" : _ += "? "), _ += e.dump, p && (_ += gt(e, i)), Ce(e, i + 1, m, !0, p) && (e.dump && Je === e.dump.charCodeAt(0) ? _ += ":" : _ += ": ", _ += e.dump, r += _));
|
|
2671
2671
|
e.tag = n, e.dump = r || "{}";
|
|
2672
2672
|
}
|
|
2673
2673
|
function Xt(e, i, t) {
|
|
@@ -2675,21 +2675,21 @@ function Xt(e, i, t) {
|
|
|
2675
2675
|
for (r = t ? e.explicitTypes : e.implicitTypes, n = 0, o = r.length; n < o; n += 1)
|
|
2676
2676
|
if (s = r[n], (s.instanceOf || s.predicate) && (!s.instanceOf || typeof i == "object" && i instanceof s.instanceOf) && (!s.predicate || s.predicate(i))) {
|
|
2677
2677
|
if (t ? s.multi && s.representName ? e.tag = s.representName(i) : e.tag = s.tag : e.tag = "?", s.represent) {
|
|
2678
|
-
if (l = e.styleMap[s.tag] || s.defaultStyle,
|
|
2678
|
+
if (l = e.styleMap[s.tag] || s.defaultStyle, Ji.call(s.represent) === "[object Function]")
|
|
2679
2679
|
a = s.represent(i, l);
|
|
2680
|
-
else if (
|
|
2680
|
+
else if (Gi.call(s.represent, l))
|
|
2681
2681
|
a = s.represent[l](i, l);
|
|
2682
2682
|
else
|
|
2683
|
-
throw new
|
|
2683
|
+
throw new ye("!<" + s.tag + '> tag resolver accepts not "' + l + '" style');
|
|
2684
2684
|
e.dump = a;
|
|
2685
2685
|
}
|
|
2686
2686
|
return !0;
|
|
2687
2687
|
}
|
|
2688
2688
|
return !1;
|
|
2689
2689
|
}
|
|
2690
|
-
function
|
|
2690
|
+
function Ce(e, i, t, a, r, n, o) {
|
|
2691
2691
|
e.tag = null, e.dump = t, Xt(e, t, !1) || Xt(e, t, !0);
|
|
2692
|
-
var s =
|
|
2692
|
+
var s = Ji.call(e.dump), l = a, d;
|
|
2693
2693
|
a && (a = e.flowLevel < 0 || e.flowLevel > i);
|
|
2694
2694
|
var m = s === "[object Object]" || s === "[object Array]", p, _;
|
|
2695
2695
|
if (m && (p = e.duplicates.indexOf(t), _ = p !== -1), (e.tag !== null && e.tag !== "?" || _ || e.indent !== 2 && i > 0) && (r = !1), _ && e.usedDuplicates[p])
|
|
@@ -2704,7 +2704,7 @@ function ke(e, i, t, a, r, n, o) {
|
|
|
2704
2704
|
else {
|
|
2705
2705
|
if (s === "[object Undefined]" || e.skipInvalid)
|
|
2706
2706
|
return !1;
|
|
2707
|
-
throw new
|
|
2707
|
+
throw new ye("unacceptable kind of an object to dump " + s);
|
|
2708
2708
|
}
|
|
2709
2709
|
e.tag !== null && e.tag !== "?" && (d = encodeURI(
|
|
2710
2710
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
@@ -2714,39 +2714,39 @@ function ke(e, i, t, a, r, n, o) {
|
|
|
2714
2714
|
}
|
|
2715
2715
|
function Un(e, i) {
|
|
2716
2716
|
var t = [], a = [], r, n;
|
|
2717
|
-
for (
|
|
2717
|
+
for (vt(e, t, a), r = 0, n = a.length; r < n; r += 1)
|
|
2718
2718
|
i.duplicates.push(t[a[r]]);
|
|
2719
2719
|
i.usedDuplicates = new Array(n);
|
|
2720
2720
|
}
|
|
2721
|
-
function
|
|
2721
|
+
function vt(e, i, t) {
|
|
2722
2722
|
var a, r, n;
|
|
2723
2723
|
if (e !== null && typeof e == "object")
|
|
2724
2724
|
if (r = i.indexOf(e), r !== -1)
|
|
2725
2725
|
t.indexOf(r) === -1 && t.push(r);
|
|
2726
2726
|
else if (i.push(e), Array.isArray(e))
|
|
2727
2727
|
for (r = 0, n = e.length; r < n; r += 1)
|
|
2728
|
-
|
|
2728
|
+
vt(e[r], i, t);
|
|
2729
2729
|
else
|
|
2730
2730
|
for (a = Object.keys(e), r = 0, n = a.length; r < n; r += 1)
|
|
2731
|
-
|
|
2731
|
+
vt(e[a[r]], i, t);
|
|
2732
2732
|
}
|
|
2733
2733
|
function Ln(e, i) {
|
|
2734
2734
|
i = i || {};
|
|
2735
2735
|
var t = new xn(i);
|
|
2736
2736
|
t.noRefs || Un(e, t);
|
|
2737
2737
|
var a = e;
|
|
2738
|
-
return t.replacer && (a = t.replacer.call({ "": a }, "", a)),
|
|
2738
|
+
return t.replacer && (a = t.replacer.call({ "": a }, "", a)), Ce(t, 0, a, !0, !0) ? t.dump + `
|
|
2739
2739
|
` : "";
|
|
2740
2740
|
}
|
|
2741
2741
|
var Kn = Ln, Bn = {
|
|
2742
2742
|
dump: Kn
|
|
2743
2743
|
};
|
|
2744
|
-
function
|
|
2744
|
+
function jt(e, i) {
|
|
2745
2745
|
return function() {
|
|
2746
2746
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + i + " instead, which is now safe by default.");
|
|
2747
2747
|
};
|
|
2748
2748
|
}
|
|
2749
|
-
var Pn =
|
|
2749
|
+
var Pn = fe, Rn = bi, Dn = Ci, Hn = Ti, zn = ji, Jn = It, Gn = zi.load, Yn = zi.loadAll, Wn = Bn.dump, Zn = ye, Qn = {
|
|
2750
2750
|
binary: Fi,
|
|
2751
2751
|
float: xi,
|
|
2752
2752
|
map: ki,
|
|
@@ -2760,14 +2760,14 @@ var Pn = de, Rn = bi, Dn = Ci, Hn = Ti, zn = ji, Gn = At, Jn = zi.load, Yn = zi.
|
|
|
2760
2760
|
omap: Vi,
|
|
2761
2761
|
seq: _i,
|
|
2762
2762
|
str: wi
|
|
2763
|
-
}, Xn =
|
|
2763
|
+
}, Xn = jt("safeLoad", "load"), el = jt("safeLoadAll", "loadAll"), tl = jt("safeDump", "dump"), il = {
|
|
2764
2764
|
Type: Pn,
|
|
2765
2765
|
Schema: Rn,
|
|
2766
2766
|
FAILSAFE_SCHEMA: Dn,
|
|
2767
2767
|
JSON_SCHEMA: Hn,
|
|
2768
2768
|
CORE_SCHEMA: zn,
|
|
2769
|
-
DEFAULT_SCHEMA:
|
|
2770
|
-
load:
|
|
2769
|
+
DEFAULT_SCHEMA: Jn,
|
|
2770
|
+
load: Gn,
|
|
2771
2771
|
loadAll: Yn,
|
|
2772
2772
|
dump: Wn,
|
|
2773
2773
|
YAMLException: Zn,
|
|
@@ -2786,17 +2786,17 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2786
2786
|
}
|
|
2787
2787
|
},
|
|
2788
2788
|
setup(e) {
|
|
2789
|
-
const i = e, t =
|
|
2789
|
+
const i = e, t = T(() => i.yamlRecord);
|
|
2790
2790
|
return (a, r) => {
|
|
2791
2791
|
const n = L("KCodeBlock");
|
|
2792
|
-
return v(),
|
|
2793
|
-
i.yamlRecord ? (v(),
|
|
2792
|
+
return v(), j("div", rl, [
|
|
2793
|
+
i.yamlRecord ? (v(), R(n, {
|
|
2794
2794
|
key: 0,
|
|
2795
2795
|
id: "yaml-codeblock",
|
|
2796
|
-
code: f(il).dump(t),
|
|
2796
|
+
code: f(il).dump(t.value),
|
|
2797
2797
|
language: "yaml",
|
|
2798
2798
|
theme: "dark"
|
|
2799
|
-
}, null, 8, ["code"])) :
|
|
2799
|
+
}, null, 8, ["code"])) : H("", !0)
|
|
2800
2800
|
]);
|
|
2801
2801
|
};
|
|
2802
2802
|
}
|
|
@@ -2845,29 +2845,29 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2845
2845
|
}
|
|
2846
2846
|
},
|
|
2847
2847
|
setup(e) {
|
|
2848
|
-
const i = e, t =
|
|
2848
|
+
const i = e, t = rt(), { i18n: { t: a } } = ue.useI18n(), r = (o) => !!(o.tooltip || t[`${o.key}-label-tooltip`]), n = T(() => {
|
|
2849
2849
|
if (!i.record)
|
|
2850
2850
|
return i.record;
|
|
2851
2851
|
const o = JSON.parse(JSON.stringify(i.record));
|
|
2852
2852
|
return delete o.created_at, delete o.updated_at, o;
|
|
2853
2853
|
});
|
|
2854
|
-
return (o, s) => (v(),
|
|
2855
|
-
e.format === "structured" ? (v(),
|
|
2856
|
-
(v(!0),
|
|
2854
|
+
return (o, s) => (v(), j(be, null, [
|
|
2855
|
+
e.format === "structured" ? (v(), j("div", al, [
|
|
2856
|
+
(v(!0), j(be, null, he(e.propListTypes, (l) => (v(), j("div", {
|
|
2857
2857
|
key: `config-card-details-${l}-props`,
|
|
2858
|
-
class:
|
|
2858
|
+
class: Ie(`config-card-details-${l}-props`),
|
|
2859
2859
|
"data-testid": `config-card-details-${l}-props`
|
|
2860
2860
|
}, [
|
|
2861
|
-
l !== "basic" ? (v(),
|
|
2862
|
-
(v(!0),
|
|
2861
|
+
l !== "basic" ? (v(), j("div", nl, $(l === "advanced" ? f(a)("baseConfigCard.sections.advanced") : f(a)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
2862
|
+
(v(!0), j(be, null, he(e.propertyCollections[l], (d) => (v(), R(Ct, {
|
|
2863
2863
|
key: d.key,
|
|
2864
2864
|
item: d
|
|
2865
2865
|
}, je({
|
|
2866
2866
|
label: y(() => [
|
|
2867
|
-
|
|
2867
|
+
X(o.$slots, `${d.key}-label`, { row: d }, void 0, !0)
|
|
2868
2868
|
]),
|
|
2869
2869
|
[d.key]: y(({ rowValue: m }) => [
|
|
2870
|
-
|
|
2870
|
+
X(o.$slots, d.key, {
|
|
2871
2871
|
row: d,
|
|
2872
2872
|
rowValue: m
|
|
2873
2873
|
}, void 0, !0)
|
|
@@ -2877,27 +2877,27 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2877
2877
|
r(d) ? {
|
|
2878
2878
|
name: "label-tooltip",
|
|
2879
2879
|
fn: y(() => [
|
|
2880
|
-
|
|
2880
|
+
X(o.$slots, `${d.key}-label-tooltip`, { row: d }, void 0, !0)
|
|
2881
2881
|
]),
|
|
2882
2882
|
key: "0"
|
|
2883
2883
|
} : void 0
|
|
2884
2884
|
]), 1032, ["item"]))), 128))
|
|
2885
2885
|
], 10, ol))), 128))
|
|
2886
|
-
])) :
|
|
2887
|
-
e.format === "json" && i.record ? (v(),
|
|
2886
|
+
])) : H("", !0),
|
|
2887
|
+
e.format === "json" && i.record ? (v(), R(yi, {
|
|
2888
2888
|
key: 1,
|
|
2889
2889
|
config: i.config,
|
|
2890
2890
|
"fetcher-url": i.fetcherUrl,
|
|
2891
2891
|
"json-record": n.value,
|
|
2892
2892
|
"request-method": "get"
|
|
2893
|
-
}, null, 8, ["config", "fetcher-url", "json-record"])) :
|
|
2894
|
-
e.format === "yaml" && i.record ? (v(),
|
|
2893
|
+
}, null, 8, ["config", "fetcher-url", "json-record"])) : H("", !0),
|
|
2894
|
+
e.format === "yaml" && i.record ? (v(), R(ar, {
|
|
2895
2895
|
key: 2,
|
|
2896
2896
|
"yaml-record": n.value
|
|
2897
|
-
}, null, 8, ["yaml-record"])) :
|
|
2897
|
+
}, null, 8, ["yaml-record"])) : H("", !0)
|
|
2898
2898
|
], 64));
|
|
2899
2899
|
}
|
|
2900
|
-
}), sl = /* @__PURE__ */
|
|
2900
|
+
}), sl = /* @__PURE__ */ we(ll, [["__scopeId", "data-v-2b74ac63"]]), ei = "24px", cl = (e, i) => {
|
|
2901
2901
|
const t = e.__vccOpts || e;
|
|
2902
2902
|
for (const [a, r] of i)
|
|
2903
2903
|
t[a] = r;
|
|
@@ -2905,7 +2905,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2905
2905
|
}, ul = (e) => (ni("data-v-0cc5a4d3"), e = e(), li(), e), dl = ["aria-hidden"], pl = {
|
|
2906
2906
|
key: 0,
|
|
2907
2907
|
"data-testid": "kui-icon-svg-title"
|
|
2908
|
-
}, fl = /* @__PURE__ */ ul(() => /* @__PURE__ */
|
|
2908
|
+
}, fl = /* @__PURE__ */ ul(() => /* @__PURE__ */ V("path", {
|
|
2909
2909
|
d: "M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",
|
|
2910
2910
|
fill: "currentColor"
|
|
2911
2911
|
}, null, -1)), ml = /* @__PURE__ */ re({
|
|
@@ -2960,7 +2960,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2960
2960
|
}
|
|
2961
2961
|
},
|
|
2962
2962
|
setup(e) {
|
|
2963
|
-
const i = e, t =
|
|
2963
|
+
const i = e, t = T(() => {
|
|
2964
2964
|
if (typeof i.size == "number" && i.size > 0)
|
|
2965
2965
|
return `${i.size}px`;
|
|
2966
2966
|
if (typeof i.size == "string") {
|
|
@@ -2969,7 +2969,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2969
2969
|
return `${n}px`;
|
|
2970
2970
|
}
|
|
2971
2971
|
return ei;
|
|
2972
|
-
}), a =
|
|
2972
|
+
}), a = T(() => ({
|
|
2973
2973
|
boxSizing: "border-box",
|
|
2974
2974
|
color: i.color,
|
|
2975
2975
|
display: i.display,
|
|
@@ -2977,14 +2977,14 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2977
2977
|
lineHeight: "0",
|
|
2978
2978
|
width: t.value
|
|
2979
2979
|
}));
|
|
2980
|
-
return (r, n) => (v(),
|
|
2980
|
+
return (r, n) => (v(), R($e(e.as), {
|
|
2981
2981
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2982
2982
|
class: "kui-icon book-icon",
|
|
2983
2983
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2984
2984
|
style: oi(a.value)
|
|
2985
2985
|
}, {
|
|
2986
2986
|
default: y(() => [
|
|
2987
|
-
(v(),
|
|
2987
|
+
(v(), j("svg", {
|
|
2988
2988
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2989
2989
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2990
2990
|
fill: "none",
|
|
@@ -2994,7 +2994,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2994
2994
|
width: "100%",
|
|
2995
2995
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2996
2996
|
}, [
|
|
2997
|
-
e.title ? (v(),
|
|
2997
|
+
e.title ? (v(), j("title", pl, $(e.title), 1)) : H("", !0),
|
|
2998
2998
|
fl
|
|
2999
2999
|
], 8, dl))
|
|
3000
3000
|
]),
|
|
@@ -3085,7 +3085,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3085
3085
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
3086
3086
|
setup(e, { emit: i }) {
|
|
3087
3087
|
var t;
|
|
3088
|
-
const a = i, r = e, n =
|
|
3088
|
+
const a = i, r = e, n = rt(), { i18n: { t: o } } = ue.useI18n(), { getMessageFromError: s } = ue.useErrors(), { convertKeyToTitle: l } = ue.useStringHelpers(), { axiosInstance: d } = ue.useAxios({
|
|
3089
3089
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3090
3090
|
}), m = [
|
|
3091
3091
|
{
|
|
@@ -3105,109 +3105,109 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3105
3105
|
p.value = I == null ? void 0 : I.value;
|
|
3106
3106
|
}, h = {
|
|
3107
3107
|
id: {
|
|
3108
|
-
type:
|
|
3108
|
+
type: ie.ID,
|
|
3109
3109
|
label: o("baseConfigCard.commonFields.id_label"),
|
|
3110
3110
|
order: 0,
|
|
3111
|
-
section:
|
|
3111
|
+
section: me.Basic
|
|
3112
3112
|
},
|
|
3113
3113
|
name: {
|
|
3114
3114
|
order: 1,
|
|
3115
|
-
section:
|
|
3115
|
+
section: me.Basic
|
|
3116
3116
|
},
|
|
3117
3117
|
enabled: {
|
|
3118
|
-
type:
|
|
3118
|
+
type: ie.BadgeStatus,
|
|
3119
3119
|
order: 2,
|
|
3120
|
-
section:
|
|
3120
|
+
section: me.Basic
|
|
3121
3121
|
},
|
|
3122
3122
|
updated_at: {
|
|
3123
|
-
type:
|
|
3123
|
+
type: ie.Date,
|
|
3124
3124
|
label: o("baseConfigCard.commonFields.updated_at_label"),
|
|
3125
3125
|
order: 3,
|
|
3126
|
-
section:
|
|
3126
|
+
section: me.Basic
|
|
3127
3127
|
},
|
|
3128
3128
|
created_at: {
|
|
3129
|
-
type:
|
|
3129
|
+
type: ie.Date,
|
|
3130
3130
|
label: o("baseConfigCard.commonFields.created_at_label"),
|
|
3131
3131
|
order: 4,
|
|
3132
|
-
section:
|
|
3132
|
+
section: me.Basic
|
|
3133
3133
|
},
|
|
3134
3134
|
tags: {
|
|
3135
|
-
type:
|
|
3135
|
+
type: ie.BadgeTag,
|
|
3136
3136
|
order: -1,
|
|
3137
3137
|
// the last property displayed
|
|
3138
|
-
section:
|
|
3138
|
+
section: me.Basic
|
|
3139
3139
|
}
|
|
3140
|
-
},
|
|
3141
|
-
var I,
|
|
3140
|
+
}, A = U(!1), b = U(!1), M = U(""), S = U({}), x = T(() => {
|
|
3141
|
+
var I, z, K;
|
|
3142
3142
|
if (!S.value)
|
|
3143
3143
|
return [];
|
|
3144
|
-
const
|
|
3145
|
-
for (const
|
|
3146
|
-
const
|
|
3147
|
-
let ae =
|
|
3148
|
-
(
|
|
3144
|
+
const P = [], J = Object.keys(S.value).length;
|
|
3145
|
+
for (const Y in S.value) {
|
|
3146
|
+
const ee = (z = (I = r.configSchema) == null ? void 0 : I[Y]) == null ? void 0 : z.order, W = (K = h[Y]) == null ? void 0 : K.order;
|
|
3147
|
+
let ae = J;
|
|
3148
|
+
(W || W === 0) && (ae = W === -1 ? J + 1 : W), ee && (ae = ee === -1 ? J + 1 : ee), P.push([Y, ae]);
|
|
3149
3149
|
}
|
|
3150
|
-
return
|
|
3151
|
-
return
|
|
3152
|
-
}),
|
|
3153
|
-
var
|
|
3154
|
-
const ae =
|
|
3150
|
+
return P.sort(function(Y, ee) {
|
|
3151
|
+
return Y[1] - ee[1];
|
|
3152
|
+
}), P.map((Y) => {
|
|
3153
|
+
var ee, W;
|
|
3154
|
+
const ae = Y[0], Q = (ee = S.value) == null ? void 0 : ee[ae], te = ((W = r.configSchema) == null ? void 0 : W[ae]) || {}, pe = h[ae];
|
|
3155
3155
|
return {
|
|
3156
3156
|
key: ae,
|
|
3157
|
-
value:
|
|
3158
|
-
hidden:
|
|
3159
|
-
type:
|
|
3160
|
-
label:
|
|
3161
|
-
tooltip:
|
|
3162
|
-
section:
|
|
3157
|
+
value: Q,
|
|
3158
|
+
hidden: te.hidden || !1,
|
|
3159
|
+
type: te.type ?? ((pe == null ? void 0 : pe.type) || ie.Text),
|
|
3160
|
+
label: te.label ?? ((pe == null ? void 0 : pe.label) || l(ae)),
|
|
3161
|
+
tooltip: te.tooltip ?? ((pe == null ? void 0 : pe.tooltip) || void 0),
|
|
3162
|
+
section: te.section ?? ((pe == null ? void 0 : pe.section) || me.Advanced)
|
|
3163
3163
|
};
|
|
3164
|
-
}).filter((
|
|
3165
|
-
}),
|
|
3166
|
-
var I,
|
|
3164
|
+
}).filter((Y) => !Y.hidden && Y.key !== r.pluginConfigKey);
|
|
3165
|
+
}), c = T(() => {
|
|
3166
|
+
var I, z;
|
|
3167
3167
|
if (!S.value || !r.pluginConfigKey)
|
|
3168
3168
|
return [];
|
|
3169
|
-
const K = S.value[r.pluginConfigKey] || {},
|
|
3170
|
-
for (const
|
|
3171
|
-
const
|
|
3172
|
-
let ae =
|
|
3173
|
-
|
|
3169
|
+
const K = S.value[r.pluginConfigKey] || {}, P = Object.keys(K).length, J = [];
|
|
3170
|
+
for (const Y in K) {
|
|
3171
|
+
const ee = (z = (I = r.pluginConfigSchema) == null ? void 0 : I[Y]) == null ? void 0 : z.order, W = K[Y];
|
|
3172
|
+
let ae = W != null && W !== "" ? P - 1 : P;
|
|
3173
|
+
ee && (ae = ee === -1 ? P + 1 : ee), J.push([Y, ae]);
|
|
3174
3174
|
}
|
|
3175
|
-
return
|
|
3176
|
-
return
|
|
3177
|
-
}),
|
|
3178
|
-
var
|
|
3179
|
-
const
|
|
3175
|
+
return J.sort(function(Y, ee) {
|
|
3176
|
+
return Y[1] - ee[1];
|
|
3177
|
+
}), J.map((Y) => {
|
|
3178
|
+
var ee;
|
|
3179
|
+
const W = Y[0], ae = K[W], Q = ((ee = r.pluginConfigSchema) == null ? void 0 : ee[W]) || {};
|
|
3180
3180
|
return {
|
|
3181
|
-
key:
|
|
3181
|
+
key: W,
|
|
3182
3182
|
value: ae,
|
|
3183
|
-
hidden:
|
|
3184
|
-
type:
|
|
3185
|
-
label:
|
|
3186
|
-
tooltip:
|
|
3187
|
-
section:
|
|
3183
|
+
hidden: Q.hidden || !1,
|
|
3184
|
+
type: Q.type ?? ie.Text,
|
|
3185
|
+
label: Q.label ?? l(W),
|
|
3186
|
+
tooltip: Q.tooltip ?? void 0,
|
|
3187
|
+
section: me.Plugin
|
|
3188
3188
|
};
|
|
3189
|
-
}).filter((
|
|
3190
|
-
}), k =
|
|
3191
|
-
var I,
|
|
3189
|
+
}).filter((Y) => !Y.hidden);
|
|
3190
|
+
}), k = T(() => {
|
|
3191
|
+
var I, z, K, P;
|
|
3192
3192
|
return {
|
|
3193
|
-
basic: (I =
|
|
3194
|
-
advanced: (
|
|
3195
|
-
plugin: (
|
|
3193
|
+
basic: (I = x.value) == null ? void 0 : I.filter((J) => J.section === me.Basic),
|
|
3194
|
+
advanced: (z = x.value) == null ? void 0 : z.filter((J) => J.section === me.Advanced),
|
|
3195
|
+
plugin: (P = c.value) == null ? void 0 : P.concat((K = x.value) == null ? void 0 : K.filter((J) => J.section === me.Plugin))
|
|
3196
3196
|
};
|
|
3197
|
-
}),
|
|
3197
|
+
}), O = T(() => {
|
|
3198
3198
|
const I = [];
|
|
3199
3199
|
return k.value.basic.length && I.push("basic"), k.value.advanced.length && I.push("advanced"), k.value.plugin.length && I.push("plugin"), I;
|
|
3200
|
-
}),
|
|
3201
|
-
var I,
|
|
3200
|
+
}), N = (I) => !!(I.tooltip || n[`${I.key}-label-tooltip`]), oe = T(() => {
|
|
3201
|
+
var I, z;
|
|
3202
3202
|
let K = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3203
|
-
return r.config.app === "konnect" ? K = K.replace(/{controlPlaneId}/gi, ((I = r.config) == null ? void 0 : I.controlPlaneId) || "") : r.config.app === "kongManager" && (K = K.replace(/\/{workspace}/gi, (
|
|
3204
|
-
}),
|
|
3203
|
+
return r.config.app === "konnect" ? K = K.replace(/{controlPlaneId}/gi, ((I = r.config) == null ? void 0 : I.controlPlaneId) || "") : r.config.app === "kongManager" && (K = K.replace(/\/{workspace}/gi, (z = r.config) != null && z.workspace ? `/${r.config.workspace}` : "")), K = K.replace(/{id}/gi, r.config.entityId), K;
|
|
3204
|
+
}), D = (I) => {
|
|
3205
3205
|
S.value && I(JSON.stringify(S.value)) ? a("copy:success", S.value) : a("copy:error");
|
|
3206
3206
|
};
|
|
3207
|
-
return
|
|
3207
|
+
return ke(A, (I) => {
|
|
3208
3208
|
a("loading", I);
|
|
3209
|
-
}, { immediate: !0 }),
|
|
3210
|
-
b.value = !1,
|
|
3209
|
+
}, { immediate: !0 }), ht(async () => {
|
|
3210
|
+
b.value = !1, A.value = !0;
|
|
3211
3211
|
try {
|
|
3212
3212
|
const { data: I } = await d.get(oe.value);
|
|
3213
3213
|
if (r.dataKey)
|
|
@@ -3217,45 +3217,46 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3217
3217
|
throw new Error(o("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3218
3218
|
else
|
|
3219
3219
|
S.value = { ...I };
|
|
3220
|
-
Object.keys(r.configSchema).filter((
|
|
3221
|
-
S.value && typeof S.value[
|
|
3220
|
+
Object.keys(r.configSchema).filter((z) => r.configSchema[z].forceShow).forEach((z) => {
|
|
3221
|
+
S.value && typeof S.value[z] > "u" && (S.value[z] = null);
|
|
3222
3222
|
}), a("fetch:success", I);
|
|
3223
3223
|
} catch (I) {
|
|
3224
|
-
const
|
|
3225
|
-
|
|
3224
|
+
const z = s(I);
|
|
3225
|
+
M.value = z.startsWith("code") ? o("baseConfigCard.errors.load") : z, b.value = !0, a("fetch:error", I);
|
|
3226
3226
|
} finally {
|
|
3227
|
-
|
|
3227
|
+
A.value = !1;
|
|
3228
3228
|
}
|
|
3229
|
-
}), (I,
|
|
3230
|
-
const K = L("KLabel"),
|
|
3231
|
-
return v(),
|
|
3229
|
+
}), (I, z) => {
|
|
3230
|
+
const K = L("KLabel"), P = L("KSelect"), J = L("KButton"), Y = L("KClipboardProvider"), ee = L("KSkeleton"), W = L("KEmptyState"), ae = L("KCard");
|
|
3231
|
+
return v(), R(ae, { class: "kong-ui-entity-base-config-card" }, je({
|
|
3232
3232
|
actions: y(() => [
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
e.config.jsonYamlEnabled ? (v(),
|
|
3233
|
+
V("div", vl, [
|
|
3234
|
+
X(I.$slots, "actions", {}, void 0, !0),
|
|
3235
|
+
e.config.jsonYamlEnabled ? (v(), R(K, {
|
|
3236
3236
|
key: 0,
|
|
3237
3237
|
class: "config-format-select-label",
|
|
3238
3238
|
"data-testid": "config-format-select-label"
|
|
3239
3239
|
}, {
|
|
3240
3240
|
default: y(() => [
|
|
3241
|
-
G(
|
|
3241
|
+
G($(e.label), 1)
|
|
3242
3242
|
]),
|
|
3243
3243
|
_: 1
|
|
3244
|
-
})) :
|
|
3245
|
-
e.config.jsonYamlEnabled ? (v(), P
|
|
3244
|
+
})) : H("", !0),
|
|
3245
|
+
e.config.jsonYamlEnabled ? (v(), R(P, {
|
|
3246
3246
|
key: 1,
|
|
3247
|
+
appearance: "select",
|
|
3247
3248
|
"data-testid": "select-config-format",
|
|
3248
3249
|
items: m,
|
|
3249
3250
|
onChange: _
|
|
3250
|
-
})) :
|
|
3251
|
-
r.config.jsonYamlEnabled && e.configCardDoc ? (v(),
|
|
3251
|
+
})) : H("", !0),
|
|
3252
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (v(), R(J, {
|
|
3252
3253
|
key: 2,
|
|
3253
3254
|
appearance: "tertiary",
|
|
3254
3255
|
class: "book-icon",
|
|
3255
3256
|
"data-testid": "book-icon"
|
|
3256
3257
|
}, {
|
|
3257
3258
|
default: y(() => [
|
|
3258
|
-
|
|
3259
|
+
V("a", {
|
|
3259
3260
|
href: e.configCardDoc,
|
|
3260
3261
|
rel: "noopener",
|
|
3261
3262
|
target: "_blank"
|
|
@@ -3264,86 +3265,86 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3264
3265
|
], 8, hl)
|
|
3265
3266
|
]),
|
|
3266
3267
|
_: 1
|
|
3267
|
-
})) :
|
|
3268
|
-
e.config.jsonYamlEnabled ?
|
|
3269
|
-
default: y(({ copyToClipboard:
|
|
3270
|
-
!
|
|
3268
|
+
})) : H("", !0),
|
|
3269
|
+
e.config.jsonYamlEnabled ? H("", !0) : (v(), R(Y, { key: 3 }, {
|
|
3270
|
+
default: y(({ copyToClipboard: Q }) => [
|
|
3271
|
+
!A.value && !b.value ? (v(), R(J, {
|
|
3271
3272
|
key: 0,
|
|
3272
3273
|
appearance: "tertiary",
|
|
3273
3274
|
"data-testid": "json-copy-button",
|
|
3274
|
-
onClick: (
|
|
3275
|
+
onClick: (te) => D(Q)
|
|
3275
3276
|
}, {
|
|
3276
3277
|
default: y(() => [
|
|
3277
|
-
G(
|
|
3278
|
+
G($(f(o)("baseConfigCard.actions.copy")), 1)
|
|
3278
3279
|
]),
|
|
3279
3280
|
_: 2
|
|
3280
|
-
}, 1032, ["onClick"])) :
|
|
3281
|
+
}, 1032, ["onClick"])) : H("", !0)
|
|
3281
3282
|
]),
|
|
3282
3283
|
_: 1
|
|
3283
3284
|
}))
|
|
3284
3285
|
])
|
|
3285
3286
|
]),
|
|
3286
3287
|
default: y(() => [
|
|
3287
|
-
|
|
3288
|
+
A.value ? (v(), R(ee, {
|
|
3288
3289
|
key: 0,
|
|
3289
3290
|
"data-testid": "config-card-loader",
|
|
3290
3291
|
"table-columns": 2,
|
|
3291
3292
|
type: "table"
|
|
3292
|
-
})) : b.value ? (v(),
|
|
3293
|
+
})) : b.value ? (v(), R(W, {
|
|
3293
3294
|
key: 1,
|
|
3294
3295
|
"data-testid": "config-card-fetch-error",
|
|
3295
3296
|
"is-error": ""
|
|
3296
3297
|
}, {
|
|
3297
3298
|
message: y(() => [
|
|
3298
|
-
|
|
3299
|
+
V("h3", null, $(M.value), 1)
|
|
3299
3300
|
]),
|
|
3300
3301
|
_: 1
|
|
3301
|
-
})) :
|
|
3302
|
-
e.config.jsonYamlEnabled ? (v(),
|
|
3302
|
+
})) : H("", !0),
|
|
3303
|
+
e.config.jsonYamlEnabled ? (v(), j("div", bl, [
|
|
3303
3304
|
C(sl, {
|
|
3304
3305
|
config: e.config,
|
|
3305
3306
|
"fetcher-url": oe.value,
|
|
3306
3307
|
format: p.value,
|
|
3307
|
-
"prop-list-types":
|
|
3308
|
+
"prop-list-types": O.value,
|
|
3308
3309
|
"property-collections": k.value,
|
|
3309
3310
|
record: S.value
|
|
3310
3311
|
}, je({ _: 2 }, [
|
|
3311
|
-
|
|
3312
|
-
name:
|
|
3313
|
-
fn: y(({ row:
|
|
3314
|
-
|
|
3315
|
-
row:
|
|
3316
|
-
rowValue:
|
|
3312
|
+
he(Object.keys(I.$slots), (Q) => ({
|
|
3313
|
+
name: Q,
|
|
3314
|
+
fn: y(({ row: te, rowValue: pe }) => [
|
|
3315
|
+
X(I.$slots, Q, {
|
|
3316
|
+
row: te,
|
|
3317
|
+
rowValue: pe
|
|
3317
3318
|
}, void 0, !0)
|
|
3318
3319
|
])
|
|
3319
3320
|
}))
|
|
3320
3321
|
]), 1032, ["config", "fetcher-url", "format", "prop-list-types", "property-collections", "record"])
|
|
3321
|
-
])) : (v(),
|
|
3322
|
-
(v(!0),
|
|
3323
|
-
key: `config-card-details-${
|
|
3324
|
-
class:
|
|
3325
|
-
"data-testid": `config-card-details-${
|
|
3322
|
+
])) : (v(), j("div", wl, [
|
|
3323
|
+
(v(!0), j(be, null, he(O.value, (Q) => (v(), j("div", {
|
|
3324
|
+
key: `config-card-details-${Q}-props`,
|
|
3325
|
+
class: Ie(`config-card-details-${Q}-props`),
|
|
3326
|
+
"data-testid": `config-card-details-${Q}-props`
|
|
3326
3327
|
}, [
|
|
3327
|
-
|
|
3328
|
-
(v(!0),
|
|
3329
|
-
key:
|
|
3330
|
-
item:
|
|
3328
|
+
Q !== "basic" ? (v(), j("div", kl, $(Q === "advanced" ? f(o)("baseConfigCard.sections.advanced") : f(o)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
3329
|
+
(v(!0), j(be, null, he(k.value[Q], (te) => (v(), R(Ct, {
|
|
3330
|
+
key: te.key,
|
|
3331
|
+
item: te
|
|
3331
3332
|
}, je({
|
|
3332
3333
|
label: y(() => [
|
|
3333
|
-
|
|
3334
|
+
X(I.$slots, `${te.key}-label`, { row: te }, void 0, !0)
|
|
3334
3335
|
]),
|
|
3335
|
-
[
|
|
3336
|
-
|
|
3337
|
-
row:
|
|
3338
|
-
rowValue:
|
|
3336
|
+
[te.key]: y(({ rowValue: pe }) => [
|
|
3337
|
+
X(I.$slots, te.key, {
|
|
3338
|
+
row: te,
|
|
3339
|
+
rowValue: pe
|
|
3339
3340
|
}, void 0, !0)
|
|
3340
3341
|
]),
|
|
3341
3342
|
_: 2
|
|
3342
3343
|
}, [
|
|
3343
|
-
|
|
3344
|
+
N(te) ? {
|
|
3344
3345
|
name: "label-tooltip",
|
|
3345
3346
|
fn: y(() => [
|
|
3346
|
-
|
|
3347
|
+
X(I.$slots, `${te.key}-label-tooltip`, { row: te }, void 0, !0)
|
|
3347
3348
|
]),
|
|
3348
3349
|
key: "0"
|
|
3349
3350
|
} : void 0
|
|
@@ -3356,9 +3357,9 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3356
3357
|
e.hideTitle ? void 0 : {
|
|
3357
3358
|
name: "title",
|
|
3358
3359
|
fn: y(() => [
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
G(
|
|
3360
|
+
V("div", yl, [
|
|
3361
|
+
X(I.$slots, "title", {}, () => [
|
|
3362
|
+
G($(f(o)("baseConfigCard.title")), 1)
|
|
3362
3363
|
], !0)
|
|
3363
3364
|
])
|
|
3364
3365
|
]),
|
|
@@ -3367,7 +3368,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3367
3368
|
]), 1024);
|
|
3368
3369
|
};
|
|
3369
3370
|
}
|
|
3370
|
-
}), Sl = /* @__PURE__ */
|
|
3371
|
+
}), Sl = /* @__PURE__ */ we(Cl, [["__scopeId", "data-v-068b819b"]]), Il = {
|
|
3371
3372
|
class: "form-actions",
|
|
3372
3373
|
"data-testid": "form-actions"
|
|
3373
3374
|
}, Al = { key: 0 }, xl = /* @__PURE__ */ re({
|
|
@@ -3425,21 +3426,21 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3425
3426
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3426
3427
|
setup(e, { emit: i }) {
|
|
3427
3428
|
var t;
|
|
3428
|
-
const a = i, r = e, n =
|
|
3429
|
+
const a = i, r = e, n = bt(), { i18n: { t: o } } = ue.useI18n(), { getMessageFromError: s } = ue.useErrors(), { axiosInstance: l } = ue.useAxios({
|
|
3429
3430
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3430
|
-
}), d = U(!1), m = U(!1), p = U(""), _ =
|
|
3431
|
-
var k,
|
|
3432
|
-
let
|
|
3433
|
-
return r.config.app === "konnect" ?
|
|
3431
|
+
}), d = U(!1), m = U(!1), p = U(""), _ = T(() => r.canSubmit === !1 || r.isReadonly), h = U(!1), A = T(() => {
|
|
3432
|
+
var k, O;
|
|
3433
|
+
let N = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3434
|
+
return r.config.app === "konnect" ? N = N.replace(/{controlPlaneId}/gi, ((k = r.config) == null ? void 0 : k.controlPlaneId) || "") : r.config.app === "kongManager" && (N = N.replace(/\/{workspace}/gi, (O = r.config) != null && O.workspace ? `/${r.config.workspace}` : "")), r.editId ? (N = N.replace(/{id}/gi, r.editId), N) : (N = N.replace(/\/{id}/gi, ""), N);
|
|
3434
3435
|
}), b = () => {
|
|
3435
3436
|
h.value = !h.value;
|
|
3436
|
-
},
|
|
3437
|
+
}, M = () => {
|
|
3437
3438
|
r.config.cancelRoute ? n.push(r.config.cancelRoute) : S();
|
|
3438
3439
|
}, S = () => {
|
|
3439
3440
|
a("cancel");
|
|
3440
|
-
},
|
|
3441
|
+
}, x = () => {
|
|
3441
3442
|
_.value || a("submit");
|
|
3442
|
-
},
|
|
3443
|
+
}, c = U([
|
|
3443
3444
|
{
|
|
3444
3445
|
title: o("baseForm.configuration.yaml"),
|
|
3445
3446
|
hash: "#yaml"
|
|
@@ -3449,65 +3450,65 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3449
3450
|
hash: "#json"
|
|
3450
3451
|
}
|
|
3451
3452
|
]);
|
|
3452
|
-
return
|
|
3453
|
+
return ke(() => d.value, (k) => {
|
|
3453
3454
|
a("loading", k);
|
|
3454
|
-
}, { immediate: !0 }),
|
|
3455
|
+
}, { immediate: !0 }), ht(async () => {
|
|
3455
3456
|
if (r.editId)
|
|
3456
3457
|
try {
|
|
3457
3458
|
m.value = !1, d.value = !0;
|
|
3458
|
-
const { data: k } = await l.get(
|
|
3459
|
+
const { data: k } = await l.get(A.value);
|
|
3459
3460
|
a("fetch:success", k);
|
|
3460
3461
|
} catch (k) {
|
|
3461
|
-
const
|
|
3462
|
-
p.value =
|
|
3462
|
+
const O = s(k);
|
|
3463
|
+
p.value = O.startsWith("code") ? o("baseForm.errors.edit") : O, m.value = !0, a("fetch:error", k);
|
|
3463
3464
|
} finally {
|
|
3464
3465
|
d.value = !1;
|
|
3465
3466
|
}
|
|
3466
|
-
}), (k,
|
|
3467
|
-
const
|
|
3468
|
-
return v(), P
|
|
3467
|
+
}), (k, O) => {
|
|
3468
|
+
const N = L("KSkeleton"), oe = L("KEmptyState"), D = L("KAlert"), I = L("KButton"), z = L("KTabs"), K = L("KSlideout"), P = L("KCard");
|
|
3469
|
+
return v(), R(P, { class: "kong-ui-entity-base-form" }, {
|
|
3469
3470
|
default: y(() => [
|
|
3470
|
-
d.value ? (v(),
|
|
3471
|
+
d.value ? (v(), R(N, {
|
|
3471
3472
|
key: 0,
|
|
3472
3473
|
type: "form"
|
|
3473
|
-
})) : m.value ? (v(),
|
|
3474
|
+
})) : m.value ? (v(), R(oe, {
|
|
3474
3475
|
key: 1,
|
|
3475
3476
|
"cta-text": f(o)("baseForm.actions.back"),
|
|
3476
3477
|
"data-testid": "form-fetch-error",
|
|
3477
|
-
"handle-click":
|
|
3478
|
+
"handle-click": M,
|
|
3478
3479
|
"is-error": !0
|
|
3479
3480
|
}, {
|
|
3480
3481
|
message: y(() => [
|
|
3481
|
-
|
|
3482
|
+
V("h3", null, $(p.value), 1)
|
|
3482
3483
|
]),
|
|
3483
3484
|
_: 1
|
|
3484
|
-
}, 8, ["cta-text"])) : (v(),
|
|
3485
|
+
}, 8, ["cta-text"])) : (v(), j("form", {
|
|
3485
3486
|
key: 2,
|
|
3486
3487
|
"data-testid": "form-content",
|
|
3487
|
-
onReset:
|
|
3488
|
-
onSubmit:
|
|
3488
|
+
onReset: Le(S, ["prevent"]),
|
|
3489
|
+
onSubmit: Le(x, ["prevent"])
|
|
3489
3490
|
}, [
|
|
3490
|
-
|
|
3491
|
-
e.errorMessage ? (v(),
|
|
3491
|
+
X(k.$slots, "default", {}, void 0, !0),
|
|
3492
|
+
e.errorMessage ? (v(), R(D, {
|
|
3492
3493
|
key: 0,
|
|
3493
3494
|
"alert-message": e.errorMessage,
|
|
3494
3495
|
appearance: "danger",
|
|
3495
3496
|
"data-testid": "form-error"
|
|
3496
|
-
}, null, 8, ["alert-message"])) :
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
e.config.jsonYamlFormsEnabled ? (v(),
|
|
3497
|
+
}, null, 8, ["alert-message"])) : H("", !0),
|
|
3498
|
+
V("div", Il, [
|
|
3499
|
+
X(k.$slots, "form-actions", {}, () => [
|
|
3500
|
+
e.config.jsonYamlFormsEnabled ? (v(), j("div", Al, [
|
|
3500
3501
|
C(I, {
|
|
3501
3502
|
appearance: "tertiary",
|
|
3502
3503
|
"data-testid": "form-view-configuration",
|
|
3503
|
-
onClick:
|
|
3504
|
+
onClick: O[0] || (O[0] = (J) => b())
|
|
3504
3505
|
}, {
|
|
3505
3506
|
default: y(() => [
|
|
3506
|
-
G(
|
|
3507
|
+
G($(f(o)("baseForm.actions.viewConfiguration")), 1)
|
|
3507
3508
|
]),
|
|
3508
3509
|
_: 1
|
|
3509
3510
|
})
|
|
3510
|
-
])) :
|
|
3511
|
+
])) : H("", !0),
|
|
3511
3512
|
C(I, {
|
|
3512
3513
|
appearance: "secondary",
|
|
3513
3514
|
"data-testid": "form-cancel",
|
|
@@ -3515,7 +3516,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3515
3516
|
type: "reset"
|
|
3516
3517
|
}, {
|
|
3517
3518
|
default: y(() => [
|
|
3518
|
-
G(
|
|
3519
|
+
G($(f(o)("baseForm.actions.cancel")), 1)
|
|
3519
3520
|
]),
|
|
3520
3521
|
_: 1
|
|
3521
3522
|
}, 8, ["disabled"]),
|
|
@@ -3526,7 +3527,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3526
3527
|
type: "submit"
|
|
3527
3528
|
}, {
|
|
3528
3529
|
default: y(() => [
|
|
3529
|
-
G(
|
|
3530
|
+
G($(f(o)("baseForm.actions.save")), 1)
|
|
3530
3531
|
]),
|
|
3531
3532
|
_: 1
|
|
3532
3533
|
}, 8, ["disabled"])
|
|
@@ -3540,18 +3541,18 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3540
3541
|
"is-visible": h.value,
|
|
3541
3542
|
"prevent-close-on-blur": "",
|
|
3542
3543
|
title: f(o)("baseForm.configuration.title"),
|
|
3543
|
-
onClose:
|
|
3544
|
+
onClose: O[1] || (O[1] = (J) => b())
|
|
3544
3545
|
}, {
|
|
3545
3546
|
default: y(() => [
|
|
3546
|
-
|
|
3547
|
-
C(
|
|
3547
|
+
V("div", null, $(f(o)("baseForm.configuration.message")), 1),
|
|
3548
|
+
C(z, {
|
|
3548
3549
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3549
|
-
tabs:
|
|
3550
|
+
tabs: c.value
|
|
3550
3551
|
}, {
|
|
3551
3552
|
json: y(() => [
|
|
3552
3553
|
C(yi, {
|
|
3553
3554
|
config: e.config,
|
|
3554
|
-
"fetcher-url":
|
|
3555
|
+
"fetcher-url": A.value,
|
|
3555
3556
|
"json-record": r.formFields,
|
|
3556
3557
|
"request-method": r.editId ? "put" : "post"
|
|
3557
3558
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
@@ -3571,7 +3572,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3571
3572
|
});
|
|
3572
3573
|
};
|
|
3573
3574
|
}
|
|
3574
|
-
}), Tl = /* @__PURE__ */
|
|
3575
|
+
}), Tl = /* @__PURE__ */ we(xl, [["__scopeId", "data-v-4ef70725"]]), jl = {
|
|
3575
3576
|
key: 0,
|
|
3576
3577
|
"data-testid": "first-col"
|
|
3577
3578
|
}, Ml = /* @__PURE__ */ re({
|
|
@@ -3587,65 +3588,65 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3587
3588
|
}
|
|
3588
3589
|
},
|
|
3589
3590
|
setup(e) {
|
|
3590
|
-
const i = e, t =
|
|
3591
|
+
const i = e, t = T(() => {
|
|
3591
3592
|
var b;
|
|
3592
3593
|
return ((b = i.rowEl) == null ? void 0 : b.querySelector(`[data-testid="${i.keyName}"]`)) || null;
|
|
3593
|
-
}), a =
|
|
3594
|
+
}), a = T(() => {
|
|
3594
3595
|
var b;
|
|
3595
3596
|
return ((b = t.value) == null ? void 0 : b.querySelector('[data-testid="first-col"]')) || null;
|
|
3596
|
-
}), r =
|
|
3597
|
-
var b,
|
|
3597
|
+
}), r = T(() => {
|
|
3598
|
+
var b, M;
|
|
3598
3599
|
const S = (b = i.rowEl) == null ? void 0 : b.querySelectorAll("td");
|
|
3599
|
-
return S ? ((
|
|
3600
|
+
return S ? ((M = S[0]) == null ? void 0 : M.getAttribute("data-testid")) === i.keyName : !1;
|
|
3600
3601
|
});
|
|
3601
3602
|
let n;
|
|
3602
3603
|
const o = () => {
|
|
3603
3604
|
n && (n.disconnect(), n = void 0);
|
|
3604
3605
|
}, s = () => {
|
|
3605
|
-
var b,
|
|
3606
|
-
d.value = ((b = a.value) == null ? void 0 : b.getBoundingClientRect().width) || 0, m.value = ((
|
|
3607
|
-
}, l = U({}), d = U(0), m = U(0), p = U(""), _ =
|
|
3606
|
+
var b, M, S;
|
|
3607
|
+
d.value = ((b = a.value) == null ? void 0 : b.getBoundingClientRect().width) || 0, m.value = ((M = t.value) == null ? void 0 : M.clientWidth) || 0, p.value = ((S = l.value) == null ? void 0 : S.innerText) || "";
|
|
3608
|
+
}, l = U({}), d = U(0), m = U(0), p = U(""), _ = T(() => [a.value, t.value]), h = ke(
|
|
3608
3609
|
_,
|
|
3609
3610
|
(b) => {
|
|
3610
3611
|
if (r.value && (o(), "ResizeObserver" in window && window)) {
|
|
3611
|
-
n = new ResizeObserver((
|
|
3612
|
+
n = new ResizeObserver((M) => {
|
|
3612
3613
|
window.requestAnimationFrame(() => {
|
|
3613
|
-
!Array.isArray(
|
|
3614
|
+
!Array.isArray(M) || !M.length || s();
|
|
3614
3615
|
});
|
|
3615
3616
|
});
|
|
3616
|
-
for (const
|
|
3617
|
-
|
|
3617
|
+
for (const M of b)
|
|
3618
|
+
M && n.observe(M);
|
|
3618
3619
|
}
|
|
3619
3620
|
},
|
|
3620
3621
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3621
|
-
),
|
|
3622
|
+
), A = T(() => r.value ? d.value > m.value : !1);
|
|
3622
3623
|
return ai(() => {
|
|
3623
3624
|
s();
|
|
3624
3625
|
}), ur(() => {
|
|
3625
3626
|
h();
|
|
3626
|
-
}), (b,
|
|
3627
|
+
}), (b, M) => {
|
|
3627
3628
|
const S = L("KTooltip");
|
|
3628
|
-
return v(),
|
|
3629
|
+
return v(), j("span", {
|
|
3629
3630
|
ref_key: "contentRef",
|
|
3630
3631
|
ref: l,
|
|
3631
3632
|
class: "content-wrapper"
|
|
3632
3633
|
}, [
|
|
3633
|
-
r.value ? (v(),
|
|
3634
|
+
r.value ? (v(), j("span", jl, [
|
|
3634
3635
|
C(S, {
|
|
3635
|
-
label:
|
|
3636
|
+
label: A.value ? p.value : "",
|
|
3636
3637
|
"max-width": "300",
|
|
3637
3638
|
placement: "bottomStart"
|
|
3638
3639
|
}, {
|
|
3639
3640
|
default: y(() => [
|
|
3640
|
-
|
|
3641
|
+
X(b.$slots, "default", {}, void 0, !0)
|
|
3641
3642
|
]),
|
|
3642
3643
|
_: 3
|
|
3643
3644
|
}, 8, ["label"])
|
|
3644
|
-
])) :
|
|
3645
|
+
])) : X(b.$slots, "default", { key: 1 }, void 0, !0)
|
|
3645
3646
|
], 512);
|
|
3646
3647
|
};
|
|
3647
3648
|
}
|
|
3648
|
-
}), $l = /* @__PURE__ */
|
|
3649
|
+
}), $l = /* @__PURE__ */ we(Ml, [["__scopeId", "data-v-e42a20c9"]]), Ol = { class: "toolbar-container" }, El = {
|
|
3649
3650
|
key: 0,
|
|
3650
3651
|
class: "toolbar-button-container"
|
|
3651
3652
|
}, Fl = ["data-testid"], Vl = /* @__PURE__ */ re({
|
|
@@ -3758,72 +3759,72 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3758
3759
|
},
|
|
3759
3760
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3760
3761
|
setup(e, { emit: i }) {
|
|
3761
|
-
const t = e, a = i, { i18n: { t: r } } =
|
|
3762
|
-
var
|
|
3762
|
+
const t = e, a = i, { i18n: { t: r } } = ue.useI18n(), n = T(() => {
|
|
3763
|
+
var O, N;
|
|
3763
3764
|
return typeof t.errorMessage == "string" ? {
|
|
3764
3765
|
hasError: !!t.errorMessage,
|
|
3765
3766
|
title: t.errorMessage,
|
|
3766
3767
|
message: void 0
|
|
3767
3768
|
} : {
|
|
3768
3769
|
hasError: !!t.errorMessage,
|
|
3769
|
-
title: (
|
|
3770
|
-
message: (
|
|
3770
|
+
title: (O = t.errorMessage) == null ? void 0 : O.title,
|
|
3771
|
+
message: (N = t.errorMessage) == null ? void 0 : N.message
|
|
3771
3772
|
};
|
|
3772
|
-
}), o =
|
|
3773
|
-
const
|
|
3774
|
-
return Object.keys(t.tableHeaders).forEach((
|
|
3775
|
-
const oe = t.tableHeaders[
|
|
3776
|
-
|
|
3777
|
-
label: oe.label ??
|
|
3778
|
-
key:
|
|
3773
|
+
}), o = T(() => t.cacheIdentifier || t.preferencesStorageKey), s = (O) => O.hasData || !!t.query, l = T(() => {
|
|
3774
|
+
const O = [];
|
|
3775
|
+
return Object.keys(t.tableHeaders).forEach((N) => {
|
|
3776
|
+
const oe = t.tableHeaders[N];
|
|
3777
|
+
O.push({
|
|
3778
|
+
label: oe.label ?? N,
|
|
3779
|
+
key: N,
|
|
3779
3780
|
sortable: oe.sortable ?? !1
|
|
3780
3781
|
});
|
|
3781
|
-
}), t.enableEntityActions &&
|
|
3782
|
+
}), t.enableEntityActions && O.push({
|
|
3782
3783
|
key: "actions",
|
|
3783
3784
|
hideLabel: !0
|
|
3784
|
-
}),
|
|
3785
|
-
}), d = (
|
|
3786
|
-
"data-rowid":
|
|
3787
|
-
"data-testid":
|
|
3788
|
-
...t.rowAttributes(
|
|
3789
|
-
}), m = U({}), p = (
|
|
3790
|
-
var
|
|
3791
|
-
return (
|
|
3792
|
-
}, _ = (
|
|
3793
|
-
const
|
|
3794
|
-
"data-testid":
|
|
3795
|
-
...t.cellAttributes(
|
|
3785
|
+
}), O;
|
|
3786
|
+
}), d = (O) => ({
|
|
3787
|
+
"data-rowid": O.id,
|
|
3788
|
+
"data-testid": O.name,
|
|
3789
|
+
...t.rowAttributes(O)
|
|
3790
|
+
}), m = U({}), p = (O) => {
|
|
3791
|
+
var N;
|
|
3792
|
+
return (N = m.value) == null ? void 0 : N.$el.querySelector(`[data-rowid="${O.id}"]`);
|
|
3793
|
+
}, _ = (O) => {
|
|
3794
|
+
const N = {
|
|
3795
|
+
"data-testid": O.headerKey,
|
|
3796
|
+
...t.cellAttributes(O)
|
|
3796
3797
|
};
|
|
3797
|
-
return
|
|
3798
|
+
return O.colIndex === 0 && (N.style = {
|
|
3798
3799
|
maxWidth: "250px",
|
|
3799
3800
|
overflowX: "hidden",
|
|
3800
3801
|
textOverflow: "ellipsis"
|
|
3801
|
-
}),
|
|
3802
|
+
}), N;
|
|
3802
3803
|
}, h = () => {
|
|
3803
|
-
a("empty-state-cta-clicked"),
|
|
3804
|
-
},
|
|
3804
|
+
a("empty-state-cta-clicked"), A();
|
|
3805
|
+
}, A = () => {
|
|
3805
3806
|
a("clear-search-input");
|
|
3806
|
-
}, b =
|
|
3807
|
-
a("click:row",
|
|
3808
|
-
}),
|
|
3809
|
-
a("sort",
|
|
3810
|
-
}, { setTablePreferences: S, getTablePreferences:
|
|
3811
|
-
const
|
|
3807
|
+
}, b = T(() => t.disableRowClick ? void 0 : (O, N) => {
|
|
3808
|
+
a("click:row", N);
|
|
3809
|
+
}), M = (O) => {
|
|
3810
|
+
a("sort", O);
|
|
3811
|
+
}, { setTablePreferences: S, getTablePreferences: x } = Ir(), c = T(() => {
|
|
3812
|
+
const O = x(t.preferencesStorageKey);
|
|
3812
3813
|
return {
|
|
3813
3814
|
...t.initialFetcherParams,
|
|
3814
|
-
...
|
|
3815
|
+
...O
|
|
3815
3816
|
};
|
|
3816
|
-
}), k = (
|
|
3817
|
-
t.preferencesStorageKey && S(t.preferencesStorageKey,
|
|
3817
|
+
}), k = (O) => {
|
|
3818
|
+
t.preferencesStorageKey && S(t.preferencesStorageKey, O);
|
|
3818
3819
|
};
|
|
3819
|
-
return (
|
|
3820
|
-
const oe = L("KIcon"),
|
|
3821
|
-
return v(),
|
|
3820
|
+
return (O, N) => {
|
|
3821
|
+
const oe = L("KIcon"), D = L("KButton"), I = L("KDropdown"), z = L("KTable"), K = L("KCard");
|
|
3822
|
+
return v(), R(K, {
|
|
3822
3823
|
class: "kong-ui-entity-base-table",
|
|
3823
3824
|
title: e.title
|
|
3824
3825
|
}, {
|
|
3825
3826
|
default: y(() => [
|
|
3826
|
-
C(
|
|
3827
|
+
C(z, {
|
|
3827
3828
|
ref_key: "tableRefs",
|
|
3828
3829
|
ref: m,
|
|
3829
3830
|
"cache-identifier": o.value,
|
|
@@ -3845,44 +3846,44 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3845
3846
|
"has-error": n.value.hasError,
|
|
3846
3847
|
headers: l.value,
|
|
3847
3848
|
"hide-pagination-when-optional": "",
|
|
3848
|
-
"initial-fetcher-params":
|
|
3849
|
+
"initial-fetcher-params": c.value,
|
|
3849
3850
|
"is-loading": e.isLoading,
|
|
3850
3851
|
"pagination-type": e.paginationType,
|
|
3851
3852
|
"row-attrs": d,
|
|
3852
3853
|
"search-input": e.query,
|
|
3853
3854
|
onKtableEmptyStateCtaClicked: h,
|
|
3854
3855
|
"onRow:click": b.value,
|
|
3855
|
-
onSort:
|
|
3856
|
+
onSort: N[0] || (N[0] = (P) => M(P)),
|
|
3856
3857
|
"onUpdate:tablePreferences": k
|
|
3857
3858
|
}, je({
|
|
3858
|
-
toolbar: y(({ state:
|
|
3859
|
-
Re(
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
])) :
|
|
3859
|
+
toolbar: y(({ state: P }) => [
|
|
3860
|
+
Re(V("div", Ol, [
|
|
3861
|
+
X(O.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3862
|
+
O.$slots["toolbar-button"] ? (v(), j("div", El, [
|
|
3863
|
+
X(O.$slots, "toolbar-button", {}, void 0, !0)
|
|
3864
|
+
])) : H("", !0)
|
|
3864
3865
|
], 512), [
|
|
3865
|
-
[De, s(
|
|
3866
|
+
[De, s(P)]
|
|
3866
3867
|
])
|
|
3867
3868
|
]),
|
|
3868
|
-
actions: y(({ row:
|
|
3869
|
-
|
|
3869
|
+
actions: y(({ row: P, rowKey: J, rowValue: Y }) => [
|
|
3870
|
+
V("div", {
|
|
3870
3871
|
class: "actions-container",
|
|
3871
|
-
"data-testid":
|
|
3872
|
+
"data-testid": P.name
|
|
3872
3873
|
}, [
|
|
3873
3874
|
C(I, {
|
|
3874
3875
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3875
3876
|
width: e.dropdownMenuWidth
|
|
3876
3877
|
}, {
|
|
3877
3878
|
items: y(() => [
|
|
3878
|
-
|
|
3879
|
-
row:
|
|
3880
|
-
rowKey:
|
|
3881
|
-
rowValue:
|
|
3879
|
+
X(O.$slots, "actions", {
|
|
3880
|
+
row: P,
|
|
3881
|
+
rowKey: J,
|
|
3882
|
+
rowValue: Y
|
|
3882
3883
|
}, void 0, !0)
|
|
3883
3884
|
]),
|
|
3884
3885
|
default: y(() => [
|
|
3885
|
-
C(
|
|
3886
|
+
C(D, {
|
|
3886
3887
|
class: "actions-trigger",
|
|
3887
3888
|
"data-testid": "overflow-actions-button",
|
|
3888
3889
|
size: "small"
|
|
@@ -3903,20 +3904,20 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3903
3904
|
]),
|
|
3904
3905
|
_: 2
|
|
3905
3906
|
}, [
|
|
3906
|
-
|
|
3907
|
-
name:
|
|
3908
|
-
fn: y(({ row:
|
|
3907
|
+
he(e.tableHeaders, (P, J) => ({
|
|
3908
|
+
name: J,
|
|
3909
|
+
fn: y(({ row: Y, rowKey: ee, rowValue: W }) => [
|
|
3909
3910
|
C($l, {
|
|
3910
|
-
"key-name": String(
|
|
3911
|
-
"row-el": p(
|
|
3911
|
+
"key-name": String(J),
|
|
3912
|
+
"row-el": p(Y)
|
|
3912
3913
|
}, {
|
|
3913
3914
|
default: y(() => [
|
|
3914
|
-
|
|
3915
|
-
row:
|
|
3916
|
-
rowKey:
|
|
3917
|
-
rowValue:
|
|
3915
|
+
X(O.$slots, J, {
|
|
3916
|
+
row: Y,
|
|
3917
|
+
rowKey: ee,
|
|
3918
|
+
rowValue: W
|
|
3918
3919
|
}, () => [
|
|
3919
|
-
G(
|
|
3920
|
+
G($(W), 1)
|
|
3920
3921
|
], !0)
|
|
3921
3922
|
]),
|
|
3922
3923
|
_: 2
|
|
@@ -3929,7 +3930,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3929
3930
|
}, 8, ["title"]);
|
|
3930
3931
|
};
|
|
3931
3932
|
}
|
|
3932
|
-
}), Nl = /* @__PURE__ */
|
|
3933
|
+
}), Nl = /* @__PURE__ */ we(Vl, [["__scopeId", "data-v-57b5a97b"]]), ql = {
|
|
3933
3934
|
key: 0,
|
|
3934
3935
|
class: "kong-ui-entity-delete-error"
|
|
3935
3936
|
}, Ul = {
|
|
@@ -3974,14 +3975,14 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3974
3975
|
},
|
|
3975
3976
|
emits: ["cancel", "proceed"],
|
|
3976
3977
|
setup(e, { emit: i }) {
|
|
3977
|
-
const { i18nT: t } =
|
|
3978
|
+
const { i18nT: t } = ue.useI18n(), a = e, r = i, n = T(() => a.needConfirm ? a.entityName : ""), o = () => {
|
|
3978
3979
|
r("cancel");
|
|
3979
3980
|
}, s = () => {
|
|
3980
3981
|
r("proceed");
|
|
3981
3982
|
};
|
|
3982
3983
|
return (l, d) => {
|
|
3983
3984
|
const m = L("KAlert"), p = L("KPrompt");
|
|
3984
|
-
return v(),
|
|
3985
|
+
return v(), R(p, {
|
|
3985
3986
|
"action-button-text": "Yes, delete",
|
|
3986
3987
|
"action-pending": e.actionPending,
|
|
3987
3988
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3993,43 +3994,43 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3993
3994
|
onProceed: s
|
|
3994
3995
|
}, {
|
|
3995
3996
|
"body-content": y(() => [
|
|
3996
|
-
e.error ? (v(),
|
|
3997
|
+
e.error ? (v(), j("div", ql, [
|
|
3997
3998
|
C(m, { appearance: "danger" }, {
|
|
3998
3999
|
alertMessage: y(() => [
|
|
3999
|
-
G(
|
|
4000
|
+
G($(e.error), 1)
|
|
4000
4001
|
]),
|
|
4001
4002
|
_: 1
|
|
4002
4003
|
})
|
|
4003
|
-
])) :
|
|
4004
|
+
])) : H("", !0),
|
|
4004
4005
|
C(f(t), {
|
|
4005
4006
|
class: "message",
|
|
4006
4007
|
keypath: a.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
4007
4008
|
tag: "p"
|
|
4008
4009
|
}, je({
|
|
4009
4010
|
entityType: y(() => [
|
|
4010
|
-
G(
|
|
4011
|
+
G($(a.entityType), 1)
|
|
4011
4012
|
]),
|
|
4012
4013
|
_: 2
|
|
4013
4014
|
}, [
|
|
4014
4015
|
a.entityName ? {
|
|
4015
4016
|
name: "entityName",
|
|
4016
4017
|
fn: y(() => [
|
|
4017
|
-
|
|
4018
|
+
V("strong", null, $(a.entityName), 1)
|
|
4018
4019
|
]),
|
|
4019
4020
|
key: "0"
|
|
4020
4021
|
} : void 0
|
|
4021
4022
|
]), 1032, ["keypath"]),
|
|
4022
|
-
a.description || l.$slots.description ? (v(),
|
|
4023
|
-
|
|
4024
|
-
|
|
4023
|
+
a.description || l.$slots.description ? (v(), j("div", Ul, [
|
|
4024
|
+
X(l.$slots, "description", {}, () => [
|
|
4025
|
+
V("p", null, $(a.description), 1)
|
|
4025
4026
|
], !0)
|
|
4026
|
-
])) :
|
|
4027
|
+
])) : H("", !0)
|
|
4027
4028
|
]),
|
|
4028
4029
|
_: 3
|
|
4029
4030
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
4030
4031
|
};
|
|
4031
4032
|
}
|
|
4032
|
-
}), Kl = /* @__PURE__ */
|
|
4033
|
+
}), Kl = /* @__PURE__ */ we(Ll, [["__scopeId", "data-v-1c9a2a07"]]), Bl = {
|
|
4033
4034
|
fill: "none",
|
|
4034
4035
|
height: "20",
|
|
4035
4036
|
viewBox: "0 0 20 20",
|
|
@@ -4052,16 +4053,16 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4052
4053
|
}
|
|
4053
4054
|
},
|
|
4054
4055
|
setup(e) {
|
|
4055
|
-
return (i, t) => (v(),
|
|
4056
|
-
|
|
4057
|
-
|
|
4056
|
+
return (i, t) => (v(), j("svg", Bl, [
|
|
4057
|
+
V("mask", Pl, [
|
|
4058
|
+
V("rect", {
|
|
4058
4059
|
fill: e.color,
|
|
4059
4060
|
height: "20",
|
|
4060
4061
|
width: "20"
|
|
4061
4062
|
}, null, 8, Rl)
|
|
4062
4063
|
]),
|
|
4063
|
-
|
|
4064
|
-
|
|
4064
|
+
V("g", Dl, [
|
|
4065
|
+
V("path", {
|
|
4065
4066
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
4066
4067
|
fill: e.color
|
|
4067
4068
|
}, null, 8, Hl)
|
|
@@ -4071,7 +4072,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4071
4072
|
}), zl = {
|
|
4072
4073
|
key: 1,
|
|
4073
4074
|
class: "kong-ui-entity-filter"
|
|
4074
|
-
},
|
|
4075
|
+
}, Jl = { class: "menu-item-title" }, Gl = { class: "menu-item-indicator" }, Yl = { class: "menu-item-body" }, Wl = ["for"], Zl = { class: "menu-item-buttons" }, Ql = { class: "filter-clear-button-container" }, Xl = /* @__PURE__ */ re({
|
|
4075
4076
|
__name: "EntityFilter",
|
|
4076
4077
|
props: {
|
|
4077
4078
|
// filter config, either exact match or fuzzy match
|
|
@@ -4091,21 +4092,21 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4091
4092
|
},
|
|
4092
4093
|
emits: ["update:modelValue"],
|
|
4093
4094
|
setup(e, { emit: i }) {
|
|
4094
|
-
const { i18n: { t } } =
|
|
4095
|
+
const { i18n: { t } } = ue.useI18n(), a = e, r = i, n = U(!1), o = U({}), s = T(() => {
|
|
4095
4096
|
const S = [];
|
|
4096
|
-
return new URLSearchParams(a.modelValue).forEach((
|
|
4097
|
-
|
|
4097
|
+
return new URLSearchParams(a.modelValue).forEach((x, c) => {
|
|
4098
|
+
x !== "" && S.push(c);
|
|
4098
4099
|
}), S;
|
|
4099
|
-
}), l =
|
|
4100
|
+
}), l = T(() => {
|
|
4100
4101
|
const S = a.config.fields;
|
|
4101
|
-
return Object.keys(S).filter((
|
|
4102
|
-
label: S[
|
|
4103
|
-
value:
|
|
4102
|
+
return Object.keys(S).filter((x) => S[x].searchable).map((x) => ({
|
|
4103
|
+
label: S[x].label || x,
|
|
4104
|
+
value: x
|
|
4104
4105
|
}));
|
|
4105
4106
|
});
|
|
4106
|
-
|
|
4107
|
-
o.value = {}, new URLSearchParams(S).forEach((
|
|
4108
|
-
o.value[
|
|
4107
|
+
ke(() => a.modelValue, (S) => {
|
|
4108
|
+
o.value = {}, new URLSearchParams(S).forEach((x, c) => {
|
|
4109
|
+
o.value[c] = x;
|
|
4109
4110
|
});
|
|
4110
4111
|
});
|
|
4111
4112
|
const d = () => {
|
|
@@ -4113,28 +4114,28 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4113
4114
|
}, m = (S) => {
|
|
4114
4115
|
r("update:modelValue", S);
|
|
4115
4116
|
}, p = (S) => `filter-${S}`, _ = (S) => {
|
|
4116
|
-
var
|
|
4117
|
-
return (((
|
|
4117
|
+
var x, c;
|
|
4118
|
+
return (((c = (x = a.config.schema) == null ? void 0 : x[S]) == null ? void 0 : c.values) ?? []).map((k) => ({
|
|
4118
4119
|
value: k,
|
|
4119
4120
|
label: k
|
|
4120
4121
|
}));
|
|
4121
4122
|
}, h = (S) => {
|
|
4122
|
-
var
|
|
4123
|
-
return ((
|
|
4124
|
-
},
|
|
4123
|
+
var x, c;
|
|
4124
|
+
return ((c = (x = a.config.schema) == null ? void 0 : x[S]) == null ? void 0 : c.type) ?? "text";
|
|
4125
|
+
}, A = (S) => {
|
|
4125
4126
|
o.value = {
|
|
4126
4127
|
...o.value,
|
|
4127
4128
|
[S]: ""
|
|
4128
|
-
},
|
|
4129
|
+
}, M();
|
|
4129
4130
|
}, b = () => {
|
|
4130
|
-
o.value = {},
|
|
4131
|
-
},
|
|
4132
|
-
const
|
|
4133
|
-
S && (n.value = !1), r("update:modelValue", new URLSearchParams(
|
|
4131
|
+
o.value = {}, M(!0);
|
|
4132
|
+
}, M = (S = !1) => {
|
|
4133
|
+
const x = Object.keys(o.value).reduce((c, k) => (o.value[k] && (c[k] = `${o.value[k]}`), c), {});
|
|
4134
|
+
S && (n.value = !1), r("update:modelValue", new URLSearchParams(x).toString());
|
|
4134
4135
|
};
|
|
4135
|
-
return (S,
|
|
4136
|
-
const
|
|
4137
|
-
return e.config.isExactMatch ? (v(),
|
|
4136
|
+
return (S, x) => {
|
|
4137
|
+
const c = L("KInput"), k = L("KButton"), O = L("KSelect"), N = L("KMenuItem"), oe = L("KMenu");
|
|
4138
|
+
return e.config.isExactMatch ? (v(), R(c, {
|
|
4138
4139
|
key: 0,
|
|
4139
4140
|
autocomplete: "off",
|
|
4140
4141
|
class: "kong-ui-entity-filter-input",
|
|
@@ -4147,7 +4148,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4147
4148
|
C(ti)
|
|
4148
4149
|
]),
|
|
4149
4150
|
_: 1
|
|
4150
|
-
}, 8, ["model-value", "placeholder"])) : (v(),
|
|
4151
|
+
}, 8, ["model-value", "placeholder"])) : (v(), j("div", zl, [
|
|
4151
4152
|
C(k, {
|
|
4152
4153
|
appearance: "tertiary",
|
|
4153
4154
|
"data-testid": "filter-button",
|
|
@@ -4155,11 +4156,11 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4155
4156
|
}, {
|
|
4156
4157
|
default: y(() => [
|
|
4157
4158
|
C(ti),
|
|
4158
|
-
G(" " +
|
|
4159
|
+
G(" " + $(f(t)("filter.filterButtonText")) + " " + $(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
4159
4160
|
]),
|
|
4160
4161
|
_: 1
|
|
4161
4162
|
}),
|
|
4162
|
-
Re(
|
|
4163
|
+
Re(V("div", {
|
|
4163
4164
|
class: "kong-ui-entity-filter-backdrop",
|
|
4164
4165
|
onClick: d
|
|
4165
4166
|
}, null, 512), [
|
|
@@ -4167,54 +4168,55 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4167
4168
|
]),
|
|
4168
4169
|
Re(C(oe, { class: "kong-ui-entity-filter-menu" }, {
|
|
4169
4170
|
body: y(() => [
|
|
4170
|
-
(v(!0),
|
|
4171
|
-
key:
|
|
4172
|
-
"data-testid":
|
|
4171
|
+
(v(!0), j(be, null, he(l.value, (D, I) => (v(), R(N, {
|
|
4172
|
+
key: D.value,
|
|
4173
|
+
"data-testid": D.value,
|
|
4173
4174
|
expandable: "",
|
|
4174
4175
|
"last-menu-item": I === l.value.length - 1
|
|
4175
4176
|
}, {
|
|
4176
4177
|
itemTitle: y(() => [
|
|
4177
|
-
|
|
4178
|
-
G(
|
|
4179
|
-
Re(
|
|
4180
|
-
[De, s.value.includes(
|
|
4178
|
+
V("span", Jl, [
|
|
4179
|
+
G($(D.label) + " ", 1),
|
|
4180
|
+
Re(V("span", Gl, null, 512), [
|
|
4181
|
+
[De, s.value.includes(D.value)]
|
|
4181
4182
|
])
|
|
4182
4183
|
])
|
|
4183
4184
|
]),
|
|
4184
4185
|
itemBody: y(() => {
|
|
4185
|
-
var
|
|
4186
|
+
var z, K;
|
|
4186
4187
|
return [
|
|
4187
|
-
|
|
4188
|
-
|
|
4188
|
+
V("div", Yl, [
|
|
4189
|
+
V("label", {
|
|
4189
4190
|
class: "menu-item-label",
|
|
4190
|
-
for: p(
|
|
4191
|
-
},
|
|
4192
|
-
((K = (
|
|
4191
|
+
for: p(D.value)
|
|
4192
|
+
}, $(f(t)("filter.fieldLabel")), 9, Wl),
|
|
4193
|
+
((K = (z = e.config.schema) == null ? void 0 : z[D.value]) == null ? void 0 : K.type) === "select" ? (v(), R(O, {
|
|
4193
4194
|
key: 0,
|
|
4194
|
-
id: p(
|
|
4195
|
-
modelValue: o.value[
|
|
4196
|
-
"onUpdate:modelValue": (
|
|
4197
|
-
|
|
4195
|
+
id: p(D.value),
|
|
4196
|
+
modelValue: o.value[D.value],
|
|
4197
|
+
"onUpdate:modelValue": (P) => o.value[D.value] = P,
|
|
4198
|
+
appearance: "select",
|
|
4199
|
+
items: _(D.value),
|
|
4198
4200
|
placeholder: f(t)("filter.selectPlaceholder")
|
|
4199
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (v(),
|
|
4201
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (v(), R(c, {
|
|
4200
4202
|
key: 1,
|
|
4201
|
-
id: p(
|
|
4202
|
-
modelValue: o.value[
|
|
4203
|
-
"onUpdate:modelValue": (
|
|
4203
|
+
id: p(D.value),
|
|
4204
|
+
modelValue: o.value[D.value],
|
|
4205
|
+
"onUpdate:modelValue": (P) => o.value[D.value] = P,
|
|
4204
4206
|
autocomplete: "off",
|
|
4205
4207
|
placeholder: f(t)("filter.inputPlaceholder"),
|
|
4206
|
-
type: h(
|
|
4208
|
+
type: h(D.value)
|
|
4207
4209
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4208
4210
|
]),
|
|
4209
|
-
|
|
4211
|
+
V("div", Zl, [
|
|
4210
4212
|
C(k, {
|
|
4211
4213
|
appearance: "tertiary",
|
|
4212
4214
|
"data-testid": "apply-filter",
|
|
4213
4215
|
size: "small",
|
|
4214
|
-
onClick:
|
|
4216
|
+
onClick: x[0] || (x[0] = (P) => M(!0))
|
|
4215
4217
|
}, {
|
|
4216
4218
|
default: y(() => [
|
|
4217
|
-
G(
|
|
4219
|
+
G($(f(t)("filter.applyButtonText")), 1)
|
|
4218
4220
|
]),
|
|
4219
4221
|
_: 1
|
|
4220
4222
|
}),
|
|
@@ -4222,10 +4224,10 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4222
4224
|
appearance: "tertiary",
|
|
4223
4225
|
"data-testid": "clear-filter",
|
|
4224
4226
|
size: "small",
|
|
4225
|
-
onClick: (
|
|
4227
|
+
onClick: (P) => A(D.value)
|
|
4226
4228
|
}, {
|
|
4227
4229
|
default: y(() => [
|
|
4228
|
-
G(
|
|
4230
|
+
G($(f(t)("filter.clearButtonText")), 1)
|
|
4229
4231
|
]),
|
|
4230
4232
|
_: 2
|
|
4231
4233
|
}, 1032, ["onClick"])
|
|
@@ -4236,14 +4238,14 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4236
4238
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
4237
4239
|
]),
|
|
4238
4240
|
actionButton: y(() => [
|
|
4239
|
-
|
|
4241
|
+
V("div", Ql, [
|
|
4240
4242
|
C(k, {
|
|
4241
4243
|
appearance: "tertiary",
|
|
4242
4244
|
size: "small",
|
|
4243
4245
|
onClick: b
|
|
4244
4246
|
}, {
|
|
4245
4247
|
default: y(() => [
|
|
4246
|
-
G(
|
|
4248
|
+
G($(f(t)("filter.clearAllButtonText")), 1)
|
|
4247
4249
|
]),
|
|
4248
4250
|
_: 1
|
|
4249
4251
|
})
|
|
@@ -4256,7 +4258,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4256
4258
|
]));
|
|
4257
4259
|
};
|
|
4258
4260
|
}
|
|
4259
|
-
}), es = /* @__PURE__ */
|
|
4261
|
+
}), es = /* @__PURE__ */ we(Xl, [["__scopeId", "data-v-15962ee2"]]), ts = /* @__PURE__ */ re({
|
|
4260
4262
|
__name: "EntityToggleModal",
|
|
4261
4263
|
props: {
|
|
4262
4264
|
visible: {
|
|
@@ -4288,9 +4290,9 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4288
4290
|
},
|
|
4289
4291
|
emits: ["canceled", "proceed"],
|
|
4290
4292
|
setup(e, { emit: i }) {
|
|
4291
|
-
const { i18n: { t }, i18nT: a } =
|
|
4293
|
+
const { i18n: { t }, i18nT: a } = ue.useI18n(), r = e, n = i, o = U(!1), s = T(
|
|
4292
4294
|
() => r.action === "enable" ? t("toggleModal.enable.title", { entityType: r.entityType }) : t("toggleModal.disable.title", { entityType: r.entityType })
|
|
4293
|
-
), l =
|
|
4295
|
+
), l = T(
|
|
4294
4296
|
() => r.action === "enable" ? t("toggleModal.enable.confirmText") : t("toggleModal.disable.confirmText")
|
|
4295
4297
|
), d = () => n("canceled"), m = async () => {
|
|
4296
4298
|
if (r.onConfirm) {
|
|
@@ -4306,7 +4308,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4306
4308
|
};
|
|
4307
4309
|
return (p, _) => {
|
|
4308
4310
|
const h = L("KPrompt");
|
|
4309
|
-
return v(),
|
|
4311
|
+
return v(), R(lr, { to: "body" }, [
|
|
4310
4312
|
C(h, {
|
|
4311
4313
|
"action-button-text": l.value,
|
|
4312
4314
|
"action-pending": o.value,
|
|
@@ -4323,10 +4325,10 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4323
4325
|
scope: "global"
|
|
4324
4326
|
}, {
|
|
4325
4327
|
entityType: y(() => [
|
|
4326
|
-
G(
|
|
4328
|
+
G($(e.entityType), 1)
|
|
4327
4329
|
]),
|
|
4328
4330
|
entityName: y(() => [
|
|
4329
|
-
|
|
4331
|
+
V("strong", null, $(e.entityName), 1)
|
|
4330
4332
|
]),
|
|
4331
4333
|
_: 1
|
|
4332
4334
|
}, 8, ["keypath"])
|
|
@@ -4358,13 +4360,13 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4358
4360
|
}
|
|
4359
4361
|
},
|
|
4360
4362
|
setup(e) {
|
|
4361
|
-
const i = e, t = U(void 0), a =
|
|
4362
|
-
return
|
|
4363
|
+
const i = e, t = U(void 0), a = T(() => t.value === !0 || t.value !== void 0 && i.forceShow === !0);
|
|
4364
|
+
return ke(() => i.authFunction, async () => {
|
|
4363
4365
|
t.value = await i.authFunction();
|
|
4364
|
-
}, { immediate: !0 }), (r, n) => a.value ?
|
|
4366
|
+
}, { immediate: !0 }), (r, n) => a.value ? X(r.$slots, "default", {
|
|
4365
4367
|
key: 0,
|
|
4366
4368
|
isAllowed: t.value
|
|
4367
|
-
}) :
|
|
4369
|
+
}) : H("", !0);
|
|
4368
4370
|
}
|
|
4369
4371
|
}), is = { class: "form-section-wrapper" }, rs = {
|
|
4370
4372
|
key: 0,
|
|
@@ -4400,32 +4402,32 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4400
4402
|
}
|
|
4401
4403
|
},
|
|
4402
4404
|
setup(e) {
|
|
4403
|
-
const i =
|
|
4404
|
-
return (t, a) => (v(),
|
|
4405
|
-
class:
|
|
4405
|
+
const i = rt();
|
|
4406
|
+
return (t, a) => (v(), j("fieldset", {
|
|
4407
|
+
class: Ie(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4406
4408
|
}, [
|
|
4407
|
-
|
|
4408
|
-
e.hideInfoHeader ?
|
|
4409
|
+
V("div", is, [
|
|
4410
|
+
e.hideInfoHeader ? H("", !0) : (v(), j("div", {
|
|
4409
4411
|
key: 0,
|
|
4410
|
-
class:
|
|
4412
|
+
class: Ie(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4411
4413
|
}, [
|
|
4412
|
-
e.title ? (v(),
|
|
4413
|
-
e.description || f(i).description ? (v(),
|
|
4414
|
-
|
|
4415
|
-
|
|
4414
|
+
e.title ? (v(), j("h4", rs, $(e.title), 1)) : H("", !0),
|
|
4415
|
+
e.description || f(i).description ? (v(), j("div", as, [
|
|
4416
|
+
X(t.$slots, "description", {}, () => [
|
|
4417
|
+
V("p", null, $(e.description), 1)
|
|
4416
4418
|
], !0)
|
|
4417
|
-
])) :
|
|
4418
|
-
f(i).footer ? (v(),
|
|
4419
|
-
|
|
4420
|
-
])) :
|
|
4419
|
+
])) : H("", !0),
|
|
4420
|
+
f(i).footer ? (v(), j("div", os, [
|
|
4421
|
+
X(t.$slots, "footer", {}, void 0, !0)
|
|
4422
|
+
])) : H("", !0)
|
|
4421
4423
|
], 2)),
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
+
V("div", ns, [
|
|
4425
|
+
X(t.$slots, "default", {}, void 0, !0)
|
|
4424
4426
|
])
|
|
4425
4427
|
])
|
|
4426
4428
|
], 2));
|
|
4427
4429
|
}
|
|
4428
|
-
}), ii = /* @__PURE__ */
|
|
4430
|
+
}), ii = /* @__PURE__ */ we(ls, [["__scopeId", "data-v-3565daa7"]]), { useAxios: or, useDeleteUrlBuilder: ss, useErrors: cs, useExternalLinkCreator: Ks, useFetchUrlBuilder: Bs, useFetcher: us, useDebouncedFilter: Ps, useStringHelpers: Rs, useHelpers: ds, useGatewayFeatureSupported: ps, useTruncationDetector: Ds } = ue, fs = { class: "kong-ui-entities-gateway-services-list" }, ms = { key: 1 }, gs = /* @__PURE__ */ re({
|
|
4429
4431
|
__name: "GatewayServiceList",
|
|
4430
4432
|
props: {
|
|
4431
4433
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4471,10 +4473,10 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4471
4473
|
},
|
|
4472
4474
|
emits: ["error", "copy:success", "copy:error", "delete:success", "toggle:success"],
|
|
4473
4475
|
setup(e, { emit: i }) {
|
|
4474
|
-
var
|
|
4475
|
-
const t = i, a = e, { i18n: { t: r } } =
|
|
4476
|
-
headers: (
|
|
4477
|
-
}), s = U(1), l =
|
|
4476
|
+
var Fe;
|
|
4477
|
+
const t = i, a = e, { i18n: { t: r } } = Ze.useI18n(), n = bt(), { axiosInstance: o } = or({
|
|
4478
|
+
headers: (Fe = a.config) == null ? void 0 : Fe.requestHeaders
|
|
4479
|
+
}), s = U(1), l = T(() => a.config.app !== "kongManager" || !!a.config.disableSorting), d = {
|
|
4478
4480
|
name: { label: r("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
4479
4481
|
protocol: { label: r("gateway_services.list.table_headers.protocol"), searchable: !0, sortable: !0 },
|
|
4480
4482
|
host: { label: r("gateway_services.list.table_headers.host"), searchable: !0, sortable: !0 },
|
|
@@ -4482,136 +4484,136 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4482
4484
|
path: { label: r("gateway_services.list.table_headers.path"), searchable: !0, sortable: !0 },
|
|
4483
4485
|
enabled: { label: r("gateway_services.list.table_headers.enabled"), searchable: !0, sortable: !0 },
|
|
4484
4486
|
tags: { label: r("gateway_services.list.table_headers.tags"), sortable: !1 }
|
|
4485
|
-
}, m = d, p =
|
|
4486
|
-
var
|
|
4487
|
-
let
|
|
4488
|
-
return a.config.app === "konnect" ?
|
|
4489
|
-
}), _ =
|
|
4490
|
-
const
|
|
4491
|
-
if (
|
|
4487
|
+
}, m = d, p = T(() => {
|
|
4488
|
+
var u, g;
|
|
4489
|
+
let q = `${a.config.apiBaseUrl}${He.list[a.config.app].all}`;
|
|
4490
|
+
return a.config.app === "konnect" ? q = q.replace(/{controlPlaneId}/gi, ((u = a.config) == null ? void 0 : u.controlPlaneId) || "") : a.config.app === "kongManager" && (q = q.replace(/\/{workspace}/gi, (g = a.config) != null && g.workspace ? `/${a.config.workspace}` : "")), q;
|
|
4491
|
+
}), _ = T(() => a.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${p.value}`) : new URL(p.value)), h = U(""), A = T(() => {
|
|
4492
|
+
const q = a.config.app === "konnect" || a.config.isExactMatch;
|
|
4493
|
+
if (q)
|
|
4492
4494
|
return {
|
|
4493
|
-
isExactMatch:
|
|
4495
|
+
isExactMatch: q,
|
|
4494
4496
|
placeholder: r(`search.placeholder.${a.config.app}`)
|
|
4495
4497
|
};
|
|
4496
|
-
const { name:
|
|
4498
|
+
const { name: u, enabled: g, protocol: B, host: ne, port: le, path: de } = d;
|
|
4497
4499
|
return {
|
|
4498
|
-
isExactMatch:
|
|
4499
|
-
fields: { name:
|
|
4500
|
+
isExactMatch: q,
|
|
4501
|
+
fields: { name: u, enabled: g, protocol: B, host: ne, port: le, path: de },
|
|
4500
4502
|
schema: a.config.filterSchema
|
|
4501
4503
|
};
|
|
4502
|
-
}), { fetcher: b, fetcherState:
|
|
4504
|
+
}), { fetcher: b, fetcherState: M } = us(a.config, p.value), S = () => {
|
|
4503
4505
|
h.value = "";
|
|
4504
|
-
},
|
|
4506
|
+
}, x = () => {
|
|
4505
4507
|
s.value++;
|
|
4506
|
-
},
|
|
4508
|
+
}, c = U(null), k = T(() => ({
|
|
4507
4509
|
ctaPath: a.config.createRoute,
|
|
4508
|
-
ctaText:
|
|
4510
|
+
ctaText: Ee.value ? r("actions.create") : void 0,
|
|
4509
4511
|
message: r("gateway_services.list.empty_state.description"),
|
|
4510
|
-
title:
|
|
4511
|
-
})),
|
|
4512
|
-
const
|
|
4512
|
+
title: Ee.value ? r("gateway_services.list.empty_state.title") : r("gateway_services.title")
|
|
4513
|
+
})), O = U(!1), N = U(null), oe = T(() => {
|
|
4514
|
+
const q = {
|
|
4513
4515
|
action: "disable",
|
|
4514
4516
|
id: "",
|
|
4515
4517
|
name: ""
|
|
4516
4518
|
};
|
|
4517
|
-
if (
|
|
4518
|
-
const { enabled:
|
|
4519
|
-
|
|
4519
|
+
if (N.value) {
|
|
4520
|
+
const { enabled: u, id: g, name: B } = N.value;
|
|
4521
|
+
q.action = u ? "disable" : "enable", q.id = g, q.name = B || g;
|
|
4520
4522
|
}
|
|
4521
|
-
return
|
|
4522
|
-
}),
|
|
4523
|
-
|
|
4523
|
+
return q;
|
|
4524
|
+
}), D = (q) => {
|
|
4525
|
+
O.value = !0, N.value = q;
|
|
4524
4526
|
}, I = () => {
|
|
4525
|
-
|
|
4526
|
-
},
|
|
4527
|
-
var
|
|
4528
|
-
if (!await ((
|
|
4527
|
+
O.value = !1, N.value = null;
|
|
4528
|
+
}, z = async () => {
|
|
4529
|
+
var B, ne;
|
|
4530
|
+
if (!await ((B = a.canEdit) == null ? void 0 : B.call(a, N.value)) || !N.value)
|
|
4529
4531
|
return;
|
|
4530
|
-
const
|
|
4532
|
+
const u = `${_.value.href}/${N.value.id}`, g = !N.value.enabled;
|
|
4531
4533
|
try {
|
|
4532
|
-
const { data:
|
|
4533
|
-
t("toggle:success",
|
|
4534
|
-
} catch (
|
|
4535
|
-
t("error",
|
|
4534
|
+
const { data: le } = ((ne = a.config) == null ? void 0 : ne.app) === "konnect" ? await o.put(u, { ...N.value, enabled: g }) : await o.patch(u, { ...N.value, enabled: g });
|
|
4535
|
+
t("toggle:success", le);
|
|
4536
|
+
} catch (le) {
|
|
4537
|
+
t("error", le);
|
|
4536
4538
|
}
|
|
4537
|
-
|
|
4538
|
-
}, K = (
|
|
4539
|
-
const
|
|
4540
|
-
if (!g
|
|
4539
|
+
N.value.enabled = g;
|
|
4540
|
+
}, K = (q, u) => {
|
|
4541
|
+
const g = q.id;
|
|
4542
|
+
if (!u(g)) {
|
|
4541
4543
|
t("copy:error", {
|
|
4542
|
-
entity:
|
|
4544
|
+
entity: q,
|
|
4543
4545
|
field: "id",
|
|
4544
4546
|
message: r("errors.copy")
|
|
4545
4547
|
});
|
|
4546
4548
|
return;
|
|
4547
4549
|
}
|
|
4548
4550
|
t("copy:success", {
|
|
4549
|
-
entity:
|
|
4551
|
+
entity: q,
|
|
4550
4552
|
field: "id",
|
|
4551
|
-
message: r("copy.success", { val:
|
|
4553
|
+
message: r("copy.success", { val: g })
|
|
4552
4554
|
});
|
|
4553
|
-
},
|
|
4554
|
-
const
|
|
4555
|
-
if (!g
|
|
4555
|
+
}, P = (q, u) => {
|
|
4556
|
+
const g = JSON.stringify(q);
|
|
4557
|
+
if (!u(g)) {
|
|
4556
4558
|
t("copy:error", {
|
|
4557
|
-
entity:
|
|
4559
|
+
entity: q,
|
|
4558
4560
|
message: r("errors.copy")
|
|
4559
4561
|
});
|
|
4560
4562
|
return;
|
|
4561
4563
|
}
|
|
4562
4564
|
t("copy:success", {
|
|
4563
|
-
entity:
|
|
4565
|
+
entity: q,
|
|
4564
4566
|
message: r("copy.success_brief")
|
|
4565
4567
|
});
|
|
4566
|
-
},
|
|
4567
|
-
var
|
|
4568
|
-
await ((
|
|
4569
|
-
},
|
|
4568
|
+
}, J = async (q) => {
|
|
4569
|
+
var g;
|
|
4570
|
+
await ((g = a.canRetrieve) == null ? void 0 : g.call(a, q)) && n.push(a.config.getViewRoute(q.id));
|
|
4571
|
+
}, Y = (q) => ({
|
|
4570
4572
|
label: r("actions.view"),
|
|
4571
|
-
to: a.config.getViewRoute(
|
|
4572
|
-
}),
|
|
4573
|
+
to: a.config.getViewRoute(q)
|
|
4574
|
+
}), ee = (q) => ({
|
|
4573
4575
|
label: r("actions.edit"),
|
|
4574
|
-
to: a.config.getEditRoute(
|
|
4575
|
-
}),
|
|
4576
|
-
|
|
4576
|
+
to: a.config.getEditRoute(q)
|
|
4577
|
+
}), W = U(void 0), ae = U(!1), Q = U(!1), te = U(""), pe = ss(a.config, p.value), ot = (q) => {
|
|
4578
|
+
W.value = q, ae.value = !0;
|
|
4577
4579
|
}, Oe = () => {
|
|
4578
|
-
ae.value = !1,
|
|
4579
|
-
},
|
|
4580
|
-
var
|
|
4581
|
-
if ((
|
|
4582
|
-
|
|
4580
|
+
ae.value = !1, W.value = void 0;
|
|
4581
|
+
}, nt = async () => {
|
|
4582
|
+
var q, u, g;
|
|
4583
|
+
if ((q = W.value) != null && q.id) {
|
|
4584
|
+
Q.value = !0;
|
|
4583
4585
|
try {
|
|
4584
|
-
await o.delete(
|
|
4585
|
-
} catch (
|
|
4586
|
-
|
|
4586
|
+
await o.delete(pe(W.value.id)), t("delete:success", W.value), Oe(), s.value++;
|
|
4587
|
+
} catch (B) {
|
|
4588
|
+
te.value = ((g = (u = B.response) == null ? void 0 : u.data) == null ? void 0 : g.message) || B.message || r("errors.delete"), t("error", B);
|
|
4587
4589
|
} finally {
|
|
4588
|
-
|
|
4590
|
+
Q.value = !1;
|
|
4589
4591
|
}
|
|
4590
4592
|
}
|
|
4591
|
-
},
|
|
4592
|
-
|
|
4593
|
-
var
|
|
4594
|
-
if (Array.isArray((
|
|
4595
|
-
|
|
4593
|
+
}, xe = U(!0);
|
|
4594
|
+
ke(M, (q) => {
|
|
4595
|
+
var u, g, B, ne;
|
|
4596
|
+
if (Array.isArray((u = q == null ? void 0 : q.response) == null ? void 0 : u.data) && (xe.value = q.response.data.length > 0), q.status === Te.Error) {
|
|
4597
|
+
c.value = {
|
|
4596
4598
|
title: r("errors.general")
|
|
4597
|
-
}, (
|
|
4599
|
+
}, (ne = (B = (g = q.error) == null ? void 0 : g.response) == null ? void 0 : B.data) != null && ne.message && (c.value.message = q.error.response.data.message), t("error", q.error);
|
|
4598
4600
|
return;
|
|
4599
4601
|
}
|
|
4600
|
-
|
|
4602
|
+
c.value = null;
|
|
4601
4603
|
});
|
|
4602
|
-
const
|
|
4603
|
-
return
|
|
4604
|
-
|
|
4605
|
-
}), (
|
|
4606
|
-
const
|
|
4607
|
-
return v(),
|
|
4604
|
+
const Ee = U(!1);
|
|
4605
|
+
return ht(async () => {
|
|
4606
|
+
Ee.value = await a.canCreate();
|
|
4607
|
+
}), (q, u) => {
|
|
4608
|
+
const g = L("KButton"), B = L("KInputSwitch"), ne = L("KBadge"), le = L("KTruncate"), de = L("KDropdownItem"), w = L("KClipboardProvider");
|
|
4609
|
+
return v(), j("div", fs, [
|
|
4608
4610
|
C(f(Nl), {
|
|
4609
4611
|
"cache-identifier": e.cacheIdentifier,
|
|
4610
4612
|
"disable-pagination-page-jump": "",
|
|
4611
4613
|
"disable-sorting": l.value,
|
|
4612
4614
|
"empty-state-options": k.value,
|
|
4613
4615
|
"enable-entity-actions": "",
|
|
4614
|
-
"error-message":
|
|
4616
|
+
"error-message": c.value,
|
|
4615
4617
|
fetcher: f(b),
|
|
4616
4618
|
"fetcher-cache-key": s.value,
|
|
4617
4619
|
"pagination-type": "offset",
|
|
@@ -4620,18 +4622,18 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4620
4622
|
"table-headers": f(m),
|
|
4621
4623
|
"use-action-outside": e.useActionOutside,
|
|
4622
4624
|
onClearSearchInput: S,
|
|
4623
|
-
"onClick:row":
|
|
4624
|
-
onSort:
|
|
4625
|
+
"onClick:row": u[3] || (u[3] = (Z) => J(Z)),
|
|
4626
|
+
onSort: x
|
|
4625
4627
|
}, {
|
|
4626
4628
|
"toolbar-filter": y(() => [
|
|
4627
4629
|
C(f(es), {
|
|
4628
4630
|
modelValue: h.value,
|
|
4629
|
-
"onUpdate:modelValue":
|
|
4630
|
-
config:
|
|
4631
|
+
"onUpdate:modelValue": u[0] || (u[0] = (Z) => h.value = Z),
|
|
4632
|
+
config: A.value
|
|
4631
4633
|
}, null, 8, ["modelValue", "config"])
|
|
4632
4634
|
]),
|
|
4633
4635
|
"toolbar-button": y(() => [
|
|
4634
|
-
(v(),
|
|
4636
|
+
(v(), R($e(e.useActionOutside ? "Teleport" : "div"), {
|
|
4635
4637
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
4636
4638
|
}, {
|
|
4637
4639
|
default: y(() => [
|
|
@@ -4639,18 +4641,18 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4639
4641
|
"auth-function": () => e.canCreate()
|
|
4640
4642
|
}, {
|
|
4641
4643
|
default: y(() => [
|
|
4642
|
-
Re(C(
|
|
4644
|
+
Re(C(g, {
|
|
4643
4645
|
appearance: "primary",
|
|
4644
4646
|
"data-testid": "toolbar-add-gateway-service",
|
|
4645
4647
|
icon: "plus",
|
|
4646
4648
|
to: e.config.createRoute
|
|
4647
4649
|
}, {
|
|
4648
4650
|
default: y(() => [
|
|
4649
|
-
G(
|
|
4651
|
+
G($(f(r)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
4650
4652
|
]),
|
|
4651
4653
|
_: 1
|
|
4652
4654
|
}, 8, ["to"]), [
|
|
4653
|
-
[De,
|
|
4655
|
+
[De, xe.value]
|
|
4654
4656
|
])
|
|
4655
4657
|
]),
|
|
4656
4658
|
_: 1
|
|
@@ -4659,72 +4661,72 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4659
4661
|
_: 1
|
|
4660
4662
|
}, 8, ["to"]))
|
|
4661
4663
|
]),
|
|
4662
|
-
name: y(({ rowValue:
|
|
4663
|
-
|
|
4664
|
+
name: y(({ rowValue: Z }) => [
|
|
4665
|
+
V("b", null, $(Z ?? "-"), 1)
|
|
4664
4666
|
]),
|
|
4665
|
-
enabled: y(({ row:
|
|
4667
|
+
enabled: y(({ row: Z }) => [
|
|
4666
4668
|
C(f(Be), {
|
|
4667
|
-
"auth-function": () => e.canEdit(
|
|
4669
|
+
"auth-function": () => e.canEdit(Z),
|
|
4668
4670
|
"force-show": ""
|
|
4669
4671
|
}, {
|
|
4670
|
-
default: y(({ isAllowed:
|
|
4671
|
-
|
|
4672
|
-
onClick:
|
|
4672
|
+
default: y(({ isAllowed: F }) => [
|
|
4673
|
+
V("div", {
|
|
4674
|
+
onClick: u[1] || (u[1] = Le(() => {
|
|
4673
4675
|
}, ["stop"]))
|
|
4674
4676
|
}, [
|
|
4675
|
-
C(
|
|
4676
|
-
modelValue:
|
|
4677
|
-
"onUpdate:modelValue": (We) =>
|
|
4678
|
-
"data-testid": `row-${
|
|
4679
|
-
disabled: !
|
|
4680
|
-
label:
|
|
4681
|
-
onClick:
|
|
4677
|
+
C(B, {
|
|
4678
|
+
modelValue: Z.enabled,
|
|
4679
|
+
"onUpdate:modelValue": (We) => Z.enabled = We,
|
|
4680
|
+
"data-testid": `row-${Z.id}-toggle-input`,
|
|
4681
|
+
disabled: !F,
|
|
4682
|
+
label: Z.enabled ? f(r)("actions.enable.enabled_label") : f(r)("actions.enable.disabled_label"),
|
|
4683
|
+
onClick: Le((We) => D(Z), ["prevent"])
|
|
4682
4684
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "label", "onClick"])
|
|
4683
4685
|
])
|
|
4684
4686
|
]),
|
|
4685
4687
|
_: 2
|
|
4686
4688
|
}, 1032, ["auth-function"])
|
|
4687
4689
|
]),
|
|
4688
|
-
tags: y(({ rowValue:
|
|
4689
|
-
(
|
|
4690
|
+
tags: y(({ rowValue: Z }) => [
|
|
4691
|
+
(Z == null ? void 0 : Z.length) > 0 ? (v(), R(le, { key: 0 }, {
|
|
4690
4692
|
default: y(() => [
|
|
4691
|
-
(v(!0),
|
|
4692
|
-
key:
|
|
4693
|
-
onClick:
|
|
4693
|
+
(v(!0), j(be, null, he(Z, (F) => (v(), R(ne, {
|
|
4694
|
+
key: F,
|
|
4695
|
+
onClick: u[2] || (u[2] = Le(() => {
|
|
4694
4696
|
}, ["stop"]))
|
|
4695
4697
|
}, {
|
|
4696
4698
|
default: y(() => [
|
|
4697
|
-
G(
|
|
4699
|
+
G($(F), 1)
|
|
4698
4700
|
]),
|
|
4699
4701
|
_: 2
|
|
4700
4702
|
}, 1024))), 128))
|
|
4701
4703
|
]),
|
|
4702
4704
|
_: 2
|
|
4703
|
-
}, 1024)) : (v(),
|
|
4705
|
+
}, 1024)) : (v(), j("span", ms, "-"))
|
|
4704
4706
|
]),
|
|
4705
|
-
actions: y(({ row:
|
|
4706
|
-
C(
|
|
4707
|
-
default: y(({ copyToClipboard:
|
|
4708
|
-
C(
|
|
4707
|
+
actions: y(({ row: Z }) => [
|
|
4708
|
+
C(w, null, {
|
|
4709
|
+
default: y(({ copyToClipboard: F }) => [
|
|
4710
|
+
C(de, {
|
|
4709
4711
|
"data-testid": "action-entity-copy-id",
|
|
4710
|
-
onClick: (We) => K(
|
|
4712
|
+
onClick: (We) => K(Z, F)
|
|
4711
4713
|
}, {
|
|
4712
4714
|
default: y(() => [
|
|
4713
|
-
G(
|
|
4715
|
+
G($(f(r)("actions.copy_id")), 1)
|
|
4714
4716
|
]),
|
|
4715
4717
|
_: 2
|
|
4716
4718
|
}, 1032, ["onClick"])
|
|
4717
4719
|
]),
|
|
4718
4720
|
_: 2
|
|
4719
4721
|
}, 1024),
|
|
4720
|
-
C(
|
|
4721
|
-
default: y(({ copyToClipboard:
|
|
4722
|
-
C(
|
|
4722
|
+
C(w, null, {
|
|
4723
|
+
default: y(({ copyToClipboard: F }) => [
|
|
4724
|
+
C(de, {
|
|
4723
4725
|
"data-testid": "action-entity-copy-json",
|
|
4724
|
-
onClick: (We) =>
|
|
4726
|
+
onClick: (We) => P(Z, F)
|
|
4725
4727
|
}, {
|
|
4726
4728
|
default: y(() => [
|
|
4727
|
-
G(
|
|
4729
|
+
G($(f(r)("actions.copy_json")), 1)
|
|
4728
4730
|
]),
|
|
4729
4731
|
_: 2
|
|
4730
4732
|
}, 1032, ["onClick"])
|
|
@@ -4732,40 +4734,40 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4732
4734
|
_: 2
|
|
4733
4735
|
}, 1024),
|
|
4734
4736
|
C(f(Be), {
|
|
4735
|
-
"auth-function": () => e.canRetrieve(
|
|
4737
|
+
"auth-function": () => e.canRetrieve(Z)
|
|
4736
4738
|
}, {
|
|
4737
4739
|
default: y(() => [
|
|
4738
|
-
C(
|
|
4740
|
+
C(de, {
|
|
4739
4741
|
"data-testid": "action-entity-view",
|
|
4740
4742
|
"has-divider": "",
|
|
4741
|
-
item:
|
|
4743
|
+
item: Y(Z.id)
|
|
4742
4744
|
}, null, 8, ["item"])
|
|
4743
4745
|
]),
|
|
4744
4746
|
_: 2
|
|
4745
4747
|
}, 1032, ["auth-function"]),
|
|
4746
4748
|
C(f(Be), {
|
|
4747
|
-
"auth-function": () => e.canEdit(
|
|
4749
|
+
"auth-function": () => e.canEdit(Z)
|
|
4748
4750
|
}, {
|
|
4749
4751
|
default: y(() => [
|
|
4750
|
-
C(
|
|
4752
|
+
C(de, {
|
|
4751
4753
|
"data-testid": "action-entity-edit",
|
|
4752
|
-
item:
|
|
4754
|
+
item: ee(Z.id)
|
|
4753
4755
|
}, null, 8, ["item"])
|
|
4754
4756
|
]),
|
|
4755
4757
|
_: 2
|
|
4756
4758
|
}, 1032, ["auth-function"]),
|
|
4757
4759
|
C(f(Be), {
|
|
4758
|
-
"auth-function": () => e.canDelete(
|
|
4760
|
+
"auth-function": () => e.canDelete(Z)
|
|
4759
4761
|
}, {
|
|
4760
4762
|
default: y(() => [
|
|
4761
|
-
C(
|
|
4763
|
+
C(de, {
|
|
4762
4764
|
danger: "",
|
|
4763
4765
|
"data-testid": "action-entity-delete",
|
|
4764
4766
|
"has-divider": "",
|
|
4765
|
-
onClick: (
|
|
4767
|
+
onClick: (F) => ot(Z)
|
|
4766
4768
|
}, {
|
|
4767
4769
|
default: y(() => [
|
|
4768
|
-
G(
|
|
4770
|
+
G($(f(r)("actions.delete.menu_label")), 1)
|
|
4769
4771
|
]),
|
|
4770
4772
|
_: 2
|
|
4771
4773
|
}, 1032, ["onClick"])
|
|
@@ -4780,21 +4782,21 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4780
4782
|
"entity-id": oe.value.id,
|
|
4781
4783
|
"entity-name": oe.value.name,
|
|
4782
4784
|
"entity-type": f(r)("glossary.gateway_services"),
|
|
4783
|
-
"on-confirm":
|
|
4784
|
-
visible:
|
|
4785
|
+
"on-confirm": z,
|
|
4786
|
+
visible: O.value,
|
|
4785
4787
|
onCanceled: I,
|
|
4786
4788
|
onProceed: I
|
|
4787
4789
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
4788
4790
|
C(f(Kl), {
|
|
4789
|
-
"action-pending":
|
|
4791
|
+
"action-pending": Q.value,
|
|
4790
4792
|
description: f(r)("actions.delete.description"),
|
|
4791
|
-
"entity-name":
|
|
4793
|
+
"entity-name": W.value && (W.value.name || W.value.id),
|
|
4792
4794
|
"entity-type": f(ci).GatewayService,
|
|
4793
|
-
error:
|
|
4795
|
+
error: te.value,
|
|
4794
4796
|
title: f(r)("actions.delete.title"),
|
|
4795
4797
|
visible: ae.value,
|
|
4796
4798
|
onCancel: Oe,
|
|
4797
|
-
onProceed:
|
|
4799
|
+
onProceed: nt
|
|
4798
4800
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
4799
4801
|
]);
|
|
4800
4802
|
};
|
|
@@ -4849,10 +4851,10 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4849
4851
|
},
|
|
4850
4852
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
4851
4853
|
setup(e, { expose: i, emit: t }) {
|
|
4852
|
-
var
|
|
4853
|
-
const a = t, r = e, n = U(!0), o =
|
|
4854
|
-
headers: (
|
|
4855
|
-
}), p =
|
|
4854
|
+
var q;
|
|
4855
|
+
const a = t, r = e, n = U(!0), o = bt(), { i18nT: s, i18n: { t: l } } = Ze.useI18n(), { getMessageFromError: d } = cs(), { axiosInstance: m } = or({
|
|
4856
|
+
headers: (q = r.config) == null ? void 0 : q.requestHeaders
|
|
4857
|
+
}), p = T(() => He.form[r.config.app].edit), _ = T(() => r.gatewayServiceId ? pt.Edit : pt.Create), h = U(!1), A = T(() => !!r.gatewayServiceId), b = U(A.value ? "protocol" : "url"), M = Ze.usePortFromProtocol(), S = U(""), x = T(() => !!S.value), c = Mt({
|
|
4856
4858
|
fields: {
|
|
4857
4859
|
name: "",
|
|
4858
4860
|
protocol: "http",
|
|
@@ -4872,7 +4874,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4872
4874
|
},
|
|
4873
4875
|
isReadonly: !1,
|
|
4874
4876
|
errorMessage: ""
|
|
4875
|
-
}), k =
|
|
4877
|
+
}), k = Mt({
|
|
4876
4878
|
name: "",
|
|
4877
4879
|
protocol: "http",
|
|
4878
4880
|
host: "",
|
|
@@ -4888,13 +4890,13 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4888
4890
|
tls_verify_enabled: !1,
|
|
4889
4891
|
tls_verify_value: !1,
|
|
4890
4892
|
tags: ""
|
|
4891
|
-
}),
|
|
4893
|
+
}), O = r.config.app === "konnect" || ps({
|
|
4892
4894
|
gatewayInfo: r.config.gatewayInfo,
|
|
4893
4895
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
4894
4896
|
supportedRange: {
|
|
4895
4897
|
enterprise: ["3.0"]
|
|
4896
4898
|
}
|
|
4897
|
-
}),
|
|
4899
|
+
}), N = [
|
|
4898
4900
|
{
|
|
4899
4901
|
label: l("gateway_services.form.fields.protocol.options.http"),
|
|
4900
4902
|
value: "http",
|
|
@@ -4930,7 +4932,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4930
4932
|
value: "grpcs",
|
|
4931
4933
|
group: "grpc"
|
|
4932
4934
|
},
|
|
4933
|
-
...
|
|
4935
|
+
...O ? [
|
|
4934
4936
|
{
|
|
4935
4937
|
label: l("gateway_services.form.fields.protocol.options.ws"),
|
|
4936
4938
|
value: "ws",
|
|
@@ -4947,125 +4949,126 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4947
4949
|
value: "udp",
|
|
4948
4950
|
group: "udp"
|
|
4949
4951
|
}
|
|
4950
|
-
], oe = { url: "url", protocol: "protocol" },
|
|
4952
|
+
], oe = { url: "url", protocol: "protocol" }, D = (u, g) => {
|
|
4951
4953
|
g.value;
|
|
4952
|
-
}, I = (
|
|
4953
|
-
n.value = !0,
|
|
4954
|
+
}, I = (u) => u ? parseFloat(u) : 0, z = () => {
|
|
4955
|
+
n.value = !0, c.errorMessage = "", c.fields.host = k.host, c.fields.path = k.path, c.fields.port = k.port, c.fields.protocol = k.protocol, c.fields.url = k.url, c.fields.retries = k.retries, c.fields.connect_timeout = k.connect_timeout, c.fields.write_timeout = k.write_timeout, c.fields.read_timeout = k.read_timeout, c.fields.client_certificate = k.client_certificate, c.fields.ca_certificates = k.ca_certificates, c.fields.tls_verify_enabled = k.tls_verify_enabled, c.fields.tls_verify_value = k.tls_verify_value;
|
|
4954
4956
|
}, K = () => {
|
|
4955
|
-
if (
|
|
4957
|
+
if (c.fields.url && b.value === "url")
|
|
4956
4958
|
try {
|
|
4957
|
-
const
|
|
4958
|
-
|
|
4959
|
-
const g = Number(
|
|
4960
|
-
h.value = !!g,
|
|
4961
|
-
} catch (
|
|
4962
|
-
|
|
4959
|
+
const u = new URL(c.fields.url);
|
|
4960
|
+
c.errorMessage = "", c.fields.protocol = u.protocol.slice(0, -1), c.fields.host = u.hostname, c.fields.path = u.pathname;
|
|
4961
|
+
const g = Number(u.port);
|
|
4962
|
+
h.value = !!g, c.fields.port = g || M.getPortFromProtocol(c.fields.protocol), c.errorMessage = "", a("url-valid:success");
|
|
4963
|
+
} catch (u) {
|
|
4964
|
+
c.errorMessage = l("errors.urlErrorMessage"), a("url-valid:error", d(u));
|
|
4963
4965
|
}
|
|
4964
4966
|
else
|
|
4965
|
-
a("url-valid:success"),
|
|
4966
|
-
},
|
|
4967
|
+
a("url-valid:success"), c.errorMessage = "";
|
|
4968
|
+
}, P = T(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(c.fields.protocol)), J = T(() => {
|
|
4967
4969
|
if (b.value === "url")
|
|
4968
4970
|
return !0;
|
|
4969
|
-
const
|
|
4970
|
-
return b.value === "protocol" &&
|
|
4971
|
-
}),
|
|
4971
|
+
const u = ["https", "wss", "tls"].includes(c.fields.protocol);
|
|
4972
|
+
return b.value === "protocol" && u;
|
|
4973
|
+
}), Y = T(() => {
|
|
4972
4974
|
if (b.value === "url")
|
|
4973
4975
|
return !0;
|
|
4974
|
-
const
|
|
4975
|
-
return b.value === "protocol" &&
|
|
4976
|
-
}),
|
|
4976
|
+
const u = ["https", "tls"].includes(c.fields.protocol);
|
|
4977
|
+
return b.value === "protocol" && u;
|
|
4978
|
+
}), ee = T(() => {
|
|
4977
4979
|
if (b.value === "url")
|
|
4978
4980
|
return !0;
|
|
4979
|
-
const
|
|
4980
|
-
return b.value === "protocol" &&
|
|
4981
|
-
}),
|
|
4982
|
-
S.value =
|
|
4983
|
-
},
|
|
4984
|
-
var g,
|
|
4985
|
-
|
|
4986
|
-
},
|
|
4981
|
+
const u = ["https", "wss", "tls"].includes(c.fields.protocol);
|
|
4982
|
+
return b.value === "protocol" && u;
|
|
4983
|
+
}), W = (u) => new RegExp("^[0-9a-zA-Z.\\-_~]*$").test(u) ? "" : l("errors.validationNameError"), ae = (u) => {
|
|
4984
|
+
S.value = W(u);
|
|
4985
|
+
}, Q = T(() => A.value && JSON.stringify(c.fields) !== JSON.stringify(k) || b.value === "url" && !!c.fields.url || b.value === "protocol" && !!c.fields.host), te = (u) => {
|
|
4986
|
+
var g, B, ne;
|
|
4987
|
+
c.fields.name = (u == null ? void 0 : u.name) || "", c.fields.tags = ((g = u == null ? void 0 : u.tags) == null ? void 0 : g.join(",")) || "", c.fields.protocol = (u == null ? void 0 : u.protocol) || "http", c.fields.path = (u == null ? void 0 : u.path) || "", c.fields.read_timeout = u != null && u.read_timeout || (u == null ? void 0 : u.read_timeout) === 0 ? u == null ? void 0 : u.read_timeout : 6e4, c.fields.retries = u != null && u.retries || (u == null ? void 0 : u.retries) === 0 ? u == null ? void 0 : u.retries : 5, c.fields.host = (u == null ? void 0 : u.host) || "", c.fields.connect_timeout = u != null && u.connect_timeout || (u == null ? void 0 : u.connect_timeout) === 0 ? u == null ? void 0 : u.connect_timeout : 6e4, c.fields.tls_verify_enabled = (u == null ? void 0 : u.tls_verify) !== "" && (u == null ? void 0 : u.tls_verify) !== null && (u == null ? void 0 : u.tls_verify) !== void 0, c.fields.tls_verify_value = u != null && u.tls_verify ? u == null ? void 0 : u.tls_verify : !1, c.fields.ca_certificates = ((B = u == null ? void 0 : u.ca_certificates) == null ? void 0 : B.join(",")) || "", c.fields.client_certificate = ((ne = u == null ? void 0 : u.client_certificate) == null ? void 0 : ne.id) || "", c.fields.write_timeout = u != null && u.write_timeout || (u == null ? void 0 : u.write_timeout) === 0 ? u == null ? void 0 : u.write_timeout : 6e4, c.fields.port = u != null && u.port || (u == null ? void 0 : u.port) === 0 ? u == null ? void 0 : u.port : 80, Object.assign(k, c.fields);
|
|
4988
|
+
}, pe = () => {
|
|
4987
4989
|
o.push(r.config.cancelRoute);
|
|
4988
|
-
},
|
|
4989
|
-
var g,
|
|
4990
|
-
let
|
|
4991
|
-
return r.config.app === "konnect" ?
|
|
4992
|
-
}), Oe =
|
|
4993
|
-
var g,
|
|
4994
|
-
let
|
|
4995
|
-
return r.config.app === "konnect" ?
|
|
4996
|
-
}),
|
|
4990
|
+
}, ot = T(() => {
|
|
4991
|
+
var g, B;
|
|
4992
|
+
let u = `${r.config.apiBaseUrl}${He.form[r.config.app].validate}`;
|
|
4993
|
+
return r.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((g = r.config) == null ? void 0 : g.controlPlaneId) || "") : r.config.app === "kongManager" && (u = u.replace(/\/{workspace}/gi, (B = r.config) != null && B.workspace ? `/${r.config.workspace}` : "")), u = u.replace(/{id}/gi, r.gatewayServiceId), u;
|
|
4994
|
+
}), Oe = T(() => {
|
|
4995
|
+
var g, B;
|
|
4996
|
+
let u = `${r.config.apiBaseUrl}${He.form[r.config.app][_.value]}`;
|
|
4997
|
+
return r.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((g = r.config) == null ? void 0 : g.controlPlaneId) || "") : r.config.app === "kongManager" && (u = u.replace(/\/{workspace}/gi, (B = r.config) != null && B.workspace ? `/${r.config.workspace}` : "")), u = u.replace(/{id}/gi, r.gatewayServiceId), u;
|
|
4998
|
+
}), nt = (u) => {
|
|
4997
4999
|
let g = "";
|
|
4998
|
-
|
|
4999
|
-
},
|
|
5000
|
-
var g,
|
|
5001
|
-
const
|
|
5002
|
-
name:
|
|
5003
|
-
tags:
|
|
5004
|
-
protocol:
|
|
5005
|
-
path:
|
|
5006
|
-
read_timeout:
|
|
5007
|
-
retries:
|
|
5008
|
-
host:
|
|
5009
|
-
connect_timeout:
|
|
5010
|
-
tls_verify_value:
|
|
5011
|
-
tls_verify_enabled:
|
|
5012
|
-
ca_certificates:
|
|
5013
|
-
client_certificate:
|
|
5014
|
-
write_timeout:
|
|
5015
|
-
port:
|
|
5016
|
-
url:
|
|
5000
|
+
u.url && (g = new URL(u.url).protocol), (["https", "wss", "tls"].includes(u.protocol) || ["https", "wss", "tls"].includes(g)) && (u.tls_verify = u.tls_verify_enabled ? u.tls_verify_value : null), delete u.tls_verify_enabled, delete u.tls_verify_value;
|
|
5001
|
+
}, xe = T(() => {
|
|
5002
|
+
var g, B;
|
|
5003
|
+
const u = {
|
|
5004
|
+
name: c.fields.name || null,
|
|
5005
|
+
tags: c.fields.tags ? (g = c.fields.tags) == null ? void 0 : g.split(",").filter((ne) => ne !== "") : null,
|
|
5006
|
+
protocol: c.fields.protocol,
|
|
5007
|
+
path: c.fields.path || null,
|
|
5008
|
+
read_timeout: c.fields.read_timeout,
|
|
5009
|
+
retries: c.fields.retries,
|
|
5010
|
+
host: c.fields.host,
|
|
5011
|
+
connect_timeout: c.fields.connect_timeout,
|
|
5012
|
+
tls_verify_value: c.fields.tls_verify_value,
|
|
5013
|
+
tls_verify_enabled: c.fields.tls_verify_enabled,
|
|
5014
|
+
ca_certificates: c.fields.ca_certificates ? (B = c.fields.ca_certificates) == null ? void 0 : B.split(",").filter((ne) => ne !== "") : null,
|
|
5015
|
+
client_certificate: c.fields.client_certificate ? { id: c.fields.client_certificate } : null,
|
|
5016
|
+
write_timeout: c.fields.write_timeout,
|
|
5017
|
+
port: c.fields.port,
|
|
5018
|
+
url: c.fields.url
|
|
5017
5019
|
};
|
|
5018
|
-
return
|
|
5019
|
-
}, xe = async () => {
|
|
5020
|
-
var
|
|
5020
|
+
return c.fields.client_certificate && ["https", "wss", "tls"].includes(c.fields.protocol) && (u.client_certificate = { id: c.fields.client_certificate }), c.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(c.fields.protocol) && (u.tls_verify = c.fields.tls_verify_value), P.value || (u.path = null), _.value === "create" ? b.value === "url" ? (delete u.protocol, delete u.host, delete u.path, r.config.app === "konnect" && delete u.port) : delete u.url : _.value === "edit" && delete u.url, u;
|
|
5021
|
+
}), Ee = () => (K(), xe.value), Fe = async () => {
|
|
5022
|
+
var u, g, B, ne;
|
|
5021
5023
|
try {
|
|
5022
|
-
|
|
5023
|
-
const
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5024
|
+
c.isReadonly = !0;
|
|
5025
|
+
const le = Ee();
|
|
5026
|
+
nt(le);
|
|
5027
|
+
let de;
|
|
5028
|
+
if (await m.post(ot.value, le), _.value === "create" ? de = await m.post(Oe.value, le) : _.value === "edit" && (de = ((u = r.config) == null ? void 0 : u.app) === "konnect" ? await m.put(Oe.value, le) : await m.patch(Oe.value, le)), de) {
|
|
5029
|
+
const { data: w } = de;
|
|
5030
|
+
c.fields.name = (w == null ? void 0 : w.name) || "", c.fields.port = w.port || M.getPortFromProtocol(w.protocol), c.fields.protocol = (w == null ? void 0 : w.protocol) || "http", c.fields.host = (w == null ? void 0 : w.host) || "", c.fields.path = (w == null ? void 0 : w.path) || "", c.fields.url = (w == null ? void 0 : w.url) || "", c.fields.retries = w != null && w.retries || (w == null ? void 0 : w.retries) === 0 ? w == null ? void 0 : w.retries : 5, c.fields.connect_timeout = w != null && w.connect_timeout || (w == null ? void 0 : w.connect_timeout) === 0 ? w == null ? void 0 : w.connect_timeout : 6e4, c.fields.write_timeout = w != null && w.write_timeout || (w == null ? void 0 : w.write_timeout) === 0 ? w == null ? void 0 : w.write_timeout : 6e4, c.fields.read_timeout = w != null && w.read_timeout || (w == null ? void 0 : w.read_timeout) === 0 ? w == null ? void 0 : w.read_timeout : 6e4, c.fields.client_certificate = ((g = w == null ? void 0 : w.client_certificate) == null ? void 0 : g.id) || "", c.fields.ca_certificates = (B = w == null ? void 0 : w.ca_certificates) != null && B.length ? w == null ? void 0 : w.ca_certificates.join(",") : "", c.fields.tls_verify_enabled = (w == null ? void 0 : w.tls_verify) !== "" && (w == null ? void 0 : w.tls_verify) !== null && (w == null ? void 0 : w.tls_verify) !== void 0, c.fields.tls_verify_value = c.fields.tls_verify_enabled && (w == null ? void 0 : w.tls_verify), c.fields.tags = (ne = w == null ? void 0 : w.tags) != null && ne.length ? w == null ? void 0 : w.tags.join(",") : "", Object.assign(k, c.fields), a("update", de == null ? void 0 : de.data);
|
|
5028
5031
|
}
|
|
5029
|
-
return
|
|
5030
|
-
} catch (
|
|
5031
|
-
|
|
5032
|
+
return de;
|
|
5033
|
+
} catch (le) {
|
|
5034
|
+
c.errorMessage = d(le), a("error", le);
|
|
5032
5035
|
} finally {
|
|
5033
|
-
|
|
5036
|
+
c.isReadonly = !1;
|
|
5034
5037
|
}
|
|
5035
5038
|
};
|
|
5036
|
-
return
|
|
5037
|
-
Object.assign(
|
|
5038
|
-
}),
|
|
5039
|
-
|
|
5039
|
+
return ke(() => r.gatewayServiceId, () => {
|
|
5040
|
+
Object.assign(c.fields, k);
|
|
5041
|
+
}), ke(c.fields, (u) => {
|
|
5042
|
+
c.fields.port = M.getPortFromProtocol(u.protocol, String(u.port)), a("model-updated", xe.value);
|
|
5040
5043
|
}), ai(() => {
|
|
5041
|
-
a("model-updated",
|
|
5044
|
+
a("model-updated", xe.value);
|
|
5042
5045
|
}), i({
|
|
5043
5046
|
validateUrl: K,
|
|
5044
|
-
getPayload:
|
|
5045
|
-
saveFormData:
|
|
5046
|
-
canSubmit:
|
|
5047
|
-
}), (
|
|
5048
|
-
const
|
|
5049
|
-
return v(),
|
|
5047
|
+
getPayload: xe,
|
|
5048
|
+
saveFormData: Fe,
|
|
5049
|
+
canSubmit: Q
|
|
5050
|
+
}), (u, g) => {
|
|
5051
|
+
const B = L("KInput"), ne = L("KLabel"), le = L("KRadio"), de = L("KSelect"), w = L("KCheckbox"), Z = L("KCollapse");
|
|
5052
|
+
return v(), j("div", ys, [
|
|
5050
5053
|
C(f(Tl), {
|
|
5051
|
-
"can-submit":
|
|
5054
|
+
"can-submit": Q.value,
|
|
5052
5055
|
config: e.config,
|
|
5053
5056
|
"edit-id": e.gatewayServiceId,
|
|
5054
|
-
"error-message":
|
|
5057
|
+
"error-message": c.errorMessage,
|
|
5055
5058
|
"fetch-url": p.value,
|
|
5056
|
-
"form-fields":
|
|
5057
|
-
"is-readonly":
|
|
5058
|
-
onCancel:
|
|
5059
|
-
"onFetch:error": g[25] || (g[25] = (
|
|
5060
|
-
"onFetch:success":
|
|
5061
|
-
onLoading: g[26] || (g[26] = (
|
|
5062
|
-
onSubmit:
|
|
5059
|
+
"form-fields": Ee(),
|
|
5060
|
+
"is-readonly": c.isReadonly,
|
|
5061
|
+
onCancel: pe,
|
|
5062
|
+
"onFetch:error": g[25] || (g[25] = (F) => u.$emit("error", F)),
|
|
5063
|
+
"onFetch:success": te,
|
|
5064
|
+
onLoading: g[26] || (g[26] = (F) => u.$emit("loading", F)),
|
|
5065
|
+
onSubmit: Fe
|
|
5063
5066
|
}, {
|
|
5064
5067
|
"form-actions": y(() => [
|
|
5065
|
-
|
|
5066
|
-
canSubmit:
|
|
5067
|
-
cancel:
|
|
5068
|
-
submit:
|
|
5068
|
+
X(u.$slots, "form-actions", {
|
|
5069
|
+
canSubmit: Q.value,
|
|
5070
|
+
cancel: pe,
|
|
5071
|
+
submit: Fe
|
|
5069
5072
|
}, void 0, !0)
|
|
5070
5073
|
]),
|
|
5071
5074
|
default: y(() => [
|
|
@@ -5075,25 +5078,25 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5075
5078
|
title: f(l)("gateway_services.form.sections.general.title")
|
|
5076
5079
|
}, {
|
|
5077
5080
|
default: y(() => [
|
|
5078
|
-
C(
|
|
5079
|
-
modelValue:
|
|
5080
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
5081
|
+
C(B, {
|
|
5082
|
+
modelValue: c.fields.name,
|
|
5083
|
+
"onUpdate:modelValue": g[0] || (g[0] = (F) => c.fields.name = F),
|
|
5081
5084
|
modelModifiers: { trim: !0 },
|
|
5082
5085
|
autocomplete: "off",
|
|
5083
5086
|
"data-testid": "gateway-service-name-input",
|
|
5084
|
-
error:
|
|
5087
|
+
error: x.value,
|
|
5085
5088
|
"error-message": S.value,
|
|
5086
5089
|
label: f(l)("gateway_services.form.fields.name.label"),
|
|
5087
5090
|
"label-attributes": { info: f(l)("gateway_services.form.fields.name.tooltip") },
|
|
5088
5091
|
name: "name",
|
|
5089
5092
|
placeholder: f(l)("gateway_services.form.fields.name.placeholder"),
|
|
5090
|
-
readonly:
|
|
5093
|
+
readonly: c.isReadonly,
|
|
5091
5094
|
type: "text",
|
|
5092
5095
|
onInput: ae
|
|
5093
5096
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
5094
|
-
C(
|
|
5095
|
-
modelValue:
|
|
5096
|
-
"onUpdate:modelValue": g[1] || (g[1] = (
|
|
5097
|
+
C(B, {
|
|
5098
|
+
modelValue: c.fields.tags,
|
|
5099
|
+
"onUpdate:modelValue": g[1] || (g[1] = (F) => c.fields.tags = F),
|
|
5097
5100
|
modelModifiers: { trim: !0 },
|
|
5098
5101
|
autocomplete: "off",
|
|
5099
5102
|
"data-testid": "gateway-service-tags-input",
|
|
@@ -5102,7 +5105,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5102
5105
|
"label-attributes": { info: f(l)("gateway_services.form.fields.tags.tooltip") },
|
|
5103
5106
|
name: "tags",
|
|
5104
5107
|
placeholder: f(l)("gateway_services.form.fields.tags.placeholder"),
|
|
5105
|
-
readonly:
|
|
5108
|
+
readonly: c.isReadonly,
|
|
5106
5109
|
type: "text"
|
|
5107
5110
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
5108
5111
|
]),
|
|
@@ -5114,33 +5117,33 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5114
5117
|
title: f(l)("gateway_services.form.sections.keys.title")
|
|
5115
5118
|
}, {
|
|
5116
5119
|
default: y(() => [
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
C(
|
|
5120
|
+
A.value ? H("", !0) : (v(), j("div", vs, [
|
|
5121
|
+
V("div", hs, [
|
|
5122
|
+
C(ne, { required: "" }, {
|
|
5120
5123
|
default: y(() => [
|
|
5121
|
-
G(
|
|
5124
|
+
G($(f(l)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
|
|
5122
5125
|
]),
|
|
5123
5126
|
_: 1
|
|
5124
5127
|
})
|
|
5125
5128
|
]),
|
|
5126
|
-
|
|
5127
|
-
C(
|
|
5129
|
+
V("div", bs, [
|
|
5130
|
+
C(le, {
|
|
5128
5131
|
modelValue: b.value,
|
|
5129
|
-
"onUpdate:modelValue": g[2] || (g[2] = (
|
|
5132
|
+
"onUpdate:modelValue": g[2] || (g[2] = (F) => b.value = F),
|
|
5130
5133
|
"data-testid": "gateway-service-url-radio",
|
|
5131
5134
|
"selected-value": oe.url,
|
|
5132
|
-
onChange:
|
|
5135
|
+
onChange: z
|
|
5133
5136
|
}, {
|
|
5134
5137
|
default: y(() => [
|
|
5135
|
-
G(
|
|
5138
|
+
G($(f(l)("gateway_services.form.sections.keys.urlLabel")), 1)
|
|
5136
5139
|
]),
|
|
5137
5140
|
_: 1
|
|
5138
5141
|
}, 8, ["modelValue", "selected-value"])
|
|
5139
5142
|
]),
|
|
5140
|
-
b.value === "url" ? (v(),
|
|
5141
|
-
C(
|
|
5142
|
-
modelValue:
|
|
5143
|
-
"onUpdate:modelValue": g[3] || (g[3] = (
|
|
5143
|
+
b.value === "url" ? (v(), j("div", ws, [
|
|
5144
|
+
C(B, {
|
|
5145
|
+
modelValue: c.fields.url,
|
|
5146
|
+
"onUpdate:modelValue": g[3] || (g[3] = (F) => c.fields.url = F),
|
|
5144
5147
|
modelModifiers: { trim: !0 },
|
|
5145
5148
|
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
5146
5149
|
"data-testid": "gateway-service-url-input",
|
|
@@ -5152,39 +5155,40 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5152
5155
|
placeholder: f(l)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
5153
5156
|
required: ""
|
|
5154
5157
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
5155
|
-
])) :
|
|
5156
|
-
C(
|
|
5158
|
+
])) : H("", !0),
|
|
5159
|
+
C(le, {
|
|
5157
5160
|
modelValue: b.value,
|
|
5158
|
-
"onUpdate:modelValue": g[4] || (g[4] = (
|
|
5161
|
+
"onUpdate:modelValue": g[4] || (g[4] = (F) => b.value = F),
|
|
5159
5162
|
"checked-group": "protocol",
|
|
5160
5163
|
"data-testid": "gateway-service-protocol-radio",
|
|
5161
5164
|
"selected-value": oe.protocol,
|
|
5162
|
-
onChange:
|
|
5165
|
+
onChange: z
|
|
5163
5166
|
}, {
|
|
5164
5167
|
default: y(() => [
|
|
5165
|
-
G(
|
|
5168
|
+
G($(f(l)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
|
|
5166
5169
|
]),
|
|
5167
5170
|
_: 1
|
|
5168
5171
|
}, 8, ["modelValue", "selected-value"])
|
|
5169
5172
|
])),
|
|
5170
|
-
b.value === "protocol" ||
|
|
5171
|
-
C(
|
|
5172
|
-
modelValue:
|
|
5173
|
-
"onUpdate:modelValue": g[5] || (g[5] = (
|
|
5173
|
+
b.value === "protocol" || A.value ? (v(), j("div", _s, [
|
|
5174
|
+
C(de, {
|
|
5175
|
+
modelValue: c.fields.protocol,
|
|
5176
|
+
"onUpdate:modelValue": g[5] || (g[5] = (F) => c.fields.protocol = F),
|
|
5177
|
+
appearance: "select",
|
|
5174
5178
|
"data-testid": "gateway-service-protocol-select",
|
|
5175
|
-
items:
|
|
5179
|
+
items: N,
|
|
5176
5180
|
label: f(l)("gateway_services.form.fields.protocol.label"),
|
|
5177
5181
|
"label-attributes": {
|
|
5178
5182
|
info: f(l)("gateway_services.form.fields.protocol.tooltip")
|
|
5179
5183
|
},
|
|
5180
|
-
readonly:
|
|
5184
|
+
readonly: c.isReadonly,
|
|
5181
5185
|
required: "",
|
|
5182
5186
|
width: "100%",
|
|
5183
|
-
onSelected: g[6] || (g[6] = (
|
|
5187
|
+
onSelected: g[6] || (g[6] = (F) => D(c.fields.protocol, F))
|
|
5184
5188
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
5185
|
-
C(
|
|
5186
|
-
modelValue:
|
|
5187
|
-
"onUpdate:modelValue": g[7] || (g[7] = (
|
|
5189
|
+
C(B, {
|
|
5190
|
+
modelValue: c.fields.host,
|
|
5191
|
+
"onUpdate:modelValue": g[7] || (g[7] = (F) => c.fields.host = F),
|
|
5188
5192
|
modelModifiers: { trim: !0 },
|
|
5189
5193
|
class: "gateway-service-form-margin-top",
|
|
5190
5194
|
"data-testid": "gateway-service-host-input",
|
|
@@ -5196,10 +5200,10 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5196
5200
|
placeholder: f(l)("gateway_services.form.fields.host.placeholder"),
|
|
5197
5201
|
required: ""
|
|
5198
5202
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"]),
|
|
5199
|
-
|
|
5200
|
-
C(
|
|
5201
|
-
modelValue:
|
|
5202
|
-
"onUpdate:modelValue": g[8] || (g[8] = (
|
|
5203
|
+
P.value ? (v(), j("div", ks, [
|
|
5204
|
+
C(B, {
|
|
5205
|
+
modelValue: c.fields.path,
|
|
5206
|
+
"onUpdate:modelValue": g[8] || (g[8] = (F) => c.fields.path = F),
|
|
5203
5207
|
modelModifiers: { trim: !0 },
|
|
5204
5208
|
class: "gateway-service-form-margin-top",
|
|
5205
5209
|
"data-testid": "gateway-service-path-input",
|
|
@@ -5210,13 +5214,13 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5210
5214
|
name: "path",
|
|
5211
5215
|
placeholder: f(l)("gateway_services.form.fields.path.placeholder")
|
|
5212
5216
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
5213
|
-
])) :
|
|
5214
|
-
C(
|
|
5215
|
-
modelValue:
|
|
5217
|
+
])) : H("", !0),
|
|
5218
|
+
C(B, {
|
|
5219
|
+
modelValue: c.fields.port,
|
|
5216
5220
|
"onUpdate:modelValue": [
|
|
5217
|
-
g[9] || (g[9] = (
|
|
5221
|
+
g[9] || (g[9] = (F) => c.fields.port = F),
|
|
5218
5222
|
g[10] || (g[10] = () => {
|
|
5219
|
-
|
|
5223
|
+
c.fields.port = I(c.fields.port + "");
|
|
5220
5224
|
})
|
|
5221
5225
|
],
|
|
5222
5226
|
class: "gateway-service-form-margin-top",
|
|
@@ -5228,23 +5232,23 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5228
5232
|
name: "port",
|
|
5229
5233
|
type: "number"
|
|
5230
5234
|
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
5231
|
-
])) :
|
|
5232
|
-
C(
|
|
5235
|
+
])) : H("", !0),
|
|
5236
|
+
C(Z, {
|
|
5233
5237
|
modelValue: n.value,
|
|
5234
|
-
"onUpdate:modelValue": g[24] || (g[24] = (
|
|
5238
|
+
"onUpdate:modelValue": g[24] || (g[24] = (F) => n.value = F),
|
|
5235
5239
|
"data-testid": "advanced-fields-collapse",
|
|
5236
5240
|
"trigger-alignment": "leading",
|
|
5237
5241
|
"trigger-label": f(l)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
5238
5242
|
}, {
|
|
5239
5243
|
default: y(() => [
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
C(
|
|
5243
|
-
modelValue:
|
|
5244
|
+
V("div", Cs, [
|
|
5245
|
+
V("div", Ss, [
|
|
5246
|
+
C(B, {
|
|
5247
|
+
modelValue: c.fields.retries,
|
|
5244
5248
|
"onUpdate:modelValue": [
|
|
5245
|
-
g[11] || (g[11] = (
|
|
5249
|
+
g[11] || (g[11] = (F) => c.fields.retries = F),
|
|
5246
5250
|
g[12] || (g[12] = () => {
|
|
5247
|
-
|
|
5251
|
+
c.fields.retries = I(c.fields.retries + "");
|
|
5248
5252
|
})
|
|
5249
5253
|
],
|
|
5250
5254
|
autocomplete: "off",
|
|
@@ -5252,17 +5256,17 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5252
5256
|
label: f(l)("gateway_services.form.fields.retries.label"),
|
|
5253
5257
|
"label-attributes": { info: f(l)("gateway_services.form.fields.retries.tooltip") },
|
|
5254
5258
|
name: "retries",
|
|
5255
|
-
readonly:
|
|
5259
|
+
readonly: c.isReadonly,
|
|
5256
5260
|
type: "number"
|
|
5257
5261
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
5258
5262
|
]),
|
|
5259
|
-
|
|
5260
|
-
C(
|
|
5261
|
-
modelValue:
|
|
5263
|
+
V("div", Is, [
|
|
5264
|
+
C(B, {
|
|
5265
|
+
modelValue: c.fields.connect_timeout,
|
|
5262
5266
|
"onUpdate:modelValue": [
|
|
5263
|
-
g[13] || (g[13] = (
|
|
5267
|
+
g[13] || (g[13] = (F) => c.fields.connect_timeout = F),
|
|
5264
5268
|
g[14] || (g[14] = () => {
|
|
5265
|
-
|
|
5269
|
+
c.fields.connect_timeout = I(c.fields.connect_timeout + "");
|
|
5266
5270
|
})
|
|
5267
5271
|
],
|
|
5268
5272
|
autocomplete: "off",
|
|
@@ -5270,17 +5274,17 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5270
5274
|
label: f(l)("gateway_services.form.fields.connect_timeout.label"),
|
|
5271
5275
|
"label-attributes": { info: f(l)("gateway_services.form.fields.connect_timeout.tooltip") },
|
|
5272
5276
|
name: "connTimeout",
|
|
5273
|
-
readonly:
|
|
5277
|
+
readonly: c.isReadonly,
|
|
5274
5278
|
type: "number"
|
|
5275
5279
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
5276
5280
|
]),
|
|
5277
|
-
|
|
5278
|
-
C(
|
|
5279
|
-
modelValue:
|
|
5281
|
+
V("div", As, [
|
|
5282
|
+
C(B, {
|
|
5283
|
+
modelValue: c.fields.write_timeout,
|
|
5280
5284
|
"onUpdate:modelValue": [
|
|
5281
|
-
g[15] || (g[15] = (
|
|
5285
|
+
g[15] || (g[15] = (F) => c.fields.write_timeout = F),
|
|
5282
5286
|
g[16] || (g[16] = () => {
|
|
5283
|
-
|
|
5287
|
+
c.fields.write_timeout = I(c.fields.write_timeout + "");
|
|
5284
5288
|
})
|
|
5285
5289
|
],
|
|
5286
5290
|
autocomplete: "off",
|
|
@@ -5288,17 +5292,17 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5288
5292
|
label: f(l)("gateway_services.form.fields.write_timeout.label"),
|
|
5289
5293
|
"label-attributes": { info: f(l)("gateway_services.form.fields.write_timeout.tooltip") },
|
|
5290
5294
|
name: "writeTimeout",
|
|
5291
|
-
readonly:
|
|
5295
|
+
readonly: c.isReadonly,
|
|
5292
5296
|
type: "number"
|
|
5293
5297
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
5294
5298
|
]),
|
|
5295
|
-
|
|
5296
|
-
C(
|
|
5297
|
-
modelValue:
|
|
5299
|
+
V("div", xs, [
|
|
5300
|
+
C(B, {
|
|
5301
|
+
modelValue: c.fields.read_timeout,
|
|
5298
5302
|
"onUpdate:modelValue": [
|
|
5299
|
-
g[17] || (g[17] = (
|
|
5303
|
+
g[17] || (g[17] = (F) => c.fields.read_timeout = F),
|
|
5300
5304
|
g[18] || (g[18] = () => {
|
|
5301
|
-
|
|
5305
|
+
c.fields.read_timeout = I(c.fields.read_timeout + "");
|
|
5302
5306
|
})
|
|
5303
5307
|
],
|
|
5304
5308
|
autocomplete: "off",
|
|
@@ -5306,14 +5310,14 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5306
5310
|
label: f(l)("gateway_services.form.fields.read_timeout.label"),
|
|
5307
5311
|
"label-attributes": { info: f(l)("gateway_services.form.fields.read_timeout.tooltip") },
|
|
5308
5312
|
name: "readTimeout",
|
|
5309
|
-
readonly:
|
|
5313
|
+
readonly: c.isReadonly,
|
|
5310
5314
|
type: "number"
|
|
5311
5315
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
5312
5316
|
]),
|
|
5313
|
-
|
|
5314
|
-
C(
|
|
5315
|
-
modelValue:
|
|
5316
|
-
"onUpdate:modelValue": g[19] || (g[19] = (
|
|
5317
|
+
J.value ? (v(), j("div", Ts, [
|
|
5318
|
+
C(B, {
|
|
5319
|
+
modelValue: c.fields.client_certificate,
|
|
5320
|
+
"onUpdate:modelValue": g[19] || (g[19] = (F) => c.fields.client_certificate = F),
|
|
5317
5321
|
modelModifiers: { trim: !0 },
|
|
5318
5322
|
autocomplete: "off",
|
|
5319
5323
|
"data-testid": "gateway-service-clientCert-input",
|
|
@@ -5321,20 +5325,20 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5321
5325
|
"label-attributes": { info: f(l)("gateway_services.form.fields.client_certificate.tooltip") },
|
|
5322
5326
|
name: "clientCert",
|
|
5323
5327
|
placeholder: f(l)("gateway_services.form.fields.client_certificate.placeholder"),
|
|
5324
|
-
readonly:
|
|
5328
|
+
readonly: c.isReadonly,
|
|
5325
5329
|
type: "text"
|
|
5326
5330
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])
|
|
5327
|
-
])) :
|
|
5328
|
-
|
|
5329
|
-
C(
|
|
5330
|
-
modelValue:
|
|
5331
|
-
"onUpdate:modelValue": g[20] || (g[20] = (
|
|
5331
|
+
])) : H("", !0),
|
|
5332
|
+
Y.value ? (v(), j("div", js, [
|
|
5333
|
+
C(B, {
|
|
5334
|
+
modelValue: c.fields.ca_certificates,
|
|
5335
|
+
"onUpdate:modelValue": g[20] || (g[20] = (F) => c.fields.ca_certificates = F),
|
|
5332
5336
|
modelModifiers: { trim: !0 },
|
|
5333
5337
|
autocomplete: "off",
|
|
5334
5338
|
"data-testid": "gateway-service-ca-certs-input",
|
|
5335
5339
|
label: f(l)("gateway_services.form.fields.ca_certificates.label"),
|
|
5336
5340
|
placeholder: f(l)("gateway_services.form.fields.ca_certificates.placeholder"),
|
|
5337
|
-
readonly:
|
|
5341
|
+
readonly: c.isReadonly,
|
|
5338
5342
|
type: "text"
|
|
5339
5343
|
}, {
|
|
5340
5344
|
"label-tooltip": y(() => [
|
|
@@ -5343,21 +5347,21 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5343
5347
|
scope: "global"
|
|
5344
5348
|
}, {
|
|
5345
5349
|
code1: y(() => [
|
|
5346
|
-
|
|
5350
|
+
V("code", null, $(f(l)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
5347
5351
|
]),
|
|
5348
5352
|
code2: y(() => [
|
|
5349
|
-
|
|
5353
|
+
V("code", null, $(f(l)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
5350
5354
|
]),
|
|
5351
5355
|
_: 1
|
|
5352
5356
|
})
|
|
5353
5357
|
]),
|
|
5354
5358
|
_: 1
|
|
5355
5359
|
}, 8, ["modelValue", "label", "placeholder", "readonly"])
|
|
5356
|
-
])) :
|
|
5357
|
-
|
|
5360
|
+
])) : H("", !0),
|
|
5361
|
+
ee.value ? (v(), j("div", Ms, [
|
|
5358
5362
|
C(w, {
|
|
5359
|
-
modelValue:
|
|
5360
|
-
"onUpdate:modelValue": g[21] || (g[21] = (
|
|
5363
|
+
modelValue: c.fields.tls_verify_enabled,
|
|
5364
|
+
"onUpdate:modelValue": g[21] || (g[21] = (F) => c.fields.tls_verify_enabled = F),
|
|
5361
5365
|
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
5362
5366
|
description: f(l)("gateway_services.form.fields.tls_verify_enabled.help"),
|
|
5363
5367
|
label: f(l)("gateway_services.form.fields.tls_verify_enabled.label")
|
|
@@ -5368,32 +5372,32 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5368
5372
|
scope: "global"
|
|
5369
5373
|
}, {
|
|
5370
5374
|
code1: y(() => [
|
|
5371
|
-
|
|
5375
|
+
V("code", null, $(f(l)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
5372
5376
|
]),
|
|
5373
5377
|
_: 1
|
|
5374
5378
|
})
|
|
5375
5379
|
]),
|
|
5376
5380
|
_: 1
|
|
5377
5381
|
}, 8, ["modelValue", "description", "label"]),
|
|
5378
|
-
|
|
5379
|
-
C(
|
|
5380
|
-
modelValue:
|
|
5381
|
-
"onUpdate:modelValue": g[22] || (g[22] = (
|
|
5382
|
+
c.fields.tls_verify_enabled ? (v(), j("div", $s, [
|
|
5383
|
+
C(le, {
|
|
5384
|
+
modelValue: c.fields.tls_verify_value,
|
|
5385
|
+
"onUpdate:modelValue": g[22] || (g[22] = (F) => c.fields.tls_verify_value = F),
|
|
5382
5386
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
5383
5387
|
label: f(l)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
5384
5388
|
"selected-value": !0
|
|
5385
5389
|
}, null, 8, ["modelValue", "label"])
|
|
5386
|
-
])) :
|
|
5387
|
-
|
|
5388
|
-
C(
|
|
5389
|
-
modelValue:
|
|
5390
|
-
"onUpdate:modelValue": g[23] || (g[23] = (
|
|
5390
|
+
])) : H("", !0),
|
|
5391
|
+
c.fields.tls_verify_enabled ? (v(), j("div", Os, [
|
|
5392
|
+
C(le, {
|
|
5393
|
+
modelValue: c.fields.tls_verify_value,
|
|
5394
|
+
"onUpdate:modelValue": g[23] || (g[23] = (F) => c.fields.tls_verify_value = F),
|
|
5391
5395
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
5392
5396
|
label: f(l)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
5393
5397
|
"selected-value": !1
|
|
5394
5398
|
}, null, 8, ["modelValue", "label"])
|
|
5395
|
-
])) :
|
|
5396
|
-
])) :
|
|
5399
|
+
])) : H("", !0)
|
|
5400
|
+
])) : H("", !0)
|
|
5397
5401
|
])
|
|
5398
5402
|
]),
|
|
5399
5403
|
_: 1
|
|
@@ -5407,7 +5411,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5407
5411
|
]);
|
|
5408
5412
|
};
|
|
5409
5413
|
}
|
|
5410
|
-
}), zs = /* @__PURE__ */ nr(Es, [["__scopeId", "data-v-
|
|
5414
|
+
}), zs = /* @__PURE__ */ nr(Es, [["__scopeId", "data-v-bdee3d58"]]), Fs = { class: "kong-ui-gateway-service-entity-config-card" }, Js = /* @__PURE__ */ re({
|
|
5411
5415
|
__name: "GatewayServiceConfigCard",
|
|
5412
5416
|
props: {
|
|
5413
5417
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5434,7 +5438,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5434
5438
|
},
|
|
5435
5439
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
5436
5440
|
setup(e) {
|
|
5437
|
-
const i = e, { i18n: { t }, i18nT: a } =
|
|
5441
|
+
const i = e, { i18n: { t }, i18nT: a } = Ze.useI18n(), r = T(() => He.form[i.config.app].edit), { getPropValue: n } = ds(), o = (l, d) => n(l, d) === !0 ? t("gateway_services.form.fields.tls_verify_option.true.display") : t("gateway_services.form.fields.tls_verify_option.false.display"), s = U({
|
|
5438
5442
|
id: {},
|
|
5439
5443
|
name: {
|
|
5440
5444
|
tooltip: t("gateway_services.form.fields.name.tooltip")
|
|
@@ -5443,19 +5447,19 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5443
5447
|
updated_at: {},
|
|
5444
5448
|
created_at: {},
|
|
5445
5449
|
protocol: {
|
|
5446
|
-
section:
|
|
5450
|
+
section: me.Basic,
|
|
5447
5451
|
tooltip: t("gateway_services.form.fields.protocol.tooltip")
|
|
5448
5452
|
},
|
|
5449
5453
|
host: {
|
|
5450
|
-
section:
|
|
5454
|
+
section: me.Basic,
|
|
5451
5455
|
tooltip: t("gateway_services.form.fields.host.tooltip")
|
|
5452
5456
|
},
|
|
5453
5457
|
path: {
|
|
5454
|
-
section:
|
|
5458
|
+
section: me.Basic,
|
|
5455
5459
|
tooltip: t("gateway_services.form.fields.path.tooltip")
|
|
5456
5460
|
},
|
|
5457
5461
|
port: {
|
|
5458
|
-
section:
|
|
5462
|
+
section: me.Basic,
|
|
5459
5463
|
tooltip: t("gateway_services.form.fields.port.tooltip")
|
|
5460
5464
|
},
|
|
5461
5465
|
tags: {
|
|
@@ -5483,7 +5487,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5483
5487
|
tooltip: t("gateway_services.form.fields.client_certificate.tooltip")
|
|
5484
5488
|
},
|
|
5485
5489
|
ca_certificates: {
|
|
5486
|
-
type:
|
|
5490
|
+
type: ie.BadgeTag,
|
|
5487
5491
|
label: t("gateway_services.form.fields.ca_certificates.label"),
|
|
5488
5492
|
order: 6
|
|
5489
5493
|
},
|
|
@@ -5494,7 +5498,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5494
5498
|
hidden: !0
|
|
5495
5499
|
}
|
|
5496
5500
|
});
|
|
5497
|
-
return (l, d) => (v(),
|
|
5501
|
+
return (l, d) => (v(), j("div", Fs, [
|
|
5498
5502
|
C(f(Sl), {
|
|
5499
5503
|
config: e.config,
|
|
5500
5504
|
"config-card-doc": e.configCardDoc,
|
|
@@ -5512,10 +5516,10 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5512
5516
|
scope: "global"
|
|
5513
5517
|
}, {
|
|
5514
5518
|
false: y(() => [
|
|
5515
|
-
|
|
5519
|
+
V("code", null, $(f(t)("gateway_services.form.fields.enabled.false")), 1)
|
|
5516
5520
|
]),
|
|
5517
5521
|
true: y(() => [
|
|
5518
|
-
|
|
5522
|
+
V("code", null, $(f(t)("gateway_services.form.fields.enabled.true")), 1)
|
|
5519
5523
|
]),
|
|
5520
5524
|
_: 1
|
|
5521
5525
|
})
|
|
@@ -5526,10 +5530,10 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5526
5530
|
scope: "global"
|
|
5527
5531
|
}, {
|
|
5528
5532
|
code1: y(() => [
|
|
5529
|
-
|
|
5533
|
+
V("code", null, $(f(t)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
5530
5534
|
]),
|
|
5531
5535
|
code2: y(() => [
|
|
5532
|
-
|
|
5536
|
+
V("code", null, $(f(t)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
5533
5537
|
]),
|
|
5534
5538
|
_: 1
|
|
5535
5539
|
})
|
|
@@ -5540,16 +5544,16 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5540
5544
|
scope: "global"
|
|
5541
5545
|
}, {
|
|
5542
5546
|
code1: y(() => [
|
|
5543
|
-
|
|
5547
|
+
V("code", null, $(f(t)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
5544
5548
|
]),
|
|
5545
5549
|
_: 1
|
|
5546
5550
|
})
|
|
5547
5551
|
]),
|
|
5548
5552
|
tls_verify: y((m) => [
|
|
5549
|
-
G(
|
|
5553
|
+
G($(typeof f(n)("rowValue", m) == "boolean" ? o("rowValue", m) : f(t)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
5550
5554
|
]),
|
|
5551
5555
|
client_certificate: y((m) => [
|
|
5552
|
-
G(
|
|
5556
|
+
G($(f(n)("rowValue", m) ? f(n)("rowValue", m).id : "–"), 1)
|
|
5553
5557
|
]),
|
|
5554
5558
|
_: 1
|
|
5555
5559
|
}, 8, ["config", "config-card-doc", "config-schema", "fetch-url", "hide-title"])
|
|
@@ -5557,7 +5561,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5557
5561
|
}
|
|
5558
5562
|
});
|
|
5559
5563
|
export {
|
|
5560
|
-
|
|
5564
|
+
Js as GatewayServiceConfigCard,
|
|
5561
5565
|
zs as GatewayServiceForm,
|
|
5562
5566
|
Hs as GatewayServiceList
|
|
5563
5567
|
};
|