@kong-ui-public/entities-key-sets 2.1.12 → 2.1.13
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-key-sets.es.js +982 -946
- package/dist/entities-key-sets.umd.js +26 -26
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as ne, ref as E, computed as T, watch as
|
|
1
|
+
import { defineComponent as ne, ref as E, computed as T, watch as we, renderSlot as z, createCommentVNode as V, unref as k, useSlots as We, onBeforeMount as ct, resolveComponent as N, openBlock as g, createBlock as q, createSlots as Ie, withCtx as v, createElementVNode as B, createTextVNode as H, toDisplayString as F, createVNode as O, createElementBlock as _, renderList as de, Fragment as fe, normalizeClass as ke, withModifiers as Re, withDirectives as Fe, vShow as Ne, useCssVars as Zt, resolveDynamicComponent as Oe, normalizeProps as Xn, guardReactiveProps as ea, mergeProps as nt, onMounted as ta, onUnmounted as na, normalizeStyle as Gt, inject as aa, pushScopeId as Qt, popScopeId as Xt, Teleport as ia, reactive as It } from "vue";
|
|
2
2
|
import { useRouter as ut } from "vue-router";
|
|
3
|
-
import { createI18n as dt, i18nTComponent as
|
|
3
|
+
import { createI18n as dt, i18nTComponent as en } from "@kong-ui-public/i18n";
|
|
4
4
|
import ra from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as oa } from "@kong/kongponents";
|
|
6
6
|
const la = {
|
|
@@ -71,13 +71,13 @@ function ca() {
|
|
|
71
71
|
const e = dt("en-us", sa);
|
|
72
72
|
return {
|
|
73
73
|
i18n: e,
|
|
74
|
-
i18nT:
|
|
74
|
+
i18nT: en(e)
|
|
75
75
|
// Translation component <i18n-t>
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
const pt = {
|
|
79
79
|
useI18n: ca
|
|
80
|
-
},
|
|
80
|
+
}, Pe = {
|
|
81
81
|
list: {
|
|
82
82
|
konnect: "/api/runtime_groups/{controlPlaneId}/key-sets",
|
|
83
83
|
kongManager: "/{workspace}/key-sets"
|
|
@@ -93,7 +93,7 @@ const pt = {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
-
var
|
|
96
|
+
var tn = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e))(tn || {}), at = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(at || {}), Se = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Se || {}), W = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(W || {}), pe = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(pe || {});
|
|
97
97
|
function ft(e = {}) {
|
|
98
98
|
return {
|
|
99
99
|
axiosInstance: ra.create({
|
|
@@ -199,6 +199,9 @@ const fa = {
|
|
|
199
199
|
enabledLabel: "Enabled",
|
|
200
200
|
disabledLabel: "Disabled"
|
|
201
201
|
},
|
|
202
|
+
endpoints: {
|
|
203
|
+
get: "Get"
|
|
204
|
+
},
|
|
202
205
|
copy: {
|
|
203
206
|
tooltip: "Copy {label}",
|
|
204
207
|
success: "Copied!"
|
|
@@ -253,11 +256,11 @@ function yt() {
|
|
|
253
256
|
const e = dt("en-us", wa);
|
|
254
257
|
return {
|
|
255
258
|
i18n: e,
|
|
256
|
-
i18nT:
|
|
259
|
+
i18nT: en(e)
|
|
257
260
|
// Translation component <i18n-t>
|
|
258
261
|
};
|
|
259
262
|
}
|
|
260
|
-
function
|
|
263
|
+
function nn() {
|
|
261
264
|
const e = (t, a) => (a == null ? void 0 : a[t]) ?? void 0, n = (t, a) => {
|
|
262
265
|
if (t.length !== a.length)
|
|
263
266
|
return !1;
|
|
@@ -310,82 +313,82 @@ function Sa(e, n, t, a = {
|
|
|
310
313
|
headers: e.requestHeaders
|
|
311
314
|
}), { i18n: { t: r } } = yt(), { debounce: o } = ua(), l = o(async (w) => {
|
|
312
315
|
await S(w);
|
|
313
|
-
}, 200), s = E(!1),
|
|
316
|
+
}, 200), s = E(!1), c = E(""), d = E(""), u = E([]), y = E([]), p = E(void 0), C = k(n);
|
|
314
317
|
let h = `${e.apiBaseUrl}${C}`;
|
|
315
318
|
e.app === "konnect" ? h = h.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (h = h.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
316
|
-
const { isValidUuid:
|
|
319
|
+
const { isValidUuid: I } = nn(), m = async () => {
|
|
317
320
|
try {
|
|
318
321
|
s.value = !0;
|
|
319
322
|
const { data: w } = await i.get(`${h}?size=${t}`);
|
|
320
|
-
w != null && w.next || (
|
|
323
|
+
w != null && w.next || (p.value = a.fetchedItemsKey in w ? w[a.fetchedItemsKey] : []), y.value = a.fetchedItemsKey in w ? w[a.fetchedItemsKey] : [], u.value = y.value;
|
|
321
324
|
} catch {
|
|
322
|
-
|
|
325
|
+
u.value = [], c.value = r("debouncedFilter.errors.fetch");
|
|
323
326
|
} finally {
|
|
324
327
|
s.value = !1;
|
|
325
328
|
}
|
|
326
|
-
},
|
|
329
|
+
}, f = E(""), S = async (w) => {
|
|
327
330
|
var x, L, J;
|
|
328
|
-
if (
|
|
329
|
-
if (
|
|
331
|
+
if (f.value !== w)
|
|
332
|
+
if (f.value = w || "", p.value === void 0)
|
|
330
333
|
try {
|
|
331
|
-
if (s.value = !0,
|
|
334
|
+
if (s.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
332
335
|
let M = h + "";
|
|
333
336
|
w && (M += `/${w}`);
|
|
334
337
|
const { data: b } = await i.get(`${M}?size=${t}`);
|
|
335
|
-
a.fetchedItemsKey in b ?
|
|
338
|
+
a.fetchedItemsKey in b ? u.value = b[a.fetchedItemsKey] : b != null && b.id ? u.value = [b] : u.value = [];
|
|
336
339
|
} else if (w) {
|
|
337
340
|
const M = [];
|
|
338
|
-
|
|
341
|
+
I(w) && a.searchKeys.includes("id") ? M.push((async () => {
|
|
339
342
|
const { data: j } = await i.get(`${h}/${w}`);
|
|
340
343
|
return [j[a.fetchedItemsKey] ?? j];
|
|
341
344
|
})()) : M.push(
|
|
342
345
|
...a.searchKeys.filter((j) => j !== "id").map(async (j) => {
|
|
343
|
-
const { data:
|
|
344
|
-
return
|
|
346
|
+
const { data: K } = await i.get(`${h}?${j}=${w}`);
|
|
347
|
+
return K[a.fetchedItemsKey];
|
|
345
348
|
})
|
|
346
349
|
);
|
|
347
|
-
const b = await Promise.all(M),
|
|
348
|
-
|
|
349
|
-
var
|
|
350
|
-
(
|
|
351
|
-
|
|
350
|
+
const b = await Promise.all(M), U = /* @__PURE__ */ new Set();
|
|
351
|
+
u.value = [], (x = b == null ? void 0 : b.forEach) == null || x.call(b, (j) => {
|
|
352
|
+
var K;
|
|
353
|
+
(K = j == null ? void 0 : j.forEach) == null || K.call(j, (D) => {
|
|
354
|
+
U.has(D.id) || (U.add(D.id), u.value.push(D));
|
|
352
355
|
});
|
|
353
356
|
});
|
|
354
357
|
} else
|
|
355
|
-
|
|
358
|
+
u.value = y.value;
|
|
356
359
|
} catch (M) {
|
|
357
|
-
((L = M == null ? void 0 : M.response) == null ? void 0 : L.status) === 404 ? d.value = r("debouncedFilter.errors.invalid") : (
|
|
360
|
+
((L = M == null ? void 0 : M.response) == null ? void 0 : L.status) === 404 ? d.value = r("debouncedFilter.errors.invalid") : (u.value = [], c.value = r("debouncedFilter.errors.fetch"));
|
|
358
361
|
} finally {
|
|
359
362
|
s.value = !1;
|
|
360
363
|
}
|
|
361
364
|
else
|
|
362
|
-
s.value = !0, d.value = "", w ? (
|
|
365
|
+
s.value = !0, d.value = "", w ? (u.value = (J = p.value) == null ? void 0 : J.filter((M) => {
|
|
363
366
|
var b;
|
|
364
|
-
let
|
|
367
|
+
let U = !1;
|
|
365
368
|
for (const j of a.searchKeys) {
|
|
366
|
-
const
|
|
367
|
-
|
|
369
|
+
const K = typeof M[j] == "string" ? (b = M[j]) == null ? void 0 : b.toLowerCase() : M[j];
|
|
370
|
+
K != null && K.includes(w.toLowerCase()) && (U = !0);
|
|
368
371
|
}
|
|
369
|
-
return
|
|
370
|
-
}), (!
|
|
372
|
+
return U;
|
|
373
|
+
}), (!u.value || !u.value.length) && (d.value = r("debouncedFilter.errors.invalid"))) : u.value = p.value, s.value = !1;
|
|
371
374
|
};
|
|
372
375
|
return {
|
|
373
376
|
loading: s,
|
|
374
|
-
error:
|
|
377
|
+
error: c,
|
|
375
378
|
validationError: d,
|
|
376
|
-
results:
|
|
377
|
-
allRecords:
|
|
378
|
-
loadItems:
|
|
379
|
+
results: u,
|
|
380
|
+
allRecords: p,
|
|
381
|
+
loadItems: m,
|
|
379
382
|
debouncedQueryChange: l
|
|
380
383
|
};
|
|
381
384
|
}
|
|
382
|
-
function
|
|
385
|
+
function Ia(e, n) {
|
|
383
386
|
const t = k(n), a = T(
|
|
384
387
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
385
388
|
);
|
|
386
389
|
return a.value.search = "", (i) => `${a.value.href}/${i}`;
|
|
387
390
|
}
|
|
388
|
-
function
|
|
391
|
+
function Aa() {
|
|
389
392
|
const { i18n: { t: e } } = yt();
|
|
390
393
|
return {
|
|
391
394
|
getMessageFromError: (n) => {
|
|
@@ -424,63 +427,63 @@ function xa(e) {
|
|
|
424
427
|
return console.warn("Failed to build valid URL:", a), "";
|
|
425
428
|
}
|
|
426
429
|
}
|
|
427
|
-
function
|
|
430
|
+
function an(e, n) {
|
|
428
431
|
const t = E(k(e)), a = E(k(n)), i = T(
|
|
429
432
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
430
433
|
), r = T(
|
|
431
434
|
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
432
435
|
);
|
|
433
436
|
return (o) => {
|
|
434
|
-
const { page: l, pageSize: s, offset:
|
|
437
|
+
const { page: l, pageSize: s, offset: c, sortColumnKey: d, sortColumnOrder: u, query: y } = o;
|
|
435
438
|
try {
|
|
436
|
-
let
|
|
437
|
-
return i.value &&
|
|
438
|
-
|
|
439
|
-
}), d &&
|
|
440
|
-
} catch (
|
|
441
|
-
return console.error("RouteList(fetcher)",
|
|
439
|
+
let p = new URL(r.value.href);
|
|
440
|
+
return i.value && y ? (p.search = "", p = t.value.app === "konnect" ? new URL(`${p.href}?filter[name][contains]=${y}`) : new URL(`${p.href}/${y}/`)) : (i.value || new URLSearchParams(y).forEach((C, h) => {
|
|
441
|
+
p.searchParams.append(h, C);
|
|
442
|
+
}), d && p.searchParams.append("sort_by", d), u === "desc" && p.searchParams.append("sort_desc", "1"), p.searchParams.append("size", String(s))), c && l !== 1 && p.searchParams.append("offset", String(c)), p.href;
|
|
443
|
+
} catch (p) {
|
|
444
|
+
return console.error("RouteList(fetcher)", p), a.value;
|
|
442
445
|
}
|
|
443
446
|
};
|
|
444
447
|
}
|
|
445
448
|
function _a(e, n, t = "data") {
|
|
446
449
|
const a = k(n), { axiosInstance: i } = ft({
|
|
447
450
|
headers: e.requestHeaders
|
|
448
|
-
}), r =
|
|
449
|
-
status:
|
|
451
|
+
}), r = an(e, a), o = E({
|
|
452
|
+
status: Se.Idle
|
|
450
453
|
});
|
|
451
454
|
return { fetcher: async (l) => {
|
|
452
455
|
try {
|
|
453
|
-
o.value = { status:
|
|
454
|
-
const s = r(l), { data:
|
|
455
|
-
let
|
|
456
|
-
|
|
457
|
-
const
|
|
458
|
-
data:
|
|
459
|
-
total:
|
|
460
|
-
...
|
|
456
|
+
o.value = { status: Se.Loading };
|
|
457
|
+
const s = r(l), { data: c } = await i.get(s), d = t && t.replace(/[^\w-_]/gi, "");
|
|
458
|
+
let u;
|
|
459
|
+
c[d] && Array.isArray(c[d]) ? u = c[d] : Array.isArray(c) ? u = c : u = Object.keys(c).length ? [c] : [];
|
|
460
|
+
const y = {
|
|
461
|
+
data: u,
|
|
462
|
+
total: u.length,
|
|
463
|
+
...c.offset ? {
|
|
461
464
|
pagination: {
|
|
462
|
-
offset:
|
|
465
|
+
offset: c.offset
|
|
463
466
|
}
|
|
464
467
|
} : null
|
|
465
468
|
};
|
|
466
469
|
return o.value = {
|
|
467
|
-
status:
|
|
468
|
-
response:
|
|
469
|
-
},
|
|
470
|
+
status: Se.Idle,
|
|
471
|
+
response: y
|
|
472
|
+
}, y;
|
|
470
473
|
} catch (s) {
|
|
471
|
-
const
|
|
474
|
+
const c = {
|
|
472
475
|
data: [],
|
|
473
476
|
total: 0
|
|
474
477
|
};
|
|
475
478
|
return l.query && s.response.status === 404 ? (o.value = {
|
|
476
|
-
status:
|
|
477
|
-
response:
|
|
479
|
+
status: Se.NoResults,
|
|
480
|
+
response: c,
|
|
478
481
|
error: s
|
|
479
|
-
},
|
|
480
|
-
status:
|
|
481
|
-
response:
|
|
482
|
+
}, c) : (o.value = {
|
|
483
|
+
status: Se.Error,
|
|
484
|
+
response: c,
|
|
482
485
|
error: s
|
|
483
|
-
},
|
|
486
|
+
}, c);
|
|
484
487
|
}
|
|
485
488
|
}, fetcherState: o };
|
|
486
489
|
}
|
|
@@ -491,10 +494,10 @@ function Ta() {
|
|
|
491
494
|
convertKeyToTitle: e
|
|
492
495
|
};
|
|
493
496
|
}
|
|
494
|
-
const
|
|
497
|
+
const rn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, At = (e) => {
|
|
495
498
|
if (typeof e != "string")
|
|
496
499
|
throw new TypeError("Invalid argument expected string");
|
|
497
|
-
const n = e.match(
|
|
500
|
+
const n = e.match(rn);
|
|
498
501
|
if (!n)
|
|
499
502
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
500
503
|
return n.shift(), n;
|
|
@@ -514,26 +517,26 @@ const an = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
514
517
|
}
|
|
515
518
|
return 0;
|
|
516
519
|
}, $a = (e, n) => {
|
|
517
|
-
const t =
|
|
520
|
+
const t = At(e), a = At(n), i = t.pop(), r = a.pop(), o = Tt(t, a);
|
|
518
521
|
return o !== 0 ? o : i && r ? Tt(i.split("."), r.split(".")) : i || r ? i ? -1 : 1 : 0;
|
|
519
522
|
}, jt = (e, n, t) => {
|
|
520
523
|
Ma(t);
|
|
521
524
|
const a = $a(e, n);
|
|
522
|
-
return
|
|
523
|
-
},
|
|
525
|
+
return on[t].includes(a);
|
|
526
|
+
}, on = {
|
|
524
527
|
">": [1],
|
|
525
528
|
">=": [0, 1],
|
|
526
529
|
"=": [0],
|
|
527
530
|
"<=": [-1, 0],
|
|
528
531
|
"<": [-1],
|
|
529
532
|
"!=": [-1, 1]
|
|
530
|
-
}, Ot = Object.keys(
|
|
533
|
+
}, Ot = Object.keys(on), Ma = (e) => {
|
|
531
534
|
if (typeof e != "string")
|
|
532
535
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
533
536
|
if (Ot.indexOf(e) === -1)
|
|
534
537
|
throw new Error(`Invalid operator, expected one of ${Ot.join("|")}`);
|
|
535
|
-
}, Ea = (e) => typeof e == "string" && /^[v\d]/.test(e) &&
|
|
536
|
-
function
|
|
538
|
+
}, Ea = (e) => typeof e == "string" && /^[v\d]/.test(e) && rn.test(e);
|
|
539
|
+
function Fa(e) {
|
|
537
540
|
const { gatewayInfo: n, supportedRange: t } = e;
|
|
538
541
|
if (!n)
|
|
539
542
|
return !0;
|
|
@@ -546,9 +549,9 @@ function Ka(e) {
|
|
|
546
549
|
const [o, l] = r;
|
|
547
550
|
return !(o && jt(i, o, "<") || l && jt(i, l, ">"));
|
|
548
551
|
}
|
|
549
|
-
function
|
|
552
|
+
function Na(e) {
|
|
550
553
|
const n = E(0), t = E(0), a = E(!1);
|
|
551
|
-
return
|
|
554
|
+
return we(e, (i) => {
|
|
552
555
|
i && !a.value && (n.value = i.offsetWidth, t.value = i.scrollWidth, a.value = !0);
|
|
553
556
|
}), {
|
|
554
557
|
isTruncated: T(() => n.value < t.value)
|
|
@@ -557,37 +560,37 @@ function Fa(e) {
|
|
|
557
560
|
const re = {
|
|
558
561
|
useAxios: ft,
|
|
559
562
|
useDebouncedFilter: Sa,
|
|
560
|
-
useDeleteUrlBuilder:
|
|
561
|
-
useErrors:
|
|
563
|
+
useDeleteUrlBuilder: Ia,
|
|
564
|
+
useErrors: Aa,
|
|
562
565
|
useExternalLinkCreator: xa,
|
|
563
566
|
useFetcher: _a,
|
|
564
|
-
useFetchUrlBuilder:
|
|
565
|
-
useHelpers:
|
|
567
|
+
useFetchUrlBuilder: an,
|
|
568
|
+
useHelpers: nn,
|
|
566
569
|
useStringHelpers: Ta,
|
|
567
570
|
useI18n: yt,
|
|
568
|
-
useGatewayFeatureSupported:
|
|
569
|
-
useTruncationDetector:
|
|
570
|
-
},
|
|
571
|
+
useGatewayFeatureSupported: Fa,
|
|
572
|
+
useTruncationDetector: Na
|
|
573
|
+
}, Ka = {
|
|
571
574
|
fail: "Failed to copy id to clipboard",
|
|
572
575
|
success: {
|
|
573
576
|
prefix: "Successfully",
|
|
574
577
|
content: " copied to clipboard"
|
|
575
578
|
}
|
|
576
|
-
},
|
|
577
|
-
message:
|
|
578
|
-
iconTitle:
|
|
579
|
-
}, La = "kong-ui-copy-uuid-notify", $t = "24px",
|
|
579
|
+
}, qa = "Copy to clipboard", Ba = {
|
|
580
|
+
message: Ka,
|
|
581
|
+
iconTitle: qa
|
|
582
|
+
}, La = "kong-ui-copy-uuid-notify", $t = "24px", Ua = (e, n) => {
|
|
580
583
|
const t = e.__vccOpts || e;
|
|
581
584
|
for (const [a, i] of n)
|
|
582
585
|
t[a] = i;
|
|
583
586
|
return t;
|
|
584
|
-
},
|
|
587
|
+
}, Da = (e) => (Qt("data-v-641e0aee"), e = e(), Xt(), e), Ra = ["aria-hidden"], Pa = {
|
|
585
588
|
key: 0,
|
|
586
589
|
"data-testid": "kui-icon-svg-title"
|
|
587
|
-
}, Va = /* @__PURE__ */
|
|
590
|
+
}, Va = /* @__PURE__ */ Da(() => /* @__PURE__ */ B("path", {
|
|
588
591
|
d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
|
|
589
592
|
fill: "currentColor"
|
|
590
|
-
}, null, -1)),
|
|
593
|
+
}, null, -1)), za = /* @__PURE__ */ ne({
|
|
591
594
|
__name: "CopyIcon",
|
|
592
595
|
props: {
|
|
593
596
|
/** The accessibility text provided to screen readers */
|
|
@@ -656,14 +659,14 @@ const re = {
|
|
|
656
659
|
lineHeight: "0",
|
|
657
660
|
width: t.value
|
|
658
661
|
}));
|
|
659
|
-
return (i, r) => (
|
|
662
|
+
return (i, r) => (g(), q(Oe(e.as), {
|
|
660
663
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
661
664
|
class: "kui-icon copy-icon",
|
|
662
665
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
663
|
-
style:
|
|
666
|
+
style: Gt(a.value)
|
|
664
667
|
}, {
|
|
665
668
|
default: v(() => [
|
|
666
|
-
(
|
|
669
|
+
(g(), _("svg", {
|
|
667
670
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
668
671
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
669
672
|
fill: "none",
|
|
@@ -673,14 +676,14 @@ const re = {
|
|
|
673
676
|
width: "100%",
|
|
674
677
|
xmlns: "http://www.w3.org/2000/svg"
|
|
675
678
|
}, [
|
|
676
|
-
e.title ? (
|
|
679
|
+
e.title ? (g(), _("title", Pa, F(e.title), 1)) : V("", !0),
|
|
677
680
|
Va
|
|
678
|
-
], 8,
|
|
681
|
+
], 8, Ra))
|
|
679
682
|
]),
|
|
680
683
|
_: 1
|
|
681
684
|
}, 8, ["aria-hidden", "style"]));
|
|
682
685
|
}
|
|
683
|
-
}),
|
|
686
|
+
}), Ha = /* @__PURE__ */ Ua(za, [["__scopeId", "data-v-641e0aee"]]), Ja = "16px", Ya = { class: "kong-ui-copy-uuid" }, Wa = ["onClick"], Mt = 15, Za = /* @__PURE__ */ ne({
|
|
684
687
|
__name: "CopyUuid",
|
|
685
688
|
props: {
|
|
686
689
|
uuid: {
|
|
@@ -724,66 +727,66 @@ const re = {
|
|
|
724
727
|
},
|
|
725
728
|
emits: ["success", "error"],
|
|
726
729
|
setup(e, { emit: n }) {
|
|
727
|
-
const { t } = dt("en-us",
|
|
730
|
+
const { t } = dt("en-us", Ba), a = e, i = n, r = a.notify || aa(La, () => {
|
|
728
731
|
}), o = T(() => a.idTooltip ? {
|
|
729
732
|
label: a.idTooltip,
|
|
730
733
|
positionFixed: !0,
|
|
731
734
|
placement: "bottomStart"
|
|
732
735
|
} : {
|
|
733
736
|
title: a.uuid
|
|
734
|
-
}), l = T(() => !!(a.tooltip && a.successTooltip)), s = E(a.tooltip),
|
|
737
|
+
}), l = T(() => !!(a.tooltip && a.successTooltip)), s = E(a.tooltip), c = T(() => a.tooltip ? {
|
|
735
738
|
label: s.value,
|
|
736
739
|
positionFixed: !0,
|
|
737
740
|
maxWidth: "500px",
|
|
738
741
|
placement: "bottomStart"
|
|
739
742
|
} : {}), d = T(() => {
|
|
740
|
-
var
|
|
741
|
-
return a.format === "redacted" ? "*****" : a.format === "deleted" ? `*${(
|
|
742
|
-
}),
|
|
743
|
-
s.value =
|
|
743
|
+
var p;
|
|
744
|
+
return a.format === "redacted" ? "*****" : a.format === "deleted" ? `*${(p = a.uuid) == null ? void 0 : p.substring(0, 5)}` : a.uuid;
|
|
745
|
+
}), u = (p) => {
|
|
746
|
+
s.value = p, setTimeout(() => {
|
|
744
747
|
s.value = a.tooltip;
|
|
745
748
|
}, 1800);
|
|
746
|
-
},
|
|
749
|
+
}, y = (p) => {
|
|
747
750
|
var C, h;
|
|
748
|
-
if (!
|
|
751
|
+
if (!p(a.uuid)) {
|
|
749
752
|
typeof r == "function" && r({
|
|
750
753
|
type: "error",
|
|
751
754
|
message: t("message.fail")
|
|
752
|
-
}), l.value ?
|
|
755
|
+
}), l.value ? u(t("message.fail")) : i("error", a.uuid);
|
|
753
756
|
return;
|
|
754
757
|
}
|
|
755
|
-
const
|
|
758
|
+
const I = ((C = a.uuid) == null ? void 0 : C.length) > Mt, m = a.format === "hidden" || a.format === "redacted" ? t("message.success.prefix") : `"${((h = a.uuid) == null ? void 0 : h.substring(0, Mt)) + (I ? "..." : "")}"`;
|
|
756
759
|
typeof r == "function" && r({
|
|
757
760
|
type: "success",
|
|
758
|
-
message: `${
|
|
759
|
-
}), l.value ?
|
|
761
|
+
message: `${m}${t("message.success.content")}`
|
|
762
|
+
}), l.value ? u(a.successTooltip) : i("success", a.uuid);
|
|
760
763
|
};
|
|
761
|
-
return (
|
|
764
|
+
return (p, C) => {
|
|
762
765
|
const h = N("KClipboardProvider");
|
|
763
|
-
return
|
|
764
|
-
e.format !== "hidden" ? (
|
|
766
|
+
return g(), _("div", Ya, [
|
|
767
|
+
e.format !== "hidden" ? (g(), q(Oe(e.idTooltip ? "KTooltip" : "div"), nt({ key: 0 }, o.value, { "data-testid": "copy-id" }), {
|
|
765
768
|
default: v(() => [
|
|
766
|
-
|
|
767
|
-
class:
|
|
769
|
+
B("div", {
|
|
770
|
+
class: ke([
|
|
768
771
|
"uuid-container",
|
|
769
772
|
e.truncated ? "truncated-uuid" : null,
|
|
770
773
|
e.useMono ? "mono" : null
|
|
771
774
|
])
|
|
772
|
-
},
|
|
775
|
+
}, F(d.value), 3)
|
|
773
776
|
]),
|
|
774
777
|
_: 1
|
|
775
778
|
}, 16)) : V("", !0),
|
|
776
|
-
(
|
|
779
|
+
(g(), q(Oe(e.tooltip ? "KTooltip" : "div"), nt(c.value, { class: "uuid-icon-wrapper" }), {
|
|
777
780
|
default: v(() => [
|
|
778
|
-
|
|
779
|
-
default: v(({ copyToClipboard:
|
|
780
|
-
|
|
781
|
+
O(h, null, {
|
|
782
|
+
default: v(({ copyToClipboard: I }) => [
|
|
783
|
+
B("span", {
|
|
781
784
|
"data-testid": "copy-to-clipboard",
|
|
782
785
|
role: "button",
|
|
783
786
|
tabindex: "0",
|
|
784
|
-
onClick:
|
|
787
|
+
onClick: Re((m) => y(I), ["stop"])
|
|
785
788
|
}, [
|
|
786
|
-
|
|
789
|
+
O(k(Ha), {
|
|
787
790
|
class: "uuid-icon",
|
|
788
791
|
color: e.iconColor,
|
|
789
792
|
decorative: !!e.tooltip,
|
|
@@ -805,7 +808,7 @@ const re = {
|
|
|
805
808
|
for (const [a, i] of n)
|
|
806
809
|
t[a] = i;
|
|
807
810
|
return t;
|
|
808
|
-
},
|
|
811
|
+
}, ln = /* @__PURE__ */ Ga(Za, [["__scopeId", "data-v-0c07874b"]]), Qa = {
|
|
809
812
|
key: 0,
|
|
810
813
|
class: "config-card-fieldset-title"
|
|
811
814
|
}, Xa = /* @__PURE__ */ ne({
|
|
@@ -832,15 +835,15 @@ const re = {
|
|
|
832
835
|
var s;
|
|
833
836
|
return n.isArrayItem ? (s = r.value) != null && s.name ? a(r.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
834
837
|
});
|
|
835
|
-
return (s,
|
|
836
|
-
class:
|
|
838
|
+
return (s, c) => (g(), q(Oe(e.isArrayItem ? "fieldset" : "div"), {
|
|
839
|
+
class: ke(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
837
840
|
}, {
|
|
838
841
|
default: v(() => [
|
|
839
|
-
e.isArrayItem ? (
|
|
840
|
-
|
|
842
|
+
e.isArrayItem ? (g(), _("legend", Qa, [
|
|
843
|
+
B("b", null, F(l.value), 1)
|
|
841
844
|
])) : V("", !0),
|
|
842
|
-
(
|
|
843
|
-
key: `${i.value}-property-${
|
|
845
|
+
(g(!0), _(fe, null, de(Object.keys(o.value), (d, u) => (g(), q(gt, {
|
|
846
|
+
key: `${i.value}-property-${u}`,
|
|
844
847
|
item: {
|
|
845
848
|
key: d,
|
|
846
849
|
label: k(a)(d),
|
|
@@ -856,7 +859,7 @@ const re = {
|
|
|
856
859
|
for (const [a, i] of n)
|
|
857
860
|
t[a] = i;
|
|
858
861
|
return t;
|
|
859
|
-
},
|
|
862
|
+
}, sn = /* @__PURE__ */ ye(Xa, [["__scopeId", "data-v-68ca83ec"]]), ei = /* @__PURE__ */ ne({
|
|
860
863
|
__name: "InternalLinkItem",
|
|
861
864
|
props: {
|
|
862
865
|
item: {
|
|
@@ -869,14 +872,14 @@ const re = {
|
|
|
869
872
|
const { i18n: { t: n } } = re.useI18n();
|
|
870
873
|
return (t, a) => {
|
|
871
874
|
const i = N("KButton");
|
|
872
|
-
return
|
|
873
|
-
|
|
875
|
+
return g(), _("div", null, [
|
|
876
|
+
O(i, {
|
|
874
877
|
appearance: "tertiary",
|
|
875
878
|
class: "navigation-button",
|
|
876
879
|
onClick: a[0] || (a[0] = (r) => t.$emit("navigation-click", e.item))
|
|
877
880
|
}, {
|
|
878
881
|
default: v(() => [
|
|
879
|
-
|
|
882
|
+
H(F(e.item.value || k(n)("baseConfigCard.commonFields.link")), 1)
|
|
880
883
|
]),
|
|
881
884
|
_: 1
|
|
882
885
|
})
|
|
@@ -895,11 +898,11 @@ const re = {
|
|
|
895
898
|
const { i18n: { t: n } } = re.useI18n();
|
|
896
899
|
return (t, a) => {
|
|
897
900
|
const i = N("KBadge");
|
|
898
|
-
return
|
|
901
|
+
return g(), q(i, {
|
|
899
902
|
appearance: e.status ? "success" : "neutral"
|
|
900
903
|
}, {
|
|
901
904
|
default: v(() => [
|
|
902
|
-
|
|
905
|
+
H(F(e.status ? k(n)("baseConfigCard.statusBadge.enabledLabel") : k(n)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
903
906
|
]),
|
|
904
907
|
_: 1
|
|
905
908
|
}, 8, ["appearance"]);
|
|
@@ -907,7 +910,7 @@ const re = {
|
|
|
907
910
|
}
|
|
908
911
|
}), ai = "#0044f4", ii = "#e0e4ea", ri = "#3a3f51", oi = "1px", li = "20px", si = { class: "config-card-details-row" }, ci = ["data-testid"], ui = ["data-testid"], di = ["data-testid"], pi = ["data-testid"], fi = { key: 1 }, yi = ["data-testid"], gi = ["data-testid"], mi = ["data-testid"], hi = ["data-testid"], vi = {
|
|
909
912
|
name: "ConfigCardItem",
|
|
910
|
-
components: { CopyUuid:
|
|
913
|
+
components: { CopyUuid: ln, JsonCardItem: sn, StatusBadge: ni, InternalLinkItem: ti }
|
|
911
914
|
}, bi = /* @__PURE__ */ ne({
|
|
912
915
|
...vi,
|
|
913
916
|
props: {
|
|
@@ -928,13 +931,13 @@ const re = {
|
|
|
928
931
|
},
|
|
929
932
|
emits: ["navigation-click"],
|
|
930
933
|
setup(e, { emit: n }) {
|
|
931
|
-
|
|
934
|
+
Zt((C) => ({
|
|
932
935
|
"0da74440": d.value ? "none" : `solid ${k(oi)} ${k(ii)}`,
|
|
933
|
-
"02a039da":
|
|
934
|
-
"690f3ced":
|
|
935
|
-
"691182c8":
|
|
936
|
+
"02a039da": c.value && l.value ? "block" : "flex",
|
|
937
|
+
"690f3ced": c.value && l.value ? "100%" : t.slim ? "50%" : "25%",
|
|
938
|
+
"691182c8": c.value && l.value ? "100%" : t.slim ? "50%" : "75%"
|
|
936
939
|
}));
|
|
937
|
-
const t = e, a = n, i = We(), { i18n: { t: r, formatUnixTimeStamp: o } } = re.useI18n(), l = T(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = T(() => !!(t.item.tooltip || i["label-tooltip"])),
|
|
940
|
+
const t = e, a = n, i = We(), { i18n: { t: r, formatUnixTimeStamp: o } } = re.useI18n(), l = T(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = T(() => !!(t.item.tooltip || i["label-tooltip"])), c = T(() => t.item.type === W.Json || t.item.type === W.JsonArray), d = T(() => t.item.type === W.JsonArray), u = T(() => {
|
|
938
941
|
switch (t.item.type) {
|
|
939
942
|
case W.ID:
|
|
940
943
|
return {
|
|
@@ -1060,29 +1063,29 @@ const re = {
|
|
|
1060
1063
|
text: t.item.value
|
|
1061
1064
|
};
|
|
1062
1065
|
}
|
|
1063
|
-
}),
|
|
1066
|
+
}), y = E(), { isTruncated: p } = re.useTruncationDetector(y);
|
|
1064
1067
|
return (C, h) => {
|
|
1065
|
-
const
|
|
1066
|
-
return
|
|
1067
|
-
|
|
1068
|
+
const I = N("KLabel"), m = N("KBadge"), f = N("KTooltip");
|
|
1069
|
+
return g(), _("div", si, [
|
|
1070
|
+
B("div", {
|
|
1068
1071
|
class: "config-card-details-label",
|
|
1069
1072
|
"data-testid": `${e.item.key}-label`
|
|
1070
1073
|
}, [
|
|
1071
|
-
|
|
1072
|
-
|
|
1074
|
+
z(C.$slots, "label", { item: e.item }, () => [
|
|
1075
|
+
O(I, { "tooltip-attributes": { maxWidth: "500px" } }, Ie({
|
|
1073
1076
|
default: v(() => [
|
|
1074
|
-
|
|
1077
|
+
H(F(e.item.label) + " ", 1)
|
|
1075
1078
|
]),
|
|
1076
1079
|
_: 2
|
|
1077
1080
|
}, [
|
|
1078
1081
|
s.value ? {
|
|
1079
1082
|
name: "tooltip",
|
|
1080
1083
|
fn: v(() => [
|
|
1081
|
-
|
|
1084
|
+
B("div", {
|
|
1082
1085
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1083
1086
|
}, [
|
|
1084
|
-
|
|
1085
|
-
|
|
1087
|
+
z(C.$slots, "label-tooltip", {}, () => [
|
|
1088
|
+
H(F(e.item.tooltip), 1)
|
|
1086
1089
|
], !0)
|
|
1087
1090
|
], 8, ui)
|
|
1088
1091
|
]),
|
|
@@ -1091,21 +1094,21 @@ const re = {
|
|
|
1091
1094
|
]), 1024)
|
|
1092
1095
|
], !0)
|
|
1093
1096
|
], 8, ci),
|
|
1094
|
-
|
|
1097
|
+
B("div", {
|
|
1095
1098
|
class: "config-card-details-value",
|
|
1096
1099
|
"data-testid": `${e.item.key}-property-value`
|
|
1097
1100
|
}, [
|
|
1098
|
-
|
|
1101
|
+
z(C.$slots, e.item.key, {
|
|
1099
1102
|
rowValue: e.item.value
|
|
1100
1103
|
}, () => [
|
|
1101
|
-
l.value ? (
|
|
1102
|
-
(
|
|
1104
|
+
l.value ? (g(), _("div", fi, [
|
|
1105
|
+
(g(), q(Oe(u.value.tag), Xn(ea(u.value.attrs)), {
|
|
1103
1106
|
default: v(() => [
|
|
1104
|
-
|
|
1107
|
+
u.value.additionalComponent === "KBadge" ? (g(), _("div", {
|
|
1105
1108
|
key: 0,
|
|
1106
1109
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1107
1110
|
}, [
|
|
1108
|
-
(
|
|
1111
|
+
(g(!0), _(fe, null, de(e.item.value, (S, w) => (g(), q(m, {
|
|
1109
1112
|
key: `${e.item.key}-badge-tag-${w}`,
|
|
1110
1113
|
class: "config-badge",
|
|
1111
1114
|
"data-testid": `${e.item.key}-badge-tag-${w}`,
|
|
@@ -1113,65 +1116,65 @@ const re = {
|
|
|
1113
1116
|
"truncation-tooltip": ""
|
|
1114
1117
|
}, {
|
|
1115
1118
|
default: v(() => [
|
|
1116
|
-
|
|
1119
|
+
H(F(S), 1)
|
|
1117
1120
|
]),
|
|
1118
1121
|
_: 2
|
|
1119
1122
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
1120
1123
|
], 8, yi)) : V("", !0),
|
|
1121
|
-
|
|
1124
|
+
u.value.additionalComponent === "CopyUuid" ? (g(), _("div", {
|
|
1122
1125
|
key: 1,
|
|
1123
1126
|
class: "copy-uuid-array",
|
|
1124
1127
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1125
1128
|
}, [
|
|
1126
|
-
(
|
|
1129
|
+
(g(!0), _(fe, null, de(e.item.value, (S, w) => (g(), q(k(ln), nt(u.value.childAttrs, {
|
|
1127
1130
|
key: `${e.item.key}-copy-uuid-${w}`,
|
|
1128
1131
|
"data-testid": `${e.item.key}-copy-uuid-${w}`,
|
|
1129
1132
|
uuid: S
|
|
1130
1133
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1131
|
-
], 8, gi)) :
|
|
1134
|
+
], 8, gi)) : u.value.additionalComponent === "KMethodBadge" ? (g(), _("div", {
|
|
1132
1135
|
key: 2,
|
|
1133
1136
|
class: "method-badge-array",
|
|
1134
1137
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1135
1138
|
}, [
|
|
1136
|
-
(
|
|
1139
|
+
(g(!0), _(fe, null, de(e.item.value, (S, w) => (g(), q(m, {
|
|
1137
1140
|
key: `${e.item.key}-badge-method-${w}`,
|
|
1138
1141
|
appearance: Object.values(k(oa)).includes(S.toLowerCase()) ? S.toLowerCase() : "custom",
|
|
1139
1142
|
class: "config-badge",
|
|
1140
1143
|
"data-testid": `${e.item.key}-badge-method-${w}`
|
|
1141
1144
|
}, {
|
|
1142
1145
|
default: v(() => [
|
|
1143
|
-
|
|
1146
|
+
H(F(S), 1)
|
|
1144
1147
|
]),
|
|
1145
1148
|
_: 2
|
|
1146
1149
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1147
1150
|
], 8, mi)) : V("", !0),
|
|
1148
|
-
|
|
1151
|
+
u.value.additionalComponent === "JsonCardItem" ? (g(), _("div", {
|
|
1149
1152
|
key: 3,
|
|
1150
1153
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1151
1154
|
}, [
|
|
1152
|
-
(
|
|
1155
|
+
(g(!0), _(fe, null, de(e.item.value, (S, w) => (g(), q(sn, {
|
|
1153
1156
|
key: `json-array-item-${w}`,
|
|
1154
1157
|
index: w,
|
|
1155
1158
|
"is-array-item": "",
|
|
1156
1159
|
item: S
|
|
1157
1160
|
}, null, 8, ["index", "item"]))), 128))
|
|
1158
|
-
], 8, hi)) : (
|
|
1161
|
+
], 8, hi)) : (g(), q(f, {
|
|
1159
1162
|
key: 4,
|
|
1160
|
-
label: k(
|
|
1163
|
+
label: k(p) ? e.item.value : ""
|
|
1161
1164
|
}, {
|
|
1162
1165
|
default: v(() => [
|
|
1163
|
-
|
|
1166
|
+
B("span", {
|
|
1164
1167
|
ref_key: "textContent",
|
|
1165
|
-
ref:
|
|
1166
|
-
class:
|
|
1167
|
-
},
|
|
1168
|
+
ref: y,
|
|
1169
|
+
class: ke(["attrs-data-text", { truncated: e.truncated }])
|
|
1170
|
+
}, F(u.value.text), 3)
|
|
1168
1171
|
]),
|
|
1169
1172
|
_: 1
|
|
1170
1173
|
}, 8, ["label"]))
|
|
1171
1174
|
]),
|
|
1172
1175
|
_: 1
|
|
1173
1176
|
}, 16))
|
|
1174
|
-
])) : (
|
|
1177
|
+
])) : (g(), _("div", {
|
|
1175
1178
|
key: 0,
|
|
1176
1179
|
"data-testid": `${e.item.key}-no-value`
|
|
1177
1180
|
}, " – ", 8, pi))
|
|
@@ -1182,14 +1185,14 @@ const re = {
|
|
|
1182
1185
|
}
|
|
1183
1186
|
}), gt = /* @__PURE__ */ ye(bi, [["__scopeId", "data-v-9c87856b"]]);
|
|
1184
1187
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1185
|
-
function
|
|
1188
|
+
function cn(e) {
|
|
1186
1189
|
return typeof e > "u" || e === null;
|
|
1187
1190
|
}
|
|
1188
1191
|
function ki(e) {
|
|
1189
1192
|
return typeof e == "object" && e !== null;
|
|
1190
1193
|
}
|
|
1191
1194
|
function Ci(e) {
|
|
1192
|
-
return Array.isArray(e) ? e :
|
|
1195
|
+
return Array.isArray(e) ? e : cn(e) ? [] : [e];
|
|
1193
1196
|
}
|
|
1194
1197
|
function wi(e, n) {
|
|
1195
1198
|
var t, a, i, r;
|
|
@@ -1204,32 +1207,32 @@ function Si(e, n) {
|
|
|
1204
1207
|
t += e;
|
|
1205
1208
|
return t;
|
|
1206
1209
|
}
|
|
1207
|
-
function
|
|
1210
|
+
function Ii(e) {
|
|
1208
1211
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1209
1212
|
}
|
|
1210
|
-
var
|
|
1211
|
-
isNothing:
|
|
1213
|
+
var Ai = cn, xi = ki, _i = Ci, Ti = Si, ji = Ii, Oi = wi, ae = {
|
|
1214
|
+
isNothing: Ai,
|
|
1212
1215
|
isObject: xi,
|
|
1213
1216
|
toArray: _i,
|
|
1214
1217
|
repeat: Ti,
|
|
1215
1218
|
isNegativeZero: ji,
|
|
1216
1219
|
extend: Oi
|
|
1217
1220
|
};
|
|
1218
|
-
function
|
|
1221
|
+
function un(e, n) {
|
|
1219
1222
|
var t = "", a = e.reason || "(unknown reason)";
|
|
1220
1223
|
return e.mark ? (e.mark.name && (t += 'in "' + e.mark.name + '" '), t += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !n && e.mark.snippet && (t += `
|
|
1221
1224
|
|
|
1222
1225
|
` + e.mark.snippet), a + " " + t) : a;
|
|
1223
1226
|
}
|
|
1224
|
-
function
|
|
1225
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message =
|
|
1227
|
+
function Ke(e, n) {
|
|
1228
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = un(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1226
1229
|
}
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
return this.name + ": " +
|
|
1230
|
+
Ke.prototype = Object.create(Error.prototype);
|
|
1231
|
+
Ke.prototype.constructor = Ke;
|
|
1232
|
+
Ke.prototype.toString = function(e) {
|
|
1233
|
+
return this.name + ": " + un(this, e);
|
|
1231
1234
|
};
|
|
1232
|
-
var ce =
|
|
1235
|
+
var ce = Ke;
|
|
1233
1236
|
function Xe(e, n, t, a, i) {
|
|
1234
1237
|
var r = "", o = "", l = Math.floor(i / 2) - 1;
|
|
1235
1238
|
return a - n > l && (r = " ... ", n = a - l + r.length), t - a > l && (o = " ...", t = a + l - o.length), {
|
|
@@ -1248,26 +1251,26 @@ function $i(e, n) {
|
|
|
1248
1251
|
for (var t = /\r?\n|\r|\0/g, a = [0], i = [], r, o = -1; r = t.exec(e.buffer); )
|
|
1249
1252
|
i.push(r.index), a.push(r.index + r[0].length), e.position <= r.index && o < 0 && (o = a.length - 2);
|
|
1250
1253
|
o < 0 && (o = a.length - 1);
|
|
1251
|
-
var l = "", s,
|
|
1254
|
+
var l = "", s, c, d = Math.min(e.line + n.linesAfter, i.length).toString().length, u = n.maxLength - (n.indent + d + 3);
|
|
1252
1255
|
for (s = 1; s <= n.linesBefore && !(o - s < 0); s++)
|
|
1253
|
-
|
|
1256
|
+
c = Xe(
|
|
1254
1257
|
e.buffer,
|
|
1255
1258
|
a[o - s],
|
|
1256
1259
|
i[o - s],
|
|
1257
1260
|
e.position - (a[o] - a[o - s]),
|
|
1258
|
-
|
|
1259
|
-
), l = ae.repeat(" ", n.indent) + et((e.line - s + 1).toString(), d) + " | " +
|
|
1261
|
+
u
|
|
1262
|
+
), l = ae.repeat(" ", n.indent) + et((e.line - s + 1).toString(), d) + " | " + c.str + `
|
|
1260
1263
|
` + l;
|
|
1261
|
-
for (
|
|
1262
|
-
`, l += ae.repeat("-", n.indent + d + 3 +
|
|
1264
|
+
for (c = Xe(e.buffer, a[o], i[o], e.position, u), l += ae.repeat(" ", n.indent) + et((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1265
|
+
`, l += ae.repeat("-", n.indent + d + 3 + c.pos) + `^
|
|
1263
1266
|
`, s = 1; s <= n.linesAfter && !(o + s >= i.length); s++)
|
|
1264
|
-
|
|
1267
|
+
c = Xe(
|
|
1265
1268
|
e.buffer,
|
|
1266
1269
|
a[o + s],
|
|
1267
1270
|
i[o + s],
|
|
1268
1271
|
e.position - (a[o] - a[o + s]),
|
|
1269
|
-
|
|
1270
|
-
), l += ae.repeat(" ", n.indent) + et((e.line + s + 1).toString(), d) + " | " +
|
|
1272
|
+
u
|
|
1273
|
+
), l += ae.repeat(" ", n.indent) + et((e.line + s + 1).toString(), d) + " | " + c.str + `
|
|
1271
1274
|
`;
|
|
1272
1275
|
return l.replace(/\n$/, "");
|
|
1273
1276
|
}
|
|
@@ -1282,12 +1285,12 @@ var Mi = $i, Ei = [
|
|
|
1282
1285
|
"representName",
|
|
1283
1286
|
"defaultStyle",
|
|
1284
1287
|
"styleAliases"
|
|
1285
|
-
],
|
|
1288
|
+
], Fi = [
|
|
1286
1289
|
"scalar",
|
|
1287
1290
|
"sequence",
|
|
1288
1291
|
"mapping"
|
|
1289
1292
|
];
|
|
1290
|
-
function
|
|
1293
|
+
function Ni(e) {
|
|
1291
1294
|
var n = {};
|
|
1292
1295
|
return e !== null && Object.keys(e).forEach(function(t) {
|
|
1293
1296
|
e[t].forEach(function(a) {
|
|
@@ -1295,7 +1298,7 @@ function Fi(e) {
|
|
|
1295
1298
|
});
|
|
1296
1299
|
}), n;
|
|
1297
1300
|
}
|
|
1298
|
-
function
|
|
1301
|
+
function Ki(e, n) {
|
|
1299
1302
|
if (n = n || {}, Object.keys(n).forEach(function(t) {
|
|
1300
1303
|
if (Ei.indexOf(t) === -1)
|
|
1301
1304
|
throw new ce('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
@@ -1303,10 +1306,10 @@ function Ni(e, n) {
|
|
|
1303
1306
|
return !0;
|
|
1304
1307
|
}, this.construct = n.construct || function(t) {
|
|
1305
1308
|
return t;
|
|
1306
|
-
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases =
|
|
1309
|
+
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = Ni(n.styleAliases || null), Fi.indexOf(this.kind) === -1)
|
|
1307
1310
|
throw new ce('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1308
1311
|
}
|
|
1309
|
-
var oe =
|
|
1312
|
+
var oe = Ki;
|
|
1310
1313
|
function Et(e, n) {
|
|
1311
1314
|
var t = [];
|
|
1312
1315
|
return e[n].forEach(function(a) {
|
|
@@ -1316,7 +1319,7 @@ function Et(e, n) {
|
|
|
1316
1319
|
}), t[i] = a;
|
|
1317
1320
|
}), t;
|
|
1318
1321
|
}
|
|
1319
|
-
function
|
|
1322
|
+
function qi() {
|
|
1320
1323
|
var e = {
|
|
1321
1324
|
scalar: {},
|
|
1322
1325
|
sequence: {},
|
|
@@ -1361,31 +1364,31 @@ it.prototype.extend = function(e) {
|
|
|
1361
1364
|
throw new ce("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1362
1365
|
});
|
|
1363
1366
|
var a = Object.create(it.prototype);
|
|
1364
|
-
return a.implicit = (this.implicit || []).concat(n), a.explicit = (this.explicit || []).concat(t), a.compiledImplicit = Et(a, "implicit"), a.compiledExplicit = Et(a, "explicit"), a.compiledTypeMap =
|
|
1367
|
+
return a.implicit = (this.implicit || []).concat(n), a.explicit = (this.explicit || []).concat(t), a.compiledImplicit = Et(a, "implicit"), a.compiledExplicit = Et(a, "explicit"), a.compiledTypeMap = qi(a.compiledImplicit, a.compiledExplicit), a;
|
|
1365
1368
|
};
|
|
1366
|
-
var
|
|
1369
|
+
var dn = it, pn = new oe("tag:yaml.org,2002:str", {
|
|
1367
1370
|
kind: "scalar",
|
|
1368
1371
|
construct: function(e) {
|
|
1369
1372
|
return e !== null ? e : "";
|
|
1370
1373
|
}
|
|
1371
|
-
}),
|
|
1374
|
+
}), fn = new oe("tag:yaml.org,2002:seq", {
|
|
1372
1375
|
kind: "sequence",
|
|
1373
1376
|
construct: function(e) {
|
|
1374
1377
|
return e !== null ? e : [];
|
|
1375
1378
|
}
|
|
1376
|
-
}),
|
|
1379
|
+
}), yn = new oe("tag:yaml.org,2002:map", {
|
|
1377
1380
|
kind: "mapping",
|
|
1378
1381
|
construct: function(e) {
|
|
1379
1382
|
return e !== null ? e : {};
|
|
1380
1383
|
}
|
|
1381
|
-
}),
|
|
1384
|
+
}), gn = new dn({
|
|
1382
1385
|
explicit: [
|
|
1383
|
-
dn,
|
|
1384
1386
|
pn,
|
|
1385
|
-
fn
|
|
1387
|
+
fn,
|
|
1388
|
+
yn
|
|
1386
1389
|
]
|
|
1387
1390
|
});
|
|
1388
|
-
function
|
|
1391
|
+
function Bi(e) {
|
|
1389
1392
|
if (e === null)
|
|
1390
1393
|
return !0;
|
|
1391
1394
|
var n = e.length;
|
|
@@ -1394,14 +1397,14 @@ function qi(e) {
|
|
|
1394
1397
|
function Li() {
|
|
1395
1398
|
return null;
|
|
1396
1399
|
}
|
|
1397
|
-
function
|
|
1400
|
+
function Ui(e) {
|
|
1398
1401
|
return e === null;
|
|
1399
1402
|
}
|
|
1400
|
-
var
|
|
1403
|
+
var mn = new oe("tag:yaml.org,2002:null", {
|
|
1401
1404
|
kind: "scalar",
|
|
1402
|
-
resolve:
|
|
1405
|
+
resolve: Bi,
|
|
1403
1406
|
construct: Li,
|
|
1404
|
-
predicate:
|
|
1407
|
+
predicate: Ui,
|
|
1405
1408
|
represent: {
|
|
1406
1409
|
canonical: function() {
|
|
1407
1410
|
return "~";
|
|
@@ -1421,23 +1424,23 @@ var gn = new oe("tag:yaml.org,2002:null", {
|
|
|
1421
1424
|
},
|
|
1422
1425
|
defaultStyle: "lowercase"
|
|
1423
1426
|
});
|
|
1424
|
-
function
|
|
1427
|
+
function Di(e) {
|
|
1425
1428
|
if (e === null)
|
|
1426
1429
|
return !1;
|
|
1427
1430
|
var n = e.length;
|
|
1428
1431
|
return n === 4 && (e === "true" || e === "True" || e === "TRUE") || n === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1429
1432
|
}
|
|
1430
|
-
function
|
|
1433
|
+
function Ri(e) {
|
|
1431
1434
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1432
1435
|
}
|
|
1433
|
-
function
|
|
1436
|
+
function Pi(e) {
|
|
1434
1437
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1435
1438
|
}
|
|
1436
|
-
var
|
|
1439
|
+
var hn = new oe("tag:yaml.org,2002:bool", {
|
|
1437
1440
|
kind: "scalar",
|
|
1438
|
-
resolve:
|
|
1439
|
-
construct:
|
|
1440
|
-
predicate:
|
|
1441
|
+
resolve: Di,
|
|
1442
|
+
construct: Ri,
|
|
1443
|
+
predicate: Pi,
|
|
1441
1444
|
represent: {
|
|
1442
1445
|
lowercase: function(e) {
|
|
1443
1446
|
return e ? "true" : "false";
|
|
@@ -1454,10 +1457,10 @@ var mn = new oe("tag:yaml.org,2002:bool", {
|
|
|
1454
1457
|
function Vi(e) {
|
|
1455
1458
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1456
1459
|
}
|
|
1457
|
-
function
|
|
1460
|
+
function zi(e) {
|
|
1458
1461
|
return 48 <= e && e <= 55;
|
|
1459
1462
|
}
|
|
1460
|
-
function
|
|
1463
|
+
function Hi(e) {
|
|
1461
1464
|
return 48 <= e && e <= 57;
|
|
1462
1465
|
}
|
|
1463
1466
|
function Ji(e) {
|
|
@@ -1490,7 +1493,7 @@ function Ji(e) {
|
|
|
1490
1493
|
if (i === "o") {
|
|
1491
1494
|
for (t++; t < n; t++)
|
|
1492
1495
|
if (i = e[t], i !== "_") {
|
|
1493
|
-
if (!
|
|
1496
|
+
if (!zi(e.charCodeAt(t)))
|
|
1494
1497
|
return !1;
|
|
1495
1498
|
a = !0;
|
|
1496
1499
|
}
|
|
@@ -1501,7 +1504,7 @@ function Ji(e) {
|
|
|
1501
1504
|
return !1;
|
|
1502
1505
|
for (; t < n; t++)
|
|
1503
1506
|
if (i = e[t], i !== "_") {
|
|
1504
|
-
if (!
|
|
1507
|
+
if (!Hi(e.charCodeAt(t)))
|
|
1505
1508
|
return !1;
|
|
1506
1509
|
a = !0;
|
|
1507
1510
|
}
|
|
@@ -1524,7 +1527,7 @@ function Yi(e) {
|
|
|
1524
1527
|
function Wi(e) {
|
|
1525
1528
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ae.isNegativeZero(e);
|
|
1526
1529
|
}
|
|
1527
|
-
var
|
|
1530
|
+
var vn = new oe("tag:yaml.org,2002:int", {
|
|
1528
1531
|
kind: "scalar",
|
|
1529
1532
|
resolve: Ji,
|
|
1530
1533
|
construct: Yi,
|
|
@@ -1601,31 +1604,31 @@ function er(e, n) {
|
|
|
1601
1604
|
function tr(e) {
|
|
1602
1605
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ae.isNegativeZero(e));
|
|
1603
1606
|
}
|
|
1604
|
-
var
|
|
1607
|
+
var bn = new oe("tag:yaml.org,2002:float", {
|
|
1605
1608
|
kind: "scalar",
|
|
1606
1609
|
resolve: Gi,
|
|
1607
1610
|
construct: Qi,
|
|
1608
1611
|
predicate: tr,
|
|
1609
1612
|
represent: er,
|
|
1610
1613
|
defaultStyle: "lowercase"
|
|
1611
|
-
}),
|
|
1614
|
+
}), kn = gn.extend({
|
|
1612
1615
|
implicit: [
|
|
1613
|
-
gn,
|
|
1614
1616
|
mn,
|
|
1615
1617
|
hn,
|
|
1616
|
-
vn
|
|
1618
|
+
vn,
|
|
1619
|
+
bn
|
|
1617
1620
|
]
|
|
1618
|
-
}),
|
|
1621
|
+
}), Cn = kn, wn = new RegExp(
|
|
1619
1622
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1620
|
-
),
|
|
1623
|
+
), Sn = new RegExp(
|
|
1621
1624
|
"^([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]))?))?$"
|
|
1622
1625
|
);
|
|
1623
1626
|
function nr(e) {
|
|
1624
|
-
return e === null ? !1 :
|
|
1627
|
+
return e === null ? !1 : wn.exec(e) !== null || Sn.exec(e) !== null;
|
|
1625
1628
|
}
|
|
1626
1629
|
function ar(e) {
|
|
1627
|
-
var n, t, a, i, r, o, l, s = 0,
|
|
1628
|
-
if (n =
|
|
1630
|
+
var n, t, a, i, r, o, l, s = 0, c = null, d, u, y;
|
|
1631
|
+
if (n = wn.exec(e), n === null && (n = Sn.exec(e)), n === null)
|
|
1629
1632
|
throw new Error("Date resolve error");
|
|
1630
1633
|
if (t = +n[1], a = +n[2] - 1, i = +n[3], !n[4])
|
|
1631
1634
|
return new Date(Date.UTC(t, a, i));
|
|
@@ -1634,12 +1637,12 @@ function ar(e) {
|
|
|
1634
1637
|
s += "0";
|
|
1635
1638
|
s = +s;
|
|
1636
1639
|
}
|
|
1637
|
-
return n[9] && (d = +n[10],
|
|
1640
|
+
return n[9] && (d = +n[10], u = +(n[11] || 0), c = (d * 60 + u) * 6e4, n[9] === "-" && (c = -c)), y = new Date(Date.UTC(t, a, i, r, o, l, s)), c && y.setTime(y.getTime() - c), y;
|
|
1638
1641
|
}
|
|
1639
1642
|
function ir(e) {
|
|
1640
1643
|
return e.toISOString();
|
|
1641
1644
|
}
|
|
1642
|
-
var
|
|
1645
|
+
var In = new oe("tag:yaml.org,2002:timestamp", {
|
|
1643
1646
|
kind: "scalar",
|
|
1644
1647
|
resolve: nr,
|
|
1645
1648
|
construct: ar,
|
|
@@ -1681,7 +1684,7 @@ function sr(e) {
|
|
|
1681
1684
|
function cr(e) {
|
|
1682
1685
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1683
1686
|
}
|
|
1684
|
-
var
|
|
1687
|
+
var xn = new oe("tag:yaml.org,2002:binary", {
|
|
1685
1688
|
kind: "scalar",
|
|
1686
1689
|
resolve: or,
|
|
1687
1690
|
construct: lr,
|
|
@@ -1713,7 +1716,7 @@ function pr(e) {
|
|
|
1713
1716
|
function fr(e) {
|
|
1714
1717
|
return e !== null ? e : [];
|
|
1715
1718
|
}
|
|
1716
|
-
var
|
|
1719
|
+
var _n = new oe("tag:yaml.org,2002:omap", {
|
|
1717
1720
|
kind: "sequence",
|
|
1718
1721
|
resolve: pr,
|
|
1719
1722
|
construct: fr
|
|
@@ -1737,7 +1740,7 @@ function mr(e) {
|
|
|
1737
1740
|
a = o[n], i = Object.keys(a), r[n] = [i[0], a[i[0]]];
|
|
1738
1741
|
return r;
|
|
1739
1742
|
}
|
|
1740
|
-
var
|
|
1743
|
+
var Tn = new oe("tag:yaml.org,2002:pairs", {
|
|
1741
1744
|
kind: "sequence",
|
|
1742
1745
|
resolve: gr,
|
|
1743
1746
|
construct: mr
|
|
@@ -1754,23 +1757,23 @@ function vr(e) {
|
|
|
1754
1757
|
function br(e) {
|
|
1755
1758
|
return e !== null ? e : {};
|
|
1756
1759
|
}
|
|
1757
|
-
var
|
|
1760
|
+
var jn = new oe("tag:yaml.org,2002:set", {
|
|
1758
1761
|
kind: "mapping",
|
|
1759
1762
|
resolve: vr,
|
|
1760
1763
|
construct: br
|
|
1761
|
-
}), ht =
|
|
1764
|
+
}), ht = Cn.extend({
|
|
1762
1765
|
implicit: [
|
|
1763
|
-
|
|
1766
|
+
In,
|
|
1764
1767
|
An
|
|
1765
1768
|
],
|
|
1766
1769
|
explicit: [
|
|
1767
|
-
In,
|
|
1768
1770
|
xn,
|
|
1769
1771
|
_n,
|
|
1770
|
-
Tn
|
|
1772
|
+
Tn,
|
|
1773
|
+
jn
|
|
1771
1774
|
]
|
|
1772
|
-
}),
|
|
1773
|
-
function
|
|
1775
|
+
}), Ce = Object.prototype.hasOwnProperty, Ve = 1, On = 2, $n = 3, ze = 4, tt = 1, kr = 2, Ft = 3, Cr = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, wr = /[\x85\u2028\u2029]/, Sr = /[,\[\]\{\}]/, Mn = /^(?:!|!!|![a-z\-]+!)$/i, En = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1776
|
+
function Nt(e) {
|
|
1774
1777
|
return Object.prototype.toString.call(e);
|
|
1775
1778
|
}
|
|
1776
1779
|
function me(e) {
|
|
@@ -1785,17 +1788,17 @@ function ue(e) {
|
|
|
1785
1788
|
function Te(e) {
|
|
1786
1789
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1787
1790
|
}
|
|
1788
|
-
function
|
|
1791
|
+
function Ir(e) {
|
|
1789
1792
|
var n;
|
|
1790
1793
|
return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
1791
1794
|
}
|
|
1792
|
-
function
|
|
1795
|
+
function Ar(e) {
|
|
1793
1796
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1794
1797
|
}
|
|
1795
1798
|
function xr(e) {
|
|
1796
1799
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1797
1800
|
}
|
|
1798
|
-
function
|
|
1801
|
+
function Kt(e) {
|
|
1799
1802
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1800
1803
|
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1801
1804
|
}
|
|
@@ -1805,13 +1808,13 @@ function _r(e) {
|
|
|
1805
1808
|
(e - 65536 & 1023) + 56320
|
|
1806
1809
|
);
|
|
1807
1810
|
}
|
|
1808
|
-
var
|
|
1811
|
+
var Fn = new Array(256), Nn = new Array(256);
|
|
1809
1812
|
for (var xe = 0; xe < 256; xe++)
|
|
1810
|
-
|
|
1813
|
+
Fn[xe] = Kt(xe) ? 1 : 0, Nn[xe] = Kt(xe);
|
|
1811
1814
|
function Tr(e, n) {
|
|
1812
1815
|
this.input = e, this.filename = n.filename || null, this.schema = n.schema || ht, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1813
1816
|
}
|
|
1814
|
-
function
|
|
1817
|
+
function Kn(e, n) {
|
|
1815
1818
|
var t = {
|
|
1816
1819
|
name: e.filename,
|
|
1817
1820
|
buffer: e.input.slice(0, -1),
|
|
@@ -1822,24 +1825,24 @@ function Fn(e, n) {
|
|
|
1822
1825
|
};
|
|
1823
1826
|
return t.snippet = Mi(t), new ce(n, t);
|
|
1824
1827
|
}
|
|
1825
|
-
function
|
|
1826
|
-
throw
|
|
1828
|
+
function A(e, n) {
|
|
1829
|
+
throw Kn(e, n);
|
|
1827
1830
|
}
|
|
1828
|
-
function
|
|
1829
|
-
e.onWarning && e.onWarning.call(null,
|
|
1831
|
+
function He(e, n) {
|
|
1832
|
+
e.onWarning && e.onWarning.call(null, Kn(e, n));
|
|
1830
1833
|
}
|
|
1831
|
-
var
|
|
1834
|
+
var qt = {
|
|
1832
1835
|
YAML: function(e, n, t) {
|
|
1833
1836
|
var a, i, r;
|
|
1834
|
-
e.version !== null &&
|
|
1837
|
+
e.version !== null && A(e, "duplication of %YAML directive"), t.length !== 1 && A(e, "YAML directive accepts exactly one argument"), a = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), a === null && A(e, "ill-formed argument of the YAML directive"), i = parseInt(a[1], 10), r = parseInt(a[2], 10), i !== 1 && A(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = r < 2, r !== 1 && r !== 2 && He(e, "unsupported YAML version of the document");
|
|
1835
1838
|
},
|
|
1836
1839
|
TAG: function(e, n, t) {
|
|
1837
1840
|
var a, i;
|
|
1838
|
-
t.length !== 2 &&
|
|
1841
|
+
t.length !== 2 && A(e, "TAG directive accepts exactly two arguments"), a = t[0], i = t[1], Mn.test(a) || A(e, "ill-formed tag handle (first argument) of the TAG directive"), Ce.call(e.tagMap, a) && A(e, 'there is a previously declared suffix for "' + a + '" tag handle'), En.test(i) || A(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1839
1842
|
try {
|
|
1840
1843
|
i = decodeURIComponent(i);
|
|
1841
1844
|
} catch {
|
|
1842
|
-
|
|
1845
|
+
A(e, "tag prefix is malformed: " + i);
|
|
1843
1846
|
}
|
|
1844
1847
|
e.tagMap[a] = i;
|
|
1845
1848
|
}
|
|
@@ -1849,30 +1852,30 @@ function be(e, n, t, a) {
|
|
|
1849
1852
|
if (n < t) {
|
|
1850
1853
|
if (l = e.input.slice(n, t), a)
|
|
1851
1854
|
for (i = 0, r = l.length; i < r; i += 1)
|
|
1852
|
-
o = l.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 ||
|
|
1855
|
+
o = l.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 || A(e, "expected valid JSON character");
|
|
1853
1856
|
else
|
|
1854
|
-
Cr.test(l) &&
|
|
1857
|
+
Cr.test(l) && A(e, "the stream contains non-printable characters");
|
|
1855
1858
|
e.result += l;
|
|
1856
1859
|
}
|
|
1857
1860
|
}
|
|
1858
|
-
function
|
|
1861
|
+
function Bt(e, n, t, a) {
|
|
1859
1862
|
var i, r, o, l;
|
|
1860
|
-
for (ae.isObject(t) ||
|
|
1861
|
-
r = i[o],
|
|
1863
|
+
for (ae.isObject(t) || A(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(t), o = 0, l = i.length; o < l; o += 1)
|
|
1864
|
+
r = i[o], Ce.call(n, r) || (n[r] = t[r], a[r] = !0);
|
|
1862
1865
|
}
|
|
1863
1866
|
function je(e, n, t, a, i, r, o, l, s) {
|
|
1864
|
-
var
|
|
1867
|
+
var c, d;
|
|
1865
1868
|
if (Array.isArray(i))
|
|
1866
|
-
for (i = Array.prototype.slice.call(i),
|
|
1867
|
-
Array.isArray(i[
|
|
1868
|
-
if (typeof i == "object" &&
|
|
1869
|
+
for (i = Array.prototype.slice.call(i), c = 0, d = i.length; c < d; c += 1)
|
|
1870
|
+
Array.isArray(i[c]) && A(e, "nested arrays are not supported inside keys"), typeof i == "object" && Nt(i[c]) === "[object Object]" && (i[c] = "[object Object]");
|
|
1871
|
+
if (typeof i == "object" && Nt(i) === "[object Object]" && (i = "[object Object]"), i = String(i), n === null && (n = {}), a === "tag:yaml.org,2002:merge")
|
|
1869
1872
|
if (Array.isArray(r))
|
|
1870
|
-
for (
|
|
1871
|
-
|
|
1873
|
+
for (c = 0, d = r.length; c < d; c += 1)
|
|
1874
|
+
Bt(e, n, r[c], t);
|
|
1872
1875
|
else
|
|
1873
|
-
|
|
1876
|
+
Bt(e, n, r, t);
|
|
1874
1877
|
else
|
|
1875
|
-
!e.json && !
|
|
1878
|
+
!e.json && !Ce.call(t, i) && Ce.call(n, i) && (e.line = o || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, A(e, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(n, i, {
|
|
1876
1879
|
configurable: !0,
|
|
1877
1880
|
enumerable: !0,
|
|
1878
1881
|
writable: !0,
|
|
@@ -1882,7 +1885,7 @@ function je(e, n, t, a, i, r, o, l, s) {
|
|
|
1882
1885
|
}
|
|
1883
1886
|
function vt(e) {
|
|
1884
1887
|
var n;
|
|
1885
|
-
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1888
|
+
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : A(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1886
1889
|
}
|
|
1887
1890
|
function te(e, n, t) {
|
|
1888
1891
|
for (var a = 0, i = e.input.charCodeAt(e.position); i !== 0; ) {
|
|
@@ -1898,7 +1901,7 @@ function te(e, n, t) {
|
|
|
1898
1901
|
else
|
|
1899
1902
|
break;
|
|
1900
1903
|
}
|
|
1901
|
-
return t !== -1 && a !== 0 && e.lineIndent < t &&
|
|
1904
|
+
return t !== -1 && a !== 0 && e.lineIndent < t && He(e, "deficient indentation"), a;
|
|
1902
1905
|
}
|
|
1903
1906
|
function Ze(e) {
|
|
1904
1907
|
var n = e.position, t;
|
|
@@ -1909,31 +1912,31 @@ function bt(e, n) {
|
|
|
1909
1912
|
`, n - 1));
|
|
1910
1913
|
}
|
|
1911
1914
|
function jr(e, n, t) {
|
|
1912
|
-
var a, i, r, o, l, s,
|
|
1913
|
-
if (
|
|
1915
|
+
var a, i, r, o, l, s, c, d, u = e.kind, y = e.result, p;
|
|
1916
|
+
if (p = e.input.charCodeAt(e.position), ue(p) || Te(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (i = e.input.charCodeAt(e.position + 1), ue(i) || t && Te(i)))
|
|
1914
1917
|
return !1;
|
|
1915
|
-
for (e.kind = "scalar", e.result = "", r = o = e.position, l = !1;
|
|
1916
|
-
if (
|
|
1918
|
+
for (e.kind = "scalar", e.result = "", r = o = e.position, l = !1; p !== 0; ) {
|
|
1919
|
+
if (p === 58) {
|
|
1917
1920
|
if (i = e.input.charCodeAt(e.position + 1), ue(i) || t && Te(i))
|
|
1918
1921
|
break;
|
|
1919
|
-
} else if (
|
|
1922
|
+
} else if (p === 35) {
|
|
1920
1923
|
if (a = e.input.charCodeAt(e.position - 1), ue(a))
|
|
1921
1924
|
break;
|
|
1922
1925
|
} else {
|
|
1923
|
-
if (e.position === e.lineStart && Ze(e) || t && Te(
|
|
1926
|
+
if (e.position === e.lineStart && Ze(e) || t && Te(p))
|
|
1924
1927
|
break;
|
|
1925
|
-
if (me(
|
|
1926
|
-
if (s = e.line,
|
|
1927
|
-
l = !0,
|
|
1928
|
+
if (me(p))
|
|
1929
|
+
if (s = e.line, c = e.lineStart, d = e.lineIndent, te(e, !1, -1), e.lineIndent >= n) {
|
|
1930
|
+
l = !0, p = e.input.charCodeAt(e.position);
|
|
1928
1931
|
continue;
|
|
1929
1932
|
} else {
|
|
1930
|
-
e.position = o, e.line = s, e.lineStart =
|
|
1933
|
+
e.position = o, e.line = s, e.lineStart = c, e.lineIndent = d;
|
|
1931
1934
|
break;
|
|
1932
1935
|
}
|
|
1933
1936
|
}
|
|
1934
|
-
l && (be(e, r, o, !1), bt(e, e.line - s), r = o = e.position, l = !1), Ae(
|
|
1937
|
+
l && (be(e, r, o, !1), bt(e, e.line - s), r = o = e.position, l = !1), Ae(p) || (o = e.position + 1), p = e.input.charCodeAt(++e.position);
|
|
1935
1938
|
}
|
|
1936
|
-
return be(e, r, o, !1), e.result ? !0 : (e.kind =
|
|
1939
|
+
return be(e, r, o, !1), e.result ? !0 : (e.kind = u, e.result = y, !1);
|
|
1937
1940
|
}
|
|
1938
1941
|
function Or(e, n) {
|
|
1939
1942
|
var t, a, i;
|
|
@@ -1946,8 +1949,8 @@ function Or(e, n) {
|
|
|
1946
1949
|
else
|
|
1947
1950
|
return !0;
|
|
1948
1951
|
else
|
|
1949
|
-
me(t) ? (be(e, a, i, !0), bt(e, te(e, !1, n)), a = i = e.position) : e.position === e.lineStart && Ze(e) ?
|
|
1950
|
-
|
|
1952
|
+
me(t) ? (be(e, a, i, !0), bt(e, te(e, !1, n)), a = i = e.position) : e.position === e.lineStart && Ze(e) ? A(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
1953
|
+
A(e, "unexpected end of the stream within a single quoted scalar");
|
|
1951
1954
|
}
|
|
1952
1955
|
function $r(e, n) {
|
|
1953
1956
|
var t, a, i, r, o, l;
|
|
@@ -1959,78 +1962,78 @@ function $r(e, n) {
|
|
|
1959
1962
|
if (l === 92) {
|
|
1960
1963
|
if (be(e, t, e.position, !0), l = e.input.charCodeAt(++e.position), me(l))
|
|
1961
1964
|
te(e, !1, n);
|
|
1962
|
-
else if (l < 256 &&
|
|
1963
|
-
e.result +=
|
|
1964
|
-
else if ((o =
|
|
1965
|
+
else if (l < 256 && Fn[l])
|
|
1966
|
+
e.result += Nn[l], e.position++;
|
|
1967
|
+
else if ((o = Ar(l)) > 0) {
|
|
1965
1968
|
for (i = o, r = 0; i > 0; i--)
|
|
1966
|
-
l = e.input.charCodeAt(++e.position), (o =
|
|
1969
|
+
l = e.input.charCodeAt(++e.position), (o = Ir(l)) >= 0 ? r = (r << 4) + o : A(e, "expected hexadecimal character");
|
|
1967
1970
|
e.result += _r(r), e.position++;
|
|
1968
1971
|
} else
|
|
1969
|
-
|
|
1972
|
+
A(e, "unknown escape sequence");
|
|
1970
1973
|
t = a = e.position;
|
|
1971
1974
|
} else
|
|
1972
|
-
me(l) ? (be(e, t, a, !0), bt(e, te(e, !1, n)), t = a = e.position) : e.position === e.lineStart && Ze(e) ?
|
|
1975
|
+
me(l) ? (be(e, t, a, !0), bt(e, te(e, !1, n)), t = a = e.position) : e.position === e.lineStart && Ze(e) ? A(e, "unexpected end of the document within a double quoted scalar") : (e.position++, a = e.position);
|
|
1973
1976
|
}
|
|
1974
|
-
|
|
1977
|
+
A(e, "unexpected end of the stream within a double quoted scalar");
|
|
1975
1978
|
}
|
|
1976
1979
|
function Mr(e, n) {
|
|
1977
|
-
var t = !0, a, i, r, o = e.tag, l, s = e.anchor,
|
|
1978
|
-
if (
|
|
1979
|
-
d = 93,
|
|
1980
|
-
else if (
|
|
1981
|
-
d = 125,
|
|
1980
|
+
var t = !0, a, i, r, o = e.tag, l, s = e.anchor, c, d, u, y, p, C = /* @__PURE__ */ Object.create(null), h, I, m, f;
|
|
1981
|
+
if (f = e.input.charCodeAt(e.position), f === 91)
|
|
1982
|
+
d = 93, p = !1, l = [];
|
|
1983
|
+
else if (f === 123)
|
|
1984
|
+
d = 125, p = !0, l = {};
|
|
1982
1985
|
else
|
|
1983
1986
|
return !1;
|
|
1984
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1985
|
-
if (te(e, !0, n),
|
|
1986
|
-
return e.position++, e.tag = o, e.anchor = s, e.kind =
|
|
1987
|
-
t ?
|
|
1987
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), f = e.input.charCodeAt(++e.position); f !== 0; ) {
|
|
1988
|
+
if (te(e, !0, n), f = e.input.charCodeAt(e.position), f === d)
|
|
1989
|
+
return e.position++, e.tag = o, e.anchor = s, e.kind = p ? "mapping" : "sequence", e.result = l, !0;
|
|
1990
|
+
t ? f === 44 && A(e, "expected the node content, but found ','") : A(e, "missed comma between flow collection entries"), I = h = m = null, u = y = !1, f === 63 && (c = e.input.charCodeAt(e.position + 1), ue(c) && (u = y = !0, e.position++, te(e, !0, n))), a = e.line, i = e.lineStart, r = e.position, $e(e, n, Ve, !1, !0), I = e.tag, h = e.result, te(e, !0, n), f = e.input.charCodeAt(e.position), (y || e.line === a) && f === 58 && (u = !0, f = e.input.charCodeAt(++e.position), te(e, !0, n), $e(e, n, Ve, !1, !0), m = e.result), p ? je(e, l, C, I, h, m, a, i, r) : u ? l.push(je(e, null, C, I, h, m, a, i, r)) : l.push(h), te(e, !0, n), f = e.input.charCodeAt(e.position), f === 44 ? (t = !0, f = e.input.charCodeAt(++e.position)) : t = !1;
|
|
1988
1991
|
}
|
|
1989
|
-
|
|
1992
|
+
A(e, "unexpected end of the stream within a flow collection");
|
|
1990
1993
|
}
|
|
1991
1994
|
function Er(e, n) {
|
|
1992
|
-
var t, a, i = tt, r = !1, o = !1, l = n, s = 0,
|
|
1993
|
-
if (
|
|
1995
|
+
var t, a, i = tt, r = !1, o = !1, l = n, s = 0, c = !1, d, u;
|
|
1996
|
+
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
1994
1997
|
a = !1;
|
|
1995
|
-
else if (
|
|
1998
|
+
else if (u === 62)
|
|
1996
1999
|
a = !0;
|
|
1997
2000
|
else
|
|
1998
2001
|
return !1;
|
|
1999
|
-
for (e.kind = "scalar", e.result = "";
|
|
2000
|
-
if (
|
|
2001
|
-
tt === i ? i =
|
|
2002
|
-
else if ((d = xr(
|
|
2003
|
-
d === 0 ?
|
|
2002
|
+
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
2003
|
+
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
2004
|
+
tt === i ? i = u === 43 ? Ft : kr : A(e, "repeat of a chomping mode identifier");
|
|
2005
|
+
else if ((d = xr(u)) >= 0)
|
|
2006
|
+
d === 0 ? A(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? A(e, "repeat of an indentation width identifier") : (l = n + d - 1, o = !0);
|
|
2004
2007
|
else
|
|
2005
2008
|
break;
|
|
2006
|
-
if (Ae(
|
|
2009
|
+
if (Ae(u)) {
|
|
2007
2010
|
do
|
|
2008
|
-
|
|
2009
|
-
while (Ae(
|
|
2010
|
-
if (
|
|
2011
|
+
u = e.input.charCodeAt(++e.position);
|
|
2012
|
+
while (Ae(u));
|
|
2013
|
+
if (u === 35)
|
|
2011
2014
|
do
|
|
2012
|
-
|
|
2013
|
-
while (!me(
|
|
2015
|
+
u = e.input.charCodeAt(++e.position);
|
|
2016
|
+
while (!me(u) && u !== 0);
|
|
2014
2017
|
}
|
|
2015
|
-
for (;
|
|
2016
|
-
for (vt(e), e.lineIndent = 0,
|
|
2017
|
-
e.lineIndent++,
|
|
2018
|
-
if (!o && e.lineIndent > l && (l = e.lineIndent), me(
|
|
2018
|
+
for (; u !== 0; ) {
|
|
2019
|
+
for (vt(e), e.lineIndent = 0, u = e.input.charCodeAt(e.position); (!o || e.lineIndent < l) && u === 32; )
|
|
2020
|
+
e.lineIndent++, u = e.input.charCodeAt(++e.position);
|
|
2021
|
+
if (!o && e.lineIndent > l && (l = e.lineIndent), me(u)) {
|
|
2019
2022
|
s++;
|
|
2020
2023
|
continue;
|
|
2021
2024
|
}
|
|
2022
2025
|
if (e.lineIndent < l) {
|
|
2023
|
-
i ===
|
|
2026
|
+
i === Ft ? e.result += ae.repeat(`
|
|
2024
2027
|
`, r ? 1 + s : s) : i === tt && r && (e.result += `
|
|
2025
2028
|
`);
|
|
2026
2029
|
break;
|
|
2027
2030
|
}
|
|
2028
|
-
for (a ? Ae(
|
|
2029
|
-
`, r ? 1 + s : s)) :
|
|
2031
|
+
for (a ? Ae(u) ? (c = !0, e.result += ae.repeat(`
|
|
2032
|
+
`, r ? 1 + s : s)) : c ? (c = !1, e.result += ae.repeat(`
|
|
2030
2033
|
`, s + 1)) : s === 0 ? r && (e.result += " ") : e.result += ae.repeat(`
|
|
2031
2034
|
`, s) : e.result += ae.repeat(`
|
|
2032
|
-
`, r ? 1 + s : s), r = !0, o = !0, s = 0, t = e.position; !me(
|
|
2033
|
-
|
|
2035
|
+
`, r ? 1 + s : s), r = !0, o = !0, s = 0, t = e.position; !me(u) && u !== 0; )
|
|
2036
|
+
u = e.input.charCodeAt(++e.position);
|
|
2034
2037
|
be(e, t, e.position, !1);
|
|
2035
2038
|
}
|
|
2036
2039
|
return !0;
|
|
@@ -2039,119 +2042,119 @@ function Lt(e, n) {
|
|
|
2039
2042
|
var t, a = e.tag, i = e.anchor, r = [], o, l = !1, s;
|
|
2040
2043
|
if (e.firstTabInLine !== -1)
|
|
2041
2044
|
return !1;
|
|
2042
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = r), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2045
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = r), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, A(e, "tab characters must not be used in indentation")), !(s !== 45 || (o = e.input.charCodeAt(e.position + 1), !ue(o)))); ) {
|
|
2043
2046
|
if (l = !0, e.position++, te(e, !0, -1) && e.lineIndent <= n) {
|
|
2044
2047
|
r.push(null), s = e.input.charCodeAt(e.position);
|
|
2045
2048
|
continue;
|
|
2046
2049
|
}
|
|
2047
|
-
if (t = e.line, $e(e, n,
|
|
2048
|
-
|
|
2050
|
+
if (t = e.line, $e(e, n, $n, !1, !0), r.push(e.result), te(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && s !== 0)
|
|
2051
|
+
A(e, "bad indentation of a sequence entry");
|
|
2049
2052
|
else if (e.lineIndent < n)
|
|
2050
2053
|
break;
|
|
2051
2054
|
}
|
|
2052
2055
|
return l ? (e.tag = a, e.anchor = i, e.kind = "sequence", e.result = r, !0) : !1;
|
|
2053
2056
|
}
|
|
2054
|
-
function
|
|
2055
|
-
var a, i, r, o, l, s,
|
|
2057
|
+
function Fr(e, n, t) {
|
|
2058
|
+
var a, i, r, o, l, s, c = e.tag, d = e.anchor, u = {}, y = /* @__PURE__ */ Object.create(null), p = null, C = null, h = null, I = !1, m = !1, f;
|
|
2056
2059
|
if (e.firstTabInLine !== -1)
|
|
2057
2060
|
return !1;
|
|
2058
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] =
|
|
2059
|
-
if (!
|
|
2060
|
-
|
|
2061
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), f = e.input.charCodeAt(e.position); f !== 0; ) {
|
|
2062
|
+
if (!I && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, A(e, "tab characters must not be used in indentation")), a = e.input.charCodeAt(e.position + 1), r = e.line, (f === 63 || f === 58) && ue(a))
|
|
2063
|
+
f === 63 ? (I && (je(e, u, y, p, C, null, o, l, s), p = C = h = null), m = !0, I = !0, i = !0) : I ? (I = !1, i = !0) : A(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, f = a;
|
|
2061
2064
|
else {
|
|
2062
|
-
if (o = e.line, l = e.lineStart, s = e.position, !$e(e, t,
|
|
2065
|
+
if (o = e.line, l = e.lineStart, s = e.position, !$e(e, t, On, !1, !0))
|
|
2063
2066
|
break;
|
|
2064
2067
|
if (e.line === r) {
|
|
2065
|
-
for (
|
|
2066
|
-
|
|
2067
|
-
if (
|
|
2068
|
-
|
|
2069
|
-
else if (
|
|
2070
|
-
|
|
2068
|
+
for (f = e.input.charCodeAt(e.position); Ae(f); )
|
|
2069
|
+
f = e.input.charCodeAt(++e.position);
|
|
2070
|
+
if (f === 58)
|
|
2071
|
+
f = e.input.charCodeAt(++e.position), ue(f) || A(e, "a whitespace character is expected after the key-value separator within a block mapping"), I && (je(e, u, y, p, C, null, o, l, s), p = C = h = null), m = !0, I = !1, i = !1, p = e.tag, C = e.result;
|
|
2072
|
+
else if (m)
|
|
2073
|
+
A(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2071
2074
|
else
|
|
2072
|
-
return e.tag =
|
|
2073
|
-
} else if (
|
|
2074
|
-
|
|
2075
|
+
return e.tag = c, e.anchor = d, !0;
|
|
2076
|
+
} else if (m)
|
|
2077
|
+
A(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2075
2078
|
else
|
|
2076
|
-
return e.tag =
|
|
2079
|
+
return e.tag = c, e.anchor = d, !0;
|
|
2077
2080
|
}
|
|
2078
|
-
if ((e.line === r || e.lineIndent > n) && (
|
|
2079
|
-
|
|
2081
|
+
if ((e.line === r || e.lineIndent > n) && (I && (o = e.line, l = e.lineStart, s = e.position), $e(e, n, ze, !0, i) && (I ? C = e.result : h = e.result), I || (je(e, u, y, p, C, h, o, l, s), p = C = h = null), te(e, !0, -1), f = e.input.charCodeAt(e.position)), (e.line === r || e.lineIndent > n) && f !== 0)
|
|
2082
|
+
A(e, "bad indentation of a mapping entry");
|
|
2080
2083
|
else if (e.lineIndent < n)
|
|
2081
2084
|
break;
|
|
2082
2085
|
}
|
|
2083
|
-
return
|
|
2086
|
+
return I && je(e, u, y, p, C, null, o, l, s), m && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), m;
|
|
2084
2087
|
}
|
|
2085
|
-
function
|
|
2088
|
+
function Nr(e) {
|
|
2086
2089
|
var n, t = !1, a = !1, i, r, o;
|
|
2087
2090
|
if (o = e.input.charCodeAt(e.position), o !== 33)
|
|
2088
2091
|
return !1;
|
|
2089
|
-
if (e.tag !== null &&
|
|
2092
|
+
if (e.tag !== null && A(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (t = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (a = !0, i = "!!", o = e.input.charCodeAt(++e.position)) : i = "!", n = e.position, t) {
|
|
2090
2093
|
do
|
|
2091
2094
|
o = e.input.charCodeAt(++e.position);
|
|
2092
2095
|
while (o !== 0 && o !== 62);
|
|
2093
|
-
e.position < e.length ? (r = e.input.slice(n, e.position), o = e.input.charCodeAt(++e.position)) :
|
|
2096
|
+
e.position < e.length ? (r = e.input.slice(n, e.position), o = e.input.charCodeAt(++e.position)) : A(e, "unexpected end of the stream within a verbatim tag");
|
|
2094
2097
|
} else {
|
|
2095
2098
|
for (; o !== 0 && !ue(o); )
|
|
2096
|
-
o === 33 && (a ?
|
|
2097
|
-
r = e.input.slice(n, e.position), Sr.test(r) &&
|
|
2099
|
+
o === 33 && (a ? A(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(n - 1, e.position + 1), Mn.test(i) || A(e, "named tag handle cannot contain such characters"), a = !0, n = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
2100
|
+
r = e.input.slice(n, e.position), Sr.test(r) && A(e, "tag suffix cannot contain flow indicator characters");
|
|
2098
2101
|
}
|
|
2099
|
-
r && !
|
|
2102
|
+
r && !En.test(r) && A(e, "tag name cannot contain such characters: " + r);
|
|
2100
2103
|
try {
|
|
2101
2104
|
r = decodeURIComponent(r);
|
|
2102
2105
|
} catch {
|
|
2103
|
-
|
|
2106
|
+
A(e, "tag name is malformed: " + r);
|
|
2104
2107
|
}
|
|
2105
|
-
return t ? e.tag = r :
|
|
2108
|
+
return t ? e.tag = r : Ce.call(e.tagMap, i) ? e.tag = e.tagMap[i] + r : i === "!" ? e.tag = "!" + r : i === "!!" ? e.tag = "tag:yaml.org,2002:" + r : A(e, 'undeclared tag handle "' + i + '"'), !0;
|
|
2106
2109
|
}
|
|
2107
|
-
function
|
|
2110
|
+
function Kr(e) {
|
|
2108
2111
|
var n, t;
|
|
2109
2112
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2110
2113
|
return !1;
|
|
2111
|
-
for (e.anchor !== null &&
|
|
2114
|
+
for (e.anchor !== null && A(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !ue(t) && !Te(t); )
|
|
2112
2115
|
t = e.input.charCodeAt(++e.position);
|
|
2113
|
-
return e.position === n &&
|
|
2116
|
+
return e.position === n && A(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2114
2117
|
}
|
|
2115
|
-
function
|
|
2118
|
+
function qr(e) {
|
|
2116
2119
|
var n, t, a;
|
|
2117
2120
|
if (a = e.input.charCodeAt(e.position), a !== 42)
|
|
2118
2121
|
return !1;
|
|
2119
2122
|
for (a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !ue(a) && !Te(a); )
|
|
2120
2123
|
a = e.input.charCodeAt(++e.position);
|
|
2121
|
-
return e.position === n &&
|
|
2124
|
+
return e.position === n && A(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), Ce.call(e.anchorMap, t) || A(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], te(e, !0, -1), !0;
|
|
2122
2125
|
}
|
|
2123
2126
|
function $e(e, n, t, a, i) {
|
|
2124
|
-
var r, o, l, s = 1,
|
|
2125
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, r = o = l =
|
|
2126
|
-
for (;
|
|
2127
|
-
te(e, !0, -1) ? (
|
|
2128
|
-
if (l && (l =
|
|
2127
|
+
var r, o, l, s = 1, c = !1, d = !1, u, y, p, C, h, I;
|
|
2128
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, r = o = l = ze === t || $n === t, a && te(e, !0, -1) && (c = !0, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)), s === 1)
|
|
2129
|
+
for (; Nr(e) || Kr(e); )
|
|
2130
|
+
te(e, !0, -1) ? (c = !0, l = r, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)) : l = !1;
|
|
2131
|
+
if (l && (l = c || i), (s === 1 || ze === t) && (Ve === t || On === t ? h = n : h = n + 1, I = e.position - e.lineStart, s === 1 ? l && (Lt(e, I) || Fr(e, I, h)) || Mr(e, h) ? d = !0 : (o && Er(e, h) || Or(e, h) || $r(e, h) ? d = !0 : qr(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && A(e, "alias node should not have any properties")) : jr(e, h, Ve === t) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && Lt(e, I))), e.tag === null)
|
|
2129
2132
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2130
2133
|
else if (e.tag === "?") {
|
|
2131
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2132
|
-
if (C = e.implicitTypes[
|
|
2134
|
+
for (e.result !== null && e.kind !== "scalar" && A(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, y = e.implicitTypes.length; u < y; u += 1)
|
|
2135
|
+
if (C = e.implicitTypes[u], C.resolve(e.result)) {
|
|
2133
2136
|
e.result = C.construct(e.result), e.tag = C.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2134
2137
|
break;
|
|
2135
2138
|
}
|
|
2136
2139
|
} else if (e.tag !== "!") {
|
|
2137
|
-
if (
|
|
2140
|
+
if (Ce.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2138
2141
|
C = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2139
2142
|
else
|
|
2140
|
-
for (C = null,
|
|
2141
|
-
if (e.tag.slice(0,
|
|
2142
|
-
C =
|
|
2143
|
+
for (C = null, p = e.typeMap.multi[e.kind || "fallback"], u = 0, y = p.length; u < y; u += 1)
|
|
2144
|
+
if (e.tag.slice(0, p[u].tag.length) === p[u].tag) {
|
|
2145
|
+
C = p[u];
|
|
2143
2146
|
break;
|
|
2144
2147
|
}
|
|
2145
|
-
C ||
|
|
2148
|
+
C || A(e, "unknown tag !<" + e.tag + ">"), e.result !== null && C.kind !== e.kind && A(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + C.kind + '", not "' + e.kind + '"'), C.resolve(e.result, e.tag) ? (e.result = C.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : A(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2146
2149
|
}
|
|
2147
2150
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2148
2151
|
}
|
|
2149
|
-
function
|
|
2152
|
+
function Br(e) {
|
|
2150
2153
|
var n = e.position, t, a, i, r = !1, o;
|
|
2151
2154
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (te(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
2152
2155
|
for (r = !0, o = e.input.charCodeAt(++e.position), t = e.position; o !== 0 && !ue(o); )
|
|
2153
2156
|
o = e.input.charCodeAt(++e.position);
|
|
2154
|
-
for (a = e.input.slice(t, e.position), i = [], a.length < 1 &&
|
|
2157
|
+
for (a = e.input.slice(t, e.position), i = [], a.length < 1 && A(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
2155
2158
|
for (; Ae(o); )
|
|
2156
2159
|
o = e.input.charCodeAt(++e.position);
|
|
2157
2160
|
if (o === 35) {
|
|
@@ -2166,47 +2169,47 @@ function qr(e) {
|
|
|
2166
2169
|
o = e.input.charCodeAt(++e.position);
|
|
2167
2170
|
i.push(e.input.slice(t, e.position));
|
|
2168
2171
|
}
|
|
2169
|
-
o !== 0 && vt(e),
|
|
2172
|
+
o !== 0 && vt(e), Ce.call(qt, a) ? qt[a](e, a, i) : He(e, 'unknown document directive "' + a + '"');
|
|
2170
2173
|
}
|
|
2171
|
-
if (te(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, te(e, !0, -1)) : r &&
|
|
2174
|
+
if (te(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, te(e, !0, -1)) : r && A(e, "directives end mark is expected"), $e(e, e.lineIndent - 1, ze, !1, !0), te(e, !0, -1), e.checkLineBreaks && wr.test(e.input.slice(n, e.position)) && He(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Ze(e)) {
|
|
2172
2175
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, te(e, !0, -1));
|
|
2173
2176
|
return;
|
|
2174
2177
|
}
|
|
2175
2178
|
if (e.position < e.length - 1)
|
|
2176
|
-
|
|
2179
|
+
A(e, "end of the stream or a document separator is expected");
|
|
2177
2180
|
else
|
|
2178
2181
|
return;
|
|
2179
2182
|
}
|
|
2180
|
-
function
|
|
2183
|
+
function qn(e, n) {
|
|
2181
2184
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2182
2185
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2183
2186
|
var t = new Tr(e, n), a = e.indexOf("\0");
|
|
2184
|
-
for (a !== -1 && (t.position = a,
|
|
2187
|
+
for (a !== -1 && (t.position = a, A(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2185
2188
|
t.lineIndent += 1, t.position += 1;
|
|
2186
2189
|
for (; t.position < t.length - 1; )
|
|
2187
|
-
|
|
2190
|
+
Br(t);
|
|
2188
2191
|
return t.documents;
|
|
2189
2192
|
}
|
|
2190
2193
|
function Lr(e, n, t) {
|
|
2191
2194
|
n !== null && typeof n == "object" && typeof t > "u" && (t = n, n = null);
|
|
2192
|
-
var a =
|
|
2195
|
+
var a = qn(e, t);
|
|
2193
2196
|
if (typeof n != "function")
|
|
2194
2197
|
return a;
|
|
2195
2198
|
for (var i = 0, r = a.length; i < r; i += 1)
|
|
2196
2199
|
n(a[i]);
|
|
2197
2200
|
}
|
|
2198
|
-
function
|
|
2199
|
-
var t =
|
|
2201
|
+
function Ur(e, n) {
|
|
2202
|
+
var t = qn(e, n);
|
|
2200
2203
|
if (t.length !== 0) {
|
|
2201
2204
|
if (t.length === 1)
|
|
2202
2205
|
return t[0];
|
|
2203
2206
|
throw new ce("expected a single document in the stream, but found more");
|
|
2204
2207
|
}
|
|
2205
2208
|
}
|
|
2206
|
-
var
|
|
2207
|
-
loadAll:
|
|
2208
|
-
load:
|
|
2209
|
-
},
|
|
2209
|
+
var Dr = Lr, Rr = Ur, Bn = {
|
|
2210
|
+
loadAll: Dr,
|
|
2211
|
+
load: Rr
|
|
2212
|
+
}, Ln = Object.prototype.toString, Un = Object.prototype.hasOwnProperty, kt = 65279, Pr = 9, qe = 10, Vr = 13, zr = 32, Hr = 33, Jr = 34, rt = 35, Yr = 37, Wr = 38, Zr = 39, Gr = 42, Dn = 44, Qr = 45, Je = 58, Xr = 61, eo = 62, to = 63, no = 64, Rn = 91, Pn = 93, ao = 96, Vn = 123, io = 124, zn = 125, se = {};
|
|
2210
2213
|
se[0] = "\\0";
|
|
2211
2214
|
se[7] = "\\a";
|
|
2212
2215
|
se[8] = "\\b";
|
|
@@ -2245,7 +2248,7 @@ function lo(e, n) {
|
|
|
2245
2248
|
if (n === null)
|
|
2246
2249
|
return {};
|
|
2247
2250
|
for (t = {}, a = Object.keys(n), i = 0, r = a.length; i < r; i += 1)
|
|
2248
|
-
o = a[i], l = String(n[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), s = e.compiledTypeMap.fallback[o], s &&
|
|
2251
|
+
o = a[i], l = String(n[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), s = e.compiledTypeMap.fallback[o], s && Un.call(s.styleAliases, l) && (l = s.styleAliases[l]), t[o] = l;
|
|
2249
2252
|
return t;
|
|
2250
2253
|
}
|
|
2251
2254
|
function so(e) {
|
|
@@ -2260,11 +2263,11 @@ function so(e) {
|
|
|
2260
2263
|
throw new ce("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2261
2264
|
return "\\" + t + ae.repeat("0", a - n.length) + n;
|
|
2262
2265
|
}
|
|
2263
|
-
var co = 1,
|
|
2266
|
+
var co = 1, Be = 2;
|
|
2264
2267
|
function uo(e) {
|
|
2265
|
-
this.schema = e.schema || ht, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ae.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = lo(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ?
|
|
2268
|
+
this.schema = e.schema || ht, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ae.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = lo(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? Be : co, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
2266
2269
|
}
|
|
2267
|
-
function
|
|
2270
|
+
function Ut(e, n) {
|
|
2268
2271
|
for (var t = ae.repeat(" ", n), a = 0, i = -1, r = "", o, l = e.length; a < l; )
|
|
2269
2272
|
i = e.indexOf(`
|
|
2270
2273
|
`, a), i === -1 ? (o = e.slice(a), a = l) : (o = e.slice(a, i + 1), a = i + 1), o.length && o !== `
|
|
@@ -2283,26 +2286,26 @@ function po(e, n) {
|
|
|
2283
2286
|
return !1;
|
|
2284
2287
|
}
|
|
2285
2288
|
function Ye(e) {
|
|
2286
|
-
return e ===
|
|
2289
|
+
return e === zr || e === Pr;
|
|
2287
2290
|
}
|
|
2288
2291
|
function Le(e) {
|
|
2289
2292
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== kt || 65536 <= e && e <= 1114111;
|
|
2290
2293
|
}
|
|
2291
|
-
function
|
|
2292
|
-
return Le(e) && e !== kt && e !== Vr && e !==
|
|
2294
|
+
function Dt(e) {
|
|
2295
|
+
return Le(e) && e !== kt && e !== Vr && e !== qe;
|
|
2293
2296
|
}
|
|
2294
|
-
function
|
|
2295
|
-
var a =
|
|
2297
|
+
function Rt(e, n, t) {
|
|
2298
|
+
var a = Dt(e), i = a && !Ye(e);
|
|
2296
2299
|
return (
|
|
2297
2300
|
// ns-plain-safe
|
|
2298
2301
|
(t ? (
|
|
2299
2302
|
// c = flow-in
|
|
2300
2303
|
a
|
|
2301
|
-
) : a && e !==
|
|
2304
|
+
) : a && e !== Dn && e !== Rn && e !== Pn && e !== Vn && e !== zn) && e !== rt && !(n === Je && !i) || Dt(n) && !Ye(n) && e === rt || n === Je && i
|
|
2302
2305
|
);
|
|
2303
2306
|
}
|
|
2304
2307
|
function fo(e) {
|
|
2305
|
-
return Le(e) && e !== kt && !Ye(e) && e !== Qr && e !== to && e !== Je && e !==
|
|
2308
|
+
return Le(e) && e !== kt && !Ye(e) && e !== Qr && e !== to && e !== Je && e !== Dn && e !== Rn && e !== Pn && e !== Vn && e !== zn && e !== rt && e !== Wr && e !== Gr && e !== Hr && e !== io && e !== Xr && e !== eo && e !== Zr && e !== Jr && e !== Yr && e !== no && e !== ao;
|
|
2306
2309
|
}
|
|
2307
2310
|
function yo(e) {
|
|
2308
2311
|
return !Ye(e) && e !== Je;
|
|
@@ -2315,37 +2318,37 @@ function Hn(e) {
|
|
|
2315
2318
|
var n = /^\n* /;
|
|
2316
2319
|
return n.test(e);
|
|
2317
2320
|
}
|
|
2318
|
-
var
|
|
2321
|
+
var Jn = 1, lt = 2, Yn = 3, Wn = 4, _e = 5;
|
|
2319
2322
|
function go(e, n, t, a, i, r, o, l) {
|
|
2320
|
-
var s,
|
|
2323
|
+
var s, c = 0, d = null, u = !1, y = !1, p = a !== -1, C = -1, h = fo(Ee(e, 0)) && yo(Ee(e, e.length - 1));
|
|
2321
2324
|
if (n || o)
|
|
2322
|
-
for (s = 0; s < e.length;
|
|
2323
|
-
if (
|
|
2325
|
+
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2326
|
+
if (c = Ee(e, s), !Le(c))
|
|
2324
2327
|
return _e;
|
|
2325
|
-
h = h &&
|
|
2328
|
+
h = h && Rt(c, d, l), d = c;
|
|
2326
2329
|
}
|
|
2327
2330
|
else {
|
|
2328
|
-
for (s = 0; s < e.length;
|
|
2329
|
-
if (
|
|
2330
|
-
|
|
2331
|
+
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2332
|
+
if (c = Ee(e, s), c === qe)
|
|
2333
|
+
u = !0, p && (y = y || // Foldable line = too long, and not more-indented.
|
|
2331
2334
|
s - C - 1 > a && e[C + 1] !== " ", C = s);
|
|
2332
|
-
else if (!Le(
|
|
2335
|
+
else if (!Le(c))
|
|
2333
2336
|
return _e;
|
|
2334
|
-
h = h &&
|
|
2337
|
+
h = h && Rt(c, d, l), d = c;
|
|
2335
2338
|
}
|
|
2336
|
-
|
|
2339
|
+
y = y || p && s - C - 1 > a && e[C + 1] !== " ";
|
|
2337
2340
|
}
|
|
2338
|
-
return !
|
|
2341
|
+
return !u && !y ? h && !o && !i(e) ? Jn : r === Be ? _e : lt : t > 9 && Hn(e) ? _e : o ? r === Be ? _e : lt : y ? Wn : Yn;
|
|
2339
2342
|
}
|
|
2340
2343
|
function mo(e, n, t, a, i) {
|
|
2341
2344
|
e.dump = function() {
|
|
2342
2345
|
if (n.length === 0)
|
|
2343
|
-
return e.quotingType ===
|
|
2346
|
+
return e.quotingType === Be ? '""' : "''";
|
|
2344
2347
|
if (!e.noCompatMode && (ro.indexOf(n) !== -1 || oo.test(n)))
|
|
2345
|
-
return e.quotingType ===
|
|
2348
|
+
return e.quotingType === Be ? '"' + n + '"' : "'" + n + "'";
|
|
2346
2349
|
var r = e.indent * Math.max(1, t), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - r), l = a || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2347
|
-
function s(
|
|
2348
|
-
return po(e,
|
|
2350
|
+
function s(c) {
|
|
2351
|
+
return po(e, c);
|
|
2349
2352
|
}
|
|
2350
2353
|
switch (go(
|
|
2351
2354
|
n,
|
|
@@ -2357,14 +2360,14 @@ function mo(e, n, t, a, i) {
|
|
|
2357
2360
|
e.forceQuotes && !a,
|
|
2358
2361
|
i
|
|
2359
2362
|
)) {
|
|
2360
|
-
case
|
|
2363
|
+
case Jn:
|
|
2361
2364
|
return n;
|
|
2362
2365
|
case lt:
|
|
2363
2366
|
return "'" + n.replace(/'/g, "''") + "'";
|
|
2364
|
-
case Jn:
|
|
2365
|
-
return "|" + Dt(n, e.indent) + Vt(Rt(n, r));
|
|
2366
2367
|
case Yn:
|
|
2367
|
-
return "
|
|
2368
|
+
return "|" + Pt(n, e.indent) + Vt(Ut(n, r));
|
|
2369
|
+
case Wn:
|
|
2370
|
+
return ">" + Pt(n, e.indent) + Vt(Ut(ho(n, o), r));
|
|
2368
2371
|
case _e:
|
|
2369
2372
|
return '"' + vo(n) + '"';
|
|
2370
2373
|
default:
|
|
@@ -2372,7 +2375,7 @@ function mo(e, n, t, a, i) {
|
|
|
2372
2375
|
}
|
|
2373
2376
|
}();
|
|
2374
2377
|
}
|
|
2375
|
-
function
|
|
2378
|
+
function Pt(e, n) {
|
|
2376
2379
|
var t = Hn(e) ? String(n) : "", a = e[e.length - 1] === `
|
|
2377
2380
|
`, i = a && (e[e.length - 2] === `
|
|
2378
2381
|
` || e === `
|
|
@@ -2386,18 +2389,18 @@ function Vt(e) {
|
|
|
2386
2389
|
}
|
|
2387
2390
|
function ho(e, n) {
|
|
2388
2391
|
for (var t = /(\n+)([^\n]*)/g, a = function() {
|
|
2389
|
-
var
|
|
2392
|
+
var c = e.indexOf(`
|
|
2390
2393
|
`);
|
|
2391
|
-
return
|
|
2394
|
+
return c = c !== -1 ? c : e.length, t.lastIndex = c, zt(e.slice(0, c), n);
|
|
2392
2395
|
}(), i = e[0] === `
|
|
2393
2396
|
` || e[0] === " ", r, o; o = t.exec(e); ) {
|
|
2394
2397
|
var l = o[1], s = o[2];
|
|
2395
2398
|
r = s[0] === " ", a += l + (!i && !r && s !== "" ? `
|
|
2396
|
-
` : "") +
|
|
2399
|
+
` : "") + zt(s, n), i = r;
|
|
2397
2400
|
}
|
|
2398
2401
|
return a;
|
|
2399
2402
|
}
|
|
2400
|
-
function
|
|
2403
|
+
function zt(e, n) {
|
|
2401
2404
|
if (e === "" || e[0] === " ")
|
|
2402
2405
|
return e;
|
|
2403
2406
|
for (var t = / [^ ]/g, a, i = 0, r, o = 0, l = 0, s = ""; a = t.exec(e); )
|
|
@@ -2418,20 +2421,20 @@ function bo(e, n, t) {
|
|
|
2418
2421
|
l = t[r], e.replacer && (l = e.replacer.call(t, String(r), l)), (ve(e, n, l, !1, !1) || typeof l > "u" && ve(e, n, null, !1, !1)) && (a !== "" && (a += "," + (e.condenseFlow ? "" : " ")), a += e.dump);
|
|
2419
2422
|
e.tag = i, e.dump = "[" + a + "]";
|
|
2420
2423
|
}
|
|
2421
|
-
function
|
|
2424
|
+
function Ht(e, n, t, a) {
|
|
2422
2425
|
var i = "", r = e.tag, o, l, s;
|
|
2423
2426
|
for (o = 0, l = t.length; o < l; o += 1)
|
|
2424
|
-
s = t[o], e.replacer && (s = e.replacer.call(t, String(o), s)), (ve(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && ve(e, n + 1, null, !0, !0, !1, !0)) && ((!a || i !== "") && (i += ot(e, n)), e.dump &&
|
|
2427
|
+
s = t[o], e.replacer && (s = e.replacer.call(t, String(o), s)), (ve(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && ve(e, n + 1, null, !0, !0, !1, !0)) && ((!a || i !== "") && (i += ot(e, n)), e.dump && qe === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2425
2428
|
e.tag = r, e.dump = i || "[]";
|
|
2426
2429
|
}
|
|
2427
2430
|
function ko(e, n, t) {
|
|
2428
|
-
var a = "", i = e.tag, r = Object.keys(t), o, l, s,
|
|
2431
|
+
var a = "", i = e.tag, r = Object.keys(t), o, l, s, c, d;
|
|
2429
2432
|
for (o = 0, l = r.length; o < l; o += 1)
|
|
2430
|
-
d = "", a !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = r[o],
|
|
2433
|
+
d = "", a !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = r[o], c = t[s], e.replacer && (c = e.replacer.call(t, s, c)), ve(e, n, s, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ve(e, n, c, !1, !1) && (d += e.dump, a += d));
|
|
2431
2434
|
e.tag = i, e.dump = "{" + a + "}";
|
|
2432
2435
|
}
|
|
2433
2436
|
function Co(e, n, t, a) {
|
|
2434
|
-
var i = "", r = e.tag, o = Object.keys(t), l, s,
|
|
2437
|
+
var i = "", r = e.tag, o = Object.keys(t), l, s, c, d, u, y;
|
|
2435
2438
|
if (e.sortKeys === !0)
|
|
2436
2439
|
o.sort();
|
|
2437
2440
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2439,7 +2442,7 @@ function Co(e, n, t, a) {
|
|
|
2439
2442
|
else if (e.sortKeys)
|
|
2440
2443
|
throw new ce("sortKeys must be a boolean or a function");
|
|
2441
2444
|
for (l = 0, s = o.length; l < s; l += 1)
|
|
2442
|
-
|
|
2445
|
+
y = "", (!a || i !== "") && (y += ot(e, n)), c = o[l], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)), ve(e, n + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && qe === e.dump.charCodeAt(0) ? y += "?" : y += "? "), y += e.dump, u && (y += ot(e, n)), ve(e, n + 1, d, !0, u) && (e.dump && qe === e.dump.charCodeAt(0) ? y += ":" : y += ": ", y += e.dump, i += y));
|
|
2443
2446
|
e.tag = r, e.dump = i || "{}";
|
|
2444
2447
|
}
|
|
2445
2448
|
function Jt(e, n, t) {
|
|
@@ -2447,9 +2450,9 @@ function Jt(e, n, t) {
|
|
|
2447
2450
|
for (i = t ? e.explicitTypes : e.implicitTypes, r = 0, o = i.length; r < o; r += 1)
|
|
2448
2451
|
if (l = i[r], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof n == "object" && n instanceof l.instanceOf) && (!l.predicate || l.predicate(n))) {
|
|
2449
2452
|
if (t ? l.multi && l.representName ? e.tag = l.representName(n) : e.tag = l.tag : e.tag = "?", l.represent) {
|
|
2450
|
-
if (s = e.styleMap[l.tag] || l.defaultStyle,
|
|
2453
|
+
if (s = e.styleMap[l.tag] || l.defaultStyle, Ln.call(l.represent) === "[object Function]")
|
|
2451
2454
|
a = l.represent(n, s);
|
|
2452
|
-
else if (
|
|
2455
|
+
else if (Un.call(l.represent, s))
|
|
2453
2456
|
a = l.represent[s](n, s);
|
|
2454
2457
|
else
|
|
2455
2458
|
throw new ce("!<" + l.tag + '> tag resolver accepts not "' + s + '" style');
|
|
@@ -2461,16 +2464,16 @@ function Jt(e, n, t) {
|
|
|
2461
2464
|
}
|
|
2462
2465
|
function ve(e, n, t, a, i, r, o) {
|
|
2463
2466
|
e.tag = null, e.dump = t, Jt(e, t, !1) || Jt(e, t, !0);
|
|
2464
|
-
var l =
|
|
2467
|
+
var l = Ln.call(e.dump), s = a, c;
|
|
2465
2468
|
a && (a = e.flowLevel < 0 || e.flowLevel > n);
|
|
2466
|
-
var d = l === "[object Object]" || l === "[object Array]",
|
|
2467
|
-
if (d && (
|
|
2468
|
-
e.dump = "*ref_" +
|
|
2469
|
+
var d = l === "[object Object]" || l === "[object Array]", u, y;
|
|
2470
|
+
if (d && (u = e.duplicates.indexOf(t), y = u !== -1), (e.tag !== null && e.tag !== "?" || y || e.indent !== 2 && n > 0) && (i = !1), y && e.usedDuplicates[u])
|
|
2471
|
+
e.dump = "*ref_" + u;
|
|
2469
2472
|
else {
|
|
2470
|
-
if (d &&
|
|
2471
|
-
a && Object.keys(e.dump).length !== 0 ? (Co(e, n, e.dump, i),
|
|
2473
|
+
if (d && y && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), l === "[object Object]")
|
|
2474
|
+
a && Object.keys(e.dump).length !== 0 ? (Co(e, n, e.dump, i), y && (e.dump = "&ref_" + u + e.dump)) : (ko(e, n, e.dump), y && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2472
2475
|
else if (l === "[object Array]")
|
|
2473
|
-
a && e.dump.length !== 0 ? (e.noArrayIndent && !o && n > 0 ?
|
|
2476
|
+
a && e.dump.length !== 0 ? (e.noArrayIndent && !o && n > 0 ? Ht(e, n - 1, e.dump, i) : Ht(e, n, e.dump, i), y && (e.dump = "&ref_" + u + e.dump)) : (bo(e, n, e.dump), y && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2474
2477
|
else if (l === "[object String]")
|
|
2475
2478
|
e.tag !== "?" && mo(e, e.dump, n, r, s);
|
|
2476
2479
|
else {
|
|
@@ -2478,9 +2481,9 @@ function ve(e, n, t, a, i, r, o) {
|
|
|
2478
2481
|
return !1;
|
|
2479
2482
|
throw new ce("unacceptable kind of an object to dump " + l);
|
|
2480
2483
|
}
|
|
2481
|
-
e.tag !== null && e.tag !== "?" && (
|
|
2484
|
+
e.tag !== null && e.tag !== "?" && (c = encodeURI(
|
|
2482
2485
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
2483
|
-
).replace(/!/g, "%21"), e.tag[0] === "!" ?
|
|
2486
|
+
).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);
|
|
2484
2487
|
}
|
|
2485
2488
|
return !0;
|
|
2486
2489
|
}
|
|
@@ -2510,29 +2513,29 @@ function So(e, n) {
|
|
|
2510
2513
|
return t.replacer && (a = t.replacer.call({ "": a }, "", a)), ve(t, 0, a, !0, !0) ? t.dump + `
|
|
2511
2514
|
` : "";
|
|
2512
2515
|
}
|
|
2513
|
-
var
|
|
2514
|
-
dump:
|
|
2516
|
+
var Io = So, Ao = {
|
|
2517
|
+
dump: Io
|
|
2515
2518
|
};
|
|
2516
2519
|
function Ct(e, n) {
|
|
2517
2520
|
return function() {
|
|
2518
2521
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2519
2522
|
};
|
|
2520
2523
|
}
|
|
2521
|
-
var xo = oe, _o =
|
|
2522
|
-
binary:
|
|
2523
|
-
float:
|
|
2524
|
-
map:
|
|
2525
|
-
null:
|
|
2526
|
-
pairs:
|
|
2527
|
-
set:
|
|
2528
|
-
timestamp:
|
|
2529
|
-
bool:
|
|
2530
|
-
int:
|
|
2524
|
+
var xo = oe, _o = dn, To = gn, jo = kn, Oo = Cn, $o = ht, Mo = Bn.load, Eo = Bn.loadAll, Fo = Ao.dump, No = ce, Ko = {
|
|
2525
|
+
binary: xn,
|
|
2526
|
+
float: bn,
|
|
2527
|
+
map: yn,
|
|
2528
|
+
null: mn,
|
|
2529
|
+
pairs: Tn,
|
|
2530
|
+
set: jn,
|
|
2531
|
+
timestamp: In,
|
|
2532
|
+
bool: hn,
|
|
2533
|
+
int: vn,
|
|
2531
2534
|
merge: An,
|
|
2532
|
-
omap:
|
|
2533
|
-
seq:
|
|
2534
|
-
str:
|
|
2535
|
-
},
|
|
2535
|
+
omap: _n,
|
|
2536
|
+
seq: fn,
|
|
2537
|
+
str: pn
|
|
2538
|
+
}, qo = Ct("safeLoad", "load"), Bo = Ct("safeLoadAll", "loadAll"), Lo = Ct("safeDump", "dump"), Uo = {
|
|
2536
2539
|
Type: xo,
|
|
2537
2540
|
Schema: _o,
|
|
2538
2541
|
FAILSAFE_SCHEMA: To,
|
|
@@ -2541,26 +2544,29 @@ var xo = oe, _o = un, To = yn, jo = bn, Oo = kn, $o = ht, Mo = Bn.load, Eo = Bn.
|
|
|
2541
2544
|
DEFAULT_SCHEMA: $o,
|
|
2542
2545
|
load: Mo,
|
|
2543
2546
|
loadAll: Eo,
|
|
2544
|
-
dump:
|
|
2545
|
-
YAMLException:
|
|
2546
|
-
types:
|
|
2547
|
-
safeLoad:
|
|
2548
|
-
safeLoadAll:
|
|
2547
|
+
dump: Fo,
|
|
2548
|
+
YAMLException: No,
|
|
2549
|
+
types: Ko,
|
|
2550
|
+
safeLoad: qo,
|
|
2551
|
+
safeLoadAll: Bo,
|
|
2549
2552
|
safeDump: Lo
|
|
2550
2553
|
};
|
|
2551
|
-
const
|
|
2554
|
+
const Do = {
|
|
2552
2555
|
key: 0,
|
|
2553
2556
|
class: "config-card-display-form"
|
|
2554
|
-
},
|
|
2557
|
+
}, Ro = ["data-testid"], Po = {
|
|
2555
2558
|
key: 0,
|
|
2556
2559
|
class: "config-card-prop-section-title"
|
|
2557
2560
|
}, Vo = {
|
|
2558
2561
|
key: 1,
|
|
2559
2562
|
class: "config-card-display-json"
|
|
2563
|
+
}, zo = {
|
|
2564
|
+
key: 0,
|
|
2565
|
+
class: "config-card-display-json-endpoint"
|
|
2560
2566
|
}, Ho = {
|
|
2561
2567
|
key: 2,
|
|
2562
2568
|
class: "config-card-display-yaml"
|
|
2563
|
-
},
|
|
2569
|
+
}, Jo = /* @__PURE__ */ ne({
|
|
2564
2570
|
__name: "ConfigCardDisplay",
|
|
2565
2571
|
props: {
|
|
2566
2572
|
propertyCollections: {
|
|
@@ -2583,60 +2589,89 @@ const Po = {
|
|
|
2583
2589
|
type: Object,
|
|
2584
2590
|
required: !1,
|
|
2585
2591
|
default: () => null
|
|
2592
|
+
},
|
|
2593
|
+
fetcherUrl: {
|
|
2594
|
+
type: String,
|
|
2595
|
+
required: !0
|
|
2586
2596
|
}
|
|
2587
2597
|
},
|
|
2588
2598
|
setup(e) {
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2599
|
+
Zt((s) => ({
|
|
2600
|
+
"7b486894": `${l.value}ch`
|
|
2601
|
+
}));
|
|
2602
|
+
const n = e, t = We(), { i18n: { t: a } } = re.useI18n(), i = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), r = E(""), o = E(""), l = T(() => {
|
|
2603
|
+
var s;
|
|
2604
|
+
if (!n.fetcherUrl)
|
|
2605
|
+
return 0;
|
|
2606
|
+
const c = (s = n.fetcherUrl) == null ? void 0 : s.split("/");
|
|
2607
|
+
return c.length < 2 ? 0 : 41 + c[c.length - 2].length;
|
|
2608
|
+
});
|
|
2609
|
+
return we(() => n.format, (s) => {
|
|
2610
|
+
if (s !== "structured") {
|
|
2611
|
+
const c = JSON.parse(JSON.stringify(n.record));
|
|
2612
|
+
delete c.created_at, delete c.updated_at, s === "json" ? r.value = JSON.stringify(c, null, 2) : s === "yaml" && (o.value = Uo.dump(c));
|
|
2594
2613
|
}
|
|
2595
|
-
}, { immediate: !0 }), (
|
|
2596
|
-
const u = N("KCodeBlock");
|
|
2597
|
-
return
|
|
2598
|
-
e.format === "structured" ? (
|
|
2599
|
-
(
|
|
2600
|
-
key: `config-card-details-${
|
|
2601
|
-
class:
|
|
2602
|
-
"data-testid": `config-card-details-${
|
|
2614
|
+
}, { immediate: !0 }), (s, c) => {
|
|
2615
|
+
const d = N("KBadge"), u = N("KCodeBlock");
|
|
2616
|
+
return g(), _(fe, null, [
|
|
2617
|
+
e.format === "structured" ? (g(), _("div", Do, [
|
|
2618
|
+
(g(!0), _(fe, null, de(e.propListTypes, (y) => (g(), _("div", {
|
|
2619
|
+
key: `config-card-details-${y}-props`,
|
|
2620
|
+
class: ke(`config-card-details-${y}-props`),
|
|
2621
|
+
"data-testid": `config-card-details-${y}-props`
|
|
2603
2622
|
}, [
|
|
2604
|
-
|
|
2605
|
-
(
|
|
2606
|
-
key:
|
|
2607
|
-
item:
|
|
2608
|
-
},
|
|
2623
|
+
y !== "basic" ? (g(), _("div", Po, F(y === "advanced" ? k(a)("baseConfigCard.sections.advanced") : k(a)("baseConfigCard.sections.plugin")), 1)) : V("", !0),
|
|
2624
|
+
(g(!0), _(fe, null, de(e.propertyCollections[y], (p) => (g(), q(gt, {
|
|
2625
|
+
key: p.key,
|
|
2626
|
+
item: p
|
|
2627
|
+
}, Ie({
|
|
2609
2628
|
label: v(() => [
|
|
2610
|
-
|
|
2629
|
+
z(s.$slots, `${p.key}-label`, { row: p }, void 0, !0)
|
|
2611
2630
|
]),
|
|
2612
|
-
[
|
|
2613
|
-
|
|
2614
|
-
row:
|
|
2615
|
-
rowValue:
|
|
2631
|
+
[p.key]: v(({ rowValue: C }) => [
|
|
2632
|
+
z(s.$slots, p.key, {
|
|
2633
|
+
row: p,
|
|
2634
|
+
rowValue: C
|
|
2616
2635
|
}, void 0, !0)
|
|
2617
2636
|
]),
|
|
2618
2637
|
_: 2
|
|
2619
2638
|
}, [
|
|
2620
|
-
i(
|
|
2639
|
+
i(p) ? {
|
|
2621
2640
|
name: "label-tooltip",
|
|
2622
2641
|
fn: v(() => [
|
|
2623
|
-
|
|
2642
|
+
z(s.$slots, `${p.key}-label-tooltip`, { row: p }, void 0, !0)
|
|
2624
2643
|
]),
|
|
2625
2644
|
key: "0"
|
|
2626
2645
|
} : void 0
|
|
2627
2646
|
]), 1032, ["item"]))), 128))
|
|
2628
|
-
], 10,
|
|
2647
|
+
], 10, Ro))), 128))
|
|
2629
2648
|
])) : V("", !0),
|
|
2630
|
-
e.format === "json" ? (
|
|
2631
|
-
|
|
2649
|
+
e.format === "json" ? (g(), _("div", Vo, [
|
|
2650
|
+
n.fetcherUrl ? (g(), _("div", zo, [
|
|
2651
|
+
O(d, { appearance: "get" }, {
|
|
2652
|
+
default: v(() => [
|
|
2653
|
+
H(F(k(a)("baseConfigCard.endpoints.get")), 1)
|
|
2654
|
+
]),
|
|
2655
|
+
_: 1
|
|
2656
|
+
}),
|
|
2657
|
+
O(u, {
|
|
2658
|
+
id: "config-card-endpoint-codeblock",
|
|
2659
|
+
code: n.fetcherUrl,
|
|
2660
|
+
"is-single-line": "",
|
|
2661
|
+
language: "json",
|
|
2662
|
+
theme: "dark"
|
|
2663
|
+
}, null, 8, ["code"])
|
|
2664
|
+
])) : V("", !0),
|
|
2665
|
+
O(u, {
|
|
2632
2666
|
id: "config-card-codeblock",
|
|
2667
|
+
class: ke({ "config-card-display-json-content": n.fetcherUrl }),
|
|
2633
2668
|
code: r.value,
|
|
2634
2669
|
language: "json",
|
|
2635
2670
|
theme: "dark"
|
|
2636
|
-
}, null, 8, ["code"])
|
|
2671
|
+
}, null, 8, ["class", "code"])
|
|
2637
2672
|
])) : V("", !0),
|
|
2638
|
-
e.format === "yaml" ? (
|
|
2639
|
-
|
|
2673
|
+
e.format === "yaml" ? (g(), _("div", Ho, [
|
|
2674
|
+
O(u, {
|
|
2640
2675
|
id: "config-card-codeblock",
|
|
2641
2676
|
code: o.value,
|
|
2642
2677
|
language: "yaml",
|
|
@@ -2646,18 +2681,18 @@ const Po = {
|
|
|
2646
2681
|
], 64);
|
|
2647
2682
|
};
|
|
2648
2683
|
}
|
|
2649
|
-
}),
|
|
2684
|
+
}), Yo = /* @__PURE__ */ ye(Jo, [["__scopeId", "data-v-27f85338"]]), Yt = "24px", Wo = (e, n) => {
|
|
2650
2685
|
const t = e.__vccOpts || e;
|
|
2651
2686
|
for (const [a, i] of n)
|
|
2652
2687
|
t[a] = i;
|
|
2653
2688
|
return t;
|
|
2654
|
-
},
|
|
2689
|
+
}, Zo = (e) => (Qt("data-v-a53b73fd"), e = e(), Xt(), e), Go = ["aria-hidden"], Qo = {
|
|
2655
2690
|
key: 0,
|
|
2656
2691
|
"data-testid": "kui-icon-svg-title"
|
|
2657
|
-
},
|
|
2692
|
+
}, Xo = /* @__PURE__ */ Zo(() => /* @__PURE__ */ B("path", {
|
|
2658
2693
|
d: "M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",
|
|
2659
2694
|
fill: "currentColor"
|
|
2660
|
-
}, null, -1)),
|
|
2695
|
+
}, null, -1)), el = /* @__PURE__ */ ne({
|
|
2661
2696
|
__name: "BookIcon",
|
|
2662
2697
|
props: {
|
|
2663
2698
|
/** The accessibility text provided to screen readers */
|
|
@@ -2726,14 +2761,14 @@ const Po = {
|
|
|
2726
2761
|
lineHeight: "0",
|
|
2727
2762
|
width: t.value
|
|
2728
2763
|
}));
|
|
2729
|
-
return (i, r) => (
|
|
2764
|
+
return (i, r) => (g(), q(Oe(e.as), {
|
|
2730
2765
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2731
2766
|
class: "kui-icon book-icon",
|
|
2732
2767
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2733
|
-
style:
|
|
2768
|
+
style: Gt(a.value)
|
|
2734
2769
|
}, {
|
|
2735
2770
|
default: v(() => [
|
|
2736
|
-
(
|
|
2771
|
+
(g(), _("svg", {
|
|
2737
2772
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2738
2773
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2739
2774
|
fill: "none",
|
|
@@ -2743,23 +2778,23 @@ const Po = {
|
|
|
2743
2778
|
width: "100%",
|
|
2744
2779
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2745
2780
|
}, [
|
|
2746
|
-
e.title ? (
|
|
2747
|
-
|
|
2748
|
-
], 8,
|
|
2781
|
+
e.title ? (g(), _("title", Qo, F(e.title), 1)) : V("", !0),
|
|
2782
|
+
Xo
|
|
2783
|
+
], 8, Go))
|
|
2749
2784
|
]),
|
|
2750
2785
|
_: 1
|
|
2751
2786
|
}, 8, ["aria-hidden", "style"]));
|
|
2752
2787
|
}
|
|
2753
|
-
}),
|
|
2788
|
+
}), tl = /* @__PURE__ */ Wo(el, [["__scopeId", "data-v-a53b73fd"]]), nl = { "data-testid": "config-card-title" }, al = { class: "config-card-actions" }, il = ["href"], rl = {
|
|
2754
2789
|
key: 2,
|
|
2755
2790
|
class: "config-card-details-section"
|
|
2756
|
-
},
|
|
2791
|
+
}, ol = {
|
|
2757
2792
|
key: 3,
|
|
2758
2793
|
class: "config-card-details-section"
|
|
2759
|
-
},
|
|
2794
|
+
}, ll = ["data-testid"], sl = {
|
|
2760
2795
|
key: 0,
|
|
2761
2796
|
class: "config-card-prop-section-title"
|
|
2762
|
-
},
|
|
2797
|
+
}, cl = /* @__PURE__ */ ne({
|
|
2763
2798
|
__name: "EntityBaseConfigCard",
|
|
2764
2799
|
props: {
|
|
2765
2800
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2834,7 +2869,7 @@ const Po = {
|
|
|
2834
2869
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
2835
2870
|
setup(e, { emit: n }) {
|
|
2836
2871
|
var t;
|
|
2837
|
-
const a = n, i = e, r = We(), { i18n: { t: o } } = re.useI18n(), { getMessageFromError: l } = re.useErrors(), { convertKeyToTitle: s } = re.useStringHelpers(), { axiosInstance:
|
|
2872
|
+
const a = n, i = e, r = We(), { i18n: { t: o } } = re.useI18n(), { getMessageFromError: l } = re.useErrors(), { convertKeyToTitle: s } = re.useStringHelpers(), { axiosInstance: c } = re.useAxios({
|
|
2838
2873
|
headers: (t = i.config) == null ? void 0 : t.requestHeaders
|
|
2839
2874
|
}), d = [
|
|
2840
2875
|
{
|
|
@@ -2850,9 +2885,9 @@ const Po = {
|
|
|
2850
2885
|
label: "YAML",
|
|
2851
2886
|
value: "yaml"
|
|
2852
2887
|
}
|
|
2853
|
-
],
|
|
2854
|
-
|
|
2855
|
-
},
|
|
2888
|
+
], u = E("structured"), y = (b) => {
|
|
2889
|
+
u.value = b == null ? void 0 : b.value;
|
|
2890
|
+
}, p = {
|
|
2856
2891
|
id: {
|
|
2857
2892
|
type: W.ID,
|
|
2858
2893
|
label: o("baseConfigCard.commonFields.id_label"),
|
|
@@ -2886,21 +2921,21 @@ const Po = {
|
|
|
2886
2921
|
// the last property displayed
|
|
2887
2922
|
section: pe.Basic
|
|
2888
2923
|
}
|
|
2889
|
-
}, C = E(!1), h = E(!1),
|
|
2890
|
-
var b,
|
|
2891
|
-
if (!
|
|
2924
|
+
}, C = E(!1), h = E(!1), I = E(""), m = E(), f = T(() => {
|
|
2925
|
+
var b, U, j;
|
|
2926
|
+
if (!m.value)
|
|
2892
2927
|
return [];
|
|
2893
|
-
const
|
|
2894
|
-
for (const
|
|
2895
|
-
const Y = (
|
|
2896
|
-
let ie =
|
|
2897
|
-
(Z || Z === 0) && (ie = Z === -1 ?
|
|
2928
|
+
const K = [], D = Object.keys(m.value).length;
|
|
2929
|
+
for (const R in m.value) {
|
|
2930
|
+
const Y = (U = (b = i.configSchema) == null ? void 0 : b[R]) == null ? void 0 : U.order, Z = (j = p[R]) == null ? void 0 : j.order;
|
|
2931
|
+
let ie = D;
|
|
2932
|
+
(Z || Z === 0) && (ie = Z === -1 ? D + 1 : Z), Y && (ie = Y === -1 ? D + 1 : Y), K.push([R, ie]);
|
|
2898
2933
|
}
|
|
2899
|
-
return
|
|
2900
|
-
return
|
|
2901
|
-
}),
|
|
2934
|
+
return K.sort(function(R, Y) {
|
|
2935
|
+
return R[1] - Y[1];
|
|
2936
|
+
}), K.map((R) => {
|
|
2902
2937
|
var Y, Z;
|
|
2903
|
-
const ie =
|
|
2938
|
+
const ie = R[0], X = (Y = m.value) == null ? void 0 : Y[ie], G = ((Z = i.configSchema) == null ? void 0 : Z[ie]) || {}, le = p[ie];
|
|
2904
2939
|
return {
|
|
2905
2940
|
key: ie,
|
|
2906
2941
|
value: X,
|
|
@@ -2910,22 +2945,22 @@ const Po = {
|
|
|
2910
2945
|
tooltip: G.tooltip ?? ((le == null ? void 0 : le.tooltip) || void 0),
|
|
2911
2946
|
section: G.section ?? ((le == null ? void 0 : le.section) || pe.Advanced)
|
|
2912
2947
|
};
|
|
2913
|
-
}).filter((
|
|
2948
|
+
}).filter((R) => !R.hidden && R.key !== i.pluginConfigKey);
|
|
2914
2949
|
}), S = T(() => {
|
|
2915
|
-
var b,
|
|
2916
|
-
if (!
|
|
2950
|
+
var b, U;
|
|
2951
|
+
if (!m.value || !i.pluginConfigKey)
|
|
2917
2952
|
return [];
|
|
2918
|
-
const j =
|
|
2919
|
-
for (const
|
|
2920
|
-
const Y = (
|
|
2921
|
-
let ie = Z != null && Z !== "" ?
|
|
2922
|
-
Y && (ie = Y === -1 ?
|
|
2953
|
+
const j = m.value[i.pluginConfigKey] || {}, K = Object.keys(j).length, D = [];
|
|
2954
|
+
for (const R in j) {
|
|
2955
|
+
const Y = (U = (b = i.pluginConfigSchema) == null ? void 0 : b[R]) == null ? void 0 : U.order, Z = j[R];
|
|
2956
|
+
let ie = Z != null && Z !== "" ? K - 1 : K;
|
|
2957
|
+
Y && (ie = Y === -1 ? K + 1 : Y), D.push([R, ie]);
|
|
2923
2958
|
}
|
|
2924
|
-
return
|
|
2925
|
-
return
|
|
2926
|
-
}),
|
|
2959
|
+
return D.sort(function(R, Y) {
|
|
2960
|
+
return R[1] - Y[1];
|
|
2961
|
+
}), D.map((R) => {
|
|
2927
2962
|
var Y;
|
|
2928
|
-
const Z =
|
|
2963
|
+
const Z = R[0], ie = j[Z], X = ((Y = i.pluginConfigSchema) == null ? void 0 : Y[Z]) || {};
|
|
2929
2964
|
return {
|
|
2930
2965
|
key: Z,
|
|
2931
2966
|
value: ie,
|
|
@@ -2935,96 +2970,96 @@ const Po = {
|
|
|
2935
2970
|
tooltip: X.tooltip ?? void 0,
|
|
2936
2971
|
section: pe.Plugin
|
|
2937
2972
|
};
|
|
2938
|
-
}).filter((
|
|
2973
|
+
}).filter((R) => !R.hidden);
|
|
2939
2974
|
}), w = T(() => {
|
|
2940
|
-
var b,
|
|
2975
|
+
var b, U, j, K;
|
|
2941
2976
|
return {
|
|
2942
|
-
basic: (b =
|
|
2943
|
-
advanced: (
|
|
2944
|
-
plugin: (
|
|
2977
|
+
basic: (b = f.value) == null ? void 0 : b.filter((D) => D.section === pe.Basic),
|
|
2978
|
+
advanced: (U = f.value) == null ? void 0 : U.filter((D) => D.section === pe.Advanced),
|
|
2979
|
+
plugin: (K = S.value) == null ? void 0 : K.concat((j = f.value) == null ? void 0 : j.filter((D) => D.section === pe.Plugin))
|
|
2945
2980
|
};
|
|
2946
2981
|
}), x = T(() => {
|
|
2947
2982
|
const b = [];
|
|
2948
2983
|
return w.value.basic.length && b.push("basic"), w.value.advanced.length && b.push("advanced"), w.value.plugin.length && b.push("plugin"), b;
|
|
2949
2984
|
}), L = (b) => !!(b.tooltip || r[`${b.key}-label-tooltip`]), J = T(() => {
|
|
2950
|
-
var b,
|
|
2985
|
+
var b, U;
|
|
2951
2986
|
let j = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
2952
|
-
return i.config.app === "konnect" ? j = j.replace(/{controlPlaneId}/gi, ((b = i.config) == null ? void 0 : b.controlPlaneId) || "") : i.config.app === "kongManager" && (j = j.replace(/\/{workspace}/gi, (
|
|
2987
|
+
return i.config.app === "konnect" ? j = j.replace(/{controlPlaneId}/gi, ((b = i.config) == null ? void 0 : b.controlPlaneId) || "") : i.config.app === "kongManager" && (j = j.replace(/\/{workspace}/gi, (U = i.config) != null && U.workspace ? `/${i.config.workspace}` : "")), j = j.replace(/{id}/gi, i.config.entityId), j;
|
|
2953
2988
|
}), M = (b) => {
|
|
2954
|
-
|
|
2989
|
+
m.value && b(JSON.stringify(m.value)) ? a("copy:success", m.value) : a("copy:error");
|
|
2955
2990
|
};
|
|
2956
|
-
return
|
|
2991
|
+
return we(C, (b) => {
|
|
2957
2992
|
a("loading", b);
|
|
2958
2993
|
}, { immediate: !0 }), ct(async () => {
|
|
2959
2994
|
h.value = !1, C.value = !0;
|
|
2960
2995
|
try {
|
|
2961
|
-
const { data: b } = await
|
|
2996
|
+
const { data: b } = await c.get(J.value);
|
|
2962
2997
|
if (i.dataKey)
|
|
2963
2998
|
if (typeof b[i.dataKey] < "u")
|
|
2964
|
-
|
|
2999
|
+
m.value = { ...b[i.dataKey] };
|
|
2965
3000
|
else
|
|
2966
3001
|
throw new Error(o("errors.dataKeyUndefined", { dataKey: i.dataKey }));
|
|
2967
3002
|
else
|
|
2968
|
-
|
|
2969
|
-
Object.keys(i.configSchema).filter((
|
|
2970
|
-
|
|
3003
|
+
m.value = { ...b };
|
|
3004
|
+
Object.keys(i.configSchema).filter((U) => i.configSchema[U].forceShow).forEach((U) => {
|
|
3005
|
+
m.value && typeof m.value[U] > "u" && (m.value[U] = null);
|
|
2971
3006
|
}), a("fetch:success", b);
|
|
2972
3007
|
} catch (b) {
|
|
2973
|
-
const
|
|
2974
|
-
|
|
3008
|
+
const U = l(b);
|
|
3009
|
+
I.value = U.startsWith("code") ? o("baseConfigCard.errors.load") : U, h.value = !0, a("fetch:error", b);
|
|
2975
3010
|
} finally {
|
|
2976
3011
|
C.value = !1;
|
|
2977
3012
|
}
|
|
2978
|
-
}), (b,
|
|
2979
|
-
const j = N("KLabel"),
|
|
2980
|
-
return
|
|
3013
|
+
}), (b, U) => {
|
|
3014
|
+
const j = N("KLabel"), K = N("KSelect"), D = N("KButton"), R = N("KClipboardProvider"), Y = N("KSkeleton"), Z = N("KEmptyState"), ie = N("KCard");
|
|
3015
|
+
return g(), q(ie, { class: "kong-ui-entity-base-config-card" }, Ie({
|
|
2981
3016
|
actions: v(() => [
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
e.config.jsonYamlEnabled ? (
|
|
3017
|
+
B("div", al, [
|
|
3018
|
+
z(b.$slots, "actions", {}, void 0, !0),
|
|
3019
|
+
e.config.jsonYamlEnabled ? (g(), q(j, {
|
|
2985
3020
|
key: 0,
|
|
2986
3021
|
class: "config-format-select-label",
|
|
2987
3022
|
"data-testid": "config-format-select-label"
|
|
2988
3023
|
}, {
|
|
2989
3024
|
default: v(() => [
|
|
2990
|
-
|
|
3025
|
+
H(F(e.label), 1)
|
|
2991
3026
|
]),
|
|
2992
3027
|
_: 1
|
|
2993
3028
|
})) : V("", !0),
|
|
2994
|
-
e.config.jsonYamlEnabled ? (
|
|
3029
|
+
e.config.jsonYamlEnabled ? (g(), q(K, {
|
|
2995
3030
|
key: 1,
|
|
2996
3031
|
appearance: "select",
|
|
2997
3032
|
"data-testid": "select-config-format",
|
|
2998
3033
|
items: d,
|
|
2999
|
-
onChange:
|
|
3034
|
+
onChange: y
|
|
3000
3035
|
})) : V("", !0),
|
|
3001
|
-
i.config.jsonYamlEnabled && e.configCardDoc ? (
|
|
3036
|
+
i.config.jsonYamlEnabled && e.configCardDoc ? (g(), q(D, {
|
|
3002
3037
|
key: 2,
|
|
3003
3038
|
appearance: "tertiary",
|
|
3004
3039
|
class: "book-icon",
|
|
3005
3040
|
"data-testid": "book-icon"
|
|
3006
3041
|
}, {
|
|
3007
3042
|
default: v(() => [
|
|
3008
|
-
|
|
3043
|
+
B("a", {
|
|
3009
3044
|
href: e.configCardDoc,
|
|
3010
3045
|
rel: "noopener",
|
|
3011
3046
|
target: "_blank"
|
|
3012
3047
|
}, [
|
|
3013
|
-
|
|
3014
|
-
], 8,
|
|
3048
|
+
O(k(tl), { size: k(li) }, null, 8, ["size"])
|
|
3049
|
+
], 8, il)
|
|
3015
3050
|
]),
|
|
3016
3051
|
_: 1
|
|
3017
3052
|
})) : V("", !0),
|
|
3018
|
-
e.config.jsonYamlEnabled ? V("", !0) : (
|
|
3053
|
+
e.config.jsonYamlEnabled ? V("", !0) : (g(), q(R, { key: 3 }, {
|
|
3019
3054
|
default: v(({ copyToClipboard: X }) => [
|
|
3020
|
-
!C.value && !h.value ? (
|
|
3055
|
+
!C.value && !h.value ? (g(), q(D, {
|
|
3021
3056
|
key: 0,
|
|
3022
3057
|
appearance: "tertiary",
|
|
3023
3058
|
"data-testid": "json-copy-button",
|
|
3024
3059
|
onClick: (G) => M(X)
|
|
3025
3060
|
}, {
|
|
3026
3061
|
default: v(() => [
|
|
3027
|
-
|
|
3062
|
+
H(F(k(o)("baseConfigCard.actions.copy")), 1)
|
|
3028
3063
|
]),
|
|
3029
3064
|
_: 2
|
|
3030
3065
|
}, 1032, ["onClick"])) : V("", !0)
|
|
@@ -3034,54 +3069,55 @@ const Po = {
|
|
|
3034
3069
|
])
|
|
3035
3070
|
]),
|
|
3036
3071
|
default: v(() => [
|
|
3037
|
-
C.value ? (
|
|
3072
|
+
C.value ? (g(), q(Y, {
|
|
3038
3073
|
key: 0,
|
|
3039
3074
|
"data-testid": "config-card-loader",
|
|
3040
3075
|
"table-columns": 2,
|
|
3041
3076
|
type: "table"
|
|
3042
|
-
})) : h.value ? (
|
|
3077
|
+
})) : h.value ? (g(), q(Z, {
|
|
3043
3078
|
key: 1,
|
|
3044
3079
|
"data-testid": "config-card-fetch-error",
|
|
3045
3080
|
"is-error": ""
|
|
3046
3081
|
}, {
|
|
3047
3082
|
message: v(() => [
|
|
3048
|
-
|
|
3083
|
+
B("h3", null, F(I.value), 1)
|
|
3049
3084
|
]),
|
|
3050
3085
|
_: 1
|
|
3051
3086
|
})) : V("", !0),
|
|
3052
|
-
e.config.jsonYamlEnabled ? (
|
|
3053
|
-
|
|
3054
|
-
|
|
3087
|
+
e.config.jsonYamlEnabled ? (g(), _("div", rl, [
|
|
3088
|
+
O(Yo, {
|
|
3089
|
+
"fetcher-url": J.value,
|
|
3090
|
+
format: u.value,
|
|
3055
3091
|
"prop-list-types": x.value,
|
|
3056
3092
|
"property-collections": w.value,
|
|
3057
|
-
record:
|
|
3058
|
-
},
|
|
3093
|
+
record: m.value
|
|
3094
|
+
}, Ie({ _: 2 }, [
|
|
3059
3095
|
de(Object.keys(b.$slots), (X) => ({
|
|
3060
3096
|
name: X,
|
|
3061
3097
|
fn: v(({ row: G, rowValue: le }) => [
|
|
3062
|
-
|
|
3098
|
+
z(b.$slots, X, {
|
|
3063
3099
|
row: G,
|
|
3064
3100
|
rowValue: le
|
|
3065
3101
|
}, void 0, !0)
|
|
3066
3102
|
])
|
|
3067
3103
|
}))
|
|
3068
|
-
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
3069
|
-
])) : (
|
|
3070
|
-
(
|
|
3104
|
+
]), 1032, ["fetcher-url", "format", "prop-list-types", "property-collections", "record"])
|
|
3105
|
+
])) : (g(), _("div", ol, [
|
|
3106
|
+
(g(!0), _(fe, null, de(x.value, (X) => (g(), _("div", {
|
|
3071
3107
|
key: `config-card-details-${X}-props`,
|
|
3072
|
-
class:
|
|
3108
|
+
class: ke(`config-card-details-${X}-props`),
|
|
3073
3109
|
"data-testid": `config-card-details-${X}-props`
|
|
3074
3110
|
}, [
|
|
3075
|
-
X !== "basic" ? (
|
|
3076
|
-
(
|
|
3111
|
+
X !== "basic" ? (g(), _("div", sl, F(X === "advanced" ? k(o)("baseConfigCard.sections.advanced") : k(o)("baseConfigCard.sections.plugin")), 1)) : V("", !0),
|
|
3112
|
+
(g(!0), _(fe, null, de(w.value[X], (G) => (g(), q(gt, {
|
|
3077
3113
|
key: G.key,
|
|
3078
3114
|
item: G
|
|
3079
|
-
},
|
|
3115
|
+
}, Ie({
|
|
3080
3116
|
label: v(() => [
|
|
3081
|
-
|
|
3117
|
+
z(b.$slots, `${G.key}-label`, { row: G }, void 0, !0)
|
|
3082
3118
|
]),
|
|
3083
3119
|
[G.key]: v(({ rowValue: le }) => [
|
|
3084
|
-
|
|
3120
|
+
z(b.$slots, G.key, {
|
|
3085
3121
|
row: G,
|
|
3086
3122
|
rowValue: le
|
|
3087
3123
|
}, void 0, !0)
|
|
@@ -3091,12 +3127,12 @@ const Po = {
|
|
|
3091
3127
|
L(G) ? {
|
|
3092
3128
|
name: "label-tooltip",
|
|
3093
3129
|
fn: v(() => [
|
|
3094
|
-
|
|
3130
|
+
z(b.$slots, `${G.key}-label-tooltip`, { row: G }, void 0, !0)
|
|
3095
3131
|
]),
|
|
3096
3132
|
key: "0"
|
|
3097
3133
|
} : void 0
|
|
3098
3134
|
]), 1032, ["item"]))), 128))
|
|
3099
|
-
], 10,
|
|
3135
|
+
], 10, ll))), 128))
|
|
3100
3136
|
]))
|
|
3101
3137
|
]),
|
|
3102
3138
|
_: 2
|
|
@@ -3104,9 +3140,9 @@ const Po = {
|
|
|
3104
3140
|
e.hideTitle ? void 0 : {
|
|
3105
3141
|
name: "title",
|
|
3106
3142
|
fn: v(() => [
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3143
|
+
B("div", nl, [
|
|
3144
|
+
z(b.$slots, "title", {}, () => [
|
|
3145
|
+
H(F(k(o)("baseConfigCard.title")), 1)
|
|
3110
3146
|
], !0)
|
|
3111
3147
|
])
|
|
3112
3148
|
]),
|
|
@@ -3115,10 +3151,10 @@ const Po = {
|
|
|
3115
3151
|
]), 1024);
|
|
3116
3152
|
};
|
|
3117
3153
|
}
|
|
3118
|
-
}),
|
|
3154
|
+
}), ul = /* @__PURE__ */ ye(cl, [["__scopeId", "data-v-4f47d6ad"]]), dl = {
|
|
3119
3155
|
class: "form-actions",
|
|
3120
3156
|
"data-testid": "form-actions"
|
|
3121
|
-
},
|
|
3157
|
+
}, pl = /* @__PURE__ */ ne({
|
|
3122
3158
|
__name: "EntityBaseForm",
|
|
3123
3159
|
props: {
|
|
3124
3160
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3170,41 +3206,41 @@ const Po = {
|
|
|
3170
3206
|
var t;
|
|
3171
3207
|
const a = n, i = e, r = ut(), { i18n: { t: o } } = re.useI18n(), { getMessageFromError: l } = re.useErrors(), { axiosInstance: s } = re.useAxios({
|
|
3172
3208
|
headers: (t = i.config) == null ? void 0 : t.requestHeaders
|
|
3173
|
-
}),
|
|
3174
|
-
var
|
|
3209
|
+
}), c = E(!1), d = E(!1), u = E(""), y = T(() => i.canSubmit === !1 || i.isReadonly), p = T(() => {
|
|
3210
|
+
var m, f;
|
|
3175
3211
|
if (!i.editId)
|
|
3176
3212
|
return "";
|
|
3177
3213
|
let S = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3178
|
-
return i.config.app === "konnect" ? S = S.replace(/{controlPlaneId}/gi, ((
|
|
3214
|
+
return i.config.app === "konnect" ? S = S.replace(/{controlPlaneId}/gi, ((m = i.config) == null ? void 0 : m.controlPlaneId) || "") : i.config.app === "kongManager" && (S = S.replace(/\/{workspace}/gi, (f = i.config) != null && f.workspace ? `/${i.config.workspace}` : "")), S = S.replace(/{id}/gi, i.editId), S;
|
|
3179
3215
|
}), C = () => {
|
|
3180
3216
|
i.config.cancelRoute ? r.push(i.config.cancelRoute) : h();
|
|
3181
3217
|
}, h = () => {
|
|
3182
3218
|
a("cancel");
|
|
3183
|
-
},
|
|
3184
|
-
|
|
3219
|
+
}, I = () => {
|
|
3220
|
+
y.value || a("submit");
|
|
3185
3221
|
};
|
|
3186
|
-
return
|
|
3187
|
-
a("loading",
|
|
3222
|
+
return we(() => c.value, (m) => {
|
|
3223
|
+
a("loading", m);
|
|
3188
3224
|
}, { immediate: !0 }), ct(async () => {
|
|
3189
3225
|
if (i.editId)
|
|
3190
3226
|
try {
|
|
3191
|
-
d.value = !1,
|
|
3192
|
-
const { data:
|
|
3193
|
-
a("fetch:success",
|
|
3194
|
-
} catch (
|
|
3195
|
-
const
|
|
3196
|
-
|
|
3227
|
+
d.value = !1, c.value = !0;
|
|
3228
|
+
const { data: m } = await s.get(p.value);
|
|
3229
|
+
a("fetch:success", m);
|
|
3230
|
+
} catch (m) {
|
|
3231
|
+
const f = l(m);
|
|
3232
|
+
u.value = f.startsWith("code") ? o("baseForm.errors.edit") : f, d.value = !0, a("fetch:error", m);
|
|
3197
3233
|
} finally {
|
|
3198
|
-
|
|
3234
|
+
c.value = !1;
|
|
3199
3235
|
}
|
|
3200
|
-
}), (
|
|
3236
|
+
}), (m, f) => {
|
|
3201
3237
|
const S = N("KSkeleton"), w = N("KEmptyState"), x = N("KAlert"), L = N("KButton"), J = N("KCard");
|
|
3202
|
-
return
|
|
3238
|
+
return g(), q(J, { class: "kong-ui-entity-base-form" }, {
|
|
3203
3239
|
default: v(() => [
|
|
3204
|
-
|
|
3240
|
+
c.value ? (g(), q(S, {
|
|
3205
3241
|
key: 0,
|
|
3206
3242
|
type: "form"
|
|
3207
|
-
})) : d.value ? (
|
|
3243
|
+
})) : d.value ? (g(), q(w, {
|
|
3208
3244
|
key: 1,
|
|
3209
3245
|
"cta-text": k(o)("baseForm.actions.back"),
|
|
3210
3246
|
"data-testid": "form-fetch-error",
|
|
@@ -3212,43 +3248,43 @@ const Po = {
|
|
|
3212
3248
|
"is-error": !0
|
|
3213
3249
|
}, {
|
|
3214
3250
|
message: v(() => [
|
|
3215
|
-
|
|
3251
|
+
B("h3", null, F(u.value), 1)
|
|
3216
3252
|
]),
|
|
3217
3253
|
_: 1
|
|
3218
|
-
}, 8, ["cta-text"])) : (
|
|
3254
|
+
}, 8, ["cta-text"])) : (g(), _("form", {
|
|
3219
3255
|
key: 2,
|
|
3220
3256
|
"data-testid": "form-content",
|
|
3221
|
-
onReset:
|
|
3222
|
-
onSubmit:
|
|
3257
|
+
onReset: Re(h, ["prevent"]),
|
|
3258
|
+
onSubmit: Re(I, ["prevent"])
|
|
3223
3259
|
}, [
|
|
3224
|
-
|
|
3225
|
-
e.errorMessage ? (
|
|
3260
|
+
z(m.$slots, "default", {}, void 0, !0),
|
|
3261
|
+
e.errorMessage ? (g(), q(x, {
|
|
3226
3262
|
key: 0,
|
|
3227
3263
|
"alert-message": e.errorMessage,
|
|
3228
3264
|
appearance: "danger",
|
|
3229
3265
|
"data-testid": "form-error"
|
|
3230
3266
|
}, null, 8, ["alert-message"])) : V("", !0),
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3267
|
+
B("div", dl, [
|
|
3268
|
+
z(m.$slots, "form-actions", {}, () => [
|
|
3269
|
+
O(L, {
|
|
3234
3270
|
appearance: "secondary",
|
|
3235
3271
|
"data-testid": "form-cancel",
|
|
3236
3272
|
disabled: e.isReadonly,
|
|
3237
3273
|
type: "reset"
|
|
3238
3274
|
}, {
|
|
3239
3275
|
default: v(() => [
|
|
3240
|
-
|
|
3276
|
+
H(F(k(o)("baseForm.actions.cancel")), 1)
|
|
3241
3277
|
]),
|
|
3242
3278
|
_: 1
|
|
3243
3279
|
}, 8, ["disabled"]),
|
|
3244
|
-
|
|
3280
|
+
O(L, {
|
|
3245
3281
|
appearance: "primary",
|
|
3246
3282
|
"data-testid": "form-submit",
|
|
3247
|
-
disabled:
|
|
3283
|
+
disabled: y.value,
|
|
3248
3284
|
type: "submit"
|
|
3249
3285
|
}, {
|
|
3250
3286
|
default: v(() => [
|
|
3251
|
-
|
|
3287
|
+
H(F(k(o)("baseForm.actions.save")), 1)
|
|
3252
3288
|
]),
|
|
3253
3289
|
_: 1
|
|
3254
3290
|
}, 8, ["disabled"])
|
|
@@ -3260,10 +3296,10 @@ const Po = {
|
|
|
3260
3296
|
});
|
|
3261
3297
|
};
|
|
3262
3298
|
}
|
|
3263
|
-
}),
|
|
3299
|
+
}), fl = /* @__PURE__ */ ye(pl, [["__scopeId", "data-v-448d8512"]]), yl = {
|
|
3264
3300
|
key: 0,
|
|
3265
3301
|
"data-testid": "first-col"
|
|
3266
|
-
},
|
|
3302
|
+
}, gl = /* @__PURE__ */ ne({
|
|
3267
3303
|
__name: "EntityBaseTableCell",
|
|
3268
3304
|
props: {
|
|
3269
3305
|
keyName: {
|
|
@@ -3283,61 +3319,61 @@ const Po = {
|
|
|
3283
3319
|
var h;
|
|
3284
3320
|
return ((h = t.value) == null ? void 0 : h.querySelector('[data-testid="first-col"]')) || null;
|
|
3285
3321
|
}), i = T(() => {
|
|
3286
|
-
var h,
|
|
3287
|
-
const
|
|
3288
|
-
return
|
|
3322
|
+
var h, I;
|
|
3323
|
+
const m = (h = n.rowEl) == null ? void 0 : h.querySelectorAll("td");
|
|
3324
|
+
return m ? ((I = m[0]) == null ? void 0 : I.getAttribute("data-testid")) === n.keyName : !1;
|
|
3289
3325
|
});
|
|
3290
3326
|
let r;
|
|
3291
3327
|
const o = () => {
|
|
3292
3328
|
r && (r.disconnect(), r = void 0);
|
|
3293
3329
|
}, l = () => {
|
|
3294
|
-
var h,
|
|
3295
|
-
|
|
3296
|
-
}, s = E({}),
|
|
3297
|
-
|
|
3330
|
+
var h, I, m;
|
|
3331
|
+
c.value = ((h = a.value) == null ? void 0 : h.getBoundingClientRect().width) || 0, d.value = ((I = t.value) == null ? void 0 : I.clientWidth) || 0, u.value = ((m = s.value) == null ? void 0 : m.innerText) || "";
|
|
3332
|
+
}, s = E({}), c = E(0), d = E(0), u = E(""), y = T(() => [a.value, t.value]), p = we(
|
|
3333
|
+
y,
|
|
3298
3334
|
(h) => {
|
|
3299
3335
|
if (i.value && (o(), "ResizeObserver" in window && window)) {
|
|
3300
|
-
r = new ResizeObserver((
|
|
3336
|
+
r = new ResizeObserver((I) => {
|
|
3301
3337
|
window.requestAnimationFrame(() => {
|
|
3302
|
-
!Array.isArray(
|
|
3338
|
+
!Array.isArray(I) || !I.length || l();
|
|
3303
3339
|
});
|
|
3304
3340
|
});
|
|
3305
|
-
for (const
|
|
3306
|
-
|
|
3341
|
+
for (const I of h)
|
|
3342
|
+
I && r.observe(I);
|
|
3307
3343
|
}
|
|
3308
3344
|
},
|
|
3309
3345
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3310
|
-
), C = T(() => i.value ?
|
|
3346
|
+
), C = T(() => i.value ? c.value > d.value : !1);
|
|
3311
3347
|
return ta(() => {
|
|
3312
3348
|
l();
|
|
3313
3349
|
}), na(() => {
|
|
3314
|
-
|
|
3315
|
-
}), (h,
|
|
3316
|
-
const
|
|
3317
|
-
return
|
|
3350
|
+
p();
|
|
3351
|
+
}), (h, I) => {
|
|
3352
|
+
const m = N("KTooltip");
|
|
3353
|
+
return g(), _("span", {
|
|
3318
3354
|
ref_key: "contentRef",
|
|
3319
3355
|
ref: s,
|
|
3320
3356
|
class: "content-wrapper"
|
|
3321
3357
|
}, [
|
|
3322
|
-
i.value ? (
|
|
3323
|
-
|
|
3324
|
-
label: C.value ?
|
|
3358
|
+
i.value ? (g(), _("span", yl, [
|
|
3359
|
+
O(m, {
|
|
3360
|
+
label: C.value ? u.value : "",
|
|
3325
3361
|
"max-width": "300",
|
|
3326
3362
|
placement: "bottomStart"
|
|
3327
3363
|
}, {
|
|
3328
3364
|
default: v(() => [
|
|
3329
|
-
|
|
3365
|
+
z(h.$slots, "default", {}, void 0, !0)
|
|
3330
3366
|
]),
|
|
3331
3367
|
_: 3
|
|
3332
3368
|
}, 8, ["label"])
|
|
3333
|
-
])) :
|
|
3369
|
+
])) : z(h.$slots, "default", { key: 1 }, void 0, !0)
|
|
3334
3370
|
], 512);
|
|
3335
3371
|
};
|
|
3336
3372
|
}
|
|
3337
|
-
}),
|
|
3373
|
+
}), ml = /* @__PURE__ */ ye(gl, [["__scopeId", "data-v-e42a20c9"]]), hl = { class: "toolbar-container" }, vl = {
|
|
3338
3374
|
key: 0,
|
|
3339
3375
|
class: "toolbar-button-container"
|
|
3340
|
-
},
|
|
3376
|
+
}, bl = ["data-testid"], kl = /* @__PURE__ */ ne({
|
|
3341
3377
|
__name: "EntityBaseTable",
|
|
3342
3378
|
props: {
|
|
3343
3379
|
// table header configuration
|
|
@@ -3471,14 +3507,14 @@ const Po = {
|
|
|
3471
3507
|
key: "actions",
|
|
3472
3508
|
hideLabel: !0
|
|
3473
3509
|
}), x;
|
|
3474
|
-
}),
|
|
3510
|
+
}), c = (x) => ({
|
|
3475
3511
|
"data-rowid": x.id,
|
|
3476
3512
|
"data-testid": x.name,
|
|
3477
3513
|
...t.rowAttributes(x)
|
|
3478
|
-
}), d = E({}),
|
|
3514
|
+
}), d = E({}), u = (x) => {
|
|
3479
3515
|
var L;
|
|
3480
3516
|
return (L = d.value) == null ? void 0 : L.$el.querySelector(`[data-rowid="${x.id}"]`);
|
|
3481
|
-
},
|
|
3517
|
+
}, y = (x) => {
|
|
3482
3518
|
const L = {
|
|
3483
3519
|
"data-testid": x.headerKey,
|
|
3484
3520
|
...t.cellAttributes(x)
|
|
@@ -3488,35 +3524,35 @@ const Po = {
|
|
|
3488
3524
|
overflowX: "hidden",
|
|
3489
3525
|
textOverflow: "ellipsis"
|
|
3490
3526
|
}), L;
|
|
3491
|
-
},
|
|
3527
|
+
}, p = () => {
|
|
3492
3528
|
a("empty-state-cta-clicked"), C();
|
|
3493
3529
|
}, C = () => {
|
|
3494
3530
|
a("clear-search-input");
|
|
3495
3531
|
}, h = T(() => t.disableRowClick ? void 0 : (x, L) => {
|
|
3496
3532
|
a("click:row", L);
|
|
3497
|
-
}),
|
|
3533
|
+
}), I = (x) => {
|
|
3498
3534
|
a("sort", x);
|
|
3499
|
-
}, { setTablePreferences:
|
|
3500
|
-
const x =
|
|
3535
|
+
}, { setTablePreferences: m, getTablePreferences: f } = pa(), S = T(() => {
|
|
3536
|
+
const x = f(t.preferencesStorageKey);
|
|
3501
3537
|
return {
|
|
3502
3538
|
...t.initialFetcherParams,
|
|
3503
3539
|
...x
|
|
3504
3540
|
};
|
|
3505
3541
|
}), w = (x) => {
|
|
3506
|
-
t.preferencesStorageKey &&
|
|
3542
|
+
t.preferencesStorageKey && m(t.preferencesStorageKey, x);
|
|
3507
3543
|
};
|
|
3508
3544
|
return (x, L) => {
|
|
3509
|
-
const J = N("KIcon"), M = N("KButton"), b = N("KDropdown"),
|
|
3510
|
-
return
|
|
3545
|
+
const J = N("KIcon"), M = N("KButton"), b = N("KDropdown"), U = N("KTable"), j = N("KCard");
|
|
3546
|
+
return g(), q(j, {
|
|
3511
3547
|
class: "kong-ui-entity-base-table",
|
|
3512
3548
|
title: e.title
|
|
3513
3549
|
}, {
|
|
3514
3550
|
default: v(() => [
|
|
3515
|
-
|
|
3551
|
+
O(U, {
|
|
3516
3552
|
ref_key: "tableRefs",
|
|
3517
3553
|
ref: d,
|
|
3518
3554
|
"cache-identifier": o.value,
|
|
3519
|
-
"cell-attrs":
|
|
3555
|
+
"cell-attrs": y,
|
|
3520
3556
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3521
3557
|
"disable-sorting": e.disableSorting,
|
|
3522
3558
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
@@ -3537,47 +3573,47 @@ const Po = {
|
|
|
3537
3573
|
"initial-fetcher-params": S.value,
|
|
3538
3574
|
"is-loading": e.isLoading,
|
|
3539
3575
|
"pagination-type": e.paginationType,
|
|
3540
|
-
"row-attrs":
|
|
3576
|
+
"row-attrs": c,
|
|
3541
3577
|
"search-input": e.query,
|
|
3542
|
-
onKtableEmptyStateCtaClicked:
|
|
3578
|
+
onKtableEmptyStateCtaClicked: p,
|
|
3543
3579
|
"onRow:click": h.value,
|
|
3544
|
-
onSort: L[0] || (L[0] = (
|
|
3580
|
+
onSort: L[0] || (L[0] = (K) => I(K)),
|
|
3545
3581
|
"onUpdate:tablePreferences": w
|
|
3546
|
-
},
|
|
3547
|
-
toolbar: v(({ state:
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
x.$slots["toolbar-button"] ? (
|
|
3551
|
-
|
|
3582
|
+
}, Ie({
|
|
3583
|
+
toolbar: v(({ state: K }) => [
|
|
3584
|
+
Fe(B("div", hl, [
|
|
3585
|
+
z(x.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3586
|
+
x.$slots["toolbar-button"] ? (g(), _("div", vl, [
|
|
3587
|
+
z(x.$slots, "toolbar-button", {}, void 0, !0)
|
|
3552
3588
|
])) : V("", !0)
|
|
3553
3589
|
], 512), [
|
|
3554
|
-
[
|
|
3590
|
+
[Ne, l(K)]
|
|
3555
3591
|
])
|
|
3556
3592
|
]),
|
|
3557
|
-
actions: v(({ row:
|
|
3558
|
-
|
|
3593
|
+
actions: v(({ row: K, rowKey: D, rowValue: R }) => [
|
|
3594
|
+
B("div", {
|
|
3559
3595
|
class: "actions-container",
|
|
3560
|
-
"data-testid":
|
|
3596
|
+
"data-testid": K.name
|
|
3561
3597
|
}, [
|
|
3562
|
-
|
|
3598
|
+
O(b, {
|
|
3563
3599
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3564
3600
|
width: e.dropdownMenuWidth
|
|
3565
3601
|
}, {
|
|
3566
3602
|
items: v(() => [
|
|
3567
|
-
|
|
3568
|
-
row:
|
|
3569
|
-
rowKey:
|
|
3570
|
-
rowValue:
|
|
3603
|
+
z(x.$slots, "actions", {
|
|
3604
|
+
row: K,
|
|
3605
|
+
rowKey: D,
|
|
3606
|
+
rowValue: R
|
|
3571
3607
|
}, void 0, !0)
|
|
3572
3608
|
]),
|
|
3573
3609
|
default: v(() => [
|
|
3574
|
-
|
|
3610
|
+
O(M, {
|
|
3575
3611
|
class: "actions-trigger",
|
|
3576
3612
|
"data-testid": "overflow-actions-button",
|
|
3577
3613
|
size: "small"
|
|
3578
3614
|
}, {
|
|
3579
3615
|
icon: v(() => [
|
|
3580
|
-
|
|
3616
|
+
O(J, {
|
|
3581
3617
|
color: k(ri),
|
|
3582
3618
|
icon: "more",
|
|
3583
3619
|
size: "16"
|
|
@@ -3588,24 +3624,24 @@ const Po = {
|
|
|
3588
3624
|
]),
|
|
3589
3625
|
_: 2
|
|
3590
3626
|
}, 1032, ["width"])
|
|
3591
|
-
], 8,
|
|
3627
|
+
], 8, bl)
|
|
3592
3628
|
]),
|
|
3593
3629
|
_: 2
|
|
3594
3630
|
}, [
|
|
3595
|
-
de(e.tableHeaders, (
|
|
3596
|
-
name:
|
|
3597
|
-
fn: v(({ row:
|
|
3598
|
-
|
|
3599
|
-
"key-name": String(
|
|
3600
|
-
"row-el":
|
|
3631
|
+
de(e.tableHeaders, (K, D) => ({
|
|
3632
|
+
name: D,
|
|
3633
|
+
fn: v(({ row: R, rowKey: Y, rowValue: Z }) => [
|
|
3634
|
+
O(ml, {
|
|
3635
|
+
"key-name": String(D),
|
|
3636
|
+
"row-el": u(R)
|
|
3601
3637
|
}, {
|
|
3602
3638
|
default: v(() => [
|
|
3603
|
-
|
|
3604
|
-
row:
|
|
3639
|
+
z(x.$slots, D, {
|
|
3640
|
+
row: R,
|
|
3605
3641
|
rowKey: Y,
|
|
3606
3642
|
rowValue: Z
|
|
3607
3643
|
}, () => [
|
|
3608
|
-
|
|
3644
|
+
H(F(Z), 1)
|
|
3609
3645
|
], !0)
|
|
3610
3646
|
]),
|
|
3611
3647
|
_: 2
|
|
@@ -3618,13 +3654,13 @@ const Po = {
|
|
|
3618
3654
|
}, 8, ["title"]);
|
|
3619
3655
|
};
|
|
3620
3656
|
}
|
|
3621
|
-
}),
|
|
3657
|
+
}), Cl = /* @__PURE__ */ ye(kl, [["__scopeId", "data-v-57b5a97b"]]), wl = {
|
|
3622
3658
|
key: 0,
|
|
3623
3659
|
class: "kong-ui-entity-delete-error"
|
|
3624
|
-
},
|
|
3660
|
+
}, Sl = {
|
|
3625
3661
|
key: 1,
|
|
3626
3662
|
class: "description"
|
|
3627
|
-
},
|
|
3663
|
+
}, Il = /* @__PURE__ */ ne({
|
|
3628
3664
|
__name: "EntityDeleteModal",
|
|
3629
3665
|
props: {
|
|
3630
3666
|
visible: {
|
|
@@ -3668,9 +3704,9 @@ const Po = {
|
|
|
3668
3704
|
}, l = () => {
|
|
3669
3705
|
i("proceed");
|
|
3670
3706
|
};
|
|
3671
|
-
return (s,
|
|
3672
|
-
const d = N("KAlert"),
|
|
3673
|
-
return
|
|
3707
|
+
return (s, c) => {
|
|
3708
|
+
const d = N("KAlert"), u = N("KPrompt");
|
|
3709
|
+
return g(), q(u, {
|
|
3674
3710
|
"action-button-text": "Yes, delete",
|
|
3675
3711
|
"action-pending": e.actionPending,
|
|
3676
3712
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3682,35 +3718,35 @@ const Po = {
|
|
|
3682
3718
|
onProceed: l
|
|
3683
3719
|
}, {
|
|
3684
3720
|
"body-content": v(() => [
|
|
3685
|
-
e.error ? (
|
|
3686
|
-
|
|
3721
|
+
e.error ? (g(), _("div", wl, [
|
|
3722
|
+
O(d, { appearance: "danger" }, {
|
|
3687
3723
|
alertMessage: v(() => [
|
|
3688
|
-
|
|
3724
|
+
H(F(e.error), 1)
|
|
3689
3725
|
]),
|
|
3690
3726
|
_: 1
|
|
3691
3727
|
})
|
|
3692
3728
|
])) : V("", !0),
|
|
3693
|
-
|
|
3729
|
+
O(k(t), {
|
|
3694
3730
|
class: "message",
|
|
3695
3731
|
keypath: a.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3696
3732
|
tag: "p"
|
|
3697
|
-
},
|
|
3733
|
+
}, Ie({
|
|
3698
3734
|
entityType: v(() => [
|
|
3699
|
-
|
|
3735
|
+
H(F(a.entityType), 1)
|
|
3700
3736
|
]),
|
|
3701
3737
|
_: 2
|
|
3702
3738
|
}, [
|
|
3703
3739
|
a.entityName ? {
|
|
3704
3740
|
name: "entityName",
|
|
3705
3741
|
fn: v(() => [
|
|
3706
|
-
|
|
3742
|
+
B("strong", null, F(a.entityName), 1)
|
|
3707
3743
|
]),
|
|
3708
3744
|
key: "0"
|
|
3709
3745
|
} : void 0
|
|
3710
3746
|
]), 1032, ["keypath"]),
|
|
3711
|
-
a.description || s.$slots.description ? (
|
|
3712
|
-
|
|
3713
|
-
|
|
3747
|
+
a.description || s.$slots.description ? (g(), _("div", Sl, [
|
|
3748
|
+
z(s.$slots, "description", {}, () => [
|
|
3749
|
+
B("p", null, F(a.description), 1)
|
|
3714
3750
|
], !0)
|
|
3715
3751
|
])) : V("", !0)
|
|
3716
3752
|
]),
|
|
@@ -3718,13 +3754,13 @@ const Po = {
|
|
|
3718
3754
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3719
3755
|
};
|
|
3720
3756
|
}
|
|
3721
|
-
}), Al = /* @__PURE__ */ ye(
|
|
3757
|
+
}), Al = /* @__PURE__ */ ye(Il, [["__scopeId", "data-v-1c9a2a07"]]), xl = {
|
|
3722
3758
|
fill: "none",
|
|
3723
3759
|
height: "20",
|
|
3724
3760
|
viewBox: "0 0 20 20",
|
|
3725
3761
|
width: "20",
|
|
3726
3762
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3727
|
-
},
|
|
3763
|
+
}, _l = {
|
|
3728
3764
|
id: "mask0_180_20349",
|
|
3729
3765
|
height: "20",
|
|
3730
3766
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3732,7 +3768,7 @@ const Po = {
|
|
|
3732
3768
|
width: "20",
|
|
3733
3769
|
x: "0",
|
|
3734
3770
|
y: "0"
|
|
3735
|
-
},
|
|
3771
|
+
}, Tl = ["fill"], jl = { mask: "url(#mask0_180_20349)" }, Ol = ["fill"], Wt = /* @__PURE__ */ ne({
|
|
3736
3772
|
__name: "IconFilter",
|
|
3737
3773
|
props: {
|
|
3738
3774
|
color: {
|
|
@@ -3741,26 +3777,26 @@ const Po = {
|
|
|
3741
3777
|
}
|
|
3742
3778
|
},
|
|
3743
3779
|
setup(e) {
|
|
3744
|
-
return (n, t) => (
|
|
3745
|
-
|
|
3746
|
-
|
|
3780
|
+
return (n, t) => (g(), _("svg", xl, [
|
|
3781
|
+
B("mask", _l, [
|
|
3782
|
+
B("rect", {
|
|
3747
3783
|
fill: e.color,
|
|
3748
3784
|
height: "20",
|
|
3749
3785
|
width: "20"
|
|
3750
|
-
}, null, 8,
|
|
3786
|
+
}, null, 8, Tl)
|
|
3751
3787
|
]),
|
|
3752
|
-
|
|
3753
|
-
|
|
3788
|
+
B("g", jl, [
|
|
3789
|
+
B("path", {
|
|
3754
3790
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3755
3791
|
fill: e.color
|
|
3756
|
-
}, null, 8,
|
|
3792
|
+
}, null, 8, Ol)
|
|
3757
3793
|
])
|
|
3758
3794
|
]));
|
|
3759
3795
|
}
|
|
3760
|
-
}),
|
|
3796
|
+
}), $l = {
|
|
3761
3797
|
key: 1,
|
|
3762
3798
|
class: "kong-ui-entity-filter"
|
|
3763
|
-
},
|
|
3799
|
+
}, Ml = { class: "menu-item-title" }, El = { class: "menu-item-indicator" }, Fl = { class: "menu-item-body" }, Nl = ["for"], Kl = { class: "menu-item-buttons" }, ql = { class: "filter-clear-button-container" }, Bl = /* @__PURE__ */ ne({
|
|
3764
3800
|
__name: "EntityFilter",
|
|
3765
3801
|
props: {
|
|
3766
3802
|
// filter config, either exact match or fuzzy match
|
|
@@ -3781,49 +3817,49 @@ const Po = {
|
|
|
3781
3817
|
emits: ["update:modelValue"],
|
|
3782
3818
|
setup(e, { emit: n }) {
|
|
3783
3819
|
const { i18n: { t } } = re.useI18n(), a = e, i = n, r = E(!1), o = E({}), l = T(() => {
|
|
3784
|
-
const
|
|
3785
|
-
return new URLSearchParams(a.modelValue).forEach((
|
|
3786
|
-
|
|
3787
|
-
}),
|
|
3820
|
+
const m = [];
|
|
3821
|
+
return new URLSearchParams(a.modelValue).forEach((f, S) => {
|
|
3822
|
+
f !== "" && m.push(S);
|
|
3823
|
+
}), m;
|
|
3788
3824
|
}), s = T(() => {
|
|
3789
|
-
const
|
|
3790
|
-
return Object.keys(
|
|
3791
|
-
label:
|
|
3792
|
-
value:
|
|
3825
|
+
const m = a.config.fields;
|
|
3826
|
+
return Object.keys(m).filter((f) => m[f].searchable).map((f) => ({
|
|
3827
|
+
label: m[f].label || f,
|
|
3828
|
+
value: f
|
|
3793
3829
|
}));
|
|
3794
3830
|
});
|
|
3795
|
-
|
|
3796
|
-
o.value = {}, new URLSearchParams(
|
|
3797
|
-
o.value[S] =
|
|
3831
|
+
we(() => a.modelValue, (m) => {
|
|
3832
|
+
o.value = {}, new URLSearchParams(m).forEach((f, S) => {
|
|
3833
|
+
o.value[S] = f;
|
|
3798
3834
|
});
|
|
3799
3835
|
});
|
|
3800
|
-
const
|
|
3836
|
+
const c = () => {
|
|
3801
3837
|
r.value = !r.value;
|
|
3802
|
-
}, d = (
|
|
3803
|
-
i("update:modelValue",
|
|
3804
|
-
},
|
|
3805
|
-
var
|
|
3806
|
-
return (((S = (
|
|
3838
|
+
}, d = (m) => {
|
|
3839
|
+
i("update:modelValue", m);
|
|
3840
|
+
}, u = (m) => `filter-${m}`, y = (m) => {
|
|
3841
|
+
var f, S;
|
|
3842
|
+
return (((S = (f = a.config.schema) == null ? void 0 : f[m]) == null ? void 0 : S.values) ?? []).map((w) => ({
|
|
3807
3843
|
value: w,
|
|
3808
3844
|
label: w
|
|
3809
3845
|
}));
|
|
3810
|
-
},
|
|
3811
|
-
var
|
|
3812
|
-
return ((S = (
|
|
3813
|
-
}, C = (
|
|
3846
|
+
}, p = (m) => {
|
|
3847
|
+
var f, S;
|
|
3848
|
+
return ((S = (f = a.config.schema) == null ? void 0 : f[m]) == null ? void 0 : S.type) ?? "text";
|
|
3849
|
+
}, C = (m) => {
|
|
3814
3850
|
o.value = {
|
|
3815
3851
|
...o.value,
|
|
3816
|
-
[
|
|
3817
|
-
},
|
|
3852
|
+
[m]: ""
|
|
3853
|
+
}, I();
|
|
3818
3854
|
}, h = () => {
|
|
3819
|
-
o.value = {},
|
|
3820
|
-
},
|
|
3821
|
-
const
|
|
3822
|
-
|
|
3855
|
+
o.value = {}, I(!0);
|
|
3856
|
+
}, I = (m = !1) => {
|
|
3857
|
+
const f = Object.keys(o.value).reduce((S, w) => (o.value[w] && (S[w] = `${o.value[w]}`), S), {});
|
|
3858
|
+
m && (r.value = !1), i("update:modelValue", new URLSearchParams(f).toString());
|
|
3823
3859
|
};
|
|
3824
|
-
return (
|
|
3860
|
+
return (m, f) => {
|
|
3825
3861
|
const S = N("KInput"), w = N("KButton"), x = N("KSelect"), L = N("KMenuItem"), J = N("KMenu");
|
|
3826
|
-
return e.config.isExactMatch ? (
|
|
3862
|
+
return e.config.isExactMatch ? (g(), q(S, {
|
|
3827
3863
|
key: 0,
|
|
3828
3864
|
autocomplete: "off",
|
|
3829
3865
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3833,89 +3869,89 @@ const Po = {
|
|
|
3833
3869
|
"onUpdate:modelValue": d
|
|
3834
3870
|
}, {
|
|
3835
3871
|
before: v(() => [
|
|
3836
|
-
|
|
3872
|
+
O(Wt)
|
|
3837
3873
|
]),
|
|
3838
3874
|
_: 1
|
|
3839
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
3840
|
-
|
|
3875
|
+
}, 8, ["model-value", "placeholder"])) : (g(), _("div", $l, [
|
|
3876
|
+
O(w, {
|
|
3841
3877
|
appearance: "tertiary",
|
|
3842
3878
|
"data-testid": "filter-button",
|
|
3843
|
-
onClick:
|
|
3879
|
+
onClick: c
|
|
3844
3880
|
}, {
|
|
3845
3881
|
default: v(() => [
|
|
3846
|
-
|
|
3847
|
-
|
|
3882
|
+
O(Wt),
|
|
3883
|
+
H(" " + F(k(t)("filter.filterButtonText")) + " " + F(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
3848
3884
|
]),
|
|
3849
3885
|
_: 1
|
|
3850
3886
|
}),
|
|
3851
|
-
|
|
3887
|
+
Fe(B("div", {
|
|
3852
3888
|
class: "kong-ui-entity-filter-backdrop",
|
|
3853
|
-
onClick:
|
|
3889
|
+
onClick: c
|
|
3854
3890
|
}, null, 512), [
|
|
3855
|
-
[
|
|
3891
|
+
[Ne, r.value]
|
|
3856
3892
|
]),
|
|
3857
|
-
|
|
3893
|
+
Fe(O(J, { class: "kong-ui-entity-filter-menu" }, {
|
|
3858
3894
|
body: v(() => [
|
|
3859
|
-
(
|
|
3895
|
+
(g(!0), _(fe, null, de(s.value, (M, b) => (g(), q(L, {
|
|
3860
3896
|
key: M.value,
|
|
3861
3897
|
"data-testid": M.value,
|
|
3862
3898
|
expandable: "",
|
|
3863
3899
|
"last-menu-item": b === s.value.length - 1
|
|
3864
3900
|
}, {
|
|
3865
3901
|
itemTitle: v(() => [
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
[
|
|
3902
|
+
B("span", Ml, [
|
|
3903
|
+
H(F(M.label) + " ", 1),
|
|
3904
|
+
Fe(B("span", El, null, 512), [
|
|
3905
|
+
[Ne, l.value.includes(M.value)]
|
|
3870
3906
|
])
|
|
3871
3907
|
])
|
|
3872
3908
|
]),
|
|
3873
3909
|
itemBody: v(() => {
|
|
3874
|
-
var
|
|
3910
|
+
var U, j;
|
|
3875
3911
|
return [
|
|
3876
|
-
|
|
3877
|
-
|
|
3912
|
+
B("div", Fl, [
|
|
3913
|
+
B("label", {
|
|
3878
3914
|
class: "menu-item-label",
|
|
3879
|
-
for:
|
|
3880
|
-
},
|
|
3881
|
-
((j = (
|
|
3915
|
+
for: u(M.value)
|
|
3916
|
+
}, F(k(t)("filter.fieldLabel")), 9, Nl),
|
|
3917
|
+
((j = (U = e.config.schema) == null ? void 0 : U[M.value]) == null ? void 0 : j.type) === "select" ? (g(), q(x, {
|
|
3882
3918
|
key: 0,
|
|
3883
|
-
id:
|
|
3919
|
+
id: u(M.value),
|
|
3884
3920
|
modelValue: o.value[M.value],
|
|
3885
|
-
"onUpdate:modelValue": (
|
|
3921
|
+
"onUpdate:modelValue": (K) => o.value[M.value] = K,
|
|
3886
3922
|
appearance: "select",
|
|
3887
|
-
items:
|
|
3923
|
+
items: y(M.value),
|
|
3888
3924
|
placeholder: k(t)("filter.selectPlaceholder")
|
|
3889
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
3925
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (g(), q(S, {
|
|
3890
3926
|
key: 1,
|
|
3891
|
-
id:
|
|
3927
|
+
id: u(M.value),
|
|
3892
3928
|
modelValue: o.value[M.value],
|
|
3893
|
-
"onUpdate:modelValue": (
|
|
3929
|
+
"onUpdate:modelValue": (K) => o.value[M.value] = K,
|
|
3894
3930
|
autocomplete: "off",
|
|
3895
3931
|
placeholder: k(t)("filter.inputPlaceholder"),
|
|
3896
|
-
type:
|
|
3932
|
+
type: p(M.value)
|
|
3897
3933
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3898
3934
|
]),
|
|
3899
|
-
|
|
3900
|
-
|
|
3935
|
+
B("div", Kl, [
|
|
3936
|
+
O(w, {
|
|
3901
3937
|
appearance: "tertiary",
|
|
3902
3938
|
"data-testid": "apply-filter",
|
|
3903
3939
|
size: "small",
|
|
3904
|
-
onClick:
|
|
3940
|
+
onClick: f[0] || (f[0] = (K) => I(!0))
|
|
3905
3941
|
}, {
|
|
3906
3942
|
default: v(() => [
|
|
3907
|
-
|
|
3943
|
+
H(F(k(t)("filter.applyButtonText")), 1)
|
|
3908
3944
|
]),
|
|
3909
3945
|
_: 1
|
|
3910
3946
|
}),
|
|
3911
|
-
|
|
3947
|
+
O(w, {
|
|
3912
3948
|
appearance: "tertiary",
|
|
3913
3949
|
"data-testid": "clear-filter",
|
|
3914
3950
|
size: "small",
|
|
3915
|
-
onClick: (
|
|
3951
|
+
onClick: (K) => C(M.value)
|
|
3916
3952
|
}, {
|
|
3917
3953
|
default: v(() => [
|
|
3918
|
-
|
|
3954
|
+
H(F(k(t)("filter.clearButtonText")), 1)
|
|
3919
3955
|
]),
|
|
3920
3956
|
_: 2
|
|
3921
3957
|
}, 1032, ["onClick"])
|
|
@@ -3926,14 +3962,14 @@ const Po = {
|
|
|
3926
3962
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
3927
3963
|
]),
|
|
3928
3964
|
actionButton: v(() => [
|
|
3929
|
-
|
|
3930
|
-
|
|
3965
|
+
B("div", ql, [
|
|
3966
|
+
O(w, {
|
|
3931
3967
|
appearance: "tertiary",
|
|
3932
3968
|
size: "small",
|
|
3933
3969
|
onClick: h
|
|
3934
3970
|
}, {
|
|
3935
3971
|
default: v(() => [
|
|
3936
|
-
|
|
3972
|
+
H(F(k(t)("filter.clearAllButtonText")), 1)
|
|
3937
3973
|
]),
|
|
3938
3974
|
_: 1
|
|
3939
3975
|
})
|
|
@@ -3941,12 +3977,12 @@ const Po = {
|
|
|
3941
3977
|
]),
|
|
3942
3978
|
_: 1
|
|
3943
3979
|
}, 512), [
|
|
3944
|
-
[
|
|
3980
|
+
[Ne, r.value]
|
|
3945
3981
|
])
|
|
3946
3982
|
]));
|
|
3947
3983
|
};
|
|
3948
3984
|
}
|
|
3949
|
-
}),
|
|
3985
|
+
}), Ll = /* @__PURE__ */ ye(Bl, [["__scopeId", "data-v-15962ee2"]]), De = /* @__PURE__ */ ne({
|
|
3950
3986
|
__name: "PermissionsWrapper",
|
|
3951
3987
|
props: {
|
|
3952
3988
|
/**
|
|
@@ -3969,23 +4005,23 @@ const Po = {
|
|
|
3969
4005
|
},
|
|
3970
4006
|
setup(e) {
|
|
3971
4007
|
const n = e, t = E(void 0), a = T(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
3972
|
-
return
|
|
4008
|
+
return we(() => n.authFunction, async () => {
|
|
3973
4009
|
t.value = await n.authFunction();
|
|
3974
|
-
}, { immediate: !0 }), (i, r) => a.value ?
|
|
4010
|
+
}, { immediate: !0 }), (i, r) => a.value ? z(i.$slots, "default", {
|
|
3975
4011
|
key: 0,
|
|
3976
4012
|
isAllowed: t.value
|
|
3977
4013
|
}) : V("", !0);
|
|
3978
4014
|
}
|
|
3979
|
-
}),
|
|
4015
|
+
}), Ul = { class: "form-section-wrapper" }, Dl = {
|
|
3980
4016
|
key: 0,
|
|
3981
4017
|
class: "form-section-title"
|
|
3982
|
-
},
|
|
4018
|
+
}, Rl = {
|
|
3983
4019
|
key: 1,
|
|
3984
4020
|
class: "form-section-description"
|
|
3985
|
-
},
|
|
4021
|
+
}, Pl = {
|
|
3986
4022
|
key: 2,
|
|
3987
4023
|
class: "form-section-footer"
|
|
3988
|
-
},
|
|
4024
|
+
}, Vl = { class: "form-section-content" }, zl = /* @__PURE__ */ ne({
|
|
3989
4025
|
__name: "EntityFormSection",
|
|
3990
4026
|
props: {
|
|
3991
4027
|
title: {
|
|
@@ -4011,31 +4047,31 @@ const Po = {
|
|
|
4011
4047
|
},
|
|
4012
4048
|
setup(e) {
|
|
4013
4049
|
const n = We();
|
|
4014
|
-
return (t, a) => (
|
|
4015
|
-
class:
|
|
4050
|
+
return (t, a) => (g(), _("fieldset", {
|
|
4051
|
+
class: ke(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4016
4052
|
}, [
|
|
4017
|
-
|
|
4018
|
-
e.hideInfoHeader ? V("", !0) : (
|
|
4053
|
+
B("div", Ul, [
|
|
4054
|
+
e.hideInfoHeader ? V("", !0) : (g(), _("div", {
|
|
4019
4055
|
key: 0,
|
|
4020
|
-
class:
|
|
4056
|
+
class: ke(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4021
4057
|
}, [
|
|
4022
|
-
e.title ? (
|
|
4023
|
-
e.description || k(n).description ? (
|
|
4024
|
-
|
|
4025
|
-
|
|
4058
|
+
e.title ? (g(), _("h4", Dl, F(e.title), 1)) : V("", !0),
|
|
4059
|
+
e.description || k(n).description ? (g(), _("div", Rl, [
|
|
4060
|
+
z(t.$slots, "description", {}, () => [
|
|
4061
|
+
B("p", null, F(e.description), 1)
|
|
4026
4062
|
], !0)
|
|
4027
4063
|
])) : V("", !0),
|
|
4028
|
-
k(n).footer ? (
|
|
4029
|
-
|
|
4064
|
+
k(n).footer ? (g(), _("div", Pl, [
|
|
4065
|
+
z(t.$slots, "footer", {}, void 0, !0)
|
|
4030
4066
|
])) : V("", !0)
|
|
4031
4067
|
], 2)),
|
|
4032
|
-
|
|
4033
|
-
|
|
4068
|
+
B("div", Vl, [
|
|
4069
|
+
z(t.$slots, "default", {}, void 0, !0)
|
|
4034
4070
|
])
|
|
4035
4071
|
])
|
|
4036
4072
|
], 2));
|
|
4037
4073
|
}
|
|
4038
|
-
}), Hl = /* @__PURE__ */ ye(
|
|
4074
|
+
}), Hl = /* @__PURE__ */ ye(zl, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Zn, useDeleteUrlBuilder: Jl, useErrors: Yl, useExternalLinkCreator: ls, useFetchUrlBuilder: ss, useFetcher: Wl, useDebouncedFilter: cs, useStringHelpers: us, useHelpers: ds, useGatewayFeatureSupported: ps, useTruncationDetector: fs } = re, Zl = { class: "kong-ui-entities-key-sets-list" }, Gl = { key: 1 }, Ql = /* @__PURE__ */ ne({
|
|
4039
4075
|
__name: "KeySetList",
|
|
4040
4076
|
props: {
|
|
4041
4077
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4082,103 +4118,103 @@ const Po = {
|
|
|
4082
4118
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
4083
4119
|
setup(e, { emit: n }) {
|
|
4084
4120
|
var wt;
|
|
4085
|
-
const t = n, a = e, { i18n: { t: i } } = pt.useI18n(), r = ut(), { axiosInstance: o } =
|
|
4121
|
+
const t = n, a = e, { i18n: { t: i } } = pt.useI18n(), r = ut(), { axiosInstance: o } = Zn({
|
|
4086
4122
|
headers: (wt = a.config) == null ? void 0 : wt.requestHeaders
|
|
4087
|
-
}), l = E(1), s = T(() => a.config.app !== "kongManager" || !!a.config.disableSorting),
|
|
4123
|
+
}), l = E(1), s = T(() => a.config.app !== "kongManager" || !!a.config.disableSorting), c = {
|
|
4088
4124
|
name: { label: i("keySets.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
4089
4125
|
tags: { label: i("keySets.list.table_headers.tags") },
|
|
4090
4126
|
id: { label: i("keySets.list.table_headers.id"), sortable: !0 }
|
|
4091
|
-
}, d =
|
|
4092
|
-
var
|
|
4093
|
-
let
|
|
4094
|
-
return a.config.app === "konnect" ?
|
|
4095
|
-
}),
|
|
4096
|
-
const
|
|
4097
|
-
if (
|
|
4127
|
+
}, d = c, u = T(() => {
|
|
4128
|
+
var P, ee;
|
|
4129
|
+
let $ = `${a.config.apiBaseUrl}${Pe.list[a.config.app]}`;
|
|
4130
|
+
return a.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((P = a.config) == null ? void 0 : P.controlPlaneId) || "") : a.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (ee = a.config) != null && ee.workspace ? `/${a.config.workspace}` : "")), $;
|
|
4131
|
+
}), y = E(""), p = T(() => {
|
|
4132
|
+
const $ = a.config.app === "konnect" || a.config.isExactMatch;
|
|
4133
|
+
if ($)
|
|
4098
4134
|
return {
|
|
4099
|
-
isExactMatch:
|
|
4135
|
+
isExactMatch: $,
|
|
4100
4136
|
placeholder: i("keySets.search.placeholder")
|
|
4101
4137
|
};
|
|
4102
|
-
const
|
|
4138
|
+
const P = { name: c.name };
|
|
4103
4139
|
return {
|
|
4104
|
-
isExactMatch:
|
|
4105
|
-
fields:
|
|
4140
|
+
isExactMatch: $,
|
|
4141
|
+
fields: P,
|
|
4106
4142
|
schema: a.config.filterSchema
|
|
4107
4143
|
};
|
|
4108
|
-
}), { fetcher: C, fetcherState: h } =
|
|
4109
|
-
|
|
4110
|
-
},
|
|
4144
|
+
}), { fetcher: C, fetcherState: h } = Wl(a.config, u.value), I = () => {
|
|
4145
|
+
y.value = "";
|
|
4146
|
+
}, m = () => {
|
|
4111
4147
|
l.value++;
|
|
4112
|
-
},
|
|
4113
|
-
const ee =
|
|
4114
|
-
if (!
|
|
4115
|
-
J(
|
|
4148
|
+
}, f = E(null), S = ($, P) => {
|
|
4149
|
+
const ee = $.id;
|
|
4150
|
+
if (!P(ee)) {
|
|
4151
|
+
J($, "id");
|
|
4116
4152
|
return;
|
|
4117
4153
|
}
|
|
4118
|
-
L(
|
|
4119
|
-
}, w = (
|
|
4120
|
-
const ee = JSON.stringify(
|
|
4121
|
-
if (!
|
|
4154
|
+
L($, "id");
|
|
4155
|
+
}, w = ($, P) => {
|
|
4156
|
+
const ee = JSON.stringify($);
|
|
4157
|
+
if (!P(ee)) {
|
|
4122
4158
|
t("copy:error", {
|
|
4123
|
-
entity:
|
|
4159
|
+
entity: $,
|
|
4124
4160
|
message: i("keySets.errors.copy")
|
|
4125
4161
|
});
|
|
4126
4162
|
return;
|
|
4127
4163
|
}
|
|
4128
4164
|
t("copy:success", {
|
|
4129
|
-
entity:
|
|
4165
|
+
entity: $,
|
|
4130
4166
|
message: i("keySets.copy.success_brief")
|
|
4131
4167
|
});
|
|
4132
|
-
}, x = (
|
|
4133
|
-
const { type: ge } =
|
|
4134
|
-
ge === "success" ? L(
|
|
4135
|
-
}, L = (
|
|
4168
|
+
}, x = ($, P, ee) => {
|
|
4169
|
+
const { type: ge } = $;
|
|
4170
|
+
ge === "success" ? L(P, ee) : J(P, ee);
|
|
4171
|
+
}, L = ($, P) => {
|
|
4136
4172
|
t("copy:success", {
|
|
4137
|
-
entity:
|
|
4138
|
-
field:
|
|
4139
|
-
message: i("keySets.copy.success", { val:
|
|
4173
|
+
entity: $,
|
|
4174
|
+
field: P,
|
|
4175
|
+
message: i("keySets.copy.success", { val: $[P] })
|
|
4140
4176
|
});
|
|
4141
|
-
}, J = (
|
|
4177
|
+
}, J = ($, P) => {
|
|
4142
4178
|
t("copy:error", {
|
|
4143
|
-
entity:
|
|
4144
|
-
field:
|
|
4179
|
+
entity: $,
|
|
4180
|
+
field: P,
|
|
4145
4181
|
message: i("keySets.errors.copy")
|
|
4146
4182
|
});
|
|
4147
|
-
}, M = async (
|
|
4183
|
+
}, M = async ($) => {
|
|
4148
4184
|
var ee;
|
|
4149
|
-
await ((ee = a.canRetrieve) == null ? void 0 : ee.call(a,
|
|
4150
|
-
}, b = (
|
|
4185
|
+
await ((ee = a.canRetrieve) == null ? void 0 : ee.call(a, $)) && r.push(a.config.getViewRoute($.id));
|
|
4186
|
+
}, b = ($) => ({
|
|
4151
4187
|
label: i("keySets.actions.view"),
|
|
4152
|
-
to: a.config.getViewRoute(
|
|
4153
|
-
}),
|
|
4188
|
+
to: a.config.getViewRoute($)
|
|
4189
|
+
}), U = ($) => ({
|
|
4154
4190
|
label: i("keySets.actions.edit"),
|
|
4155
|
-
to: a.config.getEditRoute(
|
|
4156
|
-
}), j = E(void 0),
|
|
4157
|
-
j.value =
|
|
4191
|
+
to: a.config.getEditRoute($)
|
|
4192
|
+
}), j = E(void 0), K = E(!1), D = E(!1), R = E(""), Y = Jl(a.config, u.value), Z = ($) => {
|
|
4193
|
+
j.value = $, K.value = !0;
|
|
4158
4194
|
}, ie = () => {
|
|
4159
|
-
|
|
4195
|
+
K.value = !1;
|
|
4160
4196
|
}, X = async () => {
|
|
4161
|
-
var
|
|
4162
|
-
if ((
|
|
4163
|
-
|
|
4197
|
+
var $, P, ee;
|
|
4198
|
+
if (($ = j.value) != null && $.id) {
|
|
4199
|
+
D.value = !0;
|
|
4164
4200
|
try {
|
|
4165
|
-
await o.delete(Y(j.value.id)),
|
|
4201
|
+
await o.delete(Y(j.value.id)), D.value = !1, K.value = !1, l.value++, t("delete:success", j.value);
|
|
4166
4202
|
} catch (ge) {
|
|
4167
|
-
|
|
4203
|
+
R.value = ((ee = (P = ge.response) == null ? void 0 : P.data) == null ? void 0 : ee.message) || ge.message || i("keySets.errors.delete"), t("error", ge);
|
|
4168
4204
|
} finally {
|
|
4169
|
-
|
|
4205
|
+
D.value = !1;
|
|
4170
4206
|
}
|
|
4171
4207
|
}
|
|
4172
4208
|
}, G = E(!0);
|
|
4173
|
-
|
|
4174
|
-
var
|
|
4175
|
-
if (Array.isArray((
|
|
4176
|
-
|
|
4209
|
+
we(h, ($) => {
|
|
4210
|
+
var P, ee, ge, Ue;
|
|
4211
|
+
if (Array.isArray((P = $ == null ? void 0 : $.response) == null ? void 0 : P.data) && (G.value = $.response.data.length > 0), $.status === Se.Error) {
|
|
4212
|
+
f.value = {
|
|
4177
4213
|
title: i("keySets.errors.general")
|
|
4178
|
-
}, (
|
|
4214
|
+
}, (Ue = (ge = (ee = $.error) == null ? void 0 : ee.response) == null ? void 0 : ge.data) != null && Ue.message && (f.value.message = $.error.response.data.message), t("error", $.error);
|
|
4179
4215
|
return;
|
|
4180
4216
|
}
|
|
4181
|
-
|
|
4217
|
+
f.value = null;
|
|
4182
4218
|
});
|
|
4183
4219
|
const le = E({
|
|
4184
4220
|
ctaPath: a.config.createRoute,
|
|
@@ -4188,55 +4224,55 @@ const Po = {
|
|
|
4188
4224
|
});
|
|
4189
4225
|
return ct(async () => {
|
|
4190
4226
|
await a.canCreate() && (le.value.title = i("keySets.list.empty_state.title"), le.value.ctaText = i("keySets.actions.create"));
|
|
4191
|
-
}), (
|
|
4192
|
-
const ee = N("KButton"), ge = N("KBadge"),
|
|
4193
|
-
return
|
|
4194
|
-
|
|
4227
|
+
}), ($, P) => {
|
|
4228
|
+
const ee = N("KButton"), ge = N("KBadge"), Ue = N("KTruncate"), Qn = N("CopyUuid"), Me = N("KDropdownItem"), St = N("KClipboardProvider");
|
|
4229
|
+
return g(), _("div", Zl, [
|
|
4230
|
+
O(k(Cl), {
|
|
4195
4231
|
"cache-identifier": e.cacheIdentifier,
|
|
4196
4232
|
"disable-pagination-page-jump": "",
|
|
4197
4233
|
"disable-sorting": s.value,
|
|
4198
4234
|
"empty-state-options": le.value,
|
|
4199
4235
|
"enable-entity-actions": "",
|
|
4200
|
-
"error-message":
|
|
4236
|
+
"error-message": f.value,
|
|
4201
4237
|
fetcher: k(C),
|
|
4202
4238
|
"fetcher-cache-key": l.value,
|
|
4203
4239
|
"pagination-type": "offset",
|
|
4204
4240
|
"preferences-storage-key": "kong-ui-entities-key-sets-list",
|
|
4205
|
-
query:
|
|
4241
|
+
query: y.value,
|
|
4206
4242
|
"table-headers": k(d),
|
|
4207
4243
|
"use-action-outside": e.useActionOutside,
|
|
4208
|
-
onClearSearchInput:
|
|
4209
|
-
"onClick:row":
|
|
4210
|
-
onSort:
|
|
4244
|
+
onClearSearchInput: I,
|
|
4245
|
+
"onClick:row": P[2] || (P[2] = (Q) => M(Q)),
|
|
4246
|
+
onSort: m
|
|
4211
4247
|
}, {
|
|
4212
4248
|
"toolbar-filter": v(() => [
|
|
4213
|
-
|
|
4214
|
-
modelValue:
|
|
4215
|
-
"onUpdate:modelValue":
|
|
4216
|
-
config:
|
|
4249
|
+
O(k(Ll), {
|
|
4250
|
+
modelValue: y.value,
|
|
4251
|
+
"onUpdate:modelValue": P[0] || (P[0] = (Q) => y.value = Q),
|
|
4252
|
+
config: p.value
|
|
4217
4253
|
}, null, 8, ["modelValue", "config"])
|
|
4218
4254
|
]),
|
|
4219
4255
|
"toolbar-button": v(() => [
|
|
4220
|
-
(
|
|
4256
|
+
(g(), q(ia, {
|
|
4221
4257
|
disabled: !e.useActionOutside,
|
|
4222
4258
|
to: "#kong-ui-app-page-header-action-button"
|
|
4223
4259
|
}, [
|
|
4224
|
-
|
|
4260
|
+
O(k(De), {
|
|
4225
4261
|
"auth-function": () => e.canCreate()
|
|
4226
4262
|
}, {
|
|
4227
4263
|
default: v(() => [
|
|
4228
|
-
|
|
4264
|
+
Fe(O(ee, {
|
|
4229
4265
|
appearance: "primary",
|
|
4230
4266
|
"data-testid": "toolbar-add-key-set",
|
|
4231
4267
|
icon: "plus",
|
|
4232
4268
|
to: e.config.createRoute
|
|
4233
4269
|
}, {
|
|
4234
4270
|
default: v(() => [
|
|
4235
|
-
|
|
4271
|
+
H(F(k(i)("keySets.list.toolbar_actions.new_key_set")), 1)
|
|
4236
4272
|
]),
|
|
4237
4273
|
_: 1
|
|
4238
4274
|
}, 8, ["to"]), [
|
|
4239
|
-
[
|
|
4275
|
+
[Ne, G.value]
|
|
4240
4276
|
])
|
|
4241
4277
|
]),
|
|
4242
4278
|
_: 1
|
|
@@ -4244,66 +4280,66 @@ const Po = {
|
|
|
4244
4280
|
], 8, ["disabled"]))
|
|
4245
4281
|
]),
|
|
4246
4282
|
name: v(({ rowValue: Q }) => [
|
|
4247
|
-
|
|
4283
|
+
B("b", null, F(Q ?? "-"), 1)
|
|
4248
4284
|
]),
|
|
4249
4285
|
tags: v(({ rowValue: Q }) => [
|
|
4250
|
-
(Q == null ? void 0 : Q.length) > 0 ? (
|
|
4286
|
+
(Q == null ? void 0 : Q.length) > 0 ? (g(), q(Ue, { key: 0 }, {
|
|
4251
4287
|
default: v(() => [
|
|
4252
|
-
(
|
|
4288
|
+
(g(!0), _(fe, null, de(Q, (he) => (g(), q(ge, {
|
|
4253
4289
|
key: he,
|
|
4254
|
-
onClick:
|
|
4290
|
+
onClick: P[1] || (P[1] = Re(() => {
|
|
4255
4291
|
}, ["stop"]))
|
|
4256
4292
|
}, {
|
|
4257
4293
|
default: v(() => [
|
|
4258
|
-
|
|
4294
|
+
H(F(he), 1)
|
|
4259
4295
|
]),
|
|
4260
4296
|
_: 2
|
|
4261
4297
|
}, 1024))), 128))
|
|
4262
4298
|
]),
|
|
4263
4299
|
_: 2
|
|
4264
|
-
}, 1024)) : (
|
|
4300
|
+
}, 1024)) : (g(), _("span", Gl, "-"))
|
|
4265
4301
|
]),
|
|
4266
4302
|
id: v(({ row: Q, rowValue: he }) => [
|
|
4267
|
-
|
|
4303
|
+
O(Qn, {
|
|
4268
4304
|
notify: (Ge) => x(Ge, Q, "id"),
|
|
4269
4305
|
truncated: !1,
|
|
4270
4306
|
uuid: he
|
|
4271
4307
|
}, null, 8, ["notify", "uuid"])
|
|
4272
4308
|
]),
|
|
4273
4309
|
actions: v(({ row: Q }) => [
|
|
4274
|
-
|
|
4310
|
+
O(St, null, {
|
|
4275
4311
|
default: v(({ copyToClipboard: he }) => [
|
|
4276
|
-
|
|
4312
|
+
O(Me, {
|
|
4277
4313
|
"data-testid": "action-entity-copy-id",
|
|
4278
4314
|
onClick: (Ge) => S(Q, he)
|
|
4279
4315
|
}, {
|
|
4280
4316
|
default: v(() => [
|
|
4281
|
-
|
|
4317
|
+
H(F(k(i)("keySets.actions.copy_id")), 1)
|
|
4282
4318
|
]),
|
|
4283
4319
|
_: 2
|
|
4284
4320
|
}, 1032, ["onClick"])
|
|
4285
4321
|
]),
|
|
4286
4322
|
_: 2
|
|
4287
4323
|
}, 1024),
|
|
4288
|
-
|
|
4324
|
+
O(St, null, {
|
|
4289
4325
|
default: v(({ copyToClipboard: he }) => [
|
|
4290
|
-
|
|
4326
|
+
O(Me, {
|
|
4291
4327
|
"data-testid": "action-entity-copy-json",
|
|
4292
4328
|
onClick: (Ge) => w(Q, he)
|
|
4293
4329
|
}, {
|
|
4294
4330
|
default: v(() => [
|
|
4295
|
-
|
|
4331
|
+
H(F(k(i)("keySets.actions.copy_json")), 1)
|
|
4296
4332
|
]),
|
|
4297
4333
|
_: 2
|
|
4298
4334
|
}, 1032, ["onClick"])
|
|
4299
4335
|
]),
|
|
4300
4336
|
_: 2
|
|
4301
4337
|
}, 1024),
|
|
4302
|
-
|
|
4338
|
+
O(k(De), {
|
|
4303
4339
|
"auth-function": () => e.canRetrieve(Q)
|
|
4304
4340
|
}, {
|
|
4305
4341
|
default: v(() => [
|
|
4306
|
-
|
|
4342
|
+
O(Me, {
|
|
4307
4343
|
"data-testid": "action-entity-view",
|
|
4308
4344
|
"has-divider": "",
|
|
4309
4345
|
item: b(Q.id)
|
|
@@ -4311,29 +4347,29 @@ const Po = {
|
|
|
4311
4347
|
]),
|
|
4312
4348
|
_: 2
|
|
4313
4349
|
}, 1032, ["auth-function"]),
|
|
4314
|
-
|
|
4350
|
+
O(k(De), {
|
|
4315
4351
|
"auth-function": () => e.canEdit(Q)
|
|
4316
4352
|
}, {
|
|
4317
4353
|
default: v(() => [
|
|
4318
|
-
|
|
4354
|
+
O(Me, {
|
|
4319
4355
|
"data-testid": "action-entity-edit",
|
|
4320
|
-
item:
|
|
4356
|
+
item: U(Q.id)
|
|
4321
4357
|
}, null, 8, ["item"])
|
|
4322
4358
|
]),
|
|
4323
4359
|
_: 2
|
|
4324
4360
|
}, 1032, ["auth-function"]),
|
|
4325
|
-
|
|
4361
|
+
O(k(De), {
|
|
4326
4362
|
"auth-function": () => e.canDelete(Q)
|
|
4327
4363
|
}, {
|
|
4328
4364
|
default: v(() => [
|
|
4329
|
-
|
|
4365
|
+
O(Me, {
|
|
4330
4366
|
danger: "",
|
|
4331
4367
|
"data-testid": "action-entity-delete",
|
|
4332
4368
|
"has-divider": "",
|
|
4333
4369
|
onClick: (he) => Z(Q)
|
|
4334
4370
|
}, {
|
|
4335
4371
|
default: v(() => [
|
|
4336
|
-
|
|
4372
|
+
H(F(k(i)("keySets.actions.delete")), 1)
|
|
4337
4373
|
]),
|
|
4338
4374
|
_: 2
|
|
4339
4375
|
}, 1032, ["onClick"])
|
|
@@ -4343,26 +4379,26 @@ const Po = {
|
|
|
4343
4379
|
]),
|
|
4344
4380
|
_: 1
|
|
4345
4381
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "use-action-outside"]),
|
|
4346
|
-
|
|
4347
|
-
"action-pending":
|
|
4382
|
+
O(k(Al), {
|
|
4383
|
+
"action-pending": D.value,
|
|
4348
4384
|
description: k(i)("keySets.delete.description"),
|
|
4349
4385
|
"entity-name": j.value && (j.value.name || j.value.id),
|
|
4350
|
-
"entity-type": k(
|
|
4351
|
-
error:
|
|
4386
|
+
"entity-type": k(tn).KeySet,
|
|
4387
|
+
error: R.value,
|
|
4352
4388
|
title: k(i)("keySets.delete.title"),
|
|
4353
|
-
visible:
|
|
4389
|
+
visible: K.value,
|
|
4354
4390
|
onCancel: ie,
|
|
4355
4391
|
onProceed: X
|
|
4356
4392
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
4357
4393
|
]);
|
|
4358
4394
|
};
|
|
4359
4395
|
}
|
|
4360
|
-
}),
|
|
4396
|
+
}), Gn = (e, n) => {
|
|
4361
4397
|
const t = e.__vccOpts || e;
|
|
4362
4398
|
for (const [a, i] of n)
|
|
4363
4399
|
t[a] = i;
|
|
4364
4400
|
return t;
|
|
4365
|
-
},
|
|
4401
|
+
}, ys = /* @__PURE__ */ Gn(Ql, [["__scopeId", "data-v-ae13b9e1"]]), Xl = { class: "kong-ui-entities-key-sets-form" }, es = /* @__PURE__ */ ne({
|
|
4366
4402
|
__name: "KeySetForm",
|
|
4367
4403
|
props: {
|
|
4368
4404
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4380,40 +4416,40 @@ const Po = {
|
|
|
4380
4416
|
},
|
|
4381
4417
|
emits: ["update", "error", "loading"],
|
|
4382
4418
|
setup(e, { emit: n }) {
|
|
4383
|
-
var
|
|
4384
|
-
const t = n, a = e, i = ut(), { i18n: { t: r } } = pt.useI18n(), { getMessageFromError: o } =
|
|
4385
|
-
headers: (
|
|
4386
|
-
}), s = T(() =>
|
|
4419
|
+
var m;
|
|
4420
|
+
const t = n, a = e, i = ut(), { i18n: { t: r } } = pt.useI18n(), { getMessageFromError: o } = Yl(), { axiosInstance: l } = Zn({
|
|
4421
|
+
headers: (m = a.config) == null ? void 0 : m.requestHeaders
|
|
4422
|
+
}), s = T(() => Pe.form[a.config.app].edit), c = T(() => a.keySetId ? at.Edit : at.Create), d = It({
|
|
4387
4423
|
fields: {
|
|
4388
4424
|
name: "",
|
|
4389
4425
|
tags: ""
|
|
4390
4426
|
},
|
|
4391
4427
|
isReadonly: !1,
|
|
4392
4428
|
errorMessage: ""
|
|
4393
|
-
}),
|
|
4429
|
+
}), u = It({
|
|
4394
4430
|
name: "",
|
|
4395
4431
|
tags: ""
|
|
4396
|
-
}),
|
|
4432
|
+
}), y = T(() => JSON.stringify(d.fields) !== JSON.stringify(u) && !!d.fields.name), p = (f) => {
|
|
4397
4433
|
var S;
|
|
4398
|
-
d.fields.name = (
|
|
4434
|
+
d.fields.name = (f == null ? void 0 : f.name) || "", d.fields.tags = ((S = f == null ? void 0 : f.tags) == null ? void 0 : S.join(", ")) || "", Object.assign(u, d.fields);
|
|
4399
4435
|
}, C = () => {
|
|
4400
4436
|
i.push(a.config.cancelRoute);
|
|
4401
4437
|
}, h = T(() => {
|
|
4402
4438
|
var S, w;
|
|
4403
|
-
let
|
|
4404
|
-
return a.config.app === "konnect" ?
|
|
4405
|
-
}),
|
|
4406
|
-
var
|
|
4439
|
+
let f = `${a.config.apiBaseUrl}${Pe.form[a.config.app][c.value]}`;
|
|
4440
|
+
return a.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((S = a.config) == null ? void 0 : S.controlPlaneId) || "") : a.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (w = a.config) != null && w.workspace ? `/${a.config.workspace}` : "")), f = f.replace(/{id}/gi, a.keySetId), f;
|
|
4441
|
+
}), I = async () => {
|
|
4442
|
+
var f, S, w, x, L;
|
|
4407
4443
|
try {
|
|
4408
4444
|
d.isReadonly = !0;
|
|
4409
4445
|
const J = {
|
|
4410
4446
|
name: d.fields.name,
|
|
4411
|
-
tags: ((w = (S = (
|
|
4447
|
+
tags: ((w = (S = (f = d.fields.tags) == null ? void 0 : f.split(",")) == null ? void 0 : S.map((b) => String(b || "").trim())) == null ? void 0 : w.filter((b) => b !== "")) || ""
|
|
4412
4448
|
};
|
|
4413
4449
|
let M;
|
|
4414
|
-
if (
|
|
4450
|
+
if (c.value === "create" ? M = await l.post(h.value, J) : c.value === "edit" && (M = ((x = a.config) == null ? void 0 : x.app) === "konnect" ? await l.put(h.value, J) : await l.patch(h.value, J)), M) {
|
|
4415
4451
|
const { data: b } = M;
|
|
4416
|
-
d.fields.name = (b == null ? void 0 : b.name) || "", d.fields.tags = ((L = b == null ? void 0 : b.tags) == null ? void 0 : L.join(", ")) || "", Object.assign(
|
|
4452
|
+
d.fields.name = (b == null ? void 0 : b.name) || "", d.fields.tags = ((L = b == null ? void 0 : b.tags) == null ? void 0 : L.join(", ")) || "", Object.assign(u, d.fields), t("update", M == null ? void 0 : M.data);
|
|
4417
4453
|
}
|
|
4418
4454
|
} catch (J) {
|
|
4419
4455
|
d.errorMessage = o(J), t("error", J);
|
|
@@ -4421,30 +4457,30 @@ const Po = {
|
|
|
4421
4457
|
d.isReadonly = !1;
|
|
4422
4458
|
}
|
|
4423
4459
|
};
|
|
4424
|
-
return (
|
|
4460
|
+
return (f, S) => {
|
|
4425
4461
|
const w = N("KInput");
|
|
4426
|
-
return
|
|
4427
|
-
|
|
4428
|
-
"can-submit":
|
|
4462
|
+
return g(), _("div", Xl, [
|
|
4463
|
+
O(k(fl), {
|
|
4464
|
+
"can-submit": y.value,
|
|
4429
4465
|
config: e.config,
|
|
4430
4466
|
"edit-id": e.keySetId,
|
|
4431
4467
|
"error-message": d.errorMessage,
|
|
4432
4468
|
"fetch-url": s.value,
|
|
4433
4469
|
"is-readonly": d.isReadonly,
|
|
4434
4470
|
onCancel: C,
|
|
4435
|
-
"onFetch:error": S[2] || (S[2] = (x) =>
|
|
4436
|
-
"onFetch:success":
|
|
4437
|
-
onLoading: S[3] || (S[3] = (x) =>
|
|
4438
|
-
onSubmit:
|
|
4471
|
+
"onFetch:error": S[2] || (S[2] = (x) => f.$emit("error", x)),
|
|
4472
|
+
"onFetch:success": p,
|
|
4473
|
+
onLoading: S[3] || (S[3] = (x) => f.$emit("loading", x)),
|
|
4474
|
+
onSubmit: I
|
|
4439
4475
|
}, {
|
|
4440
4476
|
default: v(() => [
|
|
4441
|
-
|
|
4477
|
+
O(k(Hl), {
|
|
4442
4478
|
description: k(r)("keySets.form.sections.general.description"),
|
|
4443
4479
|
"has-divider": "",
|
|
4444
4480
|
title: k(r)("keySets.form.sections.general.title")
|
|
4445
4481
|
}, {
|
|
4446
4482
|
default: v(() => [
|
|
4447
|
-
|
|
4483
|
+
O(w, {
|
|
4448
4484
|
modelValue: d.fields.name,
|
|
4449
4485
|
"onUpdate:modelValue": S[0] || (S[0] = (x) => d.fields.name = x),
|
|
4450
4486
|
modelModifiers: { trim: !0 },
|
|
@@ -4455,7 +4491,7 @@ const Po = {
|
|
|
4455
4491
|
readonly: d.isReadonly,
|
|
4456
4492
|
type: "text"
|
|
4457
4493
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
4458
|
-
|
|
4494
|
+
O(w, {
|
|
4459
4495
|
modelValue: d.fields.tags,
|
|
4460
4496
|
"onUpdate:modelValue": S[1] || (S[1] = (x) => d.fields.tags = x),
|
|
4461
4497
|
modelModifiers: { trim: !0 },
|
|
@@ -4477,7 +4513,7 @@ const Po = {
|
|
|
4477
4513
|
]);
|
|
4478
4514
|
};
|
|
4479
4515
|
}
|
|
4480
|
-
}),
|
|
4516
|
+
}), gs = /* @__PURE__ */ Gn(es, [["__scopeId", "data-v-29df09d7"]]), ts = { class: "kong-ui-entities-keys-entity-config-card" }, ms = /* @__PURE__ */ ne({
|
|
4481
4517
|
__name: "KeySetConfigCard",
|
|
4482
4518
|
props: {
|
|
4483
4519
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4504,7 +4540,7 @@ const Po = {
|
|
|
4504
4540
|
},
|
|
4505
4541
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
4506
4542
|
setup(e) {
|
|
4507
|
-
const n = e, { i18n: { t } } = pt.useI18n(), a = T(() =>
|
|
4543
|
+
const n = e, { i18n: { t } } = pt.useI18n(), a = T(() => Pe.form[n.config.app].edit), i = E({
|
|
4508
4544
|
id: {},
|
|
4509
4545
|
name: {},
|
|
4510
4546
|
last_updated: {},
|
|
@@ -4513,8 +4549,8 @@ const Po = {
|
|
|
4513
4549
|
tooltip: t("keySets.form.fields.tags.tooltip")
|
|
4514
4550
|
}
|
|
4515
4551
|
});
|
|
4516
|
-
return (r, o) => (
|
|
4517
|
-
|
|
4552
|
+
return (r, o) => (g(), _("div", ts, [
|
|
4553
|
+
O(k(ul), {
|
|
4518
4554
|
config: e.config,
|
|
4519
4555
|
"config-card-doc": e.configCardDoc,
|
|
4520
4556
|
"config-schema": i.value,
|
|
@@ -4529,7 +4565,7 @@ const Po = {
|
|
|
4529
4565
|
}
|
|
4530
4566
|
});
|
|
4531
4567
|
export {
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4568
|
+
ms as KeySetConfigCard,
|
|
4569
|
+
gs as KeySetForm,
|
|
4570
|
+
ys as KeySetList
|
|
4535
4571
|
};
|