@kong-ui-public/entities-shared 3.3.1 → 3.3.2-pr.1446.3827ee81.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 +683 -688
- package/dist/entities-shared.umd.js +18 -18
- package/dist/style.css +1 -1
- package/dist/types/components/entity-base-table/EntityBaseTable.vue.d.ts.map +1 -1
- package/dist/types/components/entity-base-table/EntityBaseTableCell.vue.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject as
|
|
1
|
+
import { inject as $n, ref as B, unref as E, computed as k, watch as Ae, defineComponent as P, openBlock as h, createBlock as N, resolveDynamicComponent as se, normalizeClass as fe, withCtx as b, createElementBlock as w, createElementVNode as L, toDisplayString as O, createCommentVNode as K, Fragment as ce, renderList as oe, resolveComponent as M, createVNode as R, createTextVNode as V, useCssVars as Ot, useSlots as Xe, renderSlot as z, createSlots as _e, normalizeProps as Fn, guardReactiveProps as On, mergeProps as Ln, normalizeStyle as Se, pushScopeId as Ie, popScopeId as Ee, onBeforeMount as Lt, withModifiers as Ye, onMounted as Nn, onUnmounted as Bn, withDirectives as me, vShow as ge, withKeys as Rn, Teleport as Mn } from "vue";
|
|
2
2
|
import st from "axios";
|
|
3
3
|
import { createI18n as Kn, i18nTComponent as Dn } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as Un } from "@kong/kongponents";
|
|
@@ -8,7 +8,7 @@ function Hn() {
|
|
|
8
8
|
return {
|
|
9
9
|
getAxiosInstance: (e = {}) => {
|
|
10
10
|
try {
|
|
11
|
-
const t =
|
|
11
|
+
const t = $n("get-axios-instance", void 0);
|
|
12
12
|
return typeof t == "function" ? t(e) : st.create({
|
|
13
13
|
withCredentials: !0,
|
|
14
14
|
timeout: 3e4,
|
|
@@ -206,8 +206,8 @@ function Nt() {
|
|
|
206
206
|
return !1;
|
|
207
207
|
const l = /* @__PURE__ */ new Set([...a, ...o]);
|
|
208
208
|
for (const s of l) {
|
|
209
|
-
const
|
|
210
|
-
if (
|
|
209
|
+
const u = a.filter((c) => c === s).length, d = o.filter((c) => c === s).length;
|
|
210
|
+
if (u !== d)
|
|
211
211
|
return !1;
|
|
212
212
|
}
|
|
213
213
|
return !0;
|
|
@@ -238,8 +238,8 @@ function Nt() {
|
|
|
238
238
|
}
|
|
239
239
|
},
|
|
240
240
|
sortAlpha: (a) => (o, l) => {
|
|
241
|
-
let s = o[a] === void 0 || o[a] === null ? "" : o[a],
|
|
242
|
-
return Array.isArray(o[a]) && (s = o[a][0]), Array.isArray(l[a]) && (
|
|
241
|
+
let s = o[a] === void 0 || o[a] === null ? "" : o[a], u = l[a] === void 0 || l[a] === null ? "" : l[a];
|
|
242
|
+
return Array.isArray(o[a]) && (s = o[a][0]), Array.isArray(l[a]) && (u = l[a][0]), s.localeCompare(u);
|
|
243
243
|
},
|
|
244
244
|
isValidUuid: (a) => a ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(a) : !1
|
|
245
245
|
};
|
|
@@ -249,79 +249,79 @@ function ar(e, t, n, r = {
|
|
|
249
249
|
searchKeys: ["id"]
|
|
250
250
|
}) {
|
|
251
251
|
n || (n = "1000");
|
|
252
|
-
const { axiosInstance: i } = et(e.axiosRequestConfig), { i18n: { t: a } } = je(), { debounce: o } = Vn(), l = o(async (
|
|
253
|
-
await Z(
|
|
254
|
-
}, 200), s =
|
|
252
|
+
const { axiosInstance: i } = et(e.axiosRequestConfig), { i18n: { t: a } } = je(), { debounce: o } = Vn(), l = o(async (g) => {
|
|
253
|
+
await Z(g);
|
|
254
|
+
}, 200), s = B(!1), u = B(""), d = B(""), c = B([]), m = B([]), p = B(void 0), y = E(t);
|
|
255
255
|
let v = `${e.apiBaseUrl}${y}`;
|
|
256
256
|
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}` : ""));
|
|
257
|
-
const { isValidUuid:
|
|
257
|
+
const { isValidUuid: T } = Nt(), D = async () => {
|
|
258
258
|
try {
|
|
259
259
|
s.value = !0;
|
|
260
|
-
const { data:
|
|
261
|
-
|
|
260
|
+
const { data: g } = await i.get(`${v}?size=${n}`);
|
|
261
|
+
g != null && g.next || (p.value = r.fetchedItemsKey in g ? g[r.fetchedItemsKey] : []), m.value = r.fetchedItemsKey in g ? g[r.fetchedItemsKey] : [], c.value = m.value;
|
|
262
262
|
} catch {
|
|
263
|
-
|
|
263
|
+
c.value = [], u.value = a("debouncedFilter.errors.fetch");
|
|
264
264
|
} finally {
|
|
265
265
|
s.value = !1;
|
|
266
266
|
}
|
|
267
|
-
},
|
|
268
|
-
var
|
|
269
|
-
if (
|
|
270
|
-
if (
|
|
267
|
+
}, S = B(""), Z = async (g) => {
|
|
268
|
+
var A, f, I;
|
|
269
|
+
if (S.value !== g)
|
|
270
|
+
if (S.value = g || "", p.value === void 0)
|
|
271
271
|
try {
|
|
272
|
-
if (s.value = !0,
|
|
273
|
-
let
|
|
274
|
-
|
|
275
|
-
const { data: x } = await i.get(`${
|
|
276
|
-
r.fetchedItemsKey in x ?
|
|
277
|
-
} else if (
|
|
278
|
-
const
|
|
279
|
-
|
|
280
|
-
const { data:
|
|
281
|
-
return [
|
|
282
|
-
})()) :
|
|
283
|
-
...r.searchKeys.filter((
|
|
284
|
-
const { data:
|
|
285
|
-
return
|
|
272
|
+
if (s.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
273
|
+
let F = v + "";
|
|
274
|
+
g && (F += `/${g}`);
|
|
275
|
+
const { data: x } = await i.get(`${F}?size=${n}`);
|
|
276
|
+
r.fetchedItemsKey in x ? c.value = x[r.fetchedItemsKey] : x != null && x.id ? c.value = [x] : c.value = [];
|
|
277
|
+
} else if (g) {
|
|
278
|
+
const F = [];
|
|
279
|
+
T(g) && r.searchKeys.includes("id") ? F.push((async () => {
|
|
280
|
+
const { data: $ } = await i.get(`${v}/${g}`);
|
|
281
|
+
return [$[r.fetchedItemsKey] ?? $];
|
|
282
|
+
})()) : F.push(
|
|
283
|
+
...r.searchKeys.filter(($) => $ !== "id").map(async ($) => {
|
|
284
|
+
const { data: _ } = await i.get(`${v}?${$}=${g}`);
|
|
285
|
+
return _[r.fetchedItemsKey];
|
|
286
286
|
})
|
|
287
287
|
);
|
|
288
|
-
const x = await Promise.all(
|
|
289
|
-
|
|
290
|
-
var
|
|
291
|
-
(
|
|
292
|
-
U.has(q.id) || (U.add(q.id),
|
|
288
|
+
const x = await Promise.all(F), U = /* @__PURE__ */ new Set();
|
|
289
|
+
c.value = [], (A = x == null ? void 0 : x.forEach) == null || A.call(x, ($) => {
|
|
290
|
+
var _;
|
|
291
|
+
(_ = $ == null ? void 0 : $.forEach) == null || _.call($, (q) => {
|
|
292
|
+
U.has(q.id) || (U.add(q.id), c.value.push(q));
|
|
293
293
|
});
|
|
294
294
|
});
|
|
295
295
|
} else
|
|
296
|
-
|
|
297
|
-
} catch (
|
|
298
|
-
((f =
|
|
296
|
+
c.value = m.value;
|
|
297
|
+
} catch (F) {
|
|
298
|
+
((f = F == null ? void 0 : F.response) == null ? void 0 : f.status) === 404 ? d.value = a("debouncedFilter.errors.invalid") : (c.value = [], u.value = a("debouncedFilter.errors.fetch"));
|
|
299
299
|
} finally {
|
|
300
300
|
s.value = !1;
|
|
301
301
|
}
|
|
302
302
|
else
|
|
303
|
-
s.value = !0, d.value = "",
|
|
303
|
+
s.value = !0, d.value = "", g ? (c.value = (I = p.value) == null ? void 0 : I.filter((F) => {
|
|
304
304
|
var U;
|
|
305
305
|
let x = !1;
|
|
306
|
-
for (const
|
|
307
|
-
const
|
|
308
|
-
|
|
306
|
+
for (const $ of r.searchKeys) {
|
|
307
|
+
const _ = typeof F[$] == "string" ? (U = F[$]) == null ? void 0 : U.toLowerCase() : F[$];
|
|
308
|
+
_ != null && _.includes(g.toLowerCase()) && (x = !0);
|
|
309
309
|
}
|
|
310
310
|
return x;
|
|
311
|
-
}), (!
|
|
311
|
+
}), (!c.value || !c.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : c.value = p.value, s.value = !1;
|
|
312
312
|
};
|
|
313
313
|
return {
|
|
314
314
|
loading: s,
|
|
315
|
-
error:
|
|
315
|
+
error: u,
|
|
316
316
|
validationError: d,
|
|
317
|
-
results:
|
|
317
|
+
results: c,
|
|
318
318
|
allRecords: p,
|
|
319
|
-
loadItems:
|
|
319
|
+
loadItems: D,
|
|
320
320
|
debouncedQueryChange: l
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
323
|
function or(e, t) {
|
|
324
|
-
const n =
|
|
324
|
+
const n = E(t), r = k(
|
|
325
325
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
326
326
|
);
|
|
327
327
|
return r.value.search = "", (i) => `${r.value.href}/${i}`;
|
|
@@ -368,45 +368,45 @@ function sr(e) {
|
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
function Bt(e, t) {
|
|
371
|
-
const n =
|
|
371
|
+
const n = B(E(e)), r = B(E(t)), i = k(
|
|
372
372
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
373
373
|
), a = k(
|
|
374
374
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
375
375
|
);
|
|
376
376
|
return (o) => {
|
|
377
|
-
const { page: l, pageSize: s, offset:
|
|
377
|
+
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query: m } = o;
|
|
378
378
|
try {
|
|
379
379
|
let p = new URL(a.value.href);
|
|
380
|
-
return i.value &&
|
|
380
|
+
return i.value && m ? (p.search = "", p = n.value.isExactMatch ? new URL(`${p.href}/${m}/`) : new URL(`${p.href}?filter[name][contains]=${m}`)) : (i.value || new URLSearchParams(m).forEach((y, v) => {
|
|
381
381
|
p.searchParams.append(v, y);
|
|
382
|
-
}), d && p.searchParams.append("sort_by", d),
|
|
382
|
+
}), d && p.searchParams.append("sort_by", d), c === "desc" && p.searchParams.append("sort_desc", "1"), p.searchParams.append("size", String(s))), u && l !== 1 && p.searchParams.append("offset", String(u)), p.href;
|
|
383
383
|
} catch (p) {
|
|
384
384
|
return console.error("RouteList(fetcher)", p), r.value;
|
|
385
385
|
}
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
const r =
|
|
388
|
+
function cr(e, t, n = "data") {
|
|
389
|
+
const r = E(t), { axiosInstance: i } = et(e.axiosRequestConfig), a = Bt(e, r), o = B({
|
|
390
390
|
status: be.Idle
|
|
391
391
|
});
|
|
392
392
|
return { fetcher: async (s) => {
|
|
393
|
-
var
|
|
393
|
+
var u;
|
|
394
394
|
try {
|
|
395
395
|
o.value = { status: be.Loading };
|
|
396
396
|
let d = a(s);
|
|
397
397
|
d.includes("filter[name]") && (d = `${d}&page[size]=${s.pageSize}&page[number]=${s.page}`);
|
|
398
|
-
const
|
|
399
|
-
if (
|
|
400
|
-
throw
|
|
401
|
-
const
|
|
398
|
+
const c = await i.get(d);
|
|
399
|
+
if (c.status >= 400)
|
|
400
|
+
throw c;
|
|
401
|
+
const m = c.data, p = n && n.replace(/[^\w-_]/gi, "");
|
|
402
402
|
let y;
|
|
403
|
-
|
|
403
|
+
m[p] && Array.isArray(m[p]) ? y = m[p] : Array.isArray(m) ? y = m : y = Object.keys(m).length ? [m] : [];
|
|
404
404
|
const v = {
|
|
405
405
|
data: y,
|
|
406
406
|
total: y.length,
|
|
407
|
-
...
|
|
407
|
+
...m.offset ? {
|
|
408
408
|
pagination: {
|
|
409
|
-
offset:
|
|
409
|
+
offset: m.offset
|
|
410
410
|
}
|
|
411
411
|
} : null
|
|
412
412
|
};
|
|
@@ -415,41 +415,41 @@ function ur(e, t, n = "data") {
|
|
|
415
415
|
response: v
|
|
416
416
|
}, v;
|
|
417
417
|
} catch (d) {
|
|
418
|
-
const
|
|
418
|
+
const c = {
|
|
419
419
|
data: [],
|
|
420
420
|
total: 0
|
|
421
421
|
};
|
|
422
|
-
return s.query && (((
|
|
422
|
+
return s.query && (((u = d.response) == null ? void 0 : u.status) === 404 || d.status === 404) ? (o.value = {
|
|
423
423
|
status: be.NoResults,
|
|
424
|
-
response:
|
|
424
|
+
response: c,
|
|
425
425
|
error: d.response ? d : { response: d }
|
|
426
|
-
},
|
|
426
|
+
}, c) : (o.value = {
|
|
427
427
|
status: be.Error,
|
|
428
|
-
response:
|
|
428
|
+
response: c,
|
|
429
429
|
error: d.response ? d : { response: d }
|
|
430
|
-
},
|
|
430
|
+
}, c);
|
|
431
431
|
}
|
|
432
432
|
}, fetcherState: o };
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function ur() {
|
|
435
435
|
const e = (r, i = "_") => r ? r.split(i).map((a) => a.toLowerCase() === "id" ? a.toUpperCase() : a.charAt(0).toUpperCase() + a.substring(1)).join(" ") : "", t = /(?:^|[\s-:'"])\w/g;
|
|
436
436
|
return {
|
|
437
437
|
capitalize: (r) => r ? r.replace(t, (i) => i.toUpperCase()) : "",
|
|
438
438
|
convertKeyToTitle: e
|
|
439
439
|
};
|
|
440
440
|
}
|
|
441
|
-
const Rt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,
|
|
441
|
+
const Rt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, ct = (e) => {
|
|
442
442
|
if (typeof e != "string")
|
|
443
443
|
throw new TypeError("Invalid argument expected string");
|
|
444
444
|
const t = e.match(Rt);
|
|
445
445
|
if (!t)
|
|
446
446
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
447
447
|
return t.shift(), t;
|
|
448
|
-
},
|
|
448
|
+
}, ut = (e) => e === "*" || e === "x" || e === "X", dt = (e) => {
|
|
449
449
|
const t = parseInt(e, 10);
|
|
450
450
|
return isNaN(t) ? e : t;
|
|
451
451
|
}, dr = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], fr = (e, t) => {
|
|
452
|
-
if (
|
|
452
|
+
if (ut(e) || ut(t))
|
|
453
453
|
return 0;
|
|
454
454
|
const [n, r] = dr(dt(e), dt(t));
|
|
455
455
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
@@ -461,7 +461,7 @@ const Rt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
461
461
|
}
|
|
462
462
|
return 0;
|
|
463
463
|
}, pr = (e, t) => {
|
|
464
|
-
const n =
|
|
464
|
+
const n = ct(e), r = ct(t), i = n.pop(), a = r.pop(), o = ft(n, r);
|
|
465
465
|
return o !== 0 ? o : i && a ? ft(i.split("."), a.split(".")) : i || a ? i ? -1 : 1 : 0;
|
|
466
466
|
}, pt = (e, t, n) => {
|
|
467
467
|
hr(n);
|
|
@@ -494,7 +494,7 @@ function gr(e) {
|
|
|
494
494
|
return !(o && pt(i, o, "<") || l && pt(i, l, ">"));
|
|
495
495
|
}
|
|
496
496
|
function yr(e) {
|
|
497
|
-
const t =
|
|
497
|
+
const t = B(0), n = B(0), r = B(!1);
|
|
498
498
|
return Ae(e, (a) => {
|
|
499
499
|
a && !r.value && (t.value = a.offsetWidth, n.value = a.scrollWidth, r.value = !0);
|
|
500
500
|
}), {
|
|
@@ -513,10 +513,10 @@ const Y = {
|
|
|
513
513
|
useDeleteUrlBuilder: or,
|
|
514
514
|
useErrors: lr,
|
|
515
515
|
useExternalLinkCreator: sr,
|
|
516
|
-
useFetcher:
|
|
516
|
+
useFetcher: cr,
|
|
517
517
|
useFetchUrlBuilder: Bt,
|
|
518
518
|
useHelpers: Nt,
|
|
519
|
-
useStringHelpers:
|
|
519
|
+
useStringHelpers: ur,
|
|
520
520
|
useI18n: je,
|
|
521
521
|
useGatewayFeatureSupported: gr,
|
|
522
522
|
useTruncationDetector: yr,
|
|
@@ -548,18 +548,18 @@ const Y = {
|
|
|
548
548
|
var s;
|
|
549
549
|
return t.isArrayItem ? (s = a.value) != null && s.name ? r(a.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
550
550
|
});
|
|
551
|
-
return (s,
|
|
551
|
+
return (s, u) => (h(), N(se(e.isArrayItem ? "fieldset" : "div"), {
|
|
552
552
|
class: fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
553
553
|
}, {
|
|
554
554
|
default: b(() => [
|
|
555
|
-
e.isArrayItem ? (
|
|
556
|
-
L("b", null,
|
|
557
|
-
])) :
|
|
558
|
-
(
|
|
559
|
-
key: `${i.value}-property-${
|
|
555
|
+
e.isArrayItem ? (h(), w("legend", br, [
|
|
556
|
+
L("b", null, O(l.value), 1)
|
|
557
|
+
])) : K("", !0),
|
|
558
|
+
(h(!0), w(ce, null, oe(Object.keys(o.value), (d, c) => (h(), N(Dt, {
|
|
559
|
+
key: `${i.value}-property-${c}`,
|
|
560
560
|
item: {
|
|
561
561
|
key: d,
|
|
562
|
-
label:
|
|
562
|
+
label: E(r)(d),
|
|
563
563
|
value: o.value[d]
|
|
564
564
|
}
|
|
565
565
|
}, null, 8, ["item"]))), 128))
|
|
@@ -584,15 +584,15 @@ const Y = {
|
|
|
584
584
|
setup(e) {
|
|
585
585
|
const { i18n: { t } } = Y.useI18n();
|
|
586
586
|
return (n, r) => {
|
|
587
|
-
const i =
|
|
588
|
-
return
|
|
589
|
-
|
|
587
|
+
const i = M("KButton");
|
|
588
|
+
return h(), w("div", null, [
|
|
589
|
+
R(i, {
|
|
590
590
|
appearance: "tertiary",
|
|
591
591
|
class: "navigation-button",
|
|
592
592
|
onClick: r[0] || (r[0] = (a) => n.$emit("navigation-click", e.item))
|
|
593
593
|
}, {
|
|
594
594
|
default: b(() => [
|
|
595
|
-
V(
|
|
595
|
+
V(O(e.item.value || E(t)("baseConfigCard.commonFields.link")), 1)
|
|
596
596
|
]),
|
|
597
597
|
_: 1
|
|
598
598
|
})
|
|
@@ -610,18 +610,18 @@ const Y = {
|
|
|
610
610
|
setup(e) {
|
|
611
611
|
const { i18n: { t } } = Y.useI18n();
|
|
612
612
|
return (n, r) => {
|
|
613
|
-
const i =
|
|
614
|
-
return
|
|
613
|
+
const i = M("KBadge");
|
|
614
|
+
return h(), N(i, {
|
|
615
615
|
appearance: e.status ? "success" : "neutral"
|
|
616
616
|
}, {
|
|
617
617
|
default: b(() => [
|
|
618
|
-
V(
|
|
618
|
+
V(O(e.status ? E(t)("baseConfigCard.statusBadge.enabledLabel") : E(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
619
619
|
]),
|
|
620
620
|
_: 1
|
|
621
621
|
}, 8, ["appearance"]);
|
|
622
622
|
};
|
|
623
623
|
}
|
|
624
|
-
}), wr = "#0044f4", Ar = "#e0e4ea", Sr = "#afb7c5", Ir = "#0044f4", Er = "1px", Tr = "16px",
|
|
624
|
+
}), wr = "#0044f4", Ar = "#e0e4ea", Sr = "#afb7c5", Ir = "#0044f4", Er = "1px", Tr = "16px", $r = "20px", Fr = { class: "config-card-details-row" }, Or = ["data-testid"], Lr = ["data-testid"], Nr = ["data-testid"], Br = ["data-testid"], Rr = { key: 1 }, Mr = ["data-testid"], Kr = ["data-testid"], Dr = ["data-testid"], Ur = ["data-testid"], jr = {
|
|
625
625
|
name: "ConfigCardItem",
|
|
626
626
|
components: { JsonCardItem: Kt, StatusBadge: _r, InternalLinkItem: kr }
|
|
627
627
|
}, qr = /* @__PURE__ */ P({
|
|
@@ -644,13 +644,13 @@ const Y = {
|
|
|
644
644
|
},
|
|
645
645
|
emits: ["navigation-click"],
|
|
646
646
|
setup(e, { emit: t }) {
|
|
647
|
-
|
|
648
|
-
dc1d91a8: d.value ? "none" : `solid ${
|
|
649
|
-
"59ccec5f":
|
|
650
|
-
"29318fbe":
|
|
651
|
-
"292d0408":
|
|
647
|
+
Ot((y) => ({
|
|
648
|
+
dc1d91a8: d.value ? "none" : `solid ${E(Er)} ${E(Ar)}`,
|
|
649
|
+
"59ccec5f": u.value && l.value ? "block" : "flex",
|
|
650
|
+
"29318fbe": u.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
651
|
+
"292d0408": u.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
652
652
|
}));
|
|
653
|
-
const n = e, r = t, i = Xe(), { i18n: { t: a, formatUnixTimeStamp: o } } = Y.useI18n(), l = k(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), s = k(() => !!(n.item.tooltip || i["label-tooltip"])),
|
|
653
|
+
const n = e, r = t, i = Xe(), { i18n: { t: a, formatUnixTimeStamp: o } } = Y.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 === H.Json || n.item.type === H.JsonArray), d = k(() => n.item.type === H.JsonArray), c = k(() => {
|
|
654
654
|
switch (n.item.type) {
|
|
655
655
|
case H.ID:
|
|
656
656
|
return {
|
|
@@ -760,18 +760,18 @@ const Y = {
|
|
|
760
760
|
text: n.item.value
|
|
761
761
|
};
|
|
762
762
|
}
|
|
763
|
-
}),
|
|
763
|
+
}), m = B(), { isTruncated: p } = Y.useTruncationDetector(m);
|
|
764
764
|
return (y, v) => {
|
|
765
|
-
const
|
|
766
|
-
return
|
|
765
|
+
const T = M("KLabel"), D = M("KBadge"), S = M("KCopy"), Z = M("KTooltip");
|
|
766
|
+
return h(), w("div", Fr, [
|
|
767
767
|
L("div", {
|
|
768
768
|
class: "config-card-details-label",
|
|
769
769
|
"data-testid": `${e.item.key}-label`
|
|
770
770
|
}, [
|
|
771
771
|
z(y.$slots, "label", { item: e.item }, () => [
|
|
772
|
-
|
|
772
|
+
R(T, { "tooltip-attributes": { maxWidth: "500px" } }, _e({
|
|
773
773
|
default: b(() => [
|
|
774
|
-
V(
|
|
774
|
+
V(O(e.item.label) + " ", 1)
|
|
775
775
|
]),
|
|
776
776
|
_: 2
|
|
777
777
|
}, [
|
|
@@ -782,7 +782,7 @@ const Y = {
|
|
|
782
782
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
783
783
|
}, [
|
|
784
784
|
z(y.$slots, "label-tooltip", {}, () => [
|
|
785
|
-
V(
|
|
785
|
+
V(O(e.item.tooltip), 1)
|
|
786
786
|
], !0)
|
|
787
787
|
], 8, Lr)
|
|
788
788
|
]),
|
|
@@ -790,7 +790,7 @@ const Y = {
|
|
|
790
790
|
} : void 0
|
|
791
791
|
]), 1024)
|
|
792
792
|
], !0)
|
|
793
|
-
], 8,
|
|
793
|
+
], 8, Or),
|
|
794
794
|
L("div", {
|
|
795
795
|
class: "config-card-details-value",
|
|
796
796
|
"data-testid": `${e.item.key}-property-value`
|
|
@@ -798,80 +798,80 @@ const Y = {
|
|
|
798
798
|
z(y.$slots, e.item.key, {
|
|
799
799
|
rowValue: e.item.value
|
|
800
800
|
}, () => [
|
|
801
|
-
l.value ? (
|
|
802
|
-
(
|
|
801
|
+
l.value ? (h(), w("div", Rr, [
|
|
802
|
+
(h(), N(se(c.value.tag), Fn(On(c.value.attrs)), {
|
|
803
803
|
default: b(() => [
|
|
804
|
-
|
|
804
|
+
c.value.additionalComponent === "KBadge" ? (h(), w("div", {
|
|
805
805
|
key: 0,
|
|
806
806
|
"data-testid": `${e.item.key}-badge-tags`
|
|
807
807
|
}, [
|
|
808
|
-
(
|
|
809
|
-
key: `${e.item.key}-badge-tag-${
|
|
808
|
+
(h(!0), w(ce, null, oe(e.item.value, (g, A) => (h(), N(D, {
|
|
809
|
+
key: `${e.item.key}-badge-tag-${A}`,
|
|
810
810
|
class: "config-badge",
|
|
811
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
812
|
-
tooltip:
|
|
811
|
+
"data-testid": `${e.item.key}-badge-tag-${A}`,
|
|
812
|
+
tooltip: g,
|
|
813
813
|
"truncation-tooltip": ""
|
|
814
814
|
}, {
|
|
815
815
|
default: b(() => [
|
|
816
|
-
V(
|
|
816
|
+
V(O(g), 1)
|
|
817
817
|
]),
|
|
818
818
|
_: 2
|
|
819
819
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
820
|
-
], 8, Mr)) :
|
|
821
|
-
|
|
820
|
+
], 8, Mr)) : K("", !0),
|
|
821
|
+
c.value.additionalComponent === "KCopy" ? (h(), w("div", {
|
|
822
822
|
key: 1,
|
|
823
823
|
class: "copy-uuid-array",
|
|
824
824
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
825
825
|
}, [
|
|
826
|
-
(
|
|
827
|
-
key: `${e.item.key}-copy-uuid-${
|
|
828
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
829
|
-
text:
|
|
826
|
+
(h(!0), w(ce, null, oe(e.item.value, (g, A) => (h(), N(S, Ln({ ref_for: !0 }, c.value.childAttrs, {
|
|
827
|
+
key: `${e.item.key}-copy-uuid-${A}`,
|
|
828
|
+
"data-testid": `${e.item.key}-copy-uuid-${A}`,
|
|
829
|
+
text: g
|
|
830
830
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
831
|
-
], 8, Kr)) :
|
|
831
|
+
], 8, Kr)) : c.value.additionalComponent === "KMethodBadge" ? (h(), w("div", {
|
|
832
832
|
key: 2,
|
|
833
833
|
class: "method-badge-array",
|
|
834
834
|
"data-testid": `${e.item.key}-badge-methods`
|
|
835
835
|
}, [
|
|
836
|
-
(
|
|
837
|
-
key: `${e.item.key}-badge-method-${
|
|
838
|
-
appearance: Object.values(
|
|
836
|
+
(h(!0), w(ce, null, oe(e.item.value, (g, A) => (h(), N(D, {
|
|
837
|
+
key: `${e.item.key}-badge-method-${A}`,
|
|
838
|
+
appearance: Object.values(E(Un)).includes(g.toLowerCase()) ? g.toLowerCase() : "custom",
|
|
839
839
|
class: "config-badge",
|
|
840
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
840
|
+
"data-testid": `${e.item.key}-badge-method-${A}`
|
|
841
841
|
}, {
|
|
842
842
|
default: b(() => [
|
|
843
|
-
V(
|
|
843
|
+
V(O(g), 1)
|
|
844
844
|
]),
|
|
845
845
|
_: 2
|
|
846
846
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
847
|
-
], 8, Dr)) :
|
|
848
|
-
|
|
847
|
+
], 8, Dr)) : K("", !0),
|
|
848
|
+
c.value.additionalComponent === "JsonCardItem" ? (h(), w("div", {
|
|
849
849
|
key: 3,
|
|
850
850
|
"data-testid": `${n.item.key}-json-array-content`
|
|
851
851
|
}, [
|
|
852
|
-
(
|
|
853
|
-
key: `json-array-item-${
|
|
854
|
-
index:
|
|
852
|
+
(h(!0), w(ce, null, oe(e.item.value, (g, A) => (h(), N(Kt, {
|
|
853
|
+
key: `json-array-item-${A}`,
|
|
854
|
+
index: A,
|
|
855
855
|
"is-array-item": "",
|
|
856
|
-
item:
|
|
856
|
+
item: g
|
|
857
857
|
}, null, 8, ["index", "item"]))), 128))
|
|
858
|
-
], 8, Ur)) : (
|
|
858
|
+
], 8, Ur)) : (h(), N(Z, {
|
|
859
859
|
key: 4,
|
|
860
|
-
text:
|
|
860
|
+
text: E(p) ? e.item.value : ""
|
|
861
861
|
}, {
|
|
862
862
|
default: b(() => [
|
|
863
863
|
L("span", {
|
|
864
864
|
ref_key: "textContent",
|
|
865
|
-
ref:
|
|
865
|
+
ref: m,
|
|
866
866
|
class: fe(["attrs-data-text", { truncated: e.truncated }])
|
|
867
|
-
},
|
|
867
|
+
}, O(c.value.text), 3)
|
|
868
868
|
]),
|
|
869
869
|
_: 1
|
|
870
870
|
}, 8, ["text"]))
|
|
871
871
|
]),
|
|
872
872
|
_: 1
|
|
873
873
|
}, 16))
|
|
874
|
-
])) : (
|
|
874
|
+
])) : (h(), w("div", {
|
|
875
875
|
key: 0,
|
|
876
876
|
"data-testid": `${e.item.key}-no-value`
|
|
877
877
|
}, " – ", 8, Br))
|
|
@@ -911,7 +911,7 @@ const Y = {
|
|
|
911
911
|
}
|
|
912
912
|
},
|
|
913
913
|
setup(e) {
|
|
914
|
-
|
|
914
|
+
Ot((i) => ({
|
|
915
915
|
"4520e3ec": `${r.value}ch`
|
|
916
916
|
}));
|
|
917
917
|
const t = e, n = k(() => t.jsonRecord), r = k(() => {
|
|
@@ -922,33 +922,33 @@ const Y = {
|
|
|
922
922
|
return i.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? i[i.length - 1] : i[i.length - 2]).length;
|
|
923
923
|
});
|
|
924
924
|
return (i, a) => {
|
|
925
|
-
const o =
|
|
926
|
-
return
|
|
927
|
-
t.fetcherUrl ? (
|
|
928
|
-
|
|
925
|
+
const o = M("KBadge"), l = M("KCodeBlock");
|
|
926
|
+
return h(), w("div", Pr, [
|
|
927
|
+
t.fetcherUrl ? (h(), w("div", Hr, [
|
|
928
|
+
R(o, {
|
|
929
929
|
appearance: t.requestMethod
|
|
930
930
|
}, {
|
|
931
931
|
default: b(() => [
|
|
932
|
-
V(
|
|
932
|
+
V(O(t.requestMethod), 1)
|
|
933
933
|
]),
|
|
934
934
|
_: 1
|
|
935
935
|
}, 8, ["appearance"]),
|
|
936
|
-
|
|
936
|
+
R(l, {
|
|
937
937
|
id: "json-endpoint-codeblock",
|
|
938
938
|
code: t.fetcherUrl,
|
|
939
939
|
language: "json",
|
|
940
940
|
"single-line": "",
|
|
941
941
|
theme: "dark"
|
|
942
942
|
}, null, 8, ["code"])
|
|
943
|
-
])) :
|
|
944
|
-
t.jsonRecord ? (
|
|
943
|
+
])) : K("", !0),
|
|
944
|
+
t.jsonRecord ? (h(), N(l, {
|
|
945
945
|
key: 1,
|
|
946
946
|
id: "json-codeblock",
|
|
947
947
|
class: fe({ "json-content": t.fetcherUrl }),
|
|
948
948
|
code: JSON.stringify(n.value, null, 2),
|
|
949
949
|
language: "json",
|
|
950
950
|
theme: "dark"
|
|
951
|
-
}, null, 8, ["class", "code"])) :
|
|
951
|
+
}, null, 8, ["class", "code"])) : K("", !0)
|
|
952
952
|
]);
|
|
953
953
|
};
|
|
954
954
|
}
|
|
@@ -993,15 +993,15 @@ function qt(e, t) {
|
|
|
993
993
|
|
|
994
994
|
` + e.mark.snippet), r + " " + n) : r;
|
|
995
995
|
}
|
|
996
|
-
function
|
|
996
|
+
function Fe(e, t) {
|
|
997
997
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = qt(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
998
998
|
}
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
999
|
+
Fe.prototype = Object.create(Error.prototype);
|
|
1000
|
+
Fe.prototype.constructor = Fe;
|
|
1001
|
+
Fe.prototype.toString = function(t) {
|
|
1002
1002
|
return this.name + ": " + qt(this, t);
|
|
1003
1003
|
};
|
|
1004
|
-
var te =
|
|
1004
|
+
var te = Fe;
|
|
1005
1005
|
function He(e, t, n, r, i) {
|
|
1006
1006
|
var a = "", o = "", l = Math.floor(i / 2) - 1;
|
|
1007
1007
|
return r - t > l && (a = " ... ", t = r - l + a.length), n - r > l && (o = " ...", n = r + l - o.length), {
|
|
@@ -1020,26 +1020,26 @@ function ni(e, t) {
|
|
|
1020
1020
|
for (var n = /\r?\n|\r|\0/g, r = [0], i = [], a, o = -1; a = n.exec(e.buffer); )
|
|
1021
1021
|
i.push(a.index), r.push(a.index + a[0].length), e.position <= a.index && o < 0 && (o = r.length - 2);
|
|
1022
1022
|
o < 0 && (o = r.length - 1);
|
|
1023
|
-
var l = "", s,
|
|
1023
|
+
var l = "", s, u, d = Math.min(e.line + t.linesAfter, i.length).toString().length, c = t.maxLength - (t.indent + d + 3);
|
|
1024
1024
|
for (s = 1; s <= t.linesBefore && !(o - s < 0); s++)
|
|
1025
|
-
|
|
1025
|
+
u = He(
|
|
1026
1026
|
e.buffer,
|
|
1027
1027
|
r[o - s],
|
|
1028
1028
|
i[o - s],
|
|
1029
1029
|
e.position - (r[o] - r[o - s]),
|
|
1030
|
-
|
|
1031
|
-
), l = G.repeat(" ", t.indent) + Ve((e.line - s + 1).toString(), d) + " | " +
|
|
1030
|
+
c
|
|
1031
|
+
), l = G.repeat(" ", t.indent) + Ve((e.line - s + 1).toString(), d) + " | " + u.str + `
|
|
1032
1032
|
` + l;
|
|
1033
|
-
for (
|
|
1034
|
-
`, l += G.repeat("-", t.indent + d + 3 +
|
|
1033
|
+
for (u = He(e.buffer, r[o], i[o], e.position, c), l += G.repeat(" ", t.indent) + Ve((e.line + 1).toString(), d) + " | " + u.str + `
|
|
1034
|
+
`, l += G.repeat("-", t.indent + d + 3 + u.pos) + `^
|
|
1035
1035
|
`, s = 1; s <= t.linesAfter && !(o + s >= i.length); s++)
|
|
1036
|
-
|
|
1036
|
+
u = He(
|
|
1037
1037
|
e.buffer,
|
|
1038
1038
|
r[o + s],
|
|
1039
1039
|
i[o + s],
|
|
1040
1040
|
e.position - (r[o] - r[o + s]),
|
|
1041
|
-
|
|
1042
|
-
), l += G.repeat(" ", t.indent) + Ve((e.line + s + 1).toString(), d) + " | " +
|
|
1041
|
+
c
|
|
1042
|
+
), l += G.repeat(" ", t.indent) + Ve((e.line + s + 1).toString(), d) + " | " + u.str + `
|
|
1043
1043
|
`;
|
|
1044
1044
|
return l.replace(/\n$/, "");
|
|
1045
1045
|
}
|
|
@@ -1157,13 +1157,13 @@ var Pt = We, Ht = new X("tag:yaml.org,2002:str", {
|
|
|
1157
1157
|
zt
|
|
1158
1158
|
]
|
|
1159
1159
|
});
|
|
1160
|
-
function
|
|
1160
|
+
function ci(e) {
|
|
1161
1161
|
if (e === null)
|
|
1162
1162
|
return !0;
|
|
1163
1163
|
var t = e.length;
|
|
1164
1164
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1165
1165
|
}
|
|
1166
|
-
function
|
|
1166
|
+
function ui() {
|
|
1167
1167
|
return null;
|
|
1168
1168
|
}
|
|
1169
1169
|
function di(e) {
|
|
@@ -1171,8 +1171,8 @@ function di(e) {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
var Wt = new X("tag:yaml.org,2002:null", {
|
|
1173
1173
|
kind: "scalar",
|
|
1174
|
-
resolve:
|
|
1175
|
-
construct:
|
|
1174
|
+
resolve: ci,
|
|
1175
|
+
construct: ui,
|
|
1176
1176
|
predicate: di,
|
|
1177
1177
|
represent: {
|
|
1178
1178
|
canonical: function() {
|
|
@@ -1396,7 +1396,7 @@ function Ii(e) {
|
|
|
1396
1396
|
return e === null ? !1 : en.exec(e) !== null || tn.exec(e) !== null;
|
|
1397
1397
|
}
|
|
1398
1398
|
function Ei(e) {
|
|
1399
|
-
var t, n, r, i, a, o, l, s = 0,
|
|
1399
|
+
var t, n, r, i, a, o, l, s = 0, u = null, d, c, m;
|
|
1400
1400
|
if (t = en.exec(e), t === null && (t = tn.exec(e)), t === null)
|
|
1401
1401
|
throw new Error("Date resolve error");
|
|
1402
1402
|
if (n = +t[1], r = +t[2] - 1, i = +t[3], !t[4])
|
|
@@ -1406,7 +1406,7 @@ function Ei(e) {
|
|
|
1406
1406
|
s += "0";
|
|
1407
1407
|
s = +s;
|
|
1408
1408
|
}
|
|
1409
|
-
return t[9] && (d = +t[10],
|
|
1409
|
+
return t[9] && (d = +t[10], c = +(t[11] || 0), u = (d * 60 + c) * 6e4, t[9] === "-" && (u = -u)), m = new Date(Date.UTC(n, r, i, a, o, l, s)), u && m.setTime(m.getTime() - u), m;
|
|
1410
1410
|
}
|
|
1411
1411
|
function Ti(e) {
|
|
1412
1412
|
return e.toISOString();
|
|
@@ -1418,15 +1418,15 @@ var nn = new X("tag:yaml.org,2002:timestamp", {
|
|
|
1418
1418
|
instanceOf: Date,
|
|
1419
1419
|
represent: Ti
|
|
1420
1420
|
});
|
|
1421
|
-
function
|
|
1421
|
+
function $i(e) {
|
|
1422
1422
|
return e === "<<" || e === null;
|
|
1423
1423
|
}
|
|
1424
1424
|
var rn = new X("tag:yaml.org,2002:merge", {
|
|
1425
1425
|
kind: "scalar",
|
|
1426
|
-
resolve:
|
|
1426
|
+
resolve: $i
|
|
1427
1427
|
}), tt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1428
1428
|
\r`;
|
|
1429
|
-
function
|
|
1429
|
+
function Fi(e) {
|
|
1430
1430
|
if (e === null)
|
|
1431
1431
|
return !1;
|
|
1432
1432
|
var t, n, r = 0, i = e.length, a = tt;
|
|
@@ -1438,7 +1438,7 @@ function Oi(e) {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
return r % 8 === 0;
|
|
1440
1440
|
}
|
|
1441
|
-
function
|
|
1441
|
+
function Oi(e) {
|
|
1442
1442
|
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, a = tt, o = 0, l = [];
|
|
1443
1443
|
for (t = 0; t < i; t++)
|
|
1444
1444
|
t % 4 === 0 && t && (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)), o = o << 6 | a.indexOf(r.charAt(t));
|
|
@@ -1455,8 +1455,8 @@ function Ni(e) {
|
|
|
1455
1455
|
}
|
|
1456
1456
|
var an = new X("tag:yaml.org,2002:binary", {
|
|
1457
1457
|
kind: "scalar",
|
|
1458
|
-
resolve:
|
|
1459
|
-
construct:
|
|
1458
|
+
resolve: Fi,
|
|
1459
|
+
construct: Oi,
|
|
1460
1460
|
predicate: Ni,
|
|
1461
1461
|
represent: Li
|
|
1462
1462
|
}), Bi = Object.prototype.hasOwnProperty, Ri = Object.prototype.toString;
|
|
@@ -1541,7 +1541,7 @@ var sn = new X("tag:yaml.org,2002:set", {
|
|
|
1541
1541
|
ln,
|
|
1542
1542
|
sn
|
|
1543
1543
|
]
|
|
1544
|
-
}), pe = Object.prototype.hasOwnProperty, Re = 1,
|
|
1544
|
+
}), pe = Object.prototype.hasOwnProperty, Re = 1, cn = 2, un = 3, Me = 4, ze = 1, Vi = 2, gt = 3, zi = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Yi = /[\x85\u2028\u2029]/, Wi = /[,\[\]\{\}]/, dn = /^(?:!|!!|![a-z\-]+!)$/i, fn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1545
1545
|
function yt(e) {
|
|
1546
1546
|
return Object.prototype.toString.call(e);
|
|
1547
1547
|
}
|
|
@@ -1633,14 +1633,14 @@ function xt(e, t, n, r) {
|
|
|
1633
1633
|
a = i[o], pe.call(t, a) || (t[a] = n[a], r[a] = !0);
|
|
1634
1634
|
}
|
|
1635
1635
|
function ke(e, t, n, r, i, a, o, l, s) {
|
|
1636
|
-
var
|
|
1636
|
+
var u, d;
|
|
1637
1637
|
if (Array.isArray(i))
|
|
1638
|
-
for (i = Array.prototype.slice.call(i),
|
|
1639
|
-
Array.isArray(i[
|
|
1638
|
+
for (i = Array.prototype.slice.call(i), u = 0, d = i.length; u < d; u += 1)
|
|
1639
|
+
Array.isArray(i[u]) && C(e, "nested arrays are not supported inside keys"), typeof i == "object" && yt(i[u]) === "[object Object]" && (i[u] = "[object Object]");
|
|
1640
1640
|
if (typeof i == "object" && yt(i) === "[object Object]" && (i = "[object Object]"), i = String(i), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1641
1641
|
if (Array.isArray(a))
|
|
1642
|
-
for (
|
|
1643
|
-
xt(e, t, a[
|
|
1642
|
+
for (u = 0, d = a.length; u < d; u += 1)
|
|
1643
|
+
xt(e, t, a[u], n);
|
|
1644
1644
|
else
|
|
1645
1645
|
xt(e, t, a, n);
|
|
1646
1646
|
else
|
|
@@ -1681,7 +1681,7 @@ function it(e, t) {
|
|
|
1681
1681
|
`, t - 1));
|
|
1682
1682
|
}
|
|
1683
1683
|
function ea(e, t, n) {
|
|
1684
|
-
var r, i, a, o, l, s,
|
|
1684
|
+
var r, i, a, o, l, s, u, d, c = e.kind, m = e.result, p;
|
|
1685
1685
|
if (p = e.input.charCodeAt(e.position), ne(p) || Ce(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (i = e.input.charCodeAt(e.position + 1), ne(i) || n && Ce(i)))
|
|
1686
1686
|
return !1;
|
|
1687
1687
|
for (e.kind = "scalar", e.result = "", a = o = e.position, l = !1; p !== 0; ) {
|
|
@@ -1695,17 +1695,17 @@ function ea(e, t, n) {
|
|
|
1695
1695
|
if (e.position === e.lineStart && qe(e) || n && Ce(p))
|
|
1696
1696
|
break;
|
|
1697
1697
|
if (le(p))
|
|
1698
|
-
if (s = e.line,
|
|
1698
|
+
if (s = e.line, u = e.lineStart, d = e.lineIndent, W(e, !1, -1), e.lineIndent >= t) {
|
|
1699
1699
|
l = !0, p = e.input.charCodeAt(e.position);
|
|
1700
1700
|
continue;
|
|
1701
1701
|
} else {
|
|
1702
|
-
e.position = o, e.line = s, e.lineStart =
|
|
1702
|
+
e.position = o, e.line = s, e.lineStart = u, e.lineIndent = d;
|
|
1703
1703
|
break;
|
|
1704
1704
|
}
|
|
1705
1705
|
}
|
|
1706
1706
|
l && (de(e, a, o, !1), it(e, e.line - s), a = o = e.position, l = !1), ye(p) || (o = e.position + 1), p = e.input.charCodeAt(++e.position);
|
|
1707
1707
|
}
|
|
1708
|
-
return de(e, a, o, !1), e.result ? !0 : (e.kind =
|
|
1708
|
+
return de(e, a, o, !1), e.result ? !0 : (e.kind = c, e.result = m, !1);
|
|
1709
1709
|
}
|
|
1710
1710
|
function ta(e, t) {
|
|
1711
1711
|
var n, r, i;
|
|
@@ -1746,48 +1746,48 @@ function na(e, t) {
|
|
|
1746
1746
|
C(e, "unexpected end of the stream within a double quoted scalar");
|
|
1747
1747
|
}
|
|
1748
1748
|
function ra(e, t) {
|
|
1749
|
-
var n = !0, r, i, a, o = e.tag, l, s = e.anchor,
|
|
1750
|
-
if (
|
|
1749
|
+
var n = !0, r, i, a, o = e.tag, l, s = e.anchor, u, d, c, m, p, y = /* @__PURE__ */ Object.create(null), v, T, D, S;
|
|
1750
|
+
if (S = e.input.charCodeAt(e.position), S === 91)
|
|
1751
1751
|
d = 93, p = !1, l = [];
|
|
1752
|
-
else if (
|
|
1752
|
+
else if (S === 123)
|
|
1753
1753
|
d = 125, p = !0, l = {};
|
|
1754
1754
|
else
|
|
1755
1755
|
return !1;
|
|
1756
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1757
|
-
if (W(e, !0, t),
|
|
1756
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), S = e.input.charCodeAt(++e.position); S !== 0; ) {
|
|
1757
|
+
if (W(e, !0, t), S = e.input.charCodeAt(e.position), S === d)
|
|
1758
1758
|
return e.position++, e.tag = o, e.anchor = s, e.kind = p ? "mapping" : "sequence", e.result = l, !0;
|
|
1759
|
-
n ?
|
|
1759
|
+
n ? S === 44 && C(e, "expected the node content, but found ','") : C(e, "missed comma between flow collection entries"), T = v = D = null, c = m = !1, S === 63 && (u = e.input.charCodeAt(e.position + 1), ne(u) && (c = m = !0, e.position++, W(e, !0, t))), r = e.line, i = e.lineStart, a = e.position, we(e, t, Re, !1, !0), T = e.tag, v = e.result, W(e, !0, t), S = e.input.charCodeAt(e.position), (m || e.line === r) && S === 58 && (c = !0, S = e.input.charCodeAt(++e.position), W(e, !0, t), we(e, t, Re, !1, !0), D = e.result), p ? ke(e, l, y, T, v, D, r, i, a) : c ? l.push(ke(e, null, y, T, v, D, r, i, a)) : l.push(v), W(e, !0, t), S = e.input.charCodeAt(e.position), S === 44 ? (n = !0, S = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1760
1760
|
}
|
|
1761
1761
|
C(e, "unexpected end of the stream within a flow collection");
|
|
1762
1762
|
}
|
|
1763
1763
|
function ia(e, t) {
|
|
1764
|
-
var n, r, i = ze, a = !1, o = !1, l = t, s = 0,
|
|
1765
|
-
if (
|
|
1764
|
+
var n, r, i = ze, a = !1, o = !1, l = t, s = 0, u = !1, d, c;
|
|
1765
|
+
if (c = e.input.charCodeAt(e.position), c === 124)
|
|
1766
1766
|
r = !1;
|
|
1767
|
-
else if (
|
|
1767
|
+
else if (c === 62)
|
|
1768
1768
|
r = !0;
|
|
1769
1769
|
else
|
|
1770
1770
|
return !1;
|
|
1771
|
-
for (e.kind = "scalar", e.result = "";
|
|
1772
|
-
if (
|
|
1773
|
-
ze === i ? i =
|
|
1774
|
-
else if ((d = Zi(
|
|
1771
|
+
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
1772
|
+
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
1773
|
+
ze === i ? i = c === 43 ? gt : Vi : C(e, "repeat of a chomping mode identifier");
|
|
1774
|
+
else if ((d = Zi(c)) >= 0)
|
|
1775
1775
|
d === 0 ? C(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? C(e, "repeat of an indentation width identifier") : (l = t + d - 1, o = !0);
|
|
1776
1776
|
else
|
|
1777
1777
|
break;
|
|
1778
|
-
if (ye(
|
|
1778
|
+
if (ye(c)) {
|
|
1779
1779
|
do
|
|
1780
|
-
|
|
1781
|
-
while (ye(
|
|
1782
|
-
if (
|
|
1780
|
+
c = e.input.charCodeAt(++e.position);
|
|
1781
|
+
while (ye(c));
|
|
1782
|
+
if (c === 35)
|
|
1783
1783
|
do
|
|
1784
|
-
|
|
1785
|
-
while (!le(
|
|
1784
|
+
c = e.input.charCodeAt(++e.position);
|
|
1785
|
+
while (!le(c) && c !== 0);
|
|
1786
1786
|
}
|
|
1787
|
-
for (;
|
|
1788
|
-
for (rt(e), e.lineIndent = 0,
|
|
1789
|
-
e.lineIndent++,
|
|
1790
|
-
if (!o && e.lineIndent > l && (l = e.lineIndent), le(
|
|
1787
|
+
for (; c !== 0; ) {
|
|
1788
|
+
for (rt(e), e.lineIndent = 0, c = e.input.charCodeAt(e.position); (!o || e.lineIndent < l) && c === 32; )
|
|
1789
|
+
e.lineIndent++, c = e.input.charCodeAt(++e.position);
|
|
1790
|
+
if (!o && e.lineIndent > l && (l = e.lineIndent), le(c)) {
|
|
1791
1791
|
s++;
|
|
1792
1792
|
continue;
|
|
1793
1793
|
}
|
|
@@ -1797,12 +1797,12 @@ function ia(e, t) {
|
|
|
1797
1797
|
`);
|
|
1798
1798
|
break;
|
|
1799
1799
|
}
|
|
1800
|
-
for (r ? ye(
|
|
1801
|
-
`, a ? 1 + s : s)) :
|
|
1800
|
+
for (r ? ye(c) ? (u = !0, e.result += G.repeat(`
|
|
1801
|
+
`, a ? 1 + s : s)) : u ? (u = !1, e.result += G.repeat(`
|
|
1802
1802
|
`, s + 1)) : s === 0 ? a && (e.result += " ") : e.result += G.repeat(`
|
|
1803
1803
|
`, s) : e.result += G.repeat(`
|
|
1804
|
-
`, a ? 1 + s : s), a = !0, o = !0, s = 0, n = e.position; !le(
|
|
1805
|
-
|
|
1804
|
+
`, a ? 1 + s : s), a = !0, o = !0, s = 0, n = e.position; !le(c) && c !== 0; )
|
|
1805
|
+
c = e.input.charCodeAt(++e.position);
|
|
1806
1806
|
de(e, n, e.position, !1);
|
|
1807
1807
|
}
|
|
1808
1808
|
return !0;
|
|
@@ -1816,7 +1816,7 @@ function Ct(e, t) {
|
|
|
1816
1816
|
a.push(null), s = e.input.charCodeAt(e.position);
|
|
1817
1817
|
continue;
|
|
1818
1818
|
}
|
|
1819
|
-
if (n = e.line, we(e, t,
|
|
1819
|
+
if (n = e.line, we(e, t, un, !1, !0), a.push(e.result), W(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
1820
1820
|
C(e, "bad indentation of a sequence entry");
|
|
1821
1821
|
else if (e.lineIndent < t)
|
|
1822
1822
|
break;
|
|
@@ -1824,35 +1824,35 @@ function Ct(e, t) {
|
|
|
1824
1824
|
return l ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1825
1825
|
}
|
|
1826
1826
|
function aa(e, t, n) {
|
|
1827
|
-
var r, i, a, o, l, s,
|
|
1827
|
+
var r, i, a, o, l, s, u = e.tag, d = e.anchor, c = {}, m = /* @__PURE__ */ Object.create(null), p = null, y = null, v = null, T = !1, D = !1, S;
|
|
1828
1828
|
if (e.firstTabInLine !== -1)
|
|
1829
1829
|
return !1;
|
|
1830
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] =
|
|
1831
|
-
if (!
|
|
1832
|
-
|
|
1830
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), S = e.input.charCodeAt(e.position); S !== 0; ) {
|
|
1831
|
+
if (!T && 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, (S === 63 || S === 58) && ne(r))
|
|
1832
|
+
S === 63 ? (T && (ke(e, c, m, p, y, null, o, l, s), p = y = v = null), D = !0, T = !0, i = !0) : T ? (T = !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, S = r;
|
|
1833
1833
|
else {
|
|
1834
|
-
if (o = e.line, l = e.lineStart, s = e.position, !we(e, n,
|
|
1834
|
+
if (o = e.line, l = e.lineStart, s = e.position, !we(e, n, cn, !1, !0))
|
|
1835
1835
|
break;
|
|
1836
1836
|
if (e.line === a) {
|
|
1837
|
-
for (
|
|
1838
|
-
|
|
1839
|
-
if (
|
|
1840
|
-
|
|
1841
|
-
else if (
|
|
1837
|
+
for (S = e.input.charCodeAt(e.position); ye(S); )
|
|
1838
|
+
S = e.input.charCodeAt(++e.position);
|
|
1839
|
+
if (S === 58)
|
|
1840
|
+
S = e.input.charCodeAt(++e.position), ne(S) || C(e, "a whitespace character is expected after the key-value separator within a block mapping"), T && (ke(e, c, m, p, y, null, o, l, s), p = y = v = null), D = !0, T = !1, i = !1, p = e.tag, y = e.result;
|
|
1841
|
+
else if (D)
|
|
1842
1842
|
C(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1843
1843
|
else
|
|
1844
|
-
return e.tag =
|
|
1845
|
-
} else if (
|
|
1844
|
+
return e.tag = u, e.anchor = d, !0;
|
|
1845
|
+
} else if (D)
|
|
1846
1846
|
C(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1847
1847
|
else
|
|
1848
|
-
return e.tag =
|
|
1848
|
+
return e.tag = u, e.anchor = d, !0;
|
|
1849
1849
|
}
|
|
1850
|
-
if ((e.line === a || e.lineIndent > t) && (
|
|
1850
|
+
if ((e.line === a || e.lineIndent > t) && (T && (o = e.line, l = e.lineStart, s = e.position), we(e, t, Me, !0, i) && (T ? y = e.result : v = e.result), T || (ke(e, c, m, p, y, v, o, l, s), p = y = v = null), W(e, !0, -1), S = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > t) && S !== 0)
|
|
1851
1851
|
C(e, "bad indentation of a mapping entry");
|
|
1852
1852
|
else if (e.lineIndent < t)
|
|
1853
1853
|
break;
|
|
1854
1854
|
}
|
|
1855
|
-
return
|
|
1855
|
+
return T && ke(e, c, m, p, y, null, o, l, s), D && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), D;
|
|
1856
1856
|
}
|
|
1857
1857
|
function oa(e) {
|
|
1858
1858
|
var t, n = !1, r = !1, i, a, o;
|
|
@@ -1893,15 +1893,15 @@ function sa(e) {
|
|
|
1893
1893
|
return e.position === t && C(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), pe.call(e.anchorMap, n) || C(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], W(e, !0, -1), !0;
|
|
1894
1894
|
}
|
|
1895
1895
|
function we(e, t, n, r, i) {
|
|
1896
|
-
var a, o, l, s = 1,
|
|
1897
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = l = Me === n ||
|
|
1896
|
+
var a, o, l, s = 1, u = !1, d = !1, c, m, p, y, v, T;
|
|
1897
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = l = Me === n || un === n, r && W(e, !0, -1) && (u = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
1898
1898
|
for (; oa(e) || la(e); )
|
|
1899
|
-
W(e, !0, -1) ? (
|
|
1900
|
-
if (l && (l =
|
|
1899
|
+
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;
|
|
1900
|
+
if (l && (l = u || i), (s === 1 || Me === n) && (Re === n || cn === n ? v = t : v = t + 1, T = e.position - e.lineStart, s === 1 ? l && (Ct(e, T) || aa(e, T, v)) || ra(e, v) ? d = !0 : (o && ia(e, v) || ta(e, v) || na(e, v) ? d = !0 : sa(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && C(e, "alias node should not have any properties")) : ea(e, v, Re === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && Ct(e, T))), e.tag === null)
|
|
1901
1901
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1902
1902
|
else if (e.tag === "?") {
|
|
1903
|
-
for (e.result !== null && e.kind !== "scalar" && C(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'),
|
|
1904
|
-
if (y = e.implicitTypes[
|
|
1903
|
+
for (e.result !== null && e.kind !== "scalar" && C(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, m = e.implicitTypes.length; c < m; c += 1)
|
|
1904
|
+
if (y = e.implicitTypes[c], y.resolve(e.result)) {
|
|
1905
1905
|
e.result = y.construct(e.result), e.tag = y.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1906
1906
|
break;
|
|
1907
1907
|
}
|
|
@@ -1909,16 +1909,16 @@ function we(e, t, n, r, i) {
|
|
|
1909
1909
|
if (pe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1910
1910
|
y = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1911
1911
|
else
|
|
1912
|
-
for (y = null, p = e.typeMap.multi[e.kind || "fallback"],
|
|
1913
|
-
if (e.tag.slice(0, p[
|
|
1914
|
-
y = p[
|
|
1912
|
+
for (y = null, p = e.typeMap.multi[e.kind || "fallback"], c = 0, m = p.length; c < m; c += 1)
|
|
1913
|
+
if (e.tag.slice(0, p[c].tag.length) === p[c].tag) {
|
|
1914
|
+
y = p[c];
|
|
1915
1915
|
break;
|
|
1916
1916
|
}
|
|
1917
1917
|
y || C(e, "unknown tag !<" + e.tag + ">"), e.result !== null && y.kind !== e.kind && C(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + y.kind + '", not "' + e.kind + '"'), y.resolve(e.result, e.tag) ? (e.result = y.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : C(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1918
1918
|
}
|
|
1919
1919
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
1920
1920
|
}
|
|
1921
|
-
function
|
|
1921
|
+
function ca(e) {
|
|
1922
1922
|
var t = e.position, n, r, i, a = !1, o;
|
|
1923
1923
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (W(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
1924
1924
|
for (a = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !ne(o); )
|
|
@@ -1956,10 +1956,10 @@ function gn(e, t) {
|
|
|
1956
1956
|
for (r !== -1 && (n.position = r, C(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
1957
1957
|
n.lineIndent += 1, n.position += 1;
|
|
1958
1958
|
for (; n.position < n.length - 1; )
|
|
1959
|
-
|
|
1959
|
+
ca(n);
|
|
1960
1960
|
return n.documents;
|
|
1961
1961
|
}
|
|
1962
|
-
function
|
|
1962
|
+
function ua(e, t, n) {
|
|
1963
1963
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
1964
1964
|
var r = gn(e, n);
|
|
1965
1965
|
if (typeof t != "function")
|
|
@@ -1975,10 +1975,10 @@ function da(e, t) {
|
|
|
1975
1975
|
throw new te("expected a single document in the stream, but found more");
|
|
1976
1976
|
}
|
|
1977
1977
|
}
|
|
1978
|
-
var fa =
|
|
1978
|
+
var fa = ua, pa = da, yn = {
|
|
1979
1979
|
loadAll: fa,
|
|
1980
1980
|
load: pa
|
|
1981
|
-
}, vn = Object.prototype.toString, bn = Object.prototype.hasOwnProperty, at = 65279, ha = 9,
|
|
1981
|
+
}, vn = Object.prototype.toString, bn = Object.prototype.hasOwnProperty, at = 65279, ha = 9, Oe = 10, ma = 13, ga = 32, ya = 33, va = 34, Je = 35, ba = 37, xa = 38, Ca = 39, ka = 42, xn = 44, _a = 45, De = 58, wa = 61, Aa = 62, Sa = 63, Ia = 64, Cn = 91, kn = 93, Ea = 96, _n = 123, Ta = 124, wn = 125, ee = {};
|
|
1982
1982
|
ee[0] = "\\0";
|
|
1983
1983
|
ee[7] = "\\a";
|
|
1984
1984
|
ee[8] = "\\b";
|
|
@@ -1994,7 +1994,7 @@ ee[133] = "\\N";
|
|
|
1994
1994
|
ee[160] = "\\_";
|
|
1995
1995
|
ee[8232] = "\\L";
|
|
1996
1996
|
ee[8233] = "\\P";
|
|
1997
|
-
var
|
|
1997
|
+
var $a = [
|
|
1998
1998
|
"y",
|
|
1999
1999
|
"Y",
|
|
2000
2000
|
"yes",
|
|
@@ -2011,8 +2011,8 @@ var Fa = [
|
|
|
2011
2011
|
"off",
|
|
2012
2012
|
"Off",
|
|
2013
2013
|
"OFF"
|
|
2014
|
-
],
|
|
2015
|
-
function
|
|
2014
|
+
], Fa = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2015
|
+
function Oa(e, t) {
|
|
2016
2016
|
var n, r, i, a, o, l, s;
|
|
2017
2017
|
if (t === null)
|
|
2018
2018
|
return {};
|
|
@@ -2034,7 +2034,7 @@ function La(e) {
|
|
|
2034
2034
|
}
|
|
2035
2035
|
var Na = 1, Le = 2;
|
|
2036
2036
|
function Ba(e) {
|
|
2037
|
-
this.schema = e.schema || nt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = G.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap =
|
|
2037
|
+
this.schema = e.schema || nt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = G.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Oa(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? Le : Na, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
2038
2038
|
}
|
|
2039
2039
|
function kt(e, t) {
|
|
2040
2040
|
for (var n = G.repeat(" ", t), r = 0, i = -1, a = "", o, l = e.length; r < l; )
|
|
@@ -2061,7 +2061,7 @@ function Ne(e) {
|
|
|
2061
2061
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== at || 65536 <= e && e <= 1114111;
|
|
2062
2062
|
}
|
|
2063
2063
|
function _t(e) {
|
|
2064
|
-
return Ne(e) && e !== at && e !== ma && e !==
|
|
2064
|
+
return Ne(e) && e !== at && e !== ma && e !== Oe;
|
|
2065
2065
|
}
|
|
2066
2066
|
function wt(e, t, n) {
|
|
2067
2067
|
var r = _t(e), i = r && !Ue(e);
|
|
@@ -2079,7 +2079,7 @@ function Ma(e) {
|
|
|
2079
2079
|
function Ka(e) {
|
|
2080
2080
|
return !Ue(e) && e !== De;
|
|
2081
2081
|
}
|
|
2082
|
-
function
|
|
2082
|
+
function $e(e, t) {
|
|
2083
2083
|
var n = e.charCodeAt(t), r;
|
|
2084
2084
|
return n >= 55296 && n <= 56319 && t + 1 < e.length && (r = e.charCodeAt(t + 1), r >= 56320 && r <= 57343) ? (n - 55296) * 1024 + r - 56320 + 65536 : n;
|
|
2085
2085
|
}
|
|
@@ -2089,35 +2089,35 @@ function An(e) {
|
|
|
2089
2089
|
}
|
|
2090
2090
|
var Sn = 1, Ze = 2, In = 3, En = 4, xe = 5;
|
|
2091
2091
|
function Da(e, t, n, r, i, a, o, l) {
|
|
2092
|
-
var s,
|
|
2092
|
+
var s, u = 0, d = null, c = !1, m = !1, p = r !== -1, y = -1, v = Ma($e(e, 0)) && Ka($e(e, e.length - 1));
|
|
2093
2093
|
if (t || o)
|
|
2094
|
-
for (s = 0; s < e.length;
|
|
2095
|
-
if (
|
|
2094
|
+
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2095
|
+
if (u = $e(e, s), !Ne(u))
|
|
2096
2096
|
return xe;
|
|
2097
|
-
v = v && wt(
|
|
2097
|
+
v = v && wt(u, d, l), d = u;
|
|
2098
2098
|
}
|
|
2099
2099
|
else {
|
|
2100
|
-
for (s = 0; s < e.length;
|
|
2101
|
-
if (
|
|
2102
|
-
|
|
2100
|
+
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2101
|
+
if (u = $e(e, s), u === Oe)
|
|
2102
|
+
c = !0, p && (m = m || // Foldable line = too long, and not more-indented.
|
|
2103
2103
|
s - y - 1 > r && e[y + 1] !== " ", y = s);
|
|
2104
|
-
else if (!Ne(
|
|
2104
|
+
else if (!Ne(u))
|
|
2105
2105
|
return xe;
|
|
2106
|
-
v = v && wt(
|
|
2106
|
+
v = v && wt(u, d, l), d = u;
|
|
2107
2107
|
}
|
|
2108
|
-
|
|
2108
|
+
m = m || p && s - y - 1 > r && e[y + 1] !== " ";
|
|
2109
2109
|
}
|
|
2110
|
-
return !
|
|
2110
|
+
return !c && !m ? v && !o && !i(e) ? Sn : a === Le ? xe : Ze : n > 9 && An(e) ? xe : o ? a === Le ? xe : Ze : m ? En : In;
|
|
2111
2111
|
}
|
|
2112
2112
|
function Ua(e, t, n, r, i) {
|
|
2113
2113
|
e.dump = function() {
|
|
2114
2114
|
if (t.length === 0)
|
|
2115
2115
|
return e.quotingType === Le ? '""' : "''";
|
|
2116
|
-
if (!e.noCompatMode && (
|
|
2116
|
+
if (!e.noCompatMode && ($a.indexOf(t) !== -1 || Fa.test(t)))
|
|
2117
2117
|
return e.quotingType === Le ? '"' + t + '"' : "'" + t + "'";
|
|
2118
2118
|
var a = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), l = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2119
|
-
function s(
|
|
2120
|
-
return Ra(e,
|
|
2119
|
+
function s(u) {
|
|
2120
|
+
return Ra(e, u);
|
|
2121
2121
|
}
|
|
2122
2122
|
switch (Da(
|
|
2123
2123
|
t,
|
|
@@ -2158,9 +2158,9 @@ function St(e) {
|
|
|
2158
2158
|
}
|
|
2159
2159
|
function ja(e, t) {
|
|
2160
2160
|
for (var n = /(\n+)([^\n]*)/g, r = function() {
|
|
2161
|
-
var
|
|
2161
|
+
var u = e.indexOf(`
|
|
2162
2162
|
`);
|
|
2163
|
-
return
|
|
2163
|
+
return u = u !== -1 ? u : e.length, n.lastIndex = u, It(e.slice(0, u), t);
|
|
2164
2164
|
}(), i = e[0] === `
|
|
2165
2165
|
` || e[0] === " ", a, o; o = n.exec(e); ) {
|
|
2166
2166
|
var l = o[1], s = o[2];
|
|
@@ -2181,29 +2181,29 @@ function It(e, t) {
|
|
|
2181
2181
|
}
|
|
2182
2182
|
function qa(e) {
|
|
2183
2183
|
for (var t = "", n = 0, r, i = 0; i < e.length; n >= 65536 ? i += 2 : i++)
|
|
2184
|
-
n =
|
|
2184
|
+
n = $e(e, i), r = ee[n], !r && Ne(n) ? (t += e[i], n >= 65536 && (t += e[i + 1])) : t += r || La(n);
|
|
2185
2185
|
return t;
|
|
2186
2186
|
}
|
|
2187
2187
|
function Pa(e, t, n) {
|
|
2188
2188
|
var r = "", i = e.tag, a, o, l;
|
|
2189
2189
|
for (a = 0, o = n.length; a < o; a += 1)
|
|
2190
|
-
l = n[a], e.replacer && (l = e.replacer.call(n, String(a), l)), (
|
|
2190
|
+
l = n[a], e.replacer && (l = e.replacer.call(n, String(a), l)), (ue(e, t, l, !1, !1) || typeof l > "u" && ue(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2191
2191
|
e.tag = i, e.dump = "[" + r + "]";
|
|
2192
2192
|
}
|
|
2193
2193
|
function Et(e, t, n, r) {
|
|
2194
2194
|
var i = "", a = e.tag, o, l, s;
|
|
2195
2195
|
for (o = 0, l = n.length; o < l; o += 1)
|
|
2196
|
-
s = n[o], e.replacer && (s = e.replacer.call(n, String(o), s)), (
|
|
2196
|
+
s = n[o], e.replacer && (s = e.replacer.call(n, String(o), s)), (ue(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && ue(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i += Ge(e, t)), e.dump && Oe === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2197
2197
|
e.tag = a, e.dump = i || "[]";
|
|
2198
2198
|
}
|
|
2199
2199
|
function Ha(e, t, n) {
|
|
2200
|
-
var r = "", i = e.tag, a = Object.keys(n), o, l, s,
|
|
2200
|
+
var r = "", i = e.tag, a = Object.keys(n), o, l, s, u, d;
|
|
2201
2201
|
for (o = 0, l = a.length; o < l; o += 1)
|
|
2202
|
-
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = a[o],
|
|
2202
|
+
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = a[o], u = n[s], e.replacer && (u = e.replacer.call(n, s, u)), ue(e, t, s, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ue(e, t, u, !1, !1) && (d += e.dump, r += d));
|
|
2203
2203
|
e.tag = i, e.dump = "{" + r + "}";
|
|
2204
2204
|
}
|
|
2205
2205
|
function Va(e, t, n, r) {
|
|
2206
|
-
var i = "", a = e.tag, o = Object.keys(n), l, s,
|
|
2206
|
+
var i = "", a = e.tag, o = Object.keys(n), l, s, u, d, c, m;
|
|
2207
2207
|
if (e.sortKeys === !0)
|
|
2208
2208
|
o.sort();
|
|
2209
2209
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2211,7 +2211,7 @@ function Va(e, t, n, r) {
|
|
|
2211
2211
|
else if (e.sortKeys)
|
|
2212
2212
|
throw new te("sortKeys must be a boolean or a function");
|
|
2213
2213
|
for (l = 0, s = o.length; l < s; l += 1)
|
|
2214
|
-
|
|
2214
|
+
m = "", (!r || i !== "") && (m += Ge(e, t)), u = o[l], d = n[u], e.replacer && (d = e.replacer.call(n, u, d)), ue(e, t + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Oe === e.dump.charCodeAt(0) ? m += "?" : m += "? "), m += e.dump, c && (m += Ge(e, t)), ue(e, t + 1, d, !0, c) && (e.dump && Oe === e.dump.charCodeAt(0) ? m += ":" : m += ": ", m += e.dump, i += m));
|
|
2215
2215
|
e.tag = a, e.dump = i || "{}";
|
|
2216
2216
|
}
|
|
2217
2217
|
function Tt(e, t, n) {
|
|
@@ -2231,18 +2231,18 @@ function Tt(e, t, n) {
|
|
|
2231
2231
|
}
|
|
2232
2232
|
return !1;
|
|
2233
2233
|
}
|
|
2234
|
-
function
|
|
2234
|
+
function ue(e, t, n, r, i, a, o) {
|
|
2235
2235
|
e.tag = null, e.dump = n, Tt(e, n, !1) || Tt(e, n, !0);
|
|
2236
|
-
var l = vn.call(e.dump), s = r,
|
|
2236
|
+
var l = vn.call(e.dump), s = r, u;
|
|
2237
2237
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
2238
|
-
var d = l === "[object Object]" || l === "[object Array]",
|
|
2239
|
-
if (d && (
|
|
2240
|
-
e.dump = "*ref_" +
|
|
2238
|
+
var d = l === "[object Object]" || l === "[object Array]", c, m;
|
|
2239
|
+
if (d && (c = e.duplicates.indexOf(n), m = c !== -1), (e.tag !== null && e.tag !== "?" || m || e.indent !== 2 && t > 0) && (i = !1), m && e.usedDuplicates[c])
|
|
2240
|
+
e.dump = "*ref_" + c;
|
|
2241
2241
|
else {
|
|
2242
|
-
if (d &&
|
|
2243
|
-
r && Object.keys(e.dump).length !== 0 ? (Va(e, t, e.dump, i),
|
|
2242
|
+
if (d && m && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), l === "[object Object]")
|
|
2243
|
+
r && Object.keys(e.dump).length !== 0 ? (Va(e, t, e.dump, i), m && (e.dump = "&ref_" + c + e.dump)) : (Ha(e, t, e.dump), m && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2244
2244
|
else if (l === "[object Array]")
|
|
2245
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? Et(e, t - 1, e.dump, i) : Et(e, t, e.dump, i),
|
|
2245
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? Et(e, t - 1, e.dump, i) : Et(e, t, e.dump, i), m && (e.dump = "&ref_" + c + e.dump)) : (Pa(e, t, e.dump), m && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2246
2246
|
else if (l === "[object String]")
|
|
2247
2247
|
e.tag !== "?" && Ua(e, e.dump, t, a, s);
|
|
2248
2248
|
else {
|
|
@@ -2252,9 +2252,9 @@ function ce(e, t, n, r, i, a, o) {
|
|
|
2252
2252
|
return !1;
|
|
2253
2253
|
throw new te("unacceptable kind of an object to dump " + l);
|
|
2254
2254
|
}
|
|
2255
|
-
e.tag !== null && e.tag !== "?" && (
|
|
2255
|
+
e.tag !== null && e.tag !== "?" && (u = encodeURI(
|
|
2256
2256
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
2257
|
-
).replace(/!/g, "%21"), e.tag[0] === "!" ?
|
|
2257
|
+
).replace(/!/g, "%21"), e.tag[0] === "!" ? u = "!" + u : u.slice(0, 18) === "tag:yaml.org,2002:" ? u = "!!" + u.slice(18) : u = "!<" + u + ">", e.dump = u + " " + e.dump);
|
|
2258
2258
|
}
|
|
2259
2259
|
return !0;
|
|
2260
2260
|
}
|
|
@@ -2281,7 +2281,7 @@ function Ya(e, t) {
|
|
|
2281
2281
|
var n = new Ba(t);
|
|
2282
2282
|
n.noRefs || za(e, n);
|
|
2283
2283
|
var r = e;
|
|
2284
|
-
return n.replacer && (r = n.replacer.call({ "": r }, "", r)),
|
|
2284
|
+
return n.replacer && (r = n.replacer.call({ "": r }, "", r)), ue(n, 0, r, !0, !0) ? n.dump + `
|
|
2285
2285
|
` : "";
|
|
2286
2286
|
}
|
|
2287
2287
|
var Wa = Ya, Ja = {
|
|
@@ -2306,7 +2306,7 @@ var Ga = X, Za = Pt, Qa = Yt, Xa = Qt, eo = Xt, to = nt, no = yn.load, ro = yn.l
|
|
|
2306
2306
|
omap: on,
|
|
2307
2307
|
seq: Vt,
|
|
2308
2308
|
str: Ht
|
|
2309
|
-
}, lo = ot("safeLoad", "load"), so = ot("safeLoadAll", "loadAll"),
|
|
2309
|
+
}, lo = ot("safeLoad", "load"), so = ot("safeLoadAll", "loadAll"), co = ot("safeDump", "dump"), uo = {
|
|
2310
2310
|
Type: Ga,
|
|
2311
2311
|
Schema: Za,
|
|
2312
2312
|
FAILSAFE_SCHEMA: Qa,
|
|
@@ -2320,7 +2320,7 @@ var Ga = X, Za = Pt, Qa = Yt, Xa = Qt, eo = Xt, to = nt, no = yn.load, ro = yn.l
|
|
|
2320
2320
|
types: oo,
|
|
2321
2321
|
safeLoad: lo,
|
|
2322
2322
|
safeLoadAll: so,
|
|
2323
|
-
safeDump:
|
|
2323
|
+
safeDump: co
|
|
2324
2324
|
};
|
|
2325
2325
|
const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
2326
2326
|
__name: "YamlCodeBlock",
|
|
@@ -2334,18 +2334,18 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2334
2334
|
setup(e) {
|
|
2335
2335
|
const t = e, n = k(() => {
|
|
2336
2336
|
const r = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, i]) => i !== null && i !== "" && (Array.isArray(i) ? i.length !== 0 : !0)));
|
|
2337
|
-
return Object.keys(r).length === 0 && r.constructor === Object ? "" :
|
|
2337
|
+
return Object.keys(r).length === 0 && r.constructor === Object ? "" : uo.dump(r).trim();
|
|
2338
2338
|
});
|
|
2339
2339
|
return (r, i) => {
|
|
2340
|
-
const a =
|
|
2341
|
-
return
|
|
2342
|
-
t.yamlRecord ? (
|
|
2340
|
+
const a = M("KCodeBlock");
|
|
2341
|
+
return h(), w("div", fo, [
|
|
2342
|
+
t.yamlRecord ? (h(), N(a, {
|
|
2343
2343
|
key: 0,
|
|
2344
2344
|
id: "yaml-codeblock",
|
|
2345
2345
|
code: n.value,
|
|
2346
2346
|
language: "yaml",
|
|
2347
2347
|
theme: "dark"
|
|
2348
|
-
}, null, 8, ["code"])) :
|
|
2348
|
+
}, null, 8, ["code"])) : K("", !0)
|
|
2349
2349
|
]);
|
|
2350
2350
|
};
|
|
2351
2351
|
}
|
|
@@ -2400,50 +2400,50 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2400
2400
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
2401
2401
|
return delete o.created_at, delete o.updated_at, o;
|
|
2402
2402
|
});
|
|
2403
|
-
return (o, l) => (
|
|
2404
|
-
e.format === "structured" ? (
|
|
2405
|
-
(
|
|
2403
|
+
return (o, l) => (h(), w(ce, null, [
|
|
2404
|
+
e.format === "structured" ? (h(), w("div", po, [
|
|
2405
|
+
(h(!0), w(ce, null, oe(e.propListTypes, (s) => (h(), w("div", {
|
|
2406
2406
|
key: `config-card-details-${s}-props`,
|
|
2407
2407
|
class: fe(`config-card-details-${s}-props`),
|
|
2408
2408
|
"data-testid": `config-card-details-${s}-props`
|
|
2409
2409
|
}, [
|
|
2410
|
-
s !== "basic" ? (
|
|
2411
|
-
(
|
|
2412
|
-
key:
|
|
2413
|
-
item:
|
|
2410
|
+
s !== "basic" ? (h(), w("div", mo, O(s === "advanced" ? E(r)("baseConfigCard.sections.advanced") : E(r)("baseConfigCard.sections.plugin")), 1)) : K("", !0),
|
|
2411
|
+
(h(!0), w(ce, null, oe(e.propertyCollections[s], (u) => (h(), N(Dt, {
|
|
2412
|
+
key: u.key,
|
|
2413
|
+
item: u
|
|
2414
2414
|
}, _e({
|
|
2415
2415
|
label: b(() => [
|
|
2416
|
-
z(o.$slots, `${
|
|
2416
|
+
z(o.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2417
2417
|
]),
|
|
2418
|
-
[
|
|
2419
|
-
z(o.$slots,
|
|
2420
|
-
row:
|
|
2418
|
+
[u.key]: b(({ rowValue: d }) => [
|
|
2419
|
+
z(o.$slots, u.key, {
|
|
2420
|
+
row: u,
|
|
2421
2421
|
rowValue: d
|
|
2422
2422
|
}, void 0, !0)
|
|
2423
2423
|
]),
|
|
2424
2424
|
_: 2
|
|
2425
2425
|
}, [
|
|
2426
|
-
i(
|
|
2426
|
+
i(u) ? {
|
|
2427
2427
|
name: "label-tooltip",
|
|
2428
2428
|
fn: b(() => [
|
|
2429
|
-
z(o.$slots, `${
|
|
2429
|
+
z(o.$slots, `${u.key}-label-tooltip`, { row: u }, void 0, !0)
|
|
2430
2430
|
]),
|
|
2431
2431
|
key: "0"
|
|
2432
2432
|
} : void 0
|
|
2433
2433
|
]), 1032, ["item"]))), 128))
|
|
2434
2434
|
], 10, ho))), 128))
|
|
2435
|
-
])) :
|
|
2436
|
-
e.format === "json" && t.record ? (
|
|
2435
|
+
])) : K("", !0),
|
|
2436
|
+
e.format === "json" && t.record ? (h(), N(Ut, {
|
|
2437
2437
|
key: 1,
|
|
2438
2438
|
config: t.config,
|
|
2439
2439
|
"fetcher-url": t.fetcherUrl,
|
|
2440
2440
|
"json-record": a.value,
|
|
2441
2441
|
"request-method": "get"
|
|
2442
|
-
}, null, 8, ["config", "fetcher-url", "json-record"])) :
|
|
2443
|
-
e.format === "yaml" && t.record ? (
|
|
2442
|
+
}, null, 8, ["config", "fetcher-url", "json-record"])) : K("", !0),
|
|
2443
|
+
e.format === "yaml" && t.record ? (h(), N(Tn, {
|
|
2444
2444
|
key: 2,
|
|
2445
2445
|
"yaml-record": a.value
|
|
2446
|
-
}, null, 8, ["yaml-record"])) :
|
|
2446
|
+
}, null, 8, ["yaml-record"])) : K("", !0)
|
|
2447
2447
|
], 64));
|
|
2448
2448
|
}
|
|
2449
2449
|
}), yo = /* @__PURE__ */ ae(go, [["__scopeId", "data-v-2052238b"]]), ie = "24px", Te = (e, t) => {
|
|
@@ -2451,7 +2451,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2451
2451
|
for (const [r, i] of t)
|
|
2452
2452
|
n[r] = i;
|
|
2453
2453
|
return n;
|
|
2454
|
-
}, vo = (e) => (Ie("data-v-
|
|
2454
|
+
}, vo = (e) => (Ie("data-v-f68c7837"), e = e(), Ee(), e), bo = ["aria-hidden"], xo = {
|
|
2455
2455
|
key: 0,
|
|
2456
2456
|
"data-testid": "kui-icon-svg-title"
|
|
2457
2457
|
}, Co = /* @__PURE__ */ vo(() => /* @__PURE__ */ L("path", {
|
|
@@ -2526,14 +2526,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2526
2526
|
lineHeight: "0",
|
|
2527
2527
|
width: n.value
|
|
2528
2528
|
}));
|
|
2529
|
-
return (i, a) => (
|
|
2529
|
+
return (i, a) => (h(), N(se(e.as), {
|
|
2530
2530
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2531
2531
|
class: "kui-icon add-icon",
|
|
2532
2532
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
2533
2533
|
style: Se(r.value)
|
|
2534
2534
|
}, {
|
|
2535
2535
|
default: b(() => [
|
|
2536
|
-
(
|
|
2536
|
+
(h(), w("svg", {
|
|
2537
2537
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2538
2538
|
"data-testid": "kui-icon-svg-add-icon",
|
|
2539
2539
|
fill: "none",
|
|
@@ -2543,14 +2543,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2543
2543
|
width: "100%",
|
|
2544
2544
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2545
2545
|
}, [
|
|
2546
|
-
e.title ? (
|
|
2546
|
+
e.title ? (h(), w("title", xo, O(e.title), 1)) : K("", !0),
|
|
2547
2547
|
Co
|
|
2548
2548
|
], 8, bo))
|
|
2549
2549
|
]),
|
|
2550
2550
|
_: 1
|
|
2551
2551
|
}, 8, ["aria-hidden", "style"]));
|
|
2552
2552
|
}
|
|
2553
|
-
}), _o = /* @__PURE__ */ Te(ko, [["__scopeId", "data-v-
|
|
2553
|
+
}), _o = /* @__PURE__ */ Te(ko, [["__scopeId", "data-v-f68c7837"]]), wo = (e) => (Ie("data-v-9af646cc"), e = e(), Ee(), e), Ao = ["aria-hidden"], So = {
|
|
2554
2554
|
key: 0,
|
|
2555
2555
|
"data-testid": "kui-icon-svg-title"
|
|
2556
2556
|
}, Io = /* @__PURE__ */ wo(() => /* @__PURE__ */ L("path", {
|
|
@@ -2625,14 +2625,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2625
2625
|
lineHeight: "0",
|
|
2626
2626
|
width: n.value
|
|
2627
2627
|
}));
|
|
2628
|
-
return (i, a) => (
|
|
2628
|
+
return (i, a) => (h(), N(se(e.as), {
|
|
2629
2629
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2630
2630
|
class: "kui-icon book-icon",
|
|
2631
2631
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2632
2632
|
style: Se(r.value)
|
|
2633
2633
|
}, {
|
|
2634
2634
|
default: b(() => [
|
|
2635
|
-
(
|
|
2635
|
+
(h(), w("svg", {
|
|
2636
2636
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2637
2637
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2638
2638
|
fill: "none",
|
|
@@ -2642,17 +2642,17 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2642
2642
|
width: "100%",
|
|
2643
2643
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2644
2644
|
}, [
|
|
2645
|
-
e.title ? (
|
|
2645
|
+
e.title ? (h(), w("title", So, O(e.title), 1)) : K("", !0),
|
|
2646
2646
|
Io
|
|
2647
2647
|
], 8, Ao))
|
|
2648
2648
|
]),
|
|
2649
2649
|
_: 1
|
|
2650
2650
|
}, 8, ["aria-hidden", "style"]));
|
|
2651
2651
|
}
|
|
2652
|
-
}), To = /* @__PURE__ */ Te(Eo, [["__scopeId", "data-v-
|
|
2652
|
+
}), To = /* @__PURE__ */ Te(Eo, [["__scopeId", "data-v-9af646cc"]]), $o = (e) => (Ie("data-v-84c4811e"), e = e(), Ee(), e), Fo = ["aria-hidden"], Oo = {
|
|
2653
2653
|
key: 0,
|
|
2654
2654
|
"data-testid": "kui-icon-svg-title"
|
|
2655
|
-
}, Lo = /* @__PURE__ */
|
|
2655
|
+
}, Lo = /* @__PURE__ */ $o(() => /* @__PURE__ */ L("path", {
|
|
2656
2656
|
d: "M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",
|
|
2657
2657
|
fill: "currentColor"
|
|
2658
2658
|
}, null, -1)), No = /* @__PURE__ */ P({
|
|
@@ -2724,14 +2724,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2724
2724
|
lineHeight: "0",
|
|
2725
2725
|
width: n.value
|
|
2726
2726
|
}));
|
|
2727
|
-
return (i, a) => (
|
|
2727
|
+
return (i, a) => (h(), N(se(e.as), {
|
|
2728
2728
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2729
2729
|
class: "kui-icon chevron-down-icon",
|
|
2730
2730
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
2731
2731
|
style: Se(r.value)
|
|
2732
2732
|
}, {
|
|
2733
2733
|
default: b(() => [
|
|
2734
|
-
(
|
|
2734
|
+
(h(), w("svg", {
|
|
2735
2735
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2736
2736
|
"data-testid": "kui-icon-svg-chevron-down-icon",
|
|
2737
2737
|
fill: "none",
|
|
@@ -2741,14 +2741,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2741
2741
|
width: "100%",
|
|
2742
2742
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2743
2743
|
}, [
|
|
2744
|
-
e.title ? (
|
|
2744
|
+
e.title ? (h(), w("title", Oo, O(e.title), 1)) : K("", !0),
|
|
2745
2745
|
Lo
|
|
2746
|
-
], 8,
|
|
2746
|
+
], 8, Fo))
|
|
2747
2747
|
]),
|
|
2748
2748
|
_: 1
|
|
2749
2749
|
}, 8, ["aria-hidden", "style"]));
|
|
2750
2750
|
}
|
|
2751
|
-
}), Bo = /* @__PURE__ */ Te(No, [["__scopeId", "data-v-
|
|
2751
|
+
}), Bo = /* @__PURE__ */ Te(No, [["__scopeId", "data-v-84c4811e"]]), Ro = (e) => (Ie("data-v-26ad8dc6"), e = e(), Ee(), e), Mo = ["aria-hidden"], Ko = {
|
|
2752
2752
|
key: 0,
|
|
2753
2753
|
"data-testid": "kui-icon-svg-title"
|
|
2754
2754
|
}, Do = /* @__PURE__ */ Ro(() => /* @__PURE__ */ L("path", {
|
|
@@ -2823,14 +2823,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2823
2823
|
lineHeight: "0",
|
|
2824
2824
|
width: n.value
|
|
2825
2825
|
}));
|
|
2826
|
-
return (i, a) => (
|
|
2826
|
+
return (i, a) => (h(), N(se(e.as), {
|
|
2827
2827
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2828
2828
|
class: "kui-icon close-icon",
|
|
2829
2829
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
2830
2830
|
style: Se(r.value)
|
|
2831
2831
|
}, {
|
|
2832
2832
|
default: b(() => [
|
|
2833
|
-
(
|
|
2833
|
+
(h(), w("svg", {
|
|
2834
2834
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2835
2835
|
"data-testid": "kui-icon-svg-close-icon",
|
|
2836
2836
|
fill: "none",
|
|
@@ -2840,14 +2840,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2840
2840
|
width: "100%",
|
|
2841
2841
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2842
2842
|
}, [
|
|
2843
|
-
e.title ? (
|
|
2843
|
+
e.title ? (h(), w("title", Ko, O(e.title), 1)) : K("", !0),
|
|
2844
2844
|
Do
|
|
2845
2845
|
], 8, Mo))
|
|
2846
2846
|
]),
|
|
2847
2847
|
_: 1
|
|
2848
2848
|
}, 8, ["aria-hidden", "style"]));
|
|
2849
2849
|
}
|
|
2850
|
-
}), jo = /* @__PURE__ */ Te(Uo, [["__scopeId", "data-v-
|
|
2850
|
+
}), jo = /* @__PURE__ */ Te(Uo, [["__scopeId", "data-v-26ad8dc6"]]), qo = (e) => (Ie("data-v-a3352b0f"), e = e(), Ee(), e), Po = ["aria-hidden"], Ho = {
|
|
2851
2851
|
key: 0,
|
|
2852
2852
|
"data-testid": "kui-icon-svg-title"
|
|
2853
2853
|
}, Vo = /* @__PURE__ */ qo(() => /* @__PURE__ */ L("path", {
|
|
@@ -2922,14 +2922,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2922
2922
|
lineHeight: "0",
|
|
2923
2923
|
width: n.value
|
|
2924
2924
|
}));
|
|
2925
|
-
return (i, a) => (
|
|
2925
|
+
return (i, a) => (h(), N(se(e.as), {
|
|
2926
2926
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2927
2927
|
class: "kui-icon copy-icon",
|
|
2928
2928
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
2929
2929
|
style: Se(r.value)
|
|
2930
2930
|
}, {
|
|
2931
2931
|
default: b(() => [
|
|
2932
|
-
(
|
|
2932
|
+
(h(), w("svg", {
|
|
2933
2933
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2934
2934
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
2935
2935
|
fill: "none",
|
|
@@ -2939,14 +2939,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
2939
2939
|
width: "100%",
|
|
2940
2940
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2941
2941
|
}, [
|
|
2942
|
-
e.title ? (
|
|
2942
|
+
e.title ? (h(), w("title", Ho, O(e.title), 1)) : K("", !0),
|
|
2943
2943
|
Vo
|
|
2944
2944
|
], 8, Po))
|
|
2945
2945
|
]),
|
|
2946
2946
|
_: 1
|
|
2947
2947
|
}, 8, ["aria-hidden", "style"]));
|
|
2948
2948
|
}
|
|
2949
|
-
}), Yo = /* @__PURE__ */ Te(zo, [["__scopeId", "data-v-
|
|
2949
|
+
}), Yo = /* @__PURE__ */ Te(zo, [["__scopeId", "data-v-a3352b0f"]]), Wo = (e) => (Ie("data-v-d43c21f8"), e = e(), Ee(), e), Jo = ["aria-hidden"], Go = {
|
|
2950
2950
|
key: 0,
|
|
2951
2951
|
"data-testid": "kui-icon-svg-title"
|
|
2952
2952
|
}, Zo = /* @__PURE__ */ Wo(() => /* @__PURE__ */ L("path", {
|
|
@@ -3021,14 +3021,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3021
3021
|
lineHeight: "0",
|
|
3022
3022
|
width: n.value
|
|
3023
3023
|
}));
|
|
3024
|
-
return (i, a) => (
|
|
3024
|
+
return (i, a) => (h(), N(se(e.as), {
|
|
3025
3025
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3026
3026
|
class: "kui-icon more-icon",
|
|
3027
3027
|
"data-testid": "kui-icon-wrapper-more-icon",
|
|
3028
3028
|
style: Se(r.value)
|
|
3029
3029
|
}, {
|
|
3030
3030
|
default: b(() => [
|
|
3031
|
-
(
|
|
3031
|
+
(h(), w("svg", {
|
|
3032
3032
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3033
3033
|
"data-testid": "kui-icon-svg-more-icon",
|
|
3034
3034
|
fill: "none",
|
|
@@ -3038,14 +3038,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3038
3038
|
width: "100%",
|
|
3039
3039
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3040
3040
|
}, [
|
|
3041
|
-
e.title ? (
|
|
3041
|
+
e.title ? (h(), w("title", Go, O(e.title), 1)) : K("", !0),
|
|
3042
3042
|
Zo
|
|
3043
3043
|
], 8, Jo))
|
|
3044
3044
|
]),
|
|
3045
3045
|
_: 1
|
|
3046
3046
|
}, 8, ["aria-hidden", "style"]));
|
|
3047
3047
|
}
|
|
3048
|
-
}), Xo = /* @__PURE__ */ Te(Qo, [["__scopeId", "data-v-
|
|
3048
|
+
}), Xo = /* @__PURE__ */ Te(Qo, [["__scopeId", "data-v-d43c21f8"]]), el = {
|
|
3049
3049
|
class: "config-card-title",
|
|
3050
3050
|
"data-testid": "config-card-title"
|
|
3051
3051
|
}, tl = { class: "config-card-actions" }, nl = ["href"], rl = { class: "config-card-details-section" }, il = /* @__PURE__ */ P({
|
|
@@ -3126,8 +3126,8 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3126
3126
|
},
|
|
3127
3127
|
emits: ["loading", "fetch:success", "fetch:error"],
|
|
3128
3128
|
setup(e, { emit: t }) {
|
|
3129
|
-
var
|
|
3130
|
-
const n = t, r = e, { i18n: { t: i } } = Y.useI18n(), { getMessageFromError: a } = Y.useErrors(), { convertKeyToTitle: o } = Y.useStringHelpers(), { axiosInstance: l } = Y.useAxios((
|
|
3129
|
+
var A;
|
|
3130
|
+
const n = t, r = e, { i18n: { t: i } } = Y.useI18n(), { getMessageFromError: a } = Y.useErrors(), { convertKeyToTitle: o } = Y.useStringHelpers(), { axiosInstance: l } = Y.useAxios((A = r.config) == null ? void 0 : A.axiosRequestConfig), s = [
|
|
3131
3131
|
{
|
|
3132
3132
|
label: i("baseConfigCard.general.structuredFormat"),
|
|
3133
3133
|
value: "structured",
|
|
@@ -3141,9 +3141,9 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3141
3141
|
label: "YAML",
|
|
3142
3142
|
value: "yaml"
|
|
3143
3143
|
}
|
|
3144
|
-
],
|
|
3145
|
-
|
|
3146
|
-
},
|
|
3144
|
+
], u = B("structured"), d = (f) => {
|
|
3145
|
+
u.value = f == null ? void 0 : f.value;
|
|
3146
|
+
}, c = {
|
|
3147
3147
|
id: {
|
|
3148
3148
|
type: H.ID,
|
|
3149
3149
|
label: i("baseConfigCard.commonFields.id_label"),
|
|
@@ -3177,77 +3177,77 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3177
3177
|
// the last property displayed
|
|
3178
3178
|
section: re.Basic
|
|
3179
3179
|
}
|
|
3180
|
-
},
|
|
3181
|
-
var
|
|
3180
|
+
}, m = B(!1), p = B(!1), y = B(""), v = B({}), T = k(() => {
|
|
3181
|
+
var F, x, U;
|
|
3182
3182
|
if (!v.value)
|
|
3183
3183
|
return [];
|
|
3184
|
-
const f = [],
|
|
3185
|
-
for (const
|
|
3186
|
-
const
|
|
3187
|
-
let j =
|
|
3188
|
-
(q || q === 0) && (j = q === -1 ?
|
|
3184
|
+
const f = [], I = Object.keys(v.value).length;
|
|
3185
|
+
for (const $ in v.value) {
|
|
3186
|
+
const _ = (x = (F = r.configSchema) == null ? void 0 : F[$]) == null ? void 0 : x.order, q = (U = c[$]) == null ? void 0 : U.order;
|
|
3187
|
+
let j = I;
|
|
3188
|
+
(q || q === 0) && (j = q === -1 ? I + 1 : q), _ && (j = _ === -1 ? I + 1 : _), f.push([$, j]);
|
|
3189
3189
|
}
|
|
3190
|
-
return f.sort(function(
|
|
3191
|
-
return
|
|
3192
|
-
}), f.map((
|
|
3190
|
+
return f.sort(function($, _) {
|
|
3191
|
+
return $[1] - _[1];
|
|
3192
|
+
}), f.map(($) => {
|
|
3193
3193
|
var he, lt;
|
|
3194
|
-
const
|
|
3194
|
+
const _ = $[0], q = (he = v.value) == null ? void 0 : he[_], j = ((lt = r.configSchema) == null ? void 0 : lt[_]) || {}, J = c[_];
|
|
3195
3195
|
return {
|
|
3196
|
-
key:
|
|
3196
|
+
key: _,
|
|
3197
3197
|
value: q,
|
|
3198
3198
|
hidden: j.hidden || !1,
|
|
3199
3199
|
type: j.type ?? ((J == null ? void 0 : J.type) || H.Text),
|
|
3200
|
-
label: j.label ?? ((J == null ? void 0 : J.label) || o(
|
|
3200
|
+
label: j.label ?? ((J == null ? void 0 : J.label) || o(_)),
|
|
3201
3201
|
tooltip: j.tooltip ?? ((J == null ? void 0 : J.tooltip) || void 0),
|
|
3202
3202
|
section: j.section ?? ((J == null ? void 0 : J.section) || re.Advanced)
|
|
3203
3203
|
};
|
|
3204
|
-
}).filter((
|
|
3205
|
-
}),
|
|
3204
|
+
}).filter(($) => !$.hidden && $.key !== r.pluginConfigKey);
|
|
3205
|
+
}), D = k(() => {
|
|
3206
3206
|
var x, U;
|
|
3207
3207
|
if (!v.value || !r.pluginConfigKey)
|
|
3208
3208
|
return [];
|
|
3209
|
-
const f = v.value[r.pluginConfigKey] || {},
|
|
3210
|
-
for (const
|
|
3211
|
-
const
|
|
3212
|
-
let j = q != null && q !== "" ?
|
|
3213
|
-
|
|
3209
|
+
const f = v.value[r.pluginConfigKey] || {}, I = Object.keys(f).length, F = [];
|
|
3210
|
+
for (const $ in f) {
|
|
3211
|
+
const _ = (U = (x = r.pluginConfigSchema) == null ? void 0 : x[$]) == null ? void 0 : U.order, q = f[$];
|
|
3212
|
+
let j = q != null && q !== "" ? I - 1 : I;
|
|
3213
|
+
_ && (j = _ === -1 ? I + 1 : _), F.push([$, j]);
|
|
3214
3214
|
}
|
|
3215
|
-
return
|
|
3216
|
-
return
|
|
3217
|
-
}),
|
|
3215
|
+
return F.sort(function($, _) {
|
|
3216
|
+
return $[1] - _[1];
|
|
3217
|
+
}), F.map(($) => {
|
|
3218
3218
|
var J;
|
|
3219
|
-
const
|
|
3219
|
+
const _ = $[0], q = f[_], j = ((J = r.pluginConfigSchema) == null ? void 0 : J[_]) || {};
|
|
3220
3220
|
return {
|
|
3221
|
-
key:
|
|
3221
|
+
key: _,
|
|
3222
3222
|
value: q,
|
|
3223
3223
|
hidden: j.hidden || !1,
|
|
3224
3224
|
type: j.type ?? H.Text,
|
|
3225
|
-
label: j.label ?? o(
|
|
3225
|
+
label: j.label ?? o(_),
|
|
3226
3226
|
tooltip: j.tooltip ?? void 0,
|
|
3227
3227
|
section: re.Plugin
|
|
3228
3228
|
};
|
|
3229
|
-
}).filter((
|
|
3230
|
-
}),
|
|
3231
|
-
var f,
|
|
3229
|
+
}).filter(($) => !$.hidden);
|
|
3230
|
+
}), S = k(() => {
|
|
3231
|
+
var f, I, F, x;
|
|
3232
3232
|
return {
|
|
3233
|
-
basic: (f =
|
|
3234
|
-
advanced: (
|
|
3235
|
-
plugin: (x =
|
|
3233
|
+
basic: (f = T.value) == null ? void 0 : f.filter((U) => U.section === re.Basic),
|
|
3234
|
+
advanced: (I = T.value) == null ? void 0 : I.filter((U) => U.section === re.Advanced),
|
|
3235
|
+
plugin: (x = D.value) == null ? void 0 : x.concat((F = T.value) == null ? void 0 : F.filter((U) => U.section === re.Plugin))
|
|
3236
3236
|
};
|
|
3237
3237
|
}), Z = k(() => {
|
|
3238
3238
|
const f = [];
|
|
3239
|
-
return
|
|
3240
|
-
}),
|
|
3241
|
-
var
|
|
3239
|
+
return S.value.basic.length && f.push("basic"), S.value.advanced.length && f.push("advanced"), S.value.plugin.length && f.push("plugin"), f;
|
|
3240
|
+
}), g = k(() => {
|
|
3241
|
+
var I, F;
|
|
3242
3242
|
let f = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3243
|
-
return r.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((
|
|
3243
|
+
return r.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((I = r.config) == null ? void 0 : I.controlPlaneId) || "") : r.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (F = r.config) != null && F.workspace ? `/${r.config.workspace}` : "")), f = f.replace(/{id}/gi, r.config.entityId), f;
|
|
3244
3244
|
});
|
|
3245
|
-
return Ae(
|
|
3245
|
+
return Ae(m, (f) => {
|
|
3246
3246
|
n("loading", f);
|
|
3247
3247
|
}, { immediate: !0 }), Lt(async () => {
|
|
3248
|
-
p.value = !1,
|
|
3248
|
+
p.value = !1, m.value = !0;
|
|
3249
3249
|
try {
|
|
3250
|
-
const { data: f } = await l.get(
|
|
3250
|
+
const { data: f } = await l.get(g.value);
|
|
3251
3251
|
if (r.dataKey)
|
|
3252
3252
|
if (typeof f[r.dataKey] < "u")
|
|
3253
3253
|
v.value = { ...f[r.dataKey] };
|
|
@@ -3255,39 +3255,39 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3255
3255
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3256
3256
|
else
|
|
3257
3257
|
v.value = { ...f };
|
|
3258
|
-
Object.keys(r.configSchema).filter((
|
|
3259
|
-
v.value && typeof v.value[
|
|
3258
|
+
Object.keys(r.configSchema).filter((F) => r.configSchema[F].forceShow).forEach((F) => {
|
|
3259
|
+
v.value && typeof v.value[F] > "u" && (v.value[F] = null);
|
|
3260
3260
|
}), n("fetch:success", f);
|
|
3261
3261
|
} catch (f) {
|
|
3262
|
-
const
|
|
3263
|
-
y.value =
|
|
3262
|
+
const I = a(f);
|
|
3263
|
+
y.value = I.startsWith("code") ? i("baseConfigCard.errors.load") : I, p.value = !0, n("fetch:error", f);
|
|
3264
3264
|
} finally {
|
|
3265
|
-
|
|
3265
|
+
m.value = !1;
|
|
3266
3266
|
}
|
|
3267
|
-
}), (f,
|
|
3268
|
-
const
|
|
3269
|
-
return
|
|
3267
|
+
}), (f, I) => {
|
|
3268
|
+
const F = M("KLabel"), x = M("KSelect"), U = M("KButton"), $ = M("KSkeleton"), _ = M("KEmptyState"), q = M("KCard");
|
|
3269
|
+
return h(), N(q, {
|
|
3270
3270
|
class: "kong-ui-entity-base-config-card",
|
|
3271
3271
|
"title-tag": e.titleTag
|
|
3272
3272
|
}, _e({
|
|
3273
3273
|
actions: b(() => [
|
|
3274
3274
|
L("div", tl, [
|
|
3275
3275
|
z(f.$slots, "actions", {}, void 0, !0),
|
|
3276
|
-
|
|
3276
|
+
R(F, {
|
|
3277
3277
|
class: "config-format-select-label",
|
|
3278
3278
|
"data-testid": "config-format-select-label"
|
|
3279
3279
|
}, {
|
|
3280
3280
|
default: b(() => [
|
|
3281
|
-
V(
|
|
3281
|
+
V(O(e.label), 1)
|
|
3282
3282
|
]),
|
|
3283
3283
|
_: 1
|
|
3284
3284
|
}),
|
|
3285
|
-
|
|
3285
|
+
R(x, {
|
|
3286
3286
|
"data-testid": "select-config-format",
|
|
3287
3287
|
items: s,
|
|
3288
3288
|
onChange: d
|
|
3289
3289
|
}),
|
|
3290
|
-
e.configCardDoc ? (
|
|
3290
|
+
e.configCardDoc ? (h(), N(U, {
|
|
3291
3291
|
key: 0,
|
|
3292
3292
|
appearance: "tertiary",
|
|
3293
3293
|
class: "book-icon",
|
|
@@ -3299,36 +3299,36 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3299
3299
|
rel: "noopener",
|
|
3300
3300
|
target: "_blank"
|
|
3301
3301
|
}, [
|
|
3302
|
-
|
|
3302
|
+
R(E(To), { size: E($r) }, null, 8, ["size"])
|
|
3303
3303
|
], 8, nl)
|
|
3304
3304
|
]),
|
|
3305
3305
|
_: 1
|
|
3306
|
-
})) :
|
|
3306
|
+
})) : K("", !0)
|
|
3307
3307
|
])
|
|
3308
3308
|
]),
|
|
3309
3309
|
default: b(() => [
|
|
3310
|
-
|
|
3310
|
+
m.value ? (h(), N($, {
|
|
3311
3311
|
key: 0,
|
|
3312
3312
|
"data-testid": "config-card-loader",
|
|
3313
3313
|
"table-columns": 2,
|
|
3314
3314
|
type: "table"
|
|
3315
|
-
})) : p.value ? (
|
|
3315
|
+
})) : p.value ? (h(), N(_, {
|
|
3316
3316
|
key: 1,
|
|
3317
3317
|
"data-testid": "config-card-fetch-error",
|
|
3318
3318
|
"icon-variant": "error"
|
|
3319
3319
|
}, {
|
|
3320
3320
|
default: b(() => [
|
|
3321
|
-
L("h3", null,
|
|
3321
|
+
L("h3", null, O(y.value), 1)
|
|
3322
3322
|
]),
|
|
3323
3323
|
_: 1
|
|
3324
|
-
})) :
|
|
3324
|
+
})) : K("", !0),
|
|
3325
3325
|
L("div", rl, [
|
|
3326
|
-
|
|
3326
|
+
R(yo, {
|
|
3327
3327
|
config: e.config,
|
|
3328
|
-
"fetcher-url":
|
|
3329
|
-
format:
|
|
3328
|
+
"fetcher-url": g.value,
|
|
3329
|
+
format: u.value,
|
|
3330
3330
|
"prop-list-types": Z.value,
|
|
3331
|
-
"property-collections":
|
|
3331
|
+
"property-collections": S.value,
|
|
3332
3332
|
record: v.value
|
|
3333
3333
|
}, _e({ _: 2 }, [
|
|
3334
3334
|
oe(Object.keys(f.$slots), (j) => ({
|
|
@@ -3350,7 +3350,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3350
3350
|
fn: b(() => [
|
|
3351
3351
|
L("span", el, [
|
|
3352
3352
|
z(f.$slots, "title", {}, () => [
|
|
3353
|
-
V(
|
|
3353
|
+
V(O(E(i)("baseConfigCard.title")), 1)
|
|
3354
3354
|
], !0)
|
|
3355
3355
|
])
|
|
3356
3356
|
]),
|
|
@@ -3431,19 +3431,19 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3431
3431
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3432
3432
|
setup(e, { emit: t }) {
|
|
3433
3433
|
var Z;
|
|
3434
|
-
const n = t, r = e, i = jn(), { i18n: { t: a } } = Y.useI18n(), { getMessageFromError: o } = Y.useErrors(), { axiosInstance: l } = Y.useAxios((Z = r.config) == null ? void 0 : Z.axiosRequestConfig), s =
|
|
3435
|
-
var
|
|
3436
|
-
let
|
|
3437
|
-
return r.config.app === "konnect" ?
|
|
3434
|
+
const n = t, r = e, i = jn(), { i18n: { t: a } } = Y.useI18n(), { getMessageFromError: o } = Y.useErrors(), { axiosInstance: l } = Y.useAxios((Z = r.config) == null ? void 0 : Z.axiosRequestConfig), s = B(!1), u = B(!1), d = B(""), c = k(() => r.canSubmit === !1 || r.isReadonly), m = B(!1), p = k(() => {
|
|
3435
|
+
var A, f;
|
|
3436
|
+
let g = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3437
|
+
return r.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((A = r.config) == null ? void 0 : A.controlPlaneId) || "") : r.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (f = r.config) != null && f.workspace ? `/${r.config.workspace}` : "")), r.editId ? (g = g.replace(/{id}/gi, r.editId), g) : (g = g.replace(/\/{id}/gi, ""), g);
|
|
3438
3438
|
}), y = () => {
|
|
3439
|
-
|
|
3439
|
+
m.value = !m.value;
|
|
3440
3440
|
}, v = () => {
|
|
3441
|
-
r.config.cancelRoute ? i.push(r.config.cancelRoute) :
|
|
3442
|
-
},
|
|
3441
|
+
r.config.cancelRoute ? i.push(r.config.cancelRoute) : T();
|
|
3442
|
+
}, T = () => {
|
|
3443
3443
|
n("cancel");
|
|
3444
|
-
},
|
|
3445
|
-
|
|
3446
|
-
},
|
|
3444
|
+
}, D = () => {
|
|
3445
|
+
c.value || n("submit");
|
|
3446
|
+
}, S = B([
|
|
3447
3447
|
{
|
|
3448
3448
|
title: a("baseForm.configuration.yaml"),
|
|
3449
3449
|
hash: "#yaml"
|
|
@@ -3453,106 +3453,106 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3453
3453
|
hash: "#json"
|
|
3454
3454
|
}
|
|
3455
3455
|
]);
|
|
3456
|
-
return Ae(() => s.value, (
|
|
3457
|
-
n("loading",
|
|
3456
|
+
return Ae(() => s.value, (g) => {
|
|
3457
|
+
n("loading", g);
|
|
3458
3458
|
}, { immediate: !0 }), Lt(async () => {
|
|
3459
3459
|
if (r.editId)
|
|
3460
3460
|
try {
|
|
3461
|
-
|
|
3462
|
-
const { data:
|
|
3463
|
-
n("fetch:success",
|
|
3464
|
-
} catch (
|
|
3465
|
-
const
|
|
3466
|
-
d.value =
|
|
3461
|
+
u.value = !1, s.value = !0;
|
|
3462
|
+
const { data: g } = await l.get(p.value);
|
|
3463
|
+
n("fetch:success", g);
|
|
3464
|
+
} catch (g) {
|
|
3465
|
+
const A = o(g);
|
|
3466
|
+
d.value = A.startsWith("code") ? a("baseForm.errors.edit") : A, u.value = !0, n("fetch:error", g);
|
|
3467
3467
|
} finally {
|
|
3468
3468
|
s.value = !1;
|
|
3469
3469
|
}
|
|
3470
|
-
}), (
|
|
3471
|
-
const f =
|
|
3472
|
-
return
|
|
3470
|
+
}), (g, A) => {
|
|
3471
|
+
const f = M("KSkeleton"), I = M("KEmptyState"), F = M("KAlert"), x = M("KButton"), U = M("KTabs"), $ = M("KSlideout");
|
|
3472
|
+
return h(), N(se(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3473
3473
|
default: b(() => [
|
|
3474
|
-
s.value ? (
|
|
3474
|
+
s.value ? (h(), N(f, {
|
|
3475
3475
|
key: 0,
|
|
3476
3476
|
type: "form"
|
|
3477
|
-
})) :
|
|
3477
|
+
})) : u.value ? (h(), N(I, {
|
|
3478
3478
|
key: 1,
|
|
3479
|
-
"action-button-text":
|
|
3479
|
+
"action-button-text": E(a)("baseForm.actions.back"),
|
|
3480
3480
|
"data-testid": "form-fetch-error",
|
|
3481
3481
|
"icon-variant": "error",
|
|
3482
3482
|
onClickAction: v
|
|
3483
3483
|
}, {
|
|
3484
3484
|
default: b(() => [
|
|
3485
|
-
L("h3", null,
|
|
3485
|
+
L("h3", null, O(d.value), 1)
|
|
3486
3486
|
]),
|
|
3487
3487
|
_: 1
|
|
3488
|
-
}, 8, ["action-button-text"])) : (
|
|
3488
|
+
}, 8, ["action-button-text"])) : (h(), w("form", {
|
|
3489
3489
|
key: 2,
|
|
3490
3490
|
"data-testid": "form-content",
|
|
3491
3491
|
novalidate: r.noValidate,
|
|
3492
|
-
onReset: Ye(
|
|
3493
|
-
onSubmit: Ye(
|
|
3492
|
+
onReset: Ye(T, ["prevent"]),
|
|
3493
|
+
onSubmit: Ye(D, ["prevent"])
|
|
3494
3494
|
}, [
|
|
3495
|
-
z(
|
|
3496
|
-
e.errorMessage ? (
|
|
3495
|
+
z(g.$slots, "default", {}, void 0, !0),
|
|
3496
|
+
e.errorMessage ? (h(), N(F, {
|
|
3497
3497
|
key: 0,
|
|
3498
3498
|
appearance: "danger",
|
|
3499
3499
|
"data-testid": "form-error",
|
|
3500
3500
|
message: e.errorMessage
|
|
3501
|
-
}, null, 8, ["message"])) :
|
|
3501
|
+
}, null, 8, ["message"])) : K("", !0),
|
|
3502
3502
|
L("div", ol, [
|
|
3503
|
-
z(
|
|
3504
|
-
|
|
3503
|
+
z(g.$slots, "form-actions", {}, () => [
|
|
3504
|
+
R(x, {
|
|
3505
3505
|
appearance: "tertiary",
|
|
3506
3506
|
"data-testid": "form-view-configuration",
|
|
3507
|
-
onClick:
|
|
3507
|
+
onClick: A[0] || (A[0] = (_) => y())
|
|
3508
3508
|
}, {
|
|
3509
3509
|
default: b(() => [
|
|
3510
|
-
V(
|
|
3510
|
+
V(O(E(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3511
3511
|
]),
|
|
3512
3512
|
_: 1
|
|
3513
3513
|
}),
|
|
3514
|
-
|
|
3514
|
+
R(x, {
|
|
3515
3515
|
appearance: "secondary",
|
|
3516
3516
|
"data-testid": "form-cancel",
|
|
3517
3517
|
disabled: e.isReadonly,
|
|
3518
3518
|
type: "reset"
|
|
3519
3519
|
}, {
|
|
3520
3520
|
default: b(() => [
|
|
3521
|
-
V(
|
|
3521
|
+
V(O(E(a)("baseForm.actions.cancel")), 1)
|
|
3522
3522
|
]),
|
|
3523
3523
|
_: 1
|
|
3524
3524
|
}, 8, ["disabled"]),
|
|
3525
|
-
|
|
3525
|
+
R(x, {
|
|
3526
3526
|
appearance: "primary",
|
|
3527
3527
|
"data-testid": "form-submit",
|
|
3528
|
-
disabled:
|
|
3528
|
+
disabled: c.value,
|
|
3529
3529
|
type: "submit"
|
|
3530
3530
|
}, {
|
|
3531
3531
|
default: b(() => [
|
|
3532
|
-
V(
|
|
3532
|
+
V(O(E(a)("baseForm.actions.save")), 1)
|
|
3533
3533
|
]),
|
|
3534
3534
|
_: 1
|
|
3535
3535
|
}, 8, ["disabled"])
|
|
3536
3536
|
], !0)
|
|
3537
3537
|
])
|
|
3538
3538
|
], 40, al)),
|
|
3539
|
-
|
|
3539
|
+
R($, {
|
|
3540
3540
|
"close-on-blur": !1,
|
|
3541
3541
|
"data-testid": "form-view-configuration-slideout",
|
|
3542
3542
|
"has-overlay": !1,
|
|
3543
3543
|
"offset-top": 60,
|
|
3544
|
-
title:
|
|
3545
|
-
visible:
|
|
3546
|
-
onClose:
|
|
3544
|
+
title: E(a)("baseForm.configuration.title"),
|
|
3545
|
+
visible: m.value,
|
|
3546
|
+
onClose: A[1] || (A[1] = (_) => y())
|
|
3547
3547
|
}, {
|
|
3548
3548
|
default: b(() => [
|
|
3549
|
-
L("div", null,
|
|
3550
|
-
|
|
3549
|
+
L("div", null, O(E(a)("baseForm.configuration.message")), 1),
|
|
3550
|
+
R(U, {
|
|
3551
3551
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3552
|
-
tabs:
|
|
3552
|
+
tabs: S.value
|
|
3553
3553
|
}, {
|
|
3554
3554
|
json: b(() => [
|
|
3555
|
-
|
|
3555
|
+
R(Ut, {
|
|
3556
3556
|
config: e.config,
|
|
3557
3557
|
"fetcher-url": p.value,
|
|
3558
3558
|
"json-record": r.formFields,
|
|
@@ -3560,7 +3560,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3560
3560
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3561
3561
|
]),
|
|
3562
3562
|
yaml: b(() => [
|
|
3563
|
-
|
|
3563
|
+
R(Tn, {
|
|
3564
3564
|
"yaml-record": r.formFields
|
|
3565
3565
|
}, null, 8, ["yaml-record"])
|
|
3566
3566
|
]),
|
|
@@ -3574,7 +3574,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3574
3574
|
});
|
|
3575
3575
|
};
|
|
3576
3576
|
}
|
|
3577
|
-
}), ts = /* @__PURE__ */ ae(ll, [["__scopeId", "data-v-fd05df8e"]]), sl = ["data-truncate"],
|
|
3577
|
+
}), ts = /* @__PURE__ */ ae(ll, [["__scopeId", "data-v-fd05df8e"]]), sl = ["data-truncate"], cl = /* @__PURE__ */ P({
|
|
3578
3578
|
__name: "EntityBaseTableCell",
|
|
3579
3579
|
props: {
|
|
3580
3580
|
keyName: {
|
|
@@ -3592,72 +3592,66 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3592
3592
|
},
|
|
3593
3593
|
setup(e) {
|
|
3594
3594
|
const t = e, n = k(() => {
|
|
3595
|
-
var
|
|
3596
|
-
return ((
|
|
3595
|
+
var y;
|
|
3596
|
+
return ((y = t.rowEl) == null ? void 0 : y.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3597
3597
|
}), r = k(() => {
|
|
3598
|
-
var
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
}, s = () => {
|
|
3609
|
-
var N, w, Z;
|
|
3610
|
-
let _ = ((N = n.value) == null ? void 0 : N.clientWidth) || 0;
|
|
3598
|
+
var v, T;
|
|
3599
|
+
const y = (v = t.rowEl) == null ? void 0 : v.querySelectorAll("td");
|
|
3600
|
+
return y ? ((T = y[0]) == null ? void 0 : T.getAttribute("data-testid")) === t.keyName : !1;
|
|
3601
|
+
}), i = k(() => r.value || t.tooltip);
|
|
3602
|
+
let a;
|
|
3603
|
+
const o = () => {
|
|
3604
|
+
a && (a.disconnect(), a = void 0);
|
|
3605
|
+
}, l = () => {
|
|
3606
|
+
var T, D, S;
|
|
3607
|
+
let y = ((T = n.value) == null ? void 0 : T.clientWidth) || 0;
|
|
3611
3608
|
if (n.value && "getComputedStyle" in window) {
|
|
3612
|
-
const
|
|
3613
|
-
|
|
3609
|
+
const Z = window.getComputedStyle(n.value);
|
|
3610
|
+
y -= (parseFloat(Z.paddingLeft) || 0) + (parseFloat(Z.paddingRight) || 0);
|
|
3614
3611
|
}
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
});
|
|
3612
|
+
const v = ((D = n.value) == null ? void 0 : D.querySelector('[data-truncate="true"]')) || null;
|
|
3613
|
+
u.value = (v == null ? void 0 : v.getBoundingClientRect().width) || 0, d.value = y, c.value = ((S = s.value) == null ? void 0 : S.innerText) || "";
|
|
3614
|
+
}, s = B({}), u = B(0), d = B(0), c = B(""), m = Ae(
|
|
3615
|
+
n,
|
|
3616
|
+
(y) => {
|
|
3617
|
+
i.value && (o(), "ResizeObserver" in window && window && (a = new ResizeObserver((v) => {
|
|
3618
|
+
window.requestAnimationFrame(() => {
|
|
3619
|
+
!Array.isArray(v) || !v.length || l();
|
|
3624
3620
|
});
|
|
3625
|
-
|
|
3626
|
-
N && o.observe(N);
|
|
3627
|
-
}
|
|
3621
|
+
}), y && a.observe(y)));
|
|
3628
3622
|
},
|
|
3629
3623
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3630
|
-
),
|
|
3624
|
+
), p = k(() => i.value ? u.value > d.value : !1);
|
|
3631
3625
|
return Nn(() => {
|
|
3632
|
-
|
|
3626
|
+
l();
|
|
3633
3627
|
}), Bn(() => {
|
|
3634
|
-
|
|
3635
|
-
}), (
|
|
3636
|
-
const
|
|
3637
|
-
return
|
|
3628
|
+
m();
|
|
3629
|
+
}), (y, v) => {
|
|
3630
|
+
const T = M("KTooltip");
|
|
3631
|
+
return h(), w("span", {
|
|
3638
3632
|
ref_key: "contentRef",
|
|
3639
|
-
ref:
|
|
3633
|
+
ref: s,
|
|
3640
3634
|
class: "content-wrapper"
|
|
3641
3635
|
}, [
|
|
3642
|
-
|
|
3636
|
+
i.value ? (h(), w("span", {
|
|
3643
3637
|
key: 0,
|
|
3644
|
-
"data-truncate":
|
|
3638
|
+
"data-truncate": i.value || void 0
|
|
3645
3639
|
}, [
|
|
3646
|
-
|
|
3640
|
+
R(T, {
|
|
3647
3641
|
"max-width": "300",
|
|
3648
|
-
placement: "
|
|
3649
|
-
text:
|
|
3642
|
+
placement: "bottom-start",
|
|
3643
|
+
text: p.value ? c.value : ""
|
|
3650
3644
|
}, {
|
|
3651
3645
|
default: b(() => [
|
|
3652
|
-
z(
|
|
3646
|
+
z(y.$slots, "default", {}, void 0, !0)
|
|
3653
3647
|
]),
|
|
3654
3648
|
_: 3
|
|
3655
3649
|
}, 8, ["text"])
|
|
3656
|
-
], 8, sl)) : z(
|
|
3650
|
+
], 8, sl)) : z(y.$slots, "default", { key: 1 }, void 0, !0)
|
|
3657
3651
|
], 512);
|
|
3658
3652
|
};
|
|
3659
3653
|
}
|
|
3660
|
-
}),
|
|
3654
|
+
}), ul = /* @__PURE__ */ ae(cl, [["__scopeId", "data-v-aced1ac4"]]), dl = { class: "toolbar-container" }, fl = {
|
|
3661
3655
|
key: 0,
|
|
3662
3656
|
class: "toolbar-button-container"
|
|
3663
3657
|
}, pl = ["data-testid"], hl = /* @__PURE__ */ P({
|
|
@@ -3779,7 +3773,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3779
3773
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3780
3774
|
setup(e, { emit: t }) {
|
|
3781
3775
|
const n = e, r = t, { i18n: { t: i } } = Y.useI18n(), a = k(() => {
|
|
3782
|
-
var f,
|
|
3776
|
+
var f, I;
|
|
3783
3777
|
return typeof n.errorMessage == "string" ? {
|
|
3784
3778
|
hasError: !!n.errorMessage,
|
|
3785
3779
|
title: n.errorMessage,
|
|
@@ -3787,15 +3781,15 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3787
3781
|
} : {
|
|
3788
3782
|
hasError: !!n.errorMessage,
|
|
3789
3783
|
title: (f = n.errorMessage) == null ? void 0 : f.title,
|
|
3790
|
-
message: (
|
|
3784
|
+
message: (I = n.errorMessage) == null ? void 0 : I.message
|
|
3791
3785
|
};
|
|
3792
3786
|
}), o = k(() => n.cacheIdentifier || n.preferencesStorageKey), l = (f) => f.hasData || !!n.query, s = k(() => {
|
|
3793
3787
|
const f = [];
|
|
3794
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3795
|
-
const x = n.tableHeaders[
|
|
3788
|
+
return Object.keys(n.tableHeaders).forEach((F) => {
|
|
3789
|
+
const x = n.tableHeaders[F];
|
|
3796
3790
|
f.push({
|
|
3797
|
-
label: x.label ??
|
|
3798
|
-
key:
|
|
3791
|
+
label: x.label ?? F,
|
|
3792
|
+
key: F,
|
|
3799
3793
|
sortable: x.sortable ?? !1,
|
|
3800
3794
|
hidable: !0
|
|
3801
3795
|
});
|
|
@@ -3803,60 +3797,60 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3803
3797
|
key: "actions",
|
|
3804
3798
|
hideLabel: !0
|
|
3805
3799
|
}), f;
|
|
3806
|
-
}),
|
|
3800
|
+
}), u = (f) => ({
|
|
3807
3801
|
"data-rowid": f.id,
|
|
3808
3802
|
"data-testid": f.name,
|
|
3809
3803
|
...n.rowAttributes(f)
|
|
3810
|
-
}), d =
|
|
3811
|
-
var
|
|
3812
|
-
return (
|
|
3813
|
-
},
|
|
3814
|
-
const
|
|
3804
|
+
}), d = B({}), c = (f) => {
|
|
3805
|
+
var I;
|
|
3806
|
+
return (I = d.value) == null ? void 0 : I.$el.querySelector(`[data-rowid="${f.id}"]`);
|
|
3807
|
+
}, m = (f) => {
|
|
3808
|
+
const I = {
|
|
3815
3809
|
"data-testid": f.headerKey,
|
|
3816
3810
|
...n.cellAttributes(f)
|
|
3817
3811
|
};
|
|
3818
|
-
return f.colIndex === 0 && (
|
|
3812
|
+
return f.colIndex === 0 && (I.style = {
|
|
3819
3813
|
maxWidth: "250px",
|
|
3820
3814
|
overflowX: "hidden",
|
|
3821
3815
|
textOverflow: "ellipsis"
|
|
3822
|
-
}),
|
|
3816
|
+
}), I;
|
|
3823
3817
|
}, p = () => {
|
|
3824
3818
|
r("empty-state-cta-clicked"), y();
|
|
3825
3819
|
}, y = () => {
|
|
3826
3820
|
r("clear-search-input");
|
|
3827
|
-
}, v = k(() => n.disableRowClick ? void 0 : (f,
|
|
3828
|
-
r("click:row",
|
|
3829
|
-
}),
|
|
3821
|
+
}, v = k(() => n.disableRowClick ? void 0 : (f, I) => {
|
|
3822
|
+
r("click:row", I);
|
|
3823
|
+
}), T = (f) => {
|
|
3830
3824
|
r("sort", f);
|
|
3831
|
-
}, { setTablePreferences:
|
|
3832
|
-
const f =
|
|
3825
|
+
}, { setTablePreferences: D, getTablePreferences: S } = Yn(), Z = B(S(o.value)), g = k(() => {
|
|
3826
|
+
const f = S(o.value);
|
|
3833
3827
|
return {
|
|
3834
3828
|
...n.initialFetcherParams,
|
|
3835
3829
|
...f
|
|
3836
3830
|
};
|
|
3837
|
-
}),
|
|
3838
|
-
Z.value = f, o.value &&
|
|
3831
|
+
}), A = (f) => {
|
|
3832
|
+
Z.value = f, o.value && D(o.value, f);
|
|
3839
3833
|
};
|
|
3840
|
-
return (f,
|
|
3841
|
-
const
|
|
3842
|
-
return
|
|
3834
|
+
return (f, I) => {
|
|
3835
|
+
const F = M("KButton"), x = M("KDropdown"), U = M("KTable"), $ = M("KCard");
|
|
3836
|
+
return h(), N($, {
|
|
3843
3837
|
class: "kong-ui-entity-base-table",
|
|
3844
3838
|
title: e.title,
|
|
3845
3839
|
"title-tag": e.titleTag
|
|
3846
3840
|
}, {
|
|
3847
3841
|
default: b(() => [
|
|
3848
|
-
|
|
3842
|
+
R(U, {
|
|
3849
3843
|
ref_key: "tableRefs",
|
|
3850
3844
|
ref: d,
|
|
3851
3845
|
"cache-identifier": o.value,
|
|
3852
|
-
"cell-attrs":
|
|
3846
|
+
"cell-attrs": m,
|
|
3853
3847
|
"client-sort": e.enableClientSort,
|
|
3854
3848
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3855
|
-
"empty-state-action-message": e.query ?
|
|
3849
|
+
"empty-state-action-message": e.query ? E(i)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3856
3850
|
"empty-state-action-route": e.query ? void 0 : e.emptyStateOptions.ctaPath,
|
|
3857
3851
|
"empty-state-icon-variant": e.query ? "search" : "kong",
|
|
3858
|
-
"empty-state-message": e.query ?
|
|
3859
|
-
"empty-state-title": e.query ?
|
|
3852
|
+
"empty-state-message": e.query ? E(i)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3853
|
+
"empty-state-title": e.query ? E(i)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3860
3854
|
error: a.value.hasError,
|
|
3861
3855
|
"error-state-message": a.value.message,
|
|
3862
3856
|
"error-state-title": a.value.title,
|
|
@@ -3864,48 +3858,48 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3864
3858
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3865
3859
|
headers: s.value,
|
|
3866
3860
|
"hide-pagination-when-optional": "",
|
|
3867
|
-
"initial-fetcher-params":
|
|
3861
|
+
"initial-fetcher-params": g.value,
|
|
3868
3862
|
loading: e.isLoading,
|
|
3869
3863
|
"pagination-offset": e.paginationType === "offset",
|
|
3870
3864
|
"resize-columns": "",
|
|
3871
|
-
"row-attrs":
|
|
3865
|
+
"row-attrs": u,
|
|
3872
3866
|
"search-input": e.query,
|
|
3873
3867
|
"sort-handler-function": e.enableClientSort ? e.sortHandlerFunction : void 0,
|
|
3874
3868
|
sortable: !e.disableSorting,
|
|
3875
3869
|
"table-preferences": Z.value,
|
|
3876
3870
|
onEmptyStateActionClick: p,
|
|
3877
3871
|
"onRow:click": v.value,
|
|
3878
|
-
onSort:
|
|
3879
|
-
"onUpdate:tablePreferences":
|
|
3872
|
+
onSort: I[0] || (I[0] = (_) => T(_)),
|
|
3873
|
+
"onUpdate:tablePreferences": A
|
|
3880
3874
|
}, _e({
|
|
3881
|
-
toolbar: b(({ state:
|
|
3875
|
+
toolbar: b(({ state: _ }) => [
|
|
3882
3876
|
me(L("div", dl, [
|
|
3883
3877
|
z(f.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3884
|
-
f.$slots["toolbar-button"] ? (
|
|
3878
|
+
f.$slots["toolbar-button"] ? (h(), w("div", fl, [
|
|
3885
3879
|
z(f.$slots, "toolbar-button", {}, void 0, !0)
|
|
3886
|
-
])) :
|
|
3880
|
+
])) : K("", !0)
|
|
3887
3881
|
], 512), [
|
|
3888
|
-
[ge, l(
|
|
3882
|
+
[ge, l(_)]
|
|
3889
3883
|
])
|
|
3890
3884
|
]),
|
|
3891
|
-
actions: b(({ row:
|
|
3885
|
+
actions: b(({ row: _, rowKey: q, rowValue: j }) => [
|
|
3892
3886
|
L("div", {
|
|
3893
3887
|
class: "actions-container",
|
|
3894
|
-
"data-testid":
|
|
3888
|
+
"data-testid": _.name
|
|
3895
3889
|
}, [
|
|
3896
|
-
|
|
3897
|
-
"kpop-attributes": { placement: "
|
|
3890
|
+
R(x, {
|
|
3891
|
+
"kpop-attributes": { placement: "bottom-end" },
|
|
3898
3892
|
width: e.dropdownMenuWidth
|
|
3899
3893
|
}, {
|
|
3900
3894
|
items: b(() => [
|
|
3901
3895
|
z(f.$slots, "actions", {
|
|
3902
|
-
row:
|
|
3896
|
+
row: _,
|
|
3903
3897
|
rowKey: q,
|
|
3904
3898
|
rowValue: j
|
|
3905
3899
|
}, void 0, !0)
|
|
3906
3900
|
]),
|
|
3907
3901
|
default: b(() => [
|
|
3908
|
-
|
|
3902
|
+
R(F, {
|
|
3909
3903
|
appearance: "tertiary",
|
|
3910
3904
|
class: "actions-trigger",
|
|
3911
3905
|
"data-testid": "overflow-actions-button",
|
|
@@ -3913,7 +3907,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3913
3907
|
size: "small"
|
|
3914
3908
|
}, {
|
|
3915
3909
|
default: b(() => [
|
|
3916
|
-
|
|
3910
|
+
R(E(Xo))
|
|
3917
3911
|
]),
|
|
3918
3912
|
_: 1
|
|
3919
3913
|
})
|
|
@@ -3924,13 +3918,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3924
3918
|
]),
|
|
3925
3919
|
_: 2
|
|
3926
3920
|
}, [
|
|
3927
|
-
oe(e.tableHeaders, (
|
|
3921
|
+
oe(e.tableHeaders, (_, q) => ({
|
|
3928
3922
|
name: q,
|
|
3929
3923
|
fn: b(({ row: j, rowKey: J, rowValue: he }) => [
|
|
3930
|
-
|
|
3924
|
+
c(j) ? (h(), N(ul, {
|
|
3925
|
+
key: 0,
|
|
3931
3926
|
"key-name": String(q),
|
|
3932
|
-
"row-el":
|
|
3933
|
-
tooltip:
|
|
3927
|
+
"row-el": c(j),
|
|
3928
|
+
tooltip: _.tooltip
|
|
3934
3929
|
}, {
|
|
3935
3930
|
default: b(() => [
|
|
3936
3931
|
z(f.$slots, q, {
|
|
@@ -3938,17 +3933,17 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3938
3933
|
rowKey: J,
|
|
3939
3934
|
rowValue: he
|
|
3940
3935
|
}, () => [
|
|
3941
|
-
V(
|
|
3936
|
+
V(O(he), 1)
|
|
3942
3937
|
], !0)
|
|
3943
3938
|
]),
|
|
3944
3939
|
_: 2
|
|
3945
|
-
}, 1032, ["key-name", "row-el", "tooltip"])
|
|
3940
|
+
}, 1032, ["key-name", "row-el", "tooltip"])) : K("", !0)
|
|
3946
3941
|
])
|
|
3947
3942
|
})),
|
|
3948
3943
|
e.query ? void 0 : {
|
|
3949
3944
|
name: "empty-state-action-icon",
|
|
3950
3945
|
fn: b(() => [
|
|
3951
|
-
|
|
3946
|
+
R(E(_o))
|
|
3952
3947
|
]),
|
|
3953
3948
|
key: "0"
|
|
3954
3949
|
}
|
|
@@ -3958,7 +3953,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
3958
3953
|
}, 8, ["title", "title-tag"]);
|
|
3959
3954
|
};
|
|
3960
3955
|
}
|
|
3961
|
-
}), ns = /* @__PURE__ */ ae(hl, [["__scopeId", "data-v-
|
|
3956
|
+
}), ns = /* @__PURE__ */ ae(hl, [["__scopeId", "data-v-e6b72ef3"]]), ml = {
|
|
3962
3957
|
key: 0,
|
|
3963
3958
|
class: "kong-ui-entity-delete-error"
|
|
3964
3959
|
}, gl = {
|
|
@@ -4008,9 +4003,9 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4008
4003
|
}, l = () => {
|
|
4009
4004
|
i("proceed");
|
|
4010
4005
|
};
|
|
4011
|
-
return (s,
|
|
4012
|
-
const d =
|
|
4013
|
-
return
|
|
4006
|
+
return (s, u) => {
|
|
4007
|
+
const d = M("KAlert"), c = M("KPrompt");
|
|
4008
|
+
return h(), N(c, {
|
|
4014
4009
|
"action-button-appearance": "danger",
|
|
4015
4010
|
"action-button-disabled": e.actionPending,
|
|
4016
4011
|
"action-button-text": "Yes, delete",
|
|
@@ -4022,37 +4017,37 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4022
4017
|
onProceed: l
|
|
4023
4018
|
}, {
|
|
4024
4019
|
default: b(() => [
|
|
4025
|
-
e.error ? (
|
|
4026
|
-
|
|
4020
|
+
e.error ? (h(), w("div", ml, [
|
|
4021
|
+
R(d, { appearance: "danger" }, {
|
|
4027
4022
|
default: b(() => [
|
|
4028
|
-
V(
|
|
4023
|
+
V(O(e.error), 1)
|
|
4029
4024
|
]),
|
|
4030
4025
|
_: 1
|
|
4031
4026
|
})
|
|
4032
|
-
])) :
|
|
4033
|
-
|
|
4027
|
+
])) : K("", !0),
|
|
4028
|
+
R(E(n), {
|
|
4034
4029
|
class: "message",
|
|
4035
4030
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
4036
4031
|
tag: "p"
|
|
4037
4032
|
}, _e({
|
|
4038
4033
|
entityType: b(() => [
|
|
4039
|
-
V(
|
|
4034
|
+
V(O(r.entityType), 1)
|
|
4040
4035
|
]),
|
|
4041
4036
|
_: 2
|
|
4042
4037
|
}, [
|
|
4043
4038
|
r.entityName ? {
|
|
4044
4039
|
name: "entityName",
|
|
4045
4040
|
fn: b(() => [
|
|
4046
|
-
L("strong", null,
|
|
4041
|
+
L("strong", null, O(r.entityName), 1)
|
|
4047
4042
|
]),
|
|
4048
4043
|
key: "0"
|
|
4049
4044
|
} : void 0
|
|
4050
4045
|
]), 1032, ["keypath"]),
|
|
4051
|
-
r.description || s.$slots.description ? (
|
|
4046
|
+
r.description || s.$slots.description ? (h(), w("div", gl, [
|
|
4052
4047
|
z(s.$slots, "description", {}, () => [
|
|
4053
|
-
L("p", null,
|
|
4048
|
+
L("p", null, O(r.description), 1)
|
|
4054
4049
|
], !0)
|
|
4055
|
-
])) :
|
|
4050
|
+
])) : K("", !0)
|
|
4056
4051
|
]),
|
|
4057
4052
|
_: 3
|
|
4058
4053
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
@@ -4072,7 +4067,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4072
4067
|
width: "20",
|
|
4073
4068
|
x: "0",
|
|
4074
4069
|
y: "0"
|
|
4075
|
-
}, xl = ["fill"], Cl = { mask: "url(#mask0_180_20349)" }, kl = ["fill"],
|
|
4070
|
+
}, xl = ["fill"], Cl = { mask: "url(#mask0_180_20349)" }, kl = ["fill"], $t = /* @__PURE__ */ P({
|
|
4076
4071
|
__name: "IconFilter",
|
|
4077
4072
|
props: {
|
|
4078
4073
|
color: {
|
|
@@ -4081,7 +4076,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4081
4076
|
}
|
|
4082
4077
|
},
|
|
4083
4078
|
setup(e) {
|
|
4084
|
-
return (t, n) => (
|
|
4079
|
+
return (t, n) => (h(), w("svg", vl, [
|
|
4085
4080
|
L("mask", bl, [
|
|
4086
4081
|
L("rect", {
|
|
4087
4082
|
fill: e.color,
|
|
@@ -4100,7 +4095,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4100
4095
|
}), _l = {
|
|
4101
4096
|
key: 1,
|
|
4102
4097
|
class: "kong-ui-entity-filter"
|
|
4103
|
-
}, wl = { class: "kong-ui-entity-filter-menu" }, Al = ["data-testid"], Sl = ["onClick", "onKeydown"], Il = { class: "menu-item-indicator" }, El = { class: "menu-item-body" }, Tl = ["for"],
|
|
4098
|
+
}, wl = { class: "kong-ui-entity-filter-menu" }, Al = ["data-testid"], Sl = ["onClick", "onKeydown"], Il = { class: "menu-item-indicator" }, El = { class: "menu-item-body" }, Tl = ["for"], $l = { class: "menu-item-buttons" }, Fl = { class: "filter-clear-button-container" }, Ol = /* @__PURE__ */ P({
|
|
4104
4099
|
__name: "EntityFilter",
|
|
4105
4100
|
props: {
|
|
4106
4101
|
// filter config, either exact match or fuzzy match
|
|
@@ -4120,71 +4115,71 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4120
4115
|
},
|
|
4121
4116
|
emits: ["update:modelValue"],
|
|
4122
4117
|
setup(e, { emit: t }) {
|
|
4123
|
-
const { i18n: { t: n } } = Y.useI18n(), r = e, i = t, a =
|
|
4124
|
-
const
|
|
4125
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
4126
|
-
|
|
4127
|
-
}),
|
|
4128
|
-
}),
|
|
4129
|
-
const
|
|
4130
|
-
return Object.keys(
|
|
4118
|
+
const { i18n: { t: n } } = Y.useI18n(), r = e, i = t, a = B(!1), o = B({}), l = B(/* @__PURE__ */ new Set()), s = k(() => {
|
|
4119
|
+
const g = [];
|
|
4120
|
+
return new URLSearchParams(r.modelValue).forEach((A, f) => {
|
|
4121
|
+
A !== "" && g.push(f);
|
|
4122
|
+
}), g;
|
|
4123
|
+
}), u = k(() => {
|
|
4124
|
+
const g = r.config.fields;
|
|
4125
|
+
return Object.keys(g).filter((A) => {
|
|
4131
4126
|
var f;
|
|
4132
|
-
return (f =
|
|
4133
|
-
}).map((
|
|
4134
|
-
label:
|
|
4135
|
-
value:
|
|
4127
|
+
return (f = g == null ? void 0 : g[A]) == null ? void 0 : f.searchable;
|
|
4128
|
+
}).map((A) => ({
|
|
4129
|
+
label: g[A].label || A,
|
|
4130
|
+
value: A,
|
|
4136
4131
|
expanded: !1
|
|
4137
4132
|
}));
|
|
4138
4133
|
});
|
|
4139
|
-
Ae(() => r.modelValue, (
|
|
4140
|
-
o.value = {}, new URLSearchParams(
|
|
4141
|
-
o.value[f] =
|
|
4134
|
+
Ae(() => r.modelValue, (g) => {
|
|
4135
|
+
o.value = {}, new URLSearchParams(g).forEach((A, f) => {
|
|
4136
|
+
o.value[f] = A;
|
|
4142
4137
|
});
|
|
4143
4138
|
});
|
|
4144
4139
|
const d = () => {
|
|
4145
4140
|
a.value = !a.value;
|
|
4146
|
-
},
|
|
4147
|
-
l.value.has(
|
|
4148
|
-
},
|
|
4149
|
-
i("update:modelValue",
|
|
4141
|
+
}, c = (g) => {
|
|
4142
|
+
l.value.has(g) ? l.value.delete(g) : l.value.add(g);
|
|
4143
|
+
}, m = (g) => {
|
|
4144
|
+
i("update:modelValue", g);
|
|
4150
4145
|
}, p = () => {
|
|
4151
|
-
|
|
4152
|
-
}, y = (
|
|
4153
|
-
var
|
|
4154
|
-
return (((f = (
|
|
4155
|
-
value:
|
|
4156
|
-
label:
|
|
4146
|
+
m("");
|
|
4147
|
+
}, y = (g) => `filter-${g}`, v = (g) => {
|
|
4148
|
+
var A, f;
|
|
4149
|
+
return (((f = (A = r.config.schema) == null ? void 0 : A[g]) == null ? void 0 : f.values) ?? []).map((I) => ({
|
|
4150
|
+
value: I,
|
|
4151
|
+
label: I
|
|
4157
4152
|
}));
|
|
4158
|
-
},
|
|
4159
|
-
var
|
|
4160
|
-
return ((f = (
|
|
4161
|
-
},
|
|
4153
|
+
}, T = (g) => {
|
|
4154
|
+
var A, f;
|
|
4155
|
+
return ((f = (A = r.config.schema) == null ? void 0 : A[g]) == null ? void 0 : f.type) ?? "text";
|
|
4156
|
+
}, D = (g) => {
|
|
4162
4157
|
o.value = {
|
|
4163
4158
|
...o.value,
|
|
4164
|
-
[
|
|
4159
|
+
[g]: ""
|
|
4165
4160
|
}, Z();
|
|
4166
|
-
},
|
|
4161
|
+
}, S = () => {
|
|
4167
4162
|
o.value = {}, Z(!0);
|
|
4168
|
-
}, Z = (
|
|
4169
|
-
const
|
|
4170
|
-
|
|
4163
|
+
}, Z = (g = !1) => {
|
|
4164
|
+
const A = Object.keys(o.value).reduce((f, I) => (o.value[I] && (f[I] = `${o.value[I]}`), f), {});
|
|
4165
|
+
g && (a.value = !1), i("update:modelValue", new URLSearchParams(A).toString());
|
|
4171
4166
|
};
|
|
4172
|
-
return (
|
|
4173
|
-
const f =
|
|
4174
|
-
return e.config.isExactMatch ? (
|
|
4167
|
+
return (g, A) => {
|
|
4168
|
+
const f = M("KInput"), I = M("KButton"), F = M("KSelect");
|
|
4169
|
+
return e.config.isExactMatch ? (h(), N(f, {
|
|
4175
4170
|
key: 0,
|
|
4176
4171
|
autocomplete: "off",
|
|
4177
4172
|
class: "kong-ui-entity-filter-input",
|
|
4178
4173
|
"data-testid": "search-input",
|
|
4179
4174
|
"model-value": e.modelValue,
|
|
4180
4175
|
placeholder: e.config.placeholder,
|
|
4181
|
-
"onUpdate:modelValue":
|
|
4176
|
+
"onUpdate:modelValue": m
|
|
4182
4177
|
}, {
|
|
4183
4178
|
before: b(() => [
|
|
4184
|
-
|
|
4179
|
+
R($t)
|
|
4185
4180
|
]),
|
|
4186
4181
|
after: b(() => [
|
|
4187
|
-
me(
|
|
4182
|
+
me(R(E(jo), {
|
|
4188
4183
|
class: "kong-ui-entity-filter-clear",
|
|
4189
4184
|
onClick: p
|
|
4190
4185
|
}, null, 512), [
|
|
@@ -4192,15 +4187,15 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4192
4187
|
])
|
|
4193
4188
|
]),
|
|
4194
4189
|
_: 1
|
|
4195
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
4196
|
-
|
|
4190
|
+
}, 8, ["model-value", "placeholder"])) : (h(), w("div", _l, [
|
|
4191
|
+
R(I, {
|
|
4197
4192
|
appearance: "tertiary",
|
|
4198
4193
|
"data-testid": "filter-button",
|
|
4199
4194
|
onClick: d
|
|
4200
4195
|
}, {
|
|
4201
4196
|
default: b(() => [
|
|
4202
|
-
|
|
4203
|
-
V(" " +
|
|
4197
|
+
R($t),
|
|
4198
|
+
V(" " + O(E(n)("filter.filterButtonText")) + " " + O(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
4204
4199
|
]),
|
|
4205
4200
|
_: 1
|
|
4206
4201
|
}),
|
|
@@ -4211,9 +4206,9 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4211
4206
|
[ge, a.value]
|
|
4212
4207
|
]),
|
|
4213
4208
|
me(L("div", wl, [
|
|
4214
|
-
(
|
|
4215
|
-
var U,
|
|
4216
|
-
return
|
|
4209
|
+
(h(!0), w(ce, null, oe(u.value, (x) => {
|
|
4210
|
+
var U, $;
|
|
4211
|
+
return h(), w("div", {
|
|
4217
4212
|
key: x.value,
|
|
4218
4213
|
class: "kong-ui-entity-filter-menu-item",
|
|
4219
4214
|
"data-testid": x.value
|
|
@@ -4222,62 +4217,62 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4222
4217
|
class: fe(["menu-item-title", { expanded: l.value.has(x.value) }]),
|
|
4223
4218
|
role: "button",
|
|
4224
4219
|
tabindex: "0",
|
|
4225
|
-
onClick: (
|
|
4226
|
-
onKeydown: Rn((
|
|
4220
|
+
onClick: (_) => c(x.value),
|
|
4221
|
+
onKeydown: Rn((_) => c(x.value), ["enter"])
|
|
4227
4222
|
}, [
|
|
4228
|
-
V(
|
|
4223
|
+
V(O(x.label) + " ", 1),
|
|
4229
4224
|
me(L("span", Il, null, 512), [
|
|
4230
4225
|
[ge, s.value.includes(x.value)]
|
|
4231
4226
|
]),
|
|
4232
|
-
|
|
4227
|
+
R(E(Bo), {
|
|
4233
4228
|
class: fe(["menu-item-expand-icon", { expanded: l.value.has(x.value) }]),
|
|
4234
|
-
color:
|
|
4229
|
+
color: E(Sr)
|
|
4235
4230
|
}, null, 8, ["class", "color"])
|
|
4236
4231
|
], 42, Sl),
|
|
4237
4232
|
me(L("div", El, [
|
|
4238
4233
|
L("label", {
|
|
4239
4234
|
class: "menu-item-label",
|
|
4240
4235
|
for: y(x.value)
|
|
4241
|
-
},
|
|
4242
|
-
((
|
|
4236
|
+
}, O(E(n)("filter.fieldLabel")), 9, Tl),
|
|
4237
|
+
(($ = (U = e.config.schema) == null ? void 0 : U[x.value]) == null ? void 0 : $.type) === "select" ? (h(), N(F, {
|
|
4243
4238
|
key: 0,
|
|
4244
4239
|
id: y(x.value),
|
|
4245
4240
|
modelValue: o.value[x.value],
|
|
4246
|
-
"onUpdate:modelValue": (
|
|
4241
|
+
"onUpdate:modelValue": (_) => o.value[x.value] = _,
|
|
4247
4242
|
items: v(x.value),
|
|
4248
|
-
placeholder:
|
|
4249
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
4243
|
+
placeholder: E(n)("filter.selectPlaceholder")
|
|
4244
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (h(), N(f, {
|
|
4250
4245
|
key: 1,
|
|
4251
4246
|
id: y(x.value),
|
|
4252
4247
|
modelValue: o.value[x.value],
|
|
4253
|
-
"onUpdate:modelValue": (
|
|
4248
|
+
"onUpdate:modelValue": (_) => o.value[x.value] = _,
|
|
4254
4249
|
autocomplete: "off",
|
|
4255
|
-
placeholder:
|
|
4256
|
-
type:
|
|
4250
|
+
placeholder: E(n)("filter.inputPlaceholder"),
|
|
4251
|
+
type: T(x.value)
|
|
4257
4252
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4258
4253
|
], 512), [
|
|
4259
4254
|
[ge, l.value.has(x.value)]
|
|
4260
4255
|
]),
|
|
4261
|
-
me(L("div",
|
|
4262
|
-
|
|
4256
|
+
me(L("div", $l, [
|
|
4257
|
+
R(I, {
|
|
4263
4258
|
appearance: "tertiary",
|
|
4264
4259
|
"data-testid": "apply-filter",
|
|
4265
4260
|
size: "small",
|
|
4266
|
-
onClick:
|
|
4261
|
+
onClick: A[0] || (A[0] = (_) => Z(!0))
|
|
4267
4262
|
}, {
|
|
4268
4263
|
default: b(() => [
|
|
4269
|
-
V(
|
|
4264
|
+
V(O(E(n)("filter.applyButtonText")), 1)
|
|
4270
4265
|
]),
|
|
4271
4266
|
_: 1
|
|
4272
4267
|
}),
|
|
4273
|
-
|
|
4268
|
+
R(I, {
|
|
4274
4269
|
appearance: "tertiary",
|
|
4275
4270
|
"data-testid": "clear-filter",
|
|
4276
4271
|
size: "small",
|
|
4277
|
-
onClick: (
|
|
4272
|
+
onClick: (_) => D(x.value)
|
|
4278
4273
|
}, {
|
|
4279
4274
|
default: b(() => [
|
|
4280
|
-
V(
|
|
4275
|
+
V(O(E(n)("filter.clearButtonText")), 1)
|
|
4281
4276
|
]),
|
|
4282
4277
|
_: 2
|
|
4283
4278
|
}, 1032, ["onClick"])
|
|
@@ -4286,14 +4281,14 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4286
4281
|
])
|
|
4287
4282
|
], 8, Al);
|
|
4288
4283
|
}), 128)),
|
|
4289
|
-
L("div",
|
|
4290
|
-
|
|
4284
|
+
L("div", Fl, [
|
|
4285
|
+
R(I, {
|
|
4291
4286
|
appearance: "tertiary",
|
|
4292
4287
|
size: "small",
|
|
4293
|
-
onClick:
|
|
4288
|
+
onClick: S
|
|
4294
4289
|
}, {
|
|
4295
4290
|
default: b(() => [
|
|
4296
|
-
V(
|
|
4291
|
+
V(O(E(n)("filter.clearAllButtonText")), 1)
|
|
4297
4292
|
]),
|
|
4298
4293
|
_: 1
|
|
4299
4294
|
})
|
|
@@ -4304,7 +4299,7 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4304
4299
|
]));
|
|
4305
4300
|
};
|
|
4306
4301
|
}
|
|
4307
|
-
}), is = /* @__PURE__ */ ae(
|
|
4302
|
+
}), is = /* @__PURE__ */ ae(Ol, [["__scopeId", "data-v-94990087"]]), as = /* @__PURE__ */ P({
|
|
4308
4303
|
__name: "EntityToggleModal",
|
|
4309
4304
|
props: {
|
|
4310
4305
|
visible: {
|
|
@@ -4336,44 +4331,44 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4336
4331
|
},
|
|
4337
4332
|
emits: ["cancel", "proceed"],
|
|
4338
4333
|
setup(e, { emit: t }) {
|
|
4339
|
-
const { i18n: { t: n }, i18nT: r } = Y.useI18n(), i = e, a = t, o =
|
|
4334
|
+
const { i18n: { t: n }, i18nT: r } = Y.useI18n(), i = e, a = t, o = B(!1), l = k(
|
|
4340
4335
|
() => i.action === "enable" ? n("toggleModal.enable.title", { entityType: i.entityType }) : n("toggleModal.disable.title", { entityType: i.entityType })
|
|
4341
4336
|
), s = k(
|
|
4342
4337
|
() => i.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
4343
|
-
),
|
|
4338
|
+
), u = () => a("cancel"), d = async () => {
|
|
4344
4339
|
if (i.onConfirm) {
|
|
4345
4340
|
o.value = !0;
|
|
4346
4341
|
try {
|
|
4347
4342
|
await i.onConfirm(), a("proceed");
|
|
4348
|
-
} catch (
|
|
4349
|
-
console.error(
|
|
4343
|
+
} catch (c) {
|
|
4344
|
+
console.error(c);
|
|
4350
4345
|
} finally {
|
|
4351
4346
|
o.value = !1;
|
|
4352
4347
|
}
|
|
4353
4348
|
}
|
|
4354
4349
|
};
|
|
4355
|
-
return (
|
|
4356
|
-
const p =
|
|
4357
|
-
return
|
|
4358
|
-
|
|
4350
|
+
return (c, m) => {
|
|
4351
|
+
const p = M("KPrompt");
|
|
4352
|
+
return h(), N(Mn, { to: "body" }, [
|
|
4353
|
+
R(p, {
|
|
4359
4354
|
"action-button-disabled": o.value,
|
|
4360
4355
|
"action-button-text": s.value,
|
|
4361
4356
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
4362
4357
|
title: l.value,
|
|
4363
4358
|
visible: e.visible,
|
|
4364
|
-
onCancel:
|
|
4359
|
+
onCancel: u,
|
|
4365
4360
|
onProceed: d
|
|
4366
4361
|
}, {
|
|
4367
4362
|
default: b(() => [
|
|
4368
|
-
|
|
4363
|
+
R(E(r), {
|
|
4369
4364
|
keypath: `toggleModal.${i.action}.message`,
|
|
4370
4365
|
scope: "global"
|
|
4371
4366
|
}, {
|
|
4372
4367
|
entityType: b(() => [
|
|
4373
|
-
V(
|
|
4368
|
+
V(O(e.entityType), 1)
|
|
4374
4369
|
]),
|
|
4375
4370
|
entityName: b(() => [
|
|
4376
|
-
L("strong", null,
|
|
4371
|
+
L("strong", null, O(e.entityName), 1)
|
|
4377
4372
|
]),
|
|
4378
4373
|
_: 1
|
|
4379
4374
|
}, 8, ["keypath"])
|
|
@@ -4405,13 +4400,13 @@ const fo = { class: "yaml-config" }, Tn = /* @__PURE__ */ P({
|
|
|
4405
4400
|
}
|
|
4406
4401
|
},
|
|
4407
4402
|
setup(e) {
|
|
4408
|
-
const t = e, n =
|
|
4403
|
+
const t = e, n = B(void 0), r = k(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4409
4404
|
return Ae(() => t.authFunction, async () => {
|
|
4410
4405
|
n.value = await t.authFunction();
|
|
4411
4406
|
}, { immediate: !0 }), (i, a) => r.value ? z(i.$slots, "default", {
|
|
4412
4407
|
key: 0,
|
|
4413
4408
|
isAllowed: n.value
|
|
4414
|
-
}) :
|
|
4409
|
+
}) : K("", !0);
|
|
4415
4410
|
}
|
|
4416
4411
|
});
|
|
4417
4412
|
let Be;
|
|
@@ -4427,12 +4422,12 @@ for (let e = 0; e < 256; ++e)
|
|
|
4427
4422
|
function Bl(e, t = 0) {
|
|
4428
4423
|
return Q[e[t + 0]] + Q[e[t + 1]] + Q[e[t + 2]] + Q[e[t + 3]] + "-" + Q[e[t + 4]] + Q[e[t + 5]] + "-" + Q[e[t + 6]] + Q[e[t + 7]] + "-" + Q[e[t + 8]] + Q[e[t + 9]] + "-" + Q[e[t + 10]] + Q[e[t + 11]] + Q[e[t + 12]] + Q[e[t + 13]] + Q[e[t + 14]] + Q[e[t + 15]];
|
|
4429
4424
|
}
|
|
4430
|
-
const Rl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
|
4425
|
+
const Rl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ft = {
|
|
4431
4426
|
randomUUID: Rl
|
|
4432
4427
|
};
|
|
4433
4428
|
function Ml(e, t, n) {
|
|
4434
|
-
if (
|
|
4435
|
-
return
|
|
4429
|
+
if (Ft.randomUUID && !t && !e)
|
|
4430
|
+
return Ft.randomUUID();
|
|
4436
4431
|
e = e || {};
|
|
4437
4432
|
const r = e.random || (e.rng || Nl)();
|
|
4438
4433
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
@@ -4479,34 +4474,34 @@ const Kl = ["aria-labelledby"], Dl = { class: "form-section-wrapper" }, Ul = {
|
|
|
4479
4474
|
},
|
|
4480
4475
|
setup(e) {
|
|
4481
4476
|
const t = Xe(), n = Ml();
|
|
4482
|
-
return (r, i) => (
|
|
4483
|
-
"aria-labelledby": e.title ?
|
|
4477
|
+
return (r, i) => (h(), w("div", {
|
|
4478
|
+
"aria-labelledby": e.title ? E(n) : void 0,
|
|
4484
4479
|
class: fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4485
4480
|
role: "group"
|
|
4486
4481
|
}, [
|
|
4487
4482
|
L("div", Dl, [
|
|
4488
|
-
e.hideInfoHeader ?
|
|
4483
|
+
e.hideInfoHeader ? K("", !0) : (h(), w("div", {
|
|
4489
4484
|
key: 0,
|
|
4490
4485
|
class: fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4491
4486
|
}, [
|
|
4492
|
-
e.title ? (
|
|
4487
|
+
e.title ? (h(), N(se(e.titleTag), {
|
|
4493
4488
|
key: 0,
|
|
4494
|
-
id:
|
|
4489
|
+
id: E(n),
|
|
4495
4490
|
class: "form-section-title"
|
|
4496
4491
|
}, {
|
|
4497
4492
|
default: b(() => [
|
|
4498
|
-
V(
|
|
4493
|
+
V(O(e.title), 1)
|
|
4499
4494
|
]),
|
|
4500
4495
|
_: 1
|
|
4501
|
-
}, 8, ["id"])) :
|
|
4502
|
-
e.description ||
|
|
4496
|
+
}, 8, ["id"])) : K("", !0),
|
|
4497
|
+
e.description || E(t).description ? (h(), w("div", Ul, [
|
|
4503
4498
|
z(r.$slots, "description", {}, () => [
|
|
4504
|
-
L("p", null,
|
|
4499
|
+
L("p", null, O(e.description), 1)
|
|
4505
4500
|
], !0)
|
|
4506
|
-
])) :
|
|
4507
|
-
|
|
4501
|
+
])) : K("", !0),
|
|
4502
|
+
E(t).footer ? (h(), w("div", jl, [
|
|
4508
4503
|
z(r.$slots, "footer", {}, void 0, !0)
|
|
4509
|
-
])) :
|
|
4504
|
+
])) : K("", !0)
|
|
4510
4505
|
], 2)),
|
|
4511
4506
|
L("div", ql, [
|
|
4512
4507
|
z(r.$slots, "default", {}, void 0, !0)
|
|
@@ -4544,21 +4539,21 @@ const Kl = ["aria-labelledby"], Dl = { class: "form-section-wrapper" }, Ul = {
|
|
|
4544
4539
|
}
|
|
4545
4540
|
},
|
|
4546
4541
|
setup(e) {
|
|
4547
|
-
const t = e, n =
|
|
4548
|
-
var
|
|
4549
|
-
return (
|
|
4550
|
-
}),
|
|
4551
|
-
var
|
|
4552
|
-
return `${(
|
|
4553
|
-
}), d = async (
|
|
4554
|
-
await
|
|
4542
|
+
const t = e, n = B(), { isTruncated: r } = Y.useTruncationDetector(n), { i18n: { t: i } } = Y.useI18n(), a = i("global.actions.copyId"), o = B(a), l = k(() => t.entityLinkData.deleted ?? !1), s = k(() => {
|
|
4543
|
+
var c;
|
|
4544
|
+
return (c = t.entityLinkData.id) != null && c.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4545
|
+
}), u = k(() => {
|
|
4546
|
+
var c;
|
|
4547
|
+
return `${(c = s.value) == null ? void 0 : c.toString().slice(0, 5)} (deleted)`;
|
|
4548
|
+
}), d = async (c) => {
|
|
4549
|
+
await c(s.value || "") && (o.value = i("global.actions.copyToClipboard"), setTimeout(() => {
|
|
4555
4550
|
o.value = a;
|
|
4556
4551
|
}, 1800));
|
|
4557
4552
|
};
|
|
4558
|
-
return (
|
|
4559
|
-
const p =
|
|
4560
|
-
return
|
|
4561
|
-
l.value ? (
|
|
4553
|
+
return (c, m) => {
|
|
4554
|
+
const p = M("KTooltip"), y = M("KExternalLink"), v = M("KClipboardProvider");
|
|
4555
|
+
return h(), w("div", Hl, [
|
|
4556
|
+
l.value ? (h(), w("div", Vl, O(u.value), 1)) : s.value ? s.value ? (h(), N(y, {
|
|
4562
4557
|
key: 2,
|
|
4563
4558
|
class: "entity-link",
|
|
4564
4559
|
"hide-icon": !e.newWindow,
|
|
@@ -4566,40 +4561,40 @@ const Kl = ["aria-labelledby"], Dl = { class: "form-section-wrapper" }, Ul = {
|
|
|
4566
4561
|
target: e.newWindow ? "_blank" : "_self"
|
|
4567
4562
|
}, {
|
|
4568
4563
|
default: b(() => [
|
|
4569
|
-
|
|
4570
|
-
text:
|
|
4564
|
+
R(p, {
|
|
4565
|
+
text: E(r) && e.entityLinkData.label || ""
|
|
4571
4566
|
}, {
|
|
4572
4567
|
default: b(() => [
|
|
4573
4568
|
L("span", {
|
|
4574
4569
|
ref_key: "textContent",
|
|
4575
4570
|
ref: n,
|
|
4576
4571
|
class: "entity-link-label"
|
|
4577
|
-
},
|
|
4572
|
+
}, O(e.entityLinkData.label), 513)
|
|
4578
4573
|
]),
|
|
4579
4574
|
_: 1
|
|
4580
4575
|
}, 8, ["text"])
|
|
4581
4576
|
]),
|
|
4582
4577
|
_: 1
|
|
4583
|
-
}, 8, ["hide-icon", "href", "target"])) :
|
|
4584
|
-
s.value && e.allowCopy ? (
|
|
4578
|
+
}, 8, ["hide-icon", "href", "target"])) : K("", !0) : (h(), w("div", zl, O(" – "))),
|
|
4579
|
+
s.value && e.allowCopy ? (h(), N(p, {
|
|
4585
4580
|
key: o.value,
|
|
4586
4581
|
class: "copy-uuid-tooltip",
|
|
4587
4582
|
"max-width": "160",
|
|
4588
|
-
placement: "
|
|
4583
|
+
placement: "bottom-end",
|
|
4589
4584
|
text: o.value
|
|
4590
4585
|
}, {
|
|
4591
4586
|
default: b(() => [
|
|
4592
|
-
|
|
4593
|
-
default: b(({ copyToClipboard:
|
|
4587
|
+
R(v, null, {
|
|
4588
|
+
default: b(({ copyToClipboard: T }) => [
|
|
4594
4589
|
L("span", {
|
|
4595
4590
|
class: "entity-link-copy-id",
|
|
4596
|
-
onClick: Ye((
|
|
4591
|
+
onClick: Ye((D) => d(T), ["stop"])
|
|
4597
4592
|
}, [
|
|
4598
|
-
|
|
4593
|
+
R(E(Yo), {
|
|
4599
4594
|
class: "copy-icon",
|
|
4600
|
-
color:
|
|
4595
|
+
color: E(Ir),
|
|
4601
4596
|
"data-testid": "copy-id",
|
|
4602
|
-
size:
|
|
4597
|
+
size: E(Tr)
|
|
4603
4598
|
}, null, 8, ["color", "size"])
|
|
4604
4599
|
], 8, Yl)
|
|
4605
4600
|
]),
|
|
@@ -4607,11 +4602,11 @@ const Kl = ["aria-labelledby"], Dl = { class: "form-section-wrapper" }, Ul = {
|
|
|
4607
4602
|
})
|
|
4608
4603
|
]),
|
|
4609
4604
|
_: 1
|
|
4610
|
-
}, 8, ["text"])) :
|
|
4605
|
+
}, 8, ["text"])) : K("", !0)
|
|
4611
4606
|
]);
|
|
4612
4607
|
};
|
|
4613
4608
|
}
|
|
4614
|
-
}), ss = /* @__PURE__ */ ae(Wl, [["__scopeId", "data-v-
|
|
4609
|
+
}), ss = /* @__PURE__ */ ae(Wl, [["__scopeId", "data-v-60e3ef7c"]]), { useAxios: cs, useDeleteUrlBuilder: us, useErrors: ds, useExternalLinkCreator: fs, useFetchUrlBuilder: ps, useFetcher: hs, useDebouncedFilter: ms, useStringHelpers: gs, useHelpers: ys, useGatewayFeatureSupported: vs, useTruncationDetector: bs, useValidators: xs } = Y;
|
|
4615
4610
|
export {
|
|
4616
4611
|
yo as ConfigCardDisplay,
|
|
4617
4612
|
Dt as ConfigCardItem,
|
|
@@ -4632,9 +4627,9 @@ export {
|
|
|
4632
4627
|
Ut as JsonCodeBlock,
|
|
4633
4628
|
os as PermissionsWrapper,
|
|
4634
4629
|
Tn as YamlCodeBlock,
|
|
4635
|
-
|
|
4630
|
+
cs as useAxios,
|
|
4636
4631
|
ms as useDebouncedFilter,
|
|
4637
|
-
|
|
4632
|
+
us as useDeleteUrlBuilder,
|
|
4638
4633
|
ds as useErrors,
|
|
4639
4634
|
fs as useExternalLinkCreator,
|
|
4640
4635
|
ps as useFetchUrlBuilder,
|