@kong-ui-public/entities-consumers 2.4.11-pr.1069.9fcd6ba1.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as te, ref as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { createI18n as
|
|
1
|
+
import { defineComponent as te, ref as q, computed as A, watch as be, renderSlot as Z, createCommentVNode as H, unref as f, useSlots as Ze, onBeforeMount as gt, resolveComponent as U, openBlock as d, createBlock as R, createSlots as ke, withCtx as g, createElementVNode as B, createTextVNode as Y, toDisplayString as M, createVNode as O, createElementBlock as $, renderList as pe, Fragment as me, normalizeClass as _e, withModifiers as Ge, withDirectives as Be, vShow as Le, useCssVars as cn, resolveDynamicComponent as xe, normalizeProps as br, guardReactiveProps as Cr, mergeProps as st, onMounted as kr, onUnmounted as wr, normalizeStyle as dn, inject as _r, pushScopeId as pn, popScopeId as fn, reactive as Kt } from "vue";
|
|
2
|
+
import { useRouter as yt } from "vue-router";
|
|
3
|
+
import { createI18n as ht, i18nTComponent as mn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Ir from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as Ar } from "@kong/kongponents";
|
|
6
6
|
const Sr = {
|
|
@@ -102,16 +102,16 @@ const Sr = {
|
|
|
102
102
|
consumers: Sr
|
|
103
103
|
};
|
|
104
104
|
function Tr() {
|
|
105
|
-
const e =
|
|
105
|
+
const e = ht("en-us", xr);
|
|
106
106
|
return {
|
|
107
107
|
i18n: e,
|
|
108
108
|
i18nT: mn(e)
|
|
109
109
|
// Translation component <i18n-t>
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
const
|
|
112
|
+
const Qe = {
|
|
113
113
|
useI18n: Tr
|
|
114
|
-
},
|
|
114
|
+
}, rt = "/api/runtime_groups/{controlPlaneId}", $e = "/{workspace}", Te = {
|
|
115
115
|
list: {
|
|
116
116
|
konnect: {
|
|
117
117
|
all: "/v2/control-planes/{controlPlaneId}/core-entities/consumers",
|
|
@@ -126,9 +126,9 @@ const Xe = {
|
|
|
126
126
|
},
|
|
127
127
|
form: {
|
|
128
128
|
konnect: {
|
|
129
|
-
validate: `${
|
|
130
|
-
create: `${
|
|
131
|
-
edit: `${
|
|
129
|
+
validate: `${rt}/v1/schemas/json/consumer/validate`,
|
|
130
|
+
create: `${rt}/consumers`,
|
|
131
|
+
edit: `${rt}/consumers/{id}`
|
|
132
132
|
},
|
|
133
133
|
kongManager: {
|
|
134
134
|
validate: `${$e}/schemas/consumers/validate`,
|
|
@@ -137,8 +137,8 @@ const Xe = {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
|
-
var gn = /* @__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))(gn || {}),
|
|
141
|
-
function
|
|
140
|
+
var gn = /* @__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))(gn || {}), ut = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ut || {}), 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 || {});
|
|
141
|
+
function vt(e = {}) {
|
|
142
142
|
return {
|
|
143
143
|
axiosInstance: Ir.create({
|
|
144
144
|
withCredentials: !0,
|
|
@@ -159,7 +159,7 @@ function jr() {
|
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
const
|
|
162
|
+
const at = "khcp-user-table-preferences", $r = {
|
|
163
163
|
pageSize: 30,
|
|
164
164
|
sortColumnKey: void 0,
|
|
165
165
|
sortColumnOrder: void 0
|
|
@@ -174,14 +174,14 @@ function Mr() {
|
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
176
|
}, n = () => {
|
|
177
|
-
const t = e(localStorage.getItem(
|
|
177
|
+
const t = e(localStorage.getItem(at));
|
|
178
178
|
return !t || !Object.keys(t).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(t));
|
|
179
179
|
};
|
|
180
180
|
return {
|
|
181
181
|
setTablePreferences: (t, r) => {
|
|
182
182
|
try {
|
|
183
183
|
const a = n();
|
|
184
|
-
a.set(t, r), localStorage.setItem(
|
|
184
|
+
a.set(t, r), localStorage.setItem(at, JSON.stringify(Object.fromEntries(a.entries())));
|
|
185
185
|
} catch (a) {
|
|
186
186
|
console.error("useTablePreferences(setTablePreferences)", a);
|
|
187
187
|
}
|
|
@@ -191,7 +191,7 @@ function Mr() {
|
|
|
191
191
|
return (r == null ? void 0 : r.get(t)) || void 0 || $r;
|
|
192
192
|
},
|
|
193
193
|
deleteAllTablePreferences: () => {
|
|
194
|
-
localStorage.removeItem(
|
|
194
|
+
localStorage.removeItem(at);
|
|
195
195
|
}
|
|
196
196
|
};
|
|
197
197
|
}
|
|
@@ -300,8 +300,8 @@ const Or = {
|
|
|
300
300
|
errors: Lr,
|
|
301
301
|
toggleModal: Ur
|
|
302
302
|
};
|
|
303
|
-
function
|
|
304
|
-
const e =
|
|
303
|
+
function bt() {
|
|
304
|
+
const e = ht("en-us", Pr);
|
|
305
305
|
return {
|
|
306
306
|
i18n: e,
|
|
307
307
|
i18nT: mn(e)
|
|
@@ -357,14 +357,14 @@ function Dr(e, n, t, r = {
|
|
|
357
357
|
searchKeys: ["id"]
|
|
358
358
|
}) {
|
|
359
359
|
t || (t = "100");
|
|
360
|
-
const { axiosInstance: a } =
|
|
360
|
+
const { axiosInstance: a } = vt({
|
|
361
361
|
headers: e.requestHeaders
|
|
362
|
-
}), { i18n: { t: i } } =
|
|
362
|
+
}), { i18n: { t: i } } = bt(), { debounce: o } = jr(), l = o(async (k) => {
|
|
363
363
|
await G(k);
|
|
364
|
-
}, 200), s =
|
|
365
|
-
let b = `${e.apiBaseUrl}${
|
|
364
|
+
}, 200), s = q(!1), u = q(""), p = q(""), c = q([]), y = q([]), m = q(void 0), _ = f(n);
|
|
365
|
+
let b = `${e.apiBaseUrl}${_}`;
|
|
366
366
|
e.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
367
|
-
const { isValidUuid:
|
|
367
|
+
const { isValidUuid: I } = yn(), C = async () => {
|
|
368
368
|
try {
|
|
369
369
|
s.value = !0;
|
|
370
370
|
const { data: k } = await a.get(`${b}?size=${t}`);
|
|
@@ -374,50 +374,50 @@ function Dr(e, n, t, r = {
|
|
|
374
374
|
} finally {
|
|
375
375
|
s.value = !1;
|
|
376
376
|
}
|
|
377
|
-
}, w =
|
|
378
|
-
var
|
|
377
|
+
}, w = q(""), G = async (k) => {
|
|
378
|
+
var j, L, E;
|
|
379
379
|
if (w.value !== k)
|
|
380
380
|
if (w.value = k || "", m.value === void 0)
|
|
381
381
|
try {
|
|
382
382
|
if (s.value = !0, u.value = "", p.value = "", e.app === "konnect") {
|
|
383
|
-
let
|
|
384
|
-
k && (
|
|
385
|
-
const { data:
|
|
386
|
-
r.fetchedItemsKey in
|
|
383
|
+
let h = b + "";
|
|
384
|
+
k && (h += `/${k}`);
|
|
385
|
+
const { data: v } = await a.get(`${h}?size=${t}`);
|
|
386
|
+
r.fetchedItemsKey in v ? c.value = v[r.fetchedItemsKey] : v != null && v.id ? c.value = [v] : c.value = [];
|
|
387
387
|
} else if (k) {
|
|
388
|
-
const
|
|
389
|
-
|
|
390
|
-
const { data:
|
|
391
|
-
return [
|
|
392
|
-
})()) :
|
|
393
|
-
...r.searchKeys.filter((
|
|
394
|
-
const { data: D } = await a.get(`${b}?${
|
|
388
|
+
const h = [];
|
|
389
|
+
I(k) && r.searchKeys.includes("id") ? h.push((async () => {
|
|
390
|
+
const { data: S } = await a.get(`${b}/${k}`);
|
|
391
|
+
return [S[r.fetchedItemsKey] ?? S];
|
|
392
|
+
})()) : h.push(
|
|
393
|
+
...r.searchKeys.filter((S) => S !== "id").map(async (S) => {
|
|
394
|
+
const { data: D } = await a.get(`${b}?${S}=${k}`);
|
|
395
395
|
return D[r.fetchedItemsKey];
|
|
396
396
|
})
|
|
397
397
|
);
|
|
398
|
-
const
|
|
399
|
-
c.value = [], (
|
|
398
|
+
const v = await Promise.all(h), K = /* @__PURE__ */ new Set();
|
|
399
|
+
c.value = [], (j = v == null ? void 0 : v.forEach) == null || j.call(v, (S) => {
|
|
400
400
|
var D;
|
|
401
|
-
(D =
|
|
402
|
-
|
|
401
|
+
(D = S == null ? void 0 : S.forEach) == null || D.call(S, (x) => {
|
|
402
|
+
K.has(x.id) || (K.add(x.id), c.value.push(x));
|
|
403
403
|
});
|
|
404
404
|
});
|
|
405
405
|
} else
|
|
406
406
|
c.value = y.value;
|
|
407
|
-
} catch (
|
|
408
|
-
((
|
|
407
|
+
} catch (h) {
|
|
408
|
+
((L = h == null ? void 0 : h.response) == null ? void 0 : L.status) === 404 ? p.value = i("debouncedFilter.errors.invalid") : (c.value = [], u.value = i("debouncedFilter.errors.fetch"));
|
|
409
409
|
} finally {
|
|
410
410
|
s.value = !1;
|
|
411
411
|
}
|
|
412
412
|
else
|
|
413
|
-
s.value = !0, p.value = "", k ? (c.value = (
|
|
414
|
-
var
|
|
415
|
-
let
|
|
416
|
-
for (const
|
|
417
|
-
const D = typeof
|
|
418
|
-
D != null && D.includes(k.toLowerCase()) && (
|
|
413
|
+
s.value = !0, p.value = "", k ? (c.value = (E = m.value) == null ? void 0 : E.filter((h) => {
|
|
414
|
+
var v;
|
|
415
|
+
let K = !1;
|
|
416
|
+
for (const S of r.searchKeys) {
|
|
417
|
+
const D = typeof h[S] == "string" ? (v = h[S]) == null ? void 0 : v.toLowerCase() : h[S];
|
|
418
|
+
D != null && D.includes(k.toLowerCase()) && (K = !0);
|
|
419
419
|
}
|
|
420
|
-
return
|
|
420
|
+
return K;
|
|
421
421
|
}), (!c.value || !c.value.length) && (p.value = i("debouncedFilter.errors.invalid"))) : c.value = m.value, s.value = !1;
|
|
422
422
|
};
|
|
423
423
|
return {
|
|
@@ -431,13 +431,13 @@ function Dr(e, n, t, r = {
|
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
433
|
function Rr(e, n) {
|
|
434
|
-
const t = f(n), r =
|
|
434
|
+
const t = f(n), r = A(
|
|
435
435
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
436
436
|
);
|
|
437
437
|
return r.value.search = "", (a) => `${r.value.href}/${a}`;
|
|
438
438
|
}
|
|
439
439
|
function Vr() {
|
|
440
|
-
const { i18n: { t: e } } =
|
|
440
|
+
const { i18n: { t: e } } = bt();
|
|
441
441
|
return {
|
|
442
442
|
getMessageFromError: (n) => {
|
|
443
443
|
var t, r, a, i;
|
|
@@ -478,17 +478,17 @@ function Gr(e) {
|
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
function hn(e, n) {
|
|
481
|
-
const t =
|
|
481
|
+
const t = q(f(e)), r = q(f(n)), a = A(
|
|
482
482
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
483
|
-
), i =
|
|
483
|
+
), i = A(
|
|
484
484
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
485
485
|
);
|
|
486
486
|
return (o) => {
|
|
487
487
|
const { page: l, pageSize: s, offset: u, sortColumnKey: p, sortColumnOrder: c, query: y } = o;
|
|
488
488
|
try {
|
|
489
489
|
let m = new URL(i.value.href);
|
|
490
|
-
return a.value && y ? (m.search = "", m = t.value.app === "konnect" ? new URL(`${m.href}?filter[name][contains]=${y}`) : new URL(`${m.href}/${y}/`)) : (a.value || new URLSearchParams(y).forEach((
|
|
491
|
-
m.searchParams.append(b,
|
|
490
|
+
return a.value && y ? (m.search = "", m = t.value.app === "konnect" ? new URL(`${m.href}?filter[name][contains]=${y}`) : new URL(`${m.href}/${y}/`)) : (a.value || new URLSearchParams(y).forEach((_, b) => {
|
|
491
|
+
m.searchParams.append(b, _);
|
|
492
492
|
}), p && m.searchParams.append("sort_by", p), c === "desc" && m.searchParams.append("sort_desc", "1"), m.searchParams.append("size", String(s))), u && l !== 1 && m.searchParams.append("offset", String(u)), m.href;
|
|
493
493
|
} catch (m) {
|
|
494
494
|
return console.error("RouteList(fetcher)", m), r.value;
|
|
@@ -496,9 +496,9 @@ function hn(e, n) {
|
|
|
496
496
|
};
|
|
497
497
|
}
|
|
498
498
|
function Hr(e, n, t = "data") {
|
|
499
|
-
const r = f(n), { axiosInstance: a } =
|
|
499
|
+
const r = f(n), { axiosInstance: a } = vt({
|
|
500
500
|
headers: e.requestHeaders
|
|
501
|
-
}), i = hn(e, r), o =
|
|
501
|
+
}), i = hn(e, r), o = q({
|
|
502
502
|
status: Ae.Idle
|
|
503
503
|
});
|
|
504
504
|
return { fetcher: async (l) => {
|
|
@@ -602,15 +602,15 @@ function Xr(e) {
|
|
|
602
602
|
return !(o && Dt(a, o, "<") || l && Dt(a, l, ">"));
|
|
603
603
|
}
|
|
604
604
|
function ea(e) {
|
|
605
|
-
const n =
|
|
605
|
+
const n = q(0), t = q(0), r = q(!1);
|
|
606
606
|
return be(e, (a) => {
|
|
607
607
|
a && !r.value && (n.value = a.offsetWidth, t.value = a.scrollWidth, r.value = !0);
|
|
608
608
|
}), {
|
|
609
|
-
isTruncated:
|
|
609
|
+
isTruncated: A(() => n.value < t.value)
|
|
610
610
|
};
|
|
611
611
|
}
|
|
612
612
|
const oe = {
|
|
613
|
-
useAxios:
|
|
613
|
+
useAxios: vt,
|
|
614
614
|
useDebouncedFilter: Dr,
|
|
615
615
|
useDeleteUrlBuilder: Rr,
|
|
616
616
|
useErrors: Vr,
|
|
@@ -619,7 +619,7 @@ const oe = {
|
|
|
619
619
|
useFetchUrlBuilder: hn,
|
|
620
620
|
useHelpers: yn,
|
|
621
621
|
useStringHelpers: zr,
|
|
622
|
-
useI18n:
|
|
622
|
+
useI18n: bt,
|
|
623
623
|
useGatewayFeatureSupported: Xr,
|
|
624
624
|
useTruncationDetector: ea
|
|
625
625
|
}, ta = {
|
|
@@ -694,7 +694,7 @@ const oe = {
|
|
|
694
694
|
}
|
|
695
695
|
},
|
|
696
696
|
setup(e) {
|
|
697
|
-
const n = e, t =
|
|
697
|
+
const n = e, t = A(() => {
|
|
698
698
|
if (typeof n.size == "number" && n.size > 0)
|
|
699
699
|
return `${n.size}px`;
|
|
700
700
|
if (typeof n.size == "string") {
|
|
@@ -703,7 +703,7 @@ const oe = {
|
|
|
703
703
|
return `${i}px`;
|
|
704
704
|
}
|
|
705
705
|
return Vt;
|
|
706
|
-
}), r =
|
|
706
|
+
}), r = A(() => ({
|
|
707
707
|
boxSizing: "border-box",
|
|
708
708
|
color: n.color,
|
|
709
709
|
display: n.display,
|
|
@@ -779,19 +779,19 @@ const oe = {
|
|
|
779
779
|
},
|
|
780
780
|
emits: ["success", "error"],
|
|
781
781
|
setup(e, { emit: n }) {
|
|
782
|
-
const { t } =
|
|
783
|
-
}), o =
|
|
782
|
+
const { t } = ht("en-us", ra), r = e, a = n, i = r.notify || _r(aa, () => {
|
|
783
|
+
}), o = A(() => r.idTooltip ? {
|
|
784
784
|
label: r.idTooltip,
|
|
785
785
|
positionFixed: !0,
|
|
786
786
|
placement: "bottomStart"
|
|
787
787
|
} : {
|
|
788
788
|
title: r.uuid
|
|
789
|
-
}), l =
|
|
789
|
+
}), l = A(() => !!(r.tooltip && r.successTooltip)), s = q(r.tooltip), u = A(() => r.tooltip ? {
|
|
790
790
|
label: s.value,
|
|
791
791
|
positionFixed: !0,
|
|
792
792
|
maxWidth: "500px",
|
|
793
793
|
placement: "bottomStart"
|
|
794
|
-
} : {}), p =
|
|
794
|
+
} : {}), p = A(() => {
|
|
795
795
|
var m;
|
|
796
796
|
return r.format === "redacted" ? "*****" : r.format === "deleted" ? `*${(m = r.uuid) == null ? void 0 : m.substring(0, 5)}` : r.uuid;
|
|
797
797
|
}), c = (m) => {
|
|
@@ -799,7 +799,7 @@ const oe = {
|
|
|
799
799
|
s.value = r.tooltip;
|
|
800
800
|
}, 1800);
|
|
801
801
|
}, y = (m) => {
|
|
802
|
-
var
|
|
802
|
+
var _, b;
|
|
803
803
|
if (!m(r.uuid)) {
|
|
804
804
|
typeof i == "function" && i({
|
|
805
805
|
type: "error",
|
|
@@ -807,16 +807,16 @@ const oe = {
|
|
|
807
807
|
}), l.value ? c(t("message.fail")) : a("error", r.uuid);
|
|
808
808
|
return;
|
|
809
809
|
}
|
|
810
|
-
const
|
|
810
|
+
const I = ((_ = r.uuid) == null ? void 0 : _.length) > Gt, C = r.format === "hidden" || r.format === "redacted" ? t("message.success.prefix") : `"${((b = r.uuid) == null ? void 0 : b.substring(0, Gt)) + (I ? "..." : "")}"`;
|
|
811
811
|
typeof i == "function" && i({
|
|
812
812
|
type: "success",
|
|
813
813
|
message: `${C}${t("message.success.content")}`
|
|
814
814
|
}), l.value ? c(r.successTooltip) : a("success", r.uuid);
|
|
815
815
|
};
|
|
816
|
-
return (m,
|
|
816
|
+
return (m, _) => {
|
|
817
817
|
const b = U("KClipboardProvider");
|
|
818
818
|
return d(), $("div", fa, [
|
|
819
|
-
e.format !== "hidden" ? (d(), R(xe(e.idTooltip ? "KTooltip" : "div"),
|
|
819
|
+
e.format !== "hidden" ? (d(), R(xe(e.idTooltip ? "KTooltip" : "div"), st({ key: 0 }, o.value, { "data-testid": "copy-id" }), {
|
|
820
820
|
default: g(() => [
|
|
821
821
|
B("div", {
|
|
822
822
|
class: _e([
|
|
@@ -828,15 +828,15 @@ const oe = {
|
|
|
828
828
|
]),
|
|
829
829
|
_: 1
|
|
830
830
|
}, 16)) : H("", !0),
|
|
831
|
-
(d(), R(xe(e.tooltip ? "KTooltip" : "div"),
|
|
831
|
+
(d(), R(xe(e.tooltip ? "KTooltip" : "div"), st(u.value, { class: "uuid-icon-wrapper" }), {
|
|
832
832
|
default: g(() => [
|
|
833
833
|
O(b, null, {
|
|
834
|
-
default: g(({ copyToClipboard:
|
|
834
|
+
default: g(({ copyToClipboard: I }) => [
|
|
835
835
|
B("span", {
|
|
836
836
|
"data-testid": "copy-to-clipboard",
|
|
837
837
|
role: "button",
|
|
838
838
|
tabindex: "0",
|
|
839
|
-
onClick: Ge((C) => y(
|
|
839
|
+
onClick: Ge((C) => y(I), ["stop"])
|
|
840
840
|
}, [
|
|
841
841
|
O(f(da), {
|
|
842
842
|
class: "uuid-icon",
|
|
@@ -880,10 +880,10 @@ const oe = {
|
|
|
880
880
|
}
|
|
881
881
|
},
|
|
882
882
|
setup(e) {
|
|
883
|
-
const n = e, { i18n: { t } } = oe.useI18n(), { convertKeyToTitle: r } = oe.useStringHelpers(), a =
|
|
883
|
+
const n = e, { i18n: { t } } = oe.useI18n(), { convertKeyToTitle: r } = oe.useStringHelpers(), a = A(() => n.item.key ?? "json-array-item"), i = A(() => n.item.value ?? n.item), o = A(() => {
|
|
884
884
|
const s = JSON.parse(JSON.stringify(i.value));
|
|
885
885
|
return n.isArrayItem && delete s.name, s;
|
|
886
|
-
}), l =
|
|
886
|
+
}), l = A(() => {
|
|
887
887
|
var s;
|
|
888
888
|
return n.isArrayItem ? (s = i.value) != null && s.name ? r(i.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
889
889
|
});
|
|
@@ -894,7 +894,7 @@ const oe = {
|
|
|
894
894
|
e.isArrayItem ? (d(), $("legend", ha, [
|
|
895
895
|
B("b", null, M(l.value), 1)
|
|
896
896
|
])) : H("", !0),
|
|
897
|
-
(d(!0), $(me, null, pe(Object.keys(o.value), (p, c) => (d(), R(
|
|
897
|
+
(d(!0), $(me, null, pe(Object.keys(o.value), (p, c) => (d(), R(Ct, {
|
|
898
898
|
key: `${a.value}-property-${c}`,
|
|
899
899
|
item: {
|
|
900
900
|
key: p,
|
|
@@ -983,13 +983,13 @@ const oe = {
|
|
|
983
983
|
},
|
|
984
984
|
emits: ["navigation-click"],
|
|
985
985
|
setup(e, { emit: n }) {
|
|
986
|
-
cn((
|
|
986
|
+
cn((_) => ({
|
|
987
987
|
"0da74440": p.value ? "none" : `solid ${f(Aa)} ${f(_a)}`,
|
|
988
988
|
"02a039da": u.value && l.value ? "block" : "flex",
|
|
989
989
|
"690f3ced": u.value && l.value ? "100%" : t.slim ? "50%" : "25%",
|
|
990
990
|
"691182c8": u.value && l.value ? "100%" : t.slim ? "50%" : "75%"
|
|
991
991
|
}));
|
|
992
|
-
const t = e, r = n, a =
|
|
992
|
+
const t = e, r = n, a = Ze(), { i18n: { t: i, formatUnixTimeStamp: o } } = oe.useI18n(), l = A(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = A(() => !!(t.item.tooltip || a["label-tooltip"])), u = A(() => t.item.type === ee.Json || t.item.type === ee.JsonArray), p = A(() => t.item.type === ee.JsonArray), c = A(() => {
|
|
993
993
|
switch (t.item.type) {
|
|
994
994
|
case ee.ID:
|
|
995
995
|
return {
|
|
@@ -1075,8 +1075,8 @@ const oe = {
|
|
|
1075
1075
|
attrs: {
|
|
1076
1076
|
"data-testid": `${t.item.key}-internal-link`,
|
|
1077
1077
|
item: t.item,
|
|
1078
|
-
onNavigationClick: (
|
|
1079
|
-
r("navigation-click",
|
|
1078
|
+
onNavigationClick: (_) => {
|
|
1079
|
+
r("navigation-click", _);
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
1082
|
};
|
|
@@ -1115,16 +1115,16 @@ const oe = {
|
|
|
1115
1115
|
text: t.item.value
|
|
1116
1116
|
};
|
|
1117
1117
|
}
|
|
1118
|
-
}), y =
|
|
1119
|
-
return (
|
|
1120
|
-
const
|
|
1118
|
+
}), y = q(), { isTruncated: m } = oe.useTruncationDetector(y);
|
|
1119
|
+
return (_, b) => {
|
|
1120
|
+
const I = U("KLabel"), C = U("KBadge"), w = U("KTooltip");
|
|
1121
1121
|
return d(), $("div", xa, [
|
|
1122
1122
|
B("div", {
|
|
1123
1123
|
class: "config-card-details-label",
|
|
1124
1124
|
"data-testid": `${e.item.key}-label`
|
|
1125
1125
|
}, [
|
|
1126
|
-
Z(
|
|
1127
|
-
O(
|
|
1126
|
+
Z(_.$slots, "label", { item: e.item }, () => [
|
|
1127
|
+
O(I, { "tooltip-attributes": { maxWidth: "500px" } }, ke({
|
|
1128
1128
|
default: g(() => [
|
|
1129
1129
|
Y(M(e.item.label) + " ", 1)
|
|
1130
1130
|
]),
|
|
@@ -1136,7 +1136,7 @@ const oe = {
|
|
|
1136
1136
|
B("div", {
|
|
1137
1137
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1138
1138
|
}, [
|
|
1139
|
-
Z(
|
|
1139
|
+
Z(_.$slots, "label-tooltip", {}, () => [
|
|
1140
1140
|
Y(M(e.item.tooltip), 1)
|
|
1141
1141
|
], !0)
|
|
1142
1142
|
], 8, ja)
|
|
@@ -1150,7 +1150,7 @@ const oe = {
|
|
|
1150
1150
|
class: "config-card-details-value",
|
|
1151
1151
|
"data-testid": `${e.item.key}-property-value`
|
|
1152
1152
|
}, [
|
|
1153
|
-
Z(
|
|
1153
|
+
Z(_.$slots, e.item.key, {
|
|
1154
1154
|
rowValue: e.item.value
|
|
1155
1155
|
}, () => [
|
|
1156
1156
|
l.value ? (d(), $("div", Oa, [
|
|
@@ -1178,7 +1178,7 @@ const oe = {
|
|
|
1178
1178
|
class: "copy-uuid-array",
|
|
1179
1179
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1180
1180
|
}, [
|
|
1181
|
-
(d(!0), $(me, null, pe(e.item.value, (G, k) => (d(), R(f(Cn),
|
|
1181
|
+
(d(!0), $(me, null, pe(e.item.value, (G, k) => (d(), R(f(Cn), st(c.value.childAttrs, {
|
|
1182
1182
|
key: `${e.item.key}-copy-uuid-${k}`,
|
|
1183
1183
|
"data-testid": `${e.item.key}-copy-uuid-${k}`,
|
|
1184
1184
|
uuid: G
|
|
@@ -1235,7 +1235,7 @@ const oe = {
|
|
|
1235
1235
|
]);
|
|
1236
1236
|
};
|
|
1237
1237
|
}
|
|
1238
|
-
}),
|
|
1238
|
+
}), Ct = /* @__PURE__ */ ge(Ba, [["__scopeId", "data-v-9c87856b"]]), La = { class: "json-config" }, Ua = {
|
|
1239
1239
|
key: 0,
|
|
1240
1240
|
class: "json-endpoint"
|
|
1241
1241
|
}, wn = /* @__PURE__ */ te({
|
|
@@ -1267,9 +1267,9 @@ const oe = {
|
|
|
1267
1267
|
},
|
|
1268
1268
|
setup(e) {
|
|
1269
1269
|
cn((a) => ({
|
|
1270
|
-
|
|
1270
|
+
"2d178975": `${r.value}ch`
|
|
1271
1271
|
}));
|
|
1272
|
-
const n = e, t =
|
|
1272
|
+
const n = e, t = A(() => n.jsonRecord), r = A(() => {
|
|
1273
1273
|
var a;
|
|
1274
1274
|
if (!n.fetcherUrl)
|
|
1275
1275
|
return 0;
|
|
@@ -1301,7 +1301,7 @@ const oe = {
|
|
|
1301
1301
|
key: 1,
|
|
1302
1302
|
id: "json-codeblock",
|
|
1303
1303
|
class: _e({ "json-content": n.fetcherUrl }),
|
|
1304
|
-
code: JSON.stringify(t, null, 2),
|
|
1304
|
+
code: JSON.stringify(t.value, null, 2),
|
|
1305
1305
|
language: "json",
|
|
1306
1306
|
theme: "dark"
|
|
1307
1307
|
}, null, 8, ["class", "code"])) : H("", !0)
|
|
@@ -1358,7 +1358,7 @@ Ue.prototype.toString = function(e) {
|
|
|
1358
1358
|
return this.name + ": " + In(this, e);
|
|
1359
1359
|
};
|
|
1360
1360
|
var se = Ue;
|
|
1361
|
-
function
|
|
1361
|
+
function ot(e, n, t, r, a) {
|
|
1362
1362
|
var i = "", o = "", l = Math.floor(a / 2) - 1;
|
|
1363
1363
|
return r - n > l && (i = " ... ", n = r - l + i.length), t - r > l && (o = " ...", t = r + l - o.length), {
|
|
1364
1364
|
str: i + e.slice(n, t).replace(/\t/g, "→") + o,
|
|
@@ -1366,7 +1366,7 @@ function it(e, n, t, r, a) {
|
|
|
1366
1366
|
// relative position
|
|
1367
1367
|
};
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1369
|
+
function it(e, n) {
|
|
1370
1370
|
return ae.repeat(" ", n - e.length) + e;
|
|
1371
1371
|
}
|
|
1372
1372
|
function Qa(e, n) {
|
|
@@ -1378,24 +1378,24 @@ function Qa(e, n) {
|
|
|
1378
1378
|
o < 0 && (o = r.length - 1);
|
|
1379
1379
|
var l = "", s, u, p = Math.min(e.line + n.linesAfter, a.length).toString().length, c = n.maxLength - (n.indent + p + 3);
|
|
1380
1380
|
for (s = 1; s <= n.linesBefore && !(o - s < 0); s++)
|
|
1381
|
-
u =
|
|
1381
|
+
u = ot(
|
|
1382
1382
|
e.buffer,
|
|
1383
1383
|
r[o - s],
|
|
1384
1384
|
a[o - s],
|
|
1385
1385
|
e.position - (r[o] - r[o - s]),
|
|
1386
1386
|
c
|
|
1387
|
-
), l = ae.repeat(" ", n.indent) +
|
|
1387
|
+
), l = ae.repeat(" ", n.indent) + it((e.line - s + 1).toString(), p) + " | " + u.str + `
|
|
1388
1388
|
` + l;
|
|
1389
|
-
for (u =
|
|
1389
|
+
for (u = ot(e.buffer, r[o], a[o], e.position, c), l += ae.repeat(" ", n.indent) + it((e.line + 1).toString(), p) + " | " + u.str + `
|
|
1390
1390
|
`, l += ae.repeat("-", n.indent + p + 3 + u.pos) + `^
|
|
1391
1391
|
`, s = 1; s <= n.linesAfter && !(o + s >= a.length); s++)
|
|
1392
|
-
u =
|
|
1392
|
+
u = ot(
|
|
1393
1393
|
e.buffer,
|
|
1394
1394
|
r[o + s],
|
|
1395
1395
|
a[o + s],
|
|
1396
1396
|
e.position - (r[o] - r[o + s]),
|
|
1397
1397
|
c
|
|
1398
|
-
), l += ae.repeat(" ", n.indent) +
|
|
1398
|
+
), l += ae.repeat(" ", n.indent) + it((e.line + s + 1).toString(), p) + " | " + u.str + `
|
|
1399
1399
|
`;
|
|
1400
1400
|
return l.replace(/\n$/, "");
|
|
1401
1401
|
}
|
|
@@ -1464,10 +1464,10 @@ function ao() {
|
|
|
1464
1464
|
arguments[n].forEach(r);
|
|
1465
1465
|
return e;
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1467
|
+
function ct(e) {
|
|
1468
1468
|
return this.extend(e);
|
|
1469
1469
|
}
|
|
1470
|
-
|
|
1470
|
+
ct.prototype.extend = function(e) {
|
|
1471
1471
|
var n = [], t = [];
|
|
1472
1472
|
if (e instanceof ie)
|
|
1473
1473
|
t.push(e);
|
|
@@ -1488,10 +1488,10 @@ dt.prototype.extend = function(e) {
|
|
|
1488
1488
|
if (!(a instanceof ie))
|
|
1489
1489
|
throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1490
1490
|
});
|
|
1491
|
-
var r = Object.create(
|
|
1491
|
+
var r = Object.create(ct.prototype);
|
|
1492
1492
|
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = Ht(r, "implicit"), r.compiledExplicit = Ht(r, "explicit"), r.compiledTypeMap = ao(r.compiledImplicit, r.compiledExplicit), r;
|
|
1493
1493
|
};
|
|
1494
|
-
var An =
|
|
1494
|
+
var An = ct, Sn = new ie("tag:yaml.org,2002:str", {
|
|
1495
1495
|
kind: "scalar",
|
|
1496
1496
|
construct: function(e) {
|
|
1497
1497
|
return e !== null ? e : "";
|
|
@@ -1780,12 +1780,12 @@ function xo(e) {
|
|
|
1780
1780
|
var Ln = new ie("tag:yaml.org,2002:merge", {
|
|
1781
1781
|
kind: "scalar",
|
|
1782
1782
|
resolve: xo
|
|
1783
|
-
}),
|
|
1783
|
+
}), kt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1784
1784
|
\r`;
|
|
1785
1785
|
function To(e) {
|
|
1786
1786
|
if (e === null)
|
|
1787
1787
|
return !1;
|
|
1788
|
-
var n, t, r = 0, a = e.length, i =
|
|
1788
|
+
var n, t, r = 0, a = e.length, i = kt;
|
|
1789
1789
|
for (t = 0; t < a; t++)
|
|
1790
1790
|
if (n = i.indexOf(e.charAt(t)), !(n > 64)) {
|
|
1791
1791
|
if (n < 0)
|
|
@@ -1795,13 +1795,13 @@ function To(e) {
|
|
|
1795
1795
|
return r % 8 === 0;
|
|
1796
1796
|
}
|
|
1797
1797
|
function jo(e) {
|
|
1798
|
-
var n, t, r = e.replace(/[\r\n=]/g, ""), a = r.length, i =
|
|
1798
|
+
var n, t, r = e.replace(/[\r\n=]/g, ""), a = r.length, i = kt, o = 0, l = [];
|
|
1799
1799
|
for (n = 0; n < a; n++)
|
|
1800
1800
|
n % 4 === 0 && n && (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)), o = o << 6 | i.indexOf(r.charAt(n));
|
|
1801
1801
|
return t = a % 4 * 6, t === 0 ? (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)) : t === 18 ? (l.push(o >> 10 & 255), l.push(o >> 2 & 255)) : t === 12 && l.push(o >> 4 & 255), new Uint8Array(l);
|
|
1802
1802
|
}
|
|
1803
1803
|
function $o(e) {
|
|
1804
|
-
var n = "", t = 0, r, a, i = e.length, o =
|
|
1804
|
+
var n = "", t = 0, r, a, i = e.length, o = kt;
|
|
1805
1805
|
for (r = 0; r < i; r++)
|
|
1806
1806
|
r % 3 === 0 && r && (n += o[t >> 18 & 63], n += o[t >> 12 & 63], n += o[t >> 6 & 63], n += o[t & 63]), t = (t << 8) + e[r];
|
|
1807
1807
|
return a = i % 3, a === 0 ? (n += o[t >> 18 & 63], n += o[t >> 12 & 63], n += o[t >> 6 & 63], n += o[t & 63]) : a === 2 ? (n += o[t >> 10 & 63], n += o[t >> 4 & 63], n += o[t << 2 & 63], n += o[64]) : a === 1 && (n += o[t >> 2 & 63], n += o[t << 4 & 63], n += o[64], n += o[64]), n;
|
|
@@ -1886,7 +1886,7 @@ var Rn = new ie("tag:yaml.org,2002:set", {
|
|
|
1886
1886
|
kind: "mapping",
|
|
1887
1887
|
resolve: Uo,
|
|
1888
1888
|
construct: Po
|
|
1889
|
-
}),
|
|
1889
|
+
}), wt = Nn.extend({
|
|
1890
1890
|
implicit: [
|
|
1891
1891
|
Bn,
|
|
1892
1892
|
Ln
|
|
@@ -1897,7 +1897,7 @@ var Rn = new ie("tag:yaml.org,2002:set", {
|
|
|
1897
1897
|
Dn,
|
|
1898
1898
|
Rn
|
|
1899
1899
|
]
|
|
1900
|
-
}), Ie = Object.prototype.hasOwnProperty,
|
|
1900
|
+
}), Ie = Object.prototype.hasOwnProperty, He = 1, Vn = 2, Gn = 3, ze = 4, lt = 1, Do = 2, zt = 3, Ro = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Vo = /[\x85\u2028\u2029]/, Go = /[,\[\]\{\}]/, Hn = /^(?:!|!!|![a-z\-]+!)$/i, zn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1901
1901
|
function Jt(e) {
|
|
1902
1902
|
return Object.prototype.toString.call(e);
|
|
1903
1903
|
}
|
|
@@ -1937,7 +1937,7 @@ var Jn = new Array(256), Yn = new Array(256);
|
|
|
1937
1937
|
for (var Me = 0; Me < 256; Me++)
|
|
1938
1938
|
Jn[Me] = Yt(Me) ? 1 : 0, Yn[Me] = Yt(Me);
|
|
1939
1939
|
function Wo(e, n) {
|
|
1940
|
-
this.input = e, this.filename = n.filename || null, this.schema = n.schema ||
|
|
1940
|
+
this.input = e, this.filename = n.filename || null, this.schema = n.schema || wt, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1941
1941
|
}
|
|
1942
1942
|
function Wn(e, n) {
|
|
1943
1943
|
var t = {
|
|
@@ -1950,24 +1950,24 @@ function Wn(e, n) {
|
|
|
1950
1950
|
};
|
|
1951
1951
|
return t.snippet = Xa(t), new se(n, t);
|
|
1952
1952
|
}
|
|
1953
|
-
function
|
|
1953
|
+
function N(e, n) {
|
|
1954
1954
|
throw Wn(e, n);
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1956
|
+
function Je(e, n) {
|
|
1957
1957
|
e.onWarning && e.onWarning.call(null, Wn(e, n));
|
|
1958
1958
|
}
|
|
1959
1959
|
var Wt = {
|
|
1960
1960
|
YAML: function(e, n, t) {
|
|
1961
1961
|
var r, a, i;
|
|
1962
|
-
e.version !== null &&
|
|
1962
|
+
e.version !== null && N(e, "duplication of %YAML directive"), t.length !== 1 && N(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), r === null && N(e, "ill-formed argument of the YAML directive"), a = parseInt(r[1], 10), i = parseInt(r[2], 10), a !== 1 && N(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = i < 2, i !== 1 && i !== 2 && Je(e, "unsupported YAML version of the document");
|
|
1963
1963
|
},
|
|
1964
1964
|
TAG: function(e, n, t) {
|
|
1965
1965
|
var r, a;
|
|
1966
|
-
t.length !== 2 &&
|
|
1966
|
+
t.length !== 2 && N(e, "TAG directive accepts exactly two arguments"), r = t[0], a = t[1], Hn.test(r) || N(e, "ill-formed tag handle (first argument) of the TAG directive"), Ie.call(e.tagMap, r) && N(e, 'there is a previously declared suffix for "' + r + '" tag handle'), zn.test(a) || N(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1967
1967
|
try {
|
|
1968
1968
|
a = decodeURIComponent(a);
|
|
1969
1969
|
} catch {
|
|
1970
|
-
|
|
1970
|
+
N(e, "tag prefix is malformed: " + a);
|
|
1971
1971
|
}
|
|
1972
1972
|
e.tagMap[r] = a;
|
|
1973
1973
|
}
|
|
@@ -1977,22 +1977,22 @@ function we(e, n, t, r) {
|
|
|
1977
1977
|
if (n < t) {
|
|
1978
1978
|
if (l = e.input.slice(n, t), r)
|
|
1979
1979
|
for (a = 0, i = l.length; a < i; a += 1)
|
|
1980
|
-
o = l.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 ||
|
|
1980
|
+
o = l.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 || N(e, "expected valid JSON character");
|
|
1981
1981
|
else
|
|
1982
|
-
Ro.test(l) &&
|
|
1982
|
+
Ro.test(l) && N(e, "the stream contains non-printable characters");
|
|
1983
1983
|
e.result += l;
|
|
1984
1984
|
}
|
|
1985
1985
|
}
|
|
1986
1986
|
function Zt(e, n, t, r) {
|
|
1987
1987
|
var a, i, o, l;
|
|
1988
|
-
for (ae.isObject(t) ||
|
|
1988
|
+
for (ae.isObject(t) || N(e, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(t), o = 0, l = a.length; o < l; o += 1)
|
|
1989
1989
|
i = a[o], Ie.call(n, i) || (n[i] = t[i], r[i] = !0);
|
|
1990
1990
|
}
|
|
1991
1991
|
function Fe(e, n, t, r, a, i, o, l, s) {
|
|
1992
1992
|
var u, p;
|
|
1993
1993
|
if (Array.isArray(a))
|
|
1994
1994
|
for (a = Array.prototype.slice.call(a), u = 0, p = a.length; u < p; u += 1)
|
|
1995
|
-
Array.isArray(a[u]) &&
|
|
1995
|
+
Array.isArray(a[u]) && N(e, "nested arrays are not supported inside keys"), typeof a == "object" && Jt(a[u]) === "[object Object]" && (a[u] = "[object Object]");
|
|
1996
1996
|
if (typeof a == "object" && Jt(a) === "[object Object]" && (a = "[object Object]"), a = String(a), n === null && (n = {}), r === "tag:yaml.org,2002:merge")
|
|
1997
1997
|
if (Array.isArray(i))
|
|
1998
1998
|
for (u = 0, p = i.length; u < p; u += 1)
|
|
@@ -2000,7 +2000,7 @@ function Fe(e, n, t, r, a, i, o, l, s) {
|
|
|
2000
2000
|
else
|
|
2001
2001
|
Zt(e, n, i, t);
|
|
2002
2002
|
else
|
|
2003
|
-
!e.json && !Ie.call(t, a) && Ie.call(n, a) && (e.line = o || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position,
|
|
2003
|
+
!e.json && !Ie.call(t, a) && Ie.call(n, a) && (e.line = o || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, N(e, "duplicated mapping key")), a === "__proto__" ? Object.defineProperty(n, a, {
|
|
2004
2004
|
configurable: !0,
|
|
2005
2005
|
enumerable: !0,
|
|
2006
2006
|
writable: !0,
|
|
@@ -2008,9 +2008,9 @@ function Fe(e, n, t, r, a, i, o, l, s) {
|
|
|
2008
2008
|
}) : n[a] = i, delete t[a];
|
|
2009
2009
|
return n;
|
|
2010
2010
|
}
|
|
2011
|
-
function
|
|
2011
|
+
function _t(e) {
|
|
2012
2012
|
var n;
|
|
2013
|
-
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
2013
|
+
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : N(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
2014
2014
|
}
|
|
2015
2015
|
function re(e, n, t) {
|
|
2016
2016
|
for (var r = 0, a = e.input.charCodeAt(e.position); a !== 0; ) {
|
|
@@ -2021,18 +2021,18 @@ function re(e, n, t) {
|
|
|
2021
2021
|
a = e.input.charCodeAt(++e.position);
|
|
2022
2022
|
while (a !== 10 && a !== 13 && a !== 0);
|
|
2023
2023
|
if (he(a))
|
|
2024
|
-
for (
|
|
2024
|
+
for (_t(e), a = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; a === 32; )
|
|
2025
2025
|
e.lineIndent++, a = e.input.charCodeAt(++e.position);
|
|
2026
2026
|
else
|
|
2027
2027
|
break;
|
|
2028
2028
|
}
|
|
2029
|
-
return t !== -1 && r !== 0 && e.lineIndent < t &&
|
|
2029
|
+
return t !== -1 && r !== 0 && e.lineIndent < t && Je(e, "deficient indentation"), r;
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2031
|
+
function Xe(e) {
|
|
2032
2032
|
var n = e.position, t;
|
|
2033
2033
|
return t = e.input.charCodeAt(n), !!((t === 45 || t === 46) && t === e.input.charCodeAt(n + 1) && t === e.input.charCodeAt(n + 2) && (n += 3, t = e.input.charCodeAt(n), t === 0 || fe(t)));
|
|
2034
2034
|
}
|
|
2035
|
-
function
|
|
2035
|
+
function It(e, n) {
|
|
2036
2036
|
n === 1 ? e.result += " " : n > 1 && (e.result += ae.repeat(`
|
|
2037
2037
|
`, n - 1));
|
|
2038
2038
|
}
|
|
@@ -2048,7 +2048,7 @@ function Zo(e, n, t) {
|
|
|
2048
2048
|
if (r = e.input.charCodeAt(e.position - 1), fe(r))
|
|
2049
2049
|
break;
|
|
2050
2050
|
} else {
|
|
2051
|
-
if (e.position === e.lineStart &&
|
|
2051
|
+
if (e.position === e.lineStart && Xe(e) || t && Ee(m))
|
|
2052
2052
|
break;
|
|
2053
2053
|
if (he(m))
|
|
2054
2054
|
if (s = e.line, u = e.lineStart, p = e.lineIndent, re(e, !1, -1), e.lineIndent >= n) {
|
|
@@ -2059,7 +2059,7 @@ function Zo(e, n, t) {
|
|
|
2059
2059
|
break;
|
|
2060
2060
|
}
|
|
2061
2061
|
}
|
|
2062
|
-
l && (we(e, i, o, !1),
|
|
2062
|
+
l && (we(e, i, o, !1), It(e, e.line - s), i = o = e.position, l = !1), Se(m) || (o = e.position + 1), m = e.input.charCodeAt(++e.position);
|
|
2063
2063
|
}
|
|
2064
2064
|
return we(e, i, o, !1), e.result ? !0 : (e.kind = c, e.result = y, !1);
|
|
2065
2065
|
}
|
|
@@ -2074,8 +2074,8 @@ function Qo(e, n) {
|
|
|
2074
2074
|
else
|
|
2075
2075
|
return !0;
|
|
2076
2076
|
else
|
|
2077
|
-
he(t) ? (we(e, r, a, !0),
|
|
2078
|
-
|
|
2077
|
+
he(t) ? (we(e, r, a, !0), It(e, re(e, !1, n)), r = a = e.position) : e.position === e.lineStart && Xe(e) ? N(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
|
|
2078
|
+
N(e, "unexpected end of the stream within a single quoted scalar");
|
|
2079
2079
|
}
|
|
2080
2080
|
function Xo(e, n) {
|
|
2081
2081
|
var t, r, a, i, o, l;
|
|
@@ -2091,18 +2091,18 @@ function Xo(e, n) {
|
|
|
2091
2091
|
e.result += Yn[l], e.position++;
|
|
2092
2092
|
else if ((o = zo(l)) > 0) {
|
|
2093
2093
|
for (a = o, i = 0; a > 0; a--)
|
|
2094
|
-
l = e.input.charCodeAt(++e.position), (o = Ho(l)) >= 0 ? i = (i << 4) + o :
|
|
2094
|
+
l = e.input.charCodeAt(++e.position), (o = Ho(l)) >= 0 ? i = (i << 4) + o : N(e, "expected hexadecimal character");
|
|
2095
2095
|
e.result += Yo(i), e.position++;
|
|
2096
2096
|
} else
|
|
2097
|
-
|
|
2097
|
+
N(e, "unknown escape sequence");
|
|
2098
2098
|
t = r = e.position;
|
|
2099
2099
|
} else
|
|
2100
|
-
he(l) ? (we(e, t, r, !0),
|
|
2100
|
+
he(l) ? (we(e, t, r, !0), It(e, re(e, !1, n)), t = r = e.position) : e.position === e.lineStart && Xe(e) ? N(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
2101
2101
|
}
|
|
2102
|
-
|
|
2102
|
+
N(e, "unexpected end of the stream within a double quoted scalar");
|
|
2103
2103
|
}
|
|
2104
2104
|
function ei(e, n) {
|
|
2105
|
-
var t = !0, r, a, i, o = e.tag, l, s = e.anchor, u, p, c, y, m,
|
|
2105
|
+
var t = !0, r, a, i, o = e.tag, l, s = e.anchor, u, p, c, y, m, _ = /* @__PURE__ */ Object.create(null), b, I, C, w;
|
|
2106
2106
|
if (w = e.input.charCodeAt(e.position), w === 91)
|
|
2107
2107
|
p = 93, m = !1, l = [];
|
|
2108
2108
|
else if (w === 123)
|
|
@@ -2112,12 +2112,12 @@ function ei(e, n) {
|
|
|
2112
2112
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), w = e.input.charCodeAt(++e.position); w !== 0; ) {
|
|
2113
2113
|
if (re(e, !0, n), w = e.input.charCodeAt(e.position), w === p)
|
|
2114
2114
|
return e.position++, e.tag = o, e.anchor = s, e.kind = m ? "mapping" : "sequence", e.result = l, !0;
|
|
2115
|
-
t ? w === 44 &&
|
|
2115
|
+
t ? w === 44 && N(e, "expected the node content, but found ','") : N(e, "missed comma between flow collection entries"), I = b = C = null, c = y = !1, w === 63 && (u = e.input.charCodeAt(e.position + 1), fe(u) && (c = y = !0, e.position++, re(e, !0, n))), r = e.line, a = e.lineStart, i = e.position, Ne(e, n, He, !1, !0), I = e.tag, b = e.result, re(e, !0, n), w = e.input.charCodeAt(e.position), (y || e.line === r) && w === 58 && (c = !0, w = e.input.charCodeAt(++e.position), re(e, !0, n), Ne(e, n, He, !1, !0), C = e.result), m ? Fe(e, l, _, I, b, C, r, a, i) : c ? l.push(Fe(e, null, _, I, b, C, r, a, i)) : l.push(b), re(e, !0, n), w = e.input.charCodeAt(e.position), w === 44 ? (t = !0, w = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2116
2116
|
}
|
|
2117
|
-
|
|
2117
|
+
N(e, "unexpected end of the stream within a flow collection");
|
|
2118
2118
|
}
|
|
2119
2119
|
function ti(e, n) {
|
|
2120
|
-
var t, r, a =
|
|
2120
|
+
var t, r, a = lt, i = !1, o = !1, l = n, s = 0, u = !1, p, c;
|
|
2121
2121
|
if (c = e.input.charCodeAt(e.position), c === 124)
|
|
2122
2122
|
r = !1;
|
|
2123
2123
|
else if (c === 62)
|
|
@@ -2126,9 +2126,9 @@ function ti(e, n) {
|
|
|
2126
2126
|
return !1;
|
|
2127
2127
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
2128
2128
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
2129
|
-
|
|
2129
|
+
lt === a ? a = c === 43 ? zt : Do : N(e, "repeat of a chomping mode identifier");
|
|
2130
2130
|
else if ((p = Jo(c)) >= 0)
|
|
2131
|
-
p === 0 ?
|
|
2131
|
+
p === 0 ? N(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? N(e, "repeat of an indentation width identifier") : (l = n + p - 1, o = !0);
|
|
2132
2132
|
else
|
|
2133
2133
|
break;
|
|
2134
2134
|
if (Se(c)) {
|
|
@@ -2141,7 +2141,7 @@ function ti(e, n) {
|
|
|
2141
2141
|
while (!he(c) && c !== 0);
|
|
2142
2142
|
}
|
|
2143
2143
|
for (; c !== 0; ) {
|
|
2144
|
-
for (
|
|
2144
|
+
for (_t(e), e.lineIndent = 0, c = e.input.charCodeAt(e.position); (!o || e.lineIndent < l) && c === 32; )
|
|
2145
2145
|
e.lineIndent++, c = e.input.charCodeAt(++e.position);
|
|
2146
2146
|
if (!o && e.lineIndent > l && (l = e.lineIndent), he(c)) {
|
|
2147
2147
|
s++;
|
|
@@ -2149,7 +2149,7 @@ function ti(e, n) {
|
|
|
2149
2149
|
}
|
|
2150
2150
|
if (e.lineIndent < l) {
|
|
2151
2151
|
a === zt ? e.result += ae.repeat(`
|
|
2152
|
-
`, i ? 1 + s : s) : a ===
|
|
2152
|
+
`, i ? 1 + s : s) : a === lt && i && (e.result += `
|
|
2153
2153
|
`);
|
|
2154
2154
|
break;
|
|
2155
2155
|
}
|
|
@@ -2167,25 +2167,25 @@ function Qt(e, n) {
|
|
|
2167
2167
|
var t, r = e.tag, a = e.anchor, i = [], o, l = !1, s;
|
|
2168
2168
|
if (e.firstTabInLine !== -1)
|
|
2169
2169
|
return !1;
|
|
2170
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2170
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, N(e, "tab characters must not be used in indentation")), !(s !== 45 || (o = e.input.charCodeAt(e.position + 1), !fe(o)))); ) {
|
|
2171
2171
|
if (l = !0, e.position++, re(e, !0, -1) && e.lineIndent <= n) {
|
|
2172
2172
|
i.push(null), s = e.input.charCodeAt(e.position);
|
|
2173
2173
|
continue;
|
|
2174
2174
|
}
|
|
2175
2175
|
if (t = e.line, Ne(e, n, Gn, !1, !0), i.push(e.result), re(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && s !== 0)
|
|
2176
|
-
|
|
2176
|
+
N(e, "bad indentation of a sequence entry");
|
|
2177
2177
|
else if (e.lineIndent < n)
|
|
2178
2178
|
break;
|
|
2179
2179
|
}
|
|
2180
2180
|
return l ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = i, !0) : !1;
|
|
2181
2181
|
}
|
|
2182
2182
|
function ni(e, n, t) {
|
|
2183
|
-
var r, a, i, o, l, s, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), m = null,
|
|
2183
|
+
var r, a, i, o, l, s, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), m = null, _ = null, b = null, I = !1, C = !1, w;
|
|
2184
2184
|
if (e.firstTabInLine !== -1)
|
|
2185
2185
|
return !1;
|
|
2186
2186
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), w = e.input.charCodeAt(e.position); w !== 0; ) {
|
|
2187
|
-
if (!
|
|
2188
|
-
w === 63 ? (
|
|
2187
|
+
if (!I && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, N(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), i = e.line, (w === 63 || w === 58) && fe(r))
|
|
2188
|
+
w === 63 ? (I && (Fe(e, c, y, m, _, null, o, l, s), m = _ = b = null), C = !0, I = !0, a = !0) : I ? (I = !1, a = !0) : N(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, w = r;
|
|
2189
2189
|
else {
|
|
2190
2190
|
if (o = e.line, l = e.lineStart, s = e.position, !Ne(e, t, Vn, !1, !0))
|
|
2191
2191
|
break;
|
|
@@ -2193,52 +2193,52 @@ function ni(e, n, t) {
|
|
|
2193
2193
|
for (w = e.input.charCodeAt(e.position); Se(w); )
|
|
2194
2194
|
w = e.input.charCodeAt(++e.position);
|
|
2195
2195
|
if (w === 58)
|
|
2196
|
-
w = e.input.charCodeAt(++e.position), fe(w) ||
|
|
2196
|
+
w = e.input.charCodeAt(++e.position), fe(w) || N(e, "a whitespace character is expected after the key-value separator within a block mapping"), I && (Fe(e, c, y, m, _, null, o, l, s), m = _ = b = null), C = !0, I = !1, a = !1, m = e.tag, _ = e.result;
|
|
2197
2197
|
else if (C)
|
|
2198
|
-
|
|
2198
|
+
N(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2199
2199
|
else
|
|
2200
2200
|
return e.tag = u, e.anchor = p, !0;
|
|
2201
2201
|
} else if (C)
|
|
2202
|
-
|
|
2202
|
+
N(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2203
2203
|
else
|
|
2204
2204
|
return e.tag = u, e.anchor = p, !0;
|
|
2205
2205
|
}
|
|
2206
|
-
if ((e.line === i || e.lineIndent > n) && (
|
|
2207
|
-
|
|
2206
|
+
if ((e.line === i || e.lineIndent > n) && (I && (o = e.line, l = e.lineStart, s = e.position), Ne(e, n, ze, !0, a) && (I ? _ = e.result : b = e.result), I || (Fe(e, c, y, m, _, b, o, l, s), m = _ = b = null), re(e, !0, -1), w = e.input.charCodeAt(e.position)), (e.line === i || e.lineIndent > n) && w !== 0)
|
|
2207
|
+
N(e, "bad indentation of a mapping entry");
|
|
2208
2208
|
else if (e.lineIndent < n)
|
|
2209
2209
|
break;
|
|
2210
2210
|
}
|
|
2211
|
-
return
|
|
2211
|
+
return I && Fe(e, c, y, m, _, null, o, l, s), C && (e.tag = u, e.anchor = p, e.kind = "mapping", e.result = c), C;
|
|
2212
2212
|
}
|
|
2213
2213
|
function ri(e) {
|
|
2214
2214
|
var n, t = !1, r = !1, a, i, o;
|
|
2215
2215
|
if (o = e.input.charCodeAt(e.position), o !== 33)
|
|
2216
2216
|
return !1;
|
|
2217
|
-
if (e.tag !== null &&
|
|
2217
|
+
if (e.tag !== null && N(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (t = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (r = !0, a = "!!", o = e.input.charCodeAt(++e.position)) : a = "!", n = e.position, t) {
|
|
2218
2218
|
do
|
|
2219
2219
|
o = e.input.charCodeAt(++e.position);
|
|
2220
2220
|
while (o !== 0 && o !== 62);
|
|
2221
|
-
e.position < e.length ? (i = e.input.slice(n, e.position), o = e.input.charCodeAt(++e.position)) :
|
|
2221
|
+
e.position < e.length ? (i = e.input.slice(n, e.position), o = e.input.charCodeAt(++e.position)) : N(e, "unexpected end of the stream within a verbatim tag");
|
|
2222
2222
|
} else {
|
|
2223
2223
|
for (; o !== 0 && !fe(o); )
|
|
2224
|
-
o === 33 && (r ?
|
|
2225
|
-
i = e.input.slice(n, e.position), Go.test(i) &&
|
|
2224
|
+
o === 33 && (r ? N(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(n - 1, e.position + 1), Hn.test(a) || N(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
2225
|
+
i = e.input.slice(n, e.position), Go.test(i) && N(e, "tag suffix cannot contain flow indicator characters");
|
|
2226
2226
|
}
|
|
2227
|
-
i && !zn.test(i) &&
|
|
2227
|
+
i && !zn.test(i) && N(e, "tag name cannot contain such characters: " + i);
|
|
2228
2228
|
try {
|
|
2229
2229
|
i = decodeURIComponent(i);
|
|
2230
2230
|
} catch {
|
|
2231
|
-
|
|
2231
|
+
N(e, "tag name is malformed: " + i);
|
|
2232
2232
|
}
|
|
2233
|
-
return t ? e.tag = i : Ie.call(e.tagMap, a) ? e.tag = e.tagMap[a] + i : a === "!" ? e.tag = "!" + i : a === "!!" ? e.tag = "tag:yaml.org,2002:" + i :
|
|
2233
|
+
return t ? e.tag = i : Ie.call(e.tagMap, a) ? e.tag = e.tagMap[a] + i : a === "!" ? e.tag = "!" + i : a === "!!" ? e.tag = "tag:yaml.org,2002:" + i : N(e, 'undeclared tag handle "' + a + '"'), !0;
|
|
2234
2234
|
}
|
|
2235
2235
|
function ai(e) {
|
|
2236
2236
|
var n, t;
|
|
2237
2237
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2238
2238
|
return !1;
|
|
2239
|
-
for (e.anchor !== null &&
|
|
2239
|
+
for (e.anchor !== null && N(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !fe(t) && !Ee(t); )
|
|
2240
2240
|
t = e.input.charCodeAt(++e.position);
|
|
2241
|
-
return e.position === n &&
|
|
2241
|
+
return e.position === n && N(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2242
2242
|
}
|
|
2243
2243
|
function oi(e) {
|
|
2244
2244
|
var n, t, r;
|
|
@@ -2246,31 +2246,31 @@ function oi(e) {
|
|
|
2246
2246
|
return !1;
|
|
2247
2247
|
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !fe(r) && !Ee(r); )
|
|
2248
2248
|
r = e.input.charCodeAt(++e.position);
|
|
2249
|
-
return e.position === n &&
|
|
2249
|
+
return e.position === n && N(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), Ie.call(e.anchorMap, t) || N(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], re(e, !0, -1), !0;
|
|
2250
2250
|
}
|
|
2251
2251
|
function Ne(e, n, t, r, a) {
|
|
2252
|
-
var i, o, l, s = 1, u = !1, p = !1, c, y, m,
|
|
2253
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = o = l =
|
|
2252
|
+
var i, o, l, s = 1, u = !1, p = !1, c, y, m, _, b, I;
|
|
2253
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = o = l = ze === t || Gn === t, r && re(e, !0, -1) && (u = !0, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)), s === 1)
|
|
2254
2254
|
for (; ri(e) || ai(e); )
|
|
2255
2255
|
re(e, !0, -1) ? (u = !0, l = i, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)) : l = !1;
|
|
2256
|
-
if (l && (l = u || a), (s === 1 ||
|
|
2256
|
+
if (l && (l = u || a), (s === 1 || ze === t) && (He === t || Vn === t ? b = n : b = n + 1, I = e.position - e.lineStart, s === 1 ? l && (Qt(e, I) || ni(e, I, b)) || ei(e, b) ? p = !0 : (o && ti(e, b) || Qo(e, b) || Xo(e, b) ? p = !0 : oi(e) ? (p = !0, (e.tag !== null || e.anchor !== null) && N(e, "alias node should not have any properties")) : Zo(e, b, He === t) && (p = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (p = l && Qt(e, I))), e.tag === null)
|
|
2257
2257
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2258
2258
|
else if (e.tag === "?") {
|
|
2259
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2260
|
-
if (
|
|
2261
|
-
e.result =
|
|
2259
|
+
for (e.result !== null && e.kind !== "scalar" && N(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, y = e.implicitTypes.length; c < y; c += 1)
|
|
2260
|
+
if (_ = e.implicitTypes[c], _.resolve(e.result)) {
|
|
2261
|
+
e.result = _.construct(e.result), e.tag = _.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2262
2262
|
break;
|
|
2263
2263
|
}
|
|
2264
2264
|
} else if (e.tag !== "!") {
|
|
2265
2265
|
if (Ie.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2266
|
-
|
|
2266
|
+
_ = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2267
2267
|
else
|
|
2268
|
-
for (
|
|
2268
|
+
for (_ = null, m = e.typeMap.multi[e.kind || "fallback"], c = 0, y = m.length; c < y; c += 1)
|
|
2269
2269
|
if (e.tag.slice(0, m[c].tag.length) === m[c].tag) {
|
|
2270
|
-
|
|
2270
|
+
_ = m[c];
|
|
2271
2271
|
break;
|
|
2272
2272
|
}
|
|
2273
|
-
|
|
2273
|
+
_ || N(e, "unknown tag !<" + e.tag + ">"), e.result !== null && _.kind !== e.kind && N(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + _.kind + '", not "' + e.kind + '"'), _.resolve(e.result, e.tag) ? (e.result = _.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : N(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2274
2274
|
}
|
|
2275
2275
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || p;
|
|
2276
2276
|
}
|
|
@@ -2279,7 +2279,7 @@ function ii(e) {
|
|
|
2279
2279
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (re(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
2280
2280
|
for (i = !0, o = e.input.charCodeAt(++e.position), t = e.position; o !== 0 && !fe(o); )
|
|
2281
2281
|
o = e.input.charCodeAt(++e.position);
|
|
2282
|
-
for (r = e.input.slice(t, e.position), a = [], r.length < 1 &&
|
|
2282
|
+
for (r = e.input.slice(t, e.position), a = [], r.length < 1 && N(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
2283
2283
|
for (; Se(o); )
|
|
2284
2284
|
o = e.input.charCodeAt(++e.position);
|
|
2285
2285
|
if (o === 35) {
|
|
@@ -2294,14 +2294,14 @@ function ii(e) {
|
|
|
2294
2294
|
o = e.input.charCodeAt(++e.position);
|
|
2295
2295
|
a.push(e.input.slice(t, e.position));
|
|
2296
2296
|
}
|
|
2297
|
-
o !== 0 &&
|
|
2297
|
+
o !== 0 && _t(e), Ie.call(Wt, r) ? Wt[r](e, r, a) : Je(e, 'unknown document directive "' + r + '"');
|
|
2298
2298
|
}
|
|
2299
|
-
if (re(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, re(e, !0, -1)) : i &&
|
|
2299
|
+
if (re(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, re(e, !0, -1)) : i && N(e, "directives end mark is expected"), Ne(e, e.lineIndent - 1, ze, !1, !0), re(e, !0, -1), e.checkLineBreaks && Vo.test(e.input.slice(n, e.position)) && Je(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Xe(e)) {
|
|
2300
2300
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, re(e, !0, -1));
|
|
2301
2301
|
return;
|
|
2302
2302
|
}
|
|
2303
2303
|
if (e.position < e.length - 1)
|
|
2304
|
-
|
|
2304
|
+
N(e, "end of the stream or a document separator is expected");
|
|
2305
2305
|
else
|
|
2306
2306
|
return;
|
|
2307
2307
|
}
|
|
@@ -2309,7 +2309,7 @@ function Zn(e, n) {
|
|
|
2309
2309
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2310
2310
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2311
2311
|
var t = new Wo(e, n), r = e.indexOf("\0");
|
|
2312
|
-
for (r !== -1 && (t.position = r,
|
|
2312
|
+
for (r !== -1 && (t.position = r, N(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2313
2313
|
t.lineIndent += 1, t.position += 1;
|
|
2314
2314
|
for (; t.position < t.length - 1; )
|
|
2315
2315
|
ii(t);
|
|
@@ -2334,7 +2334,7 @@ function si(e, n) {
|
|
|
2334
2334
|
var ui = li, ci = si, Qn = {
|
|
2335
2335
|
loadAll: ui,
|
|
2336
2336
|
load: ci
|
|
2337
|
-
}, Xn = Object.prototype.toString, er = Object.prototype.hasOwnProperty,
|
|
2337
|
+
}, Xn = Object.prototype.toString, er = Object.prototype.hasOwnProperty, At = 65279, di = 9, Pe = 10, pi = 13, fi = 32, mi = 33, gi = 34, dt = 35, yi = 37, hi = 38, vi = 39, bi = 42, tr = 44, Ci = 45, Ye = 58, ki = 61, wi = 62, _i = 63, Ii = 64, nr = 91, rr = 93, Ai = 96, ar = 123, Si = 124, or = 125, le = {};
|
|
2338
2338
|
le[0] = "\\0";
|
|
2339
2339
|
le[7] = "\\a";
|
|
2340
2340
|
le[8] = "\\b";
|
|
@@ -2390,7 +2390,7 @@ function $i(e) {
|
|
|
2390
2390
|
}
|
|
2391
2391
|
var Mi = 1, De = 2;
|
|
2392
2392
|
function Oi(e) {
|
|
2393
|
-
this.schema = e.schema ||
|
|
2393
|
+
this.schema = e.schema || wt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ae.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = ji(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? De : Mi, 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;
|
|
2394
2394
|
}
|
|
2395
2395
|
function Xt(e, n) {
|
|
2396
2396
|
for (var t = ae.repeat(" ", n), r = 0, a = -1, i = "", o, l = e.length; r < l; )
|
|
@@ -2399,7 +2399,7 @@ function Xt(e, n) {
|
|
|
2399
2399
|
` && (i += t), i += o;
|
|
2400
2400
|
return i;
|
|
2401
2401
|
}
|
|
2402
|
-
function
|
|
2402
|
+
function pt(e, n) {
|
|
2403
2403
|
return `
|
|
2404
2404
|
` + ae.repeat(" ", e.indent * n);
|
|
2405
2405
|
}
|
|
@@ -2410,30 +2410,30 @@ function Ei(e, n) {
|
|
|
2410
2410
|
return !0;
|
|
2411
2411
|
return !1;
|
|
2412
2412
|
}
|
|
2413
|
-
function
|
|
2413
|
+
function We(e) {
|
|
2414
2414
|
return e === fi || e === di;
|
|
2415
2415
|
}
|
|
2416
2416
|
function Re(e) {
|
|
2417
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2417
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== At || 65536 <= e && e <= 1114111;
|
|
2418
2418
|
}
|
|
2419
2419
|
function en(e) {
|
|
2420
|
-
return Re(e) && e !==
|
|
2420
|
+
return Re(e) && e !== At && e !== pi && e !== Pe;
|
|
2421
2421
|
}
|
|
2422
2422
|
function tn(e, n, t) {
|
|
2423
|
-
var r = en(e), a = r && !
|
|
2423
|
+
var r = en(e), a = r && !We(e);
|
|
2424
2424
|
return (
|
|
2425
2425
|
// ns-plain-safe
|
|
2426
2426
|
(t ? (
|
|
2427
2427
|
// c = flow-in
|
|
2428
2428
|
r
|
|
2429
|
-
) : r && e !== tr && e !== nr && e !== rr && e !== ar && e !== or) && e !==
|
|
2429
|
+
) : r && e !== tr && e !== nr && e !== rr && e !== ar && e !== or) && e !== dt && !(n === Ye && !a) || en(n) && !We(n) && e === dt || n === Ye && a
|
|
2430
2430
|
);
|
|
2431
2431
|
}
|
|
2432
2432
|
function Fi(e) {
|
|
2433
|
-
return Re(e) && e !==
|
|
2433
|
+
return Re(e) && e !== At && !We(e) && e !== Ci && e !== _i && e !== Ye && e !== tr && e !== nr && e !== rr && e !== ar && e !== or && e !== dt && e !== hi && e !== bi && e !== mi && e !== Si && e !== ki && e !== wi && e !== vi && e !== gi && e !== yi && e !== Ii && e !== Ai;
|
|
2434
2434
|
}
|
|
2435
2435
|
function Ni(e) {
|
|
2436
|
-
return !
|
|
2436
|
+
return !We(e) && e !== Ye;
|
|
2437
2437
|
}
|
|
2438
2438
|
function Ke(e, n) {
|
|
2439
2439
|
var t = e.charCodeAt(n), r;
|
|
@@ -2443,9 +2443,9 @@ function ir(e) {
|
|
|
2443
2443
|
var n = /^\n* /;
|
|
2444
2444
|
return n.test(e);
|
|
2445
2445
|
}
|
|
2446
|
-
var lr = 1,
|
|
2446
|
+
var lr = 1, ft = 2, sr = 3, ur = 4, Oe = 5;
|
|
2447
2447
|
function qi(e, n, t, r, a, i, o, l) {
|
|
2448
|
-
var s, u = 0, p = null, c = !1, y = !1, m = r !== -1,
|
|
2448
|
+
var s, u = 0, p = null, c = !1, y = !1, m = r !== -1, _ = -1, b = Fi(Ke(e, 0)) && Ni(Ke(e, e.length - 1));
|
|
2449
2449
|
if (n || o)
|
|
2450
2450
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2451
2451
|
if (u = Ke(e, s), !Re(u))
|
|
@@ -2456,14 +2456,14 @@ function qi(e, n, t, r, a, i, o, l) {
|
|
|
2456
2456
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2457
2457
|
if (u = Ke(e, s), u === Pe)
|
|
2458
2458
|
c = !0, m && (y = y || // Foldable line = too long, and not more-indented.
|
|
2459
|
-
s -
|
|
2459
|
+
s - _ - 1 > r && e[_ + 1] !== " ", _ = s);
|
|
2460
2460
|
else if (!Re(u))
|
|
2461
2461
|
return Oe;
|
|
2462
2462
|
b = b && tn(u, p, l), p = u;
|
|
2463
2463
|
}
|
|
2464
|
-
y = y || m && s -
|
|
2464
|
+
y = y || m && s - _ - 1 > r && e[_ + 1] !== " ";
|
|
2465
2465
|
}
|
|
2466
|
-
return !c && !y ? b && !o && !a(e) ? lr : i === De ? Oe :
|
|
2466
|
+
return !c && !y ? b && !o && !a(e) ? lr : i === De ? Oe : ft : t > 9 && ir(e) ? Oe : o ? i === De ? Oe : ft : y ? ur : sr;
|
|
2467
2467
|
}
|
|
2468
2468
|
function Ki(e, n, t, r, a) {
|
|
2469
2469
|
e.dump = function() {
|
|
@@ -2487,7 +2487,7 @@ function Ki(e, n, t, r, a) {
|
|
|
2487
2487
|
)) {
|
|
2488
2488
|
case lr:
|
|
2489
2489
|
return n;
|
|
2490
|
-
case
|
|
2490
|
+
case ft:
|
|
2491
2491
|
return "'" + n.replace(/'/g, "''") + "'";
|
|
2492
2492
|
case sr:
|
|
2493
2493
|
return "|" + nn(n, e.indent) + rn(Xt(n, i));
|
|
@@ -2549,7 +2549,7 @@ function Ui(e, n, t) {
|
|
|
2549
2549
|
function on(e, n, t, r) {
|
|
2550
2550
|
var a = "", i = e.tag, o, l, s;
|
|
2551
2551
|
for (o = 0, l = t.length; o < l; o += 1)
|
|
2552
|
-
s = t[o], e.replacer && (s = e.replacer.call(t, String(o), s)), (Ce(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && Ce(e, n + 1, null, !0, !0, !1, !0)) && ((!r || a !== "") && (a +=
|
|
2552
|
+
s = t[o], e.replacer && (s = e.replacer.call(t, String(o), s)), (Ce(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && Ce(e, n + 1, null, !0, !0, !1, !0)) && ((!r || a !== "") && (a += pt(e, n)), e.dump && Pe === e.dump.charCodeAt(0) ? a += "-" : a += "- ", a += e.dump);
|
|
2553
2553
|
e.tag = i, e.dump = a || "[]";
|
|
2554
2554
|
}
|
|
2555
2555
|
function Pi(e, n, t) {
|
|
@@ -2567,7 +2567,7 @@ function Di(e, n, t, r) {
|
|
|
2567
2567
|
else if (e.sortKeys)
|
|
2568
2568
|
throw new se("sortKeys must be a boolean or a function");
|
|
2569
2569
|
for (l = 0, s = o.length; l < s; l += 1)
|
|
2570
|
-
y = "", (!r || a !== "") && (y +=
|
|
2570
|
+
y = "", (!r || a !== "") && (y += pt(e, n)), u = o[l], p = t[u], e.replacer && (p = e.replacer.call(t, u, p)), Ce(e, n + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Pe === e.dump.charCodeAt(0) ? y += "?" : y += "? "), y += e.dump, c && (y += pt(e, n)), Ce(e, n + 1, p, !0, c) && (e.dump && Pe === e.dump.charCodeAt(0) ? y += ":" : y += ": ", y += e.dump, a += y));
|
|
2571
2571
|
e.tag = i, e.dump = a || "{}";
|
|
2572
2572
|
}
|
|
2573
2573
|
function ln(e, n, t) {
|
|
@@ -2614,21 +2614,21 @@ function Ce(e, n, t, r, a, i, o) {
|
|
|
2614
2614
|
}
|
|
2615
2615
|
function Ri(e, n) {
|
|
2616
2616
|
var t = [], r = [], a, i;
|
|
2617
|
-
for (
|
|
2617
|
+
for (mt(e, t, r), a = 0, i = r.length; a < i; a += 1)
|
|
2618
2618
|
n.duplicates.push(t[r[a]]);
|
|
2619
2619
|
n.usedDuplicates = new Array(i);
|
|
2620
2620
|
}
|
|
2621
|
-
function
|
|
2621
|
+
function mt(e, n, t) {
|
|
2622
2622
|
var r, a, i;
|
|
2623
2623
|
if (e !== null && typeof e == "object")
|
|
2624
2624
|
if (a = n.indexOf(e), a !== -1)
|
|
2625
2625
|
t.indexOf(a) === -1 && t.push(a);
|
|
2626
2626
|
else if (n.push(e), Array.isArray(e))
|
|
2627
2627
|
for (a = 0, i = e.length; a < i; a += 1)
|
|
2628
|
-
|
|
2628
|
+
mt(e[a], n, t);
|
|
2629
2629
|
else
|
|
2630
2630
|
for (r = Object.keys(e), a = 0, i = r.length; a < i; a += 1)
|
|
2631
|
-
|
|
2631
|
+
mt(e[r[a]], n, t);
|
|
2632
2632
|
}
|
|
2633
2633
|
function Vi(e, n) {
|
|
2634
2634
|
n = n || {};
|
|
@@ -2641,12 +2641,12 @@ function Vi(e, n) {
|
|
|
2641
2641
|
var Gi = Vi, Hi = {
|
|
2642
2642
|
dump: Gi
|
|
2643
2643
|
};
|
|
2644
|
-
function
|
|
2644
|
+
function St(e, n) {
|
|
2645
2645
|
return function() {
|
|
2646
2646
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2647
2647
|
};
|
|
2648
2648
|
}
|
|
2649
|
-
var zi = ie, Ji = An, Yi = jn, Wi = Fn, Zi = Nn, Qi =
|
|
2649
|
+
var zi = ie, Ji = An, Yi = jn, Wi = Fn, Zi = Nn, Qi = wt, Xi = Qn.load, el = Qn.loadAll, tl = Hi.dump, nl = se, rl = {
|
|
2650
2650
|
binary: Un,
|
|
2651
2651
|
float: En,
|
|
2652
2652
|
map: Tn,
|
|
@@ -2660,7 +2660,7 @@ var zi = ie, Ji = An, Yi = jn, Wi = Fn, Zi = Nn, Qi = _t, Xi = Qn.load, el = Qn.
|
|
|
2660
2660
|
omap: Pn,
|
|
2661
2661
|
seq: xn,
|
|
2662
2662
|
str: Sn
|
|
2663
|
-
}, al =
|
|
2663
|
+
}, al = St("safeLoad", "load"), ol = St("safeLoadAll", "loadAll"), il = St("safeDump", "dump"), ll = {
|
|
2664
2664
|
Type: zi,
|
|
2665
2665
|
Schema: Ji,
|
|
2666
2666
|
FAILSAFE_SCHEMA: Yi,
|
|
@@ -2686,14 +2686,14 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2686
2686
|
}
|
|
2687
2687
|
},
|
|
2688
2688
|
setup(e) {
|
|
2689
|
-
const n = e, t =
|
|
2689
|
+
const n = e, t = A(() => n.yamlRecord);
|
|
2690
2690
|
return (r, a) => {
|
|
2691
2691
|
const i = U("KCodeBlock");
|
|
2692
2692
|
return d(), $("div", sl, [
|
|
2693
2693
|
n.yamlRecord ? (d(), R(i, {
|
|
2694
2694
|
key: 0,
|
|
2695
2695
|
id: "yaml-codeblock",
|
|
2696
|
-
code: f(ll).dump(t),
|
|
2696
|
+
code: f(ll).dump(t.value),
|
|
2697
2697
|
language: "yaml",
|
|
2698
2698
|
theme: "dark"
|
|
2699
2699
|
}, null, 8, ["code"])) : H("", !0)
|
|
@@ -2745,7 +2745,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2745
2745
|
}
|
|
2746
2746
|
},
|
|
2747
2747
|
setup(e) {
|
|
2748
|
-
const n = e, t =
|
|
2748
|
+
const n = e, t = Ze(), { i18n: { t: r } } = oe.useI18n(), a = (o) => !!(o.tooltip || t[`${o.key}-label-tooltip`]), i = A(() => {
|
|
2749
2749
|
if (!n.record)
|
|
2750
2750
|
return n.record;
|
|
2751
2751
|
const o = JSON.parse(JSON.stringify(n.record));
|
|
@@ -2759,7 +2759,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2759
2759
|
"data-testid": `config-card-details-${s}-props`
|
|
2760
2760
|
}, [
|
|
2761
2761
|
s !== "basic" ? (d(), $("div", dl, M(s === "advanced" ? f(r)("baseConfigCard.sections.advanced") : f(r)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
2762
|
-
(d(!0), $(me, null, pe(e.propertyCollections[s], (u) => (d(), R(
|
|
2762
|
+
(d(!0), $(me, null, pe(e.propertyCollections[s], (u) => (d(), R(Ct, {
|
|
2763
2763
|
key: u.key,
|
|
2764
2764
|
item: u
|
|
2765
2765
|
}, ke({
|
|
@@ -2860,7 +2860,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2860
2860
|
}
|
|
2861
2861
|
},
|
|
2862
2862
|
setup(e) {
|
|
2863
|
-
const n = e, t =
|
|
2863
|
+
const n = e, t = A(() => {
|
|
2864
2864
|
if (typeof n.size == "number" && n.size > 0)
|
|
2865
2865
|
return `${n.size}px`;
|
|
2866
2866
|
if (typeof n.size == "string") {
|
|
@@ -2869,7 +2869,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2869
2869
|
return `${i}px`;
|
|
2870
2870
|
}
|
|
2871
2871
|
return sn;
|
|
2872
|
-
}), r =
|
|
2872
|
+
}), r = A(() => ({
|
|
2873
2873
|
boxSizing: "border-box",
|
|
2874
2874
|
color: n.color,
|
|
2875
2875
|
display: n.display,
|
|
@@ -2985,7 +2985,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2985
2985
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
2986
2986
|
setup(e, { emit: n }) {
|
|
2987
2987
|
var t;
|
|
2988
|
-
const r = n, a = e, i =
|
|
2988
|
+
const r = n, a = e, i = Ze(), { i18n: { t: o } } = oe.useI18n(), { getMessageFromError: l } = oe.useErrors(), { convertKeyToTitle: s } = oe.useStringHelpers(), { axiosInstance: u } = oe.useAxios({
|
|
2989
2989
|
headers: (t = a.config) == null ? void 0 : t.requestHeaders
|
|
2990
2990
|
}), p = [
|
|
2991
2991
|
{
|
|
@@ -3001,8 +3001,8 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3001
3001
|
label: "YAML",
|
|
3002
3002
|
value: "yaml"
|
|
3003
3003
|
}
|
|
3004
|
-
], c =
|
|
3005
|
-
c.value =
|
|
3004
|
+
], c = q("structured"), y = (v) => {
|
|
3005
|
+
c.value = v == null ? void 0 : v.value;
|
|
3006
3006
|
}, m = {
|
|
3007
3007
|
id: {
|
|
3008
3008
|
type: ee.ID,
|
|
@@ -3037,21 +3037,21 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3037
3037
|
// the last property displayed
|
|
3038
3038
|
section: de.Basic
|
|
3039
3039
|
}
|
|
3040
|
-
},
|
|
3041
|
-
var
|
|
3040
|
+
}, _ = q(!1), b = q(!1), I = q(""), C = q({}), w = A(() => {
|
|
3041
|
+
var v, K, S;
|
|
3042
3042
|
if (!C.value)
|
|
3043
3043
|
return [];
|
|
3044
|
-
const D = [],
|
|
3045
|
-
for (const
|
|
3046
|
-
const P = (
|
|
3047
|
-
let Q =
|
|
3048
|
-
(V || V === 0) && (Q = V === -1 ?
|
|
3044
|
+
const D = [], x = Object.keys(C.value).length;
|
|
3045
|
+
for (const F in C.value) {
|
|
3046
|
+
const P = (K = (v = a.configSchema) == null ? void 0 : v[F]) == null ? void 0 : K.order, V = (S = m[F]) == null ? void 0 : S.order;
|
|
3047
|
+
let Q = x;
|
|
3048
|
+
(V || V === 0) && (Q = V === -1 ? x + 1 : V), P && (Q = P === -1 ? x + 1 : P), D.push([F, Q]);
|
|
3049
3049
|
}
|
|
3050
|
-
return D.sort(function(
|
|
3051
|
-
return
|
|
3052
|
-
}), D.map((
|
|
3050
|
+
return D.sort(function(F, P) {
|
|
3051
|
+
return F[1] - P[1];
|
|
3052
|
+
}), D.map((F) => {
|
|
3053
3053
|
var P, V;
|
|
3054
|
-
const Q =
|
|
3054
|
+
const Q = F[0], J = (P = C.value) == null ? void 0 : P[Q], X = ((V = a.configSchema) == null ? void 0 : V[Q]) || {}, ue = m[Q];
|
|
3055
3055
|
return {
|
|
3056
3056
|
key: Q,
|
|
3057
3057
|
value: J,
|
|
@@ -3061,22 +3061,22 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3061
3061
|
tooltip: X.tooltip ?? ((ue == null ? void 0 : ue.tooltip) || void 0),
|
|
3062
3062
|
section: X.section ?? ((ue == null ? void 0 : ue.section) || de.Advanced)
|
|
3063
3063
|
};
|
|
3064
|
-
}).filter((
|
|
3065
|
-
}), G =
|
|
3066
|
-
var
|
|
3064
|
+
}).filter((F) => !F.hidden && F.key !== a.pluginConfigKey);
|
|
3065
|
+
}), G = A(() => {
|
|
3066
|
+
var v, K;
|
|
3067
3067
|
if (!C.value || !a.pluginConfigKey)
|
|
3068
3068
|
return [];
|
|
3069
|
-
const
|
|
3070
|
-
for (const
|
|
3071
|
-
const P = (
|
|
3069
|
+
const S = C.value[a.pluginConfigKey] || {}, D = Object.keys(S).length, x = [];
|
|
3070
|
+
for (const F in S) {
|
|
3071
|
+
const P = (K = (v = a.pluginConfigSchema) == null ? void 0 : v[F]) == null ? void 0 : K.order, V = S[F];
|
|
3072
3072
|
let Q = V != null && V !== "" ? D - 1 : D;
|
|
3073
|
-
P && (Q = P === -1 ? D + 1 : P),
|
|
3073
|
+
P && (Q = P === -1 ? D + 1 : P), x.push([F, Q]);
|
|
3074
3074
|
}
|
|
3075
|
-
return
|
|
3076
|
-
return
|
|
3077
|
-
}),
|
|
3075
|
+
return x.sort(function(F, P) {
|
|
3076
|
+
return F[1] - P[1];
|
|
3077
|
+
}), x.map((F) => {
|
|
3078
3078
|
var P;
|
|
3079
|
-
const V =
|
|
3079
|
+
const V = F[0], Q = S[V], J = ((P = a.pluginConfigSchema) == null ? void 0 : P[V]) || {};
|
|
3080
3080
|
return {
|
|
3081
3081
|
key: V,
|
|
3082
3082
|
value: Q,
|
|
@@ -3086,53 +3086,53 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3086
3086
|
tooltip: J.tooltip ?? void 0,
|
|
3087
3087
|
section: de.Plugin
|
|
3088
3088
|
};
|
|
3089
|
-
}).filter((
|
|
3090
|
-
}), k =
|
|
3091
|
-
var
|
|
3089
|
+
}).filter((F) => !F.hidden);
|
|
3090
|
+
}), k = A(() => {
|
|
3091
|
+
var v, K, S, D;
|
|
3092
3092
|
return {
|
|
3093
|
-
basic: (
|
|
3094
|
-
advanced: (
|
|
3095
|
-
plugin: (D = G.value) == null ? void 0 : D.concat((
|
|
3093
|
+
basic: (v = w.value) == null ? void 0 : v.filter((x) => x.section === de.Basic),
|
|
3094
|
+
advanced: (K = w.value) == null ? void 0 : K.filter((x) => x.section === de.Advanced),
|
|
3095
|
+
plugin: (D = G.value) == null ? void 0 : D.concat((S = w.value) == null ? void 0 : S.filter((x) => x.section === de.Plugin))
|
|
3096
3096
|
};
|
|
3097
|
-
}),
|
|
3098
|
-
const
|
|
3099
|
-
return k.value.basic.length &&
|
|
3100
|
-
}),
|
|
3101
|
-
var
|
|
3102
|
-
let
|
|
3103
|
-
return a.config.app === "konnect" ?
|
|
3104
|
-
}),
|
|
3105
|
-
C.value &&
|
|
3097
|
+
}), j = A(() => {
|
|
3098
|
+
const v = [];
|
|
3099
|
+
return k.value.basic.length && v.push("basic"), k.value.advanced.length && v.push("advanced"), k.value.plugin.length && v.push("plugin"), v;
|
|
3100
|
+
}), L = (v) => !!(v.tooltip || i[`${v.key}-label-tooltip`]), E = A(() => {
|
|
3101
|
+
var v, K;
|
|
3102
|
+
let S = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3103
|
+
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, (K = a.config) != null && K.workspace ? `/${a.config.workspace}` : "")), S = S.replace(/{id}/gi, a.config.entityId), S;
|
|
3104
|
+
}), h = (v) => {
|
|
3105
|
+
C.value && v(JSON.stringify(C.value)) ? r("copy:success", C.value) : r("copy:error");
|
|
3106
3106
|
};
|
|
3107
|
-
return be(
|
|
3108
|
-
r("loading",
|
|
3109
|
-
}, { immediate: !0 }),
|
|
3110
|
-
b.value = !1,
|
|
3107
|
+
return be(_, (v) => {
|
|
3108
|
+
r("loading", v);
|
|
3109
|
+
}, { immediate: !0 }), gt(async () => {
|
|
3110
|
+
b.value = !1, _.value = !0;
|
|
3111
3111
|
try {
|
|
3112
|
-
const { data:
|
|
3112
|
+
const { data: v } = await u.get(E.value);
|
|
3113
3113
|
if (a.dataKey)
|
|
3114
|
-
if (typeof
|
|
3115
|
-
C.value = { ...
|
|
3114
|
+
if (typeof v[a.dataKey] < "u")
|
|
3115
|
+
C.value = { ...v[a.dataKey] };
|
|
3116
3116
|
else
|
|
3117
3117
|
throw new Error(o("errors.dataKeyUndefined", { dataKey: a.dataKey }));
|
|
3118
3118
|
else
|
|
3119
|
-
C.value = { ...
|
|
3120
|
-
Object.keys(a.configSchema).filter((
|
|
3121
|
-
C.value && typeof C.value[
|
|
3122
|
-
}), r("fetch:success",
|
|
3123
|
-
} catch (
|
|
3124
|
-
const
|
|
3125
|
-
|
|
3119
|
+
C.value = { ...v };
|
|
3120
|
+
Object.keys(a.configSchema).filter((K) => a.configSchema[K].forceShow).forEach((K) => {
|
|
3121
|
+
C.value && typeof C.value[K] > "u" && (C.value[K] = null);
|
|
3122
|
+
}), r("fetch:success", v);
|
|
3123
|
+
} catch (v) {
|
|
3124
|
+
const K = l(v);
|
|
3125
|
+
I.value = K.startsWith("code") ? o("baseConfigCard.errors.load") : K, b.value = !0, r("fetch:error", v);
|
|
3126
3126
|
} finally {
|
|
3127
|
-
|
|
3127
|
+
_.value = !1;
|
|
3128
3128
|
}
|
|
3129
|
-
}), (
|
|
3130
|
-
const
|
|
3129
|
+
}), (v, K) => {
|
|
3130
|
+
const S = U("KLabel"), D = U("KSelect"), x = U("KButton"), F = U("KClipboardProvider"), P = U("KSkeleton"), V = U("KEmptyState"), Q = U("KCard");
|
|
3131
3131
|
return d(), R(Q, { class: "kong-ui-entity-base-config-card" }, ke({
|
|
3132
3132
|
actions: g(() => [
|
|
3133
3133
|
B("div", wl, [
|
|
3134
|
-
Z(
|
|
3135
|
-
e.config.jsonYamlEnabled ? (d(), R(
|
|
3134
|
+
Z(v.$slots, "actions", {}, void 0, !0),
|
|
3135
|
+
e.config.jsonYamlEnabled ? (d(), R(S, {
|
|
3136
3136
|
key: 0,
|
|
3137
3137
|
class: "config-format-select-label",
|
|
3138
3138
|
"data-testid": "config-format-select-label"
|
|
@@ -3144,11 +3144,12 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3144
3144
|
})) : H("", !0),
|
|
3145
3145
|
e.config.jsonYamlEnabled ? (d(), R(D, {
|
|
3146
3146
|
key: 1,
|
|
3147
|
+
appearance: "select",
|
|
3147
3148
|
"data-testid": "select-config-format",
|
|
3148
3149
|
items: p,
|
|
3149
3150
|
onChange: y
|
|
3150
3151
|
})) : H("", !0),
|
|
3151
|
-
a.config.jsonYamlEnabled && e.configCardDoc ? (d(), R(
|
|
3152
|
+
a.config.jsonYamlEnabled && e.configCardDoc ? (d(), R(x, {
|
|
3152
3153
|
key: 2,
|
|
3153
3154
|
appearance: "tertiary",
|
|
3154
3155
|
class: "book-icon",
|
|
@@ -3165,13 +3166,13 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3165
3166
|
]),
|
|
3166
3167
|
_: 1
|
|
3167
3168
|
})) : H("", !0),
|
|
3168
|
-
e.config.jsonYamlEnabled ? H("", !0) : (d(), R(
|
|
3169
|
+
e.config.jsonYamlEnabled ? H("", !0) : (d(), R(F, { key: 3 }, {
|
|
3169
3170
|
default: g(({ copyToClipboard: J }) => [
|
|
3170
|
-
!
|
|
3171
|
+
!_.value && !b.value ? (d(), R(x, {
|
|
3171
3172
|
key: 0,
|
|
3172
3173
|
appearance: "tertiary",
|
|
3173
3174
|
"data-testid": "json-copy-button",
|
|
3174
|
-
onClick: (X) =>
|
|
3175
|
+
onClick: (X) => h(J)
|
|
3175
3176
|
}, {
|
|
3176
3177
|
default: g(() => [
|
|
3177
3178
|
Y(M(f(o)("baseConfigCard.actions.copy")), 1)
|
|
@@ -3184,7 +3185,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3184
3185
|
])
|
|
3185
3186
|
]),
|
|
3186
3187
|
default: g(() => [
|
|
3187
|
-
|
|
3188
|
+
_.value ? (d(), R(P, {
|
|
3188
3189
|
key: 0,
|
|
3189
3190
|
"data-testid": "config-card-loader",
|
|
3190
3191
|
"table-columns": 2,
|
|
@@ -3195,23 +3196,23 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3195
3196
|
"is-error": ""
|
|
3196
3197
|
}, {
|
|
3197
3198
|
message: g(() => [
|
|
3198
|
-
B("h3", null, M(
|
|
3199
|
+
B("h3", null, M(I.value), 1)
|
|
3199
3200
|
]),
|
|
3200
3201
|
_: 1
|
|
3201
3202
|
})) : H("", !0),
|
|
3202
3203
|
e.config.jsonYamlEnabled ? (d(), $("div", Il, [
|
|
3203
3204
|
O(fl, {
|
|
3204
3205
|
config: e.config,
|
|
3205
|
-
"fetcher-url":
|
|
3206
|
+
"fetcher-url": E.value,
|
|
3206
3207
|
format: c.value,
|
|
3207
|
-
"prop-list-types":
|
|
3208
|
+
"prop-list-types": j.value,
|
|
3208
3209
|
"property-collections": k.value,
|
|
3209
3210
|
record: C.value
|
|
3210
3211
|
}, ke({ _: 2 }, [
|
|
3211
|
-
pe(Object.keys(
|
|
3212
|
+
pe(Object.keys(v.$slots), (J) => ({
|
|
3212
3213
|
name: J,
|
|
3213
3214
|
fn: g(({ row: X, rowValue: ue }) => [
|
|
3214
|
-
Z(
|
|
3215
|
+
Z(v.$slots, J, {
|
|
3215
3216
|
row: X,
|
|
3216
3217
|
rowValue: ue
|
|
3217
3218
|
}, void 0, !0)
|
|
@@ -3219,31 +3220,31 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3219
3220
|
}))
|
|
3220
3221
|
]), 1032, ["config", "fetcher-url", "format", "prop-list-types", "property-collections", "record"])
|
|
3221
3222
|
])) : (d(), $("div", Al, [
|
|
3222
|
-
(d(!0), $(me, null, pe(
|
|
3223
|
+
(d(!0), $(me, null, pe(j.value, (J) => (d(), $("div", {
|
|
3223
3224
|
key: `config-card-details-${J}-props`,
|
|
3224
3225
|
class: _e(`config-card-details-${J}-props`),
|
|
3225
3226
|
"data-testid": `config-card-details-${J}-props`
|
|
3226
3227
|
}, [
|
|
3227
3228
|
J !== "basic" ? (d(), $("div", xl, M(J === "advanced" ? f(o)("baseConfigCard.sections.advanced") : f(o)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
3228
|
-
(d(!0), $(me, null, pe(k.value[J], (X) => (d(), R(
|
|
3229
|
+
(d(!0), $(me, null, pe(k.value[J], (X) => (d(), R(Ct, {
|
|
3229
3230
|
key: X.key,
|
|
3230
3231
|
item: X
|
|
3231
3232
|
}, ke({
|
|
3232
3233
|
label: g(() => [
|
|
3233
|
-
Z(
|
|
3234
|
+
Z(v.$slots, `${X.key}-label`, { row: X }, void 0, !0)
|
|
3234
3235
|
]),
|
|
3235
3236
|
[X.key]: g(({ rowValue: ue }) => [
|
|
3236
|
-
Z(
|
|
3237
|
+
Z(v.$slots, X.key, {
|
|
3237
3238
|
row: X,
|
|
3238
3239
|
rowValue: ue
|
|
3239
3240
|
}, void 0, !0)
|
|
3240
3241
|
]),
|
|
3241
3242
|
_: 2
|
|
3242
3243
|
}, [
|
|
3243
|
-
|
|
3244
|
+
L(X) ? {
|
|
3244
3245
|
name: "label-tooltip",
|
|
3245
3246
|
fn: g(() => [
|
|
3246
|
-
Z(
|
|
3247
|
+
Z(v.$slots, `${X.key}-label-tooltip`, { row: X }, void 0, !0)
|
|
3247
3248
|
]),
|
|
3248
3249
|
key: "0"
|
|
3249
3250
|
} : void 0
|
|
@@ -3257,7 +3258,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3257
3258
|
name: "title",
|
|
3258
3259
|
fn: g(() => [
|
|
3259
3260
|
B("div", kl, [
|
|
3260
|
-
Z(
|
|
3261
|
+
Z(v.$slots, "title", {}, () => [
|
|
3261
3262
|
Y(M(f(o)("baseConfigCard.title")), 1)
|
|
3262
3263
|
], !0)
|
|
3263
3264
|
])
|
|
@@ -3267,7 +3268,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3267
3268
|
]), 1024);
|
|
3268
3269
|
};
|
|
3269
3270
|
}
|
|
3270
|
-
}), jl = /* @__PURE__ */ ge(Tl, [["__scopeId", "data-v-
|
|
3271
|
+
}), jl = /* @__PURE__ */ ge(Tl, [["__scopeId", "data-v-068b819b"]]), $l = {
|
|
3271
3272
|
class: "form-actions",
|
|
3272
3273
|
"data-testid": "form-actions"
|
|
3273
3274
|
}, Ml = { key: 0 }, Ol = /* @__PURE__ */ te({
|
|
@@ -3325,21 +3326,21 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3325
3326
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3326
3327
|
setup(e, { emit: n }) {
|
|
3327
3328
|
var t;
|
|
3328
|
-
const r = n, a = e, i =
|
|
3329
|
+
const r = n, a = e, i = yt(), { i18n: { t: o } } = oe.useI18n(), { getMessageFromError: l } = oe.useErrors(), { axiosInstance: s } = oe.useAxios({
|
|
3329
3330
|
headers: (t = a.config) == null ? void 0 : t.requestHeaders
|
|
3330
|
-
}), u =
|
|
3331
|
-
var k,
|
|
3332
|
-
let
|
|
3333
|
-
return a.config.app === "konnect" ?
|
|
3331
|
+
}), u = q(!1), p = q(!1), c = q(""), y = A(() => a.canSubmit === !1 || a.isReadonly), m = q(!1), _ = A(() => {
|
|
3332
|
+
var k, j;
|
|
3333
|
+
let L = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3334
|
+
return a.config.app === "konnect" ? L = L.replace(/{controlPlaneId}/gi, ((k = a.config) == null ? void 0 : k.controlPlaneId) || "") : a.config.app === "kongManager" && (L = L.replace(/\/{workspace}/gi, (j = a.config) != null && j.workspace ? `/${a.config.workspace}` : "")), a.editId ? (L = L.replace(/{id}/gi, a.editId), L) : (L = L.replace(/\/{id}/gi, ""), L);
|
|
3334
3335
|
}), b = () => {
|
|
3335
3336
|
m.value = !m.value;
|
|
3336
|
-
},
|
|
3337
|
+
}, I = () => {
|
|
3337
3338
|
a.config.cancelRoute ? i.push(a.config.cancelRoute) : C();
|
|
3338
3339
|
}, C = () => {
|
|
3339
3340
|
r("cancel");
|
|
3340
3341
|
}, w = () => {
|
|
3341
3342
|
y.value || r("submit");
|
|
3342
|
-
}, G =
|
|
3343
|
+
}, G = q([
|
|
3343
3344
|
{
|
|
3344
3345
|
title: o("baseForm.configuration.yaml"),
|
|
3345
3346
|
hash: "#yaml"
|
|
@@ -3351,30 +3352,30 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3351
3352
|
]);
|
|
3352
3353
|
return be(() => u.value, (k) => {
|
|
3353
3354
|
r("loading", k);
|
|
3354
|
-
}, { immediate: !0 }),
|
|
3355
|
+
}, { immediate: !0 }), gt(async () => {
|
|
3355
3356
|
if (a.editId)
|
|
3356
3357
|
try {
|
|
3357
3358
|
p.value = !1, u.value = !0;
|
|
3358
|
-
const { data: k } = await s.get(
|
|
3359
|
+
const { data: k } = await s.get(_.value);
|
|
3359
3360
|
r("fetch:success", k);
|
|
3360
3361
|
} catch (k) {
|
|
3361
|
-
const
|
|
3362
|
-
c.value =
|
|
3362
|
+
const j = l(k);
|
|
3363
|
+
c.value = j.startsWith("code") ? o("baseForm.errors.edit") : j, p.value = !0, r("fetch:error", k);
|
|
3363
3364
|
} finally {
|
|
3364
3365
|
u.value = !1;
|
|
3365
3366
|
}
|
|
3366
|
-
}), (k,
|
|
3367
|
-
const
|
|
3367
|
+
}), (k, j) => {
|
|
3368
|
+
const L = U("KSkeleton"), E = U("KEmptyState"), h = U("KAlert"), v = U("KButton"), K = U("KTabs"), S = U("KSlideout"), D = U("KCard");
|
|
3368
3369
|
return d(), R(D, { class: "kong-ui-entity-base-form" }, {
|
|
3369
3370
|
default: g(() => [
|
|
3370
|
-
u.value ? (d(), R(
|
|
3371
|
+
u.value ? (d(), R(L, {
|
|
3371
3372
|
key: 0,
|
|
3372
3373
|
type: "form"
|
|
3373
|
-
})) : p.value ? (d(), R(
|
|
3374
|
+
})) : p.value ? (d(), R(E, {
|
|
3374
3375
|
key: 1,
|
|
3375
3376
|
"cta-text": f(o)("baseForm.actions.back"),
|
|
3376
3377
|
"data-testid": "form-fetch-error",
|
|
3377
|
-
"handle-click":
|
|
3378
|
+
"handle-click": I,
|
|
3378
3379
|
"is-error": !0
|
|
3379
3380
|
}, {
|
|
3380
3381
|
message: g(() => [
|
|
@@ -3388,7 +3389,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3388
3389
|
onSubmit: Ge(w, ["prevent"])
|
|
3389
3390
|
}, [
|
|
3390
3391
|
Z(k.$slots, "default", {}, void 0, !0),
|
|
3391
|
-
e.errorMessage ? (d(), R(
|
|
3392
|
+
e.errorMessage ? (d(), R(h, {
|
|
3392
3393
|
key: 0,
|
|
3393
3394
|
"alert-message": e.errorMessage,
|
|
3394
3395
|
appearance: "danger",
|
|
@@ -3397,10 +3398,10 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3397
3398
|
B("div", $l, [
|
|
3398
3399
|
Z(k.$slots, "form-actions", {}, () => [
|
|
3399
3400
|
e.config.jsonYamlFormsEnabled ? (d(), $("div", Ml, [
|
|
3400
|
-
O(
|
|
3401
|
+
O(v, {
|
|
3401
3402
|
appearance: "tertiary",
|
|
3402
3403
|
"data-testid": "form-view-configuration",
|
|
3403
|
-
onClick:
|
|
3404
|
+
onClick: j[0] || (j[0] = (x) => b())
|
|
3404
3405
|
}, {
|
|
3405
3406
|
default: g(() => [
|
|
3406
3407
|
Y(M(f(o)("baseForm.actions.viewConfiguration")), 1)
|
|
@@ -3408,7 +3409,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3408
3409
|
_: 1
|
|
3409
3410
|
})
|
|
3410
3411
|
])) : H("", !0),
|
|
3411
|
-
O(
|
|
3412
|
+
O(v, {
|
|
3412
3413
|
appearance: "secondary",
|
|
3413
3414
|
"data-testid": "form-cancel",
|
|
3414
3415
|
disabled: e.isReadonly,
|
|
@@ -3419,7 +3420,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3419
3420
|
]),
|
|
3420
3421
|
_: 1
|
|
3421
3422
|
}, 8, ["disabled"]),
|
|
3422
|
-
O(
|
|
3423
|
+
O(v, {
|
|
3423
3424
|
appearance: "primary",
|
|
3424
3425
|
"data-testid": "form-submit",
|
|
3425
3426
|
disabled: y.value,
|
|
@@ -3433,25 +3434,25 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3433
3434
|
], !0)
|
|
3434
3435
|
])
|
|
3435
3436
|
], 32)),
|
|
3436
|
-
O(
|
|
3437
|
+
O(S, {
|
|
3437
3438
|
"close-button-alignment": "end",
|
|
3438
3439
|
"data-testid": "form-view-configuration-slideout",
|
|
3439
3440
|
"has-overlay": !1,
|
|
3440
3441
|
"is-visible": m.value,
|
|
3441
3442
|
"prevent-close-on-blur": "",
|
|
3442
3443
|
title: f(o)("baseForm.configuration.title"),
|
|
3443
|
-
onClose:
|
|
3444
|
+
onClose: j[1] || (j[1] = (x) => b())
|
|
3444
3445
|
}, {
|
|
3445
3446
|
default: g(() => [
|
|
3446
3447
|
B("div", null, M(f(o)("baseForm.configuration.message")), 1),
|
|
3447
|
-
O(
|
|
3448
|
+
O(K, {
|
|
3448
3449
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3449
3450
|
tabs: G.value
|
|
3450
3451
|
}, {
|
|
3451
3452
|
json: g(() => [
|
|
3452
3453
|
O(wn, {
|
|
3453
3454
|
config: e.config,
|
|
3454
|
-
"fetcher-url":
|
|
3455
|
+
"fetcher-url": _.value,
|
|
3455
3456
|
"json-record": a.formFields,
|
|
3456
3457
|
"request-method": a.editId ? "put" : "post"
|
|
3457
3458
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
@@ -3487,43 +3488,43 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3487
3488
|
}
|
|
3488
3489
|
},
|
|
3489
3490
|
setup(e) {
|
|
3490
|
-
const n = e, t =
|
|
3491
|
+
const n = e, t = A(() => {
|
|
3491
3492
|
var b;
|
|
3492
3493
|
return ((b = n.rowEl) == null ? void 0 : b.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3493
|
-
}), r =
|
|
3494
|
+
}), r = A(() => {
|
|
3494
3495
|
var b;
|
|
3495
3496
|
return ((b = t.value) == null ? void 0 : b.querySelector('[data-testid="first-col"]')) || null;
|
|
3496
|
-
}), a =
|
|
3497
|
-
var b,
|
|
3497
|
+
}), a = A(() => {
|
|
3498
|
+
var b, I;
|
|
3498
3499
|
const C = (b = n.rowEl) == null ? void 0 : b.querySelectorAll("td");
|
|
3499
|
-
return C ? ((
|
|
3500
|
+
return C ? ((I = C[0]) == null ? void 0 : I.getAttribute("data-testid")) === n.keyName : !1;
|
|
3500
3501
|
});
|
|
3501
3502
|
let i;
|
|
3502
3503
|
const o = () => {
|
|
3503
3504
|
i && (i.disconnect(), i = void 0);
|
|
3504
3505
|
}, l = () => {
|
|
3505
|
-
var b,
|
|
3506
|
-
u.value = ((b = r.value) == null ? void 0 : b.getBoundingClientRect().width) || 0, p.value = ((
|
|
3507
|
-
}, s =
|
|
3506
|
+
var b, I, C;
|
|
3507
|
+
u.value = ((b = r.value) == null ? void 0 : b.getBoundingClientRect().width) || 0, p.value = ((I = t.value) == null ? void 0 : I.clientWidth) || 0, c.value = ((C = s.value) == null ? void 0 : C.innerText) || "";
|
|
3508
|
+
}, s = q({}), u = q(0), p = q(0), c = q(""), y = A(() => [r.value, t.value]), m = be(
|
|
3508
3509
|
y,
|
|
3509
3510
|
(b) => {
|
|
3510
3511
|
if (a.value && (o(), "ResizeObserver" in window && window)) {
|
|
3511
|
-
i = new ResizeObserver((
|
|
3512
|
+
i = new ResizeObserver((I) => {
|
|
3512
3513
|
window.requestAnimationFrame(() => {
|
|
3513
|
-
!Array.isArray(
|
|
3514
|
+
!Array.isArray(I) || !I.length || l();
|
|
3514
3515
|
});
|
|
3515
3516
|
});
|
|
3516
|
-
for (const
|
|
3517
|
-
|
|
3517
|
+
for (const I of b)
|
|
3518
|
+
I && i.observe(I);
|
|
3518
3519
|
}
|
|
3519
3520
|
},
|
|
3520
3521
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3521
|
-
),
|
|
3522
|
+
), _ = A(() => a.value ? u.value > p.value : !1);
|
|
3522
3523
|
return kr(() => {
|
|
3523
3524
|
l();
|
|
3524
3525
|
}), wr(() => {
|
|
3525
3526
|
m();
|
|
3526
|
-
}), (b,
|
|
3527
|
+
}), (b, I) => {
|
|
3527
3528
|
const C = U("KTooltip");
|
|
3528
3529
|
return d(), $("span", {
|
|
3529
3530
|
ref_key: "contentRef",
|
|
@@ -3532,7 +3533,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3532
3533
|
}, [
|
|
3533
3534
|
a.value ? (d(), $("span", Fl, [
|
|
3534
3535
|
O(C, {
|
|
3535
|
-
label:
|
|
3536
|
+
label: _.value ? c.value : "",
|
|
3536
3537
|
"max-width": "300",
|
|
3537
3538
|
placement: "bottomStart"
|
|
3538
3539
|
}, {
|
|
@@ -3658,72 +3659,72 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3658
3659
|
},
|
|
3659
3660
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3660
3661
|
setup(e, { emit: n }) {
|
|
3661
|
-
const t = e, r = n, { i18n: { t: a } } = oe.useI18n(), i =
|
|
3662
|
-
var
|
|
3662
|
+
const t = e, r = n, { i18n: { t: a } } = oe.useI18n(), i = A(() => {
|
|
3663
|
+
var j, L;
|
|
3663
3664
|
return typeof t.errorMessage == "string" ? {
|
|
3664
3665
|
hasError: !!t.errorMessage,
|
|
3665
3666
|
title: t.errorMessage,
|
|
3666
3667
|
message: void 0
|
|
3667
3668
|
} : {
|
|
3668
3669
|
hasError: !!t.errorMessage,
|
|
3669
|
-
title: (
|
|
3670
|
-
message: (
|
|
3670
|
+
title: (j = t.errorMessage) == null ? void 0 : j.title,
|
|
3671
|
+
message: (L = t.errorMessage) == null ? void 0 : L.message
|
|
3671
3672
|
};
|
|
3672
|
-
}), o =
|
|
3673
|
-
const
|
|
3674
|
-
return Object.keys(t.tableHeaders).forEach((
|
|
3675
|
-
const
|
|
3676
|
-
|
|
3677
|
-
label:
|
|
3678
|
-
key:
|
|
3679
|
-
sortable:
|
|
3673
|
+
}), o = A(() => t.cacheIdentifier || t.preferencesStorageKey), l = (j) => j.hasData || !!t.query, s = A(() => {
|
|
3674
|
+
const j = [];
|
|
3675
|
+
return Object.keys(t.tableHeaders).forEach((L) => {
|
|
3676
|
+
const E = t.tableHeaders[L];
|
|
3677
|
+
j.push({
|
|
3678
|
+
label: E.label ?? L,
|
|
3679
|
+
key: L,
|
|
3680
|
+
sortable: E.sortable ?? !1
|
|
3680
3681
|
});
|
|
3681
|
-
}), t.enableEntityActions &&
|
|
3682
|
+
}), t.enableEntityActions && j.push({
|
|
3682
3683
|
key: "actions",
|
|
3683
3684
|
hideLabel: !0
|
|
3684
|
-
}),
|
|
3685
|
-
}), u = (
|
|
3686
|
-
"data-rowid":
|
|
3687
|
-
"data-testid":
|
|
3688
|
-
...t.rowAttributes(
|
|
3689
|
-
}), p =
|
|
3690
|
-
var
|
|
3691
|
-
return (
|
|
3692
|
-
}, y = (
|
|
3693
|
-
const
|
|
3694
|
-
"data-testid":
|
|
3695
|
-
...t.cellAttributes(
|
|
3685
|
+
}), j;
|
|
3686
|
+
}), u = (j) => ({
|
|
3687
|
+
"data-rowid": j.id,
|
|
3688
|
+
"data-testid": j.name,
|
|
3689
|
+
...t.rowAttributes(j)
|
|
3690
|
+
}), p = q({}), c = (j) => {
|
|
3691
|
+
var L;
|
|
3692
|
+
return (L = p.value) == null ? void 0 : L.$el.querySelector(`[data-rowid="${j.id}"]`);
|
|
3693
|
+
}, y = (j) => {
|
|
3694
|
+
const L = {
|
|
3695
|
+
"data-testid": j.headerKey,
|
|
3696
|
+
...t.cellAttributes(j)
|
|
3696
3697
|
};
|
|
3697
|
-
return
|
|
3698
|
+
return j.colIndex === 0 && (L.style = {
|
|
3698
3699
|
maxWidth: "250px",
|
|
3699
3700
|
overflowX: "hidden",
|
|
3700
3701
|
textOverflow: "ellipsis"
|
|
3701
|
-
}),
|
|
3702
|
+
}), L;
|
|
3702
3703
|
}, m = () => {
|
|
3703
|
-
r("empty-state-cta-clicked"),
|
|
3704
|
-
},
|
|
3704
|
+
r("empty-state-cta-clicked"), _();
|
|
3705
|
+
}, _ = () => {
|
|
3705
3706
|
r("clear-search-input");
|
|
3706
|
-
}, b =
|
|
3707
|
-
r("click:row",
|
|
3708
|
-
}),
|
|
3709
|
-
r("sort",
|
|
3710
|
-
}, { setTablePreferences: C, getTablePreferences: w } = Mr(), G =
|
|
3711
|
-
const
|
|
3707
|
+
}, b = A(() => t.disableRowClick ? void 0 : (j, L) => {
|
|
3708
|
+
r("click:row", L);
|
|
3709
|
+
}), I = (j) => {
|
|
3710
|
+
r("sort", j);
|
|
3711
|
+
}, { setTablePreferences: C, getTablePreferences: w } = Mr(), G = A(() => {
|
|
3712
|
+
const j = w(t.preferencesStorageKey);
|
|
3712
3713
|
return {
|
|
3713
3714
|
...t.initialFetcherParams,
|
|
3714
|
-
...
|
|
3715
|
+
...j
|
|
3715
3716
|
};
|
|
3716
|
-
}), k = (
|
|
3717
|
-
t.preferencesStorageKey && C(t.preferencesStorageKey,
|
|
3717
|
+
}), k = (j) => {
|
|
3718
|
+
t.preferencesStorageKey && C(t.preferencesStorageKey, j);
|
|
3718
3719
|
};
|
|
3719
|
-
return (
|
|
3720
|
-
const
|
|
3721
|
-
return d(), R(
|
|
3720
|
+
return (j, L) => {
|
|
3721
|
+
const E = U("KIcon"), h = U("KButton"), v = U("KDropdown"), K = U("KTable"), S = U("KCard");
|
|
3722
|
+
return d(), R(S, {
|
|
3722
3723
|
class: "kong-ui-entity-base-table",
|
|
3723
3724
|
title: e.title
|
|
3724
3725
|
}, {
|
|
3725
3726
|
default: g(() => [
|
|
3726
|
-
O(
|
|
3727
|
+
O(K, {
|
|
3727
3728
|
ref_key: "tableRefs",
|
|
3728
3729
|
ref: p,
|
|
3729
3730
|
"cache-identifier": o.value,
|
|
@@ -3752,43 +3753,43 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3752
3753
|
"search-input": e.query,
|
|
3753
3754
|
onKtableEmptyStateCtaClicked: m,
|
|
3754
3755
|
"onRow:click": b.value,
|
|
3755
|
-
onSort:
|
|
3756
|
+
onSort: L[0] || (L[0] = (D) => I(D)),
|
|
3756
3757
|
"onUpdate:tablePreferences": k
|
|
3757
3758
|
}, ke({
|
|
3758
3759
|
toolbar: g(({ state: D }) => [
|
|
3759
3760
|
Be(B("div", Kl, [
|
|
3760
|
-
Z(
|
|
3761
|
-
|
|
3762
|
-
Z(
|
|
3761
|
+
Z(j.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3762
|
+
j.$slots["toolbar-button"] ? (d(), $("div", Bl, [
|
|
3763
|
+
Z(j.$slots, "toolbar-button", {}, void 0, !0)
|
|
3763
3764
|
])) : H("", !0)
|
|
3764
3765
|
], 512), [
|
|
3765
3766
|
[Le, l(D)]
|
|
3766
3767
|
])
|
|
3767
3768
|
]),
|
|
3768
|
-
actions: g(({ row: D, rowKey:
|
|
3769
|
+
actions: g(({ row: D, rowKey: x, rowValue: F }) => [
|
|
3769
3770
|
B("div", {
|
|
3770
3771
|
class: "actions-container",
|
|
3771
3772
|
"data-testid": D.name
|
|
3772
3773
|
}, [
|
|
3773
|
-
O(
|
|
3774
|
+
O(v, {
|
|
3774
3775
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3775
3776
|
width: e.dropdownMenuWidth
|
|
3776
3777
|
}, {
|
|
3777
3778
|
items: g(() => [
|
|
3778
|
-
Z(
|
|
3779
|
+
Z(j.$slots, "actions", {
|
|
3779
3780
|
row: D,
|
|
3780
|
-
rowKey:
|
|
3781
|
-
rowValue:
|
|
3781
|
+
rowKey: x,
|
|
3782
|
+
rowValue: F
|
|
3782
3783
|
}, void 0, !0)
|
|
3783
3784
|
]),
|
|
3784
3785
|
default: g(() => [
|
|
3785
|
-
O(
|
|
3786
|
+
O(h, {
|
|
3786
3787
|
class: "actions-trigger",
|
|
3787
3788
|
"data-testid": "overflow-actions-button",
|
|
3788
3789
|
size: "small"
|
|
3789
3790
|
}, {
|
|
3790
3791
|
icon: g(() => [
|
|
3791
|
-
O(
|
|
3792
|
+
O(E, {
|
|
3792
3793
|
color: f(Ia),
|
|
3793
3794
|
icon: "more",
|
|
3794
3795
|
size: "16"
|
|
@@ -3803,16 +3804,16 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3803
3804
|
]),
|
|
3804
3805
|
_: 2
|
|
3805
3806
|
}, [
|
|
3806
|
-
pe(e.tableHeaders, (D,
|
|
3807
|
-
name:
|
|
3808
|
-
fn: g(({ row:
|
|
3807
|
+
pe(e.tableHeaders, (D, x) => ({
|
|
3808
|
+
name: x,
|
|
3809
|
+
fn: g(({ row: F, rowKey: P, rowValue: V }) => [
|
|
3809
3810
|
O(ql, {
|
|
3810
|
-
"key-name": String(
|
|
3811
|
-
"row-el": c(
|
|
3811
|
+
"key-name": String(x),
|
|
3812
|
+
"row-el": c(F)
|
|
3812
3813
|
}, {
|
|
3813
3814
|
default: g(() => [
|
|
3814
|
-
Z(
|
|
3815
|
-
row:
|
|
3815
|
+
Z(j.$slots, x, {
|
|
3816
|
+
row: F,
|
|
3816
3817
|
rowKey: P,
|
|
3817
3818
|
rowValue: V
|
|
3818
3819
|
}, () => [
|
|
@@ -3829,7 +3830,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3829
3830
|
}, 8, ["title"]);
|
|
3830
3831
|
};
|
|
3831
3832
|
}
|
|
3832
|
-
}), Pl = /* @__PURE__ */ ge(Ul, [["__scopeId", "data-v-
|
|
3833
|
+
}), Pl = /* @__PURE__ */ ge(Ul, [["__scopeId", "data-v-57b5a97b"]]), Dl = {
|
|
3833
3834
|
key: 0,
|
|
3834
3835
|
class: "kong-ui-entity-delete-error"
|
|
3835
3836
|
}, Rl = {
|
|
@@ -3874,7 +3875,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3874
3875
|
},
|
|
3875
3876
|
emits: ["cancel", "proceed"],
|
|
3876
3877
|
setup(e, { emit: n }) {
|
|
3877
|
-
const { i18nT: t } = oe.useI18n(), r = e, a = n, i =
|
|
3878
|
+
const { i18nT: t } = oe.useI18n(), r = e, a = n, i = A(() => r.needConfirm ? r.entityName : ""), o = () => {
|
|
3878
3879
|
a("cancel");
|
|
3879
3880
|
}, l = () => {
|
|
3880
3881
|
a("proceed");
|
|
@@ -3991,12 +3992,12 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3991
3992
|
},
|
|
3992
3993
|
emits: ["update:modelValue"],
|
|
3993
3994
|
setup(e, { emit: n }) {
|
|
3994
|
-
const { i18n: { t } } = oe.useI18n(), r = e, a = n, i =
|
|
3995
|
+
const { i18n: { t } } = oe.useI18n(), r = e, a = n, i = q(!1), o = q({}), l = A(() => {
|
|
3995
3996
|
const C = [];
|
|
3996
3997
|
return new URLSearchParams(r.modelValue).forEach((w, G) => {
|
|
3997
3998
|
w !== "" && C.push(G);
|
|
3998
3999
|
}), C;
|
|
3999
|
-
}), s =
|
|
4000
|
+
}), s = A(() => {
|
|
4000
4001
|
const C = r.config.fields;
|
|
4001
4002
|
return Object.keys(C).filter((w) => C[w].searchable).map((w) => ({
|
|
4002
4003
|
label: C[w].label || w,
|
|
@@ -4021,19 +4022,19 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4021
4022
|
}, m = (C) => {
|
|
4022
4023
|
var w, G;
|
|
4023
4024
|
return ((G = (w = r.config.schema) == null ? void 0 : w[C]) == null ? void 0 : G.type) ?? "text";
|
|
4024
|
-
},
|
|
4025
|
+
}, _ = (C) => {
|
|
4025
4026
|
o.value = {
|
|
4026
4027
|
...o.value,
|
|
4027
4028
|
[C]: ""
|
|
4028
|
-
},
|
|
4029
|
+
}, I();
|
|
4029
4030
|
}, b = () => {
|
|
4030
|
-
o.value = {},
|
|
4031
|
-
},
|
|
4031
|
+
o.value = {}, I(!0);
|
|
4032
|
+
}, I = (C = !1) => {
|
|
4032
4033
|
const w = Object.keys(o.value).reduce((G, k) => (o.value[k] && (G[k] = `${o.value[k]}`), G), {});
|
|
4033
4034
|
C && (i.value = !1), a("update:modelValue", new URLSearchParams(w).toString());
|
|
4034
4035
|
};
|
|
4035
4036
|
return (C, w) => {
|
|
4036
|
-
const G = U("KInput"), k = U("KButton"),
|
|
4037
|
+
const G = U("KInput"), k = U("KButton"), j = U("KSelect"), L = U("KMenuItem"), E = U("KMenu");
|
|
4037
4038
|
return e.config.isExactMatch ? (d(), R(G, {
|
|
4038
4039
|
key: 0,
|
|
4039
4040
|
autocomplete: "off",
|
|
@@ -4065,45 +4066,46 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4065
4066
|
}, null, 512), [
|
|
4066
4067
|
[Le, i.value]
|
|
4067
4068
|
]),
|
|
4068
|
-
Be(O(
|
|
4069
|
+
Be(O(E, { class: "kong-ui-entity-filter-menu" }, {
|
|
4069
4070
|
body: g(() => [
|
|
4070
|
-
(d(!0), $(me, null, pe(s.value, (
|
|
4071
|
-
key:
|
|
4072
|
-
"data-testid":
|
|
4071
|
+
(d(!0), $(me, null, pe(s.value, (h, v) => (d(), R(L, {
|
|
4072
|
+
key: h.value,
|
|
4073
|
+
"data-testid": h.value,
|
|
4073
4074
|
expandable: "",
|
|
4074
|
-
"last-menu-item":
|
|
4075
|
+
"last-menu-item": v === s.value.length - 1
|
|
4075
4076
|
}, {
|
|
4076
4077
|
itemTitle: g(() => [
|
|
4077
4078
|
B("span", Ql, [
|
|
4078
|
-
Y(M(
|
|
4079
|
+
Y(M(h.label) + " ", 1),
|
|
4079
4080
|
Be(B("span", Xl, null, 512), [
|
|
4080
|
-
[Le, l.value.includes(
|
|
4081
|
+
[Le, l.value.includes(h.value)]
|
|
4081
4082
|
])
|
|
4082
4083
|
])
|
|
4083
4084
|
]),
|
|
4084
4085
|
itemBody: g(() => {
|
|
4085
|
-
var
|
|
4086
|
+
var K, S;
|
|
4086
4087
|
return [
|
|
4087
4088
|
B("div", es, [
|
|
4088
4089
|
B("label", {
|
|
4089
4090
|
class: "menu-item-label",
|
|
4090
|
-
for: c(
|
|
4091
|
+
for: c(h.value)
|
|
4091
4092
|
}, M(f(t)("filter.fieldLabel")), 9, ts),
|
|
4092
|
-
((
|
|
4093
|
+
((S = (K = e.config.schema) == null ? void 0 : K[h.value]) == null ? void 0 : S.type) === "select" ? (d(), R(j, {
|
|
4093
4094
|
key: 0,
|
|
4094
|
-
id: c(
|
|
4095
|
-
modelValue: o.value[
|
|
4096
|
-
"onUpdate:modelValue": (D) => o.value[
|
|
4097
|
-
|
|
4095
|
+
id: c(h.value),
|
|
4096
|
+
modelValue: o.value[h.value],
|
|
4097
|
+
"onUpdate:modelValue": (D) => o.value[h.value] = D,
|
|
4098
|
+
appearance: "select",
|
|
4099
|
+
items: y(h.value),
|
|
4098
4100
|
placeholder: f(t)("filter.selectPlaceholder")
|
|
4099
4101
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (d(), R(G, {
|
|
4100
4102
|
key: 1,
|
|
4101
|
-
id: c(
|
|
4102
|
-
modelValue: o.value[
|
|
4103
|
-
"onUpdate:modelValue": (D) => o.value[
|
|
4103
|
+
id: c(h.value),
|
|
4104
|
+
modelValue: o.value[h.value],
|
|
4105
|
+
"onUpdate:modelValue": (D) => o.value[h.value] = D,
|
|
4104
4106
|
autocomplete: "off",
|
|
4105
4107
|
placeholder: f(t)("filter.inputPlaceholder"),
|
|
4106
|
-
type: m(
|
|
4108
|
+
type: m(h.value)
|
|
4107
4109
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4108
4110
|
]),
|
|
4109
4111
|
B("div", ns, [
|
|
@@ -4111,7 +4113,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4111
4113
|
appearance: "tertiary",
|
|
4112
4114
|
"data-testid": "apply-filter",
|
|
4113
4115
|
size: "small",
|
|
4114
|
-
onClick: w[0] || (w[0] = (D) =>
|
|
4116
|
+
onClick: w[0] || (w[0] = (D) => I(!0))
|
|
4115
4117
|
}, {
|
|
4116
4118
|
default: g(() => [
|
|
4117
4119
|
Y(M(f(t)("filter.applyButtonText")), 1)
|
|
@@ -4122,7 +4124,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4122
4124
|
appearance: "tertiary",
|
|
4123
4125
|
"data-testid": "clear-filter",
|
|
4124
4126
|
size: "small",
|
|
4125
|
-
onClick: (D) =>
|
|
4127
|
+
onClick: (D) => _(h.value)
|
|
4126
4128
|
}, {
|
|
4127
4129
|
default: g(() => [
|
|
4128
4130
|
Y(M(f(t)("filter.clearButtonText")), 1)
|
|
@@ -4156,7 +4158,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4156
4158
|
]));
|
|
4157
4159
|
};
|
|
4158
4160
|
}
|
|
4159
|
-
}), os = /* @__PURE__ */ ge(as, [["__scopeId", "data-v-
|
|
4161
|
+
}), os = /* @__PURE__ */ ge(as, [["__scopeId", "data-v-15962ee2"]]), Ve = /* @__PURE__ */ te({
|
|
4160
4162
|
__name: "PermissionsWrapper",
|
|
4161
4163
|
props: {
|
|
4162
4164
|
/**
|
|
@@ -4178,7 +4180,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4178
4180
|
}
|
|
4179
4181
|
},
|
|
4180
4182
|
setup(e) {
|
|
4181
|
-
const n = e, t =
|
|
4183
|
+
const n = e, t = q(void 0), r = A(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
4182
4184
|
return be(() => n.authFunction, async () => {
|
|
4183
4185
|
t.value = await n.authFunction();
|
|
4184
4186
|
}, { immediate: !0 }), (a, i) => r.value ? Z(a.$slots, "default", {
|
|
@@ -4220,7 +4222,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4220
4222
|
}
|
|
4221
4223
|
},
|
|
4222
4224
|
setup(e) {
|
|
4223
|
-
const n =
|
|
4225
|
+
const n = Ze();
|
|
4224
4226
|
return (t, r) => (d(), $("fieldset", {
|
|
4225
4227
|
class: _e(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4226
4228
|
}, [
|
|
@@ -4245,7 +4247,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4245
4247
|
])
|
|
4246
4248
|
], 2));
|
|
4247
4249
|
}
|
|
4248
|
-
}), ps = /* @__PURE__ */ ge(ds, [["__scopeId", "data-v-3565daa7"]]), { useAxios:
|
|
4250
|
+
}), ps = /* @__PURE__ */ ge(ds, [["__scopeId", "data-v-3565daa7"]]), { useAxios: xt, useDeleteUrlBuilder: fs, useErrors: ms, useExternalLinkCreator: Bs, useFetchUrlBuilder: Ls, useFetcher: gs, useDebouncedFilter: ys, useStringHelpers: Us, useHelpers: Ps, useGatewayFeatureSupported: Ds, useTruncationDetector: Rs } = oe, hs = { class: "add-consumer-form-container" }, vs = { class: "add-consumer-form-cta" }, bs = { class: "select-item-label" }, Cs = {
|
|
4249
4251
|
key: 0,
|
|
4250
4252
|
class: "select-item-desc"
|
|
4251
4253
|
}, ks = {
|
|
@@ -4269,9 +4271,9 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4269
4271
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4270
4272
|
setup(e, { emit: n }) {
|
|
4271
4273
|
var D;
|
|
4272
|
-
const { i18n: { t } } =
|
|
4274
|
+
const { i18n: { t } } = Qe.useI18n(), r = e, a = n, { axiosInstance: i } = xt({
|
|
4273
4275
|
headers: (D = r.config) == null ? void 0 : D.requestHeaders
|
|
4274
|
-
}), o =
|
|
4276
|
+
}), o = q([]), {
|
|
4275
4277
|
debouncedQueryChange: l,
|
|
4276
4278
|
loading: s,
|
|
4277
4279
|
allRecords: u,
|
|
@@ -4286,85 +4288,85 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4286
4288
|
fetchedItemsKey: "data",
|
|
4287
4289
|
searchKeys: ["username", "id"]
|
|
4288
4290
|
}
|
|
4289
|
-
), m = (
|
|
4290
|
-
label:
|
|
4291
|
-
value:
|
|
4292
|
-
selected: o.value.includes(
|
|
4293
|
-
data:
|
|
4291
|
+
), m = (x) => x, _ = A(() => p.value ? t("consumers.errors.general") : ""), b = q(0), I = A(() => u.value === void 0), C = A(() => y.value.map((x) => ({
|
|
4292
|
+
label: x.username || x.customId,
|
|
4293
|
+
value: x.id,
|
|
4294
|
+
selected: o.value.includes(x.id),
|
|
4295
|
+
data: x
|
|
4294
4296
|
// we need this to determine whether or not to show the description text
|
|
4295
|
-
}))), w = (
|
|
4297
|
+
}))), w = (x) => {
|
|
4296
4298
|
var P;
|
|
4297
|
-
const
|
|
4298
|
-
return
|
|
4299
|
+
const F = I.value ? y.value.find((V) => V.id === x) : (P = u.value) == null ? void 0 : P.find((V) => V.id === x);
|
|
4300
|
+
return F ? F.username || F.custom_id : x;
|
|
4299
4301
|
}, G = () => {
|
|
4300
|
-
|
|
4301
|
-
}, k =
|
|
4302
|
+
L.value = "", k.value = [], K.value = [], a("cancel");
|
|
4303
|
+
}, k = q([]), j = q(!1), L = q(""), E = async () => {
|
|
4302
4304
|
if (!o.value.length) {
|
|
4303
|
-
|
|
4305
|
+
L.value = "", K.value = [], a("cancel");
|
|
4304
4306
|
return;
|
|
4305
4307
|
}
|
|
4306
|
-
|
|
4308
|
+
j.value = !0, L.value = "", k.value = [], K.value = [];
|
|
4307
4309
|
try {
|
|
4308
|
-
const
|
|
4310
|
+
const x = o.value.map((V) => v(V)), F = await Promise.allSettled(x);
|
|
4309
4311
|
let P = !0;
|
|
4310
|
-
|
|
4312
|
+
F.forEach((V) => {
|
|
4311
4313
|
V.status !== "fulfilled" && (P = !1);
|
|
4312
|
-
}), P ? (k.value = [],
|
|
4314
|
+
}), P ? (k.value = [], K.value = [], a("add:success", o.value), o.value = []) : (k.value.length && a("add:partial-success", k.value), o.value = [], S(F));
|
|
4313
4315
|
} catch {
|
|
4314
|
-
|
|
4316
|
+
L.value = t("consumers.errors.add"), a("error", L.value);
|
|
4315
4317
|
} finally {
|
|
4316
|
-
|
|
4318
|
+
j.value = !1;
|
|
4317
4319
|
}
|
|
4318
|
-
},
|
|
4319
|
-
var
|
|
4320
|
-
let
|
|
4321
|
-
return r.config.app === "konnect" ?
|
|
4322
|
-
}),
|
|
4323
|
-
const
|
|
4324
|
-
consumer:
|
|
4320
|
+
}, h = A(() => {
|
|
4321
|
+
var F, P, V, Q;
|
|
4322
|
+
let x = `${r.config.apiBaseUrl}${Te.list[r.config.app].forConsumerGroup}`;
|
|
4323
|
+
return r.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((F = r.config) == null ? void 0 : F.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((P = r.config) == null ? void 0 : P.consumerGroupId) || "") : r.config.app === "kongManager" && (x = x.replace(/\/{workspace}/gi, (V = r.config) != null && V.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((Q = r.config) == null ? void 0 : Q.consumerGroupId) || "")), x;
|
|
4324
|
+
}), v = async (x) => {
|
|
4325
|
+
const F = {
|
|
4326
|
+
consumer: x
|
|
4325
4327
|
};
|
|
4326
4328
|
try {
|
|
4327
|
-
const P = await i.post(
|
|
4328
|
-
return k.value.push(
|
|
4329
|
+
const P = await i.post(h.value, F);
|
|
4330
|
+
return k.value.push(x), P;
|
|
4329
4331
|
} catch (P) {
|
|
4330
|
-
let V = `${w(
|
|
4331
|
-
return P.response.status === 409 && (V = `${w(
|
|
4332
|
+
let V = `${w(x)} - ${P.message}`;
|
|
4333
|
+
return P.response.status === 409 && (V = `${w(x)} - ${t("consumers.errors.already_added")}`), Promise.reject(Error(V));
|
|
4332
4334
|
}
|
|
4333
|
-
},
|
|
4334
|
-
|
|
4335
|
+
}, K = q([]), S = (x) => {
|
|
4336
|
+
K.value = x.map((F) => {
|
|
4335
4337
|
var P;
|
|
4336
|
-
return (P =
|
|
4338
|
+
return (P = F.reason) == null ? void 0 : P.message;
|
|
4337
4339
|
}).filter(Boolean);
|
|
4338
4340
|
};
|
|
4339
4341
|
return be(C, () => {
|
|
4340
4342
|
b.value++;
|
|
4341
4343
|
}, { immediate: !0, deep: !0 }), be(() => r.visible, () => {
|
|
4342
4344
|
r.visible && c();
|
|
4343
|
-
}, { immediate: !0 }), (
|
|
4345
|
+
}, { immediate: !0 }), (x, F) => {
|
|
4344
4346
|
const P = U("KMultiselect"), V = U("KAlert"), Q = U("KPrompt");
|
|
4345
4347
|
return d(), R(Q, {
|
|
4346
|
-
"action-pending":
|
|
4348
|
+
"action-pending": j.value,
|
|
4347
4349
|
class: "kong-ui-entities-add-consumers-modal",
|
|
4348
4350
|
"data-testid": "add-consumer-modal",
|
|
4349
4351
|
"is-visible": e.visible,
|
|
4350
4352
|
title: f(t)("consumers.consumer_groups.add.title"),
|
|
4351
4353
|
onCanceled: G,
|
|
4352
|
-
onProceed:
|
|
4354
|
+
onProceed: E
|
|
4353
4355
|
}, {
|
|
4354
4356
|
"body-content": g(() => [
|
|
4355
4357
|
B("div", hs, [
|
|
4356
4358
|
B("p", vs, M(f(t)("consumers.consumer_groups.add.ctaText")), 1),
|
|
4357
4359
|
O(P, {
|
|
4358
4360
|
modelValue: o.value,
|
|
4359
|
-
"onUpdate:modelValue":
|
|
4361
|
+
"onUpdate:modelValue": F[0] || (F[0] = (J) => o.value = J),
|
|
4360
4362
|
autosuggest: "",
|
|
4361
4363
|
"data-testid": "add-consumers-multiselect",
|
|
4362
|
-
"dropdown-footer-text":
|
|
4364
|
+
"dropdown-footer-text": I.value ? f(t)("consumers.consumer_groups.add.footer") : void 0,
|
|
4363
4365
|
items: C.value,
|
|
4364
4366
|
label: f(t)("consumers.consumer_groups.add.consumers_label"),
|
|
4365
4367
|
loading: f(s),
|
|
4366
4368
|
placeholder: f(t)("consumers.consumer_groups.add.consumer_placeholder"),
|
|
4367
|
-
readonly:
|
|
4369
|
+
readonly: j.value,
|
|
4368
4370
|
required: "",
|
|
4369
4371
|
width: "100%",
|
|
4370
4372
|
onQueryChange: f(l)
|
|
@@ -4375,14 +4377,14 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4375
4377
|
]),
|
|
4376
4378
|
_: 1
|
|
4377
4379
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4378
|
-
|
|
4380
|
+
L.value || _.value || K.value.length ? (d(), $("div", ks, [
|
|
4379
4381
|
O(V, { appearance: "danger" }, {
|
|
4380
4382
|
alertMessage: g(() => [
|
|
4381
4383
|
B("p", null, M(f(t)("consumers.errors.add")), 1),
|
|
4382
|
-
|
|
4383
|
-
(d(!0), $(me, null, pe(
|
|
4384
|
+
K.value.length ? (d(), $("ul", ws, [
|
|
4385
|
+
(d(!0), $(me, null, pe(K.value, (J, X) => (d(), $("li", { key: X }, M(J), 1))), 128))
|
|
4384
4386
|
])) : H("", !0),
|
|
4385
|
-
B("div", null, M(
|
|
4387
|
+
B("div", null, M(L.value || _.value), 1)
|
|
4386
4388
|
]),
|
|
4387
4389
|
_: 1
|
|
4388
4390
|
})
|
|
@@ -4393,12 +4395,12 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4393
4395
|
}, 8, ["action-pending", "is-visible", "title"]);
|
|
4394
4396
|
};
|
|
4395
4397
|
}
|
|
4396
|
-
}),
|
|
4398
|
+
}), Tt = (e, n) => {
|
|
4397
4399
|
const t = e.__vccOpts || e;
|
|
4398
4400
|
for (const [r, a] of n)
|
|
4399
4401
|
t[r] = a;
|
|
4400
4402
|
return t;
|
|
4401
|
-
}, Is = /* @__PURE__ */
|
|
4403
|
+
}, Is = /* @__PURE__ */ Tt(_s, [["__scopeId", "data-v-68cc6403"]]), As = { class: "kong-ui-entities-consumers-list" }, Ss = { key: 1 }, xs = /* @__PURE__ */ te({
|
|
4402
4404
|
__name: "ConsumerList",
|
|
4403
4405
|
props: {
|
|
4404
4406
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4444,167 +4446,167 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4444
4446
|
},
|
|
4445
4447
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4446
4448
|
setup(e, { emit: n }) {
|
|
4447
|
-
var
|
|
4448
|
-
const t = n, r = e, { i18nT: a, i18n: { t: i } } =
|
|
4449
|
-
headers: (
|
|
4450
|
-
}), s =
|
|
4449
|
+
var Nt;
|
|
4450
|
+
const t = n, r = e, { i18nT: a, i18n: { t: i } } = Qe.useI18n(), o = yt(), { axiosInstance: l } = xt({
|
|
4451
|
+
headers: (Nt = r.config) == null ? void 0 : Nt.requestHeaders
|
|
4452
|
+
}), s = q(1), u = A(() => !!r.config.consumerGroupId), p = A(
|
|
4451
4453
|
() => u.value ? "kong-ui-entities-consumers-list-in-group-page" : "kong-ui-entities-consumers-list"
|
|
4452
|
-
), c =
|
|
4454
|
+
), c = A(() => r.config.app !== "kongManager" || !!r.config.disableSorting), y = {
|
|
4453
4455
|
username: { label: i("consumers.list.table_headers.username"), searchable: !0, sortable: !0 },
|
|
4454
4456
|
custom_id: { label: i("consumers.list.table_headers.custom_id"), searchable: !0, sortable: !0 },
|
|
4455
4457
|
tags: { label: i("consumers.list.table_headers.tags"), sortable: !1 }
|
|
4456
|
-
}, m = y,
|
|
4457
|
-
"data-testid":
|
|
4458
|
-
}), b =
|
|
4458
|
+
}, m = y, _ = (T) => ({
|
|
4459
|
+
"data-testid": T.username ?? T.custom_id ?? T.id
|
|
4460
|
+
}), b = A(() => {
|
|
4459
4461
|
var z, ne, ce, ye;
|
|
4460
|
-
let
|
|
4461
|
-
return r.config.app === "konnect" ?
|
|
4462
|
-
}),
|
|
4463
|
-
const
|
|
4464
|
-
return
|
|
4465
|
-
isExactMatch:
|
|
4462
|
+
let T = `${r.config.apiBaseUrl}${Te.list[r.config.app][u.value ? "forConsumerGroup" : "all"]}`;
|
|
4463
|
+
return r.config.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, ((z = r.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((ne = r.config) == null ? void 0 : ne.consumerGroupId) || "") : r.config.app === "kongManager" && (T = T.replace(/\/{workspace}/gi, (ce = r.config) != null && ce.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ye = r.config) == null ? void 0 : ye.consumerGroupId) || "")), T;
|
|
4464
|
+
}), I = q(""), C = A(() => {
|
|
4465
|
+
const T = r.config.app === "konnect" || r.config.isExactMatch;
|
|
4466
|
+
return T ? {
|
|
4467
|
+
isExactMatch: T,
|
|
4466
4468
|
placeholder: i(`consumers.search.placeholder.${r.config.app}`)
|
|
4467
4469
|
} : {
|
|
4468
|
-
isExactMatch:
|
|
4470
|
+
isExactMatch: T,
|
|
4469
4471
|
fields: {
|
|
4470
4472
|
username: y.username,
|
|
4471
4473
|
custom_id: y.custom_id
|
|
4472
4474
|
},
|
|
4473
4475
|
schema: r.config.filterSchema
|
|
4474
4476
|
};
|
|
4475
|
-
}), w =
|
|
4476
|
-
|
|
4477
|
-
},
|
|
4477
|
+
}), w = A(() => u.value && !r.config.paginatedEndpoint ? "consumers" : void 0), { fetcher: G, fetcherState: k } = gs(r.config, b.value, w.value), j = () => {
|
|
4478
|
+
I.value = "";
|
|
4479
|
+
}, L = () => {
|
|
4478
4480
|
s.value++;
|
|
4479
|
-
},
|
|
4480
|
-
const ne =
|
|
4481
|
+
}, E = (T) => T ?? "-", h = q(null), v = (T, z) => {
|
|
4482
|
+
const ne = T.id;
|
|
4481
4483
|
if (!z(ne)) {
|
|
4482
4484
|
t("copy:error", {
|
|
4483
|
-
entity:
|
|
4485
|
+
entity: T,
|
|
4484
4486
|
field: "id",
|
|
4485
4487
|
message: i("consumers.errors.copy")
|
|
4486
4488
|
});
|
|
4487
4489
|
return;
|
|
4488
4490
|
}
|
|
4489
4491
|
t("copy:success", {
|
|
4490
|
-
entity:
|
|
4492
|
+
entity: T,
|
|
4491
4493
|
field: "id",
|
|
4492
4494
|
message: i("consumers.copy.success", { val: ne })
|
|
4493
4495
|
});
|
|
4494
|
-
},
|
|
4495
|
-
const ne = JSON.stringify(
|
|
4496
|
+
}, K = (T, z) => {
|
|
4497
|
+
const ne = JSON.stringify(T);
|
|
4496
4498
|
if (!z(ne)) {
|
|
4497
4499
|
t("copy:error", {
|
|
4498
|
-
entity:
|
|
4500
|
+
entity: T,
|
|
4499
4501
|
message: i("consumers.errors.copy")
|
|
4500
4502
|
});
|
|
4501
4503
|
return;
|
|
4502
4504
|
}
|
|
4503
4505
|
t("copy:success", {
|
|
4504
|
-
entity:
|
|
4506
|
+
entity: T,
|
|
4505
4507
|
message: i("consumers.copy.success_brief")
|
|
4506
4508
|
});
|
|
4507
|
-
},
|
|
4509
|
+
}, S = async (T) => {
|
|
4508
4510
|
var ne;
|
|
4509
|
-
await ((ne = r.canRetrieve) == null ? void 0 : ne.call(r,
|
|
4510
|
-
}, D = (
|
|
4511
|
+
await ((ne = r.canRetrieve) == null ? void 0 : ne.call(r, T)) && o.push(r.config.getViewRoute(T.id));
|
|
4512
|
+
}, D = (T) => ({
|
|
4511
4513
|
label: i("consumers.actions.view"),
|
|
4512
|
-
to: r.config.getViewRoute(
|
|
4513
|
-
}),
|
|
4514
|
+
to: r.config.getViewRoute(T)
|
|
4515
|
+
}), x = (T) => ({
|
|
4514
4516
|
label: i("consumers.actions.edit"),
|
|
4515
|
-
to: r.config.getEditRoute(
|
|
4516
|
-
}),
|
|
4517
|
-
|
|
4517
|
+
to: r.config.getEditRoute(T)
|
|
4518
|
+
}), F = q(void 0), P = q(!1), V = q(!1), Q = q(""), J = fs(r.config, b.value), X = (T) => {
|
|
4519
|
+
F.value = T, P.value = !0;
|
|
4518
4520
|
}, ue = () => {
|
|
4519
4521
|
P.value = !1;
|
|
4520
4522
|
}, dr = async () => {
|
|
4521
|
-
var
|
|
4522
|
-
if ((
|
|
4523
|
+
var T, z, ne;
|
|
4524
|
+
if ((T = F.value) != null && T.id) {
|
|
4523
4525
|
V.value = !0;
|
|
4524
4526
|
try {
|
|
4525
|
-
await l.delete(J(
|
|
4527
|
+
await l.delete(J(F.value.id)), V.value = !1, P.value = !1, s.value++, t("delete:success", F.value);
|
|
4526
4528
|
} catch (ce) {
|
|
4527
4529
|
Q.value = ((ne = (z = ce.response) == null ? void 0 : z.data) == null ? void 0 : ne.message) || ce.message || i("consumers.errors.delete"), t("error", ce);
|
|
4528
4530
|
} finally {
|
|
4529
4531
|
V.value = !1;
|
|
4530
4532
|
}
|
|
4531
4533
|
}
|
|
4532
|
-
},
|
|
4533
|
-
|
|
4534
|
-
},
|
|
4535
|
-
|
|
4536
|
-
},
|
|
4537
|
-
z ||
|
|
4534
|
+
}, et = q(!1), jt = () => {
|
|
4535
|
+
et.value = !0;
|
|
4536
|
+
}, $t = () => {
|
|
4537
|
+
et.value = !1;
|
|
4538
|
+
}, Mt = (T, z) => {
|
|
4539
|
+
z || $t(), s.value++, t("add:success", T);
|
|
4538
4540
|
}, pr = () => {
|
|
4539
|
-
u.value &&
|
|
4540
|
-
}, ve =
|
|
4541
|
-
ve.value =
|
|
4542
|
-
},
|
|
4543
|
-
|
|
4544
|
-
}, gr =
|
|
4541
|
+
u.value && jt();
|
|
4542
|
+
}, ve = q(void 0), tt = q(!1), fr = q(""), mr = (T) => {
|
|
4543
|
+
ve.value = T, tt.value = !0;
|
|
4544
|
+
}, Ot = () => {
|
|
4545
|
+
tt.value = !1, ve.value = void 0;
|
|
4546
|
+
}, gr = A(() => {
|
|
4545
4547
|
var z, ne, ce, ye;
|
|
4546
|
-
let
|
|
4547
|
-
return r.config.app === "konnect" ?
|
|
4548
|
-
}),
|
|
4548
|
+
let T = `${r.config.apiBaseUrl}${Te.list[r.config.app].oneForConsumerGroup}`;
|
|
4549
|
+
return r.config.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, ((z = r.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((ne = r.config) == null ? void 0 : ne.consumerGroupId) || "") : r.config.app === "kongManager" && (T = T.replace(/\/{workspace}/gi, (ce = r.config) != null && ce.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ye = r.config) == null ? void 0 : ye.consumerGroupId) || "")), T;
|
|
4550
|
+
}), Et = q(!1), yr = async () => {
|
|
4549
4551
|
if (ve.value) {
|
|
4550
|
-
|
|
4552
|
+
Et.value = !0;
|
|
4551
4553
|
try {
|
|
4552
|
-
const
|
|
4553
|
-
await l.delete(
|
|
4554
|
-
} catch (
|
|
4555
|
-
fr.value =
|
|
4554
|
+
const T = gr.value.replace(/{consumerId}/gi, ve.value.id);
|
|
4555
|
+
await l.delete(T), t("remove:success", ve.value), Ot(), s.value++;
|
|
4556
|
+
} catch (T) {
|
|
4557
|
+
fr.value = T.message || i("consumers.errors.delete"), t("error", T);
|
|
4556
4558
|
} finally {
|
|
4557
|
-
|
|
4559
|
+
Et.value = !1;
|
|
4558
4560
|
}
|
|
4559
4561
|
}
|
|
4560
|
-
},
|
|
4561
|
-
be(k, (
|
|
4562
|
+
}, Ft = q(!0);
|
|
4563
|
+
be(k, (T) => {
|
|
4562
4564
|
var z, ne, ce, ye;
|
|
4563
|
-
if (Array.isArray((z =
|
|
4564
|
-
|
|
4565
|
+
if (Array.isArray((z = T == null ? void 0 : T.response) == null ? void 0 : z.data) && (Ft.value = T.response.data.length > 0), T.status === Ae.Error) {
|
|
4566
|
+
h.value = {
|
|
4565
4567
|
title: i("consumers.errors.general")
|
|
4566
|
-
}, (ye = (ce = (ne =
|
|
4568
|
+
}, (ye = (ce = (ne = T.error) == null ? void 0 : ne.response) == null ? void 0 : ce.data) != null && ye.message && (h.value.message = T.error.response.data.message), t("error", T.error);
|
|
4567
4569
|
return;
|
|
4568
4570
|
}
|
|
4569
|
-
|
|
4571
|
+
h.value = null;
|
|
4570
4572
|
});
|
|
4571
|
-
const
|
|
4573
|
+
const nt = q({
|
|
4572
4574
|
ctaPath: u.value ? void 0 : r.config.createRoute,
|
|
4573
4575
|
ctaText: void 0,
|
|
4574
4576
|
message: i("consumers.list.empty_state.description"),
|
|
4575
4577
|
title: i("consumers.title")
|
|
4576
4578
|
});
|
|
4577
|
-
return
|
|
4578
|
-
await r.canCreate() && (
|
|
4579
|
-
}), (
|
|
4580
|
-
const ne = U("KButton"), ce = U("KBadge"), ye = U("KTruncate"), qe = U("KDropdownItem"),
|
|
4579
|
+
return gt(async () => {
|
|
4580
|
+
await r.canCreate() && (nt.value.title = u.value ? i("consumers.list.empty_state.title_for_consumer_group") : i("consumers.list.empty_state.title"), nt.value.ctaText = u.value ? i("consumers.actions.add_consumer") : i("consumers.actions.create"));
|
|
4581
|
+
}), (T, z) => {
|
|
4582
|
+
const ne = U("KButton"), ce = U("KBadge"), ye = U("KTruncate"), qe = U("KDropdownItem"), qt = U("KClipboardProvider"), hr = U("KPrompt");
|
|
4581
4583
|
return d(), $("div", As, [
|
|
4582
4584
|
O(f(Pl), {
|
|
4583
4585
|
"cache-identifier": e.cacheIdentifier,
|
|
4584
4586
|
"disable-pagination": u.value && !e.config.paginatedEndpoint,
|
|
4585
4587
|
"disable-pagination-page-jump": "",
|
|
4586
4588
|
"disable-sorting": c.value,
|
|
4587
|
-
"empty-state-options":
|
|
4589
|
+
"empty-state-options": nt.value,
|
|
4588
4590
|
"enable-entity-actions": "",
|
|
4589
|
-
"error-message":
|
|
4591
|
+
"error-message": h.value,
|
|
4590
4592
|
fetcher: f(G),
|
|
4591
4593
|
"fetcher-cache-key": s.value,
|
|
4592
4594
|
"pagination-type": "offset",
|
|
4593
4595
|
"preferences-storage-key": p.value,
|
|
4594
|
-
query:
|
|
4595
|
-
"row-attributes":
|
|
4596
|
+
query: I.value,
|
|
4597
|
+
"row-attributes": _,
|
|
4596
4598
|
"table-headers": f(m),
|
|
4597
4599
|
"use-action-outside": e.useActionOutside,
|
|
4598
|
-
onClearSearchInput:
|
|
4599
|
-
"onClick:row": z[3] || (z[3] = (W) =>
|
|
4600
|
+
onClearSearchInput: j,
|
|
4601
|
+
"onClick:row": z[3] || (z[3] = (W) => S(W)),
|
|
4600
4602
|
onEmptyStateCtaClicked: pr,
|
|
4601
|
-
onSort:
|
|
4603
|
+
onSort: L
|
|
4602
4604
|
}, {
|
|
4603
4605
|
"toolbar-filter": g(() => [
|
|
4604
4606
|
u.value ? H("", !0) : (d(), R(f(os), {
|
|
4605
4607
|
key: 0,
|
|
4606
|
-
modelValue:
|
|
4607
|
-
"onUpdate:modelValue": z[0] || (z[0] = (W) =>
|
|
4608
|
+
modelValue: I.value,
|
|
4609
|
+
"onUpdate:modelValue": z[0] || (z[0] = (W) => I.value = W),
|
|
4608
4610
|
config: C.value
|
|
4609
4611
|
}, null, 8, ["modelValue", "config"]))
|
|
4610
4612
|
]),
|
|
@@ -4622,14 +4624,14 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4622
4624
|
"data-testid": "toolbar-add-consumer",
|
|
4623
4625
|
icon: "plus",
|
|
4624
4626
|
to: e.config.consumerGroupId ? void 0 : e.config.createRoute,
|
|
4625
|
-
onClick: z[1] || (z[1] = () => e.config.consumerGroupId ?
|
|
4627
|
+
onClick: z[1] || (z[1] = () => e.config.consumerGroupId ? jt() : void 0)
|
|
4626
4628
|
}, {
|
|
4627
4629
|
default: g(() => [
|
|
4628
4630
|
Y(M(e.config.consumerGroupId ? f(i)("consumers.actions.add_consumer") : f(i)("consumers.list.toolbar_actions.new_consumer")), 1)
|
|
4629
4631
|
]),
|
|
4630
4632
|
_: 1
|
|
4631
4633
|
}, 8, ["to"]), [
|
|
4632
|
-
[Le,
|
|
4634
|
+
[Le, Ft.value]
|
|
4633
4635
|
])
|
|
4634
4636
|
]),
|
|
4635
4637
|
_: 1
|
|
@@ -4639,10 +4641,10 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4639
4641
|
}, 8, ["to"]))
|
|
4640
4642
|
]),
|
|
4641
4643
|
username: g(({ rowValue: W }) => [
|
|
4642
|
-
B("b", null, M(
|
|
4644
|
+
B("b", null, M(E(W)), 1)
|
|
4643
4645
|
]),
|
|
4644
4646
|
custom_id: g(({ rowValue: W }) => [
|
|
4645
|
-
Y(M(
|
|
4647
|
+
Y(M(E(W)), 1)
|
|
4646
4648
|
]),
|
|
4647
4649
|
tags: g(({ rowValue: W }) => [
|
|
4648
4650
|
W && W.length > 0 ? (d(), R(ye, { key: 0 }, {
|
|
@@ -4662,11 +4664,11 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4662
4664
|
}, 1024)) : (d(), $("span", Ss, "-"))
|
|
4663
4665
|
]),
|
|
4664
4666
|
actions: g(({ row: W }) => [
|
|
4665
|
-
O(
|
|
4667
|
+
O(qt, null, {
|
|
4666
4668
|
default: g(({ copyToClipboard: je }) => [
|
|
4667
4669
|
O(qe, {
|
|
4668
4670
|
"data-testid": "action-entity-copy-id",
|
|
4669
|
-
onClick: (vr) =>
|
|
4671
|
+
onClick: (vr) => v(W, je)
|
|
4670
4672
|
}, {
|
|
4671
4673
|
default: g(() => [
|
|
4672
4674
|
Y(M(f(i)("consumers.actions.copy_id")), 1)
|
|
@@ -4676,11 +4678,11 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4676
4678
|
]),
|
|
4677
4679
|
_: 2
|
|
4678
4680
|
}, 1024),
|
|
4679
|
-
O(
|
|
4681
|
+
O(qt, null, {
|
|
4680
4682
|
default: g(({ copyToClipboard: je }) => [
|
|
4681
4683
|
O(qe, {
|
|
4682
4684
|
"data-testid": "action-entity-copy-json",
|
|
4683
|
-
onClick: (vr) =>
|
|
4685
|
+
onClick: (vr) => K(W, je)
|
|
4684
4686
|
}, {
|
|
4685
4687
|
default: g(() => [
|
|
4686
4688
|
Y(M(f(i)("consumers.actions.copy_json")), 1)
|
|
@@ -4708,7 +4710,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4708
4710
|
default: g(() => [
|
|
4709
4711
|
O(qe, {
|
|
4710
4712
|
"data-testid": "action-entity-edit",
|
|
4711
|
-
item:
|
|
4713
|
+
item: x(W.id)
|
|
4712
4714
|
}, null, 8, ["item"])
|
|
4713
4715
|
]),
|
|
4714
4716
|
_: 2
|
|
@@ -4738,7 +4740,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4738
4740
|
"action-pending": V.value,
|
|
4739
4741
|
"data-testid": "delete-consumer-modal",
|
|
4740
4742
|
description: f(i)("consumers.delete.description"),
|
|
4741
|
-
"entity-name":
|
|
4743
|
+
"entity-name": F.value && (F.value.username || F.value.custom_id || F.value.id),
|
|
4742
4744
|
"entity-type": f(gn).Consumer,
|
|
4743
4745
|
error: Q.value,
|
|
4744
4746
|
title: f(i)("consumers.delete.title"),
|
|
@@ -4750,18 +4752,18 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4750
4752
|
key: 0,
|
|
4751
4753
|
config: e.config,
|
|
4752
4754
|
"data-testid": "add-consumer-modal",
|
|
4753
|
-
visible:
|
|
4754
|
-
"onAdd:partialSuccess": z[4] || (z[4] = (W) =>
|
|
4755
|
-
"onAdd:success": z[5] || (z[5] = (W) =>
|
|
4756
|
-
onCancel:
|
|
4755
|
+
visible: et.value,
|
|
4756
|
+
"onAdd:partialSuccess": z[4] || (z[4] = (W) => Mt(W, !0)),
|
|
4757
|
+
"onAdd:success": z[5] || (z[5] = (W) => Mt(W)),
|
|
4758
|
+
onCancel: $t
|
|
4757
4759
|
}, null, 8, ["config", "visible"])) : H("", !0),
|
|
4758
4760
|
e.config.consumerGroupId && ve.value ? (d(), R(hr, {
|
|
4759
4761
|
key: 1,
|
|
4760
4762
|
"data-testid": "remove-consumer-modal",
|
|
4761
|
-
"is-visible":
|
|
4763
|
+
"is-visible": tt.value,
|
|
4762
4764
|
title: f(i)("consumers.consumer_groups.remove.title"),
|
|
4763
4765
|
type: "danger",
|
|
4764
|
-
onCanceled:
|
|
4766
|
+
onCanceled: Ot,
|
|
4765
4767
|
onProceed: yr
|
|
4766
4768
|
}, {
|
|
4767
4769
|
"body-content": g(() => [
|
|
@@ -4790,7 +4792,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4790
4792
|
]);
|
|
4791
4793
|
};
|
|
4792
4794
|
}
|
|
4793
|
-
}), Vs = /* @__PURE__ */
|
|
4795
|
+
}), Vs = /* @__PURE__ */ Tt(xs, [["__scopeId", "data-v-4ec34e52"]]), Ts = { class: "kong-ui-entities-consumer-form" }, js = { class: "fields-group-title" }, $s = { class: "fields-group-text" }, Ms = /* @__PURE__ */ te({
|
|
4794
4796
|
__name: "ConsumerForm",
|
|
4795
4797
|
props: {
|
|
4796
4798
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4808,10 +4810,10 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4808
4810
|
},
|
|
4809
4811
|
emits: ["update", "error", "loading"],
|
|
4810
4812
|
setup(e, { emit: n }) {
|
|
4811
|
-
var
|
|
4812
|
-
const t = e, r = n, { i18nT: a, i18n: { t: i } } =
|
|
4813
|
-
headers: (
|
|
4814
|
-
}), { getMessageFromError: s } = ms(), u =
|
|
4813
|
+
var L;
|
|
4814
|
+
const t = e, r = n, { i18nT: a, i18n: { t: i } } = Qe.useI18n(), o = yt(), { axiosInstance: l } = xt({
|
|
4815
|
+
headers: (L = t.config) == null ? void 0 : L.requestHeaders
|
|
4816
|
+
}), { getMessageFromError: s } = ms(), u = Kt({
|
|
4815
4817
|
fields: {
|
|
4816
4818
|
username: "",
|
|
4817
4819
|
customId: "",
|
|
@@ -4819,48 +4821,50 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4819
4821
|
},
|
|
4820
4822
|
readonly: !1,
|
|
4821
4823
|
errorMessage: ""
|
|
4822
|
-
}), p =
|
|
4824
|
+
}), p = Kt({
|
|
4823
4825
|
username: "",
|
|
4824
4826
|
customId: "",
|
|
4825
4827
|
tags: ""
|
|
4826
|
-
}), c =
|
|
4827
|
-
var
|
|
4828
|
-
return (
|
|
4828
|
+
}), c = A(() => {
|
|
4829
|
+
var E, h;
|
|
4830
|
+
return (h = Te.form[(E = t.config) == null ? void 0 : E.app]) == null ? void 0 : h.edit;
|
|
4829
4831
|
}), y = () => {
|
|
4830
|
-
var
|
|
4831
|
-
o.push(((
|
|
4832
|
-
}, m = (
|
|
4833
|
-
r("loading",
|
|
4834
|
-
},
|
|
4835
|
-
r("error",
|
|
4836
|
-
}, b = (
|
|
4837
|
-
var
|
|
4838
|
-
u.fields.username = ((
|
|
4839
|
-
const
|
|
4840
|
-
u.fields.tags = (
|
|
4841
|
-
},
|
|
4842
|
-
var
|
|
4843
|
-
let
|
|
4844
|
-
return ((
|
|
4845
|
-
}, w =
|
|
4846
|
-
var
|
|
4832
|
+
var E;
|
|
4833
|
+
o.push(((E = t.config) == null ? void 0 : E.cancelRoute) || { name: "consumer-list" });
|
|
4834
|
+
}, m = (E) => {
|
|
4835
|
+
r("loading", E);
|
|
4836
|
+
}, _ = (E) => {
|
|
4837
|
+
r("error", E);
|
|
4838
|
+
}, b = (E) => {
|
|
4839
|
+
var v, K, S;
|
|
4840
|
+
u.fields.username = ((v = E == null ? void 0 : E.item) == null ? void 0 : v.username) || (E == null ? void 0 : E.username) || "", u.fields.customId = ((K = E == null ? void 0 : E.item) == null ? void 0 : K.custom_id) || (E == null ? void 0 : E.custom_id) || "";
|
|
4841
|
+
const h = ((S = E == null ? void 0 : E.item) == null ? void 0 : S.tags) || (E == null ? void 0 : E.tags) || [];
|
|
4842
|
+
u.fields.tags = (h == null ? void 0 : h.join(", ")) || "", Object.assign(p, u.fields);
|
|
4843
|
+
}, I = A(() => t.consumerId ? ut.Edit : ut.Create), C = (E) => {
|
|
4844
|
+
var v, K, S, D, x, F;
|
|
4845
|
+
let h = `${(v = t.config) == null ? void 0 : v.apiBaseUrl}${Te.form[(K = t.config) == null ? void 0 : K.app][E]}`;
|
|
4846
|
+
return ((S = t.config) == null ? void 0 : S.app) === "konnect" ? h = h.replace(/{controlPlaneId}/gi, ((D = t.config) == null ? void 0 : D.controlPlaneId) || "") : ((x = t.config) == null ? void 0 : x.app) === "kongManager" && (h = h.replace(/\/{workspace}/gi, (F = t.config) != null && F.workspace ? `/${t.config.workspace}` : "")), h = h.replace(/{id}/gi, t.consumerId), h;
|
|
4847
|
+
}, w = A(() => !!u.fields.username || !!u.fields.customId), G = A(() => JSON.stringify(u.fields) !== JSON.stringify(p)), k = A(() => {
|
|
4848
|
+
var E, h;
|
|
4849
|
+
return {
|
|
4850
|
+
username: u.fields.username || null,
|
|
4851
|
+
custom_id: u.fields.customId || null,
|
|
4852
|
+
tags: (h = (E = u.fields.tags.split(",")) == null ? void 0 : E.map((v) => String(v || "").trim())) == null ? void 0 : h.filter((v) => v !== "")
|
|
4853
|
+
};
|
|
4854
|
+
}), j = async () => {
|
|
4855
|
+
var E;
|
|
4847
4856
|
try {
|
|
4848
4857
|
u.readonly = !0;
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
custom_id: u.fields.customId || null,
|
|
4852
|
-
tags: (L = (v = u.fields.tags.split(",")) == null ? void 0 : v.map((q) => String(q || "").trim())) == null ? void 0 : L.filter((q) => q !== "")
|
|
4853
|
-
};
|
|
4854
|
-
let _;
|
|
4855
|
-
await l.post(C("validate"), h), A.value === "create" ? _ = await l.post(C("create"), h) : A.value === "edit" && (_ = ((F = t.config) == null ? void 0 : F.app) === "konnect" ? await l.put(C("edit"), h) : await l.patch(C("edit"), h)), b(_ == null ? void 0 : _.data), r("update", _ == null ? void 0 : _.data);
|
|
4858
|
+
let h;
|
|
4859
|
+
await l.post(C("validate"), k.value), I.value === "create" ? h = await l.post(C("create"), k.value) : I.value === "edit" && (h = ((E = t.config) == null ? void 0 : E.app) === "konnect" ? await l.put(C("edit"), k.value) : await l.patch(C("edit"), k.value)), b(h == null ? void 0 : h.data), r("update", h == null ? void 0 : h.data);
|
|
4856
4860
|
} catch (h) {
|
|
4857
4861
|
u.errorMessage = s(h), r("error", h);
|
|
4858
4862
|
} finally {
|
|
4859
4863
|
u.readonly = !1;
|
|
4860
4864
|
}
|
|
4861
4865
|
};
|
|
4862
|
-
return (
|
|
4863
|
-
const
|
|
4866
|
+
return (E, h) => {
|
|
4867
|
+
const v = U("KInput"), K = U("KCard");
|
|
4864
4868
|
return d(), $("div", Ts, [
|
|
4865
4869
|
O(f(El), {
|
|
4866
4870
|
"can-submit": w.value && G.value,
|
|
@@ -4868,13 +4872,13 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4868
4872
|
"edit-id": e.consumerId,
|
|
4869
4873
|
"error-message": u.errorMessage,
|
|
4870
4874
|
"fetch-url": c.value,
|
|
4871
|
-
"form-fields":
|
|
4875
|
+
"form-fields": k.value,
|
|
4872
4876
|
"is-readonly": u.readonly,
|
|
4873
4877
|
onCancel: y,
|
|
4874
|
-
"onFetch:error":
|
|
4878
|
+
"onFetch:error": h[3] || (h[3] = (S) => _(S)),
|
|
4875
4879
|
"onFetch:success": b,
|
|
4876
|
-
onLoading:
|
|
4877
|
-
onSubmit:
|
|
4880
|
+
onLoading: h[4] || (h[4] = (S) => m(S)),
|
|
4881
|
+
onSubmit: j
|
|
4878
4882
|
}, {
|
|
4879
4883
|
default: g(() => [
|
|
4880
4884
|
B("div", null, [
|
|
@@ -4888,11 +4892,11 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4888
4892
|
B("h5", js, M(f(i)("consumers.form.consumer_identification.title")) + "* ", 1),
|
|
4889
4893
|
B("p", $s, M(f(i)("consumers.form.consumer_identification.description")), 1)
|
|
4890
4894
|
]),
|
|
4891
|
-
O(
|
|
4895
|
+
O(K, null, {
|
|
4892
4896
|
default: g(() => [
|
|
4893
|
-
O(
|
|
4897
|
+
O(v, {
|
|
4894
4898
|
modelValue: u.fields.username,
|
|
4895
|
-
"onUpdate:modelValue":
|
|
4899
|
+
"onUpdate:modelValue": h[0] || (h[0] = (S) => u.fields.username = S),
|
|
4896
4900
|
modelModifiers: { trim: !0 },
|
|
4897
4901
|
autocomplete: "off",
|
|
4898
4902
|
class: "username-field",
|
|
@@ -4918,9 +4922,9 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4918
4922
|
]),
|
|
4919
4923
|
_: 1
|
|
4920
4924
|
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
4921
|
-
O(
|
|
4925
|
+
O(v, {
|
|
4922
4926
|
modelValue: u.fields.customId,
|
|
4923
|
-
"onUpdate:modelValue":
|
|
4927
|
+
"onUpdate:modelValue": h[1] || (h[1] = (S) => u.fields.customId = S),
|
|
4924
4928
|
modelModifiers: { trim: !0 },
|
|
4925
4929
|
autocomplete: "off",
|
|
4926
4930
|
"data-testid": "consumer-form-custom-id",
|
|
@@ -4948,9 +4952,9 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4948
4952
|
]),
|
|
4949
4953
|
_: 1
|
|
4950
4954
|
}),
|
|
4951
|
-
O(
|
|
4955
|
+
O(v, {
|
|
4952
4956
|
modelValue: u.fields.tags,
|
|
4953
|
-
"onUpdate:modelValue":
|
|
4957
|
+
"onUpdate:modelValue": h[2] || (h[2] = (S) => u.fields.tags = S),
|
|
4954
4958
|
modelModifiers: { trim: !0 },
|
|
4955
4959
|
autocomplete: "off",
|
|
4956
4960
|
"data-testid": "consumer-form-tags",
|
|
@@ -4974,7 +4978,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4974
4978
|
]);
|
|
4975
4979
|
};
|
|
4976
4980
|
}
|
|
4977
|
-
}), Gs = /* @__PURE__ */
|
|
4981
|
+
}), Gs = /* @__PURE__ */ Tt(Ms, [["__scopeId", "data-v-265f9254"]]), Os = { class: "kong-ui-consumer-entity-config-card" }, Hs = /* @__PURE__ */ te({
|
|
4978
4982
|
__name: "ConsumerConfigCard",
|
|
4979
4983
|
props: {
|
|
4980
4984
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5001,7 +5005,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
5001
5005
|
},
|
|
5002
5006
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
5003
5007
|
setup(e) {
|
|
5004
|
-
const n = e, { i18n: { t }, i18nT: r } =
|
|
5008
|
+
const n = e, { i18n: { t }, i18nT: r } = Qe.useI18n(), a = A(() => Te.form[n.config.app].edit), i = q({
|
|
5005
5009
|
id: {},
|
|
5006
5010
|
username: {
|
|
5007
5011
|
section: de.Basic,
|