@kong-ui-public/entities-shared 2.12.10-pr.1302.612aa1e9.0 → 2.12.10
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 +300 -290
- package/dist/entities-shared.umd.js +9 -9
- 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.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 +3 -1
- package/dist/types/types/app-config.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -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 A, 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,15 +247,17 @@ function nr(e, t, n, r = {
|
|
|
247
247
|
searchKeys: ["id"]
|
|
248
248
|
}) {
|
|
249
249
|
n || (n = "1000");
|
|
250
|
-
const { axiosInstance: i } = Qe(
|
|
250
|
+
const { axiosInstance: i } = Qe({
|
|
251
|
+
headers: e.requestHeaders
|
|
252
|
+
}), { i18n: { t: a } } = De(), { debounce: o } = qn(), l = o(async (m) => {
|
|
251
253
|
await ee(m);
|
|
252
254
|
}, 200), s = R(!1), u = R(""), d = R(""), c = R([]), p = R([]), f = R(void 0), b = I(t);
|
|
253
|
-
let
|
|
254
|
-
e.app === "konnect" ?
|
|
255
|
-
const { isValidUuid:
|
|
255
|
+
let g = `${e.apiBaseUrl}${b}`;
|
|
256
|
+
e.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
257
|
+
const { isValidUuid: _ } = Ot(), M = async () => {
|
|
256
258
|
try {
|
|
257
259
|
s.value = !0;
|
|
258
|
-
const { data: m } = await i.get(`${
|
|
260
|
+
const { data: m } = await i.get(`${g}?size=${n}`);
|
|
259
261
|
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;
|
|
260
262
|
} catch {
|
|
261
263
|
c.value = [], u.value = a("debouncedFilter.errors.fetch");
|
|
@@ -263,28 +265,28 @@ function nr(e, t, n, r = {
|
|
|
263
265
|
s.value = !1;
|
|
264
266
|
}
|
|
265
267
|
}, E = R(""), ee = async (m) => {
|
|
266
|
-
var
|
|
268
|
+
var v, y, $;
|
|
267
269
|
if (E.value !== m)
|
|
268
270
|
if (E.value = m || "", f.value === void 0)
|
|
269
271
|
try {
|
|
270
272
|
if (s.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
271
|
-
let F =
|
|
273
|
+
let F = g + "";
|
|
272
274
|
m && (F += `/${m}`);
|
|
273
|
-
const { data:
|
|
274
|
-
r.fetchedItemsKey in
|
|
275
|
+
const { data: k } = await i.get(`${F}?size=${n}`);
|
|
276
|
+
r.fetchedItemsKey in k ? c.value = k[r.fetchedItemsKey] : k != null && k.id ? c.value = [k] : c.value = [];
|
|
275
277
|
} else if (m) {
|
|
276
278
|
const F = [];
|
|
277
|
-
|
|
278
|
-
const { data: T } = await i.get(`${
|
|
279
|
+
_(m) && r.searchKeys.includes("id") ? F.push((async () => {
|
|
280
|
+
const { data: T } = await i.get(`${g}/${m}`);
|
|
279
281
|
return [T[r.fetchedItemsKey] ?? T];
|
|
280
282
|
})()) : F.push(
|
|
281
283
|
...r.searchKeys.filter((T) => T !== "id").map(async (T) => {
|
|
282
|
-
const { data: w } = await i.get(`${
|
|
284
|
+
const { data: w } = await i.get(`${g}?${T}=${m}`);
|
|
283
285
|
return w[r.fetchedItemsKey];
|
|
284
286
|
})
|
|
285
287
|
);
|
|
286
|
-
const
|
|
287
|
-
c.value = [], (
|
|
288
|
+
const k = await Promise.all(F), j = /* @__PURE__ */ new Set();
|
|
289
|
+
c.value = [], (v = k == null ? void 0 : k.forEach) == null || v.call(k, (T) => {
|
|
288
290
|
var w;
|
|
289
291
|
(w = T == null ? void 0 : T.forEach) == null || w.call(T, (U) => {
|
|
290
292
|
j.has(U.id) || (j.add(U.id), c.value.push(U));
|
|
@@ -293,19 +295,19 @@ function nr(e, t, n, r = {
|
|
|
293
295
|
} else
|
|
294
296
|
c.value = p.value;
|
|
295
297
|
} catch (F) {
|
|
296
|
-
((
|
|
298
|
+
((y = F == null ? void 0 : F.response) == null ? void 0 : y.status) === 404 ? d.value = a("debouncedFilter.errors.invalid") : (c.value = [], u.value = a("debouncedFilter.errors.fetch"));
|
|
297
299
|
} finally {
|
|
298
300
|
s.value = !1;
|
|
299
301
|
}
|
|
300
302
|
else
|
|
301
303
|
s.value = !0, d.value = "", m ? (c.value = ($ = f.value) == null ? void 0 : $.filter((F) => {
|
|
302
304
|
var j;
|
|
303
|
-
let
|
|
305
|
+
let k = !1;
|
|
304
306
|
for (const T of r.searchKeys) {
|
|
305
307
|
const w = typeof F[T] == "string" ? (j = F[T]) == null ? void 0 : j.toLowerCase() : F[T];
|
|
306
|
-
w != null && w.includes(m.toLowerCase()) && (
|
|
308
|
+
w != null && w.includes(m.toLowerCase()) && (k = !0);
|
|
307
309
|
}
|
|
308
|
-
return
|
|
310
|
+
return k;
|
|
309
311
|
}), (!c.value || !c.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : c.value = f.value, s.value = !1;
|
|
310
312
|
};
|
|
311
313
|
return {
|
|
@@ -319,7 +321,7 @@ function nr(e, t, n, r = {
|
|
|
319
321
|
};
|
|
320
322
|
}
|
|
321
323
|
function rr(e, t) {
|
|
322
|
-
const n = I(t), r =
|
|
324
|
+
const n = I(t), r = A(
|
|
323
325
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
324
326
|
);
|
|
325
327
|
return r.value.search = "", (i) => `${r.value.href}/${i}`;
|
|
@@ -366,17 +368,17 @@ function ar(e) {
|
|
|
366
368
|
}
|
|
367
369
|
}
|
|
368
370
|
function $t(e, t) {
|
|
369
|
-
const n = R(I(e)), r = R(I(t)), i =
|
|
371
|
+
const n = R(I(e)), r = R(I(t)), i = A(
|
|
370
372
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
371
|
-
), a =
|
|
373
|
+
), a = A(
|
|
372
374
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
373
375
|
);
|
|
374
376
|
return (o) => {
|
|
375
377
|
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query: p } = o;
|
|
376
378
|
try {
|
|
377
379
|
let f = new URL(a.value.href);
|
|
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,
|
|
379
|
-
f.searchParams.append(
|
|
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, g) => {
|
|
381
|
+
f.searchParams.append(g, b);
|
|
380
382
|
}), 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
383
|
} catch (f) {
|
|
382
384
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
@@ -384,48 +386,52 @@ function $t(e, t) {
|
|
|
384
386
|
};
|
|
385
387
|
}
|
|
386
388
|
function or(e, t, n = "data") {
|
|
387
|
-
|
|
389
|
+
var s;
|
|
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({
|
|
388
394
|
status: ve.Idle
|
|
389
395
|
});
|
|
390
|
-
return { fetcher: async (
|
|
391
|
-
var
|
|
396
|
+
return { fetcher: async (u) => {
|
|
397
|
+
var d;
|
|
392
398
|
try {
|
|
393
399
|
o.value = { status: ve.Loading };
|
|
394
|
-
let
|
|
395
|
-
|
|
396
|
-
const
|
|
397
|
-
if (
|
|
398
|
-
throw
|
|
399
|
-
const
|
|
400
|
-
let
|
|
401
|
-
|
|
402
|
-
const
|
|
403
|
-
data:
|
|
404
|
-
total:
|
|
405
|
-
...
|
|
400
|
+
let c = a(u);
|
|
401
|
+
c.includes("filter[name]") && (c = `${c}&page[size]=${u.pageSize}&page[number]=${u.page}`);
|
|
402
|
+
const p = await i.get(c);
|
|
403
|
+
if (p.status >= 400)
|
|
404
|
+
throw p;
|
|
405
|
+
const f = p.data, b = n && n.replace(/[^\w-_]/gi, "");
|
|
406
|
+
let g;
|
|
407
|
+
f[b] && Array.isArray(f[b]) ? g = f[b] : Array.isArray(f) ? g = f : g = Object.keys(f).length ? [f] : [];
|
|
408
|
+
const _ = {
|
|
409
|
+
data: g,
|
|
410
|
+
total: g.length,
|
|
411
|
+
...f.offset ? {
|
|
406
412
|
pagination: {
|
|
407
|
-
offset:
|
|
413
|
+
offset: f.offset
|
|
408
414
|
}
|
|
409
415
|
} : null
|
|
410
416
|
};
|
|
411
417
|
return o.value = {
|
|
412
418
|
status: ve.Idle,
|
|
413
|
-
response:
|
|
414
|
-
},
|
|
415
|
-
} catch (
|
|
416
|
-
const
|
|
419
|
+
response: _
|
|
420
|
+
}, _;
|
|
421
|
+
} catch (c) {
|
|
422
|
+
const p = {
|
|
417
423
|
data: [],
|
|
418
424
|
total: 0
|
|
419
425
|
};
|
|
420
|
-
return
|
|
426
|
+
return u.query && (((d = c.response) == null ? void 0 : d.status) === 404 || c.status === 404) ? (o.value = {
|
|
421
427
|
status: ve.NoResults,
|
|
422
|
-
response:
|
|
423
|
-
error:
|
|
424
|
-
},
|
|
428
|
+
response: p,
|
|
429
|
+
error: c.response ? c : { response: c }
|
|
430
|
+
}, p) : (o.value = {
|
|
425
431
|
status: ve.Error,
|
|
426
|
-
response:
|
|
427
|
-
error:
|
|
428
|
-
},
|
|
432
|
+
response: p,
|
|
433
|
+
error: c.response ? c : { response: c }
|
|
434
|
+
}, p);
|
|
429
435
|
}
|
|
430
436
|
}, fetcherState: o };
|
|
431
437
|
}
|
|
@@ -496,7 +502,7 @@ function hr(e) {
|
|
|
496
502
|
return Ae(e, (a) => {
|
|
497
503
|
a && !r.value && (t.value = a.offsetWidth, n.value = a.scrollWidth, r.value = !0);
|
|
498
504
|
}), {
|
|
499
|
-
isTruncated:
|
|
505
|
+
isTruncated: A(() => t.value < n.value)
|
|
500
506
|
};
|
|
501
507
|
}
|
|
502
508
|
function mr() {
|
|
@@ -539,10 +545,10 @@ const z = {
|
|
|
539
545
|
}
|
|
540
546
|
},
|
|
541
547
|
setup(e) {
|
|
542
|
-
const t = e, { i18n: { t: n } } = z.useI18n(), { convertKeyToTitle: r } = z.useStringHelpers(), i =
|
|
548
|
+
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
549
|
const s = JSON.parse(JSON.stringify(a.value));
|
|
544
550
|
return t.isArrayItem && delete s.name, s;
|
|
545
|
-
}), l =
|
|
551
|
+
}), l = A(() => {
|
|
546
552
|
var s;
|
|
547
553
|
return t.isArrayItem ? (s = a.value) != null && s.name ? r(a.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
548
554
|
});
|
|
@@ -648,7 +654,7 @@ const z = {
|
|
|
648
654
|
"5036b738": u.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
649
655
|
"5038fd13": u.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
650
656
|
}));
|
|
651
|
-
const n = e, r = t, i = Ze(), { i18n: { t: a, formatUnixTimeStamp: o } } = z.useI18n(), l =
|
|
657
|
+
const n = e, r = t, i = Ze(), { 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
658
|
switch (n.item.type) {
|
|
653
659
|
case P.ID:
|
|
654
660
|
return {
|
|
@@ -759,15 +765,15 @@ const z = {
|
|
|
759
765
|
};
|
|
760
766
|
}
|
|
761
767
|
}), p = R(), { isTruncated: f } = z.useTruncationDetector(p);
|
|
762
|
-
return (b,
|
|
763
|
-
const
|
|
768
|
+
return (b, g) => {
|
|
769
|
+
const _ = B("KLabel"), M = B("KBadge"), E = B("KCopy"), ee = B("KTooltip");
|
|
764
770
|
return h(), S("div", Tr, [
|
|
765
771
|
L("div", {
|
|
766
772
|
class: "config-card-details-label",
|
|
767
773
|
"data-testid": `${e.item.key}-label`
|
|
768
774
|
}, [
|
|
769
775
|
Y(b.$slots, "label", { item: e.item }, () => [
|
|
770
|
-
N(
|
|
776
|
+
N(_, { "tooltip-attributes": { maxWidth: "500px" } }, _e({
|
|
771
777
|
default: x(() => [
|
|
772
778
|
V(O(e.item.label) + " ", 1)
|
|
773
779
|
]),
|
|
@@ -803,10 +809,10 @@ const z = {
|
|
|
803
809
|
key: 0,
|
|
804
810
|
"data-testid": `${e.item.key}-badge-tags`
|
|
805
811
|
}, [
|
|
806
|
-
(h(!0), S(le, null, ie(e.item.value, (m,
|
|
807
|
-
key: `${e.item.key}-badge-tag-${
|
|
812
|
+
(h(!0), S(le, null, ie(e.item.value, (m, v) => (h(), K(M, {
|
|
813
|
+
key: `${e.item.key}-badge-tag-${v}`,
|
|
808
814
|
class: "config-badge",
|
|
809
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
815
|
+
"data-testid": `${e.item.key}-badge-tag-${v}`,
|
|
810
816
|
tooltip: m,
|
|
811
817
|
"truncation-tooltip": ""
|
|
812
818
|
}, {
|
|
@@ -821,9 +827,9 @@ const z = {
|
|
|
821
827
|
class: "copy-uuid-array",
|
|
822
828
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
823
829
|
}, [
|
|
824
|
-
(h(!0), S(le, null, ie(e.item.value, (m,
|
|
825
|
-
key: `${e.item.key}-copy-uuid-${
|
|
826
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
830
|
+
(h(!0), S(le, null, ie(e.item.value, (m, v) => (h(), K(E, Fn(c.value.childAttrs, {
|
|
831
|
+
key: `${e.item.key}-copy-uuid-${v}`,
|
|
832
|
+
"data-testid": `${e.item.key}-copy-uuid-${v}`,
|
|
827
833
|
text: m
|
|
828
834
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
829
835
|
], 8, Rr)) : c.value.additionalComponent === "KMethodBadge" ? (h(), S("div", {
|
|
@@ -831,11 +837,11 @@ const z = {
|
|
|
831
837
|
class: "method-badge-array",
|
|
832
838
|
"data-testid": `${e.item.key}-badge-methods`
|
|
833
839
|
}, [
|
|
834
|
-
(h(!0), S(le, null, ie(e.item.value, (m,
|
|
835
|
-
key: `${e.item.key}-badge-method-${
|
|
840
|
+
(h(!0), S(le, null, ie(e.item.value, (m, v) => (h(), K(M, {
|
|
841
|
+
key: `${e.item.key}-badge-method-${v}`,
|
|
836
842
|
appearance: Object.values(I(Kn)).includes(m.toLowerCase()) ? m.toLowerCase() : "custom",
|
|
837
843
|
class: "config-badge",
|
|
838
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
844
|
+
"data-testid": `${e.item.key}-badge-method-${v}`
|
|
839
845
|
}, {
|
|
840
846
|
default: x(() => [
|
|
841
847
|
V(O(m), 1)
|
|
@@ -847,9 +853,9 @@ const z = {
|
|
|
847
853
|
key: 3,
|
|
848
854
|
"data-testid": `${n.item.key}-json-array-content`
|
|
849
855
|
}, [
|
|
850
|
-
(h(!0), S(le, null, ie(e.item.value, (m,
|
|
851
|
-
key: `json-array-item-${
|
|
852
|
-
index:
|
|
856
|
+
(h(!0), S(le, null, ie(e.item.value, (m, v) => (h(), K(Bt, {
|
|
857
|
+
key: `json-array-item-${v}`,
|
|
858
|
+
index: v,
|
|
853
859
|
"is-array-item": "",
|
|
854
860
|
item: m
|
|
855
861
|
}, null, 8, ["index", "item"]))), 128))
|
|
@@ -912,7 +918,7 @@ const z = {
|
|
|
912
918
|
Tt((i) => ({
|
|
913
919
|
"954d3eca": `${r.value}ch`
|
|
914
920
|
}));
|
|
915
|
-
const t = e, n =
|
|
921
|
+
const t = e, n = A(() => t.jsonRecord), r = A(() => {
|
|
916
922
|
var o;
|
|
917
923
|
if (!t.fetcherUrl)
|
|
918
924
|
return 0;
|
|
@@ -1744,7 +1750,7 @@ function ea(e, t) {
|
|
|
1744
1750
|
C(e, "unexpected end of the stream within a double quoted scalar");
|
|
1745
1751
|
}
|
|
1746
1752
|
function ta(e, t) {
|
|
1747
|
-
var n = !0, r, i, a, o = e.tag, l, s = e.anchor, u, d, c, p, f, b = /* @__PURE__ */ Object.create(null),
|
|
1753
|
+
var n = !0, r, i, a, o = e.tag, l, s = e.anchor, u, d, c, p, f, b = /* @__PURE__ */ Object.create(null), g, _, M, E;
|
|
1748
1754
|
if (E = e.input.charCodeAt(e.position), E === 91)
|
|
1749
1755
|
d = 93, f = !1, l = [];
|
|
1750
1756
|
else if (E === 123)
|
|
@@ -1754,7 +1760,7 @@ function ta(e, t) {
|
|
|
1754
1760
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), E = e.input.charCodeAt(++e.position); E !== 0; ) {
|
|
1755
1761
|
if (W(e, !0, t), E = e.input.charCodeAt(e.position), E === d)
|
|
1756
1762
|
return e.position++, e.tag = o, e.anchor = s, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1757
|
-
n ? E === 44 && C(e, "expected the node content, but found ','") : C(e, "missed comma between flow collection entries"),
|
|
1763
|
+
n ? E === 44 && C(e, "expected the node content, but found ','") : C(e, "missed comma between flow collection entries"), _ = g = 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), _ = e.tag, g = 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, _, g, M, r, i, a) : c ? l.push(Ce(e, null, b, _, g, M, r, i, a)) : l.push(g), W(e, !0, t), E = e.input.charCodeAt(e.position), E === 44 ? (n = !0, E = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1758
1764
|
}
|
|
1759
1765
|
C(e, "unexpected end of the stream within a flow collection");
|
|
1760
1766
|
}
|
|
@@ -1822,12 +1828,12 @@ function bt(e, t) {
|
|
|
1822
1828
|
return l ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1823
1829
|
}
|
|
1824
1830
|
function ra(e, t, n) {
|
|
1825
|
-
var r, i, a, o, l, s, u = e.tag, d = e.anchor, c = {}, p = /* @__PURE__ */ Object.create(null), f = null, b = null,
|
|
1831
|
+
var r, i, a, o, l, s, u = e.tag, d = e.anchor, c = {}, p = /* @__PURE__ */ Object.create(null), f = null, b = null, g = null, _ = !1, M = !1, E;
|
|
1826
1832
|
if (e.firstTabInLine !== -1)
|
|
1827
1833
|
return !1;
|
|
1828
1834
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), E = e.input.charCodeAt(e.position); E !== 0; ) {
|
|
1829
|
-
if (!
|
|
1830
|
-
E === 63 ? (
|
|
1835
|
+
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, (E === 63 || E === 58) && te(r))
|
|
1836
|
+
E === 63 ? (_ && (Ce(e, c, p, f, b, null, o, l, s), f = b = g = null), M = !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, E = r;
|
|
1831
1837
|
else {
|
|
1832
1838
|
if (o = e.line, l = e.lineStart, s = e.position, !ke(e, n, on, !1, !0))
|
|
1833
1839
|
break;
|
|
@@ -1835,7 +1841,7 @@ function ra(e, t, n) {
|
|
|
1835
1841
|
for (E = e.input.charCodeAt(e.position); ge(E); )
|
|
1836
1842
|
E = e.input.charCodeAt(++e.position);
|
|
1837
1843
|
if (E === 58)
|
|
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"),
|
|
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"), _ && (Ce(e, c, p, f, b, null, o, l, s), f = b = g = null), M = !0, _ = !1, i = !1, f = e.tag, b = e.result;
|
|
1839
1845
|
else if (M)
|
|
1840
1846
|
C(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1841
1847
|
else
|
|
@@ -1845,12 +1851,12 @@ function ra(e, t, n) {
|
|
|
1845
1851
|
else
|
|
1846
1852
|
return e.tag = u, e.anchor = d, !0;
|
|
1847
1853
|
}
|
|
1848
|
-
if ((e.line === a || e.lineIndent > t) && (
|
|
1854
|
+
if ((e.line === a || e.lineIndent > t) && (_ && (o = e.line, l = e.lineStart, s = e.position), ke(e, t, Be, !0, i) && (_ ? b = e.result : g = e.result), _ || (Ce(e, c, p, f, b, g, o, l, s), f = b = g = null), W(e, !0, -1), E = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > t) && E !== 0)
|
|
1849
1855
|
C(e, "bad indentation of a mapping entry");
|
|
1850
1856
|
else if (e.lineIndent < t)
|
|
1851
1857
|
break;
|
|
1852
1858
|
}
|
|
1853
|
-
return
|
|
1859
|
+
return _ && Ce(e, c, p, f, b, null, o, l, s), M && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), M;
|
|
1854
1860
|
}
|
|
1855
1861
|
function ia(e) {
|
|
1856
1862
|
var t, n = !1, r = !1, i, a, o;
|
|
@@ -1891,11 +1897,11 @@ function oa(e) {
|
|
|
1891
1897
|
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;
|
|
1892
1898
|
}
|
|
1893
1899
|
function ke(e, t, n, r, i) {
|
|
1894
|
-
var a, o, l, s = 1, u = !1, d = !1, c, p, f, b,
|
|
1900
|
+
var a, o, l, s = 1, u = !1, d = !1, c, p, f, b, g, _;
|
|
1895
1901
|
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)
|
|
1896
1902
|
for (; ia(e) || aa(e); )
|
|
1897
1903
|
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 || Be === n) && (Ne === n || on === n ?
|
|
1904
|
+
if (l && (l = u || i), (s === 1 || Be === n) && (Ne === n || on === n ? g = t : g = t + 1, _ = e.position - e.lineStart, s === 1 ? l && (bt(e, _) || ra(e, _, g)) || ta(e, g) ? d = !0 : (o && na(e, g) || Xi(e, g) || ea(e, g) ? d = !0 : oa(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && C(e, "alias node should not have any properties")) : Qi(e, g, Ne === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && bt(e, _))), e.tag === null)
|
|
1899
1905
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1900
1906
|
else if (e.tag === "?") {
|
|
1901
1907
|
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)
|
|
@@ -2087,12 +2093,12 @@ function _n(e) {
|
|
|
2087
2093
|
}
|
|
2088
2094
|
var kn = 1, Je = 2, An = 3, wn = 4, be = 5;
|
|
2089
2095
|
function Ka(e, t, n, r, i, a, o, l) {
|
|
2090
|
-
var s, u = 0, d = null, c = !1, p = !1, f = r !== -1, b = -1,
|
|
2096
|
+
var s, u = 0, d = null, c = !1, p = !1, f = r !== -1, b = -1, g = Ba(we(e, 0)) && Ra(we(e, e.length - 1));
|
|
2091
2097
|
if (t || o)
|
|
2092
2098
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2093
2099
|
if (u = we(e, s), !Te(u))
|
|
2094
2100
|
return be;
|
|
2095
|
-
|
|
2101
|
+
g = g && _t(u, d, l), d = u;
|
|
2096
2102
|
}
|
|
2097
2103
|
else {
|
|
2098
2104
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
@@ -2101,11 +2107,11 @@ function Ka(e, t, n, r, i, a, o, l) {
|
|
|
2101
2107
|
s - b - 1 > r && e[b + 1] !== " ", b = s);
|
|
2102
2108
|
else if (!Te(u))
|
|
2103
2109
|
return be;
|
|
2104
|
-
|
|
2110
|
+
g = g && _t(u, d, l), d = u;
|
|
2105
2111
|
}
|
|
2106
2112
|
p = p || f && s - b - 1 > r && e[b + 1] !== " ";
|
|
2107
2113
|
}
|
|
2108
|
-
return !c && !p ?
|
|
2114
|
+
return !c && !p ? g && !o && !i(e) ? kn : a === Ee ? be : Je : n > 9 && _n(e) ? be : o ? a === Ee ? be : Je : p ? wn : An;
|
|
2109
2115
|
}
|
|
2110
2116
|
function Ma(e, t, n, r, i) {
|
|
2111
2117
|
e.dump = function() {
|
|
@@ -2330,7 +2336,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2330
2336
|
}
|
|
2331
2337
|
},
|
|
2332
2338
|
setup(e) {
|
|
2333
|
-
const t = e, n =
|
|
2339
|
+
const t = e, n = A(() => {
|
|
2334
2340
|
const r = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, i]) => i && (Array.isArray(i) ? i.length !== 0 : !0)));
|
|
2335
2341
|
return Object.keys(r).length === 0 && r.constructor === Object ? "" : so.dump(r).trim();
|
|
2336
2342
|
});
|
|
@@ -2392,7 +2398,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2392
2398
|
}
|
|
2393
2399
|
},
|
|
2394
2400
|
setup(e) {
|
|
2395
|
-
const t = e, n = Ze(), { i18n: { t: r } } = z.useI18n(), i = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), a =
|
|
2401
|
+
const t = e, n = Ze(), { i18n: { t: r } } = z.useI18n(), i = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), a = A(() => {
|
|
2396
2402
|
if (!t.record)
|
|
2397
2403
|
return t.record;
|
|
2398
2404
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
@@ -2449,7 +2455,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2449
2455
|
for (const [r, i] of t)
|
|
2450
2456
|
n[r] = i;
|
|
2451
2457
|
return n;
|
|
2452
|
-
}, go = (e) => (Oe("data-v-
|
|
2458
|
+
}, go = (e) => (Oe("data-v-89afc35c"), e = e(), $e(), e), yo = ["aria-hidden"], vo = {
|
|
2453
2459
|
key: 0,
|
|
2454
2460
|
"data-testid": "kui-icon-svg-title"
|
|
2455
2461
|
}, bo = /* @__PURE__ */ go(() => /* @__PURE__ */ L("path", {
|
|
@@ -2507,7 +2513,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2507
2513
|
}
|
|
2508
2514
|
},
|
|
2509
2515
|
setup(e) {
|
|
2510
|
-
const t = e, n =
|
|
2516
|
+
const t = e, n = A(() => {
|
|
2511
2517
|
if (typeof t.size == "number" && t.size > 0)
|
|
2512
2518
|
return `${t.size}px`;
|
|
2513
2519
|
if (typeof t.size == "string") {
|
|
@@ -2516,7 +2522,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2516
2522
|
return `${a}px`;
|
|
2517
2523
|
}
|
|
2518
2524
|
return oe;
|
|
2519
|
-
}), r =
|
|
2525
|
+
}), r = A(() => ({
|
|
2520
2526
|
boxSizing: "border-box",
|
|
2521
2527
|
color: t.color,
|
|
2522
2528
|
display: t.display,
|
|
@@ -2548,7 +2554,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2548
2554
|
_: 1
|
|
2549
2555
|
}, 8, ["aria-hidden", "style"]));
|
|
2550
2556
|
}
|
|
2551
|
-
}), Co = /* @__PURE__ */ Le(xo, [["__scopeId", "data-v-
|
|
2557
|
+
}), Co = /* @__PURE__ */ Le(xo, [["__scopeId", "data-v-89afc35c"]]), _o = (e) => (Oe("data-v-ae268f21"), e = e(), $e(), e), ko = ["aria-hidden"], Ao = {
|
|
2552
2558
|
key: 0,
|
|
2553
2559
|
"data-testid": "kui-icon-svg-title"
|
|
2554
2560
|
}, wo = /* @__PURE__ */ _o(() => /* @__PURE__ */ L("path", {
|
|
@@ -2606,7 +2612,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2606
2612
|
}
|
|
2607
2613
|
},
|
|
2608
2614
|
setup(e) {
|
|
2609
|
-
const t = e, n =
|
|
2615
|
+
const t = e, n = A(() => {
|
|
2610
2616
|
if (typeof t.size == "number" && t.size > 0)
|
|
2611
2617
|
return `${t.size}px`;
|
|
2612
2618
|
if (typeof t.size == "string") {
|
|
@@ -2615,7 +2621,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2615
2621
|
return `${a}px`;
|
|
2616
2622
|
}
|
|
2617
2623
|
return oe;
|
|
2618
|
-
}), r =
|
|
2624
|
+
}), r = A(() => ({
|
|
2619
2625
|
boxSizing: "border-box",
|
|
2620
2626
|
color: t.color,
|
|
2621
2627
|
display: t.display,
|
|
@@ -2647,7 +2653,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2647
2653
|
_: 1
|
|
2648
2654
|
}, 8, ["aria-hidden", "style"]));
|
|
2649
2655
|
}
|
|
2650
|
-
}), Io = /* @__PURE__ */ Le(So, [["__scopeId", "data-v-
|
|
2656
|
+
}), Io = /* @__PURE__ */ Le(So, [["__scopeId", "data-v-ae268f21"]]), Eo = (e) => (Oe("data-v-b2c75f11"), e = e(), $e(), e), To = ["aria-hidden"], Fo = {
|
|
2651
2657
|
key: 0,
|
|
2652
2658
|
"data-testid": "kui-icon-svg-title"
|
|
2653
2659
|
}, Oo = /* @__PURE__ */ Eo(() => /* @__PURE__ */ L("path", {
|
|
@@ -2705,7 +2711,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2705
2711
|
}
|
|
2706
2712
|
},
|
|
2707
2713
|
setup(e) {
|
|
2708
|
-
const t = e, n =
|
|
2714
|
+
const t = e, n = A(() => {
|
|
2709
2715
|
if (typeof t.size == "number" && t.size > 0)
|
|
2710
2716
|
return `${t.size}px`;
|
|
2711
2717
|
if (typeof t.size == "string") {
|
|
@@ -2714,7 +2720,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2714
2720
|
return `${a}px`;
|
|
2715
2721
|
}
|
|
2716
2722
|
return oe;
|
|
2717
|
-
}), r =
|
|
2723
|
+
}), r = A(() => ({
|
|
2718
2724
|
boxSizing: "border-box",
|
|
2719
2725
|
color: t.color,
|
|
2720
2726
|
display: t.display,
|
|
@@ -2746,7 +2752,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2746
2752
|
_: 1
|
|
2747
2753
|
}, 8, ["aria-hidden", "style"]));
|
|
2748
2754
|
}
|
|
2749
|
-
}), Lo = /* @__PURE__ */ Le($o, [["__scopeId", "data-v-
|
|
2755
|
+
}), Lo = /* @__PURE__ */ Le($o, [["__scopeId", "data-v-b2c75f11"]]), No = (e) => (Oe("data-v-f8cd1668"), e = e(), $e(), e), Bo = ["aria-hidden"], Ro = {
|
|
2750
2756
|
key: 0,
|
|
2751
2757
|
"data-testid": "kui-icon-svg-title"
|
|
2752
2758
|
}, Ko = /* @__PURE__ */ No(() => /* @__PURE__ */ L("path", {
|
|
@@ -2804,7 +2810,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2804
2810
|
}
|
|
2805
2811
|
},
|
|
2806
2812
|
setup(e) {
|
|
2807
|
-
const t = e, n =
|
|
2813
|
+
const t = e, n = A(() => {
|
|
2808
2814
|
if (typeof t.size == "number" && t.size > 0)
|
|
2809
2815
|
return `${t.size}px`;
|
|
2810
2816
|
if (typeof t.size == "string") {
|
|
@@ -2813,7 +2819,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2813
2819
|
return `${a}px`;
|
|
2814
2820
|
}
|
|
2815
2821
|
return oe;
|
|
2816
|
-
}), r =
|
|
2822
|
+
}), r = A(() => ({
|
|
2817
2823
|
boxSizing: "border-box",
|
|
2818
2824
|
color: t.color,
|
|
2819
2825
|
display: t.display,
|
|
@@ -2845,7 +2851,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2845
2851
|
_: 1
|
|
2846
2852
|
}, 8, ["aria-hidden", "style"]));
|
|
2847
2853
|
}
|
|
2848
|
-
}), Do = /* @__PURE__ */ Le(Mo, [["__scopeId", "data-v-
|
|
2854
|
+
}), Do = /* @__PURE__ */ Le(Mo, [["__scopeId", "data-v-f8cd1668"]]), jo = (e) => (Oe("data-v-2ef3afec"), e = e(), $e(), e), Uo = ["aria-hidden"], qo = {
|
|
2849
2855
|
key: 0,
|
|
2850
2856
|
"data-testid": "kui-icon-svg-title"
|
|
2851
2857
|
}, Po = /* @__PURE__ */ jo(() => /* @__PURE__ */ L("path", {
|
|
@@ -2903,7 +2909,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2903
2909
|
}
|
|
2904
2910
|
},
|
|
2905
2911
|
setup(e) {
|
|
2906
|
-
const t = e, n =
|
|
2912
|
+
const t = e, n = A(() => {
|
|
2907
2913
|
if (typeof t.size == "number" && t.size > 0)
|
|
2908
2914
|
return `${t.size}px`;
|
|
2909
2915
|
if (typeof t.size == "string") {
|
|
@@ -2912,7 +2918,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2912
2918
|
return `${a}px`;
|
|
2913
2919
|
}
|
|
2914
2920
|
return oe;
|
|
2915
|
-
}), r =
|
|
2921
|
+
}), r = A(() => ({
|
|
2916
2922
|
boxSizing: "border-box",
|
|
2917
2923
|
color: t.color,
|
|
2918
2924
|
display: t.display,
|
|
@@ -2944,7 +2950,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
2944
2950
|
_: 1
|
|
2945
2951
|
}, 8, ["aria-hidden", "style"]));
|
|
2946
2952
|
}
|
|
2947
|
-
}), Vo = /* @__PURE__ */ Le(Ho, [["__scopeId", "data-v-
|
|
2953
|
+
}), Vo = /* @__PURE__ */ Le(Ho, [["__scopeId", "data-v-2ef3afec"]]), Yo = {
|
|
2948
2954
|
class: "config-card-title",
|
|
2949
2955
|
"data-testid": "config-card-title"
|
|
2950
2956
|
}, zo = { class: "config-card-actions" }, Wo = ["href"], Jo = { class: "config-card-details-section" }, Go = /* @__PURE__ */ H({
|
|
@@ -3025,8 +3031,10 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3025
3031
|
},
|
|
3026
3032
|
emits: ["loading", "fetch:success", "fetch:error"],
|
|
3027
3033
|
setup(e, { emit: t }) {
|
|
3028
|
-
var
|
|
3029
|
-
const n = t, r = e, { i18n: { t: i } } = z.useI18n(), { getMessageFromError: a } = z.useErrors(), { convertKeyToTitle: o } = z.useStringHelpers(), { axiosInstance: l } = z.useAxios(
|
|
3034
|
+
var v;
|
|
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 = [
|
|
3030
3038
|
{
|
|
3031
3039
|
label: i("baseConfigCard.general.structuredFormat"),
|
|
3032
3040
|
value: "structured",
|
|
@@ -3040,8 +3048,8 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3040
3048
|
label: "YAML",
|
|
3041
3049
|
value: "yaml"
|
|
3042
3050
|
}
|
|
3043
|
-
], u = R("structured"), d = (
|
|
3044
|
-
u.value =
|
|
3051
|
+
], u = R("structured"), d = (y) => {
|
|
3052
|
+
u.value = y == null ? void 0 : y.value;
|
|
3045
3053
|
}, c = {
|
|
3046
3054
|
id: {
|
|
3047
3055
|
type: P.ID,
|
|
@@ -3076,21 +3084,21 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3076
3084
|
// the last property displayed
|
|
3077
3085
|
section: ne.Basic
|
|
3078
3086
|
}
|
|
3079
|
-
}, p = R(!1), f = R(!1), b = R(""),
|
|
3080
|
-
var F,
|
|
3081
|
-
if (!
|
|
3087
|
+
}, p = R(!1), f = R(!1), b = R(""), g = R({}), _ = A(() => {
|
|
3088
|
+
var F, k, j;
|
|
3089
|
+
if (!g.value)
|
|
3082
3090
|
return [];
|
|
3083
|
-
const
|
|
3084
|
-
for (const T in
|
|
3085
|
-
const w = (
|
|
3091
|
+
const y = [], $ = Object.keys(g.value).length;
|
|
3092
|
+
for (const T in g.value) {
|
|
3093
|
+
const w = (k = (F = r.configSchema) == null ? void 0 : F[T]) == null ? void 0 : k.order, U = (j = c[T]) == null ? void 0 : j.order;
|
|
3086
3094
|
let q = $;
|
|
3087
|
-
(U || U === 0) && (q = U === -1 ? $ + 1 : U), w && (q = w === -1 ? $ + 1 : w),
|
|
3095
|
+
(U || U === 0) && (q = U === -1 ? $ + 1 : U), w && (q = w === -1 ? $ + 1 : w), y.push([T, q]);
|
|
3088
3096
|
}
|
|
3089
|
-
return
|
|
3097
|
+
return y.sort(function(T, w) {
|
|
3090
3098
|
return T[1] - w[1];
|
|
3091
|
-
}),
|
|
3099
|
+
}), y.map((T) => {
|
|
3092
3100
|
var pe, at;
|
|
3093
|
-
const w = T[0], U = (pe =
|
|
3101
|
+
const w = T[0], U = (pe = g.value) == null ? void 0 : pe[w], q = ((at = r.configSchema) == null ? void 0 : at[w]) || {}, J = c[w];
|
|
3094
3102
|
return {
|
|
3095
3103
|
key: w,
|
|
3096
3104
|
value: U,
|
|
@@ -3101,13 +3109,13 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3101
3109
|
section: q.section ?? ((J == null ? void 0 : J.section) || ne.Advanced)
|
|
3102
3110
|
};
|
|
3103
3111
|
}).filter((T) => !T.hidden && T.key !== r.pluginConfigKey);
|
|
3104
|
-
}), M =
|
|
3105
|
-
var
|
|
3106
|
-
if (!
|
|
3112
|
+
}), M = A(() => {
|
|
3113
|
+
var k, j;
|
|
3114
|
+
if (!g.value || !r.pluginConfigKey)
|
|
3107
3115
|
return [];
|
|
3108
|
-
const
|
|
3109
|
-
for (const T in
|
|
3110
|
-
const w = (j = (
|
|
3116
|
+
const y = g.value[r.pluginConfigKey] || {}, $ = Object.keys(y).length, F = [];
|
|
3117
|
+
for (const T in y) {
|
|
3118
|
+
const w = (j = (k = r.pluginConfigSchema) == null ? void 0 : k[T]) == null ? void 0 : j.order, U = y[T];
|
|
3111
3119
|
let q = U != null && U !== "" ? $ - 1 : $;
|
|
3112
3120
|
w && (q = w === -1 ? $ + 1 : w), F.push([T, q]);
|
|
3113
3121
|
}
|
|
@@ -3115,7 +3123,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3115
3123
|
return T[1] - w[1];
|
|
3116
3124
|
}), F.map((T) => {
|
|
3117
3125
|
var J;
|
|
3118
|
-
const w = T[0], U =
|
|
3126
|
+
const w = T[0], U = y[w], q = ((J = r.pluginConfigSchema) == null ? void 0 : J[w]) || {};
|
|
3119
3127
|
return {
|
|
3120
3128
|
key: w,
|
|
3121
3129
|
value: U,
|
|
@@ -3126,52 +3134,52 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3126
3134
|
section: ne.Plugin
|
|
3127
3135
|
};
|
|
3128
3136
|
}).filter((T) => !T.hidden);
|
|
3129
|
-
}), E =
|
|
3130
|
-
var
|
|
3137
|
+
}), E = A(() => {
|
|
3138
|
+
var y, $, F, k;
|
|
3131
3139
|
return {
|
|
3132
|
-
basic: (
|
|
3133
|
-
advanced: ($ =
|
|
3134
|
-
plugin: (
|
|
3140
|
+
basic: (y = _.value) == null ? void 0 : y.filter((j) => j.section === ne.Basic),
|
|
3141
|
+
advanced: ($ = _.value) == null ? void 0 : $.filter((j) => j.section === ne.Advanced),
|
|
3142
|
+
plugin: (k = M.value) == null ? void 0 : k.concat((F = _.value) == null ? void 0 : F.filter((j) => j.section === ne.Plugin))
|
|
3135
3143
|
};
|
|
3136
|
-
}), ee =
|
|
3137
|
-
const
|
|
3138
|
-
return E.value.basic.length &&
|
|
3139
|
-
}), m =
|
|
3144
|
+
}), ee = A(() => {
|
|
3145
|
+
const y = [];
|
|
3146
|
+
return E.value.basic.length && y.push("basic"), E.value.advanced.length && y.push("advanced"), E.value.plugin.length && y.push("plugin"), y;
|
|
3147
|
+
}), m = A(() => {
|
|
3140
3148
|
var $, F;
|
|
3141
|
-
let
|
|
3142
|
-
return r.config.app === "konnect" ?
|
|
3149
|
+
let y = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3150
|
+
return r.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, (($ = r.config) == null ? void 0 : $.controlPlaneId) || "") : r.config.app === "kongManager" && (y = y.replace(/\/{workspace}/gi, (F = r.config) != null && F.workspace ? `/${r.config.workspace}` : "")), y = y.replace(/{id}/gi, r.config.entityId), y;
|
|
3143
3151
|
});
|
|
3144
|
-
return Ae(p, (
|
|
3145
|
-
n("loading",
|
|
3152
|
+
return Ae(p, (y) => {
|
|
3153
|
+
n("loading", y);
|
|
3146
3154
|
}, { immediate: !0 }), Ft(async () => {
|
|
3147
3155
|
f.value = !1, p.value = !0;
|
|
3148
3156
|
try {
|
|
3149
|
-
const { data:
|
|
3157
|
+
const { data: y } = await l.get(m.value);
|
|
3150
3158
|
if (r.dataKey)
|
|
3151
|
-
if (typeof
|
|
3152
|
-
|
|
3159
|
+
if (typeof y[r.dataKey] < "u")
|
|
3160
|
+
g.value = { ...y[r.dataKey] };
|
|
3153
3161
|
else
|
|
3154
3162
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3155
3163
|
else
|
|
3156
|
-
|
|
3164
|
+
g.value = { ...y };
|
|
3157
3165
|
Object.keys(r.configSchema).filter((F) => r.configSchema[F].forceShow).forEach((F) => {
|
|
3158
|
-
|
|
3159
|
-
}), n("fetch:success",
|
|
3160
|
-
} catch (
|
|
3161
|
-
const $ = a(
|
|
3162
|
-
b.value = $.startsWith("code") ? i("baseConfigCard.errors.load") : $, f.value = !0, n("fetch:error",
|
|
3166
|
+
g.value && typeof g.value[F] > "u" && (g.value[F] = null);
|
|
3167
|
+
}), n("fetch:success", y);
|
|
3168
|
+
} catch (y) {
|
|
3169
|
+
const $ = a(y);
|
|
3170
|
+
b.value = $.startsWith("code") ? i("baseConfigCard.errors.load") : $, f.value = !0, n("fetch:error", y);
|
|
3163
3171
|
} finally {
|
|
3164
3172
|
p.value = !1;
|
|
3165
3173
|
}
|
|
3166
|
-
}), (
|
|
3167
|
-
const F = B("KLabel"),
|
|
3174
|
+
}), (y, $) => {
|
|
3175
|
+
const F = B("KLabel"), k = B("KSelect"), j = B("KButton"), T = B("KSkeleton"), w = B("KEmptyState"), U = B("KCard");
|
|
3168
3176
|
return h(), K(U, {
|
|
3169
3177
|
class: "kong-ui-entity-base-config-card",
|
|
3170
3178
|
"title-tag": e.titleTag
|
|
3171
3179
|
}, _e({
|
|
3172
3180
|
actions: x(() => [
|
|
3173
3181
|
L("div", zo, [
|
|
3174
|
-
Y(
|
|
3182
|
+
Y(y.$slots, "actions", {}, void 0, !0),
|
|
3175
3183
|
N(F, {
|
|
3176
3184
|
class: "config-format-select-label",
|
|
3177
3185
|
"data-testid": "config-format-select-label"
|
|
@@ -3181,7 +3189,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3181
3189
|
]),
|
|
3182
3190
|
_: 1
|
|
3183
3191
|
}),
|
|
3184
|
-
N(
|
|
3192
|
+
N(k, {
|
|
3185
3193
|
"data-testid": "select-config-format",
|
|
3186
3194
|
items: s,
|
|
3187
3195
|
onChange: d
|
|
@@ -3228,12 +3236,12 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3228
3236
|
format: u.value,
|
|
3229
3237
|
"prop-list-types": ee.value,
|
|
3230
3238
|
"property-collections": E.value,
|
|
3231
|
-
record:
|
|
3239
|
+
record: g.value
|
|
3232
3240
|
}, _e({ _: 2 }, [
|
|
3233
|
-
ie(Object.keys(
|
|
3241
|
+
ie(Object.keys(y.$slots), (q) => ({
|
|
3234
3242
|
name: q,
|
|
3235
3243
|
fn: x(({ row: J, rowValue: pe }) => [
|
|
3236
|
-
Y(
|
|
3244
|
+
Y(y.$slots, q, {
|
|
3237
3245
|
row: J,
|
|
3238
3246
|
rowValue: pe
|
|
3239
3247
|
}, void 0, !0)
|
|
@@ -3248,7 +3256,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3248
3256
|
name: "title",
|
|
3249
3257
|
fn: x(() => [
|
|
3250
3258
|
L("span", Yo, [
|
|
3251
|
-
Y(
|
|
3259
|
+
Y(y.$slots, "title", {}, () => [
|
|
3252
3260
|
V(O(I(i)("baseConfigCard.title")), 1)
|
|
3253
3261
|
], !0)
|
|
3254
3262
|
])
|
|
@@ -3258,7 +3266,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3258
3266
|
]), 1032, ["title-tag"]);
|
|
3259
3267
|
};
|
|
3260
3268
|
}
|
|
3261
|
-
}), Dl = /* @__PURE__ */ re(Go, [["__scopeId", "data-v-
|
|
3269
|
+
}), Dl = /* @__PURE__ */ re(Go, [["__scopeId", "data-v-3c3b1eb5"]]), Zo = {
|
|
3262
3270
|
class: "form-actions",
|
|
3263
3271
|
"data-testid": "form-actions"
|
|
3264
3272
|
}, Qo = /* @__PURE__ */ H({
|
|
@@ -3316,15 +3324,17 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3316
3324
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3317
3325
|
setup(e, { emit: t }) {
|
|
3318
3326
|
var ee;
|
|
3319
|
-
const n = t, r = e, i = Mn(), { i18n: { t: a } } = z.useI18n(), { getMessageFromError: o } = z.useErrors(), { axiosInstance: l } = z.useAxios(
|
|
3320
|
-
|
|
3327
|
+
const n = t, r = e, i = Mn(), { i18n: { t: a } } = z.useI18n(), { getMessageFromError: o } = z.useErrors(), { axiosInstance: l } = z.useAxios({
|
|
3328
|
+
headers: (ee = r.config) == null ? void 0 : ee.requestHeaders
|
|
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;
|
|
3321
3331
|
let m = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3322
|
-
return r.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((
|
|
3332
|
+
return r.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((v = r.config) == null ? void 0 : v.controlPlaneId) || "") : r.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (y = r.config) != null && y.workspace ? `/${r.config.workspace}` : "")), r.editId ? (m = m.replace(/{id}/gi, r.editId), m) : (m = m.replace(/\/{id}/gi, ""), m);
|
|
3323
3333
|
}), b = () => {
|
|
3324
3334
|
p.value = !p.value;
|
|
3325
|
-
},
|
|
3326
|
-
r.config.cancelRoute ? i.push(r.config.cancelRoute) :
|
|
3327
|
-
},
|
|
3335
|
+
}, g = () => {
|
|
3336
|
+
r.config.cancelRoute ? i.push(r.config.cancelRoute) : _();
|
|
3337
|
+
}, _ = () => {
|
|
3328
3338
|
n("cancel");
|
|
3329
3339
|
}, M = () => {
|
|
3330
3340
|
c.value || n("submit");
|
|
@@ -3347,16 +3357,16 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3347
3357
|
const { data: m } = await l.get(f.value);
|
|
3348
3358
|
n("fetch:success", m);
|
|
3349
3359
|
} catch (m) {
|
|
3350
|
-
const
|
|
3351
|
-
d.value =
|
|
3360
|
+
const v = o(m);
|
|
3361
|
+
d.value = v.startsWith("code") ? a("baseForm.errors.edit") : v, u.value = !0, n("fetch:error", m);
|
|
3352
3362
|
} finally {
|
|
3353
3363
|
s.value = !1;
|
|
3354
3364
|
}
|
|
3355
|
-
}), (m,
|
|
3356
|
-
const
|
|
3365
|
+
}), (m, v) => {
|
|
3366
|
+
const y = B("KSkeleton"), $ = B("KEmptyState"), F = B("KAlert"), k = B("KButton"), j = B("KTabs"), T = B("KSlideout"), w = B("KCard");
|
|
3357
3367
|
return h(), K(w, { class: "kong-ui-entity-base-form" }, {
|
|
3358
3368
|
default: x(() => [
|
|
3359
|
-
s.value ? (h(), K(
|
|
3369
|
+
s.value ? (h(), K(y, {
|
|
3360
3370
|
key: 0,
|
|
3361
3371
|
type: "form"
|
|
3362
3372
|
})) : u.value ? (h(), K($, {
|
|
@@ -3364,7 +3374,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3364
3374
|
"action-button-text": I(a)("baseForm.actions.back"),
|
|
3365
3375
|
"data-testid": "form-fetch-error",
|
|
3366
3376
|
"icon-variant": "error",
|
|
3367
|
-
onClickAction:
|
|
3377
|
+
onClickAction: g
|
|
3368
3378
|
}, {
|
|
3369
3379
|
default: x(() => [
|
|
3370
3380
|
L("h3", null, O(d.value), 1)
|
|
@@ -3373,7 +3383,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3373
3383
|
}, 8, ["action-button-text"])) : (h(), S("form", {
|
|
3374
3384
|
key: 2,
|
|
3375
3385
|
"data-testid": "form-content",
|
|
3376
|
-
onReset: Ve(
|
|
3386
|
+
onReset: Ve(_, ["prevent"]),
|
|
3377
3387
|
onSubmit: Ve(M, ["prevent"])
|
|
3378
3388
|
}, [
|
|
3379
3389
|
Y(m.$slots, "default", {}, void 0, !0),
|
|
@@ -3385,17 +3395,17 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3385
3395
|
}, null, 8, ["message"])) : D("", !0),
|
|
3386
3396
|
L("div", Zo, [
|
|
3387
3397
|
Y(m.$slots, "form-actions", {}, () => [
|
|
3388
|
-
N(
|
|
3398
|
+
N(k, {
|
|
3389
3399
|
appearance: "tertiary",
|
|
3390
3400
|
"data-testid": "form-view-configuration",
|
|
3391
|
-
onClick:
|
|
3401
|
+
onClick: v[0] || (v[0] = (U) => b())
|
|
3392
3402
|
}, {
|
|
3393
3403
|
default: x(() => [
|
|
3394
3404
|
V(O(I(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3395
3405
|
]),
|
|
3396
3406
|
_: 1
|
|
3397
3407
|
}),
|
|
3398
|
-
N(
|
|
3408
|
+
N(k, {
|
|
3399
3409
|
appearance: "secondary",
|
|
3400
3410
|
"data-testid": "form-cancel",
|
|
3401
3411
|
disabled: e.isReadonly,
|
|
@@ -3406,7 +3416,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3406
3416
|
]),
|
|
3407
3417
|
_: 1
|
|
3408
3418
|
}, 8, ["disabled"]),
|
|
3409
|
-
N(
|
|
3419
|
+
N(k, {
|
|
3410
3420
|
appearance: "primary",
|
|
3411
3421
|
"data-testid": "form-submit",
|
|
3412
3422
|
disabled: c.value,
|
|
@@ -3427,7 +3437,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3427
3437
|
"offset-top": 60,
|
|
3428
3438
|
title: I(a)("baseForm.configuration.title"),
|
|
3429
3439
|
visible: p.value,
|
|
3430
|
-
onClose:
|
|
3440
|
+
onClose: v[1] || (v[1] = (U) => b())
|
|
3431
3441
|
}, {
|
|
3432
3442
|
default: x(() => [
|
|
3433
3443
|
L("div", null, O(I(a)("baseForm.configuration.message")), 1),
|
|
@@ -3458,7 +3468,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3458
3468
|
});
|
|
3459
3469
|
};
|
|
3460
3470
|
}
|
|
3461
|
-
}), jl = /* @__PURE__ */ re(Qo, [["__scopeId", "data-v-
|
|
3471
|
+
}), jl = /* @__PURE__ */ re(Qo, [["__scopeId", "data-v-4c62c7d5"]]), Xo = {
|
|
3462
3472
|
key: 0,
|
|
3463
3473
|
"data-testid": "first-col"
|
|
3464
3474
|
}, el = /* @__PURE__ */ H({
|
|
@@ -3474,43 +3484,43 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3474
3484
|
}
|
|
3475
3485
|
},
|
|
3476
3486
|
setup(e) {
|
|
3477
|
-
const t = e, n =
|
|
3478
|
-
var
|
|
3479
|
-
return ((
|
|
3480
|
-
}), r =
|
|
3481
|
-
var
|
|
3482
|
-
return ((
|
|
3483
|
-
}), i =
|
|
3484
|
-
var
|
|
3485
|
-
const
|
|
3486
|
-
return
|
|
3487
|
+
const t = e, n = A(() => {
|
|
3488
|
+
var g;
|
|
3489
|
+
return ((g = t.rowEl) == null ? void 0 : g.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3490
|
+
}), r = A(() => {
|
|
3491
|
+
var g;
|
|
3492
|
+
return ((g = n.value) == null ? void 0 : g.querySelector('[data-testid="first-col"]')) || null;
|
|
3493
|
+
}), i = A(() => {
|
|
3494
|
+
var _, M;
|
|
3495
|
+
const g = (_ = t.rowEl) == null ? void 0 : _.querySelectorAll("td");
|
|
3496
|
+
return g ? ((M = g[0]) == null ? void 0 : M.getAttribute("data-testid")) === t.keyName : !1;
|
|
3487
3497
|
});
|
|
3488
3498
|
let a;
|
|
3489
3499
|
const o = () => {
|
|
3490
3500
|
a && (a.disconnect(), a = void 0);
|
|
3491
3501
|
}, l = () => {
|
|
3492
|
-
var
|
|
3493
|
-
u.value = ((
|
|
3494
|
-
}, s = R({}), u = R(0), d = R(0), c = R(""), p =
|
|
3502
|
+
var g, _, M;
|
|
3503
|
+
u.value = ((g = r.value) == null ? void 0 : g.getBoundingClientRect().width) || 0, d.value = ((_ = n.value) == null ? void 0 : _.clientWidth) || 0, c.value = ((M = s.value) == null ? void 0 : M.innerText) || "";
|
|
3504
|
+
}, s = R({}), u = R(0), d = R(0), c = R(""), p = A(() => [r.value, n.value]), f = Ae(
|
|
3495
3505
|
p,
|
|
3496
|
-
(
|
|
3506
|
+
(g) => {
|
|
3497
3507
|
if (i.value && (o(), "ResizeObserver" in window && window)) {
|
|
3498
|
-
a = new ResizeObserver((
|
|
3508
|
+
a = new ResizeObserver((_) => {
|
|
3499
3509
|
window.requestAnimationFrame(() => {
|
|
3500
|
-
!Array.isArray(
|
|
3510
|
+
!Array.isArray(_) || !_.length || l();
|
|
3501
3511
|
});
|
|
3502
3512
|
});
|
|
3503
|
-
for (const
|
|
3504
|
-
|
|
3513
|
+
for (const _ of g)
|
|
3514
|
+
_ && a.observe(_);
|
|
3505
3515
|
}
|
|
3506
3516
|
},
|
|
3507
3517
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3508
|
-
), b =
|
|
3518
|
+
), b = A(() => i.value ? u.value > d.value : !1);
|
|
3509
3519
|
return On(() => {
|
|
3510
3520
|
l();
|
|
3511
3521
|
}), $n(() => {
|
|
3512
3522
|
f();
|
|
3513
|
-
}), (
|
|
3523
|
+
}), (g, _) => {
|
|
3514
3524
|
const M = B("KTooltip");
|
|
3515
3525
|
return h(), S("span", {
|
|
3516
3526
|
ref_key: "contentRef",
|
|
@@ -3524,11 +3534,11 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3524
3534
|
text: b.value ? c.value : ""
|
|
3525
3535
|
}, {
|
|
3526
3536
|
default: x(() => [
|
|
3527
|
-
Y(
|
|
3537
|
+
Y(g.$slots, "default", {}, void 0, !0)
|
|
3528
3538
|
]),
|
|
3529
3539
|
_: 3
|
|
3530
3540
|
}, 8, ["text"])
|
|
3531
|
-
])) : Y(
|
|
3541
|
+
])) : Y(g.$slots, "default", { key: 1 }, void 0, !0)
|
|
3532
3542
|
], 512);
|
|
3533
3543
|
};
|
|
3534
3544
|
}
|
|
@@ -3649,66 +3659,66 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3649
3659
|
},
|
|
3650
3660
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3651
3661
|
setup(e, { emit: t }) {
|
|
3652
|
-
const n = e, r = t, { i18n: { t: i } } = z.useI18n(), a =
|
|
3653
|
-
var
|
|
3662
|
+
const n = e, r = t, { i18n: { t: i } } = z.useI18n(), a = A(() => {
|
|
3663
|
+
var v, y;
|
|
3654
3664
|
return typeof n.errorMessage == "string" ? {
|
|
3655
3665
|
hasError: !!n.errorMessage,
|
|
3656
3666
|
title: n.errorMessage,
|
|
3657
3667
|
message: void 0
|
|
3658
3668
|
} : {
|
|
3659
3669
|
hasError: !!n.errorMessage,
|
|
3660
|
-
title: (
|
|
3661
|
-
message: (
|
|
3670
|
+
title: (v = n.errorMessage) == null ? void 0 : v.title,
|
|
3671
|
+
message: (y = n.errorMessage) == null ? void 0 : y.message
|
|
3662
3672
|
};
|
|
3663
|
-
}), o =
|
|
3664
|
-
const
|
|
3673
|
+
}), o = A(() => n.cacheIdentifier || n.preferencesStorageKey), l = (v) => v.hasData || !!n.query, s = A(() => {
|
|
3674
|
+
const v = [];
|
|
3665
3675
|
return Object.keys(n.tableHeaders).forEach(($) => {
|
|
3666
3676
|
const F = n.tableHeaders[$];
|
|
3667
|
-
|
|
3677
|
+
v.push({
|
|
3668
3678
|
label: F.label ?? $,
|
|
3669
3679
|
key: $,
|
|
3670
3680
|
sortable: F.sortable ?? !1
|
|
3671
3681
|
});
|
|
3672
|
-
}), n.enableEntityActions &&
|
|
3682
|
+
}), n.enableEntityActions && v.push({
|
|
3673
3683
|
key: "actions",
|
|
3674
3684
|
hideLabel: !0
|
|
3675
|
-
}),
|
|
3676
|
-
}), u = (
|
|
3677
|
-
"data-rowid":
|
|
3678
|
-
"data-testid":
|
|
3679
|
-
...n.rowAttributes(
|
|
3680
|
-
}), d = R({}), c = (
|
|
3681
|
-
var
|
|
3682
|
-
return (
|
|
3683
|
-
}, p = (
|
|
3684
|
-
const
|
|
3685
|
-
"data-testid":
|
|
3686
|
-
...n.cellAttributes(
|
|
3685
|
+
}), v;
|
|
3686
|
+
}), u = (v) => ({
|
|
3687
|
+
"data-rowid": v.id,
|
|
3688
|
+
"data-testid": v.name,
|
|
3689
|
+
...n.rowAttributes(v)
|
|
3690
|
+
}), d = R({}), c = (v) => {
|
|
3691
|
+
var y;
|
|
3692
|
+
return (y = d.value) == null ? void 0 : y.$el.querySelector(`[data-rowid="${v.id}"]`);
|
|
3693
|
+
}, p = (v) => {
|
|
3694
|
+
const y = {
|
|
3695
|
+
"data-testid": v.headerKey,
|
|
3696
|
+
...n.cellAttributes(v)
|
|
3687
3697
|
};
|
|
3688
|
-
return
|
|
3698
|
+
return v.colIndex === 0 && (y.style = {
|
|
3689
3699
|
maxWidth: "250px",
|
|
3690
3700
|
overflowX: "hidden",
|
|
3691
3701
|
textOverflow: "ellipsis"
|
|
3692
|
-
}),
|
|
3702
|
+
}), y;
|
|
3693
3703
|
}, f = () => {
|
|
3694
3704
|
r("empty-state-cta-clicked"), b();
|
|
3695
3705
|
}, b = () => {
|
|
3696
3706
|
r("clear-search-input");
|
|
3697
|
-
},
|
|
3698
|
-
r("click:row",
|
|
3699
|
-
}),
|
|
3700
|
-
r("sort",
|
|
3701
|
-
}, { setTablePreferences: M, getTablePreferences: E } = Hn(), ee =
|
|
3702
|
-
const
|
|
3707
|
+
}, g = A(() => n.disableRowClick ? void 0 : (v, y) => {
|
|
3708
|
+
r("click:row", y);
|
|
3709
|
+
}), _ = (v) => {
|
|
3710
|
+
r("sort", v);
|
|
3711
|
+
}, { setTablePreferences: M, getTablePreferences: E } = Hn(), ee = A(() => {
|
|
3712
|
+
const v = E(n.preferencesStorageKey);
|
|
3703
3713
|
return {
|
|
3704
3714
|
...n.initialFetcherParams,
|
|
3705
|
-
...
|
|
3715
|
+
...v
|
|
3706
3716
|
};
|
|
3707
|
-
}), m = (
|
|
3708
|
-
n.preferencesStorageKey && M(n.preferencesStorageKey,
|
|
3717
|
+
}), m = (v) => {
|
|
3718
|
+
n.preferencesStorageKey && M(n.preferencesStorageKey, v);
|
|
3709
3719
|
};
|
|
3710
|
-
return (
|
|
3711
|
-
const $ = B("KIcon"), F = B("KButton"),
|
|
3720
|
+
return (v, y) => {
|
|
3721
|
+
const $ = B("KIcon"), F = B("KButton"), k = B("KDropdown"), j = B("KTable"), T = B("KCard");
|
|
3712
3722
|
return h(), K(T, {
|
|
3713
3723
|
class: "kong-ui-entity-base-table",
|
|
3714
3724
|
title: e.title,
|
|
@@ -3741,15 +3751,15 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3741
3751
|
"row-attrs": u,
|
|
3742
3752
|
"search-input": e.query,
|
|
3743
3753
|
onKtableEmptyStateCtaClicked: f,
|
|
3744
|
-
"onRow:click":
|
|
3745
|
-
onSort:
|
|
3754
|
+
"onRow:click": g.value,
|
|
3755
|
+
onSort: y[0] || (y[0] = (w) => _(w)),
|
|
3746
3756
|
"onUpdate:tablePreferences": m
|
|
3747
3757
|
}, _e({
|
|
3748
3758
|
toolbar: x(({ state: w }) => [
|
|
3749
3759
|
he(L("div", nl, [
|
|
3750
|
-
Y(
|
|
3751
|
-
|
|
3752
|
-
Y(
|
|
3760
|
+
Y(v.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3761
|
+
v.$slots["toolbar-button"] ? (h(), S("div", rl, [
|
|
3762
|
+
Y(v.$slots, "toolbar-button", {}, void 0, !0)
|
|
3753
3763
|
])) : D("", !0)
|
|
3754
3764
|
], 512), [
|
|
3755
3765
|
[me, l(w)]
|
|
@@ -3760,12 +3770,12 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3760
3770
|
class: "actions-container",
|
|
3761
3771
|
"data-testid": w.name
|
|
3762
3772
|
}, [
|
|
3763
|
-
N(
|
|
3773
|
+
N(k, {
|
|
3764
3774
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3765
3775
|
width: e.dropdownMenuWidth
|
|
3766
3776
|
}, {
|
|
3767
3777
|
items: x(() => [
|
|
3768
|
-
Y(
|
|
3778
|
+
Y(v.$slots, "actions", {
|
|
3769
3779
|
row: w,
|
|
3770
3780
|
rowKey: U,
|
|
3771
3781
|
rowValue: q
|
|
@@ -3801,7 +3811,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3801
3811
|
"row-el": c(q)
|
|
3802
3812
|
}, {
|
|
3803
3813
|
default: x(() => [
|
|
3804
|
-
Y(
|
|
3814
|
+
Y(v.$slots, U, {
|
|
3805
3815
|
row: q,
|
|
3806
3816
|
rowKey: J,
|
|
3807
3817
|
rowValue: pe
|
|
@@ -3871,7 +3881,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3871
3881
|
},
|
|
3872
3882
|
emits: ["cancel", "proceed"],
|
|
3873
3883
|
setup(e, { emit: t }) {
|
|
3874
|
-
const { i18nT: n } = z.useI18n(), r = e, i = t, a =
|
|
3884
|
+
const { i18nT: n } = z.useI18n(), r = e, i = t, a = A(() => r.needConfirm ? r.entityName : ""), o = () => {
|
|
3875
3885
|
i("cancel");
|
|
3876
3886
|
}, l = () => {
|
|
3877
3887
|
i("proceed");
|
|
@@ -3988,22 +3998,22 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
3988
3998
|
},
|
|
3989
3999
|
emits: ["update:modelValue"],
|
|
3990
4000
|
setup(e, { emit: t }) {
|
|
3991
|
-
const { i18n: { t: n } } = z.useI18n(), r = e, i = t, a = R(!1), o = R({}), l = R(/* @__PURE__ */ new Set()), s =
|
|
4001
|
+
const { i18n: { t: n } } = z.useI18n(), r = e, i = t, a = R(!1), o = R({}), l = R(/* @__PURE__ */ new Set()), s = A(() => {
|
|
3992
4002
|
const m = [];
|
|
3993
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
3994
|
-
|
|
4003
|
+
return new URLSearchParams(r.modelValue).forEach((v, y) => {
|
|
4004
|
+
v !== "" && m.push(y);
|
|
3995
4005
|
}), m;
|
|
3996
|
-
}), u =
|
|
4006
|
+
}), u = A(() => {
|
|
3997
4007
|
const m = r.config.fields;
|
|
3998
|
-
return Object.keys(m).filter((
|
|
3999
|
-
label: m[
|
|
4000
|
-
value:
|
|
4008
|
+
return Object.keys(m).filter((v) => m[v].searchable).map((v) => ({
|
|
4009
|
+
label: m[v].label || v,
|
|
4010
|
+
value: v,
|
|
4001
4011
|
expanded: !1
|
|
4002
4012
|
}));
|
|
4003
4013
|
});
|
|
4004
4014
|
Ae(() => r.modelValue, (m) => {
|
|
4005
|
-
o.value = {}, new URLSearchParams(m).forEach((
|
|
4006
|
-
o.value[
|
|
4015
|
+
o.value = {}, new URLSearchParams(m).forEach((v, y) => {
|
|
4016
|
+
o.value[y] = v;
|
|
4007
4017
|
});
|
|
4008
4018
|
});
|
|
4009
4019
|
const d = () => {
|
|
@@ -4014,15 +4024,15 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4014
4024
|
i("update:modelValue", m);
|
|
4015
4025
|
}, f = () => {
|
|
4016
4026
|
p("");
|
|
4017
|
-
}, b = (m) => `filter-${m}`,
|
|
4018
|
-
var
|
|
4019
|
-
return (((
|
|
4027
|
+
}, b = (m) => `filter-${m}`, g = (m) => {
|
|
4028
|
+
var v, y;
|
|
4029
|
+
return (((y = (v = r.config.schema) == null ? void 0 : v[m]) == null ? void 0 : y.values) ?? []).map(($) => ({
|
|
4020
4030
|
value: $,
|
|
4021
4031
|
label: $
|
|
4022
4032
|
}));
|
|
4023
|
-
},
|
|
4024
|
-
var
|
|
4025
|
-
return ((
|
|
4033
|
+
}, _ = (m) => {
|
|
4034
|
+
var v, y;
|
|
4035
|
+
return ((y = (v = r.config.schema) == null ? void 0 : v[m]) == null ? void 0 : y.type) ?? "text";
|
|
4026
4036
|
}, M = (m) => {
|
|
4027
4037
|
o.value = {
|
|
4028
4038
|
...o.value,
|
|
@@ -4031,12 +4041,12 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4031
4041
|
}, E = () => {
|
|
4032
4042
|
o.value = {}, ee(!0);
|
|
4033
4043
|
}, ee = (m = !1) => {
|
|
4034
|
-
const
|
|
4035
|
-
m && (a.value = !1), i("update:modelValue", new URLSearchParams(
|
|
4044
|
+
const v = Object.keys(o.value).reduce((y, $) => (o.value[$] && (y[$] = `${o.value[$]}`), y), {});
|
|
4045
|
+
m && (a.value = !1), i("update:modelValue", new URLSearchParams(v).toString());
|
|
4036
4046
|
};
|
|
4037
|
-
return (m,
|
|
4038
|
-
const
|
|
4039
|
-
return e.config.isExactMatch ? (h(), K(
|
|
4047
|
+
return (m, v) => {
|
|
4048
|
+
const y = B("KInput"), $ = B("KButton"), F = B("KSelect");
|
|
4049
|
+
return e.config.isExactMatch ? (h(), K(y, {
|
|
4040
4050
|
key: 0,
|
|
4041
4051
|
autocomplete: "off",
|
|
4042
4052
|
class: "kong-ui-entity-filter-input",
|
|
@@ -4076,59 +4086,59 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4076
4086
|
[me, a.value]
|
|
4077
4087
|
]),
|
|
4078
4088
|
he(L("div", ml, [
|
|
4079
|
-
(h(!0), S(le, null, ie(u.value, (
|
|
4089
|
+
(h(!0), S(le, null, ie(u.value, (k) => {
|
|
4080
4090
|
var j, T;
|
|
4081
4091
|
return h(), S("div", {
|
|
4082
|
-
key:
|
|
4092
|
+
key: k.value,
|
|
4083
4093
|
class: "kong-ui-entity-filter-menu-item",
|
|
4084
|
-
"data-testid":
|
|
4094
|
+
"data-testid": k.value
|
|
4085
4095
|
}, [
|
|
4086
4096
|
L("span", {
|
|
4087
|
-
class: ue(["menu-item-title", { expanded: l.value.has(
|
|
4097
|
+
class: ue(["menu-item-title", { expanded: l.value.has(k.value) }]),
|
|
4088
4098
|
role: "button",
|
|
4089
4099
|
tabindex: "0",
|
|
4090
|
-
onClick: (w) => c(
|
|
4091
|
-
onKeydown: Ln((w) => c(
|
|
4100
|
+
onClick: (w) => c(k.value),
|
|
4101
|
+
onKeydown: Ln((w) => c(k.value), ["enter"])
|
|
4092
4102
|
}, [
|
|
4093
|
-
V(O(
|
|
4103
|
+
V(O(k.label) + " ", 1),
|
|
4094
4104
|
he(L("span", vl, null, 512), [
|
|
4095
|
-
[me, s.value.includes(
|
|
4105
|
+
[me, s.value.includes(k.value)]
|
|
4096
4106
|
]),
|
|
4097
4107
|
N(I(Lo), {
|
|
4098
|
-
class: ue(["menu-item-expand-icon", { expanded: l.value.has(
|
|
4108
|
+
class: ue(["menu-item-expand-icon", { expanded: l.value.has(k.value) }]),
|
|
4099
4109
|
color: I(Ar)
|
|
4100
4110
|
}, null, 8, ["class", "color"])
|
|
4101
4111
|
], 42, yl),
|
|
4102
4112
|
he(L("div", bl, [
|
|
4103
4113
|
L("label", {
|
|
4104
4114
|
class: "menu-item-label",
|
|
4105
|
-
for: b(
|
|
4115
|
+
for: b(k.value)
|
|
4106
4116
|
}, O(I(n)("filter.fieldLabel")), 9, xl),
|
|
4107
|
-
((T = (j = e.config.schema) == null ? void 0 : j[
|
|
4117
|
+
((T = (j = e.config.schema) == null ? void 0 : j[k.value]) == null ? void 0 : T.type) === "select" ? (h(), K(F, {
|
|
4108
4118
|
key: 0,
|
|
4109
|
-
id: b(
|
|
4110
|
-
modelValue: o.value[
|
|
4111
|
-
"onUpdate:modelValue": (w) => o.value[
|
|
4112
|
-
items:
|
|
4119
|
+
id: b(k.value),
|
|
4120
|
+
modelValue: o.value[k.value],
|
|
4121
|
+
"onUpdate:modelValue": (w) => o.value[k.value] = w,
|
|
4122
|
+
items: g(k.value),
|
|
4113
4123
|
placeholder: I(n)("filter.selectPlaceholder")
|
|
4114
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (h(), K(
|
|
4124
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (h(), K(y, {
|
|
4115
4125
|
key: 1,
|
|
4116
|
-
id: b(
|
|
4117
|
-
modelValue: o.value[
|
|
4118
|
-
"onUpdate:modelValue": (w) => o.value[
|
|
4126
|
+
id: b(k.value),
|
|
4127
|
+
modelValue: o.value[k.value],
|
|
4128
|
+
"onUpdate:modelValue": (w) => o.value[k.value] = w,
|
|
4119
4129
|
autocomplete: "off",
|
|
4120
4130
|
placeholder: I(n)("filter.inputPlaceholder"),
|
|
4121
|
-
type:
|
|
4131
|
+
type: _(k.value)
|
|
4122
4132
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4123
4133
|
], 512), [
|
|
4124
|
-
[me, l.value.has(
|
|
4134
|
+
[me, l.value.has(k.value)]
|
|
4125
4135
|
]),
|
|
4126
4136
|
he(L("div", Cl, [
|
|
4127
4137
|
N($, {
|
|
4128
4138
|
appearance: "tertiary",
|
|
4129
4139
|
"data-testid": "apply-filter",
|
|
4130
4140
|
size: "small",
|
|
4131
|
-
onClick:
|
|
4141
|
+
onClick: v[0] || (v[0] = (w) => ee(!0))
|
|
4132
4142
|
}, {
|
|
4133
4143
|
default: x(() => [
|
|
4134
4144
|
V(O(I(n)("filter.applyButtonText")), 1)
|
|
@@ -4139,7 +4149,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4139
4149
|
appearance: "tertiary",
|
|
4140
4150
|
"data-testid": "clear-filter",
|
|
4141
4151
|
size: "small",
|
|
4142
|
-
onClick: (w) => M(
|
|
4152
|
+
onClick: (w) => M(k.value)
|
|
4143
4153
|
}, {
|
|
4144
4154
|
default: x(() => [
|
|
4145
4155
|
V(O(I(n)("filter.clearButtonText")), 1)
|
|
@@ -4147,7 +4157,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4147
4157
|
_: 2
|
|
4148
4158
|
}, 1032, ["onClick"])
|
|
4149
4159
|
], 512), [
|
|
4150
|
-
[me, l.value.has(
|
|
4160
|
+
[me, l.value.has(k.value)]
|
|
4151
4161
|
])
|
|
4152
4162
|
], 8, gl);
|
|
4153
4163
|
}), 128)),
|
|
@@ -4201,9 +4211,9 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4201
4211
|
},
|
|
4202
4212
|
emits: ["cancel", "proceed"],
|
|
4203
4213
|
setup(e, { emit: t }) {
|
|
4204
|
-
const { i18n: { t: n }, i18nT: r } = z.useI18n(), i = e, a = t, o = R(!1), l =
|
|
4214
|
+
const { i18n: { t: n }, i18nT: r } = z.useI18n(), i = e, a = t, o = R(!1), l = A(
|
|
4205
4215
|
() => i.action === "enable" ? n("toggleModal.enable.title", { entityType: i.entityType }) : n("toggleModal.disable.title", { entityType: i.entityType })
|
|
4206
|
-
), s =
|
|
4216
|
+
), s = A(
|
|
4207
4217
|
() => i.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
4208
4218
|
), u = () => a("cancel"), d = async () => {
|
|
4209
4219
|
if (i.onConfirm) {
|
|
@@ -4270,7 +4280,7 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4270
4280
|
}
|
|
4271
4281
|
},
|
|
4272
4282
|
setup(e) {
|
|
4273
|
-
const t = e, n = R(void 0), r =
|
|
4283
|
+
const t = e, n = R(void 0), r = A(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4274
4284
|
return Ae(() => t.authFunction, async () => {
|
|
4275
4285
|
n.value = await t.authFunction();
|
|
4276
4286
|
}, { immediate: !0 }), (i, a) => r.value ? Y(i.$slots, "default", {
|
|
@@ -4376,13 +4386,13 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4376
4386
|
}
|
|
4377
4387
|
},
|
|
4378
4388
|
setup(e) {
|
|
4379
|
-
const t = e, n = R(), { isTruncated: r } = z.useTruncationDetector(n), { i18n: { t: i } } = z.useI18n(), a = i("global.actions.copyId"), o = R(a), l =
|
|
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 = A(() => t.entityLinkData.deleted ?? !1), s = A(() => t.entityLinkData.id.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id), u = A(() => `${s.value.toString().slice(0, 5)} (deleted)`), d = async (c) => {
|
|
4380
4390
|
await c(s.value || "") && (o.value = i("global.actions.copyToClipboard"), setTimeout(() => {
|
|
4381
4391
|
o.value = a;
|
|
4382
4392
|
}, 1800));
|
|
4383
4393
|
};
|
|
4384
4394
|
return (c, p) => {
|
|
4385
|
-
const f = B("KTooltip"), b = B("KExternalLink"),
|
|
4395
|
+
const f = B("KTooltip"), b = B("KExternalLink"), g = B("KClipboardProvider");
|
|
4386
4396
|
return h(), S("div", Tl, [
|
|
4387
4397
|
l.value ? (h(), S("div", Fl, O(u.value), 1)) : s.value ? s.value ? (h(), K(b, {
|
|
4388
4398
|
key: 2,
|
|
@@ -4415,11 +4425,11 @@ const co = { class: "yaml-config" }, Sn = /* @__PURE__ */ H({
|
|
|
4415
4425
|
text: o.value
|
|
4416
4426
|
}, {
|
|
4417
4427
|
default: x(() => [
|
|
4418
|
-
N(
|
|
4419
|
-
default: x(({ copyToClipboard:
|
|
4428
|
+
N(g, null, {
|
|
4429
|
+
default: x(({ copyToClipboard: _ }) => [
|
|
4420
4430
|
L("span", {
|
|
4421
4431
|
class: "entity-link-copy-id",
|
|
4422
|
-
onClick: Ve((M) => d(
|
|
4432
|
+
onClick: Ve((M) => d(_), ["stop"])
|
|
4423
4433
|
}, [
|
|
4424
4434
|
N(I(Vo), {
|
|
4425
4435
|
class: "copy-icon",
|