@kong-ui-public/entities-shared 3.15.0 → 3.16.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 +672 -663
- package/dist/entities-shared.umd.js +21 -21
- package/dist/style.css +1 -1
- package/dist/types/components/entity-base-table/EntityBaseTable.vue.d.ts +5 -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 Nt, ref as L, computed as
|
|
1
|
+
import { inject as Nt, ref as L, computed as T, unref as A, toValue as Ve, watch as Ae, provide as Mt, toRef as jn, defineComponent as W, openBlock as p, createBlock as D, resolveDynamicComponent as Ne, normalizeClass as ce, withCtx as k, createElementBlock as S, createElementVNode as N, toDisplayString as E, createCommentVNode as j, Fragment as le, renderList as oe, resolveComponent as U, createVNode as M, createTextVNode as q, useCssVars as Dt, useSlots as Xe, renderSlot as P, createSlots as Ce, normalizeProps as Un, guardReactiveProps as Pn, mergeProps as qn, onBeforeMount as et, withModifiers as Fe, onMounted as Hn, onUnmounted as Yn, withDirectives as he, vShow as ge, withKeys as Vn, Teleport as Wn } from "vue";
|
|
2
2
|
import ut from "axios";
|
|
3
3
|
import { createI18n as Jn, i18nTComponent as Gn } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as zn, KButton as dt, KTruncate as Qn, KBadge as Zn } from "@kong/kongponents";
|
|
@@ -53,7 +53,7 @@ const Ue = "khcp-user-table-preferences", lr = {
|
|
|
53
53
|
sortColumnOrder: void 0,
|
|
54
54
|
columnVisibility: {}
|
|
55
55
|
};
|
|
56
|
-
function
|
|
56
|
+
function sr() {
|
|
57
57
|
const e = (n) => {
|
|
58
58
|
if (typeof n == "string")
|
|
59
59
|
try {
|
|
@@ -90,7 +90,7 @@ function nt(e = {}) {
|
|
|
90
90
|
axiosInstance: t(e)
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
const
|
|
93
|
+
const cr = {
|
|
94
94
|
actions: {
|
|
95
95
|
copyId: "Copy ID",
|
|
96
96
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
@@ -191,7 +191,7 @@ const sr = {
|
|
|
191
191
|
confirmText: "Yes, disable"
|
|
192
192
|
}
|
|
193
193
|
}, xr = {
|
|
194
|
-
global:
|
|
194
|
+
global: cr,
|
|
195
195
|
deleteModal: ur,
|
|
196
196
|
baseForm: dr,
|
|
197
197
|
baseTable: fr,
|
|
@@ -215,9 +215,9 @@ function Pt() {
|
|
|
215
215
|
const e = (o, a) => (a == null ? void 0 : a[o]) ?? void 0, t = (o, a) => {
|
|
216
216
|
if (o.length !== a.length) return !1;
|
|
217
217
|
const l = /* @__PURE__ */ new Set([...o, ...a]);
|
|
218
|
-
for (const
|
|
219
|
-
const
|
|
220
|
-
if (
|
|
218
|
+
for (const s of l) {
|
|
219
|
+
const c = o.filter((u) => u === s).length, d = a.filter((u) => u === s).length;
|
|
220
|
+
if (c !== d) return !1;
|
|
221
221
|
}
|
|
222
222
|
return !0;
|
|
223
223
|
};
|
|
@@ -226,13 +226,13 @@ function Pt() {
|
|
|
226
226
|
objectsAreEqual: (o, a, l) => {
|
|
227
227
|
if (l) {
|
|
228
228
|
if (Object.keys(o).length === Object.keys(a).length)
|
|
229
|
-
for (const
|
|
230
|
-
if (Array.isArray(o[
|
|
231
|
-
if (t(o[
|
|
229
|
+
for (const s in o)
|
|
230
|
+
if (Array.isArray(o[s]) && Array.isArray(a[s])) {
|
|
231
|
+
if (t(o[s], a[s]))
|
|
232
232
|
continue;
|
|
233
233
|
return !1;
|
|
234
234
|
} else {
|
|
235
|
-
if (o[
|
|
235
|
+
if (o[s] === a[s])
|
|
236
236
|
continue;
|
|
237
237
|
return !1;
|
|
238
238
|
}
|
|
@@ -247,8 +247,8 @@ function Pt() {
|
|
|
247
247
|
}
|
|
248
248
|
},
|
|
249
249
|
sortAlpha: (o) => (a, l) => {
|
|
250
|
-
let
|
|
251
|
-
return Array.isArray(a[o]) && (
|
|
250
|
+
let s = a[o] === void 0 || a[o] === null ? "" : a[o], c = l[o] === void 0 || l[o] === null ? "" : l[o];
|
|
251
|
+
return Array.isArray(a[o]) && (s = a[o][0]), Array.isArray(l[o]) && (c = l[o][0]), s.localeCompare(c);
|
|
252
252
|
},
|
|
253
253
|
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
|
|
254
254
|
};
|
|
@@ -258,72 +258,72 @@ function Cr(e, t, n, r = {
|
|
|
258
258
|
searchKeys: ["id"]
|
|
259
259
|
}) {
|
|
260
260
|
n || (n = "1000");
|
|
261
|
-
const { axiosInstance: i } = nt(e.axiosRequestConfig), { i18n: { t: o } } = De(), { debounce: a } = or(), l = a(async (
|
|
262
|
-
await b(
|
|
263
|
-
}, 200),
|
|
264
|
-
const
|
|
265
|
-
return e.app === "konnect" ?
|
|
261
|
+
const { axiosInstance: i } = nt(e.axiosRequestConfig), { i18n: { t: o } } = De(), { debounce: a } = or(), l = a(async (R) => {
|
|
262
|
+
await b(R);
|
|
263
|
+
}, 200), s = L(!1), c = L(""), d = L(""), u = L([]), m = L([]), f = L(void 0), v = T(() => {
|
|
264
|
+
const R = `${e.apiBaseUrl}${A(t)}`;
|
|
265
|
+
return e.app === "konnect" ? R.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? R.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : R;
|
|
266
266
|
}), { isValidUuid: y } = Pt(), C = async () => {
|
|
267
267
|
try {
|
|
268
|
-
|
|
269
|
-
const { data:
|
|
270
|
-
|
|
268
|
+
s.value = !0;
|
|
269
|
+
const { data: R } = await i.get(`${v.value}?size=${n}`);
|
|
270
|
+
R != null && R.next || (f.value = r.fetchedItemsKey in R ? R[r.fetchedItemsKey] : []), m.value = r.fetchedItemsKey in R ? R[r.fetchedItemsKey] : [], u.value = m.value;
|
|
271
271
|
} catch {
|
|
272
|
-
u.value = [],
|
|
272
|
+
u.value = [], c.value = o("debouncedFilter.errors.fetch");
|
|
273
273
|
} finally {
|
|
274
|
-
|
|
274
|
+
s.value = !1;
|
|
275
275
|
}
|
|
276
|
-
}, I = L(""), b = async (
|
|
277
|
-
var
|
|
278
|
-
if (I.value !==
|
|
279
|
-
if (I.value =
|
|
276
|
+
}, I = L(""), b = async (R) => {
|
|
277
|
+
var F, w, g;
|
|
278
|
+
if (I.value !== R) {
|
|
279
|
+
if (I.value = R ?? "", !R) {
|
|
280
280
|
u.value = m.value;
|
|
281
281
|
return;
|
|
282
282
|
}
|
|
283
283
|
if (f.value === void 0)
|
|
284
284
|
try {
|
|
285
|
-
if (
|
|
286
|
-
const
|
|
287
|
-
r.fetchedItemsKey in
|
|
285
|
+
if (s.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
286
|
+
const $ = `${v.value}/${R}`, { data: h } = await i.get(`${$}?size=${n}`);
|
|
287
|
+
r.fetchedItemsKey in h ? u.value = h[r.fetchedItemsKey] : h != null && h[r.exactMatchKey ?? "id"] ? u.value = [h] : u.value = [];
|
|
288
288
|
} else {
|
|
289
|
-
const
|
|
290
|
-
y(
|
|
291
|
-
const { data:
|
|
292
|
-
return [
|
|
293
|
-
})()) :
|
|
294
|
-
...r.searchKeys.filter((
|
|
295
|
-
const { data:
|
|
296
|
-
return
|
|
289
|
+
const $ = [];
|
|
290
|
+
y(R) && r.searchKeys.includes("id") ? $.push((async () => {
|
|
291
|
+
const { data: B } = await i.get(`${v.value}/${R}`);
|
|
292
|
+
return [B[r.fetchedItemsKey] ?? B];
|
|
293
|
+
})()) : $.push(
|
|
294
|
+
...r.searchKeys.filter((B) => B !== "id").map(async (B) => {
|
|
295
|
+
const { data: K } = await i.get(`${v.value}?${B}=${R}`);
|
|
296
|
+
return K[r.fetchedItemsKey];
|
|
297
297
|
})
|
|
298
298
|
);
|
|
299
|
-
const
|
|
300
|
-
u.value = [], (
|
|
301
|
-
var
|
|
302
|
-
(
|
|
303
|
-
|
|
299
|
+
const h = await Promise.all($), x = /* @__PURE__ */ new Set();
|
|
300
|
+
u.value = [], (F = h == null ? void 0 : h.forEach) == null || F.call(h, (B) => {
|
|
301
|
+
var K;
|
|
302
|
+
(K = B == null ? void 0 : B.forEach) == null || K.call(B, (O) => {
|
|
303
|
+
x.has(O.id) || (x.add(O.id), u.value.push(O));
|
|
304
304
|
});
|
|
305
305
|
});
|
|
306
306
|
}
|
|
307
|
-
} catch (
|
|
308
|
-
((
|
|
307
|
+
} catch ($) {
|
|
308
|
+
((w = $ == null ? void 0 : $.response) == null ? void 0 : w.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (u.value = [], c.value = o("debouncedFilter.errors.fetch"));
|
|
309
309
|
} finally {
|
|
310
|
-
|
|
310
|
+
s.value = !1;
|
|
311
311
|
}
|
|
312
312
|
else
|
|
313
|
-
|
|
314
|
-
var
|
|
315
|
-
let
|
|
316
|
-
for (const
|
|
317
|
-
const
|
|
318
|
-
|
|
313
|
+
s.value = !0, d.value = "", u.value = (g = f.value) == null ? void 0 : g.filter(($) => {
|
|
314
|
+
var x;
|
|
315
|
+
let h = !1;
|
|
316
|
+
for (const B of r.searchKeys) {
|
|
317
|
+
const K = typeof $[B] == "string" ? (x = $[B]) == null ? void 0 : x.toLowerCase() : $[B];
|
|
318
|
+
K != null && K.includes(R.toLowerCase()) && (h = !0);
|
|
319
319
|
}
|
|
320
|
-
return
|
|
321
|
-
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid")),
|
|
320
|
+
return h;
|
|
321
|
+
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid")), s.value = !1;
|
|
322
322
|
}
|
|
323
323
|
};
|
|
324
324
|
return {
|
|
325
|
-
loading:
|
|
326
|
-
error:
|
|
325
|
+
loading: s,
|
|
326
|
+
error: c,
|
|
327
327
|
validationError: d,
|
|
328
328
|
results: u,
|
|
329
329
|
allRecords: f,
|
|
@@ -332,7 +332,7 @@ function Cr(e, t, n, r = {
|
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
334
|
function kr(e, t) {
|
|
335
|
-
const n = A(t), r =
|
|
335
|
+
const n = A(t), r = T(
|
|
336
336
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
337
337
|
);
|
|
338
338
|
return r.value.search = "", (i) => `${r.value.href}/${i}`;
|
|
@@ -351,8 +351,8 @@ function Ar() {
|
|
|
351
351
|
return n.response.data.detail;
|
|
352
352
|
if ((o = n.response.data.details) != null && o.length)
|
|
353
353
|
return n.response.data.details.map((l) => {
|
|
354
|
-
let
|
|
355
|
-
return l.messages && typeof l.messages == "object" && l.messages.length && (
|
|
354
|
+
let s = e("errors.unexpected");
|
|
355
|
+
return l.messages && typeof l.messages == "object" && l.messages.length && (s = l.messages.join(", ")), l.field ? `${l.field} - ${s}` : s;
|
|
356
356
|
}).join("; ");
|
|
357
357
|
if (n.response.data.message) {
|
|
358
358
|
const { message: l } = n.response.data;
|
|
@@ -379,18 +379,18 @@ function _r(e) {
|
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
function qt(e, t) {
|
|
382
|
-
const n = L(A(e)), r = L(A(t)), i =
|
|
382
|
+
const n = L(A(e)), r = L(A(t)), i = T(
|
|
383
383
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
384
|
-
), o =
|
|
384
|
+
), o = T(
|
|
385
385
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
386
386
|
);
|
|
387
387
|
return (a) => {
|
|
388
|
-
const { page: l, pageSize:
|
|
388
|
+
const { page: l, pageSize: s, offset: c, sortColumnKey: d, sortColumnOrder: u, query: m } = a;
|
|
389
389
|
try {
|
|
390
390
|
let f = new URL(o.value.href);
|
|
391
391
|
return i.value && m ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${m}`) : new URL(`${f.href}?filter[name][contains]=${m}`)) : (i.value || new URLSearchParams(m).forEach((v, y) => {
|
|
392
392
|
f.searchParams.append(y, v);
|
|
393
|
-
}), d && f.searchParams.append("sort_by", d), u === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(
|
|
393
|
+
}), d && f.searchParams.append("sort_by", d), u === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(s))), c && l !== 1 && f.searchParams.append("offset", String(c)), f.href;
|
|
394
394
|
} catch (f) {
|
|
395
395
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
396
396
|
}
|
|
@@ -400,7 +400,7 @@ const pt = /* @__PURE__ */ new Map();
|
|
|
400
400
|
function wr(e, t, n) {
|
|
401
401
|
const r = L(!0), i = A(t), { axiosInstance: o } = nt(e.axiosRequestConfig), a = qt(e, i), l = L({
|
|
402
402
|
status: de.Idle
|
|
403
|
-
}),
|
|
403
|
+
}), s = async (u) => {
|
|
404
404
|
var f;
|
|
405
405
|
const m = Ve(n) || "data";
|
|
406
406
|
try {
|
|
@@ -413,7 +413,7 @@ function wr(e, t, n) {
|
|
|
413
413
|
const C = y.data, I = m && m.replace(/[^\w-_]/gi, "");
|
|
414
414
|
let b;
|
|
415
415
|
C[I] ? b = Array.isArray(C[I]) ? C[I] : [C[I]] : Array.isArray(C) ? b = C : b = Object.keys(C).length ? [C] : [];
|
|
416
|
-
const
|
|
416
|
+
const R = {
|
|
417
417
|
data: b,
|
|
418
418
|
total: b.length,
|
|
419
419
|
...C.offset ? {
|
|
@@ -422,13 +422,13 @@ function wr(e, t, n) {
|
|
|
422
422
|
}
|
|
423
423
|
} : null
|
|
424
424
|
};
|
|
425
|
-
return
|
|
425
|
+
return R.data.length === 0 && !u.query ? l.value = {
|
|
426
426
|
status: de.NoRecords,
|
|
427
|
-
response:
|
|
427
|
+
response: R
|
|
428
428
|
} : l.value = {
|
|
429
429
|
status: de.Idle,
|
|
430
|
-
response:
|
|
431
|
-
},
|
|
430
|
+
response: R
|
|
431
|
+
}, R;
|
|
432
432
|
} catch (v) {
|
|
433
433
|
const y = {
|
|
434
434
|
data: [],
|
|
@@ -444,8 +444,8 @@ function wr(e, t, n) {
|
|
|
444
444
|
error: v.response ? v : { response: v }
|
|
445
445
|
}, y);
|
|
446
446
|
}
|
|
447
|
-
},
|
|
448
|
-
return { fetcher:
|
|
447
|
+
}, c = e.cacheIdentifier, d = Ht(c);
|
|
448
|
+
return { fetcher: s, fetcherState: l, fetcherCacheKey: d };
|
|
449
449
|
}
|
|
450
450
|
function Ht(e) {
|
|
451
451
|
if (e) {
|
|
@@ -521,7 +521,7 @@ function Lr(e) {
|
|
|
521
521
|
return Ae(e, (o) => {
|
|
522
522
|
o && !r.value && (t.value = o.offsetWidth, n.value = o.scrollWidth, r.value = !0);
|
|
523
523
|
}), {
|
|
524
|
-
isTruncated:
|
|
524
|
+
isTruncated: T(() => t.value < n.value)
|
|
525
525
|
};
|
|
526
526
|
}
|
|
527
527
|
function Rr() {
|
|
@@ -539,7 +539,7 @@ const We = Symbol("schema"), Br = (e) => {
|
|
|
539
539
|
};
|
|
540
540
|
function Nr(e) {
|
|
541
541
|
let t = "";
|
|
542
|
-
const n = L(!1), r = L(null), i =
|
|
542
|
+
const n = L(!1), r = L(null), i = T(() => {
|
|
543
543
|
let a;
|
|
544
544
|
return n.value ? a = !0 : r.value ? a = r.value.hasData || e && Ve(e) : a = !1, !a;
|
|
545
545
|
});
|
|
@@ -590,19 +590,19 @@ const H = {
|
|
|
590
590
|
}
|
|
591
591
|
},
|
|
592
592
|
setup(e) {
|
|
593
|
-
const t = e, { i18n: { t: n } } = H.useI18n(), { convertKeyToTitle: r } = H.useStringHelpers(), i =
|
|
594
|
-
const
|
|
595
|
-
return t.isArrayItem && delete
|
|
596
|
-
}), l =
|
|
597
|
-
var
|
|
598
|
-
return t.isArrayItem ? (
|
|
593
|
+
const t = e, { i18n: { t: n } } = H.useI18n(), { convertKeyToTitle: r } = H.useStringHelpers(), i = T(() => t.item.key ?? "json-array-item"), o = T(() => t.item.value ?? t.item), a = T(() => {
|
|
594
|
+
const s = JSON.parse(JSON.stringify(o.value));
|
|
595
|
+
return t.isArrayItem && delete s.name, s;
|
|
596
|
+
}), l = T(() => {
|
|
597
|
+
var s;
|
|
598
|
+
return t.isArrayItem ? (s = o.value) != null && s.name ? r(o.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
599
599
|
});
|
|
600
|
-
return (
|
|
601
|
-
class:
|
|
600
|
+
return (s, c) => (p(), D(Ne(e.isArrayItem ? "fieldset" : "div"), {
|
|
601
|
+
class: ce(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
602
602
|
}, {
|
|
603
603
|
default: k(() => [
|
|
604
604
|
e.isArrayItem ? (p(), S("legend", Mr, [
|
|
605
|
-
N("b", null,
|
|
605
|
+
N("b", null, E(l.value), 1)
|
|
606
606
|
])) : j("", !0),
|
|
607
607
|
(p(!0), S(le, null, oe(Object.keys(a.value), (d, u) => (p(), D(Jt, {
|
|
608
608
|
key: `${i.value}-property-${u}`,
|
|
@@ -641,7 +641,7 @@ const H = {
|
|
|
641
641
|
onClick: r[0] || (r[0] = (o) => n.$emit("navigation-click", e.item))
|
|
642
642
|
}, {
|
|
643
643
|
default: k(() => [
|
|
644
|
-
q(
|
|
644
|
+
q(E(e.item.value || A(t)("baseConfigCard.commonFields.link")), 1)
|
|
645
645
|
]),
|
|
646
646
|
_: 1
|
|
647
647
|
})
|
|
@@ -664,7 +664,7 @@ const H = {
|
|
|
664
664
|
appearance: e.status ? "success" : "neutral"
|
|
665
665
|
}, {
|
|
666
666
|
default: k(() => [
|
|
667
|
-
q(
|
|
667
|
+
q(E(e.status ? A(t)("baseConfigCard.statusBadge.enabledLabel") : A(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
668
668
|
]),
|
|
669
669
|
_: 1
|
|
670
670
|
}, 8, ["appearance"]);
|
|
@@ -695,14 +695,14 @@ const H = {
|
|
|
695
695
|
setup(e, { emit: t }) {
|
|
696
696
|
Dt((b) => ({
|
|
697
697
|
"3ccdd5d2": d.value ? "none" : `solid ${A(Wr)} ${A(Hr)}`,
|
|
698
|
-
"4b1da305":
|
|
699
|
-
cd20788a:
|
|
700
|
-
cd1becd4:
|
|
698
|
+
"4b1da305": c.value && l.value ? "block" : "flex",
|
|
699
|
+
cd20788a: c.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
700
|
+
cd1becd4: c.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
701
701
|
}));
|
|
702
|
-
const n = e, r = t, i = Xe(), { i18n: { t: o, formatUnixTimeStamp: a } } = H.useI18n(), l =
|
|
702
|
+
const n = e, r = t, i = Xe(), { i18n: { t: o, formatUnixTimeStamp: a } } = H.useI18n(), l = T(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), s = T(() => !!(n.item.tooltip || i["label-tooltip"])), c = T(() => n.item.type === Y.Json || n.item.type === Y.JsonArray), d = T(() => n.item.type === Y.JsonArray), u = H.useSubSchema(n.item.key), m = T(() => {
|
|
703
703
|
var b;
|
|
704
704
|
return n.item.type ? n.item.type : (b = u == null ? void 0 : u.value) != null && b.encrypted ? Y.Redacted : void 0;
|
|
705
|
-
}), f =
|
|
705
|
+
}), f = T(() => {
|
|
706
706
|
switch (m.value) {
|
|
707
707
|
case Y.ID:
|
|
708
708
|
return {
|
|
@@ -824,17 +824,17 @@ const H = {
|
|
|
824
824
|
};
|
|
825
825
|
}
|
|
826
826
|
}), v = L(), y = L(), { isTruncated: C } = H.useTruncationDetector(v), { isTruncated: I } = H.useTruncationDetector(y);
|
|
827
|
-
return (b,
|
|
828
|
-
const
|
|
827
|
+
return (b, R) => {
|
|
828
|
+
const F = U("KTooltip"), w = U("KLabel"), g = U("KBadge"), $ = U("KCopy");
|
|
829
829
|
return p(), S("div", zr, [
|
|
830
830
|
N("div", {
|
|
831
831
|
class: "config-card-details-label",
|
|
832
832
|
"data-testid": `${e.item.key}-label`
|
|
833
833
|
}, [
|
|
834
834
|
P(b.$slots, "label", { item: e.item }, () => [
|
|
835
|
-
M(
|
|
835
|
+
M(w, { "tooltip-attributes": { maxWidth: "500px" } }, Ce({
|
|
836
836
|
default: k(() => [
|
|
837
|
-
M(
|
|
837
|
+
M(F, {
|
|
838
838
|
text: A(C) ? e.item.label : ""
|
|
839
839
|
}, {
|
|
840
840
|
default: k(() => [
|
|
@@ -842,21 +842,21 @@ const H = {
|
|
|
842
842
|
ref_key: "labelContent",
|
|
843
843
|
ref: v,
|
|
844
844
|
class: "label-content"
|
|
845
|
-
},
|
|
845
|
+
}, E(e.item.label), 513)
|
|
846
846
|
]),
|
|
847
847
|
_: 1
|
|
848
848
|
}, 8, ["text"])
|
|
849
849
|
]),
|
|
850
850
|
_: 2
|
|
851
851
|
}, [
|
|
852
|
-
|
|
852
|
+
s.value ? {
|
|
853
853
|
name: "tooltip",
|
|
854
854
|
fn: k(() => [
|
|
855
855
|
N("div", {
|
|
856
856
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
857
857
|
}, [
|
|
858
858
|
P(b.$slots, "label-tooltip", {}, () => [
|
|
859
|
-
q(
|
|
859
|
+
q(E(e.item.tooltip), 1)
|
|
860
860
|
], !0)
|
|
861
861
|
], 8, Zr)
|
|
862
862
|
]),
|
|
@@ -879,15 +879,15 @@ const H = {
|
|
|
879
879
|
key: 0,
|
|
880
880
|
"data-testid": `${e.item.key}-badge-tags`
|
|
881
881
|
}, [
|
|
882
|
-
(p(!0), S(le, null, oe(e.item.value, (
|
|
883
|
-
key: `${e.item.key}-badge-tag-${
|
|
882
|
+
(p(!0), S(le, null, oe(e.item.value, (h, x) => (p(), D(g, {
|
|
883
|
+
key: `${e.item.key}-badge-tag-${x}`,
|
|
884
884
|
class: "config-badge",
|
|
885
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
886
|
-
tooltip:
|
|
885
|
+
"data-testid": `${e.item.key}-badge-tag-${x}`,
|
|
886
|
+
tooltip: h,
|
|
887
887
|
"truncation-tooltip": ""
|
|
888
888
|
}, {
|
|
889
889
|
default: k(() => [
|
|
890
|
-
q(
|
|
890
|
+
q(E(h), 1)
|
|
891
891
|
]),
|
|
892
892
|
_: 2
|
|
893
893
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
@@ -897,24 +897,24 @@ const H = {
|
|
|
897
897
|
class: "copy-uuid-array",
|
|
898
898
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
899
899
|
}, [
|
|
900
|
-
(p(!0), S(le, null, oe(e.item.value, (
|
|
901
|
-
key: `${e.item.key}-copy-uuid-${
|
|
902
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
903
|
-
text:
|
|
900
|
+
(p(!0), S(le, null, oe(e.item.value, (h, x) => (p(), D($, qn({ ref_for: !0 }, f.value.childAttrs, {
|
|
901
|
+
key: `${e.item.key}-copy-uuid-${x}`,
|
|
902
|
+
"data-testid": `${e.item.key}-copy-uuid-${x}`,
|
|
903
|
+
text: h
|
|
904
904
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
905
905
|
], 8, ri)) : f.value.additionalComponent === "KMethodBadge" ? (p(), S("div", {
|
|
906
906
|
key: 2,
|
|
907
907
|
class: "method-badge-array",
|
|
908
908
|
"data-testid": `${e.item.key}-badge-methods`
|
|
909
909
|
}, [
|
|
910
|
-
(p(!0), S(le, null, oe(e.item.value, (
|
|
911
|
-
key: `${e.item.key}-badge-method-${
|
|
912
|
-
appearance: Object.values(A(zn)).includes(
|
|
910
|
+
(p(!0), S(le, null, oe(e.item.value, (h, x) => (p(), D(g, {
|
|
911
|
+
key: `${e.item.key}-badge-method-${x}`,
|
|
912
|
+
appearance: Object.values(A(zn)).includes(h.toLowerCase()) ? h.toLowerCase() : "custom",
|
|
913
913
|
class: "config-badge",
|
|
914
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
914
|
+
"data-testid": `${e.item.key}-badge-method-${x}`
|
|
915
915
|
}, {
|
|
916
916
|
default: k(() => [
|
|
917
|
-
q(
|
|
917
|
+
q(E(h), 1)
|
|
918
918
|
]),
|
|
919
919
|
_: 2
|
|
920
920
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
@@ -923,13 +923,13 @@ const H = {
|
|
|
923
923
|
key: 3,
|
|
924
924
|
"data-testid": `${n.item.key}-json-array-content`
|
|
925
925
|
}, [
|
|
926
|
-
(p(!0), S(le, null, oe(e.item.value, (
|
|
927
|
-
key: `json-array-item-${
|
|
928
|
-
index:
|
|
926
|
+
(p(!0), S(le, null, oe(e.item.value, (h, x) => (p(), D(Wt, {
|
|
927
|
+
key: `json-array-item-${x}`,
|
|
928
|
+
index: x,
|
|
929
929
|
"is-array-item": "",
|
|
930
|
-
item:
|
|
930
|
+
item: h
|
|
931
931
|
}, null, 8, ["index", "item"]))), 128))
|
|
932
|
-
], 8, ai)) : (p(), D(
|
|
932
|
+
], 8, ai)) : (p(), D(F, {
|
|
933
933
|
key: 4,
|
|
934
934
|
text: A(I) ? e.item.value : ""
|
|
935
935
|
}, {
|
|
@@ -937,8 +937,8 @@ const H = {
|
|
|
937
937
|
N("span", {
|
|
938
938
|
ref_key: "textContent",
|
|
939
939
|
ref: y,
|
|
940
|
-
class:
|
|
941
|
-
},
|
|
940
|
+
class: ce(["attrs-data-text", { truncated: e.truncated }])
|
|
941
|
+
}, E(f.value.text), 3)
|
|
942
942
|
]),
|
|
943
943
|
_: 1
|
|
944
944
|
}, 8, ["text"]))
|
|
@@ -954,7 +954,7 @@ const H = {
|
|
|
954
954
|
]);
|
|
955
955
|
};
|
|
956
956
|
}
|
|
957
|
-
}), Jt = /* @__PURE__ */ ie(li, [["__scopeId", "data-v-761f7e64"]]),
|
|
957
|
+
}), Jt = /* @__PURE__ */ ie(li, [["__scopeId", "data-v-761f7e64"]]), si = { class: "json-config config-card-code-block" }, ci = {
|
|
958
958
|
key: 0,
|
|
959
959
|
class: "json-endpoint"
|
|
960
960
|
}, Gt = /* @__PURE__ */ W({
|
|
@@ -988,7 +988,7 @@ const H = {
|
|
|
988
988
|
Dt((i) => ({
|
|
989
989
|
"54aebfa2": `${r.value}ch`
|
|
990
990
|
}));
|
|
991
|
-
const t = e, n =
|
|
991
|
+
const t = e, n = T(() => t.entityRecord), r = T(() => {
|
|
992
992
|
var a;
|
|
993
993
|
if (!t.fetcherUrl)
|
|
994
994
|
return 0;
|
|
@@ -997,13 +997,13 @@ const H = {
|
|
|
997
997
|
});
|
|
998
998
|
return (i, o) => {
|
|
999
999
|
const a = U("KBadge"), l = U("KCodeBlock");
|
|
1000
|
-
return p(), S("div",
|
|
1001
|
-
t.fetcherUrl ? (p(), S("div",
|
|
1000
|
+
return p(), S("div", si, [
|
|
1001
|
+
t.fetcherUrl ? (p(), S("div", ci, [
|
|
1002
1002
|
M(a, {
|
|
1003
1003
|
appearance: t.requestMethod
|
|
1004
1004
|
}, {
|
|
1005
1005
|
default: k(() => [
|
|
1006
|
-
q(
|
|
1006
|
+
q(E(t.requestMethod), 1)
|
|
1007
1007
|
]),
|
|
1008
1008
|
_: 1
|
|
1009
1009
|
}, 8, ["appearance"]),
|
|
@@ -1018,7 +1018,7 @@ const H = {
|
|
|
1018
1018
|
t.entityRecord ? (p(), D(l, {
|
|
1019
1019
|
key: 1,
|
|
1020
1020
|
id: "json-codeblock",
|
|
1021
|
-
class:
|
|
1021
|
+
class: ce({ "json-content": t.fetcherUrl }),
|
|
1022
1022
|
code: JSON.stringify(n.value, null, 2),
|
|
1023
1023
|
language: "json",
|
|
1024
1024
|
theme: "dark"
|
|
@@ -1093,26 +1093,26 @@ function Ci(e, t) {
|
|
|
1093
1093
|
for (var n = /\r?\n|\r|\0/g, r = [0], i = [], o, a = -1; o = n.exec(e.buffer); )
|
|
1094
1094
|
i.push(o.index), r.push(o.index + o[0].length), e.position <= o.index && a < 0 && (a = r.length - 2);
|
|
1095
1095
|
a < 0 && (a = r.length - 1);
|
|
1096
|
-
var l = "",
|
|
1097
|
-
for (
|
|
1098
|
-
|
|
1096
|
+
var l = "", s, c, d = Math.min(e.line + t.linesAfter, i.length).toString().length, u = t.maxLength - (t.indent + d + 3);
|
|
1097
|
+
for (s = 1; s <= t.linesBefore && !(a - s < 0); s++)
|
|
1098
|
+
c = Pe(
|
|
1099
1099
|
e.buffer,
|
|
1100
|
-
r[a -
|
|
1101
|
-
i[a -
|
|
1102
|
-
e.position - (r[a] - r[a -
|
|
1100
|
+
r[a - s],
|
|
1101
|
+
i[a - s],
|
|
1102
|
+
e.position - (r[a] - r[a - s]),
|
|
1103
1103
|
u
|
|
1104
|
-
), l = Q.repeat(" ", t.indent) + qe((e.line -
|
|
1104
|
+
), l = Q.repeat(" ", t.indent) + qe((e.line - s + 1).toString(), d) + " | " + c.str + `
|
|
1105
1105
|
` + l;
|
|
1106
|
-
for (
|
|
1107
|
-
`, l += Q.repeat("-", t.indent + d + 3 +
|
|
1108
|
-
`,
|
|
1109
|
-
|
|
1106
|
+
for (c = Pe(e.buffer, r[a], i[a], e.position, u), l += Q.repeat(" ", t.indent) + qe((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1107
|
+
`, l += Q.repeat("-", t.indent + d + 3 + c.pos) + `^
|
|
1108
|
+
`, s = 1; s <= t.linesAfter && !(a + s >= i.length); s++)
|
|
1109
|
+
c = Pe(
|
|
1110
1110
|
e.buffer,
|
|
1111
|
-
r[a +
|
|
1112
|
-
i[a +
|
|
1113
|
-
e.position - (r[a] - r[a +
|
|
1111
|
+
r[a + s],
|
|
1112
|
+
i[a + s],
|
|
1113
|
+
e.position - (r[a] - r[a + s]),
|
|
1114
1114
|
u
|
|
1115
|
-
), l += Q.repeat(" ", t.indent) + qe((e.line +
|
|
1115
|
+
), l += Q.repeat(" ", t.indent) + qe((e.line + s + 1).toString(), d) + " | " + c.str + `
|
|
1116
1116
|
`;
|
|
1117
1117
|
return l.replace(/\n$/, "");
|
|
1118
1118
|
}
|
|
@@ -1440,14 +1440,14 @@ var ln = new X("tag:yaml.org,2002:float", {
|
|
|
1440
1440
|
predicate: Yi,
|
|
1441
1441
|
represent: Hi,
|
|
1442
1442
|
defaultStyle: "lowercase"
|
|
1443
|
-
}),
|
|
1443
|
+
}), sn = nn.extend({
|
|
1444
1444
|
implicit: [
|
|
1445
1445
|
rn,
|
|
1446
1446
|
an,
|
|
1447
1447
|
on,
|
|
1448
1448
|
ln
|
|
1449
1449
|
]
|
|
1450
|
-
}),
|
|
1450
|
+
}), cn = sn, un = new RegExp(
|
|
1451
1451
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1452
1452
|
), dn = new RegExp(
|
|
1453
1453
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
@@ -1456,16 +1456,16 @@ function Vi(e) {
|
|
|
1456
1456
|
return e === null ? !1 : un.exec(e) !== null || dn.exec(e) !== null;
|
|
1457
1457
|
}
|
|
1458
1458
|
function Wi(e) {
|
|
1459
|
-
var t, n, r, i, o, a, l,
|
|
1459
|
+
var t, n, r, i, o, a, l, s = 0, c = null, d, u, m;
|
|
1460
1460
|
if (t = un.exec(e), t === null && (t = dn.exec(e)), t === null) throw new Error("Date resolve error");
|
|
1461
1461
|
if (n = +t[1], r = +t[2] - 1, i = +t[3], !t[4])
|
|
1462
1462
|
return new Date(Date.UTC(n, r, i));
|
|
1463
1463
|
if (o = +t[4], a = +t[5], l = +t[6], t[7]) {
|
|
1464
|
-
for (
|
|
1465
|
-
|
|
1466
|
-
|
|
1464
|
+
for (s = t[7].slice(0, 3); s.length < 3; )
|
|
1465
|
+
s += "0";
|
|
1466
|
+
s = +s;
|
|
1467
1467
|
}
|
|
1468
|
-
return t[9] && (d = +t[10], u = +(t[11] || 0),
|
|
1468
|
+
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)), m = new Date(Date.UTC(n, r, i, o, a, l, s)), c && m.setTime(m.getTime() - c), m;
|
|
1469
1469
|
}
|
|
1470
1470
|
function Ji(e) {
|
|
1471
1471
|
return e.toISOString();
|
|
@@ -1561,7 +1561,7 @@ var gn = new X("tag:yaml.org,2002:pairs", {
|
|
|
1561
1561
|
resolve: aa,
|
|
1562
1562
|
construct: oa
|
|
1563
1563
|
}), la = Object.prototype.hasOwnProperty;
|
|
1564
|
-
function
|
|
1564
|
+
function sa(e) {
|
|
1565
1565
|
if (e === null) return !0;
|
|
1566
1566
|
var t, n = e;
|
|
1567
1567
|
for (t in n)
|
|
@@ -1569,14 +1569,14 @@ function ca(e) {
|
|
|
1569
1569
|
return !1;
|
|
1570
1570
|
return !0;
|
|
1571
1571
|
}
|
|
1572
|
-
function
|
|
1572
|
+
function ca(e) {
|
|
1573
1573
|
return e !== null ? e : {};
|
|
1574
1574
|
}
|
|
1575
1575
|
var yn = new X("tag:yaml.org,2002:set", {
|
|
1576
1576
|
kind: "mapping",
|
|
1577
|
-
resolve:
|
|
1578
|
-
construct:
|
|
1579
|
-
}), it =
|
|
1577
|
+
resolve: sa,
|
|
1578
|
+
construct: ca
|
|
1579
|
+
}), it = cn.extend({
|
|
1580
1580
|
implicit: [
|
|
1581
1581
|
fn,
|
|
1582
1582
|
pn
|
|
@@ -1591,7 +1591,7 @@ var yn = new X("tag:yaml.org,2002:set", {
|
|
|
1591
1591
|
function kt(e) {
|
|
1592
1592
|
return Object.prototype.toString.call(e);
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1594
|
+
function se(e) {
|
|
1595
1595
|
return e === 10 || e === 13;
|
|
1596
1596
|
}
|
|
1597
1597
|
function me(e) {
|
|
@@ -1640,7 +1640,7 @@ function _n(e, t) {
|
|
|
1640
1640
|
};
|
|
1641
1641
|
return n.snippet = ki(n), new ne(t, n);
|
|
1642
1642
|
}
|
|
1643
|
-
function
|
|
1643
|
+
function _(e, t) {
|
|
1644
1644
|
throw _n(e, t);
|
|
1645
1645
|
}
|
|
1646
1646
|
function Re(e, t) {
|
|
@@ -1649,15 +1649,15 @@ function Re(e, t) {
|
|
|
1649
1649
|
var _t = {
|
|
1650
1650
|
YAML: function(t, n, r) {
|
|
1651
1651
|
var i, o, a;
|
|
1652
|
-
t.version !== null &&
|
|
1652
|
+
t.version !== null && _(t, "duplication of %YAML directive"), r.length !== 1 && _(t, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(r[0]), i === null && _(t, "ill-formed argument of the YAML directive"), o = parseInt(i[1], 10), a = parseInt(i[2], 10), o !== 1 && _(t, "unacceptable YAML version of the document"), t.version = r[0], t.checkLineBreaks = a < 2, a !== 1 && a !== 2 && Re(t, "unsupported YAML version of the document");
|
|
1653
1653
|
},
|
|
1654
1654
|
TAG: function(t, n, r) {
|
|
1655
1655
|
var i, o;
|
|
1656
|
-
r.length !== 2 &&
|
|
1656
|
+
r.length !== 2 && _(t, "TAG directive accepts exactly two arguments"), i = r[0], o = r[1], xn.test(i) || _(t, "ill-formed tag handle (first argument) of the TAG directive"), pe.call(t.tagMap, i) && _(t, 'there is a previously declared suffix for "' + i + '" tag handle'), Cn.test(o) || _(t, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1657
1657
|
try {
|
|
1658
1658
|
o = decodeURIComponent(o);
|
|
1659
1659
|
} catch {
|
|
1660
|
-
|
|
1660
|
+
_(t, "tag prefix is malformed: " + o);
|
|
1661
1661
|
}
|
|
1662
1662
|
t.tagMap[i] = o;
|
|
1663
1663
|
}
|
|
@@ -1667,29 +1667,29 @@ function fe(e, t, n, r) {
|
|
|
1667
1667
|
if (t < n) {
|
|
1668
1668
|
if (l = e.input.slice(t, n), r)
|
|
1669
1669
|
for (i = 0, o = l.length; i < o; i += 1)
|
|
1670
|
-
a = l.charCodeAt(i), a === 9 || 32 <= a && a <= 1114111 ||
|
|
1671
|
-
else da.test(l) &&
|
|
1670
|
+
a = l.charCodeAt(i), a === 9 || 32 <= a && a <= 1114111 || _(e, "expected valid JSON character");
|
|
1671
|
+
else da.test(l) && _(e, "the stream contains non-printable characters");
|
|
1672
1672
|
e.result += l;
|
|
1673
1673
|
}
|
|
1674
1674
|
}
|
|
1675
1675
|
function wt(e, t, n, r) {
|
|
1676
1676
|
var i, o, a, l;
|
|
1677
|
-
for (Q.isObject(n) ||
|
|
1677
|
+
for (Q.isObject(n) || _(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(n), a = 0, l = i.length; a < l; a += 1)
|
|
1678
1678
|
o = i[a], pe.call(t, o) || (t[o] = n[o], r[o] = !0);
|
|
1679
1679
|
}
|
|
1680
|
-
function xe(e, t, n, r, i, o, a, l,
|
|
1681
|
-
var
|
|
1680
|
+
function xe(e, t, n, r, i, o, a, l, s) {
|
|
1681
|
+
var c, d;
|
|
1682
1682
|
if (Array.isArray(i))
|
|
1683
|
-
for (i = Array.prototype.slice.call(i),
|
|
1684
|
-
Array.isArray(i[
|
|
1683
|
+
for (i = Array.prototype.slice.call(i), c = 0, d = i.length; c < d; c += 1)
|
|
1684
|
+
Array.isArray(i[c]) && _(e, "nested arrays are not supported inside keys"), typeof i == "object" && kt(i[c]) === "[object Object]" && (i[c] = "[object Object]");
|
|
1685
1685
|
if (typeof i == "object" && kt(i) === "[object Object]" && (i = "[object Object]"), i = String(i), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1686
1686
|
if (Array.isArray(o))
|
|
1687
|
-
for (
|
|
1688
|
-
wt(e, t, o[
|
|
1687
|
+
for (c = 0, d = o.length; c < d; c += 1)
|
|
1688
|
+
wt(e, t, o[c], n);
|
|
1689
1689
|
else
|
|
1690
1690
|
wt(e, t, o, n);
|
|
1691
1691
|
else
|
|
1692
|
-
!e.json && !pe.call(n, i) && pe.call(t, i) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position =
|
|
1692
|
+
!e.json && !pe.call(n, i) && pe.call(t, i) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, _(e, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(t, i, {
|
|
1693
1693
|
configurable: !0,
|
|
1694
1694
|
enumerable: !0,
|
|
1695
1695
|
writable: !0,
|
|
@@ -1699,9 +1699,9 @@ function xe(e, t, n, r, i, o, a, l, c) {
|
|
|
1699
1699
|
}
|
|
1700
1700
|
function at(e) {
|
|
1701
1701
|
var t;
|
|
1702
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1702
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : _(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1703
1703
|
}
|
|
1704
|
-
function
|
|
1704
|
+
function z(e, t, n) {
|
|
1705
1705
|
for (var r = 0, i = e.input.charCodeAt(e.position); i !== 0; ) {
|
|
1706
1706
|
for (; me(i); )
|
|
1707
1707
|
i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
|
|
@@ -1709,7 +1709,7 @@ function G(e, t, n) {
|
|
|
1709
1709
|
do
|
|
1710
1710
|
i = e.input.charCodeAt(++e.position);
|
|
1711
1711
|
while (i !== 10 && i !== 13 && i !== 0);
|
|
1712
|
-
if (
|
|
1712
|
+
if (se(i))
|
|
1713
1713
|
for (at(e), i = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; i === 32; )
|
|
1714
1714
|
e.lineIndent++, i = e.input.charCodeAt(++e.position);
|
|
1715
1715
|
else
|
|
@@ -1726,7 +1726,7 @@ function ot(e, t) {
|
|
|
1726
1726
|
`, t - 1));
|
|
1727
1727
|
}
|
|
1728
1728
|
function ba(e, t, n) {
|
|
1729
|
-
var r, i, o, a, l,
|
|
1729
|
+
var r, i, o, a, l, s, c, d, u = e.kind, m = e.result, f;
|
|
1730
1730
|
if (f = e.input.charCodeAt(e.position), re(f) || be(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (i = e.input.charCodeAt(e.position + 1), re(i) || n && be(i)))
|
|
1731
1731
|
return !1;
|
|
1732
1732
|
for (e.kind = "scalar", e.result = "", o = a = e.position, l = !1; f !== 0; ) {
|
|
@@ -1739,16 +1739,16 @@ function ba(e, t, n) {
|
|
|
1739
1739
|
} else {
|
|
1740
1740
|
if (e.position === e.lineStart && je(e) || n && be(f))
|
|
1741
1741
|
break;
|
|
1742
|
-
if (
|
|
1743
|
-
if (
|
|
1742
|
+
if (se(f))
|
|
1743
|
+
if (s = e.line, c = e.lineStart, d = e.lineIndent, z(e, !1, -1), e.lineIndent >= t) {
|
|
1744
1744
|
l = !0, f = e.input.charCodeAt(e.position);
|
|
1745
1745
|
continue;
|
|
1746
1746
|
} else {
|
|
1747
|
-
e.position = a, e.line =
|
|
1747
|
+
e.position = a, e.line = s, e.lineStart = c, e.lineIndent = d;
|
|
1748
1748
|
break;
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
|
-
l && (fe(e, o, a, !1), ot(e, e.line -
|
|
1751
|
+
l && (fe(e, o, a, !1), ot(e, e.line - s), o = a = e.position, l = !1), me(f) || (a = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1752
1752
|
}
|
|
1753
1753
|
return fe(e, o, a, !1), e.result ? !0 : (e.kind = u, e.result = m, !1);
|
|
1754
1754
|
}
|
|
@@ -1762,8 +1762,8 @@ function xa(e, t) {
|
|
|
1762
1762
|
r = e.position, e.position++, i = e.position;
|
|
1763
1763
|
else
|
|
1764
1764
|
return !0;
|
|
1765
|
-
else
|
|
1766
|
-
|
|
1765
|
+
else se(n) ? (fe(e, r, i, !0), ot(e, z(e, !1, t)), r = i = e.position) : e.position === e.lineStart && je(e) ? _(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
1766
|
+
_(e, "unexpected end of the stream within a single quoted scalar");
|
|
1767
1767
|
}
|
|
1768
1768
|
function Ca(e, t) {
|
|
1769
1769
|
var n, r, i, o, a, l;
|
|
@@ -1773,23 +1773,23 @@ function Ca(e, t) {
|
|
|
1773
1773
|
if (l === 34)
|
|
1774
1774
|
return fe(e, n, e.position, !0), e.position++, !0;
|
|
1775
1775
|
if (l === 92) {
|
|
1776
|
-
if (fe(e, n, e.position, !0), l = e.input.charCodeAt(++e.position),
|
|
1777
|
-
|
|
1776
|
+
if (fe(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), se(l))
|
|
1777
|
+
z(e, !1, t);
|
|
1778
1778
|
else if (l < 256 && kn[l])
|
|
1779
1779
|
e.result += An[l], e.position++;
|
|
1780
1780
|
else if ((a = ha(l)) > 0) {
|
|
1781
1781
|
for (i = a, o = 0; i > 0; i--)
|
|
1782
|
-
l = e.input.charCodeAt(++e.position), (a = ma(l)) >= 0 ? o = (o << 4) + a :
|
|
1782
|
+
l = e.input.charCodeAt(++e.position), (a = ma(l)) >= 0 ? o = (o << 4) + a : _(e, "expected hexadecimal character");
|
|
1783
1783
|
e.result += ya(o), e.position++;
|
|
1784
1784
|
} else
|
|
1785
|
-
|
|
1785
|
+
_(e, "unknown escape sequence");
|
|
1786
1786
|
n = r = e.position;
|
|
1787
|
-
} else
|
|
1787
|
+
} else se(l) ? (fe(e, n, r, !0), ot(e, z(e, !1, t)), n = r = e.position) : e.position === e.lineStart && je(e) ? _(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1788
1788
|
}
|
|
1789
|
-
|
|
1789
|
+
_(e, "unexpected end of the stream within a double quoted scalar");
|
|
1790
1790
|
}
|
|
1791
1791
|
function ka(e, t) {
|
|
1792
|
-
var n = !0, r, i, o, a = e.tag, l,
|
|
1792
|
+
var n = !0, r, i, o, a = e.tag, l, s = e.anchor, c, d, u, m, f, v = /* @__PURE__ */ Object.create(null), y, C, I, b;
|
|
1793
1793
|
if (b = e.input.charCodeAt(e.position), b === 91)
|
|
1794
1794
|
d = 93, f = !1, l = [];
|
|
1795
1795
|
else if (b === 123)
|
|
@@ -1797,14 +1797,14 @@ function ka(e, t) {
|
|
|
1797
1797
|
else
|
|
1798
1798
|
return !1;
|
|
1799
1799
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), b = e.input.charCodeAt(++e.position); b !== 0; ) {
|
|
1800
|
-
if (
|
|
1801
|
-
return e.position++, e.tag = a, e.anchor =
|
|
1802
|
-
n ? b === 44 &&
|
|
1800
|
+
if (z(e, !0, t), b = e.input.charCodeAt(e.position), b === d)
|
|
1801
|
+
return e.position++, e.tag = a, e.anchor = s, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1802
|
+
n ? b === 44 && _(e, "expected the node content, but found ','") : _(e, "missed comma between flow collection entries"), C = y = I = null, u = m = !1, b === 63 && (c = e.input.charCodeAt(e.position + 1), re(c) && (u = m = !0, e.position++, z(e, !0, t))), r = e.line, i = e.lineStart, o = e.position, ke(e, t, Oe, !1, !0), C = e.tag, y = e.result, z(e, !0, t), b = e.input.charCodeAt(e.position), (m || e.line === r) && b === 58 && (u = !0, b = e.input.charCodeAt(++e.position), z(e, !0, t), ke(e, t, Oe, !1, !0), I = e.result), f ? xe(e, l, v, C, y, I, r, i, o) : u ? l.push(xe(e, null, v, C, y, I, r, i, o)) : l.push(y), z(e, !0, t), b = e.input.charCodeAt(e.position), b === 44 ? (n = !0, b = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1803
1803
|
}
|
|
1804
|
-
|
|
1804
|
+
_(e, "unexpected end of the stream within a flow collection");
|
|
1805
1805
|
}
|
|
1806
1806
|
function Aa(e, t) {
|
|
1807
|
-
var n, r, i = He, o = !1, a = !1, l = t,
|
|
1807
|
+
var n, r, i = He, o = !1, a = !1, l = t, s = 0, c = !1, d, u;
|
|
1808
1808
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
1809
1809
|
r = !1;
|
|
1810
1810
|
else if (u === 62)
|
|
@@ -1813,9 +1813,9 @@ function Aa(e, t) {
|
|
|
1813
1813
|
return !1;
|
|
1814
1814
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1815
1815
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1816
|
-
He === i ? i = u === 43 ? Ct : ua :
|
|
1816
|
+
He === i ? i = u === 43 ? Ct : ua : _(e, "repeat of a chomping mode identifier");
|
|
1817
1817
|
else if ((d = ga(u)) >= 0)
|
|
1818
|
-
d === 0 ?
|
|
1818
|
+
d === 0 ? _(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? _(e, "repeat of an indentation width identifier") : (l = t + d - 1, a = !0);
|
|
1819
1819
|
else
|
|
1820
1820
|
break;
|
|
1821
1821
|
if (me(u)) {
|
|
@@ -1825,120 +1825,120 @@ function Aa(e, t) {
|
|
|
1825
1825
|
if (u === 35)
|
|
1826
1826
|
do
|
|
1827
1827
|
u = e.input.charCodeAt(++e.position);
|
|
1828
|
-
while (!
|
|
1828
|
+
while (!se(u) && u !== 0);
|
|
1829
1829
|
}
|
|
1830
1830
|
for (; u !== 0; ) {
|
|
1831
1831
|
for (at(e), e.lineIndent = 0, u = e.input.charCodeAt(e.position); (!a || e.lineIndent < l) && u === 32; )
|
|
1832
1832
|
e.lineIndent++, u = e.input.charCodeAt(++e.position);
|
|
1833
|
-
if (!a && e.lineIndent > l && (l = e.lineIndent),
|
|
1834
|
-
|
|
1833
|
+
if (!a && e.lineIndent > l && (l = e.lineIndent), se(u)) {
|
|
1834
|
+
s++;
|
|
1835
1835
|
continue;
|
|
1836
1836
|
}
|
|
1837
1837
|
if (e.lineIndent < l) {
|
|
1838
1838
|
i === Ct ? e.result += Q.repeat(`
|
|
1839
|
-
`, o ? 1 +
|
|
1839
|
+
`, o ? 1 + s : s) : i === He && o && (e.result += `
|
|
1840
1840
|
`);
|
|
1841
1841
|
break;
|
|
1842
1842
|
}
|
|
1843
|
-
for (r ? me(u) ? (
|
|
1844
|
-
`, o ? 1 +
|
|
1845
|
-
`,
|
|
1846
|
-
`,
|
|
1847
|
-
`, o ? 1 +
|
|
1843
|
+
for (r ? me(u) ? (c = !0, e.result += Q.repeat(`
|
|
1844
|
+
`, o ? 1 + s : s)) : c ? (c = !1, e.result += Q.repeat(`
|
|
1845
|
+
`, s + 1)) : s === 0 ? o && (e.result += " ") : e.result += Q.repeat(`
|
|
1846
|
+
`, s) : e.result += Q.repeat(`
|
|
1847
|
+
`, o ? 1 + s : s), o = !0, a = !0, s = 0, n = e.position; !se(u) && u !== 0; )
|
|
1848
1848
|
u = e.input.charCodeAt(++e.position);
|
|
1849
1849
|
fe(e, n, e.position, !1);
|
|
1850
1850
|
}
|
|
1851
1851
|
return !0;
|
|
1852
1852
|
}
|
|
1853
1853
|
function St(e, t) {
|
|
1854
|
-
var n, r = e.tag, i = e.anchor, o = [], a, l = !1,
|
|
1854
|
+
var n, r = e.tag, i = e.anchor, o = [], a, l = !1, s;
|
|
1855
1855
|
if (e.firstTabInLine !== -1) return !1;
|
|
1856
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o),
|
|
1857
|
-
if (l = !0, e.position++,
|
|
1858
|
-
o.push(null),
|
|
1856
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, _(e, "tab characters must not be used in indentation")), !(s !== 45 || (a = e.input.charCodeAt(e.position + 1), !re(a)))); ) {
|
|
1857
|
+
if (l = !0, e.position++, z(e, !0, -1) && e.lineIndent <= t) {
|
|
1858
|
+
o.push(null), s = e.input.charCodeAt(e.position);
|
|
1859
1859
|
continue;
|
|
1860
1860
|
}
|
|
1861
|
-
if (n = e.line, ke(e, t, bn, !1, !0), o.push(e.result),
|
|
1862
|
-
|
|
1861
|
+
if (n = e.line, ke(e, t, bn, !1, !0), o.push(e.result), z(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
1862
|
+
_(e, "bad indentation of a sequence entry");
|
|
1863
1863
|
else if (e.lineIndent < t)
|
|
1864
1864
|
break;
|
|
1865
1865
|
}
|
|
1866
1866
|
return l ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1867
1867
|
}
|
|
1868
1868
|
function _a(e, t, n) {
|
|
1869
|
-
var r, i, o, a, l,
|
|
1869
|
+
var r, i, o, a, l, s, c = e.tag, d = e.anchor, u = {}, m = /* @__PURE__ */ Object.create(null), f = null, v = null, y = null, C = !1, I = !1, b;
|
|
1870
1870
|
if (e.firstTabInLine !== -1) return !1;
|
|
1871
1871
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), b = e.input.charCodeAt(e.position); b !== 0; ) {
|
|
1872
|
-
if (!C && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1873
|
-
b === 63 ? (C && (xe(e, u, m, f, v, null, a, l,
|
|
1872
|
+
if (!C && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, _(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (b === 63 || b === 58) && re(r))
|
|
1873
|
+
b === 63 ? (C && (xe(e, u, m, f, v, null, a, l, s), f = v = y = null), I = !0, C = !0, i = !0) : C ? (C = !1, i = !0) : _(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, b = r;
|
|
1874
1874
|
else {
|
|
1875
|
-
if (a = e.line, l = e.lineStart,
|
|
1875
|
+
if (a = e.line, l = e.lineStart, s = e.position, !ke(e, n, vn, !1, !0))
|
|
1876
1876
|
break;
|
|
1877
1877
|
if (e.line === o) {
|
|
1878
1878
|
for (b = e.input.charCodeAt(e.position); me(b); )
|
|
1879
1879
|
b = e.input.charCodeAt(++e.position);
|
|
1880
1880
|
if (b === 58)
|
|
1881
|
-
b = e.input.charCodeAt(++e.position), re(b) ||
|
|
1881
|
+
b = e.input.charCodeAt(++e.position), re(b) || _(e, "a whitespace character is expected after the key-value separator within a block mapping"), C && (xe(e, u, m, f, v, null, a, l, s), f = v = y = null), I = !0, C = !1, i = !1, f = e.tag, v = e.result;
|
|
1882
1882
|
else if (I)
|
|
1883
|
-
|
|
1883
|
+
_(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1884
1884
|
else
|
|
1885
|
-
return e.tag =
|
|
1885
|
+
return e.tag = c, e.anchor = d, !0;
|
|
1886
1886
|
} else if (I)
|
|
1887
|
-
|
|
1887
|
+
_(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1888
1888
|
else
|
|
1889
|
-
return e.tag =
|
|
1889
|
+
return e.tag = c, e.anchor = d, !0;
|
|
1890
1890
|
}
|
|
1891
|
-
if ((e.line === o || e.lineIndent > t) && (C && (a = e.line, l = e.lineStart,
|
|
1892
|
-
|
|
1891
|
+
if ((e.line === o || e.lineIndent > t) && (C && (a = e.line, l = e.lineStart, s = e.position), ke(e, t, Le, !0, i) && (C ? v = e.result : y = e.result), C || (xe(e, u, m, f, v, y, a, l, s), f = v = y = null), z(e, !0, -1), b = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && b !== 0)
|
|
1892
|
+
_(e, "bad indentation of a mapping entry");
|
|
1893
1893
|
else if (e.lineIndent < t)
|
|
1894
1894
|
break;
|
|
1895
1895
|
}
|
|
1896
|
-
return C && xe(e, u, m, f, v, null, a, l,
|
|
1896
|
+
return C && xe(e, u, m, f, v, null, a, l, s), I && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), I;
|
|
1897
1897
|
}
|
|
1898
1898
|
function wa(e) {
|
|
1899
1899
|
var t, n = !1, r = !1, i, o, a;
|
|
1900
1900
|
if (a = e.input.charCodeAt(e.position), a !== 33) return !1;
|
|
1901
|
-
if (e.tag !== null &&
|
|
1901
|
+
if (e.tag !== null && _(e, "duplication of a tag property"), a = e.input.charCodeAt(++e.position), a === 60 ? (n = !0, a = e.input.charCodeAt(++e.position)) : a === 33 ? (r = !0, i = "!!", a = e.input.charCodeAt(++e.position)) : i = "!", t = e.position, n) {
|
|
1902
1902
|
do
|
|
1903
1903
|
a = e.input.charCodeAt(++e.position);
|
|
1904
1904
|
while (a !== 0 && a !== 62);
|
|
1905
|
-
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) :
|
|
1905
|
+
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) : _(e, "unexpected end of the stream within a verbatim tag");
|
|
1906
1906
|
} else {
|
|
1907
1907
|
for (; a !== 0 && !re(a); )
|
|
1908
|
-
a === 33 && (r ?
|
|
1909
|
-
o = e.input.slice(t, e.position), pa.test(o) &&
|
|
1908
|
+
a === 33 && (r ? _(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(t - 1, e.position + 1), xn.test(i) || _(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
1909
|
+
o = e.input.slice(t, e.position), pa.test(o) && _(e, "tag suffix cannot contain flow indicator characters");
|
|
1910
1910
|
}
|
|
1911
|
-
o && !Cn.test(o) &&
|
|
1911
|
+
o && !Cn.test(o) && _(e, "tag name cannot contain such characters: " + o);
|
|
1912
1912
|
try {
|
|
1913
1913
|
o = decodeURIComponent(o);
|
|
1914
1914
|
} catch {
|
|
1915
|
-
|
|
1915
|
+
_(e, "tag name is malformed: " + o);
|
|
1916
1916
|
}
|
|
1917
|
-
return n ? e.tag = o : pe.call(e.tagMap, i) ? e.tag = e.tagMap[i] + o : i === "!" ? e.tag = "!" + o : i === "!!" ? e.tag = "tag:yaml.org,2002:" + o :
|
|
1917
|
+
return n ? e.tag = o : pe.call(e.tagMap, i) ? e.tag = e.tagMap[i] + o : i === "!" ? e.tag = "!" + o : i === "!!" ? e.tag = "tag:yaml.org,2002:" + o : _(e, 'undeclared tag handle "' + i + '"'), !0;
|
|
1918
1918
|
}
|
|
1919
1919
|
function Sa(e) {
|
|
1920
1920
|
var t, n;
|
|
1921
1921
|
if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
|
|
1922
|
-
for (e.anchor !== null &&
|
|
1922
|
+
for (e.anchor !== null && _(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !re(n) && !be(n); )
|
|
1923
1923
|
n = e.input.charCodeAt(++e.position);
|
|
1924
|
-
return e.position === t &&
|
|
1924
|
+
return e.position === t && _(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1925
1925
|
}
|
|
1926
1926
|
function $a(e) {
|
|
1927
1927
|
var t, n, r;
|
|
1928
1928
|
if (r = e.input.charCodeAt(e.position), r !== 42) return !1;
|
|
1929
1929
|
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !re(r) && !be(r); )
|
|
1930
1930
|
r = e.input.charCodeAt(++e.position);
|
|
1931
|
-
return e.position === t &&
|
|
1931
|
+
return e.position === t && _(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), pe.call(e.anchorMap, n) || _(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], z(e, !0, -1), !0;
|
|
1932
1932
|
}
|
|
1933
1933
|
function ke(e, t, n, r, i) {
|
|
1934
|
-
var o, a, l,
|
|
1935
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = Le === n || bn === n, r &&
|
|
1934
|
+
var o, a, l, s = 1, c = !1, d = !1, u, m, f, v, y, C;
|
|
1935
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = Le === n || bn === n, r && z(e, !0, -1) && (c = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
1936
1936
|
for (; wa(e) || Sa(e); )
|
|
1937
|
-
|
|
1938
|
-
if (l && (l =
|
|
1937
|
+
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;
|
|
1938
|
+
if (l && (l = c || i), (s === 1 || Le === n) && (Oe === n || vn === n ? y = t : y = t + 1, C = e.position - e.lineStart, s === 1 ? l && (St(e, C) || _a(e, C, y)) || ka(e, y) ? d = !0 : (a && Aa(e, y) || xa(e, y) || Ca(e, y) ? d = !0 : $a(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && _(e, "alias node should not have any properties")) : ba(e, y, Oe === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && St(e, C))), e.tag === null)
|
|
1939
1939
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1940
1940
|
else if (e.tag === "?") {
|
|
1941
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
1941
|
+
for (e.result !== null && e.kind !== "scalar" && _(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, m = e.implicitTypes.length; u < m; u += 1)
|
|
1942
1942
|
if (v = e.implicitTypes[u], v.resolve(e.result)) {
|
|
1943
1943
|
e.result = v.construct(e.result), e.tag = v.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1944
1944
|
break;
|
|
@@ -1952,37 +1952,37 @@ function ke(e, t, n, r, i) {
|
|
|
1952
1952
|
v = f[u];
|
|
1953
1953
|
break;
|
|
1954
1954
|
}
|
|
1955
|
-
v ||
|
|
1955
|
+
v || _(e, "unknown tag !<" + e.tag + ">"), e.result !== null && v.kind !== e.kind && _(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + v.kind + '", not "' + e.kind + '"'), v.resolve(e.result, e.tag) ? (e.result = v.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : _(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1956
1956
|
}
|
|
1957
1957
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
1958
1958
|
}
|
|
1959
1959
|
function Ta(e) {
|
|
1960
1960
|
var t = e.position, n, r, i, o = !1, a;
|
|
1961
|
-
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 && (
|
|
1961
|
+
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)); ) {
|
|
1962
1962
|
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !re(a); )
|
|
1963
1963
|
a = e.input.charCodeAt(++e.position);
|
|
1964
|
-
for (r = e.input.slice(n, e.position), i = [], r.length < 1 &&
|
|
1964
|
+
for (r = e.input.slice(n, e.position), i = [], r.length < 1 && _(e, "directive name must not be less than one character in length"); a !== 0; ) {
|
|
1965
1965
|
for (; me(a); )
|
|
1966
1966
|
a = e.input.charCodeAt(++e.position);
|
|
1967
1967
|
if (a === 35) {
|
|
1968
1968
|
do
|
|
1969
1969
|
a = e.input.charCodeAt(++e.position);
|
|
1970
|
-
while (a !== 0 && !
|
|
1970
|
+
while (a !== 0 && !se(a));
|
|
1971
1971
|
break;
|
|
1972
1972
|
}
|
|
1973
|
-
if (
|
|
1973
|
+
if (se(a)) break;
|
|
1974
1974
|
for (n = e.position; a !== 0 && !re(a); )
|
|
1975
1975
|
a = e.input.charCodeAt(++e.position);
|
|
1976
1976
|
i.push(e.input.slice(n, e.position));
|
|
1977
1977
|
}
|
|
1978
1978
|
a !== 0 && at(e), pe.call(_t, r) ? _t[r](e, r, i) : Re(e, 'unknown document directive "' + r + '"');
|
|
1979
1979
|
}
|
|
1980
|
-
if (
|
|
1981
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
1980
|
+
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 && _(e, "directives end mark is expected"), ke(e, e.lineIndent - 1, Le, !1, !0), z(e, !0, -1), e.checkLineBreaks && fa.test(e.input.slice(t, e.position)) && Re(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && je(e)) {
|
|
1981
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, z(e, !0, -1));
|
|
1982
1982
|
return;
|
|
1983
1983
|
}
|
|
1984
1984
|
if (e.position < e.length - 1)
|
|
1985
|
-
|
|
1985
|
+
_(e, "end of the stream or a document separator is expected");
|
|
1986
1986
|
else
|
|
1987
1987
|
return;
|
|
1988
1988
|
}
|
|
@@ -1990,7 +1990,7 @@ function wn(e, t) {
|
|
|
1990
1990
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
1991
1991
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
1992
1992
|
var n = new va(e, t), r = e.indexOf("\0");
|
|
1993
|
-
for (r !== -1 && (n.position = r,
|
|
1993
|
+
for (r !== -1 && (n.position = r, _(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
1994
1994
|
n.lineIndent += 1, n.position += 1;
|
|
1995
1995
|
for (; n.position < n.length - 1; )
|
|
1996
1996
|
Ta(n);
|
|
@@ -2050,10 +2050,10 @@ var Ga = [
|
|
|
2050
2050
|
"OFF"
|
|
2051
2051
|
], za = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2052
2052
|
function Qa(e, t) {
|
|
2053
|
-
var n, r, i, o, a, l,
|
|
2053
|
+
var n, r, i, o, a, l, s;
|
|
2054
2054
|
if (t === null) return {};
|
|
2055
2055
|
for (n = {}, r = Object.keys(t), i = 0, o = r.length; i < o; i += 1)
|
|
2056
|
-
a = r[i], l = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)),
|
|
2056
|
+
a = r[i], l = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), s = e.compiledTypeMap.fallback[a], s && Tn.call(s.styleAliases, l) && (l = s.styleAliases[l]), n[a] = l;
|
|
2057
2057
|
return n;
|
|
2058
2058
|
}
|
|
2059
2059
|
function Za(e) {
|
|
@@ -2125,23 +2125,23 @@ function Rn(e) {
|
|
|
2125
2125
|
}
|
|
2126
2126
|
var Bn = 1, Qe = 2, Kn = 3, Nn = 4, ve = 5;
|
|
2127
2127
|
function io(e, t, n, r, i, o, a, l) {
|
|
2128
|
-
var
|
|
2128
|
+
var s, c = 0, d = null, u = !1, m = !1, f = r !== -1, v = -1, y = no(_e(e, 0)) && ro(_e(e, e.length - 1));
|
|
2129
2129
|
if (t || a)
|
|
2130
|
-
for (
|
|
2131
|
-
if (
|
|
2130
|
+
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2131
|
+
if (c = _e(e, s), !Te(c))
|
|
2132
2132
|
return ve;
|
|
2133
|
-
y = y && It(
|
|
2133
|
+
y = y && It(c, d, l), d = c;
|
|
2134
2134
|
}
|
|
2135
2135
|
else {
|
|
2136
|
-
for (
|
|
2137
|
-
if (
|
|
2136
|
+
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2137
|
+
if (c = _e(e, s), c === Se)
|
|
2138
2138
|
u = !0, f && (m = m || // Foldable line = too long, and not more-indented.
|
|
2139
|
-
|
|
2140
|
-
else if (!Te(
|
|
2139
|
+
s - v - 1 > r && e[v + 1] !== " ", v = s);
|
|
2140
|
+
else if (!Te(c))
|
|
2141
2141
|
return ve;
|
|
2142
|
-
y = y && It(
|
|
2142
|
+
y = y && It(c, d, l), d = c;
|
|
2143
2143
|
}
|
|
2144
|
-
m = m || f &&
|
|
2144
|
+
m = m || f && s - v - 1 > r && e[v + 1] !== " ";
|
|
2145
2145
|
}
|
|
2146
2146
|
return !u && !m ? y && !a && !i(e) ? Bn : o === $e ? ve : Qe : n > 9 && Rn(e) ? ve : a ? o === $e ? ve : Qe : m ? Nn : Kn;
|
|
2147
2147
|
}
|
|
@@ -2152,15 +2152,15 @@ function ao(e, t, n, r, i) {
|
|
|
2152
2152
|
if (!e.noCompatMode && (Ga.indexOf(t) !== -1 || za.test(t)))
|
|
2153
2153
|
return e.quotingType === $e ? '"' + t + '"' : "'" + t + "'";
|
|
2154
2154
|
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2155
|
-
function c
|
|
2156
|
-
return to(e,
|
|
2155
|
+
function s(c) {
|
|
2156
|
+
return to(e, c);
|
|
2157
2157
|
}
|
|
2158
2158
|
switch (io(
|
|
2159
2159
|
t,
|
|
2160
2160
|
l,
|
|
2161
2161
|
e.indent,
|
|
2162
2162
|
a,
|
|
2163
|
-
|
|
2163
|
+
s,
|
|
2164
2164
|
e.quotingType,
|
|
2165
2165
|
e.forceQuotes && !r,
|
|
2166
2166
|
i
|
|
@@ -2194,72 +2194,72 @@ function Ft(e) {
|
|
|
2194
2194
|
}
|
|
2195
2195
|
function oo(e, t) {
|
|
2196
2196
|
for (var n = /(\n+)([^\n]*)/g, r = function() {
|
|
2197
|
-
var
|
|
2197
|
+
var c = e.indexOf(`
|
|
2198
2198
|
`);
|
|
2199
|
-
return
|
|
2199
|
+
return c = c !== -1 ? c : e.length, n.lastIndex = c, Ot(e.slice(0, c), t);
|
|
2200
2200
|
}(), i = e[0] === `
|
|
2201
2201
|
` || e[0] === " ", o, a; a = n.exec(e); ) {
|
|
2202
|
-
var l = a[1],
|
|
2203
|
-
o =
|
|
2204
|
-
` : "") + Ot(
|
|
2202
|
+
var l = a[1], s = a[2];
|
|
2203
|
+
o = s[0] === " ", r += l + (!i && !o && s !== "" ? `
|
|
2204
|
+
` : "") + Ot(s, t), i = o;
|
|
2205
2205
|
}
|
|
2206
2206
|
return r;
|
|
2207
2207
|
}
|
|
2208
2208
|
function Ot(e, t) {
|
|
2209
2209
|
if (e === "" || e[0] === " ") return e;
|
|
2210
|
-
for (var n = / [^ ]/g, r, i = 0, o, a = 0, l = 0,
|
|
2211
|
-
l = r.index, l - i > t && (o = a > i ? a : l,
|
|
2210
|
+
for (var n = / [^ ]/g, r, i = 0, o, a = 0, l = 0, s = ""; r = n.exec(e); )
|
|
2211
|
+
l = r.index, l - i > t && (o = a > i ? a : l, s += `
|
|
2212
2212
|
` + e.slice(i, o), i = o + 1), a = l;
|
|
2213
|
-
return
|
|
2214
|
-
`, e.length - i > t && a > i ?
|
|
2215
|
-
` + e.slice(a + 1) :
|
|
2213
|
+
return s += `
|
|
2214
|
+
`, e.length - i > t && a > i ? s += e.slice(i, a) + `
|
|
2215
|
+
` + e.slice(a + 1) : s += e.slice(i), s.slice(1);
|
|
2216
2216
|
}
|
|
2217
2217
|
function lo(e) {
|
|
2218
2218
|
for (var t = "", n = 0, r, i = 0; i < e.length; n >= 65536 ? i += 2 : i++)
|
|
2219
2219
|
n = _e(e, i), r = ee[n], !r && Te(n) ? (t += e[i], n >= 65536 && (t += e[i + 1])) : t += r || Za(n);
|
|
2220
2220
|
return t;
|
|
2221
2221
|
}
|
|
2222
|
-
function
|
|
2222
|
+
function so(e, t, n) {
|
|
2223
2223
|
var r = "", i = e.tag, o, a, l;
|
|
2224
2224
|
for (o = 0, a = n.length; o < a; o += 1)
|
|
2225
2225
|
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), (ue(e, t, l, !1, !1) || typeof l > "u" && ue(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2226
2226
|
e.tag = i, e.dump = "[" + r + "]";
|
|
2227
2227
|
}
|
|
2228
2228
|
function Lt(e, t, n, r) {
|
|
2229
|
-
var i = "", o = e.tag, a, l,
|
|
2229
|
+
var i = "", o = e.tag, a, l, s;
|
|
2230
2230
|
for (a = 0, l = n.length; a < l; a += 1)
|
|
2231
|
-
|
|
2231
|
+
s = n[a], e.replacer && (s = e.replacer.call(n, String(a), s)), (ue(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && ue(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i += ze(e, t)), e.dump && Se === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2232
2232
|
e.tag = o, e.dump = i || "[]";
|
|
2233
2233
|
}
|
|
2234
|
-
function
|
|
2235
|
-
var r = "", i = e.tag, o = Object.keys(n), a, l,
|
|
2234
|
+
function co(e, t, n) {
|
|
2235
|
+
var r = "", i = e.tag, o = Object.keys(n), a, l, s, c, d;
|
|
2236
2236
|
for (a = 0, l = o.length; a < l; a += 1)
|
|
2237
|
-
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'),
|
|
2237
|
+
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = o[a], c = n[s], e.replacer && (c = e.replacer.call(n, s, c)), ue(e, t, s, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ue(e, t, c, !1, !1) && (d += e.dump, r += d));
|
|
2238
2238
|
e.tag = i, e.dump = "{" + r + "}";
|
|
2239
2239
|
}
|
|
2240
2240
|
function uo(e, t, n, r) {
|
|
2241
|
-
var i = "", o = e.tag, a = Object.keys(n), l,
|
|
2241
|
+
var i = "", o = e.tag, a = Object.keys(n), l, s, c, d, u, m;
|
|
2242
2242
|
if (e.sortKeys === !0)
|
|
2243
2243
|
a.sort();
|
|
2244
2244
|
else if (typeof e.sortKeys == "function")
|
|
2245
2245
|
a.sort(e.sortKeys);
|
|
2246
2246
|
else if (e.sortKeys)
|
|
2247
2247
|
throw new ne("sortKeys must be a boolean or a function");
|
|
2248
|
-
for (l = 0,
|
|
2249
|
-
m = "", (!r || i !== "") && (m += ze(e, t)),
|
|
2248
|
+
for (l = 0, s = a.length; l < s; l += 1)
|
|
2249
|
+
m = "", (!r || i !== "") && (m += ze(e, t)), c = a[l], d = n[c], e.replacer && (d = e.replacer.call(n, c, d)), ue(e, t + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Se === e.dump.charCodeAt(0) ? m += "?" : m += "? "), m += e.dump, u && (m += ze(e, t)), ue(e, t + 1, d, !0, u) && (e.dump && Se === e.dump.charCodeAt(0) ? m += ":" : m += ": ", m += e.dump, i += m));
|
|
2250
2250
|
e.tag = o, e.dump = i || "{}";
|
|
2251
2251
|
}
|
|
2252
2252
|
function Rt(e, t, n) {
|
|
2253
|
-
var r, i, o, a, l,
|
|
2253
|
+
var r, i, o, a, l, s;
|
|
2254
2254
|
for (i = n ? e.explicitTypes : e.implicitTypes, o = 0, a = i.length; o < a; o += 1)
|
|
2255
2255
|
if (l = i[o], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof t == "object" && t instanceof l.instanceOf) && (!l.predicate || l.predicate(t))) {
|
|
2256
2256
|
if (n ? l.multi && l.representName ? e.tag = l.representName(t) : e.tag = l.tag : e.tag = "?", l.represent) {
|
|
2257
|
-
if (
|
|
2258
|
-
r = l.represent(t,
|
|
2259
|
-
else if (Tn.call(l.represent,
|
|
2260
|
-
r = l.represent[
|
|
2257
|
+
if (s = e.styleMap[l.tag] || l.defaultStyle, $n.call(l.represent) === "[object Function]")
|
|
2258
|
+
r = l.represent(t, s);
|
|
2259
|
+
else if (Tn.call(l.represent, s))
|
|
2260
|
+
r = l.represent[s](t, s);
|
|
2261
2261
|
else
|
|
2262
|
-
throw new ne("!<" + l.tag + '> tag resolver accepts not "' +
|
|
2262
|
+
throw new ne("!<" + l.tag + '> tag resolver accepts not "' + s + '" style');
|
|
2263
2263
|
e.dump = r;
|
|
2264
2264
|
}
|
|
2265
2265
|
return !0;
|
|
@@ -2268,27 +2268,27 @@ function Rt(e, t, n) {
|
|
|
2268
2268
|
}
|
|
2269
2269
|
function ue(e, t, n, r, i, o, a) {
|
|
2270
2270
|
e.tag = null, e.dump = n, Rt(e, n, !1) || Rt(e, n, !0);
|
|
2271
|
-
var l = $n.call(e.dump),
|
|
2271
|
+
var l = $n.call(e.dump), s = r, c;
|
|
2272
2272
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
2273
2273
|
var d = l === "[object Object]" || l === "[object Array]", u, m;
|
|
2274
2274
|
if (d && (u = e.duplicates.indexOf(n), m = u !== -1), (e.tag !== null && e.tag !== "?" || m || e.indent !== 2 && t > 0) && (i = !1), m && e.usedDuplicates[u])
|
|
2275
2275
|
e.dump = "*ref_" + u;
|
|
2276
2276
|
else {
|
|
2277
2277
|
if (d && m && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), l === "[object Object]")
|
|
2278
|
-
r && Object.keys(e.dump).length !== 0 ? (uo(e, t, e.dump, i), m && (e.dump = "&ref_" + u + e.dump)) : (
|
|
2278
|
+
r && Object.keys(e.dump).length !== 0 ? (uo(e, t, e.dump, i), m && (e.dump = "&ref_" + u + e.dump)) : (co(e, t, e.dump), m && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2279
2279
|
else if (l === "[object Array]")
|
|
2280
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Lt(e, t - 1, e.dump, i) : Lt(e, t, e.dump, i), m && (e.dump = "&ref_" + u + e.dump)) : (
|
|
2280
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Lt(e, t - 1, e.dump, i) : Lt(e, t, e.dump, i), m && (e.dump = "&ref_" + u + e.dump)) : (so(e, t, e.dump), m && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2281
2281
|
else if (l === "[object String]")
|
|
2282
|
-
e.tag !== "?" && ao(e, e.dump, t, o,
|
|
2282
|
+
e.tag !== "?" && ao(e, e.dump, t, o, s);
|
|
2283
2283
|
else {
|
|
2284
2284
|
if (l === "[object Undefined]")
|
|
2285
2285
|
return !1;
|
|
2286
2286
|
if (e.skipInvalid) return !1;
|
|
2287
2287
|
throw new ne("unacceptable kind of an object to dump " + l);
|
|
2288
2288
|
}
|
|
2289
|
-
e.tag !== null && e.tag !== "?" && (
|
|
2289
|
+
e.tag !== null && e.tag !== "?" && (c = encodeURI(
|
|
2290
2290
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
2291
|
-
).replace(/!/g, "%21"), e.tag[0] === "!" ?
|
|
2291
|
+
).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);
|
|
2292
2292
|
}
|
|
2293
2293
|
return !0;
|
|
2294
2294
|
}
|
|
@@ -2321,12 +2321,12 @@ function po(e, t) {
|
|
|
2321
2321
|
var mo = po, ho = {
|
|
2322
2322
|
dump: mo
|
|
2323
2323
|
};
|
|
2324
|
-
function
|
|
2324
|
+
function st(e, t) {
|
|
2325
2325
|
return function() {
|
|
2326
2326
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2327
2327
|
};
|
|
2328
2328
|
}
|
|
2329
|
-
var go = X, yo = Zt, vo = nn, bo =
|
|
2329
|
+
var go = X, yo = Zt, vo = nn, bo = sn, xo = cn, Co = it, ko = Sn.load, Ao = Sn.loadAll, _o = ho.dump, wo = ne, So = {
|
|
2330
2330
|
binary: mn,
|
|
2331
2331
|
float: ln,
|
|
2332
2332
|
map: tn,
|
|
@@ -2340,7 +2340,7 @@ var go = X, yo = Zt, vo = nn, bo = cn, xo = sn, Co = it, ko = Sn.load, Ao = Sn.l
|
|
|
2340
2340
|
omap: hn,
|
|
2341
2341
|
seq: en,
|
|
2342
2342
|
str: Xt
|
|
2343
|
-
}, $o =
|
|
2343
|
+
}, $o = st("safeLoad", "load"), To = st("safeLoadAll", "loadAll"), Io = st("safeDump", "dump"), Eo = {
|
|
2344
2344
|
Type: go,
|
|
2345
2345
|
Schema: yo,
|
|
2346
2346
|
FAILSAFE_SCHEMA: vo,
|
|
@@ -2366,7 +2366,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
2366
2366
|
}
|
|
2367
2367
|
},
|
|
2368
2368
|
setup(e) {
|
|
2369
|
-
const t = e, n =
|
|
2369
|
+
const t = e, n = T(() => {
|
|
2370
2370
|
const r = Object.fromEntries(Object.entries(t.entityRecord).filter(([, i]) => i !== null && i !== "" && (Array.isArray(i) ? i.length !== 0 : !0)));
|
|
2371
2371
|
return Object.keys(r).length === 0 && r.constructor === Object ? "" : Eo.dump(r).trim();
|
|
2372
2372
|
});
|
|
@@ -2402,20 +2402,20 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
2402
2402
|
}
|
|
2403
2403
|
},
|
|
2404
2404
|
setup(e) {
|
|
2405
|
-
const t = e, n = (l,
|
|
2406
|
-
const
|
|
2405
|
+
const t = e, n = (l, s) => {
|
|
2406
|
+
const c = te;
|
|
2407
2407
|
let d = "";
|
|
2408
|
-
return typeof l == "string" ? d += `${
|
|
2409
|
-
` : d += `${
|
|
2408
|
+
return typeof l == "string" ? d += `${c}${s} = "${l}"
|
|
2409
|
+
` : d += `${c}${s} = ${String(l ?? "")}
|
|
2410
2410
|
`, d;
|
|
2411
|
-
}, r = (l,
|
|
2411
|
+
}, r = (l, s, c = "") => {
|
|
2412
2412
|
if (typeof l != "object")
|
|
2413
2413
|
return "Invalid object";
|
|
2414
|
-
const d = te +
|
|
2414
|
+
const d = te + c;
|
|
2415
2415
|
let u = "";
|
|
2416
|
-
if (
|
|
2416
|
+
if (s && (u += `${d}${s} = {
|
|
2417
2417
|
`), l === null)
|
|
2418
|
-
return
|
|
2418
|
+
return s ? u += `${d}}` : u = "{}", u;
|
|
2419
2419
|
const m = Object.fromEntries(Object.entries(l).filter(([, v]) => v !== null));
|
|
2420
2420
|
let f = "";
|
|
2421
2421
|
for (const [v, y] of Object.entries(m))
|
|
@@ -2423,14 +2423,14 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
2423
2423
|
`, f += i(y, void 0, d), f += `${d}${te}]`) : y && typeof y == "object" ? (f = `{
|
|
2424
2424
|
`, f += r(y, void 0, d), f += `${d}${te}}`) : f = String(y ?? ""), typeof y == "string" && (f = `"${f}"`), u += `${d}${te}${v} = ${f}
|
|
2425
2425
|
`;
|
|
2426
|
-
return
|
|
2426
|
+
return s ? u += `${d}}
|
|
2427
2427
|
` : u;
|
|
2428
|
-
}, i = (l,
|
|
2428
|
+
}, i = (l, s, c = "") => {
|
|
2429
2429
|
if (!Array.isArray(l))
|
|
2430
2430
|
return "Invalid array";
|
|
2431
|
-
const d = te +
|
|
2431
|
+
const d = te + c;
|
|
2432
2432
|
let u = "";
|
|
2433
|
-
|
|
2433
|
+
s && (l.length === 0 ? u += `${d}${s} = [` : u += `${d}${s} = [
|
|
2434
2434
|
`);
|
|
2435
2435
|
for (let m = 0; m < l.length; m++) {
|
|
2436
2436
|
const f = l[m];
|
|
@@ -2438,39 +2438,39 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
2438
2438
|
`, u += r(f, void 0, d), u += `${d}${te}}`) : typeof f == "string" ? u += `${d}${te}"${f}"` : u += `${d}${te}${String(f ?? "")}`, m < l.length - 1 && (u += ","), u += `
|
|
2439
2439
|
`;
|
|
2440
2440
|
}
|
|
2441
|
-
return
|
|
2441
|
+
return s && (l.length === 0 ? u += `]
|
|
2442
2442
|
` : u += `${d}]
|
|
2443
2443
|
`), u;
|
|
2444
2444
|
}, o = (l) => {
|
|
2445
|
-
let
|
|
2446
|
-
for (const [
|
|
2447
|
-
Array.isArray(d) ?
|
|
2448
|
-
return
|
|
2449
|
-
}, a =
|
|
2445
|
+
let s = "";
|
|
2446
|
+
for (const [c, d] of Object.entries(l))
|
|
2447
|
+
Array.isArray(d) ? s += i(d, c) : typeof d == "object" ? s += r(d, c) : s += n(d, c);
|
|
2448
|
+
return s;
|
|
2449
|
+
}, a = T(() => {
|
|
2450
2450
|
var u, m, f, v, y, C, I;
|
|
2451
|
-
const l = Object.fromEntries(Object.entries(t.entityRecord).filter(([, b]) => b != null)),
|
|
2452
|
-
if (
|
|
2451
|
+
const l = Object.fromEntries(Object.entries(t.entityRecord).filter(([, b]) => b != null)), s = t.entityRecord.config ? Object.fromEntries(Object.entries((u = t.entityRecord) == null ? void 0 : u.config).filter(([, b]) => b != null)) : void 0;
|
|
2452
|
+
if (s && (l.config = s), Object.keys(l).length === 0)
|
|
2453
2453
|
return "";
|
|
2454
2454
|
delete l.id;
|
|
2455
|
-
let
|
|
2455
|
+
let c = "", d = "";
|
|
2456
2456
|
if ((m = l.service) != null && m.id ? (d = "service", delete l.service) : (f = l.route) != null && f.id ? (d = "route", delete l.route) : (v = l.consumer) != null && v.id ? (d = "consumer", delete l.consumer) : (y = l.consumer_group) != null && y.id ? (d = "consumer_group", delete l.consumer_group) : (C = l.certificate) != null && C.id ? (d = "certificate", delete l.certificate) : (I = l.set) != null && I.id && (d = "set", delete l.set), t.entityType === "plugin") {
|
|
2457
2457
|
const b = t.credentialType.replace(/-/g, "_") || (l.name + "").replace(/-/g, "_");
|
|
2458
|
-
delete l.name,
|
|
2458
|
+
delete l.name, c += `resource "konnect_gateway_plugin_${b}" "my_${b}" {
|
|
2459
2459
|
`;
|
|
2460
2460
|
} else
|
|
2461
|
-
|
|
2461
|
+
c += `resource "konnect_gateway_${t.entityType}" "my_${t.entityType}" {
|
|
2462
2462
|
`;
|
|
2463
|
-
return
|
|
2464
|
-
`, d && (
|
|
2465
|
-
`,
|
|
2466
|
-
`,
|
|
2467
|
-
`),
|
|
2468
|
-
`,
|
|
2463
|
+
return c += o(l), c += `${te}control_plane_id = konnect_gateway_control_plane.my_konnect_cp.id
|
|
2464
|
+
`, d && (c += `${te}${d} = {
|
|
2465
|
+
`, c += `${te}${te}id = konnect_gateway_${d}.my_${d}.id
|
|
2466
|
+
`, c += `${te}}
|
|
2467
|
+
`), c += `}
|
|
2468
|
+
`, c;
|
|
2469
2469
|
});
|
|
2470
|
-
return (l,
|
|
2471
|
-
const
|
|
2470
|
+
return (l, s) => {
|
|
2471
|
+
const c = U("KCodeBlock");
|
|
2472
2472
|
return p(), S("div", Oo, [
|
|
2473
|
-
t.entityRecord ? (p(), D(
|
|
2473
|
+
t.entityRecord ? (p(), D(c, {
|
|
2474
2474
|
key: 0,
|
|
2475
2475
|
id: "terraform-codeblock",
|
|
2476
2476
|
code: a.value,
|
|
@@ -2530,7 +2530,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
2530
2530
|
}
|
|
2531
2531
|
},
|
|
2532
2532
|
setup(e) {
|
|
2533
|
-
const t = e, n = Xe(), { i18n: { t: r } } = H.useI18n(), i = (a) => !!(a.tooltip || n[`${a.key}-label-tooltip`]), o =
|
|
2533
|
+
const t = e, n = Xe(), { i18n: { t: r } } = H.useI18n(), i = (a) => !!(a.tooltip || n[`${a.key}-label-tooltip`]), o = T(() => {
|
|
2534
2534
|
if (!t.record)
|
|
2535
2535
|
return t.record;
|
|
2536
2536
|
const a = JSON.parse(JSON.stringify(t.record));
|
|
@@ -2538,31 +2538,31 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
2538
2538
|
});
|
|
2539
2539
|
return (a, l) => (p(), S(le, null, [
|
|
2540
2540
|
e.format === "structured" ? (p(), S("div", Lo, [
|
|
2541
|
-
(p(!0), S(le, null, oe(e.propListTypes, (
|
|
2542
|
-
key: `config-card-details-${
|
|
2543
|
-
class:
|
|
2544
|
-
"data-testid": `config-card-details-${
|
|
2541
|
+
(p(!0), S(le, null, oe(e.propListTypes, (s) => (p(), S("div", {
|
|
2542
|
+
key: `config-card-details-${s}-props`,
|
|
2543
|
+
class: ce(`config-card-details-${s}-props`),
|
|
2544
|
+
"data-testid": `config-card-details-${s}-props`
|
|
2545
2545
|
}, [
|
|
2546
|
-
|
|
2547
|
-
(p(!0), S(le, null, oe(e.propertyCollections[
|
|
2548
|
-
key:
|
|
2549
|
-
item:
|
|
2546
|
+
s !== "basic" ? (p(), S("div", Bo, E(s === "advanced" ? A(r)("baseConfigCard.sections.advanced") : A(r)("baseConfigCard.sections.plugin")), 1)) : j("", !0),
|
|
2547
|
+
(p(!0), S(le, null, oe(e.propertyCollections[s], (c) => (p(), D(Jt, {
|
|
2548
|
+
key: c.key,
|
|
2549
|
+
item: c
|
|
2550
2550
|
}, Ce({
|
|
2551
2551
|
label: k(() => [
|
|
2552
|
-
P(a.$slots, `${
|
|
2552
|
+
P(a.$slots, `${c.key}-label`, { row: c }, void 0, !0)
|
|
2553
2553
|
]),
|
|
2554
|
-
[
|
|
2555
|
-
P(a.$slots,
|
|
2556
|
-
row:
|
|
2554
|
+
[c.key]: k(({ rowValue: d }) => [
|
|
2555
|
+
P(a.$slots, c.key, {
|
|
2556
|
+
row: c,
|
|
2557
2557
|
rowValue: d
|
|
2558
2558
|
}, void 0, !0)
|
|
2559
2559
|
]),
|
|
2560
2560
|
_: 2
|
|
2561
2561
|
}, [
|
|
2562
|
-
i(
|
|
2562
|
+
i(c) ? {
|
|
2563
2563
|
name: "label-tooltip",
|
|
2564
2564
|
fn: k(() => [
|
|
2565
|
-
P(a.$slots, `${
|
|
2565
|
+
P(a.$slots, `${c.key}-label-tooltip`, { row: c }, void 0, !0)
|
|
2566
2566
|
]),
|
|
2567
2567
|
key: "0"
|
|
2568
2568
|
} : void 0
|
|
@@ -2676,10 +2676,10 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
2676
2676
|
},
|
|
2677
2677
|
emits: ["loading", "fetch:success", "fetch:error"],
|
|
2678
2678
|
setup(e, { emit: t }) {
|
|
2679
|
-
var
|
|
2679
|
+
var w;
|
|
2680
2680
|
const n = t, r = e, { i18n: { t: i } } = H.useI18n(), { getMessageFromError: o } = H.useErrors(), { convertKeyToTitle: a } = H.useStringHelpers();
|
|
2681
2681
|
H.useSubSchema(r.pluginConfigKey);
|
|
2682
|
-
const { axiosInstance: l } = H.useAxios((
|
|
2682
|
+
const { axiosInstance: l } = H.useAxios((w = r.config) == null ? void 0 : w.axiosRequestConfig), s = [
|
|
2683
2683
|
{
|
|
2684
2684
|
label: i("baseConfigCard.general.structuredFormat"),
|
|
2685
2685
|
value: "structured",
|
|
@@ -2694,12 +2694,12 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
2694
2694
|
value: "yaml"
|
|
2695
2695
|
}
|
|
2696
2696
|
];
|
|
2697
|
-
r.config.app === "konnect" &&
|
|
2697
|
+
r.config.app === "konnect" && s.splice(2, 0, {
|
|
2698
2698
|
label: i("baseForm.configuration.terraform"),
|
|
2699
2699
|
value: "terraform"
|
|
2700
2700
|
});
|
|
2701
|
-
const
|
|
2702
|
-
|
|
2701
|
+
const c = L("structured"), d = (g) => {
|
|
2702
|
+
c.value = g == null ? void 0 : g.value;
|
|
2703
2703
|
}, u = {
|
|
2704
2704
|
id: {
|
|
2705
2705
|
type: Y.ID,
|
|
@@ -2734,77 +2734,77 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
2734
2734
|
// the last property displayed
|
|
2735
2735
|
section: ae.Basic
|
|
2736
2736
|
}
|
|
2737
|
-
}, m = L(!1), f = L(!1), v = L(""), y = L({}), C =
|
|
2738
|
-
var
|
|
2737
|
+
}, m = L(!1), f = L(!1), v = L(""), y = L({}), C = T(() => {
|
|
2738
|
+
var h, x, B;
|
|
2739
2739
|
if (!y.value)
|
|
2740
2740
|
return [];
|
|
2741
|
-
const g = [],
|
|
2742
|
-
for (const
|
|
2743
|
-
const
|
|
2744
|
-
let V =
|
|
2745
|
-
(
|
|
2741
|
+
const g = [], $ = Object.keys(y.value).length;
|
|
2742
|
+
for (const K in y.value) {
|
|
2743
|
+
const O = (x = (h = r.configSchema) == null ? void 0 : h[K]) == null ? void 0 : x.order, J = (B = u[K]) == null ? void 0 : B.order;
|
|
2744
|
+
let V = $;
|
|
2745
|
+
(J || J === 0) && (V = J === -1 ? $ + 1 : J), O && (V = O === -1 ? $ + 1 : O), g.push([K, V]);
|
|
2746
2746
|
}
|
|
2747
|
-
return g.sort(function(
|
|
2748
|
-
return
|
|
2749
|
-
}), g.map((
|
|
2750
|
-
var Ie,
|
|
2751
|
-
const
|
|
2747
|
+
return g.sort(function(K, O) {
|
|
2748
|
+
return K[1] - O[1];
|
|
2749
|
+
}), g.map((K) => {
|
|
2750
|
+
var Ie, ct;
|
|
2751
|
+
const O = K[0], J = (Ie = y.value) == null ? void 0 : Ie[O], V = ((ct = r.configSchema) == null ? void 0 : ct[O]) || {}, G = u[O];
|
|
2752
2752
|
return {
|
|
2753
|
-
key:
|
|
2754
|
-
value:
|
|
2753
|
+
key: O,
|
|
2754
|
+
value: J,
|
|
2755
2755
|
hidden: V.hidden || !1,
|
|
2756
|
-
type: V.type ?? ((
|
|
2757
|
-
label: V.label ?? ((
|
|
2758
|
-
tooltip: V.tooltip ?? ((
|
|
2759
|
-
section: V.section ?? ((
|
|
2756
|
+
type: V.type ?? ((G == null ? void 0 : G.type) || Y.Text),
|
|
2757
|
+
label: V.label ?? ((G == null ? void 0 : G.label) || a(O)),
|
|
2758
|
+
tooltip: V.tooltip ?? ((G == null ? void 0 : G.tooltip) || void 0),
|
|
2759
|
+
section: V.section ?? ((G == null ? void 0 : G.section) || ae.Advanced)
|
|
2760
2760
|
};
|
|
2761
|
-
}).filter((
|
|
2762
|
-
}), I =
|
|
2763
|
-
var
|
|
2761
|
+
}).filter((K) => !K.hidden && K.key !== r.pluginConfigKey);
|
|
2762
|
+
}), I = T(() => {
|
|
2763
|
+
var x, B;
|
|
2764
2764
|
if (!y.value || !r.pluginConfigKey)
|
|
2765
2765
|
return [];
|
|
2766
|
-
const g = y.value[r.pluginConfigKey] || {},
|
|
2767
|
-
for (const
|
|
2768
|
-
const
|
|
2769
|
-
let V =
|
|
2770
|
-
|
|
2766
|
+
const g = y.value[r.pluginConfigKey] || {}, $ = Object.keys(g).length, h = [];
|
|
2767
|
+
for (const K in g) {
|
|
2768
|
+
const O = (B = (x = r.pluginConfigSchema) == null ? void 0 : x[K]) == null ? void 0 : B.order, J = g[K];
|
|
2769
|
+
let V = J != null && J !== "" ? $ - 1 : $;
|
|
2770
|
+
O && (V = O === -1 ? $ + 1 : O), h.push([K, V]);
|
|
2771
2771
|
}
|
|
2772
|
-
return
|
|
2773
|
-
return
|
|
2774
|
-
}),
|
|
2775
|
-
var
|
|
2776
|
-
const
|
|
2772
|
+
return h.sort(function(K, O) {
|
|
2773
|
+
return K[1] - O[1];
|
|
2774
|
+
}), h.map((K) => {
|
|
2775
|
+
var G;
|
|
2776
|
+
const O = K[0], J = g[O], V = ((G = r.pluginConfigSchema) == null ? void 0 : G[O]) || {};
|
|
2777
2777
|
return {
|
|
2778
|
-
key:
|
|
2779
|
-
value:
|
|
2778
|
+
key: O,
|
|
2779
|
+
value: J,
|
|
2780
2780
|
hidden: V.hidden || !1,
|
|
2781
2781
|
type: V.type ?? Y.Text,
|
|
2782
|
-
label: V.label ?? a(
|
|
2782
|
+
label: V.label ?? a(O),
|
|
2783
2783
|
tooltip: V.tooltip ?? void 0,
|
|
2784
2784
|
section: ae.Plugin
|
|
2785
2785
|
};
|
|
2786
|
-
}).filter((
|
|
2787
|
-
}), b =
|
|
2788
|
-
var g, h, x
|
|
2786
|
+
}).filter((K) => !K.hidden);
|
|
2787
|
+
}), b = T(() => {
|
|
2788
|
+
var g, $, h, x;
|
|
2789
2789
|
return {
|
|
2790
|
-
basic: (g = C.value) == null ? void 0 : g.filter((
|
|
2791
|
-
advanced: (
|
|
2792
|
-
plugin: (
|
|
2790
|
+
basic: (g = C.value) == null ? void 0 : g.filter((B) => B.section === ae.Basic),
|
|
2791
|
+
advanced: ($ = C.value) == null ? void 0 : $.filter((B) => B.section === ae.Advanced),
|
|
2792
|
+
plugin: (x = I.value) == null ? void 0 : x.concat((h = C.value) == null ? void 0 : h.filter((B) => B.section === ae.Plugin))
|
|
2793
2793
|
};
|
|
2794
|
-
}),
|
|
2794
|
+
}), R = T(() => {
|
|
2795
2795
|
const g = [];
|
|
2796
2796
|
return b.value.basic.length && g.push("basic"), b.value.advanced.length && g.push("advanced"), b.value.plugin.length && g.push("plugin"), g;
|
|
2797
|
-
}),
|
|
2798
|
-
var h
|
|
2797
|
+
}), F = T(() => {
|
|
2798
|
+
var $, h;
|
|
2799
2799
|
let g = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2800
|
-
return r.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((
|
|
2800
|
+
return r.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, (($ = r.config) == null ? void 0 : $.controlPlaneId) || "") : r.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (h = r.config) != null && h.workspace ? `/${r.config.workspace}` : "")), g = g.replace(/{id}/gi, r.config.entityId), g;
|
|
2801
2801
|
});
|
|
2802
2802
|
return Ae(m, (g) => {
|
|
2803
2803
|
n("loading", g);
|
|
2804
2804
|
}, { immediate: !0 }), et(async () => {
|
|
2805
2805
|
f.value = !1, m.value = !0;
|
|
2806
2806
|
try {
|
|
2807
|
-
const { data: g } = await l.get(
|
|
2807
|
+
const { data: g } = await l.get(F.value);
|
|
2808
2808
|
if (r.dataKey)
|
|
2809
2809
|
if (typeof g[r.dataKey] < "u")
|
|
2810
2810
|
y.value = { ...g[r.dataKey] };
|
|
@@ -2812,39 +2812,39 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
2812
2812
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
2813
2813
|
else
|
|
2814
2814
|
y.value = { ...g };
|
|
2815
|
-
Object.keys(r.configSchema).filter((
|
|
2816
|
-
y.value && typeof y.value[
|
|
2815
|
+
Object.keys(r.configSchema).filter((h) => r.configSchema[h].forceShow).forEach((h) => {
|
|
2816
|
+
y.value && typeof y.value[h] > "u" && (y.value[h] = null);
|
|
2817
2817
|
}), n("fetch:success", g);
|
|
2818
2818
|
} catch (g) {
|
|
2819
|
-
const
|
|
2820
|
-
v.value =
|
|
2819
|
+
const $ = o(g);
|
|
2820
|
+
v.value = $.startsWith("code") ? i("baseConfigCard.errors.load") : $, f.value = !0, n("fetch:error", g);
|
|
2821
2821
|
} finally {
|
|
2822
2822
|
m.value = !1;
|
|
2823
2823
|
}
|
|
2824
|
-
}), (g,
|
|
2825
|
-
const
|
|
2826
|
-
return p(), D(
|
|
2824
|
+
}), (g, $) => {
|
|
2825
|
+
const h = U("KLabel"), x = U("KSelect"), B = U("KButton"), K = U("KSkeleton"), O = U("KEmptyState"), J = U("KCard");
|
|
2826
|
+
return p(), D(J, {
|
|
2827
2827
|
class: "kong-ui-entity-base-config-card",
|
|
2828
2828
|
"title-tag": e.titleTag
|
|
2829
2829
|
}, Ce({
|
|
2830
2830
|
actions: k(() => [
|
|
2831
2831
|
N("div", Do, [
|
|
2832
2832
|
P(g.$slots, "actions", {}, void 0, !0),
|
|
2833
|
-
M(
|
|
2833
|
+
M(h, {
|
|
2834
2834
|
class: "config-format-select-label",
|
|
2835
2835
|
"data-testid": "config-format-select-label"
|
|
2836
2836
|
}, {
|
|
2837
2837
|
default: k(() => [
|
|
2838
|
-
q(
|
|
2838
|
+
q(E(e.label), 1)
|
|
2839
2839
|
]),
|
|
2840
2840
|
_: 1
|
|
2841
2841
|
}),
|
|
2842
|
-
M(
|
|
2842
|
+
M(x, {
|
|
2843
2843
|
"data-testid": "select-config-format",
|
|
2844
|
-
items:
|
|
2844
|
+
items: s,
|
|
2845
2845
|
onChange: d
|
|
2846
2846
|
}),
|
|
2847
|
-
e.configCardDoc ? (p(), D(
|
|
2847
|
+
e.configCardDoc ? (p(), D(B, {
|
|
2848
2848
|
key: 0,
|
|
2849
2849
|
appearance: "tertiary",
|
|
2850
2850
|
class: "book-icon",
|
|
@@ -2864,18 +2864,18 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
2864
2864
|
])
|
|
2865
2865
|
]),
|
|
2866
2866
|
default: k(() => [
|
|
2867
|
-
m.value ? (p(), D(
|
|
2867
|
+
m.value ? (p(), D(K, {
|
|
2868
2868
|
key: 0,
|
|
2869
2869
|
"data-testid": "config-card-loader",
|
|
2870
2870
|
"table-columns": 2,
|
|
2871
2871
|
type: "table"
|
|
2872
|
-
})) : f.value ? (p(), D(
|
|
2872
|
+
})) : f.value ? (p(), D(O, {
|
|
2873
2873
|
key: 1,
|
|
2874
2874
|
"data-testid": "config-card-fetch-error",
|
|
2875
2875
|
"icon-variant": "error"
|
|
2876
2876
|
}, {
|
|
2877
2877
|
default: k(() => [
|
|
2878
|
-
N("h3", null,
|
|
2878
|
+
N("h3", null, E(v.value), 1)
|
|
2879
2879
|
]),
|
|
2880
2880
|
_: 1
|
|
2881
2881
|
})) : j("", !0),
|
|
@@ -2883,17 +2883,17 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
2883
2883
|
M(No, {
|
|
2884
2884
|
config: e.config,
|
|
2885
2885
|
"entity-type": e.entityType,
|
|
2886
|
-
"fetcher-url":
|
|
2887
|
-
format:
|
|
2888
|
-
"prop-list-types":
|
|
2886
|
+
"fetcher-url": F.value,
|
|
2887
|
+
format: c.value,
|
|
2888
|
+
"prop-list-types": R.value,
|
|
2889
2889
|
"property-collections": b.value,
|
|
2890
2890
|
record: y.value
|
|
2891
2891
|
}, Ce({ _: 2 }, [
|
|
2892
2892
|
oe(Object.keys(g.$slots), (V) => ({
|
|
2893
2893
|
name: V,
|
|
2894
|
-
fn: k(({ row:
|
|
2894
|
+
fn: k(({ row: G, rowValue: Ie }) => [
|
|
2895
2895
|
P(g.$slots, V, {
|
|
2896
|
-
row:
|
|
2896
|
+
row: G,
|
|
2897
2897
|
rowValue: Ie
|
|
2898
2898
|
}, void 0, !0)
|
|
2899
2899
|
])
|
|
@@ -2908,7 +2908,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
2908
2908
|
fn: k(() => [
|
|
2909
2909
|
N("span", Mo, [
|
|
2910
2910
|
P(g.$slots, "title", {}, () => [
|
|
2911
|
-
q(
|
|
2911
|
+
q(E(A(i)("baseConfigCard.title")), 1)
|
|
2912
2912
|
], !0)
|
|
2913
2913
|
])
|
|
2914
2914
|
]),
|
|
@@ -2996,11 +2996,11 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
2996
2996
|
},
|
|
2997
2997
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
2998
2998
|
setup(e, { emit: t }) {
|
|
2999
|
-
var
|
|
3000
|
-
const n = t, r = e, i = nr(), { i18n: { t: o } } = H.useI18n(), { getMessageFromError: a } = H.useErrors(), { axiosInstance: l } = H.useAxios((
|
|
3001
|
-
var g,
|
|
3002
|
-
let
|
|
3003
|
-
return r.config.app === "konnect" ?
|
|
2999
|
+
var F;
|
|
3000
|
+
const n = t, r = e, i = nr(), { i18n: { t: o } } = H.useI18n(), { getMessageFromError: a } = H.useErrors(), { axiosInstance: l } = H.useAxios((F = r.config) == null ? void 0 : F.axiosRequestConfig), s = L(!1), c = T(() => !!r.editId), d = L(!1), u = L(""), m = T(() => r.canSubmit === !1 || r.isReadonly), f = L(!1), v = T(() => {
|
|
3001
|
+
var g, $;
|
|
3002
|
+
let w = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3003
|
+
return r.config.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, ((g = r.config) == null ? void 0 : g.controlPlaneId) || "") : r.config.app === "kongManager" && (w = w.replace(/\/{workspace}/gi, ($ = r.config) != null && $.workspace ? `/${r.config.workspace}` : "")), r.editId ? (w = w.replace(/{id}/gi, r.editId), w) : (w = w.replace(/\/{id}/gi, ""), w);
|
|
3004
3004
|
}), y = () => {
|
|
3005
3005
|
f.value = !f.value;
|
|
3006
3006
|
}, C = () => {
|
|
@@ -3009,7 +3009,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3009
3009
|
n("cancel");
|
|
3010
3010
|
}, b = () => {
|
|
3011
3011
|
m.value || n("submit");
|
|
3012
|
-
},
|
|
3012
|
+
}, R = L([
|
|
3013
3013
|
{
|
|
3014
3014
|
title: o("baseForm.configuration.json"),
|
|
3015
3015
|
hash: "#json"
|
|
@@ -3019,31 +3019,31 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3019
3019
|
hash: "#yaml"
|
|
3020
3020
|
}
|
|
3021
3021
|
]);
|
|
3022
|
-
return r.config.app === "konnect" && r.entityType !== tt.Other &&
|
|
3022
|
+
return r.config.app === "konnect" && r.entityType !== tt.Other && R.value.splice(1, 0, {
|
|
3023
3023
|
title: o("baseForm.configuration.terraform"),
|
|
3024
3024
|
hash: "#terraform"
|
|
3025
|
-
}), Ae(() =>
|
|
3026
|
-
n("loading",
|
|
3025
|
+
}), Ae(() => s.value, (w) => {
|
|
3026
|
+
n("loading", w);
|
|
3027
3027
|
}, { immediate: !0 }), et(async () => {
|
|
3028
3028
|
if (r.editId)
|
|
3029
3029
|
try {
|
|
3030
|
-
d.value = !1,
|
|
3031
|
-
const { data:
|
|
3032
|
-
n("fetch:success",
|
|
3033
|
-
} catch (
|
|
3034
|
-
const g = a(
|
|
3035
|
-
u.value = g.startsWith("code") ? o("baseForm.errors.edit") : g, d.value = !0, n("fetch:error",
|
|
3030
|
+
d.value = !1, s.value = !0;
|
|
3031
|
+
const { data: w } = await l.get(v.value);
|
|
3032
|
+
n("fetch:success", w);
|
|
3033
|
+
} catch (w) {
|
|
3034
|
+
const g = a(w);
|
|
3035
|
+
u.value = g.startsWith("code") ? o("baseForm.errors.edit") : g, d.value = !0, n("fetch:error", w);
|
|
3036
3036
|
} finally {
|
|
3037
|
-
|
|
3037
|
+
s.value = !1;
|
|
3038
3038
|
}
|
|
3039
|
-
}), (
|
|
3040
|
-
const
|
|
3039
|
+
}), (w, g) => {
|
|
3040
|
+
const $ = U("KSkeleton"), h = U("KEmptyState"), x = U("KAlert"), B = U("KButton"), K = U("KTabs"), O = U("KSlideout");
|
|
3041
3041
|
return p(), D(Ne(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3042
3042
|
default: k(() => [
|
|
3043
|
-
|
|
3043
|
+
s.value ? (p(), D($, {
|
|
3044
3044
|
key: 0,
|
|
3045
3045
|
type: "form"
|
|
3046
|
-
})) : d.value ? (p(), D(
|
|
3046
|
+
})) : d.value ? (p(), D(h, {
|
|
3047
3047
|
key: 1,
|
|
3048
3048
|
"action-button-text": A(o)("baseForm.actions.back"),
|
|
3049
3049
|
"data-testid": "form-fetch-error",
|
|
@@ -3051,7 +3051,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3051
3051
|
onClickAction: C
|
|
3052
3052
|
}, {
|
|
3053
3053
|
default: k(() => [
|
|
3054
|
-
N("h3", null,
|
|
3054
|
+
N("h3", null, E(u.value), 1)
|
|
3055
3055
|
]),
|
|
3056
3056
|
_: 1
|
|
3057
3057
|
}, 8, ["action-button-text"])) : (p(), S("form", {
|
|
@@ -3061,64 +3061,64 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3061
3061
|
onReset: Fe(I, ["prevent"]),
|
|
3062
3062
|
onSubmit: Fe(b, ["prevent"])
|
|
3063
3063
|
}, [
|
|
3064
|
-
P(
|
|
3065
|
-
e.errorMessage ? (p(), D(
|
|
3064
|
+
P(w.$slots, "default", {}, void 0, !0),
|
|
3065
|
+
e.errorMessage ? (p(), D(x, {
|
|
3066
3066
|
key: 0,
|
|
3067
3067
|
appearance: "danger",
|
|
3068
3068
|
"data-testid": "form-error",
|
|
3069
3069
|
message: e.errorMessage
|
|
3070
3070
|
}, null, 8, ["message"])) : j("", !0),
|
|
3071
3071
|
N("div", Ho, [
|
|
3072
|
-
P(
|
|
3073
|
-
M(
|
|
3072
|
+
P(w.$slots, "form-actions", {}, () => [
|
|
3073
|
+
M(B, {
|
|
3074
3074
|
appearance: "tertiary",
|
|
3075
|
-
"data-testid": `${e.entityType}-${
|
|
3076
|
-
onClick: g[0] || (g[0] = (
|
|
3075
|
+
"data-testid": `${e.entityType}-${c.value ? "edit" : "create"}-form-view-configuration`,
|
|
3076
|
+
onClick: g[0] || (g[0] = (J) => y())
|
|
3077
3077
|
}, {
|
|
3078
3078
|
default: k(() => [
|
|
3079
|
-
q(
|
|
3079
|
+
q(E(A(o)("baseForm.actions.viewConfiguration")), 1)
|
|
3080
3080
|
]),
|
|
3081
3081
|
_: 1
|
|
3082
3082
|
}, 8, ["data-testid"]),
|
|
3083
|
-
M(
|
|
3083
|
+
M(B, {
|
|
3084
3084
|
appearance: "secondary",
|
|
3085
|
-
"data-testid": `${e.entityType}-${
|
|
3085
|
+
"data-testid": `${e.entityType}-${c.value ? "edit" : "create"}-form-cancel`,
|
|
3086
3086
|
disabled: e.isReadonly,
|
|
3087
3087
|
type: "reset"
|
|
3088
3088
|
}, {
|
|
3089
3089
|
default: k(() => [
|
|
3090
|
-
q(
|
|
3090
|
+
q(E(A(o)("baseForm.actions.cancel")), 1)
|
|
3091
3091
|
]),
|
|
3092
3092
|
_: 1
|
|
3093
3093
|
}, 8, ["data-testid", "disabled"]),
|
|
3094
|
-
M(
|
|
3094
|
+
M(B, {
|
|
3095
3095
|
appearance: "primary",
|
|
3096
|
-
"data-testid": `${e.entityType}-${
|
|
3096
|
+
"data-testid": `${e.entityType}-${c.value ? "edit" : "create"}-form-submit`,
|
|
3097
3097
|
disabled: m.value,
|
|
3098
3098
|
type: "submit"
|
|
3099
3099
|
}, {
|
|
3100
3100
|
default: k(() => [
|
|
3101
|
-
q(
|
|
3101
|
+
q(E(A(o)("baseForm.actions.save")), 1)
|
|
3102
3102
|
]),
|
|
3103
3103
|
_: 1
|
|
3104
3104
|
}, 8, ["data-testid", "disabled"])
|
|
3105
3105
|
], !0)
|
|
3106
3106
|
])
|
|
3107
3107
|
], 40, qo)),
|
|
3108
|
-
M(
|
|
3108
|
+
M(O, {
|
|
3109
3109
|
"close-on-blur": !1,
|
|
3110
3110
|
"data-testid": "form-view-configuration-slideout",
|
|
3111
3111
|
"has-overlay": !1,
|
|
3112
3112
|
"offset-top": 60,
|
|
3113
3113
|
title: A(o)("baseForm.configuration.title"),
|
|
3114
3114
|
visible: f.value,
|
|
3115
|
-
onClose: g[1] || (g[1] = (
|
|
3115
|
+
onClose: g[1] || (g[1] = (J) => y())
|
|
3116
3116
|
}, {
|
|
3117
3117
|
default: k(() => [
|
|
3118
|
-
N("div", null,
|
|
3119
|
-
M(
|
|
3118
|
+
N("div", null, E(A(o)("baseForm.configuration.message")), 1),
|
|
3119
|
+
M(K, {
|
|
3120
3120
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3121
|
-
tabs:
|
|
3121
|
+
tabs: R.value
|
|
3122
3122
|
}, {
|
|
3123
3123
|
json: k(() => [
|
|
3124
3124
|
M(Gt, {
|
|
@@ -3149,7 +3149,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3149
3149
|
});
|
|
3150
3150
|
};
|
|
3151
3151
|
}
|
|
3152
|
-
}),
|
|
3152
|
+
}), es = /* @__PURE__ */ ie(Yo, [["__scopeId", "data-v-6210a67a"]]), Vo = ["data-truncate"], Wo = /* @__PURE__ */ W({
|
|
3153
3153
|
__name: "EntityBaseTableCell",
|
|
3154
3154
|
props: {
|
|
3155
3155
|
keyName: {
|
|
@@ -3166,35 +3166,35 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3166
3166
|
}
|
|
3167
3167
|
},
|
|
3168
3168
|
setup(e) {
|
|
3169
|
-
const t = e, n =
|
|
3169
|
+
const t = e, n = T(() => {
|
|
3170
3170
|
var C;
|
|
3171
3171
|
return ((C = t.rowEl) == null ? void 0 : C.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3172
|
-
}), r =
|
|
3172
|
+
}), r = T(() => {
|
|
3173
3173
|
var C;
|
|
3174
3174
|
return ((C = n.value) == null ? void 0 : C.querySelector('[data-truncate="true"]')) || null;
|
|
3175
|
-
}), i =
|
|
3175
|
+
}), i = T(() => {
|
|
3176
3176
|
var I, b;
|
|
3177
3177
|
const C = (I = t.rowEl) == null ? void 0 : I.querySelectorAll("td");
|
|
3178
3178
|
return C ? ((b = C[0]) == null ? void 0 : b.getAttribute("data-testid")) === t.keyName : !0;
|
|
3179
|
-
}), o =
|
|
3179
|
+
}), o = T(() => i.value || t.tooltip);
|
|
3180
3180
|
let a;
|
|
3181
3181
|
const l = () => {
|
|
3182
3182
|
a && (a.disconnect(), a = void 0);
|
|
3183
|
-
},
|
|
3184
|
-
var I, b,
|
|
3183
|
+
}, s = () => {
|
|
3184
|
+
var I, b, R;
|
|
3185
3185
|
let C = ((I = n.value) == null ? void 0 : I.clientWidth) || 0;
|
|
3186
3186
|
if (n.value && "getComputedStyle" in window) {
|
|
3187
|
-
const
|
|
3188
|
-
C -= (parseFloat(
|
|
3187
|
+
const F = window.getComputedStyle(n.value);
|
|
3188
|
+
C -= (parseFloat(F.paddingLeft) || 0) + (parseFloat(F.paddingRight) || 0);
|
|
3189
3189
|
}
|
|
3190
|
-
d.value = ((b = r.value) == null ? void 0 : b.getBoundingClientRect().width) || 0, u.value = C, m.value = ((
|
|
3191
|
-
},
|
|
3190
|
+
d.value = ((b = r.value) == null ? void 0 : b.getBoundingClientRect().width) || 0, u.value = C, m.value = ((R = c.value) == null ? void 0 : R.innerText) || "";
|
|
3191
|
+
}, c = L({}), d = L(0), u = L(0), m = L(""), f = T(() => [r.value, n.value]), v = Ae(
|
|
3192
3192
|
f,
|
|
3193
3193
|
(C) => {
|
|
3194
3194
|
if (o.value && (l(), "ResizeObserver" in window && window)) {
|
|
3195
3195
|
a = new ResizeObserver((I) => {
|
|
3196
3196
|
window.requestAnimationFrame(() => {
|
|
3197
|
-
!Array.isArray(I) || !I.length ||
|
|
3197
|
+
!Array.isArray(I) || !I.length || s();
|
|
3198
3198
|
});
|
|
3199
3199
|
});
|
|
3200
3200
|
for (const I of C)
|
|
@@ -3202,16 +3202,16 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3202
3202
|
}
|
|
3203
3203
|
},
|
|
3204
3204
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3205
|
-
), y =
|
|
3205
|
+
), y = T(() => o.value ? d.value > u.value : !1);
|
|
3206
3206
|
return Hn(() => {
|
|
3207
|
-
|
|
3207
|
+
s();
|
|
3208
3208
|
}), Yn(() => {
|
|
3209
3209
|
v();
|
|
3210
3210
|
}), (C, I) => {
|
|
3211
3211
|
const b = U("KTooltip");
|
|
3212
3212
|
return p(), S("span", {
|
|
3213
3213
|
ref_key: "contentRef",
|
|
3214
|
-
ref:
|
|
3214
|
+
ref: c,
|
|
3215
3215
|
class: "content-wrapper"
|
|
3216
3216
|
}, [
|
|
3217
3217
|
o.value ? (p(), S("span", {
|
|
@@ -3362,9 +3362,9 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3362
3362
|
default: void 0
|
|
3363
3363
|
}
|
|
3364
3364
|
},
|
|
3365
|
-
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3365
|
+
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked", "state"],
|
|
3366
3366
|
setup(e, { emit: t }) {
|
|
3367
|
-
const n = e, r = t, { i18n: { t: i } } = H.useI18n(), o =
|
|
3367
|
+
const n = e, r = t, { i18n: { t: i } } = H.useI18n(), o = T(() => {
|
|
3368
3368
|
var h, x;
|
|
3369
3369
|
return typeof n.errorMessage == "string" ? {
|
|
3370
3370
|
hasError: !!n.errorMessage,
|
|
@@ -3375,27 +3375,27 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3375
3375
|
title: (h = n.errorMessage) == null ? void 0 : h.title,
|
|
3376
3376
|
message: (x = n.errorMessage) == null ? void 0 : x.message
|
|
3377
3377
|
};
|
|
3378
|
-
}), a =
|
|
3378
|
+
}), a = T(() => n.cacheIdentifier || n.preferencesStorageKey), l = T(() => {
|
|
3379
3379
|
const h = [];
|
|
3380
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3381
|
-
const
|
|
3380
|
+
return Object.keys(n.tableHeaders).forEach((B) => {
|
|
3381
|
+
const K = n.tableHeaders[B];
|
|
3382
3382
|
h.push({
|
|
3383
|
-
label:
|
|
3384
|
-
key:
|
|
3385
|
-
sortable:
|
|
3386
|
-
hidable:
|
|
3383
|
+
label: K.label ?? B,
|
|
3384
|
+
key: B,
|
|
3385
|
+
sortable: K.sortable ?? !1,
|
|
3386
|
+
hidable: K.hidable ?? !0
|
|
3387
3387
|
});
|
|
3388
3388
|
}), n.enableEntityActions && h.push({
|
|
3389
3389
|
key: "actions",
|
|
3390
3390
|
hideLabel: !0
|
|
3391
3391
|
}), h;
|
|
3392
|
-
}),
|
|
3392
|
+
}), s = (h) => ({
|
|
3393
3393
|
"data-rowid": h.id,
|
|
3394
3394
|
"data-testid": h.name,
|
|
3395
3395
|
...n.rowAttributes(h)
|
|
3396
|
-
}),
|
|
3396
|
+
}), c = L({}), d = (h) => {
|
|
3397
3397
|
var x;
|
|
3398
|
-
return (x =
|
|
3398
|
+
return (x = c.value) == null ? void 0 : x.$el.querySelector(`[data-rowid="${h.id}"]`);
|
|
3399
3399
|
}, u = (h) => {
|
|
3400
3400
|
const x = {
|
|
3401
3401
|
"data-testid": h.headerKey,
|
|
@@ -3406,36 +3406,38 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3406
3406
|
overflowX: "hidden",
|
|
3407
3407
|
textOverflow: "ellipsis"
|
|
3408
3408
|
}), x;
|
|
3409
|
-
}, m = () => {
|
|
3410
|
-
r("
|
|
3409
|
+
}, m = (h) => {
|
|
3410
|
+
b(h), r("state", h);
|
|
3411
3411
|
}, f = () => {
|
|
3412
|
+
r("empty-state-cta-clicked"), v();
|
|
3413
|
+
}, v = () => {
|
|
3412
3414
|
r("clear-search-input");
|
|
3413
|
-
},
|
|
3415
|
+
}, y = T(() => n.disableRowClick ? void 0 : (h, x) => {
|
|
3414
3416
|
r("click:row", x);
|
|
3415
|
-
}),
|
|
3417
|
+
}), C = (h) => {
|
|
3416
3418
|
r("sort", h);
|
|
3417
|
-
}, { hideTableToolbar:
|
|
3418
|
-
const h =
|
|
3419
|
+
}, { hideTableToolbar: I, handleStateChange: b } = H.useTableState(() => n.query), { setTablePreferences: R, getTablePreferences: F } = sr(), w = L(F(a.value, n.defaultTablePreferences)), g = T(() => {
|
|
3420
|
+
const h = F(a.value);
|
|
3419
3421
|
return {
|
|
3420
3422
|
...n.initialFetcherParams,
|
|
3421
3423
|
...h
|
|
3422
3424
|
};
|
|
3423
|
-
}),
|
|
3424
|
-
|
|
3425
|
-
!("hidable" in x) || !
|
|
3426
|
-
}), a.value &&
|
|
3425
|
+
}), $ = (h) => {
|
|
3426
|
+
w.value = h, l.value.forEach((x) => {
|
|
3427
|
+
!("hidable" in x) || !w.value.columnVisibility || x.hidable === !1 && (w.value.columnVisibility[x.key] = !0);
|
|
3428
|
+
}), a.value && R(a.value, h);
|
|
3427
3429
|
};
|
|
3428
3430
|
return (h, x) => {
|
|
3429
|
-
const
|
|
3430
|
-
return p(), D(
|
|
3431
|
+
const B = U("KTableData"), K = U("KCard");
|
|
3432
|
+
return p(), D(K, {
|
|
3431
3433
|
class: "kong-ui-entity-base-table",
|
|
3432
3434
|
title: e.title,
|
|
3433
3435
|
"title-tag": e.titleTag
|
|
3434
3436
|
}, {
|
|
3435
3437
|
default: k(() => [
|
|
3436
|
-
M(
|
|
3438
|
+
M(B, {
|
|
3437
3439
|
ref_key: "tableRefs",
|
|
3438
|
-
ref:
|
|
3440
|
+
ref: c,
|
|
3439
3441
|
"cache-identifier": a.value,
|
|
3440
3442
|
"cell-attrs": u,
|
|
3441
3443
|
"client-sort": e.enableClientSort,
|
|
@@ -3452,22 +3454,22 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3452
3454
|
headers: l.value,
|
|
3453
3455
|
"hide-pagination": e.hidePagination,
|
|
3454
3456
|
"hide-pagination-when-optional": "",
|
|
3455
|
-
"hide-toolbar": e.hideToolbar ?? A(
|
|
3456
|
-
"initial-fetcher-params":
|
|
3457
|
+
"hide-toolbar": e.hideToolbar ?? A(I),
|
|
3458
|
+
"initial-fetcher-params": g.value,
|
|
3457
3459
|
loading: e.isLoading,
|
|
3458
3460
|
"pagination-attributes": { disablePageJump: e.disablePaginationPageJump, offset: e.paginationType === "offset" },
|
|
3459
3461
|
"resize-columns": "",
|
|
3460
|
-
"row-attrs":
|
|
3462
|
+
"row-attrs": s,
|
|
3461
3463
|
"row-key": e.rowKey,
|
|
3462
3464
|
"search-input": e.query,
|
|
3463
3465
|
"sort-handler-function": e.enableClientSort ? e.sortHandlerFunction : void 0,
|
|
3464
3466
|
sortable: !e.disableSorting,
|
|
3465
|
-
"table-preferences":
|
|
3466
|
-
onEmptyStateActionClick:
|
|
3467
|
-
"onRow:click":
|
|
3468
|
-
onSort: x[0] || (x[0] = (
|
|
3469
|
-
onState:
|
|
3470
|
-
"onUpdate:tablePreferences":
|
|
3467
|
+
"table-preferences": w.value,
|
|
3468
|
+
onEmptyStateActionClick: f,
|
|
3469
|
+
"onRow:click": y.value,
|
|
3470
|
+
onSort: x[0] || (x[0] = (O) => C(O)),
|
|
3471
|
+
onState: m,
|
|
3472
|
+
"onUpdate:tablePreferences": $
|
|
3471
3473
|
}, Ce({
|
|
3472
3474
|
toolbar: k(() => [
|
|
3473
3475
|
N("div", Go, [
|
|
@@ -3477,26 +3479,33 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3477
3479
|
])) : j("", !0)
|
|
3478
3480
|
])
|
|
3479
3481
|
]),
|
|
3480
|
-
"action-items": k(({ row:
|
|
3481
|
-
P(h.$slots, "actions", { row:
|
|
3482
|
+
"action-items": k(({ row: O }) => [
|
|
3483
|
+
P(h.$slots, "actions", { row: O }, void 0, !0)
|
|
3482
3484
|
]),
|
|
3483
3485
|
_: 2
|
|
3484
3486
|
}, [
|
|
3485
|
-
|
|
3486
|
-
name:
|
|
3487
|
-
fn: k((
|
|
3487
|
+
h.$slots["empty-state"] ? {
|
|
3488
|
+
name: "empty-state",
|
|
3489
|
+
fn: k(() => [
|
|
3490
|
+
P(h.$slots, "empty-state", {}, void 0, !0)
|
|
3491
|
+
]),
|
|
3492
|
+
key: "0"
|
|
3493
|
+
} : void 0,
|
|
3494
|
+
oe(e.tableHeaders, (O, J) => ({
|
|
3495
|
+
name: J,
|
|
3496
|
+
fn: k(({ row: V, rowValue: G }) => [
|
|
3488
3497
|
M(Jo, {
|
|
3489
|
-
"key-name": String(
|
|
3490
|
-
"row-el": d(
|
|
3491
|
-
tooltip:
|
|
3498
|
+
"key-name": String(J),
|
|
3499
|
+
"row-el": d(V),
|
|
3500
|
+
tooltip: O.tooltip
|
|
3492
3501
|
}, {
|
|
3493
3502
|
default: k(() => [
|
|
3494
|
-
P(h.$slots,
|
|
3495
|
-
row:
|
|
3496
|
-
rowKey:
|
|
3497
|
-
rowValue:
|
|
3503
|
+
P(h.$slots, J, {
|
|
3504
|
+
row: V,
|
|
3505
|
+
rowKey: e.rowKey,
|
|
3506
|
+
rowValue: G
|
|
3498
3507
|
}, () => [
|
|
3499
|
-
q(
|
|
3508
|
+
q(E(G), 1)
|
|
3500
3509
|
], !0)
|
|
3501
3510
|
]),
|
|
3502
3511
|
_: 2
|
|
@@ -3508,15 +3517,15 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3508
3517
|
fn: k(() => [
|
|
3509
3518
|
M(A(Ut))
|
|
3510
3519
|
]),
|
|
3511
|
-
key: "
|
|
3520
|
+
key: "1"
|
|
3512
3521
|
}
|
|
3513
|
-
]), 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-toolbar", "initial-fetcher-params", "loading", "pagination-attributes", "row-key", "search-input", "sort-handler-function", "sortable", "table-preferences", "onRow:click"
|
|
3522
|
+
]), 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-toolbar", "initial-fetcher-params", "loading", "pagination-attributes", "row-key", "search-input", "sort-handler-function", "sortable", "table-preferences", "onRow:click"])
|
|
3514
3523
|
]),
|
|
3515
3524
|
_: 3
|
|
3516
3525
|
}, 8, ["title", "title-tag"]);
|
|
3517
3526
|
};
|
|
3518
3527
|
}
|
|
3519
|
-
}),
|
|
3528
|
+
}), ts = /* @__PURE__ */ ie(Qo, [["__scopeId", "data-v-fd0bbca2"]]), Zo = {
|
|
3520
3529
|
key: 0,
|
|
3521
3530
|
class: "kong-ui-entity-delete-error"
|
|
3522
3531
|
}, Xo = {
|
|
@@ -3561,12 +3570,12 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3561
3570
|
},
|
|
3562
3571
|
emits: ["cancel", "proceed"],
|
|
3563
3572
|
setup(e, { emit: t }) {
|
|
3564
|
-
const { i18nT: n } = H.useI18n(), r = e, i = t, o =
|
|
3573
|
+
const { i18nT: n } = H.useI18n(), r = e, i = t, o = T(() => r.needConfirm ? r.entityName : ""), a = () => {
|
|
3565
3574
|
i("cancel");
|
|
3566
3575
|
}, l = () => {
|
|
3567
3576
|
i("proceed");
|
|
3568
3577
|
};
|
|
3569
|
-
return (
|
|
3578
|
+
return (s, c) => {
|
|
3570
3579
|
const d = U("KAlert"), u = U("KPrompt");
|
|
3571
3580
|
return p(), D(u, {
|
|
3572
3581
|
"action-button-appearance": "danger",
|
|
@@ -3583,7 +3592,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3583
3592
|
e.error ? (p(), S("div", Zo, [
|
|
3584
3593
|
M(d, { appearance: "danger" }, {
|
|
3585
3594
|
default: k(() => [
|
|
3586
|
-
q(
|
|
3595
|
+
q(E(e.error), 1)
|
|
3587
3596
|
]),
|
|
3588
3597
|
_: 1
|
|
3589
3598
|
})
|
|
@@ -3594,21 +3603,21 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3594
3603
|
tag: "p"
|
|
3595
3604
|
}, Ce({
|
|
3596
3605
|
entityType: k(() => [
|
|
3597
|
-
q(
|
|
3606
|
+
q(E(r.entityType), 1)
|
|
3598
3607
|
]),
|
|
3599
3608
|
_: 2
|
|
3600
3609
|
}, [
|
|
3601
3610
|
r.entityName ? {
|
|
3602
3611
|
name: "entityName",
|
|
3603
3612
|
fn: k(() => [
|
|
3604
|
-
N("strong", null,
|
|
3613
|
+
N("strong", null, E(r.entityName), 1)
|
|
3605
3614
|
]),
|
|
3606
3615
|
key: "0"
|
|
3607
3616
|
} : void 0
|
|
3608
3617
|
]), 1032, ["keypath"]),
|
|
3609
|
-
r.description ||
|
|
3610
|
-
P(
|
|
3611
|
-
N("p", null,
|
|
3618
|
+
r.description || s.$slots.description ? (p(), S("div", Xo, [
|
|
3619
|
+
P(s.$slots, "description", {}, () => [
|
|
3620
|
+
N("p", null, E(r.description), 1)
|
|
3612
3621
|
], !0)
|
|
3613
3622
|
])) : j("", !0)
|
|
3614
3623
|
]),
|
|
@@ -3616,7 +3625,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3616
3625
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3617
3626
|
};
|
|
3618
3627
|
}
|
|
3619
|
-
}),
|
|
3628
|
+
}), ns = /* @__PURE__ */ ie(el, [["__scopeId", "data-v-4361d622"]]), tl = {
|
|
3620
3629
|
fill: "none",
|
|
3621
3630
|
height: "20",
|
|
3622
3631
|
viewBox: "0 0 20 20",
|
|
@@ -3658,7 +3667,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3658
3667
|
}), ol = {
|
|
3659
3668
|
key: 1,
|
|
3660
3669
|
class: "kong-ui-entity-filter"
|
|
3661
|
-
}, ll = { class: "kong-ui-entity-filter-menu" },
|
|
3670
|
+
}, ll = { class: "kong-ui-entity-filter-menu" }, sl = ["data-testid"], cl = ["onClick", "onKeydown"], ul = { class: "menu-item-indicator" }, dl = { class: "menu-item-body" }, fl = ["for"], pl = { class: "menu-item-buttons" }, ml = { class: "filter-clear-button-container" }, hl = /* @__PURE__ */ W({
|
|
3662
3671
|
__name: "EntityFilter",
|
|
3663
3672
|
props: {
|
|
3664
3673
|
// filter config, either exact match or fuzzy match
|
|
@@ -3678,57 +3687,57 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3678
3687
|
},
|
|
3679
3688
|
emits: ["update:modelValue"],
|
|
3680
3689
|
setup(e, { emit: t }) {
|
|
3681
|
-
const { i18n: { t: n } } = H.useI18n(), r = e, i = t, o = L(!1), a = L({}), l = L(/* @__PURE__ */ new Set()),
|
|
3682
|
-
const
|
|
3683
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
3684
|
-
|
|
3685
|
-
}),
|
|
3686
|
-
}),
|
|
3687
|
-
const
|
|
3688
|
-
return Object.keys(
|
|
3690
|
+
const { i18n: { t: n } } = H.useI18n(), r = e, i = t, o = L(!1), a = L({}), l = L(/* @__PURE__ */ new Set()), s = T(() => {
|
|
3691
|
+
const F = [];
|
|
3692
|
+
return new URLSearchParams(r.modelValue).forEach((w, g) => {
|
|
3693
|
+
w !== "" && F.push(g);
|
|
3694
|
+
}), F;
|
|
3695
|
+
}), c = T(() => {
|
|
3696
|
+
const F = r.config.fields;
|
|
3697
|
+
return Object.keys(F).filter((w) => {
|
|
3689
3698
|
var g;
|
|
3690
|
-
return (g =
|
|
3691
|
-
}).map((
|
|
3692
|
-
label:
|
|
3693
|
-
value:
|
|
3699
|
+
return (g = F == null ? void 0 : F[w]) == null ? void 0 : g.searchable;
|
|
3700
|
+
}).map((w) => ({
|
|
3701
|
+
label: F[w].label || w,
|
|
3702
|
+
value: w,
|
|
3694
3703
|
expanded: !1
|
|
3695
3704
|
}));
|
|
3696
3705
|
});
|
|
3697
|
-
Ae(() => r.modelValue, (
|
|
3698
|
-
a.value = {}, new URLSearchParams(
|
|
3699
|
-
a.value[g] =
|
|
3706
|
+
Ae(() => r.modelValue, (F) => {
|
|
3707
|
+
a.value = {}, new URLSearchParams(F).forEach((w, g) => {
|
|
3708
|
+
a.value[g] = w;
|
|
3700
3709
|
});
|
|
3701
3710
|
});
|
|
3702
3711
|
const d = () => {
|
|
3703
3712
|
o.value = !o.value;
|
|
3704
|
-
}, u = (
|
|
3705
|
-
l.value.has(
|
|
3706
|
-
}, m = (
|
|
3707
|
-
i("update:modelValue",
|
|
3713
|
+
}, u = (F) => {
|
|
3714
|
+
l.value.has(F) ? l.value.delete(F) : l.value.add(F);
|
|
3715
|
+
}, m = (F) => {
|
|
3716
|
+
i("update:modelValue", F);
|
|
3708
3717
|
}, f = () => {
|
|
3709
3718
|
m("");
|
|
3710
|
-
}, v = (
|
|
3711
|
-
var
|
|
3712
|
-
return (((g = (
|
|
3713
|
-
value:
|
|
3714
|
-
label:
|
|
3719
|
+
}, v = (F) => `filter-${F}`, y = (F) => {
|
|
3720
|
+
var w, g;
|
|
3721
|
+
return (((g = (w = r.config.schema) == null ? void 0 : w[F]) == null ? void 0 : g.values) ?? []).map(($) => ({
|
|
3722
|
+
value: $,
|
|
3723
|
+
label: $
|
|
3715
3724
|
}));
|
|
3716
|
-
}, C = (
|
|
3717
|
-
var
|
|
3718
|
-
return ((g = (
|
|
3719
|
-
}, I = (
|
|
3725
|
+
}, C = (F) => {
|
|
3726
|
+
var w, g;
|
|
3727
|
+
return ((g = (w = r.config.schema) == null ? void 0 : w[F]) == null ? void 0 : g.type) ?? "text";
|
|
3728
|
+
}, I = (F) => {
|
|
3720
3729
|
a.value = {
|
|
3721
3730
|
...a.value,
|
|
3722
|
-
[
|
|
3723
|
-
},
|
|
3731
|
+
[F]: ""
|
|
3732
|
+
}, R();
|
|
3724
3733
|
}, b = () => {
|
|
3725
|
-
a.value = {},
|
|
3726
|
-
},
|
|
3727
|
-
const
|
|
3728
|
-
|
|
3734
|
+
a.value = {}, R(!0);
|
|
3735
|
+
}, R = (F = !1) => {
|
|
3736
|
+
const w = Object.keys(a.value).reduce((g, $) => (a.value[$] && (g[$] = `${a.value[$]}`), g), {});
|
|
3737
|
+
F && (o.value = !1), i("update:modelValue", new URLSearchParams(w).toString());
|
|
3729
3738
|
};
|
|
3730
|
-
return (
|
|
3731
|
-
const g = U("KInput"),
|
|
3739
|
+
return (F, w) => {
|
|
3740
|
+
const g = U("KInput"), $ = U("KButton"), h = U("KSelect");
|
|
3732
3741
|
return e.config.isExactMatch ? (p(), D(g, {
|
|
3733
3742
|
key: 0,
|
|
3734
3743
|
autocomplete: "off",
|
|
@@ -3753,14 +3762,14 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3753
3762
|
]),
|
|
3754
3763
|
_: 1
|
|
3755
3764
|
}, 8, ["model-value", "placeholder"])) : (p(), S("div", ol, [
|
|
3756
|
-
M(
|
|
3765
|
+
M($, {
|
|
3757
3766
|
appearance: "tertiary",
|
|
3758
3767
|
"data-testid": "filter-button",
|
|
3759
3768
|
onClick: d
|
|
3760
3769
|
}, {
|
|
3761
3770
|
default: k(() => [
|
|
3762
3771
|
M(Bt),
|
|
3763
|
-
q(" " +
|
|
3772
|
+
q(" " + E(A(n)("filter.filterButtonText")) + " " + E(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
3764
3773
|
]),
|
|
3765
3774
|
_: 1
|
|
3766
3775
|
}),
|
|
@@ -3771,89 +3780,89 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3771
3780
|
[ge, o.value]
|
|
3772
3781
|
]),
|
|
3773
3782
|
he(N("div", ll, [
|
|
3774
|
-
(p(!0), S(le, null, oe(
|
|
3775
|
-
var
|
|
3783
|
+
(p(!0), S(le, null, oe(c.value, (x) => {
|
|
3784
|
+
var B, K;
|
|
3776
3785
|
return p(), S("div", {
|
|
3777
|
-
key:
|
|
3786
|
+
key: x.value,
|
|
3778
3787
|
class: "kong-ui-entity-filter-menu-item",
|
|
3779
|
-
"data-testid":
|
|
3788
|
+
"data-testid": x.value
|
|
3780
3789
|
}, [
|
|
3781
3790
|
N("span", {
|
|
3782
|
-
class:
|
|
3791
|
+
class: ce(["menu-item-title", { expanded: l.value.has(x.value) }]),
|
|
3783
3792
|
role: "button",
|
|
3784
3793
|
tabindex: "0",
|
|
3785
|
-
onClick: (
|
|
3786
|
-
onKeydown: Vn((
|
|
3794
|
+
onClick: (O) => u(x.value),
|
|
3795
|
+
onKeydown: Vn((O) => u(x.value), ["enter"])
|
|
3787
3796
|
}, [
|
|
3788
|
-
q(
|
|
3797
|
+
q(E(x.label) + " ", 1),
|
|
3789
3798
|
he(N("span", ul, null, 512), [
|
|
3790
|
-
[ge,
|
|
3799
|
+
[ge, s.value.includes(x.value)]
|
|
3791
3800
|
]),
|
|
3792
3801
|
M(A(er), {
|
|
3793
|
-
class:
|
|
3802
|
+
class: ce(["menu-item-expand-icon", { expanded: l.value.has(x.value) }]),
|
|
3794
3803
|
color: A(Yr)
|
|
3795
3804
|
}, null, 8, ["class", "color"])
|
|
3796
|
-
], 42,
|
|
3805
|
+
], 42, cl),
|
|
3797
3806
|
he(N("div", dl, [
|
|
3798
3807
|
N("label", {
|
|
3799
3808
|
class: "menu-item-label",
|
|
3800
|
-
for: v(
|
|
3801
|
-
},
|
|
3802
|
-
((
|
|
3809
|
+
for: v(x.value)
|
|
3810
|
+
}, E(A(n)("filter.fieldLabel")), 9, fl),
|
|
3811
|
+
((K = (B = e.config.schema) == null ? void 0 : B[x.value]) == null ? void 0 : K.type) === "select" ? (p(), D(h, {
|
|
3803
3812
|
key: 0,
|
|
3804
|
-
id: v(
|
|
3805
|
-
modelValue: a.value[
|
|
3806
|
-
"onUpdate:modelValue": (
|
|
3807
|
-
items: y(
|
|
3813
|
+
id: v(x.value),
|
|
3814
|
+
modelValue: a.value[x.value],
|
|
3815
|
+
"onUpdate:modelValue": (O) => a.value[x.value] = O,
|
|
3816
|
+
items: y(x.value),
|
|
3808
3817
|
placeholder: A(n)("filter.selectPlaceholder")
|
|
3809
3818
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (p(), D(g, {
|
|
3810
3819
|
key: 1,
|
|
3811
|
-
id: v(
|
|
3812
|
-
modelValue: a.value[
|
|
3813
|
-
"onUpdate:modelValue": (
|
|
3820
|
+
id: v(x.value),
|
|
3821
|
+
modelValue: a.value[x.value],
|
|
3822
|
+
"onUpdate:modelValue": (O) => a.value[x.value] = O,
|
|
3814
3823
|
autocomplete: "off",
|
|
3815
3824
|
placeholder: A(n)("filter.inputPlaceholder"),
|
|
3816
|
-
type: C(
|
|
3825
|
+
type: C(x.value)
|
|
3817
3826
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3818
3827
|
], 512), [
|
|
3819
|
-
[ge, l.value.has(
|
|
3828
|
+
[ge, l.value.has(x.value)]
|
|
3820
3829
|
]),
|
|
3821
3830
|
he(N("div", pl, [
|
|
3822
|
-
M(
|
|
3831
|
+
M($, {
|
|
3823
3832
|
appearance: "tertiary",
|
|
3824
3833
|
"data-testid": "apply-filter",
|
|
3825
3834
|
size: "small",
|
|
3826
|
-
onClick:
|
|
3835
|
+
onClick: w[0] || (w[0] = (O) => R(!0))
|
|
3827
3836
|
}, {
|
|
3828
3837
|
default: k(() => [
|
|
3829
|
-
q(
|
|
3838
|
+
q(E(A(n)("filter.applyButtonText")), 1)
|
|
3830
3839
|
]),
|
|
3831
3840
|
_: 1
|
|
3832
3841
|
}),
|
|
3833
|
-
M(
|
|
3842
|
+
M($, {
|
|
3834
3843
|
appearance: "tertiary",
|
|
3835
3844
|
"data-testid": "clear-filter",
|
|
3836
3845
|
size: "small",
|
|
3837
|
-
onClick: (
|
|
3846
|
+
onClick: (O) => I(x.value)
|
|
3838
3847
|
}, {
|
|
3839
3848
|
default: k(() => [
|
|
3840
|
-
q(
|
|
3849
|
+
q(E(A(n)("filter.clearButtonText")), 1)
|
|
3841
3850
|
]),
|
|
3842
3851
|
_: 2
|
|
3843
3852
|
}, 1032, ["onClick"])
|
|
3844
3853
|
], 512), [
|
|
3845
|
-
[ge, l.value.has(
|
|
3854
|
+
[ge, l.value.has(x.value)]
|
|
3846
3855
|
])
|
|
3847
|
-
], 8,
|
|
3856
|
+
], 8, sl);
|
|
3848
3857
|
}), 128)),
|
|
3849
3858
|
N("div", ml, [
|
|
3850
|
-
M(
|
|
3859
|
+
M($, {
|
|
3851
3860
|
appearance: "tertiary",
|
|
3852
3861
|
size: "small",
|
|
3853
3862
|
onClick: b
|
|
3854
3863
|
}, {
|
|
3855
3864
|
default: k(() => [
|
|
3856
|
-
q(
|
|
3865
|
+
q(E(A(n)("filter.clearAllButtonText")), 1)
|
|
3857
3866
|
]),
|
|
3858
3867
|
_: 1
|
|
3859
3868
|
})
|
|
@@ -3864,7 +3873,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3864
3873
|
]));
|
|
3865
3874
|
};
|
|
3866
3875
|
}
|
|
3867
|
-
}),
|
|
3876
|
+
}), rs = /* @__PURE__ */ ie(hl, [["__scopeId", "data-v-10fa27a5"]]), is = /* @__PURE__ */ W({
|
|
3868
3877
|
__name: "EntityToggleModal",
|
|
3869
3878
|
props: {
|
|
3870
3879
|
visible: {
|
|
@@ -3896,11 +3905,11 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3896
3905
|
},
|
|
3897
3906
|
emits: ["cancel", "proceed"],
|
|
3898
3907
|
setup(e, { emit: t }) {
|
|
3899
|
-
const { i18n: { t: n }, i18nT: r } = H.useI18n(), i = e, o = t, a = L(!1), l =
|
|
3908
|
+
const { i18n: { t: n }, i18nT: r } = H.useI18n(), i = e, o = t, a = L(!1), l = T(
|
|
3900
3909
|
() => i.action === "enable" ? n("toggleModal.enable.title", { entityType: i.entityType }) : n("toggleModal.disable.title", { entityType: i.entityType })
|
|
3901
|
-
),
|
|
3910
|
+
), s = T(
|
|
3902
3911
|
() => i.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
3903
|
-
),
|
|
3912
|
+
), c = () => o("cancel"), d = async () => {
|
|
3904
3913
|
if (i.onConfirm) {
|
|
3905
3914
|
a.value = !0;
|
|
3906
3915
|
try {
|
|
@@ -3917,11 +3926,11 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3917
3926
|
return p(), D(Wn, { to: "body" }, [
|
|
3918
3927
|
M(f, {
|
|
3919
3928
|
"action-button-disabled": a.value,
|
|
3920
|
-
"action-button-text":
|
|
3929
|
+
"action-button-text": s.value,
|
|
3921
3930
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
3922
3931
|
title: l.value,
|
|
3923
3932
|
visible: e.visible,
|
|
3924
|
-
onCancel:
|
|
3933
|
+
onCancel: c,
|
|
3925
3934
|
onProceed: d
|
|
3926
3935
|
}, {
|
|
3927
3936
|
default: k(() => [
|
|
@@ -3930,10 +3939,10 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3930
3939
|
scope: "global"
|
|
3931
3940
|
}, {
|
|
3932
3941
|
entityType: k(() => [
|
|
3933
|
-
q(
|
|
3942
|
+
q(E(e.entityType), 1)
|
|
3934
3943
|
]),
|
|
3935
3944
|
entityName: k(() => [
|
|
3936
|
-
N("strong", null,
|
|
3945
|
+
N("strong", null, E(e.entityName), 1)
|
|
3937
3946
|
]),
|
|
3938
3947
|
_: 1
|
|
3939
3948
|
}, 8, ["keypath"])
|
|
@@ -3943,7 +3952,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3943
3952
|
]);
|
|
3944
3953
|
};
|
|
3945
3954
|
}
|
|
3946
|
-
}),
|
|
3955
|
+
}), as = /* @__PURE__ */ W({
|
|
3947
3956
|
__name: "PermissionsWrapper",
|
|
3948
3957
|
props: {
|
|
3949
3958
|
/**
|
|
@@ -3965,7 +3974,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, Mn = /* @__PURE__ */
|
|
|
3965
3974
|
}
|
|
3966
3975
|
},
|
|
3967
3976
|
setup(e) {
|
|
3968
|
-
const t = e, n = L(void 0), r =
|
|
3977
|
+
const t = e, n = L(void 0), r = T(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
3969
3978
|
return Ae(() => t.authFunction, async () => {
|
|
3970
3979
|
n.value = await t.authFunction();
|
|
3971
3980
|
}, { immediate: !0 }), (i, o) => r.value ? P(i.$slots, "default", {
|
|
@@ -4035,13 +4044,13 @@ const Cl = ["aria-labelledby"], kl = { class: "form-section-wrapper" }, Al = {
|
|
|
4035
4044
|
const t = Xe(), n = xl();
|
|
4036
4045
|
return (r, i) => (p(), S("div", {
|
|
4037
4046
|
"aria-labelledby": e.title ? A(n) : void 0,
|
|
4038
|
-
class:
|
|
4047
|
+
class: ce(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4039
4048
|
role: "group"
|
|
4040
4049
|
}, [
|
|
4041
4050
|
N("div", kl, [
|
|
4042
4051
|
e.hideInfoHeader ? j("", !0) : (p(), S("div", {
|
|
4043
4052
|
key: 0,
|
|
4044
|
-
class:
|
|
4053
|
+
class: ce(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4045
4054
|
}, [
|
|
4046
4055
|
e.title ? (p(), D(Ne(e.titleTag), {
|
|
4047
4056
|
key: 0,
|
|
@@ -4049,13 +4058,13 @@ const Cl = ["aria-labelledby"], kl = { class: "form-section-wrapper" }, Al = {
|
|
|
4049
4058
|
class: "form-section-title"
|
|
4050
4059
|
}, {
|
|
4051
4060
|
default: k(() => [
|
|
4052
|
-
q(
|
|
4061
|
+
q(E(e.title), 1)
|
|
4053
4062
|
]),
|
|
4054
4063
|
_: 1
|
|
4055
4064
|
}, 8, ["id"])) : j("", !0),
|
|
4056
4065
|
e.description || A(t).description ? (p(), S("div", Al, [
|
|
4057
4066
|
P(r.$slots, "description", {}, () => [
|
|
4058
|
-
N("p", null,
|
|
4067
|
+
N("p", null, E(e.description), 1)
|
|
4059
4068
|
], !0)
|
|
4060
4069
|
])) : j("", !0),
|
|
4061
4070
|
A(t).footer ? (p(), S("div", _l, [
|
|
@@ -4068,7 +4077,7 @@ const Cl = ["aria-labelledby"], kl = { class: "form-section-wrapper" }, Al = {
|
|
|
4068
4077
|
])
|
|
4069
4078
|
], 10, Cl));
|
|
4070
4079
|
}
|
|
4071
|
-
}),
|
|
4080
|
+
}), os = /* @__PURE__ */ ie(Sl, [["__scopeId", "data-v-b1f74200"]]), $l = {
|
|
4072
4081
|
class: "kong-ui-public-entity-link",
|
|
4073
4082
|
"data-testid": "entity-link-parent"
|
|
4074
4083
|
}, Tl = {
|
|
@@ -4098,21 +4107,21 @@ const Cl = ["aria-labelledby"], kl = { class: "form-section-wrapper" }, Al = {
|
|
|
4098
4107
|
}
|
|
4099
4108
|
},
|
|
4100
4109
|
setup(e) {
|
|
4101
|
-
const t = e, n = L(), { isTruncated: r } = H.useTruncationDetector(n), { i18n: { t: i } } = H.useI18n(), o = i("global.actions.copyId"), a = L(o), l =
|
|
4110
|
+
const t = e, n = L(), { isTruncated: r } = H.useTruncationDetector(n), { i18n: { t: i } } = H.useI18n(), o = i("global.actions.copyId"), a = L(o), l = T(() => t.entityLinkData.deleted ?? !1), s = T(() => {
|
|
4102
4111
|
var u;
|
|
4103
4112
|
return (u = t.entityLinkData.id) != null && u.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4104
|
-
}),
|
|
4113
|
+
}), c = T(() => {
|
|
4105
4114
|
var u;
|
|
4106
|
-
return `${(u =
|
|
4115
|
+
return `${(u = s.value) == null ? void 0 : u.toString().slice(0, 5)} (deleted)`;
|
|
4107
4116
|
}), d = async (u) => {
|
|
4108
|
-
await u(
|
|
4117
|
+
await u(s.value || "") && (a.value = i("global.actions.copyToClipboard"), setTimeout(() => {
|
|
4109
4118
|
a.value = o;
|
|
4110
4119
|
}, 1800));
|
|
4111
4120
|
};
|
|
4112
4121
|
return (u, m) => {
|
|
4113
4122
|
const f = U("KTooltip"), v = U("KExternalLink"), y = U("KClipboardProvider");
|
|
4114
4123
|
return p(), S("div", $l, [
|
|
4115
|
-
l.value ? (p(), S("div", Tl,
|
|
4124
|
+
l.value ? (p(), S("div", Tl, E(c.value), 1)) : s.value ? s.value ? (p(), D(v, {
|
|
4116
4125
|
key: 2,
|
|
4117
4126
|
class: "entity-link",
|
|
4118
4127
|
"hide-icon": !e.newWindow,
|
|
@@ -4128,14 +4137,14 @@ const Cl = ["aria-labelledby"], kl = { class: "form-section-wrapper" }, Al = {
|
|
|
4128
4137
|
ref_key: "textContent",
|
|
4129
4138
|
ref: n,
|
|
4130
4139
|
class: "entity-link-label"
|
|
4131
|
-
},
|
|
4140
|
+
}, E(e.entityLinkData.label), 513)
|
|
4132
4141
|
]),
|
|
4133
4142
|
_: 1
|
|
4134
4143
|
}, 8, ["text"])
|
|
4135
4144
|
]),
|
|
4136
4145
|
_: 1
|
|
4137
|
-
}, 8, ["hide-icon", "href", "target"])) : j("", !0) : (p(), S("div", Il,
|
|
4138
|
-
|
|
4146
|
+
}, 8, ["hide-icon", "href", "target"])) : j("", !0) : (p(), S("div", Il, E(" – "))),
|
|
4147
|
+
s.value && e.allowCopy ? (p(), D(f, {
|
|
4139
4148
|
key: a.value,
|
|
4140
4149
|
class: "copy-uuid-tooltip",
|
|
4141
4150
|
"max-width": "160",
|
|
@@ -4165,7 +4174,7 @@ const Cl = ["aria-labelledby"], kl = { class: "form-section-wrapper" }, Al = {
|
|
|
4165
4174
|
]);
|
|
4166
4175
|
};
|
|
4167
4176
|
}
|
|
4168
|
-
}),
|
|
4177
|
+
}), ls = /* @__PURE__ */ ie(Fl, [["__scopeId", "data-v-2e2c07e5"]]), Ol = { class: "kong-ui-public-entity-empty-state" }, Ll = { class: "entity-empty-state-content" }, Rl = {
|
|
4169
4178
|
key: 0,
|
|
4170
4179
|
class: "empty-state-image"
|
|
4171
4180
|
}, Bl = {
|
|
@@ -4233,11 +4242,11 @@ const Cl = ["aria-labelledby"], kl = { class: "form-section-wrapper" }, Al = {
|
|
|
4233
4242
|
},
|
|
4234
4243
|
emits: ["click:create", "click:learn-more"],
|
|
4235
4244
|
setup(e) {
|
|
4236
|
-
const t = e, { i18n: { t: n } } = H.useI18n(), r = L(!1), i =
|
|
4245
|
+
const t = e, { i18n: { t: n } } = H.useI18n(), r = L(!1), i = T(() => r.value && !!t.actionButtonText), o = T(() => ft.includes(t.appearance) ? t.appearance : ["primary", t.appearance]);
|
|
4237
4246
|
return et(async () => {
|
|
4238
4247
|
r.value = await t.canCreate();
|
|
4239
4248
|
}), (a, l) => {
|
|
4240
|
-
const
|
|
4249
|
+
const s = U("KCard");
|
|
4241
4250
|
return p(), S("div", Ol, [
|
|
4242
4251
|
N("div", Ll, [
|
|
4243
4252
|
a.$slots.image ? (p(), S("div", Rl, [
|
|
@@ -4245,24 +4254,24 @@ const Cl = ["aria-labelledby"], kl = { class: "form-section-wrapper" }, Al = {
|
|
|
4245
4254
|
])) : j("", !0),
|
|
4246
4255
|
e.title || a.$slots.title ? (p(), S("div", Bl, [
|
|
4247
4256
|
N("h1", {
|
|
4248
|
-
class:
|
|
4257
|
+
class: ce(o.value)
|
|
4249
4258
|
}, [
|
|
4250
4259
|
P(a.$slots, "title", {}, () => [
|
|
4251
|
-
q(
|
|
4260
|
+
q(E(e.title), 1)
|
|
4252
4261
|
], !0)
|
|
4253
4262
|
], 2)
|
|
4254
4263
|
])) : j("", !0),
|
|
4255
4264
|
e.description || a.$slots.default ? (p(), S("div", Kl, [
|
|
4256
4265
|
P(a.$slots, "default", {}, () => [
|
|
4257
|
-
N("p", null,
|
|
4266
|
+
N("p", null, E(e.description), 1)
|
|
4258
4267
|
], !0)
|
|
4259
4268
|
])) : j("", !0),
|
|
4260
4269
|
e.pricing || a.$slots.pricing ? (p(), S("div", Nl, [
|
|
4261
4270
|
N("p", null, [
|
|
4262
|
-
N("b", null,
|
|
4271
|
+
N("b", null, E(A(n)("emptyState.pricingTitle")), 1),
|
|
4263
4272
|
l[2] || (l[2] = q()),
|
|
4264
4273
|
P(a.$slots, "pricing", {}, () => [
|
|
4265
|
-
q(
|
|
4274
|
+
q(E(e.pricing), 1)
|
|
4266
4275
|
], !0)
|
|
4267
4276
|
])
|
|
4268
4277
|
])) : j("", !0)
|
|
@@ -4277,11 +4286,11 @@ const Cl = ["aria-labelledby"], kl = { class: "form-section-wrapper" }, Al = {
|
|
|
4277
4286
|
appearance: "primary",
|
|
4278
4287
|
"data-testid": "entity-create-button",
|
|
4279
4288
|
size: "large",
|
|
4280
|
-
onClick: l[0] || (l[0] = (
|
|
4289
|
+
onClick: l[0] || (l[0] = (c) => a.$emit("click:create"))
|
|
4281
4290
|
}, {
|
|
4282
4291
|
default: k(() => [
|
|
4283
4292
|
M(A(Ut)),
|
|
4284
|
-
q(" " +
|
|
4293
|
+
q(" " + E(e.actionButtonText), 1)
|
|
4285
4294
|
]),
|
|
4286
4295
|
_: 1
|
|
4287
4296
|
})) : j("", !0),
|
|
@@ -4290,31 +4299,31 @@ const Cl = ["aria-labelledby"], kl = { class: "form-section-wrapper" }, Al = {
|
|
|
4290
4299
|
appearance: "secondary",
|
|
4291
4300
|
"data-testid": "entity-learn-more-button",
|
|
4292
4301
|
size: "large",
|
|
4293
|
-
onClick: l[1] || (l[1] = (
|
|
4302
|
+
onClick: l[1] || (l[1] = (c) => a.$emit("click:learn-more"))
|
|
4294
4303
|
}, {
|
|
4295
4304
|
default: k(() => [
|
|
4296
4305
|
M(A(jt), { decorative: "" }),
|
|
4297
|
-
q(" " +
|
|
4306
|
+
q(" " + E(A(n)("emptyState.learnMore")), 1)
|
|
4298
4307
|
]),
|
|
4299
4308
|
_: 1
|
|
4300
4309
|
})) : j("", !0)
|
|
4301
4310
|
], !0)
|
|
4302
4311
|
])) : j("", !0),
|
|
4303
4312
|
e.features.length ? (p(), S("div", jl, [
|
|
4304
|
-
(p(!0), S(le, null, oe(e.features, (
|
|
4305
|
-
key:
|
|
4313
|
+
(p(!0), S(le, null, oe(e.features, (c, d) => (p(), D(s, {
|
|
4314
|
+
key: c,
|
|
4306
4315
|
class: "entity-empty-state-card"
|
|
4307
4316
|
}, {
|
|
4308
4317
|
title: k(() => [
|
|
4309
4318
|
a.$slots[`feature-${d}-icon`] ? (p(), S("div", Ul, [
|
|
4310
4319
|
P(a.$slots, `feature-${d}-icon`, {}, void 0, !0)
|
|
4311
4320
|
])) : j("", !0),
|
|
4312
|
-
N("div", Pl,
|
|
4321
|
+
N("div", Pl, E(c.title), 1)
|
|
4313
4322
|
]),
|
|
4314
4323
|
default: k(() => [
|
|
4315
4324
|
N("div", {
|
|
4316
|
-
title:
|
|
4317
|
-
},
|
|
4325
|
+
title: c.description
|
|
4326
|
+
}, E(c.description), 9, ql)
|
|
4318
4327
|
]),
|
|
4319
4328
|
_: 2
|
|
4320
4329
|
}, 1024))), 128))
|
|
@@ -4325,7 +4334,7 @@ const Cl = ["aria-labelledby"], kl = { class: "form-section-wrapper" }, Al = {
|
|
|
4325
4334
|
]);
|
|
4326
4335
|
};
|
|
4327
4336
|
}
|
|
4328
|
-
}),
|
|
4337
|
+
}), ss = /* @__PURE__ */ ie(Yl, [["__scopeId", "data-v-775534d4"]]), Vl = { key: 1 }, cs = /* @__PURE__ */ W({
|
|
4329
4338
|
__name: "TableTags",
|
|
4330
4339
|
props: {
|
|
4331
4340
|
/** The tags to display in the table */
|
|
@@ -4339,7 +4348,7 @@ const Cl = ["aria-labelledby"], kl = { class: "form-section-wrapper" }, Al = {
|
|
|
4339
4348
|
}
|
|
4340
4349
|
},
|
|
4341
4350
|
setup(e) {
|
|
4342
|
-
const t = e, n =
|
|
4351
|
+
const t = e, n = T(() => {
|
|
4343
4352
|
if (Array.isArray(t.tags))
|
|
4344
4353
|
return t.tags;
|
|
4345
4354
|
if (typeof t.tags == "string")
|
|
@@ -4362,7 +4371,7 @@ const Cl = ["aria-labelledby"], kl = { class: "form-section-wrapper" }, Al = {
|
|
|
4362
4371
|
}, ["stop"]))
|
|
4363
4372
|
}, {
|
|
4364
4373
|
default: k(() => [
|
|
4365
|
-
q(
|
|
4374
|
+
q(E(a), 1)
|
|
4366
4375
|
]),
|
|
4367
4376
|
_: 2
|
|
4368
4377
|
}, 1032, ["max-width"]))), 128))
|
|
@@ -4371,7 +4380,7 @@ const Cl = ["aria-labelledby"], kl = { class: "form-section-wrapper" }, Al = {
|
|
|
4371
4380
|
})) : (p(), S("span", Vl, "-"));
|
|
4372
4381
|
};
|
|
4373
4382
|
}
|
|
4374
|
-
}), { useAxios:
|
|
4383
|
+
}), { useAxios: us, useDeleteUrlBuilder: ds, useErrors: fs, useExternalLinkCreator: ps, useFetchUrlBuilder: ms, useFetcher: hs, useFetcherCacheKey: gs, useDebouncedFilter: ys, useStringHelpers: vs, useHelpers: bs, useGatewayFeatureSupported: xs, useTruncationDetector: Cs, useValidators: ks, useSchemaProvider: As, useTableState: _s } = H;
|
|
4375
4384
|
export {
|
|
4376
4385
|
ft as Appearances,
|
|
4377
4386
|
No as ConfigCardDisplay,
|
|
@@ -4379,38 +4388,38 @@ export {
|
|
|
4379
4388
|
ae as ConfigurationSchemaSection,
|
|
4380
4389
|
Y as ConfigurationSchemaType,
|
|
4381
4390
|
Xl as EntityBaseConfigCard,
|
|
4382
|
-
|
|
4391
|
+
es as EntityBaseForm,
|
|
4383
4392
|
ir as EntityBaseFormType,
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4393
|
+
ts as EntityBaseTable,
|
|
4394
|
+
ns as EntityDeleteModal,
|
|
4395
|
+
ss as EntityEmptyState,
|
|
4396
|
+
rs as EntityFilter,
|
|
4397
|
+
os as EntityFormSection,
|
|
4398
|
+
ls as EntityLink,
|
|
4399
|
+
is as EntityToggleModal,
|
|
4391
4400
|
rr as EntityTypes,
|
|
4392
4401
|
de as FetcherStatus,
|
|
4393
4402
|
Ur as InternalLinkItem,
|
|
4394
4403
|
Gt as JsonCodeBlock,
|
|
4395
|
-
|
|
4404
|
+
as as PermissionsWrapper,
|
|
4396
4405
|
tt as SupportedEntityType,
|
|
4397
4406
|
Me as SupportedEntityTypesArray,
|
|
4398
|
-
|
|
4407
|
+
cs as TableTags,
|
|
4399
4408
|
Dn as TerraformCodeBlock,
|
|
4400
4409
|
Mn as YamlCodeBlock,
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4410
|
+
us as useAxios,
|
|
4411
|
+
ys as useDebouncedFilter,
|
|
4412
|
+
ds as useDeleteUrlBuilder,
|
|
4413
|
+
fs as useErrors,
|
|
4414
|
+
ps as useExternalLinkCreator,
|
|
4415
|
+
ms as useFetchUrlBuilder,
|
|
4416
|
+
hs as useFetcher,
|
|
4417
|
+
gs as useFetcherCacheKey,
|
|
4418
|
+
xs as useGatewayFeatureSupported,
|
|
4419
|
+
bs as useHelpers,
|
|
4420
|
+
As as useSchemaProvider,
|
|
4421
|
+
vs as useStringHelpers,
|
|
4422
|
+
_s as useTableState,
|
|
4423
|
+
Cs as useTruncationDetector,
|
|
4424
|
+
ks as useValidators
|
|
4416
4425
|
};
|