@kong-ui-public/entities-shared 2.12.10 → 2.12.11-pr.1301.ca8c76fe.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 +364 -366
- package/dist/entities-shared.umd.js +18 -18
- package/dist/style.css +1 -1
- package/dist/types/components/entity-base-config-card/EntityBaseConfigCard.vue.d.ts.map +1 -1
- package/dist/types/components/entity-base-form/EntityBaseForm.vue.d.ts +15 -0
- package/dist/types/components/entity-base-form/EntityBaseForm.vue.d.ts.map +1 -1
- package/dist/types/composables/useDebouncedFilter.d.ts.map +1 -1
- package/dist/types/composables/useFetcher.d.ts.map +1 -1
- package/dist/types/types/app-config.d.ts +1 -3
- package/dist/types/types/app-config.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject as In, ref as R, unref as I, computed as
|
|
1
|
+
import { inject as In, ref as R, unref as I, computed as k, watch as Ae, defineComponent as H, openBlock as h, createBlock as K, resolveDynamicComponent as fe, normalizeClass as ue, withCtx as x, createElementBlock as S, createElementVNode as L, toDisplayString as O, createCommentVNode as D, Fragment as le, renderList as ie, resolveComponent as B, createVNode as N, createTextVNode as V, useCssVars as Tt, useSlots as Ze, renderSlot as Y, createSlots as _e, normalizeProps as En, guardReactiveProps as Tn, mergeProps as Fn, normalizeStyle as Fe, pushScopeId as Oe, popScopeId as $e, onBeforeMount as Ft, withModifiers as Ve, onMounted as On, onUnmounted as $n, withDirectives as he, vShow as me, withKeys as Ln, Teleport as Nn } from "vue";
|
|
2
2
|
import ot from "axios";
|
|
3
3
|
import { createI18n as Bn, i18nTComponent as Rn } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as Kn } from "@kong/kongponents";
|
|
@@ -247,17 +247,15 @@ function nr(e, t, n, r = {
|
|
|
247
247
|
searchKeys: ["id"]
|
|
248
248
|
}) {
|
|
249
249
|
n || (n = "1000");
|
|
250
|
-
const { axiosInstance: i } = Qe({
|
|
251
|
-
headers: e.requestHeaders
|
|
252
|
-
}), { i18n: { t: a } } = De(), { debounce: o } = qn(), l = o(async (m) => {
|
|
250
|
+
const { axiosInstance: i } = Qe(e.axiosRequestConfig), { i18n: { t: a } } = De(), { debounce: o } = qn(), l = o(async (m) => {
|
|
253
251
|
await ee(m);
|
|
254
252
|
}, 200), s = R(!1), u = R(""), d = R(""), c = R([]), p = R([]), f = R(void 0), b = I(t);
|
|
255
|
-
let
|
|
256
|
-
e.app === "konnect" ?
|
|
257
|
-
const { isValidUuid:
|
|
253
|
+
let v = `${e.apiBaseUrl}${b}`;
|
|
254
|
+
e.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
255
|
+
const { isValidUuid: A } = Ot(), M = async () => {
|
|
258
256
|
try {
|
|
259
257
|
s.value = !0;
|
|
260
|
-
const { data: m } = await i.get(`${
|
|
258
|
+
const { data: m } = await i.get(`${v}?size=${n}`);
|
|
261
259
|
m != null && m.next || (f.value = r.fetchedItemsKey in m ? m[r.fetchedItemsKey] : []), p.value = r.fetchedItemsKey in m ? m[r.fetchedItemsKey] : [], c.value = p.value;
|
|
262
260
|
} catch {
|
|
263
261
|
c.value = [], u.value = a("debouncedFilter.errors.fetch");
|
|
@@ -265,28 +263,28 @@ function nr(e, t, n, r = {
|
|
|
265
263
|
s.value = !1;
|
|
266
264
|
}
|
|
267
265
|
}, E = R(""), ee = async (m) => {
|
|
268
|
-
var
|
|
266
|
+
var y, g, $;
|
|
269
267
|
if (E.value !== m)
|
|
270
268
|
if (E.value = m || "", f.value === void 0)
|
|
271
269
|
try {
|
|
272
270
|
if (s.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
273
|
-
let F =
|
|
271
|
+
let F = v + "";
|
|
274
272
|
m && (F += `/${m}`);
|
|
275
|
-
const { data:
|
|
276
|
-
r.fetchedItemsKey in
|
|
273
|
+
const { data: _ } = await i.get(`${F}?size=${n}`);
|
|
274
|
+
r.fetchedItemsKey in _ ? c.value = _[r.fetchedItemsKey] : _ != null && _.id ? c.value = [_] : c.value = [];
|
|
277
275
|
} else if (m) {
|
|
278
276
|
const F = [];
|
|
279
|
-
|
|
280
|
-
const { data: T } = await i.get(`${
|
|
277
|
+
A(m) && r.searchKeys.includes("id") ? F.push((async () => {
|
|
278
|
+
const { data: T } = await i.get(`${v}/${m}`);
|
|
281
279
|
return [T[r.fetchedItemsKey] ?? T];
|
|
282
280
|
})()) : F.push(
|
|
283
281
|
...r.searchKeys.filter((T) => T !== "id").map(async (T) => {
|
|
284
|
-
const { data: w } = await i.get(`${
|
|
282
|
+
const { data: w } = await i.get(`${v}?${T}=${m}`);
|
|
285
283
|
return w[r.fetchedItemsKey];
|
|
286
284
|
})
|
|
287
285
|
);
|
|
288
|
-
const
|
|
289
|
-
c.value = [], (
|
|
286
|
+
const _ = await Promise.all(F), j = /* @__PURE__ */ new Set();
|
|
287
|
+
c.value = [], (y = _ == null ? void 0 : _.forEach) == null || y.call(_, (T) => {
|
|
290
288
|
var w;
|
|
291
289
|
(w = T == null ? void 0 : T.forEach) == null || w.call(T, (U) => {
|
|
292
290
|
j.has(U.id) || (j.add(U.id), c.value.push(U));
|
|
@@ -295,19 +293,19 @@ function nr(e, t, n, r = {
|
|
|
295
293
|
} else
|
|
296
294
|
c.value = p.value;
|
|
297
295
|
} catch (F) {
|
|
298
|
-
((
|
|
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"));
|
|
299
297
|
} finally {
|
|
300
298
|
s.value = !1;
|
|
301
299
|
}
|
|
302
300
|
else
|
|
303
301
|
s.value = !0, d.value = "", m ? (c.value = ($ = f.value) == null ? void 0 : $.filter((F) => {
|
|
304
302
|
var j;
|
|
305
|
-
let
|
|
303
|
+
let _ = !1;
|
|
306
304
|
for (const T of r.searchKeys) {
|
|
307
305
|
const w = typeof F[T] == "string" ? (j = F[T]) == null ? void 0 : j.toLowerCase() : F[T];
|
|
308
|
-
w != null && w.includes(m.toLowerCase()) && (
|
|
306
|
+
w != null && w.includes(m.toLowerCase()) && (_ = !0);
|
|
309
307
|
}
|
|
310
|
-
return
|
|
308
|
+
return _;
|
|
311
309
|
}), (!c.value || !c.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : c.value = f.value, s.value = !1;
|
|
312
310
|
};
|
|
313
311
|
return {
|
|
@@ -321,7 +319,7 @@ function nr(e, t, n, r = {
|
|
|
321
319
|
};
|
|
322
320
|
}
|
|
323
321
|
function rr(e, t) {
|
|
324
|
-
const n = I(t), r =
|
|
322
|
+
const n = I(t), r = k(
|
|
325
323
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
326
324
|
);
|
|
327
325
|
return r.value.search = "", (i) => `${r.value.href}/${i}`;
|
|
@@ -368,17 +366,17 @@ function ar(e) {
|
|
|
368
366
|
}
|
|
369
367
|
}
|
|
370
368
|
function $t(e, t) {
|
|
371
|
-
const n = R(I(e)), r = R(I(t)), i =
|
|
369
|
+
const n = R(I(e)), r = R(I(t)), i = k(
|
|
372
370
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
373
|
-
), a =
|
|
371
|
+
), a = k(
|
|
374
372
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
375
373
|
);
|
|
376
374
|
return (o) => {
|
|
377
375
|
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query: p } = o;
|
|
378
376
|
try {
|
|
379
377
|
let f = new URL(a.value.href);
|
|
380
|
-
return i.value && p ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${p}/`) : new URL(`${f.href}?filter[name][contains]=${p}`)) : (i.value || new URLSearchParams(p).forEach((b,
|
|
381
|
-
f.searchParams.append(
|
|
378
|
+
return i.value && p ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${p}/`) : new URL(`${f.href}?filter[name][contains]=${p}`)) : (i.value || new URLSearchParams(p).forEach((b, v) => {
|
|
379
|
+
f.searchParams.append(v, b);
|
|
382
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;
|
|
383
381
|
} catch (f) {
|
|
384
382
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
@@ -386,52 +384,48 @@ function $t(e, t) {
|
|
|
386
384
|
};
|
|
387
385
|
}
|
|
388
386
|
function or(e, t, n = "data") {
|
|
389
|
-
|
|
390
|
-
const r = I(t), { axiosInstance: i } = Qe({
|
|
391
|
-
...e.axiosRequestConfig,
|
|
392
|
-
headers: { ...(s = e.axiosRequestConfig) == null ? void 0 : s.headers, ...e.requestHeaders }
|
|
393
|
-
}), a = $t(e, r), o = R({
|
|
387
|
+
const r = I(t), { axiosInstance: i } = Qe(e.axiosRequestConfig), a = $t(e, r), o = R({
|
|
394
388
|
status: ve.Idle
|
|
395
389
|
});
|
|
396
|
-
return { fetcher: async (
|
|
397
|
-
var
|
|
390
|
+
return { fetcher: async (s) => {
|
|
391
|
+
var u;
|
|
398
392
|
try {
|
|
399
393
|
o.value = { status: ve.Loading };
|
|
400
|
-
let
|
|
401
|
-
|
|
402
|
-
const
|
|
403
|
-
if (
|
|
404
|
-
throw
|
|
405
|
-
const
|
|
406
|
-
let
|
|
407
|
-
f
|
|
408
|
-
const
|
|
409
|
-
data:
|
|
410
|
-
total:
|
|
411
|
-
...
|
|
394
|
+
let d = a(s);
|
|
395
|
+
d.includes("filter[name]") && (d = `${d}&page[size]=${s.pageSize}&page[number]=${s.page}`);
|
|
396
|
+
const c = await i.get(d);
|
|
397
|
+
if (c.status >= 400)
|
|
398
|
+
throw c;
|
|
399
|
+
const p = c.data, f = n && n.replace(/[^\w-_]/gi, "");
|
|
400
|
+
let b;
|
|
401
|
+
p[f] && Array.isArray(p[f]) ? b = p[f] : Array.isArray(p) ? b = p : b = Object.keys(p).length ? [p] : [];
|
|
402
|
+
const v = {
|
|
403
|
+
data: b,
|
|
404
|
+
total: b.length,
|
|
405
|
+
...p.offset ? {
|
|
412
406
|
pagination: {
|
|
413
|
-
offset:
|
|
407
|
+
offset: p.offset
|
|
414
408
|
}
|
|
415
409
|
} : null
|
|
416
410
|
};
|
|
417
411
|
return o.value = {
|
|
418
412
|
status: ve.Idle,
|
|
419
|
-
response:
|
|
420
|
-
},
|
|
421
|
-
} catch (
|
|
422
|
-
const
|
|
413
|
+
response: v
|
|
414
|
+
}, v;
|
|
415
|
+
} catch (d) {
|
|
416
|
+
const c = {
|
|
423
417
|
data: [],
|
|
424
418
|
total: 0
|
|
425
419
|
};
|
|
426
|
-
return
|
|
420
|
+
return s.query && (((u = d.response) == null ? void 0 : u.status) === 404 || d.status === 404) ? (o.value = {
|
|
427
421
|
status: ve.NoResults,
|
|
428
|
-
response:
|
|
429
|
-
error:
|
|
430
|
-
},
|
|
422
|
+
response: c,
|
|
423
|
+
error: d.response ? d : { response: d }
|
|
424
|
+
}, c) : (o.value = {
|
|
431
425
|
status: ve.Error,
|
|
432
|
-
response:
|
|
433
|
-
error:
|
|
434
|
-
},
|
|
426
|
+
response: c,
|
|
427
|
+
error: d.response ? d : { response: d }
|
|
428
|
+
}, c);
|
|
435
429
|
}
|
|
436
430
|
}, fetcherState: o };
|
|
437
431
|
}
|
|
@@ -502,7 +496,7 @@ function hr(e) {
|
|
|
502
496
|
return Ae(e, (a) => {
|
|
503
497
|
a && !r.value && (t.value = a.offsetWidth, n.value = a.scrollWidth, r.value = !0);
|
|
504
498
|
}), {
|
|
505
|
-
isTruncated:
|
|
499
|
+
isTruncated: k(() => t.value < n.value)
|
|
506
500
|
};
|
|
507
501
|
}
|
|
508
502
|
function mr() {
|
|
@@ -545,10 +539,10 @@ const z = {
|
|
|
545
539
|
}
|
|
546
540
|
},
|
|
547
541
|
setup(e) {
|
|
548
|
-
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 = k(() => t.item.key ?? "json-array-item"), a = k(() => t.item.value ?? t.item), o = k(() => {
|
|
549
543
|
const s = JSON.parse(JSON.stringify(a.value));
|
|
550
544
|
return t.isArrayItem && delete s.name, s;
|
|
551
|
-
}), l =
|
|
545
|
+
}), l = k(() => {
|
|
552
546
|
var s;
|
|
553
547
|
return t.isArrayItem ? (s = a.value) != null && s.name ? r(a.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
554
548
|
});
|
|
@@ -654,7 +648,7 @@ const z = {
|
|
|
654
648
|
"5036b738": u.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
655
649
|
"5038fd13": u.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
656
650
|
}));
|
|
657
|
-
const n = e, r = t, i = Ze(), { i18n: { t: a, formatUnixTimeStamp: o } } = z.useI18n(), l =
|
|
651
|
+
const n = e, r = t, i = Ze(), { i18n: { t: a, formatUnixTimeStamp: o } } = z.useI18n(), l = k(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), s = k(() => !!(n.item.tooltip || i["label-tooltip"])), u = k(() => n.item.type === P.Json || n.item.type === P.JsonArray), d = k(() => n.item.type === P.JsonArray), c = k(() => {
|
|
658
652
|
switch (n.item.type) {
|
|
659
653
|
case P.ID:
|
|
660
654
|
return {
|
|
@@ -765,15 +759,15 @@ const z = {
|
|
|
765
759
|
};
|
|
766
760
|
}
|
|
767
761
|
}), p = R(), { isTruncated: f } = z.useTruncationDetector(p);
|
|
768
|
-
return (b,
|
|
769
|
-
const
|
|
762
|
+
return (b, v) => {
|
|
763
|
+
const A = B("KLabel"), M = B("KBadge"), E = B("KCopy"), ee = B("KTooltip");
|
|
770
764
|
return h(), S("div", Tr, [
|
|
771
765
|
L("div", {
|
|
772
766
|
class: "config-card-details-label",
|
|
773
767
|
"data-testid": `${e.item.key}-label`
|
|
774
768
|
}, [
|
|
775
769
|
Y(b.$slots, "label", { item: e.item }, () => [
|
|
776
|
-
N(
|
|
770
|
+
N(A, { "tooltip-attributes": { maxWidth: "500px" } }, _e({
|
|
777
771
|
default: x(() => [
|
|
778
772
|
V(O(e.item.label) + " ", 1)
|
|
779
773
|
]),
|
|
@@ -809,10 +803,10 @@ const z = {
|
|
|
809
803
|
key: 0,
|
|
810
804
|
"data-testid": `${e.item.key}-badge-tags`
|
|
811
805
|
}, [
|
|
812
|
-
(h(!0), S(le, null, ie(e.item.value, (m,
|
|
813
|
-
key: `${e.item.key}-badge-tag-${
|
|
806
|
+
(h(!0), S(le, null, ie(e.item.value, (m, y) => (h(), K(M, {
|
|
807
|
+
key: `${e.item.key}-badge-tag-${y}`,
|
|
814
808
|
class: "config-badge",
|
|
815
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
809
|
+
"data-testid": `${e.item.key}-badge-tag-${y}`,
|
|
816
810
|
tooltip: m,
|
|
817
811
|
"truncation-tooltip": ""
|
|
818
812
|
}, {
|
|
@@ -827,9 +821,9 @@ const z = {
|
|
|
827
821
|
class: "copy-uuid-array",
|
|
828
822
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
829
823
|
}, [
|
|
830
|
-
(h(!0), S(le, null, ie(e.item.value, (m,
|
|
831
|
-
key: `${e.item.key}-copy-uuid-${
|
|
832
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
824
|
+
(h(!0), S(le, null, ie(e.item.value, (m, y) => (h(), K(E, Fn(c.value.childAttrs, {
|
|
825
|
+
key: `${e.item.key}-copy-uuid-${y}`,
|
|
826
|
+
"data-testid": `${e.item.key}-copy-uuid-${y}`,
|
|
833
827
|
text: m
|
|
834
828
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
835
829
|
], 8, Rr)) : c.value.additionalComponent === "KMethodBadge" ? (h(), S("div", {
|
|
@@ -837,11 +831,11 @@ const z = {
|
|
|
837
831
|
class: "method-badge-array",
|
|
838
832
|
"data-testid": `${e.item.key}-badge-methods`
|
|
839
833
|
}, [
|
|
840
|
-
(h(!0), S(le, null, ie(e.item.value, (m,
|
|
841
|
-
key: `${e.item.key}-badge-method-${
|
|
834
|
+
(h(!0), S(le, null, ie(e.item.value, (m, y) => (h(), K(M, {
|
|
835
|
+
key: `${e.item.key}-badge-method-${y}`,
|
|
842
836
|
appearance: Object.values(I(Kn)).includes(m.toLowerCase()) ? m.toLowerCase() : "custom",
|
|
843
837
|
class: "config-badge",
|
|
844
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
838
|
+
"data-testid": `${e.item.key}-badge-method-${y}`
|
|
845
839
|
}, {
|
|
846
840
|
default: x(() => [
|
|
847
841
|
V(O(m), 1)
|
|
@@ -853,9 +847,9 @@ const z = {
|
|
|
853
847
|
key: 3,
|
|
854
848
|
"data-testid": `${n.item.key}-json-array-content`
|
|
855
849
|
}, [
|
|
856
|
-
(h(!0), S(le, null, ie(e.item.value, (m,
|
|
857
|
-
key: `json-array-item-${
|
|
858
|
-
index:
|
|
850
|
+
(h(!0), S(le, null, ie(e.item.value, (m, y) => (h(), K(Bt, {
|
|
851
|
+
key: `json-array-item-${y}`,
|
|
852
|
+
index: y,
|
|
859
853
|
"is-array-item": "",
|
|
860
854
|
item: m
|
|
861
855
|
}, null, 8, ["index", "item"]))), 128))
|
|
@@ -918,7 +912,7 @@ const z = {
|
|
|
918
912
|
Tt((i) => ({
|
|
919
913
|
"954d3eca": `${r.value}ch`
|
|
920
914
|
}));
|
|
921
|
-
const t = e, n =
|
|
915
|
+
const t = e, n = k(() => t.jsonRecord), r = k(() => {
|
|
922
916
|
var o;
|
|
923
917
|
if (!t.fetcherUrl)
|
|
924
918
|
return 0;
|
|
@@ -1750,7 +1744,7 @@ function ea(e, t) {
|
|
|
1750
1744
|
C(e, "unexpected end of the stream within a double quoted scalar");
|
|
1751
1745
|
}
|
|
1752
1746
|
function ta(e, t) {
|
|
1753
|
-
var n = !0, r, i, a, o = e.tag, l, s = e.anchor, u, d, c, p, f, b = /* @__PURE__ */ Object.create(null),
|
|
1747
|
+
var n = !0, r, i, a, o = e.tag, l, s = e.anchor, u, d, c, p, f, b = /* @__PURE__ */ Object.create(null), v, A, M, E;
|
|
1754
1748
|
if (E = e.input.charCodeAt(e.position), E === 91)
|
|
1755
1749
|
d = 93, f = !1, l = [];
|
|
1756
1750
|
else if (E === 123)
|
|
@@ -1760,7 +1754,7 @@ function ta(e, t) {
|
|
|
1760
1754
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), E = e.input.charCodeAt(++e.position); E !== 0; ) {
|
|
1761
1755
|
if (W(e, !0, t), E = e.input.charCodeAt(e.position), E === d)
|
|
1762
1756
|
return e.position++, e.tag = o, e.anchor = s, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1763
|
-
n ? E === 44 && C(e, "expected the node content, but found ','") : C(e, "missed comma between flow collection entries"),
|
|
1757
|
+
n ? E === 44 && C(e, "expected the node content, but found ','") : C(e, "missed comma between flow collection entries"), A = v = M = null, c = p = !1, E === 63 && (u = e.input.charCodeAt(e.position + 1), te(u) && (c = p = !0, e.position++, W(e, !0, t))), r = e.line, i = e.lineStart, a = e.position, ke(e, t, Ne, !1, !0), A = e.tag, v = e.result, W(e, !0, t), E = e.input.charCodeAt(e.position), (p || e.line === r) && E === 58 && (c = !0, E = e.input.charCodeAt(++e.position), W(e, !0, t), ke(e, t, Ne, !1, !0), M = e.result), f ? Ce(e, l, b, A, v, M, r, i, a) : c ? l.push(Ce(e, null, b, A, v, M, r, i, a)) : l.push(v), W(e, !0, t), E = e.input.charCodeAt(e.position), E === 44 ? (n = !0, E = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1764
1758
|
}
|
|
1765
1759
|
C(e, "unexpected end of the stream within a flow collection");
|
|
1766
1760
|
}
|
|
@@ -1828,12 +1822,12 @@ function bt(e, t) {
|
|
|
1828
1822
|
return l ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1829
1823
|
}
|
|
1830
1824
|
function ra(e, t, n) {
|
|
1831
|
-
var r, i, a, o, l, s, u = e.tag, d = e.anchor, c = {}, p = /* @__PURE__ */ Object.create(null), f = null, b = null,
|
|
1825
|
+
var r, i, a, o, l, s, u = e.tag, d = e.anchor, c = {}, p = /* @__PURE__ */ Object.create(null), f = null, b = null, v = null, A = !1, M = !1, E;
|
|
1832
1826
|
if (e.firstTabInLine !== -1)
|
|
1833
1827
|
return !1;
|
|
1834
1828
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), E = e.input.charCodeAt(e.position); E !== 0; ) {
|
|
1835
|
-
if (!
|
|
1836
|
-
E === 63 ? (
|
|
1829
|
+
if (!A && 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, (E === 63 || E === 58) && te(r))
|
|
1830
|
+
E === 63 ? (A && (Ce(e, c, p, f, b, null, o, l, s), f = b = v = null), M = !0, A = !0, i = !0) : A ? (A = !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, E = r;
|
|
1837
1831
|
else {
|
|
1838
1832
|
if (o = e.line, l = e.lineStart, s = e.position, !ke(e, n, on, !1, !0))
|
|
1839
1833
|
break;
|
|
@@ -1841,7 +1835,7 @@ function ra(e, t, n) {
|
|
|
1841
1835
|
for (E = e.input.charCodeAt(e.position); ge(E); )
|
|
1842
1836
|
E = e.input.charCodeAt(++e.position);
|
|
1843
1837
|
if (E === 58)
|
|
1844
|
-
E = e.input.charCodeAt(++e.position), te(E) || C(e, "a whitespace character is expected after the key-value separator within a block mapping"),
|
|
1838
|
+
E = e.input.charCodeAt(++e.position), te(E) || C(e, "a whitespace character is expected after the key-value separator within a block mapping"), A && (Ce(e, c, p, f, b, null, o, l, s), f = b = v = null), M = !0, A = !1, i = !1, f = e.tag, b = e.result;
|
|
1845
1839
|
else if (M)
|
|
1846
1840
|
C(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1847
1841
|
else
|
|
@@ -1851,12 +1845,12 @@ function ra(e, t, n) {
|
|
|
1851
1845
|
else
|
|
1852
1846
|
return e.tag = u, e.anchor = d, !0;
|
|
1853
1847
|
}
|
|
1854
|
-
if ((e.line === a || e.lineIndent > t) && (
|
|
1848
|
+
if ((e.line === a || e.lineIndent > t) && (A && (o = e.line, l = e.lineStart, s = e.position), ke(e, t, Be, !0, i) && (A ? b = e.result : v = e.result), A || (Ce(e, c, p, f, b, v, o, l, s), f = b = v = null), W(e, !0, -1), E = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > t) && E !== 0)
|
|
1855
1849
|
C(e, "bad indentation of a mapping entry");
|
|
1856
1850
|
else if (e.lineIndent < t)
|
|
1857
1851
|
break;
|
|
1858
1852
|
}
|
|
1859
|
-
return
|
|
1853
|
+
return A && Ce(e, c, p, f, b, null, o, l, s), M && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), M;
|
|
1860
1854
|
}
|
|
1861
1855
|
function ia(e) {
|
|
1862
1856
|
var t, n = !1, r = !1, i, a, o;
|
|
@@ -1897,11 +1891,11 @@ function oa(e) {
|
|
|
1897
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), de.call(e.anchorMap, n) || C(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], W(e, !0, -1), !0;
|
|
1898
1892
|
}
|
|
1899
1893
|
function ke(e, t, n, r, i) {
|
|
1900
|
-
var a, o, l, s = 1, u = !1, d = !1, c, p, f, b,
|
|
1894
|
+
var a, o, l, s = 1, u = !1, d = !1, c, p, f, b, v, A;
|
|
1901
1895
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = l = Be === n || ln === 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)
|
|
1902
1896
|
for (; ia(e) || aa(e); )
|
|
1903
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;
|
|
1904
|
-
if (l && (l = u || i), (s === 1 || Be === n) && (Ne === n || on === n ?
|
|
1898
|
+
if (l && (l = u || i), (s === 1 || Be === n) && (Ne === n || on === n ? v = t : v = t + 1, A = e.position - e.lineStart, s === 1 ? l && (bt(e, A) || ra(e, A, v)) || ta(e, v) ? d = !0 : (o && na(e, v) || Xi(e, v) || ea(e, v) ? d = !0 : oa(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && C(e, "alias node should not have any properties")) : Qi(e, v, Ne === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && bt(e, A))), e.tag === null)
|
|
1905
1899
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1906
1900
|
else if (e.tag === "?") {
|
|
1907
1901
|
for (e.result !== null && e.kind !== "scalar" && C(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, p = e.implicitTypes.length; c < p; c += 1)
|
|
@@ -2093,12 +2087,12 @@ function _n(e) {
|
|
|
2093
2087
|
}
|
|
2094
2088
|
var kn = 1, Je = 2, An = 3, wn = 4, be = 5;
|
|
2095
2089
|
function Ka(e, t, n, r, i, a, o, l) {
|
|
2096
|
-
var s, u = 0, d = null, c = !1, p = !1, f = r !== -1, b = -1,
|
|
2090
|
+
var s, u = 0, d = null, c = !1, p = !1, f = r !== -1, b = -1, v = Ba(we(e, 0)) && Ra(we(e, e.length - 1));
|
|
2097
2091
|
if (t || o)
|
|
2098
2092
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2099
2093
|
if (u = we(e, s), !Te(u))
|
|
2100
2094
|
return be;
|
|
2101
|
-
|
|
2095
|
+
v = v && _t(u, d, l), d = u;
|
|
2102
2096
|
}
|
|
2103
2097
|
else {
|
|
2104
2098
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
@@ -2107,11 +2101,11 @@ function Ka(e, t, n, r, i, a, o, l) {
|
|
|
2107
2101
|
s - b - 1 > r && e[b + 1] !== " ", b = s);
|
|
2108
2102
|
else if (!Te(u))
|
|
2109
2103
|
return be;
|
|
2110
|
-
|
|
2104
|
+
v = v && _t(u, d, l), d = u;
|
|
2111
2105
|
}
|
|
2112
2106
|
p = p || f && s - b - 1 > r && e[b + 1] !== " ";
|
|
2113
2107
|
}
|
|
2114
|
-
return !c && !p ?
|
|
2108
|
+
return !c && !p ? v && !o && !i(e) ? kn : a === Ee ? be : Je : n > 9 && _n(e) ? be : o ? a === Ee ? be : Je : p ? wn : An;
|
|
2115
2109
|
}
|
|
2116
2110
|
function Ma(e, t, n, r, i) {
|
|
2117
2111
|
e.dump = function() {
|
|
@@ -2336,7 +2330,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2336
2330
|
}
|
|
2337
2331
|
},
|
|
2338
2332
|
setup(e) {
|
|
2339
|
-
const t = e, n =
|
|
2333
|
+
const t = e, n = k(() => {
|
|
2340
2334
|
const r = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, i]) => i && (Array.isArray(i) ? i.length !== 0 : !0)));
|
|
2341
2335
|
return Object.keys(r).length === 0 && r.constructor === Object ? "" : so.dump(r).trim();
|
|
2342
2336
|
});
|
|
@@ -2398,7 +2392,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2398
2392
|
}
|
|
2399
2393
|
},
|
|
2400
2394
|
setup(e) {
|
|
2401
|
-
const t = e, n = Ze(), { i18n: { t: r } } = z.useI18n(), i = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), a =
|
|
2395
|
+
const t = e, n = Ze(), { i18n: { t: r } } = z.useI18n(), i = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), a = k(() => {
|
|
2402
2396
|
if (!t.record)
|
|
2403
2397
|
return t.record;
|
|
2404
2398
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
@@ -2513,7 +2507,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2513
2507
|
}
|
|
2514
2508
|
},
|
|
2515
2509
|
setup(e) {
|
|
2516
|
-
const t = e, n =
|
|
2510
|
+
const t = e, n = k(() => {
|
|
2517
2511
|
if (typeof t.size == "number" && t.size > 0)
|
|
2518
2512
|
return `${t.size}px`;
|
|
2519
2513
|
if (typeof t.size == "string") {
|
|
@@ -2522,7 +2516,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2522
2516
|
return `${a}px`;
|
|
2523
2517
|
}
|
|
2524
2518
|
return oe;
|
|
2525
|
-
}), r =
|
|
2519
|
+
}), r = k(() => ({
|
|
2526
2520
|
boxSizing: "border-box",
|
|
2527
2521
|
color: t.color,
|
|
2528
2522
|
display: t.display,
|
|
@@ -2612,7 +2606,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2612
2606
|
}
|
|
2613
2607
|
},
|
|
2614
2608
|
setup(e) {
|
|
2615
|
-
const t = e, n =
|
|
2609
|
+
const t = e, n = k(() => {
|
|
2616
2610
|
if (typeof t.size == "number" && t.size > 0)
|
|
2617
2611
|
return `${t.size}px`;
|
|
2618
2612
|
if (typeof t.size == "string") {
|
|
@@ -2621,7 +2615,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2621
2615
|
return `${a}px`;
|
|
2622
2616
|
}
|
|
2623
2617
|
return oe;
|
|
2624
|
-
}), r =
|
|
2618
|
+
}), r = k(() => ({
|
|
2625
2619
|
boxSizing: "border-box",
|
|
2626
2620
|
color: t.color,
|
|
2627
2621
|
display: t.display,
|
|
@@ -2711,7 +2705,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2711
2705
|
}
|
|
2712
2706
|
},
|
|
2713
2707
|
setup(e) {
|
|
2714
|
-
const t = e, n =
|
|
2708
|
+
const t = e, n = k(() => {
|
|
2715
2709
|
if (typeof t.size == "number" && t.size > 0)
|
|
2716
2710
|
return `${t.size}px`;
|
|
2717
2711
|
if (typeof t.size == "string") {
|
|
@@ -2720,7 +2714,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2720
2714
|
return `${a}px`;
|
|
2721
2715
|
}
|
|
2722
2716
|
return oe;
|
|
2723
|
-
}), r =
|
|
2717
|
+
}), r = k(() => ({
|
|
2724
2718
|
boxSizing: "border-box",
|
|
2725
2719
|
color: t.color,
|
|
2726
2720
|
display: t.display,
|
|
@@ -2810,7 +2804,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2810
2804
|
}
|
|
2811
2805
|
},
|
|
2812
2806
|
setup(e) {
|
|
2813
|
-
const t = e, n =
|
|
2807
|
+
const t = e, n = k(() => {
|
|
2814
2808
|
if (typeof t.size == "number" && t.size > 0)
|
|
2815
2809
|
return `${t.size}px`;
|
|
2816
2810
|
if (typeof t.size == "string") {
|
|
@@ -2819,7 +2813,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2819
2813
|
return `${a}px`;
|
|
2820
2814
|
}
|
|
2821
2815
|
return oe;
|
|
2822
|
-
}), r =
|
|
2816
|
+
}), r = k(() => ({
|
|
2823
2817
|
boxSizing: "border-box",
|
|
2824
2818
|
color: t.color,
|
|
2825
2819
|
display: t.display,
|
|
@@ -2909,7 +2903,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2909
2903
|
}
|
|
2910
2904
|
},
|
|
2911
2905
|
setup(e) {
|
|
2912
|
-
const t = e, n =
|
|
2906
|
+
const t = e, n = k(() => {
|
|
2913
2907
|
if (typeof t.size == "number" && t.size > 0)
|
|
2914
2908
|
return `${t.size}px`;
|
|
2915
2909
|
if (typeof t.size == "string") {
|
|
@@ -2918,7 +2912,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2918
2912
|
return `${a}px`;
|
|
2919
2913
|
}
|
|
2920
2914
|
return oe;
|
|
2921
|
-
}), r =
|
|
2915
|
+
}), r = k(() => ({
|
|
2922
2916
|
boxSizing: "border-box",
|
|
2923
2917
|
color: t.color,
|
|
2924
2918
|
display: t.display,
|
|
@@ -3031,10 +3025,8 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3031
3025
|
},
|
|
3032
3026
|
emits: ["loading", "fetch:success", "fetch:error"],
|
|
3033
3027
|
setup(e, { emit: t }) {
|
|
3034
|
-
var
|
|
3035
|
-
const n = t, r = e, { i18n: { t: i } } = z.useI18n(), { getMessageFromError: a } = z.useErrors(), { convertKeyToTitle: o } = z.useStringHelpers(), { axiosInstance: l } = z.useAxios(
|
|
3036
|
-
headers: (v = r.config) == null ? void 0 : v.requestHeaders
|
|
3037
|
-
}), s = [
|
|
3028
|
+
var y;
|
|
3029
|
+
const n = t, r = e, { i18n: { t: i } } = z.useI18n(), { getMessageFromError: a } = z.useErrors(), { convertKeyToTitle: o } = z.useStringHelpers(), { axiosInstance: l } = z.useAxios((y = r.config) == null ? void 0 : y.axiosRequestConfig), s = [
|
|
3038
3030
|
{
|
|
3039
3031
|
label: i("baseConfigCard.general.structuredFormat"),
|
|
3040
3032
|
value: "structured",
|
|
@@ -3048,8 +3040,8 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3048
3040
|
label: "YAML",
|
|
3049
3041
|
value: "yaml"
|
|
3050
3042
|
}
|
|
3051
|
-
], u = R("structured"), d = (
|
|
3052
|
-
u.value =
|
|
3043
|
+
], u = R("structured"), d = (g) => {
|
|
3044
|
+
u.value = g == null ? void 0 : g.value;
|
|
3053
3045
|
}, c = {
|
|
3054
3046
|
id: {
|
|
3055
3047
|
type: P.ID,
|
|
@@ -3084,21 +3076,21 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3084
3076
|
// the last property displayed
|
|
3085
3077
|
section: ne.Basic
|
|
3086
3078
|
}
|
|
3087
|
-
}, p = R(!1), f = R(!1), b = R(""),
|
|
3088
|
-
var F,
|
|
3089
|
-
if (!
|
|
3079
|
+
}, p = R(!1), f = R(!1), b = R(""), v = R({}), A = k(() => {
|
|
3080
|
+
var F, _, j;
|
|
3081
|
+
if (!v.value)
|
|
3090
3082
|
return [];
|
|
3091
|
-
const
|
|
3092
|
-
for (const T in
|
|
3093
|
-
const w = (
|
|
3083
|
+
const g = [], $ = Object.keys(v.value).length;
|
|
3084
|
+
for (const T in v.value) {
|
|
3085
|
+
const w = (_ = (F = r.configSchema) == null ? void 0 : F[T]) == null ? void 0 : _.order, U = (j = c[T]) == null ? void 0 : j.order;
|
|
3094
3086
|
let q = $;
|
|
3095
|
-
(U || U === 0) && (q = U === -1 ? $ + 1 : U), w && (q = w === -1 ? $ + 1 : w),
|
|
3087
|
+
(U || U === 0) && (q = U === -1 ? $ + 1 : U), w && (q = w === -1 ? $ + 1 : w), g.push([T, q]);
|
|
3096
3088
|
}
|
|
3097
|
-
return
|
|
3089
|
+
return g.sort(function(T, w) {
|
|
3098
3090
|
return T[1] - w[1];
|
|
3099
|
-
}),
|
|
3091
|
+
}), g.map((T) => {
|
|
3100
3092
|
var pe, at;
|
|
3101
|
-
const w = T[0], U = (pe =
|
|
3093
|
+
const w = T[0], U = (pe = v.value) == null ? void 0 : pe[w], q = ((at = r.configSchema) == null ? void 0 : at[w]) || {}, J = c[w];
|
|
3102
3094
|
return {
|
|
3103
3095
|
key: w,
|
|
3104
3096
|
value: U,
|
|
@@ -3109,13 +3101,13 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3109
3101
|
section: q.section ?? ((J == null ? void 0 : J.section) || ne.Advanced)
|
|
3110
3102
|
};
|
|
3111
3103
|
}).filter((T) => !T.hidden && T.key !== r.pluginConfigKey);
|
|
3112
|
-
}), M =
|
|
3113
|
-
var
|
|
3114
|
-
if (!
|
|
3104
|
+
}), M = k(() => {
|
|
3105
|
+
var _, j;
|
|
3106
|
+
if (!v.value || !r.pluginConfigKey)
|
|
3115
3107
|
return [];
|
|
3116
|
-
const
|
|
3117
|
-
for (const T in
|
|
3118
|
-
const w = (j = (
|
|
3108
|
+
const g = v.value[r.pluginConfigKey] || {}, $ = Object.keys(g).length, F = [];
|
|
3109
|
+
for (const T in g) {
|
|
3110
|
+
const w = (j = (_ = r.pluginConfigSchema) == null ? void 0 : _[T]) == null ? void 0 : j.order, U = g[T];
|
|
3119
3111
|
let q = U != null && U !== "" ? $ - 1 : $;
|
|
3120
3112
|
w && (q = w === -1 ? $ + 1 : w), F.push([T, q]);
|
|
3121
3113
|
}
|
|
@@ -3123,7 +3115,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3123
3115
|
return T[1] - w[1];
|
|
3124
3116
|
}), F.map((T) => {
|
|
3125
3117
|
var J;
|
|
3126
|
-
const w = T[0], U =
|
|
3118
|
+
const w = T[0], U = g[w], q = ((J = r.pluginConfigSchema) == null ? void 0 : J[w]) || {};
|
|
3127
3119
|
return {
|
|
3128
3120
|
key: w,
|
|
3129
3121
|
value: U,
|
|
@@ -3134,52 +3126,52 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3134
3126
|
section: ne.Plugin
|
|
3135
3127
|
};
|
|
3136
3128
|
}).filter((T) => !T.hidden);
|
|
3137
|
-
}), E =
|
|
3138
|
-
var
|
|
3129
|
+
}), E = k(() => {
|
|
3130
|
+
var g, $, F, _;
|
|
3139
3131
|
return {
|
|
3140
|
-
basic: (
|
|
3141
|
-
advanced: ($ =
|
|
3142
|
-
plugin: (
|
|
3132
|
+
basic: (g = A.value) == null ? void 0 : g.filter((j) => j.section === ne.Basic),
|
|
3133
|
+
advanced: ($ = A.value) == null ? void 0 : $.filter((j) => j.section === ne.Advanced),
|
|
3134
|
+
plugin: (_ = M.value) == null ? void 0 : _.concat((F = A.value) == null ? void 0 : F.filter((j) => j.section === ne.Plugin))
|
|
3143
3135
|
};
|
|
3144
|
-
}), ee =
|
|
3145
|
-
const
|
|
3146
|
-
return E.value.basic.length &&
|
|
3147
|
-
}), m =
|
|
3136
|
+
}), ee = k(() => {
|
|
3137
|
+
const g = [];
|
|
3138
|
+
return E.value.basic.length && g.push("basic"), E.value.advanced.length && g.push("advanced"), E.value.plugin.length && g.push("plugin"), g;
|
|
3139
|
+
}), m = k(() => {
|
|
3148
3140
|
var $, F;
|
|
3149
|
-
let
|
|
3150
|
-
return r.config.app === "konnect" ?
|
|
3141
|
+
let g = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
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;
|
|
3151
3143
|
});
|
|
3152
|
-
return Ae(p, (
|
|
3153
|
-
n("loading",
|
|
3144
|
+
return Ae(p, (g) => {
|
|
3145
|
+
n("loading", g);
|
|
3154
3146
|
}, { immediate: !0 }), Ft(async () => {
|
|
3155
3147
|
f.value = !1, p.value = !0;
|
|
3156
3148
|
try {
|
|
3157
|
-
const { data:
|
|
3149
|
+
const { data: g } = await l.get(m.value);
|
|
3158
3150
|
if (r.dataKey)
|
|
3159
|
-
if (typeof
|
|
3160
|
-
|
|
3151
|
+
if (typeof g[r.dataKey] < "u")
|
|
3152
|
+
v.value = { ...g[r.dataKey] };
|
|
3161
3153
|
else
|
|
3162
3154
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3163
3155
|
else
|
|
3164
|
-
|
|
3156
|
+
v.value = { ...g };
|
|
3165
3157
|
Object.keys(r.configSchema).filter((F) => r.configSchema[F].forceShow).forEach((F) => {
|
|
3166
|
-
|
|
3167
|
-
}), n("fetch:success",
|
|
3168
|
-
} catch (
|
|
3169
|
-
const $ = a(
|
|
3170
|
-
b.value = $.startsWith("code") ? i("baseConfigCard.errors.load") : $, f.value = !0, n("fetch:error",
|
|
3158
|
+
v.value && typeof v.value[F] > "u" && (v.value[F] = null);
|
|
3159
|
+
}), n("fetch:success", g);
|
|
3160
|
+
} catch (g) {
|
|
3161
|
+
const $ = a(g);
|
|
3162
|
+
b.value = $.startsWith("code") ? i("baseConfigCard.errors.load") : $, f.value = !0, n("fetch:error", g);
|
|
3171
3163
|
} finally {
|
|
3172
3164
|
p.value = !1;
|
|
3173
3165
|
}
|
|
3174
|
-
}), (
|
|
3175
|
-
const F = B("KLabel"),
|
|
3166
|
+
}), (g, $) => {
|
|
3167
|
+
const F = B("KLabel"), _ = B("KSelect"), j = B("KButton"), T = B("KSkeleton"), w = B("KEmptyState"), U = B("KCard");
|
|
3176
3168
|
return h(), K(U, {
|
|
3177
3169
|
class: "kong-ui-entity-base-config-card",
|
|
3178
3170
|
"title-tag": e.titleTag
|
|
3179
3171
|
}, _e({
|
|
3180
3172
|
actions: x(() => [
|
|
3181
3173
|
L("div", zo, [
|
|
3182
|
-
Y(
|
|
3174
|
+
Y(g.$slots, "actions", {}, void 0, !0),
|
|
3183
3175
|
N(F, {
|
|
3184
3176
|
class: "config-format-select-label",
|
|
3185
3177
|
"data-testid": "config-format-select-label"
|
|
@@ -3189,7 +3181,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3189
3181
|
]),
|
|
3190
3182
|
_: 1
|
|
3191
3183
|
}),
|
|
3192
|
-
N(
|
|
3184
|
+
N(_, {
|
|
3193
3185
|
"data-testid": "select-config-format",
|
|
3194
3186
|
items: s,
|
|
3195
3187
|
onChange: d
|
|
@@ -3236,12 +3228,12 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3236
3228
|
format: u.value,
|
|
3237
3229
|
"prop-list-types": ee.value,
|
|
3238
3230
|
"property-collections": E.value,
|
|
3239
|
-
record:
|
|
3231
|
+
record: v.value
|
|
3240
3232
|
}, _e({ _: 2 }, [
|
|
3241
|
-
ie(Object.keys(
|
|
3233
|
+
ie(Object.keys(g.$slots), (q) => ({
|
|
3242
3234
|
name: q,
|
|
3243
3235
|
fn: x(({ row: J, rowValue: pe }) => [
|
|
3244
|
-
Y(
|
|
3236
|
+
Y(g.$slots, q, {
|
|
3245
3237
|
row: J,
|
|
3246
3238
|
rowValue: pe
|
|
3247
3239
|
}, void 0, !0)
|
|
@@ -3256,7 +3248,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3256
3248
|
name: "title",
|
|
3257
3249
|
fn: x(() => [
|
|
3258
3250
|
L("span", Yo, [
|
|
3259
|
-
Y(
|
|
3251
|
+
Y(g.$slots, "title", {}, () => [
|
|
3260
3252
|
V(O(I(i)("baseConfigCard.title")), 1)
|
|
3261
3253
|
], !0)
|
|
3262
3254
|
])
|
|
@@ -3266,10 +3258,10 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3266
3258
|
]), 1032, ["title-tag"]);
|
|
3267
3259
|
};
|
|
3268
3260
|
}
|
|
3269
|
-
}),
|
|
3261
|
+
}), jl = /* @__PURE__ */ re(Go, [["__scopeId", "data-v-f40a683b"]]), Zo = ["novalidate"], Qo = {
|
|
3270
3262
|
class: "form-actions",
|
|
3271
3263
|
"data-testid": "form-actions"
|
|
3272
|
-
},
|
|
3264
|
+
}, Xo = /* @__PURE__ */ H({
|
|
3273
3265
|
__name: "EntityBaseForm",
|
|
3274
3266
|
props: {
|
|
3275
3267
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3319,22 +3311,27 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3319
3311
|
formFields: {
|
|
3320
3312
|
type: Object,
|
|
3321
3313
|
required: !0
|
|
3314
|
+
},
|
|
3315
|
+
/**
|
|
3316
|
+
* Set true to disable the form validation upon submission.
|
|
3317
|
+
*/
|
|
3318
|
+
noValidate: {
|
|
3319
|
+
type: Boolean,
|
|
3320
|
+
default: !1
|
|
3322
3321
|
}
|
|
3323
3322
|
},
|
|
3324
3323
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3325
3324
|
setup(e, { emit: t }) {
|
|
3326
3325
|
var ee;
|
|
3327
|
-
const n = t, r = e, i = Mn(), { i18n: { t: a } } = z.useI18n(), { getMessageFromError: o } = z.useErrors(), { axiosInstance: l } = z.useAxios({
|
|
3328
|
-
|
|
3329
|
-
}), s = R(!1), u = R(!1), d = R(""), c = A(() => r.canSubmit === !1 || r.isReadonly), p = R(!1), f = A(() => {
|
|
3330
|
-
var v, y;
|
|
3326
|
+
const n = t, r = e, i = Mn(), { i18n: { t: a } } = z.useI18n(), { getMessageFromError: o } = z.useErrors(), { axiosInstance: l } = z.useAxios((ee = r.config) == null ? void 0 : ee.axiosRequestConfig), s = R(!1), u = R(!1), d = R(""), c = k(() => r.canSubmit === !1 || r.isReadonly), p = R(!1), f = k(() => {
|
|
3327
|
+
var y, g;
|
|
3331
3328
|
let m = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3332
|
-
return r.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((
|
|
3329
|
+
return r.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((y = r.config) == null ? void 0 : y.controlPlaneId) || "") : r.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (g = r.config) != null && g.workspace ? `/${r.config.workspace}` : "")), r.editId ? (m = m.replace(/{id}/gi, r.editId), m) : (m = m.replace(/\/{id}/gi, ""), m);
|
|
3333
3330
|
}), b = () => {
|
|
3334
3331
|
p.value = !p.value;
|
|
3335
|
-
},
|
|
3336
|
-
r.config.cancelRoute ? i.push(r.config.cancelRoute) :
|
|
3337
|
-
},
|
|
3332
|
+
}, v = () => {
|
|
3333
|
+
r.config.cancelRoute ? i.push(r.config.cancelRoute) : A();
|
|
3334
|
+
}, A = () => {
|
|
3338
3335
|
n("cancel");
|
|
3339
3336
|
}, M = () => {
|
|
3340
3337
|
c.value || n("submit");
|
|
@@ -3357,16 +3354,16 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3357
3354
|
const { data: m } = await l.get(f.value);
|
|
3358
3355
|
n("fetch:success", m);
|
|
3359
3356
|
} catch (m) {
|
|
3360
|
-
const
|
|
3361
|
-
d.value =
|
|
3357
|
+
const y = o(m);
|
|
3358
|
+
d.value = y.startsWith("code") ? a("baseForm.errors.edit") : y, u.value = !0, n("fetch:error", m);
|
|
3362
3359
|
} finally {
|
|
3363
3360
|
s.value = !1;
|
|
3364
3361
|
}
|
|
3365
|
-
}), (m,
|
|
3366
|
-
const
|
|
3362
|
+
}), (m, y) => {
|
|
3363
|
+
const g = B("KSkeleton"), $ = B("KEmptyState"), F = B("KAlert"), _ = B("KButton"), j = B("KTabs"), T = B("KSlideout"), w = B("KCard");
|
|
3367
3364
|
return h(), K(w, { class: "kong-ui-entity-base-form" }, {
|
|
3368
3365
|
default: x(() => [
|
|
3369
|
-
s.value ? (h(), K(
|
|
3366
|
+
s.value ? (h(), K(g, {
|
|
3370
3367
|
key: 0,
|
|
3371
3368
|
type: "form"
|
|
3372
3369
|
})) : u.value ? (h(), K($, {
|
|
@@ -3374,7 +3371,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3374
3371
|
"action-button-text": I(a)("baseForm.actions.back"),
|
|
3375
3372
|
"data-testid": "form-fetch-error",
|
|
3376
3373
|
"icon-variant": "error",
|
|
3377
|
-
onClickAction:
|
|
3374
|
+
onClickAction: v
|
|
3378
3375
|
}, {
|
|
3379
3376
|
default: x(() => [
|
|
3380
3377
|
L("h3", null, O(d.value), 1)
|
|
@@ -3383,7 +3380,8 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3383
3380
|
}, 8, ["action-button-text"])) : (h(), S("form", {
|
|
3384
3381
|
key: 2,
|
|
3385
3382
|
"data-testid": "form-content",
|
|
3386
|
-
|
|
3383
|
+
novalidate: r.noValidate,
|
|
3384
|
+
onReset: Ve(A, ["prevent"]),
|
|
3387
3385
|
onSubmit: Ve(M, ["prevent"])
|
|
3388
3386
|
}, [
|
|
3389
3387
|
Y(m.$slots, "default", {}, void 0, !0),
|
|
@@ -3393,19 +3391,19 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3393
3391
|
"data-testid": "form-error",
|
|
3394
3392
|
message: e.errorMessage
|
|
3395
3393
|
}, null, 8, ["message"])) : D("", !0),
|
|
3396
|
-
L("div",
|
|
3394
|
+
L("div", Qo, [
|
|
3397
3395
|
Y(m.$slots, "form-actions", {}, () => [
|
|
3398
|
-
N(
|
|
3396
|
+
N(_, {
|
|
3399
3397
|
appearance: "tertiary",
|
|
3400
3398
|
"data-testid": "form-view-configuration",
|
|
3401
|
-
onClick:
|
|
3399
|
+
onClick: y[0] || (y[0] = (U) => b())
|
|
3402
3400
|
}, {
|
|
3403
3401
|
default: x(() => [
|
|
3404
3402
|
V(O(I(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3405
3403
|
]),
|
|
3406
3404
|
_: 1
|
|
3407
3405
|
}),
|
|
3408
|
-
N(
|
|
3406
|
+
N(_, {
|
|
3409
3407
|
appearance: "secondary",
|
|
3410
3408
|
"data-testid": "form-cancel",
|
|
3411
3409
|
disabled: e.isReadonly,
|
|
@@ -3416,7 +3414,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3416
3414
|
]),
|
|
3417
3415
|
_: 1
|
|
3418
3416
|
}, 8, ["disabled"]),
|
|
3419
|
-
N(
|
|
3417
|
+
N(_, {
|
|
3420
3418
|
appearance: "primary",
|
|
3421
3419
|
"data-testid": "form-submit",
|
|
3422
3420
|
disabled: c.value,
|
|
@@ -3429,7 +3427,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3429
3427
|
}, 8, ["disabled"])
|
|
3430
3428
|
], !0)
|
|
3431
3429
|
])
|
|
3432
|
-
],
|
|
3430
|
+
], 40, Zo)),
|
|
3433
3431
|
N(T, {
|
|
3434
3432
|
"close-on-blur": !1,
|
|
3435
3433
|
"data-testid": "form-view-configuration-slideout",
|
|
@@ -3437,7 +3435,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3437
3435
|
"offset-top": 60,
|
|
3438
3436
|
title: I(a)("baseForm.configuration.title"),
|
|
3439
3437
|
visible: p.value,
|
|
3440
|
-
onClose:
|
|
3438
|
+
onClose: y[1] || (y[1] = (U) => b())
|
|
3441
3439
|
}, {
|
|
3442
3440
|
default: x(() => [
|
|
3443
3441
|
L("div", null, O(I(a)("baseForm.configuration.message")), 1),
|
|
@@ -3468,10 +3466,10 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3468
3466
|
});
|
|
3469
3467
|
};
|
|
3470
3468
|
}
|
|
3471
|
-
}),
|
|
3469
|
+
}), Ul = /* @__PURE__ */ re(Xo, [["__scopeId", "data-v-3def74fe"]]), el = {
|
|
3472
3470
|
key: 0,
|
|
3473
3471
|
"data-testid": "first-col"
|
|
3474
|
-
},
|
|
3472
|
+
}, tl = /* @__PURE__ */ H({
|
|
3475
3473
|
__name: "EntityBaseTableCell",
|
|
3476
3474
|
props: {
|
|
3477
3475
|
keyName: {
|
|
@@ -3484,68 +3482,68 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3484
3482
|
}
|
|
3485
3483
|
},
|
|
3486
3484
|
setup(e) {
|
|
3487
|
-
const t = e, n =
|
|
3488
|
-
var
|
|
3489
|
-
return ((
|
|
3490
|
-
}), r =
|
|
3491
|
-
var
|
|
3492
|
-
return ((
|
|
3493
|
-
}), i =
|
|
3494
|
-
var
|
|
3495
|
-
const
|
|
3496
|
-
return
|
|
3485
|
+
const t = e, n = k(() => {
|
|
3486
|
+
var v;
|
|
3487
|
+
return ((v = t.rowEl) == null ? void 0 : v.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3488
|
+
}), r = k(() => {
|
|
3489
|
+
var v;
|
|
3490
|
+
return ((v = n.value) == null ? void 0 : v.querySelector('[data-testid="first-col"]')) || null;
|
|
3491
|
+
}), i = k(() => {
|
|
3492
|
+
var A, M;
|
|
3493
|
+
const v = (A = t.rowEl) == null ? void 0 : A.querySelectorAll("td");
|
|
3494
|
+
return v ? ((M = v[0]) == null ? void 0 : M.getAttribute("data-testid")) === t.keyName : !1;
|
|
3497
3495
|
});
|
|
3498
3496
|
let a;
|
|
3499
3497
|
const o = () => {
|
|
3500
3498
|
a && (a.disconnect(), a = void 0);
|
|
3501
3499
|
}, l = () => {
|
|
3502
|
-
var
|
|
3503
|
-
u.value = ((
|
|
3504
|
-
}, s = R({}), u = R(0), d = R(0), c = R(""), p =
|
|
3500
|
+
var v, A, M;
|
|
3501
|
+
u.value = ((v = r.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, d.value = ((A = n.value) == null ? void 0 : A.clientWidth) || 0, c.value = ((M = s.value) == null ? void 0 : M.innerText) || "";
|
|
3502
|
+
}, s = R({}), u = R(0), d = R(0), c = R(""), p = k(() => [r.value, n.value]), f = Ae(
|
|
3505
3503
|
p,
|
|
3506
|
-
(
|
|
3504
|
+
(v) => {
|
|
3507
3505
|
if (i.value && (o(), "ResizeObserver" in window && window)) {
|
|
3508
|
-
a = new ResizeObserver((
|
|
3506
|
+
a = new ResizeObserver((A) => {
|
|
3509
3507
|
window.requestAnimationFrame(() => {
|
|
3510
|
-
!Array.isArray(
|
|
3508
|
+
!Array.isArray(A) || !A.length || l();
|
|
3511
3509
|
});
|
|
3512
3510
|
});
|
|
3513
|
-
for (const
|
|
3514
|
-
|
|
3511
|
+
for (const A of v)
|
|
3512
|
+
A && a.observe(A);
|
|
3515
3513
|
}
|
|
3516
3514
|
},
|
|
3517
3515
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3518
|
-
), b =
|
|
3516
|
+
), b = k(() => i.value ? u.value > d.value : !1);
|
|
3519
3517
|
return On(() => {
|
|
3520
3518
|
l();
|
|
3521
3519
|
}), $n(() => {
|
|
3522
3520
|
f();
|
|
3523
|
-
}), (
|
|
3521
|
+
}), (v, A) => {
|
|
3524
3522
|
const M = B("KTooltip");
|
|
3525
3523
|
return h(), S("span", {
|
|
3526
3524
|
ref_key: "contentRef",
|
|
3527
3525
|
ref: s,
|
|
3528
3526
|
class: "content-wrapper"
|
|
3529
3527
|
}, [
|
|
3530
|
-
i.value ? (h(), S("span",
|
|
3528
|
+
i.value ? (h(), S("span", el, [
|
|
3531
3529
|
N(M, {
|
|
3532
3530
|
"max-width": "300",
|
|
3533
3531
|
placement: "bottomStart",
|
|
3534
3532
|
text: b.value ? c.value : ""
|
|
3535
3533
|
}, {
|
|
3536
3534
|
default: x(() => [
|
|
3537
|
-
Y(
|
|
3535
|
+
Y(v.$slots, "default", {}, void 0, !0)
|
|
3538
3536
|
]),
|
|
3539
3537
|
_: 3
|
|
3540
3538
|
}, 8, ["text"])
|
|
3541
|
-
])) : Y(
|
|
3539
|
+
])) : Y(v.$slots, "default", { key: 1 }, void 0, !0)
|
|
3542
3540
|
], 512);
|
|
3543
3541
|
};
|
|
3544
3542
|
}
|
|
3545
|
-
}),
|
|
3543
|
+
}), nl = /* @__PURE__ */ re(tl, [["__scopeId", "data-v-c4379fd4"]]), rl = { class: "toolbar-container" }, il = {
|
|
3546
3544
|
key: 0,
|
|
3547
3545
|
class: "toolbar-button-container"
|
|
3548
|
-
},
|
|
3546
|
+
}, al = ["data-testid"], ol = /* @__PURE__ */ H({
|
|
3549
3547
|
__name: "EntityBaseTable",
|
|
3550
3548
|
props: {
|
|
3551
3549
|
// table header configuration
|
|
@@ -3659,66 +3657,66 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3659
3657
|
},
|
|
3660
3658
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3661
3659
|
setup(e, { emit: t }) {
|
|
3662
|
-
const n = e, r = t, { i18n: { t: i } } = z.useI18n(), a =
|
|
3663
|
-
var
|
|
3660
|
+
const n = e, r = t, { i18n: { t: i } } = z.useI18n(), a = k(() => {
|
|
3661
|
+
var y, g;
|
|
3664
3662
|
return typeof n.errorMessage == "string" ? {
|
|
3665
3663
|
hasError: !!n.errorMessage,
|
|
3666
3664
|
title: n.errorMessage,
|
|
3667
3665
|
message: void 0
|
|
3668
3666
|
} : {
|
|
3669
3667
|
hasError: !!n.errorMessage,
|
|
3670
|
-
title: (
|
|
3671
|
-
message: (
|
|
3668
|
+
title: (y = n.errorMessage) == null ? void 0 : y.title,
|
|
3669
|
+
message: (g = n.errorMessage) == null ? void 0 : g.message
|
|
3672
3670
|
};
|
|
3673
|
-
}), o =
|
|
3674
|
-
const
|
|
3671
|
+
}), o = k(() => n.cacheIdentifier || n.preferencesStorageKey), l = (y) => y.hasData || !!n.query, s = k(() => {
|
|
3672
|
+
const y = [];
|
|
3675
3673
|
return Object.keys(n.tableHeaders).forEach(($) => {
|
|
3676
3674
|
const F = n.tableHeaders[$];
|
|
3677
|
-
|
|
3675
|
+
y.push({
|
|
3678
3676
|
label: F.label ?? $,
|
|
3679
3677
|
key: $,
|
|
3680
3678
|
sortable: F.sortable ?? !1
|
|
3681
3679
|
});
|
|
3682
|
-
}), n.enableEntityActions &&
|
|
3680
|
+
}), n.enableEntityActions && y.push({
|
|
3683
3681
|
key: "actions",
|
|
3684
3682
|
hideLabel: !0
|
|
3685
|
-
}),
|
|
3686
|
-
}), u = (
|
|
3687
|
-
"data-rowid":
|
|
3688
|
-
"data-testid":
|
|
3689
|
-
...n.rowAttributes(
|
|
3690
|
-
}), d = R({}), c = (
|
|
3691
|
-
var
|
|
3692
|
-
return (
|
|
3693
|
-
}, p = (
|
|
3694
|
-
const
|
|
3695
|
-
"data-testid":
|
|
3696
|
-
...n.cellAttributes(
|
|
3683
|
+
}), y;
|
|
3684
|
+
}), u = (y) => ({
|
|
3685
|
+
"data-rowid": y.id,
|
|
3686
|
+
"data-testid": y.name,
|
|
3687
|
+
...n.rowAttributes(y)
|
|
3688
|
+
}), d = R({}), c = (y) => {
|
|
3689
|
+
var g;
|
|
3690
|
+
return (g = d.value) == null ? void 0 : g.$el.querySelector(`[data-rowid="${y.id}"]`);
|
|
3691
|
+
}, p = (y) => {
|
|
3692
|
+
const g = {
|
|
3693
|
+
"data-testid": y.headerKey,
|
|
3694
|
+
...n.cellAttributes(y)
|
|
3697
3695
|
};
|
|
3698
|
-
return
|
|
3696
|
+
return y.colIndex === 0 && (g.style = {
|
|
3699
3697
|
maxWidth: "250px",
|
|
3700
3698
|
overflowX: "hidden",
|
|
3701
3699
|
textOverflow: "ellipsis"
|
|
3702
|
-
}),
|
|
3700
|
+
}), g;
|
|
3703
3701
|
}, f = () => {
|
|
3704
3702
|
r("empty-state-cta-clicked"), b();
|
|
3705
3703
|
}, b = () => {
|
|
3706
3704
|
r("clear-search-input");
|
|
3707
|
-
},
|
|
3708
|
-
r("click:row",
|
|
3709
|
-
}),
|
|
3710
|
-
r("sort",
|
|
3711
|
-
}, { setTablePreferences: M, getTablePreferences: E } = Hn(), ee =
|
|
3712
|
-
const
|
|
3705
|
+
}, v = k(() => n.disableRowClick ? void 0 : (y, g) => {
|
|
3706
|
+
r("click:row", g);
|
|
3707
|
+
}), A = (y) => {
|
|
3708
|
+
r("sort", y);
|
|
3709
|
+
}, { setTablePreferences: M, getTablePreferences: E } = Hn(), ee = k(() => {
|
|
3710
|
+
const y = E(n.preferencesStorageKey);
|
|
3713
3711
|
return {
|
|
3714
3712
|
...n.initialFetcherParams,
|
|
3715
|
-
...
|
|
3713
|
+
...y
|
|
3716
3714
|
};
|
|
3717
|
-
}), m = (
|
|
3718
|
-
n.preferencesStorageKey && M(n.preferencesStorageKey,
|
|
3715
|
+
}), m = (y) => {
|
|
3716
|
+
n.preferencesStorageKey && M(n.preferencesStorageKey, y);
|
|
3719
3717
|
};
|
|
3720
|
-
return (
|
|
3721
|
-
const $ = B("KIcon"), F = B("KButton"),
|
|
3718
|
+
return (y, g) => {
|
|
3719
|
+
const $ = B("KIcon"), F = B("KButton"), _ = B("KDropdown"), j = B("KTable"), T = B("KCard");
|
|
3722
3720
|
return h(), K(T, {
|
|
3723
3721
|
class: "kong-ui-entity-base-table",
|
|
3724
3722
|
title: e.title,
|
|
@@ -3751,15 +3749,15 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3751
3749
|
"row-attrs": u,
|
|
3752
3750
|
"search-input": e.query,
|
|
3753
3751
|
onKtableEmptyStateCtaClicked: f,
|
|
3754
|
-
"onRow:click":
|
|
3755
|
-
onSort:
|
|
3752
|
+
"onRow:click": v.value,
|
|
3753
|
+
onSort: g[0] || (g[0] = (w) => A(w)),
|
|
3756
3754
|
"onUpdate:tablePreferences": m
|
|
3757
3755
|
}, _e({
|
|
3758
3756
|
toolbar: x(({ state: w }) => [
|
|
3759
|
-
he(L("div",
|
|
3760
|
-
Y(
|
|
3761
|
-
|
|
3762
|
-
Y(
|
|
3757
|
+
he(L("div", rl, [
|
|
3758
|
+
Y(y.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3759
|
+
y.$slots["toolbar-button"] ? (h(), S("div", il, [
|
|
3760
|
+
Y(y.$slots, "toolbar-button", {}, void 0, !0)
|
|
3763
3761
|
])) : D("", !0)
|
|
3764
3762
|
], 512), [
|
|
3765
3763
|
[me, l(w)]
|
|
@@ -3770,12 +3768,12 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3770
3768
|
class: "actions-container",
|
|
3771
3769
|
"data-testid": w.name
|
|
3772
3770
|
}, [
|
|
3773
|
-
N(
|
|
3771
|
+
N(_, {
|
|
3774
3772
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3775
3773
|
width: e.dropdownMenuWidth
|
|
3776
3774
|
}, {
|
|
3777
3775
|
items: x(() => [
|
|
3778
|
-
Y(
|
|
3776
|
+
Y(y.$slots, "actions", {
|
|
3779
3777
|
row: w,
|
|
3780
3778
|
rowKey: U,
|
|
3781
3779
|
rowValue: q
|
|
@@ -3799,19 +3797,19 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3799
3797
|
]),
|
|
3800
3798
|
_: 2
|
|
3801
3799
|
}, 1032, ["width"])
|
|
3802
|
-
], 8,
|
|
3800
|
+
], 8, al)
|
|
3803
3801
|
]),
|
|
3804
3802
|
_: 2
|
|
3805
3803
|
}, [
|
|
3806
3804
|
ie(e.tableHeaders, (w, U) => ({
|
|
3807
3805
|
name: U,
|
|
3808
3806
|
fn: x(({ row: q, rowKey: J, rowValue: pe }) => [
|
|
3809
|
-
N(
|
|
3807
|
+
N(nl, {
|
|
3810
3808
|
"key-name": String(U),
|
|
3811
3809
|
"row-el": c(q)
|
|
3812
3810
|
}, {
|
|
3813
3811
|
default: x(() => [
|
|
3814
|
-
Y(
|
|
3812
|
+
Y(y.$slots, U, {
|
|
3815
3813
|
row: q,
|
|
3816
3814
|
rowKey: J,
|
|
3817
3815
|
rowValue: pe
|
|
@@ -3836,13 +3834,13 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3836
3834
|
}, 8, ["title", "title-tag"]);
|
|
3837
3835
|
};
|
|
3838
3836
|
}
|
|
3839
|
-
}),
|
|
3837
|
+
}), ql = /* @__PURE__ */ re(ol, [["__scopeId", "data-v-99908c24"]]), ll = {
|
|
3840
3838
|
key: 0,
|
|
3841
3839
|
class: "kong-ui-entity-delete-error"
|
|
3842
|
-
},
|
|
3840
|
+
}, sl = {
|
|
3843
3841
|
key: 1,
|
|
3844
3842
|
class: "description"
|
|
3845
|
-
},
|
|
3843
|
+
}, cl = /* @__PURE__ */ H({
|
|
3846
3844
|
__name: "EntityDeleteModal",
|
|
3847
3845
|
props: {
|
|
3848
3846
|
visible: {
|
|
@@ -3881,7 +3879,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3881
3879
|
},
|
|
3882
3880
|
emits: ["cancel", "proceed"],
|
|
3883
3881
|
setup(e, { emit: t }) {
|
|
3884
|
-
const { i18nT: n } = z.useI18n(), r = e, i = t, a =
|
|
3882
|
+
const { i18nT: n } = z.useI18n(), r = e, i = t, a = k(() => r.needConfirm ? r.entityName : ""), o = () => {
|
|
3885
3883
|
i("cancel");
|
|
3886
3884
|
}, l = () => {
|
|
3887
3885
|
i("proceed");
|
|
@@ -3900,7 +3898,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3900
3898
|
onProceed: l
|
|
3901
3899
|
}, {
|
|
3902
3900
|
default: x(() => [
|
|
3903
|
-
e.error ? (h(), S("div",
|
|
3901
|
+
e.error ? (h(), S("div", ll, [
|
|
3904
3902
|
N(d, { appearance: "danger" }, {
|
|
3905
3903
|
default: x(() => [
|
|
3906
3904
|
V(O(e.error), 1)
|
|
@@ -3926,7 +3924,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3926
3924
|
key: "0"
|
|
3927
3925
|
} : void 0
|
|
3928
3926
|
]), 1032, ["keypath"]),
|
|
3929
|
-
r.description || s.$slots.description ? (h(), S("div",
|
|
3927
|
+
r.description || s.$slots.description ? (h(), S("div", sl, [
|
|
3930
3928
|
Y(s.$slots, "description", {}, () => [
|
|
3931
3929
|
L("p", null, O(r.description), 1)
|
|
3932
3930
|
], !0)
|
|
@@ -3936,13 +3934,13 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3936
3934
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3937
3935
|
};
|
|
3938
3936
|
}
|
|
3939
|
-
}),
|
|
3937
|
+
}), Pl = /* @__PURE__ */ re(cl, [["__scopeId", "data-v-4361d622"]]), ul = {
|
|
3940
3938
|
fill: "none",
|
|
3941
3939
|
height: "20",
|
|
3942
3940
|
viewBox: "0 0 20 20",
|
|
3943
3941
|
width: "20",
|
|
3944
3942
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3945
|
-
},
|
|
3943
|
+
}, dl = {
|
|
3946
3944
|
id: "mask0_180_20349",
|
|
3947
3945
|
height: "20",
|
|
3948
3946
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3950,7 +3948,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3950
3948
|
width: "20",
|
|
3951
3949
|
x: "0",
|
|
3952
3950
|
y: "0"
|
|
3953
|
-
},
|
|
3951
|
+
}, fl = ["fill"], pl = { mask: "url(#mask0_180_20349)" }, hl = ["fill"], Et = /* @__PURE__ */ H({
|
|
3954
3952
|
__name: "IconFilter",
|
|
3955
3953
|
props: {
|
|
3956
3954
|
color: {
|
|
@@ -3959,26 +3957,26 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3959
3957
|
}
|
|
3960
3958
|
},
|
|
3961
3959
|
setup(e) {
|
|
3962
|
-
return (t, n) => (h(), S("svg",
|
|
3963
|
-
L("mask",
|
|
3960
|
+
return (t, n) => (h(), S("svg", ul, [
|
|
3961
|
+
L("mask", dl, [
|
|
3964
3962
|
L("rect", {
|
|
3965
3963
|
fill: e.color,
|
|
3966
3964
|
height: "20",
|
|
3967
3965
|
width: "20"
|
|
3968
|
-
}, null, 8,
|
|
3966
|
+
}, null, 8, fl)
|
|
3969
3967
|
]),
|
|
3970
|
-
L("g",
|
|
3968
|
+
L("g", pl, [
|
|
3971
3969
|
L("path", {
|
|
3972
3970
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3973
3971
|
fill: e.color
|
|
3974
|
-
}, null, 8,
|
|
3972
|
+
}, null, 8, hl)
|
|
3975
3973
|
])
|
|
3976
3974
|
]));
|
|
3977
3975
|
}
|
|
3978
|
-
}),
|
|
3976
|
+
}), ml = {
|
|
3979
3977
|
key: 1,
|
|
3980
3978
|
class: "kong-ui-entity-filter"
|
|
3981
|
-
},
|
|
3979
|
+
}, gl = { class: "kong-ui-entity-filter-menu" }, yl = ["data-testid"], vl = ["onClick", "onKeydown"], bl = { class: "menu-item-indicator" }, xl = { class: "menu-item-body" }, Cl = ["for"], _l = { class: "menu-item-buttons" }, kl = { class: "filter-clear-button-container" }, Al = /* @__PURE__ */ H({
|
|
3982
3980
|
__name: "EntityFilter",
|
|
3983
3981
|
props: {
|
|
3984
3982
|
// filter config, either exact match or fuzzy match
|
|
@@ -3998,22 +3996,22 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3998
3996
|
},
|
|
3999
3997
|
emits: ["update:modelValue"],
|
|
4000
3998
|
setup(e, { emit: t }) {
|
|
4001
|
-
const { i18n: { t: n } } = z.useI18n(), r = e, i = t, a = R(!1), o = R({}), l = R(/* @__PURE__ */ new Set()), s =
|
|
3999
|
+
const { i18n: { t: n } } = z.useI18n(), r = e, i = t, a = R(!1), o = R({}), l = R(/* @__PURE__ */ new Set()), s = k(() => {
|
|
4002
4000
|
const m = [];
|
|
4003
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
4004
|
-
|
|
4001
|
+
return new URLSearchParams(r.modelValue).forEach((y, g) => {
|
|
4002
|
+
y !== "" && m.push(g);
|
|
4005
4003
|
}), m;
|
|
4006
|
-
}), u =
|
|
4004
|
+
}), u = k(() => {
|
|
4007
4005
|
const m = r.config.fields;
|
|
4008
|
-
return Object.keys(m).filter((
|
|
4009
|
-
label: m[
|
|
4010
|
-
value:
|
|
4006
|
+
return Object.keys(m).filter((y) => m[y].searchable).map((y) => ({
|
|
4007
|
+
label: m[y].label || y,
|
|
4008
|
+
value: y,
|
|
4011
4009
|
expanded: !1
|
|
4012
4010
|
}));
|
|
4013
4011
|
});
|
|
4014
4012
|
Ae(() => r.modelValue, (m) => {
|
|
4015
|
-
o.value = {}, new URLSearchParams(m).forEach((
|
|
4016
|
-
o.value[
|
|
4013
|
+
o.value = {}, new URLSearchParams(m).forEach((y, g) => {
|
|
4014
|
+
o.value[g] = y;
|
|
4017
4015
|
});
|
|
4018
4016
|
});
|
|
4019
4017
|
const d = () => {
|
|
@@ -4024,15 +4022,15 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4024
4022
|
i("update:modelValue", m);
|
|
4025
4023
|
}, f = () => {
|
|
4026
4024
|
p("");
|
|
4027
|
-
}, b = (m) => `filter-${m}`,
|
|
4028
|
-
var
|
|
4029
|
-
return (((
|
|
4025
|
+
}, b = (m) => `filter-${m}`, v = (m) => {
|
|
4026
|
+
var y, g;
|
|
4027
|
+
return (((g = (y = r.config.schema) == null ? void 0 : y[m]) == null ? void 0 : g.values) ?? []).map(($) => ({
|
|
4030
4028
|
value: $,
|
|
4031
4029
|
label: $
|
|
4032
4030
|
}));
|
|
4033
|
-
},
|
|
4034
|
-
var
|
|
4035
|
-
return ((
|
|
4031
|
+
}, A = (m) => {
|
|
4032
|
+
var y, g;
|
|
4033
|
+
return ((g = (y = r.config.schema) == null ? void 0 : y[m]) == null ? void 0 : g.type) ?? "text";
|
|
4036
4034
|
}, M = (m) => {
|
|
4037
4035
|
o.value = {
|
|
4038
4036
|
...o.value,
|
|
@@ -4041,12 +4039,12 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4041
4039
|
}, E = () => {
|
|
4042
4040
|
o.value = {}, ee(!0);
|
|
4043
4041
|
}, ee = (m = !1) => {
|
|
4044
|
-
const
|
|
4045
|
-
m && (a.value = !1), i("update:modelValue", new URLSearchParams(
|
|
4042
|
+
const y = Object.keys(o.value).reduce((g, $) => (o.value[$] && (g[$] = `${o.value[$]}`), g), {});
|
|
4043
|
+
m && (a.value = !1), i("update:modelValue", new URLSearchParams(y).toString());
|
|
4046
4044
|
};
|
|
4047
|
-
return (m,
|
|
4048
|
-
const
|
|
4049
|
-
return e.config.isExactMatch ? (h(), K(
|
|
4045
|
+
return (m, y) => {
|
|
4046
|
+
const g = B("KInput"), $ = B("KButton"), F = B("KSelect");
|
|
4047
|
+
return e.config.isExactMatch ? (h(), K(g, {
|
|
4050
4048
|
key: 0,
|
|
4051
4049
|
autocomplete: "off",
|
|
4052
4050
|
class: "kong-ui-entity-filter-input",
|
|
@@ -4067,7 +4065,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4067
4065
|
])
|
|
4068
4066
|
]),
|
|
4069
4067
|
_: 1
|
|
4070
|
-
}, 8, ["model-value", "placeholder"])) : (h(), S("div",
|
|
4068
|
+
}, 8, ["model-value", "placeholder"])) : (h(), S("div", ml, [
|
|
4071
4069
|
N($, {
|
|
4072
4070
|
appearance: "tertiary",
|
|
4073
4071
|
"data-testid": "filter-button",
|
|
@@ -4085,60 +4083,60 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4085
4083
|
}, null, 512), [
|
|
4086
4084
|
[me, a.value]
|
|
4087
4085
|
]),
|
|
4088
|
-
he(L("div",
|
|
4089
|
-
(h(!0), S(le, null, ie(u.value, (
|
|
4086
|
+
he(L("div", gl, [
|
|
4087
|
+
(h(!0), S(le, null, ie(u.value, (_) => {
|
|
4090
4088
|
var j, T;
|
|
4091
4089
|
return h(), S("div", {
|
|
4092
|
-
key:
|
|
4090
|
+
key: _.value,
|
|
4093
4091
|
class: "kong-ui-entity-filter-menu-item",
|
|
4094
|
-
"data-testid":
|
|
4092
|
+
"data-testid": _.value
|
|
4095
4093
|
}, [
|
|
4096
4094
|
L("span", {
|
|
4097
|
-
class: ue(["menu-item-title", { expanded: l.value.has(
|
|
4095
|
+
class: ue(["menu-item-title", { expanded: l.value.has(_.value) }]),
|
|
4098
4096
|
role: "button",
|
|
4099
4097
|
tabindex: "0",
|
|
4100
|
-
onClick: (w) => c(
|
|
4101
|
-
onKeydown: Ln((w) => c(
|
|
4098
|
+
onClick: (w) => c(_.value),
|
|
4099
|
+
onKeydown: Ln((w) => c(_.value), ["enter"])
|
|
4102
4100
|
}, [
|
|
4103
|
-
V(O(
|
|
4104
|
-
he(L("span",
|
|
4105
|
-
[me, s.value.includes(
|
|
4101
|
+
V(O(_.label) + " ", 1),
|
|
4102
|
+
he(L("span", bl, null, 512), [
|
|
4103
|
+
[me, s.value.includes(_.value)]
|
|
4106
4104
|
]),
|
|
4107
4105
|
N(I(Lo), {
|
|
4108
|
-
class: ue(["menu-item-expand-icon", { expanded: l.value.has(
|
|
4106
|
+
class: ue(["menu-item-expand-icon", { expanded: l.value.has(_.value) }]),
|
|
4109
4107
|
color: I(Ar)
|
|
4110
4108
|
}, null, 8, ["class", "color"])
|
|
4111
|
-
], 42,
|
|
4112
|
-
he(L("div",
|
|
4109
|
+
], 42, vl),
|
|
4110
|
+
he(L("div", xl, [
|
|
4113
4111
|
L("label", {
|
|
4114
4112
|
class: "menu-item-label",
|
|
4115
|
-
for: b(
|
|
4116
|
-
}, O(I(n)("filter.fieldLabel")), 9,
|
|
4117
|
-
((T = (j = e.config.schema) == null ? void 0 : j[
|
|
4113
|
+
for: b(_.value)
|
|
4114
|
+
}, O(I(n)("filter.fieldLabel")), 9, Cl),
|
|
4115
|
+
((T = (j = e.config.schema) == null ? void 0 : j[_.value]) == null ? void 0 : T.type) === "select" ? (h(), K(F, {
|
|
4118
4116
|
key: 0,
|
|
4119
|
-
id: b(
|
|
4120
|
-
modelValue: o.value[
|
|
4121
|
-
"onUpdate:modelValue": (w) => o.value[
|
|
4122
|
-
items:
|
|
4117
|
+
id: b(_.value),
|
|
4118
|
+
modelValue: o.value[_.value],
|
|
4119
|
+
"onUpdate:modelValue": (w) => o.value[_.value] = w,
|
|
4120
|
+
items: v(_.value),
|
|
4123
4121
|
placeholder: I(n)("filter.selectPlaceholder")
|
|
4124
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (h(), K(
|
|
4122
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (h(), K(g, {
|
|
4125
4123
|
key: 1,
|
|
4126
|
-
id: b(
|
|
4127
|
-
modelValue: o.value[
|
|
4128
|
-
"onUpdate:modelValue": (w) => o.value[
|
|
4124
|
+
id: b(_.value),
|
|
4125
|
+
modelValue: o.value[_.value],
|
|
4126
|
+
"onUpdate:modelValue": (w) => o.value[_.value] = w,
|
|
4129
4127
|
autocomplete: "off",
|
|
4130
4128
|
placeholder: I(n)("filter.inputPlaceholder"),
|
|
4131
|
-
type: _
|
|
4129
|
+
type: A(_.value)
|
|
4132
4130
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4133
4131
|
], 512), [
|
|
4134
|
-
[me, l.value.has(
|
|
4132
|
+
[me, l.value.has(_.value)]
|
|
4135
4133
|
]),
|
|
4136
|
-
he(L("div",
|
|
4134
|
+
he(L("div", _l, [
|
|
4137
4135
|
N($, {
|
|
4138
4136
|
appearance: "tertiary",
|
|
4139
4137
|
"data-testid": "apply-filter",
|
|
4140
4138
|
size: "small",
|
|
4141
|
-
onClick:
|
|
4139
|
+
onClick: y[0] || (y[0] = (w) => ee(!0))
|
|
4142
4140
|
}, {
|
|
4143
4141
|
default: x(() => [
|
|
4144
4142
|
V(O(I(n)("filter.applyButtonText")), 1)
|
|
@@ -4149,7 +4147,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4149
4147
|
appearance: "tertiary",
|
|
4150
4148
|
"data-testid": "clear-filter",
|
|
4151
4149
|
size: "small",
|
|
4152
|
-
onClick: (w) => M(
|
|
4150
|
+
onClick: (w) => M(_.value)
|
|
4153
4151
|
}, {
|
|
4154
4152
|
default: x(() => [
|
|
4155
4153
|
V(O(I(n)("filter.clearButtonText")), 1)
|
|
@@ -4157,11 +4155,11 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4157
4155
|
_: 2
|
|
4158
4156
|
}, 1032, ["onClick"])
|
|
4159
4157
|
], 512), [
|
|
4160
|
-
[me, l.value.has(
|
|
4158
|
+
[me, l.value.has(_.value)]
|
|
4161
4159
|
])
|
|
4162
|
-
], 8,
|
|
4160
|
+
], 8, yl);
|
|
4163
4161
|
}), 128)),
|
|
4164
|
-
L("div",
|
|
4162
|
+
L("div", kl, [
|
|
4165
4163
|
N($, {
|
|
4166
4164
|
appearance: "tertiary",
|
|
4167
4165
|
size: "small",
|
|
@@ -4179,7 +4177,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4179
4177
|
]));
|
|
4180
4178
|
};
|
|
4181
4179
|
}
|
|
4182
|
-
}),
|
|
4180
|
+
}), Hl = /* @__PURE__ */ re(Al, [["__scopeId", "data-v-8cfadde3"]]), Vl = /* @__PURE__ */ H({
|
|
4183
4181
|
__name: "EntityToggleModal",
|
|
4184
4182
|
props: {
|
|
4185
4183
|
visible: {
|
|
@@ -4211,9 +4209,9 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4211
4209
|
},
|
|
4212
4210
|
emits: ["cancel", "proceed"],
|
|
4213
4211
|
setup(e, { emit: t }) {
|
|
4214
|
-
const { i18n: { t: n }, i18nT: r } = z.useI18n(), i = e, a = t, o = R(!1), l =
|
|
4212
|
+
const { i18n: { t: n }, i18nT: r } = z.useI18n(), i = e, a = t, o = R(!1), l = k(
|
|
4215
4213
|
() => i.action === "enable" ? n("toggleModal.enable.title", { entityType: i.entityType }) : n("toggleModal.disable.title", { entityType: i.entityType })
|
|
4216
|
-
), s =
|
|
4214
|
+
), s = k(
|
|
4217
4215
|
() => i.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
4218
4216
|
), u = () => a("cancel"), d = async () => {
|
|
4219
4217
|
if (i.onConfirm) {
|
|
@@ -4258,7 +4256,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4258
4256
|
]);
|
|
4259
4257
|
};
|
|
4260
4258
|
}
|
|
4261
|
-
}),
|
|
4259
|
+
}), Yl = /* @__PURE__ */ H({
|
|
4262
4260
|
__name: "PermissionsWrapper",
|
|
4263
4261
|
props: {
|
|
4264
4262
|
/**
|
|
@@ -4280,7 +4278,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4280
4278
|
}
|
|
4281
4279
|
},
|
|
4282
4280
|
setup(e) {
|
|
4283
|
-
const t = e, n = R(void 0), r =
|
|
4281
|
+
const t = e, n = R(void 0), r = k(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4284
4282
|
return Ae(() => t.authFunction, async () => {
|
|
4285
4283
|
n.value = await t.authFunction();
|
|
4286
4284
|
}, { immediate: !0 }), (i, a) => r.value ? Y(i.$slots, "default", {
|
|
@@ -4288,13 +4286,13 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4288
4286
|
isAllowed: n.value
|
|
4289
4287
|
}) : D("", !0);
|
|
4290
4288
|
}
|
|
4291
|
-
}),
|
|
4289
|
+
}), wl = { class: "form-section-wrapper" }, Sl = {
|
|
4292
4290
|
key: 1,
|
|
4293
4291
|
class: "form-section-description"
|
|
4294
|
-
},
|
|
4292
|
+
}, Il = {
|
|
4295
4293
|
key: 2,
|
|
4296
4294
|
class: "form-section-footer"
|
|
4297
|
-
},
|
|
4295
|
+
}, El = { class: "form-section-content" }, Tl = /* @__PURE__ */ H({
|
|
4298
4296
|
__name: "EntityFormSection",
|
|
4299
4297
|
props: {
|
|
4300
4298
|
title: {
|
|
@@ -4327,7 +4325,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4327
4325
|
return (n, r) => (h(), S("fieldset", {
|
|
4328
4326
|
class: ue(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4329
4327
|
}, [
|
|
4330
|
-
L("div",
|
|
4328
|
+
L("div", wl, [
|
|
4331
4329
|
e.hideInfoHeader ? D("", !0) : (h(), S("div", {
|
|
4332
4330
|
key: 0,
|
|
4333
4331
|
class: ue(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
@@ -4341,28 +4339,28 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4341
4339
|
]),
|
|
4342
4340
|
_: 1
|
|
4343
4341
|
})) : D("", !0),
|
|
4344
|
-
e.description || I(t).description ? (h(), S("div",
|
|
4342
|
+
e.description || I(t).description ? (h(), S("div", Sl, [
|
|
4345
4343
|
Y(n.$slots, "description", {}, () => [
|
|
4346
4344
|
L("p", null, O(e.description), 1)
|
|
4347
4345
|
], !0)
|
|
4348
4346
|
])) : D("", !0),
|
|
4349
|
-
I(t).footer ? (h(), S("div",
|
|
4347
|
+
I(t).footer ? (h(), S("div", Il, [
|
|
4350
4348
|
Y(n.$slots, "footer", {}, void 0, !0)
|
|
4351
4349
|
])) : D("", !0)
|
|
4352
4350
|
], 2)),
|
|
4353
|
-
L("div",
|
|
4351
|
+
L("div", El, [
|
|
4354
4352
|
Y(n.$slots, "default", {}, void 0, !0)
|
|
4355
4353
|
])
|
|
4356
4354
|
])
|
|
4357
4355
|
], 2));
|
|
4358
4356
|
}
|
|
4359
|
-
}),
|
|
4357
|
+
}), zl = /* @__PURE__ */ re(Tl, [["__scopeId", "data-v-4bb31634"]]), Fl = {
|
|
4360
4358
|
class: "kong-ui-public-entity-link",
|
|
4361
4359
|
"data-testid": "entity-link-parent"
|
|
4362
|
-
},
|
|
4360
|
+
}, Ol = {
|
|
4363
4361
|
key: 0,
|
|
4364
4362
|
class: "deleted-entity"
|
|
4365
|
-
},
|
|
4363
|
+
}, $l = { key: 1 }, Ll = ["onClick"], Nl = /* @__PURE__ */ H({
|
|
4366
4364
|
__name: "EntityLink",
|
|
4367
4365
|
props: {
|
|
4368
4366
|
entityLinkData: {
|
|
@@ -4386,15 +4384,15 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4386
4384
|
}
|
|
4387
4385
|
},
|
|
4388
4386
|
setup(e) {
|
|
4389
|
-
const t = e, n = R(), { isTruncated: r } = z.useTruncationDetector(n), { i18n: { t: i } } = z.useI18n(), a = i("global.actions.copyId"), o = R(a), l =
|
|
4387
|
+
const t = e, n = R(), { isTruncated: r } = z.useTruncationDetector(n), { i18n: { t: i } } = z.useI18n(), a = i("global.actions.copyId"), o = R(a), l = k(() => t.entityLinkData.deleted ?? !1), s = k(() => t.entityLinkData.id.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id), u = k(() => `${s.value.toString().slice(0, 5)} (deleted)`), d = async (c) => {
|
|
4390
4388
|
await c(s.value || "") && (o.value = i("global.actions.copyToClipboard"), setTimeout(() => {
|
|
4391
4389
|
o.value = a;
|
|
4392
4390
|
}, 1800));
|
|
4393
4391
|
};
|
|
4394
4392
|
return (c, p) => {
|
|
4395
|
-
const f = B("KTooltip"), b = B("KExternalLink"),
|
|
4396
|
-
return h(), S("div",
|
|
4397
|
-
l.value ? (h(), S("div",
|
|
4393
|
+
const f = B("KTooltip"), b = B("KExternalLink"), v = B("KClipboardProvider");
|
|
4394
|
+
return h(), S("div", Fl, [
|
|
4395
|
+
l.value ? (h(), S("div", Ol, O(u.value), 1)) : s.value ? s.value ? (h(), K(b, {
|
|
4398
4396
|
key: 2,
|
|
4399
4397
|
class: "entity-link",
|
|
4400
4398
|
"hide-icon": !e.newWindow,
|
|
@@ -4416,7 +4414,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4416
4414
|
}, 8, ["text"])
|
|
4417
4415
|
]),
|
|
4418
4416
|
_: 1
|
|
4419
|
-
}, 8, ["hide-icon", "href", "target"])) : D("", !0) : (h(), S("div",
|
|
4417
|
+
}, 8, ["hide-icon", "href", "target"])) : D("", !0) : (h(), S("div", $l, O(" – "))),
|
|
4420
4418
|
s.value && e.allowCopy ? (h(), K(f, {
|
|
4421
4419
|
key: o.value,
|
|
4422
4420
|
class: "copy-uuid-tooltip",
|
|
@@ -4425,11 +4423,11 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4425
4423
|
text: o.value
|
|
4426
4424
|
}, {
|
|
4427
4425
|
default: x(() => [
|
|
4428
|
-
N(
|
|
4429
|
-
default: x(({ copyToClipboard:
|
|
4426
|
+
N(v, null, {
|
|
4427
|
+
default: x(({ copyToClipboard: A }) => [
|
|
4430
4428
|
L("span", {
|
|
4431
4429
|
class: "entity-link-copy-id",
|
|
4432
|
-
onClick: Ve((M) => d(
|
|
4430
|
+
onClick: Ve((M) => d(A), ["stop"])
|
|
4433
4431
|
}, [
|
|
4434
4432
|
N(I(Vo), {
|
|
4435
4433
|
class: "copy-icon",
|
|
@@ -4437,7 +4435,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4437
4435
|
"data-testid": "copy-id",
|
|
4438
4436
|
size: I(Ir)
|
|
4439
4437
|
}, null, 8, ["color", "size"])
|
|
4440
|
-
], 8,
|
|
4438
|
+
], 8, Ll)
|
|
4441
4439
|
]),
|
|
4442
4440
|
_: 1
|
|
4443
4441
|
})
|
|
@@ -4447,37 +4445,37 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4447
4445
|
]);
|
|
4448
4446
|
};
|
|
4449
4447
|
}
|
|
4450
|
-
}),
|
|
4448
|
+
}), Wl = /* @__PURE__ */ re(Nl, [["__scopeId", "data-v-ff8e5179"]]), { useAxios: Jl, useDeleteUrlBuilder: Gl, useErrors: Zl, useExternalLinkCreator: Ql, useFetchUrlBuilder: Xl, useFetcher: es, useDebouncedFilter: ts, useStringHelpers: ns, useHelpers: rs, useGatewayFeatureSupported: is, useTruncationDetector: as, useValidators: os } = z;
|
|
4451
4449
|
export {
|
|
4452
4450
|
mo as ConfigCardDisplay,
|
|
4453
4451
|
Rt as ConfigCardItem,
|
|
4454
4452
|
ne as ConfigurationSchemaSection,
|
|
4455
4453
|
P as ConfigurationSchemaType,
|
|
4456
|
-
|
|
4457
|
-
|
|
4454
|
+
jl as EntityBaseConfigCard,
|
|
4455
|
+
Ul as EntityBaseForm,
|
|
4458
4456
|
jn as EntityBaseFormType,
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4457
|
+
ql as EntityBaseTable,
|
|
4458
|
+
Pl as EntityDeleteModal,
|
|
4459
|
+
Hl as EntityFilter,
|
|
4460
|
+
zl as EntityFormSection,
|
|
4461
|
+
Wl as EntityLink,
|
|
4462
|
+
Vl as EntityToggleModal,
|
|
4465
4463
|
Dn as EntityTypes,
|
|
4466
4464
|
ve as FetcherStatus,
|
|
4467
4465
|
br as InternalLinkItem,
|
|
4468
4466
|
Kt as JsonCodeBlock,
|
|
4469
|
-
|
|
4467
|
+
Yl as PermissionsWrapper,
|
|
4470
4468
|
Sn as YamlCodeBlock,
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4469
|
+
Jl as useAxios,
|
|
4470
|
+
ts as useDebouncedFilter,
|
|
4471
|
+
Gl as useDeleteUrlBuilder,
|
|
4472
|
+
Zl as useErrors,
|
|
4473
|
+
Ql as useExternalLinkCreator,
|
|
4474
|
+
Xl as useFetchUrlBuilder,
|
|
4475
|
+
es as useFetcher,
|
|
4476
|
+
is as useGatewayFeatureSupported,
|
|
4477
|
+
rs as useHelpers,
|
|
4478
|
+
ns as useStringHelpers,
|
|
4479
|
+
as as useTruncationDetector,
|
|
4480
|
+
os as useValidators
|
|
4483
4481
|
};
|