@kong-ui-public/entities-shared 3.0.9 → 3.0.10-pr.1329.3e39fb45.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.
- package/dist/entities-shared.es.js +549 -536
- package/dist/entities-shared.umd.js +12 -12
- package/dist/style.css +1 -1
- package/dist/types/components/entity-base-table/EntityBaseTableCell.vue.d.ts +11 -1
- package/dist/types/components/entity-base-table/EntityBaseTableCell.vue.d.ts.map +1 -1
- package/dist/types/types/base.d.ts +5 -0
- package/dist/types/types/base.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject as Fn, ref as
|
|
1
|
+
import { inject as Fn, ref as K, unref as E, computed as A, watch as Ae, defineComponent as H, openBlock as m, createBlock as M, resolveDynamicComponent as pe, normalizeClass as de, withCtx as x, createElementBlock as I, createElementVNode as L, toDisplayString as O, createCommentVNode as D, Fragment as se, renderList as ae, resolveComponent as B, createVNode as R, createTextVNode as V, useCssVars as $t, useSlots as Xe, renderSlot as Y, createSlots as ke, normalizeProps as On, guardReactiveProps as $n, mergeProps as Ln, normalizeStyle as Oe, pushScopeId as $e, popScopeId as Le, onBeforeMount as Lt, withModifiers as ze, onMounted as Nn, onUnmounted as Rn, withDirectives as me, vShow as ge, withKeys as Bn, Teleport as Kn } from "vue";
|
|
2
2
|
import st from "axios";
|
|
3
3
|
import { createI18n as Mn, i18nTComponent as Dn } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as Un } from "@kong/kongponents";
|
|
@@ -247,65 +247,65 @@ function ar(e, t, n, r = {
|
|
|
247
247
|
searchKeys: ["id"]
|
|
248
248
|
}) {
|
|
249
249
|
n || (n = "1000");
|
|
250
|
-
const { axiosInstance: i } = et(e.axiosRequestConfig), { i18n: { t: a } } = je(), { debounce: o } = Vn(), l = o(async (
|
|
251
|
-
await
|
|
252
|
-
}, 200), s =
|
|
253
|
-
let
|
|
254
|
-
e.app === "konnect" ?
|
|
255
|
-
const { isValidUuid:
|
|
250
|
+
const { axiosInstance: i } = et(e.axiosRequestConfig), { i18n: { t: a } } = je(), { debounce: o } = Vn(), l = o(async (p) => {
|
|
251
|
+
await Z(p);
|
|
252
|
+
}, 200), s = K(!1), u = K(""), d = K(""), c = K([]), h = K([]), f = K(void 0), v = E(t);
|
|
253
|
+
let b = `${e.apiBaseUrl}${v}`;
|
|
254
|
+
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}` : ""));
|
|
255
|
+
const { isValidUuid: _ } = Nt(), N = async () => {
|
|
256
256
|
try {
|
|
257
257
|
s.value = !0;
|
|
258
|
-
const { data:
|
|
259
|
-
|
|
258
|
+
const { data: p } = await i.get(`${b}?size=${n}`);
|
|
259
|
+
p != null && p.next || (f.value = r.fetchedItemsKey in p ? p[r.fetchedItemsKey] : []), h.value = r.fetchedItemsKey in p ? p[r.fetchedItemsKey] : [], c.value = h.value;
|
|
260
260
|
} catch {
|
|
261
261
|
c.value = [], u.value = a("debouncedFilter.errors.fetch");
|
|
262
262
|
} finally {
|
|
263
263
|
s.value = !1;
|
|
264
264
|
}
|
|
265
|
-
},
|
|
265
|
+
}, k = K(""), Z = async (p) => {
|
|
266
266
|
var y, g, $;
|
|
267
|
-
if (
|
|
268
|
-
if (
|
|
267
|
+
if (k.value !== p)
|
|
268
|
+
if (k.value = p || "", f.value === void 0)
|
|
269
269
|
try {
|
|
270
270
|
if (s.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
271
|
-
let F =
|
|
272
|
-
|
|
273
|
-
const { data:
|
|
274
|
-
r.fetchedItemsKey in
|
|
275
|
-
} else if (
|
|
271
|
+
let F = b + "";
|
|
272
|
+
p && (F += `/${p}`);
|
|
273
|
+
const { data: w } = await i.get(`${F}?size=${n}`);
|
|
274
|
+
r.fetchedItemsKey in w ? c.value = w[r.fetchedItemsKey] : w != null && w.id ? c.value = [w] : c.value = [];
|
|
275
|
+
} else if (p) {
|
|
276
276
|
const F = [];
|
|
277
|
-
|
|
278
|
-
const { data: T } = await i.get(`${
|
|
277
|
+
_(p) && r.searchKeys.includes("id") ? F.push((async () => {
|
|
278
|
+
const { data: T } = await i.get(`${b}/${p}`);
|
|
279
279
|
return [T[r.fetchedItemsKey] ?? T];
|
|
280
280
|
})()) : F.push(
|
|
281
281
|
...r.searchKeys.filter((T) => T !== "id").map(async (T) => {
|
|
282
|
-
const { data:
|
|
283
|
-
return
|
|
282
|
+
const { data: S } = await i.get(`${b}?${T}=${p}`);
|
|
283
|
+
return S[r.fetchedItemsKey];
|
|
284
284
|
})
|
|
285
285
|
);
|
|
286
|
-
const
|
|
287
|
-
c.value = [], (y =
|
|
288
|
-
var
|
|
289
|
-
(
|
|
286
|
+
const w = await Promise.all(F), U = /* @__PURE__ */ new Set();
|
|
287
|
+
c.value = [], (y = w == null ? void 0 : w.forEach) == null || y.call(w, (T) => {
|
|
288
|
+
var S;
|
|
289
|
+
(S = T == null ? void 0 : T.forEach) == null || S.call(T, (j) => {
|
|
290
290
|
U.has(j.id) || (U.add(j.id), c.value.push(j));
|
|
291
291
|
});
|
|
292
292
|
});
|
|
293
293
|
} else
|
|
294
|
-
c.value =
|
|
294
|
+
c.value = h.value;
|
|
295
295
|
} catch (F) {
|
|
296
296
|
((g = F == null ? void 0 : F.response) == null ? void 0 : g.status) === 404 ? d.value = a("debouncedFilter.errors.invalid") : (c.value = [], u.value = a("debouncedFilter.errors.fetch"));
|
|
297
297
|
} finally {
|
|
298
298
|
s.value = !1;
|
|
299
299
|
}
|
|
300
300
|
else
|
|
301
|
-
s.value = !0, d.value = "",
|
|
301
|
+
s.value = !0, d.value = "", p ? (c.value = ($ = f.value) == null ? void 0 : $.filter((F) => {
|
|
302
302
|
var U;
|
|
303
|
-
let
|
|
303
|
+
let w = !1;
|
|
304
304
|
for (const T of r.searchKeys) {
|
|
305
|
-
const
|
|
306
|
-
|
|
305
|
+
const S = typeof F[T] == "string" ? (U = F[T]) == null ? void 0 : U.toLowerCase() : F[T];
|
|
306
|
+
S != null && S.includes(p.toLowerCase()) && (w = !0);
|
|
307
307
|
}
|
|
308
|
-
return
|
|
308
|
+
return w;
|
|
309
309
|
}), (!c.value || !c.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : c.value = f.value, s.value = !1;
|
|
310
310
|
};
|
|
311
311
|
return {
|
|
@@ -314,12 +314,12 @@ function ar(e, t, n, r = {
|
|
|
314
314
|
validationError: d,
|
|
315
315
|
results: c,
|
|
316
316
|
allRecords: f,
|
|
317
|
-
loadItems:
|
|
317
|
+
loadItems: N,
|
|
318
318
|
debouncedQueryChange: l
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
321
|
function or(e, t) {
|
|
322
|
-
const n =
|
|
322
|
+
const n = E(t), r = A(
|
|
323
323
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
324
324
|
);
|
|
325
325
|
return r.value.search = "", (i) => `${r.value.href}/${i}`;
|
|
@@ -366,17 +366,17 @@ function sr(e) {
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
function Rt(e, t) {
|
|
369
|
-
const n =
|
|
369
|
+
const n = K(E(e)), r = K(E(t)), i = A(
|
|
370
370
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
371
|
-
), a =
|
|
371
|
+
), a = A(
|
|
372
372
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
373
373
|
);
|
|
374
374
|
return (o) => {
|
|
375
|
-
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query:
|
|
375
|
+
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query: h } = o;
|
|
376
376
|
try {
|
|
377
377
|
let f = new URL(a.value.href);
|
|
378
|
-
return i.value &&
|
|
379
|
-
f.searchParams.append(
|
|
378
|
+
return i.value && h ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${h}/`) : new URL(`${f.href}?filter[name][contains]=${h}`)) : (i.value || new URLSearchParams(h).forEach((v, b) => {
|
|
379
|
+
f.searchParams.append(b, v);
|
|
380
380
|
}), d && f.searchParams.append("sort_by", d), c === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(s))), u && l !== 1 && f.searchParams.append("offset", String(u)), f.href;
|
|
381
381
|
} catch (f) {
|
|
382
382
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
@@ -384,7 +384,7 @@ function Rt(e, t) {
|
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
386
|
function cr(e, t, n = "data") {
|
|
387
|
-
const r =
|
|
387
|
+
const r = E(t), { axiosInstance: i } = et(e.axiosRequestConfig), a = Rt(e, r), o = K({
|
|
388
388
|
status: be.Idle
|
|
389
389
|
});
|
|
390
390
|
return { fetcher: async (s) => {
|
|
@@ -396,22 +396,22 @@ function cr(e, t, n = "data") {
|
|
|
396
396
|
const c = await i.get(d);
|
|
397
397
|
if (c.status >= 400)
|
|
398
398
|
throw c;
|
|
399
|
-
const
|
|
400
|
-
let
|
|
401
|
-
|
|
402
|
-
const
|
|
403
|
-
data:
|
|
404
|
-
total:
|
|
405
|
-
...
|
|
399
|
+
const h = c.data, f = n && n.replace(/[^\w-_]/gi, "");
|
|
400
|
+
let v;
|
|
401
|
+
h[f] && Array.isArray(h[f]) ? v = h[f] : Array.isArray(h) ? v = h : v = Object.keys(h).length ? [h] : [];
|
|
402
|
+
const b = {
|
|
403
|
+
data: v,
|
|
404
|
+
total: v.length,
|
|
405
|
+
...h.offset ? {
|
|
406
406
|
pagination: {
|
|
407
|
-
offset:
|
|
407
|
+
offset: h.offset
|
|
408
408
|
}
|
|
409
409
|
} : null
|
|
410
410
|
};
|
|
411
411
|
return o.value = {
|
|
412
412
|
status: be.Idle,
|
|
413
|
-
response:
|
|
414
|
-
},
|
|
413
|
+
response: b
|
|
414
|
+
}, b;
|
|
415
415
|
} catch (d) {
|
|
416
416
|
const c = {
|
|
417
417
|
data: [],
|
|
@@ -492,11 +492,11 @@ function gr(e) {
|
|
|
492
492
|
return !(o && pt(i, o, "<") || l && pt(i, l, ">"));
|
|
493
493
|
}
|
|
494
494
|
function yr(e) {
|
|
495
|
-
const t =
|
|
495
|
+
const t = K(0), n = K(0), r = K(!1);
|
|
496
496
|
return Ae(e, (a) => {
|
|
497
497
|
a && !r.value && (t.value = a.offsetWidth, n.value = a.scrollWidth, r.value = !0);
|
|
498
498
|
}), {
|
|
499
|
-
isTruncated:
|
|
499
|
+
isTruncated: A(() => t.value < n.value)
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
502
|
function vr() {
|
|
@@ -539,25 +539,25 @@ const z = {
|
|
|
539
539
|
}
|
|
540
540
|
},
|
|
541
541
|
setup(e) {
|
|
542
|
-
const t = e, { i18n: { t: n } } = z.useI18n(), { convertKeyToTitle: r } = z.useStringHelpers(), i =
|
|
542
|
+
const t = e, { i18n: { t: n } } = z.useI18n(), { convertKeyToTitle: r } = z.useStringHelpers(), i = A(() => t.item.key ?? "json-array-item"), a = A(() => t.item.value ?? t.item), o = A(() => {
|
|
543
543
|
const s = JSON.parse(JSON.stringify(a.value));
|
|
544
544
|
return t.isArrayItem && delete s.name, s;
|
|
545
|
-
}), l =
|
|
545
|
+
}), l = A(() => {
|
|
546
546
|
var s;
|
|
547
547
|
return t.isArrayItem ? (s = a.value) != null && s.name ? r(a.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
548
548
|
});
|
|
549
|
-
return (s, u) => (
|
|
549
|
+
return (s, u) => (m(), M(pe(e.isArrayItem ? "fieldset" : "div"), {
|
|
550
550
|
class: de(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
551
551
|
}, {
|
|
552
552
|
default: x(() => [
|
|
553
|
-
e.isArrayItem ? (
|
|
553
|
+
e.isArrayItem ? (m(), I("legend", br, [
|
|
554
554
|
L("b", null, O(l.value), 1)
|
|
555
555
|
])) : D("", !0),
|
|
556
|
-
(
|
|
556
|
+
(m(!0), I(se, null, ae(Object.keys(o.value), (d, c) => (m(), M(Dt, {
|
|
557
557
|
key: `${i.value}-property-${c}`,
|
|
558
558
|
item: {
|
|
559
559
|
key: d,
|
|
560
|
-
label:
|
|
560
|
+
label: E(r)(d),
|
|
561
561
|
value: o.value[d]
|
|
562
562
|
}
|
|
563
563
|
}, null, 8, ["item"]))), 128))
|
|
@@ -582,15 +582,15 @@ const z = {
|
|
|
582
582
|
setup(e) {
|
|
583
583
|
const { i18n: { t } } = z.useI18n();
|
|
584
584
|
return (n, r) => {
|
|
585
|
-
const i =
|
|
586
|
-
return
|
|
587
|
-
|
|
585
|
+
const i = B("KButton");
|
|
586
|
+
return m(), I("div", null, [
|
|
587
|
+
R(i, {
|
|
588
588
|
appearance: "tertiary",
|
|
589
589
|
class: "navigation-button",
|
|
590
590
|
onClick: r[0] || (r[0] = (a) => n.$emit("navigation-click", e.item))
|
|
591
591
|
}, {
|
|
592
592
|
default: x(() => [
|
|
593
|
-
V(O(e.item.value ||
|
|
593
|
+
V(O(e.item.value || E(t)("baseConfigCard.commonFields.link")), 1)
|
|
594
594
|
]),
|
|
595
595
|
_: 1
|
|
596
596
|
})
|
|
@@ -608,12 +608,12 @@ const z = {
|
|
|
608
608
|
setup(e) {
|
|
609
609
|
const { i18n: { t } } = z.useI18n();
|
|
610
610
|
return (n, r) => {
|
|
611
|
-
const i =
|
|
612
|
-
return
|
|
611
|
+
const i = B("KBadge");
|
|
612
|
+
return m(), M(i, {
|
|
613
613
|
appearance: e.status ? "success" : "neutral"
|
|
614
614
|
}, {
|
|
615
615
|
default: x(() => [
|
|
616
|
-
V(O(e.status ?
|
|
616
|
+
V(O(e.status ? E(t)("baseConfigCard.statusBadge.enabledLabel") : E(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
617
617
|
]),
|
|
618
618
|
_: 1
|
|
619
619
|
}, 8, ["appearance"]);
|
|
@@ -642,13 +642,13 @@ const z = {
|
|
|
642
642
|
},
|
|
643
643
|
emits: ["navigation-click"],
|
|
644
644
|
setup(e, { emit: t }) {
|
|
645
|
-
$t((
|
|
646
|
-
"07753575": d.value ? "none" : `solid ${
|
|
645
|
+
$t((v) => ({
|
|
646
|
+
"07753575": d.value ? "none" : `solid ${E(Tr)} ${E(Ar)}`,
|
|
647
647
|
"32d44ea8": u.value && l.value ? "block" : "flex",
|
|
648
648
|
"5036b738": u.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
649
649
|
"5038fd13": u.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
650
650
|
}));
|
|
651
|
-
const n = e, r = t, i = Xe(), { i18n: { t: a, formatUnixTimeStamp: o } } = z.useI18n(), l =
|
|
651
|
+
const n = e, r = t, i = Xe(), { i18n: { t: a, formatUnixTimeStamp: o } } = z.useI18n(), l = A(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), s = A(() => !!(n.item.tooltip || i["label-tooltip"])), u = A(() => n.item.type === P.Json || n.item.type === P.JsonArray), d = A(() => n.item.type === P.JsonArray), c = A(() => {
|
|
652
652
|
switch (n.item.type) {
|
|
653
653
|
case P.ID:
|
|
654
654
|
return {
|
|
@@ -718,8 +718,8 @@ const z = {
|
|
|
718
718
|
attrs: {
|
|
719
719
|
"data-testid": `${n.item.key}-internal-link`,
|
|
720
720
|
item: n.item,
|
|
721
|
-
onNavigationClick: (
|
|
722
|
-
r("navigation-click",
|
|
721
|
+
onNavigationClick: (v) => {
|
|
722
|
+
r("navigation-click", v);
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
725
|
};
|
|
@@ -758,16 +758,16 @@ const z = {
|
|
|
758
758
|
text: n.item.value
|
|
759
759
|
};
|
|
760
760
|
}
|
|
761
|
-
}),
|
|
762
|
-
return (
|
|
763
|
-
const
|
|
764
|
-
return
|
|
761
|
+
}), h = K(), { isTruncated: f } = z.useTruncationDetector(h);
|
|
762
|
+
return (v, b) => {
|
|
763
|
+
const _ = B("KLabel"), N = B("KBadge"), k = B("KCopy"), Z = B("KTooltip");
|
|
764
|
+
return m(), I("div", $r, [
|
|
765
765
|
L("div", {
|
|
766
766
|
class: "config-card-details-label",
|
|
767
767
|
"data-testid": `${e.item.key}-label`
|
|
768
768
|
}, [
|
|
769
|
-
Y(
|
|
770
|
-
|
|
769
|
+
Y(v.$slots, "label", { item: e.item }, () => [
|
|
770
|
+
R(_, { "tooltip-attributes": { maxWidth: "500px" } }, ke({
|
|
771
771
|
default: x(() => [
|
|
772
772
|
V(O(e.item.label) + " ", 1)
|
|
773
773
|
]),
|
|
@@ -779,7 +779,7 @@ const z = {
|
|
|
779
779
|
L("div", {
|
|
780
780
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
781
781
|
}, [
|
|
782
|
-
Y(
|
|
782
|
+
Y(v.$slots, "label-tooltip", {}, () => [
|
|
783
783
|
V(O(e.item.tooltip), 1)
|
|
784
784
|
], !0)
|
|
785
785
|
], 8, Nr)
|
|
@@ -793,74 +793,74 @@ const z = {
|
|
|
793
793
|
class: "config-card-details-value",
|
|
794
794
|
"data-testid": `${e.item.key}-property-value`
|
|
795
795
|
}, [
|
|
796
|
-
Y(
|
|
796
|
+
Y(v.$slots, e.item.key, {
|
|
797
797
|
rowValue: e.item.value
|
|
798
798
|
}, () => [
|
|
799
|
-
l.value ? (
|
|
800
|
-
(
|
|
799
|
+
l.value ? (m(), I("div", Kr, [
|
|
800
|
+
(m(), M(pe(c.value.tag), On($n(c.value.attrs)), {
|
|
801
801
|
default: x(() => [
|
|
802
|
-
c.value.additionalComponent === "KBadge" ? (
|
|
802
|
+
c.value.additionalComponent === "KBadge" ? (m(), I("div", {
|
|
803
803
|
key: 0,
|
|
804
804
|
"data-testid": `${e.item.key}-badge-tags`
|
|
805
805
|
}, [
|
|
806
|
-
(
|
|
806
|
+
(m(!0), I(se, null, ae(e.item.value, (p, y) => (m(), M(N, {
|
|
807
807
|
key: `${e.item.key}-badge-tag-${y}`,
|
|
808
808
|
class: "config-badge",
|
|
809
809
|
"data-testid": `${e.item.key}-badge-tag-${y}`,
|
|
810
|
-
tooltip:
|
|
810
|
+
tooltip: p,
|
|
811
811
|
"truncation-tooltip": ""
|
|
812
812
|
}, {
|
|
813
813
|
default: x(() => [
|
|
814
|
-
V(O(
|
|
814
|
+
V(O(p), 1)
|
|
815
815
|
]),
|
|
816
816
|
_: 2
|
|
817
817
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
818
818
|
], 8, Mr)) : D("", !0),
|
|
819
|
-
c.value.additionalComponent === "KCopy" ? (
|
|
819
|
+
c.value.additionalComponent === "KCopy" ? (m(), I("div", {
|
|
820
820
|
key: 1,
|
|
821
821
|
class: "copy-uuid-array",
|
|
822
822
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
823
823
|
}, [
|
|
824
|
-
(
|
|
824
|
+
(m(!0), I(se, null, ae(e.item.value, (p, y) => (m(), M(k, Ln(c.value.childAttrs, {
|
|
825
825
|
key: `${e.item.key}-copy-uuid-${y}`,
|
|
826
826
|
"data-testid": `${e.item.key}-copy-uuid-${y}`,
|
|
827
|
-
text:
|
|
827
|
+
text: p
|
|
828
828
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
829
|
-
], 8, Dr)) : c.value.additionalComponent === "KMethodBadge" ? (
|
|
829
|
+
], 8, Dr)) : c.value.additionalComponent === "KMethodBadge" ? (m(), I("div", {
|
|
830
830
|
key: 2,
|
|
831
831
|
class: "method-badge-array",
|
|
832
832
|
"data-testid": `${e.item.key}-badge-methods`
|
|
833
833
|
}, [
|
|
834
|
-
(
|
|
834
|
+
(m(!0), I(se, null, ae(e.item.value, (p, y) => (m(), M(N, {
|
|
835
835
|
key: `${e.item.key}-badge-method-${y}`,
|
|
836
|
-
appearance: Object.values(
|
|
836
|
+
appearance: Object.values(E(Un)).includes(p.toLowerCase()) ? p.toLowerCase() : "custom",
|
|
837
837
|
class: "config-badge",
|
|
838
838
|
"data-testid": `${e.item.key}-badge-method-${y}`
|
|
839
839
|
}, {
|
|
840
840
|
default: x(() => [
|
|
841
|
-
V(O(
|
|
841
|
+
V(O(p), 1)
|
|
842
842
|
]),
|
|
843
843
|
_: 2
|
|
844
844
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
845
845
|
], 8, Ur)) : D("", !0),
|
|
846
|
-
c.value.additionalComponent === "JsonCardItem" ? (
|
|
846
|
+
c.value.additionalComponent === "JsonCardItem" ? (m(), I("div", {
|
|
847
847
|
key: 3,
|
|
848
848
|
"data-testid": `${n.item.key}-json-array-content`
|
|
849
849
|
}, [
|
|
850
|
-
(
|
|
850
|
+
(m(!0), I(se, null, ae(e.item.value, (p, y) => (m(), M(Mt, {
|
|
851
851
|
key: `json-array-item-${y}`,
|
|
852
852
|
index: y,
|
|
853
853
|
"is-array-item": "",
|
|
854
|
-
item:
|
|
854
|
+
item: p
|
|
855
855
|
}, null, 8, ["index", "item"]))), 128))
|
|
856
|
-
], 8, jr)) : (
|
|
856
|
+
], 8, jr)) : (m(), M(Z, {
|
|
857
857
|
key: 4,
|
|
858
|
-
text:
|
|
858
|
+
text: E(f) ? e.item.value : ""
|
|
859
859
|
}, {
|
|
860
860
|
default: x(() => [
|
|
861
861
|
L("span", {
|
|
862
862
|
ref_key: "textContent",
|
|
863
|
-
ref:
|
|
863
|
+
ref: h,
|
|
864
864
|
class: de(["attrs-data-text", { truncated: e.truncated }])
|
|
865
865
|
}, O(c.value.text), 3)
|
|
866
866
|
]),
|
|
@@ -869,7 +869,7 @@ const z = {
|
|
|
869
869
|
]),
|
|
870
870
|
_: 1
|
|
871
871
|
}, 16))
|
|
872
|
-
])) : (
|
|
872
|
+
])) : (m(), I("div", {
|
|
873
873
|
key: 0,
|
|
874
874
|
"data-testid": `${e.item.key}-no-value`
|
|
875
875
|
}, " – ", 8, Br))
|
|
@@ -912,7 +912,7 @@ const z = {
|
|
|
912
912
|
$t((i) => ({
|
|
913
913
|
"4520e3ec": `${r.value}ch`
|
|
914
914
|
}));
|
|
915
|
-
const t = e, n =
|
|
915
|
+
const t = e, n = A(() => t.jsonRecord), r = A(() => {
|
|
916
916
|
var o;
|
|
917
917
|
if (!t.fetcherUrl)
|
|
918
918
|
return 0;
|
|
@@ -920,10 +920,10 @@ const z = {
|
|
|
920
920
|
return i.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? i[i.length - 1] : i[i.length - 2]).length;
|
|
921
921
|
});
|
|
922
922
|
return (i, a) => {
|
|
923
|
-
const o =
|
|
924
|
-
return
|
|
925
|
-
t.fetcherUrl ? (
|
|
926
|
-
|
|
923
|
+
const o = B("KBadge"), l = B("KCodeBlock");
|
|
924
|
+
return m(), I("div", Hr, [
|
|
925
|
+
t.fetcherUrl ? (m(), I("div", Vr, [
|
|
926
|
+
R(o, {
|
|
927
927
|
appearance: t.requestMethod
|
|
928
928
|
}, {
|
|
929
929
|
default: x(() => [
|
|
@@ -931,7 +931,7 @@ const z = {
|
|
|
931
931
|
]),
|
|
932
932
|
_: 1
|
|
933
933
|
}, 8, ["appearance"]),
|
|
934
|
-
|
|
934
|
+
R(l, {
|
|
935
935
|
id: "json-endpoint-codeblock",
|
|
936
936
|
code: t.fetcherUrl,
|
|
937
937
|
language: "json",
|
|
@@ -939,7 +939,7 @@ const z = {
|
|
|
939
939
|
theme: "dark"
|
|
940
940
|
}, null, 8, ["code"])
|
|
941
941
|
])) : D("", !0),
|
|
942
|
-
t.jsonRecord ? (
|
|
942
|
+
t.jsonRecord ? (m(), M(l, {
|
|
943
943
|
key: 1,
|
|
944
944
|
id: "json-codeblock",
|
|
945
945
|
class: de({ "json-content": t.fetcherUrl }),
|
|
@@ -999,7 +999,7 @@ Ie.prototype.constructor = Ie;
|
|
|
999
999
|
Ie.prototype.toString = function(t) {
|
|
1000
1000
|
return this.name + ": " + qt(this, t);
|
|
1001
1001
|
};
|
|
1002
|
-
var
|
|
1002
|
+
var te = Ie;
|
|
1003
1003
|
function He(e, t, n, r, i) {
|
|
1004
1004
|
var a = "", o = "", l = Math.floor(i / 2) - 1;
|
|
1005
1005
|
return r - t > l && (a = " ... ", t = r - l + a.length), n - r > l && (o = " ...", n = r + l - o.length), {
|
|
@@ -1068,15 +1068,15 @@ function li(e) {
|
|
|
1068
1068
|
function si(e, t) {
|
|
1069
1069
|
if (t = t || {}, Object.keys(t).forEach(function(n) {
|
|
1070
1070
|
if (ai.indexOf(n) === -1)
|
|
1071
|
-
throw new
|
|
1071
|
+
throw new te('Unknown option "' + n + '" is met in definition of "' + e + '" YAML type.');
|
|
1072
1072
|
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
1073
1073
|
return !0;
|
|
1074
1074
|
}, this.construct = t.construct || function(n) {
|
|
1075
1075
|
return n;
|
|
1076
1076
|
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases = li(t.styleAliases || null), oi.indexOf(this.kind) === -1)
|
|
1077
|
-
throw new
|
|
1077
|
+
throw new te('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1078
1078
|
}
|
|
1079
|
-
var
|
|
1079
|
+
var X = si;
|
|
1080
1080
|
function mt(e, t) {
|
|
1081
1081
|
var n = [];
|
|
1082
1082
|
return e[t].forEach(function(r) {
|
|
@@ -1111,39 +1111,39 @@ function We(e) {
|
|
|
1111
1111
|
}
|
|
1112
1112
|
We.prototype.extend = function(t) {
|
|
1113
1113
|
var n = [], r = [];
|
|
1114
|
-
if (t instanceof
|
|
1114
|
+
if (t instanceof X)
|
|
1115
1115
|
r.push(t);
|
|
1116
1116
|
else if (Array.isArray(t))
|
|
1117
1117
|
r = r.concat(t);
|
|
1118
1118
|
else if (t && (Array.isArray(t.implicit) || Array.isArray(t.explicit)))
|
|
1119
1119
|
t.implicit && (n = n.concat(t.implicit)), t.explicit && (r = r.concat(t.explicit));
|
|
1120
1120
|
else
|
|
1121
|
-
throw new
|
|
1121
|
+
throw new te("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1122
1122
|
n.forEach(function(a) {
|
|
1123
|
-
if (!(a instanceof
|
|
1124
|
-
throw new
|
|
1123
|
+
if (!(a instanceof X))
|
|
1124
|
+
throw new te("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1125
1125
|
if (a.loadKind && a.loadKind !== "scalar")
|
|
1126
|
-
throw new
|
|
1126
|
+
throw new te("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1127
1127
|
if (a.multi)
|
|
1128
|
-
throw new
|
|
1128
|
+
throw new te("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1129
1129
|
}), r.forEach(function(a) {
|
|
1130
|
-
if (!(a instanceof
|
|
1131
|
-
throw new
|
|
1130
|
+
if (!(a instanceof X))
|
|
1131
|
+
throw new te("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1132
1132
|
});
|
|
1133
1133
|
var i = Object.create(We.prototype);
|
|
1134
1134
|
return i.implicit = (this.implicit || []).concat(n), i.explicit = (this.explicit || []).concat(r), i.compiledImplicit = mt(i, "implicit"), i.compiledExplicit = mt(i, "explicit"), i.compiledTypeMap = ci(i.compiledImplicit, i.compiledExplicit), i;
|
|
1135
1135
|
};
|
|
1136
|
-
var Pt = We, Ht = new
|
|
1136
|
+
var Pt = We, Ht = new X("tag:yaml.org,2002:str", {
|
|
1137
1137
|
kind: "scalar",
|
|
1138
1138
|
construct: function(e) {
|
|
1139
1139
|
return e !== null ? e : "";
|
|
1140
1140
|
}
|
|
1141
|
-
}), Vt = new
|
|
1141
|
+
}), Vt = new X("tag:yaml.org,2002:seq", {
|
|
1142
1142
|
kind: "sequence",
|
|
1143
1143
|
construct: function(e) {
|
|
1144
1144
|
return e !== null ? e : [];
|
|
1145
1145
|
}
|
|
1146
|
-
}), Yt = new
|
|
1146
|
+
}), Yt = new X("tag:yaml.org,2002:map", {
|
|
1147
1147
|
kind: "mapping",
|
|
1148
1148
|
construct: function(e) {
|
|
1149
1149
|
return e !== null ? e : {};
|
|
@@ -1167,7 +1167,7 @@ function di() {
|
|
|
1167
1167
|
function fi(e) {
|
|
1168
1168
|
return e === null;
|
|
1169
1169
|
}
|
|
1170
|
-
var Wt = new
|
|
1170
|
+
var Wt = new X("tag:yaml.org,2002:null", {
|
|
1171
1171
|
kind: "scalar",
|
|
1172
1172
|
resolve: ui,
|
|
1173
1173
|
construct: di,
|
|
@@ -1203,7 +1203,7 @@ function hi(e) {
|
|
|
1203
1203
|
function mi(e) {
|
|
1204
1204
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1205
1205
|
}
|
|
1206
|
-
var Jt = new
|
|
1206
|
+
var Jt = new X("tag:yaml.org,2002:bool", {
|
|
1207
1207
|
kind: "scalar",
|
|
1208
1208
|
resolve: pi,
|
|
1209
1209
|
construct: hi,
|
|
@@ -1294,7 +1294,7 @@ function xi(e) {
|
|
|
1294
1294
|
function Ci(e) {
|
|
1295
1295
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !G.isNegativeZero(e);
|
|
1296
1296
|
}
|
|
1297
|
-
var Gt = new
|
|
1297
|
+
var Gt = new X("tag:yaml.org,2002:int", {
|
|
1298
1298
|
kind: "scalar",
|
|
1299
1299
|
resolve: bi,
|
|
1300
1300
|
construct: xi,
|
|
@@ -1371,7 +1371,7 @@ function Si(e, t) {
|
|
|
1371
1371
|
function Ii(e) {
|
|
1372
1372
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || G.isNegativeZero(e));
|
|
1373
1373
|
}
|
|
1374
|
-
var Zt = new
|
|
1374
|
+
var Zt = new X("tag:yaml.org,2002:float", {
|
|
1375
1375
|
kind: "scalar",
|
|
1376
1376
|
resolve: ki,
|
|
1377
1377
|
construct: wi,
|
|
@@ -1394,7 +1394,7 @@ function Ei(e) {
|
|
|
1394
1394
|
return e === null ? !1 : en.exec(e) !== null || tn.exec(e) !== null;
|
|
1395
1395
|
}
|
|
1396
1396
|
function Ti(e) {
|
|
1397
|
-
var t, n, r, i, a, o, l, s = 0, u = null, d, c,
|
|
1397
|
+
var t, n, r, i, a, o, l, s = 0, u = null, d, c, h;
|
|
1398
1398
|
if (t = en.exec(e), t === null && (t = tn.exec(e)), t === null)
|
|
1399
1399
|
throw new Error("Date resolve error");
|
|
1400
1400
|
if (n = +t[1], r = +t[2] - 1, i = +t[3], !t[4])
|
|
@@ -1404,12 +1404,12 @@ function Ti(e) {
|
|
|
1404
1404
|
s += "0";
|
|
1405
1405
|
s = +s;
|
|
1406
1406
|
}
|
|
1407
|
-
return t[9] && (d = +t[10], c = +(t[11] || 0), u = (d * 60 + c) * 6e4, t[9] === "-" && (u = -u)),
|
|
1407
|
+
return t[9] && (d = +t[10], c = +(t[11] || 0), u = (d * 60 + c) * 6e4, t[9] === "-" && (u = -u)), h = new Date(Date.UTC(n, r, i, a, o, l, s)), u && h.setTime(h.getTime() - u), h;
|
|
1408
1408
|
}
|
|
1409
1409
|
function Fi(e) {
|
|
1410
1410
|
return e.toISOString();
|
|
1411
1411
|
}
|
|
1412
|
-
var nn = new
|
|
1412
|
+
var nn = new X("tag:yaml.org,2002:timestamp", {
|
|
1413
1413
|
kind: "scalar",
|
|
1414
1414
|
resolve: Ei,
|
|
1415
1415
|
construct: Ti,
|
|
@@ -1419,7 +1419,7 @@ var nn = new Q("tag:yaml.org,2002:timestamp", {
|
|
|
1419
1419
|
function Oi(e) {
|
|
1420
1420
|
return e === "<<" || e === null;
|
|
1421
1421
|
}
|
|
1422
|
-
var rn = new
|
|
1422
|
+
var rn = new X("tag:yaml.org,2002:merge", {
|
|
1423
1423
|
kind: "scalar",
|
|
1424
1424
|
resolve: Oi
|
|
1425
1425
|
}), tt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
@@ -1451,7 +1451,7 @@ function Ni(e) {
|
|
|
1451
1451
|
function Ri(e) {
|
|
1452
1452
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1453
1453
|
}
|
|
1454
|
-
var an = new
|
|
1454
|
+
var an = new X("tag:yaml.org,2002:binary", {
|
|
1455
1455
|
kind: "scalar",
|
|
1456
1456
|
resolve: $i,
|
|
1457
1457
|
construct: Li,
|
|
@@ -1483,7 +1483,7 @@ function Mi(e) {
|
|
|
1483
1483
|
function Di(e) {
|
|
1484
1484
|
return e !== null ? e : [];
|
|
1485
1485
|
}
|
|
1486
|
-
var on = new
|
|
1486
|
+
var on = new X("tag:yaml.org,2002:omap", {
|
|
1487
1487
|
kind: "sequence",
|
|
1488
1488
|
resolve: Mi,
|
|
1489
1489
|
construct: Di
|
|
@@ -1507,7 +1507,7 @@ function qi(e) {
|
|
|
1507
1507
|
r = o[t], i = Object.keys(r), a[t] = [i[0], r[i[0]]];
|
|
1508
1508
|
return a;
|
|
1509
1509
|
}
|
|
1510
|
-
var ln = new
|
|
1510
|
+
var ln = new X("tag:yaml.org,2002:pairs", {
|
|
1511
1511
|
kind: "sequence",
|
|
1512
1512
|
resolve: ji,
|
|
1513
1513
|
construct: qi
|
|
@@ -1524,7 +1524,7 @@ function Hi(e) {
|
|
|
1524
1524
|
function Vi(e) {
|
|
1525
1525
|
return e !== null ? e : {};
|
|
1526
1526
|
}
|
|
1527
|
-
var sn = new
|
|
1527
|
+
var sn = new X("tag:yaml.org,2002:set", {
|
|
1528
1528
|
kind: "mapping",
|
|
1529
1529
|
resolve: Hi,
|
|
1530
1530
|
construct: Vi
|
|
@@ -1590,7 +1590,7 @@ function mn(e, t) {
|
|
|
1590
1590
|
line: e.line,
|
|
1591
1591
|
column: e.position - e.lineStart
|
|
1592
1592
|
};
|
|
1593
|
-
return n.snippet = ii(n), new
|
|
1593
|
+
return n.snippet = ii(n), new te(t, n);
|
|
1594
1594
|
}
|
|
1595
1595
|
function C(e, t) {
|
|
1596
1596
|
throw mn(e, t);
|
|
@@ -1679,7 +1679,7 @@ function it(e, t) {
|
|
|
1679
1679
|
`, t - 1));
|
|
1680
1680
|
}
|
|
1681
1681
|
function ta(e, t, n) {
|
|
1682
|
-
var r, i, a, o, l, s, u, d, c = e.kind,
|
|
1682
|
+
var r, i, a, o, l, s, u, d, c = e.kind, h = e.result, f;
|
|
1683
1683
|
if (f = e.input.charCodeAt(e.position), ne(f) || Ce(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (i = e.input.charCodeAt(e.position + 1), ne(i) || n && Ce(i)))
|
|
1684
1684
|
return !1;
|
|
1685
1685
|
for (e.kind = "scalar", e.result = "", a = o = e.position, l = !1; f !== 0; ) {
|
|
@@ -1703,7 +1703,7 @@ function ta(e, t, n) {
|
|
|
1703
1703
|
}
|
|
1704
1704
|
l && (ue(e, a, o, !1), it(e, e.line - s), a = o = e.position, l = !1), ye(f) || (o = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1705
1705
|
}
|
|
1706
|
-
return ue(e, a, o, !1), e.result ? !0 : (e.kind = c, e.result =
|
|
1706
|
+
return ue(e, a, o, !1), e.result ? !0 : (e.kind = c, e.result = h, !1);
|
|
1707
1707
|
}
|
|
1708
1708
|
function na(e, t) {
|
|
1709
1709
|
var n, r, i;
|
|
@@ -1744,17 +1744,17 @@ function ra(e, t) {
|
|
|
1744
1744
|
C(e, "unexpected end of the stream within a double quoted scalar");
|
|
1745
1745
|
}
|
|
1746
1746
|
function ia(e, t) {
|
|
1747
|
-
var n = !0, r, i, a, o = e.tag, l, s = e.anchor, u, d, c,
|
|
1748
|
-
if (
|
|
1747
|
+
var n = !0, r, i, a, o = e.tag, l, s = e.anchor, u, d, c, h, f, v = /* @__PURE__ */ Object.create(null), b, _, N, k;
|
|
1748
|
+
if (k = e.input.charCodeAt(e.position), k === 91)
|
|
1749
1749
|
d = 93, f = !1, l = [];
|
|
1750
|
-
else if (
|
|
1750
|
+
else if (k === 123)
|
|
1751
1751
|
d = 125, f = !0, l = {};
|
|
1752
1752
|
else
|
|
1753
1753
|
return !1;
|
|
1754
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1755
|
-
if (W(e, !0, t),
|
|
1754
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), k = e.input.charCodeAt(++e.position); k !== 0; ) {
|
|
1755
|
+
if (W(e, !0, t), k = e.input.charCodeAt(e.position), k === d)
|
|
1756
1756
|
return e.position++, e.tag = o, e.anchor = s, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1757
|
-
n ?
|
|
1757
|
+
n ? k === 44 && C(e, "expected the node content, but found ','") : C(e, "missed comma between flow collection entries"), _ = b = N = null, c = h = !1, k === 63 && (u = e.input.charCodeAt(e.position + 1), ne(u) && (c = h = !0, e.position++, W(e, !0, t))), r = e.line, i = e.lineStart, a = e.position, we(e, t, Be, !1, !0), _ = e.tag, b = e.result, W(e, !0, t), k = e.input.charCodeAt(e.position), (h || e.line === r) && k === 58 && (c = !0, k = e.input.charCodeAt(++e.position), W(e, !0, t), we(e, t, Be, !1, !0), N = e.result), f ? _e(e, l, v, _, b, N, r, i, a) : c ? l.push(_e(e, null, v, _, b, N, r, i, a)) : l.push(b), W(e, !0, t), k = e.input.charCodeAt(e.position), k === 44 ? (n = !0, k = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1758
1758
|
}
|
|
1759
1759
|
C(e, "unexpected end of the stream within a flow collection");
|
|
1760
1760
|
}
|
|
@@ -1822,35 +1822,35 @@ function Ct(e, t) {
|
|
|
1822
1822
|
return l ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1823
1823
|
}
|
|
1824
1824
|
function oa(e, t, n) {
|
|
1825
|
-
var r, i, a, o, l, s, u = e.tag, d = e.anchor, c = {},
|
|
1825
|
+
var r, i, a, o, l, s, u = e.tag, d = e.anchor, c = {}, h = /* @__PURE__ */ Object.create(null), f = null, v = null, b = null, _ = !1, N = !1, k;
|
|
1826
1826
|
if (e.firstTabInLine !== -1)
|
|
1827
1827
|
return !1;
|
|
1828
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = c),
|
|
1829
|
-
if (!
|
|
1830
|
-
|
|
1828
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), k = e.input.charCodeAt(e.position); k !== 0; ) {
|
|
1829
|
+
if (!_ && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, C(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (k === 63 || k === 58) && ne(r))
|
|
1830
|
+
k === 63 ? (_ && (_e(e, c, h, f, v, null, o, l, s), f = v = b = null), N = !0, _ = !0, i = !0) : _ ? (_ = !1, i = !0) : C(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, k = r;
|
|
1831
1831
|
else {
|
|
1832
1832
|
if (o = e.line, l = e.lineStart, s = e.position, !we(e, n, cn, !1, !0))
|
|
1833
1833
|
break;
|
|
1834
1834
|
if (e.line === a) {
|
|
1835
|
-
for (
|
|
1836
|
-
|
|
1837
|
-
if (
|
|
1838
|
-
|
|
1839
|
-
else if (
|
|
1835
|
+
for (k = e.input.charCodeAt(e.position); ye(k); )
|
|
1836
|
+
k = e.input.charCodeAt(++e.position);
|
|
1837
|
+
if (k === 58)
|
|
1838
|
+
k = e.input.charCodeAt(++e.position), ne(k) || C(e, "a whitespace character is expected after the key-value separator within a block mapping"), _ && (_e(e, c, h, f, v, null, o, l, s), f = v = b = null), N = !0, _ = !1, i = !1, f = e.tag, v = e.result;
|
|
1839
|
+
else if (N)
|
|
1840
1840
|
C(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1841
1841
|
else
|
|
1842
1842
|
return e.tag = u, e.anchor = d, !0;
|
|
1843
|
-
} else if (
|
|
1843
|
+
} else if (N)
|
|
1844
1844
|
C(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1845
1845
|
else
|
|
1846
1846
|
return e.tag = u, e.anchor = d, !0;
|
|
1847
1847
|
}
|
|
1848
|
-
if ((e.line === a || e.lineIndent > t) && (
|
|
1848
|
+
if ((e.line === a || e.lineIndent > t) && (_ && (o = e.line, l = e.lineStart, s = e.position), we(e, t, Ke, !0, i) && (_ ? v = e.result : b = e.result), _ || (_e(e, c, h, f, v, b, o, l, s), f = v = b = null), W(e, !0, -1), k = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > t) && k !== 0)
|
|
1849
1849
|
C(e, "bad indentation of a mapping entry");
|
|
1850
1850
|
else if (e.lineIndent < t)
|
|
1851
1851
|
break;
|
|
1852
1852
|
}
|
|
1853
|
-
return
|
|
1853
|
+
return _ && _e(e, c, h, f, v, null, o, l, s), N && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), N;
|
|
1854
1854
|
}
|
|
1855
1855
|
function la(e) {
|
|
1856
1856
|
var t, n = !1, r = !1, i, a, o;
|
|
@@ -1891,28 +1891,28 @@ function ca(e) {
|
|
|
1891
1891
|
return e.position === t && C(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), fe.call(e.anchorMap, n) || C(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], W(e, !0, -1), !0;
|
|
1892
1892
|
}
|
|
1893
1893
|
function we(e, t, n, r, i) {
|
|
1894
|
-
var a, o, l, s = 1, u = !1, d = !1, c,
|
|
1894
|
+
var a, o, l, s = 1, u = !1, d = !1, c, h, f, v, b, _;
|
|
1895
1895
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = l = Ke === n || un === n, r && W(e, !0, -1) && (u = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
1896
1896
|
for (; la(e) || sa(e); )
|
|
1897
1897
|
W(e, !0, -1) ? (u = !0, l = a, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
1898
|
-
if (l && (l = u || i), (s === 1 || Ke === n) && (Be === n || cn === n ?
|
|
1898
|
+
if (l && (l = u || i), (s === 1 || Ke === n) && (Be === n || cn === n ? b = t : b = t + 1, _ = e.position - e.lineStart, s === 1 ? l && (Ct(e, _) || oa(e, _, b)) || ia(e, b) ? d = !0 : (o && aa(e, b) || na(e, b) || ra(e, b) ? d = !0 : ca(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && C(e, "alias node should not have any properties")) : ta(e, b, Be === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && Ct(e, _))), e.tag === null)
|
|
1899
1899
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1900
1900
|
else if (e.tag === "?") {
|
|
1901
|
-
for (e.result !== null && e.kind !== "scalar" && C(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0,
|
|
1902
|
-
if (
|
|
1903
|
-
e.result =
|
|
1901
|
+
for (e.result !== null && e.kind !== "scalar" && C(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, h = e.implicitTypes.length; c < h; c += 1)
|
|
1902
|
+
if (v = e.implicitTypes[c], v.resolve(e.result)) {
|
|
1903
|
+
e.result = v.construct(e.result), e.tag = v.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1904
1904
|
break;
|
|
1905
1905
|
}
|
|
1906
1906
|
} else if (e.tag !== "!") {
|
|
1907
1907
|
if (fe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1908
|
-
|
|
1908
|
+
v = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1909
1909
|
else
|
|
1910
|
-
for (
|
|
1910
|
+
for (v = null, f = e.typeMap.multi[e.kind || "fallback"], c = 0, h = f.length; c < h; c += 1)
|
|
1911
1911
|
if (e.tag.slice(0, f[c].tag.length) === f[c].tag) {
|
|
1912
|
-
|
|
1912
|
+
v = f[c];
|
|
1913
1913
|
break;
|
|
1914
1914
|
}
|
|
1915
|
-
|
|
1915
|
+
v || C(e, "unknown tag !<" + e.tag + ">"), e.result !== null && v.kind !== e.kind && C(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + v.kind + '", not "' + e.kind + '"'), v.resolve(e.result, e.tag) ? (e.result = v.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : C(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1916
1916
|
}
|
|
1917
1917
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
1918
1918
|
}
|
|
@@ -1970,28 +1970,28 @@ function fa(e, t) {
|
|
|
1970
1970
|
if (n.length !== 0) {
|
|
1971
1971
|
if (n.length === 1)
|
|
1972
1972
|
return n[0];
|
|
1973
|
-
throw new
|
|
1973
|
+
throw new te("expected a single document in the stream, but found more");
|
|
1974
1974
|
}
|
|
1975
1975
|
}
|
|
1976
1976
|
var pa = da, ha = fa, yn = {
|
|
1977
1977
|
loadAll: pa,
|
|
1978
1978
|
load: ha
|
|
1979
|
-
}, vn = Object.prototype.toString, bn = Object.prototype.hasOwnProperty, at = 65279, ma = 9, Ee = 10, ga = 13, ya = 32, va = 33, ba = 34, Je = 35, xa = 37, Ca = 38, _a = 39, ka = 42, xn = 44, wa = 45, De = 58, Aa = 61, Sa = 62, Ia = 63, Ea = 64, Cn = 91, _n = 93, Ta = 96, kn = 123, Fa = 124, wn = 125,
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1979
|
+
}, vn = Object.prototype.toString, bn = Object.prototype.hasOwnProperty, at = 65279, ma = 9, Ee = 10, ga = 13, ya = 32, va = 33, ba = 34, Je = 35, xa = 37, Ca = 38, _a = 39, ka = 42, xn = 44, wa = 45, De = 58, Aa = 61, Sa = 62, Ia = 63, Ea = 64, Cn = 91, _n = 93, Ta = 96, kn = 123, Fa = 124, wn = 125, ee = {};
|
|
1980
|
+
ee[0] = "\\0";
|
|
1981
|
+
ee[7] = "\\a";
|
|
1982
|
+
ee[8] = "\\b";
|
|
1983
|
+
ee[9] = "\\t";
|
|
1984
|
+
ee[10] = "\\n";
|
|
1985
|
+
ee[11] = "\\v";
|
|
1986
|
+
ee[12] = "\\f";
|
|
1987
|
+
ee[13] = "\\r";
|
|
1988
|
+
ee[27] = "\\e";
|
|
1989
|
+
ee[34] = '\\"';
|
|
1990
|
+
ee[92] = "\\\\";
|
|
1991
|
+
ee[133] = "\\N";
|
|
1992
|
+
ee[160] = "\\_";
|
|
1993
|
+
ee[8232] = "\\L";
|
|
1994
|
+
ee[8233] = "\\P";
|
|
1995
1995
|
var Oa = [
|
|
1996
1996
|
"y",
|
|
1997
1997
|
"Y",
|
|
@@ -2027,7 +2027,7 @@ function Na(e) {
|
|
|
2027
2027
|
else if (e <= 4294967295)
|
|
2028
2028
|
n = "U", r = 8;
|
|
2029
2029
|
else
|
|
2030
|
-
throw new
|
|
2030
|
+
throw new te("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2031
2031
|
return "\\" + n + G.repeat("0", r - t.length) + t;
|
|
2032
2032
|
}
|
|
2033
2033
|
var Ra = 1, Te = 2;
|
|
@@ -2087,25 +2087,25 @@ function An(e) {
|
|
|
2087
2087
|
}
|
|
2088
2088
|
var Sn = 1, Ze = 2, In = 3, En = 4, xe = 5;
|
|
2089
2089
|
function Ua(e, t, n, r, i, a, o, l) {
|
|
2090
|
-
var s, u = 0, d = null, c = !1,
|
|
2090
|
+
var s, u = 0, d = null, c = !1, h = !1, f = r !== -1, v = -1, b = Ma(Se(e, 0)) && Da(Se(e, e.length - 1));
|
|
2091
2091
|
if (t || o)
|
|
2092
2092
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2093
2093
|
if (u = Se(e, s), !Fe(u))
|
|
2094
2094
|
return xe;
|
|
2095
|
-
|
|
2095
|
+
b = b && wt(u, d, l), d = u;
|
|
2096
2096
|
}
|
|
2097
2097
|
else {
|
|
2098
2098
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2099
2099
|
if (u = Se(e, s), u === Ee)
|
|
2100
|
-
c = !0, f && (
|
|
2101
|
-
s -
|
|
2100
|
+
c = !0, f && (h = h || // Foldable line = too long, and not more-indented.
|
|
2101
|
+
s - v - 1 > r && e[v + 1] !== " ", v = s);
|
|
2102
2102
|
else if (!Fe(u))
|
|
2103
2103
|
return xe;
|
|
2104
|
-
|
|
2104
|
+
b = b && wt(u, d, l), d = u;
|
|
2105
2105
|
}
|
|
2106
|
-
|
|
2106
|
+
h = h || f && s - v - 1 > r && e[v + 1] !== " ";
|
|
2107
2107
|
}
|
|
2108
|
-
return !c && !
|
|
2108
|
+
return !c && !h ? b && !o && !i(e) ? Sn : a === Te ? xe : Ze : n > 9 && An(e) ? xe : o ? a === Te ? xe : Ze : h ? En : In;
|
|
2109
2109
|
}
|
|
2110
2110
|
function ja(e, t, n, r, i) {
|
|
2111
2111
|
e.dump = function() {
|
|
@@ -2138,7 +2138,7 @@ function ja(e, t, n, r, i) {
|
|
|
2138
2138
|
case xe:
|
|
2139
2139
|
return '"' + Pa(t) + '"';
|
|
2140
2140
|
default:
|
|
2141
|
-
throw new
|
|
2141
|
+
throw new te("impossible error: invalid scalar style");
|
|
2142
2142
|
}
|
|
2143
2143
|
}();
|
|
2144
2144
|
}
|
|
@@ -2179,7 +2179,7 @@ function It(e, t) {
|
|
|
2179
2179
|
}
|
|
2180
2180
|
function Pa(e) {
|
|
2181
2181
|
for (var t = "", n = 0, r, i = 0; i < e.length; n >= 65536 ? i += 2 : i++)
|
|
2182
|
-
n = Se(e, i), r =
|
|
2182
|
+
n = Se(e, i), r = ee[n], !r && Fe(n) ? (t += e[i], n >= 65536 && (t += e[i + 1])) : t += r || Na(n);
|
|
2183
2183
|
return t;
|
|
2184
2184
|
}
|
|
2185
2185
|
function Ha(e, t, n) {
|
|
@@ -2201,15 +2201,15 @@ function Va(e, t, n) {
|
|
|
2201
2201
|
e.tag = i, e.dump = "{" + r + "}";
|
|
2202
2202
|
}
|
|
2203
2203
|
function Ya(e, t, n, r) {
|
|
2204
|
-
var i = "", a = e.tag, o = Object.keys(n), l, s, u, d, c,
|
|
2204
|
+
var i = "", a = e.tag, o = Object.keys(n), l, s, u, d, c, h;
|
|
2205
2205
|
if (e.sortKeys === !0)
|
|
2206
2206
|
o.sort();
|
|
2207
2207
|
else if (typeof e.sortKeys == "function")
|
|
2208
2208
|
o.sort(e.sortKeys);
|
|
2209
2209
|
else if (e.sortKeys)
|
|
2210
|
-
throw new
|
|
2210
|
+
throw new te("sortKeys must be a boolean or a function");
|
|
2211
2211
|
for (l = 0, s = o.length; l < s; l += 1)
|
|
2212
|
-
|
|
2212
|
+
h = "", (!r || i !== "") && (h += Ge(e, t)), u = o[l], d = n[u], e.replacer && (d = e.replacer.call(n, u, d)), ce(e, t + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Ee === e.dump.charCodeAt(0) ? h += "?" : h += "? "), h += e.dump, c && (h += Ge(e, t)), ce(e, t + 1, d, !0, c) && (e.dump && Ee === e.dump.charCodeAt(0) ? h += ":" : h += ": ", h += e.dump, i += h));
|
|
2213
2213
|
e.tag = a, e.dump = i || "{}";
|
|
2214
2214
|
}
|
|
2215
2215
|
function Tt(e, t, n) {
|
|
@@ -2222,7 +2222,7 @@ function Tt(e, t, n) {
|
|
|
2222
2222
|
else if (bn.call(l.represent, s))
|
|
2223
2223
|
r = l.represent[s](t, s);
|
|
2224
2224
|
else
|
|
2225
|
-
throw new
|
|
2225
|
+
throw new te("!<" + l.tag + '> tag resolver accepts not "' + s + '" style');
|
|
2226
2226
|
e.dump = r;
|
|
2227
2227
|
}
|
|
2228
2228
|
return !0;
|
|
@@ -2233,14 +2233,14 @@ function ce(e, t, n, r, i, a, o) {
|
|
|
2233
2233
|
e.tag = null, e.dump = n, Tt(e, n, !1) || Tt(e, n, !0);
|
|
2234
2234
|
var l = vn.call(e.dump), s = r, u;
|
|
2235
2235
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
2236
|
-
var d = l === "[object Object]" || l === "[object Array]", c,
|
|
2237
|
-
if (d && (c = e.duplicates.indexOf(n),
|
|
2236
|
+
var d = l === "[object Object]" || l === "[object Array]", c, h;
|
|
2237
|
+
if (d && (c = e.duplicates.indexOf(n), h = c !== -1), (e.tag !== null && e.tag !== "?" || h || e.indent !== 2 && t > 0) && (i = !1), h && e.usedDuplicates[c])
|
|
2238
2238
|
e.dump = "*ref_" + c;
|
|
2239
2239
|
else {
|
|
2240
|
-
if (d &&
|
|
2241
|
-
r && Object.keys(e.dump).length !== 0 ? (Ya(e, t, e.dump, i),
|
|
2240
|
+
if (d && h && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), l === "[object Object]")
|
|
2241
|
+
r && Object.keys(e.dump).length !== 0 ? (Ya(e, t, e.dump, i), h && (e.dump = "&ref_" + c + e.dump)) : (Va(e, t, e.dump), h && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2242
2242
|
else if (l === "[object Array]")
|
|
2243
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? Et(e, t - 1, e.dump, i) : Et(e, t, e.dump, i),
|
|
2243
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? Et(e, t - 1, e.dump, i) : Et(e, t, e.dump, i), h && (e.dump = "&ref_" + c + e.dump)) : (Ha(e, t, e.dump), h && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2244
2244
|
else if (l === "[object String]")
|
|
2245
2245
|
e.tag !== "?" && ja(e, e.dump, t, a, s);
|
|
2246
2246
|
else {
|
|
@@ -2248,7 +2248,7 @@ function ce(e, t, n, r, i, a, o) {
|
|
|
2248
2248
|
return !1;
|
|
2249
2249
|
if (e.skipInvalid)
|
|
2250
2250
|
return !1;
|
|
2251
|
-
throw new
|
|
2251
|
+
throw new te("unacceptable kind of an object to dump " + l);
|
|
2252
2252
|
}
|
|
2253
2253
|
e.tag !== null && e.tag !== "?" && (u = encodeURI(
|
|
2254
2254
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
@@ -2290,7 +2290,7 @@ function ot(e, t) {
|
|
|
2290
2290
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2291
2291
|
};
|
|
2292
2292
|
}
|
|
2293
|
-
var Za =
|
|
2293
|
+
var Za = X, Qa = Pt, Xa = zt, eo = Qt, to = Xt, no = nt, ro = yn.load, io = yn.loadAll, ao = Ga.dump, oo = te, lo = {
|
|
2294
2294
|
binary: an,
|
|
2295
2295
|
float: Zt,
|
|
2296
2296
|
map: Yt,
|
|
@@ -2330,14 +2330,14 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2330
2330
|
}
|
|
2331
2331
|
},
|
|
2332
2332
|
setup(e) {
|
|
2333
|
-
const t = e, n =
|
|
2333
|
+
const t = e, n = A(() => {
|
|
2334
2334
|
const r = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, i]) => i !== null && i !== "" && (Array.isArray(i) ? i.length !== 0 : !0)));
|
|
2335
2335
|
return Object.keys(r).length === 0 && r.constructor === Object ? "" : fo.dump(r).trim();
|
|
2336
2336
|
});
|
|
2337
2337
|
return (r, i) => {
|
|
2338
|
-
const a =
|
|
2339
|
-
return
|
|
2340
|
-
t.yamlRecord ? (
|
|
2338
|
+
const a = B("KCodeBlock");
|
|
2339
|
+
return m(), I("div", po, [
|
|
2340
|
+
t.yamlRecord ? (m(), M(a, {
|
|
2341
2341
|
key: 0,
|
|
2342
2342
|
id: "yaml-codeblock",
|
|
2343
2343
|
code: n.value,
|
|
@@ -2392,21 +2392,21 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2392
2392
|
}
|
|
2393
2393
|
},
|
|
2394
2394
|
setup(e) {
|
|
2395
|
-
const t = e, n = Xe(), { i18n: { t: r } } = z.useI18n(), i = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), a =
|
|
2395
|
+
const t = e, n = Xe(), { i18n: { t: r } } = z.useI18n(), i = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), a = A(() => {
|
|
2396
2396
|
if (!t.record)
|
|
2397
2397
|
return t.record;
|
|
2398
2398
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
2399
2399
|
return delete o.created_at, delete o.updated_at, o;
|
|
2400
2400
|
});
|
|
2401
|
-
return (o, l) => (
|
|
2402
|
-
e.format === "structured" ? (
|
|
2403
|
-
(
|
|
2401
|
+
return (o, l) => (m(), I(se, null, [
|
|
2402
|
+
e.format === "structured" ? (m(), I("div", ho, [
|
|
2403
|
+
(m(!0), I(se, null, ae(e.propListTypes, (s) => (m(), I("div", {
|
|
2404
2404
|
key: `config-card-details-${s}-props`,
|
|
2405
2405
|
class: de(`config-card-details-${s}-props`),
|
|
2406
2406
|
"data-testid": `config-card-details-${s}-props`
|
|
2407
2407
|
}, [
|
|
2408
|
-
s !== "basic" ? (
|
|
2409
|
-
(
|
|
2408
|
+
s !== "basic" ? (m(), I("div", go, O(s === "advanced" ? E(r)("baseConfigCard.sections.advanced") : E(r)("baseConfigCard.sections.plugin")), 1)) : D("", !0),
|
|
2409
|
+
(m(!0), I(se, null, ae(e.propertyCollections[s], (u) => (m(), M(Dt, {
|
|
2410
2410
|
key: u.key,
|
|
2411
2411
|
item: u
|
|
2412
2412
|
}, ke({
|
|
@@ -2431,14 +2431,14 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2431
2431
|
]), 1032, ["item"]))), 128))
|
|
2432
2432
|
], 10, mo))), 128))
|
|
2433
2433
|
])) : D("", !0),
|
|
2434
|
-
e.format === "json" && t.record ? (
|
|
2434
|
+
e.format === "json" && t.record ? (m(), M(Ut, {
|
|
2435
2435
|
key: 1,
|
|
2436
2436
|
config: t.config,
|
|
2437
2437
|
"fetcher-url": t.fetcherUrl,
|
|
2438
2438
|
"json-record": a.value,
|
|
2439
2439
|
"request-method": "get"
|
|
2440
2440
|
}, null, 8, ["config", "fetcher-url", "json-record"])) : D("", !0),
|
|
2441
|
-
e.format === "yaml" && t.record ? (
|
|
2441
|
+
e.format === "yaml" && t.record ? (m(), M(Tn, {
|
|
2442
2442
|
key: 2,
|
|
2443
2443
|
"yaml-record": a.value
|
|
2444
2444
|
}, null, 8, ["yaml-record"])) : D("", !0)
|
|
@@ -2507,7 +2507,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2507
2507
|
}
|
|
2508
2508
|
},
|
|
2509
2509
|
setup(e) {
|
|
2510
|
-
const t = e, n =
|
|
2510
|
+
const t = e, n = A(() => {
|
|
2511
2511
|
if (typeof t.size == "number" && t.size > 0)
|
|
2512
2512
|
return `${t.size}px`;
|
|
2513
2513
|
if (typeof t.size == "string") {
|
|
@@ -2516,7 +2516,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2516
2516
|
return `${a}px`;
|
|
2517
2517
|
}
|
|
2518
2518
|
return le;
|
|
2519
|
-
}), r =
|
|
2519
|
+
}), r = A(() => ({
|
|
2520
2520
|
boxSizing: "border-box",
|
|
2521
2521
|
color: t.color,
|
|
2522
2522
|
display: t.display,
|
|
@@ -2524,14 +2524,14 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2524
2524
|
lineHeight: "0",
|
|
2525
2525
|
width: n.value
|
|
2526
2526
|
}));
|
|
2527
|
-
return (i, a) => (
|
|
2527
|
+
return (i, a) => (m(), M(pe(e.as), {
|
|
2528
2528
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2529
2529
|
class: "kui-icon add-icon",
|
|
2530
2530
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
2531
2531
|
style: Oe(r.value)
|
|
2532
2532
|
}, {
|
|
2533
2533
|
default: x(() => [
|
|
2534
|
-
(
|
|
2534
|
+
(m(), I("svg", {
|
|
2535
2535
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2536
2536
|
"data-testid": "kui-icon-svg-add-icon",
|
|
2537
2537
|
fill: "none",
|
|
@@ -2541,7 +2541,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2541
2541
|
width: "100%",
|
|
2542
2542
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2543
2543
|
}, [
|
|
2544
|
-
e.title ? (
|
|
2544
|
+
e.title ? (m(), I("title", Co, O(e.title), 1)) : D("", !0),
|
|
2545
2545
|
_o
|
|
2546
2546
|
], 8, xo))
|
|
2547
2547
|
]),
|
|
@@ -2606,7 +2606,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2606
2606
|
}
|
|
2607
2607
|
},
|
|
2608
2608
|
setup(e) {
|
|
2609
|
-
const t = e, n =
|
|
2609
|
+
const t = e, n = A(() => {
|
|
2610
2610
|
if (typeof t.size == "number" && t.size > 0)
|
|
2611
2611
|
return `${t.size}px`;
|
|
2612
2612
|
if (typeof t.size == "string") {
|
|
@@ -2615,7 +2615,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2615
2615
|
return `${a}px`;
|
|
2616
2616
|
}
|
|
2617
2617
|
return le;
|
|
2618
|
-
}), r =
|
|
2618
|
+
}), r = A(() => ({
|
|
2619
2619
|
boxSizing: "border-box",
|
|
2620
2620
|
color: t.color,
|
|
2621
2621
|
display: t.display,
|
|
@@ -2623,14 +2623,14 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2623
2623
|
lineHeight: "0",
|
|
2624
2624
|
width: n.value
|
|
2625
2625
|
}));
|
|
2626
|
-
return (i, a) => (
|
|
2626
|
+
return (i, a) => (m(), M(pe(e.as), {
|
|
2627
2627
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2628
2628
|
class: "kui-icon book-icon",
|
|
2629
2629
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2630
2630
|
style: Oe(r.value)
|
|
2631
2631
|
}, {
|
|
2632
2632
|
default: x(() => [
|
|
2633
|
-
(
|
|
2633
|
+
(m(), I("svg", {
|
|
2634
2634
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2635
2635
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2636
2636
|
fill: "none",
|
|
@@ -2640,7 +2640,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2640
2640
|
width: "100%",
|
|
2641
2641
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2642
2642
|
}, [
|
|
2643
|
-
e.title ? (
|
|
2643
|
+
e.title ? (m(), I("title", Io, O(e.title), 1)) : D("", !0),
|
|
2644
2644
|
Eo
|
|
2645
2645
|
], 8, So))
|
|
2646
2646
|
]),
|
|
@@ -2705,7 +2705,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2705
2705
|
}
|
|
2706
2706
|
},
|
|
2707
2707
|
setup(e) {
|
|
2708
|
-
const t = e, n =
|
|
2708
|
+
const t = e, n = A(() => {
|
|
2709
2709
|
if (typeof t.size == "number" && t.size > 0)
|
|
2710
2710
|
return `${t.size}px`;
|
|
2711
2711
|
if (typeof t.size == "string") {
|
|
@@ -2714,7 +2714,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2714
2714
|
return `${a}px`;
|
|
2715
2715
|
}
|
|
2716
2716
|
return le;
|
|
2717
|
-
}), r =
|
|
2717
|
+
}), r = A(() => ({
|
|
2718
2718
|
boxSizing: "border-box",
|
|
2719
2719
|
color: t.color,
|
|
2720
2720
|
display: t.display,
|
|
@@ -2722,14 +2722,14 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2722
2722
|
lineHeight: "0",
|
|
2723
2723
|
width: n.value
|
|
2724
2724
|
}));
|
|
2725
|
-
return (i, a) => (
|
|
2725
|
+
return (i, a) => (m(), M(pe(e.as), {
|
|
2726
2726
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2727
2727
|
class: "kui-icon chevron-down-icon",
|
|
2728
2728
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
2729
2729
|
style: Oe(r.value)
|
|
2730
2730
|
}, {
|
|
2731
2731
|
default: x(() => [
|
|
2732
|
-
(
|
|
2732
|
+
(m(), I("svg", {
|
|
2733
2733
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2734
2734
|
"data-testid": "kui-icon-svg-chevron-down-icon",
|
|
2735
2735
|
fill: "none",
|
|
@@ -2739,7 +2739,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2739
2739
|
width: "100%",
|
|
2740
2740
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2741
2741
|
}, [
|
|
2742
|
-
e.title ? (
|
|
2742
|
+
e.title ? (m(), I("title", Lo, O(e.title), 1)) : D("", !0),
|
|
2743
2743
|
No
|
|
2744
2744
|
], 8, $o))
|
|
2745
2745
|
]),
|
|
@@ -2804,7 +2804,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2804
2804
|
}
|
|
2805
2805
|
},
|
|
2806
2806
|
setup(e) {
|
|
2807
|
-
const t = e, n =
|
|
2807
|
+
const t = e, n = A(() => {
|
|
2808
2808
|
if (typeof t.size == "number" && t.size > 0)
|
|
2809
2809
|
return `${t.size}px`;
|
|
2810
2810
|
if (typeof t.size == "string") {
|
|
@@ -2813,7 +2813,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2813
2813
|
return `${a}px`;
|
|
2814
2814
|
}
|
|
2815
2815
|
return le;
|
|
2816
|
-
}), r =
|
|
2816
|
+
}), r = A(() => ({
|
|
2817
2817
|
boxSizing: "border-box",
|
|
2818
2818
|
color: t.color,
|
|
2819
2819
|
display: t.display,
|
|
@@ -2821,14 +2821,14 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2821
2821
|
lineHeight: "0",
|
|
2822
2822
|
width: n.value
|
|
2823
2823
|
}));
|
|
2824
|
-
return (i, a) => (
|
|
2824
|
+
return (i, a) => (m(), M(pe(e.as), {
|
|
2825
2825
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2826
2826
|
class: "kui-icon close-icon",
|
|
2827
2827
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
2828
2828
|
style: Oe(r.value)
|
|
2829
2829
|
}, {
|
|
2830
2830
|
default: x(() => [
|
|
2831
|
-
(
|
|
2831
|
+
(m(), I("svg", {
|
|
2832
2832
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2833
2833
|
"data-testid": "kui-icon-svg-close-icon",
|
|
2834
2834
|
fill: "none",
|
|
@@ -2838,7 +2838,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2838
2838
|
width: "100%",
|
|
2839
2839
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2840
2840
|
}, [
|
|
2841
|
-
e.title ? (
|
|
2841
|
+
e.title ? (m(), I("title", Do, O(e.title), 1)) : D("", !0),
|
|
2842
2842
|
Uo
|
|
2843
2843
|
], 8, Mo))
|
|
2844
2844
|
]),
|
|
@@ -2903,7 +2903,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2903
2903
|
}
|
|
2904
2904
|
},
|
|
2905
2905
|
setup(e) {
|
|
2906
|
-
const t = e, n =
|
|
2906
|
+
const t = e, n = A(() => {
|
|
2907
2907
|
if (typeof t.size == "number" && t.size > 0)
|
|
2908
2908
|
return `${t.size}px`;
|
|
2909
2909
|
if (typeof t.size == "string") {
|
|
@@ -2912,7 +2912,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2912
2912
|
return `${a}px`;
|
|
2913
2913
|
}
|
|
2914
2914
|
return le;
|
|
2915
|
-
}), r =
|
|
2915
|
+
}), r = A(() => ({
|
|
2916
2916
|
boxSizing: "border-box",
|
|
2917
2917
|
color: t.color,
|
|
2918
2918
|
display: t.display,
|
|
@@ -2920,14 +2920,14 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2920
2920
|
lineHeight: "0",
|
|
2921
2921
|
width: n.value
|
|
2922
2922
|
}));
|
|
2923
|
-
return (i, a) => (
|
|
2923
|
+
return (i, a) => (m(), M(pe(e.as), {
|
|
2924
2924
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2925
2925
|
class: "kui-icon copy-icon",
|
|
2926
2926
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
2927
2927
|
style: Oe(r.value)
|
|
2928
2928
|
}, {
|
|
2929
2929
|
default: x(() => [
|
|
2930
|
-
(
|
|
2930
|
+
(m(), I("svg", {
|
|
2931
2931
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2932
2932
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
2933
2933
|
fill: "none",
|
|
@@ -2937,7 +2937,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
2937
2937
|
width: "100%",
|
|
2938
2938
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2939
2939
|
}, [
|
|
2940
|
-
e.title ? (
|
|
2940
|
+
e.title ? (m(), I("title", Vo, O(e.title), 1)) : D("", !0),
|
|
2941
2941
|
Yo
|
|
2942
2942
|
], 8, Ho))
|
|
2943
2943
|
]),
|
|
@@ -3040,7 +3040,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3040
3040
|
label: "YAML",
|
|
3041
3041
|
value: "yaml"
|
|
3042
3042
|
}
|
|
3043
|
-
], u =
|
|
3043
|
+
], u = K("structured"), d = (g) => {
|
|
3044
3044
|
u.value = g == null ? void 0 : g.value;
|
|
3045
3045
|
}, c = {
|
|
3046
3046
|
id: {
|
|
@@ -3076,103 +3076,103 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3076
3076
|
// the last property displayed
|
|
3077
3077
|
section: re.Basic
|
|
3078
3078
|
}
|
|
3079
|
-
},
|
|
3080
|
-
var F,
|
|
3081
|
-
if (!
|
|
3079
|
+
}, h = K(!1), f = K(!1), v = K(""), b = K({}), _ = A(() => {
|
|
3080
|
+
var F, w, U;
|
|
3081
|
+
if (!b.value)
|
|
3082
3082
|
return [];
|
|
3083
|
-
const g = [], $ = Object.keys(
|
|
3084
|
-
for (const T in
|
|
3085
|
-
const
|
|
3083
|
+
const g = [], $ = Object.keys(b.value).length;
|
|
3084
|
+
for (const T in b.value) {
|
|
3085
|
+
const S = (w = (F = r.configSchema) == null ? void 0 : F[T]) == null ? void 0 : w.order, j = (U = c[T]) == null ? void 0 : U.order;
|
|
3086
3086
|
let q = $;
|
|
3087
|
-
(j || j === 0) && (q = j === -1 ? $ + 1 : j),
|
|
3087
|
+
(j || j === 0) && (q = j === -1 ? $ + 1 : j), S && (q = S === -1 ? $ + 1 : S), g.push([T, q]);
|
|
3088
3088
|
}
|
|
3089
|
-
return g.sort(function(T,
|
|
3090
|
-
return T[1] -
|
|
3089
|
+
return g.sort(function(T, S) {
|
|
3090
|
+
return T[1] - S[1];
|
|
3091
3091
|
}), g.map((T) => {
|
|
3092
3092
|
var he, lt;
|
|
3093
|
-
const
|
|
3093
|
+
const S = T[0], j = (he = b.value) == null ? void 0 : he[S], q = ((lt = r.configSchema) == null ? void 0 : lt[S]) || {}, J = c[S];
|
|
3094
3094
|
return {
|
|
3095
|
-
key:
|
|
3095
|
+
key: S,
|
|
3096
3096
|
value: j,
|
|
3097
3097
|
hidden: q.hidden || !1,
|
|
3098
3098
|
type: q.type ?? ((J == null ? void 0 : J.type) || P.Text),
|
|
3099
|
-
label: q.label ?? ((J == null ? void 0 : J.label) || o(
|
|
3099
|
+
label: q.label ?? ((J == null ? void 0 : J.label) || o(S)),
|
|
3100
3100
|
tooltip: q.tooltip ?? ((J == null ? void 0 : J.tooltip) || void 0),
|
|
3101
3101
|
section: q.section ?? ((J == null ? void 0 : J.section) || re.Advanced)
|
|
3102
3102
|
};
|
|
3103
3103
|
}).filter((T) => !T.hidden && T.key !== r.pluginConfigKey);
|
|
3104
|
-
}),
|
|
3105
|
-
var
|
|
3106
|
-
if (!
|
|
3104
|
+
}), N = A(() => {
|
|
3105
|
+
var w, U;
|
|
3106
|
+
if (!b.value || !r.pluginConfigKey)
|
|
3107
3107
|
return [];
|
|
3108
|
-
const g =
|
|
3108
|
+
const g = b.value[r.pluginConfigKey] || {}, $ = Object.keys(g).length, F = [];
|
|
3109
3109
|
for (const T in g) {
|
|
3110
|
-
const
|
|
3110
|
+
const S = (U = (w = r.pluginConfigSchema) == null ? void 0 : w[T]) == null ? void 0 : U.order, j = g[T];
|
|
3111
3111
|
let q = j != null && j !== "" ? $ - 1 : $;
|
|
3112
|
-
|
|
3112
|
+
S && (q = S === -1 ? $ + 1 : S), F.push([T, q]);
|
|
3113
3113
|
}
|
|
3114
|
-
return F.sort(function(T,
|
|
3115
|
-
return T[1] -
|
|
3114
|
+
return F.sort(function(T, S) {
|
|
3115
|
+
return T[1] - S[1];
|
|
3116
3116
|
}), F.map((T) => {
|
|
3117
3117
|
var J;
|
|
3118
|
-
const
|
|
3118
|
+
const S = T[0], j = g[S], q = ((J = r.pluginConfigSchema) == null ? void 0 : J[S]) || {};
|
|
3119
3119
|
return {
|
|
3120
|
-
key:
|
|
3120
|
+
key: S,
|
|
3121
3121
|
value: j,
|
|
3122
3122
|
hidden: q.hidden || !1,
|
|
3123
3123
|
type: q.type ?? P.Text,
|
|
3124
|
-
label: q.label ?? o(
|
|
3124
|
+
label: q.label ?? o(S),
|
|
3125
3125
|
tooltip: q.tooltip ?? void 0,
|
|
3126
3126
|
section: re.Plugin
|
|
3127
3127
|
};
|
|
3128
3128
|
}).filter((T) => !T.hidden);
|
|
3129
|
-
}),
|
|
3130
|
-
var g, $, F,
|
|
3129
|
+
}), k = A(() => {
|
|
3130
|
+
var g, $, F, w;
|
|
3131
3131
|
return {
|
|
3132
|
-
basic: (g =
|
|
3133
|
-
advanced: ($ =
|
|
3134
|
-
plugin: (
|
|
3132
|
+
basic: (g = _.value) == null ? void 0 : g.filter((U) => U.section === re.Basic),
|
|
3133
|
+
advanced: ($ = _.value) == null ? void 0 : $.filter((U) => U.section === re.Advanced),
|
|
3134
|
+
plugin: (w = N.value) == null ? void 0 : w.concat((F = _.value) == null ? void 0 : F.filter((U) => U.section === re.Plugin))
|
|
3135
3135
|
};
|
|
3136
|
-
}),
|
|
3136
|
+
}), Z = A(() => {
|
|
3137
3137
|
const g = [];
|
|
3138
|
-
return
|
|
3139
|
-
}),
|
|
3138
|
+
return k.value.basic.length && g.push("basic"), k.value.advanced.length && g.push("advanced"), k.value.plugin.length && g.push("plugin"), g;
|
|
3139
|
+
}), p = A(() => {
|
|
3140
3140
|
var $, F;
|
|
3141
3141
|
let g = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3142
3142
|
return r.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, (($ = r.config) == null ? void 0 : $.controlPlaneId) || "") : r.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (F = r.config) != null && F.workspace ? `/${r.config.workspace}` : "")), g = g.replace(/{id}/gi, r.config.entityId), g;
|
|
3143
3143
|
});
|
|
3144
|
-
return Ae(
|
|
3144
|
+
return Ae(h, (g) => {
|
|
3145
3145
|
n("loading", g);
|
|
3146
3146
|
}, { immediate: !0 }), Lt(async () => {
|
|
3147
|
-
f.value = !1,
|
|
3147
|
+
f.value = !1, h.value = !0;
|
|
3148
3148
|
try {
|
|
3149
|
-
const { data: g } = await l.get(
|
|
3149
|
+
const { data: g } = await l.get(p.value);
|
|
3150
3150
|
if (r.dataKey)
|
|
3151
3151
|
if (typeof g[r.dataKey] < "u")
|
|
3152
|
-
|
|
3152
|
+
b.value = { ...g[r.dataKey] };
|
|
3153
3153
|
else
|
|
3154
3154
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3155
3155
|
else
|
|
3156
|
-
|
|
3156
|
+
b.value = { ...g };
|
|
3157
3157
|
Object.keys(r.configSchema).filter((F) => r.configSchema[F].forceShow).forEach((F) => {
|
|
3158
|
-
|
|
3158
|
+
b.value && typeof b.value[F] > "u" && (b.value[F] = null);
|
|
3159
3159
|
}), n("fetch:success", g);
|
|
3160
3160
|
} catch (g) {
|
|
3161
3161
|
const $ = a(g);
|
|
3162
|
-
|
|
3162
|
+
v.value = $.startsWith("code") ? i("baseConfigCard.errors.load") : $, f.value = !0, n("fetch:error", g);
|
|
3163
3163
|
} finally {
|
|
3164
|
-
|
|
3164
|
+
h.value = !1;
|
|
3165
3165
|
}
|
|
3166
3166
|
}), (g, $) => {
|
|
3167
|
-
const F =
|
|
3168
|
-
return
|
|
3167
|
+
const F = B("KLabel"), w = B("KSelect"), U = B("KButton"), T = B("KSkeleton"), S = B("KEmptyState"), j = B("KCard");
|
|
3168
|
+
return m(), M(j, {
|
|
3169
3169
|
class: "kong-ui-entity-base-config-card",
|
|
3170
3170
|
"title-tag": e.titleTag
|
|
3171
3171
|
}, ke({
|
|
3172
3172
|
actions: x(() => [
|
|
3173
3173
|
L("div", Go, [
|
|
3174
3174
|
Y(g.$slots, "actions", {}, void 0, !0),
|
|
3175
|
-
|
|
3175
|
+
R(F, {
|
|
3176
3176
|
class: "config-format-select-label",
|
|
3177
3177
|
"data-testid": "config-format-select-label"
|
|
3178
3178
|
}, {
|
|
@@ -3181,12 +3181,12 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3181
3181
|
]),
|
|
3182
3182
|
_: 1
|
|
3183
3183
|
}),
|
|
3184
|
-
|
|
3184
|
+
R(w, {
|
|
3185
3185
|
"data-testid": "select-config-format",
|
|
3186
3186
|
items: s,
|
|
3187
3187
|
onChange: d
|
|
3188
3188
|
}),
|
|
3189
|
-
e.configCardDoc ? (
|
|
3189
|
+
e.configCardDoc ? (m(), M(U, {
|
|
3190
3190
|
key: 0,
|
|
3191
3191
|
appearance: "tertiary",
|
|
3192
3192
|
class: "book-icon",
|
|
@@ -3198,7 +3198,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3198
3198
|
rel: "noopener",
|
|
3199
3199
|
target: "_blank"
|
|
3200
3200
|
}, [
|
|
3201
|
-
|
|
3201
|
+
R(E(Fo), { size: E(Or) }, null, 8, ["size"])
|
|
3202
3202
|
], 8, Zo)
|
|
3203
3203
|
]),
|
|
3204
3204
|
_: 1
|
|
@@ -3206,29 +3206,29 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3206
3206
|
])
|
|
3207
3207
|
]),
|
|
3208
3208
|
default: x(() => [
|
|
3209
|
-
|
|
3209
|
+
h.value ? (m(), M(T, {
|
|
3210
3210
|
key: 0,
|
|
3211
3211
|
"data-testid": "config-card-loader",
|
|
3212
3212
|
"table-columns": 2,
|
|
3213
3213
|
type: "table"
|
|
3214
|
-
})) : f.value ? (
|
|
3214
|
+
})) : f.value ? (m(), M(S, {
|
|
3215
3215
|
key: 1,
|
|
3216
3216
|
"data-testid": "config-card-fetch-error",
|
|
3217
3217
|
"icon-variant": "error"
|
|
3218
3218
|
}, {
|
|
3219
3219
|
default: x(() => [
|
|
3220
|
-
L("h3", null, O(
|
|
3220
|
+
L("h3", null, O(v.value), 1)
|
|
3221
3221
|
]),
|
|
3222
3222
|
_: 1
|
|
3223
3223
|
})) : D("", !0),
|
|
3224
3224
|
L("div", Qo, [
|
|
3225
|
-
|
|
3225
|
+
R(vo, {
|
|
3226
3226
|
config: e.config,
|
|
3227
|
-
"fetcher-url":
|
|
3227
|
+
"fetcher-url": p.value,
|
|
3228
3228
|
format: u.value,
|
|
3229
|
-
"prop-list-types":
|
|
3230
|
-
"property-collections":
|
|
3231
|
-
record:
|
|
3229
|
+
"prop-list-types": Z.value,
|
|
3230
|
+
"property-collections": k.value,
|
|
3231
|
+
record: b.value
|
|
3232
3232
|
}, ke({ _: 2 }, [
|
|
3233
3233
|
ae(Object.keys(g.$slots), (q) => ({
|
|
3234
3234
|
name: q,
|
|
@@ -3249,7 +3249,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3249
3249
|
fn: x(() => [
|
|
3250
3250
|
L("span", Jo, [
|
|
3251
3251
|
Y(g.$slots, "title", {}, () => [
|
|
3252
|
-
V(O(
|
|
3252
|
+
V(O(E(i)("baseConfigCard.title")), 1)
|
|
3253
3253
|
], !0)
|
|
3254
3254
|
])
|
|
3255
3255
|
]),
|
|
@@ -3322,20 +3322,20 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3322
3322
|
},
|
|
3323
3323
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3324
3324
|
setup(e, { emit: t }) {
|
|
3325
|
-
var
|
|
3326
|
-
const n = t, r = e, i = jn(), { i18n: { t: a } } = z.useI18n(), { getMessageFromError: o } = z.useErrors(), { axiosInstance: l } = z.useAxios((
|
|
3325
|
+
var Z;
|
|
3326
|
+
const n = t, r = e, i = jn(), { i18n: { t: a } } = z.useI18n(), { getMessageFromError: o } = z.useErrors(), { axiosInstance: l } = z.useAxios((Z = r.config) == null ? void 0 : Z.axiosRequestConfig), s = K(!1), u = K(!1), d = K(""), c = A(() => r.canSubmit === !1 || r.isReadonly), h = K(!1), f = A(() => {
|
|
3327
3327
|
var y, g;
|
|
3328
|
-
let
|
|
3329
|
-
return r.config.app === "konnect" ?
|
|
3330
|
-
}),
|
|
3331
|
-
|
|
3332
|
-
},
|
|
3333
|
-
r.config.cancelRoute ? i.push(r.config.cancelRoute) :
|
|
3334
|
-
},
|
|
3328
|
+
let p = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3329
|
+
return r.config.app === "konnect" ? p = p.replace(/{controlPlaneId}/gi, ((y = r.config) == null ? void 0 : y.controlPlaneId) || "") : r.config.app === "kongManager" && (p = p.replace(/\/{workspace}/gi, (g = r.config) != null && g.workspace ? `/${r.config.workspace}` : "")), r.editId ? (p = p.replace(/{id}/gi, r.editId), p) : (p = p.replace(/\/{id}/gi, ""), p);
|
|
3330
|
+
}), v = () => {
|
|
3331
|
+
h.value = !h.value;
|
|
3332
|
+
}, b = () => {
|
|
3333
|
+
r.config.cancelRoute ? i.push(r.config.cancelRoute) : _();
|
|
3334
|
+
}, _ = () => {
|
|
3335
3335
|
n("cancel");
|
|
3336
|
-
},
|
|
3336
|
+
}, N = () => {
|
|
3337
3337
|
c.value || n("submit");
|
|
3338
|
-
},
|
|
3338
|
+
}, k = K([
|
|
3339
3339
|
{
|
|
3340
3340
|
title: a("baseForm.configuration.yaml"),
|
|
3341
3341
|
hash: "#yaml"
|
|
@@ -3345,106 +3345,106 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3345
3345
|
hash: "#json"
|
|
3346
3346
|
}
|
|
3347
3347
|
]);
|
|
3348
|
-
return Ae(() => s.value, (
|
|
3349
|
-
n("loading",
|
|
3348
|
+
return Ae(() => s.value, (p) => {
|
|
3349
|
+
n("loading", p);
|
|
3350
3350
|
}, { immediate: !0 }), Lt(async () => {
|
|
3351
3351
|
if (r.editId)
|
|
3352
3352
|
try {
|
|
3353
3353
|
u.value = !1, s.value = !0;
|
|
3354
|
-
const { data:
|
|
3355
|
-
n("fetch:success",
|
|
3356
|
-
} catch (
|
|
3357
|
-
const y = o(
|
|
3358
|
-
d.value = y.startsWith("code") ? a("baseForm.errors.edit") : y, u.value = !0, n("fetch:error",
|
|
3354
|
+
const { data: p } = await l.get(f.value);
|
|
3355
|
+
n("fetch:success", p);
|
|
3356
|
+
} catch (p) {
|
|
3357
|
+
const y = o(p);
|
|
3358
|
+
d.value = y.startsWith("code") ? a("baseForm.errors.edit") : y, u.value = !0, n("fetch:error", p);
|
|
3359
3359
|
} finally {
|
|
3360
3360
|
s.value = !1;
|
|
3361
3361
|
}
|
|
3362
|
-
}), (
|
|
3363
|
-
const g =
|
|
3364
|
-
return
|
|
3362
|
+
}), (p, y) => {
|
|
3363
|
+
const g = B("KSkeleton"), $ = B("KEmptyState"), F = B("KAlert"), w = B("KButton"), U = B("KTabs"), T = B("KSlideout"), S = B("KCard");
|
|
3364
|
+
return m(), M(S, { class: "kong-ui-entity-base-form" }, {
|
|
3365
3365
|
default: x(() => [
|
|
3366
|
-
s.value ? (
|
|
3366
|
+
s.value ? (m(), M(g, {
|
|
3367
3367
|
key: 0,
|
|
3368
3368
|
type: "form"
|
|
3369
|
-
})) : u.value ? (
|
|
3369
|
+
})) : u.value ? (m(), M($, {
|
|
3370
3370
|
key: 1,
|
|
3371
|
-
"action-button-text":
|
|
3371
|
+
"action-button-text": E(a)("baseForm.actions.back"),
|
|
3372
3372
|
"data-testid": "form-fetch-error",
|
|
3373
3373
|
"icon-variant": "error",
|
|
3374
|
-
onClickAction:
|
|
3374
|
+
onClickAction: b
|
|
3375
3375
|
}, {
|
|
3376
3376
|
default: x(() => [
|
|
3377
3377
|
L("h3", null, O(d.value), 1)
|
|
3378
3378
|
]),
|
|
3379
3379
|
_: 1
|
|
3380
|
-
}, 8, ["action-button-text"])) : (
|
|
3380
|
+
}, 8, ["action-button-text"])) : (m(), I("form", {
|
|
3381
3381
|
key: 2,
|
|
3382
3382
|
"data-testid": "form-content",
|
|
3383
3383
|
novalidate: r.noValidate,
|
|
3384
|
-
onReset: ze(
|
|
3385
|
-
onSubmit: ze(
|
|
3384
|
+
onReset: ze(_, ["prevent"]),
|
|
3385
|
+
onSubmit: ze(N, ["prevent"])
|
|
3386
3386
|
}, [
|
|
3387
|
-
Y(
|
|
3388
|
-
e.errorMessage ? (
|
|
3387
|
+
Y(p.$slots, "default", {}, void 0, !0),
|
|
3388
|
+
e.errorMessage ? (m(), M(F, {
|
|
3389
3389
|
key: 0,
|
|
3390
3390
|
appearance: "danger",
|
|
3391
3391
|
"data-testid": "form-error",
|
|
3392
3392
|
message: e.errorMessage
|
|
3393
3393
|
}, null, 8, ["message"])) : D("", !0),
|
|
3394
3394
|
L("div", tl, [
|
|
3395
|
-
Y(
|
|
3396
|
-
|
|
3395
|
+
Y(p.$slots, "form-actions", {}, () => [
|
|
3396
|
+
R(w, {
|
|
3397
3397
|
appearance: "tertiary",
|
|
3398
3398
|
"data-testid": "form-view-configuration",
|
|
3399
|
-
onClick: y[0] || (y[0] = (j) =>
|
|
3399
|
+
onClick: y[0] || (y[0] = (j) => v())
|
|
3400
3400
|
}, {
|
|
3401
3401
|
default: x(() => [
|
|
3402
|
-
V(O(
|
|
3402
|
+
V(O(E(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3403
3403
|
]),
|
|
3404
3404
|
_: 1
|
|
3405
3405
|
}),
|
|
3406
|
-
|
|
3406
|
+
R(w, {
|
|
3407
3407
|
appearance: "secondary",
|
|
3408
3408
|
"data-testid": "form-cancel",
|
|
3409
3409
|
disabled: e.isReadonly,
|
|
3410
3410
|
type: "reset"
|
|
3411
3411
|
}, {
|
|
3412
3412
|
default: x(() => [
|
|
3413
|
-
V(O(
|
|
3413
|
+
V(O(E(a)("baseForm.actions.cancel")), 1)
|
|
3414
3414
|
]),
|
|
3415
3415
|
_: 1
|
|
3416
3416
|
}, 8, ["disabled"]),
|
|
3417
|
-
|
|
3417
|
+
R(w, {
|
|
3418
3418
|
appearance: "primary",
|
|
3419
3419
|
"data-testid": "form-submit",
|
|
3420
3420
|
disabled: c.value,
|
|
3421
3421
|
type: "submit"
|
|
3422
3422
|
}, {
|
|
3423
3423
|
default: x(() => [
|
|
3424
|
-
V(O(
|
|
3424
|
+
V(O(E(a)("baseForm.actions.save")), 1)
|
|
3425
3425
|
]),
|
|
3426
3426
|
_: 1
|
|
3427
3427
|
}, 8, ["disabled"])
|
|
3428
3428
|
], !0)
|
|
3429
3429
|
])
|
|
3430
3430
|
], 40, el)),
|
|
3431
|
-
|
|
3431
|
+
R(T, {
|
|
3432
3432
|
"close-on-blur": !1,
|
|
3433
3433
|
"data-testid": "form-view-configuration-slideout",
|
|
3434
3434
|
"has-overlay": !1,
|
|
3435
3435
|
"offset-top": 60,
|
|
3436
|
-
title:
|
|
3437
|
-
visible:
|
|
3438
|
-
onClose: y[1] || (y[1] = (j) =>
|
|
3436
|
+
title: E(a)("baseForm.configuration.title"),
|
|
3437
|
+
visible: h.value,
|
|
3438
|
+
onClose: y[1] || (y[1] = (j) => v())
|
|
3439
3439
|
}, {
|
|
3440
3440
|
default: x(() => [
|
|
3441
|
-
L("div", null, O(
|
|
3442
|
-
|
|
3441
|
+
L("div", null, O(E(a)("baseForm.configuration.message")), 1),
|
|
3442
|
+
R(U, {
|
|
3443
3443
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3444
|
-
tabs:
|
|
3444
|
+
tabs: k.value
|
|
3445
3445
|
}, {
|
|
3446
3446
|
json: x(() => [
|
|
3447
|
-
|
|
3447
|
+
R(Ut, {
|
|
3448
3448
|
config: e.config,
|
|
3449
3449
|
"fetcher-url": f.value,
|
|
3450
3450
|
"json-record": r.formFields,
|
|
@@ -3452,7 +3452,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3452
3452
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3453
3453
|
]),
|
|
3454
3454
|
yaml: x(() => [
|
|
3455
|
-
|
|
3455
|
+
R(Tn, {
|
|
3456
3456
|
"yaml-record": r.formFields
|
|
3457
3457
|
}, null, 8, ["yaml-record"])
|
|
3458
3458
|
]),
|
|
@@ -3466,10 +3466,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3466
3466
|
});
|
|
3467
3467
|
};
|
|
3468
3468
|
}
|
|
3469
|
-
}), Gl = /* @__PURE__ */ ie(nl, [["__scopeId", "data-v-3def74fe"]]), rl = {
|
|
3470
|
-
key: 0,
|
|
3471
|
-
"data-testid": "first-col"
|
|
3472
|
-
}, il = /* @__PURE__ */ H({
|
|
3469
|
+
}), Gl = /* @__PURE__ */ ie(nl, [["__scopeId", "data-v-3def74fe"]]), rl = ["data-truncate"], il = /* @__PURE__ */ H({
|
|
3473
3470
|
__name: "EntityBaseTableCell",
|
|
3474
3471
|
props: {
|
|
3475
3472
|
keyName: {
|
|
@@ -3479,68 +3476,80 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3479
3476
|
rowEl: {
|
|
3480
3477
|
type: [Object, null],
|
|
3481
3478
|
required: !0
|
|
3479
|
+
},
|
|
3480
|
+
tooltip: {
|
|
3481
|
+
type: Boolean,
|
|
3482
|
+
default: !1
|
|
3482
3483
|
}
|
|
3483
3484
|
},
|
|
3484
3485
|
setup(e) {
|
|
3485
|
-
const t = e, n =
|
|
3486
|
-
var
|
|
3487
|
-
return ((
|
|
3488
|
-
}), r =
|
|
3489
|
-
var
|
|
3490
|
-
return ((
|
|
3491
|
-
}), i =
|
|
3492
|
-
var
|
|
3493
|
-
const
|
|
3494
|
-
return
|
|
3495
|
-
});
|
|
3496
|
-
let
|
|
3497
|
-
const
|
|
3498
|
-
|
|
3499
|
-
},
|
|
3500
|
-
var
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3486
|
+
const t = e, n = A(() => {
|
|
3487
|
+
var _;
|
|
3488
|
+
return ((_ = t.rowEl) == null ? void 0 : _.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3489
|
+
}), r = A(() => {
|
|
3490
|
+
var _;
|
|
3491
|
+
return ((_ = n.value) == null ? void 0 : _.querySelector('[data-truncate="true"]')) || null;
|
|
3492
|
+
}), i = A(() => {
|
|
3493
|
+
var N, k;
|
|
3494
|
+
const _ = (N = t.rowEl) == null ? void 0 : N.querySelectorAll("td");
|
|
3495
|
+
return _ ? ((k = _[0]) == null ? void 0 : k.getAttribute("data-testid")) === t.keyName : !1;
|
|
3496
|
+
}), a = A(() => i.value || t.tooltip);
|
|
3497
|
+
let o;
|
|
3498
|
+
const l = () => {
|
|
3499
|
+
o && (o.disconnect(), o = void 0);
|
|
3500
|
+
}, s = () => {
|
|
3501
|
+
var N, k, Z;
|
|
3502
|
+
let _ = ((N = n.value) == null ? void 0 : N.clientWidth) || 0;
|
|
3503
|
+
if (n.value && "getComputedStyle" in window) {
|
|
3504
|
+
const p = window.getComputedStyle(n.value);
|
|
3505
|
+
_ -= (parseFloat(p.paddingLeft) || 0) + (parseFloat(p.paddingRight) || 0);
|
|
3506
|
+
}
|
|
3507
|
+
d.value = ((k = r.value) == null ? void 0 : k.getBoundingClientRect().width) || 0, c.value = _, h.value = ((Z = u.value) == null ? void 0 : Z.innerText) || "";
|
|
3508
|
+
}, u = K({}), d = K(0), c = K(0), h = K(""), f = A(() => [r.value, n.value]), v = Ae(
|
|
3509
|
+
f,
|
|
3510
|
+
(_) => {
|
|
3511
|
+
if (a.value && (l(), "ResizeObserver" in window && window)) {
|
|
3512
|
+
o = new ResizeObserver((N) => {
|
|
3507
3513
|
window.requestAnimationFrame(() => {
|
|
3508
|
-
!Array.isArray(
|
|
3514
|
+
!Array.isArray(N) || !N.length || s();
|
|
3509
3515
|
});
|
|
3510
3516
|
});
|
|
3511
|
-
for (const
|
|
3512
|
-
|
|
3517
|
+
for (const N of _)
|
|
3518
|
+
N && o.observe(N);
|
|
3513
3519
|
}
|
|
3514
3520
|
},
|
|
3515
3521
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3516
|
-
), b =
|
|
3522
|
+
), b = A(() => a.value ? d.value > c.value : !1);
|
|
3517
3523
|
return Nn(() => {
|
|
3518
|
-
|
|
3524
|
+
s();
|
|
3519
3525
|
}), Rn(() => {
|
|
3520
|
-
|
|
3521
|
-
}), (
|
|
3522
|
-
const
|
|
3523
|
-
return
|
|
3526
|
+
v();
|
|
3527
|
+
}), (_, N) => {
|
|
3528
|
+
const k = B("KTooltip");
|
|
3529
|
+
return m(), I("span", {
|
|
3524
3530
|
ref_key: "contentRef",
|
|
3525
|
-
ref:
|
|
3531
|
+
ref: u,
|
|
3526
3532
|
class: "content-wrapper"
|
|
3527
3533
|
}, [
|
|
3528
|
-
|
|
3529
|
-
|
|
3534
|
+
a.value ? (m(), I("span", {
|
|
3535
|
+
key: 0,
|
|
3536
|
+
"data-truncate": a.value || void 0
|
|
3537
|
+
}, [
|
|
3538
|
+
R(k, {
|
|
3530
3539
|
"max-width": "300",
|
|
3531
3540
|
placement: "bottomStart",
|
|
3532
|
-
text: b.value ?
|
|
3541
|
+
text: b.value ? h.value : ""
|
|
3533
3542
|
}, {
|
|
3534
3543
|
default: x(() => [
|
|
3535
|
-
Y(
|
|
3544
|
+
Y(_.$slots, "default", {}, void 0, !0)
|
|
3536
3545
|
]),
|
|
3537
3546
|
_: 3
|
|
3538
3547
|
}, 8, ["text"])
|
|
3539
|
-
])) : Y(
|
|
3548
|
+
], 8, rl)) : Y(_.$slots, "default", { key: 1 }, void 0, !0)
|
|
3540
3549
|
], 512);
|
|
3541
3550
|
};
|
|
3542
3551
|
}
|
|
3543
|
-
}), al = /* @__PURE__ */ ie(il, [["__scopeId", "data-v-
|
|
3552
|
+
}), al = /* @__PURE__ */ ie(il, [["__scopeId", "data-v-6019026f"]]), ol = { class: "toolbar-container" }, ll = {
|
|
3544
3553
|
key: 0,
|
|
3545
3554
|
class: "toolbar-button-container"
|
|
3546
3555
|
}, sl = ["data-testid"], cl = /* @__PURE__ */ H({
|
|
@@ -3657,7 +3666,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3657
3666
|
},
|
|
3658
3667
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3659
3668
|
setup(e, { emit: t }) {
|
|
3660
|
-
const n = e, r = t, { i18n: { t: i } } = z.useI18n(), a =
|
|
3669
|
+
const n = e, r = t, { i18n: { t: i } } = z.useI18n(), a = A(() => {
|
|
3661
3670
|
var y, g;
|
|
3662
3671
|
return typeof n.errorMessage == "string" ? {
|
|
3663
3672
|
hasError: !!n.errorMessage,
|
|
@@ -3668,7 +3677,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3668
3677
|
title: (y = n.errorMessage) == null ? void 0 : y.title,
|
|
3669
3678
|
message: (g = n.errorMessage) == null ? void 0 : g.message
|
|
3670
3679
|
};
|
|
3671
|
-
}), o =
|
|
3680
|
+
}), o = A(() => n.cacheIdentifier || n.preferencesStorageKey), l = (y) => y.hasData || !!n.query, s = A(() => {
|
|
3672
3681
|
const y = [];
|
|
3673
3682
|
return Object.keys(n.tableHeaders).forEach(($) => {
|
|
3674
3683
|
const F = n.tableHeaders[$];
|
|
@@ -3685,10 +3694,10 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3685
3694
|
"data-rowid": y.id,
|
|
3686
3695
|
"data-testid": y.name,
|
|
3687
3696
|
...n.rowAttributes(y)
|
|
3688
|
-
}), d =
|
|
3697
|
+
}), d = K({}), c = (y) => {
|
|
3689
3698
|
var g;
|
|
3690
3699
|
return (g = d.value) == null ? void 0 : g.$el.querySelector(`[data-rowid="${y.id}"]`);
|
|
3691
|
-
},
|
|
3700
|
+
}, h = (y) => {
|
|
3692
3701
|
const g = {
|
|
3693
3702
|
"data-testid": y.headerKey,
|
|
3694
3703
|
...n.cellAttributes(y)
|
|
@@ -3699,42 +3708,42 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3699
3708
|
textOverflow: "ellipsis"
|
|
3700
3709
|
}), g;
|
|
3701
3710
|
}, f = () => {
|
|
3702
|
-
r("empty-state-cta-clicked"),
|
|
3703
|
-
},
|
|
3711
|
+
r("empty-state-cta-clicked"), v();
|
|
3712
|
+
}, v = () => {
|
|
3704
3713
|
r("clear-search-input");
|
|
3705
|
-
},
|
|
3714
|
+
}, b = A(() => n.disableRowClick ? void 0 : (y, g) => {
|
|
3706
3715
|
r("click:row", g);
|
|
3707
|
-
}),
|
|
3716
|
+
}), _ = (y) => {
|
|
3708
3717
|
r("sort", y);
|
|
3709
|
-
}, { setTablePreferences:
|
|
3710
|
-
const y =
|
|
3718
|
+
}, { setTablePreferences: N, getTablePreferences: k } = zn(), Z = A(() => {
|
|
3719
|
+
const y = k(n.preferencesStorageKey);
|
|
3711
3720
|
return {
|
|
3712
3721
|
...n.initialFetcherParams,
|
|
3713
3722
|
...y
|
|
3714
3723
|
};
|
|
3715
|
-
}),
|
|
3716
|
-
n.preferencesStorageKey &&
|
|
3724
|
+
}), p = (y) => {
|
|
3725
|
+
n.preferencesStorageKey && N(n.preferencesStorageKey, y);
|
|
3717
3726
|
};
|
|
3718
3727
|
return (y, g) => {
|
|
3719
|
-
const $ =
|
|
3720
|
-
return
|
|
3728
|
+
const $ = B("KIcon"), F = B("KButton"), w = B("KDropdown"), U = B("KTable"), T = B("KCard");
|
|
3729
|
+
return m(), M(T, {
|
|
3721
3730
|
class: "kong-ui-entity-base-table",
|
|
3722
3731
|
title: e.title,
|
|
3723
3732
|
"title-tag": e.titleTag
|
|
3724
3733
|
}, {
|
|
3725
3734
|
default: x(() => [
|
|
3726
|
-
|
|
3735
|
+
R(U, {
|
|
3727
3736
|
ref_key: "tableRefs",
|
|
3728
3737
|
ref: d,
|
|
3729
3738
|
"cache-identifier": o.value,
|
|
3730
|
-
"cell-attrs":
|
|
3739
|
+
"cell-attrs": h,
|
|
3731
3740
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3732
3741
|
"disable-sorting": e.disableSorting,
|
|
3733
|
-
"empty-state-action-message": e.query ?
|
|
3742
|
+
"empty-state-action-message": e.query ? E(i)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3734
3743
|
"empty-state-action-route": e.query ? void 0 : e.emptyStateOptions.ctaPath,
|
|
3735
3744
|
"empty-state-icon-variant": e.query ? "search" : "kong",
|
|
3736
|
-
"empty-state-message": e.query ?
|
|
3737
|
-
"empty-state-title": e.query ?
|
|
3745
|
+
"empty-state-message": e.query ? E(i)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3746
|
+
"empty-state-title": e.query ? E(i)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3738
3747
|
"enable-client-sort": e.enableClientSort,
|
|
3739
3748
|
"error-state-message": a.value.message,
|
|
3740
3749
|
"error-state-title": a.value.title,
|
|
@@ -3743,51 +3752,51 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3743
3752
|
"has-error": a.value.hasError,
|
|
3744
3753
|
headers: s.value,
|
|
3745
3754
|
"hide-pagination-when-optional": "",
|
|
3746
|
-
"initial-fetcher-params":
|
|
3755
|
+
"initial-fetcher-params": Z.value,
|
|
3747
3756
|
"is-loading": e.isLoading,
|
|
3748
3757
|
"pagination-type": e.paginationType,
|
|
3749
3758
|
"row-attrs": u,
|
|
3750
3759
|
"search-input": e.query,
|
|
3751
3760
|
onKtableEmptyStateCtaClicked: f,
|
|
3752
|
-
"onRow:click":
|
|
3753
|
-
onSort: g[0] || (g[0] = (
|
|
3754
|
-
"onUpdate:tablePreferences":
|
|
3761
|
+
"onRow:click": b.value,
|
|
3762
|
+
onSort: g[0] || (g[0] = (S) => _(S)),
|
|
3763
|
+
"onUpdate:tablePreferences": p
|
|
3755
3764
|
}, ke({
|
|
3756
|
-
toolbar: x(({ state:
|
|
3765
|
+
toolbar: x(({ state: S }) => [
|
|
3757
3766
|
me(L("div", ol, [
|
|
3758
3767
|
Y(y.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3759
|
-
y.$slots["toolbar-button"] ? (
|
|
3768
|
+
y.$slots["toolbar-button"] ? (m(), I("div", ll, [
|
|
3760
3769
|
Y(y.$slots, "toolbar-button", {}, void 0, !0)
|
|
3761
3770
|
])) : D("", !0)
|
|
3762
3771
|
], 512), [
|
|
3763
|
-
[ge, l(
|
|
3772
|
+
[ge, l(S)]
|
|
3764
3773
|
])
|
|
3765
3774
|
]),
|
|
3766
|
-
actions: x(({ row:
|
|
3775
|
+
actions: x(({ row: S, rowKey: j, rowValue: q }) => [
|
|
3767
3776
|
L("div", {
|
|
3768
3777
|
class: "actions-container",
|
|
3769
|
-
"data-testid":
|
|
3778
|
+
"data-testid": S.name
|
|
3770
3779
|
}, [
|
|
3771
|
-
|
|
3780
|
+
R(w, {
|
|
3772
3781
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3773
3782
|
width: e.dropdownMenuWidth
|
|
3774
3783
|
}, {
|
|
3775
3784
|
items: x(() => [
|
|
3776
3785
|
Y(y.$slots, "actions", {
|
|
3777
|
-
row:
|
|
3786
|
+
row: S,
|
|
3778
3787
|
rowKey: j,
|
|
3779
3788
|
rowValue: q
|
|
3780
3789
|
}, void 0, !0)
|
|
3781
3790
|
]),
|
|
3782
3791
|
default: x(() => [
|
|
3783
|
-
|
|
3792
|
+
R(F, {
|
|
3784
3793
|
class: "actions-trigger",
|
|
3785
3794
|
"data-testid": "overflow-actions-button",
|
|
3786
3795
|
size: "small"
|
|
3787
3796
|
}, {
|
|
3788
3797
|
icon: x(() => [
|
|
3789
|
-
|
|
3790
|
-
color:
|
|
3798
|
+
R($, {
|
|
3799
|
+
color: E(Sr),
|
|
3791
3800
|
icon: "more",
|
|
3792
3801
|
size: "16"
|
|
3793
3802
|
}, null, 8, ["color"])
|
|
@@ -3801,12 +3810,13 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3801
3810
|
]),
|
|
3802
3811
|
_: 2
|
|
3803
3812
|
}, [
|
|
3804
|
-
ae(e.tableHeaders, (
|
|
3813
|
+
ae(e.tableHeaders, (S, j) => ({
|
|
3805
3814
|
name: j,
|
|
3806
3815
|
fn: x(({ row: q, rowKey: J, rowValue: he }) => [
|
|
3807
|
-
|
|
3816
|
+
R(al, {
|
|
3808
3817
|
"key-name": String(j),
|
|
3809
|
-
"row-el": c(q)
|
|
3818
|
+
"row-el": c(q),
|
|
3819
|
+
tooltip: S.tooltip
|
|
3810
3820
|
}, {
|
|
3811
3821
|
default: x(() => [
|
|
3812
3822
|
Y(y.$slots, j, {
|
|
@@ -3818,13 +3828,13 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3818
3828
|
], !0)
|
|
3819
3829
|
]),
|
|
3820
3830
|
_: 2
|
|
3821
|
-
}, 1032, ["key-name", "row-el"])
|
|
3831
|
+
}, 1032, ["key-name", "row-el", "tooltip"])
|
|
3822
3832
|
])
|
|
3823
3833
|
})),
|
|
3824
3834
|
e.query ? void 0 : {
|
|
3825
3835
|
name: "empty-state-action-icon",
|
|
3826
3836
|
fn: x(() => [
|
|
3827
|
-
|
|
3837
|
+
R(E(wo))
|
|
3828
3838
|
]),
|
|
3829
3839
|
key: "0"
|
|
3830
3840
|
}
|
|
@@ -3834,7 +3844,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3834
3844
|
}, 8, ["title", "title-tag"]);
|
|
3835
3845
|
};
|
|
3836
3846
|
}
|
|
3837
|
-
}), Zl = /* @__PURE__ */ ie(cl, [["__scopeId", "data-v-
|
|
3847
|
+
}), Zl = /* @__PURE__ */ ie(cl, [["__scopeId", "data-v-adb02213"]]), ul = {
|
|
3838
3848
|
key: 0,
|
|
3839
3849
|
class: "kong-ui-entity-delete-error"
|
|
3840
3850
|
}, dl = {
|
|
@@ -3879,14 +3889,14 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3879
3889
|
},
|
|
3880
3890
|
emits: ["cancel", "proceed"],
|
|
3881
3891
|
setup(e, { emit: t }) {
|
|
3882
|
-
const { i18nT: n } = z.useI18n(), r = e, i = t, a =
|
|
3892
|
+
const { i18nT: n } = z.useI18n(), r = e, i = t, a = A(() => r.needConfirm ? r.entityName : ""), o = () => {
|
|
3883
3893
|
i("cancel");
|
|
3884
3894
|
}, l = () => {
|
|
3885
3895
|
i("proceed");
|
|
3886
3896
|
};
|
|
3887
3897
|
return (s, u) => {
|
|
3888
|
-
const d =
|
|
3889
|
-
return
|
|
3898
|
+
const d = B("KAlert"), c = B("KPrompt");
|
|
3899
|
+
return m(), M(c, {
|
|
3890
3900
|
"action-button-appearance": "danger",
|
|
3891
3901
|
"action-button-disabled": e.actionPending,
|
|
3892
3902
|
"action-button-text": "Yes, delete",
|
|
@@ -3898,15 +3908,15 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3898
3908
|
onProceed: l
|
|
3899
3909
|
}, {
|
|
3900
3910
|
default: x(() => [
|
|
3901
|
-
e.error ? (
|
|
3902
|
-
|
|
3911
|
+
e.error ? (m(), I("div", ul, [
|
|
3912
|
+
R(d, { appearance: "danger" }, {
|
|
3903
3913
|
default: x(() => [
|
|
3904
3914
|
V(O(e.error), 1)
|
|
3905
3915
|
]),
|
|
3906
3916
|
_: 1
|
|
3907
3917
|
})
|
|
3908
3918
|
])) : D("", !0),
|
|
3909
|
-
|
|
3919
|
+
R(E(n), {
|
|
3910
3920
|
class: "message",
|
|
3911
3921
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3912
3922
|
tag: "p"
|
|
@@ -3924,7 +3934,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3924
3934
|
key: "0"
|
|
3925
3935
|
} : void 0
|
|
3926
3936
|
]), 1032, ["keypath"]),
|
|
3927
|
-
r.description || s.$slots.description ? (
|
|
3937
|
+
r.description || s.$slots.description ? (m(), I("div", dl, [
|
|
3928
3938
|
Y(s.$slots, "description", {}, () => [
|
|
3929
3939
|
L("p", null, O(r.description), 1)
|
|
3930
3940
|
], !0)
|
|
@@ -3957,7 +3967,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3957
3967
|
}
|
|
3958
3968
|
},
|
|
3959
3969
|
setup(e) {
|
|
3960
|
-
return (t, n) => (
|
|
3970
|
+
return (t, n) => (m(), I("svg", pl, [
|
|
3961
3971
|
L("mask", hl, [
|
|
3962
3972
|
L("rect", {
|
|
3963
3973
|
fill: e.color,
|
|
@@ -3996,68 +4006,71 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
3996
4006
|
},
|
|
3997
4007
|
emits: ["update:modelValue"],
|
|
3998
4008
|
setup(e, { emit: t }) {
|
|
3999
|
-
const { i18n: { t: n } } = z.useI18n(), r = e, i = t, a =
|
|
4000
|
-
const
|
|
4009
|
+
const { i18n: { t: n } } = z.useI18n(), r = e, i = t, a = K(!1), o = K({}), l = K(/* @__PURE__ */ new Set()), s = A(() => {
|
|
4010
|
+
const p = [];
|
|
4001
4011
|
return new URLSearchParams(r.modelValue).forEach((y, g) => {
|
|
4002
|
-
y !== "" &&
|
|
4003
|
-
}),
|
|
4004
|
-
}), u =
|
|
4005
|
-
const
|
|
4006
|
-
return Object.keys(
|
|
4007
|
-
|
|
4012
|
+
y !== "" && p.push(g);
|
|
4013
|
+
}), p;
|
|
4014
|
+
}), u = A(() => {
|
|
4015
|
+
const p = r.config.fields;
|
|
4016
|
+
return Object.keys(p).filter((y) => {
|
|
4017
|
+
var g;
|
|
4018
|
+
return (g = p == null ? void 0 : p[y]) == null ? void 0 : g.searchable;
|
|
4019
|
+
}).map((y) => ({
|
|
4020
|
+
label: p[y].label || y,
|
|
4008
4021
|
value: y,
|
|
4009
4022
|
expanded: !1
|
|
4010
4023
|
}));
|
|
4011
4024
|
});
|
|
4012
|
-
Ae(() => r.modelValue, (
|
|
4013
|
-
o.value = {}, new URLSearchParams(
|
|
4025
|
+
Ae(() => r.modelValue, (p) => {
|
|
4026
|
+
o.value = {}, new URLSearchParams(p).forEach((y, g) => {
|
|
4014
4027
|
o.value[g] = y;
|
|
4015
4028
|
});
|
|
4016
4029
|
});
|
|
4017
4030
|
const d = () => {
|
|
4018
4031
|
a.value = !a.value;
|
|
4019
|
-
}, c = (
|
|
4020
|
-
l.value.has(
|
|
4021
|
-
},
|
|
4022
|
-
i("update:modelValue",
|
|
4032
|
+
}, c = (p) => {
|
|
4033
|
+
l.value.has(p) ? l.value.delete(p) : l.value.add(p);
|
|
4034
|
+
}, h = (p) => {
|
|
4035
|
+
i("update:modelValue", p);
|
|
4023
4036
|
}, f = () => {
|
|
4024
|
-
|
|
4025
|
-
},
|
|
4037
|
+
h("");
|
|
4038
|
+
}, v = (p) => `filter-${p}`, b = (p) => {
|
|
4026
4039
|
var y, g;
|
|
4027
|
-
return (((g = (y = r.config.schema) == null ? void 0 : y[
|
|
4040
|
+
return (((g = (y = r.config.schema) == null ? void 0 : y[p]) == null ? void 0 : g.values) ?? []).map(($) => ({
|
|
4028
4041
|
value: $,
|
|
4029
4042
|
label: $
|
|
4030
4043
|
}));
|
|
4031
|
-
},
|
|
4044
|
+
}, _ = (p) => {
|
|
4032
4045
|
var y, g;
|
|
4033
|
-
return ((g = (y = r.config.schema) == null ? void 0 : y[
|
|
4034
|
-
},
|
|
4046
|
+
return ((g = (y = r.config.schema) == null ? void 0 : y[p]) == null ? void 0 : g.type) ?? "text";
|
|
4047
|
+
}, N = (p) => {
|
|
4035
4048
|
o.value = {
|
|
4036
4049
|
...o.value,
|
|
4037
|
-
[
|
|
4038
|
-
},
|
|
4039
|
-
},
|
|
4040
|
-
o.value = {},
|
|
4041
|
-
},
|
|
4050
|
+
[p]: ""
|
|
4051
|
+
}, Z();
|
|
4052
|
+
}, k = () => {
|
|
4053
|
+
o.value = {}, Z(!0);
|
|
4054
|
+
}, Z = (p = !1) => {
|
|
4042
4055
|
const y = Object.keys(o.value).reduce((g, $) => (o.value[$] && (g[$] = `${o.value[$]}`), g), {});
|
|
4043
|
-
|
|
4056
|
+
p && (a.value = !1), i("update:modelValue", new URLSearchParams(y).toString());
|
|
4044
4057
|
};
|
|
4045
|
-
return (
|
|
4046
|
-
const g =
|
|
4047
|
-
return e.config.isExactMatch ? (
|
|
4058
|
+
return (p, y) => {
|
|
4059
|
+
const g = B("KInput"), $ = B("KButton"), F = B("KSelect");
|
|
4060
|
+
return e.config.isExactMatch ? (m(), M(g, {
|
|
4048
4061
|
key: 0,
|
|
4049
4062
|
autocomplete: "off",
|
|
4050
4063
|
class: "kong-ui-entity-filter-input",
|
|
4051
4064
|
"data-testid": "search-input",
|
|
4052
4065
|
"model-value": e.modelValue,
|
|
4053
4066
|
placeholder: e.config.placeholder,
|
|
4054
|
-
"onUpdate:modelValue":
|
|
4067
|
+
"onUpdate:modelValue": h
|
|
4055
4068
|
}, {
|
|
4056
4069
|
before: x(() => [
|
|
4057
|
-
|
|
4070
|
+
R(Ft)
|
|
4058
4071
|
]),
|
|
4059
4072
|
after: x(() => [
|
|
4060
|
-
me(
|
|
4073
|
+
me(R(E(qo), {
|
|
4061
4074
|
class: "kong-ui-entity-filter-clear",
|
|
4062
4075
|
onClick: f
|
|
4063
4076
|
}, null, 512), [
|
|
@@ -4065,15 +4078,15 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
4065
4078
|
])
|
|
4066
4079
|
]),
|
|
4067
4080
|
_: 1
|
|
4068
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
4069
|
-
|
|
4081
|
+
}, 8, ["model-value", "placeholder"])) : (m(), I("div", vl, [
|
|
4082
|
+
R($, {
|
|
4070
4083
|
appearance: "tertiary",
|
|
4071
4084
|
"data-testid": "filter-button",
|
|
4072
4085
|
onClick: d
|
|
4073
4086
|
}, {
|
|
4074
4087
|
default: x(() => [
|
|
4075
|
-
|
|
4076
|
-
V(" " + O(
|
|
4088
|
+
R(Ft),
|
|
4089
|
+
V(" " + O(E(n)("filter.filterButtonText")) + " " + O(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
4077
4090
|
]),
|
|
4078
4091
|
_: 1
|
|
4079
4092
|
}),
|
|
@@ -4084,89 +4097,89 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
4084
4097
|
[ge, a.value]
|
|
4085
4098
|
]),
|
|
4086
4099
|
me(L("div", bl, [
|
|
4087
|
-
(
|
|
4100
|
+
(m(!0), I(se, null, ae(u.value, (w) => {
|
|
4088
4101
|
var U, T;
|
|
4089
|
-
return
|
|
4090
|
-
key:
|
|
4102
|
+
return m(), I("div", {
|
|
4103
|
+
key: w.value,
|
|
4091
4104
|
class: "kong-ui-entity-filter-menu-item",
|
|
4092
|
-
"data-testid":
|
|
4105
|
+
"data-testid": w.value
|
|
4093
4106
|
}, [
|
|
4094
4107
|
L("span", {
|
|
4095
|
-
class: de(["menu-item-title", { expanded: l.value.has(
|
|
4108
|
+
class: de(["menu-item-title", { expanded: l.value.has(w.value) }]),
|
|
4096
4109
|
role: "button",
|
|
4097
4110
|
tabindex: "0",
|
|
4098
|
-
onClick: (
|
|
4099
|
-
onKeydown: Bn((
|
|
4111
|
+
onClick: (S) => c(w.value),
|
|
4112
|
+
onKeydown: Bn((S) => c(w.value), ["enter"])
|
|
4100
4113
|
}, [
|
|
4101
|
-
V(O(
|
|
4114
|
+
V(O(w.label) + " ", 1),
|
|
4102
4115
|
me(L("span", _l, null, 512), [
|
|
4103
|
-
[ge, s.value.includes(
|
|
4116
|
+
[ge, s.value.includes(w.value)]
|
|
4104
4117
|
]),
|
|
4105
|
-
|
|
4106
|
-
class: de(["menu-item-expand-icon", { expanded: l.value.has(
|
|
4107
|
-
color:
|
|
4118
|
+
R(E(Bo), {
|
|
4119
|
+
class: de(["menu-item-expand-icon", { expanded: l.value.has(w.value) }]),
|
|
4120
|
+
color: E(Ir)
|
|
4108
4121
|
}, null, 8, ["class", "color"])
|
|
4109
4122
|
], 42, Cl),
|
|
4110
4123
|
me(L("div", kl, [
|
|
4111
4124
|
L("label", {
|
|
4112
4125
|
class: "menu-item-label",
|
|
4113
|
-
for:
|
|
4114
|
-
}, O(
|
|
4115
|
-
((T = (U = e.config.schema) == null ? void 0 : U[
|
|
4126
|
+
for: v(w.value)
|
|
4127
|
+
}, O(E(n)("filter.fieldLabel")), 9, wl),
|
|
4128
|
+
((T = (U = e.config.schema) == null ? void 0 : U[w.value]) == null ? void 0 : T.type) === "select" ? (m(), M(F, {
|
|
4116
4129
|
key: 0,
|
|
4117
|
-
id:
|
|
4118
|
-
modelValue: o.value[
|
|
4119
|
-
"onUpdate:modelValue": (
|
|
4120
|
-
items:
|
|
4121
|
-
placeholder:
|
|
4122
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
4130
|
+
id: v(w.value),
|
|
4131
|
+
modelValue: o.value[w.value],
|
|
4132
|
+
"onUpdate:modelValue": (S) => o.value[w.value] = S,
|
|
4133
|
+
items: b(w.value),
|
|
4134
|
+
placeholder: E(n)("filter.selectPlaceholder")
|
|
4135
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), M(g, {
|
|
4123
4136
|
key: 1,
|
|
4124
|
-
id:
|
|
4125
|
-
modelValue: o.value[
|
|
4126
|
-
"onUpdate:modelValue": (
|
|
4137
|
+
id: v(w.value),
|
|
4138
|
+
modelValue: o.value[w.value],
|
|
4139
|
+
"onUpdate:modelValue": (S) => o.value[w.value] = S,
|
|
4127
4140
|
autocomplete: "off",
|
|
4128
|
-
placeholder:
|
|
4129
|
-
type: w
|
|
4141
|
+
placeholder: E(n)("filter.inputPlaceholder"),
|
|
4142
|
+
type: _(w.value)
|
|
4130
4143
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4131
4144
|
], 512), [
|
|
4132
|
-
[ge, l.value.has(
|
|
4145
|
+
[ge, l.value.has(w.value)]
|
|
4133
4146
|
]),
|
|
4134
4147
|
me(L("div", Al, [
|
|
4135
|
-
|
|
4148
|
+
R($, {
|
|
4136
4149
|
appearance: "tertiary",
|
|
4137
4150
|
"data-testid": "apply-filter",
|
|
4138
4151
|
size: "small",
|
|
4139
|
-
onClick: y[0] || (y[0] = (
|
|
4152
|
+
onClick: y[0] || (y[0] = (S) => Z(!0))
|
|
4140
4153
|
}, {
|
|
4141
4154
|
default: x(() => [
|
|
4142
|
-
V(O(
|
|
4155
|
+
V(O(E(n)("filter.applyButtonText")), 1)
|
|
4143
4156
|
]),
|
|
4144
4157
|
_: 1
|
|
4145
4158
|
}),
|
|
4146
|
-
|
|
4159
|
+
R($, {
|
|
4147
4160
|
appearance: "tertiary",
|
|
4148
4161
|
"data-testid": "clear-filter",
|
|
4149
4162
|
size: "small",
|
|
4150
|
-
onClick: (
|
|
4163
|
+
onClick: (S) => N(w.value)
|
|
4151
4164
|
}, {
|
|
4152
4165
|
default: x(() => [
|
|
4153
|
-
V(O(
|
|
4166
|
+
V(O(E(n)("filter.clearButtonText")), 1)
|
|
4154
4167
|
]),
|
|
4155
4168
|
_: 2
|
|
4156
4169
|
}, 1032, ["onClick"])
|
|
4157
4170
|
], 512), [
|
|
4158
|
-
[ge, l.value.has(
|
|
4171
|
+
[ge, l.value.has(w.value)]
|
|
4159
4172
|
])
|
|
4160
4173
|
], 8, xl);
|
|
4161
4174
|
}), 128)),
|
|
4162
4175
|
L("div", Sl, [
|
|
4163
|
-
|
|
4176
|
+
R($, {
|
|
4164
4177
|
appearance: "tertiary",
|
|
4165
4178
|
size: "small",
|
|
4166
|
-
onClick:
|
|
4179
|
+
onClick: k
|
|
4167
4180
|
}, {
|
|
4168
4181
|
default: x(() => [
|
|
4169
|
-
V(O(
|
|
4182
|
+
V(O(E(n)("filter.clearAllButtonText")), 1)
|
|
4170
4183
|
]),
|
|
4171
4184
|
_: 1
|
|
4172
4185
|
})
|
|
@@ -4177,7 +4190,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
4177
4190
|
]));
|
|
4178
4191
|
};
|
|
4179
4192
|
}
|
|
4180
|
-
}), Xl = /* @__PURE__ */ ie(Il, [["__scopeId", "data-v-
|
|
4193
|
+
}), Xl = /* @__PURE__ */ ie(Il, [["__scopeId", "data-v-9a370e3a"]]), es = /* @__PURE__ */ H({
|
|
4181
4194
|
__name: "EntityToggleModal",
|
|
4182
4195
|
props: {
|
|
4183
4196
|
visible: {
|
|
@@ -4209,9 +4222,9 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
4209
4222
|
},
|
|
4210
4223
|
emits: ["cancel", "proceed"],
|
|
4211
4224
|
setup(e, { emit: t }) {
|
|
4212
|
-
const { i18n: { t: n }, i18nT: r } = z.useI18n(), i = e, a = t, o =
|
|
4225
|
+
const { i18n: { t: n }, i18nT: r } = z.useI18n(), i = e, a = t, o = K(!1), l = A(
|
|
4213
4226
|
() => i.action === "enable" ? n("toggleModal.enable.title", { entityType: i.entityType }) : n("toggleModal.disable.title", { entityType: i.entityType })
|
|
4214
|
-
), s =
|
|
4227
|
+
), s = A(
|
|
4215
4228
|
() => i.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
4216
4229
|
), u = () => a("cancel"), d = async () => {
|
|
4217
4230
|
if (i.onConfirm) {
|
|
@@ -4225,10 +4238,10 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
4225
4238
|
}
|
|
4226
4239
|
}
|
|
4227
4240
|
};
|
|
4228
|
-
return (c,
|
|
4229
|
-
const f =
|
|
4230
|
-
return
|
|
4231
|
-
|
|
4241
|
+
return (c, h) => {
|
|
4242
|
+
const f = B("KPrompt");
|
|
4243
|
+
return m(), M(Kn, { to: "body" }, [
|
|
4244
|
+
R(f, {
|
|
4232
4245
|
"action-button-disabled": o.value,
|
|
4233
4246
|
"action-button-text": s.value,
|
|
4234
4247
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
@@ -4238,7 +4251,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
4238
4251
|
onProceed: d
|
|
4239
4252
|
}, {
|
|
4240
4253
|
default: x(() => [
|
|
4241
|
-
|
|
4254
|
+
R(E(r), {
|
|
4242
4255
|
keypath: `toggleModal.${i.action}.message`,
|
|
4243
4256
|
scope: "global"
|
|
4244
4257
|
}, {
|
|
@@ -4278,7 +4291,7 @@ const po = { class: "yaml-config" }, Tn = /* @__PURE__ */ H({
|
|
|
4278
4291
|
}
|
|
4279
4292
|
},
|
|
4280
4293
|
setup(e) {
|
|
4281
|
-
const t = e, n =
|
|
4294
|
+
const t = e, n = K(void 0), r = A(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4282
4295
|
return Ae(() => t.authFunction, async () => {
|
|
4283
4296
|
n.value = await t.authFunction();
|
|
4284
4297
|
}, { immediate: !0 }), (i, a) => r.value ? Y(i.$slots, "default", {
|
|
@@ -4294,11 +4307,11 @@ function Tl() {
|
|
|
4294
4307
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
4295
4308
|
return Re(El);
|
|
4296
4309
|
}
|
|
4297
|
-
const
|
|
4310
|
+
const Q = [];
|
|
4298
4311
|
for (let e = 0; e < 256; ++e)
|
|
4299
|
-
|
|
4312
|
+
Q.push((e + 256).toString(16).slice(1));
|
|
4300
4313
|
function Fl(e, t = 0) {
|
|
4301
|
-
return
|
|
4314
|
+
return Q[e[t + 0]] + Q[e[t + 1]] + Q[e[t + 2]] + Q[e[t + 3]] + "-" + Q[e[t + 4]] + Q[e[t + 5]] + "-" + Q[e[t + 6]] + Q[e[t + 7]] + "-" + Q[e[t + 8]] + Q[e[t + 9]] + "-" + Q[e[t + 10]] + Q[e[t + 11]] + Q[e[t + 12]] + Q[e[t + 13]] + Q[e[t + 14]] + Q[e[t + 15]];
|
|
4302
4315
|
}
|
|
4303
4316
|
const Ol = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ot = {
|
|
4304
4317
|
randomUUID: Ol
|
|
@@ -4352,19 +4365,19 @@ const Ll = ["aria-labelledby"], Nl = { class: "form-section-wrapper" }, Rl = {
|
|
|
4352
4365
|
},
|
|
4353
4366
|
setup(e) {
|
|
4354
4367
|
const t = Xe(), n = $l();
|
|
4355
|
-
return (r, i) => (
|
|
4356
|
-
"aria-labelledby": e.title ?
|
|
4368
|
+
return (r, i) => (m(), I("div", {
|
|
4369
|
+
"aria-labelledby": e.title ? E(n) : void 0,
|
|
4357
4370
|
class: de(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4358
4371
|
role: "group"
|
|
4359
4372
|
}, [
|
|
4360
4373
|
L("div", Nl, [
|
|
4361
|
-
e.hideInfoHeader ? D("", !0) : (
|
|
4374
|
+
e.hideInfoHeader ? D("", !0) : (m(), I("div", {
|
|
4362
4375
|
key: 0,
|
|
4363
4376
|
class: de(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4364
4377
|
}, [
|
|
4365
|
-
e.title ? (
|
|
4378
|
+
e.title ? (m(), M(pe(e.titleTag), {
|
|
4366
4379
|
key: 0,
|
|
4367
|
-
id:
|
|
4380
|
+
id: E(n),
|
|
4368
4381
|
class: "form-section-title"
|
|
4369
4382
|
}, {
|
|
4370
4383
|
default: x(() => [
|
|
@@ -4372,12 +4385,12 @@ const Ll = ["aria-labelledby"], Nl = { class: "form-section-wrapper" }, Rl = {
|
|
|
4372
4385
|
]),
|
|
4373
4386
|
_: 1
|
|
4374
4387
|
}, 8, ["id"])) : D("", !0),
|
|
4375
|
-
e.description ||
|
|
4388
|
+
e.description || E(t).description ? (m(), I("div", Rl, [
|
|
4376
4389
|
Y(r.$slots, "description", {}, () => [
|
|
4377
4390
|
L("p", null, O(e.description), 1)
|
|
4378
4391
|
], !0)
|
|
4379
4392
|
])) : D("", !0),
|
|
4380
|
-
|
|
4393
|
+
E(t).footer ? (m(), I("div", Bl, [
|
|
4381
4394
|
Y(r.$slots, "footer", {}, void 0, !0)
|
|
4382
4395
|
])) : D("", !0)
|
|
4383
4396
|
], 2)),
|
|
@@ -4387,7 +4400,7 @@ const Ll = ["aria-labelledby"], Nl = { class: "form-section-wrapper" }, Rl = {
|
|
|
4387
4400
|
])
|
|
4388
4401
|
], 10, Ll));
|
|
4389
4402
|
}
|
|
4390
|
-
}), ns = /* @__PURE__ */ ie(Ml, [["__scopeId", "data-v-
|
|
4403
|
+
}), ns = /* @__PURE__ */ ie(Ml, [["__scopeId", "data-v-b1f74200"]]), Dl = {
|
|
4391
4404
|
class: "kong-ui-public-entity-link",
|
|
4392
4405
|
"data-testid": "entity-link-parent"
|
|
4393
4406
|
}, Ul = {
|
|
@@ -4417,10 +4430,10 @@ const Ll = ["aria-labelledby"], Nl = { class: "form-section-wrapper" }, Rl = {
|
|
|
4417
4430
|
}
|
|
4418
4431
|
},
|
|
4419
4432
|
setup(e) {
|
|
4420
|
-
const t = e, n =
|
|
4433
|
+
const t = e, n = K(), { isTruncated: r } = z.useTruncationDetector(n), { i18n: { t: i } } = z.useI18n(), a = i("global.actions.copyId"), o = K(a), l = A(() => t.entityLinkData.deleted ?? !1), s = A(() => {
|
|
4421
4434
|
var c;
|
|
4422
4435
|
return (c = t.entityLinkData.id) != null && c.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4423
|
-
}), u =
|
|
4436
|
+
}), u = A(() => {
|
|
4424
4437
|
var c;
|
|
4425
4438
|
return `${(c = s.value) == null ? void 0 : c.toString().slice(0, 5)} (deleted)`;
|
|
4426
4439
|
}), d = async (c) => {
|
|
@@ -4428,10 +4441,10 @@ const Ll = ["aria-labelledby"], Nl = { class: "form-section-wrapper" }, Rl = {
|
|
|
4428
4441
|
o.value = a;
|
|
4429
4442
|
}, 1800));
|
|
4430
4443
|
};
|
|
4431
|
-
return (c,
|
|
4432
|
-
const f =
|
|
4433
|
-
return
|
|
4434
|
-
l.value ? (
|
|
4444
|
+
return (c, h) => {
|
|
4445
|
+
const f = B("KTooltip"), v = B("KExternalLink"), b = B("KClipboardProvider");
|
|
4446
|
+
return m(), I("div", Dl, [
|
|
4447
|
+
l.value ? (m(), I("div", Ul, O(u.value), 1)) : s.value ? s.value ? (m(), M(v, {
|
|
4435
4448
|
key: 2,
|
|
4436
4449
|
class: "entity-link",
|
|
4437
4450
|
"hide-icon": !e.newWindow,
|
|
@@ -4439,8 +4452,8 @@ const Ll = ["aria-labelledby"], Nl = { class: "form-section-wrapper" }, Rl = {
|
|
|
4439
4452
|
target: e.newWindow ? "_blank" : "_self"
|
|
4440
4453
|
}, {
|
|
4441
4454
|
default: x(() => [
|
|
4442
|
-
|
|
4443
|
-
text:
|
|
4455
|
+
R(f, {
|
|
4456
|
+
text: E(r) && e.entityLinkData.label || ""
|
|
4444
4457
|
}, {
|
|
4445
4458
|
default: x(() => [
|
|
4446
4459
|
L("span", {
|
|
@@ -4453,8 +4466,8 @@ const Ll = ["aria-labelledby"], Nl = { class: "form-section-wrapper" }, Rl = {
|
|
|
4453
4466
|
}, 8, ["text"])
|
|
4454
4467
|
]),
|
|
4455
4468
|
_: 1
|
|
4456
|
-
}, 8, ["hide-icon", "href", "target"])) : D("", !0) : (
|
|
4457
|
-
s.value && e.allowCopy ? (
|
|
4469
|
+
}, 8, ["hide-icon", "href", "target"])) : D("", !0) : (m(), I("div", jl, O(" – "))),
|
|
4470
|
+
s.value && e.allowCopy ? (m(), M(f, {
|
|
4458
4471
|
key: o.value,
|
|
4459
4472
|
class: "copy-uuid-tooltip",
|
|
4460
4473
|
"max-width": "160",
|
|
@@ -4462,17 +4475,17 @@ const Ll = ["aria-labelledby"], Nl = { class: "form-section-wrapper" }, Rl = {
|
|
|
4462
4475
|
text: o.value
|
|
4463
4476
|
}, {
|
|
4464
4477
|
default: x(() => [
|
|
4465
|
-
|
|
4466
|
-
default: x(({ copyToClipboard:
|
|
4478
|
+
R(b, null, {
|
|
4479
|
+
default: x(({ copyToClipboard: _ }) => [
|
|
4467
4480
|
L("span", {
|
|
4468
4481
|
class: "entity-link-copy-id",
|
|
4469
|
-
onClick: ze((
|
|
4482
|
+
onClick: ze((N) => d(_), ["stop"])
|
|
4470
4483
|
}, [
|
|
4471
|
-
|
|
4484
|
+
R(E(Wo), {
|
|
4472
4485
|
class: "copy-icon",
|
|
4473
|
-
color:
|
|
4486
|
+
color: E(Er),
|
|
4474
4487
|
"data-testid": "copy-id",
|
|
4475
|
-
size:
|
|
4488
|
+
size: E(Fr)
|
|
4476
4489
|
}, null, 8, ["color", "size"])
|
|
4477
4490
|
], 8, ql)
|
|
4478
4491
|
]),
|