@kong-ui-public/entities-gateway-services 2.2.5-pr.995.f7803beb.0 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-gateway-services.es.js +1226 -1250
- package/dist/entities-gateway-services.umd.js +24 -24
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ae, ref as N, computed as T, resolveComponent as L, openBlock as
|
|
1
|
+
import { defineComponent as ae, ref as N, computed as T, resolveComponent as L, openBlock as h, createBlock as P, Teleport as ii, createVNode as C, withCtx as y, unref as m, createTextVNode as J, toDisplayString as V, createElementVNode as F, watch as be, renderSlot as Z, createCommentVNode as D, useSlots as it, onBeforeMount as vt, createSlots as xe, createElementBlock as M, renderList as ge, Fragment as ye, normalizeClass as $e, withModifiers as Fe, withDirectives as Ue, vShow as Re, useCssVars as ra, resolveDynamicComponent as Ne, normalizeProps as oa, guardReactiveProps as la, mergeProps as ut, onMounted as ai, onUnmounted as na, normalizeStyle as ri, inject as sa, pushScopeId as oi, popScopeId as li, reactive as $t } from "vue";
|
|
2
2
|
import { useRouter as ht } from "vue-router";
|
|
3
3
|
import { createI18n as bt, i18nTComponent as ni } from "@kong-ui-public/i18n";
|
|
4
4
|
import ca from "axios";
|
|
@@ -234,7 +234,7 @@ const Ye = {
|
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
};
|
|
237
|
-
var si = /* @__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))(si || {}), dt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(dt || {}),
|
|
237
|
+
var si = /* @__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))(si || {}), dt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(dt || {}), Ae = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Ae || {}), ee = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(ee || {}), de = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(de || {});
|
|
238
238
|
function wt(e = {}) {
|
|
239
239
|
return {
|
|
240
240
|
axiosInstance: ca.create({
|
|
@@ -365,10 +365,10 @@ const Ca = {
|
|
|
365
365
|
fetch: "Could not fetch available items",
|
|
366
366
|
invalid: "Please select a valid value"
|
|
367
367
|
}
|
|
368
|
-
},
|
|
368
|
+
}, Ma = {
|
|
369
369
|
unexpected: "An unexpected error has occurred",
|
|
370
370
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
371
|
-
},
|
|
371
|
+
}, ja = {
|
|
372
372
|
enable: {
|
|
373
373
|
title: "Enable {entityType}",
|
|
374
374
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -379,7 +379,7 @@ const Ca = {
|
|
|
379
379
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
380
380
|
confirmText: "Yes, disable"
|
|
381
381
|
}
|
|
382
|
-
},
|
|
382
|
+
}, Ea = {
|
|
383
383
|
global: Ca,
|
|
384
384
|
deleteModal: Sa,
|
|
385
385
|
baseForm: Ia,
|
|
@@ -387,11 +387,11 @@ const Ca = {
|
|
|
387
387
|
baseConfigCard: xa,
|
|
388
388
|
filter: Ta,
|
|
389
389
|
debouncedFilter: $a,
|
|
390
|
-
errors:
|
|
391
|
-
toggleModal:
|
|
390
|
+
errors: Ma,
|
|
391
|
+
toggleModal: ja
|
|
392
392
|
};
|
|
393
393
|
function _t() {
|
|
394
|
-
const e = bt("en-us",
|
|
394
|
+
const e = bt("en-us", Ea);
|
|
395
395
|
return {
|
|
396
396
|
i18n: e,
|
|
397
397
|
i18nT: ni(e)
|
|
@@ -404,8 +404,8 @@ function ci() {
|
|
|
404
404
|
return !1;
|
|
405
405
|
const r = /* @__PURE__ */ new Set([...t, ...a]);
|
|
406
406
|
for (const o of r) {
|
|
407
|
-
const
|
|
408
|
-
if (
|
|
407
|
+
const n = t.filter((u) => u === o).length, l = a.filter((u) => u === o).length;
|
|
408
|
+
if (n !== l)
|
|
409
409
|
return !1;
|
|
410
410
|
}
|
|
411
411
|
return !0;
|
|
@@ -436,8 +436,8 @@ function ci() {
|
|
|
436
436
|
}
|
|
437
437
|
},
|
|
438
438
|
sortAlpha: (t) => (a, r) => {
|
|
439
|
-
let o = a[t] === void 0 || a[t] === null ? "" : a[t],
|
|
440
|
-
return Array.isArray(a[t]) && (o = a[t][0]), Array.isArray(r[t]) && (
|
|
439
|
+
let o = a[t] === void 0 || a[t] === null ? "" : a[t], n = r[t] === void 0 || r[t] === null ? "" : r[t];
|
|
440
|
+
return Array.isArray(a[t]) && (o = a[t][0]), Array.isArray(r[t]) && (n = r[t][0]), o.localeCompare(n);
|
|
441
441
|
},
|
|
442
442
|
isValidUuid: (t) => t ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(t) : !1
|
|
443
443
|
};
|
|
@@ -449,58 +449,58 @@ function Oa(e, i, t, a = {
|
|
|
449
449
|
t || (t = "100");
|
|
450
450
|
const { axiosInstance: r } = wt({
|
|
451
451
|
headers: e.requestHeaders
|
|
452
|
-
}), { i18n: { t: o } } = _t(), { debounce:
|
|
453
|
-
await
|
|
454
|
-
}, 200),
|
|
455
|
-
let
|
|
456
|
-
e.app === "konnect" ?
|
|
457
|
-
const { isValidUuid:
|
|
452
|
+
}), { i18n: { t: o } } = _t(), { debounce: n } = wa(), l = n(async (x) => {
|
|
453
|
+
await E(x);
|
|
454
|
+
}, 200), u = N(!1), d = N(""), f = N(""), p = N([]), w = N([]), b = N(void 0), S = m(i);
|
|
455
|
+
let k = `${e.apiBaseUrl}${S}`;
|
|
456
|
+
e.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
457
|
+
const { isValidUuid: v } = ci(), $ = async () => {
|
|
458
458
|
try {
|
|
459
|
-
|
|
460
|
-
const { data: x } = await r.get(`${
|
|
461
|
-
x != null && x.next || (
|
|
459
|
+
u.value = !0;
|
|
460
|
+
const { data: x } = await r.get(`${k}?size=${t}`);
|
|
461
|
+
x != null && x.next || (b.value = a.fetchedItemsKey in x ? x[a.fetchedItemsKey] : []), w.value = a.fetchedItemsKey in x ? x[a.fetchedItemsKey] : [], p.value = w.value;
|
|
462
462
|
} catch {
|
|
463
463
|
p.value = [], d.value = o("debouncedFilter.errors.fetch");
|
|
464
464
|
} finally {
|
|
465
|
-
|
|
465
|
+
u.value = !1;
|
|
466
466
|
}
|
|
467
|
-
}, s = N(""),
|
|
467
|
+
}, s = N(""), E = async (x) => {
|
|
468
468
|
var B, re, W;
|
|
469
469
|
if (s.value !== x)
|
|
470
|
-
if (s.value = x || "",
|
|
470
|
+
if (s.value = x || "", b.value === void 0)
|
|
471
471
|
try {
|
|
472
|
-
if (
|
|
473
|
-
let A =
|
|
472
|
+
if (u.value = !0, d.value = "", f.value = "", e.app === "konnect") {
|
|
473
|
+
let A = k + "";
|
|
474
474
|
x && (A += `/${x}`);
|
|
475
475
|
const { data: q } = await r.get(`${A}?size=${t}`);
|
|
476
476
|
a.fetchedItemsKey in q ? p.value = q[a.fetchedItemsKey] : q != null && q.id ? p.value = [q] : p.value = [];
|
|
477
477
|
} else if (x) {
|
|
478
478
|
const A = [];
|
|
479
|
-
|
|
480
|
-
const { data: K } = await r.get(`${
|
|
479
|
+
v(x) && a.searchKeys.includes("id") ? A.push((async () => {
|
|
480
|
+
const { data: K } = await r.get(`${k}/${x}`);
|
|
481
481
|
return [K[a.fetchedItemsKey] ?? K];
|
|
482
482
|
})()) : A.push(
|
|
483
483
|
...a.searchKeys.filter((K) => K !== "id").map(async (K) => {
|
|
484
|
-
const { data: H } = await r.get(`${
|
|
484
|
+
const { data: H } = await r.get(`${k}?${K}=${x}`);
|
|
485
485
|
return H[a.fetchedItemsKey];
|
|
486
486
|
})
|
|
487
487
|
);
|
|
488
488
|
const q = await Promise.all(A), U = /* @__PURE__ */ new Set();
|
|
489
489
|
p.value = [], (B = q == null ? void 0 : q.forEach) == null || B.call(q, (K) => {
|
|
490
490
|
var H;
|
|
491
|
-
(H = K == null ? void 0 : K.forEach) == null || H.call(K, (
|
|
492
|
-
U.has(
|
|
491
|
+
(H = K == null ? void 0 : K.forEach) == null || H.call(K, (R) => {
|
|
492
|
+
U.has(R.id) || (U.add(R.id), p.value.push(R));
|
|
493
493
|
});
|
|
494
494
|
});
|
|
495
495
|
} else
|
|
496
496
|
p.value = w.value;
|
|
497
497
|
} catch (A) {
|
|
498
|
-
((re = A == null ? void 0 : A.response) == null ? void 0 : re.status) === 404 ?
|
|
498
|
+
((re = A == null ? void 0 : A.response) == null ? void 0 : re.status) === 404 ? f.value = o("debouncedFilter.errors.invalid") : (p.value = [], d.value = o("debouncedFilter.errors.fetch"));
|
|
499
499
|
} finally {
|
|
500
|
-
|
|
500
|
+
u.value = !1;
|
|
501
501
|
}
|
|
502
502
|
else
|
|
503
|
-
|
|
503
|
+
u.value = !0, f.value = "", x ? (p.value = (W = b.value) == null ? void 0 : W.filter((A) => {
|
|
504
504
|
var q;
|
|
505
505
|
let U = !1;
|
|
506
506
|
for (const K of a.searchKeys) {
|
|
@@ -508,20 +508,20 @@ function Oa(e, i, t, a = {
|
|
|
508
508
|
H != null && H.includes(x.toLowerCase()) && (U = !0);
|
|
509
509
|
}
|
|
510
510
|
return U;
|
|
511
|
-
}), (!p.value || !p.value.length) && (
|
|
511
|
+
}), (!p.value || !p.value.length) && (f.value = o("debouncedFilter.errors.invalid"))) : p.value = b.value, u.value = !1;
|
|
512
512
|
};
|
|
513
513
|
return {
|
|
514
|
-
loading:
|
|
514
|
+
loading: u,
|
|
515
515
|
error: d,
|
|
516
|
-
validationError:
|
|
516
|
+
validationError: f,
|
|
517
517
|
results: p,
|
|
518
|
-
allRecords:
|
|
519
|
-
loadItems:
|
|
520
|
-
debouncedQueryChange:
|
|
518
|
+
allRecords: b,
|
|
519
|
+
loadItems: $,
|
|
520
|
+
debouncedQueryChange: l
|
|
521
521
|
};
|
|
522
522
|
}
|
|
523
523
|
function Va(e, i) {
|
|
524
|
-
const t =
|
|
524
|
+
const t = m(i), a = T(
|
|
525
525
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
526
526
|
);
|
|
527
527
|
return a.value.search = "", (r) => `${a.value.href}/${r}`;
|
|
@@ -538,8 +538,8 @@ function Fa() {
|
|
|
538
538
|
return i.response.data.detail;
|
|
539
539
|
if ((a = i.response.data.details) != null && a.length)
|
|
540
540
|
return i.response.data.details.map((o) => {
|
|
541
|
-
let
|
|
542
|
-
return o.messages && typeof o.messages == "object" && o.messages.length && (
|
|
541
|
+
let n = e("errors.unexpected");
|
|
542
|
+
return o.messages && typeof o.messages == "object" && o.messages.length && (n = o.messages.join(", ")), o.field ? `${o.field} - ${n}` : n;
|
|
543
543
|
}).join("; ");
|
|
544
544
|
if (i.response.data.message) {
|
|
545
545
|
const { message: o } = i.response.data;
|
|
@@ -557,7 +557,7 @@ function Fa() {
|
|
|
557
557
|
function Na(e) {
|
|
558
558
|
const i = window.location.origin, t = i.endsWith("/") ? i : `${i}/`;
|
|
559
559
|
try {
|
|
560
|
-
const a = e.join("/"), r = `${t}${a}`, o = e.some((
|
|
560
|
+
const a = e.join("/"), r = `${t}${a}`, o = e.some((n) => n.trim() === "");
|
|
561
561
|
if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(r) && !o && new URL(r))
|
|
562
562
|
return `${t}${a}`;
|
|
563
563
|
throw new Error("Invalid url");
|
|
@@ -566,35 +566,35 @@ function Na(e) {
|
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
568
|
function ui(e, i) {
|
|
569
|
-
const t = N(
|
|
569
|
+
const t = N(m(e)), a = N(m(i)), r = T(
|
|
570
570
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
571
571
|
), o = T(
|
|
572
572
|
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
573
573
|
);
|
|
574
|
-
return (
|
|
575
|
-
const { page:
|
|
574
|
+
return (n) => {
|
|
575
|
+
const { page: l, pageSize: u, offset: d, sortColumnKey: f, sortColumnOrder: p, query: w } = n;
|
|
576
576
|
try {
|
|
577
|
-
let
|
|
578
|
-
return r.value && w ? (
|
|
579
|
-
|
|
580
|
-
}),
|
|
581
|
-
} catch (
|
|
582
|
-
return console.error("RouteList(fetcher)",
|
|
577
|
+
let b = new URL(o.value.href);
|
|
578
|
+
return r.value && w ? (b.search = "", b = new URL(`${b.href}?filter[name][contains]=${w}`)) : (r.value || new URLSearchParams(w).forEach((S, k) => {
|
|
579
|
+
b.searchParams.append(k, S);
|
|
580
|
+
}), f && b.searchParams.append("sort_by", f), p === "desc" && b.searchParams.append("sort_desc", "1"), b.searchParams.append("size", String(u))), d && l !== 1 && b.searchParams.append("offset", String(d)), b.href;
|
|
581
|
+
} catch (b) {
|
|
582
|
+
return console.error("RouteList(fetcher)", b), a.value;
|
|
583
583
|
}
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
586
|
function Ka(e, i, t = "data") {
|
|
587
|
-
const a =
|
|
587
|
+
const a = m(i), { axiosInstance: r } = wt({
|
|
588
588
|
headers: e.requestHeaders
|
|
589
|
-
}), o = ui(e, a),
|
|
590
|
-
status:
|
|
589
|
+
}), o = ui(e, a), n = N({
|
|
590
|
+
status: Ae.Idle
|
|
591
591
|
});
|
|
592
|
-
return { fetcher: async (
|
|
592
|
+
return { fetcher: async (l) => {
|
|
593
593
|
try {
|
|
594
|
-
|
|
595
|
-
const
|
|
594
|
+
n.value = { status: Ae.Loading };
|
|
595
|
+
const u = o(l), { data: d } = await r.get(u), f = t && t.replace(/[^\w-_]/gi, "");
|
|
596
596
|
let p;
|
|
597
|
-
d[
|
|
597
|
+
d[f] && Array.isArray(d[f]) ? p = d[f] : Array.isArray(d) ? p = d : p = Object.keys(d).length ? [d] : [];
|
|
598
598
|
const w = {
|
|
599
599
|
data: p,
|
|
600
600
|
total: p.length,
|
|
@@ -604,26 +604,26 @@ function Ka(e, i, t = "data") {
|
|
|
604
604
|
}
|
|
605
605
|
} : null
|
|
606
606
|
};
|
|
607
|
-
return
|
|
608
|
-
status:
|
|
607
|
+
return n.value = {
|
|
608
|
+
status: Ae.Idle,
|
|
609
609
|
response: w
|
|
610
610
|
}, w;
|
|
611
|
-
} catch (
|
|
611
|
+
} catch (u) {
|
|
612
612
|
const d = {
|
|
613
613
|
data: [],
|
|
614
614
|
total: 0
|
|
615
615
|
};
|
|
616
|
-
return
|
|
617
|
-
status:
|
|
616
|
+
return l.query && u.response.status === 404 ? (n.value = {
|
|
617
|
+
status: Ae.NoResults,
|
|
618
618
|
response: d,
|
|
619
|
-
error:
|
|
620
|
-
}, d) : (
|
|
621
|
-
status:
|
|
619
|
+
error: u
|
|
620
|
+
}, d) : (n.value = {
|
|
621
|
+
status: Ae.Error,
|
|
622
622
|
response: d,
|
|
623
|
-
error:
|
|
623
|
+
error: u
|
|
624
624
|
}, d);
|
|
625
625
|
}
|
|
626
|
-
}, fetcherState:
|
|
626
|
+
}, fetcherState: n };
|
|
627
627
|
}
|
|
628
628
|
function La() {
|
|
629
629
|
const e = (t, a = "_") => t ? t.split(a).map((r) => r.toLowerCase() === "id" ? r.toUpperCase() : r.charAt(0).toUpperCase() + r.substring(1)).join(" ") : "", i = /(?:^|[\s-:'"])\w/g;
|
|
@@ -632,20 +632,20 @@ function La() {
|
|
|
632
632
|
convertKeyToTitle: e
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
|
-
const di = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,
|
|
635
|
+
const di = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Mt = (e) => {
|
|
636
636
|
if (typeof e != "string")
|
|
637
637
|
throw new TypeError("Invalid argument expected string");
|
|
638
638
|
const i = e.match(di);
|
|
639
639
|
if (!i)
|
|
640
640
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
641
641
|
return i.shift(), i;
|
|
642
|
-
},
|
|
642
|
+
}, jt = (e) => e === "*" || e === "x" || e === "X", Et = (e) => {
|
|
643
643
|
const i = parseInt(e, 10);
|
|
644
644
|
return isNaN(i) ? e : i;
|
|
645
645
|
}, qa = (e, i) => typeof e != typeof i ? [String(e), String(i)] : [e, i], Ba = (e, i) => {
|
|
646
|
-
if (
|
|
646
|
+
if (jt(e) || jt(i))
|
|
647
647
|
return 0;
|
|
648
|
-
const [t, a] = qa(
|
|
648
|
+
const [t, a] = qa(Et(e), Et(i));
|
|
649
649
|
return t > a ? 1 : t < a ? -1 : 0;
|
|
650
650
|
}, Ot = (e, i) => {
|
|
651
651
|
for (let t = 0; t < Math.max(e.length, i.length); t++) {
|
|
@@ -655,8 +655,8 @@ const di = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
655
655
|
}
|
|
656
656
|
return 0;
|
|
657
657
|
}, Pa = (e, i) => {
|
|
658
|
-
const t =
|
|
659
|
-
return
|
|
658
|
+
const t = Mt(e), a = Mt(i), r = t.pop(), o = a.pop(), n = Ot(t, a);
|
|
659
|
+
return n !== 0 ? n : r && o ? Ot(r.split("."), o.split(".")) : r || o ? r ? -1 : 1 : 0;
|
|
660
660
|
}, Vt = (e, i, t) => {
|
|
661
661
|
Ua(t);
|
|
662
662
|
const a = Pa(e, i);
|
|
@@ -684,8 +684,8 @@ function Da(e) {
|
|
|
684
684
|
const o = t[a];
|
|
685
685
|
if (!o)
|
|
686
686
|
return !1;
|
|
687
|
-
const [
|
|
688
|
-
return !(
|
|
687
|
+
const [n, l] = o;
|
|
688
|
+
return !(n && Vt(r, n, "<") || l && Vt(r, l, ">"));
|
|
689
689
|
}
|
|
690
690
|
function Ha(e) {
|
|
691
691
|
const i = N(0), t = N(0), a = N(!1);
|
|
@@ -797,14 +797,14 @@ const ne = {
|
|
|
797
797
|
lineHeight: "0",
|
|
798
798
|
width: t.value
|
|
799
799
|
}));
|
|
800
|
-
return (r, o) => (
|
|
800
|
+
return (r, o) => (h(), P(Ne(e.as), {
|
|
801
801
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
802
802
|
class: "kui-icon copy-icon",
|
|
803
803
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
804
804
|
style: ri(a.value)
|
|
805
805
|
}, {
|
|
806
|
-
default:
|
|
807
|
-
(
|
|
806
|
+
default: y(() => [
|
|
807
|
+
(h(), M("svg", {
|
|
808
808
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
809
809
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
810
810
|
fill: "none",
|
|
@@ -814,7 +814,7 @@ const ne = {
|
|
|
814
814
|
width: "100%",
|
|
815
815
|
xmlns: "http://www.w3.org/2000/svg"
|
|
816
816
|
}, [
|
|
817
|
-
e.title ? (
|
|
817
|
+
e.title ? (h(), M("title", Xa, V(e.title), 1)) : D("", !0),
|
|
818
818
|
er
|
|
819
819
|
], 8, Qa))
|
|
820
820
|
]),
|
|
@@ -872,40 +872,40 @@ const ne = {
|
|
|
872
872
|
placement: "bottomStart"
|
|
873
873
|
} : {
|
|
874
874
|
title: t.uuid
|
|
875
|
-
}),
|
|
876
|
-
label:
|
|
875
|
+
}), n = T(() => !!(t.tooltip && t.successTooltip)), l = N(t.tooltip), u = T(() => t.tooltip ? {
|
|
876
|
+
label: l.value,
|
|
877
877
|
positionFixed: !0,
|
|
878
878
|
maxWidth: "500px",
|
|
879
879
|
placement: "bottomStart"
|
|
880
880
|
} : {}), d = T(() => {
|
|
881
881
|
var w;
|
|
882
882
|
return t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${(w = t.uuid) == null ? void 0 : w.substring(0, 5)}` : t.uuid;
|
|
883
|
-
}),
|
|
884
|
-
|
|
885
|
-
|
|
883
|
+
}), f = (w) => {
|
|
884
|
+
l.value = w, setTimeout(() => {
|
|
885
|
+
l.value = t.tooltip;
|
|
886
886
|
}, 1800);
|
|
887
887
|
}, p = (w) => {
|
|
888
|
-
var
|
|
888
|
+
var b, S;
|
|
889
889
|
if (!w(t.uuid)) {
|
|
890
890
|
typeof r == "function" && r({
|
|
891
891
|
type: "error",
|
|
892
892
|
message: a("message.fail")
|
|
893
|
-
}),
|
|
893
|
+
}), n.value ? f(a("message.fail")) : i("error", t.uuid);
|
|
894
894
|
return;
|
|
895
895
|
}
|
|
896
|
-
const
|
|
896
|
+
const k = ((b = t.uuid) == null ? void 0 : b.length) > Kt, v = t.format === "hidden" || t.format === "redacted" ? a("message.success.prefix") : `"${((S = t.uuid) == null ? void 0 : S.substring(0, Kt)) + (k ? "..." : "")}"`;
|
|
897
897
|
typeof r == "function" && r({
|
|
898
898
|
type: "success",
|
|
899
|
-
message: `${
|
|
900
|
-
}),
|
|
899
|
+
message: `${v}${a("message.success.content")}`
|
|
900
|
+
}), n.value ? f(t.successTooltip) : i("success", t.uuid);
|
|
901
901
|
};
|
|
902
|
-
return (w,
|
|
902
|
+
return (w, b) => {
|
|
903
903
|
const S = L("KClipboardProvider");
|
|
904
|
-
return
|
|
905
|
-
e.format !== "hidden" ? (
|
|
906
|
-
default:
|
|
904
|
+
return h(), M("div", rr, [
|
|
905
|
+
e.format !== "hidden" ? (h(), P(Ne(e.idTooltip ? "KTooltip" : "div"), ut({ key: 0 }, o.value, { "data-testid": "copy-id" }), {
|
|
906
|
+
default: y(() => [
|
|
907
907
|
F("div", {
|
|
908
|
-
class:
|
|
908
|
+
class: $e([
|
|
909
909
|
"uuid-container",
|
|
910
910
|
e.truncated ? "truncated-uuid" : null,
|
|
911
911
|
e.useMono ? "mono" : null
|
|
@@ -913,23 +913,23 @@ const ne = {
|
|
|
913
913
|
}, V(d.value), 3)
|
|
914
914
|
]),
|
|
915
915
|
_: 1
|
|
916
|
-
}, 16)) :
|
|
917
|
-
(
|
|
918
|
-
default:
|
|
919
|
-
|
|
920
|
-
default:
|
|
916
|
+
}, 16)) : D("", !0),
|
|
917
|
+
(h(), P(Ne(e.tooltip ? "KTooltip" : "div"), ut(u.value, { class: "uuid-icon-wrapper" }), {
|
|
918
|
+
default: y(() => [
|
|
919
|
+
C(S, null, {
|
|
920
|
+
default: y(({ copyToClipboard: k }) => [
|
|
921
921
|
F("span", {
|
|
922
922
|
"data-testid": "copy-to-clipboard",
|
|
923
923
|
role: "button",
|
|
924
924
|
tabindex: "0",
|
|
925
|
-
onClick: Fe((
|
|
925
|
+
onClick: Fe((v) => p(k), ["stop"])
|
|
926
926
|
}, [
|
|
927
|
-
|
|
927
|
+
C(m(ir), {
|
|
928
928
|
class: "uuid-icon",
|
|
929
929
|
color: e.iconColor,
|
|
930
930
|
decorative: !!e.tooltip,
|
|
931
|
-
size:
|
|
932
|
-
title:
|
|
931
|
+
size: m(ar),
|
|
932
|
+
title: m(a)("iconTitle")
|
|
933
933
|
}, null, 8, ["color", "decorative", "size", "title"])
|
|
934
934
|
], 8, or)
|
|
935
935
|
]),
|
|
@@ -966,26 +966,26 @@ const ne = {
|
|
|
966
966
|
}
|
|
967
967
|
},
|
|
968
968
|
setup(e) {
|
|
969
|
-
const i = e, { i18n: { t } } = ne.useI18n(), { convertKeyToTitle: a } = ne.useStringHelpers(), r = T(() => i.item.key ?? "json-array-item"), o = T(() => i.item.value ?? i.item),
|
|
970
|
-
const
|
|
971
|
-
return i.isArrayItem && delete
|
|
972
|
-
}),
|
|
973
|
-
var
|
|
974
|
-
return i.isArrayItem ? (
|
|
969
|
+
const i = e, { i18n: { t } } = ne.useI18n(), { convertKeyToTitle: a } = ne.useStringHelpers(), r = T(() => i.item.key ?? "json-array-item"), o = T(() => i.item.value ?? i.item), n = T(() => {
|
|
970
|
+
const u = JSON.parse(JSON.stringify(o.value));
|
|
971
|
+
return i.isArrayItem && delete u.name, u;
|
|
972
|
+
}), l = T(() => {
|
|
973
|
+
var u;
|
|
974
|
+
return i.isArrayItem ? (u = o.value) != null && u.name ? a(o.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: i.index }) : "";
|
|
975
975
|
});
|
|
976
|
-
return (
|
|
977
|
-
class:
|
|
976
|
+
return (u, d) => (h(), P(Ne(e.isArrayItem ? "fieldset" : "div"), {
|
|
977
|
+
class: $e(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
978
978
|
}, {
|
|
979
|
-
default:
|
|
980
|
-
e.isArrayItem ? (
|
|
981
|
-
F("b", null, V(
|
|
982
|
-
])) :
|
|
983
|
-
(
|
|
979
|
+
default: y(() => [
|
|
980
|
+
e.isArrayItem ? (h(), M("legend", sr, [
|
|
981
|
+
F("b", null, V(l.value), 1)
|
|
982
|
+
])) : D("", !0),
|
|
983
|
+
(h(!0), M(ye, null, ge(Object.keys(n.value), (f, p) => (h(), P(kt, {
|
|
984
984
|
key: `${r.value}-property-${p}`,
|
|
985
985
|
item: {
|
|
986
|
-
key:
|
|
987
|
-
label:
|
|
988
|
-
value:
|
|
986
|
+
key: f,
|
|
987
|
+
label: m(a)(f),
|
|
988
|
+
value: n.value[f]
|
|
989
989
|
}
|
|
990
990
|
}, null, 8, ["item"]))), 128))
|
|
991
991
|
]),
|
|
@@ -1010,14 +1010,14 @@ const ne = {
|
|
|
1010
1010
|
const { i18n: { t: i } } = ne.useI18n();
|
|
1011
1011
|
return (t, a) => {
|
|
1012
1012
|
const r = L("KButton");
|
|
1013
|
-
return
|
|
1014
|
-
|
|
1013
|
+
return h(), M("div", null, [
|
|
1014
|
+
C(r, {
|
|
1015
1015
|
appearance: "tertiary",
|
|
1016
1016
|
class: "navigation-button",
|
|
1017
1017
|
onClick: a[0] || (a[0] = (o) => t.$emit("navigation-click", e.item))
|
|
1018
1018
|
}, {
|
|
1019
|
-
default:
|
|
1020
|
-
J(V(e.item.value ||
|
|
1019
|
+
default: y(() => [
|
|
1020
|
+
J(V(e.item.value || m(i)("baseConfigCard.commonFields.link")), 1)
|
|
1021
1021
|
]),
|
|
1022
1022
|
_: 1
|
|
1023
1023
|
})
|
|
@@ -1036,11 +1036,11 @@ const ne = {
|
|
|
1036
1036
|
const { i18n: { t: i } } = ne.useI18n();
|
|
1037
1037
|
return (t, a) => {
|
|
1038
1038
|
const r = L("KBadge");
|
|
1039
|
-
return
|
|
1039
|
+
return h(), P(r, {
|
|
1040
1040
|
appearance: e.status ? "success" : "neutral"
|
|
1041
1041
|
}, {
|
|
1042
|
-
default:
|
|
1043
|
-
J(V(e.status ?
|
|
1042
|
+
default: y(() => [
|
|
1043
|
+
J(V(e.status ? m(i)("baseConfigCard.statusBadge.enabledLabel") : m(i)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
1044
1044
|
]),
|
|
1045
1045
|
_: 1
|
|
1046
1046
|
}, 8, ["appearance"]);
|
|
@@ -1070,13 +1070,13 @@ const ne = {
|
|
|
1070
1070
|
emits: ["navigation-click"],
|
|
1071
1071
|
setup(e, { emit: i }) {
|
|
1072
1072
|
const t = e;
|
|
1073
|
-
ra((
|
|
1074
|
-
"0fea14db": d.value ? "none" : `solid ${
|
|
1075
|
-
"1cf0460e":
|
|
1076
|
-
"328cca12":
|
|
1077
|
-
"328f0fed":
|
|
1073
|
+
ra((b) => ({
|
|
1074
|
+
"0fea14db": d.value ? "none" : `solid ${m(yr)} ${m(mr)}`,
|
|
1075
|
+
"1cf0460e": u.value && n.value ? "block" : "flex",
|
|
1076
|
+
"328cca12": u.value && n.value ? "100%" : t.slim ? "50%" : "25%",
|
|
1077
|
+
"328f0fed": u.value && n.value ? "100%" : t.slim ? "50%" : "75%"
|
|
1078
1078
|
}));
|
|
1079
|
-
const a = it(), { i18n: { t: r, formatUnixTimeStamp: o } } = ne.useI18n(),
|
|
1079
|
+
const a = it(), { i18n: { t: r, formatUnixTimeStamp: o } } = ne.useI18n(), n = T(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), l = T(() => !!(t.item.tooltip || a["label-tooltip"])), u = T(() => t.item.type === ee.Json || t.item.type === ee.JsonArray), d = T(() => t.item.type === ee.JsonArray), f = T(() => {
|
|
1080
1080
|
switch (t.item.type) {
|
|
1081
1081
|
case ee.ID:
|
|
1082
1082
|
return {
|
|
@@ -1162,8 +1162,8 @@ const ne = {
|
|
|
1162
1162
|
attrs: {
|
|
1163
1163
|
"data-testid": `${t.item.key}-internal-link`,
|
|
1164
1164
|
item: t.item,
|
|
1165
|
-
onNavigationClick: (
|
|
1166
|
-
i("navigation-click",
|
|
1165
|
+
onNavigationClick: (b) => {
|
|
1166
|
+
i("navigation-click", b);
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
1169
|
};
|
|
@@ -1203,27 +1203,27 @@ const ne = {
|
|
|
1203
1203
|
};
|
|
1204
1204
|
}
|
|
1205
1205
|
}), p = N(), { isTruncated: w } = ne.useTruncationDetector(p);
|
|
1206
|
-
return (
|
|
1207
|
-
const
|
|
1208
|
-
return
|
|
1206
|
+
return (b, S) => {
|
|
1207
|
+
const k = L("KLabel"), v = L("KBadge"), $ = L("KTooltip");
|
|
1208
|
+
return h(), M("div", hr, [
|
|
1209
1209
|
F("div", {
|
|
1210
1210
|
class: "config-card-details-label",
|
|
1211
1211
|
"data-testid": `${e.item.key}-label`
|
|
1212
1212
|
}, [
|
|
1213
|
-
Z(
|
|
1214
|
-
k
|
|
1215
|
-
default:
|
|
1213
|
+
Z(b.$slots, "label", { item: e.item }, () => [
|
|
1214
|
+
C(k, { "tooltip-attributes": { maxWidth: "500px" } }, xe({
|
|
1215
|
+
default: y(() => [
|
|
1216
1216
|
J(V(e.item.label) + " ", 1)
|
|
1217
1217
|
]),
|
|
1218
1218
|
_: 2
|
|
1219
1219
|
}, [
|
|
1220
|
-
|
|
1220
|
+
l.value ? {
|
|
1221
1221
|
name: "tooltip",
|
|
1222
|
-
fn:
|
|
1222
|
+
fn: y(() => [
|
|
1223
1223
|
F("div", {
|
|
1224
1224
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1225
1225
|
}, [
|
|
1226
|
-
Z(
|
|
1226
|
+
Z(b.$slots, "label-tooltip", {}, () => [
|
|
1227
1227
|
J(V(e.item.tooltip), 1)
|
|
1228
1228
|
], !0)
|
|
1229
1229
|
], 8, wr)
|
|
@@ -1237,83 +1237,83 @@ const ne = {
|
|
|
1237
1237
|
class: "config-card-details-value",
|
|
1238
1238
|
"data-testid": `${e.item.key}-property-value`
|
|
1239
1239
|
}, [
|
|
1240
|
-
Z(
|
|
1240
|
+
Z(b.$slots, e.item.key, {
|
|
1241
1241
|
rowValue: e.item.value
|
|
1242
1242
|
}, () => [
|
|
1243
|
-
|
|
1244
|
-
(
|
|
1245
|
-
default:
|
|
1246
|
-
|
|
1243
|
+
n.value ? (h(), M("div", Cr, [
|
|
1244
|
+
(h(), P(Ne(f.value.tag), oa(la(f.value.attrs)), {
|
|
1245
|
+
default: y(() => [
|
|
1246
|
+
f.value.additionalComponent === "KBadge" ? (h(), M("div", {
|
|
1247
1247
|
key: 0,
|
|
1248
1248
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1249
1249
|
}, [
|
|
1250
|
-
(
|
|
1251
|
-
key: `${e.item.key}-badge-tag-${
|
|
1250
|
+
(h(!0), M(ye, null, ge(e.item.value, (s, E) => (h(), P(v, {
|
|
1251
|
+
key: `${e.item.key}-badge-tag-${E}`,
|
|
1252
1252
|
class: "config-badge",
|
|
1253
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1253
|
+
"data-testid": `${e.item.key}-badge-tag-${E}`,
|
|
1254
1254
|
tooltip: s,
|
|
1255
1255
|
"truncation-tooltip": ""
|
|
1256
1256
|
}, {
|
|
1257
|
-
default:
|
|
1257
|
+
default: y(() => [
|
|
1258
1258
|
J(V(s), 1)
|
|
1259
1259
|
]),
|
|
1260
1260
|
_: 2
|
|
1261
1261
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
1262
|
-
], 8, Sr)) :
|
|
1263
|
-
|
|
1262
|
+
], 8, Sr)) : D("", !0),
|
|
1263
|
+
f.value.additionalComponent === "CopyUuid" ? (h(), M("div", {
|
|
1264
1264
|
key: 1,
|
|
1265
1265
|
class: "copy-uuid-array",
|
|
1266
1266
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1267
1267
|
}, [
|
|
1268
|
-
(
|
|
1269
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1270
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1268
|
+
(h(!0), M(ye, null, ge(e.item.value, (s, E) => (h(), P(m(fi), ut(f.value.childAttrs, {
|
|
1269
|
+
key: `${e.item.key}-copy-uuid-${E}`,
|
|
1270
|
+
"data-testid": `${e.item.key}-copy-uuid-${E}`,
|
|
1271
1271
|
uuid: s
|
|
1272
1272
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1273
|
-
], 8, Ir)) :
|
|
1273
|
+
], 8, Ir)) : f.value.additionalComponent === "KMethodBadge" ? (h(), M("div", {
|
|
1274
1274
|
key: 2,
|
|
1275
1275
|
class: "method-badge-array",
|
|
1276
1276
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1277
1277
|
}, [
|
|
1278
|
-
(
|
|
1279
|
-
key: `${e.item.key}-badge-method-${
|
|
1280
|
-
appearance: Object.values(
|
|
1278
|
+
(h(!0), M(ye, null, ge(e.item.value, (s, E) => (h(), P(v, {
|
|
1279
|
+
key: `${e.item.key}-badge-method-${E}`,
|
|
1280
|
+
appearance: Object.values(m(ua)).includes(s.toLowerCase()) ? s.toLowerCase() : "custom",
|
|
1281
1281
|
class: "config-badge",
|
|
1282
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1282
|
+
"data-testid": `${e.item.key}-badge-method-${E}`
|
|
1283
1283
|
}, {
|
|
1284
|
-
default:
|
|
1284
|
+
default: y(() => [
|
|
1285
1285
|
J(V(s), 1)
|
|
1286
1286
|
]),
|
|
1287
1287
|
_: 2
|
|
1288
1288
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1289
|
-
], 8, Ar)) :
|
|
1290
|
-
|
|
1289
|
+
], 8, Ar)) : D("", !0),
|
|
1290
|
+
f.value.additionalComponent === "JsonCardItem" ? (h(), M("div", {
|
|
1291
1291
|
key: 3,
|
|
1292
1292
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1293
1293
|
}, [
|
|
1294
|
-
(
|
|
1295
|
-
key: `json-array-item-${
|
|
1296
|
-
index:
|
|
1294
|
+
(h(!0), M(ye, null, ge(e.item.value, (s, E) => (h(), P(mi, {
|
|
1295
|
+
key: `json-array-item-${E}`,
|
|
1296
|
+
index: E,
|
|
1297
1297
|
"is-array-item": "",
|
|
1298
1298
|
item: s
|
|
1299
1299
|
}, null, 8, ["index", "item"]))), 128))
|
|
1300
|
-
], 8, xr)) : (
|
|
1300
|
+
], 8, xr)) : (h(), P($, {
|
|
1301
1301
|
key: 4,
|
|
1302
|
-
label:
|
|
1302
|
+
label: m(w) ? e.item.value : ""
|
|
1303
1303
|
}, {
|
|
1304
|
-
default:
|
|
1304
|
+
default: y(() => [
|
|
1305
1305
|
F("span", {
|
|
1306
1306
|
ref_key: "textContent",
|
|
1307
1307
|
ref: p,
|
|
1308
|
-
class:
|
|
1309
|
-
}, V(
|
|
1308
|
+
class: $e(["attrs-data-text", { truncated: e.truncated }])
|
|
1309
|
+
}, V(f.value.text), 3)
|
|
1310
1310
|
]),
|
|
1311
1311
|
_: 1
|
|
1312
1312
|
}, 8, ["label"]))
|
|
1313
1313
|
]),
|
|
1314
1314
|
_: 1
|
|
1315
1315
|
}, 16))
|
|
1316
|
-
])) : (
|
|
1316
|
+
])) : (h(), M("div", {
|
|
1317
1317
|
key: 0,
|
|
1318
1318
|
"data-testid": `${e.item.key}-no-value`
|
|
1319
1319
|
}, " – ", 8, kr))
|
|
@@ -1327,13 +1327,13 @@ const ne = {
|
|
|
1327
1327
|
function gi(e) {
|
|
1328
1328
|
return typeof e > "u" || e === null;
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function Mr(e) {
|
|
1331
1331
|
return typeof e == "object" && e !== null;
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1333
|
+
function jr(e) {
|
|
1334
1334
|
return Array.isArray(e) ? e : gi(e) ? [] : [e];
|
|
1335
1335
|
}
|
|
1336
|
-
function
|
|
1336
|
+
function Er(e, i) {
|
|
1337
1337
|
var t, a, r, o;
|
|
1338
1338
|
if (i)
|
|
1339
1339
|
for (o = Object.keys(i), t = 0, a = o.length; t < a; t += 1)
|
|
@@ -1349,7 +1349,7 @@ function Or(e, i) {
|
|
|
1349
1349
|
function Vr(e) {
|
|
1350
1350
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1351
1351
|
}
|
|
1352
|
-
var Fr = gi, Nr =
|
|
1352
|
+
var Fr = gi, Nr = Mr, Kr = jr, Lr = Or, qr = Vr, Br = Er, le = {
|
|
1353
1353
|
isNothing: Fr,
|
|
1354
1354
|
isObject: Nr,
|
|
1355
1355
|
toArray: Kr,
|
|
@@ -1373,9 +1373,9 @@ He.prototype.toString = function(e) {
|
|
|
1373
1373
|
};
|
|
1374
1374
|
var fe = He;
|
|
1375
1375
|
function nt(e, i, t, a, r) {
|
|
1376
|
-
var o = "",
|
|
1377
|
-
return a - i >
|
|
1378
|
-
str: o + e.slice(i, t).replace(/\t/g, "→") +
|
|
1376
|
+
var o = "", n = "", l = Math.floor(r / 2) - 1;
|
|
1377
|
+
return a - i > l && (o = " ... ", i = a - l + o.length), t - a > l && (n = " ...", t = a + l - n.length), {
|
|
1378
|
+
str: o + e.slice(i, t).replace(/\t/g, "→") + n,
|
|
1379
1379
|
pos: a - i + o.length
|
|
1380
1380
|
// relative position
|
|
1381
1381
|
};
|
|
@@ -1387,31 +1387,31 @@ function Pr(e, i) {
|
|
|
1387
1387
|
if (i = Object.create(i || null), !e.buffer)
|
|
1388
1388
|
return null;
|
|
1389
1389
|
i.maxLength || (i.maxLength = 79), typeof i.indent != "number" && (i.indent = 1), typeof i.linesBefore != "number" && (i.linesBefore = 3), typeof i.linesAfter != "number" && (i.linesAfter = 2);
|
|
1390
|
-
for (var t = /\r?\n|\r|\0/g, a = [0], r = [], o,
|
|
1391
|
-
r.push(o.index), a.push(o.index + o[0].length), e.position <= o.index &&
|
|
1392
|
-
|
|
1393
|
-
var
|
|
1394
|
-
for (
|
|
1390
|
+
for (var t = /\r?\n|\r|\0/g, a = [0], r = [], o, n = -1; o = t.exec(e.buffer); )
|
|
1391
|
+
r.push(o.index), a.push(o.index + o[0].length), e.position <= o.index && n < 0 && (n = a.length - 2);
|
|
1392
|
+
n < 0 && (n = a.length - 1);
|
|
1393
|
+
var l = "", u, d, f = Math.min(e.line + i.linesAfter, r.length).toString().length, p = i.maxLength - (i.indent + f + 3);
|
|
1394
|
+
for (u = 1; u <= i.linesBefore && !(n - u < 0); u++)
|
|
1395
1395
|
d = nt(
|
|
1396
1396
|
e.buffer,
|
|
1397
|
-
a[
|
|
1398
|
-
r[
|
|
1399
|
-
e.position - (a[
|
|
1397
|
+
a[n - u],
|
|
1398
|
+
r[n - u],
|
|
1399
|
+
e.position - (a[n] - a[n - u]),
|
|
1400
1400
|
p
|
|
1401
|
-
),
|
|
1402
|
-
` +
|
|
1403
|
-
for (d = nt(e.buffer, a[
|
|
1404
|
-
`,
|
|
1405
|
-
`,
|
|
1401
|
+
), l = le.repeat(" ", i.indent) + st((e.line - u + 1).toString(), f) + " | " + d.str + `
|
|
1402
|
+
` + l;
|
|
1403
|
+
for (d = nt(e.buffer, a[n], r[n], e.position, p), l += le.repeat(" ", i.indent) + st((e.line + 1).toString(), f) + " | " + d.str + `
|
|
1404
|
+
`, l += le.repeat("-", i.indent + f + 3 + d.pos) + `^
|
|
1405
|
+
`, u = 1; u <= i.linesAfter && !(n + u >= r.length); u++)
|
|
1406
1406
|
d = nt(
|
|
1407
1407
|
e.buffer,
|
|
1408
|
-
a[
|
|
1409
|
-
r[
|
|
1410
|
-
e.position - (a[
|
|
1408
|
+
a[n + u],
|
|
1409
|
+
r[n + u],
|
|
1410
|
+
e.position - (a[n] - a[n + u]),
|
|
1411
1411
|
p
|
|
1412
|
-
),
|
|
1412
|
+
), l += le.repeat(" ", i.indent) + st((e.line + u + 1).toString(), f) + " | " + d.str + `
|
|
1413
1413
|
`;
|
|
1414
|
-
return
|
|
1414
|
+
return l.replace(/\n$/, "");
|
|
1415
1415
|
}
|
|
1416
1416
|
var Ur = Pr, Rr = [
|
|
1417
1417
|
"kind",
|
|
@@ -1453,8 +1453,8 @@ function Lt(e, i) {
|
|
|
1453
1453
|
var t = [];
|
|
1454
1454
|
return e[i].forEach(function(a) {
|
|
1455
1455
|
var r = t.length;
|
|
1456
|
-
t.forEach(function(o,
|
|
1457
|
-
o.tag === a.tag && o.kind === a.kind && o.multi === a.multi && (r =
|
|
1456
|
+
t.forEach(function(o, n) {
|
|
1457
|
+
o.tag === a.tag && o.kind === a.kind && o.multi === a.multi && (r = n);
|
|
1458
1458
|
}), t[r] = a;
|
|
1459
1459
|
}), t;
|
|
1460
1460
|
}
|
|
@@ -1766,22 +1766,22 @@ function fo(e) {
|
|
|
1766
1766
|
return e === null ? !1 : Ti.exec(e) !== null || $i.exec(e) !== null;
|
|
1767
1767
|
}
|
|
1768
1768
|
function mo(e) {
|
|
1769
|
-
var i, t, a, r, o,
|
|
1769
|
+
var i, t, a, r, o, n, l, u = 0, d = null, f, p, w;
|
|
1770
1770
|
if (i = Ti.exec(e), i === null && (i = $i.exec(e)), i === null)
|
|
1771
1771
|
throw new Error("Date resolve error");
|
|
1772
1772
|
if (t = +i[1], a = +i[2] - 1, r = +i[3], !i[4])
|
|
1773
1773
|
return new Date(Date.UTC(t, a, r));
|
|
1774
|
-
if (o = +i[4],
|
|
1775
|
-
for (
|
|
1776
|
-
|
|
1777
|
-
|
|
1774
|
+
if (o = +i[4], n = +i[5], l = +i[6], i[7]) {
|
|
1775
|
+
for (u = i[7].slice(0, 3); u.length < 3; )
|
|
1776
|
+
u += "0";
|
|
1777
|
+
u = +u;
|
|
1778
1778
|
}
|
|
1779
|
-
return i[9] && (
|
|
1779
|
+
return i[9] && (f = +i[10], p = +(i[11] || 0), d = (f * 60 + p) * 6e4, i[9] === "-" && (d = -d)), w = new Date(Date.UTC(t, a, r, o, n, l, u)), d && w.setTime(w.getTime() - d), w;
|
|
1780
1780
|
}
|
|
1781
1781
|
function go(e) {
|
|
1782
1782
|
return e.toISOString();
|
|
1783
1783
|
}
|
|
1784
|
-
var
|
|
1784
|
+
var Mi = new ue("tag:yaml.org,2002:timestamp", {
|
|
1785
1785
|
kind: "scalar",
|
|
1786
1786
|
resolve: fo,
|
|
1787
1787
|
construct: mo,
|
|
@@ -1791,7 +1791,7 @@ var ji = new ue("tag:yaml.org,2002:timestamp", {
|
|
|
1791
1791
|
function yo(e) {
|
|
1792
1792
|
return e === "<<" || e === null;
|
|
1793
1793
|
}
|
|
1794
|
-
var
|
|
1794
|
+
var ji = new ue("tag:yaml.org,2002:merge", {
|
|
1795
1795
|
kind: "scalar",
|
|
1796
1796
|
resolve: yo
|
|
1797
1797
|
}), Ct = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
@@ -1809,21 +1809,21 @@ function vo(e) {
|
|
|
1809
1809
|
return a % 8 === 0;
|
|
1810
1810
|
}
|
|
1811
1811
|
function ho(e) {
|
|
1812
|
-
var i, t, a = e.replace(/[\r\n=]/g, ""), r = a.length, o = Ct,
|
|
1812
|
+
var i, t, a = e.replace(/[\r\n=]/g, ""), r = a.length, o = Ct, n = 0, l = [];
|
|
1813
1813
|
for (i = 0; i < r; i++)
|
|
1814
|
-
i % 4 === 0 && i && (
|
|
1815
|
-
return t = r % 4 * 6, t === 0 ? (
|
|
1814
|
+
i % 4 === 0 && i && (l.push(n >> 16 & 255), l.push(n >> 8 & 255), l.push(n & 255)), n = n << 6 | o.indexOf(a.charAt(i));
|
|
1815
|
+
return t = r % 4 * 6, t === 0 ? (l.push(n >> 16 & 255), l.push(n >> 8 & 255), l.push(n & 255)) : t === 18 ? (l.push(n >> 10 & 255), l.push(n >> 2 & 255)) : t === 12 && l.push(n >> 4 & 255), new Uint8Array(l);
|
|
1816
1816
|
}
|
|
1817
1817
|
function bo(e) {
|
|
1818
|
-
var i = "", t = 0, a, r, o = e.length,
|
|
1818
|
+
var i = "", t = 0, a, r, o = e.length, n = Ct;
|
|
1819
1819
|
for (a = 0; a < o; a++)
|
|
1820
|
-
a % 3 === 0 && a && (i +=
|
|
1821
|
-
return r = o % 3, r === 0 ? (i +=
|
|
1820
|
+
a % 3 === 0 && a && (i += n[t >> 18 & 63], i += n[t >> 12 & 63], i += n[t >> 6 & 63], i += n[t & 63]), t = (t << 8) + e[a];
|
|
1821
|
+
return r = o % 3, r === 0 ? (i += n[t >> 18 & 63], i += n[t >> 12 & 63], i += n[t >> 6 & 63], i += n[t & 63]) : r === 2 ? (i += n[t >> 10 & 63], i += n[t >> 4 & 63], i += n[t << 2 & 63], i += n[64]) : r === 1 && (i += n[t >> 2 & 63], i += n[t << 4 & 63], i += n[64], i += n[64]), i;
|
|
1822
1822
|
}
|
|
1823
1823
|
function wo(e) {
|
|
1824
1824
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1825
1825
|
}
|
|
1826
|
-
var
|
|
1826
|
+
var Ei = new ue("tag:yaml.org,2002:binary", {
|
|
1827
1827
|
kind: "scalar",
|
|
1828
1828
|
resolve: vo,
|
|
1829
1829
|
construct: ho,
|
|
@@ -1833,17 +1833,17 @@ var Mi = new ue("tag:yaml.org,2002:binary", {
|
|
|
1833
1833
|
function Co(e) {
|
|
1834
1834
|
if (e === null)
|
|
1835
1835
|
return !0;
|
|
1836
|
-
var i = [], t, a, r, o,
|
|
1837
|
-
for (t = 0, a =
|
|
1838
|
-
if (r =
|
|
1836
|
+
var i = [], t, a, r, o, n, l = e;
|
|
1837
|
+
for (t = 0, a = l.length; t < a; t += 1) {
|
|
1838
|
+
if (r = l[t], n = !1, ko.call(r) !== "[object Object]")
|
|
1839
1839
|
return !1;
|
|
1840
1840
|
for (o in r)
|
|
1841
1841
|
if (_o.call(r, o))
|
|
1842
|
-
if (!
|
|
1843
|
-
|
|
1842
|
+
if (!n)
|
|
1843
|
+
n = !0;
|
|
1844
1844
|
else
|
|
1845
1845
|
return !1;
|
|
1846
|
-
if (!
|
|
1846
|
+
if (!n)
|
|
1847
1847
|
return !1;
|
|
1848
1848
|
if (i.indexOf(o) === -1)
|
|
1849
1849
|
i.push(o);
|
|
@@ -1863,9 +1863,9 @@ var Oi = new ue("tag:yaml.org,2002:omap", {
|
|
|
1863
1863
|
function Ao(e) {
|
|
1864
1864
|
if (e === null)
|
|
1865
1865
|
return !0;
|
|
1866
|
-
var i, t, a, r, o,
|
|
1867
|
-
for (o = new Array(
|
|
1868
|
-
if (a =
|
|
1866
|
+
var i, t, a, r, o, n = e;
|
|
1867
|
+
for (o = new Array(n.length), i = 0, t = n.length; i < t; i += 1) {
|
|
1868
|
+
if (a = n[i], Io.call(a) !== "[object Object]" || (r = Object.keys(a), r.length !== 1))
|
|
1869
1869
|
return !1;
|
|
1870
1870
|
o[i] = [r[0], a[r[0]]];
|
|
1871
1871
|
}
|
|
@@ -1874,9 +1874,9 @@ function Ao(e) {
|
|
|
1874
1874
|
function xo(e) {
|
|
1875
1875
|
if (e === null)
|
|
1876
1876
|
return [];
|
|
1877
|
-
var i, t, a, r, o,
|
|
1878
|
-
for (o = new Array(
|
|
1879
|
-
a =
|
|
1877
|
+
var i, t, a, r, o, n = e;
|
|
1878
|
+
for (o = new Array(n.length), i = 0, t = n.length; i < t; i += 1)
|
|
1879
|
+
a = n[i], r = Object.keys(a), o[i] = [r[0], a[r[0]]];
|
|
1880
1880
|
return o;
|
|
1881
1881
|
}
|
|
1882
1882
|
var Vi = new ue("tag:yaml.org,2002:pairs", {
|
|
@@ -1893,32 +1893,32 @@ function $o(e) {
|
|
|
1893
1893
|
return !1;
|
|
1894
1894
|
return !0;
|
|
1895
1895
|
}
|
|
1896
|
-
function
|
|
1896
|
+
function Mo(e) {
|
|
1897
1897
|
return e !== null ? e : {};
|
|
1898
1898
|
}
|
|
1899
1899
|
var Fi = new ue("tag:yaml.org,2002:set", {
|
|
1900
1900
|
kind: "mapping",
|
|
1901
1901
|
resolve: $o,
|
|
1902
|
-
construct:
|
|
1902
|
+
construct: Mo
|
|
1903
1903
|
}), St = xi.extend({
|
|
1904
1904
|
implicit: [
|
|
1905
|
-
|
|
1906
|
-
|
|
1905
|
+
Mi,
|
|
1906
|
+
ji
|
|
1907
1907
|
],
|
|
1908
1908
|
explicit: [
|
|
1909
|
-
|
|
1909
|
+
Ei,
|
|
1910
1910
|
Oi,
|
|
1911
1911
|
Vi,
|
|
1912
1912
|
Fi
|
|
1913
1913
|
]
|
|
1914
|
-
}),
|
|
1914
|
+
}), Ce = Object.prototype.hasOwnProperty, Ze = 1, Ni = 2, Ki = 3, Qe = 4, ct = 1, jo = 2, qt = 3, Eo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Oo = /[\x85\u2028\u2029]/, Vo = /[,\[\]\{\}]/, Li = /^(?:!|!!|![a-z\-]+!)$/i, qi = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1915
1915
|
function Bt(e) {
|
|
1916
1916
|
return Object.prototype.toString.call(e);
|
|
1917
1917
|
}
|
|
1918
1918
|
function he(e) {
|
|
1919
1919
|
return e === 10 || e === 13;
|
|
1920
1920
|
}
|
|
1921
|
-
function
|
|
1921
|
+
function Te(e) {
|
|
1922
1922
|
return e === 9 || e === 32;
|
|
1923
1923
|
}
|
|
1924
1924
|
function me(e) {
|
|
@@ -1948,8 +1948,8 @@ function Lo(e) {
|
|
|
1948
1948
|
);
|
|
1949
1949
|
}
|
|
1950
1950
|
var Bi = new Array(256), Pi = new Array(256);
|
|
1951
|
-
for (var
|
|
1952
|
-
Bi[
|
|
1951
|
+
for (var je = 0; je < 256; je++)
|
|
1952
|
+
Bi[je] = Pt(je) ? 1 : 0, Pi[je] = Pt(je);
|
|
1953
1953
|
function qo(e, i) {
|
|
1954
1954
|
this.input = e, this.filename = i.filename || null, this.schema = i.schema || St, 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 = [];
|
|
1955
1955
|
}
|
|
@@ -1964,7 +1964,7 @@ function Ui(e, i) {
|
|
|
1964
1964
|
};
|
|
1965
1965
|
return t.snippet = Ur(t), new fe(i, t);
|
|
1966
1966
|
}
|
|
1967
|
-
function
|
|
1967
|
+
function j(e, i) {
|
|
1968
1968
|
throw Ui(e, i);
|
|
1969
1969
|
}
|
|
1970
1970
|
function Xe(e, i) {
|
|
@@ -1973,48 +1973,48 @@ function Xe(e, i) {
|
|
|
1973
1973
|
var Ut = {
|
|
1974
1974
|
YAML: function(e, i, t) {
|
|
1975
1975
|
var a, r, o;
|
|
1976
|
-
e.version !== null &&
|
|
1976
|
+
e.version !== null && j(e, "duplication of %YAML directive"), t.length !== 1 && j(e, "YAML directive accepts exactly one argument"), a = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), a === null && j(e, "ill-formed argument of the YAML directive"), r = parseInt(a[1], 10), o = parseInt(a[2], 10), r !== 1 && j(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Xe(e, "unsupported YAML version of the document");
|
|
1977
1977
|
},
|
|
1978
1978
|
TAG: function(e, i, t) {
|
|
1979
1979
|
var a, r;
|
|
1980
|
-
t.length !== 2 &&
|
|
1980
|
+
t.length !== 2 && j(e, "TAG directive accepts exactly two arguments"), a = t[0], r = t[1], Li.test(a) || j(e, "ill-formed tag handle (first argument) of the TAG directive"), Ce.call(e.tagMap, a) && j(e, 'there is a previously declared suffix for "' + a + '" tag handle'), qi.test(r) || j(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1981
1981
|
try {
|
|
1982
1982
|
r = decodeURIComponent(r);
|
|
1983
1983
|
} catch {
|
|
1984
|
-
|
|
1984
|
+
j(e, "tag prefix is malformed: " + r);
|
|
1985
1985
|
}
|
|
1986
1986
|
e.tagMap[a] = r;
|
|
1987
1987
|
}
|
|
1988
1988
|
};
|
|
1989
1989
|
function ke(e, i, t, a) {
|
|
1990
|
-
var r, o,
|
|
1990
|
+
var r, o, n, l;
|
|
1991
1991
|
if (i < t) {
|
|
1992
|
-
if (
|
|
1993
|
-
for (r = 0, o =
|
|
1994
|
-
|
|
1992
|
+
if (l = e.input.slice(i, t), a)
|
|
1993
|
+
for (r = 0, o = l.length; r < o; r += 1)
|
|
1994
|
+
n = l.charCodeAt(r), n === 9 || 32 <= n && n <= 1114111 || j(e, "expected valid JSON character");
|
|
1995
1995
|
else
|
|
1996
|
-
|
|
1997
|
-
e.result +=
|
|
1996
|
+
Eo.test(l) && j(e, "the stream contains non-printable characters");
|
|
1997
|
+
e.result += l;
|
|
1998
1998
|
}
|
|
1999
1999
|
}
|
|
2000
2000
|
function Rt(e, i, t, a) {
|
|
2001
|
-
var r, o,
|
|
2002
|
-
for (le.isObject(t) ||
|
|
2003
|
-
o = r[
|
|
2001
|
+
var r, o, n, l;
|
|
2002
|
+
for (le.isObject(t) || j(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(t), n = 0, l = r.length; n < l; n += 1)
|
|
2003
|
+
o = r[n], Ce.call(i, o) || (i[o] = t[o], a[o] = !0);
|
|
2004
2004
|
}
|
|
2005
|
-
function Ve(e, i, t, a, r, o,
|
|
2006
|
-
var d,
|
|
2005
|
+
function Ve(e, i, t, a, r, o, n, l, u) {
|
|
2006
|
+
var d, f;
|
|
2007
2007
|
if (Array.isArray(r))
|
|
2008
|
-
for (r = Array.prototype.slice.call(r), d = 0,
|
|
2009
|
-
Array.isArray(r[d]) &&
|
|
2008
|
+
for (r = Array.prototype.slice.call(r), d = 0, f = r.length; d < f; d += 1)
|
|
2009
|
+
Array.isArray(r[d]) && j(e, "nested arrays are not supported inside keys"), typeof r == "object" && Bt(r[d]) === "[object Object]" && (r[d] = "[object Object]");
|
|
2010
2010
|
if (typeof r == "object" && Bt(r) === "[object Object]" && (r = "[object Object]"), r = String(r), i === null && (i = {}), a === "tag:yaml.org,2002:merge")
|
|
2011
2011
|
if (Array.isArray(o))
|
|
2012
|
-
for (d = 0,
|
|
2012
|
+
for (d = 0, f = o.length; d < f; d += 1)
|
|
2013
2013
|
Rt(e, i, o[d], t);
|
|
2014
2014
|
else
|
|
2015
2015
|
Rt(e, i, o, t);
|
|
2016
2016
|
else
|
|
2017
|
-
!e.json && !
|
|
2017
|
+
!e.json && !Ce.call(t, r) && Ce.call(i, r) && (e.line = n || e.line, e.lineStart = l || e.lineStart, e.position = u || e.position, j(e, "duplicated mapping key")), r === "__proto__" ? Object.defineProperty(i, r, {
|
|
2018
2018
|
configurable: !0,
|
|
2019
2019
|
enumerable: !0,
|
|
2020
2020
|
writable: !0,
|
|
@@ -2024,11 +2024,11 @@ function Ve(e, i, t, a, r, o, l, n, c) {
|
|
|
2024
2024
|
}
|
|
2025
2025
|
function It(e) {
|
|
2026
2026
|
var i;
|
|
2027
|
-
i = e.input.charCodeAt(e.position), i === 10 ? e.position++ : i === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
2027
|
+
i = e.input.charCodeAt(e.position), i === 10 ? e.position++ : i === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : j(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
2028
2028
|
}
|
|
2029
2029
|
function oe(e, i, t) {
|
|
2030
2030
|
for (var a = 0, r = e.input.charCodeAt(e.position); r !== 0; ) {
|
|
2031
|
-
for (;
|
|
2031
|
+
for (; Te(r); )
|
|
2032
2032
|
r === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), r = e.input.charCodeAt(++e.position);
|
|
2033
2033
|
if (i && r === 35)
|
|
2034
2034
|
do
|
|
@@ -2051,31 +2051,31 @@ function At(e, i) {
|
|
|
2051
2051
|
`, i - 1));
|
|
2052
2052
|
}
|
|
2053
2053
|
function Bo(e, i, t) {
|
|
2054
|
-
var a, r, o,
|
|
2055
|
-
if (
|
|
2054
|
+
var a, r, o, n, l, u, d, f, p = e.kind, w = e.result, b;
|
|
2055
|
+
if (b = e.input.charCodeAt(e.position), me(b) || Oe(b) || b === 35 || b === 38 || b === 42 || b === 33 || b === 124 || b === 62 || b === 39 || b === 34 || b === 37 || b === 64 || b === 96 || (b === 63 || b === 45) && (r = e.input.charCodeAt(e.position + 1), me(r) || t && Oe(r)))
|
|
2056
2056
|
return !1;
|
|
2057
|
-
for (e.kind = "scalar", e.result = "", o =
|
|
2058
|
-
if (
|
|
2057
|
+
for (e.kind = "scalar", e.result = "", o = n = e.position, l = !1; b !== 0; ) {
|
|
2058
|
+
if (b === 58) {
|
|
2059
2059
|
if (r = e.input.charCodeAt(e.position + 1), me(r) || t && Oe(r))
|
|
2060
2060
|
break;
|
|
2061
|
-
} else if (
|
|
2061
|
+
} else if (b === 35) {
|
|
2062
2062
|
if (a = e.input.charCodeAt(e.position - 1), me(a))
|
|
2063
2063
|
break;
|
|
2064
2064
|
} else {
|
|
2065
|
-
if (e.position === e.lineStart && at(e) || t && Oe(
|
|
2065
|
+
if (e.position === e.lineStart && at(e) || t && Oe(b))
|
|
2066
2066
|
break;
|
|
2067
|
-
if (he(
|
|
2068
|
-
if (
|
|
2069
|
-
|
|
2067
|
+
if (he(b))
|
|
2068
|
+
if (u = e.line, d = e.lineStart, f = e.lineIndent, oe(e, !1, -1), e.lineIndent >= i) {
|
|
2069
|
+
l = !0, b = e.input.charCodeAt(e.position);
|
|
2070
2070
|
continue;
|
|
2071
2071
|
} else {
|
|
2072
|
-
e.position =
|
|
2072
|
+
e.position = n, e.line = u, e.lineStart = d, e.lineIndent = f;
|
|
2073
2073
|
break;
|
|
2074
2074
|
}
|
|
2075
2075
|
}
|
|
2076
|
-
|
|
2076
|
+
l && (ke(e, o, n, !1), At(e, e.line - u), o = n = e.position, l = !1), Te(b) || (n = e.position + 1), b = e.input.charCodeAt(++e.position);
|
|
2077
2077
|
}
|
|
2078
|
-
return ke(e, o,
|
|
2078
|
+
return ke(e, o, n, !1), e.result ? !0 : (e.kind = p, e.result = w, !1);
|
|
2079
2079
|
}
|
|
2080
2080
|
function Po(e, i) {
|
|
2081
2081
|
var t, a, r;
|
|
@@ -2088,50 +2088,50 @@ function Po(e, i) {
|
|
|
2088
2088
|
else
|
|
2089
2089
|
return !0;
|
|
2090
2090
|
else
|
|
2091
|
-
he(t) ? (ke(e, a, r, !0), At(e, oe(e, !1, i)), a = r = e.position) : e.position === e.lineStart && at(e) ?
|
|
2092
|
-
|
|
2091
|
+
he(t) ? (ke(e, a, r, !0), At(e, oe(e, !1, i)), a = r = e.position) : e.position === e.lineStart && at(e) ? j(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
2092
|
+
j(e, "unexpected end of the stream within a single quoted scalar");
|
|
2093
2093
|
}
|
|
2094
2094
|
function Uo(e, i) {
|
|
2095
|
-
var t, a, r, o,
|
|
2096
|
-
if (
|
|
2095
|
+
var t, a, r, o, n, l;
|
|
2096
|
+
if (l = e.input.charCodeAt(e.position), l !== 34)
|
|
2097
2097
|
return !1;
|
|
2098
|
-
for (e.kind = "scalar", e.result = "", e.position++, t = a = e.position; (
|
|
2099
|
-
if (
|
|
2098
|
+
for (e.kind = "scalar", e.result = "", e.position++, t = a = e.position; (l = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
2099
|
+
if (l === 34)
|
|
2100
2100
|
return ke(e, t, e.position, !0), e.position++, !0;
|
|
2101
|
-
if (
|
|
2102
|
-
if (ke(e, t, e.position, !0),
|
|
2101
|
+
if (l === 92) {
|
|
2102
|
+
if (ke(e, t, e.position, !0), l = e.input.charCodeAt(++e.position), he(l))
|
|
2103
2103
|
oe(e, !1, i);
|
|
2104
|
-
else if (
|
|
2105
|
-
e.result += Pi[
|
|
2106
|
-
else if ((
|
|
2107
|
-
for (r =
|
|
2108
|
-
|
|
2104
|
+
else if (l < 256 && Bi[l])
|
|
2105
|
+
e.result += Pi[l], e.position++;
|
|
2106
|
+
else if ((n = No(l)) > 0) {
|
|
2107
|
+
for (r = n, o = 0; r > 0; r--)
|
|
2108
|
+
l = e.input.charCodeAt(++e.position), (n = Fo(l)) >= 0 ? o = (o << 4) + n : j(e, "expected hexadecimal character");
|
|
2109
2109
|
e.result += Lo(o), e.position++;
|
|
2110
2110
|
} else
|
|
2111
|
-
|
|
2111
|
+
j(e, "unknown escape sequence");
|
|
2112
2112
|
t = a = e.position;
|
|
2113
2113
|
} else
|
|
2114
|
-
he(
|
|
2114
|
+
he(l) ? (ke(e, t, a, !0), At(e, oe(e, !1, i)), t = a = e.position) : e.position === e.lineStart && at(e) ? j(e, "unexpected end of the document within a double quoted scalar") : (e.position++, a = e.position);
|
|
2115
2115
|
}
|
|
2116
|
-
|
|
2116
|
+
j(e, "unexpected end of the stream within a double quoted scalar");
|
|
2117
2117
|
}
|
|
2118
2118
|
function Ro(e, i) {
|
|
2119
|
-
var t = !0, a, r, o,
|
|
2119
|
+
var t = !0, a, r, o, n = e.tag, l, u = e.anchor, d, f, p, w, b, S = /* @__PURE__ */ Object.create(null), k, v, $, s;
|
|
2120
2120
|
if (s = e.input.charCodeAt(e.position), s === 91)
|
|
2121
|
-
|
|
2121
|
+
f = 93, b = !1, l = [];
|
|
2122
2122
|
else if (s === 123)
|
|
2123
|
-
|
|
2123
|
+
f = 125, b = !0, l = {};
|
|
2124
2124
|
else
|
|
2125
2125
|
return !1;
|
|
2126
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] =
|
|
2127
|
-
if (oe(e, !0, i), s = e.input.charCodeAt(e.position), s ===
|
|
2128
|
-
return e.position++, e.tag =
|
|
2129
|
-
t ? s === 44 &&
|
|
2126
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), s = e.input.charCodeAt(++e.position); s !== 0; ) {
|
|
2127
|
+
if (oe(e, !0, i), s = e.input.charCodeAt(e.position), s === f)
|
|
2128
|
+
return e.position++, e.tag = n, e.anchor = u, e.kind = b ? "mapping" : "sequence", e.result = l, !0;
|
|
2129
|
+
t ? s === 44 && j(e, "expected the node content, but found ','") : j(e, "missed comma between flow collection entries"), v = k = $ = null, p = w = !1, s === 63 && (d = e.input.charCodeAt(e.position + 1), me(d) && (p = w = !0, e.position++, oe(e, !0, i))), a = e.line, r = e.lineStart, o = e.position, Ke(e, i, Ze, !1, !0), v = e.tag, k = e.result, oe(e, !0, i), s = e.input.charCodeAt(e.position), (w || e.line === a) && s === 58 && (p = !0, s = e.input.charCodeAt(++e.position), oe(e, !0, i), Ke(e, i, Ze, !1, !0), $ = e.result), b ? Ve(e, l, S, v, k, $, a, r, o) : p ? l.push(Ve(e, null, S, v, k, $, a, r, o)) : l.push(k), oe(e, !0, i), s = e.input.charCodeAt(e.position), s === 44 ? (t = !0, s = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2130
2130
|
}
|
|
2131
|
-
|
|
2131
|
+
j(e, "unexpected end of the stream within a flow collection");
|
|
2132
2132
|
}
|
|
2133
2133
|
function Do(e, i) {
|
|
2134
|
-
var t, a, r = ct, o = !1,
|
|
2134
|
+
var t, a, r = ct, o = !1, n = !1, l = i, u = 0, d = !1, f, p;
|
|
2135
2135
|
if (p = e.input.charCodeAt(e.position), p === 124)
|
|
2136
2136
|
a = !1;
|
|
2137
2137
|
else if (p === 62)
|
|
@@ -2140,119 +2140,119 @@ function Do(e, i) {
|
|
|
2140
2140
|
return !1;
|
|
2141
2141
|
for (e.kind = "scalar", e.result = ""; p !== 0; )
|
|
2142
2142
|
if (p = e.input.charCodeAt(++e.position), p === 43 || p === 45)
|
|
2143
|
-
ct === r ? r = p === 43 ? qt :
|
|
2144
|
-
else if ((
|
|
2145
|
-
|
|
2143
|
+
ct === r ? r = p === 43 ? qt : jo : j(e, "repeat of a chomping mode identifier");
|
|
2144
|
+
else if ((f = Ko(p)) >= 0)
|
|
2145
|
+
f === 0 ? j(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : n ? j(e, "repeat of an indentation width identifier") : (l = i + f - 1, n = !0);
|
|
2146
2146
|
else
|
|
2147
2147
|
break;
|
|
2148
|
-
if (
|
|
2148
|
+
if (Te(p)) {
|
|
2149
2149
|
do
|
|
2150
2150
|
p = e.input.charCodeAt(++e.position);
|
|
2151
|
-
while (
|
|
2151
|
+
while (Te(p));
|
|
2152
2152
|
if (p === 35)
|
|
2153
2153
|
do
|
|
2154
2154
|
p = e.input.charCodeAt(++e.position);
|
|
2155
2155
|
while (!he(p) && p !== 0);
|
|
2156
2156
|
}
|
|
2157
2157
|
for (; p !== 0; ) {
|
|
2158
|
-
for (It(e), e.lineIndent = 0, p = e.input.charCodeAt(e.position); (!
|
|
2158
|
+
for (It(e), e.lineIndent = 0, p = e.input.charCodeAt(e.position); (!n || e.lineIndent < l) && p === 32; )
|
|
2159
2159
|
e.lineIndent++, p = e.input.charCodeAt(++e.position);
|
|
2160
|
-
if (!
|
|
2161
|
-
|
|
2160
|
+
if (!n && e.lineIndent > l && (l = e.lineIndent), he(p)) {
|
|
2161
|
+
u++;
|
|
2162
2162
|
continue;
|
|
2163
2163
|
}
|
|
2164
|
-
if (e.lineIndent <
|
|
2164
|
+
if (e.lineIndent < l) {
|
|
2165
2165
|
r === qt ? e.result += le.repeat(`
|
|
2166
|
-
`, o ? 1 +
|
|
2166
|
+
`, o ? 1 + u : u) : r === ct && o && (e.result += `
|
|
2167
2167
|
`);
|
|
2168
2168
|
break;
|
|
2169
2169
|
}
|
|
2170
|
-
for (a ?
|
|
2171
|
-
`, o ? 1 +
|
|
2172
|
-
`,
|
|
2173
|
-
`,
|
|
2174
|
-
`, o ? 1 +
|
|
2170
|
+
for (a ? Te(p) ? (d = !0, e.result += le.repeat(`
|
|
2171
|
+
`, o ? 1 + u : u)) : d ? (d = !1, e.result += le.repeat(`
|
|
2172
|
+
`, u + 1)) : u === 0 ? o && (e.result += " ") : e.result += le.repeat(`
|
|
2173
|
+
`, u) : e.result += le.repeat(`
|
|
2174
|
+
`, o ? 1 + u : u), o = !0, n = !0, u = 0, t = e.position; !he(p) && p !== 0; )
|
|
2175
2175
|
p = e.input.charCodeAt(++e.position);
|
|
2176
2176
|
ke(e, t, e.position, !1);
|
|
2177
2177
|
}
|
|
2178
2178
|
return !0;
|
|
2179
2179
|
}
|
|
2180
2180
|
function Dt(e, i) {
|
|
2181
|
-
var t, a = e.tag, r = e.anchor, o = [],
|
|
2181
|
+
var t, a = e.tag, r = e.anchor, o = [], n, l = !1, u;
|
|
2182
2182
|
if (e.firstTabInLine !== -1)
|
|
2183
2183
|
return !1;
|
|
2184
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o),
|
|
2185
|
-
if (
|
|
2186
|
-
o.push(null),
|
|
2184
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), u = e.input.charCodeAt(e.position); u !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, j(e, "tab characters must not be used in indentation")), !(u !== 45 || (n = e.input.charCodeAt(e.position + 1), !me(n)))); ) {
|
|
2185
|
+
if (l = !0, e.position++, oe(e, !0, -1) && e.lineIndent <= i) {
|
|
2186
|
+
o.push(null), u = e.input.charCodeAt(e.position);
|
|
2187
2187
|
continue;
|
|
2188
2188
|
}
|
|
2189
|
-
if (t = e.line, Ke(e, i, Ki, !1, !0), o.push(e.result), oe(e, !0, -1),
|
|
2190
|
-
|
|
2189
|
+
if (t = e.line, Ke(e, i, Ki, !1, !0), o.push(e.result), oe(e, !0, -1), u = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > i) && u !== 0)
|
|
2190
|
+
j(e, "bad indentation of a sequence entry");
|
|
2191
2191
|
else if (e.lineIndent < i)
|
|
2192
2192
|
break;
|
|
2193
2193
|
}
|
|
2194
|
-
return
|
|
2194
|
+
return l ? (e.tag = a, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
2195
2195
|
}
|
|
2196
2196
|
function Ho(e, i, t) {
|
|
2197
|
-
var a, r, o,
|
|
2197
|
+
var a, r, o, n, l, u, d = e.tag, f = e.anchor, p = {}, w = /* @__PURE__ */ Object.create(null), b = null, S = null, k = null, v = !1, $ = !1, s;
|
|
2198
2198
|
if (e.firstTabInLine !== -1)
|
|
2199
2199
|
return !1;
|
|
2200
2200
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = p), s = e.input.charCodeAt(e.position); s !== 0; ) {
|
|
2201
|
-
if (!
|
|
2202
|
-
s === 63 ? (
|
|
2201
|
+
if (!v && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, j(e, "tab characters must not be used in indentation")), a = e.input.charCodeAt(e.position + 1), o = e.line, (s === 63 || s === 58) && me(a))
|
|
2202
|
+
s === 63 ? (v && (Ve(e, p, w, b, S, null, n, l, u), b = S = k = null), $ = !0, v = !0, r = !0) : v ? (v = !1, r = !0) : j(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, s = a;
|
|
2203
2203
|
else {
|
|
2204
|
-
if (
|
|
2204
|
+
if (n = e.line, l = e.lineStart, u = e.position, !Ke(e, t, Ni, !1, !0))
|
|
2205
2205
|
break;
|
|
2206
2206
|
if (e.line === o) {
|
|
2207
|
-
for (s = e.input.charCodeAt(e.position);
|
|
2207
|
+
for (s = e.input.charCodeAt(e.position); Te(s); )
|
|
2208
2208
|
s = e.input.charCodeAt(++e.position);
|
|
2209
2209
|
if (s === 58)
|
|
2210
|
-
s = e.input.charCodeAt(++e.position), me(s) ||
|
|
2211
|
-
else if (
|
|
2212
|
-
|
|
2210
|
+
s = e.input.charCodeAt(++e.position), me(s) || j(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (Ve(e, p, w, b, S, null, n, l, u), b = S = k = null), $ = !0, v = !1, r = !1, b = e.tag, S = e.result;
|
|
2211
|
+
else if ($)
|
|
2212
|
+
j(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2213
2213
|
else
|
|
2214
|
-
return e.tag = d, e.anchor =
|
|
2215
|
-
} else if (
|
|
2216
|
-
|
|
2214
|
+
return e.tag = d, e.anchor = f, !0;
|
|
2215
|
+
} else if ($)
|
|
2216
|
+
j(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2217
2217
|
else
|
|
2218
|
-
return e.tag = d, e.anchor =
|
|
2218
|
+
return e.tag = d, e.anchor = f, !0;
|
|
2219
2219
|
}
|
|
2220
|
-
if ((e.line === o || e.lineIndent > i) && (
|
|
2221
|
-
|
|
2220
|
+
if ((e.line === o || e.lineIndent > i) && (v && (n = e.line, l = e.lineStart, u = e.position), Ke(e, i, Qe, !0, r) && (v ? S = e.result : k = e.result), v || (Ve(e, p, w, b, S, k, n, l, u), b = S = k = null), oe(e, !0, -1), s = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > i) && s !== 0)
|
|
2221
|
+
j(e, "bad indentation of a mapping entry");
|
|
2222
2222
|
else if (e.lineIndent < i)
|
|
2223
2223
|
break;
|
|
2224
2224
|
}
|
|
2225
|
-
return
|
|
2225
|
+
return v && Ve(e, p, w, b, S, null, n, l, u), $ && (e.tag = d, e.anchor = f, e.kind = "mapping", e.result = p), $;
|
|
2226
2226
|
}
|
|
2227
2227
|
function zo(e) {
|
|
2228
|
-
var i, t = !1, a = !1, r, o,
|
|
2229
|
-
if (
|
|
2228
|
+
var i, t = !1, a = !1, r, o, n;
|
|
2229
|
+
if (n = e.input.charCodeAt(e.position), n !== 33)
|
|
2230
2230
|
return !1;
|
|
2231
|
-
if (e.tag !== null &&
|
|
2231
|
+
if (e.tag !== null && j(e, "duplication of a tag property"), n = e.input.charCodeAt(++e.position), n === 60 ? (t = !0, n = e.input.charCodeAt(++e.position)) : n === 33 ? (a = !0, r = "!!", n = e.input.charCodeAt(++e.position)) : r = "!", i = e.position, t) {
|
|
2232
2232
|
do
|
|
2233
|
-
|
|
2234
|
-
while (
|
|
2235
|
-
e.position < e.length ? (o = e.input.slice(i, e.position),
|
|
2233
|
+
n = e.input.charCodeAt(++e.position);
|
|
2234
|
+
while (n !== 0 && n !== 62);
|
|
2235
|
+
e.position < e.length ? (o = e.input.slice(i, e.position), n = e.input.charCodeAt(++e.position)) : j(e, "unexpected end of the stream within a verbatim tag");
|
|
2236
2236
|
} else {
|
|
2237
|
-
for (;
|
|
2238
|
-
|
|
2239
|
-
o = e.input.slice(i, e.position), Vo.test(o) &&
|
|
2237
|
+
for (; n !== 0 && !me(n); )
|
|
2238
|
+
n === 33 && (a ? j(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(i - 1, e.position + 1), Li.test(r) || j(e, "named tag handle cannot contain such characters"), a = !0, i = e.position + 1)), n = e.input.charCodeAt(++e.position);
|
|
2239
|
+
o = e.input.slice(i, e.position), Vo.test(o) && j(e, "tag suffix cannot contain flow indicator characters");
|
|
2240
2240
|
}
|
|
2241
|
-
o && !qi.test(o) &&
|
|
2241
|
+
o && !qi.test(o) && j(e, "tag name cannot contain such characters: " + o);
|
|
2242
2242
|
try {
|
|
2243
2243
|
o = decodeURIComponent(o);
|
|
2244
2244
|
} catch {
|
|
2245
|
-
|
|
2245
|
+
j(e, "tag name is malformed: " + o);
|
|
2246
2246
|
}
|
|
2247
|
-
return t ? e.tag = o :
|
|
2247
|
+
return t ? e.tag = o : Ce.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o : j(e, 'undeclared tag handle "' + r + '"'), !0;
|
|
2248
2248
|
}
|
|
2249
2249
|
function Jo(e) {
|
|
2250
2250
|
var i, t;
|
|
2251
2251
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2252
2252
|
return !1;
|
|
2253
|
-
for (e.anchor !== null &&
|
|
2253
|
+
for (e.anchor !== null && j(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), i = e.position; t !== 0 && !me(t) && !Oe(t); )
|
|
2254
2254
|
t = e.input.charCodeAt(++e.position);
|
|
2255
|
-
return e.position === i &&
|
|
2255
|
+
return e.position === i && j(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(i, e.position), !0;
|
|
2256
2256
|
}
|
|
2257
2257
|
function Go(e) {
|
|
2258
2258
|
var i, t, a;
|
|
@@ -2260,62 +2260,62 @@ function Go(e) {
|
|
|
2260
2260
|
return !1;
|
|
2261
2261
|
for (a = e.input.charCodeAt(++e.position), i = e.position; a !== 0 && !me(a) && !Oe(a); )
|
|
2262
2262
|
a = e.input.charCodeAt(++e.position);
|
|
2263
|
-
return e.position === i &&
|
|
2263
|
+
return e.position === i && j(e, "name of an alias node must contain at least one character"), t = e.input.slice(i, e.position), Ce.call(e.anchorMap, t) || j(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], oe(e, !0, -1), !0;
|
|
2264
2264
|
}
|
|
2265
2265
|
function Ke(e, i, t, a, r) {
|
|
2266
|
-
var o,
|
|
2267
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o =
|
|
2266
|
+
var o, n, l, u = 1, d = !1, f = !1, p, w, b, S, k, v;
|
|
2267
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = n = l = Qe === t || Ki === t, a && oe(e, !0, -1) && (d = !0, e.lineIndent > i ? u = 1 : e.lineIndent === i ? u = 0 : e.lineIndent < i && (u = -1)), u === 1)
|
|
2268
2268
|
for (; zo(e) || Jo(e); )
|
|
2269
|
-
oe(e, !0, -1) ? (d = !0,
|
|
2270
|
-
if (
|
|
2269
|
+
oe(e, !0, -1) ? (d = !0, l = o, e.lineIndent > i ? u = 1 : e.lineIndent === i ? u = 0 : e.lineIndent < i && (u = -1)) : l = !1;
|
|
2270
|
+
if (l && (l = d || r), (u === 1 || Qe === t) && (Ze === t || Ni === t ? k = i : k = i + 1, v = e.position - e.lineStart, u === 1 ? l && (Dt(e, v) || Ho(e, v, k)) || Ro(e, k) ? f = !0 : (n && Do(e, k) || Po(e, k) || Uo(e, k) ? f = !0 : Go(e) ? (f = !0, (e.tag !== null || e.anchor !== null) && j(e, "alias node should not have any properties")) : Bo(e, k, Ze === t) && (f = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : u === 0 && (f = l && Dt(e, v))), e.tag === null)
|
|
2271
2271
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2272
2272
|
else if (e.tag === "?") {
|
|
2273
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2273
|
+
for (e.result !== null && e.kind !== "scalar" && j(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), p = 0, w = e.implicitTypes.length; p < w; p += 1)
|
|
2274
2274
|
if (S = e.implicitTypes[p], S.resolve(e.result)) {
|
|
2275
2275
|
e.result = S.construct(e.result), e.tag = S.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2276
2276
|
break;
|
|
2277
2277
|
}
|
|
2278
2278
|
} else if (e.tag !== "!") {
|
|
2279
|
-
if (
|
|
2279
|
+
if (Ce.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2280
2280
|
S = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2281
2281
|
else
|
|
2282
|
-
for (S = null,
|
|
2283
|
-
if (e.tag.slice(0,
|
|
2284
|
-
S =
|
|
2282
|
+
for (S = null, b = e.typeMap.multi[e.kind || "fallback"], p = 0, w = b.length; p < w; p += 1)
|
|
2283
|
+
if (e.tag.slice(0, b[p].tag.length) === b[p].tag) {
|
|
2284
|
+
S = b[p];
|
|
2285
2285
|
break;
|
|
2286
2286
|
}
|
|
2287
|
-
S ||
|
|
2287
|
+
S || j(e, "unknown tag !<" + e.tag + ">"), e.result !== null && S.kind !== e.kind && j(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + S.kind + '", not "' + e.kind + '"'), S.resolve(e.result, e.tag) ? (e.result = S.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : j(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2288
2288
|
}
|
|
2289
|
-
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null ||
|
|
2289
|
+
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || f;
|
|
2290
2290
|
}
|
|
2291
2291
|
function Wo(e) {
|
|
2292
|
-
var i = e.position, t, a, r, o = !1,
|
|
2293
|
-
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (
|
|
2294
|
-
for (o = !0,
|
|
2295
|
-
|
|
2296
|
-
for (a = e.input.slice(t, e.position), r = [], a.length < 1 &&
|
|
2297
|
-
for (;
|
|
2298
|
-
|
|
2299
|
-
if (
|
|
2292
|
+
var i = e.position, t, a, r, o = !1, n;
|
|
2293
|
+
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (n = e.input.charCodeAt(e.position)) !== 0 && (oe(e, !0, -1), n = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || n !== 37)); ) {
|
|
2294
|
+
for (o = !0, n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !me(n); )
|
|
2295
|
+
n = e.input.charCodeAt(++e.position);
|
|
2296
|
+
for (a = e.input.slice(t, e.position), r = [], a.length < 1 && j(e, "directive name must not be less than one character in length"); n !== 0; ) {
|
|
2297
|
+
for (; Te(n); )
|
|
2298
|
+
n = e.input.charCodeAt(++e.position);
|
|
2299
|
+
if (n === 35) {
|
|
2300
2300
|
do
|
|
2301
|
-
|
|
2302
|
-
while (
|
|
2301
|
+
n = e.input.charCodeAt(++e.position);
|
|
2302
|
+
while (n !== 0 && !he(n));
|
|
2303
2303
|
break;
|
|
2304
2304
|
}
|
|
2305
|
-
if (he(
|
|
2305
|
+
if (he(n))
|
|
2306
2306
|
break;
|
|
2307
|
-
for (t = e.position;
|
|
2308
|
-
|
|
2307
|
+
for (t = e.position; n !== 0 && !me(n); )
|
|
2308
|
+
n = e.input.charCodeAt(++e.position);
|
|
2309
2309
|
r.push(e.input.slice(t, e.position));
|
|
2310
2310
|
}
|
|
2311
|
-
|
|
2311
|
+
n !== 0 && It(e), Ce.call(Ut, a) ? Ut[a](e, a, r) : Xe(e, 'unknown document directive "' + a + '"');
|
|
2312
2312
|
}
|
|
2313
|
-
if (oe(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, oe(e, !0, -1)) : o &&
|
|
2313
|
+
if (oe(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, oe(e, !0, -1)) : o && j(e, "directives end mark is expected"), Ke(e, e.lineIndent - 1, Qe, !1, !0), oe(e, !0, -1), e.checkLineBreaks && Oo.test(e.input.slice(i, e.position)) && Xe(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && at(e)) {
|
|
2314
2314
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, oe(e, !0, -1));
|
|
2315
2315
|
return;
|
|
2316
2316
|
}
|
|
2317
2317
|
if (e.position < e.length - 1)
|
|
2318
|
-
|
|
2318
|
+
j(e, "end of the stream or a document separator is expected");
|
|
2319
2319
|
else
|
|
2320
2320
|
return;
|
|
2321
2321
|
}
|
|
@@ -2323,7 +2323,7 @@ function Ri(e, i) {
|
|
|
2323
2323
|
e = String(e), i = i || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2324
2324
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2325
2325
|
var t = new qo(e, i), a = e.indexOf("\0");
|
|
2326
|
-
for (a !== -1 && (t.position = a,
|
|
2326
|
+
for (a !== -1 && (t.position = a, j(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2327
2327
|
t.lineIndent += 1, t.position += 1;
|
|
2328
2328
|
for (; t.position < t.length - 1; )
|
|
2329
2329
|
Wo(t);
|
|
@@ -2383,11 +2383,11 @@ var yl = [
|
|
|
2383
2383
|
"OFF"
|
|
2384
2384
|
], vl = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2385
2385
|
function hl(e, i) {
|
|
2386
|
-
var t, a, r, o,
|
|
2386
|
+
var t, a, r, o, n, l, u;
|
|
2387
2387
|
if (i === null)
|
|
2388
2388
|
return {};
|
|
2389
2389
|
for (t = {}, a = Object.keys(i), r = 0, o = a.length; r < o; r += 1)
|
|
2390
|
-
|
|
2390
|
+
n = a[r], l = String(i[n]), n.slice(0, 2) === "!!" && (n = "tag:yaml.org,2002:" + n.slice(2)), u = e.compiledTypeMap.fallback[n], u && zi.call(u.styleAliases, l) && (l = u.styleAliases[l]), t[n] = l;
|
|
2391
2391
|
return t;
|
|
2392
2392
|
}
|
|
2393
2393
|
function bl(e) {
|
|
@@ -2407,10 +2407,10 @@ function _l(e) {
|
|
|
2407
2407
|
this.schema = e.schema || St, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = le.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = hl(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 === '"' ? Je : wl, 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;
|
|
2408
2408
|
}
|
|
2409
2409
|
function Ht(e, i) {
|
|
2410
|
-
for (var t = le.repeat(" ", i), a = 0, r = -1, o = "",
|
|
2410
|
+
for (var t = le.repeat(" ", i), a = 0, r = -1, o = "", n, l = e.length; a < l; )
|
|
2411
2411
|
r = e.indexOf(`
|
|
2412
|
-
`, a), r === -1 ? (
|
|
2413
|
-
` && (o += t), o +=
|
|
2412
|
+
`, a), r === -1 ? (n = e.slice(a), a = l) : (n = e.slice(a, r + 1), a = r + 1), n.length && n !== `
|
|
2413
|
+
` && (o += t), o += n;
|
|
2414
2414
|
return o;
|
|
2415
2415
|
}
|
|
2416
2416
|
function mt(e, i) {
|
|
@@ -2457,27 +2457,27 @@ function Qi(e) {
|
|
|
2457
2457
|
var i = /^\n* /;
|
|
2458
2458
|
return i.test(e);
|
|
2459
2459
|
}
|
|
2460
|
-
var Xi = 1, gt = 2, ea = 3, ta = 4,
|
|
2461
|
-
function Il(e, i, t, a, r, o,
|
|
2462
|
-
var
|
|
2463
|
-
if (i ||
|
|
2464
|
-
for (
|
|
2465
|
-
if (d = Pe(e,
|
|
2466
|
-
return
|
|
2467
|
-
|
|
2460
|
+
var Xi = 1, gt = 2, ea = 3, ta = 4, Ee = 5;
|
|
2461
|
+
function Il(e, i, t, a, r, o, n, l) {
|
|
2462
|
+
var u, d = 0, f = null, p = !1, w = !1, b = a !== -1, S = -1, k = Cl(Pe(e, 0)) && Sl(Pe(e, e.length - 1));
|
|
2463
|
+
if (i || n)
|
|
2464
|
+
for (u = 0; u < e.length; d >= 65536 ? u += 2 : u++) {
|
|
2465
|
+
if (d = Pe(e, u), !Ge(d))
|
|
2466
|
+
return Ee;
|
|
2467
|
+
k = k && Jt(d, f, l), f = d;
|
|
2468
2468
|
}
|
|
2469
2469
|
else {
|
|
2470
|
-
for (
|
|
2471
|
-
if (d = Pe(e,
|
|
2472
|
-
p = !0,
|
|
2473
|
-
|
|
2470
|
+
for (u = 0; u < e.length; d >= 65536 ? u += 2 : u++) {
|
|
2471
|
+
if (d = Pe(e, u), d === ze)
|
|
2472
|
+
p = !0, b && (w = w || // Foldable line = too long, and not more-indented.
|
|
2473
|
+
u - S - 1 > a && e[S + 1] !== " ", S = u);
|
|
2474
2474
|
else if (!Ge(d))
|
|
2475
|
-
return
|
|
2476
|
-
|
|
2475
|
+
return Ee;
|
|
2476
|
+
k = k && Jt(d, f, l), f = d;
|
|
2477
2477
|
}
|
|
2478
|
-
w = w ||
|
|
2478
|
+
w = w || b && u - S - 1 > a && e[S + 1] !== " ";
|
|
2479
2479
|
}
|
|
2480
|
-
return !p && !w ?
|
|
2480
|
+
return !p && !w ? k && !n && !r(e) ? Xi : o === Je ? Ee : gt : t > 9 && Qi(e) ? Ee : n ? o === Je ? Ee : gt : w ? ta : ea;
|
|
2481
2481
|
}
|
|
2482
2482
|
function Al(e, i, t, a, r) {
|
|
2483
2483
|
e.dump = function() {
|
|
@@ -2485,16 +2485,16 @@ function Al(e, i, t, a, r) {
|
|
|
2485
2485
|
return e.quotingType === Je ? '""' : "''";
|
|
2486
2486
|
if (!e.noCompatMode && (yl.indexOf(i) !== -1 || vl.test(i)))
|
|
2487
2487
|
return e.quotingType === Je ? '"' + i + '"' : "'" + i + "'";
|
|
2488
|
-
var o = e.indent * Math.max(1, t),
|
|
2489
|
-
function
|
|
2488
|
+
var o = e.indent * Math.max(1, t), n = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = a || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2489
|
+
function u(d) {
|
|
2490
2490
|
return kl(e, d);
|
|
2491
2491
|
}
|
|
2492
2492
|
switch (Il(
|
|
2493
2493
|
i,
|
|
2494
|
-
n,
|
|
2495
|
-
e.indent,
|
|
2496
2494
|
l,
|
|
2497
|
-
|
|
2495
|
+
e.indent,
|
|
2496
|
+
n,
|
|
2497
|
+
u,
|
|
2498
2498
|
e.quotingType,
|
|
2499
2499
|
e.forceQuotes && !a,
|
|
2500
2500
|
r
|
|
@@ -2506,8 +2506,8 @@ function Al(e, i, t, a, r) {
|
|
|
2506
2506
|
case ea:
|
|
2507
2507
|
return "|" + Gt(i, e.indent) + Wt(Ht(i, o));
|
|
2508
2508
|
case ta:
|
|
2509
|
-
return ">" + Gt(i, e.indent) + Wt(Ht(xl(i,
|
|
2510
|
-
case
|
|
2509
|
+
return ">" + Gt(i, e.indent) + Wt(Ht(xl(i, n), o));
|
|
2510
|
+
case Ee:
|
|
2511
2511
|
return '"' + Tl(i) + '"';
|
|
2512
2512
|
default:
|
|
2513
2513
|
throw new fe("impossible error: invalid scalar style");
|
|
@@ -2532,22 +2532,22 @@ function xl(e, i) {
|
|
|
2532
2532
|
`);
|
|
2533
2533
|
return d = d !== -1 ? d : e.length, t.lastIndex = d, Yt(e.slice(0, d), i);
|
|
2534
2534
|
}(), r = e[0] === `
|
|
2535
|
-
` || e[0] === " ", o,
|
|
2536
|
-
var
|
|
2537
|
-
o =
|
|
2538
|
-
` : "") + Yt(
|
|
2535
|
+
` || e[0] === " ", o, n; n = t.exec(e); ) {
|
|
2536
|
+
var l = n[1], u = n[2];
|
|
2537
|
+
o = u[0] === " ", a += l + (!r && !o && u !== "" ? `
|
|
2538
|
+
` : "") + Yt(u, i), r = o;
|
|
2539
2539
|
}
|
|
2540
2540
|
return a;
|
|
2541
2541
|
}
|
|
2542
2542
|
function Yt(e, i) {
|
|
2543
2543
|
if (e === "" || e[0] === " ")
|
|
2544
2544
|
return e;
|
|
2545
|
-
for (var t = / [^ ]/g, a, r = 0, o,
|
|
2546
|
-
|
|
2547
|
-
` + e.slice(r, o), r = o + 1),
|
|
2548
|
-
return
|
|
2549
|
-
`, e.length - r > i &&
|
|
2550
|
-
` + e.slice(
|
|
2545
|
+
for (var t = / [^ ]/g, a, r = 0, o, n = 0, l = 0, u = ""; a = t.exec(e); )
|
|
2546
|
+
l = a.index, l - r > i && (o = n > r ? n : l, u += `
|
|
2547
|
+
` + e.slice(r, o), r = o + 1), n = l;
|
|
2548
|
+
return u += `
|
|
2549
|
+
`, e.length - r > i && n > r ? u += e.slice(r, n) + `
|
|
2550
|
+
` + e.slice(n + 1) : u += e.slice(r), u.slice(1);
|
|
2551
2551
|
}
|
|
2552
2552
|
function Tl(e) {
|
|
2553
2553
|
for (var i = "", t = 0, a, r = 0; r < e.length; t >= 65536 ? r += 2 : r++)
|
|
@@ -2555,70 +2555,70 @@ function Tl(e) {
|
|
|
2555
2555
|
return i;
|
|
2556
2556
|
}
|
|
2557
2557
|
function $l(e, i, t) {
|
|
2558
|
-
var a = "", r = e.tag, o,
|
|
2559
|
-
for (o = 0,
|
|
2560
|
-
|
|
2558
|
+
var a = "", r = e.tag, o, n, l;
|
|
2559
|
+
for (o = 0, n = t.length; o < n; o += 1)
|
|
2560
|
+
l = t[o], e.replacer && (l = e.replacer.call(t, String(o), l)), (_e(e, i, l, !1, !1) || typeof l > "u" && _e(e, i, null, !1, !1)) && (a !== "" && (a += "," + (e.condenseFlow ? "" : " ")), a += e.dump);
|
|
2561
2561
|
e.tag = r, e.dump = "[" + a + "]";
|
|
2562
2562
|
}
|
|
2563
2563
|
function Zt(e, i, t, a) {
|
|
2564
|
-
var r = "", o = e.tag,
|
|
2565
|
-
for (
|
|
2566
|
-
|
|
2564
|
+
var r = "", o = e.tag, n, l, u;
|
|
2565
|
+
for (n = 0, l = t.length; n < l; n += 1)
|
|
2566
|
+
u = t[n], e.replacer && (u = e.replacer.call(t, String(n), u)), (_e(e, i + 1, u, !0, !0, !1, !0) || typeof u > "u" && _e(e, i + 1, null, !0, !0, !1, !0)) && ((!a || r !== "") && (r += mt(e, i)), e.dump && ze === e.dump.charCodeAt(0) ? r += "-" : r += "- ", r += e.dump);
|
|
2567
2567
|
e.tag = o, e.dump = r || "[]";
|
|
2568
2568
|
}
|
|
2569
|
-
function
|
|
2570
|
-
var a = "", r = e.tag, o = Object.keys(t),
|
|
2571
|
-
for (
|
|
2572
|
-
|
|
2569
|
+
function Ml(e, i, t) {
|
|
2570
|
+
var a = "", r = e.tag, o = Object.keys(t), n, l, u, d, f;
|
|
2571
|
+
for (n = 0, l = o.length; n < l; n += 1)
|
|
2572
|
+
f = "", a !== "" && (f += ", "), e.condenseFlow && (f += '"'), u = o[n], d = t[u], e.replacer && (d = e.replacer.call(t, u, d)), _e(e, i, u, !1, !1) && (e.dump.length > 1024 && (f += "? "), f += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), _e(e, i, d, !1, !1) && (f += e.dump, a += f));
|
|
2573
2573
|
e.tag = r, e.dump = "{" + a + "}";
|
|
2574
2574
|
}
|
|
2575
|
-
function
|
|
2576
|
-
var r = "", o = e.tag,
|
|
2575
|
+
function jl(e, i, t, a) {
|
|
2576
|
+
var r = "", o = e.tag, n = Object.keys(t), l, u, d, f, p, w;
|
|
2577
2577
|
if (e.sortKeys === !0)
|
|
2578
|
-
|
|
2578
|
+
n.sort();
|
|
2579
2579
|
else if (typeof e.sortKeys == "function")
|
|
2580
|
-
|
|
2580
|
+
n.sort(e.sortKeys);
|
|
2581
2581
|
else if (e.sortKeys)
|
|
2582
2582
|
throw new fe("sortKeys must be a boolean or a function");
|
|
2583
|
-
for (
|
|
2584
|
-
w = "", (!a || r !== "") && (w += mt(e, i)), d = l
|
|
2583
|
+
for (l = 0, u = n.length; l < u; l += 1)
|
|
2584
|
+
w = "", (!a || r !== "") && (w += mt(e, i)), d = n[l], f = t[d], e.replacer && (f = e.replacer.call(t, d, f)), _e(e, i + 1, d, !0, !0, !0) && (p = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, p && (e.dump && ze === e.dump.charCodeAt(0) ? w += "?" : w += "? "), w += e.dump, p && (w += mt(e, i)), _e(e, i + 1, f, !0, p) && (e.dump && ze === e.dump.charCodeAt(0) ? w += ":" : w += ": ", w += e.dump, r += w));
|
|
2585
2585
|
e.tag = o, e.dump = r || "{}";
|
|
2586
2586
|
}
|
|
2587
2587
|
function Qt(e, i, t) {
|
|
2588
|
-
var a, r, o,
|
|
2589
|
-
for (r = t ? e.explicitTypes : e.implicitTypes, o = 0,
|
|
2590
|
-
if (
|
|
2591
|
-
if (t ?
|
|
2592
|
-
if (
|
|
2593
|
-
a =
|
|
2594
|
-
else if (zi.call(
|
|
2595
|
-
a =
|
|
2588
|
+
var a, r, o, n, l, u;
|
|
2589
|
+
for (r = t ? e.explicitTypes : e.implicitTypes, o = 0, n = r.length; o < n; o += 1)
|
|
2590
|
+
if (l = r[o], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof i == "object" && i instanceof l.instanceOf) && (!l.predicate || l.predicate(i))) {
|
|
2591
|
+
if (t ? l.multi && l.representName ? e.tag = l.representName(i) : e.tag = l.tag : e.tag = "?", l.represent) {
|
|
2592
|
+
if (u = e.styleMap[l.tag] || l.defaultStyle, Hi.call(l.represent) === "[object Function]")
|
|
2593
|
+
a = l.represent(i, u);
|
|
2594
|
+
else if (zi.call(l.represent, u))
|
|
2595
|
+
a = l.represent[u](i, u);
|
|
2596
2596
|
else
|
|
2597
|
-
throw new fe("!<" +
|
|
2597
|
+
throw new fe("!<" + l.tag + '> tag resolver accepts not "' + u + '" style');
|
|
2598
2598
|
e.dump = a;
|
|
2599
2599
|
}
|
|
2600
2600
|
return !0;
|
|
2601
2601
|
}
|
|
2602
2602
|
return !1;
|
|
2603
2603
|
}
|
|
2604
|
-
function _e(e, i, t, a, r, o,
|
|
2604
|
+
function _e(e, i, t, a, r, o, n) {
|
|
2605
2605
|
e.tag = null, e.dump = t, Qt(e, t, !1) || Qt(e, t, !0);
|
|
2606
|
-
var
|
|
2606
|
+
var l = Hi.call(e.dump), u = a, d;
|
|
2607
2607
|
a && (a = e.flowLevel < 0 || e.flowLevel > i);
|
|
2608
|
-
var
|
|
2609
|
-
if (
|
|
2608
|
+
var f = l === "[object Object]" || l === "[object Array]", p, w;
|
|
2609
|
+
if (f && (p = e.duplicates.indexOf(t), w = p !== -1), (e.tag !== null && e.tag !== "?" || w || e.indent !== 2 && i > 0) && (r = !1), w && e.usedDuplicates[p])
|
|
2610
2610
|
e.dump = "*ref_" + p;
|
|
2611
2611
|
else {
|
|
2612
|
-
if (
|
|
2613
|
-
a && Object.keys(e.dump).length !== 0 ? (
|
|
2614
|
-
else if (
|
|
2615
|
-
a && e.dump.length !== 0 ? (e.noArrayIndent && !
|
|
2616
|
-
else if (
|
|
2617
|
-
e.tag !== "?" && Al(e, e.dump, i, o,
|
|
2612
|
+
if (f && w && !e.usedDuplicates[p] && (e.usedDuplicates[p] = !0), l === "[object Object]")
|
|
2613
|
+
a && Object.keys(e.dump).length !== 0 ? (jl(e, i, e.dump, r), w && (e.dump = "&ref_" + p + e.dump)) : (Ml(e, i, e.dump), w && (e.dump = "&ref_" + p + " " + e.dump));
|
|
2614
|
+
else if (l === "[object Array]")
|
|
2615
|
+
a && e.dump.length !== 0 ? (e.noArrayIndent && !n && i > 0 ? Zt(e, i - 1, e.dump, r) : Zt(e, i, e.dump, r), w && (e.dump = "&ref_" + p + e.dump)) : ($l(e, i, e.dump), w && (e.dump = "&ref_" + p + " " + e.dump));
|
|
2616
|
+
else if (l === "[object String]")
|
|
2617
|
+
e.tag !== "?" && Al(e, e.dump, i, o, u);
|
|
2618
2618
|
else {
|
|
2619
|
-
if (
|
|
2619
|
+
if (l === "[object Undefined]" || e.skipInvalid)
|
|
2620
2620
|
return !1;
|
|
2621
|
-
throw new fe("unacceptable kind of an object to dump " +
|
|
2621
|
+
throw new fe("unacceptable kind of an object to dump " + l);
|
|
2622
2622
|
}
|
|
2623
2623
|
e.tag !== null && e.tag !== "?" && (d = encodeURI(
|
|
2624
2624
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
@@ -2626,7 +2626,7 @@ function _e(e, i, t, a, r, o, l) {
|
|
|
2626
2626
|
}
|
|
2627
2627
|
return !0;
|
|
2628
2628
|
}
|
|
2629
|
-
function
|
|
2629
|
+
function El(e, i) {
|
|
2630
2630
|
var t = [], a = [], r, o;
|
|
2631
2631
|
for (yt(e, t, a), r = 0, o = a.length; r < o; r += 1)
|
|
2632
2632
|
i.duplicates.push(t[a[r]]);
|
|
@@ -2647,7 +2647,7 @@ function yt(e, i, t) {
|
|
|
2647
2647
|
function Ol(e, i) {
|
|
2648
2648
|
i = i || {};
|
|
2649
2649
|
var t = new _l(i);
|
|
2650
|
-
t.noRefs ||
|
|
2650
|
+
t.noRefs || El(e, t);
|
|
2651
2651
|
var a = e;
|
|
2652
2652
|
return t.replacer && (a = t.replacer.call({ "": a }, "", a)), _e(t, 0, a, !0, !0) ? t.dump + `
|
|
2653
2653
|
` : "";
|
|
@@ -2661,16 +2661,16 @@ function Tt(e, i) {
|
|
|
2661
2661
|
};
|
|
2662
2662
|
}
|
|
2663
2663
|
var Nl = ue, Kl = vi, Ll = _i, ql = Ai, Bl = xi, Pl = St, Ul = Di.load, Rl = Di.loadAll, Dl = Fl.dump, Hl = fe, zl = {
|
|
2664
|
-
binary:
|
|
2664
|
+
binary: Ei,
|
|
2665
2665
|
float: Ii,
|
|
2666
2666
|
map: wi,
|
|
2667
2667
|
null: ki,
|
|
2668
2668
|
pairs: Vi,
|
|
2669
2669
|
set: Fi,
|
|
2670
|
-
timestamp:
|
|
2670
|
+
timestamp: Mi,
|
|
2671
2671
|
bool: Ci,
|
|
2672
2672
|
int: Si,
|
|
2673
|
-
merge:
|
|
2673
|
+
merge: ji,
|
|
2674
2674
|
omap: Oi,
|
|
2675
2675
|
seq: bi,
|
|
2676
2676
|
str: hi
|
|
@@ -2700,12 +2700,9 @@ const Zl = {
|
|
|
2700
2700
|
key: 1,
|
|
2701
2701
|
class: "config-card-display-json"
|
|
2702
2702
|
}, tn = {
|
|
2703
|
-
key: 0,
|
|
2704
|
-
class: "config-card-display-json-endpoint"
|
|
2705
|
-
}, an = {
|
|
2706
2703
|
key: 2,
|
|
2707
2704
|
class: "config-card-display-yaml"
|
|
2708
|
-
},
|
|
2705
|
+
}, an = /* @__PURE__ */ ae({
|
|
2709
2706
|
__name: "ConfigCardDisplay",
|
|
2710
2707
|
props: {
|
|
2711
2708
|
propertyCollections: {
|
|
@@ -2728,101 +2725,81 @@ const Zl = {
|
|
|
2728
2725
|
type: Object,
|
|
2729
2726
|
required: !1,
|
|
2730
2727
|
default: () => null
|
|
2731
|
-
},
|
|
2732
|
-
fetchUrl: {
|
|
2733
|
-
type: String,
|
|
2734
|
-
required: !0
|
|
2735
2728
|
}
|
|
2736
2729
|
},
|
|
2737
2730
|
setup(e) {
|
|
2738
|
-
const i = e, t = it(), { i18n: { t: a } } = ne.useI18n(), r = (
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
});
|
|
2744
|
-
return be(() => i.format, (c) => {
|
|
2745
|
-
if (c !== "structured") {
|
|
2746
|
-
const d = JSON.parse(JSON.stringify(i.record));
|
|
2747
|
-
delete d.created_at, delete d.updated_at, c === "json" ? o.value = JSON.stringify(d, null, 2) : c === "yaml" && (l.value = Yl.dump(d));
|
|
2731
|
+
const i = e, t = it(), { i18n: { t: a } } = ne.useI18n(), r = (l) => !!(l.tooltip || t[`${l.key}-label-tooltip`]), o = N(""), n = N("");
|
|
2732
|
+
return be(() => i.format, (l) => {
|
|
2733
|
+
if (l !== "structured") {
|
|
2734
|
+
const u = JSON.parse(JSON.stringify(i.record));
|
|
2735
|
+
delete u.created_at, delete u.updated_at, l === "json" ? o.value = JSON.stringify(u, null, 2) : l === "yaml" && (n.value = Yl.dump(u));
|
|
2748
2736
|
}
|
|
2749
|
-
}, { immediate: !0 }), (
|
|
2750
|
-
const
|
|
2751
|
-
return
|
|
2752
|
-
e.format === "structured" ? (
|
|
2753
|
-
(
|
|
2754
|
-
key: `config-card-details-${
|
|
2755
|
-
class:
|
|
2756
|
-
"data-testid": `config-card-details-${
|
|
2737
|
+
}, { immediate: !0 }), (l, u) => {
|
|
2738
|
+
const d = L("KCodeBlock");
|
|
2739
|
+
return h(), M(ye, null, [
|
|
2740
|
+
e.format === "structured" ? (h(), M("div", Zl, [
|
|
2741
|
+
(h(!0), M(ye, null, ge(e.propListTypes, (f) => (h(), M("div", {
|
|
2742
|
+
key: `config-card-details-${f}-props`,
|
|
2743
|
+
class: $e(`config-card-details-${f}-props`),
|
|
2744
|
+
"data-testid": `config-card-details-${f}-props`
|
|
2757
2745
|
}, [
|
|
2758
|
-
|
|
2759
|
-
(
|
|
2760
|
-
key:
|
|
2761
|
-
item:
|
|
2762
|
-
},
|
|
2763
|
-
label:
|
|
2764
|
-
Z(
|
|
2746
|
+
f !== "basic" ? (h(), M("div", Xl, V(f === "advanced" ? m(a)("baseConfigCard.sections.advanced") : m(a)("baseConfigCard.sections.plugin")), 1)) : D("", !0),
|
|
2747
|
+
(h(!0), M(ye, null, ge(e.propertyCollections[f], (p) => (h(), P(kt, {
|
|
2748
|
+
key: p.key,
|
|
2749
|
+
item: p
|
|
2750
|
+
}, xe({
|
|
2751
|
+
label: y(() => [
|
|
2752
|
+
Z(l.$slots, `${p.key}-label`, { row: p }, void 0, !0)
|
|
2765
2753
|
]),
|
|
2766
|
-
[
|
|
2767
|
-
Z(
|
|
2768
|
-
row:
|
|
2769
|
-
rowValue:
|
|
2754
|
+
[p.key]: y(({ rowValue: w }) => [
|
|
2755
|
+
Z(l.$slots, p.key, {
|
|
2756
|
+
row: p,
|
|
2757
|
+
rowValue: w
|
|
2770
2758
|
}, void 0, !0)
|
|
2771
2759
|
]),
|
|
2772
2760
|
_: 2
|
|
2773
2761
|
}, [
|
|
2774
|
-
r(
|
|
2762
|
+
r(p) ? {
|
|
2775
2763
|
name: "label-tooltip",
|
|
2776
|
-
fn:
|
|
2777
|
-
Z(
|
|
2764
|
+
fn: y(() => [
|
|
2765
|
+
Z(l.$slots, `${p.key}-label-tooltip`, { row: p }, void 0, !0)
|
|
2778
2766
|
]),
|
|
2779
2767
|
key: "0"
|
|
2780
2768
|
} : void 0
|
|
2781
2769
|
]), 1032, ["item"]))), 128))
|
|
2782
2770
|
], 10, Ql))), 128))
|
|
2783
|
-
])) :
|
|
2784
|
-
e.format === "json" ? (
|
|
2785
|
-
|
|
2786
|
-
k(m, { method: "get" }),
|
|
2787
|
-
k(p, {
|
|
2788
|
-
id: "config-card-endpoint-codeblock",
|
|
2789
|
-
code: n.value,
|
|
2790
|
-
"is-single-line": "",
|
|
2791
|
-
language: "json",
|
|
2792
|
-
theme: "dark"
|
|
2793
|
-
}, null, 8, ["code"])
|
|
2794
|
-
])) : R("", !0),
|
|
2795
|
-
k(p, {
|
|
2771
|
+
])) : D("", !0),
|
|
2772
|
+
e.format === "json" ? (h(), M("div", en, [
|
|
2773
|
+
C(d, {
|
|
2796
2774
|
id: "config-card-codeblock",
|
|
2797
|
-
class: Ce({ "config-card-display-json-content": n.value }),
|
|
2798
2775
|
code: o.value,
|
|
2799
2776
|
language: "json",
|
|
2800
2777
|
theme: "dark"
|
|
2801
|
-
}, null, 8, ["
|
|
2802
|
-
])) :
|
|
2803
|
-
e.format === "yaml" ? (
|
|
2804
|
-
|
|
2778
|
+
}, null, 8, ["code"])
|
|
2779
|
+
])) : D("", !0),
|
|
2780
|
+
e.format === "yaml" ? (h(), M("div", tn, [
|
|
2781
|
+
C(d, {
|
|
2805
2782
|
id: "config-card-codeblock",
|
|
2806
|
-
code:
|
|
2783
|
+
code: n.value,
|
|
2807
2784
|
language: "yaml",
|
|
2808
2785
|
theme: "dark"
|
|
2809
2786
|
}, null, 8, ["code"])
|
|
2810
|
-
])) :
|
|
2787
|
+
])) : D("", !0)
|
|
2811
2788
|
], 64);
|
|
2812
2789
|
};
|
|
2813
2790
|
}
|
|
2814
|
-
}),
|
|
2791
|
+
}), rn = /* @__PURE__ */ ve(an, [["__scopeId", "data-v-c914c7e4"]]), Xt = "24px", on = (e, i) => {
|
|
2815
2792
|
const t = e.__vccOpts || e;
|
|
2816
2793
|
for (const [a, r] of i)
|
|
2817
2794
|
t[a] = r;
|
|
2818
2795
|
return t;
|
|
2819
|
-
},
|
|
2796
|
+
}, ln = (e) => (oi("data-v-a53b73fd"), e = e(), li(), e), nn = ["aria-hidden"], sn = {
|
|
2820
2797
|
key: 0,
|
|
2821
2798
|
"data-testid": "kui-icon-svg-title"
|
|
2822
|
-
},
|
|
2799
|
+
}, cn = /* @__PURE__ */ ln(() => /* @__PURE__ */ F("path", {
|
|
2823
2800
|
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",
|
|
2824
2801
|
fill: "currentColor"
|
|
2825
|
-
}, null, -1)),
|
|
2802
|
+
}, null, -1)), un = /* @__PURE__ */ ae({
|
|
2826
2803
|
__name: "BookIcon",
|
|
2827
2804
|
props: {
|
|
2828
2805
|
/** The accessibility text provided to screen readers */
|
|
@@ -2891,14 +2868,14 @@ const Zl = {
|
|
|
2891
2868
|
lineHeight: "0",
|
|
2892
2869
|
width: t.value
|
|
2893
2870
|
}));
|
|
2894
|
-
return (r, o) => (
|
|
2871
|
+
return (r, o) => (h(), P(Ne(e.as), {
|
|
2895
2872
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2896
2873
|
class: "kui-icon book-icon",
|
|
2897
2874
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2898
2875
|
style: ri(a.value)
|
|
2899
2876
|
}, {
|
|
2900
|
-
default:
|
|
2901
|
-
(
|
|
2877
|
+
default: y(() => [
|
|
2878
|
+
(h(), M("svg", {
|
|
2902
2879
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2903
2880
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2904
2881
|
fill: "none",
|
|
@@ -2908,23 +2885,23 @@ const Zl = {
|
|
|
2908
2885
|
width: "100%",
|
|
2909
2886
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2910
2887
|
}, [
|
|
2911
|
-
e.title ? (
|
|
2912
|
-
|
|
2913
|
-
], 8,
|
|
2888
|
+
e.title ? (h(), M("title", sn, V(e.title), 1)) : D("", !0),
|
|
2889
|
+
cn
|
|
2890
|
+
], 8, nn))
|
|
2914
2891
|
]),
|
|
2915
2892
|
_: 1
|
|
2916
2893
|
}, 8, ["aria-hidden", "style"]));
|
|
2917
2894
|
}
|
|
2918
|
-
}),
|
|
2895
|
+
}), dn = /* @__PURE__ */ on(un, [["__scopeId", "data-v-a53b73fd"]]), pn = { "data-testid": "config-card-title" }, fn = { class: "config-card-actions" }, mn = ["href"], gn = {
|
|
2919
2896
|
key: 2,
|
|
2920
2897
|
class: "config-card-details-section"
|
|
2921
|
-
},
|
|
2898
|
+
}, yn = {
|
|
2922
2899
|
key: 3,
|
|
2923
2900
|
class: "config-card-details-section"
|
|
2924
|
-
},
|
|
2901
|
+
}, vn = ["data-testid"], hn = {
|
|
2925
2902
|
key: 0,
|
|
2926
2903
|
class: "config-card-prop-section-title"
|
|
2927
|
-
},
|
|
2904
|
+
}, bn = /* @__PURE__ */ ae({
|
|
2928
2905
|
__name: "EntityBaseConfigCard",
|
|
2929
2906
|
props: {
|
|
2930
2907
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2999,7 +2976,7 @@ const Zl = {
|
|
|
2999
2976
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
3000
2977
|
setup(e, { emit: i }) {
|
|
3001
2978
|
var t;
|
|
3002
|
-
const a = e, r = it(), { i18n: { t: o } } = ne.useI18n(), { getMessageFromError:
|
|
2979
|
+
const a = e, r = it(), { i18n: { t: o } } = ne.useI18n(), { getMessageFromError: n } = ne.useErrors(), { convertKeyToTitle: l } = ne.useStringHelpers(), { axiosInstance: u } = ne.useAxios({
|
|
3003
2980
|
headers: (t = a.config) == null ? void 0 : t.requestHeaders
|
|
3004
2981
|
}), d = [
|
|
3005
2982
|
{
|
|
@@ -3015,8 +2992,8 @@ const Zl = {
|
|
|
3015
2992
|
label: "YAML",
|
|
3016
2993
|
value: "yaml"
|
|
3017
2994
|
}
|
|
3018
|
-
],
|
|
3019
|
-
|
|
2995
|
+
], f = N("structured"), p = (A) => {
|
|
2996
|
+
f.value = A == null ? void 0 : A.value;
|
|
3020
2997
|
}, w = {
|
|
3021
2998
|
id: {
|
|
3022
2999
|
type: ee.ID,
|
|
@@ -3051,202 +3028,201 @@ const Zl = {
|
|
|
3051
3028
|
// the last property displayed
|
|
3052
3029
|
section: de.Basic
|
|
3053
3030
|
}
|
|
3054
|
-
},
|
|
3031
|
+
}, b = N(!1), S = N(!1), k = N(""), v = N(), $ = T(() => {
|
|
3055
3032
|
var A, q, U;
|
|
3056
|
-
if (!
|
|
3033
|
+
if (!v.value)
|
|
3057
3034
|
return [];
|
|
3058
|
-
const K = [], H = Object.keys(
|
|
3059
|
-
for (const
|
|
3060
|
-
const Q = (q = (A = a.configSchema) == null ? void 0 : A[
|
|
3035
|
+
const K = [], H = Object.keys(v.value).length;
|
|
3036
|
+
for (const R in v.value) {
|
|
3037
|
+
const Q = (q = (A = a.configSchema) == null ? void 0 : A[R]) == null ? void 0 : q.order, z = (U = w[R]) == null ? void 0 : U.order;
|
|
3061
3038
|
let ie = H;
|
|
3062
|
-
(z || z === 0) && (ie = z === -1 ? H + 1 : z), Q && (ie = Q === -1 ? H + 1 : Q), K.push([
|
|
3039
|
+
(z || z === 0) && (ie = z === -1 ? H + 1 : z), Q && (ie = Q === -1 ? H + 1 : Q), K.push([R, ie]);
|
|
3063
3040
|
}
|
|
3064
|
-
return K.sort(function(
|
|
3065
|
-
return
|
|
3066
|
-
}), K.map((
|
|
3041
|
+
return K.sort(function(R, Q) {
|
|
3042
|
+
return R[1] - Q[1];
|
|
3043
|
+
}), K.map((R) => {
|
|
3067
3044
|
var Q, z;
|
|
3068
|
-
const ie =
|
|
3045
|
+
const ie = R[0], Y = (Q = v.value) == null ? void 0 : Q[ie], X = ((z = a.configSchema) == null ? void 0 : z[ie]) || {}, ce = w[ie];
|
|
3069
3046
|
return {
|
|
3070
3047
|
key: ie,
|
|
3071
3048
|
value: Y,
|
|
3072
3049
|
hidden: X.hidden || !1,
|
|
3073
3050
|
type: X.type ?? ((ce == null ? void 0 : ce.type) || ee.Text),
|
|
3074
|
-
label: X.label ?? ((ce == null ? void 0 : ce.label) ||
|
|
3051
|
+
label: X.label ?? ((ce == null ? void 0 : ce.label) || l(ie)),
|
|
3075
3052
|
tooltip: X.tooltip ?? ((ce == null ? void 0 : ce.tooltip) || void 0),
|
|
3076
3053
|
section: X.section ?? ((ce == null ? void 0 : ce.section) || de.Advanced)
|
|
3077
3054
|
};
|
|
3078
|
-
}).filter((
|
|
3055
|
+
}).filter((R) => !R.hidden && R.key !== a.pluginConfigKey);
|
|
3079
3056
|
}), s = T(() => {
|
|
3080
3057
|
var A, q;
|
|
3081
|
-
if (!
|
|
3058
|
+
if (!v.value || !a.pluginConfigKey)
|
|
3082
3059
|
return [];
|
|
3083
|
-
const U =
|
|
3084
|
-
for (const
|
|
3085
|
-
const Q = (q = (A = a.pluginConfigSchema) == null ? void 0 : A[
|
|
3060
|
+
const U = v.value[a.pluginConfigKey] || {}, K = Object.keys(U).length, H = [];
|
|
3061
|
+
for (const R in U) {
|
|
3062
|
+
const Q = (q = (A = a.pluginConfigSchema) == null ? void 0 : A[R]) == null ? void 0 : q.order, z = U[R];
|
|
3086
3063
|
let ie = z != null && z !== "" ? K - 1 : K;
|
|
3087
|
-
Q && (ie = Q === -1 ? K + 1 : Q), H.push([
|
|
3064
|
+
Q && (ie = Q === -1 ? K + 1 : Q), H.push([R, ie]);
|
|
3088
3065
|
}
|
|
3089
|
-
return H.sort(function(
|
|
3090
|
-
return
|
|
3091
|
-
}), H.map((
|
|
3066
|
+
return H.sort(function(R, Q) {
|
|
3067
|
+
return R[1] - Q[1];
|
|
3068
|
+
}), H.map((R) => {
|
|
3092
3069
|
var Q;
|
|
3093
|
-
const z =
|
|
3070
|
+
const z = R[0], ie = U[z], Y = ((Q = a.pluginConfigSchema) == null ? void 0 : Q[z]) || {};
|
|
3094
3071
|
return {
|
|
3095
3072
|
key: z,
|
|
3096
3073
|
value: ie,
|
|
3097
3074
|
hidden: Y.hidden || !1,
|
|
3098
3075
|
type: Y.type ?? ee.Text,
|
|
3099
|
-
label: Y.label ??
|
|
3076
|
+
label: Y.label ?? l(z),
|
|
3100
3077
|
tooltip: Y.tooltip ?? void 0,
|
|
3101
3078
|
section: de.Plugin
|
|
3102
3079
|
};
|
|
3103
|
-
}).filter((
|
|
3104
|
-
}),
|
|
3080
|
+
}).filter((R) => !R.hidden);
|
|
3081
|
+
}), E = T(() => {
|
|
3105
3082
|
var A, q, U, K;
|
|
3106
3083
|
return {
|
|
3107
|
-
basic: (A =
|
|
3108
|
-
advanced: (q =
|
|
3109
|
-
plugin: (K = s.value) == null ? void 0 : K.concat((U =
|
|
3084
|
+
basic: (A = $.value) == null ? void 0 : A.filter((H) => H.section === de.Basic),
|
|
3085
|
+
advanced: (q = $.value) == null ? void 0 : q.filter((H) => H.section === de.Advanced),
|
|
3086
|
+
plugin: (K = s.value) == null ? void 0 : K.concat((U = $.value) == null ? void 0 : U.filter((H) => H.section === de.Plugin))
|
|
3110
3087
|
};
|
|
3111
3088
|
}), x = T(() => {
|
|
3112
3089
|
const A = [];
|
|
3113
|
-
return
|
|
3090
|
+
return E.value.basic.length && A.push("basic"), E.value.advanced.length && A.push("advanced"), E.value.plugin.length && A.push("plugin"), A;
|
|
3114
3091
|
}), B = (A) => !!(A.tooltip || r[`${A.key}-label-tooltip`]), re = T(() => {
|
|
3115
3092
|
var A, q;
|
|
3116
3093
|
let U = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3117
3094
|
return a.config.app === "konnect" ? U = U.replace(/{controlPlaneId}/gi, ((A = a.config) == null ? void 0 : A.controlPlaneId) || "") : a.config.app === "kongManager" && (U = U.replace(/\/{workspace}/gi, (q = a.config) != null && q.workspace ? `/${a.config.workspace}` : "")), U = U.replace(/{id}/gi, a.config.entityId), U;
|
|
3118
3095
|
}), W = (A) => {
|
|
3119
|
-
|
|
3096
|
+
v.value && A(JSON.stringify(v.value)) ? i("copy:success", v.value) : i("copy:error");
|
|
3120
3097
|
};
|
|
3121
|
-
return be(
|
|
3098
|
+
return be(b, (A) => {
|
|
3122
3099
|
i("loading", A);
|
|
3123
3100
|
}, { immediate: !0 }), vt(async () => {
|
|
3124
|
-
S.value = !1,
|
|
3101
|
+
S.value = !1, b.value = !0;
|
|
3125
3102
|
try {
|
|
3126
|
-
const { data: A } = await
|
|
3103
|
+
const { data: A } = await u.get(re.value);
|
|
3127
3104
|
if (a.dataKey)
|
|
3128
3105
|
if (typeof A[a.dataKey] < "u")
|
|
3129
|
-
|
|
3106
|
+
v.value = { ...A[a.dataKey] };
|
|
3130
3107
|
else
|
|
3131
3108
|
throw new Error(o("errors.dataKeyUndefined", { dataKey: a.dataKey }));
|
|
3132
3109
|
else
|
|
3133
|
-
|
|
3110
|
+
v.value = { ...A };
|
|
3134
3111
|
Object.keys(a.configSchema).filter((q) => a.configSchema[q].forceShow).forEach((q) => {
|
|
3135
|
-
|
|
3112
|
+
v.value && typeof v.value[q] > "u" && (v.value[q] = null);
|
|
3136
3113
|
}), i("fetch:success", A);
|
|
3137
3114
|
} catch (A) {
|
|
3138
|
-
const q =
|
|
3139
|
-
|
|
3115
|
+
const q = n(A);
|
|
3116
|
+
k.value = q.startsWith("code") ? o("baseConfigCard.errors.load") : q, S.value = !0, i("fetch:error", A);
|
|
3140
3117
|
} finally {
|
|
3141
|
-
|
|
3118
|
+
b.value = !1;
|
|
3142
3119
|
}
|
|
3143
3120
|
}), (A, q) => {
|
|
3144
|
-
const U = L("KLabel"), K = L("KSelect"), H = L("KButton"),
|
|
3145
|
-
return
|
|
3146
|
-
actions:
|
|
3147
|
-
F("div",
|
|
3121
|
+
const U = L("KLabel"), K = L("KSelect"), H = L("KButton"), R = L("KClipboardProvider"), Q = L("KSkeleton"), z = L("KEmptyState"), ie = L("KCard");
|
|
3122
|
+
return h(), P(ie, { class: "kong-ui-entity-base-config-card" }, xe({
|
|
3123
|
+
actions: y(() => [
|
|
3124
|
+
F("div", fn, [
|
|
3148
3125
|
Z(A.$slots, "actions", {}, void 0, !0),
|
|
3149
|
-
e.config.jsonYamlEnabled ? (
|
|
3126
|
+
e.config.jsonYamlEnabled ? (h(), P(U, {
|
|
3150
3127
|
key: 0,
|
|
3151
3128
|
class: "config-format-select-label",
|
|
3152
3129
|
"data-testid": "config-format-select-label"
|
|
3153
3130
|
}, {
|
|
3154
|
-
default:
|
|
3131
|
+
default: y(() => [
|
|
3155
3132
|
J(V(e.label), 1)
|
|
3156
3133
|
]),
|
|
3157
3134
|
_: 1
|
|
3158
|
-
})) :
|
|
3159
|
-
e.config.jsonYamlEnabled ? (
|
|
3135
|
+
})) : D("", !0),
|
|
3136
|
+
e.config.jsonYamlEnabled ? (h(), P(K, {
|
|
3160
3137
|
key: 1,
|
|
3161
3138
|
appearance: "select",
|
|
3162
3139
|
"data-testid": "select-config-format",
|
|
3163
3140
|
items: d,
|
|
3164
3141
|
onChange: p
|
|
3165
|
-
})) :
|
|
3166
|
-
a.config.jsonYamlEnabled && e.configCardDoc ? (
|
|
3142
|
+
})) : D("", !0),
|
|
3143
|
+
a.config.jsonYamlEnabled && e.configCardDoc ? (h(), P(H, {
|
|
3167
3144
|
key: 2,
|
|
3168
3145
|
appearance: "tertiary",
|
|
3169
3146
|
class: "book-icon",
|
|
3170
3147
|
"data-testid": "book-icon"
|
|
3171
3148
|
}, {
|
|
3172
|
-
default:
|
|
3149
|
+
default: y(() => [
|
|
3173
3150
|
F("a", {
|
|
3174
3151
|
href: e.configCardDoc,
|
|
3175
3152
|
rel: "noopener",
|
|
3176
3153
|
target: "_blank"
|
|
3177
3154
|
}, [
|
|
3178
|
-
|
|
3179
|
-
], 8,
|
|
3155
|
+
C(m(dn), { size: m(vr) }, null, 8, ["size"])
|
|
3156
|
+
], 8, mn)
|
|
3180
3157
|
]),
|
|
3181
3158
|
_: 1
|
|
3182
|
-
})) :
|
|
3183
|
-
e.config.jsonYamlEnabled ?
|
|
3184
|
-
default:
|
|
3185
|
-
!
|
|
3159
|
+
})) : D("", !0),
|
|
3160
|
+
e.config.jsonYamlEnabled ? D("", !0) : (h(), P(R, { key: 3 }, {
|
|
3161
|
+
default: y(({ copyToClipboard: Y }) => [
|
|
3162
|
+
!b.value && !S.value ? (h(), P(H, {
|
|
3186
3163
|
key: 0,
|
|
3187
3164
|
appearance: "tertiary",
|
|
3188
3165
|
"data-testid": "json-copy-button",
|
|
3189
3166
|
onClick: (X) => W(Y)
|
|
3190
3167
|
}, {
|
|
3191
|
-
default:
|
|
3192
|
-
J(V(
|
|
3168
|
+
default: y(() => [
|
|
3169
|
+
J(V(m(o)("baseConfigCard.actions.copy")), 1)
|
|
3193
3170
|
]),
|
|
3194
3171
|
_: 2
|
|
3195
|
-
}, 1032, ["onClick"])) :
|
|
3172
|
+
}, 1032, ["onClick"])) : D("", !0)
|
|
3196
3173
|
]),
|
|
3197
3174
|
_: 1
|
|
3198
3175
|
}))
|
|
3199
3176
|
])
|
|
3200
3177
|
]),
|
|
3201
|
-
default:
|
|
3202
|
-
|
|
3178
|
+
default: y(() => [
|
|
3179
|
+
b.value ? (h(), P(Q, {
|
|
3203
3180
|
key: 0,
|
|
3204
3181
|
"data-testid": "config-card-loader",
|
|
3205
3182
|
"table-columns": 2,
|
|
3206
3183
|
type: "table"
|
|
3207
|
-
})) : S.value ? (
|
|
3184
|
+
})) : S.value ? (h(), P(z, {
|
|
3208
3185
|
key: 1,
|
|
3209
3186
|
"data-testid": "config-card-fetch-error",
|
|
3210
3187
|
"is-error": ""
|
|
3211
3188
|
}, {
|
|
3212
|
-
message:
|
|
3213
|
-
F("h3", null, V(
|
|
3189
|
+
message: y(() => [
|
|
3190
|
+
F("h3", null, V(k.value), 1)
|
|
3214
3191
|
]),
|
|
3215
3192
|
_: 1
|
|
3216
|
-
})) :
|
|
3217
|
-
e.config.jsonYamlEnabled ? (
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
format: m.value,
|
|
3193
|
+
})) : D("", !0),
|
|
3194
|
+
e.config.jsonYamlEnabled ? (h(), M("div", gn, [
|
|
3195
|
+
C(rn, {
|
|
3196
|
+
format: f.value,
|
|
3221
3197
|
"prop-list-types": x.value,
|
|
3222
|
-
"property-collections":
|
|
3223
|
-
record:
|
|
3224
|
-
},
|
|
3198
|
+
"property-collections": E.value,
|
|
3199
|
+
record: v.value
|
|
3200
|
+
}, xe({ _: 2 }, [
|
|
3225
3201
|
ge(Object.keys(A.$slots), (Y) => ({
|
|
3226
3202
|
name: Y,
|
|
3227
|
-
fn:
|
|
3203
|
+
fn: y(({ row: X, rowValue: ce }) => [
|
|
3228
3204
|
Z(A.$slots, Y, {
|
|
3229
3205
|
row: X,
|
|
3230
3206
|
rowValue: ce
|
|
3231
3207
|
}, void 0, !0)
|
|
3232
3208
|
])
|
|
3233
3209
|
}))
|
|
3234
|
-
]), 1032, ["
|
|
3235
|
-
])) : (
|
|
3236
|
-
(
|
|
3210
|
+
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
3211
|
+
])) : (h(), M("div", yn, [
|
|
3212
|
+
(h(!0), M(ye, null, ge(x.value, (Y) => (h(), M("div", {
|
|
3237
3213
|
key: `config-card-details-${Y}-props`,
|
|
3238
|
-
class:
|
|
3214
|
+
class: $e(`config-card-details-${Y}-props`),
|
|
3239
3215
|
"data-testid": `config-card-details-${Y}-props`
|
|
3240
3216
|
}, [
|
|
3241
|
-
Y !== "basic" ? (
|
|
3242
|
-
(
|
|
3217
|
+
Y !== "basic" ? (h(), M("div", hn, V(Y === "advanced" ? m(o)("baseConfigCard.sections.advanced") : m(o)("baseConfigCard.sections.plugin")), 1)) : D("", !0),
|
|
3218
|
+
(h(!0), M(ye, null, ge(E.value[Y], (X) => (h(), P(kt, {
|
|
3243
3219
|
key: X.key,
|
|
3244
3220
|
item: X
|
|
3245
|
-
},
|
|
3246
|
-
label:
|
|
3221
|
+
}, xe({
|
|
3222
|
+
label: y(() => [
|
|
3247
3223
|
Z(A.$slots, `${X.key}-label`, { row: X }, void 0, !0)
|
|
3248
3224
|
]),
|
|
3249
|
-
[X.key]:
|
|
3225
|
+
[X.key]: y(({ rowValue: ce }) => [
|
|
3250
3226
|
Z(A.$slots, X.key, {
|
|
3251
3227
|
row: X,
|
|
3252
3228
|
rowValue: ce
|
|
@@ -3256,23 +3232,23 @@ const Zl = {
|
|
|
3256
3232
|
}, [
|
|
3257
3233
|
B(X) ? {
|
|
3258
3234
|
name: "label-tooltip",
|
|
3259
|
-
fn:
|
|
3235
|
+
fn: y(() => [
|
|
3260
3236
|
Z(A.$slots, `${X.key}-label-tooltip`, { row: X }, void 0, !0)
|
|
3261
3237
|
]),
|
|
3262
3238
|
key: "0"
|
|
3263
3239
|
} : void 0
|
|
3264
3240
|
]), 1032, ["item"]))), 128))
|
|
3265
|
-
], 10,
|
|
3241
|
+
], 10, vn))), 128))
|
|
3266
3242
|
]))
|
|
3267
3243
|
]),
|
|
3268
3244
|
_: 2
|
|
3269
3245
|
}, [
|
|
3270
3246
|
e.hideTitle ? void 0 : {
|
|
3271
3247
|
name: "title",
|
|
3272
|
-
fn:
|
|
3273
|
-
F("div",
|
|
3248
|
+
fn: y(() => [
|
|
3249
|
+
F("div", pn, [
|
|
3274
3250
|
Z(A.$slots, "title", {}, () => [
|
|
3275
|
-
J(V(
|
|
3251
|
+
J(V(m(o)("baseConfigCard.title")), 1)
|
|
3276
3252
|
], !0)
|
|
3277
3253
|
])
|
|
3278
3254
|
]),
|
|
@@ -3281,10 +3257,10 @@ const Zl = {
|
|
|
3281
3257
|
]), 1024);
|
|
3282
3258
|
};
|
|
3283
3259
|
}
|
|
3284
|
-
}),
|
|
3260
|
+
}), wn = /* @__PURE__ */ ve(bn, [["__scopeId", "data-v-bea4df63"]]), _n = ["onReset", "onSubmit"], kn = {
|
|
3285
3261
|
class: "form-actions",
|
|
3286
3262
|
"data-testid": "form-actions"
|
|
3287
|
-
},
|
|
3263
|
+
}, Cn = /* @__PURE__ */ ae({
|
|
3288
3264
|
__name: "EntityBaseForm",
|
|
3289
3265
|
props: {
|
|
3290
3266
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3334,102 +3310,102 @@ const Zl = {
|
|
|
3334
3310
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3335
3311
|
setup(e, { emit: i }) {
|
|
3336
3312
|
var t;
|
|
3337
|
-
const a = e, r = ht(), { i18n: { t: o } } = ne.useI18n(), { getMessageFromError:
|
|
3313
|
+
const a = e, r = ht(), { i18n: { t: o } } = ne.useI18n(), { getMessageFromError: n } = ne.useErrors(), { axiosInstance: l } = ne.useAxios({
|
|
3338
3314
|
headers: (t = a.config) == null ? void 0 : t.requestHeaders
|
|
3339
|
-
}),
|
|
3340
|
-
var
|
|
3315
|
+
}), u = N(!1), d = N(!1), f = N(""), p = T(() => a.canSubmit === !1 || a.isReadonly), w = T(() => {
|
|
3316
|
+
var v, $;
|
|
3341
3317
|
if (!a.editId)
|
|
3342
3318
|
return "";
|
|
3343
3319
|
let s = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3344
|
-
return a.config.app === "konnect" ? s = s.replace(/{controlPlaneId}/gi, ((
|
|
3345
|
-
}),
|
|
3320
|
+
return a.config.app === "konnect" ? s = s.replace(/{controlPlaneId}/gi, ((v = a.config) == null ? void 0 : v.controlPlaneId) || "") : a.config.app === "kongManager" && (s = s.replace(/\/{workspace}/gi, ($ = a.config) != null && $.workspace ? `/${a.config.workspace}` : "")), s = s.replace(/{id}/gi, a.editId), s;
|
|
3321
|
+
}), b = () => {
|
|
3346
3322
|
a.config.cancelRoute ? r.push(a.config.cancelRoute) : S();
|
|
3347
3323
|
}, S = () => {
|
|
3348
3324
|
i("cancel");
|
|
3349
|
-
},
|
|
3325
|
+
}, k = () => {
|
|
3350
3326
|
p.value || i("submit");
|
|
3351
3327
|
};
|
|
3352
|
-
return be(() =>
|
|
3353
|
-
i("loading",
|
|
3328
|
+
return be(() => u.value, (v) => {
|
|
3329
|
+
i("loading", v);
|
|
3354
3330
|
}, { immediate: !0 }), vt(async () => {
|
|
3355
3331
|
if (a.editId)
|
|
3356
3332
|
try {
|
|
3357
|
-
d.value = !1,
|
|
3358
|
-
const { data:
|
|
3359
|
-
i("fetch:success",
|
|
3360
|
-
} catch (
|
|
3361
|
-
const
|
|
3362
|
-
|
|
3333
|
+
d.value = !1, u.value = !0;
|
|
3334
|
+
const { data: v } = await l.get(w.value);
|
|
3335
|
+
i("fetch:success", v);
|
|
3336
|
+
} catch (v) {
|
|
3337
|
+
const $ = n(v);
|
|
3338
|
+
f.value = $.startsWith("code") ? o("baseForm.errors.edit") : $, d.value = !0, i("fetch:error", v);
|
|
3363
3339
|
} finally {
|
|
3364
|
-
|
|
3340
|
+
u.value = !1;
|
|
3365
3341
|
}
|
|
3366
|
-
}), (
|
|
3367
|
-
const s = L("KSkeleton"),
|
|
3368
|
-
return
|
|
3369
|
-
default:
|
|
3370
|
-
|
|
3342
|
+
}), (v, $) => {
|
|
3343
|
+
const s = L("KSkeleton"), E = L("KEmptyState"), x = L("KAlert"), B = L("KButton"), re = L("KCard");
|
|
3344
|
+
return h(), P(re, { class: "kong-ui-entity-base-form" }, {
|
|
3345
|
+
default: y(() => [
|
|
3346
|
+
u.value ? (h(), P(s, {
|
|
3371
3347
|
key: 0,
|
|
3372
3348
|
type: "form"
|
|
3373
|
-
})) : d.value ? (
|
|
3349
|
+
})) : d.value ? (h(), P(E, {
|
|
3374
3350
|
key: 1,
|
|
3375
|
-
"cta-text":
|
|
3351
|
+
"cta-text": m(o)("baseForm.actions.back"),
|
|
3376
3352
|
"data-testid": "form-fetch-error",
|
|
3377
|
-
"handle-click":
|
|
3353
|
+
"handle-click": b,
|
|
3378
3354
|
"is-error": !0
|
|
3379
3355
|
}, {
|
|
3380
|
-
message:
|
|
3381
|
-
F("h3", null, V(
|
|
3356
|
+
message: y(() => [
|
|
3357
|
+
F("h3", null, V(f.value), 1)
|
|
3382
3358
|
]),
|
|
3383
3359
|
_: 1
|
|
3384
|
-
}, 8, ["cta-text"])) : (
|
|
3360
|
+
}, 8, ["cta-text"])) : (h(), M("form", {
|
|
3385
3361
|
key: 2,
|
|
3386
3362
|
"data-testid": "form-content",
|
|
3387
3363
|
onReset: Fe(S, ["prevent"]),
|
|
3388
|
-
onSubmit: Fe(
|
|
3364
|
+
onSubmit: Fe(k, ["prevent"])
|
|
3389
3365
|
}, [
|
|
3390
|
-
Z(
|
|
3391
|
-
e.errorMessage ? (
|
|
3366
|
+
Z(v.$slots, "default", {}, void 0, !0),
|
|
3367
|
+
e.errorMessage ? (h(), P(x, {
|
|
3392
3368
|
key: 0,
|
|
3393
3369
|
"alert-message": e.errorMessage,
|
|
3394
3370
|
appearance: "danger",
|
|
3395
3371
|
"data-testid": "form-error"
|
|
3396
|
-
}, null, 8, ["alert-message"])) :
|
|
3397
|
-
F("div",
|
|
3398
|
-
Z(
|
|
3399
|
-
|
|
3372
|
+
}, null, 8, ["alert-message"])) : D("", !0),
|
|
3373
|
+
F("div", kn, [
|
|
3374
|
+
Z(v.$slots, "form-actions", {}, () => [
|
|
3375
|
+
C(B, {
|
|
3400
3376
|
appearance: "secondary",
|
|
3401
3377
|
"data-testid": "form-cancel",
|
|
3402
3378
|
disabled: e.isReadonly,
|
|
3403
3379
|
type: "reset"
|
|
3404
3380
|
}, {
|
|
3405
|
-
default:
|
|
3406
|
-
J(V(
|
|
3381
|
+
default: y(() => [
|
|
3382
|
+
J(V(m(o)("baseForm.actions.cancel")), 1)
|
|
3407
3383
|
]),
|
|
3408
3384
|
_: 1
|
|
3409
3385
|
}, 8, ["disabled"]),
|
|
3410
|
-
|
|
3386
|
+
C(B, {
|
|
3411
3387
|
appearance: "primary",
|
|
3412
3388
|
"data-testid": "form-submit",
|
|
3413
3389
|
disabled: p.value,
|
|
3414
3390
|
type: "submit"
|
|
3415
3391
|
}, {
|
|
3416
|
-
default:
|
|
3417
|
-
J(V(
|
|
3392
|
+
default: y(() => [
|
|
3393
|
+
J(V(m(o)("baseForm.actions.save")), 1)
|
|
3418
3394
|
]),
|
|
3419
3395
|
_: 1
|
|
3420
3396
|
}, 8, ["disabled"])
|
|
3421
3397
|
], !0)
|
|
3422
3398
|
])
|
|
3423
|
-
], 40,
|
|
3399
|
+
], 40, _n))
|
|
3424
3400
|
]),
|
|
3425
3401
|
_: 3
|
|
3426
3402
|
});
|
|
3427
3403
|
};
|
|
3428
3404
|
}
|
|
3429
|
-
}),
|
|
3405
|
+
}), Sn = /* @__PURE__ */ ve(Cn, [["__scopeId", "data-v-448d8512"]]), In = {
|
|
3430
3406
|
key: 0,
|
|
3431
3407
|
"data-testid": "first-col"
|
|
3432
|
-
},
|
|
3408
|
+
}, An = /* @__PURE__ */ ae({
|
|
3433
3409
|
__name: "EntityBaseTableCell",
|
|
3434
3410
|
props: {
|
|
3435
3411
|
keyName: {
|
|
@@ -3443,67 +3419,67 @@ const Zl = {
|
|
|
3443
3419
|
},
|
|
3444
3420
|
setup(e) {
|
|
3445
3421
|
const i = e, t = T(() => {
|
|
3446
|
-
var
|
|
3447
|
-
return ((
|
|
3422
|
+
var k;
|
|
3423
|
+
return ((k = i.rowEl) == null ? void 0 : k.querySelector(`[data-testid="${i.keyName}"]`)) || null;
|
|
3448
3424
|
}), a = T(() => {
|
|
3449
|
-
var
|
|
3450
|
-
return ((
|
|
3425
|
+
var k;
|
|
3426
|
+
return ((k = t.value) == null ? void 0 : k.querySelector('[data-testid="first-col"]')) || null;
|
|
3451
3427
|
}), r = T(() => {
|
|
3452
|
-
var
|
|
3453
|
-
const
|
|
3454
|
-
return
|
|
3428
|
+
var k, v;
|
|
3429
|
+
const $ = (k = i.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3430
|
+
return $ ? ((v = $[0]) == null ? void 0 : v.getAttribute("data-testid")) === i.keyName : !1;
|
|
3455
3431
|
});
|
|
3456
3432
|
let o;
|
|
3457
|
-
const
|
|
3433
|
+
const n = () => {
|
|
3458
3434
|
o && (o.disconnect(), o = void 0);
|
|
3459
|
-
},
|
|
3460
|
-
var
|
|
3461
|
-
d.value = ((
|
|
3462
|
-
},
|
|
3435
|
+
}, l = () => {
|
|
3436
|
+
var k, v, $;
|
|
3437
|
+
d.value = ((k = a.value) == null ? void 0 : k.getBoundingClientRect().width) || 0, f.value = ((v = t.value) == null ? void 0 : v.clientWidth) || 0, p.value = (($ = u.value) == null ? void 0 : $.innerText) || "";
|
|
3438
|
+
}, u = N({}), d = N(0), f = N(0), p = N(""), w = T(() => [a.value, t.value]), b = be(
|
|
3463
3439
|
w,
|
|
3464
|
-
(
|
|
3465
|
-
if (r.value && (
|
|
3466
|
-
o = new ResizeObserver((
|
|
3440
|
+
(k) => {
|
|
3441
|
+
if (r.value && (n(), "ResizeObserver" in window && window)) {
|
|
3442
|
+
o = new ResizeObserver((v) => {
|
|
3467
3443
|
window.requestAnimationFrame(() => {
|
|
3468
|
-
!Array.isArray(
|
|
3444
|
+
!Array.isArray(v) || !v.length || l();
|
|
3469
3445
|
});
|
|
3470
3446
|
});
|
|
3471
|
-
for (const
|
|
3472
|
-
|
|
3447
|
+
for (const v of k)
|
|
3448
|
+
v && o.observe(v);
|
|
3473
3449
|
}
|
|
3474
3450
|
},
|
|
3475
3451
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3476
|
-
), S = T(() => r.value ? d.value >
|
|
3452
|
+
), S = T(() => r.value ? d.value > f.value : !1);
|
|
3477
3453
|
return ai(() => {
|
|
3478
|
-
|
|
3454
|
+
l();
|
|
3479
3455
|
}), na(() => {
|
|
3480
|
-
|
|
3481
|
-
}), (
|
|
3482
|
-
const
|
|
3483
|
-
return
|
|
3456
|
+
b();
|
|
3457
|
+
}), (k, v) => {
|
|
3458
|
+
const $ = L("KTooltip");
|
|
3459
|
+
return h(), M("span", {
|
|
3484
3460
|
ref_key: "contentRef",
|
|
3485
|
-
ref:
|
|
3461
|
+
ref: u,
|
|
3486
3462
|
class: "content-wrapper"
|
|
3487
3463
|
}, [
|
|
3488
|
-
r.value ? (
|
|
3489
|
-
|
|
3464
|
+
r.value ? (h(), M("span", In, [
|
|
3465
|
+
C($, {
|
|
3490
3466
|
label: S.value ? p.value : "",
|
|
3491
3467
|
"max-width": "300",
|
|
3492
3468
|
placement: "bottomStart"
|
|
3493
3469
|
}, {
|
|
3494
|
-
default:
|
|
3495
|
-
Z(
|
|
3470
|
+
default: y(() => [
|
|
3471
|
+
Z(k.$slots, "default", {}, void 0, !0)
|
|
3496
3472
|
]),
|
|
3497
3473
|
_: 3
|
|
3498
3474
|
}, 8, ["label"])
|
|
3499
|
-
])) : Z(
|
|
3475
|
+
])) : Z(k.$slots, "default", { key: 1 }, void 0, !0)
|
|
3500
3476
|
], 512);
|
|
3501
3477
|
};
|
|
3502
3478
|
}
|
|
3503
|
-
}),
|
|
3479
|
+
}), xn = /* @__PURE__ */ ve(An, [["__scopeId", "data-v-e42a20c9"]]), Tn = { class: "toolbar-container" }, $n = {
|
|
3504
3480
|
key: 0,
|
|
3505
3481
|
class: "toolbar-button-container"
|
|
3506
|
-
},
|
|
3482
|
+
}, Mn = ["data-testid"], jn = /* @__PURE__ */ ae({
|
|
3507
3483
|
__name: "EntityBaseTable",
|
|
3508
3484
|
props: {
|
|
3509
3485
|
// table header configuration
|
|
@@ -3624,7 +3600,7 @@ const Zl = {
|
|
|
3624
3600
|
title: (x = t.errorMessage) == null ? void 0 : x.title,
|
|
3625
3601
|
message: (B = t.errorMessage) == null ? void 0 : B.message
|
|
3626
3602
|
};
|
|
3627
|
-
}), o = T(() => t.cacheIdentifier || t.preferencesStorageKey),
|
|
3603
|
+
}), o = T(() => t.cacheIdentifier || t.preferencesStorageKey), n = (x) => x.hasData || !!t.query, l = T(() => {
|
|
3628
3604
|
const x = [];
|
|
3629
3605
|
return Object.keys(t.tableHeaders).forEach((B) => {
|
|
3630
3606
|
const re = t.tableHeaders[B];
|
|
@@ -3637,11 +3613,11 @@ const Zl = {
|
|
|
3637
3613
|
key: "actions",
|
|
3638
3614
|
hideLabel: !0
|
|
3639
3615
|
}), x;
|
|
3640
|
-
}),
|
|
3616
|
+
}), u = (x) => ({
|
|
3641
3617
|
"data-rowid": x.id,
|
|
3642
3618
|
"data-testid": x.name,
|
|
3643
3619
|
...t.rowAttributes(x)
|
|
3644
|
-
}), d = N({}),
|
|
3620
|
+
}), d = N({}), f = (x) => {
|
|
3645
3621
|
var B;
|
|
3646
3622
|
return (B = d.value) == null ? void 0 : B.$el.querySelector(`[data-rowid="${x.id}"]`);
|
|
3647
3623
|
}, p = (x) => {
|
|
@@ -3655,30 +3631,30 @@ const Zl = {
|
|
|
3655
3631
|
textOverflow: "ellipsis"
|
|
3656
3632
|
}), B;
|
|
3657
3633
|
}, w = () => {
|
|
3658
|
-
i("empty-state-cta-clicked"),
|
|
3659
|
-
},
|
|
3634
|
+
i("empty-state-cta-clicked"), b();
|
|
3635
|
+
}, b = () => {
|
|
3660
3636
|
i("clear-search-input");
|
|
3661
3637
|
}, S = T(() => t.disableRowClick ? void 0 : (x, B) => {
|
|
3662
3638
|
i("click:row", B);
|
|
3663
|
-
}),
|
|
3639
|
+
}), k = (x) => {
|
|
3664
3640
|
i("sort", x);
|
|
3665
|
-
}, { setTablePreferences:
|
|
3666
|
-
const x =
|
|
3641
|
+
}, { setTablePreferences: v, getTablePreferences: $ } = ka(), s = T(() => {
|
|
3642
|
+
const x = $(t.preferencesStorageKey);
|
|
3667
3643
|
return {
|
|
3668
3644
|
...t.initialFetcherParams,
|
|
3669
3645
|
...x
|
|
3670
3646
|
};
|
|
3671
|
-
}),
|
|
3672
|
-
t.preferencesStorageKey &&
|
|
3647
|
+
}), E = (x) => {
|
|
3648
|
+
t.preferencesStorageKey && v(t.preferencesStorageKey, x);
|
|
3673
3649
|
};
|
|
3674
3650
|
return (x, B) => {
|
|
3675
3651
|
const re = L("KIcon"), W = L("KButton"), A = L("KDropdown"), q = L("KTable"), U = L("KCard");
|
|
3676
|
-
return
|
|
3652
|
+
return h(), P(U, {
|
|
3677
3653
|
class: "kong-ui-entity-base-table",
|
|
3678
3654
|
title: e.title
|
|
3679
3655
|
}, {
|
|
3680
|
-
default:
|
|
3681
|
-
|
|
3656
|
+
default: y(() => [
|
|
3657
|
+
C(q, {
|
|
3682
3658
|
ref_key: "tableRefs",
|
|
3683
3659
|
ref: d,
|
|
3684
3660
|
"cache-identifier": o.value,
|
|
@@ -3686,65 +3662,65 @@ const Zl = {
|
|
|
3686
3662
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3687
3663
|
"disable-sorting": e.disableSorting,
|
|
3688
3664
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
3689
|
-
"empty-state-action-message": e.query ?
|
|
3665
|
+
"empty-state-action-message": e.query ? m(a)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3690
3666
|
"empty-state-action-route": e.query ? "" : e.emptyStateOptions.ctaPath,
|
|
3691
3667
|
"empty-state-icon": e.query ? "stateNoSearchResults" : "stateGruceo",
|
|
3692
3668
|
"empty-state-icon-size": "96",
|
|
3693
|
-
"empty-state-message": e.query ?
|
|
3694
|
-
"empty-state-title": e.query ?
|
|
3669
|
+
"empty-state-message": e.query ? m(a)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3670
|
+
"empty-state-title": e.query ? m(a)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3695
3671
|
"enable-client-sort": e.enableClientSort,
|
|
3696
3672
|
"error-state-message": r.value.message,
|
|
3697
3673
|
"error-state-title": r.value.title,
|
|
3698
3674
|
fetcher: e.fetcher,
|
|
3699
3675
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3700
3676
|
"has-error": r.value.hasError,
|
|
3701
|
-
headers:
|
|
3677
|
+
headers: l.value,
|
|
3702
3678
|
"hide-pagination-when-optional": "",
|
|
3703
3679
|
"initial-fetcher-params": s.value,
|
|
3704
3680
|
"is-loading": e.isLoading,
|
|
3705
3681
|
"pagination-type": e.paginationType,
|
|
3706
|
-
"row-attrs":
|
|
3682
|
+
"row-attrs": u,
|
|
3707
3683
|
"search-input": e.query,
|
|
3708
3684
|
onKtableEmptyStateCtaClicked: w,
|
|
3709
3685
|
"onRow:click": S.value,
|
|
3710
|
-
onSort: B[0] || (B[0] = (K) =>
|
|
3711
|
-
"onUpdate:tablePreferences":
|
|
3712
|
-
},
|
|
3713
|
-
toolbar:
|
|
3714
|
-
Ue(F("div",
|
|
3686
|
+
onSort: B[0] || (B[0] = (K) => k(K)),
|
|
3687
|
+
"onUpdate:tablePreferences": E
|
|
3688
|
+
}, xe({
|
|
3689
|
+
toolbar: y(({ state: K }) => [
|
|
3690
|
+
Ue(F("div", Tn, [
|
|
3715
3691
|
Z(x.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3716
|
-
x.$slots["toolbar-button"] ? (
|
|
3692
|
+
x.$slots["toolbar-button"] ? (h(), M("div", $n, [
|
|
3717
3693
|
Z(x.$slots, "toolbar-button", {}, void 0, !0)
|
|
3718
|
-
])) :
|
|
3694
|
+
])) : D("", !0)
|
|
3719
3695
|
], 512), [
|
|
3720
|
-
[Re,
|
|
3696
|
+
[Re, n(K)]
|
|
3721
3697
|
])
|
|
3722
3698
|
]),
|
|
3723
|
-
actions:
|
|
3699
|
+
actions: y(({ row: K, rowKey: H, rowValue: R }) => [
|
|
3724
3700
|
F("div", {
|
|
3725
3701
|
class: "actions-container",
|
|
3726
3702
|
"data-testid": K.name
|
|
3727
3703
|
}, [
|
|
3728
|
-
|
|
3704
|
+
C(A, {
|
|
3729
3705
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3730
3706
|
width: e.dropdownMenuWidth
|
|
3731
3707
|
}, {
|
|
3732
|
-
items:
|
|
3708
|
+
items: y(() => [
|
|
3733
3709
|
Z(x.$slots, "actions", {
|
|
3734
3710
|
row: K,
|
|
3735
3711
|
rowKey: H,
|
|
3736
|
-
rowValue:
|
|
3712
|
+
rowValue: R
|
|
3737
3713
|
}, void 0, !0)
|
|
3738
3714
|
]),
|
|
3739
|
-
default:
|
|
3740
|
-
|
|
3715
|
+
default: y(() => [
|
|
3716
|
+
C(W, {
|
|
3741
3717
|
class: "actions-trigger",
|
|
3742
3718
|
"data-testid": "overflow-actions-button",
|
|
3743
3719
|
size: "small"
|
|
3744
3720
|
}, {
|
|
3745
|
-
icon:
|
|
3746
|
-
|
|
3747
|
-
color:
|
|
3721
|
+
icon: y(() => [
|
|
3722
|
+
C(re, {
|
|
3723
|
+
color: m(gr),
|
|
3748
3724
|
icon: "more",
|
|
3749
3725
|
size: "16"
|
|
3750
3726
|
}, null, 8, ["color"])
|
|
@@ -3754,20 +3730,20 @@ const Zl = {
|
|
|
3754
3730
|
]),
|
|
3755
3731
|
_: 2
|
|
3756
3732
|
}, 1032, ["width"])
|
|
3757
|
-
], 8,
|
|
3733
|
+
], 8, Mn)
|
|
3758
3734
|
]),
|
|
3759
3735
|
_: 2
|
|
3760
3736
|
}, [
|
|
3761
3737
|
ge(e.tableHeaders, (K, H) => ({
|
|
3762
3738
|
name: H,
|
|
3763
|
-
fn:
|
|
3764
|
-
|
|
3739
|
+
fn: y(({ row: R, rowKey: Q, rowValue: z }) => [
|
|
3740
|
+
C(xn, {
|
|
3765
3741
|
"key-name": String(H),
|
|
3766
|
-
"row-el":
|
|
3742
|
+
"row-el": f(R)
|
|
3767
3743
|
}, {
|
|
3768
|
-
default:
|
|
3744
|
+
default: y(() => [
|
|
3769
3745
|
Z(x.$slots, H, {
|
|
3770
|
-
row:
|
|
3746
|
+
row: R,
|
|
3771
3747
|
rowKey: Q,
|
|
3772
3748
|
rowValue: z
|
|
3773
3749
|
}, () => [
|
|
@@ -3784,13 +3760,13 @@ const Zl = {
|
|
|
3784
3760
|
}, 8, ["title"]);
|
|
3785
3761
|
};
|
|
3786
3762
|
}
|
|
3787
|
-
}),
|
|
3763
|
+
}), En = /* @__PURE__ */ ve(jn, [["__scopeId", "data-v-57b5a97b"]]), On = {
|
|
3788
3764
|
key: 0,
|
|
3789
3765
|
class: "kong-ui-entity-delete-error"
|
|
3790
|
-
},
|
|
3766
|
+
}, Vn = {
|
|
3791
3767
|
key: 1,
|
|
3792
3768
|
class: "description"
|
|
3793
|
-
},
|
|
3769
|
+
}, Fn = /* @__PURE__ */ ae({
|
|
3794
3770
|
__name: "EntityDeleteModal",
|
|
3795
3771
|
props: {
|
|
3796
3772
|
visible: {
|
|
@@ -3831,12 +3807,12 @@ const Zl = {
|
|
|
3831
3807
|
setup(e, { emit: i }) {
|
|
3832
3808
|
const t = e, { i18nT: a } = ne.useI18n(), r = T(() => t.needConfirm ? t.entityName : ""), o = () => {
|
|
3833
3809
|
i("cancel");
|
|
3834
|
-
},
|
|
3810
|
+
}, n = () => {
|
|
3835
3811
|
i("proceed");
|
|
3836
3812
|
};
|
|
3837
|
-
return (
|
|
3838
|
-
const d = L("KAlert"),
|
|
3839
|
-
return
|
|
3813
|
+
return (l, u) => {
|
|
3814
|
+
const d = L("KAlert"), f = L("KPrompt");
|
|
3815
|
+
return h(), P(f, {
|
|
3840
3816
|
"action-button-text": "Yes, delete",
|
|
3841
3817
|
"action-pending": e.actionPending,
|
|
3842
3818
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3845,52 +3821,52 @@ const Zl = {
|
|
|
3845
3821
|
title: e.title,
|
|
3846
3822
|
type: "danger",
|
|
3847
3823
|
onCanceled: o,
|
|
3848
|
-
onProceed:
|
|
3824
|
+
onProceed: n
|
|
3849
3825
|
}, {
|
|
3850
|
-
"body-content":
|
|
3851
|
-
e.error ? (
|
|
3852
|
-
|
|
3853
|
-
alertMessage:
|
|
3826
|
+
"body-content": y(() => [
|
|
3827
|
+
e.error ? (h(), M("div", On, [
|
|
3828
|
+
C(d, { appearance: "danger" }, {
|
|
3829
|
+
alertMessage: y(() => [
|
|
3854
3830
|
J(V(e.error), 1)
|
|
3855
3831
|
]),
|
|
3856
3832
|
_: 1
|
|
3857
3833
|
})
|
|
3858
|
-
])) :
|
|
3859
|
-
|
|
3834
|
+
])) : D("", !0),
|
|
3835
|
+
C(m(a), {
|
|
3860
3836
|
class: "message",
|
|
3861
3837
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3862
3838
|
tag: "p"
|
|
3863
|
-
},
|
|
3864
|
-
entityType:
|
|
3839
|
+
}, xe({
|
|
3840
|
+
entityType: y(() => [
|
|
3865
3841
|
J(V(t.entityType), 1)
|
|
3866
3842
|
]),
|
|
3867
3843
|
_: 2
|
|
3868
3844
|
}, [
|
|
3869
3845
|
t.entityName ? {
|
|
3870
3846
|
name: "entityName",
|
|
3871
|
-
fn:
|
|
3847
|
+
fn: y(() => [
|
|
3872
3848
|
F("strong", null, V(t.entityName), 1)
|
|
3873
3849
|
]),
|
|
3874
3850
|
key: "0"
|
|
3875
3851
|
} : void 0
|
|
3876
3852
|
]), 1032, ["keypath"]),
|
|
3877
|
-
t.description ||
|
|
3878
|
-
Z(
|
|
3853
|
+
t.description || l.$slots.description ? (h(), M("div", Vn, [
|
|
3854
|
+
Z(l.$slots, "description", {}, () => [
|
|
3879
3855
|
F("p", null, V(t.description), 1)
|
|
3880
3856
|
], !0)
|
|
3881
|
-
])) :
|
|
3857
|
+
])) : D("", !0)
|
|
3882
3858
|
]),
|
|
3883
3859
|
_: 3
|
|
3884
3860
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3885
3861
|
};
|
|
3886
3862
|
}
|
|
3887
|
-
}),
|
|
3863
|
+
}), Nn = /* @__PURE__ */ ve(Fn, [["__scopeId", "data-v-1c9a2a07"]]), Kn = {
|
|
3888
3864
|
fill: "none",
|
|
3889
3865
|
height: "20",
|
|
3890
3866
|
viewBox: "0 0 20 20",
|
|
3891
3867
|
width: "20",
|
|
3892
3868
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3893
|
-
},
|
|
3869
|
+
}, Ln = {
|
|
3894
3870
|
id: "mask0_180_20349",
|
|
3895
3871
|
height: "20",
|
|
3896
3872
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3898,7 +3874,7 @@ const Zl = {
|
|
|
3898
3874
|
width: "20",
|
|
3899
3875
|
x: "0",
|
|
3900
3876
|
y: "0"
|
|
3901
|
-
},
|
|
3877
|
+
}, qn = ["fill"], Bn = { mask: "url(#mask0_180_20349)" }, Pn = ["fill"], ei = /* @__PURE__ */ ae({
|
|
3902
3878
|
__name: "IconFilter",
|
|
3903
3879
|
props: {
|
|
3904
3880
|
color: {
|
|
@@ -3907,26 +3883,26 @@ const Zl = {
|
|
|
3907
3883
|
}
|
|
3908
3884
|
},
|
|
3909
3885
|
setup(e) {
|
|
3910
|
-
return (i, t) => (
|
|
3911
|
-
F("mask",
|
|
3886
|
+
return (i, t) => (h(), M("svg", Kn, [
|
|
3887
|
+
F("mask", Ln, [
|
|
3912
3888
|
F("rect", {
|
|
3913
3889
|
fill: e.color,
|
|
3914
3890
|
height: "20",
|
|
3915
3891
|
width: "20"
|
|
3916
|
-
}, null, 8,
|
|
3892
|
+
}, null, 8, qn)
|
|
3917
3893
|
]),
|
|
3918
|
-
F("g",
|
|
3894
|
+
F("g", Bn, [
|
|
3919
3895
|
F("path", {
|
|
3920
3896
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3921
3897
|
fill: e.color
|
|
3922
|
-
}, null, 8,
|
|
3898
|
+
}, null, 8, Pn)
|
|
3923
3899
|
])
|
|
3924
3900
|
]));
|
|
3925
3901
|
}
|
|
3926
|
-
}),
|
|
3902
|
+
}), Un = {
|
|
3927
3903
|
key: 1,
|
|
3928
3904
|
class: "kong-ui-entity-filter"
|
|
3929
|
-
},
|
|
3905
|
+
}, Rn = { class: "menu-item-title" }, Dn = { class: "menu-item-indicator" }, Hn = { class: "menu-item-body" }, zn = ["for"], Jn = { class: "menu-item-buttons" }, Gn = { class: "filter-clear-button-container" }, Wn = /* @__PURE__ */ ae({
|
|
3930
3906
|
__name: "EntityFilter",
|
|
3931
3907
|
props: {
|
|
3932
3908
|
// filter config, either exact match or fuzzy match
|
|
@@ -3946,50 +3922,50 @@ const Zl = {
|
|
|
3946
3922
|
},
|
|
3947
3923
|
emits: ["update:modelValue"],
|
|
3948
3924
|
setup(e, { emit: i }) {
|
|
3949
|
-
const t = e, { i18n: { t: a } } = ne.useI18n(), r = N(!1), o = N({}),
|
|
3950
|
-
const
|
|
3951
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
3952
|
-
|
|
3953
|
-
}),
|
|
3954
|
-
}),
|
|
3955
|
-
const
|
|
3956
|
-
return Object.keys(
|
|
3957
|
-
label:
|
|
3958
|
-
value:
|
|
3925
|
+
const t = e, { i18n: { t: a } } = ne.useI18n(), r = N(!1), o = N({}), n = T(() => {
|
|
3926
|
+
const v = [];
|
|
3927
|
+
return new URLSearchParams(t.modelValue).forEach(($, s) => {
|
|
3928
|
+
$ !== "" && v.push(s);
|
|
3929
|
+
}), v;
|
|
3930
|
+
}), l = T(() => {
|
|
3931
|
+
const v = t.config.fields;
|
|
3932
|
+
return Object.keys(v).filter(($) => v[$].searchable).map(($) => ({
|
|
3933
|
+
label: v[$].label || $,
|
|
3934
|
+
value: $
|
|
3959
3935
|
}));
|
|
3960
3936
|
});
|
|
3961
|
-
be(() => t.modelValue, (
|
|
3962
|
-
o.value = {}, new URLSearchParams(
|
|
3963
|
-
o.value[s] =
|
|
3937
|
+
be(() => t.modelValue, (v) => {
|
|
3938
|
+
o.value = {}, new URLSearchParams(v).forEach(($, s) => {
|
|
3939
|
+
o.value[s] = $;
|
|
3964
3940
|
});
|
|
3965
3941
|
});
|
|
3966
|
-
const
|
|
3942
|
+
const u = () => {
|
|
3967
3943
|
r.value = !r.value;
|
|
3968
|
-
}, d = (
|
|
3969
|
-
i("update:modelValue",
|
|
3970
|
-
},
|
|
3971
|
-
var
|
|
3972
|
-
return (((s = (
|
|
3973
|
-
value:
|
|
3974
|
-
label:
|
|
3944
|
+
}, d = (v) => {
|
|
3945
|
+
i("update:modelValue", v);
|
|
3946
|
+
}, f = (v) => `filter-${v}`, p = (v) => {
|
|
3947
|
+
var $, s;
|
|
3948
|
+
return (((s = ($ = t.config.schema) == null ? void 0 : $[v]) == null ? void 0 : s.values) ?? []).map((E) => ({
|
|
3949
|
+
value: E,
|
|
3950
|
+
label: E
|
|
3975
3951
|
}));
|
|
3976
|
-
}, w = (
|
|
3977
|
-
var
|
|
3978
|
-
return ((s = (
|
|
3979
|
-
},
|
|
3952
|
+
}, w = (v) => {
|
|
3953
|
+
var $, s;
|
|
3954
|
+
return ((s = ($ = t.config.schema) == null ? void 0 : $[v]) == null ? void 0 : s.type) ?? "text";
|
|
3955
|
+
}, b = (v) => {
|
|
3980
3956
|
o.value = {
|
|
3981
3957
|
...o.value,
|
|
3982
|
-
[
|
|
3983
|
-
},
|
|
3958
|
+
[v]: ""
|
|
3959
|
+
}, k();
|
|
3984
3960
|
}, S = () => {
|
|
3985
|
-
o.value = {},
|
|
3986
|
-
},
|
|
3987
|
-
const
|
|
3988
|
-
|
|
3961
|
+
o.value = {}, k(!0);
|
|
3962
|
+
}, k = (v = !1) => {
|
|
3963
|
+
const $ = Object.keys(o.value).reduce((s, E) => (o.value[E] && (s[E] = `${o.value[E]}`), s), {});
|
|
3964
|
+
v && (r.value = !1), i("update:modelValue", new URLSearchParams($).toString());
|
|
3989
3965
|
};
|
|
3990
|
-
return (
|
|
3991
|
-
const s = L("KInput"),
|
|
3992
|
-
return e.config.isExactMatch ? (
|
|
3966
|
+
return (v, $) => {
|
|
3967
|
+
const s = L("KInput"), E = L("KButton"), x = L("KSelect"), B = L("KMenuItem"), re = L("KMenu");
|
|
3968
|
+
return e.config.isExactMatch ? (h(), P(s, {
|
|
3993
3969
|
key: 0,
|
|
3994
3970
|
autocomplete: "off",
|
|
3995
3971
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3998,90 +3974,90 @@ const Zl = {
|
|
|
3998
3974
|
placeholder: e.config.placeholder,
|
|
3999
3975
|
"onUpdate:modelValue": d
|
|
4000
3976
|
}, {
|
|
4001
|
-
before:
|
|
4002
|
-
|
|
3977
|
+
before: y(() => [
|
|
3978
|
+
C(ei)
|
|
4003
3979
|
]),
|
|
4004
3980
|
_: 1
|
|
4005
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
4006
|
-
|
|
3981
|
+
}, 8, ["model-value", "placeholder"])) : (h(), M("div", Un, [
|
|
3982
|
+
C(E, {
|
|
4007
3983
|
appearance: "tertiary",
|
|
4008
3984
|
"data-testid": "filter-button",
|
|
4009
|
-
onClick:
|
|
3985
|
+
onClick: u
|
|
4010
3986
|
}, {
|
|
4011
|
-
default:
|
|
4012
|
-
|
|
4013
|
-
J(" " + V(
|
|
3987
|
+
default: y(() => [
|
|
3988
|
+
C(ei),
|
|
3989
|
+
J(" " + V(m(a)("filter.filterButtonText")) + " " + V(n.value.length > 0 ? `(${n.value.length})` : ""), 1)
|
|
4014
3990
|
]),
|
|
4015
3991
|
_: 1
|
|
4016
3992
|
}),
|
|
4017
3993
|
Ue(F("div", {
|
|
4018
3994
|
class: "kong-ui-entity-filter-backdrop",
|
|
4019
|
-
onClick:
|
|
3995
|
+
onClick: u
|
|
4020
3996
|
}, null, 512), [
|
|
4021
3997
|
[Re, r.value]
|
|
4022
3998
|
]),
|
|
4023
|
-
Ue(
|
|
4024
|
-
body:
|
|
4025
|
-
(
|
|
3999
|
+
Ue(C(re, { class: "kong-ui-entity-filter-menu" }, {
|
|
4000
|
+
body: y(() => [
|
|
4001
|
+
(h(!0), M(ye, null, ge(l.value, (W, A) => (h(), P(B, {
|
|
4026
4002
|
key: W.value,
|
|
4027
4003
|
"data-testid": W.value,
|
|
4028
4004
|
expandable: "",
|
|
4029
|
-
"last-menu-item": A ===
|
|
4005
|
+
"last-menu-item": A === l.value.length - 1
|
|
4030
4006
|
}, {
|
|
4031
|
-
itemTitle:
|
|
4032
|
-
F("span",
|
|
4007
|
+
itemTitle: y(() => [
|
|
4008
|
+
F("span", Rn, [
|
|
4033
4009
|
J(V(W.label) + " ", 1),
|
|
4034
|
-
Ue(F("span",
|
|
4035
|
-
[Re,
|
|
4010
|
+
Ue(F("span", Dn, null, 512), [
|
|
4011
|
+
[Re, n.value.includes(W.value)]
|
|
4036
4012
|
])
|
|
4037
4013
|
])
|
|
4038
4014
|
]),
|
|
4039
|
-
itemBody:
|
|
4015
|
+
itemBody: y(() => {
|
|
4040
4016
|
var q, U;
|
|
4041
4017
|
return [
|
|
4042
|
-
F("div",
|
|
4018
|
+
F("div", Hn, [
|
|
4043
4019
|
F("label", {
|
|
4044
4020
|
class: "menu-item-label",
|
|
4045
|
-
for:
|
|
4046
|
-
}, V(
|
|
4047
|
-
((U = (q = e.config.schema) == null ? void 0 : q[W.value]) == null ? void 0 : U.type) === "select" ? (
|
|
4021
|
+
for: f(W.value)
|
|
4022
|
+
}, V(m(a)("filter.fieldLabel")), 9, zn),
|
|
4023
|
+
((U = (q = e.config.schema) == null ? void 0 : q[W.value]) == null ? void 0 : U.type) === "select" ? (h(), P(x, {
|
|
4048
4024
|
key: 0,
|
|
4049
|
-
id:
|
|
4025
|
+
id: f(W.value),
|
|
4050
4026
|
modelValue: o.value[W.value],
|
|
4051
4027
|
"onUpdate:modelValue": (K) => o.value[W.value] = K,
|
|
4052
4028
|
appearance: "select",
|
|
4053
4029
|
items: p(W.value),
|
|
4054
|
-
placeholder:
|
|
4055
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
4030
|
+
placeholder: m(a)("filter.selectPlaceholder")
|
|
4031
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (h(), P(s, {
|
|
4056
4032
|
key: 1,
|
|
4057
|
-
id:
|
|
4033
|
+
id: f(W.value),
|
|
4058
4034
|
modelValue: o.value[W.value],
|
|
4059
4035
|
"onUpdate:modelValue": (K) => o.value[W.value] = K,
|
|
4060
4036
|
autocomplete: "off",
|
|
4061
|
-
placeholder:
|
|
4037
|
+
placeholder: m(a)("filter.inputPlaceholder"),
|
|
4062
4038
|
type: w(W.value)
|
|
4063
4039
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4064
4040
|
]),
|
|
4065
|
-
F("div",
|
|
4066
|
-
|
|
4041
|
+
F("div", Jn, [
|
|
4042
|
+
C(E, {
|
|
4067
4043
|
appearance: "tertiary",
|
|
4068
4044
|
"data-testid": "apply-filter",
|
|
4069
4045
|
size: "small",
|
|
4070
|
-
onClick:
|
|
4046
|
+
onClick: $[0] || ($[0] = (K) => k(!0))
|
|
4071
4047
|
}, {
|
|
4072
|
-
default:
|
|
4073
|
-
J(V(
|
|
4048
|
+
default: y(() => [
|
|
4049
|
+
J(V(m(a)("filter.applyButtonText")), 1)
|
|
4074
4050
|
]),
|
|
4075
4051
|
_: 1
|
|
4076
4052
|
}),
|
|
4077
|
-
|
|
4053
|
+
C(E, {
|
|
4078
4054
|
appearance: "tertiary",
|
|
4079
4055
|
"data-testid": "clear-filter",
|
|
4080
4056
|
size: "small",
|
|
4081
|
-
onClick: (K) =>
|
|
4057
|
+
onClick: (K) => b(W.value)
|
|
4082
4058
|
}, {
|
|
4083
|
-
default:
|
|
4084
|
-
J(V(
|
|
4059
|
+
default: y(() => [
|
|
4060
|
+
J(V(m(a)("filter.clearButtonText")), 1)
|
|
4085
4061
|
]),
|
|
4086
4062
|
_: 2
|
|
4087
4063
|
}, 1032, ["onClick"])
|
|
@@ -4091,15 +4067,15 @@ const Zl = {
|
|
|
4091
4067
|
_: 2
|
|
4092
4068
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
4093
4069
|
]),
|
|
4094
|
-
actionButton:
|
|
4095
|
-
F("div",
|
|
4096
|
-
|
|
4070
|
+
actionButton: y(() => [
|
|
4071
|
+
F("div", Gn, [
|
|
4072
|
+
C(E, {
|
|
4097
4073
|
appearance: "tertiary",
|
|
4098
4074
|
size: "small",
|
|
4099
4075
|
onClick: S
|
|
4100
4076
|
}, {
|
|
4101
|
-
default:
|
|
4102
|
-
J(V(
|
|
4077
|
+
default: y(() => [
|
|
4078
|
+
J(V(m(a)("filter.clearAllButtonText")), 1)
|
|
4103
4079
|
]),
|
|
4104
4080
|
_: 1
|
|
4105
4081
|
})
|
|
@@ -4112,7 +4088,7 @@ const Zl = {
|
|
|
4112
4088
|
]));
|
|
4113
4089
|
};
|
|
4114
4090
|
}
|
|
4115
|
-
}),
|
|
4091
|
+
}), Yn = /* @__PURE__ */ ve(Wn, [["__scopeId", "data-v-15962ee2"]]), Zn = /* @__PURE__ */ ae({
|
|
4116
4092
|
__name: "EntityToggleModal",
|
|
4117
4093
|
props: {
|
|
4118
4094
|
visible: {
|
|
@@ -4144,44 +4120,44 @@ const Zl = {
|
|
|
4144
4120
|
},
|
|
4145
4121
|
emits: ["canceled", "proceed"],
|
|
4146
4122
|
setup(e, { emit: i }) {
|
|
4147
|
-
const t = e, { i18n: { t: a }, i18nT: r } = ne.useI18n(), o = N(!1),
|
|
4123
|
+
const t = e, { i18n: { t: a }, i18nT: r } = ne.useI18n(), o = N(!1), n = T(
|
|
4148
4124
|
() => t.action === "enable" ? a("toggleModal.enable.title", { entityType: t.entityType }) : a("toggleModal.disable.title", { entityType: t.entityType })
|
|
4149
|
-
),
|
|
4125
|
+
), l = T(
|
|
4150
4126
|
() => t.action === "enable" ? a("toggleModal.enable.confirmText") : a("toggleModal.disable.confirmText")
|
|
4151
|
-
),
|
|
4127
|
+
), u = () => i("canceled"), d = async () => {
|
|
4152
4128
|
if (t.onConfirm) {
|
|
4153
4129
|
o.value = !0;
|
|
4154
4130
|
try {
|
|
4155
4131
|
await t.onConfirm(), i("proceed");
|
|
4156
|
-
} catch (
|
|
4157
|
-
console.error(
|
|
4132
|
+
} catch (f) {
|
|
4133
|
+
console.error(f);
|
|
4158
4134
|
} finally {
|
|
4159
4135
|
o.value = !1;
|
|
4160
4136
|
}
|
|
4161
4137
|
}
|
|
4162
4138
|
};
|
|
4163
|
-
return (
|
|
4139
|
+
return (f, p) => {
|
|
4164
4140
|
const w = L("KPrompt");
|
|
4165
|
-
return
|
|
4166
|
-
|
|
4167
|
-
"action-button-text":
|
|
4141
|
+
return h(), P(ii, { to: "body" }, [
|
|
4142
|
+
C(w, {
|
|
4143
|
+
"action-button-text": l.value,
|
|
4168
4144
|
"action-pending": o.value,
|
|
4169
4145
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
4170
4146
|
"is-visible": e.visible,
|
|
4171
|
-
title:
|
|
4147
|
+
title: n.value,
|
|
4172
4148
|
type: "warning",
|
|
4173
|
-
onCanceled:
|
|
4149
|
+
onCanceled: u,
|
|
4174
4150
|
onProceed: d
|
|
4175
4151
|
}, {
|
|
4176
|
-
"body-content":
|
|
4177
|
-
|
|
4152
|
+
"body-content": y(() => [
|
|
4153
|
+
C(m(r), {
|
|
4178
4154
|
keypath: `toggleModal.${t.action}.message`,
|
|
4179
4155
|
scope: "global"
|
|
4180
4156
|
}, {
|
|
4181
|
-
entityType:
|
|
4157
|
+
entityType: y(() => [
|
|
4182
4158
|
J(V(e.entityType), 1)
|
|
4183
4159
|
]),
|
|
4184
|
-
entityName:
|
|
4160
|
+
entityName: y(() => [
|
|
4185
4161
|
F("strong", null, V(e.entityName), 1)
|
|
4186
4162
|
]),
|
|
4187
4163
|
_: 1
|
|
@@ -4220,18 +4196,18 @@ const Zl = {
|
|
|
4220
4196
|
}, { immediate: !0 }), (r, o) => a.value ? Z(r.$slots, "default", {
|
|
4221
4197
|
key: 0,
|
|
4222
4198
|
isAllowed: t.value
|
|
4223
|
-
}) :
|
|
4199
|
+
}) : D("", !0);
|
|
4224
4200
|
}
|
|
4225
|
-
}),
|
|
4201
|
+
}), Qn = { class: "form-section-wrapper" }, Xn = {
|
|
4226
4202
|
key: 0,
|
|
4227
4203
|
class: "form-section-title"
|
|
4228
|
-
},
|
|
4204
|
+
}, es = {
|
|
4229
4205
|
key: 1,
|
|
4230
4206
|
class: "form-section-description"
|
|
4231
|
-
},
|
|
4207
|
+
}, ts = {
|
|
4232
4208
|
key: 2,
|
|
4233
4209
|
class: "form-section-footer"
|
|
4234
|
-
},
|
|
4210
|
+
}, is = { class: "form-section-content" }, as = /* @__PURE__ */ ae({
|
|
4235
4211
|
__name: "EntityFormSection",
|
|
4236
4212
|
props: {
|
|
4237
4213
|
title: {
|
|
@@ -4257,31 +4233,31 @@ const Zl = {
|
|
|
4257
4233
|
},
|
|
4258
4234
|
setup(e) {
|
|
4259
4235
|
const i = it();
|
|
4260
|
-
return (t, a) => (
|
|
4261
|
-
class:
|
|
4236
|
+
return (t, a) => (h(), M("fieldset", {
|
|
4237
|
+
class: $e(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4262
4238
|
}, [
|
|
4263
|
-
F("div",
|
|
4264
|
-
e.hideInfoHeader ?
|
|
4239
|
+
F("div", Qn, [
|
|
4240
|
+
e.hideInfoHeader ? D("", !0) : (h(), M("div", {
|
|
4265
4241
|
key: 0,
|
|
4266
|
-
class:
|
|
4242
|
+
class: $e(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4267
4243
|
}, [
|
|
4268
|
-
e.title ? (
|
|
4269
|
-
e.description ||
|
|
4244
|
+
e.title ? (h(), M("h4", Xn, V(e.title), 1)) : D("", !0),
|
|
4245
|
+
e.description || m(i).description ? (h(), M("div", es, [
|
|
4270
4246
|
Z(t.$slots, "description", {}, () => [
|
|
4271
4247
|
F("p", null, V(e.description), 1)
|
|
4272
4248
|
], !0)
|
|
4273
|
-
])) :
|
|
4274
|
-
|
|
4249
|
+
])) : D("", !0),
|
|
4250
|
+
m(i).footer ? (h(), M("div", ts, [
|
|
4275
4251
|
Z(t.$slots, "footer", {}, void 0, !0)
|
|
4276
|
-
])) :
|
|
4252
|
+
])) : D("", !0)
|
|
4277
4253
|
], 2)),
|
|
4278
|
-
F("div",
|
|
4254
|
+
F("div", is, [
|
|
4279
4255
|
Z(t.$slots, "default", {}, void 0, !0)
|
|
4280
4256
|
])
|
|
4281
4257
|
])
|
|
4282
4258
|
], 2));
|
|
4283
4259
|
}
|
|
4284
|
-
}), ti = /* @__PURE__ */ ve(
|
|
4260
|
+
}), ti = /* @__PURE__ */ ve(as, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: ia, useDeleteUrlBuilder: rs, useErrors: os, useExternalLinkCreator: Ns, useFetchUrlBuilder: Ks, useFetcher: ls, useDebouncedFilter: Ls, useStringHelpers: qs, useHelpers: ns, useGatewayFeatureSupported: ss, useTruncationDetector: Bs } = ne, cs = { class: "kong-ui-entities-gateway-services-list" }, us = { key: 1 }, ds = /* @__PURE__ */ ae({
|
|
4285
4261
|
__name: "GatewayServiceList",
|
|
4286
4262
|
props: {
|
|
4287
4263
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4330,7 +4306,7 @@ const Zl = {
|
|
|
4330
4306
|
var Le;
|
|
4331
4307
|
const t = e, { i18n: { t: a } } = Ye.useI18n(), r = ht(), { axiosInstance: o } = ia({
|
|
4332
4308
|
headers: (Le = t.config) == null ? void 0 : Le.requestHeaders
|
|
4333
|
-
}),
|
|
4309
|
+
}), n = N(1), l = T(() => t.config.app !== "kongManager" || !!t.config.disableSorting), u = {
|
|
4334
4310
|
name: { label: a("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
4335
4311
|
protocol: { label: a("gateway_services.list.table_headers.protocol"), searchable: !0, sortable: !0 },
|
|
4336
4312
|
host: { label: a("gateway_services.list.table_headers.host"), searchable: !0, sortable: !0 },
|
|
@@ -4338,200 +4314,200 @@ const Zl = {
|
|
|
4338
4314
|
path: { label: a("gateway_services.list.table_headers.path"), searchable: !0, sortable: !0 },
|
|
4339
4315
|
enabled: { label: a("gateway_services.list.table_headers.enabled"), searchable: !0, sortable: !0 },
|
|
4340
4316
|
tags: { label: a("gateway_services.list.table_headers.tags"), sortable: !1 }
|
|
4341
|
-
}, d =
|
|
4342
|
-
var
|
|
4343
|
-
let
|
|
4344
|
-
return t.config.app === "konnect" ?
|
|
4345
|
-
}), p = T(() => t.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${
|
|
4346
|
-
const
|
|
4347
|
-
if (
|
|
4317
|
+
}, d = u, f = T(() => {
|
|
4318
|
+
var g, O;
|
|
4319
|
+
let c = `${t.config.apiBaseUrl}${De.list[t.config.app].all}`;
|
|
4320
|
+
return t.config.app === "konnect" ? c = c.replace(/{controlPlaneId}/gi, ((g = t.config) == null ? void 0 : g.controlPlaneId) || "") : t.config.app === "kongManager" && (c = c.replace(/\/{workspace}/gi, (O = t.config) != null && O.workspace ? `/${t.config.workspace}` : "")), c;
|
|
4321
|
+
}), p = T(() => t.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${f.value}`) : new URL(f.value)), w = N(""), b = T(() => {
|
|
4322
|
+
const c = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4323
|
+
if (c)
|
|
4348
4324
|
return {
|
|
4349
|
-
isExactMatch:
|
|
4325
|
+
isExactMatch: c,
|
|
4350
4326
|
placeholder: a("search.placeholder")
|
|
4351
4327
|
};
|
|
4352
|
-
const { name:
|
|
4328
|
+
const { name: g, enabled: O, protocol: G, host: te, port: se, path: _ } = u;
|
|
4353
4329
|
return {
|
|
4354
|
-
isExactMatch:
|
|
4355
|
-
fields: { name:
|
|
4330
|
+
isExactMatch: c,
|
|
4331
|
+
fields: { name: g, enabled: O, protocol: G, host: te, port: se, path: _ },
|
|
4356
4332
|
schema: t.config.filterSchema
|
|
4357
4333
|
};
|
|
4358
|
-
}), { fetcher: S, fetcherState:
|
|
4334
|
+
}), { fetcher: S, fetcherState: k } = ls(t.config, f.value), v = () => {
|
|
4359
4335
|
w.value = "";
|
|
4360
|
-
},
|
|
4361
|
-
|
|
4362
|
-
}, s = N(null),
|
|
4336
|
+
}, $ = () => {
|
|
4337
|
+
n.value++;
|
|
4338
|
+
}, s = N(null), E = T(() => ({
|
|
4363
4339
|
ctaPath: t.config.createRoute,
|
|
4364
|
-
ctaText:
|
|
4340
|
+
ctaText: Ie.value ? a("actions.create") : void 0,
|
|
4365
4341
|
message: a("gateway_services.list.empty_state.description"),
|
|
4366
|
-
title:
|
|
4342
|
+
title: Ie.value ? a("gateway_services.list.empty_state.title") : ""
|
|
4367
4343
|
})), x = N(!1), B = N(null), re = T(() => {
|
|
4368
|
-
const
|
|
4344
|
+
const c = {
|
|
4369
4345
|
action: "disable",
|
|
4370
4346
|
id: "",
|
|
4371
4347
|
name: ""
|
|
4372
4348
|
};
|
|
4373
4349
|
if (B.value) {
|
|
4374
|
-
const { enabled:
|
|
4375
|
-
|
|
4350
|
+
const { enabled: g, id: O, name: G } = B.value;
|
|
4351
|
+
c.action = g ? "disable" : "enable", c.id = O, c.name = G || O;
|
|
4376
4352
|
}
|
|
4377
|
-
return
|
|
4378
|
-
}), W = (
|
|
4379
|
-
x.value = !0, B.value =
|
|
4353
|
+
return c;
|
|
4354
|
+
}), W = (c) => {
|
|
4355
|
+
x.value = !0, B.value = c;
|
|
4380
4356
|
}, A = () => {
|
|
4381
4357
|
x.value = !1, B.value = null;
|
|
4382
4358
|
}, q = async () => {
|
|
4383
4359
|
var G, te;
|
|
4384
4360
|
if (!await ((G = t.canEdit) == null ? void 0 : G.call(t, B.value)) || !B.value)
|
|
4385
4361
|
return;
|
|
4386
|
-
const
|
|
4362
|
+
const g = `${p.value.href}/${B.value.id}`, O = !B.value.enabled;
|
|
4387
4363
|
try {
|
|
4388
|
-
const { data: se } = ((te = t.config) == null ? void 0 : te.app) === "konnect" ? await o.put(
|
|
4364
|
+
const { data: se } = ((te = t.config) == null ? void 0 : te.app) === "konnect" ? await o.put(g, { ...B.value, enabled: O }) : await o.patch(g, { ...B.value, enabled: O });
|
|
4389
4365
|
i("toggle:success", se);
|
|
4390
4366
|
} catch (se) {
|
|
4391
4367
|
i("error", se);
|
|
4392
4368
|
}
|
|
4393
4369
|
B.value.enabled = O;
|
|
4394
|
-
}, U = (
|
|
4395
|
-
const O =
|
|
4396
|
-
if (!
|
|
4370
|
+
}, U = (c, g) => {
|
|
4371
|
+
const O = c.id;
|
|
4372
|
+
if (!g(O)) {
|
|
4397
4373
|
i("copy:error", {
|
|
4398
|
-
entity:
|
|
4374
|
+
entity: c,
|
|
4399
4375
|
field: "id",
|
|
4400
4376
|
message: a("errors.copy")
|
|
4401
4377
|
});
|
|
4402
4378
|
return;
|
|
4403
4379
|
}
|
|
4404
4380
|
i("copy:success", {
|
|
4405
|
-
entity:
|
|
4381
|
+
entity: c,
|
|
4406
4382
|
field: "id",
|
|
4407
4383
|
message: a("copy.success", { val: O })
|
|
4408
4384
|
});
|
|
4409
|
-
}, K = (
|
|
4410
|
-
const O = JSON.stringify(
|
|
4411
|
-
if (!
|
|
4385
|
+
}, K = (c, g) => {
|
|
4386
|
+
const O = JSON.stringify(c);
|
|
4387
|
+
if (!g(O)) {
|
|
4412
4388
|
i("copy:error", {
|
|
4413
|
-
entity:
|
|
4389
|
+
entity: c,
|
|
4414
4390
|
message: a("errors.copy")
|
|
4415
4391
|
});
|
|
4416
4392
|
return;
|
|
4417
4393
|
}
|
|
4418
4394
|
i("copy:success", {
|
|
4419
|
-
entity:
|
|
4395
|
+
entity: c,
|
|
4420
4396
|
message: a("copy.success_brief")
|
|
4421
4397
|
});
|
|
4422
|
-
}, H = async (
|
|
4398
|
+
}, H = async (c) => {
|
|
4423
4399
|
var O;
|
|
4424
|
-
await ((O = t.canRetrieve) == null ? void 0 : O.call(t,
|
|
4425
|
-
},
|
|
4400
|
+
await ((O = t.canRetrieve) == null ? void 0 : O.call(t, c)) && r.push(t.config.getViewRoute(c.id));
|
|
4401
|
+
}, R = (c) => ({
|
|
4426
4402
|
label: a("actions.view"),
|
|
4427
|
-
to: t.config.getViewRoute(
|
|
4428
|
-
}), Q = (
|
|
4403
|
+
to: t.config.getViewRoute(c)
|
|
4404
|
+
}), Q = (c) => ({
|
|
4429
4405
|
label: a("actions.edit"),
|
|
4430
|
-
to: t.config.getEditRoute(
|
|
4431
|
-
}), z = N(void 0), ie = N(!1), Y = N(!1), X = N(""), ce =
|
|
4432
|
-
z.value =
|
|
4433
|
-
},
|
|
4406
|
+
to: t.config.getEditRoute(c)
|
|
4407
|
+
}), z = N(void 0), ie = N(!1), Y = N(!1), X = N(""), ce = rs(t.config, f.value), rt = (c) => {
|
|
4408
|
+
z.value = c, ie.value = !0;
|
|
4409
|
+
}, Me = () => {
|
|
4434
4410
|
ie.value = !1, z.value = void 0;
|
|
4435
4411
|
}, ot = async () => {
|
|
4436
|
-
var
|
|
4437
|
-
if ((
|
|
4412
|
+
var c, g, O;
|
|
4413
|
+
if ((c = z.value) != null && c.id) {
|
|
4438
4414
|
Y.value = !0;
|
|
4439
4415
|
try {
|
|
4440
|
-
await o.delete(ce(z.value.id)), i("delete:success", z.value),
|
|
4416
|
+
await o.delete(ce(z.value.id)), i("delete:success", z.value), Me(), n.value++;
|
|
4441
4417
|
} catch (G) {
|
|
4442
|
-
X.value = ((O = (
|
|
4418
|
+
X.value = ((O = (g = G.response) == null ? void 0 : g.data) == null ? void 0 : O.message) || G.message || a("errors.delete"), i("error", G);
|
|
4443
4419
|
} finally {
|
|
4444
4420
|
Y.value = !1;
|
|
4445
4421
|
}
|
|
4446
4422
|
}
|
|
4447
|
-
},
|
|
4448
|
-
be(
|
|
4449
|
-
var
|
|
4450
|
-
if (Array.isArray((
|
|
4423
|
+
}, Se = N(!0);
|
|
4424
|
+
be(k, (c) => {
|
|
4425
|
+
var g, O, G, te;
|
|
4426
|
+
if (Array.isArray((g = c == null ? void 0 : c.response) == null ? void 0 : g.data) && (Se.value = c.response.data.length > 0), c.status === Ae.Error) {
|
|
4451
4427
|
s.value = {
|
|
4452
4428
|
title: a("errors.general")
|
|
4453
|
-
}, (te = (G = (O =
|
|
4429
|
+
}, (te = (G = (O = c.error) == null ? void 0 : O.response) == null ? void 0 : G.data) != null && te.message && (s.value.message = c.error.response.data.message), i("error", c.error);
|
|
4454
4430
|
return;
|
|
4455
4431
|
}
|
|
4456
4432
|
s.value = null;
|
|
4457
4433
|
});
|
|
4458
|
-
const
|
|
4434
|
+
const Ie = N(!1);
|
|
4459
4435
|
return vt(async () => {
|
|
4460
|
-
|
|
4461
|
-
}), (
|
|
4436
|
+
Ie.value = await t.canCreate();
|
|
4437
|
+
}), (c, g) => {
|
|
4462
4438
|
const O = L("KButton"), G = L("KInputSwitch"), te = L("KBadge"), se = L("KTruncate"), _ = L("KDropdownItem"), qe = L("KClipboardProvider");
|
|
4463
|
-
return
|
|
4464
|
-
|
|
4439
|
+
return h(), M("div", cs, [
|
|
4440
|
+
C(m(En), {
|
|
4465
4441
|
"cache-identifier": e.cacheIdentifier,
|
|
4466
4442
|
"disable-pagination-page-jump": "",
|
|
4467
|
-
"disable-sorting":
|
|
4468
|
-
"empty-state-options":
|
|
4443
|
+
"disable-sorting": l.value,
|
|
4444
|
+
"empty-state-options": E.value,
|
|
4469
4445
|
"enable-entity-actions": "",
|
|
4470
4446
|
"error-message": s.value,
|
|
4471
|
-
fetcher:
|
|
4472
|
-
"fetcher-cache-key":
|
|
4447
|
+
fetcher: m(S),
|
|
4448
|
+
"fetcher-cache-key": n.value,
|
|
4473
4449
|
"pagination-type": "offset",
|
|
4474
4450
|
"preferences-storage-key": "kong-ui-entities-gateway-services-list",
|
|
4475
4451
|
query: w.value,
|
|
4476
|
-
"table-headers":
|
|
4452
|
+
"table-headers": m(d),
|
|
4477
4453
|
"use-action-outside": e.useActionOutside,
|
|
4478
|
-
onClearSearchInput:
|
|
4479
|
-
"onClick:row":
|
|
4480
|
-
onSort:
|
|
4454
|
+
onClearSearchInput: v,
|
|
4455
|
+
"onClick:row": g[3] || (g[3] = (I) => H(I)),
|
|
4456
|
+
onSort: $
|
|
4481
4457
|
}, {
|
|
4482
|
-
"toolbar-filter":
|
|
4483
|
-
|
|
4458
|
+
"toolbar-filter": y(() => [
|
|
4459
|
+
C(m(Yn), {
|
|
4484
4460
|
modelValue: w.value,
|
|
4485
|
-
"onUpdate:modelValue":
|
|
4486
|
-
config:
|
|
4461
|
+
"onUpdate:modelValue": g[0] || (g[0] = (I) => w.value = I),
|
|
4462
|
+
config: b.value
|
|
4487
4463
|
}, null, 8, ["modelValue", "config"])
|
|
4488
4464
|
]),
|
|
4489
|
-
"toolbar-button":
|
|
4490
|
-
(
|
|
4465
|
+
"toolbar-button": y(() => [
|
|
4466
|
+
(h(), P(ii, {
|
|
4491
4467
|
disabled: !e.useActionOutside,
|
|
4492
4468
|
to: "#kong-ui-app-page-header-action-button"
|
|
4493
4469
|
}, [
|
|
4494
|
-
|
|
4470
|
+
C(m(Be), {
|
|
4495
4471
|
"auth-function": () => e.canCreate()
|
|
4496
4472
|
}, {
|
|
4497
|
-
default:
|
|
4498
|
-
Ue(
|
|
4473
|
+
default: y(() => [
|
|
4474
|
+
Ue(C(O, {
|
|
4499
4475
|
appearance: "primary",
|
|
4500
4476
|
"data-testid": "toolbar-add-gateway-service",
|
|
4501
4477
|
icon: "plus",
|
|
4502
4478
|
to: e.config.createRoute
|
|
4503
4479
|
}, {
|
|
4504
|
-
default:
|
|
4505
|
-
J(V(
|
|
4480
|
+
default: y(() => [
|
|
4481
|
+
J(V(m(a)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
4506
4482
|
]),
|
|
4507
4483
|
_: 1
|
|
4508
4484
|
}, 8, ["to"]), [
|
|
4509
|
-
[Re,
|
|
4485
|
+
[Re, Se.value]
|
|
4510
4486
|
])
|
|
4511
4487
|
]),
|
|
4512
4488
|
_: 1
|
|
4513
4489
|
}, 8, ["auth-function"])
|
|
4514
4490
|
], 8, ["disabled"]))
|
|
4515
4491
|
]),
|
|
4516
|
-
name:
|
|
4492
|
+
name: y(({ rowValue: I }) => [
|
|
4517
4493
|
F("b", null, V(I ?? "-"), 1)
|
|
4518
4494
|
]),
|
|
4519
|
-
enabled:
|
|
4520
|
-
|
|
4495
|
+
enabled: y(({ row: I }) => [
|
|
4496
|
+
C(m(Be), {
|
|
4521
4497
|
"auth-function": () => e.canEdit(I),
|
|
4522
4498
|
"force-show": ""
|
|
4523
4499
|
}, {
|
|
4524
|
-
default:
|
|
4500
|
+
default: y(({ isAllowed: we }) => [
|
|
4525
4501
|
F("div", {
|
|
4526
|
-
onClick:
|
|
4502
|
+
onClick: g[1] || (g[1] = Fe(() => {
|
|
4527
4503
|
}, ["stop"]))
|
|
4528
4504
|
}, [
|
|
4529
|
-
|
|
4505
|
+
C(G, {
|
|
4530
4506
|
modelValue: I.enabled,
|
|
4531
4507
|
"onUpdate:modelValue": (We) => I.enabled = We,
|
|
4532
4508
|
"data-testid": `row-${I.id}-toggle-input`,
|
|
4533
4509
|
disabled: !we,
|
|
4534
|
-
label: I.enabled ?
|
|
4510
|
+
label: I.enabled ? m(a)("actions.enable.enabled_label") : m(a)("actions.enable.disabled_label"),
|
|
4535
4511
|
onClick: Fe((We) => W(I), ["prevent"])
|
|
4536
4512
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "label", "onClick"])
|
|
4537
4513
|
])
|
|
@@ -4539,87 +4515,87 @@ const Zl = {
|
|
|
4539
4515
|
_: 2
|
|
4540
4516
|
}, 1032, ["auth-function"])
|
|
4541
4517
|
]),
|
|
4542
|
-
tags:
|
|
4543
|
-
(I == null ? void 0 : I.length) > 0 ? (
|
|
4544
|
-
default:
|
|
4545
|
-
(
|
|
4518
|
+
tags: y(({ rowValue: I }) => [
|
|
4519
|
+
(I == null ? void 0 : I.length) > 0 ? (h(), P(se, { key: 0 }, {
|
|
4520
|
+
default: y(() => [
|
|
4521
|
+
(h(!0), M(ye, null, ge(I, (we) => (h(), P(te, {
|
|
4546
4522
|
key: we,
|
|
4547
|
-
onClick:
|
|
4523
|
+
onClick: g[2] || (g[2] = Fe(() => {
|
|
4548
4524
|
}, ["stop"]))
|
|
4549
4525
|
}, {
|
|
4550
|
-
default:
|
|
4526
|
+
default: y(() => [
|
|
4551
4527
|
J(V(we), 1)
|
|
4552
4528
|
]),
|
|
4553
4529
|
_: 2
|
|
4554
4530
|
}, 1024))), 128))
|
|
4555
4531
|
]),
|
|
4556
4532
|
_: 2
|
|
4557
|
-
}, 1024)) : (
|
|
4533
|
+
}, 1024)) : (h(), M("span", us, "-"))
|
|
4558
4534
|
]),
|
|
4559
|
-
actions:
|
|
4560
|
-
|
|
4561
|
-
default:
|
|
4562
|
-
|
|
4535
|
+
actions: y(({ row: I }) => [
|
|
4536
|
+
C(qe, null, {
|
|
4537
|
+
default: y(({ copyToClipboard: we }) => [
|
|
4538
|
+
C(_, {
|
|
4563
4539
|
"data-testid": "action-entity-copy-id",
|
|
4564
4540
|
onClick: (We) => U(I, we)
|
|
4565
4541
|
}, {
|
|
4566
|
-
default:
|
|
4567
|
-
J(V(
|
|
4542
|
+
default: y(() => [
|
|
4543
|
+
J(V(m(a)("actions.copy_id")), 1)
|
|
4568
4544
|
]),
|
|
4569
4545
|
_: 2
|
|
4570
4546
|
}, 1032, ["onClick"])
|
|
4571
4547
|
]),
|
|
4572
4548
|
_: 2
|
|
4573
4549
|
}, 1024),
|
|
4574
|
-
|
|
4575
|
-
default:
|
|
4576
|
-
|
|
4550
|
+
C(qe, null, {
|
|
4551
|
+
default: y(({ copyToClipboard: we }) => [
|
|
4552
|
+
C(_, {
|
|
4577
4553
|
"data-testid": "action-entity-copy-json",
|
|
4578
4554
|
onClick: (We) => K(I, we)
|
|
4579
4555
|
}, {
|
|
4580
|
-
default:
|
|
4581
|
-
J(V(
|
|
4556
|
+
default: y(() => [
|
|
4557
|
+
J(V(m(a)("actions.copy_json")), 1)
|
|
4582
4558
|
]),
|
|
4583
4559
|
_: 2
|
|
4584
4560
|
}, 1032, ["onClick"])
|
|
4585
4561
|
]),
|
|
4586
4562
|
_: 2
|
|
4587
4563
|
}, 1024),
|
|
4588
|
-
|
|
4564
|
+
C(m(Be), {
|
|
4589
4565
|
"auth-function": () => e.canRetrieve(I)
|
|
4590
4566
|
}, {
|
|
4591
|
-
default:
|
|
4592
|
-
|
|
4567
|
+
default: y(() => [
|
|
4568
|
+
C(_, {
|
|
4593
4569
|
"data-testid": "action-entity-view",
|
|
4594
4570
|
"has-divider": "",
|
|
4595
|
-
item:
|
|
4571
|
+
item: R(I.id)
|
|
4596
4572
|
}, null, 8, ["item"])
|
|
4597
4573
|
]),
|
|
4598
4574
|
_: 2
|
|
4599
4575
|
}, 1032, ["auth-function"]),
|
|
4600
|
-
|
|
4576
|
+
C(m(Be), {
|
|
4601
4577
|
"auth-function": () => e.canEdit(I)
|
|
4602
4578
|
}, {
|
|
4603
|
-
default:
|
|
4604
|
-
|
|
4579
|
+
default: y(() => [
|
|
4580
|
+
C(_, {
|
|
4605
4581
|
"data-testid": "action-entity-edit",
|
|
4606
4582
|
item: Q(I.id)
|
|
4607
4583
|
}, null, 8, ["item"])
|
|
4608
4584
|
]),
|
|
4609
4585
|
_: 2
|
|
4610
4586
|
}, 1032, ["auth-function"]),
|
|
4611
|
-
|
|
4587
|
+
C(m(Be), {
|
|
4612
4588
|
"auth-function": () => e.canDelete(I)
|
|
4613
4589
|
}, {
|
|
4614
|
-
default:
|
|
4615
|
-
|
|
4590
|
+
default: y(() => [
|
|
4591
|
+
C(_, {
|
|
4616
4592
|
danger: "",
|
|
4617
4593
|
"data-testid": "action-entity-delete",
|
|
4618
4594
|
"has-divider": "",
|
|
4619
4595
|
onClick: (we) => rt(I)
|
|
4620
4596
|
}, {
|
|
4621
|
-
default:
|
|
4622
|
-
J(V(
|
|
4597
|
+
default: y(() => [
|
|
4598
|
+
J(V(m(a)("actions.delete.menu_label")), 1)
|
|
4623
4599
|
]),
|
|
4624
4600
|
_: 2
|
|
4625
4601
|
}, 1032, ["onClick"])
|
|
@@ -4629,25 +4605,25 @@ const Zl = {
|
|
|
4629
4605
|
]),
|
|
4630
4606
|
_: 1
|
|
4631
4607
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "use-action-outside"]),
|
|
4632
|
-
|
|
4608
|
+
C(m(Zn), {
|
|
4633
4609
|
action: re.value.action,
|
|
4634
4610
|
"entity-id": re.value.id,
|
|
4635
4611
|
"entity-name": re.value.name,
|
|
4636
|
-
"entity-type":
|
|
4612
|
+
"entity-type": m(a)("glossary.gateway_services"),
|
|
4637
4613
|
"on-confirm": q,
|
|
4638
4614
|
visible: x.value,
|
|
4639
4615
|
onCanceled: A,
|
|
4640
4616
|
onProceed: A
|
|
4641
4617
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
4642
|
-
|
|
4618
|
+
C(m(Nn), {
|
|
4643
4619
|
"action-pending": Y.value,
|
|
4644
|
-
description:
|
|
4620
|
+
description: m(a)("actions.delete.description"),
|
|
4645
4621
|
"entity-name": z.value && (z.value.name || z.value.id),
|
|
4646
|
-
"entity-type":
|
|
4622
|
+
"entity-type": m(si).GatewayService,
|
|
4647
4623
|
error: X.value,
|
|
4648
|
-
title:
|
|
4624
|
+
title: m(a)("actions.delete.title"),
|
|
4649
4625
|
visible: ie.value,
|
|
4650
|
-
onCancel:
|
|
4626
|
+
onCancel: Me,
|
|
4651
4627
|
onProceed: ot
|
|
4652
4628
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
4653
4629
|
]);
|
|
@@ -4658,28 +4634,28 @@ const Zl = {
|
|
|
4658
4634
|
for (const [a, r] of i)
|
|
4659
4635
|
t[a] = r;
|
|
4660
4636
|
return t;
|
|
4661
|
-
},
|
|
4637
|
+
}, Ps = /* @__PURE__ */ aa(ds, [["__scopeId", "data-v-d069f686"]]), ps = { class: "kong-ui-entities-gateway-service-form" }, fs = { key: 0 }, ms = { class: "gateway-service-form-traffic-label" }, gs = { class: "gateway-service-form-margin-bottom" }, ys = {
|
|
4662
4638
|
key: 0,
|
|
4663
4639
|
class: "gateway-service-form-group-fields"
|
|
4664
|
-
},
|
|
4640
|
+
}, vs = {
|
|
4665
4641
|
key: 1,
|
|
4666
4642
|
class: "gateway-service-form-group-fields"
|
|
4667
|
-
},
|
|
4643
|
+
}, hs = { key: 0 }, bs = { class: "gateway-service-form-margin-top" }, ws = { class: "gateway-service-form-margin-bottom" }, _s = { class: "gateway-service-form-margin-bottom" }, ks = { class: "gateway-service-form-margin-bottom" }, Cs = { class: "gateway-service-form-margin-bottom" }, Ss = {
|
|
4668
4644
|
key: 0,
|
|
4669
4645
|
class: "gateway-service-form-margin-bottom"
|
|
4670
|
-
},
|
|
4646
|
+
}, Is = {
|
|
4671
4647
|
key: 1,
|
|
4672
4648
|
class: "gateway-service-form-margin-bottom"
|
|
4673
|
-
},
|
|
4649
|
+
}, As = {
|
|
4674
4650
|
key: 2,
|
|
4675
4651
|
class: "gateway-service-form-margin-bottom"
|
|
4676
|
-
},
|
|
4652
|
+
}, xs = {
|
|
4677
4653
|
key: 0,
|
|
4678
4654
|
class: "checkbox-aligned-radio"
|
|
4679
|
-
},
|
|
4655
|
+
}, Ts = {
|
|
4680
4656
|
key: 1,
|
|
4681
4657
|
class: "checkbox-aligned-radio"
|
|
4682
|
-
},
|
|
4658
|
+
}, $s = /* @__PURE__ */ ae({
|
|
4683
4659
|
__name: "GatewayServiceForm",
|
|
4684
4660
|
props: {
|
|
4685
4661
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4704,9 +4680,9 @@ const Zl = {
|
|
|
4704
4680
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
4705
4681
|
setup(e, { expose: i, emit: t }) {
|
|
4706
4682
|
var Le;
|
|
4707
|
-
const a = e, r = N(!0), o = ht(), { i18nT:
|
|
4683
|
+
const a = e, r = N(!0), o = ht(), { i18nT: n, i18n: { t: l } } = Ye.useI18n(), { getMessageFromError: u } = os(), { axiosInstance: d } = ia({
|
|
4708
4684
|
headers: (Le = a.config) == null ? void 0 : Le.requestHeaders
|
|
4709
|
-
}),
|
|
4685
|
+
}), f = T(() => De.form[a.config.app].edit), p = T(() => a.gatewayServiceId ? dt.Edit : dt.Create), w = N(!1), b = T(() => !!a.gatewayServiceId), S = N(b.value ? "protocol" : "url"), k = Ye.usePortFromProtocol(), v = N(""), $ = T(() => !!v.value), s = $t({
|
|
4710
4686
|
fields: {
|
|
4711
4687
|
name: "",
|
|
4712
4688
|
protocol: "http",
|
|
@@ -4726,7 +4702,7 @@ const Zl = {
|
|
|
4726
4702
|
},
|
|
4727
4703
|
isReadonly: !1,
|
|
4728
4704
|
errorMessage: ""
|
|
4729
|
-
}),
|
|
4705
|
+
}), E = $t({
|
|
4730
4706
|
name: "",
|
|
4731
4707
|
protocol: "http",
|
|
4732
4708
|
host: "",
|
|
@@ -4742,7 +4718,7 @@ const Zl = {
|
|
|
4742
4718
|
tls_verify_enabled: !1,
|
|
4743
4719
|
tls_verify_value: !1,
|
|
4744
4720
|
tags: ""
|
|
4745
|
-
}), x = a.config.app === "konnect" ||
|
|
4721
|
+
}), x = a.config.app === "konnect" || ss({
|
|
4746
4722
|
gatewayInfo: a.config.gatewayInfo,
|
|
4747
4723
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
4748
4724
|
supportedRange: {
|
|
@@ -4750,111 +4726,111 @@ const Zl = {
|
|
|
4750
4726
|
}
|
|
4751
4727
|
}), B = [
|
|
4752
4728
|
{
|
|
4753
|
-
label:
|
|
4729
|
+
label: l("gateway_services.form.fields.protocol.options.http"),
|
|
4754
4730
|
value: "http",
|
|
4755
4731
|
group: "http"
|
|
4756
4732
|
},
|
|
4757
4733
|
{
|
|
4758
|
-
label:
|
|
4734
|
+
label: l("gateway_services.form.fields.protocol.options.https"),
|
|
4759
4735
|
value: "https",
|
|
4760
4736
|
group: "http"
|
|
4761
4737
|
},
|
|
4762
4738
|
{
|
|
4763
|
-
label:
|
|
4739
|
+
label: l("gateway_services.form.fields.protocol.options.tcp"),
|
|
4764
4740
|
value: "tcp",
|
|
4765
4741
|
group: "tcp"
|
|
4766
4742
|
},
|
|
4767
4743
|
{
|
|
4768
|
-
label:
|
|
4744
|
+
label: l("gateway_services.form.fields.protocol.options.tls"),
|
|
4769
4745
|
value: "tls",
|
|
4770
4746
|
group: "tcp"
|
|
4771
4747
|
},
|
|
4772
4748
|
{
|
|
4773
|
-
label:
|
|
4749
|
+
label: l("gateway_services.form.fields.protocol.options.tls_passthrough"),
|
|
4774
4750
|
value: "tls_passthrough",
|
|
4775
4751
|
group: "tcp"
|
|
4776
4752
|
},
|
|
4777
4753
|
{
|
|
4778
|
-
label:
|
|
4754
|
+
label: l("gateway_services.form.fields.protocol.options.grpc"),
|
|
4779
4755
|
value: "grpc",
|
|
4780
4756
|
group: "grpc"
|
|
4781
4757
|
},
|
|
4782
4758
|
{
|
|
4783
|
-
label:
|
|
4759
|
+
label: l("gateway_services.form.fields.protocol.options.grpcs"),
|
|
4784
4760
|
value: "grpcs",
|
|
4785
4761
|
group: "grpc"
|
|
4786
4762
|
},
|
|
4787
4763
|
...x ? [
|
|
4788
4764
|
{
|
|
4789
|
-
label:
|
|
4765
|
+
label: l("gateway_services.form.fields.protocol.options.ws"),
|
|
4790
4766
|
value: "ws",
|
|
4791
4767
|
group: "websocket"
|
|
4792
4768
|
},
|
|
4793
4769
|
{
|
|
4794
|
-
label:
|
|
4770
|
+
label: l("gateway_services.form.fields.protocol.options.wss"),
|
|
4795
4771
|
value: "wss",
|
|
4796
4772
|
group: "websocket"
|
|
4797
4773
|
}
|
|
4798
4774
|
] : [],
|
|
4799
4775
|
{
|
|
4800
|
-
label:
|
|
4776
|
+
label: l("gateway_services.form.fields.protocol.options.udp"),
|
|
4801
4777
|
value: "udp",
|
|
4802
4778
|
group: "udp"
|
|
4803
4779
|
}
|
|
4804
|
-
], re = { url: "url", protocol: "protocol" }, W = (
|
|
4805
|
-
|
|
4806
|
-
}, A = (
|
|
4807
|
-
r.value = !0, s.errorMessage = "", s.fields.host =
|
|
4780
|
+
], re = { url: "url", protocol: "protocol" }, W = (c, g) => {
|
|
4781
|
+
g.value;
|
|
4782
|
+
}, A = (c) => c ? parseFloat(c) : 0, q = () => {
|
|
4783
|
+
r.value = !0, s.errorMessage = "", s.fields.host = E.host, s.fields.path = E.path, s.fields.port = E.port, s.fields.protocol = E.protocol, s.fields.url = E.url, s.fields.retries = E.retries, s.fields.connect_timeout = E.connect_timeout, s.fields.write_timeout = E.write_timeout, s.fields.read_timeout = E.read_timeout, s.fields.client_certificate = E.client_certificate, s.fields.ca_certificates = E.ca_certificates, s.fields.tls_verify_enabled = E.tls_verify_enabled, s.fields.tls_verify_value = E.tls_verify_value;
|
|
4808
4784
|
}, U = () => {
|
|
4809
4785
|
if (s.fields.url && S.value === "url")
|
|
4810
4786
|
try {
|
|
4811
|
-
const
|
|
4812
|
-
s.errorMessage = "", s.fields.protocol =
|
|
4813
|
-
const
|
|
4814
|
-
w.value = !!
|
|
4815
|
-
} catch (
|
|
4816
|
-
s.errorMessage =
|
|
4787
|
+
const c = new URL(s.fields.url);
|
|
4788
|
+
s.errorMessage = "", s.fields.protocol = c.protocol.slice(0, -1), s.fields.host = c.hostname, s.fields.path = c.pathname;
|
|
4789
|
+
const g = Number(c.port);
|
|
4790
|
+
w.value = !!g, s.fields.port = g || k.getPortFromProtocol(s.fields.protocol), s.errorMessage = "", t("url-valid:success");
|
|
4791
|
+
} catch (c) {
|
|
4792
|
+
s.errorMessage = l("errors.urlErrorMessage"), t("url-valid:error", u(c));
|
|
4817
4793
|
}
|
|
4818
4794
|
else
|
|
4819
4795
|
t("url-valid:success"), s.errorMessage = "";
|
|
4820
4796
|
}, K = T(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(s.fields.protocol)), H = T(() => {
|
|
4821
4797
|
if (S.value === "url")
|
|
4822
4798
|
return !0;
|
|
4823
|
-
const
|
|
4824
|
-
return S.value === "protocol" &&
|
|
4825
|
-
}),
|
|
4799
|
+
const c = ["https", "wss", "tls"].includes(s.fields.protocol);
|
|
4800
|
+
return S.value === "protocol" && c;
|
|
4801
|
+
}), R = T(() => {
|
|
4826
4802
|
if (S.value === "url")
|
|
4827
4803
|
return !0;
|
|
4828
|
-
const
|
|
4829
|
-
return S.value === "protocol" &&
|
|
4804
|
+
const c = ["https", "tls"].includes(s.fields.protocol);
|
|
4805
|
+
return S.value === "protocol" && c;
|
|
4830
4806
|
}), Q = T(() => {
|
|
4831
4807
|
if (S.value === "url")
|
|
4832
4808
|
return !0;
|
|
4833
|
-
const
|
|
4834
|
-
return S.value === "protocol" &&
|
|
4835
|
-
}), z = (
|
|
4836
|
-
|
|
4837
|
-
}, Y = T(() =>
|
|
4838
|
-
var
|
|
4839
|
-
s.fields.name = (
|
|
4809
|
+
const c = ["https", "wss", "tls"].includes(s.fields.protocol);
|
|
4810
|
+
return S.value === "protocol" && c;
|
|
4811
|
+
}), z = (c) => new RegExp("^[0-9a-zA-Z.\\-_~]*$").test(c) ? "" : l("errors.validationNameError"), ie = (c) => {
|
|
4812
|
+
v.value = z(c);
|
|
4813
|
+
}, Y = T(() => b.value && JSON.stringify(s.fields) !== JSON.stringify(E) || S.value === "url" && !!s.fields.url || S.value === "protocol" && !!s.fields.host), X = (c) => {
|
|
4814
|
+
var g, O, G;
|
|
4815
|
+
s.fields.name = (c == null ? void 0 : c.name) || "", s.fields.tags = ((g = c == null ? void 0 : c.tags) == null ? void 0 : g.join(",")) || "", s.fields.protocol = (c == null ? void 0 : c.protocol) || "http", s.fields.path = (c == null ? void 0 : c.path) || "", s.fields.read_timeout = c != null && c.read_timeout || (c == null ? void 0 : c.read_timeout) === 0 ? c == null ? void 0 : c.read_timeout : 6e4, s.fields.retries = c != null && c.retries || (c == null ? void 0 : c.retries) === 0 ? c == null ? void 0 : c.retries : 5, s.fields.host = (c == null ? void 0 : c.host) || "", s.fields.connect_timeout = c != null && c.connect_timeout || (c == null ? void 0 : c.connect_timeout) === 0 ? c == null ? void 0 : c.connect_timeout : 6e4, s.fields.tls_verify_enabled = (c == null ? void 0 : c.tls_verify) !== "" && (c == null ? void 0 : c.tls_verify) !== null && (c == null ? void 0 : c.tls_verify) !== void 0, s.fields.tls_verify_value = c != null && c.tls_verify ? c == null ? void 0 : c.tls_verify : !1, s.fields.ca_certificates = ((O = c == null ? void 0 : c.ca_certificates) == null ? void 0 : O.join(",")) || "", s.fields.client_certificate = ((G = c == null ? void 0 : c.client_certificate) == null ? void 0 : G.id) || "", s.fields.write_timeout = c != null && c.write_timeout || (c == null ? void 0 : c.write_timeout) === 0 ? c == null ? void 0 : c.write_timeout : 6e4, s.fields.port = c != null && c.port || (c == null ? void 0 : c.port) === 0 ? c == null ? void 0 : c.port : 80, Object.assign(E, s.fields);
|
|
4840
4816
|
}, ce = () => {
|
|
4841
4817
|
o.push(a.config.cancelRoute);
|
|
4842
4818
|
}, rt = T(() => {
|
|
4843
|
-
var
|
|
4844
|
-
let
|
|
4845
|
-
return a.config.app === "konnect" ?
|
|
4846
|
-
}),
|
|
4847
|
-
var
|
|
4848
|
-
let
|
|
4849
|
-
return a.config.app === "konnect" ?
|
|
4850
|
-
}), ot = (
|
|
4851
|
-
let
|
|
4852
|
-
|
|
4853
|
-
},
|
|
4854
|
-
var
|
|
4855
|
-
const
|
|
4819
|
+
var g, O;
|
|
4820
|
+
let c = `${a.config.apiBaseUrl}${De.form[a.config.app].validate}`;
|
|
4821
|
+
return a.config.app === "konnect" ? c = c.replace(/{controlPlaneId}/gi, ((g = a.config) == null ? void 0 : g.controlPlaneId) || "") : a.config.app === "kongManager" && (c = c.replace(/\/{workspace}/gi, (O = a.config) != null && O.workspace ? `/${a.config.workspace}` : "")), c = c.replace(/{id}/gi, a.gatewayServiceId), c;
|
|
4822
|
+
}), Me = T(() => {
|
|
4823
|
+
var g, O;
|
|
4824
|
+
let c = `${a.config.apiBaseUrl}${De.form[a.config.app][p.value]}`;
|
|
4825
|
+
return a.config.app === "konnect" ? c = c.replace(/{controlPlaneId}/gi, ((g = a.config) == null ? void 0 : g.controlPlaneId) || "") : a.config.app === "kongManager" && (c = c.replace(/\/{workspace}/gi, (O = a.config) != null && O.workspace ? `/${a.config.workspace}` : "")), c = c.replace(/{id}/gi, a.gatewayServiceId), c;
|
|
4826
|
+
}), ot = (c) => {
|
|
4827
|
+
let g = "";
|
|
4828
|
+
c.url && (g = new URL(c.url).protocol), (["https", "wss", "tls"].includes(c.protocol) || ["https", "wss", "tls"].includes(g)) && (c.tls_verify = c.tls_verify_enabled ? c.tls_verify_value : null), delete c.tls_verify_enabled, delete c.tls_verify_value;
|
|
4829
|
+
}, Se = () => {
|
|
4830
|
+
var g, O;
|
|
4831
|
+
const c = {
|
|
4856
4832
|
name: s.fields.name || null,
|
|
4857
|
-
tags: s.fields.tags ? (
|
|
4833
|
+
tags: s.fields.tags ? (g = s.fields.tags) == null ? void 0 : g.split(",").filter((G) => G !== "") : null,
|
|
4858
4834
|
protocol: s.fields.protocol,
|
|
4859
4835
|
path: s.fields.path || null,
|
|
4860
4836
|
read_timeout: s.fields.read_timeout,
|
|
@@ -4869,125 +4845,125 @@ const Zl = {
|
|
|
4869
4845
|
port: s.fields.port,
|
|
4870
4846
|
url: s.fields.url
|
|
4871
4847
|
};
|
|
4872
|
-
return s.fields.client_certificate && ["https", "wss", "tls"].includes(s.fields.protocol) && (
|
|
4873
|
-
},
|
|
4874
|
-
var
|
|
4848
|
+
return s.fields.client_certificate && ["https", "wss", "tls"].includes(s.fields.protocol) && (c.client_certificate = { id: s.fields.client_certificate }), s.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(s.fields.protocol) && (c.tls_verify = s.fields.tls_verify_value), K.value || (c.path = null), p.value === "create" ? S.value === "url" ? (delete c.protocol, delete c.host, delete c.path, a.config.app === "konnect" && delete c.port) : delete c.url : p.value === "edit" && delete c.url, c;
|
|
4849
|
+
}, Ie = async () => {
|
|
4850
|
+
var c, g, O, G;
|
|
4875
4851
|
try {
|
|
4876
4852
|
s.isReadonly = !0, U();
|
|
4877
|
-
const te =
|
|
4853
|
+
const te = Se();
|
|
4878
4854
|
let se;
|
|
4879
|
-
if (ot(te), await d.post(rt.value, te), p.value === "create" ? se = await d.post(
|
|
4855
|
+
if (ot(te), await d.post(rt.value, te), p.value === "create" ? se = await d.post(Me.value, te) : p.value === "edit" && (se = ((c = a.config) == null ? void 0 : c.app) === "konnect" ? await d.put(Me.value, te) : await d.patch(Me.value, te)), se) {
|
|
4880
4856
|
const { data: _ } = se;
|
|
4881
|
-
s.fields.name = (_ == null ? void 0 : _.name) || "", s.fields.port = _.port ||
|
|
4857
|
+
s.fields.name = (_ == null ? void 0 : _.name) || "", s.fields.port = _.port || k.getPortFromProtocol(_.protocol), s.fields.protocol = (_ == null ? void 0 : _.protocol) || "http", s.fields.host = (_ == null ? void 0 : _.host) || "", s.fields.path = (_ == null ? void 0 : _.path) || "", s.fields.url = (_ == null ? void 0 : _.url) || "", s.fields.retries = _ != null && _.retries || (_ == null ? void 0 : _.retries) === 0 ? _ == null ? void 0 : _.retries : 5, s.fields.connect_timeout = _ != null && _.connect_timeout || (_ == null ? void 0 : _.connect_timeout) === 0 ? _ == null ? void 0 : _.connect_timeout : 6e4, s.fields.write_timeout = _ != null && _.write_timeout || (_ == null ? void 0 : _.write_timeout) === 0 ? _ == null ? void 0 : _.write_timeout : 6e4, s.fields.read_timeout = _ != null && _.read_timeout || (_ == null ? void 0 : _.read_timeout) === 0 ? _ == null ? void 0 : _.read_timeout : 6e4, s.fields.client_certificate = ((g = _ == null ? void 0 : _.client_certificate) == null ? void 0 : g.id) || "", s.fields.ca_certificates = (O = _ == null ? void 0 : _.ca_certificates) != null && O.length ? _ == null ? void 0 : _.ca_certificates.join(",") : "", s.fields.tls_verify_enabled = (_ == null ? void 0 : _.tls_verify) !== "" && (_ == null ? void 0 : _.tls_verify) !== null && (_ == null ? void 0 : _.tls_verify) !== void 0, s.fields.tls_verify_value = s.fields.tls_verify_enabled && (_ == null ? void 0 : _.tls_verify), s.fields.tags = (G = _ == null ? void 0 : _.tags) != null && G.length ? _ == null ? void 0 : _.tags.join(",") : "", Object.assign(E, s.fields), t("update", se == null ? void 0 : se.data);
|
|
4882
4858
|
}
|
|
4883
4859
|
return se;
|
|
4884
4860
|
} catch (te) {
|
|
4885
|
-
s.errorMessage =
|
|
4861
|
+
s.errorMessage = u(te), t("error", te);
|
|
4886
4862
|
} finally {
|
|
4887
4863
|
s.isReadonly = !1;
|
|
4888
4864
|
}
|
|
4889
4865
|
};
|
|
4890
4866
|
return be(() => a.gatewayServiceId, () => {
|
|
4891
|
-
Object.assign(s.fields,
|
|
4892
|
-
}), be(s.fields, (
|
|
4893
|
-
s.fields.port =
|
|
4867
|
+
Object.assign(s.fields, E);
|
|
4868
|
+
}), be(s.fields, (c) => {
|
|
4869
|
+
s.fields.port = k.getPortFromProtocol(c.protocol, String(c.port)), t("model-updated", Se());
|
|
4894
4870
|
}), ai(() => {
|
|
4895
|
-
t("model-updated",
|
|
4871
|
+
t("model-updated", Se());
|
|
4896
4872
|
}), i({
|
|
4897
4873
|
validateUrl: U,
|
|
4898
|
-
getPayload:
|
|
4899
|
-
saveFormData:
|
|
4874
|
+
getPayload: Se,
|
|
4875
|
+
saveFormData: Ie,
|
|
4900
4876
|
canSubmit: Y
|
|
4901
|
-
}), (
|
|
4877
|
+
}), (c, g) => {
|
|
4902
4878
|
const O = L("KInput"), G = L("KLabel"), te = L("KRadio"), se = L("KSelect"), _ = L("KCheckbox"), qe = L("KCollapse");
|
|
4903
|
-
return
|
|
4904
|
-
|
|
4879
|
+
return h(), M("div", ps, [
|
|
4880
|
+
C(m(Sn), {
|
|
4905
4881
|
"can-submit": Y.value,
|
|
4906
4882
|
config: e.config,
|
|
4907
4883
|
"edit-id": e.gatewayServiceId,
|
|
4908
4884
|
"error-message": s.errorMessage,
|
|
4909
|
-
"fetch-url":
|
|
4885
|
+
"fetch-url": f.value,
|
|
4910
4886
|
"is-readonly": s.isReadonly,
|
|
4911
4887
|
onCancel: ce,
|
|
4912
|
-
"onFetch:error":
|
|
4888
|
+
"onFetch:error": g[25] || (g[25] = (I) => c.$emit("error", I)),
|
|
4913
4889
|
"onFetch:success": X,
|
|
4914
|
-
onLoading:
|
|
4915
|
-
onSubmit:
|
|
4890
|
+
onLoading: g[26] || (g[26] = (I) => c.$emit("loading", I)),
|
|
4891
|
+
onSubmit: Ie
|
|
4916
4892
|
}, {
|
|
4917
|
-
"form-actions":
|
|
4918
|
-
Z(
|
|
4893
|
+
"form-actions": y(() => [
|
|
4894
|
+
Z(c.$slots, "form-actions", {
|
|
4919
4895
|
canSubmit: Y.value,
|
|
4920
4896
|
cancel: ce,
|
|
4921
|
-
submit:
|
|
4897
|
+
submit: Ie
|
|
4922
4898
|
}, void 0, !0)
|
|
4923
4899
|
]),
|
|
4924
|
-
default:
|
|
4925
|
-
|
|
4926
|
-
description:
|
|
4900
|
+
default: y(() => [
|
|
4901
|
+
C(m(ti), {
|
|
4902
|
+
description: m(l)("gateway_services.form.sections.general.description"),
|
|
4927
4903
|
"hide-info-header": e.hideSectionsInfo,
|
|
4928
|
-
title:
|
|
4904
|
+
title: m(l)("gateway_services.form.sections.general.title")
|
|
4929
4905
|
}, {
|
|
4930
|
-
default:
|
|
4931
|
-
|
|
4906
|
+
default: y(() => [
|
|
4907
|
+
C(O, {
|
|
4932
4908
|
modelValue: s.fields.name,
|
|
4933
|
-
"onUpdate:modelValue":
|
|
4909
|
+
"onUpdate:modelValue": g[0] || (g[0] = (I) => s.fields.name = I),
|
|
4934
4910
|
modelModifiers: { trim: !0 },
|
|
4935
4911
|
autocomplete: "off",
|
|
4936
4912
|
"data-testid": "gateway-service-name-input",
|
|
4937
|
-
error:
|
|
4938
|
-
"error-message":
|
|
4939
|
-
label:
|
|
4940
|
-
"label-attributes": { info:
|
|
4913
|
+
error: $.value,
|
|
4914
|
+
"error-message": v.value,
|
|
4915
|
+
label: m(l)("gateway_services.form.fields.name.label"),
|
|
4916
|
+
"label-attributes": { info: m(l)("gateway_services.form.fields.name.tooltip") },
|
|
4941
4917
|
name: "name",
|
|
4942
|
-
placeholder:
|
|
4918
|
+
placeholder: m(l)("gateway_services.form.fields.name.placeholder"),
|
|
4943
4919
|
readonly: s.isReadonly,
|
|
4944
4920
|
type: "text",
|
|
4945
4921
|
onInput: ie
|
|
4946
4922
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
4947
|
-
|
|
4923
|
+
C(O, {
|
|
4948
4924
|
modelValue: s.fields.tags,
|
|
4949
|
-
"onUpdate:modelValue":
|
|
4925
|
+
"onUpdate:modelValue": g[1] || (g[1] = (I) => s.fields.tags = I),
|
|
4950
4926
|
modelModifiers: { trim: !0 },
|
|
4951
4927
|
autocomplete: "off",
|
|
4952
4928
|
"data-testid": "gateway-service-tags-input",
|
|
4953
|
-
help:
|
|
4954
|
-
label:
|
|
4955
|
-
"label-attributes": { info:
|
|
4929
|
+
help: m(l)("gateway_services.form.fields.tags.help"),
|
|
4930
|
+
label: m(l)("gateway_services.form.fields.tags.label"),
|
|
4931
|
+
"label-attributes": { info: m(l)("gateway_services.form.fields.tags.tooltip") },
|
|
4956
4932
|
name: "tags",
|
|
4957
|
-
placeholder:
|
|
4933
|
+
placeholder: m(l)("gateway_services.form.fields.tags.placeholder"),
|
|
4958
4934
|
readonly: s.isReadonly,
|
|
4959
4935
|
type: "text"
|
|
4960
4936
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
4961
4937
|
]),
|
|
4962
4938
|
_: 1
|
|
4963
4939
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
4964
|
-
|
|
4965
|
-
description:
|
|
4940
|
+
C(m(ti), {
|
|
4941
|
+
description: m(l)("gateway_services.form.sections.keys.description"),
|
|
4966
4942
|
"hide-info-header": e.hideSectionsInfo,
|
|
4967
|
-
title:
|
|
4943
|
+
title: m(l)("gateway_services.form.sections.keys.title")
|
|
4968
4944
|
}, {
|
|
4969
|
-
default:
|
|
4970
|
-
|
|
4971
|
-
F("div",
|
|
4972
|
-
|
|
4973
|
-
default:
|
|
4974
|
-
J(V(
|
|
4945
|
+
default: y(() => [
|
|
4946
|
+
b.value ? D("", !0) : (h(), M("div", fs, [
|
|
4947
|
+
F("div", ms, [
|
|
4948
|
+
C(G, { required: "" }, {
|
|
4949
|
+
default: y(() => [
|
|
4950
|
+
J(V(m(l)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
|
|
4975
4951
|
]),
|
|
4976
4952
|
_: 1
|
|
4977
4953
|
})
|
|
4978
4954
|
]),
|
|
4979
|
-
F("div",
|
|
4980
|
-
|
|
4955
|
+
F("div", gs, [
|
|
4956
|
+
C(te, {
|
|
4981
4957
|
modelValue: S.value,
|
|
4982
|
-
"onUpdate:modelValue":
|
|
4958
|
+
"onUpdate:modelValue": g[2] || (g[2] = (I) => S.value = I),
|
|
4983
4959
|
"data-testid": "gateway-service-url-radio",
|
|
4984
4960
|
"selected-value": re.url,
|
|
4985
4961
|
onChange: q
|
|
4986
4962
|
}, {
|
|
4987
|
-
default:
|
|
4988
|
-
|
|
4989
|
-
default:
|
|
4990
|
-
J(V(
|
|
4963
|
+
default: y(() => [
|
|
4964
|
+
C(G, { class: "gateway-service-url-radio-label" }, {
|
|
4965
|
+
default: y(() => [
|
|
4966
|
+
J(V(m(l)("gateway_services.form.sections.keys.urlLabel")), 1)
|
|
4991
4967
|
]),
|
|
4992
4968
|
_: 1
|
|
4993
4969
|
})
|
|
@@ -4995,34 +4971,34 @@ const Zl = {
|
|
|
4995
4971
|
_: 1
|
|
4996
4972
|
}, 8, ["modelValue", "selected-value"])
|
|
4997
4973
|
]),
|
|
4998
|
-
S.value === "url" ? (
|
|
4999
|
-
|
|
4974
|
+
S.value === "url" ? (h(), M("div", ys, [
|
|
4975
|
+
C(O, {
|
|
5000
4976
|
modelValue: s.fields.url,
|
|
5001
|
-
"onUpdate:modelValue":
|
|
4977
|
+
"onUpdate:modelValue": g[3] || (g[3] = (I) => s.fields.url = I),
|
|
5002
4978
|
modelModifiers: { trim: !0 },
|
|
5003
4979
|
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
5004
4980
|
"data-testid": "gateway-service-url-input",
|
|
5005
|
-
label:
|
|
4981
|
+
label: m(l)("gateway_services.form.fields.upstream_url.label"),
|
|
5006
4982
|
"label-attributes": {
|
|
5007
|
-
info: e.config.app === "konnect" ?
|
|
4983
|
+
info: e.config.app === "konnect" ? m(l)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : m(l)("gateway_services.form.fields.upstream_url.tooltip_for_km")
|
|
5008
4984
|
},
|
|
5009
4985
|
name: "url",
|
|
5010
|
-
placeholder:
|
|
4986
|
+
placeholder: m(l)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
5011
4987
|
required: ""
|
|
5012
4988
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
5013
|
-
])) :
|
|
5014
|
-
|
|
4989
|
+
])) : D("", !0),
|
|
4990
|
+
C(te, {
|
|
5015
4991
|
modelValue: S.value,
|
|
5016
|
-
"onUpdate:modelValue":
|
|
4992
|
+
"onUpdate:modelValue": g[4] || (g[4] = (I) => S.value = I),
|
|
5017
4993
|
"checked-group": "protocol",
|
|
5018
4994
|
"data-testid": "gateway-service-protocol-radio",
|
|
5019
4995
|
"selected-value": re.protocol,
|
|
5020
4996
|
onChange: q
|
|
5021
4997
|
}, {
|
|
5022
|
-
default:
|
|
5023
|
-
|
|
5024
|
-
default:
|
|
5025
|
-
J(V(
|
|
4998
|
+
default: y(() => [
|
|
4999
|
+
C(G, { class: "gateway-service-protocol-radio-label" }, {
|
|
5000
|
+
default: y(() => [
|
|
5001
|
+
J(V(m(l)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
|
|
5026
5002
|
]),
|
|
5027
5003
|
_: 1
|
|
5028
5004
|
})
|
|
@@ -5030,234 +5006,234 @@ const Zl = {
|
|
|
5030
5006
|
_: 1
|
|
5031
5007
|
}, 8, ["modelValue", "selected-value"])
|
|
5032
5008
|
])),
|
|
5033
|
-
S.value === "protocol" ||
|
|
5034
|
-
|
|
5009
|
+
S.value === "protocol" || b.value ? (h(), M("div", vs, [
|
|
5010
|
+
C(se, {
|
|
5035
5011
|
modelValue: s.fields.protocol,
|
|
5036
|
-
"onUpdate:modelValue":
|
|
5012
|
+
"onUpdate:modelValue": g[5] || (g[5] = (I) => s.fields.protocol = I),
|
|
5037
5013
|
appearance: "select",
|
|
5038
5014
|
"data-testid": "gateway-service-protocol-select",
|
|
5039
5015
|
items: B,
|
|
5040
|
-
label:
|
|
5016
|
+
label: m(l)("gateway_services.form.fields.protocol.label"),
|
|
5041
5017
|
"label-attributes": {
|
|
5042
|
-
info:
|
|
5018
|
+
info: m(l)("gateway_services.form.fields.protocol.tooltip")
|
|
5043
5019
|
},
|
|
5044
5020
|
readonly: s.isReadonly,
|
|
5045
5021
|
required: "",
|
|
5046
5022
|
width: "100%",
|
|
5047
|
-
onSelected:
|
|
5023
|
+
onSelected: g[6] || (g[6] = (I) => W(s.fields.protocol, I))
|
|
5048
5024
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
5049
|
-
|
|
5025
|
+
C(O, {
|
|
5050
5026
|
modelValue: s.fields.host,
|
|
5051
|
-
"onUpdate:modelValue":
|
|
5027
|
+
"onUpdate:modelValue": g[7] || (g[7] = (I) => s.fields.host = I),
|
|
5052
5028
|
modelModifiers: { trim: !0 },
|
|
5053
5029
|
class: "gateway-service-form-margin-top",
|
|
5054
5030
|
"data-testid": "gateway-service-host-input",
|
|
5055
|
-
label:
|
|
5031
|
+
label: m(l)("gateway_services.form.fields.host.label"),
|
|
5056
5032
|
"label-attributes": {
|
|
5057
|
-
info:
|
|
5033
|
+
info: m(l)("gateway_services.form.fields.host.tooltip")
|
|
5058
5034
|
},
|
|
5059
5035
|
name: "host",
|
|
5060
|
-
placeholder:
|
|
5036
|
+
placeholder: m(l)("gateway_services.form.fields.host.placeholder"),
|
|
5061
5037
|
required: ""
|
|
5062
5038
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"]),
|
|
5063
|
-
K.value ? (
|
|
5064
|
-
|
|
5039
|
+
K.value ? (h(), M("div", hs, [
|
|
5040
|
+
C(O, {
|
|
5065
5041
|
modelValue: s.fields.path,
|
|
5066
|
-
"onUpdate:modelValue":
|
|
5042
|
+
"onUpdate:modelValue": g[8] || (g[8] = (I) => s.fields.path = I),
|
|
5067
5043
|
modelModifiers: { trim: !0 },
|
|
5068
5044
|
class: "gateway-service-form-margin-top",
|
|
5069
5045
|
"data-testid": "gateway-service-path-input",
|
|
5070
|
-
label:
|
|
5046
|
+
label: m(l)("gateway_services.form.fields.path.label"),
|
|
5071
5047
|
"label-attributes": {
|
|
5072
|
-
info:
|
|
5048
|
+
info: m(l)("gateway_services.form.fields.path.tooltip")
|
|
5073
5049
|
},
|
|
5074
5050
|
name: "path",
|
|
5075
|
-
placeholder:
|
|
5051
|
+
placeholder: m(l)("gateway_services.form.fields.path.placeholder")
|
|
5076
5052
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
5077
|
-
])) :
|
|
5078
|
-
|
|
5053
|
+
])) : D("", !0),
|
|
5054
|
+
C(O, {
|
|
5079
5055
|
modelValue: s.fields.port,
|
|
5080
5056
|
"onUpdate:modelValue": [
|
|
5081
|
-
|
|
5082
|
-
|
|
5057
|
+
g[9] || (g[9] = (I) => s.fields.port = I),
|
|
5058
|
+
g[10] || (g[10] = () => {
|
|
5083
5059
|
s.fields.port = A(s.fields.port + "");
|
|
5084
5060
|
})
|
|
5085
5061
|
],
|
|
5086
5062
|
class: "gateway-service-form-margin-top",
|
|
5087
5063
|
"data-testid": "gateway-service-port-input",
|
|
5088
|
-
label:
|
|
5064
|
+
label: m(l)("gateway_services.form.fields.port.label"),
|
|
5089
5065
|
"label-attributes": {
|
|
5090
|
-
info:
|
|
5066
|
+
info: m(l)("gateway_services.form.fields.port.tooltip")
|
|
5091
5067
|
},
|
|
5092
5068
|
name: "port",
|
|
5093
5069
|
type: "number"
|
|
5094
5070
|
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
5095
|
-
])) :
|
|
5096
|
-
|
|
5071
|
+
])) : D("", !0),
|
|
5072
|
+
C(qe, {
|
|
5097
5073
|
modelValue: r.value,
|
|
5098
|
-
"onUpdate:modelValue":
|
|
5074
|
+
"onUpdate:modelValue": g[24] || (g[24] = (I) => r.value = I),
|
|
5099
5075
|
"data-testid": "advanced-fields-collapse",
|
|
5100
5076
|
"trigger-alignment": "leading",
|
|
5101
|
-
"trigger-label":
|
|
5077
|
+
"trigger-label": m(l)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
5102
5078
|
}, {
|
|
5103
|
-
default:
|
|
5104
|
-
F("div",
|
|
5105
|
-
F("div",
|
|
5106
|
-
|
|
5079
|
+
default: y(() => [
|
|
5080
|
+
F("div", bs, [
|
|
5081
|
+
F("div", ws, [
|
|
5082
|
+
C(O, {
|
|
5107
5083
|
modelValue: s.fields.retries,
|
|
5108
5084
|
"onUpdate:modelValue": [
|
|
5109
|
-
|
|
5110
|
-
|
|
5085
|
+
g[11] || (g[11] = (I) => s.fields.retries = I),
|
|
5086
|
+
g[12] || (g[12] = () => {
|
|
5111
5087
|
s.fields.retries = A(s.fields.retries + "");
|
|
5112
5088
|
})
|
|
5113
5089
|
],
|
|
5114
5090
|
autocomplete: "off",
|
|
5115
5091
|
"data-testid": "gateway-service-retries-input",
|
|
5116
|
-
label:
|
|
5117
|
-
"label-attributes": { info:
|
|
5092
|
+
label: m(l)("gateway_services.form.fields.retries.label"),
|
|
5093
|
+
"label-attributes": { info: m(l)("gateway_services.form.fields.retries.tooltip") },
|
|
5118
5094
|
name: "retries",
|
|
5119
5095
|
readonly: s.isReadonly,
|
|
5120
5096
|
type: "number"
|
|
5121
5097
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
5122
5098
|
]),
|
|
5123
|
-
F("div",
|
|
5124
|
-
|
|
5099
|
+
F("div", _s, [
|
|
5100
|
+
C(O, {
|
|
5125
5101
|
modelValue: s.fields.connect_timeout,
|
|
5126
5102
|
"onUpdate:modelValue": [
|
|
5127
|
-
|
|
5128
|
-
|
|
5103
|
+
g[13] || (g[13] = (I) => s.fields.connect_timeout = I),
|
|
5104
|
+
g[14] || (g[14] = () => {
|
|
5129
5105
|
s.fields.connect_timeout = A(s.fields.connect_timeout + "");
|
|
5130
5106
|
})
|
|
5131
5107
|
],
|
|
5132
5108
|
autocomplete: "off",
|
|
5133
5109
|
"data-testid": "gateway-service-connTimeout-input",
|
|
5134
|
-
label:
|
|
5135
|
-
"label-attributes": { info:
|
|
5110
|
+
label: m(l)("gateway_services.form.fields.connect_timeout.label"),
|
|
5111
|
+
"label-attributes": { info: m(l)("gateway_services.form.fields.connect_timeout.tooltip") },
|
|
5136
5112
|
name: "connTimeout",
|
|
5137
5113
|
readonly: s.isReadonly,
|
|
5138
5114
|
type: "number"
|
|
5139
5115
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
5140
5116
|
]),
|
|
5141
|
-
F("div",
|
|
5142
|
-
|
|
5117
|
+
F("div", ks, [
|
|
5118
|
+
C(O, {
|
|
5143
5119
|
modelValue: s.fields.write_timeout,
|
|
5144
5120
|
"onUpdate:modelValue": [
|
|
5145
|
-
|
|
5146
|
-
|
|
5121
|
+
g[15] || (g[15] = (I) => s.fields.write_timeout = I),
|
|
5122
|
+
g[16] || (g[16] = () => {
|
|
5147
5123
|
s.fields.write_timeout = A(s.fields.write_timeout + "");
|
|
5148
5124
|
})
|
|
5149
5125
|
],
|
|
5150
5126
|
autocomplete: "off",
|
|
5151
5127
|
"data-testid": "gateway-service-writeTimeout-input",
|
|
5152
|
-
label:
|
|
5153
|
-
"label-attributes": { info:
|
|
5128
|
+
label: m(l)("gateway_services.form.fields.write_timeout.label"),
|
|
5129
|
+
"label-attributes": { info: m(l)("gateway_services.form.fields.write_timeout.tooltip") },
|
|
5154
5130
|
name: "writeTimeout",
|
|
5155
5131
|
readonly: s.isReadonly,
|
|
5156
5132
|
type: "number"
|
|
5157
5133
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
5158
5134
|
]),
|
|
5159
|
-
F("div",
|
|
5160
|
-
|
|
5135
|
+
F("div", Cs, [
|
|
5136
|
+
C(O, {
|
|
5161
5137
|
modelValue: s.fields.read_timeout,
|
|
5162
5138
|
"onUpdate:modelValue": [
|
|
5163
|
-
|
|
5164
|
-
|
|
5139
|
+
g[17] || (g[17] = (I) => s.fields.read_timeout = I),
|
|
5140
|
+
g[18] || (g[18] = () => {
|
|
5165
5141
|
s.fields.read_timeout = A(s.fields.read_timeout + "");
|
|
5166
5142
|
})
|
|
5167
5143
|
],
|
|
5168
5144
|
autocomplete: "off",
|
|
5169
5145
|
"data-testid": "gateway-service-readTimeout-input",
|
|
5170
|
-
label:
|
|
5171
|
-
"label-attributes": { info:
|
|
5146
|
+
label: m(l)("gateway_services.form.fields.read_timeout.label"),
|
|
5147
|
+
"label-attributes": { info: m(l)("gateway_services.form.fields.read_timeout.tooltip") },
|
|
5172
5148
|
name: "readTimeout",
|
|
5173
5149
|
readonly: s.isReadonly,
|
|
5174
5150
|
type: "number"
|
|
5175
5151
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
5176
5152
|
]),
|
|
5177
|
-
H.value ? (
|
|
5178
|
-
|
|
5153
|
+
H.value ? (h(), M("div", Ss, [
|
|
5154
|
+
C(O, {
|
|
5179
5155
|
modelValue: s.fields.client_certificate,
|
|
5180
|
-
"onUpdate:modelValue":
|
|
5156
|
+
"onUpdate:modelValue": g[19] || (g[19] = (I) => s.fields.client_certificate = I),
|
|
5181
5157
|
modelModifiers: { trim: !0 },
|
|
5182
5158
|
autocomplete: "off",
|
|
5183
5159
|
"data-testid": "gateway-service-clientCert-input",
|
|
5184
|
-
label:
|
|
5185
|
-
"label-attributes": { info:
|
|
5160
|
+
label: m(l)("gateway_services.form.fields.client_certificate.label"),
|
|
5161
|
+
"label-attributes": { info: m(l)("gateway_services.form.fields.client_certificate.tooltip") },
|
|
5186
5162
|
name: "clientCert",
|
|
5187
|
-
placeholder:
|
|
5163
|
+
placeholder: m(l)("gateway_services.form.fields.client_certificate.placeholder"),
|
|
5188
5164
|
readonly: s.isReadonly,
|
|
5189
5165
|
type: "text"
|
|
5190
5166
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])
|
|
5191
|
-
])) :
|
|
5192
|
-
|
|
5193
|
-
|
|
5167
|
+
])) : D("", !0),
|
|
5168
|
+
R.value ? (h(), M("div", Is, [
|
|
5169
|
+
C(O, {
|
|
5194
5170
|
modelValue: s.fields.ca_certificates,
|
|
5195
|
-
"onUpdate:modelValue":
|
|
5171
|
+
"onUpdate:modelValue": g[20] || (g[20] = (I) => s.fields.ca_certificates = I),
|
|
5196
5172
|
modelModifiers: { trim: !0 },
|
|
5197
5173
|
autocomplete: "off",
|
|
5198
5174
|
"data-testid": "gateway-service-ca-certs-input",
|
|
5199
|
-
label:
|
|
5200
|
-
placeholder:
|
|
5175
|
+
label: m(l)("gateway_services.form.fields.ca_certificates.label"),
|
|
5176
|
+
placeholder: m(l)("gateway_services.form.fields.ca_certificates.placeholder"),
|
|
5201
5177
|
readonly: s.isReadonly,
|
|
5202
5178
|
type: "text"
|
|
5203
5179
|
}, {
|
|
5204
|
-
"label-tooltip":
|
|
5205
|
-
|
|
5180
|
+
"label-tooltip": y(() => [
|
|
5181
|
+
C(m(n), {
|
|
5206
5182
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
5207
5183
|
scope: "global"
|
|
5208
5184
|
}, {
|
|
5209
|
-
code1:
|
|
5210
|
-
F("code", null, V(
|
|
5185
|
+
code1: y(() => [
|
|
5186
|
+
F("code", null, V(m(l)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
5211
5187
|
]),
|
|
5212
|
-
code2:
|
|
5213
|
-
F("code", null, V(
|
|
5188
|
+
code2: y(() => [
|
|
5189
|
+
F("code", null, V(m(l)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
5214
5190
|
]),
|
|
5215
5191
|
_: 1
|
|
5216
5192
|
})
|
|
5217
5193
|
]),
|
|
5218
5194
|
_: 1
|
|
5219
5195
|
}, 8, ["modelValue", "label", "placeholder", "readonly"])
|
|
5220
|
-
])) :
|
|
5221
|
-
Q.value ? (
|
|
5222
|
-
|
|
5196
|
+
])) : D("", !0),
|
|
5197
|
+
Q.value ? (h(), M("div", As, [
|
|
5198
|
+
C(_, {
|
|
5223
5199
|
modelValue: s.fields.tls_verify_enabled,
|
|
5224
|
-
"onUpdate:modelValue":
|
|
5200
|
+
"onUpdate:modelValue": g[21] || (g[21] = (I) => s.fields.tls_verify_enabled = I),
|
|
5225
5201
|
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
5226
|
-
description:
|
|
5227
|
-
label:
|
|
5202
|
+
description: m(l)("gateway_services.form.fields.tls_verify_enabled.help"),
|
|
5203
|
+
label: m(l)("gateway_services.form.fields.tls_verify_enabled.label")
|
|
5228
5204
|
}, {
|
|
5229
|
-
tooltip:
|
|
5230
|
-
|
|
5205
|
+
tooltip: y(() => [
|
|
5206
|
+
C(m(n), {
|
|
5231
5207
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
5232
5208
|
scope: "global"
|
|
5233
5209
|
}, {
|
|
5234
|
-
code1:
|
|
5235
|
-
F("code", null, V(
|
|
5210
|
+
code1: y(() => [
|
|
5211
|
+
F("code", null, V(m(l)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
5236
5212
|
]),
|
|
5237
5213
|
_: 1
|
|
5238
5214
|
})
|
|
5239
5215
|
]),
|
|
5240
5216
|
_: 1
|
|
5241
5217
|
}, 8, ["modelValue", "description", "label"]),
|
|
5242
|
-
s.fields.tls_verify_enabled ? (
|
|
5243
|
-
|
|
5218
|
+
s.fields.tls_verify_enabled ? (h(), M("div", xs, [
|
|
5219
|
+
C(te, {
|
|
5244
5220
|
modelValue: s.fields.tls_verify_value,
|
|
5245
|
-
"onUpdate:modelValue":
|
|
5221
|
+
"onUpdate:modelValue": g[22] || (g[22] = (I) => s.fields.tls_verify_value = I),
|
|
5246
5222
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
5247
|
-
label:
|
|
5223
|
+
label: m(l)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
5248
5224
|
"selected-value": !0
|
|
5249
5225
|
}, null, 8, ["modelValue", "label"])
|
|
5250
|
-
])) :
|
|
5251
|
-
s.fields.tls_verify_enabled ? (
|
|
5252
|
-
|
|
5226
|
+
])) : D("", !0),
|
|
5227
|
+
s.fields.tls_verify_enabled ? (h(), M("div", Ts, [
|
|
5228
|
+
C(te, {
|
|
5253
5229
|
modelValue: s.fields.tls_verify_value,
|
|
5254
|
-
"onUpdate:modelValue":
|
|
5230
|
+
"onUpdate:modelValue": g[23] || (g[23] = (I) => s.fields.tls_verify_value = I),
|
|
5255
5231
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
5256
|
-
label:
|
|
5232
|
+
label: m(l)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
5257
5233
|
"selected-value": !1
|
|
5258
5234
|
}, null, 8, ["modelValue", "label"])
|
|
5259
|
-
])) :
|
|
5260
|
-
])) :
|
|
5235
|
+
])) : D("", !0)
|
|
5236
|
+
])) : D("", !0)
|
|
5261
5237
|
])
|
|
5262
5238
|
]),
|
|
5263
5239
|
_: 1
|
|
@@ -5271,7 +5247,7 @@ const Zl = {
|
|
|
5271
5247
|
]);
|
|
5272
5248
|
};
|
|
5273
5249
|
}
|
|
5274
|
-
}),
|
|
5250
|
+
}), Us = /* @__PURE__ */ aa($s, [["__scopeId", "data-v-9939382c"]]), Ms = { class: "kong-ui-gateway-service-entity-config-card" }, Rs = /* @__PURE__ */ ae({
|
|
5275
5251
|
__name: "GatewayServiceConfigCard",
|
|
5276
5252
|
props: {
|
|
5277
5253
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5298,7 +5274,7 @@ const Zl = {
|
|
|
5298
5274
|
},
|
|
5299
5275
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
5300
5276
|
setup(e) {
|
|
5301
|
-
const i = e, { i18n: { t }, i18nT: a } = Ye.useI18n(), r = T(() => De.form[i.config.app].edit), { getPropValue: o } =
|
|
5277
|
+
const i = e, { i18n: { t }, i18nT: a } = Ye.useI18n(), r = T(() => De.form[i.config.app].edit), { getPropValue: o } = ns(), n = (u, d) => o(u, d) === !0 ? t("gateway_services.form.fields.tls_verify_option.true.display") : t("gateway_services.form.fields.tls_verify_option.false.display"), l = N({
|
|
5302
5278
|
id: {},
|
|
5303
5279
|
name: {
|
|
5304
5280
|
tooltip: t("gateway_services.form.fields.name.tooltip")
|
|
@@ -5358,62 +5334,62 @@ const Zl = {
|
|
|
5358
5334
|
hidden: !0
|
|
5359
5335
|
}
|
|
5360
5336
|
});
|
|
5361
|
-
return (
|
|
5362
|
-
|
|
5337
|
+
return (u, d) => (h(), M("div", Ms, [
|
|
5338
|
+
C(m(wn), {
|
|
5363
5339
|
config: e.config,
|
|
5364
5340
|
"config-card-doc": e.configCardDoc,
|
|
5365
|
-
"config-schema":
|
|
5341
|
+
"config-schema": l.value,
|
|
5366
5342
|
"fetch-url": r.value,
|
|
5367
5343
|
"hide-title": e.hideTitle,
|
|
5368
|
-
"onCopy:success": d[0] || (d[0] = (
|
|
5369
|
-
"onFetch:error": d[1] || (d[1] = (
|
|
5370
|
-
"onFetch:success": d[2] || (d[2] = (
|
|
5371
|
-
onLoading: d[3] || (d[3] = (
|
|
5344
|
+
"onCopy:success": d[0] || (d[0] = (f) => u.$emit("copy:success", f)),
|
|
5345
|
+
"onFetch:error": d[1] || (d[1] = (f) => u.$emit("fetch:error", f)),
|
|
5346
|
+
"onFetch:success": d[2] || (d[2] = (f) => u.$emit("fetch:success", f)),
|
|
5347
|
+
onLoading: d[3] || (d[3] = (f) => u.$emit("loading", f))
|
|
5372
5348
|
}, {
|
|
5373
|
-
"enabled-label-tooltip":
|
|
5374
|
-
|
|
5349
|
+
"enabled-label-tooltip": y(() => [
|
|
5350
|
+
C(m(a), {
|
|
5375
5351
|
keypath: "gateway_services.form.fields.enabled.tooltip",
|
|
5376
5352
|
scope: "global"
|
|
5377
5353
|
}, {
|
|
5378
|
-
false:
|
|
5379
|
-
F("code", null, V(
|
|
5354
|
+
false: y(() => [
|
|
5355
|
+
F("code", null, V(m(t)("gateway_services.form.fields.enabled.false")), 1)
|
|
5380
5356
|
]),
|
|
5381
|
-
true:
|
|
5382
|
-
F("code", null, V(
|
|
5357
|
+
true: y(() => [
|
|
5358
|
+
F("code", null, V(m(t)("gateway_services.form.fields.enabled.true")), 1)
|
|
5383
5359
|
]),
|
|
5384
5360
|
_: 1
|
|
5385
5361
|
})
|
|
5386
5362
|
]),
|
|
5387
|
-
"ca_certificates-label-tooltip":
|
|
5388
|
-
|
|
5363
|
+
"ca_certificates-label-tooltip": y(() => [
|
|
5364
|
+
C(m(a), {
|
|
5389
5365
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
5390
5366
|
scope: "global"
|
|
5391
5367
|
}, {
|
|
5392
|
-
code1:
|
|
5393
|
-
F("code", null, V(
|
|
5368
|
+
code1: y(() => [
|
|
5369
|
+
F("code", null, V(m(t)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
5394
5370
|
]),
|
|
5395
|
-
code2:
|
|
5396
|
-
F("code", null, V(
|
|
5371
|
+
code2: y(() => [
|
|
5372
|
+
F("code", null, V(m(t)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
5397
5373
|
]),
|
|
5398
5374
|
_: 1
|
|
5399
5375
|
})
|
|
5400
5376
|
]),
|
|
5401
|
-
"tls_verify-label-tooltip":
|
|
5402
|
-
|
|
5377
|
+
"tls_verify-label-tooltip": y(() => [
|
|
5378
|
+
C(m(a), {
|
|
5403
5379
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
5404
5380
|
scope: "global"
|
|
5405
5381
|
}, {
|
|
5406
|
-
code1:
|
|
5407
|
-
F("code", null, V(
|
|
5382
|
+
code1: y(() => [
|
|
5383
|
+
F("code", null, V(m(t)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
5408
5384
|
]),
|
|
5409
5385
|
_: 1
|
|
5410
5386
|
})
|
|
5411
5387
|
]),
|
|
5412
|
-
tls_verify:
|
|
5413
|
-
J(V(typeof
|
|
5388
|
+
tls_verify: y((f) => [
|
|
5389
|
+
J(V(typeof m(o)("rowValue", f) == "boolean" ? n("rowValue", f) : m(t)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
5414
5390
|
]),
|
|
5415
|
-
client_certificate:
|
|
5416
|
-
J(V(
|
|
5391
|
+
client_certificate: y((f) => [
|
|
5392
|
+
J(V(m(o)("rowValue", f) ? m(o)("rowValue", f).id : "–"), 1)
|
|
5417
5393
|
]),
|
|
5418
5394
|
_: 1
|
|
5419
5395
|
}, 8, ["config", "config-card-doc", "config-schema", "fetch-url", "hide-title"])
|
|
@@ -5421,7 +5397,7 @@ const Zl = {
|
|
|
5421
5397
|
}
|
|
5422
5398
|
});
|
|
5423
5399
|
export {
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5400
|
+
Rs as GatewayServiceConfigCard,
|
|
5401
|
+
Us as GatewayServiceForm,
|
|
5402
|
+
Ps as GatewayServiceList
|
|
5427
5403
|
};
|