@kong-ui-public/entities-shared 3.36.2-pr.2732.14092b6ff.0 → 3.36.2-pr.2738.702201f81.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 +703 -703
- package/dist/entities-shared.umd.js +45 -45
- package/dist/style.css +1 -1
- package/dist/types/components/common/TerraformCodeBlock.vue.d.ts.map +1 -1
- package/dist/types/components/entity-base-table/EntityBaseTable.vue.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject as qt, ref as N, computed as S, unref as _, toValue as ge, watch as be, toRef as zn, provide as Ht, defineComponent as
|
|
1
|
+
import { inject as qt, ref as N, computed as S, unref as _, toValue as ge, watch as be, toRef as zn, provide as Ht, defineComponent as z, createBlock as K, openBlock as g, resolveDynamicComponent as je, normalizeClass as fe, withCtx as w, createElementBlock as $, createCommentVNode as D, createElementVNode as L, toDisplayString as I, Fragment as ue, renderList as ce, resolveComponent as U, createVNode as R, createTextVNode as q, useCssVars as Vt, useId as Qn, useSlots as Ue, renderSlot as j, createSlots as ke, normalizeProps as Zn, guardReactiveProps as Xn, mergeProps as Yt, onMounted as it, onBeforeMount as rt, withModifiers as Re, Teleport as Wt, onUnmounted as ei, withDirectives as Ce, vShow as xe, withKeys as ti, warn as ni } from "vue";
|
|
2
2
|
import mt from "axios";
|
|
3
3
|
import { createI18n as ii, i18nTComponent as ri } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as ai, KExternalLink as oi, KButton as gt, KTruncate as li, KBadge as si } from "@kong/kongponents";
|
|
@@ -23,7 +23,7 @@ const qe = Object.values($e), vi = [
|
|
|
23
23
|
"partial"
|
|
24
24
|
/* Partial */
|
|
25
25
|
], bi = ["backend_cluster", "virtual_cluster", "listener", "produce_policy", "consume_policy", "cluster_policy", "listener_policy", "schema_registry", "static_key"], ki = ["auth_server", "auth_server_scopes", "auth_server_claims", "auth_server_clients"];
|
|
26
|
-
var
|
|
26
|
+
var W = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.CopyBadge = "copy-badge", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(W || {}), ae = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e.Policy = "policy", e))(ae || {});
|
|
27
27
|
const vt = [
|
|
28
28
|
"primary",
|
|
29
29
|
"secondary"
|
|
@@ -244,8 +244,8 @@ function zt() {
|
|
|
244
244
|
if (o.length !== a.length) return !1;
|
|
245
245
|
const l = /* @__PURE__ */ new Set([...o, ...a]);
|
|
246
246
|
for (const s of l) {
|
|
247
|
-
const
|
|
248
|
-
if (
|
|
247
|
+
const c = o.filter((u) => u === s).length, d = a.filter((u) => u === s).length;
|
|
248
|
+
if (c !== d) return !1;
|
|
249
249
|
}
|
|
250
250
|
return !0;
|
|
251
251
|
};
|
|
@@ -275,8 +275,8 @@ function zt() {
|
|
|
275
275
|
}
|
|
276
276
|
},
|
|
277
277
|
sortAlpha: (o) => (a, l) => {
|
|
278
|
-
let s = a[o] === void 0 || a[o] === null ? "" : a[o],
|
|
279
|
-
return Array.isArray(a[o]) && (s = a[o][0]), Array.isArray(l[o]) && (
|
|
278
|
+
let s = a[o] === void 0 || a[o] === null ? "" : a[o], c = l[o] === void 0 || l[o] === null ? "" : l[o];
|
|
279
|
+
return Array.isArray(a[o]) && (s = a[o][0]), Array.isArray(l[o]) && (c = l[o][0]), s.localeCompare(c);
|
|
280
280
|
},
|
|
281
281
|
isValidUuid: (o) => o ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(o) : !1
|
|
282
282
|
};
|
|
@@ -287,75 +287,75 @@ function Mi(e, t, n, i = {
|
|
|
287
287
|
}) {
|
|
288
288
|
n || (n = "1000");
|
|
289
289
|
const { axiosInstance: r } = at(e.axiosRequestConfig), { i18n: { t: o } } = He(), { debounce: a } = xi(), l = a(async (B) => {
|
|
290
|
-
await
|
|
291
|
-
}, 200), s = N(!1),
|
|
290
|
+
await A(B);
|
|
291
|
+
}, 200), s = N(!1), c = N(""), d = N(""), u = N([]), p = N([]), m = N(void 0), y = S(() => {
|
|
292
292
|
const B = `${e.apiBaseUrl}${_(t)}`;
|
|
293
293
|
return e.app === "konnect" ? B.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? B.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : B;
|
|
294
|
-
}), { isValidUuid:
|
|
294
|
+
}), { isValidUuid: h } = zt(), b = async () => {
|
|
295
295
|
try {
|
|
296
296
|
s.value = !0;
|
|
297
|
-
const { data: B } = await r.get(`${
|
|
298
|
-
B != null && B.next || (
|
|
297
|
+
const { data: B } = await r.get(`${y.value}?size=${n}`);
|
|
298
|
+
B != null && B.next || (m.value = i.fetchedItemsKey in B ? B[i.fetchedItemsKey] : []), p.value = i.fetchedItemsKey in B ? B[i.fetchedItemsKey] : [], u.value = p.value;
|
|
299
299
|
} catch {
|
|
300
|
-
u.value = [],
|
|
300
|
+
u.value = [], c.value = o("debouncedFilter.errors.fetch");
|
|
301
301
|
} finally {
|
|
302
302
|
s.value = !1;
|
|
303
303
|
}
|
|
304
|
-
},
|
|
305
|
-
var
|
|
306
|
-
if (
|
|
307
|
-
if (
|
|
308
|
-
u.value =
|
|
304
|
+
}, k = N(""), A = async (B) => {
|
|
305
|
+
var P, ee, M;
|
|
306
|
+
if (k.value !== B) {
|
|
307
|
+
if (k.value = B ?? "", !B) {
|
|
308
|
+
u.value = p.value;
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
311
|
-
if (
|
|
311
|
+
if (m.value === void 0)
|
|
312
312
|
try {
|
|
313
|
-
if (s.value = !0,
|
|
314
|
-
const F = `${
|
|
313
|
+
if (s.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
314
|
+
const F = `${y.value}/${B}`, { data: x } = await r.get(`${F}?size=${n}`);
|
|
315
315
|
i.fetchedItemsKey in x ? u.value = x[i.fetchedItemsKey] : x != null && x[i.exactMatchKey ?? "id"] ? u.value = [x] : u.value = [];
|
|
316
316
|
} else {
|
|
317
317
|
const F = [];
|
|
318
|
-
|
|
319
|
-
const { data:
|
|
320
|
-
return [
|
|
318
|
+
h(B) && i.searchKeys.includes("id") ? F.push((async () => {
|
|
319
|
+
const { data: v } = await r.get(`${y.value}/${B}`);
|
|
320
|
+
return [v[i.fetchedItemsKey] ?? v];
|
|
321
321
|
})()) : F.push(
|
|
322
|
-
...i.searchKeys.filter((
|
|
323
|
-
const { data: C } = await r.get(`${
|
|
322
|
+
...i.searchKeys.filter((v) => v !== "id").map(async (v) => {
|
|
323
|
+
const { data: C } = await r.get(`${y.value}?${v}=${B}`);
|
|
324
324
|
return C[i.fetchedItemsKey];
|
|
325
325
|
})
|
|
326
326
|
);
|
|
327
327
|
const x = await Promise.all(F), f = /* @__PURE__ */ new Set();
|
|
328
|
-
u.value = [], (
|
|
328
|
+
u.value = [], (P = x == null ? void 0 : x.forEach) == null || P.call(x, (v) => {
|
|
329
329
|
var C;
|
|
330
|
-
(C =
|
|
331
|
-
f.has(
|
|
330
|
+
(C = v == null ? void 0 : v.forEach) == null || C.call(v, (Y) => {
|
|
331
|
+
f.has(Y.id) || (f.add(Y.id), u.value.push(Y));
|
|
332
332
|
});
|
|
333
333
|
});
|
|
334
334
|
}
|
|
335
335
|
} catch (F) {
|
|
336
|
-
((
|
|
336
|
+
((ee = F == null ? void 0 : F.response) == null ? void 0 : ee.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (u.value = [], c.value = o("debouncedFilter.errors.fetch"));
|
|
337
337
|
} finally {
|
|
338
338
|
s.value = !1;
|
|
339
339
|
}
|
|
340
340
|
else
|
|
341
|
-
s.value = !0,
|
|
341
|
+
s.value = !0, d.value = "", u.value = (M = m.value) == null ? void 0 : M.filter((F) => {
|
|
342
342
|
var f;
|
|
343
343
|
let x = !1;
|
|
344
|
-
for (const
|
|
345
|
-
const C = typeof F[
|
|
344
|
+
for (const v of i.searchKeys) {
|
|
345
|
+
const C = typeof F[v] == "string" ? (f = F[v]) == null ? void 0 : f.toLowerCase() : F[v];
|
|
346
346
|
C != null && C.includes(B.toLowerCase()) && (x = !0);
|
|
347
347
|
}
|
|
348
348
|
return x;
|
|
349
|
-
}), (!u.value || !u.value.length) && (
|
|
349
|
+
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid")), s.value = !1;
|
|
350
350
|
}
|
|
351
351
|
};
|
|
352
352
|
return {
|
|
353
353
|
loading: s,
|
|
354
|
-
error:
|
|
355
|
-
validationError:
|
|
354
|
+
error: c,
|
|
355
|
+
validationError: d,
|
|
356
356
|
results: u,
|
|
357
|
-
allRecords:
|
|
358
|
-
loadItems:
|
|
357
|
+
allRecords: m,
|
|
358
|
+
loadItems: b,
|
|
359
359
|
debouncedQueryChange: l
|
|
360
360
|
};
|
|
361
361
|
}
|
|
@@ -384,16 +384,16 @@ function Pi() {
|
|
|
384
384
|
const o = [];
|
|
385
385
|
if ((l = i == null ? void 0 : i.response) != null && l.data) {
|
|
386
386
|
if ((s = i.response.data.details) != null && s.length)
|
|
387
|
-
return r = [], i.response.data.details.forEach((
|
|
388
|
-
let
|
|
389
|
-
|
|
387
|
+
return r = [], i.response.data.details.forEach((c) => {
|
|
388
|
+
let d = e("errors.unexpected");
|
|
389
|
+
c.messages && Array.isArray(c.messages) && c.messages.length && (d = c.messages.join(", ")), c.field && o.push({ field: c.field, message: d }), r.push(`${c.field ?? ""} ${d}`);
|
|
390
390
|
}), { messages: r, fields: o };
|
|
391
391
|
if (i.response.data.message && Array.isArray(i.response.data.message))
|
|
392
|
-
return r = [], i.response.data.message.forEach((
|
|
393
|
-
if (
|
|
394
|
-
const
|
|
395
|
-
r.push(
|
|
396
|
-
} else
|
|
392
|
+
return r = [], i.response.data.message.forEach((c) => {
|
|
393
|
+
if (c != null && c.constraints) {
|
|
394
|
+
const d = Object.values(c.constraints).join(", ");
|
|
395
|
+
r.push(d), c.property && o.push({ field: c.property, message: d });
|
|
396
|
+
} else c != null && c.property && (c != null && c.message) ? (o.push({ field: c.property, message: c.message }), r.push(c.message)) : r.push(c);
|
|
397
397
|
}), { messages: r, fields: o };
|
|
398
398
|
if (typeof i.response.data.message == "string" || typeof i.response.data == "string")
|
|
399
399
|
return {
|
|
@@ -401,8 +401,8 @@ function Pi() {
|
|
|
401
401
|
fields: []
|
|
402
402
|
};
|
|
403
403
|
if (typeof i.response.data == "object")
|
|
404
|
-
return r = [], Object.keys(i.response.data).forEach((
|
|
405
|
-
o.push({ field:
|
|
404
|
+
return r = [], Object.keys(i.response.data).forEach((c) => {
|
|
405
|
+
o.push({ field: c, message: i.response.data[c] }), r.push(i.response.data[c]);
|
|
406
406
|
}), { messages: r, fields: o };
|
|
407
407
|
}
|
|
408
408
|
return {
|
|
@@ -421,8 +421,8 @@ function Pi() {
|
|
|
421
421
|
return i.response.data.detail;
|
|
422
422
|
if ((a = i.response.data.details) != null && a.length)
|
|
423
423
|
return i.response.data.details.map((s) => {
|
|
424
|
-
let
|
|
425
|
-
return s.messages && typeof s.messages == "object" && s.messages.length && (
|
|
424
|
+
let c = e("errors.unexpected");
|
|
425
|
+
return s.messages && typeof s.messages == "object" && s.messages.length && (c = s.messages.join(", ")), s.field ? `${s.field} - ${c}` : c;
|
|
426
426
|
}).join("; ");
|
|
427
427
|
if (i.response.data.message) {
|
|
428
428
|
const { message: s } = i.response.data;
|
|
@@ -457,12 +457,12 @@ function Qt(e, t) {
|
|
|
457
457
|
return r.startsWith("/") ? new URL(`${window.location.origin}${r}`) : new URL(r);
|
|
458
458
|
});
|
|
459
459
|
return (r) => {
|
|
460
|
-
const { page: o, pageSize: a, offset: l, sortColumnKey: s, sortColumnOrder:
|
|
460
|
+
const { page: o, pageSize: a, offset: l, sortColumnKey: s, sortColumnOrder: c, query: d } = r;
|
|
461
461
|
try {
|
|
462
462
|
let u = new URL(i.value.href);
|
|
463
|
-
return n.value &&
|
|
464
|
-
u.searchParams.append(
|
|
465
|
-
}), s && u.searchParams.append("sort_by", s),
|
|
463
|
+
return n.value && d ? (u.search = "", u = ge(e).isExactMatch ? new URL(`${u.href}/${d}`) : new URL(`${u.href}?filter[name][contains]=${d}`)) : (n.value || new URLSearchParams(d).forEach((p, m) => {
|
|
464
|
+
u.searchParams.append(m, p);
|
|
465
|
+
}), s && u.searchParams.append("sort_by", s), c === "desc" && u.searchParams.append("sort_desc", "1"), u.searchParams.append("size", String(a))), l && o !== 1 && u.searchParams.append("offset", String(l)), u.href;
|
|
466
466
|
} catch (u) {
|
|
467
467
|
return console.error("RouteList(fetcher)", u), ge(t);
|
|
468
468
|
}
|
|
@@ -473,24 +473,24 @@ function Ui(e, t, n) {
|
|
|
473
473
|
const i = N(!0), r = ge(e), { axiosInstance: o } = at(r.axiosRequestConfig), a = Qt(e, t), l = N({
|
|
474
474
|
status: me.Idle
|
|
475
475
|
}), s = async (u) => {
|
|
476
|
-
var
|
|
477
|
-
const
|
|
476
|
+
var m;
|
|
477
|
+
const p = ge(n) || "data";
|
|
478
478
|
try {
|
|
479
479
|
l.value = i.value ? { status: me.InitialLoad } : { status: me.Loading }, i.value = !1;
|
|
480
|
-
let
|
|
481
|
-
|
|
482
|
-
const
|
|
483
|
-
if (
|
|
484
|
-
throw
|
|
485
|
-
const
|
|
486
|
-
let
|
|
487
|
-
|
|
480
|
+
let y = a(u);
|
|
481
|
+
y.includes("filter[name]") && (y = `${y}&page[size]=${u.pageSize}&page[number]=${u.page}`);
|
|
482
|
+
const h = await o.get(y);
|
|
483
|
+
if (h.status >= 400)
|
|
484
|
+
throw h;
|
|
485
|
+
const b = h.data, k = p && p.replace(/[^\w-_]/gi, "");
|
|
486
|
+
let A;
|
|
487
|
+
b[k] ? A = Array.isArray(b[k]) ? b[k] : [b[k]] : Array.isArray(b) ? A = b : A = Object.keys(b).length ? [b] : [];
|
|
488
488
|
const B = {
|
|
489
|
-
data:
|
|
490
|
-
total:
|
|
491
|
-
...
|
|
489
|
+
data: A,
|
|
490
|
+
total: A.length,
|
|
491
|
+
...b.offset ? {
|
|
492
492
|
pagination: {
|
|
493
|
-
offset:
|
|
493
|
+
offset: b.offset
|
|
494
494
|
}
|
|
495
495
|
} : null
|
|
496
496
|
};
|
|
@@ -501,23 +501,23 @@ function Ui(e, t, n) {
|
|
|
501
501
|
status: me.Idle,
|
|
502
502
|
response: B
|
|
503
503
|
}, B;
|
|
504
|
-
} catch (
|
|
505
|
-
const
|
|
504
|
+
} catch (y) {
|
|
505
|
+
const h = {
|
|
506
506
|
data: [],
|
|
507
507
|
total: 0
|
|
508
508
|
};
|
|
509
|
-
return u.query && (((
|
|
509
|
+
return u.query && (((m = y.response) == null ? void 0 : m.status) === 404 || y.status === 404) ? (l.value = {
|
|
510
510
|
status: me.NoResults,
|
|
511
|
-
response:
|
|
512
|
-
error:
|
|
513
|
-
},
|
|
511
|
+
response: h,
|
|
512
|
+
error: y.response ? y : { response: y }
|
|
513
|
+
}, h) : (l.value = {
|
|
514
514
|
status: me.Error,
|
|
515
|
-
response:
|
|
516
|
-
error:
|
|
517
|
-
},
|
|
515
|
+
response: h,
|
|
516
|
+
error: y.response ? y : { response: y }
|
|
517
|
+
}, h);
|
|
518
518
|
}
|
|
519
|
-
},
|
|
520
|
-
return { fetcher: s, fetcherState: l, fetcherCacheKey:
|
|
519
|
+
}, c = r.cacheIdentifier, d = Zt(c);
|
|
520
|
+
return { fetcher: s, fetcherState: l, fetcherCacheKey: d };
|
|
521
521
|
}
|
|
522
522
|
function Zt(e) {
|
|
523
523
|
if (e) {
|
|
@@ -624,7 +624,7 @@ function er(e) {
|
|
|
624
624
|
}
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
|
-
const
|
|
627
|
+
const J = {
|
|
628
628
|
useAxios: at,
|
|
629
629
|
useDebouncedFilter: Mi,
|
|
630
630
|
useDeleteUrlBuilder: Di,
|
|
@@ -645,7 +645,7 @@ const G = {
|
|
|
645
645
|
}, tr = {
|
|
646
646
|
key: 0,
|
|
647
647
|
class: "config-card-fieldset-title"
|
|
648
|
-
}, nr = /* @__PURE__ */
|
|
648
|
+
}, nr = /* @__PURE__ */ z({
|
|
649
649
|
__name: "JsonCardItem",
|
|
650
650
|
props: {
|
|
651
651
|
item: {
|
|
@@ -662,26 +662,26 @@ const G = {
|
|
|
662
662
|
}
|
|
663
663
|
},
|
|
664
664
|
setup(e) {
|
|
665
|
-
const t = e, { i18n: { t: n } } =
|
|
665
|
+
const t = e, { i18n: { t: n } } = J.useI18n(), { convertKeyToTitle: i } = J.useStringHelpers(), r = S(() => t.item.key ?? "json-array-item"), o = S(() => t.item.value ?? t.item), a = S(() => {
|
|
666
666
|
const s = JSON.parse(JSON.stringify(o.value));
|
|
667
667
|
return t.isArrayItem && delete s.name, s;
|
|
668
668
|
}), l = S(() => {
|
|
669
669
|
var s;
|
|
670
670
|
return t.isArrayItem ? (s = o.value) != null && s.name ? i(o.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
671
671
|
});
|
|
672
|
-
return (s,
|
|
672
|
+
return (s, c) => (g(), K(je(e.isArrayItem ? "fieldset" : "div"), {
|
|
673
673
|
class: fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
674
674
|
}, {
|
|
675
675
|
default: w(() => [
|
|
676
676
|
e.isArrayItem ? (g(), $("legend", tr, [
|
|
677
677
|
L("b", null, I(l.value), 1)
|
|
678
678
|
])) : D("", !0),
|
|
679
|
-
(g(!0), $(ue, null, ce(Object.keys(a.value), (
|
|
679
|
+
(g(!0), $(ue, null, ce(Object.keys(a.value), (d, u) => (g(), K(nn, {
|
|
680
680
|
key: `${r.value}-property-${u}`,
|
|
681
681
|
item: {
|
|
682
|
-
key:
|
|
683
|
-
label: _(i)(
|
|
684
|
-
value: a.value[
|
|
682
|
+
key: d,
|
|
683
|
+
label: _(i)(d),
|
|
684
|
+
value: a.value[d]
|
|
685
685
|
}
|
|
686
686
|
}, null, 8, ["item"]))), 128))
|
|
687
687
|
]),
|
|
@@ -693,7 +693,7 @@ const G = {
|
|
|
693
693
|
for (const [i, r] of t)
|
|
694
694
|
n[i] = r;
|
|
695
695
|
return n;
|
|
696
|
-
}, tn = /* @__PURE__ */ le(nr, [["__scopeId", "data-v-dc1e39a1"]]), ir = /* @__PURE__ */
|
|
696
|
+
}, tn = /* @__PURE__ */ le(nr, [["__scopeId", "data-v-dc1e39a1"]]), ir = /* @__PURE__ */ z({
|
|
697
697
|
__name: "InternalLinkItem",
|
|
698
698
|
props: {
|
|
699
699
|
item: {
|
|
@@ -703,9 +703,9 @@ const G = {
|
|
|
703
703
|
},
|
|
704
704
|
emits: ["navigation-click"],
|
|
705
705
|
setup(e) {
|
|
706
|
-
const { i18n: { t } } =
|
|
706
|
+
const { i18n: { t } } = J.useI18n();
|
|
707
707
|
return (n, i) => {
|
|
708
|
-
const r =
|
|
708
|
+
const r = U("KButton");
|
|
709
709
|
return g(), $("div", null, [
|
|
710
710
|
R(r, {
|
|
711
711
|
appearance: "tertiary",
|
|
@@ -713,14 +713,14 @@ const G = {
|
|
|
713
713
|
onClick: i[0] || (i[0] = (o) => n.$emit("navigation-click", e.item))
|
|
714
714
|
}, {
|
|
715
715
|
default: w(() => [
|
|
716
|
-
|
|
716
|
+
q(I(e.item.value || _(t)("baseConfigCard.commonFields.link")), 1)
|
|
717
717
|
]),
|
|
718
718
|
_: 1
|
|
719
719
|
})
|
|
720
720
|
]);
|
|
721
721
|
};
|
|
722
722
|
}
|
|
723
|
-
}), rr = /* @__PURE__ */ le(ir, [["__scopeId", "data-v-2feb8c2e"]]), ar = /* @__PURE__ */
|
|
723
|
+
}), rr = /* @__PURE__ */ le(ir, [["__scopeId", "data-v-2feb8c2e"]]), ar = /* @__PURE__ */ z({
|
|
724
724
|
__name: "StatusBadge",
|
|
725
725
|
props: {
|
|
726
726
|
status: {
|
|
@@ -729,14 +729,14 @@ const G = {
|
|
|
729
729
|
}
|
|
730
730
|
},
|
|
731
731
|
setup(e) {
|
|
732
|
-
const { i18n: { t } } =
|
|
732
|
+
const { i18n: { t } } = J.useI18n();
|
|
733
733
|
return (n, i) => {
|
|
734
|
-
const r =
|
|
734
|
+
const r = U("KBadge");
|
|
735
735
|
return g(), K(r, {
|
|
736
736
|
appearance: e.status ? "success" : "neutral"
|
|
737
737
|
}, {
|
|
738
738
|
default: w(() => [
|
|
739
|
-
|
|
739
|
+
q(I(e.status ? _(t)("baseConfigCard.statusBadge.enabledLabel") : _(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
740
740
|
]),
|
|
741
741
|
_: 1
|
|
742
742
|
}, 8, ["appearance"]);
|
|
@@ -766,7 +766,7 @@ async function Te({ codeElement: e, code: t, language: n, theme: i }) {
|
|
|
766
766
|
const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["data-testid"], vr = ["data-testid"], br = ["data-testid"], kr = { key: 1 }, Cr = ["data-testid"], xr = ["data-testid"], Ar = ["data-testid"], _r = ["data-testid"], wr = {
|
|
767
767
|
name: "ConfigCardItem",
|
|
768
768
|
components: { JsonCardItem: tn, StatusBadge: ar, InternalLinkItem: rr }
|
|
769
|
-
}, Sr = /* @__PURE__ */
|
|
769
|
+
}, Sr = /* @__PURE__ */ z({
|
|
770
770
|
...wr,
|
|
771
771
|
props: {
|
|
772
772
|
item: {
|
|
@@ -786,18 +786,18 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
786
786
|
},
|
|
787
787
|
emits: ["navigation-click"],
|
|
788
788
|
setup(e, { emit: t }) {
|
|
789
|
-
Vt((
|
|
790
|
-
v0b2cd434:
|
|
791
|
-
bb02ad32: u.value &&
|
|
792
|
-
d92de3ce: u.value &&
|
|
793
|
-
d9295818: u.value &&
|
|
789
|
+
Vt((P) => ({
|
|
790
|
+
v0b2cd434: p.value ? "none" : `solid ${_(ur)} ${_(lr)}`,
|
|
791
|
+
bb02ad32: u.value && c.value ? "block" : "flex",
|
|
792
|
+
d92de3ce: u.value && c.value ? "100%" : n.slim ? "50%" : "25%",
|
|
793
|
+
d9295818: u.value && c.value ? "100%" : n.slim ? "50%" : "75%"
|
|
794
794
|
}));
|
|
795
|
-
const n = e, i = t, r = Qn(), o = Ue(), { i18n: { t: a, formatIsoDate: l, formatUnixTimeStamp: s } } =
|
|
796
|
-
var
|
|
797
|
-
return n.item.type ? n.item.type : (
|
|
798
|
-
}),
|
|
799
|
-
switch (
|
|
800
|
-
case
|
|
795
|
+
const n = e, i = t, r = Qn(), o = Ue(), { i18n: { t: a, formatIsoDate: l, formatUnixTimeStamp: s } } = J.useI18n(), c = S(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), d = S(() => !!(n.item.tooltip || o["label-tooltip"])), u = S(() => n.item.type === W.Json || n.item.type === W.JsonArray), p = S(() => n.item.type === W.JsonArray), m = J.useSubSchema(n.item.key), y = S(() => {
|
|
796
|
+
var P;
|
|
797
|
+
return n.item.type ? n.item.type : (P = m == null ? void 0 : m.value) != null && P.encrypted ? W.Redacted : void 0;
|
|
798
|
+
}), h = S(() => {
|
|
799
|
+
switch (y.value) {
|
|
800
|
+
case W.ID:
|
|
801
801
|
return {
|
|
802
802
|
tag: "KCopy",
|
|
803
803
|
attrs: {
|
|
@@ -806,7 +806,7 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
806
806
|
text: n.item.value
|
|
807
807
|
}
|
|
808
808
|
};
|
|
809
|
-
case
|
|
809
|
+
case W.IdArray:
|
|
810
810
|
return {
|
|
811
811
|
tag: "div",
|
|
812
812
|
additionalComponent: "KCopy",
|
|
@@ -814,7 +814,7 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
814
814
|
"copy-tooltip": a("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
|
-
case
|
|
817
|
+
case W.Redacted:
|
|
818
818
|
return {
|
|
819
819
|
tag: "KCopy",
|
|
820
820
|
attrs: {
|
|
@@ -824,7 +824,7 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
824
824
|
text: n.item.value
|
|
825
825
|
}
|
|
826
826
|
};
|
|
827
|
-
case
|
|
827
|
+
case W.RedactedArray:
|
|
828
828
|
return {
|
|
829
829
|
tag: "div",
|
|
830
830
|
additionalComponent: "KCopy",
|
|
@@ -833,7 +833,7 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
833
833
|
"copy-tooltip": a("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
834
834
|
}
|
|
835
835
|
};
|
|
836
|
-
case
|
|
836
|
+
case W.Date:
|
|
837
837
|
return {
|
|
838
838
|
tag: "div",
|
|
839
839
|
attrs: {
|
|
@@ -841,7 +841,7 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
841
841
|
},
|
|
842
842
|
text: isNaN(Number(n.item.value)) ? l(n.item.value) : s(n.item.value)
|
|
843
843
|
};
|
|
844
|
-
case
|
|
844
|
+
case W.BadgeStatus:
|
|
845
845
|
return {
|
|
846
846
|
tag: "StatusBadge",
|
|
847
847
|
attrs: {
|
|
@@ -849,12 +849,12 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
849
849
|
status: n.item.value
|
|
850
850
|
}
|
|
851
851
|
};
|
|
852
|
-
case
|
|
852
|
+
case W.BadgeTag:
|
|
853
853
|
return {
|
|
854
854
|
tag: "div",
|
|
855
855
|
additionalComponent: "KBadge"
|
|
856
856
|
};
|
|
857
|
-
case
|
|
857
|
+
case W.CopyBadge:
|
|
858
858
|
return {
|
|
859
859
|
tag: "div",
|
|
860
860
|
additionalComponent: "KCopy",
|
|
@@ -865,23 +865,23 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
865
865
|
text: n.item.value
|
|
866
866
|
}
|
|
867
867
|
};
|
|
868
|
-
case
|
|
868
|
+
case W.BadgeMethod:
|
|
869
869
|
return {
|
|
870
870
|
tag: "div",
|
|
871
871
|
additionalComponent: "KMethodBadge"
|
|
872
872
|
};
|
|
873
|
-
case
|
|
873
|
+
case W.LinkInternal:
|
|
874
874
|
return {
|
|
875
875
|
tag: "InternalLinkItem",
|
|
876
876
|
attrs: {
|
|
877
877
|
"data-testid": `${n.item.key}-internal-link`,
|
|
878
878
|
item: n.item,
|
|
879
|
-
onNavigationClick: (
|
|
880
|
-
i("navigation-click",
|
|
879
|
+
onNavigationClick: (P) => {
|
|
880
|
+
i("navigation-click", P);
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
883
|
};
|
|
884
|
-
case
|
|
884
|
+
case W.LinkExternal:
|
|
885
885
|
return {
|
|
886
886
|
tag: "KExternalLink",
|
|
887
887
|
attrs: {
|
|
@@ -890,7 +890,7 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
890
890
|
},
|
|
891
891
|
text: n.item.value
|
|
892
892
|
};
|
|
893
|
-
case
|
|
893
|
+
case W.Json:
|
|
894
894
|
return {
|
|
895
895
|
tag: "JsonCardItem",
|
|
896
896
|
attrs: {
|
|
@@ -898,7 +898,7 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
898
898
|
item: n.item
|
|
899
899
|
}
|
|
900
900
|
};
|
|
901
|
-
case
|
|
901
|
+
case W.JsonArray:
|
|
902
902
|
return {
|
|
903
903
|
tag: "div",
|
|
904
904
|
additionalComponent: "JsonCardItem",
|
|
@@ -927,24 +927,24 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
927
927
|
text: n.item.value
|
|
928
928
|
};
|
|
929
929
|
}
|
|
930
|
-
}),
|
|
931
|
-
return (
|
|
932
|
-
const M =
|
|
930
|
+
}), b = N(), k = N(), { isTruncated: A } = J.useTruncationDetector(b), { isTruncated: B } = J.useTruncationDetector(k);
|
|
931
|
+
return (P, ee) => {
|
|
932
|
+
const M = U("KTooltip"), F = U("KLabel"), x = U("KBadge"), f = U("KCopy");
|
|
933
933
|
return g(), $("div", gr, [
|
|
934
934
|
L("div", {
|
|
935
935
|
class: "config-card-details-label",
|
|
936
936
|
"data-testid": `${e.item.key}-label`
|
|
937
937
|
}, [
|
|
938
|
-
P
|
|
938
|
+
j(P.$slots, "label", { item: e.item }, () => [
|
|
939
939
|
R(F, { "tooltip-attributes": { maxWidth: "500px" } }, ke({
|
|
940
940
|
default: w(() => [
|
|
941
941
|
R(M, {
|
|
942
|
-
text: _(
|
|
942
|
+
text: _(A) ? e.item.label : ""
|
|
943
943
|
}, {
|
|
944
944
|
default: w(() => [
|
|
945
945
|
L("span", {
|
|
946
946
|
ref_key: "labelContent",
|
|
947
|
-
ref:
|
|
947
|
+
ref: b,
|
|
948
948
|
class: "label-content"
|
|
949
949
|
}, I(e.item.label), 513)
|
|
950
950
|
]),
|
|
@@ -953,14 +953,14 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
953
953
|
]),
|
|
954
954
|
_: 2
|
|
955
955
|
}, [
|
|
956
|
-
|
|
956
|
+
d.value ? {
|
|
957
957
|
name: "tooltip",
|
|
958
958
|
fn: w(() => [
|
|
959
959
|
L("div", {
|
|
960
960
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
961
961
|
}, [
|
|
962
|
-
P
|
|
963
|
-
|
|
962
|
+
j(P.$slots, "label-tooltip", {}, () => [
|
|
963
|
+
q(I(e.item.tooltip), 1)
|
|
964
964
|
], !0)
|
|
965
965
|
], 8, yr)
|
|
966
966
|
]),
|
|
@@ -973,63 +973,63 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
973
973
|
class: "config-card-details-value",
|
|
974
974
|
"data-testid": `${e.item.key}-property-value`
|
|
975
975
|
}, [
|
|
976
|
-
P
|
|
976
|
+
j(P.$slots, e.item.key, {
|
|
977
977
|
rowValue: e.item.value
|
|
978
978
|
}, () => [
|
|
979
|
-
|
|
980
|
-
(g(), K(je(
|
|
979
|
+
c.value ? (g(), $("div", kr, [
|
|
980
|
+
(g(), K(je(h.value.tag), Zn(Xn(h.value.attrs)), {
|
|
981
981
|
default: w(() => [
|
|
982
|
-
|
|
982
|
+
h.value.additionalComponent === "KBadge" ? (g(), $("div", {
|
|
983
983
|
key: 0,
|
|
984
984
|
"data-testid": `${e.item.key}-badge-tags`
|
|
985
985
|
}, [
|
|
986
|
-
(g(!0), $(ue, null, ce(e.item.value, (
|
|
986
|
+
(g(!0), $(ue, null, ce(e.item.value, (v, C) => (g(), K(x, {
|
|
987
987
|
key: `${e.item.key}-badge-tag-${C}`,
|
|
988
988
|
class: "config-badge",
|
|
989
989
|
"data-testid": `${e.item.key}-badge-tag-${C}`,
|
|
990
|
-
tooltip:
|
|
990
|
+
tooltip: v,
|
|
991
991
|
"truncation-tooltip": ""
|
|
992
992
|
}, {
|
|
993
993
|
default: w(() => [
|
|
994
|
-
|
|
994
|
+
q(I(v), 1)
|
|
995
995
|
]),
|
|
996
996
|
_: 2
|
|
997
997
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
998
|
-
], 8, Cr)) :
|
|
998
|
+
], 8, Cr)) : h.value.additionalComponent === "KCopy" ? (g(), $("div", {
|
|
999
999
|
key: 1,
|
|
1000
1000
|
class: "copy-uuid-array",
|
|
1001
1001
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1002
1002
|
}, [
|
|
1003
|
-
(g(!0), $(ue, null, ce(e.item.value, (
|
|
1003
|
+
(g(!0), $(ue, null, ce(e.item.value, (v, C) => (g(), K(f, Yt({ ref_for: !0 }, h.value.childAttrs, {
|
|
1004
1004
|
key: `${e.item.key}-copy-uuid-${C}`,
|
|
1005
1005
|
"data-testid": `${e.item.key}-copy-uuid-${C}`,
|
|
1006
|
-
text:
|
|
1006
|
+
text: v
|
|
1007
1007
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
1008
|
-
], 8, xr)) :
|
|
1008
|
+
], 8, xr)) : h.value.additionalComponent === "KMethodBadge" ? (g(), $("div", {
|
|
1009
1009
|
key: 2,
|
|
1010
1010
|
class: "method-badge-array",
|
|
1011
1011
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1012
1012
|
}, [
|
|
1013
|
-
(g(!0), $(ue, null, ce(e.item.value, (
|
|
1013
|
+
(g(!0), $(ue, null, ce(e.item.value, (v, C) => (g(), K(x, {
|
|
1014
1014
|
key: `${e.item.key}-badge-method-${C}`,
|
|
1015
|
-
appearance: Object.values(_(ai)).includes(
|
|
1015
|
+
appearance: Object.values(_(ai)).includes(v.toLowerCase()) ? v.toLowerCase() : "custom",
|
|
1016
1016
|
class: "config-badge",
|
|
1017
1017
|
"data-testid": `${e.item.key}-badge-method-${C}`
|
|
1018
1018
|
}, {
|
|
1019
1019
|
default: w(() => [
|
|
1020
|
-
|
|
1020
|
+
q(I(v), 1)
|
|
1021
1021
|
]),
|
|
1022
1022
|
_: 2
|
|
1023
1023
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1024
|
-
], 8, Ar)) :
|
|
1024
|
+
], 8, Ar)) : h.value.additionalComponent === "JsonCardItem" ? (g(), $("div", {
|
|
1025
1025
|
key: 3,
|
|
1026
1026
|
"data-testid": `${n.item.key}-json-array-content`
|
|
1027
1027
|
}, [
|
|
1028
|
-
(g(!0), $(ue, null, ce(e.item.value, (
|
|
1028
|
+
(g(!0), $(ue, null, ce(e.item.value, (v, C) => (g(), K(tn, {
|
|
1029
1029
|
key: `json-array-item-${C}`,
|
|
1030
1030
|
index: C,
|
|
1031
1031
|
"is-array-item": "",
|
|
1032
|
-
item:
|
|
1032
|
+
item: v
|
|
1033
1033
|
}, null, 8, ["index", "item"]))), 128))
|
|
1034
1034
|
], 8, _r)) : (g(), K(M, {
|
|
1035
1035
|
key: 4,
|
|
@@ -1038,9 +1038,9 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
1038
1038
|
default: w(() => [
|
|
1039
1039
|
L("span", {
|
|
1040
1040
|
ref_key: "textContent",
|
|
1041
|
-
ref:
|
|
1041
|
+
ref: k,
|
|
1042
1042
|
class: fe(["attrs-data-text", { truncated: e.truncated }])
|
|
1043
|
-
}, I(
|
|
1043
|
+
}, I(h.value.text), 3)
|
|
1044
1044
|
]),
|
|
1045
1045
|
_: 1
|
|
1046
1046
|
}, 8, ["text"]))
|
|
@@ -1059,7 +1059,7 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
1059
1059
|
}), nn = /* @__PURE__ */ le(Sr, [["__scopeId", "data-v-40ffb9f1"]]), $r = { class: "json-config config-card-code-block" }, Tr = {
|
|
1060
1060
|
key: 0,
|
|
1061
1061
|
class: "json-endpoint"
|
|
1062
|
-
}, rn = /* @__PURE__ */
|
|
1062
|
+
}, rn = /* @__PURE__ */ z({
|
|
1063
1063
|
__name: "JsonCodeBlock",
|
|
1064
1064
|
props: {
|
|
1065
1065
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1098,14 +1098,14 @@ const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["da
|
|
|
1098
1098
|
return r.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? r[r.length - 1] : r[r.length - 2]).length;
|
|
1099
1099
|
});
|
|
1100
1100
|
return (r, o) => {
|
|
1101
|
-
const a =
|
|
1101
|
+
const a = U("KBadge"), l = U("KCodeBlock");
|
|
1102
1102
|
return g(), $("div", $r, [
|
|
1103
1103
|
t.fetcherUrl ? (g(), $("div", Tr, [
|
|
1104
1104
|
R(a, {
|
|
1105
1105
|
appearance: t.requestMethod
|
|
1106
1106
|
}, {
|
|
1107
1107
|
default: w(() => [
|
|
1108
|
-
|
|
1108
|
+
q(I(t.requestMethod), 1)
|
|
1109
1109
|
]),
|
|
1110
1110
|
_: 1
|
|
1111
1111
|
}, 8, ["appearance"]),
|
|
@@ -1156,7 +1156,7 @@ function Or(e, t) {
|
|
|
1156
1156
|
function Br(e) {
|
|
1157
1157
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1158
1158
|
}
|
|
1159
|
-
var Lr = an, Rr = Er, Kr = Ir, Nr = Or, Mr = Br, Dr = Fr,
|
|
1159
|
+
var Lr = an, Rr = Er, Kr = Ir, Nr = Or, Mr = Br, Dr = Fr, X = {
|
|
1160
1160
|
isNothing: Lr,
|
|
1161
1161
|
isObject: Rr,
|
|
1162
1162
|
toArray: Kr,
|
|
@@ -1188,7 +1188,7 @@ function We(e, t, n, i, r) {
|
|
|
1188
1188
|
};
|
|
1189
1189
|
}
|
|
1190
1190
|
function Je(e, t) {
|
|
1191
|
-
return
|
|
1191
|
+
return X.repeat(" ", t - e.length) + e;
|
|
1192
1192
|
}
|
|
1193
1193
|
function Pr(e, t) {
|
|
1194
1194
|
if (t = Object.create(t || null), !e.buffer) return null;
|
|
@@ -1196,26 +1196,26 @@ function Pr(e, t) {
|
|
|
1196
1196
|
for (var n = /\r?\n|\r|\0/g, i = [0], r = [], o, a = -1; o = n.exec(e.buffer); )
|
|
1197
1197
|
r.push(o.index), i.push(o.index + o[0].length), e.position <= o.index && a < 0 && (a = i.length - 2);
|
|
1198
1198
|
a < 0 && (a = i.length - 1);
|
|
1199
|
-
var l = "", s,
|
|
1199
|
+
var l = "", s, c, d = Math.min(e.line + t.linesAfter, r.length).toString().length, u = t.maxLength - (t.indent + d + 3);
|
|
1200
1200
|
for (s = 1; s <= t.linesBefore && !(a - s < 0); s++)
|
|
1201
|
-
|
|
1201
|
+
c = We(
|
|
1202
1202
|
e.buffer,
|
|
1203
1203
|
i[a - s],
|
|
1204
1204
|
r[a - s],
|
|
1205
1205
|
e.position - (i[a] - i[a - s]),
|
|
1206
1206
|
u
|
|
1207
|
-
), l =
|
|
1207
|
+
), l = X.repeat(" ", t.indent) + Je((e.line - s + 1).toString(), d) + " | " + c.str + `
|
|
1208
1208
|
` + l;
|
|
1209
|
-
for (
|
|
1210
|
-
`, l +=
|
|
1209
|
+
for (c = We(e.buffer, i[a], r[a], e.position, u), l += X.repeat(" ", t.indent) + Je((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1210
|
+
`, l += X.repeat("-", t.indent + d + 3 + c.pos) + `^
|
|
1211
1211
|
`, s = 1; s <= t.linesAfter && !(a + s >= r.length); s++)
|
|
1212
|
-
|
|
1212
|
+
c = We(
|
|
1213
1213
|
e.buffer,
|
|
1214
1214
|
i[a + s],
|
|
1215
1215
|
r[a + s],
|
|
1216
1216
|
e.position - (i[a] - i[a + s]),
|
|
1217
1217
|
u
|
|
1218
|
-
), l +=
|
|
1218
|
+
), l += X.repeat(" ", t.indent) + Je((e.line + s + 1).toString(), d) + " | " + c.str + `
|
|
1219
1219
|
`;
|
|
1220
1220
|
return l.replace(/\n$/, "");
|
|
1221
1221
|
}
|
|
@@ -1457,7 +1457,7 @@ function ia(e) {
|
|
|
1457
1457
|
return n * parseInt(t, 10);
|
|
1458
1458
|
}
|
|
1459
1459
|
function ra(e) {
|
|
1460
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !
|
|
1460
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !X.isNegativeZero(e);
|
|
1461
1461
|
}
|
|
1462
1462
|
var mn = new ie("tag:yaml.org,2002:int", {
|
|
1463
1463
|
kind: "scalar",
|
|
@@ -1529,12 +1529,12 @@ function ca(e, t) {
|
|
|
1529
1529
|
case "camelcase":
|
|
1530
1530
|
return "-.Inf";
|
|
1531
1531
|
}
|
|
1532
|
-
else if (
|
|
1532
|
+
else if (X.isNegativeZero(e))
|
|
1533
1533
|
return "-0.0";
|
|
1534
1534
|
return n = e.toString(10), sa.test(n) ? n.replace("e", ".e") : n;
|
|
1535
1535
|
}
|
|
1536
1536
|
function ua(e) {
|
|
1537
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 ||
|
|
1537
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || X.isNegativeZero(e));
|
|
1538
1538
|
}
|
|
1539
1539
|
var gn = new ie("tag:yaml.org,2002:float", {
|
|
1540
1540
|
kind: "scalar",
|
|
@@ -1559,7 +1559,7 @@ function da(e) {
|
|
|
1559
1559
|
return e === null ? !1 : vn.exec(e) !== null || bn.exec(e) !== null;
|
|
1560
1560
|
}
|
|
1561
1561
|
function fa(e) {
|
|
1562
|
-
var t, n, i, r, o, a, l, s = 0,
|
|
1562
|
+
var t, n, i, r, o, a, l, s = 0, c = null, d, u, p;
|
|
1563
1563
|
if (t = vn.exec(e), t === null && (t = bn.exec(e)), t === null) throw new Error("Date resolve error");
|
|
1564
1564
|
if (n = +t[1], i = +t[2] - 1, r = +t[3], !t[4])
|
|
1565
1565
|
return new Date(Date.UTC(n, i, r));
|
|
@@ -1568,7 +1568,7 @@ function fa(e) {
|
|
|
1568
1568
|
s += "0";
|
|
1569
1569
|
s = +s;
|
|
1570
1570
|
}
|
|
1571
|
-
return t[9] && (
|
|
1571
|
+
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)), p = new Date(Date.UTC(n, i, r, o, a, l, s)), c && p.setTime(p.getTime() - c), p;
|
|
1572
1572
|
}
|
|
1573
1573
|
function pa(e) {
|
|
1574
1574
|
return e.toISOString();
|
|
@@ -1785,18 +1785,18 @@ function he(e, t, n, i) {
|
|
|
1785
1785
|
}
|
|
1786
1786
|
function Ft(e, t, n, i) {
|
|
1787
1787
|
var r, o, a, l;
|
|
1788
|
-
for (
|
|
1788
|
+
for (X.isObject(n) || T(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(n), a = 0, l = r.length; a < l; a += 1)
|
|
1789
1789
|
o = r[a], ye.call(t, o) || (In(t, o, n[o]), i[o] = !0);
|
|
1790
1790
|
}
|
|
1791
1791
|
function Se(e, t, n, i, r, o, a, l, s) {
|
|
1792
|
-
var
|
|
1792
|
+
var c, d;
|
|
1793
1793
|
if (Array.isArray(r))
|
|
1794
|
-
for (r = Array.prototype.slice.call(r),
|
|
1795
|
-
Array.isArray(r[
|
|
1794
|
+
for (r = Array.prototype.slice.call(r), c = 0, d = r.length; c < d; c += 1)
|
|
1795
|
+
Array.isArray(r[c]) && T(e, "nested arrays are not supported inside keys"), typeof r == "object" && Tt(r[c]) === "[object Object]" && (r[c] = "[object Object]");
|
|
1796
1796
|
if (typeof r == "object" && Tt(r) === "[object Object]" && (r = "[object Object]"), r = String(r), t === null && (t = {}), i === "tag:yaml.org,2002:merge")
|
|
1797
1797
|
if (Array.isArray(o))
|
|
1798
|
-
for (
|
|
1799
|
-
Ft(e, t, o[
|
|
1798
|
+
for (c = 0, d = o.length; c < d; c += 1)
|
|
1799
|
+
Ft(e, t, o[c], n);
|
|
1800
1800
|
else
|
|
1801
1801
|
Ft(e, t, o, n);
|
|
1802
1802
|
else
|
|
@@ -1807,7 +1807,7 @@ function st(e) {
|
|
|
1807
1807
|
var t;
|
|
1808
1808
|
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : T(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1809
1809
|
}
|
|
1810
|
-
function
|
|
1810
|
+
function Z(e, t, n) {
|
|
1811
1811
|
for (var i = 0, r = e.input.charCodeAt(e.position); r !== 0; ) {
|
|
1812
1812
|
for (; ve(r); )
|
|
1813
1813
|
r === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), r = e.input.charCodeAt(++e.position);
|
|
@@ -1828,35 +1828,35 @@ function Ve(e) {
|
|
|
1828
1828
|
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || se(n)));
|
|
1829
1829
|
}
|
|
1830
1830
|
function ct(e, t) {
|
|
1831
|
-
t === 1 ? e.result += " " : t > 1 && (e.result +=
|
|
1831
|
+
t === 1 ? e.result += " " : t > 1 && (e.result += X.repeat(`
|
|
1832
1832
|
`, t - 1));
|
|
1833
1833
|
}
|
|
1834
1834
|
function Ma(e, t, n) {
|
|
1835
|
-
var i, r, o, a, l, s,
|
|
1836
|
-
if (
|
|
1835
|
+
var i, r, o, a, l, s, c, d, u = e.kind, p = e.result, m;
|
|
1836
|
+
if (m = e.input.charCodeAt(e.position), se(m) || we(m) || m === 35 || m === 38 || m === 42 || m === 33 || m === 124 || m === 62 || m === 39 || m === 34 || m === 37 || m === 64 || m === 96 || (m === 63 || m === 45) && (r = e.input.charCodeAt(e.position + 1), se(r) || n && we(r)))
|
|
1837
1837
|
return !1;
|
|
1838
|
-
for (e.kind = "scalar", e.result = "", o = a = e.position, l = !1;
|
|
1839
|
-
if (
|
|
1838
|
+
for (e.kind = "scalar", e.result = "", o = a = e.position, l = !1; m !== 0; ) {
|
|
1839
|
+
if (m === 58) {
|
|
1840
1840
|
if (r = e.input.charCodeAt(e.position + 1), se(r) || n && we(r))
|
|
1841
1841
|
break;
|
|
1842
|
-
} else if (
|
|
1842
|
+
} else if (m === 35) {
|
|
1843
1843
|
if (i = e.input.charCodeAt(e.position - 1), se(i))
|
|
1844
1844
|
break;
|
|
1845
1845
|
} else {
|
|
1846
|
-
if (e.position === e.lineStart && Ve(e) || n && we(
|
|
1846
|
+
if (e.position === e.lineStart && Ve(e) || n && we(m))
|
|
1847
1847
|
break;
|
|
1848
|
-
if (de(
|
|
1849
|
-
if (s = e.line,
|
|
1850
|
-
l = !0,
|
|
1848
|
+
if (de(m))
|
|
1849
|
+
if (s = e.line, c = e.lineStart, d = e.lineIndent, Z(e, !1, -1), e.lineIndent >= t) {
|
|
1850
|
+
l = !0, m = e.input.charCodeAt(e.position);
|
|
1851
1851
|
continue;
|
|
1852
1852
|
} else {
|
|
1853
|
-
e.position = a, e.line = s, e.lineStart =
|
|
1853
|
+
e.position = a, e.line = s, e.lineStart = c, e.lineIndent = d;
|
|
1854
1854
|
break;
|
|
1855
1855
|
}
|
|
1856
1856
|
}
|
|
1857
|
-
l && (he(e, o, a, !1), ct(e, e.line - s), o = a = e.position, l = !1), ve(
|
|
1857
|
+
l && (he(e, o, a, !1), ct(e, e.line - s), o = a = e.position, l = !1), ve(m) || (a = e.position + 1), m = e.input.charCodeAt(++e.position);
|
|
1858
1858
|
}
|
|
1859
|
-
return he(e, o, a, !1), e.result ? !0 : (e.kind = u, e.result =
|
|
1859
|
+
return he(e, o, a, !1), e.result ? !0 : (e.kind = u, e.result = p, !1);
|
|
1860
1860
|
}
|
|
1861
1861
|
function Da(e, t) {
|
|
1862
1862
|
var n, i, r;
|
|
@@ -1868,7 +1868,7 @@ function Da(e, t) {
|
|
|
1868
1868
|
i = e.position, e.position++, r = e.position;
|
|
1869
1869
|
else
|
|
1870
1870
|
return !0;
|
|
1871
|
-
else de(n) ? (he(e, i, r, !0), ct(e,
|
|
1871
|
+
else de(n) ? (he(e, i, r, !0), ct(e, Z(e, !1, t)), i = r = e.position) : e.position === e.lineStart && Ve(e) ? T(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
1872
1872
|
T(e, "unexpected end of the stream within a single quoted scalar");
|
|
1873
1873
|
}
|
|
1874
1874
|
function Pa(e, t) {
|
|
@@ -1880,7 +1880,7 @@ function Pa(e, t) {
|
|
|
1880
1880
|
return he(e, n, e.position, !0), e.position++, !0;
|
|
1881
1881
|
if (l === 92) {
|
|
1882
1882
|
if (he(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), de(l))
|
|
1883
|
-
|
|
1883
|
+
Z(e, !1, t);
|
|
1884
1884
|
else if (l < 256 && Fn[l])
|
|
1885
1885
|
e.result += On[l], e.position++;
|
|
1886
1886
|
else if ((a = La(l)) > 0) {
|
|
@@ -1890,27 +1890,27 @@ function Pa(e, t) {
|
|
|
1890
1890
|
} else
|
|
1891
1891
|
T(e, "unknown escape sequence");
|
|
1892
1892
|
n = i = e.position;
|
|
1893
|
-
} else de(l) ? (he(e, n, i, !0), ct(e,
|
|
1893
|
+
} else de(l) ? (he(e, n, i, !0), ct(e, Z(e, !1, t)), n = i = e.position) : e.position === e.lineStart && Ve(e) ? T(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position);
|
|
1894
1894
|
}
|
|
1895
1895
|
T(e, "unexpected end of the stream within a double quoted scalar");
|
|
1896
1896
|
}
|
|
1897
1897
|
function ja(e, t) {
|
|
1898
|
-
var n = !0, i, r, o, a = e.tag, l, s = e.anchor,
|
|
1899
|
-
if (
|
|
1900
|
-
|
|
1901
|
-
else if (
|
|
1902
|
-
|
|
1898
|
+
var n = !0, i, r, o, a = e.tag, l, s = e.anchor, c, d, u, p, m, y = /* @__PURE__ */ Object.create(null), h, b, k, A;
|
|
1899
|
+
if (A = e.input.charCodeAt(e.position), A === 91)
|
|
1900
|
+
d = 93, m = !1, l = [];
|
|
1901
|
+
else if (A === 123)
|
|
1902
|
+
d = 125, m = !0, l = {};
|
|
1903
1903
|
else
|
|
1904
1904
|
return !1;
|
|
1905
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1906
|
-
if (
|
|
1907
|
-
return e.position++, e.tag = a, e.anchor = s, e.kind =
|
|
1908
|
-
n ?
|
|
1905
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), A = e.input.charCodeAt(++e.position); A !== 0; ) {
|
|
1906
|
+
if (Z(e, !0, t), A = e.input.charCodeAt(e.position), A === d)
|
|
1907
|
+
return e.position++, e.tag = a, e.anchor = s, e.kind = m ? "mapping" : "sequence", e.result = l, !0;
|
|
1908
|
+
n ? A === 44 && T(e, "expected the node content, but found ','") : T(e, "missed comma between flow collection entries"), b = h = k = null, u = p = !1, A === 63 && (c = e.input.charCodeAt(e.position + 1), se(c) && (u = p = !0, e.position++, Z(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, Ee(e, t, Ke, !1, !0), b = e.tag, h = e.result, Z(e, !0, t), A = e.input.charCodeAt(e.position), (p || e.line === i) && A === 58 && (u = !0, A = e.input.charCodeAt(++e.position), Z(e, !0, t), Ee(e, t, Ke, !1, !0), k = e.result), m ? Se(e, l, y, b, h, k, i, r, o) : u ? l.push(Se(e, null, y, b, h, k, i, r, o)) : l.push(h), Z(e, !0, t), A = e.input.charCodeAt(e.position), A === 44 ? (n = !0, A = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1909
1909
|
}
|
|
1910
1910
|
T(e, "unexpected end of the stream within a flow collection");
|
|
1911
1911
|
}
|
|
1912
1912
|
function Ua(e, t) {
|
|
1913
|
-
var n, i, r = Ge, o = !1, a = !1, l = t, s = 0,
|
|
1913
|
+
var n, i, r = Ge, o = !1, a = !1, l = t, s = 0, c = !1, d, u;
|
|
1914
1914
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
1915
1915
|
i = !1;
|
|
1916
1916
|
else if (u === 62)
|
|
@@ -1920,8 +1920,8 @@ function Ua(e, t) {
|
|
|
1920
1920
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1921
1921
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1922
1922
|
Ge === r ? r = u === 43 ? $t : Ea : T(e, "repeat of a chomping mode identifier");
|
|
1923
|
-
else if ((
|
|
1924
|
-
|
|
1923
|
+
else if ((d = Ra(u)) >= 0)
|
|
1924
|
+
d === 0 ? T(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? T(e, "repeat of an indentation width identifier") : (l = t + d - 1, a = !0);
|
|
1925
1925
|
else
|
|
1926
1926
|
break;
|
|
1927
1927
|
if (ve(u)) {
|
|
@@ -1941,15 +1941,15 @@ function Ua(e, t) {
|
|
|
1941
1941
|
continue;
|
|
1942
1942
|
}
|
|
1943
1943
|
if (e.lineIndent < l) {
|
|
1944
|
-
r === $t ? e.result +=
|
|
1944
|
+
r === $t ? e.result += X.repeat(`
|
|
1945
1945
|
`, o ? 1 + s : s) : r === Ge && o && (e.result += `
|
|
1946
1946
|
`);
|
|
1947
1947
|
break;
|
|
1948
1948
|
}
|
|
1949
|
-
for (i ? ve(u) ? (
|
|
1950
|
-
`, o ? 1 + s : s)) :
|
|
1951
|
-
`, s + 1)) : s === 0 ? o && (e.result += " ") : e.result +=
|
|
1952
|
-
`, s) : e.result +=
|
|
1949
|
+
for (i ? ve(u) ? (c = !0, e.result += X.repeat(`
|
|
1950
|
+
`, o ? 1 + s : s)) : c ? (c = !1, e.result += X.repeat(`
|
|
1951
|
+
`, s + 1)) : s === 0 ? o && (e.result += " ") : e.result += X.repeat(`
|
|
1952
|
+
`, s) : e.result += X.repeat(`
|
|
1953
1953
|
`, o ? 1 + s : s), o = !0, a = !0, s = 0, n = e.position; !de(u) && u !== 0; )
|
|
1954
1954
|
u = e.input.charCodeAt(++e.position);
|
|
1955
1955
|
he(e, n, e.position, !1);
|
|
@@ -1960,11 +1960,11 @@ function Ot(e, t) {
|
|
|
1960
1960
|
var n, i = e.tag, r = e.anchor, o = [], a, l = !1, s;
|
|
1961
1961
|
if (e.firstTabInLine !== -1) return !1;
|
|
1962
1962
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, T(e, "tab characters must not be used in indentation")), !(s !== 45 || (a = e.input.charCodeAt(e.position + 1), !se(a)))); ) {
|
|
1963
|
-
if (l = !0, e.position++,
|
|
1963
|
+
if (l = !0, e.position++, Z(e, !0, -1) && e.lineIndent <= t) {
|
|
1964
1964
|
o.push(null), s = e.input.charCodeAt(e.position);
|
|
1965
1965
|
continue;
|
|
1966
1966
|
}
|
|
1967
|
-
if (n = e.line, Ee(e, t, $n, !1, !0), o.push(e.result),
|
|
1967
|
+
if (n = e.line, Ee(e, t, $n, !1, !0), o.push(e.result), Z(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
1968
1968
|
T(e, "bad indentation of a sequence entry");
|
|
1969
1969
|
else if (e.lineIndent < t)
|
|
1970
1970
|
break;
|
|
@@ -1972,34 +1972,34 @@ function Ot(e, t) {
|
|
|
1972
1972
|
return l ? (e.tag = i, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1973
1973
|
}
|
|
1974
1974
|
function qa(e, t, n) {
|
|
1975
|
-
var i, r, o, a, l, s,
|
|
1975
|
+
var i, r, o, a, l, s, c = e.tag, d = e.anchor, u = {}, p = /* @__PURE__ */ Object.create(null), m = null, y = null, h = null, b = !1, k = !1, A;
|
|
1976
1976
|
if (e.firstTabInLine !== -1) return !1;
|
|
1977
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = u),
|
|
1978
|
-
if (!
|
|
1979
|
-
|
|
1977
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), A = e.input.charCodeAt(e.position); A !== 0; ) {
|
|
1978
|
+
if (!b && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, T(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (A === 63 || A === 58) && se(i))
|
|
1979
|
+
A === 63 ? (b && (Se(e, u, p, m, y, null, a, l, s), m = y = h = null), k = !0, b = !0, r = !0) : b ? (b = !1, r = !0) : T(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, A = i;
|
|
1980
1980
|
else {
|
|
1981
1981
|
if (a = e.line, l = e.lineStart, s = e.position, !Ee(e, n, Sn, !1, !0))
|
|
1982
1982
|
break;
|
|
1983
1983
|
if (e.line === o) {
|
|
1984
|
-
for (
|
|
1985
|
-
|
|
1986
|
-
if (
|
|
1987
|
-
|
|
1988
|
-
else if (
|
|
1984
|
+
for (A = e.input.charCodeAt(e.position); ve(A); )
|
|
1985
|
+
A = e.input.charCodeAt(++e.position);
|
|
1986
|
+
if (A === 58)
|
|
1987
|
+
A = e.input.charCodeAt(++e.position), se(A) || T(e, "a whitespace character is expected after the key-value separator within a block mapping"), b && (Se(e, u, p, m, y, null, a, l, s), m = y = h = null), k = !0, b = !1, r = !1, m = e.tag, y = e.result;
|
|
1988
|
+
else if (k)
|
|
1989
1989
|
T(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1990
1990
|
else
|
|
1991
|
-
return e.tag =
|
|
1992
|
-
} else if (
|
|
1991
|
+
return e.tag = c, e.anchor = d, !0;
|
|
1992
|
+
} else if (k)
|
|
1993
1993
|
T(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1994
1994
|
else
|
|
1995
|
-
return e.tag =
|
|
1995
|
+
return e.tag = c, e.anchor = d, !0;
|
|
1996
1996
|
}
|
|
1997
|
-
if ((e.line === o || e.lineIndent > t) && (
|
|
1997
|
+
if ((e.line === o || e.lineIndent > t) && (b && (a = e.line, l = e.lineStart, s = e.position), Ee(e, t, Ne, !0, r) && (b ? y = e.result : h = e.result), b || (Se(e, u, p, m, y, h, a, l, s), m = y = h = null), Z(e, !0, -1), A = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && A !== 0)
|
|
1998
1998
|
T(e, "bad indentation of a mapping entry");
|
|
1999
1999
|
else if (e.lineIndent < t)
|
|
2000
2000
|
break;
|
|
2001
2001
|
}
|
|
2002
|
-
return
|
|
2002
|
+
return b && Se(e, u, p, m, y, null, a, l, s), k && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), k;
|
|
2003
2003
|
}
|
|
2004
2004
|
function Ha(e) {
|
|
2005
2005
|
var t, n = !1, i = !1, r, o, a;
|
|
@@ -2034,37 +2034,37 @@ function Ya(e) {
|
|
|
2034
2034
|
if (i = e.input.charCodeAt(e.position), i !== 42) return !1;
|
|
2035
2035
|
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !se(i) && !we(i); )
|
|
2036
2036
|
i = e.input.charCodeAt(++e.position);
|
|
2037
|
-
return e.position === t && T(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), ye.call(e.anchorMap, n) || T(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n],
|
|
2037
|
+
return e.position === t && T(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), ye.call(e.anchorMap, n) || T(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], Z(e, !0, -1), !0;
|
|
2038
2038
|
}
|
|
2039
2039
|
function Ee(e, t, n, i, r) {
|
|
2040
|
-
var o, a, l, s = 1,
|
|
2041
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = Ne === n || $n === n, i &&
|
|
2040
|
+
var o, a, l, s = 1, c = !1, d = !1, u, p, m, y, h, b;
|
|
2041
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = Ne === n || $n === n, i && Z(e, !0, -1) && (c = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
2042
2042
|
for (; Ha(e) || Va(e); )
|
|
2043
|
-
|
|
2044
|
-
if (l && (l =
|
|
2043
|
+
Z(e, !0, -1) ? (c = !0, l = o, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
2044
|
+
if (l && (l = c || r), (s === 1 || Ne === n) && (Ke === n || Sn === n ? h = t : h = t + 1, b = e.position - e.lineStart, s === 1 ? l && (Ot(e, b) || qa(e, b, h)) || ja(e, h) ? d = !0 : (a && Ua(e, h) || Da(e, h) || Pa(e, h) ? d = !0 : Ya(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && T(e, "alias node should not have any properties")) : Ma(e, h, Ke === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && Ot(e, b))), e.tag === null)
|
|
2045
2045
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2046
2046
|
else if (e.tag === "?") {
|
|
2047
|
-
for (e.result !== null && e.kind !== "scalar" && T(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0,
|
|
2048
|
-
if (
|
|
2049
|
-
e.result =
|
|
2047
|
+
for (e.result !== null && e.kind !== "scalar" && T(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, p = e.implicitTypes.length; u < p; u += 1)
|
|
2048
|
+
if (y = e.implicitTypes[u], y.resolve(e.result)) {
|
|
2049
|
+
e.result = y.construct(e.result), e.tag = y.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2050
2050
|
break;
|
|
2051
2051
|
}
|
|
2052
2052
|
} else if (e.tag !== "!") {
|
|
2053
2053
|
if (ye.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2054
|
-
|
|
2054
|
+
y = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2055
2055
|
else
|
|
2056
|
-
for (
|
|
2057
|
-
if (e.tag.slice(0,
|
|
2058
|
-
|
|
2056
|
+
for (y = null, m = e.typeMap.multi[e.kind || "fallback"], u = 0, p = m.length; u < p; u += 1)
|
|
2057
|
+
if (e.tag.slice(0, m[u].tag.length) === m[u].tag) {
|
|
2058
|
+
y = m[u];
|
|
2059
2059
|
break;
|
|
2060
2060
|
}
|
|
2061
|
-
|
|
2061
|
+
y || T(e, "unknown tag !<" + e.tag + ">"), e.result !== null && y.kind !== e.kind && T(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)) : T(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2062
2062
|
}
|
|
2063
|
-
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null ||
|
|
2063
|
+
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2064
2064
|
}
|
|
2065
2065
|
function Wa(e) {
|
|
2066
2066
|
var t = e.position, n, i, r, o = !1, a;
|
|
2067
|
-
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (a = e.input.charCodeAt(e.position)) !== 0 && (
|
|
2067
|
+
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (a = e.input.charCodeAt(e.position)) !== 0 && (Z(e, !0, -1), a = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || a !== 37)); ) {
|
|
2068
2068
|
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !se(a); )
|
|
2069
2069
|
a = e.input.charCodeAt(++e.position);
|
|
2070
2070
|
for (i = e.input.slice(n, e.position), r = [], i.length < 1 && T(e, "directive name must not be less than one character in length"); a !== 0; ) {
|
|
@@ -2083,8 +2083,8 @@ function Wa(e) {
|
|
|
2083
2083
|
}
|
|
2084
2084
|
a !== 0 && st(e), ye.call(It, i) ? It[i](e, i, r) : Me(e, 'unknown document directive "' + i + '"');
|
|
2085
2085
|
}
|
|
2086
|
-
if (
|
|
2087
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
2086
|
+
if (Z(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, Z(e, !0, -1)) : o && T(e, "directives end mark is expected"), Ee(e, e.lineIndent - 1, Ne, !1, !0), Z(e, !0, -1), e.checkLineBreaks && Fa.test(e.input.slice(t, e.position)) && Me(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Ve(e)) {
|
|
2087
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, Z(e, !0, -1));
|
|
2088
2088
|
return;
|
|
2089
2089
|
}
|
|
2090
2090
|
if (e.position < e.length - 1)
|
|
@@ -2172,14 +2172,14 @@ function vo(e) {
|
|
|
2172
2172
|
n = "U", i = 8;
|
|
2173
2173
|
else
|
|
2174
2174
|
throw new oe("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2175
|
-
return "\\" + n +
|
|
2175
|
+
return "\\" + n + X.repeat("0", i - t.length) + t;
|
|
2176
2176
|
}
|
|
2177
2177
|
var bo = 1, Be = 2;
|
|
2178
2178
|
function ko(e) {
|
|
2179
|
-
this.schema = e.schema || lt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel =
|
|
2179
|
+
this.schema = e.schema || lt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = X.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = yo(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 === '"' ? Be : bo, 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;
|
|
2180
2180
|
}
|
|
2181
2181
|
function Bt(e, t) {
|
|
2182
|
-
for (var n =
|
|
2182
|
+
for (var n = X.repeat(" ", t), i = 0, r = -1, o = "", a, l = e.length; i < l; )
|
|
2183
2183
|
r = e.indexOf(`
|
|
2184
2184
|
`, i), r === -1 ? (a = e.slice(i), i = l) : (a = e.slice(i, r + 1), i = r + 1), a.length && a !== `
|
|
2185
2185
|
` && (o += n), o += a;
|
|
@@ -2187,7 +2187,7 @@ function Bt(e, t) {
|
|
|
2187
2187
|
}
|
|
2188
2188
|
function et(e, t) {
|
|
2189
2189
|
return `
|
|
2190
|
-
` +
|
|
2190
|
+
` + X.repeat(" ", e.indent * t);
|
|
2191
2191
|
}
|
|
2192
2192
|
function Co(e, t) {
|
|
2193
2193
|
var n, i, r;
|
|
@@ -2231,25 +2231,25 @@ function qn(e) {
|
|
|
2231
2231
|
}
|
|
2232
2232
|
var Hn = 1, tt = 2, Vn = 3, Yn = 4, _e = 5;
|
|
2233
2233
|
function _o(e, t, n, i, r, o, a, l) {
|
|
2234
|
-
var s,
|
|
2234
|
+
var s, c = 0, d = null, u = !1, p = !1, m = i !== -1, y = -1, h = xo(Ie(e, 0)) && Ao(Ie(e, e.length - 1));
|
|
2235
2235
|
if (t || a)
|
|
2236
|
-
for (s = 0; s < e.length;
|
|
2237
|
-
if (
|
|
2236
|
+
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2237
|
+
if (c = Ie(e, s), !Le(c))
|
|
2238
2238
|
return _e;
|
|
2239
|
-
|
|
2239
|
+
h = h && Rt(c, d, l), d = c;
|
|
2240
2240
|
}
|
|
2241
2241
|
else {
|
|
2242
|
-
for (s = 0; s < e.length;
|
|
2243
|
-
if (
|
|
2244
|
-
u = !0,
|
|
2245
|
-
s -
|
|
2246
|
-
else if (!Le(
|
|
2242
|
+
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2243
|
+
if (c = Ie(e, s), c === Oe)
|
|
2244
|
+
u = !0, m && (p = p || // Foldable line = too long, and not more-indented.
|
|
2245
|
+
s - y - 1 > i && e[y + 1] !== " ", y = s);
|
|
2246
|
+
else if (!Le(c))
|
|
2247
2247
|
return _e;
|
|
2248
|
-
|
|
2248
|
+
h = h && Rt(c, d, l), d = c;
|
|
2249
2249
|
}
|
|
2250
|
-
|
|
2250
|
+
p = p || m && s - y - 1 > i && e[y + 1] !== " ";
|
|
2251
2251
|
}
|
|
2252
|
-
return !u && !
|
|
2252
|
+
return !u && !p ? h && !a && !r(e) ? Hn : o === Be ? _e : tt : n > 9 && qn(e) ? _e : a ? o === Be ? _e : tt : p ? Yn : Vn;
|
|
2253
2253
|
}
|
|
2254
2254
|
function wo(e, t, n, i, r) {
|
|
2255
2255
|
e.dump = function() {
|
|
@@ -2258,8 +2258,8 @@ function wo(e, t, n, i, r) {
|
|
|
2258
2258
|
if (!e.noCompatMode && (go.indexOf(t) !== -1 || ho.test(t)))
|
|
2259
2259
|
return e.quotingType === Be ? '"' + t + '"' : "'" + t + "'";
|
|
2260
2260
|
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = i || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2261
|
-
function s(
|
|
2262
|
-
return Co(e,
|
|
2261
|
+
function s(c) {
|
|
2262
|
+
return Co(e, c);
|
|
2263
2263
|
}
|
|
2264
2264
|
switch (_o(
|
|
2265
2265
|
t,
|
|
@@ -2300,9 +2300,9 @@ function Nt(e) {
|
|
|
2300
2300
|
}
|
|
2301
2301
|
function So(e, t) {
|
|
2302
2302
|
for (var n = /(\n+)([^\n]*)/g, i = function() {
|
|
2303
|
-
var
|
|
2303
|
+
var c = e.indexOf(`
|
|
2304
2304
|
`);
|
|
2305
|
-
return
|
|
2305
|
+
return c = c !== -1 ? c : e.length, n.lastIndex = c, Mt(e.slice(0, c), t);
|
|
2306
2306
|
}(), r = e[0] === `
|
|
2307
2307
|
` || e[0] === " ", o, a; a = n.exec(e); ) {
|
|
2308
2308
|
var l = a[1], s = a[2];
|
|
@@ -2338,13 +2338,13 @@ function Dt(e, t, n, i) {
|
|
|
2338
2338
|
e.tag = o, e.dump = r || "[]";
|
|
2339
2339
|
}
|
|
2340
2340
|
function Eo(e, t, n) {
|
|
2341
|
-
var i = "", r = e.tag, o = Object.keys(n), a, l, s,
|
|
2341
|
+
var i = "", r = e.tag, o = Object.keys(n), a, l, s, c, d;
|
|
2342
2342
|
for (a = 0, l = o.length; a < l; a += 1)
|
|
2343
|
-
|
|
2343
|
+
d = "", i !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = o[a], c = n[s], e.replacer && (c = e.replacer.call(n, s, c)), pe(e, t, s, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), pe(e, t, c, !1, !1) && (d += e.dump, i += d));
|
|
2344
2344
|
e.tag = r, e.dump = "{" + i + "}";
|
|
2345
2345
|
}
|
|
2346
2346
|
function Io(e, t, n, i) {
|
|
2347
|
-
var r = "", o = e.tag, a = Object.keys(n), l, s,
|
|
2347
|
+
var r = "", o = e.tag, a = Object.keys(n), l, s, c, d, u, p;
|
|
2348
2348
|
if (e.sortKeys === !0)
|
|
2349
2349
|
a.sort();
|
|
2350
2350
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2352,7 +2352,7 @@ function Io(e, t, n, i) {
|
|
|
2352
2352
|
else if (e.sortKeys)
|
|
2353
2353
|
throw new oe("sortKeys must be a boolean or a function");
|
|
2354
2354
|
for (l = 0, s = a.length; l < s; l += 1)
|
|
2355
|
-
|
|
2355
|
+
p = "", (!i || r !== "") && (p += et(e, t)), c = a[l], d = n[c], e.replacer && (d = e.replacer.call(n, c, d)), pe(e, t + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Oe === e.dump.charCodeAt(0) ? p += "?" : p += "? "), p += e.dump, u && (p += et(e, t)), pe(e, t + 1, d, !0, u) && (e.dump && Oe === e.dump.charCodeAt(0) ? p += ":" : p += ": ", p += e.dump, r += p));
|
|
2356
2356
|
e.tag = o, e.dump = r || "{}";
|
|
2357
2357
|
}
|
|
2358
2358
|
function Pt(e, t, n) {
|
|
@@ -2374,16 +2374,16 @@ function Pt(e, t, n) {
|
|
|
2374
2374
|
}
|
|
2375
2375
|
function pe(e, t, n, i, r, o, a) {
|
|
2376
2376
|
e.tag = null, e.dump = n, Pt(e, n, !1) || Pt(e, n, !0);
|
|
2377
|
-
var l = Kn.call(e.dump), s = i,
|
|
2377
|
+
var l = Kn.call(e.dump), s = i, c;
|
|
2378
2378
|
i && (i = e.flowLevel < 0 || e.flowLevel > t);
|
|
2379
|
-
var
|
|
2380
|
-
if (
|
|
2379
|
+
var d = l === "[object Object]" || l === "[object Array]", u, p;
|
|
2380
|
+
if (d && (u = e.duplicates.indexOf(n), p = u !== -1), (e.tag !== null && e.tag !== "?" || p || e.indent !== 2 && t > 0) && (r = !1), p && e.usedDuplicates[u])
|
|
2381
2381
|
e.dump = "*ref_" + u;
|
|
2382
2382
|
else {
|
|
2383
|
-
if (
|
|
2384
|
-
i && Object.keys(e.dump).length !== 0 ? (Io(e, t, e.dump, r),
|
|
2383
|
+
if (d && p && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), l === "[object Object]")
|
|
2384
|
+
i && Object.keys(e.dump).length !== 0 ? (Io(e, t, e.dump, r), p && (e.dump = "&ref_" + u + e.dump)) : (Eo(e, t, e.dump), p && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2385
2385
|
else if (l === "[object Array]")
|
|
2386
|
-
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Dt(e, t - 1, e.dump, r) : Dt(e, t, e.dump, r),
|
|
2386
|
+
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Dt(e, t - 1, e.dump, r) : Dt(e, t, e.dump, r), p && (e.dump = "&ref_" + u + e.dump)) : (To(e, t, e.dump), p && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2387
2387
|
else if (l === "[object String]")
|
|
2388
2388
|
e.tag !== "?" && wo(e, e.dump, t, o, s);
|
|
2389
2389
|
else {
|
|
@@ -2392,9 +2392,9 @@ function pe(e, t, n, i, r, o, a) {
|
|
|
2392
2392
|
if (e.skipInvalid) return !1;
|
|
2393
2393
|
throw new oe("unacceptable kind of an object to dump " + l);
|
|
2394
2394
|
}
|
|
2395
|
-
e.tag !== null && e.tag !== "?" && (
|
|
2395
|
+
e.tag !== null && e.tag !== "?" && (c = encodeURI(
|
|
2396
2396
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
2397
|
-
).replace(/!/g, "%21"), e.tag[0] === "!" ?
|
|
2397
|
+
).replace(/!/g, "%21"), e.tag[0] === "!" ? c = "!" + c : c.slice(0, 18) === "tag:yaml.org,2002:" ? c = "!!" + c.slice(18) : c = "!<" + c + ">", e.dump = c + " " + e.dump);
|
|
2398
2398
|
}
|
|
2399
2399
|
return !0;
|
|
2400
2400
|
}
|
|
@@ -2462,7 +2462,7 @@ var Ro = ie, Ko = ln, No = dn, Mo = hn, Do = yn, Po = lt, jo = Rn.load, Uo = Rn.
|
|
|
2462
2462
|
safeLoadAll: Wo,
|
|
2463
2463
|
safeDump: Jo
|
|
2464
2464
|
};
|
|
2465
|
-
const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
2465
|
+
const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */ z({
|
|
2466
2466
|
__name: "YamlCodeBlock",
|
|
2467
2467
|
props: {
|
|
2468
2468
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2477,7 +2477,7 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2477
2477
|
return Object.keys(i).length === 0 && i.constructor === Object ? "" : Wn.dump(i).trim();
|
|
2478
2478
|
});
|
|
2479
2479
|
return (i, r) => {
|
|
2480
|
-
const o =
|
|
2480
|
+
const o = U("KCodeBlock");
|
|
2481
2481
|
return g(), $("div", Go, [
|
|
2482
2482
|
t.entityRecord ? (g(), K(o, {
|
|
2483
2483
|
key: 0,
|
|
@@ -2490,7 +2490,7 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2490
2490
|
]);
|
|
2491
2491
|
};
|
|
2492
2492
|
}
|
|
2493
|
-
}), zo = { class: "terraform-config config-card-code-block" }, te = " ", Gn = /* @__PURE__ */
|
|
2493
|
+
}), zo = { class: "terraform-config config-card-code-block" }, te = " ", Gn = /* @__PURE__ */ z({
|
|
2494
2494
|
__name: "TerraformCodeBlock",
|
|
2495
2495
|
props: {
|
|
2496
2496
|
/** A record to indicate the entity's configuration, used to populate the Terraform code block */
|
|
@@ -2514,84 +2514,84 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2514
2514
|
}
|
|
2515
2515
|
},
|
|
2516
2516
|
setup(e) {
|
|
2517
|
-
const t = e, n = S(() => bi.includes(t.entityType)), i = S(() => ki.includes(t.entityType)), r = (c,
|
|
2518
|
-
const
|
|
2517
|
+
const t = e, n = S(() => bi.includes(t.entityType)), i = S(() => ki.includes(t.entityType)), r = (c, d) => {
|
|
2518
|
+
const u = te;
|
|
2519
2519
|
let p = "";
|
|
2520
|
-
return typeof c == "string" ? p += `${
|
|
2521
|
-
` : p += `${
|
|
2520
|
+
return typeof c == "string" ? p += `${u}${d} = "${c}"
|
|
2521
|
+
` : p += `${u}${d} = ${String(c ?? "")}
|
|
2522
2522
|
`, p;
|
|
2523
|
-
}, o = (c,
|
|
2523
|
+
}, o = (c, d, u = "") => {
|
|
2524
2524
|
if (typeof c != "object")
|
|
2525
2525
|
return "Invalid object";
|
|
2526
|
-
const p = te +
|
|
2527
|
-
let
|
|
2528
|
-
if (
|
|
2526
|
+
const p = te + u;
|
|
2527
|
+
let m = "";
|
|
2528
|
+
if (d && (m += `${p}${d} = {
|
|
2529
2529
|
`), c === null)
|
|
2530
|
-
return
|
|
2531
|
-
const
|
|
2532
|
-
let
|
|
2533
|
-
for (const [
|
|
2534
|
-
Array.isArray(k) ? k.length === 0 ?
|
|
2535
|
-
`,
|
|
2536
|
-
`,
|
|
2530
|
+
return d ? m += `${p}}` : m = "{}", m;
|
|
2531
|
+
const y = Object.fromEntries(Object.entries(c).filter(([, b]) => b !== null));
|
|
2532
|
+
let h = "";
|
|
2533
|
+
for (const [b, k] of Object.entries(y))
|
|
2534
|
+
Array.isArray(k) ? k.length === 0 ? h = "[]" : (h = `[
|
|
2535
|
+
`, h += a(k, void 0, p), h += `${p}${te}]`) : k && typeof k == "object" ? (h = `{
|
|
2536
|
+
`, h += o(k, void 0, p), h += `${p}${te}}`) : h = String(k ?? ""), typeof k == "string" && (h = `"${h}"`), m += `${p}${te}${b} = ${h}
|
|
2537
2537
|
`;
|
|
2538
|
-
return
|
|
2539
|
-
` :
|
|
2540
|
-
}, a = (c,
|
|
2538
|
+
return d ? m += `${p}}
|
|
2539
|
+
` : m;
|
|
2540
|
+
}, a = (c, d, u = "") => {
|
|
2541
2541
|
if (!Array.isArray(c))
|
|
2542
2542
|
return "Invalid array";
|
|
2543
|
-
const p = te +
|
|
2544
|
-
let
|
|
2545
|
-
|
|
2543
|
+
const p = te + u;
|
|
2544
|
+
let m = "";
|
|
2545
|
+
d && (c.length === 0 ? m += `${p}${d} = [` : m += `${p}${d} = [
|
|
2546
2546
|
`);
|
|
2547
|
-
for (let
|
|
2548
|
-
const
|
|
2549
|
-
typeof
|
|
2550
|
-
`,
|
|
2547
|
+
for (let y = 0; y < c.length; y++) {
|
|
2548
|
+
const h = c[y];
|
|
2549
|
+
typeof h == "object" ? (m += `${p}${te}{
|
|
2550
|
+
`, m += o(h, void 0, p), m += `${p}${te}}`) : typeof h == "string" ? m += `${p}${te}"${h}"` : m += `${p}${te}${String(h ?? "")}`, y < c.length - 1 && (m += ","), m += `
|
|
2551
2551
|
`;
|
|
2552
2552
|
}
|
|
2553
|
-
return
|
|
2554
|
-
` :
|
|
2555
|
-
`),
|
|
2556
|
-
}, l = (c) =>
|
|
2557
|
-
let
|
|
2558
|
-
for (const [
|
|
2559
|
-
Array.isArray(p) ?
|
|
2560
|
-
return
|
|
2561
|
-
},
|
|
2562
|
-
var
|
|
2563
|
-
const c = Object.fromEntries(Object.entries(t.entityRecord).filter(([,
|
|
2564
|
-
if (
|
|
2553
|
+
return d && (c.length === 0 ? m += `]
|
|
2554
|
+
` : m += `${p}]
|
|
2555
|
+
`), m;
|
|
2556
|
+
}, l = (c) => {
|
|
2557
|
+
let d = "";
|
|
2558
|
+
for (const [u, p] of Object.entries(c))
|
|
2559
|
+
Array.isArray(p) ? d += a(p, u) : typeof p == "object" ? d += o(p, u) : d += r(p, u);
|
|
2560
|
+
return d;
|
|
2561
|
+
}, s = S(() => {
|
|
2562
|
+
var m, y, h, b, k, A, B;
|
|
2563
|
+
const c = Object.fromEntries(Object.entries(t.entityRecord).filter(([, P]) => P != null)), d = t.entityRecord.config ? Object.fromEntries(Object.entries((m = t.entityRecord) == null ? void 0 : m.config).filter(([, P]) => P != null)) : void 0;
|
|
2564
|
+
if (d && (c.config = d), Object.keys(c).length === 0)
|
|
2565
2565
|
return "";
|
|
2566
2566
|
delete c.id;
|
|
2567
|
-
let
|
|
2568
|
-
if ((
|
|
2569
|
-
const
|
|
2570
|
-
|
|
2571
|
-
`,
|
|
2567
|
+
let u = "", p = "";
|
|
2568
|
+
if ((y = c.service) != null && y.id ? (p = "service", delete c.service) : (h = c.route) != null && h.id ? (p = "route", delete c.route) : (b = c.consumer) != null && b.id ? (p = "consumer", delete c.consumer) : (k = c.consumer_group) != null && k.id ? (p = "consumer_group", delete c.consumer_group) : (A = c.certificate) != null && A.id ? (p = "certificate", delete c.certificate) : (B = c.set) != null && B.id && (p = "set", delete c.set), n.value) {
|
|
2569
|
+
const P = t.subEntityType ? `${t.entityType}_${t.subEntityType}` : t.entityType;
|
|
2570
|
+
u += `resource "konnect_event_gateway_${P}" "my_eventgateway${P.replaceAll("_", "")}" {
|
|
2571
|
+
`, u += `${te}provider = konnect-beta
|
|
2572
2572
|
`;
|
|
2573
2573
|
} else if (t.entityType === "plugin") {
|
|
2574
|
-
const
|
|
2575
|
-
delete c.name,
|
|
2574
|
+
const P = t.credentialType.replace(/-/g, "_") || (c.name + "").replace(/-/g, "_");
|
|
2575
|
+
delete c.name, u += `resource "konnect_gateway_plugin_${P}" "my_${P}" {
|
|
2576
2576
|
`;
|
|
2577
|
-
} else i.value ? (
|
|
2578
|
-
`,
|
|
2579
|
-
`) :
|
|
2577
|
+
} else i.value ? (u += `resource "konnect_${t.entityType}" "my_${t.entityType}" {
|
|
2578
|
+
`, u += `${te}provider = konnect-beta
|
|
2579
|
+
`) : u += `resource "konnect_gateway_${t.entityType}" "my_${t.entityType}" {
|
|
2580
2580
|
`;
|
|
2581
|
-
return
|
|
2582
|
-
` : p && (
|
|
2583
|
-
`,
|
|
2584
|
-
`,
|
|
2585
|
-
`),
|
|
2586
|
-
`,
|
|
2581
|
+
return u += l(c), !n.value && !i.value ? u += `${te}control_plane_id = konnect_gateway_control_plane.my_konnect_cp.id
|
|
2582
|
+
` : p && (u += `${te}${p} = {
|
|
2583
|
+
`, u += `${te}${te}id = konnect_gateway_${p}.my_${p}.id
|
|
2584
|
+
`, u += `${te}}
|
|
2585
|
+
`), u += `}
|
|
2586
|
+
`, u;
|
|
2587
2587
|
});
|
|
2588
|
-
return (c,
|
|
2589
|
-
const
|
|
2588
|
+
return (c, d) => {
|
|
2589
|
+
const u = U("KCodeBlock");
|
|
2590
2590
|
return g(), $("div", zo, [
|
|
2591
|
-
t.entityRecord ? (g(), K(
|
|
2591
|
+
t.entityRecord ? (g(), K(u, {
|
|
2592
2592
|
key: 0,
|
|
2593
2593
|
id: "terraform-codeblock",
|
|
2594
|
-
code:
|
|
2594
|
+
code: s.value,
|
|
2595
2595
|
language: "terraform",
|
|
2596
2596
|
theme: "dark",
|
|
2597
2597
|
onCodeBlockRender: _(Te)
|
|
@@ -2605,7 +2605,7 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2605
2605
|
}, Zo = ["data-testid"], Xo = {
|
|
2606
2606
|
key: 0,
|
|
2607
2607
|
class: "config-card-prop-section-title"
|
|
2608
|
-
}, el = /* @__PURE__ */
|
|
2608
|
+
}, el = /* @__PURE__ */ z({
|
|
2609
2609
|
__name: "ConfigCardDisplay",
|
|
2610
2610
|
props: {
|
|
2611
2611
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2662,7 +2662,7 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2662
2662
|
}
|
|
2663
2663
|
},
|
|
2664
2664
|
setup(e) {
|
|
2665
|
-
const t = e, n = Ue(), { i18n: { t: i } } =
|
|
2665
|
+
const t = e, n = Ue(), { i18n: { t: i } } = J.useI18n(), r = (l) => !!(l.tooltip || n[`${l.key}-label-tooltip`]), o = S(() => {
|
|
2666
2666
|
if (!t.record)
|
|
2667
2667
|
return t.record;
|
|
2668
2668
|
let l = t.record;
|
|
@@ -2672,32 +2672,32 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2672
2672
|
}), a = S(() => t.fetcherUrl.replace(/(\?|&)__ui_data=true/, ""));
|
|
2673
2673
|
return (l, s) => (g(), $(ue, null, [
|
|
2674
2674
|
e.format === "structured" ? (g(), $("div", Qo, [
|
|
2675
|
-
(g(!0), $(ue, null, ce(e.propListTypes, (
|
|
2676
|
-
key: `config-card-details-${
|
|
2677
|
-
class: fe(`config-card-details-${
|
|
2678
|
-
"data-testid": `config-card-details-${
|
|
2675
|
+
(g(!0), $(ue, null, ce(e.propListTypes, (c) => (g(), $("div", {
|
|
2676
|
+
key: `config-card-details-${c}-props`,
|
|
2677
|
+
class: fe(`config-card-details-${c}-props`),
|
|
2678
|
+
"data-testid": `config-card-details-${c}-props`
|
|
2679
2679
|
}, [
|
|
2680
|
-
|
|
2681
|
-
(g(!0), $(ue, null, ce(e.propertyCollections[
|
|
2682
|
-
key:
|
|
2683
|
-
item:
|
|
2680
|
+
c !== "basic" ? (g(), $("div", Xo, I(c === "advanced" ? _(i)("baseConfigCard.sections.advanced") : c === "plugin" ? _(i)("baseConfigCard.sections.plugin") : _(i)("baseConfigCard.sections.policy")), 1)) : D("", !0),
|
|
2681
|
+
(g(!0), $(ue, null, ce(e.propertyCollections[c], (d) => j(l.$slots, `config-card-item-${d.key}`, {
|
|
2682
|
+
key: d.key,
|
|
2683
|
+
item: d
|
|
2684
2684
|
}, () => [
|
|
2685
|
-
R(nn, { item:
|
|
2685
|
+
R(nn, { item: d }, ke({
|
|
2686
2686
|
label: w(() => [
|
|
2687
|
-
|
|
2687
|
+
j(l.$slots, `${d.key}-label`, { row: d }, void 0, !0)
|
|
2688
2688
|
]),
|
|
2689
|
-
[
|
|
2690
|
-
|
|
2691
|
-
row:
|
|
2689
|
+
[d.key]: w(({ rowValue: u }) => [
|
|
2690
|
+
j(l.$slots, d.key, {
|
|
2691
|
+
row: d,
|
|
2692
2692
|
rowValue: u
|
|
2693
2693
|
}, void 0, !0)
|
|
2694
2694
|
]),
|
|
2695
2695
|
_: 2
|
|
2696
2696
|
}, [
|
|
2697
|
-
r(
|
|
2697
|
+
r(d) ? {
|
|
2698
2698
|
name: "label-tooltip",
|
|
2699
2699
|
fn: w(() => [
|
|
2700
|
-
|
|
2700
|
+
j(l.$slots, `${d.key}-label-tooltip`, { row: d }, void 0, !0)
|
|
2701
2701
|
]),
|
|
2702
2702
|
key: "0"
|
|
2703
2703
|
} : void 0
|
|
@@ -2727,7 +2727,7 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2727
2727
|
}), tl = /* @__PURE__ */ le(el, [["__scopeId", "data-v-a7689049"]]), nl = {
|
|
2728
2728
|
class: "config-card-title",
|
|
2729
2729
|
"data-testid": "config-card-title"
|
|
2730
|
-
}, il = { class: "config-card-actions" }, rl = ["href"], al = { class: "config-card-details-section" }, ol = /* @__PURE__ */
|
|
2730
|
+
}, il = { class: "config-card-actions" }, rl = ["href"], al = { class: "config-card-details-section" }, ol = /* @__PURE__ */ z({
|
|
2731
2731
|
__name: "EntityBaseConfigCard",
|
|
2732
2732
|
props: {
|
|
2733
2733
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2850,9 +2850,9 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2850
2850
|
emits: ["loading", "fetch:success", "fetch:error", "configFormatChange"],
|
|
2851
2851
|
setup(e, { emit: t }) {
|
|
2852
2852
|
var x;
|
|
2853
|
-
const n = t, i = e, { i18n: { t: r } } =
|
|
2854
|
-
|
|
2855
|
-
const { axiosInstance: l } =
|
|
2853
|
+
const n = t, i = e, { i18n: { t: r } } = J.useI18n(), { getMessageFromError: o } = J.useErrors(), { convertKeyToTitle: a } = J.useStringHelpers();
|
|
2854
|
+
J.useSubSchema(i.pluginConfigKey);
|
|
2855
|
+
const { axiosInstance: l } = J.useAxios((x = i.config) == null ? void 0 : x.axiosRequestConfig), s = [
|
|
2856
2856
|
{
|
|
2857
2857
|
label: r("baseConfigCard.general.structuredFormat"),
|
|
2858
2858
|
value: "structured",
|
|
@@ -2871,22 +2871,22 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2871
2871
|
label: r("baseForm.configuration.terraform"),
|
|
2872
2872
|
value: "terraform"
|
|
2873
2873
|
});
|
|
2874
|
-
const
|
|
2875
|
-
|
|
2876
|
-
},
|
|
2877
|
-
localStorage.setItem(f,
|
|
2874
|
+
const c = s[0].value, d = N(c), u = (f) => {
|
|
2875
|
+
d.value = f == null ? void 0 : f.value, n("configFormatChange", d.value);
|
|
2876
|
+
}, p = (f, v) => {
|
|
2877
|
+
localStorage.setItem(f, v);
|
|
2878
2878
|
};
|
|
2879
|
-
be(
|
|
2880
|
-
i.config.formatPreferenceKey &&
|
|
2879
|
+
be(d, (f) => {
|
|
2880
|
+
i.config.formatPreferenceKey && p(i.config.formatPreferenceKey, f);
|
|
2881
2881
|
}), it(() => {
|
|
2882
2882
|
if (i.config.formatPreferenceKey) {
|
|
2883
2883
|
const f = localStorage.getItem(i.config.formatPreferenceKey);
|
|
2884
|
-
f && s.some((
|
|
2884
|
+
f && s.some((v) => v.value === f) ? d.value = f : d.value = c, p(i.config.formatPreferenceKey, d.value);
|
|
2885
2885
|
}
|
|
2886
2886
|
});
|
|
2887
|
-
const
|
|
2887
|
+
const m = {
|
|
2888
2888
|
id: {
|
|
2889
|
-
type:
|
|
2889
|
+
type: W.ID,
|
|
2890
2890
|
label: r("baseConfigCard.commonFields.id_label"),
|
|
2891
2891
|
order: 0,
|
|
2892
2892
|
section: ae.Basic
|
|
@@ -2896,174 +2896,174 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2896
2896
|
section: ae.Basic
|
|
2897
2897
|
},
|
|
2898
2898
|
enabled: {
|
|
2899
|
-
type:
|
|
2899
|
+
type: W.BadgeStatus,
|
|
2900
2900
|
order: 2,
|
|
2901
2901
|
section: ae.Basic
|
|
2902
2902
|
},
|
|
2903
2903
|
updated_at: {
|
|
2904
|
-
type:
|
|
2904
|
+
type: W.Date,
|
|
2905
2905
|
label: r("baseConfigCard.commonFields.updated_at_label"),
|
|
2906
2906
|
order: 3,
|
|
2907
2907
|
section: ae.Basic
|
|
2908
2908
|
},
|
|
2909
2909
|
created_at: {
|
|
2910
|
-
type:
|
|
2910
|
+
type: W.Date,
|
|
2911
2911
|
label: r("baseConfigCard.commonFields.created_at_label"),
|
|
2912
2912
|
order: 4,
|
|
2913
2913
|
section: ae.Basic
|
|
2914
2914
|
},
|
|
2915
2915
|
tags: {
|
|
2916
|
-
type:
|
|
2916
|
+
type: W.BadgeTag,
|
|
2917
2917
|
order: -1,
|
|
2918
2918
|
// the last property displayed
|
|
2919
2919
|
section: ae.Basic
|
|
2920
2920
|
},
|
|
2921
2921
|
partials: {
|
|
2922
|
-
type:
|
|
2922
|
+
type: W.LinkInternal,
|
|
2923
2923
|
label: r("baseConfigCard.commonFields.partial_label"),
|
|
2924
2924
|
order: -1,
|
|
2925
2925
|
// the last property displayed
|
|
2926
2926
|
section: ae.Basic
|
|
2927
2927
|
}
|
|
2928
|
-
},
|
|
2929
|
-
var C,
|
|
2930
|
-
if (!
|
|
2928
|
+
}, y = N(!1), h = N(!1), b = N(""), k = N({}), A = S(() => {
|
|
2929
|
+
var C, Y, G;
|
|
2930
|
+
if (!k.value)
|
|
2931
2931
|
return [];
|
|
2932
|
-
const f = [],
|
|
2933
|
-
for (const E in
|
|
2932
|
+
const f = [], v = Object.keys(k.value).length;
|
|
2933
|
+
for (const E in k.value) {
|
|
2934
2934
|
if (E === "__ui_data") continue;
|
|
2935
|
-
const O = (
|
|
2936
|
-
let H =
|
|
2937
|
-
(
|
|
2935
|
+
const O = (Y = (C = i.configSchema) == null ? void 0 : C[E]) == null ? void 0 : Y.order, V = (G = m[E]) == null ? void 0 : G.order;
|
|
2936
|
+
let H = v;
|
|
2937
|
+
(V || V === 0) && (H = V === -1 ? v + 1 : V), O && (H = O === -1 ? v + 1 : O), f.push([E, H]);
|
|
2938
2938
|
}
|
|
2939
2939
|
return f.sort(function(E, O) {
|
|
2940
2940
|
return E[1] - O[1];
|
|
2941
2941
|
}), f.map((E) => {
|
|
2942
2942
|
var ft, pt;
|
|
2943
|
-
const O = E[0],
|
|
2943
|
+
const O = E[0], V = (ft = k.value) == null ? void 0 : ft[O], H = ((pt = i.configSchema) == null ? void 0 : pt[O]) || {}, Q = m[O];
|
|
2944
2944
|
return {
|
|
2945
2945
|
key: O,
|
|
2946
|
-
value:
|
|
2946
|
+
value: V,
|
|
2947
2947
|
hidden: H.hidden || !1,
|
|
2948
|
-
type: H.type ?? ((
|
|
2949
|
-
label: H.label ?? ((
|
|
2950
|
-
tooltip: H.tooltip ?? ((
|
|
2951
|
-
section: H.section ?? ((
|
|
2948
|
+
type: H.type ?? ((Q == null ? void 0 : Q.type) || W.Text),
|
|
2949
|
+
label: H.label ?? ((Q == null ? void 0 : Q.label) || a(O)),
|
|
2950
|
+
tooltip: H.tooltip ?? ((Q == null ? void 0 : Q.tooltip) || void 0),
|
|
2951
|
+
section: H.section ?? ((Q == null ? void 0 : Q.section) || ae.Advanced)
|
|
2952
2952
|
};
|
|
2953
2953
|
}).filter((E) => !E.hidden && E.key !== i.pluginConfigKey);
|
|
2954
2954
|
}), B = S(() => {
|
|
2955
|
-
var
|
|
2956
|
-
if (!
|
|
2955
|
+
var Y, G;
|
|
2956
|
+
if (!k.value || !i.pluginConfigKey)
|
|
2957
2957
|
return [];
|
|
2958
|
-
const f =
|
|
2958
|
+
const f = k.value[i.pluginConfigKey] || {}, v = Object.keys(f).length, C = [];
|
|
2959
2959
|
for (const E in f) {
|
|
2960
|
-
const O = (
|
|
2961
|
-
let H =
|
|
2962
|
-
O && (H = O === -1 ?
|
|
2960
|
+
const O = (G = (Y = i.pluginConfigSchema) == null ? void 0 : Y[E]) == null ? void 0 : G.order, V = f[E];
|
|
2961
|
+
let H = V != null && V !== "" ? v - 1 : v;
|
|
2962
|
+
O && (H = O === -1 ? v + 1 : O), C.push([E, H]);
|
|
2963
2963
|
}
|
|
2964
2964
|
return C.sort(function(E, O) {
|
|
2965
2965
|
return E[1] - O[1];
|
|
2966
2966
|
}), C.map((E) => {
|
|
2967
|
-
var
|
|
2968
|
-
const O = E[0],
|
|
2967
|
+
var Q;
|
|
2968
|
+
const O = E[0], V = f[O], H = ((Q = i.pluginConfigSchema) == null ? void 0 : Q[O]) || {};
|
|
2969
2969
|
return {
|
|
2970
2970
|
key: O,
|
|
2971
|
-
value:
|
|
2971
|
+
value: V,
|
|
2972
2972
|
hidden: H.hidden || !1,
|
|
2973
|
-
type: H.type ??
|
|
2973
|
+
type: H.type ?? W.Text,
|
|
2974
2974
|
label: H.label ?? a(O),
|
|
2975
2975
|
tooltip: H.tooltip ?? void 0,
|
|
2976
2976
|
section: ae.Plugin
|
|
2977
2977
|
};
|
|
2978
2978
|
}).filter((E) => !E.hidden);
|
|
2979
|
-
}),
|
|
2980
|
-
var
|
|
2981
|
-
if (!
|
|
2979
|
+
}), P = S(() => {
|
|
2980
|
+
var Y, G;
|
|
2981
|
+
if (!k.value || !i.policyConfigKey)
|
|
2982
2982
|
return [];
|
|
2983
|
-
const f =
|
|
2983
|
+
const f = k.value[i.policyConfigKey] || {}, v = Object.keys(f).length, C = [];
|
|
2984
2984
|
for (const E in f) {
|
|
2985
|
-
const O = (
|
|
2986
|
-
let H =
|
|
2987
|
-
O && (H = O === -1 ?
|
|
2985
|
+
const O = (G = (Y = i.policyConfigSchema) == null ? void 0 : Y[E]) == null ? void 0 : G.order, V = f[E];
|
|
2986
|
+
let H = V != null && V !== "" ? v - 1 : v;
|
|
2987
|
+
O && (H = O === -1 ? v + 1 : O), C.push([E, H]);
|
|
2988
2988
|
}
|
|
2989
2989
|
return C.sort(function(E, O) {
|
|
2990
2990
|
return E[1] - O[1];
|
|
2991
2991
|
}), C.map((E) => {
|
|
2992
|
-
var
|
|
2993
|
-
const O = E[0],
|
|
2992
|
+
var Q;
|
|
2993
|
+
const O = E[0], V = f[O], H = ((Q = i.policyConfigSchema) == null ? void 0 : Q[O]) || {};
|
|
2994
2994
|
return {
|
|
2995
2995
|
key: O,
|
|
2996
|
-
value:
|
|
2996
|
+
value: V,
|
|
2997
2997
|
hidden: H.hidden || !1,
|
|
2998
|
-
type: H.type ??
|
|
2998
|
+
type: H.type ?? W.Text,
|
|
2999
2999
|
label: H.label ?? a(O),
|
|
3000
3000
|
tooltip: H.tooltip ?? void 0,
|
|
3001
3001
|
section: ae.Policy
|
|
3002
3002
|
};
|
|
3003
3003
|
}).filter((E) => !E.hidden);
|
|
3004
|
-
}),
|
|
3005
|
-
var f,
|
|
3004
|
+
}), ee = S(() => {
|
|
3005
|
+
var f, v, C, Y, G, E;
|
|
3006
3006
|
return {
|
|
3007
|
-
basic: (f =
|
|
3008
|
-
advanced: (
|
|
3009
|
-
plugin: (
|
|
3010
|
-
policy: (E =
|
|
3007
|
+
basic: (f = A.value) == null ? void 0 : f.filter((O) => O.section === ae.Basic),
|
|
3008
|
+
advanced: (v = A.value) == null ? void 0 : v.filter((O) => O.section === ae.Advanced),
|
|
3009
|
+
plugin: (Y = B.value) == null ? void 0 : Y.concat((C = A.value) == null ? void 0 : C.filter((O) => O.section === ae.Plugin)),
|
|
3010
|
+
policy: (E = P.value) == null ? void 0 : E.concat((G = A.value) == null ? void 0 : G.filter((O) => O.section === ae.Policy))
|
|
3011
3011
|
};
|
|
3012
3012
|
}), M = S(() => {
|
|
3013
3013
|
const f = [];
|
|
3014
|
-
return
|
|
3014
|
+
return ee.value.basic.length && f.push("basic"), ee.value.advanced.length && f.push("advanced"), ee.value.plugin.length && f.push("plugin"), ee.value.policy.length && f.push("policy"), f;
|
|
3015
3015
|
}), F = S(() => {
|
|
3016
|
-
var
|
|
3016
|
+
var v, C;
|
|
3017
3017
|
let f = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3018
|
-
return i.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((
|
|
3018
|
+
return i.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((v = i.config) == null ? void 0 : v.controlPlaneId) || "") : i.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (C = i.config) != null && C.workspace ? `/${i.config.workspace}` : "")), f = f.replace(/{id}/gi, i.config.entityId), f;
|
|
3019
3019
|
});
|
|
3020
|
-
return be(
|
|
3020
|
+
return be(y, (f) => {
|
|
3021
3021
|
n("loading", f);
|
|
3022
3022
|
}, { immediate: !0 }), rt(async () => {
|
|
3023
|
-
|
|
3023
|
+
h.value = !1, y.value = !0;
|
|
3024
3024
|
try {
|
|
3025
3025
|
const { data: f } = await l.get(F.value);
|
|
3026
3026
|
if (i.dataKey)
|
|
3027
3027
|
if (typeof f[i.dataKey] < "u")
|
|
3028
|
-
|
|
3028
|
+
k.value = { ...f[i.dataKey] };
|
|
3029
3029
|
else
|
|
3030
3030
|
throw new Error(r("errors.dataKeyUndefined", { dataKey: i.dataKey }));
|
|
3031
|
-
else i.recordResolver ?
|
|
3031
|
+
else i.recordResolver ? k.value = { ...i.recordResolver(f) } : k.value = { ...f };
|
|
3032
3032
|
Object.keys(i.configSchema).filter((C) => i.configSchema[C].forceShow).forEach((C) => {
|
|
3033
|
-
|
|
3033
|
+
k.value && typeof k.value[C] > "u" && (k.value[C] = null);
|
|
3034
3034
|
}), n("fetch:success", f);
|
|
3035
3035
|
} catch (f) {
|
|
3036
|
-
const
|
|
3037
|
-
|
|
3036
|
+
const v = o(f);
|
|
3037
|
+
b.value = v.startsWith("code") ? r("baseConfigCard.errors.load") : v, h.value = !0, n("fetch:error", f);
|
|
3038
3038
|
} finally {
|
|
3039
|
-
|
|
3039
|
+
y.value = !1;
|
|
3040
3040
|
}
|
|
3041
|
-
}), (f,
|
|
3042
|
-
const C =
|
|
3043
|
-
return g(), K(
|
|
3041
|
+
}), (f, v) => {
|
|
3042
|
+
const C = U("KLabel"), Y = U("KSelect"), G = U("KButton"), E = U("KSkeleton"), O = U("KEmptyState"), V = U("KCard");
|
|
3043
|
+
return g(), K(V, {
|
|
3044
3044
|
class: "kong-ui-entity-base-config-card",
|
|
3045
3045
|
"title-tag": e.titleTag
|
|
3046
3046
|
}, ke({
|
|
3047
3047
|
actions: w(() => [
|
|
3048
3048
|
L("div", il, [
|
|
3049
|
-
|
|
3049
|
+
j(f.$slots, "actions", {}, void 0, !0),
|
|
3050
3050
|
R(C, {
|
|
3051
3051
|
class: "config-format-select-label",
|
|
3052
3052
|
"data-testid": "config-format-select-label"
|
|
3053
3053
|
}, {
|
|
3054
3054
|
default: w(() => [
|
|
3055
|
-
|
|
3055
|
+
q(I(e.label), 1)
|
|
3056
3056
|
]),
|
|
3057
3057
|
_: 1
|
|
3058
3058
|
}),
|
|
3059
|
-
R(
|
|
3060
|
-
modelValue:
|
|
3061
|
-
"onUpdate:modelValue":
|
|
3059
|
+
R(Y, {
|
|
3060
|
+
modelValue: d.value,
|
|
3061
|
+
"onUpdate:modelValue": v[0] || (v[0] = (H) => d.value = H),
|
|
3062
3062
|
"data-testid": "select-config-format",
|
|
3063
3063
|
items: s,
|
|
3064
3064
|
onChange: u
|
|
3065
3065
|
}, null, 8, ["modelValue"]),
|
|
3066
|
-
e.configCardDoc ? (g(), K(
|
|
3066
|
+
e.configCardDoc ? (g(), K(G, {
|
|
3067
3067
|
key: 0,
|
|
3068
3068
|
appearance: "tertiary",
|
|
3069
3069
|
class: "book-icon",
|
|
@@ -3083,18 +3083,18 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
3083
3083
|
])
|
|
3084
3084
|
]),
|
|
3085
3085
|
default: w(() => [
|
|
3086
|
-
|
|
3086
|
+
y.value ? (g(), K(E, {
|
|
3087
3087
|
key: 0,
|
|
3088
3088
|
"data-testid": "config-card-loader",
|
|
3089
3089
|
"table-columns": 2,
|
|
3090
3090
|
type: "table"
|
|
3091
|
-
})) :
|
|
3091
|
+
})) : h.value ? (g(), K(O, {
|
|
3092
3092
|
key: 1,
|
|
3093
3093
|
"data-testid": "config-card-fetch-error",
|
|
3094
3094
|
"icon-variant": "error"
|
|
3095
3095
|
}, {
|
|
3096
3096
|
default: w(() => [
|
|
3097
|
-
L("h3", null, I(
|
|
3097
|
+
L("h3", null, I(b.value), 1)
|
|
3098
3098
|
]),
|
|
3099
3099
|
_: 1
|
|
3100
3100
|
})) : D("", !0),
|
|
@@ -3104,16 +3104,16 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
3104
3104
|
config: e.config,
|
|
3105
3105
|
"entity-type": e.entityType,
|
|
3106
3106
|
"fetcher-url": F.value,
|
|
3107
|
-
format:
|
|
3107
|
+
format: d.value,
|
|
3108
3108
|
"prop-list-types": M.value,
|
|
3109
|
-
"property-collections":
|
|
3110
|
-
record:
|
|
3109
|
+
"property-collections": ee.value,
|
|
3110
|
+
record: k.value,
|
|
3111
3111
|
"sub-entity-type": e.subEntityType
|
|
3112
3112
|
}, ke({ _: 2 }, [
|
|
3113
3113
|
ce(Object.keys(f.$slots), (H) => ({
|
|
3114
3114
|
name: H,
|
|
3115
|
-
fn: w((
|
|
3116
|
-
|
|
3115
|
+
fn: w((Q) => [
|
|
3116
|
+
j(f.$slots, H, Yt({ record: k.value }, Q), void 0, !0)
|
|
3117
3117
|
])
|
|
3118
3118
|
}))
|
|
3119
3119
|
]), 1032, ["code-block-record-formatter", "config", "entity-type", "fetcher-url", "format", "prop-list-types", "property-collections", "record", "sub-entity-type"])
|
|
@@ -3125,8 +3125,8 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
3125
3125
|
name: "title",
|
|
3126
3126
|
fn: w(() => [
|
|
3127
3127
|
L("span", nl, [
|
|
3128
|
-
|
|
3129
|
-
|
|
3128
|
+
j(f.$slots, "title", {}, () => [
|
|
3129
|
+
q(I(_(r)("baseConfigCard.title")), 1)
|
|
3130
3130
|
], !0)
|
|
3131
3131
|
])
|
|
3132
3132
|
]),
|
|
@@ -3135,7 +3135,7 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
3135
3135
|
]), 1032, ["title-tag"]);
|
|
3136
3136
|
};
|
|
3137
3137
|
}
|
|
3138
|
-
}), Fs = /* @__PURE__ */ le(ol, [["__scopeId", "data-v-f2b42324"]]), ll = { class: "deck-config config-card-code-block" }, sl = /* @__PURE__ */
|
|
3138
|
+
}), Fs = /* @__PURE__ */ le(ol, [["__scopeId", "data-v-f2b42324"]]), ll = { class: "deck-config config-card-code-block" }, sl = /* @__PURE__ */ z({
|
|
3139
3139
|
__name: "DeckCodeBlock",
|
|
3140
3140
|
props: {
|
|
3141
3141
|
app: {},
|
|
@@ -3147,48 +3147,48 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
3147
3147
|
workspace: {}
|
|
3148
3148
|
},
|
|
3149
3149
|
setup(e) {
|
|
3150
|
-
const t = e, { i18n: n, i18nT: i } =
|
|
3150
|
+
const t = e, { i18n: n, i18nT: i } = J.useI18n(), r = [
|
|
3151
3151
|
{ value: "bash", label: "Linux / macOS Bash" },
|
|
3152
3152
|
{ value: "powershell", label: "Windows PowerShell" }
|
|
3153
3153
|
], o = N(navigator.userAgent.toLowerCase().includes("windows") ? "powershell" : "bash"), a = S(() => {
|
|
3154
|
-
const
|
|
3154
|
+
const d = {
|
|
3155
3155
|
_format_version: "3.0"
|
|
3156
3156
|
};
|
|
3157
|
-
return t.controlPlaneName ?
|
|
3157
|
+
return t.controlPlaneName ? d._konnect = {
|
|
3158
3158
|
control_plane_name: t.controlPlaneName
|
|
3159
|
-
} : t.workspace && (
|
|
3159
|
+
} : t.workspace && (d._workspace = t.workspace), d;
|
|
3160
3160
|
}), l = S(() => {
|
|
3161
|
-
var
|
|
3162
|
-
const
|
|
3163
|
-
t.entityType === $e.Plugin ? ((
|
|
3164
|
-
const u = t.entityType === $e.KeySet ? "key_sets" : t.entityType + "s",
|
|
3161
|
+
var m, y, h, b, k;
|
|
3162
|
+
const d = Object.fromEntries(Object.entries(t.entityRecord).filter(([, A]) => A !== null && A !== "" && (Array.isArray(A) ? A.length !== 0 : !0)));
|
|
3163
|
+
t.entityType === $e.Plugin ? ((m = d.service) != null && m.id && (d.service = d.service.id), (y = d.route) != null && y.id && (d.route = d.route.id), (h = d.consumer) != null && h.id && (d.consumer = d.consumer.id), (b = d.consumer_group) != null && b.id && (d.consumer_group = d.consumer_group.id)) : t.entityType === $e.Key && (k = d.key_set) != null && k.id && (d.key_set = d.key_set.id);
|
|
3164
|
+
const u = t.entityType === $e.KeySet ? "key_sets" : t.entityType + "s", p = {
|
|
3165
3165
|
...a.value,
|
|
3166
|
-
[u]: [
|
|
3166
|
+
[u]: [d]
|
|
3167
3167
|
};
|
|
3168
|
-
return Wn.dump(
|
|
3169
|
-
}), s = S(() => o.value === "bash" ? "export DECK_KONNECT_TOKEN='YOUR_KONNECT_PAT'" : '$env:DECK_KONNECT_TOKEN = "YOUR_KONNECT_PAT"'),
|
|
3170
|
-
let
|
|
3171
|
-
return t.geoApiServerUrl ?
|
|
3168
|
+
return Wn.dump(p, { quotingType: '"' }).trim();
|
|
3169
|
+
}), s = S(() => o.value === "bash" ? "export DECK_KONNECT_TOKEN='YOUR_KONNECT_PAT'" : '$env:DECK_KONNECT_TOKEN = "YOUR_KONNECT_PAT"'), c = S(() => {
|
|
3170
|
+
let d = "deck gateway apply -";
|
|
3171
|
+
return t.geoApiServerUrl ? d += ` --konnect-addr ${t.geoApiServerUrl}` : t.kongAdminApiUrl && (d += ` --kong-addr ${t.kongAdminApiUrl}`), o.value === "bash" ? `echo '
|
|
3172
3172
|
${l.value}
|
|
3173
|
-
' | ${
|
|
3173
|
+
' | ${d}` : `@'
|
|
3174
3174
|
${l.value}
|
|
3175
|
-
'@ | ${
|
|
3175
|
+
'@ | ${d}`;
|
|
3176
3176
|
});
|
|
3177
|
-
return (
|
|
3178
|
-
const
|
|
3177
|
+
return (d, u) => {
|
|
3178
|
+
const p = U("KSelect"), m = U("KBadge"), y = U("KCodeBlock");
|
|
3179
3179
|
return g(), $("div", ll, [
|
|
3180
|
-
R(
|
|
3180
|
+
R(p, {
|
|
3181
3181
|
modelValue: o.value,
|
|
3182
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
3182
|
+
"onUpdate:modelValue": u[0] || (u[0] = (h) => o.value = h),
|
|
3183
3183
|
items: r
|
|
3184
3184
|
}, {
|
|
3185
|
-
"item-template": w(({ item:
|
|
3186
|
-
|
|
3187
|
-
|
|
3185
|
+
"item-template": w(({ item: h }) => [
|
|
3186
|
+
h.value === "powershell" ? (g(), K(_(ht), { key: 0 })) : (g(), K(_(yt), { key: 1 })),
|
|
3187
|
+
q(" " + I(h.label), 1)
|
|
3188
3188
|
]),
|
|
3189
|
-
"selected-item-template": w(({ item:
|
|
3190
|
-
|
|
3191
|
-
|
|
3189
|
+
"selected-item-template": w(({ item: h }) => [
|
|
3190
|
+
h.value === "powershell" ? (g(), K(_(ht), { key: 0 })) : (g(), K(_(yt), { key: 1 })),
|
|
3191
|
+
q(" " + I(h.label), 1)
|
|
3192
3192
|
]),
|
|
3193
3193
|
_: 1
|
|
3194
3194
|
}, 8, ["modelValue"]),
|
|
@@ -3202,7 +3202,7 @@ ${l.value}
|
|
|
3202
3202
|
href: e.app === "konnect" ? "https://developer.konghq.com/deck/get-started/" : "https://developer.konghq.com/deck/gateway/configuration/"
|
|
3203
3203
|
}, {
|
|
3204
3204
|
default: w(() => [
|
|
3205
|
-
|
|
3205
|
+
q(I(_(n).t("deckCodeBlock.documentation")), 1)
|
|
3206
3206
|
]),
|
|
3207
3207
|
_: 1
|
|
3208
3208
|
}, 8, ["href"])
|
|
@@ -3212,9 +3212,9 @@ ${l.value}
|
|
|
3212
3212
|
e.app === "konnect" ? {
|
|
3213
3213
|
name: "token",
|
|
3214
3214
|
fn: w(() => [
|
|
3215
|
-
R(
|
|
3215
|
+
R(m, null, {
|
|
3216
3216
|
default: w(() => [...u[1] || (u[1] = [
|
|
3217
|
-
|
|
3217
|
+
q("DECK_KONNECT_TOKEN", -1)
|
|
3218
3218
|
])]),
|
|
3219
3219
|
_: 1
|
|
3220
3220
|
})
|
|
@@ -3222,7 +3222,7 @@ ${l.value}
|
|
|
3222
3222
|
key: "0"
|
|
3223
3223
|
} : void 0
|
|
3224
3224
|
]), 1032, ["data-testid", "keypath"]),
|
|
3225
|
-
e.app === "konnect" ? (g(), K(
|
|
3225
|
+
e.app === "konnect" ? (g(), K(y, {
|
|
3226
3226
|
key: 0,
|
|
3227
3227
|
id: "deck-env-codeblock",
|
|
3228
3228
|
code: s.value,
|
|
@@ -3231,10 +3231,10 @@ ${l.value}
|
|
|
3231
3231
|
theme: "dark",
|
|
3232
3232
|
onCodeBlockRender: _(Te)
|
|
3233
3233
|
}, null, 8, ["code", "language", "onCodeBlockRender"])) : D("", !0),
|
|
3234
|
-
t.entityRecord ? (g(), K(
|
|
3234
|
+
t.entityRecord ? (g(), K(y, {
|
|
3235
3235
|
key: 1,
|
|
3236
3236
|
id: "deck-codeblock",
|
|
3237
|
-
code:
|
|
3237
|
+
code: c.value,
|
|
3238
3238
|
language: o.value,
|
|
3239
3239
|
theme: "dark",
|
|
3240
3240
|
onCodeBlockRender: _(Te)
|
|
@@ -3242,7 +3242,7 @@ ${l.value}
|
|
|
3242
3242
|
]);
|
|
3243
3243
|
};
|
|
3244
3244
|
}
|
|
3245
|
-
}), cl = /* @__PURE__ */ le(sl, [["__scopeId", "data-v-04c956bc"]]), ul = ["novalidate"], dl = /* @__PURE__ */
|
|
3245
|
+
}), cl = /* @__PURE__ */ le(sl, [["__scopeId", "data-v-04c956bc"]]), ul = ["novalidate"], dl = /* @__PURE__ */ z({
|
|
3246
3246
|
__name: "EntityBaseForm",
|
|
3247
3247
|
props: {
|
|
3248
3248
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3366,19 +3366,19 @@ ${l.value}
|
|
|
3366
3366
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel", "codeBlockTabChange"],
|
|
3367
3367
|
setup(e, { expose: t, emit: n }) {
|
|
3368
3368
|
var F;
|
|
3369
|
-
const i = n, r = e, o = gi(), { i18n: { t: a } } =
|
|
3370
|
-
var f,
|
|
3369
|
+
const i = n, r = e, o = gi(), { i18n: { t: a } } = J.useI18n(), { getMessageFromError: l } = J.useErrors(), { axiosInstance: s } = J.useAxios((F = r.config) == null ? void 0 : F.axiosRequestConfig), c = N(!1), d = S(() => !!r.editId), u = N(!1), p = N(""), m = S(() => r.canSubmit === !1 || r.isReadonly), y = N(!1), h = S(() => {
|
|
3370
|
+
var f, v;
|
|
3371
3371
|
let x = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3372
|
-
return r.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((f = r.config) == null ? void 0 : f.controlPlaneId) || "") : r.config.app === "kongManager" && (x = x.replace(/\/{workspace}/gi, (
|
|
3373
|
-
}),
|
|
3374
|
-
|
|
3375
|
-
}, A = () => {
|
|
3376
|
-
r.config.cancelRoute ? o.push(r.config.cancelRoute) : k();
|
|
3372
|
+
return r.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((f = r.config) == null ? void 0 : f.controlPlaneId) || "") : r.config.app === "kongManager" && (x = x.replace(/\/{workspace}/gi, (v = r.config) != null && v.workspace ? `/${r.config.workspace}` : "")), r.editId ? (x = x.replace(/{id}/gi, r.editId), x) : (x = x.replace(/\/{id}/gi, ""), x);
|
|
3373
|
+
}), b = () => {
|
|
3374
|
+
y.value = !y.value;
|
|
3377
3375
|
}, k = () => {
|
|
3376
|
+
r.config.cancelRoute ? o.push(r.config.cancelRoute) : A();
|
|
3377
|
+
}, A = () => {
|
|
3378
3378
|
i("cancel");
|
|
3379
3379
|
}, B = () => {
|
|
3380
|
-
|
|
3381
|
-
},
|
|
3380
|
+
m.value || i("submit");
|
|
3381
|
+
}, P = N([
|
|
3382
3382
|
{
|
|
3383
3383
|
title: a("baseForm.configuration.json"),
|
|
3384
3384
|
hash: "#json"
|
|
@@ -3388,37 +3388,37 @@ ${l.value}
|
|
|
3388
3388
|
hash: "#yaml"
|
|
3389
3389
|
}
|
|
3390
3390
|
]);
|
|
3391
|
-
r.config.app === "konnect" && r.entityType !== $e.Other &&
|
|
3391
|
+
r.config.app === "konnect" && r.entityType !== $e.Other && P.value.splice(1, 0, {
|
|
3392
3392
|
title: a("baseForm.configuration.terraform"),
|
|
3393
3393
|
hash: "#terraform"
|
|
3394
3394
|
});
|
|
3395
|
-
const
|
|
3396
|
-
return (r.config.app === "kongManager" || r.config.enableDeckTab) &&
|
|
3395
|
+
const ee = vi.includes(r.entityType);
|
|
3396
|
+
return (r.config.app === "kongManager" || r.config.enableDeckTab) && ee && P.value.push({
|
|
3397
3397
|
title: a("baseForm.configuration.deck"),
|
|
3398
3398
|
hash: "#deck"
|
|
3399
|
-
}), be(() =>
|
|
3399
|
+
}), be(() => c.value, (x) => {
|
|
3400
3400
|
i("loading", x);
|
|
3401
3401
|
}, { immediate: !0 }), rt(async () => {
|
|
3402
3402
|
if (r.editId)
|
|
3403
3403
|
try {
|
|
3404
|
-
u.value = !1,
|
|
3405
|
-
const { data: x } = await s.get(
|
|
3404
|
+
u.value = !1, c.value = !0;
|
|
3405
|
+
const { data: x } = await s.get(h.value);
|
|
3406
3406
|
i("fetch:success", x);
|
|
3407
3407
|
} catch (x) {
|
|
3408
3408
|
const f = l(x);
|
|
3409
|
-
|
|
3409
|
+
p.value = f.startsWith("code") ? a("baseForm.errors.edit") : f, u.value = !0, i("fetch:error", x);
|
|
3410
3410
|
} finally {
|
|
3411
|
-
|
|
3411
|
+
c.value = !1;
|
|
3412
3412
|
}
|
|
3413
3413
|
}), t({
|
|
3414
|
-
viewConfig:
|
|
3415
|
-
formCancel:
|
|
3414
|
+
viewConfig: b,
|
|
3415
|
+
formCancel: A,
|
|
3416
3416
|
formSubmit: B
|
|
3417
3417
|
}), (x, f) => {
|
|
3418
|
-
const
|
|
3418
|
+
const v = U("KSkeleton"), C = U("KEmptyState"), Y = U("KAlert"), G = U("KButton"), E = U("KTabs"), O = U("KSlideout");
|
|
3419
3419
|
return g(), K(je(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3420
3420
|
default: w(() => [
|
|
3421
|
-
|
|
3421
|
+
c.value ? (g(), K(v, {
|
|
3422
3422
|
key: 0,
|
|
3423
3423
|
type: "form"
|
|
3424
3424
|
})) : u.value ? (g(), K(C, {
|
|
@@ -3426,21 +3426,21 @@ ${l.value}
|
|
|
3426
3426
|
"action-button-text": _(a)("baseForm.actions.back"),
|
|
3427
3427
|
"data-testid": "form-fetch-error",
|
|
3428
3428
|
"icon-variant": "error",
|
|
3429
|
-
onClickAction:
|
|
3429
|
+
onClickAction: k
|
|
3430
3430
|
}, {
|
|
3431
3431
|
default: w(() => [
|
|
3432
|
-
L("h3", null, I(
|
|
3432
|
+
L("h3", null, I(p.value), 1)
|
|
3433
3433
|
]),
|
|
3434
3434
|
_: 1
|
|
3435
3435
|
}, 8, ["action-button-text"])) : (g(), $("form", {
|
|
3436
3436
|
key: 2,
|
|
3437
3437
|
"data-testid": "form-content",
|
|
3438
3438
|
novalidate: r.noValidate,
|
|
3439
|
-
onReset: Re(
|
|
3439
|
+
onReset: Re(A, ["prevent"]),
|
|
3440
3440
|
onSubmit: Re(B, ["prevent"])
|
|
3441
3441
|
}, [
|
|
3442
|
-
|
|
3443
|
-
e.errorMessage ? (g(), K(
|
|
3442
|
+
j(x.$slots, "default", {}, void 0, !0),
|
|
3443
|
+
e.errorMessage ? (g(), K(Y, {
|
|
3444
3444
|
key: 0,
|
|
3445
3445
|
appearance: "danger",
|
|
3446
3446
|
"data-testid": "form-error",
|
|
@@ -3455,38 +3455,38 @@ ${l.value}
|
|
|
3455
3455
|
class: fe(["form-actions", { "form-actions-reverted": e.alignActionButtonToLeft }]),
|
|
3456
3456
|
"data-testid": "form-actions"
|
|
3457
3457
|
}, [
|
|
3458
|
-
|
|
3459
|
-
R(
|
|
3458
|
+
j(x.$slots, "form-actions", {}, () => [
|
|
3459
|
+
R(G, {
|
|
3460
3460
|
appearance: "tertiary",
|
|
3461
|
-
"data-testid": `${e.entityType}-${
|
|
3462
|
-
onClick: f[0] || (f[0] = (
|
|
3461
|
+
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-view-configuration`,
|
|
3462
|
+
onClick: f[0] || (f[0] = (V) => b())
|
|
3463
3463
|
}, {
|
|
3464
3464
|
default: w(() => [
|
|
3465
|
-
|
|
3465
|
+
q(I(y.value ? _(a)("baseForm.actions.hideConfiguration") : _(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3466
3466
|
]),
|
|
3467
3467
|
_: 1
|
|
3468
3468
|
}, 8, ["data-testid"]),
|
|
3469
|
-
R(
|
|
3469
|
+
R(G, {
|
|
3470
3470
|
appearance: "secondary",
|
|
3471
|
-
"data-testid": `${e.entityType}-${
|
|
3471
|
+
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-cancel`,
|
|
3472
3472
|
disabled: e.isReadonly,
|
|
3473
3473
|
type: "reset",
|
|
3474
|
-
onClick: f[1] || (f[1] = (
|
|
3474
|
+
onClick: f[1] || (f[1] = (V) => !!e.actionTeleportTarget && A())
|
|
3475
3475
|
}, {
|
|
3476
3476
|
default: w(() => [
|
|
3477
|
-
|
|
3477
|
+
q(I(e.cancelButtonText ?? _(a)("baseForm.actions.cancel")), 1)
|
|
3478
3478
|
]),
|
|
3479
3479
|
_: 1
|
|
3480
3480
|
}, 8, ["data-testid", "disabled"]),
|
|
3481
|
-
R(
|
|
3481
|
+
R(G, {
|
|
3482
3482
|
appearance: "primary",
|
|
3483
|
-
"data-testid": `${e.entityType}-${
|
|
3484
|
-
disabled:
|
|
3483
|
+
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-submit`,
|
|
3484
|
+
disabled: m.value,
|
|
3485
3485
|
type: "submit",
|
|
3486
|
-
onClick: f[2] || (f[2] = (
|
|
3486
|
+
onClick: f[2] || (f[2] = (V) => !!e.actionTeleportTarget && B())
|
|
3487
3487
|
}, {
|
|
3488
3488
|
default: w(() => [
|
|
3489
|
-
|
|
3489
|
+
q(I(e.saveButtonText ?? _(a)("baseForm.actions.save")), 1)
|
|
3490
3490
|
]),
|
|
3491
3491
|
_: 1
|
|
3492
3492
|
}, 8, ["data-testid", "disabled"])
|
|
@@ -3500,25 +3500,25 @@ ${l.value}
|
|
|
3500
3500
|
"has-overlay": !1,
|
|
3501
3501
|
"offset-top": e.slidoutTopOffset,
|
|
3502
3502
|
title: _(a)("baseForm.configuration.title"),
|
|
3503
|
-
visible:
|
|
3504
|
-
onClose: f[4] || (f[4] = (
|
|
3503
|
+
visible: y.value,
|
|
3504
|
+
onClose: f[4] || (f[4] = (V) => b())
|
|
3505
3505
|
}, {
|
|
3506
3506
|
default: w(() => [
|
|
3507
3507
|
L("div", null, [
|
|
3508
|
-
|
|
3509
|
-
|
|
3508
|
+
j(x.$slots, "configuration-slideout-message", {}, () => [
|
|
3509
|
+
q(I(_(a)("baseForm.configuration.message")), 1)
|
|
3510
3510
|
], !0)
|
|
3511
3511
|
]),
|
|
3512
3512
|
R(E, {
|
|
3513
3513
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3514
|
-
tabs:
|
|
3515
|
-
onChange: f[3] || (f[3] = (
|
|
3514
|
+
tabs: P.value,
|
|
3515
|
+
onChange: f[3] || (f[3] = (V) => i("codeBlockTabChange", V.replace("#", "")))
|
|
3516
3516
|
}, {
|
|
3517
3517
|
json: w(() => [
|
|
3518
3518
|
R(rn, {
|
|
3519
3519
|
config: e.config,
|
|
3520
3520
|
"entity-record": r.formFields,
|
|
3521
|
-
"fetcher-url":
|
|
3521
|
+
"fetcher-url": h.value,
|
|
3522
3522
|
"request-method": r.editId ? "put" : "post"
|
|
3523
3523
|
}, null, 8, ["config", "entity-record", "fetcher-url", "request-method"])
|
|
3524
3524
|
]),
|
|
@@ -3555,7 +3555,7 @@ ${l.value}
|
|
|
3555
3555
|
});
|
|
3556
3556
|
};
|
|
3557
3557
|
}
|
|
3558
|
-
}), Os = /* @__PURE__ */ le(dl, [["__scopeId", "data-v-7cbcaad8"]]), fl = ["data-truncate"], pl = /* @__PURE__ */
|
|
3558
|
+
}), Os = /* @__PURE__ */ le(dl, [["__scopeId", "data-v-7cbcaad8"]]), fl = ["data-truncate"], pl = /* @__PURE__ */ z({
|
|
3559
3559
|
__name: "EntityBaseTableCell",
|
|
3560
3560
|
props: {
|
|
3561
3561
|
keyName: {
|
|
@@ -3573,68 +3573,68 @@ ${l.value}
|
|
|
3573
3573
|
},
|
|
3574
3574
|
setup(e) {
|
|
3575
3575
|
const t = e, n = S(() => {
|
|
3576
|
-
var
|
|
3577
|
-
return ((
|
|
3576
|
+
var b;
|
|
3577
|
+
return ((b = t.rowEl) == null ? void 0 : b.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3578
3578
|
}), i = S(() => {
|
|
3579
|
-
var
|
|
3580
|
-
return ((
|
|
3579
|
+
var b;
|
|
3580
|
+
return ((b = n.value) == null ? void 0 : b.querySelector('[data-truncate="true"]')) || null;
|
|
3581
3581
|
}), r = S(() => {
|
|
3582
|
-
var
|
|
3583
|
-
const
|
|
3584
|
-
return
|
|
3582
|
+
var k, A;
|
|
3583
|
+
const b = (k = t.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3584
|
+
return b ? ((A = b[0]) == null ? void 0 : A.getAttribute("data-testid")) === t.keyName : !0;
|
|
3585
3585
|
}), o = S(() => r.value || t.tooltip);
|
|
3586
3586
|
let a;
|
|
3587
3587
|
const l = () => {
|
|
3588
3588
|
a && (a.disconnect(), a = void 0);
|
|
3589
3589
|
}, s = () => {
|
|
3590
|
-
var
|
|
3591
|
-
let
|
|
3590
|
+
var k, A, B;
|
|
3591
|
+
let b = ((k = n.value) == null ? void 0 : k.clientWidth) || 0;
|
|
3592
3592
|
if (n.value && "getComputedStyle" in window) {
|
|
3593
|
-
const
|
|
3594
|
-
|
|
3593
|
+
const P = window.getComputedStyle(n.value);
|
|
3594
|
+
b -= (parseFloat(P.paddingLeft) || 0) + (parseFloat(P.paddingRight) || 0);
|
|
3595
3595
|
}
|
|
3596
|
-
|
|
3597
|
-
},
|
|
3598
|
-
|
|
3599
|
-
(
|
|
3596
|
+
d.value = ((A = i.value) == null ? void 0 : A.getBoundingClientRect().width) || 0, u.value = b, p.value = ((B = c.value) == null ? void 0 : B.innerText) || "";
|
|
3597
|
+
}, c = N({}), d = N(0), u = N(0), p = N(""), m = S(() => [i.value, n.value]), y = be(
|
|
3598
|
+
m,
|
|
3599
|
+
(b) => {
|
|
3600
3600
|
if (o.value && (l(), "ResizeObserver" in window && window)) {
|
|
3601
|
-
a = new ResizeObserver((
|
|
3601
|
+
a = new ResizeObserver((k) => {
|
|
3602
3602
|
window.requestAnimationFrame(() => {
|
|
3603
|
-
!Array.isArray(
|
|
3603
|
+
!Array.isArray(k) || !k.length || s();
|
|
3604
3604
|
});
|
|
3605
3605
|
});
|
|
3606
|
-
for (const
|
|
3607
|
-
|
|
3606
|
+
for (const k of b)
|
|
3607
|
+
k && a.observe(k);
|
|
3608
3608
|
}
|
|
3609
3609
|
},
|
|
3610
3610
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3611
|
-
),
|
|
3611
|
+
), h = S(() => o.value ? d.value > u.value : !1);
|
|
3612
3612
|
return it(() => {
|
|
3613
3613
|
s();
|
|
3614
3614
|
}), ei(() => {
|
|
3615
|
-
|
|
3616
|
-
}), (
|
|
3617
|
-
const
|
|
3615
|
+
y();
|
|
3616
|
+
}), (b, k) => {
|
|
3617
|
+
const A = U("KTooltip");
|
|
3618
3618
|
return g(), $("span", {
|
|
3619
3619
|
ref_key: "contentRef",
|
|
3620
|
-
ref:
|
|
3620
|
+
ref: c,
|
|
3621
3621
|
class: "content-wrapper"
|
|
3622
3622
|
}, [
|
|
3623
3623
|
o.value ? (g(), $("span", {
|
|
3624
3624
|
key: 0,
|
|
3625
3625
|
"data-truncate": o.value || void 0
|
|
3626
3626
|
}, [
|
|
3627
|
-
R(
|
|
3627
|
+
R(A, {
|
|
3628
3628
|
"max-width": "300",
|
|
3629
3629
|
placement: "bottom-start",
|
|
3630
|
-
text:
|
|
3630
|
+
text: h.value ? p.value : ""
|
|
3631
3631
|
}, {
|
|
3632
3632
|
default: w(() => [
|
|
3633
|
-
|
|
3633
|
+
j(b.$slots, "default", {}, void 0, !0)
|
|
3634
3634
|
]),
|
|
3635
3635
|
_: 3
|
|
3636
3636
|
}, 8, ["text"])
|
|
3637
|
-
], 8, fl)) :
|
|
3637
|
+
], 8, fl)) : j(b.$slots, "default", { key: 1 }, void 0, !0)
|
|
3638
3638
|
], 512);
|
|
3639
3639
|
};
|
|
3640
3640
|
}
|
|
@@ -3644,7 +3644,7 @@ ${l.value}
|
|
|
3644
3644
|
}, yl = {
|
|
3645
3645
|
key: 0,
|
|
3646
3646
|
class: "hidden"
|
|
3647
|
-
}, vl = /* @__PURE__ */
|
|
3647
|
+
}, vl = /* @__PURE__ */ z({
|
|
3648
3648
|
__name: "EntityBaseTable",
|
|
3649
3649
|
props: {
|
|
3650
3650
|
// table header configuration
|
|
@@ -3789,8 +3789,8 @@ ${l.value}
|
|
|
3789
3789
|
},
|
|
3790
3790
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked", "state"],
|
|
3791
3791
|
setup(e, { emit: t }) {
|
|
3792
|
-
const n = e, i = t, { i18n: { t: r } } =
|
|
3793
|
-
var f,
|
|
3792
|
+
const n = e, i = t, { i18n: { t: r } } = J.useI18n(), o = S(() => {
|
|
3793
|
+
var f, v;
|
|
3794
3794
|
return typeof n.errorMessage == "string" ? {
|
|
3795
3795
|
hasError: !!n.errorMessage,
|
|
3796
3796
|
title: n.errorMessage,
|
|
@@ -3798,17 +3798,17 @@ ${l.value}
|
|
|
3798
3798
|
} : {
|
|
3799
3799
|
hasError: !!n.errorMessage,
|
|
3800
3800
|
title: (f = n.errorMessage) == null ? void 0 : f.title,
|
|
3801
|
-
message: (
|
|
3801
|
+
message: (v = n.errorMessage) == null ? void 0 : v.message
|
|
3802
3802
|
};
|
|
3803
3803
|
}), a = S(() => n.cacheIdentifier || n.preferencesStorageKey), l = S(() => {
|
|
3804
3804
|
const f = [];
|
|
3805
3805
|
return Object.keys(n.tableHeaders).forEach((C) => {
|
|
3806
|
-
const
|
|
3806
|
+
const Y = n.tableHeaders[C];
|
|
3807
3807
|
f.push({
|
|
3808
|
-
label:
|
|
3808
|
+
label: Y.label ?? C,
|
|
3809
3809
|
key: C,
|
|
3810
|
-
sortable:
|
|
3811
|
-
hidable:
|
|
3810
|
+
sortable: Y.sortable ?? !1,
|
|
3811
|
+
hidable: Y.hidable ?? !0
|
|
3812
3812
|
});
|
|
3813
3813
|
}), n.enableEntityActions && f.push({
|
|
3814
3814
|
key: "actions",
|
|
@@ -3818,47 +3818,47 @@ ${l.value}
|
|
|
3818
3818
|
"data-rowid": f.id,
|
|
3819
3819
|
"data-testid": f.name,
|
|
3820
3820
|
...n.rowAttributes(f)
|
|
3821
|
-
}),
|
|
3822
|
-
var
|
|
3823
|
-
return (
|
|
3821
|
+
}), c = N({}), d = (f) => {
|
|
3822
|
+
var v;
|
|
3823
|
+
return (v = c.value) == null ? void 0 : v.$el.querySelector(`[data-rowid="${f.id}"]`);
|
|
3824
3824
|
}, u = (f) => {
|
|
3825
|
-
const
|
|
3825
|
+
const v = {
|
|
3826
3826
|
"data-testid": f.headerKey,
|
|
3827
3827
|
...n.cellAttributes(f)
|
|
3828
3828
|
};
|
|
3829
|
-
return f.colIndex === 0 && (
|
|
3829
|
+
return f.colIndex === 0 && (v.style = {
|
|
3830
3830
|
maxWidth: "250px",
|
|
3831
3831
|
overflowX: "hidden",
|
|
3832
3832
|
textOverflow: "ellipsis"
|
|
3833
|
-
}),
|
|
3834
|
-
},
|
|
3835
|
-
|
|
3836
|
-
},
|
|
3837
|
-
i("empty-state-cta-clicked"),
|
|
3838
|
-
},
|
|
3833
|
+
}), v;
|
|
3834
|
+
}, p = (f) => {
|
|
3835
|
+
A(f), i("state", f);
|
|
3836
|
+
}, m = () => {
|
|
3837
|
+
i("empty-state-cta-clicked"), y();
|
|
3838
|
+
}, y = () => {
|
|
3839
3839
|
i("clear-search-input");
|
|
3840
|
-
},
|
|
3841
|
-
i("click:row",
|
|
3842
|
-
}),
|
|
3840
|
+
}, h = S(() => n.disableRowClick ? void 0 : (f, v) => {
|
|
3841
|
+
i("click:row", v);
|
|
3842
|
+
}), b = (f) => {
|
|
3843
3843
|
i("sort", f);
|
|
3844
|
-
}, { hideTableToolbar:
|
|
3845
|
-
const f =
|
|
3844
|
+
}, { hideTableToolbar: k, handleStateChange: A } = J.useTableState(() => n.query), { setTablePreferences: B, getTablePreferences: P } = _i(), ee = N(P(a.value, n.defaultTablePreferences)), M = S(() => {
|
|
3845
|
+
const f = P(a.value);
|
|
3846
3846
|
return {
|
|
3847
3847
|
...n.initialFetcherParams,
|
|
3848
3848
|
...f
|
|
3849
3849
|
};
|
|
3850
3850
|
}), F = (f) => {
|
|
3851
|
-
|
|
3852
|
-
!("hidable" in
|
|
3851
|
+
ee.value = f, l.value.forEach((v) => {
|
|
3852
|
+
!("hidable" in v) || !ee.value.columnVisibility || v.hidable === !1 && (ee.value.columnVisibility[v.key] = !0);
|
|
3853
3853
|
}), a.value && B(a.value, f);
|
|
3854
3854
|
}, x = S(() => ({
|
|
3855
3855
|
disablePageJump: n.disablePaginationPageJump,
|
|
3856
3856
|
offset: n.paginationType === "offset",
|
|
3857
3857
|
...n.paginationAttributes
|
|
3858
3858
|
}));
|
|
3859
|
-
return (f,
|
|
3860
|
-
const C =
|
|
3861
|
-
return g(), K(
|
|
3859
|
+
return (f, v) => {
|
|
3860
|
+
const C = U("KTableData"), Y = U("KCard");
|
|
3861
|
+
return g(), K(Y, {
|
|
3862
3862
|
class: "kong-ui-entity-base-table",
|
|
3863
3863
|
title: e.title,
|
|
3864
3864
|
"title-tag": e.titleTag
|
|
@@ -3866,7 +3866,7 @@ ${l.value}
|
|
|
3866
3866
|
default: w(() => [
|
|
3867
3867
|
R(C, {
|
|
3868
3868
|
ref_key: "tableRefs",
|
|
3869
|
-
ref:
|
|
3869
|
+
ref: c,
|
|
3870
3870
|
"cache-identifier": a.value,
|
|
3871
3871
|
"cell-attrs": u,
|
|
3872
3872
|
"client-sort": e.enableClientSort,
|
|
@@ -3883,7 +3883,7 @@ ${l.value}
|
|
|
3883
3883
|
headers: l.value,
|
|
3884
3884
|
"hide-pagination": e.hidePagination,
|
|
3885
3885
|
"hide-pagination-when-optional": e.hidePaginationWhenOptional,
|
|
3886
|
-
"hide-toolbar": e.hideToolbar ?? _(
|
|
3886
|
+
"hide-toolbar": e.hideToolbar ?? _(k),
|
|
3887
3887
|
"initial-fetcher-params": M.value,
|
|
3888
3888
|
loading: e.isLoading,
|
|
3889
3889
|
"pagination-attributes": x.value,
|
|
@@ -3893,48 +3893,48 @@ ${l.value}
|
|
|
3893
3893
|
"search-input": e.query,
|
|
3894
3894
|
"sort-handler-function": e.enableClientSort ? e.sortHandlerFunction : void 0,
|
|
3895
3895
|
sortable: !e.disableSorting,
|
|
3896
|
-
"table-preferences":
|
|
3897
|
-
onEmptyStateActionClick:
|
|
3898
|
-
"onRow:click":
|
|
3899
|
-
onSort:
|
|
3900
|
-
onState:
|
|
3896
|
+
"table-preferences": ee.value,
|
|
3897
|
+
onEmptyStateActionClick: m,
|
|
3898
|
+
"onRow:click": h.value,
|
|
3899
|
+
onSort: v[0] || (v[0] = (G) => b(G)),
|
|
3900
|
+
onState: p,
|
|
3901
3901
|
"onUpdate:tablePreferences": F
|
|
3902
3902
|
}, ke({
|
|
3903
3903
|
toolbar: w(() => [
|
|
3904
3904
|
L("div", gl, [
|
|
3905
|
-
|
|
3905
|
+
j(f.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3906
3906
|
f.$slots["toolbar-button"] ? (g(), $("div", hl, [
|
|
3907
|
-
|
|
3907
|
+
j(f.$slots, "toolbar-button", {}, void 0, !0)
|
|
3908
3908
|
])) : D("", !0)
|
|
3909
3909
|
])
|
|
3910
3910
|
]),
|
|
3911
|
-
"action-items": w(({ row:
|
|
3912
|
-
|
|
3911
|
+
"action-items": w(({ row: G }) => [
|
|
3912
|
+
j(f.$slots, "actions", { row: G }, void 0, !0)
|
|
3913
3913
|
]),
|
|
3914
3914
|
_: 2
|
|
3915
3915
|
}, [
|
|
3916
3916
|
f.$slots["empty-state"] ? {
|
|
3917
3917
|
name: "empty-state",
|
|
3918
3918
|
fn: w(() => [
|
|
3919
|
-
|
|
3919
|
+
j(f.$slots, "empty-state", {}, void 0, !0)
|
|
3920
3920
|
]),
|
|
3921
3921
|
key: "0"
|
|
3922
3922
|
} : void 0,
|
|
3923
|
-
ce(e.tableHeaders, (
|
|
3923
|
+
ce(e.tableHeaders, (G, E) => ({
|
|
3924
3924
|
name: E,
|
|
3925
|
-
fn: w(({ row: O, rowValue:
|
|
3925
|
+
fn: w(({ row: O, rowValue: V }) => [
|
|
3926
3926
|
R(ml, {
|
|
3927
3927
|
"key-name": String(E),
|
|
3928
|
-
"row-el":
|
|
3929
|
-
tooltip:
|
|
3928
|
+
"row-el": d(O),
|
|
3929
|
+
tooltip: G.tooltip
|
|
3930
3930
|
}, {
|
|
3931
3931
|
default: w(() => [
|
|
3932
|
-
|
|
3932
|
+
j(f.$slots, E, {
|
|
3933
3933
|
row: O,
|
|
3934
3934
|
rowKey: e.rowKey,
|
|
3935
|
-
rowValue:
|
|
3935
|
+
rowValue: V
|
|
3936
3936
|
}, () => [
|
|
3937
|
-
|
|
3937
|
+
q(I(V), 1)
|
|
3938
3938
|
], !0)
|
|
3939
3939
|
]),
|
|
3940
3940
|
_: 2
|
|
@@ -3949,21 +3949,21 @@ ${l.value}
|
|
|
3949
3949
|
key: "1"
|
|
3950
3950
|
}
|
|
3951
3951
|
]), 1032, ["cache-identifier", "client-sort", "empty-state-action-message", "empty-state-action-route", "empty-state-icon-variant", "empty-state-message", "empty-state-title", "error", "error-state-message", "error-state-title", "fetcher", "fetcher-cache-key", "headers", "hide-pagination", "hide-pagination-when-optional", "hide-toolbar", "initial-fetcher-params", "loading", "pagination-attributes", "row-key", "search-input", "sort-handler-function", "sortable", "table-preferences", "onRow:click"]),
|
|
3952
|
-
f.$slots["outside-actions"] && _(
|
|
3953
|
-
|
|
3952
|
+
f.$slots["outside-actions"] && _(k) ? (g(), $("div", yl, [
|
|
3953
|
+
j(f.$slots, "outside-actions", {}, void 0, !0)
|
|
3954
3954
|
])) : D("", !0)
|
|
3955
3955
|
]),
|
|
3956
3956
|
_: 3
|
|
3957
3957
|
}, 8, ["title", "title-tag"]);
|
|
3958
3958
|
};
|
|
3959
3959
|
}
|
|
3960
|
-
}), Bs = /* @__PURE__ */ le(vl, [["__scopeId", "data-v-
|
|
3960
|
+
}), Bs = /* @__PURE__ */ le(vl, [["__scopeId", "data-v-09e101d4"]]), bl = {
|
|
3961
3961
|
key: 0,
|
|
3962
3962
|
class: "kong-ui-entity-delete-error"
|
|
3963
3963
|
}, kl = {
|
|
3964
3964
|
key: 1,
|
|
3965
3965
|
class: "description"
|
|
3966
|
-
}, Cl = /* @__PURE__ */
|
|
3966
|
+
}, Cl = /* @__PURE__ */ z({
|
|
3967
3967
|
__name: "EntityDeleteModal",
|
|
3968
3968
|
props: {
|
|
3969
3969
|
visible: {
|
|
@@ -4002,13 +4002,13 @@ ${l.value}
|
|
|
4002
4002
|
},
|
|
4003
4003
|
emits: ["cancel", "proceed"],
|
|
4004
4004
|
setup(e, { emit: t }) {
|
|
4005
|
-
const { i18nT: n } =
|
|
4005
|
+
const { i18nT: n } = J.useI18n(), i = e, r = t, o = S(() => i.needConfirm ? i.entityName : ""), a = () => {
|
|
4006
4006
|
r("cancel");
|
|
4007
4007
|
}, l = () => {
|
|
4008
4008
|
r("proceed");
|
|
4009
4009
|
};
|
|
4010
|
-
return (s,
|
|
4011
|
-
const
|
|
4010
|
+
return (s, c) => {
|
|
4011
|
+
const d = U("KAlert"), u = U("KPrompt");
|
|
4012
4012
|
return g(), K(u, {
|
|
4013
4013
|
"action-button-appearance": "danger",
|
|
4014
4014
|
"action-button-disabled": e.actionPending,
|
|
@@ -4022,9 +4022,9 @@ ${l.value}
|
|
|
4022
4022
|
}, {
|
|
4023
4023
|
default: w(() => [
|
|
4024
4024
|
e.error ? (g(), $("div", bl, [
|
|
4025
|
-
R(
|
|
4025
|
+
R(d, { appearance: "danger" }, {
|
|
4026
4026
|
default: w(() => [
|
|
4027
|
-
|
|
4027
|
+
q(I(e.error), 1)
|
|
4028
4028
|
]),
|
|
4029
4029
|
_: 1
|
|
4030
4030
|
})
|
|
@@ -4035,7 +4035,7 @@ ${l.value}
|
|
|
4035
4035
|
tag: "p"
|
|
4036
4036
|
}, ke({
|
|
4037
4037
|
entityType: w(() => [
|
|
4038
|
-
|
|
4038
|
+
q(I(i.entityType), 1)
|
|
4039
4039
|
]),
|
|
4040
4040
|
_: 2
|
|
4041
4041
|
}, [
|
|
@@ -4048,7 +4048,7 @@ ${l.value}
|
|
|
4048
4048
|
} : void 0
|
|
4049
4049
|
]), 1032, ["keypath"]),
|
|
4050
4050
|
i.description || s.$slots.description ? (g(), $("div", kl, [
|
|
4051
|
-
|
|
4051
|
+
j(s.$slots, "description", {}, () => [
|
|
4052
4052
|
L("p", null, I(i.description), 1)
|
|
4053
4053
|
], !0)
|
|
4054
4054
|
])) : D("", !0)
|
|
@@ -4071,7 +4071,7 @@ ${l.value}
|
|
|
4071
4071
|
width: "20",
|
|
4072
4072
|
x: "0",
|
|
4073
4073
|
y: "0"
|
|
4074
|
-
}, _l = ["fill"], wl = { mask: "url(#mask0_180_20349)" }, Sl = ["fill"], jt = /* @__PURE__ */
|
|
4074
|
+
}, _l = ["fill"], wl = { mask: "url(#mask0_180_20349)" }, Sl = ["fill"], jt = /* @__PURE__ */ z({
|
|
4075
4075
|
__name: "IconFilter",
|
|
4076
4076
|
props: {
|
|
4077
4077
|
color: {
|
|
@@ -4099,7 +4099,7 @@ ${l.value}
|
|
|
4099
4099
|
}), $l = {
|
|
4100
4100
|
key: 1,
|
|
4101
4101
|
class: "kong-ui-entity-filter"
|
|
4102
|
-
}, Tl = { class: "kong-ui-entity-filter-menu" }, El = ["data-testid"], Il = ["onClick", "onKeydown"], Fl = { class: "menu-item-indicator" }, Ol = { class: "menu-item-body" }, Bl = ["for"], Ll = { class: "menu-item-buttons" }, Rl = { class: "filter-clear-button-container" }, Kl = /* @__PURE__ */
|
|
4102
|
+
}, Tl = { class: "kong-ui-entity-filter-menu" }, El = ["data-testid"], Il = ["onClick", "onKeydown"], Fl = { class: "menu-item-indicator" }, Ol = { class: "menu-item-body" }, Bl = ["for"], Ll = { class: "menu-item-buttons" }, Rl = { class: "filter-clear-button-container" }, Kl = /* @__PURE__ */ z({
|
|
4103
4103
|
__name: "EntityFilter",
|
|
4104
4104
|
props: {
|
|
4105
4105
|
// filter config, either exact match or fuzzy match
|
|
@@ -4119,12 +4119,12 @@ ${l.value}
|
|
|
4119
4119
|
},
|
|
4120
4120
|
emits: ["update:modelValue"],
|
|
4121
4121
|
setup(e, { emit: t }) {
|
|
4122
|
-
const { i18n: { t: n } } =
|
|
4122
|
+
const { i18n: { t: n } } = J.useI18n(), i = e, r = t, o = N(!1), a = N({}), l = N(/* @__PURE__ */ new Set()), s = S(() => {
|
|
4123
4123
|
const M = [];
|
|
4124
4124
|
return new URLSearchParams(i.modelValue).forEach((F, x) => {
|
|
4125
4125
|
F !== "" && M.push(x);
|
|
4126
4126
|
}), M;
|
|
4127
|
-
}),
|
|
4127
|
+
}), c = S(() => {
|
|
4128
4128
|
const M = i.config.fields;
|
|
4129
4129
|
return Object.keys(M).filter((F) => {
|
|
4130
4130
|
var x;
|
|
@@ -4140,40 +4140,40 @@ ${l.value}
|
|
|
4140
4140
|
a.value[x] = F;
|
|
4141
4141
|
});
|
|
4142
4142
|
});
|
|
4143
|
-
const
|
|
4143
|
+
const d = () => {
|
|
4144
4144
|
o.value = !o.value;
|
|
4145
4145
|
}, u = (M) => {
|
|
4146
4146
|
l.value.has(M) ? l.value.delete(M) : l.value.add(M);
|
|
4147
|
-
},
|
|
4147
|
+
}, p = (M) => {
|
|
4148
4148
|
r("update:modelValue", M);
|
|
4149
|
-
},
|
|
4150
|
-
|
|
4151
|
-
},
|
|
4149
|
+
}, m = () => {
|
|
4150
|
+
p("");
|
|
4151
|
+
}, y = (M) => `filter-${M}`, h = (M) => {
|
|
4152
4152
|
var F, x;
|
|
4153
4153
|
return (((x = (F = i.config.schema) == null ? void 0 : F[M]) == null ? void 0 : x.values) ?? []).map((f) => typeof f == "string" ? { value: f, label: f } : f);
|
|
4154
|
-
},
|
|
4154
|
+
}, b = (M) => {
|
|
4155
4155
|
var F, x;
|
|
4156
4156
|
return ((x = (F = i.config.schema) == null ? void 0 : F[M]) == null ? void 0 : x.type) ?? "text";
|
|
4157
|
-
},
|
|
4157
|
+
}, k = (M) => {
|
|
4158
4158
|
a.value = {
|
|
4159
4159
|
...a.value,
|
|
4160
4160
|
[M]: ""
|
|
4161
4161
|
}, B();
|
|
4162
|
-
},
|
|
4162
|
+
}, A = () => {
|
|
4163
4163
|
a.value = {}, B(!0);
|
|
4164
4164
|
}, B = (M = !1) => {
|
|
4165
4165
|
const F = Object.keys(a.value).reduce((x, f) => (a.value[f] && (x[f] = `${a.value[f]}`), x), {});
|
|
4166
4166
|
M && (o.value = !1), r("update:modelValue", new URLSearchParams(F).toString());
|
|
4167
|
-
},
|
|
4167
|
+
}, P = (M) => {
|
|
4168
4168
|
var F, x;
|
|
4169
4169
|
return !!((x = (F = i.config.schema) == null ? void 0 : F[M]) != null && x.filterFunction);
|
|
4170
|
-
},
|
|
4170
|
+
}, ee = (M, F) => {
|
|
4171
4171
|
var f;
|
|
4172
4172
|
const x = (f = i.config.schema) == null ? void 0 : f[M];
|
|
4173
4173
|
return (x == null ? void 0 : x.filterFunction) === void 0 ? !0 : x.filterFunction(F);
|
|
4174
4174
|
};
|
|
4175
4175
|
return (M, F) => {
|
|
4176
|
-
const x =
|
|
4176
|
+
const x = U("KInput"), f = U("KButton"), v = U("KSelect");
|
|
4177
4177
|
return e.config.isExactMatch ? (g(), K(x, {
|
|
4178
4178
|
key: 0,
|
|
4179
4179
|
autocomplete: "off",
|
|
@@ -4181,7 +4181,7 @@ ${l.value}
|
|
|
4181
4181
|
"data-testid": "search-input",
|
|
4182
4182
|
"model-value": e.modelValue,
|
|
4183
4183
|
placeholder: e.config.placeholder,
|
|
4184
|
-
"onUpdate:modelValue":
|
|
4184
|
+
"onUpdate:modelValue": p
|
|
4185
4185
|
}, {
|
|
4186
4186
|
before: w(() => [
|
|
4187
4187
|
R(jt)
|
|
@@ -4191,7 +4191,7 @@ ${l.value}
|
|
|
4191
4191
|
class: "kong-ui-entity-filter-clear",
|
|
4192
4192
|
role: "button",
|
|
4193
4193
|
tabindex: "0",
|
|
4194
|
-
onClick:
|
|
4194
|
+
onClick: m
|
|
4195
4195
|
}, null, 512), [
|
|
4196
4196
|
[xe, e.modelValue !== ""]
|
|
4197
4197
|
])
|
|
@@ -4201,23 +4201,23 @@ ${l.value}
|
|
|
4201
4201
|
R(f, {
|
|
4202
4202
|
appearance: "tertiary",
|
|
4203
4203
|
"data-testid": "filter-button",
|
|
4204
|
-
onClick:
|
|
4204
|
+
onClick: d
|
|
4205
4205
|
}, {
|
|
4206
4206
|
default: w(() => [
|
|
4207
4207
|
R(jt),
|
|
4208
|
-
|
|
4208
|
+
q(" " + I(_(n)("filter.filterButtonText")) + " " + I(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
4209
4209
|
]),
|
|
4210
4210
|
_: 1
|
|
4211
4211
|
}),
|
|
4212
4212
|
Ce(L("div", {
|
|
4213
4213
|
class: "kong-ui-entity-filter-backdrop",
|
|
4214
|
-
onClick:
|
|
4214
|
+
onClick: d
|
|
4215
4215
|
}, null, 512), [
|
|
4216
4216
|
[xe, o.value]
|
|
4217
4217
|
]),
|
|
4218
4218
|
Ce(L("div", Tl, [
|
|
4219
|
-
(g(!0), $(ue, null, ce(
|
|
4220
|
-
var
|
|
4219
|
+
(g(!0), $(ue, null, ce(c.value, (C) => {
|
|
4220
|
+
var Y, G;
|
|
4221
4221
|
return g(), $("div", {
|
|
4222
4222
|
key: C.value,
|
|
4223
4223
|
class: "kong-ui-entity-filter-menu-item",
|
|
@@ -4230,7 +4230,7 @@ ${l.value}
|
|
|
4230
4230
|
onClick: (E) => u(C.value),
|
|
4231
4231
|
onKeydown: ti((E) => u(C.value), ["enter"])
|
|
4232
4232
|
}, [
|
|
4233
|
-
|
|
4233
|
+
q(I(C.label) + " ", 1),
|
|
4234
4234
|
Ce(L("span", Fl, null, 512), [
|
|
4235
4235
|
[xe, s.value.includes(C.value)]
|
|
4236
4236
|
]),
|
|
@@ -4242,25 +4242,25 @@ ${l.value}
|
|
|
4242
4242
|
Ce(L("div", Ol, [
|
|
4243
4243
|
L("label", {
|
|
4244
4244
|
class: "menu-item-label",
|
|
4245
|
-
for:
|
|
4245
|
+
for: y(C.value)
|
|
4246
4246
|
}, I(_(n)("filter.fieldLabel")), 9, Bl),
|
|
4247
|
-
((
|
|
4247
|
+
((G = (Y = e.config.schema) == null ? void 0 : Y[C.value]) == null ? void 0 : G.type) === "select" ? (g(), K(v, {
|
|
4248
4248
|
key: 0,
|
|
4249
|
-
id:
|
|
4249
|
+
id: y(C.value),
|
|
4250
4250
|
modelValue: a.value[C.value],
|
|
4251
4251
|
"onUpdate:modelValue": (E) => a.value[C.value] = E,
|
|
4252
|
-
"enable-filtering":
|
|
4253
|
-
"filter-function": (E) =>
|
|
4254
|
-
items:
|
|
4252
|
+
"enable-filtering": P(C.value),
|
|
4253
|
+
"filter-function": (E) => ee(C.value, E),
|
|
4254
|
+
items: h(C.value),
|
|
4255
4255
|
placeholder: _(n)("filter.selectPlaceholder")
|
|
4256
4256
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "enable-filtering", "filter-function", "items", "placeholder"])) : (g(), K(x, {
|
|
4257
4257
|
key: 1,
|
|
4258
|
-
id:
|
|
4258
|
+
id: y(C.value),
|
|
4259
4259
|
modelValue: a.value[C.value],
|
|
4260
4260
|
"onUpdate:modelValue": (E) => a.value[C.value] = E,
|
|
4261
4261
|
autocomplete: "off",
|
|
4262
4262
|
placeholder: _(n)("filter.inputPlaceholder"),
|
|
4263
|
-
type:
|
|
4263
|
+
type: b(C.value)
|
|
4264
4264
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4265
4265
|
], 512), [
|
|
4266
4266
|
[xe, l.value.has(C.value)]
|
|
@@ -4273,7 +4273,7 @@ ${l.value}
|
|
|
4273
4273
|
onClick: F[0] || (F[0] = (E) => B(!0))
|
|
4274
4274
|
}, {
|
|
4275
4275
|
default: w(() => [
|
|
4276
|
-
|
|
4276
|
+
q(I(_(n)("filter.applyButtonText")), 1)
|
|
4277
4277
|
]),
|
|
4278
4278
|
_: 1
|
|
4279
4279
|
}),
|
|
@@ -4281,10 +4281,10 @@ ${l.value}
|
|
|
4281
4281
|
appearance: "tertiary",
|
|
4282
4282
|
"data-testid": "clear-filter",
|
|
4283
4283
|
size: "small",
|
|
4284
|
-
onClick: (E) =>
|
|
4284
|
+
onClick: (E) => k(C.value)
|
|
4285
4285
|
}, {
|
|
4286
4286
|
default: w(() => [
|
|
4287
|
-
|
|
4287
|
+
q(I(_(n)("filter.clearButtonText")), 1)
|
|
4288
4288
|
]),
|
|
4289
4289
|
_: 1
|
|
4290
4290
|
}, 8, ["onClick"])
|
|
@@ -4297,10 +4297,10 @@ ${l.value}
|
|
|
4297
4297
|
R(f, {
|
|
4298
4298
|
appearance: "tertiary",
|
|
4299
4299
|
size: "small",
|
|
4300
|
-
onClick:
|
|
4300
|
+
onClick: A
|
|
4301
4301
|
}, {
|
|
4302
4302
|
default: w(() => [
|
|
4303
|
-
|
|
4303
|
+
q(I(_(n)("filter.clearAllButtonText")), 1)
|
|
4304
4304
|
]),
|
|
4305
4305
|
_: 1
|
|
4306
4306
|
})
|
|
@@ -4311,7 +4311,7 @@ ${l.value}
|
|
|
4311
4311
|
]));
|
|
4312
4312
|
};
|
|
4313
4313
|
}
|
|
4314
|
-
}), Rs = /* @__PURE__ */ le(Kl, [["__scopeId", "data-v-084f7978"]]), Ks = /* @__PURE__ */
|
|
4314
|
+
}), Rs = /* @__PURE__ */ le(Kl, [["__scopeId", "data-v-084f7978"]]), Ks = /* @__PURE__ */ z({
|
|
4315
4315
|
__name: "EntityToggleModal",
|
|
4316
4316
|
props: {
|
|
4317
4317
|
visible: {
|
|
@@ -4343,11 +4343,11 @@ ${l.value}
|
|
|
4343
4343
|
},
|
|
4344
4344
|
emits: ["cancel", "proceed"],
|
|
4345
4345
|
setup(e, { emit: t }) {
|
|
4346
|
-
const { i18n: { t: n }, i18nT: i } =
|
|
4346
|
+
const { i18n: { t: n }, i18nT: i } = J.useI18n(), r = e, o = t, a = N(!1), l = S(
|
|
4347
4347
|
() => r.action === "enable" ? n("toggleModal.enable.title", { entityType: r.entityType }) : n("toggleModal.disable.title", { entityType: r.entityType })
|
|
4348
4348
|
), s = S(
|
|
4349
4349
|
() => r.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
4350
|
-
),
|
|
4350
|
+
), c = () => o("cancel"), d = async () => {
|
|
4351
4351
|
if (r.onConfirm) {
|
|
4352
4352
|
a.value = !0;
|
|
4353
4353
|
try {
|
|
@@ -4359,17 +4359,17 @@ ${l.value}
|
|
|
4359
4359
|
}
|
|
4360
4360
|
}
|
|
4361
4361
|
};
|
|
4362
|
-
return (u,
|
|
4363
|
-
const
|
|
4362
|
+
return (u, p) => {
|
|
4363
|
+
const m = U("KPrompt");
|
|
4364
4364
|
return g(), K(Wt, { to: "body" }, [
|
|
4365
|
-
R(
|
|
4365
|
+
R(m, {
|
|
4366
4366
|
"action-button-disabled": a.value,
|
|
4367
4367
|
"action-button-text": s.value,
|
|
4368
4368
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
4369
4369
|
title: l.value,
|
|
4370
4370
|
visible: e.visible,
|
|
4371
|
-
onCancel:
|
|
4372
|
-
onProceed:
|
|
4371
|
+
onCancel: c,
|
|
4372
|
+
onProceed: d
|
|
4373
4373
|
}, {
|
|
4374
4374
|
default: w(() => [
|
|
4375
4375
|
R(_(i), {
|
|
@@ -4377,7 +4377,7 @@ ${l.value}
|
|
|
4377
4377
|
scope: "global"
|
|
4378
4378
|
}, {
|
|
4379
4379
|
entityType: w(() => [
|
|
4380
|
-
|
|
4380
|
+
q(I(e.entityType), 1)
|
|
4381
4381
|
]),
|
|
4382
4382
|
entityName: w(() => [
|
|
4383
4383
|
L("strong", null, I(e.entityName), 1)
|
|
@@ -4390,7 +4390,7 @@ ${l.value}
|
|
|
4390
4390
|
]);
|
|
4391
4391
|
};
|
|
4392
4392
|
}
|
|
4393
|
-
}), Ns = /* @__PURE__ */
|
|
4393
|
+
}), Ns = /* @__PURE__ */ z({
|
|
4394
4394
|
__name: "PermissionsWrapper",
|
|
4395
4395
|
props: {
|
|
4396
4396
|
/**
|
|
@@ -4415,7 +4415,7 @@ ${l.value}
|
|
|
4415
4415
|
const t = e, n = N(void 0), i = S(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4416
4416
|
return be(() => t.authFunction, async () => {
|
|
4417
4417
|
n.value = await t.authFunction();
|
|
4418
|
-
}, { immediate: !0 }), (r, o) => i.value ?
|
|
4418
|
+
}, { immediate: !0 }), (r, o) => i.value ? j(r.$slots, "default", {
|
|
4419
4419
|
key: 0,
|
|
4420
4420
|
isAllowed: n.value
|
|
4421
4421
|
}) : D("", !0);
|
|
@@ -4453,7 +4453,7 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4453
4453
|
}, Vl = {
|
|
4454
4454
|
key: 2,
|
|
4455
4455
|
class: "form-section-footer"
|
|
4456
|
-
}, Yl = { class: "form-section-content" }, Wl = /* @__PURE__ */
|
|
4456
|
+
}, Yl = { class: "form-section-content" }, Wl = /* @__PURE__ */ z({
|
|
4457
4457
|
__name: "EntityFormSection",
|
|
4458
4458
|
props: {
|
|
4459
4459
|
title: {
|
|
@@ -4499,21 +4499,21 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4499
4499
|
class: "form-section-title"
|
|
4500
4500
|
}, {
|
|
4501
4501
|
default: w(() => [
|
|
4502
|
-
|
|
4502
|
+
q(I(e.title), 1)
|
|
4503
4503
|
]),
|
|
4504
4504
|
_: 1
|
|
4505
4505
|
}, 8, ["id"])) : D("", !0),
|
|
4506
4506
|
e.description || _(t).description ? (g(), $("div", Hl, [
|
|
4507
|
-
|
|
4507
|
+
j(i.$slots, "description", {}, () => [
|
|
4508
4508
|
L("p", null, I(e.description), 1)
|
|
4509
4509
|
], !0)
|
|
4510
4510
|
])) : D("", !0),
|
|
4511
4511
|
_(t).footer ? (g(), $("div", Vl, [
|
|
4512
|
-
|
|
4512
|
+
j(i.$slots, "footer", {}, void 0, !0)
|
|
4513
4513
|
])) : D("", !0)
|
|
4514
4514
|
], 2)),
|
|
4515
4515
|
L("div", Yl, [
|
|
4516
|
-
|
|
4516
|
+
j(i.$slots, "default", {}, void 0, !0)
|
|
4517
4517
|
])
|
|
4518
4518
|
])
|
|
4519
4519
|
], 10, Ul));
|
|
@@ -4527,7 +4527,7 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4527
4527
|
}, es = {
|
|
4528
4528
|
key: 1,
|
|
4529
4529
|
class: "header-extra"
|
|
4530
|
-
}, ts = { class: "content" }, ns = /* @__PURE__ */
|
|
4530
|
+
}, ts = { class: "content" }, ns = /* @__PURE__ */ z({
|
|
4531
4531
|
__name: "EntityFormBlock",
|
|
4532
4532
|
props: {
|
|
4533
4533
|
step: {},
|
|
@@ -4541,22 +4541,22 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4541
4541
|
e.step != null ? (g(), $("div", zl, I(e.step), 1)) : D("", !0),
|
|
4542
4542
|
L("div", Ql, [
|
|
4543
4543
|
L("h2", Zl, [
|
|
4544
|
-
|
|
4545
|
-
|
|
4544
|
+
j(n.$slots, "title", {}, () => [
|
|
4545
|
+
q(I(e.title), 1)
|
|
4546
4546
|
], !0)
|
|
4547
4547
|
]),
|
|
4548
4548
|
e.description || t.description ? (g(), $("div", Xl, [
|
|
4549
|
-
|
|
4550
|
-
|
|
4549
|
+
j(n.$slots, "description", {}, () => [
|
|
4550
|
+
q(I(e.description), 1)
|
|
4551
4551
|
], !0)
|
|
4552
4552
|
])) : D("", !0)
|
|
4553
4553
|
]),
|
|
4554
4554
|
t.extra ? (g(), $("div", es, [
|
|
4555
|
-
|
|
4555
|
+
j(n.$slots, "extra", {}, void 0, !0)
|
|
4556
4556
|
])) : D("", !0)
|
|
4557
4557
|
]),
|
|
4558
4558
|
L("div", ts, [
|
|
4559
|
-
|
|
4559
|
+
j(n.$slots, "default", {}, void 0, !0)
|
|
4560
4560
|
])
|
|
4561
4561
|
]));
|
|
4562
4562
|
}
|
|
@@ -4566,7 +4566,7 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4566
4566
|
}, rs = {
|
|
4567
4567
|
key: 0,
|
|
4568
4568
|
class: "deleted-entity"
|
|
4569
|
-
}, as = { key: 1 }, os = ["onClick"], ls = /* @__PURE__ */
|
|
4569
|
+
}, as = { key: 1 }, os = ["onClick"], ls = /* @__PURE__ */ z({
|
|
4570
4570
|
__name: "EntityLink",
|
|
4571
4571
|
props: {
|
|
4572
4572
|
entityLinkData: {
|
|
@@ -4590,21 +4590,21 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4590
4590
|
}
|
|
4591
4591
|
},
|
|
4592
4592
|
setup(e) {
|
|
4593
|
-
const t = e, n = N(), { isTruncated: i } =
|
|
4593
|
+
const t = e, n = N(), { isTruncated: i } = J.useTruncationDetector(n), { i18n: { t: r } } = J.useI18n(), o = r("global.actions.copyId"), a = N(o), l = S(() => t.entityLinkData.deleted ?? !1), s = S(() => {
|
|
4594
4594
|
var u;
|
|
4595
4595
|
return (u = t.entityLinkData.id) != null && u.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4596
|
-
}),
|
|
4596
|
+
}), c = S(() => {
|
|
4597
4597
|
var u;
|
|
4598
4598
|
return `${(u = s.value) == null ? void 0 : u.toString().slice(0, 5)} (deleted)`;
|
|
4599
|
-
}),
|
|
4599
|
+
}), d = async (u) => {
|
|
4600
4600
|
await u(s.value || "") && (a.value = r("global.actions.copyToClipboard"), setTimeout(() => {
|
|
4601
4601
|
a.value = o;
|
|
4602
4602
|
}, 1800));
|
|
4603
4603
|
};
|
|
4604
|
-
return (u,
|
|
4605
|
-
const
|
|
4604
|
+
return (u, p) => {
|
|
4605
|
+
const m = U("KTooltip"), y = U("KExternalLink"), h = U("KClipboardProvider");
|
|
4606
4606
|
return g(), $("div", is, [
|
|
4607
|
-
l.value ? (g(), $("div", rs, I(
|
|
4607
|
+
l.value ? (g(), $("div", rs, I(c.value), 1)) : s.value ? s.value ? (g(), K(y, {
|
|
4608
4608
|
key: 2,
|
|
4609
4609
|
class: "entity-link",
|
|
4610
4610
|
"hide-icon": !e.newWindow,
|
|
@@ -4612,7 +4612,7 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4612
4612
|
target: e.newWindow ? "_blank" : "_self"
|
|
4613
4613
|
}, {
|
|
4614
4614
|
default: w(() => [
|
|
4615
|
-
R(
|
|
4615
|
+
R(m, {
|
|
4616
4616
|
text: _(i) && e.entityLinkData.label || ""
|
|
4617
4617
|
}, {
|
|
4618
4618
|
default: w(() => [
|
|
@@ -4627,7 +4627,7 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4627
4627
|
]),
|
|
4628
4628
|
_: 1
|
|
4629
4629
|
}, 8, ["hide-icon", "href", "target"])) : D("", !0) : (g(), $("div", as, I(" – "))),
|
|
4630
|
-
s.value && e.allowCopy ? (g(), K(
|
|
4630
|
+
s.value && e.allowCopy ? (g(), K(m, {
|
|
4631
4631
|
key: a.value,
|
|
4632
4632
|
class: "copy-uuid-tooltip",
|
|
4633
4633
|
"max-width": "160",
|
|
@@ -4635,11 +4635,11 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4635
4635
|
text: a.value
|
|
4636
4636
|
}, {
|
|
4637
4637
|
default: w(() => [
|
|
4638
|
-
R(
|
|
4639
|
-
default: w(({ copyToClipboard:
|
|
4638
|
+
R(h, null, {
|
|
4639
|
+
default: w(({ copyToClipboard: b }) => [
|
|
4640
4640
|
L("span", {
|
|
4641
4641
|
class: "entity-link-copy-id",
|
|
4642
|
-
onClick: Re((
|
|
4642
|
+
onClick: Re((k) => d(b), ["stop"])
|
|
4643
4643
|
}, [
|
|
4644
4644
|
R(_(mi), {
|
|
4645
4645
|
class: "copy-icon",
|
|
@@ -4684,7 +4684,7 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4684
4684
|
}, vs = { class: "card-header" }, bs = ["title"], ks = {
|
|
4685
4685
|
key: 3,
|
|
4686
4686
|
class: "entity-empty-state-bottom-container"
|
|
4687
|
-
}, Cs = /* @__PURE__ */
|
|
4687
|
+
}, Cs = /* @__PURE__ */ z({
|
|
4688
4688
|
__name: "EntityEmptyState",
|
|
4689
4689
|
props: {
|
|
4690
4690
|
appearance: {
|
|
@@ -4725,56 +4725,56 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4725
4725
|
},
|
|
4726
4726
|
emits: ["click:create", "click:learn-more"],
|
|
4727
4727
|
setup(e) {
|
|
4728
|
-
const t = e, { i18n: { t: n } } =
|
|
4728
|
+
const t = e, { i18n: { t: n } } = J.useI18n(), i = N(!1), r = S(() => i.value && !!t.actionButtonText), o = S(() => vt.includes(t.appearance) ? t.appearance : ["primary", t.appearance]);
|
|
4729
4729
|
return rt(async () => {
|
|
4730
4730
|
i.value = await t.canCreate();
|
|
4731
4731
|
}), it(() => ni(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
|
|
4732
4732
|
Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, l) => {
|
|
4733
|
-
const s =
|
|
4733
|
+
const s = U("KCard");
|
|
4734
4734
|
return g(), $("div", ss, [
|
|
4735
4735
|
L("div", cs, [
|
|
4736
4736
|
a.$slots.image ? (g(), $("div", us, [
|
|
4737
|
-
|
|
4737
|
+
j(a.$slots, "image", {}, void 0, !0)
|
|
4738
4738
|
])) : D("", !0),
|
|
4739
4739
|
e.title || a.$slots.title ? (g(), $("div", ds, [
|
|
4740
4740
|
L("h1", {
|
|
4741
4741
|
class: fe(o.value)
|
|
4742
4742
|
}, [
|
|
4743
|
-
|
|
4744
|
-
|
|
4743
|
+
j(a.$slots, "title", {}, () => [
|
|
4744
|
+
q(I(e.title), 1)
|
|
4745
4745
|
], !0)
|
|
4746
4746
|
], 2)
|
|
4747
4747
|
])) : D("", !0),
|
|
4748
4748
|
e.description || a.$slots.default ? (g(), $("div", fs, [
|
|
4749
|
-
|
|
4749
|
+
j(a.$slots, "default", {}, () => [
|
|
4750
4750
|
L("p", null, I(e.description), 1)
|
|
4751
4751
|
], !0)
|
|
4752
4752
|
])) : D("", !0),
|
|
4753
4753
|
e.pricing || a.$slots.pricing ? (g(), $("div", ps, [
|
|
4754
4754
|
L("p", null, [
|
|
4755
4755
|
L("b", null, I(_(n)("emptyState.pricingTitle")), 1),
|
|
4756
|
-
l[2] || (l[2] =
|
|
4757
|
-
|
|
4758
|
-
|
|
4756
|
+
l[2] || (l[2] = q()),
|
|
4757
|
+
j(a.$slots, "pricing", {}, () => [
|
|
4758
|
+
q(I(e.pricing), 1)
|
|
4759
4759
|
], !0)
|
|
4760
4760
|
])
|
|
4761
4761
|
])) : D("", !0)
|
|
4762
4762
|
]),
|
|
4763
4763
|
a.$slots.message ? (g(), $("div", ms, [
|
|
4764
|
-
|
|
4764
|
+
j(a.$slots, "message", {}, void 0, !0)
|
|
4765
4765
|
])) : D("", !0),
|
|
4766
4766
|
r.value || e.learnMore || a.$slots.actions ? (g(), $("div", gs, [
|
|
4767
|
-
|
|
4767
|
+
j(a.$slots, "actions", {}, () => [
|
|
4768
4768
|
r.value ? (g(), K(_(gt), {
|
|
4769
4769
|
key: 0,
|
|
4770
4770
|
appearance: "primary",
|
|
4771
4771
|
"data-testid": "entity-create-button",
|
|
4772
4772
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4773
|
-
onClick: l[0] || (l[0] = (
|
|
4773
|
+
onClick: l[0] || (l[0] = (c) => a.$emit("click:create"))
|
|
4774
4774
|
}, {
|
|
4775
4775
|
default: w(() => [
|
|
4776
4776
|
R(_(Gt)),
|
|
4777
|
-
|
|
4777
|
+
q(" " + I(e.actionButtonText), 1)
|
|
4778
4778
|
]),
|
|
4779
4779
|
_: 1
|
|
4780
4780
|
}, 8, ["size"])) : D("", !0),
|
|
@@ -4783,42 +4783,42 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, l) =>
|
|
|
4783
4783
|
appearance: "secondary",
|
|
4784
4784
|
"data-testid": "entity-learn-more-button",
|
|
4785
4785
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4786
|
-
onClick: l[1] || (l[1] = (
|
|
4786
|
+
onClick: l[1] || (l[1] = (c) => a.$emit("click:learn-more"))
|
|
4787
4787
|
}, {
|
|
4788
4788
|
default: w(() => [
|
|
4789
4789
|
R(_(Jt), { decorative: "" }),
|
|
4790
|
-
|
|
4790
|
+
q(" " + I(_(n)("emptyState.learnMore")), 1)
|
|
4791
4791
|
]),
|
|
4792
4792
|
_: 1
|
|
4793
4793
|
}, 8, ["size"])) : D("", !0)
|
|
4794
4794
|
], !0)
|
|
4795
4795
|
])) : D("", !0),
|
|
4796
4796
|
e.features.length ? (g(), $("div", hs, [
|
|
4797
|
-
(g(!0), $(ue, null, ce(e.features, (
|
|
4798
|
-
key:
|
|
4797
|
+
(g(!0), $(ue, null, ce(e.features, (c, d) => (g(), K(s, {
|
|
4798
|
+
key: c,
|
|
4799
4799
|
class: "entity-empty-state-card"
|
|
4800
4800
|
}, {
|
|
4801
4801
|
title: w(() => [
|
|
4802
|
-
a.$slots[`feature-${
|
|
4803
|
-
|
|
4802
|
+
a.$slots[`feature-${d}-icon`] ? (g(), $("div", ys, [
|
|
4803
|
+
j(a.$slots, `feature-${d}-icon`, {}, void 0, !0)
|
|
4804
4804
|
])) : D("", !0),
|
|
4805
|
-
L("div", vs, I(
|
|
4805
|
+
L("div", vs, I(c.title), 1)
|
|
4806
4806
|
]),
|
|
4807
4807
|
default: w(() => [
|
|
4808
4808
|
L("div", {
|
|
4809
|
-
title:
|
|
4810
|
-
}, I(
|
|
4809
|
+
title: c.description
|
|
4810
|
+
}, I(c.description), 9, bs)
|
|
4811
4811
|
]),
|
|
4812
4812
|
_: 2
|
|
4813
4813
|
}, 1024))), 128))
|
|
4814
4814
|
])) : D("", !0),
|
|
4815
4815
|
a.$slots.bottom ? (g(), $("div", ks, [
|
|
4816
|
-
|
|
4816
|
+
j(a.$slots, "bottom", {}, void 0, !0)
|
|
4817
4817
|
])) : D("", !0)
|
|
4818
4818
|
]);
|
|
4819
4819
|
};
|
|
4820
4820
|
}
|
|
4821
|
-
}), js = /* @__PURE__ */ le(Cs, [["__scopeId", "data-v-645aae54"]]), xs = { key: 1 }, Us = /* @__PURE__ */
|
|
4821
|
+
}), js = /* @__PURE__ */ le(Cs, [["__scopeId", "data-v-645aae54"]]), xs = { key: 1 }, Us = /* @__PURE__ */ z({
|
|
4822
4822
|
__name: "TableTags",
|
|
4823
4823
|
props: {
|
|
4824
4824
|
/** The tags to display in the table */
|
|
@@ -4855,7 +4855,7 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, l) =>
|
|
|
4855
4855
|
}, ["stop"]))
|
|
4856
4856
|
}, {
|
|
4857
4857
|
default: w(() => [
|
|
4858
|
-
|
|
4858
|
+
q(I(a), 1)
|
|
4859
4859
|
]),
|
|
4860
4860
|
_: 2
|
|
4861
4861
|
}, 1032, ["max-width"]))), 128))
|
|
@@ -4864,13 +4864,13 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, l) =>
|
|
|
4864
4864
|
})) : (g(), $("span", xs, "-"));
|
|
4865
4865
|
};
|
|
4866
4866
|
}
|
|
4867
|
-
}), { useAxios: qs, useDeleteUrlBuilder: Hs, useErrors: Vs, useExternalLinkCreator: Ys, useFetchUrlBuilder: Ws, useFetcher: Js, useFetcherCacheKey: Gs, useDebouncedFilter: zs, useStringHelpers: Qs, useHelpers: Zs, useGatewayFeatureSupported: Xs, useTruncationDetector: ec, useValidators: tc, useSchemaProvider: nc, useTableState: ic } =
|
|
4867
|
+
}), { useAxios: qs, useDeleteUrlBuilder: Hs, useErrors: Vs, useExternalLinkCreator: Ys, useFetchUrlBuilder: Ws, useFetcher: Js, useFetcherCacheKey: Gs, useDebouncedFilter: zs, useStringHelpers: Qs, useHelpers: Zs, useGatewayFeatureSupported: Xs, useTruncationDetector: ec, useValidators: tc, useSchemaProvider: nc, useTableState: ic } = J;
|
|
4868
4868
|
export {
|
|
4869
4869
|
vt as Appearances,
|
|
4870
4870
|
tl as ConfigCardDisplay,
|
|
4871
4871
|
nn as ConfigCardItem,
|
|
4872
4872
|
ae as ConfigurationSchemaSection,
|
|
4873
|
-
|
|
4873
|
+
W as ConfigurationSchemaType,
|
|
4874
4874
|
cl as DeckCodeBlock,
|
|
4875
4875
|
Fs as EntityBaseConfigCard,
|
|
4876
4876
|
Os as EntityBaseForm,
|