@kong-ui-public/entities-keys 3.0.9 → 3.0.11
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-keys.es.js +990 -977
- package/dist/entities-keys.umd.js +22 -22
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/entities-keys.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as X, ref as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as X, ref as M, computed as I, watch as he, renderSlot as ee, createCommentVNode as J, unref as m, resolveComponent as U, openBlock as g, createElementBlock as K, createVNode as x, withCtx as b, createTextVNode as G, toDisplayString as F, useCssVars as an, useSlots as bt, createElementVNode as B, createSlots as Me, createBlock as R, resolveDynamicComponent as Te, normalizeProps as ra, guardReactiveProps as oa, Fragment as me, renderList as fe, mergeProps as la, normalizeClass as Ae, onBeforeMount as at, withModifiers as yt, withDirectives as Se, vShow as _e, withKeys as sa, inject as ca, onMounted as ua, onUnmounted as da, normalizeStyle as it, pushScopeId as rt, popScopeId as ot, reactive as Kt } from "vue";
|
|
2
|
+
import { useRouter as Ct } from "vue-router";
|
|
3
3
|
import { createI18n as rn, i18nTComponent as on } from "@kong-ui-public/i18n";
|
|
4
4
|
import Ot from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as pa } from "@kong/kongponents";
|
|
@@ -126,33 +126,21 @@ function ma() {
|
|
|
126
126
|
// Translation component <i18n-t>
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
const
|
|
129
|
+
const wt = {
|
|
130
130
|
useI18n: ma
|
|
131
|
-
},
|
|
131
|
+
}, Ce = "/v2/control-planes/{controlPlaneId}/core-entities", we = "/{workspace}", Ie = {
|
|
132
132
|
list: {
|
|
133
133
|
konnect: {
|
|
134
|
-
all: `${we}/keys`,
|
|
135
|
-
forKeySet: `${we}/key-sets/{keySetId}/keys`
|
|
136
|
-
},
|
|
137
|
-
kongManager: {
|
|
138
134
|
all: `${Ce}/keys`,
|
|
139
135
|
forKeySet: `${Ce}/key-sets/{keySetId}/keys`
|
|
136
|
+
},
|
|
137
|
+
kongManager: {
|
|
138
|
+
all: `${we}/keys`,
|
|
139
|
+
forKeySet: `${we}/key-sets/{keySetId}/keys`
|
|
140
140
|
}
|
|
141
141
|
},
|
|
142
142
|
form: {
|
|
143
143
|
konnect: {
|
|
144
|
-
create: {
|
|
145
|
-
all: `${we}/keys`,
|
|
146
|
-
forKeySet: `${we}/key-sets/{keySetId}/keys`
|
|
147
|
-
},
|
|
148
|
-
edit: {
|
|
149
|
-
all: `${we}/keys/{id}`,
|
|
150
|
-
forKeySet: `${we}/key-sets/{keySetId}/keys/{id}`
|
|
151
|
-
},
|
|
152
|
-
keySets: `${we}/key-sets`,
|
|
153
|
-
getKeySet: `${we}/key-sets/{keySetId}`
|
|
154
|
-
},
|
|
155
|
-
kongManager: {
|
|
156
144
|
create: {
|
|
157
145
|
all: `${Ce}/keys`,
|
|
158
146
|
forKeySet: `${Ce}/key-sets/{keySetId}/keys`
|
|
@@ -163,6 +151,18 @@ const Ct = {
|
|
|
163
151
|
},
|
|
164
152
|
keySets: `${Ce}/key-sets`,
|
|
165
153
|
getKeySet: `${Ce}/key-sets/{keySetId}`
|
|
154
|
+
},
|
|
155
|
+
kongManager: {
|
|
156
|
+
create: {
|
|
157
|
+
all: `${we}/keys`,
|
|
158
|
+
forKeySet: `${we}/key-sets/{keySetId}/keys`
|
|
159
|
+
},
|
|
160
|
+
edit: {
|
|
161
|
+
all: `${we}/keys/{id}`,
|
|
162
|
+
forKeySet: `${we}/key-sets/{keySetId}/keys/{id}`
|
|
163
|
+
},
|
|
164
|
+
keySets: `${we}/key-sets`,
|
|
165
|
+
getKeySet: `${we}/key-sets/{keySetId}`
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
};
|
|
@@ -252,10 +252,10 @@ const ba = {
|
|
|
252
252
|
copyToClipboard: "Copied successfully!",
|
|
253
253
|
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
254
254
|
}
|
|
255
|
-
},
|
|
255
|
+
}, Ca = {
|
|
256
256
|
message: "Are you sure you want to delete this {entityType}?",
|
|
257
257
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
258
|
-
},
|
|
258
|
+
}, wa = {
|
|
259
259
|
actions: {
|
|
260
260
|
viewConfiguration: "View Configuration",
|
|
261
261
|
save: "Save",
|
|
@@ -277,7 +277,7 @@ const ba = {
|
|
|
277
277
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
278
278
|
noSearchResultsCtaText: "Clear"
|
|
279
279
|
}
|
|
280
|
-
},
|
|
280
|
+
}, _a = {
|
|
281
281
|
title: "Configuration",
|
|
282
282
|
actions: {
|
|
283
283
|
copy: "Copy JSON"
|
|
@@ -312,7 +312,7 @@ const ba = {
|
|
|
312
312
|
entryTitle: "Entry {index}",
|
|
313
313
|
structuredFormat: "Structured"
|
|
314
314
|
}
|
|
315
|
-
},
|
|
315
|
+
}, Ia = {
|
|
316
316
|
filterButtonText: "Filter",
|
|
317
317
|
fieldLabel: "Filter by:",
|
|
318
318
|
inputPlaceholder: "Enter a value",
|
|
@@ -320,12 +320,12 @@ const ba = {
|
|
|
320
320
|
applyButtonText: "Apply",
|
|
321
321
|
clearButtonText: "Clear",
|
|
322
322
|
clearAllButtonText: "Clear all filters"
|
|
323
|
-
},
|
|
323
|
+
}, xa = {
|
|
324
324
|
errors: {
|
|
325
325
|
fetch: "Could not fetch available items",
|
|
326
326
|
invalid: "Please select a valid value"
|
|
327
327
|
}
|
|
328
|
-
},
|
|
328
|
+
}, Aa = {
|
|
329
329
|
unexpected: "An unexpected error has occurred",
|
|
330
330
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
331
331
|
}, ja = {
|
|
@@ -343,13 +343,13 @@ const ba = {
|
|
|
343
343
|
}
|
|
344
344
|
}, Ta = {
|
|
345
345
|
global: ba,
|
|
346
|
-
deleteModal:
|
|
347
|
-
baseForm:
|
|
346
|
+
deleteModal: Ca,
|
|
347
|
+
baseForm: wa,
|
|
348
348
|
baseTable: Sa,
|
|
349
|
-
baseConfigCard:
|
|
350
|
-
filter:
|
|
351
|
-
debouncedFilter:
|
|
352
|
-
errors:
|
|
349
|
+
baseConfigCard: _a,
|
|
350
|
+
filter: Ia,
|
|
351
|
+
debouncedFilter: xa,
|
|
352
|
+
errors: Aa,
|
|
353
353
|
validationErrors: ja,
|
|
354
354
|
toggleModal: $a
|
|
355
355
|
};
|
|
@@ -411,64 +411,64 @@ function Ka(e, t, n, a = {
|
|
|
411
411
|
}) {
|
|
412
412
|
n || (n = "1000");
|
|
413
413
|
const { axiosInstance: i } = St(e.axiosRequestConfig), { i18n: { t: r } } = lt(), { debounce: o } = ha(), l = o(async (v) => {
|
|
414
|
-
await
|
|
415
|
-
}, 200), c =
|
|
416
|
-
let
|
|
417
|
-
e.app === "konnect" ?
|
|
418
|
-
const { isValidUuid:
|
|
414
|
+
await D(v);
|
|
415
|
+
}, 200), c = M(!1), u = M(""), s = M(""), d = M([]), k = M([]), f = M(void 0), _ = m(t);
|
|
416
|
+
let $ = `${e.apiBaseUrl}${_}`;
|
|
417
|
+
e.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
418
|
+
const { isValidUuid: w } = sn(), q = async () => {
|
|
419
419
|
try {
|
|
420
420
|
c.value = !0;
|
|
421
|
-
const { data: v } = await i.get(`${
|
|
422
|
-
v != null && v.next || (f.value = a.fetchedItemsKey in v ? v[a.fetchedItemsKey] : []),
|
|
421
|
+
const { data: v } = await i.get(`${$}?size=${n}`);
|
|
422
|
+
v != null && v.next || (f.value = a.fetchedItemsKey in v ? v[a.fetchedItemsKey] : []), k.value = a.fetchedItemsKey in v ? v[a.fetchedItemsKey] : [], d.value = k.value;
|
|
423
423
|
} catch {
|
|
424
424
|
d.value = [], u.value = r("debouncedFilter.errors.fetch");
|
|
425
425
|
} finally {
|
|
426
426
|
c.value = !1;
|
|
427
427
|
}
|
|
428
|
-
},
|
|
429
|
-
var p,
|
|
430
|
-
if (
|
|
431
|
-
if (
|
|
428
|
+
}, h = M(""), D = async (v) => {
|
|
429
|
+
var p, y, S;
|
|
430
|
+
if (h.value !== v)
|
|
431
|
+
if (h.value = v || "", f.value === void 0)
|
|
432
432
|
try {
|
|
433
433
|
if (c.value = !0, u.value = "", s.value = "", e.app === "konnect") {
|
|
434
|
-
let
|
|
435
|
-
v && (
|
|
436
|
-
const { data:
|
|
437
|
-
a.fetchedItemsKey in
|
|
434
|
+
let L = $ + "";
|
|
435
|
+
v && (L += `/${v}`);
|
|
436
|
+
const { data: A } = await i.get(`${L}?size=${n}`);
|
|
437
|
+
a.fetchedItemsKey in A ? d.value = A[a.fetchedItemsKey] : A != null && A.id ? d.value = [A] : d.value = [];
|
|
438
438
|
} else if (v) {
|
|
439
|
-
const
|
|
440
|
-
|
|
441
|
-
const { data:
|
|
442
|
-
return [
|
|
443
|
-
})()) :
|
|
444
|
-
...a.searchKeys.filter((
|
|
445
|
-
const { data: O } = await i.get(`${
|
|
439
|
+
const L = [];
|
|
440
|
+
w(v) && a.searchKeys.includes("id") ? L.push((async () => {
|
|
441
|
+
const { data: N } = await i.get(`${$}/${v}`);
|
|
442
|
+
return [N[a.fetchedItemsKey] ?? N];
|
|
443
|
+
})()) : L.push(
|
|
444
|
+
...a.searchKeys.filter((N) => N !== "id").map(async (N) => {
|
|
445
|
+
const { data: O } = await i.get(`${$}?${N}=${v}`);
|
|
446
446
|
return O[a.fetchedItemsKey];
|
|
447
447
|
})
|
|
448
448
|
);
|
|
449
|
-
const
|
|
450
|
-
d.value = [], (p =
|
|
449
|
+
const A = await Promise.all(L), P = /* @__PURE__ */ new Set();
|
|
450
|
+
d.value = [], (p = A == null ? void 0 : A.forEach) == null || p.call(A, (N) => {
|
|
451
451
|
var O;
|
|
452
|
-
(O =
|
|
453
|
-
|
|
452
|
+
(O = N == null ? void 0 : N.forEach) == null || O.call(N, (z) => {
|
|
453
|
+
P.has(z.id) || (P.add(z.id), d.value.push(z));
|
|
454
454
|
});
|
|
455
455
|
});
|
|
456
456
|
} else
|
|
457
|
-
d.value =
|
|
458
|
-
} catch (
|
|
459
|
-
((
|
|
457
|
+
d.value = k.value;
|
|
458
|
+
} catch (L) {
|
|
459
|
+
((y = L == null ? void 0 : L.response) == null ? void 0 : y.status) === 404 ? s.value = r("debouncedFilter.errors.invalid") : (d.value = [], u.value = r("debouncedFilter.errors.fetch"));
|
|
460
460
|
} finally {
|
|
461
461
|
c.value = !1;
|
|
462
462
|
}
|
|
463
463
|
else
|
|
464
|
-
c.value = !0, s.value = "", v ? (d.value = (S = f.value) == null ? void 0 : S.filter((
|
|
465
|
-
var
|
|
466
|
-
let
|
|
467
|
-
for (const
|
|
468
|
-
const O = typeof
|
|
469
|
-
O != null && O.includes(v.toLowerCase()) && (
|
|
464
|
+
c.value = !0, s.value = "", v ? (d.value = (S = f.value) == null ? void 0 : S.filter((L) => {
|
|
465
|
+
var A;
|
|
466
|
+
let P = !1;
|
|
467
|
+
for (const N of a.searchKeys) {
|
|
468
|
+
const O = typeof L[N] == "string" ? (A = L[N]) == null ? void 0 : A.toLowerCase() : L[N];
|
|
469
|
+
O != null && O.includes(v.toLowerCase()) && (P = !0);
|
|
470
470
|
}
|
|
471
|
-
return
|
|
471
|
+
return P;
|
|
472
472
|
}), (!d.value || !d.value.length) && (s.value = r("debouncedFilter.errors.invalid"))) : d.value = f.value, c.value = !1;
|
|
473
473
|
};
|
|
474
474
|
return {
|
|
@@ -477,17 +477,17 @@ function Ka(e, t, n, a = {
|
|
|
477
477
|
validationError: s,
|
|
478
478
|
results: d,
|
|
479
479
|
allRecords: f,
|
|
480
|
-
loadItems:
|
|
480
|
+
loadItems: q,
|
|
481
481
|
debouncedQueryChange: l
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
484
|
function Oa(e, t) {
|
|
485
|
-
const n =
|
|
485
|
+
const n = m(t), a = I(
|
|
486
486
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
487
487
|
);
|
|
488
488
|
return a.value.search = "", (i) => `${a.value.href}/${i}`;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Na() {
|
|
491
491
|
const { i18n: { t: e } } = lt();
|
|
492
492
|
return {
|
|
493
493
|
getMessageFromError: (t) => {
|
|
@@ -517,7 +517,7 @@ function Ma() {
|
|
|
517
517
|
}
|
|
518
518
|
};
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function Ma(e) {
|
|
521
521
|
const t = window.location.origin, n = t.endsWith("/") ? t : `${t}/`;
|
|
522
522
|
try {
|
|
523
523
|
const a = e.join("/"), i = `${n}${a}`, r = e.some((o) => o.trim() === "");
|
|
@@ -529,25 +529,25 @@ function Ea(e) {
|
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
function cn(e, t) {
|
|
532
|
-
const n =
|
|
532
|
+
const n = M(m(e)), a = M(m(t)), i = I(
|
|
533
533
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
534
|
-
), r =
|
|
534
|
+
), r = I(
|
|
535
535
|
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
536
536
|
);
|
|
537
537
|
return (o) => {
|
|
538
|
-
const { page: l, pageSize: c, offset: u, sortColumnKey: s, sortColumnOrder: d, query:
|
|
538
|
+
const { page: l, pageSize: c, offset: u, sortColumnKey: s, sortColumnOrder: d, query: k } = o;
|
|
539
539
|
try {
|
|
540
540
|
let f = new URL(r.value.href);
|
|
541
|
-
return i.value &&
|
|
542
|
-
f.searchParams.append(
|
|
541
|
+
return i.value && k ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${k}/`) : new URL(`${f.href}?filter[name][contains]=${k}`)) : (i.value || new URLSearchParams(k).forEach((_, $) => {
|
|
542
|
+
f.searchParams.append($, _);
|
|
543
543
|
}), s && f.searchParams.append("sort_by", s), d === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(c))), u && l !== 1 && f.searchParams.append("offset", String(u)), f.href;
|
|
544
544
|
} catch (f) {
|
|
545
545
|
return console.error("RouteList(fetcher)", f), a.value;
|
|
546
546
|
}
|
|
547
547
|
};
|
|
548
548
|
}
|
|
549
|
-
function
|
|
550
|
-
const a =
|
|
549
|
+
function Fa(e, t, n = "data") {
|
|
550
|
+
const a = m(t), { axiosInstance: i } = St(e.axiosRequestConfig), r = cn(e, a), o = M({
|
|
551
551
|
status: Oe.Idle
|
|
552
552
|
});
|
|
553
553
|
return { fetcher: async (l) => {
|
|
@@ -559,10 +559,10 @@ function Na(e, t, n = "data") {
|
|
|
559
559
|
const s = await i.get(u);
|
|
560
560
|
if (s.status >= 400)
|
|
561
561
|
throw s;
|
|
562
|
-
const d = s.data,
|
|
562
|
+
const d = s.data, k = n && n.replace(/[^\w-_]/gi, "");
|
|
563
563
|
let f;
|
|
564
|
-
d[
|
|
565
|
-
const
|
|
564
|
+
d[k] && Array.isArray(d[k]) ? f = d[k] : Array.isArray(d) ? f = d : f = Object.keys(d).length ? [d] : [];
|
|
565
|
+
const _ = {
|
|
566
566
|
data: f,
|
|
567
567
|
total: f.length,
|
|
568
568
|
...d.offset ? {
|
|
@@ -573,8 +573,8 @@ function Na(e, t, n = "data") {
|
|
|
573
573
|
};
|
|
574
574
|
return o.value = {
|
|
575
575
|
status: Oe.Idle,
|
|
576
|
-
response:
|
|
577
|
-
},
|
|
576
|
+
response: _
|
|
577
|
+
}, _;
|
|
578
578
|
} catch (u) {
|
|
579
579
|
const s = {
|
|
580
580
|
data: [],
|
|
@@ -592,29 +592,29 @@ function Na(e, t, n = "data") {
|
|
|
592
592
|
}
|
|
593
593
|
}, fetcherState: o };
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function Ea() {
|
|
596
596
|
const e = (n, a = "_") => n ? n.split(a).map((i) => i.toLowerCase() === "id" ? i.toUpperCase() : i.charAt(0).toUpperCase() + i.substring(1)).join(" ") : "", t = /(?:^|[\s-:'"])\w/g;
|
|
597
597
|
return {
|
|
598
598
|
capitalize: (n) => n ? n.replace(t, (a) => a.toUpperCase()) : "",
|
|
599
599
|
convertKeyToTitle: e
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
|
-
const un = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,
|
|
602
|
+
const un = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Nt = (e) => {
|
|
603
603
|
if (typeof e != "string")
|
|
604
604
|
throw new TypeError("Invalid argument expected string");
|
|
605
605
|
const t = e.match(un);
|
|
606
606
|
if (!t)
|
|
607
607
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
608
608
|
return t.shift(), t;
|
|
609
|
-
},
|
|
609
|
+
}, Mt = (e) => e === "*" || e === "x" || e === "X", Ft = (e) => {
|
|
610
610
|
const t = parseInt(e, 10);
|
|
611
611
|
return isNaN(t) ? e : t;
|
|
612
612
|
}, qa = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], La = (e, t) => {
|
|
613
|
-
if (
|
|
613
|
+
if (Mt(e) || Mt(t))
|
|
614
614
|
return 0;
|
|
615
|
-
const [n, a] = qa(
|
|
615
|
+
const [n, a] = qa(Ft(e), Ft(t));
|
|
616
616
|
return n > a ? 1 : n < a ? -1 : 0;
|
|
617
|
-
},
|
|
617
|
+
}, Et = (e, t) => {
|
|
618
618
|
for (let n = 0; n < Math.max(e.length, t.length); n++) {
|
|
619
619
|
const a = La(e[n] || "0", t[n] || "0");
|
|
620
620
|
if (a !== 0)
|
|
@@ -622,8 +622,8 @@ const un = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
622
622
|
}
|
|
623
623
|
return 0;
|
|
624
624
|
}, Ba = (e, t) => {
|
|
625
|
-
const n =
|
|
626
|
-
return o !== 0 ? o : i && r ?
|
|
625
|
+
const n = Nt(e), a = Nt(t), i = n.pop(), r = a.pop(), o = Et(n, a);
|
|
626
|
+
return o !== 0 ? o : i && r ? Et(i.split("."), r.split(".")) : i || r ? i ? -1 : 1 : 0;
|
|
627
627
|
}, qt = (e, t, n) => {
|
|
628
628
|
Ua(n);
|
|
629
629
|
const a = Ba(e, t);
|
|
@@ -655,11 +655,11 @@ function Va(e) {
|
|
|
655
655
|
return !(o && qt(i, o, "<") || l && qt(i, l, ">"));
|
|
656
656
|
}
|
|
657
657
|
function Da(e) {
|
|
658
|
-
const t =
|
|
658
|
+
const t = M(0), n = M(0), a = M(!1);
|
|
659
659
|
return he(e, (i) => {
|
|
660
660
|
i && !a.value && (t.value = i.offsetWidth, n.value = i.scrollWidth, a.value = !0);
|
|
661
661
|
}), {
|
|
662
|
-
isTruncated:
|
|
662
|
+
isTruncated: I(() => t.value < n.value)
|
|
663
663
|
};
|
|
664
664
|
}
|
|
665
665
|
function Pa() {
|
|
@@ -672,12 +672,12 @@ const ie = {
|
|
|
672
672
|
useAxios: St,
|
|
673
673
|
useDebouncedFilter: Ka,
|
|
674
674
|
useDeleteUrlBuilder: Oa,
|
|
675
|
-
useErrors:
|
|
676
|
-
useExternalLinkCreator:
|
|
677
|
-
useFetcher:
|
|
675
|
+
useErrors: Na,
|
|
676
|
+
useExternalLinkCreator: Ma,
|
|
677
|
+
useFetcher: Fa,
|
|
678
678
|
useFetchUrlBuilder: cn,
|
|
679
679
|
useHelpers: sn,
|
|
680
|
-
useStringHelpers:
|
|
680
|
+
useStringHelpers: Ea,
|
|
681
681
|
useI18n: lt,
|
|
682
682
|
useGatewayFeatureSupported: Va,
|
|
683
683
|
useTruncationDetector: Da,
|
|
@@ -702,25 +702,25 @@ const ie = {
|
|
|
702
702
|
}
|
|
703
703
|
},
|
|
704
704
|
setup(e) {
|
|
705
|
-
const t = e, { i18n: { t: n } } = ie.useI18n(), { convertKeyToTitle: a } = ie.useStringHelpers(), i =
|
|
705
|
+
const t = e, { i18n: { t: n } } = ie.useI18n(), { convertKeyToTitle: a } = ie.useStringHelpers(), i = I(() => t.item.key ?? "json-array-item"), r = I(() => t.item.value ?? t.item), o = I(() => {
|
|
706
706
|
const c = JSON.parse(JSON.stringify(r.value));
|
|
707
707
|
return t.isArrayItem && delete c.name, c;
|
|
708
|
-
}), l =
|
|
708
|
+
}), l = I(() => {
|
|
709
709
|
var c;
|
|
710
710
|
return t.isArrayItem ? (c = r.value) != null && c.name ? a(r.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
711
711
|
});
|
|
712
|
-
return (c, u) => (
|
|
713
|
-
class:
|
|
712
|
+
return (c, u) => (g(), R(Te(e.isArrayItem ? "fieldset" : "div"), {
|
|
713
|
+
class: Ae(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
714
714
|
}, {
|
|
715
|
-
default:
|
|
716
|
-
e.isArrayItem ? (
|
|
717
|
-
|
|
715
|
+
default: b(() => [
|
|
716
|
+
e.isArrayItem ? (g(), K("legend", za, [
|
|
717
|
+
B("b", null, F(l.value), 1)
|
|
718
718
|
])) : J("", !0),
|
|
719
|
-
(
|
|
719
|
+
(g(!0), K(me, null, fe(Object.keys(o.value), (s, d) => (g(), R(Ge, {
|
|
720
720
|
key: `${i.value}-property-${d}`,
|
|
721
721
|
item: {
|
|
722
722
|
key: s,
|
|
723
|
-
label:
|
|
723
|
+
label: m(a)(s),
|
|
724
724
|
value: o.value[s]
|
|
725
725
|
}
|
|
726
726
|
}, null, 8, ["item"]))), 128))
|
|
@@ -745,15 +745,15 @@ const ie = {
|
|
|
745
745
|
setup(e) {
|
|
746
746
|
const { i18n: { t } } = ie.useI18n();
|
|
747
747
|
return (n, a) => {
|
|
748
|
-
const i =
|
|
749
|
-
return
|
|
748
|
+
const i = U("KButton");
|
|
749
|
+
return g(), K("div", null, [
|
|
750
750
|
x(i, {
|
|
751
751
|
appearance: "tertiary",
|
|
752
752
|
class: "navigation-button",
|
|
753
753
|
onClick: a[0] || (a[0] = (r) => n.$emit("navigation-click", e.item))
|
|
754
754
|
}, {
|
|
755
|
-
default:
|
|
756
|
-
G(
|
|
755
|
+
default: b(() => [
|
|
756
|
+
G(F(e.item.value || m(t)("baseConfigCard.commonFields.link")), 1)
|
|
757
757
|
]),
|
|
758
758
|
_: 1
|
|
759
759
|
})
|
|
@@ -771,12 +771,12 @@ const ie = {
|
|
|
771
771
|
setup(e) {
|
|
772
772
|
const { i18n: { t } } = ie.useI18n();
|
|
773
773
|
return (n, a) => {
|
|
774
|
-
const i =
|
|
775
|
-
return
|
|
774
|
+
const i = U("KBadge");
|
|
775
|
+
return g(), R(i, {
|
|
776
776
|
appearance: e.status ? "success" : "neutral"
|
|
777
777
|
}, {
|
|
778
|
-
default:
|
|
779
|
-
G(
|
|
778
|
+
default: b(() => [
|
|
779
|
+
G(F(e.status ? m(t)("baseConfigCard.statusBadge.enabledLabel") : m(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
780
780
|
]),
|
|
781
781
|
_: 1
|
|
782
782
|
}, 8, ["appearance"]);
|
|
@@ -805,13 +805,13 @@ const ie = {
|
|
|
805
805
|
},
|
|
806
806
|
emits: ["navigation-click"],
|
|
807
807
|
setup(e, { emit: t }) {
|
|
808
|
-
an((
|
|
809
|
-
"07753575": s.value ? "none" : `solid ${
|
|
808
|
+
an((_) => ({
|
|
809
|
+
"07753575": s.value ? "none" : `solid ${m(Xa)} ${m(Za)}`,
|
|
810
810
|
"32d44ea8": u.value && l.value ? "block" : "flex",
|
|
811
811
|
"5036b738": u.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
812
812
|
"5038fd13": u.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
813
813
|
}));
|
|
814
|
-
const n = e, a = t, i = bt(), { i18n: { t: r, formatUnixTimeStamp: o } } = ie.useI18n(), l =
|
|
814
|
+
const n = e, a = t, i = bt(), { i18n: { t: r, formatUnixTimeStamp: o } } = ie.useI18n(), l = I(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), c = I(() => !!(n.item.tooltip || i["label-tooltip"])), u = I(() => n.item.type === Z.Json || n.item.type === Z.JsonArray), s = I(() => n.item.type === Z.JsonArray), d = I(() => {
|
|
815
815
|
switch (n.item.type) {
|
|
816
816
|
case Z.ID:
|
|
817
817
|
return {
|
|
@@ -881,8 +881,8 @@ const ie = {
|
|
|
881
881
|
attrs: {
|
|
882
882
|
"data-testid": `${n.item.key}-internal-link`,
|
|
883
883
|
item: n.item,
|
|
884
|
-
onNavigationClick: (
|
|
885
|
-
a("navigation-click",
|
|
884
|
+
onNavigationClick: (_) => {
|
|
885
|
+
a("navigation-click", _);
|
|
886
886
|
}
|
|
887
887
|
}
|
|
888
888
|
};
|
|
@@ -921,29 +921,29 @@ const ie = {
|
|
|
921
921
|
text: n.item.value
|
|
922
922
|
};
|
|
923
923
|
}
|
|
924
|
-
}),
|
|
925
|
-
return (
|
|
926
|
-
const
|
|
927
|
-
return
|
|
928
|
-
|
|
924
|
+
}), k = M(), { isTruncated: f } = ie.useTruncationDetector(k);
|
|
925
|
+
return (_, $) => {
|
|
926
|
+
const w = U("KLabel"), q = U("KBadge"), h = U("KCopy"), D = U("KTooltip");
|
|
927
|
+
return g(), K("div", ti, [
|
|
928
|
+
B("div", {
|
|
929
929
|
class: "config-card-details-label",
|
|
930
930
|
"data-testid": `${e.item.key}-label`
|
|
931
931
|
}, [
|
|
932
|
-
ee(
|
|
933
|
-
x(
|
|
934
|
-
default:
|
|
935
|
-
G(
|
|
932
|
+
ee(_.$slots, "label", { item: e.item }, () => [
|
|
933
|
+
x(w, { "tooltip-attributes": { maxWidth: "500px" } }, Me({
|
|
934
|
+
default: b(() => [
|
|
935
|
+
G(F(e.item.label) + " ", 1)
|
|
936
936
|
]),
|
|
937
937
|
_: 2
|
|
938
938
|
}, [
|
|
939
939
|
c.value ? {
|
|
940
940
|
name: "tooltip",
|
|
941
|
-
fn:
|
|
942
|
-
|
|
941
|
+
fn: b(() => [
|
|
942
|
+
B("div", {
|
|
943
943
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
944
944
|
}, [
|
|
945
|
-
ee(
|
|
946
|
-
G(
|
|
945
|
+
ee(_.$slots, "label-tooltip", {}, () => [
|
|
946
|
+
G(F(e.item.tooltip), 1)
|
|
947
947
|
], !0)
|
|
948
948
|
], 8, ai)
|
|
949
949
|
]),
|
|
@@ -952,87 +952,87 @@ const ie = {
|
|
|
952
952
|
]), 1024)
|
|
953
953
|
], !0)
|
|
954
954
|
], 8, ni),
|
|
955
|
-
|
|
955
|
+
B("div", {
|
|
956
956
|
class: "config-card-details-value",
|
|
957
957
|
"data-testid": `${e.item.key}-property-value`
|
|
958
958
|
}, [
|
|
959
|
-
ee(
|
|
959
|
+
ee(_.$slots, e.item.key, {
|
|
960
960
|
rowValue: e.item.value
|
|
961
961
|
}, () => [
|
|
962
|
-
l.value ? (
|
|
963
|
-
(
|
|
964
|
-
default:
|
|
965
|
-
d.value.additionalComponent === "KBadge" ? (
|
|
962
|
+
l.value ? (g(), K("div", oi, [
|
|
963
|
+
(g(), R(Te(d.value.tag), ra(oa(d.value.attrs)), {
|
|
964
|
+
default: b(() => [
|
|
965
|
+
d.value.additionalComponent === "KBadge" ? (g(), K("div", {
|
|
966
966
|
key: 0,
|
|
967
967
|
"data-testid": `${e.item.key}-badge-tags`
|
|
968
968
|
}, [
|
|
969
|
-
(
|
|
969
|
+
(g(!0), K(me, null, fe(e.item.value, (v, p) => (g(), R(q, {
|
|
970
970
|
key: `${e.item.key}-badge-tag-${p}`,
|
|
971
971
|
class: "config-badge",
|
|
972
972
|
"data-testid": `${e.item.key}-badge-tag-${p}`,
|
|
973
973
|
tooltip: v,
|
|
974
974
|
"truncation-tooltip": ""
|
|
975
975
|
}, {
|
|
976
|
-
default:
|
|
977
|
-
G(
|
|
976
|
+
default: b(() => [
|
|
977
|
+
G(F(v), 1)
|
|
978
978
|
]),
|
|
979
979
|
_: 2
|
|
980
980
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
981
981
|
], 8, li)) : J("", !0),
|
|
982
|
-
d.value.additionalComponent === "KCopy" ? (
|
|
982
|
+
d.value.additionalComponent === "KCopy" ? (g(), K("div", {
|
|
983
983
|
key: 1,
|
|
984
984
|
class: "copy-uuid-array",
|
|
985
985
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
986
986
|
}, [
|
|
987
|
-
(
|
|
987
|
+
(g(!0), K(me, null, fe(e.item.value, (v, p) => (g(), R(h, la(d.value.childAttrs, {
|
|
988
988
|
key: `${e.item.key}-copy-uuid-${p}`,
|
|
989
989
|
"data-testid": `${e.item.key}-copy-uuid-${p}`,
|
|
990
990
|
text: v
|
|
991
991
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
992
|
-
], 8, si)) : d.value.additionalComponent === "KMethodBadge" ? (
|
|
992
|
+
], 8, si)) : d.value.additionalComponent === "KMethodBadge" ? (g(), K("div", {
|
|
993
993
|
key: 2,
|
|
994
994
|
class: "method-badge-array",
|
|
995
995
|
"data-testid": `${e.item.key}-badge-methods`
|
|
996
996
|
}, [
|
|
997
|
-
(
|
|
997
|
+
(g(!0), K(me, null, fe(e.item.value, (v, p) => (g(), R(q, {
|
|
998
998
|
key: `${e.item.key}-badge-method-${p}`,
|
|
999
|
-
appearance: Object.values(
|
|
999
|
+
appearance: Object.values(m(pa)).includes(v.toLowerCase()) ? v.toLowerCase() : "custom",
|
|
1000
1000
|
class: "config-badge",
|
|
1001
1001
|
"data-testid": `${e.item.key}-badge-method-${p}`
|
|
1002
1002
|
}, {
|
|
1003
|
-
default:
|
|
1004
|
-
G(
|
|
1003
|
+
default: b(() => [
|
|
1004
|
+
G(F(v), 1)
|
|
1005
1005
|
]),
|
|
1006
1006
|
_: 2
|
|
1007
1007
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1008
1008
|
], 8, ci)) : J("", !0),
|
|
1009
|
-
d.value.additionalComponent === "JsonCardItem" ? (
|
|
1009
|
+
d.value.additionalComponent === "JsonCardItem" ? (g(), K("div", {
|
|
1010
1010
|
key: 3,
|
|
1011
1011
|
"data-testid": `${n.item.key}-json-array-content`
|
|
1012
1012
|
}, [
|
|
1013
|
-
(
|
|
1013
|
+
(g(!0), K(me, null, fe(e.item.value, (v, p) => (g(), R(pn, {
|
|
1014
1014
|
key: `json-array-item-${p}`,
|
|
1015
1015
|
index: p,
|
|
1016
1016
|
"is-array-item": "",
|
|
1017
1017
|
item: v
|
|
1018
1018
|
}, null, 8, ["index", "item"]))), 128))
|
|
1019
|
-
], 8, ui)) : (
|
|
1019
|
+
], 8, ui)) : (g(), R(D, {
|
|
1020
1020
|
key: 4,
|
|
1021
|
-
text:
|
|
1021
|
+
text: m(f) ? e.item.value : ""
|
|
1022
1022
|
}, {
|
|
1023
|
-
default:
|
|
1024
|
-
|
|
1023
|
+
default: b(() => [
|
|
1024
|
+
B("span", {
|
|
1025
1025
|
ref_key: "textContent",
|
|
1026
|
-
ref:
|
|
1027
|
-
class:
|
|
1028
|
-
},
|
|
1026
|
+
ref: k,
|
|
1027
|
+
class: Ae(["attrs-data-text", { truncated: e.truncated }])
|
|
1028
|
+
}, F(d.value.text), 3)
|
|
1029
1029
|
]),
|
|
1030
1030
|
_: 1
|
|
1031
1031
|
}, 8, ["text"]))
|
|
1032
1032
|
]),
|
|
1033
1033
|
_: 1
|
|
1034
1034
|
}, 16))
|
|
1035
|
-
])) : (
|
|
1035
|
+
])) : (g(), K("div", {
|
|
1036
1036
|
key: 0,
|
|
1037
1037
|
"data-testid": `${e.item.key}-no-value`
|
|
1038
1038
|
}, " – ", 8, ri))
|
|
@@ -1075,7 +1075,7 @@ const ie = {
|
|
|
1075
1075
|
an((i) => ({
|
|
1076
1076
|
"4520e3ec": `${a.value}ch`
|
|
1077
1077
|
}));
|
|
1078
|
-
const t = e, n =
|
|
1078
|
+
const t = e, n = I(() => t.jsonRecord), a = I(() => {
|
|
1079
1079
|
var i;
|
|
1080
1080
|
if (!t.fetcherUrl)
|
|
1081
1081
|
return 0;
|
|
@@ -1083,14 +1083,14 @@ const ie = {
|
|
|
1083
1083
|
return r.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? r[r.length - 1] : r[r.length - 2]).length;
|
|
1084
1084
|
});
|
|
1085
1085
|
return (i, r) => {
|
|
1086
|
-
const o =
|
|
1087
|
-
return
|
|
1088
|
-
t.fetcherUrl ? (
|
|
1086
|
+
const o = U("KBadge"), l = U("KCodeBlock");
|
|
1087
|
+
return g(), K("div", fi, [
|
|
1088
|
+
t.fetcherUrl ? (g(), K("div", yi, [
|
|
1089
1089
|
x(o, {
|
|
1090
1090
|
appearance: t.requestMethod
|
|
1091
1091
|
}, {
|
|
1092
|
-
default:
|
|
1093
|
-
G(
|
|
1092
|
+
default: b(() => [
|
|
1093
|
+
G(F(t.requestMethod), 1)
|
|
1094
1094
|
]),
|
|
1095
1095
|
_: 1
|
|
1096
1096
|
}, 8, ["appearance"]),
|
|
@@ -1102,10 +1102,10 @@ const ie = {
|
|
|
1102
1102
|
theme: "dark"
|
|
1103
1103
|
}, null, 8, ["code"])
|
|
1104
1104
|
])) : J("", !0),
|
|
1105
|
-
t.jsonRecord ? (
|
|
1105
|
+
t.jsonRecord ? (g(), R(l, {
|
|
1106
1106
|
key: 1,
|
|
1107
1107
|
id: "json-codeblock",
|
|
1108
|
-
class:
|
|
1108
|
+
class: Ae({ "json-content": t.fetcherUrl }),
|
|
1109
1109
|
code: JSON.stringify(n.value, null, 2),
|
|
1110
1110
|
language: "json",
|
|
1111
1111
|
theme: "dark"
|
|
@@ -1140,13 +1140,13 @@ function vi(e, t) {
|
|
|
1140
1140
|
function ki(e) {
|
|
1141
1141
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1142
1142
|
}
|
|
1143
|
-
var bi = mn,
|
|
1143
|
+
var bi = mn, Ci = mi, wi = gi, Si = vi, _i = ki, Ii = hi, ae = {
|
|
1144
1144
|
isNothing: bi,
|
|
1145
|
-
isObject:
|
|
1146
|
-
toArray:
|
|
1145
|
+
isObject: Ci,
|
|
1146
|
+
toArray: wi,
|
|
1147
1147
|
repeat: Si,
|
|
1148
|
-
isNegativeZero:
|
|
1149
|
-
extend:
|
|
1148
|
+
isNegativeZero: _i,
|
|
1149
|
+
extend: Ii
|
|
1150
1150
|
};
|
|
1151
1151
|
function gn(e, t) {
|
|
1152
1152
|
var n = "", a = e.reason || "(unknown reason)";
|
|
@@ -1174,7 +1174,7 @@ function dt(e, t, n, a, i) {
|
|
|
1174
1174
|
function pt(e, t) {
|
|
1175
1175
|
return ae.repeat(" ", t - e.length) + e;
|
|
1176
1176
|
}
|
|
1177
|
-
function
|
|
1177
|
+
function xi(e, t) {
|
|
1178
1178
|
if (t = Object.create(t || null), !e.buffer)
|
|
1179
1179
|
return null;
|
|
1180
1180
|
t.maxLength || (t.maxLength = 79), typeof t.indent != "number" && (t.indent = 1), typeof t.linesBefore != "number" && (t.linesBefore = 3), typeof t.linesAfter != "number" && (t.linesAfter = 2);
|
|
@@ -1204,7 +1204,7 @@ function Ai(e, t) {
|
|
|
1204
1204
|
`;
|
|
1205
1205
|
return l.replace(/\n$/, "");
|
|
1206
1206
|
}
|
|
1207
|
-
var
|
|
1207
|
+
var Ai = xi, ji = [
|
|
1208
1208
|
"kind",
|
|
1209
1209
|
"multi",
|
|
1210
1210
|
"resolve",
|
|
@@ -1311,30 +1311,30 @@ var hn = mt, vn = new oe("tag:yaml.org,2002:str", {
|
|
|
1311
1311
|
construct: function(e) {
|
|
1312
1312
|
return e !== null ? e : {};
|
|
1313
1313
|
}
|
|
1314
|
-
}),
|
|
1314
|
+
}), Cn = new hn({
|
|
1315
1315
|
explicit: [
|
|
1316
1316
|
vn,
|
|
1317
1317
|
kn,
|
|
1318
1318
|
bn
|
|
1319
1319
|
]
|
|
1320
1320
|
});
|
|
1321
|
-
function
|
|
1321
|
+
function Ni(e) {
|
|
1322
1322
|
if (e === null)
|
|
1323
1323
|
return !0;
|
|
1324
1324
|
var t = e.length;
|
|
1325
1325
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function Mi() {
|
|
1328
1328
|
return null;
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function Fi(e) {
|
|
1331
1331
|
return e === null;
|
|
1332
1332
|
}
|
|
1333
|
-
var
|
|
1333
|
+
var wn = new oe("tag:yaml.org,2002:null", {
|
|
1334
1334
|
kind: "scalar",
|
|
1335
|
-
resolve:
|
|
1336
|
-
construct:
|
|
1337
|
-
predicate:
|
|
1335
|
+
resolve: Ni,
|
|
1336
|
+
construct: Mi,
|
|
1337
|
+
predicate: Fi,
|
|
1338
1338
|
represent: {
|
|
1339
1339
|
canonical: function() {
|
|
1340
1340
|
return "~";
|
|
@@ -1354,7 +1354,7 @@ var Cn = new oe("tag:yaml.org,2002:null", {
|
|
|
1354
1354
|
},
|
|
1355
1355
|
defaultStyle: "lowercase"
|
|
1356
1356
|
});
|
|
1357
|
-
function
|
|
1357
|
+
function Ei(e) {
|
|
1358
1358
|
if (e === null)
|
|
1359
1359
|
return !1;
|
|
1360
1360
|
var t = e.length;
|
|
@@ -1368,7 +1368,7 @@ function Li(e) {
|
|
|
1368
1368
|
}
|
|
1369
1369
|
var Sn = new oe("tag:yaml.org,2002:bool", {
|
|
1370
1370
|
kind: "scalar",
|
|
1371
|
-
resolve:
|
|
1371
|
+
resolve: Ei,
|
|
1372
1372
|
construct: qi,
|
|
1373
1373
|
predicate: Li,
|
|
1374
1374
|
represent: {
|
|
@@ -1457,7 +1457,7 @@ function Di(e) {
|
|
|
1457
1457
|
function Pi(e) {
|
|
1458
1458
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ae.isNegativeZero(e);
|
|
1459
1459
|
}
|
|
1460
|
-
var
|
|
1460
|
+
var _n = new oe("tag:yaml.org,2002:int", {
|
|
1461
1461
|
kind: "scalar",
|
|
1462
1462
|
resolve: Vi,
|
|
1463
1463
|
construct: Di,
|
|
@@ -1534,21 +1534,21 @@ function Yi(e, t) {
|
|
|
1534
1534
|
function Zi(e) {
|
|
1535
1535
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ae.isNegativeZero(e));
|
|
1536
1536
|
}
|
|
1537
|
-
var
|
|
1537
|
+
var In = new oe("tag:yaml.org,2002:float", {
|
|
1538
1538
|
kind: "scalar",
|
|
1539
1539
|
resolve: Ji,
|
|
1540
1540
|
construct: Hi,
|
|
1541
1541
|
predicate: Zi,
|
|
1542
1542
|
represent: Yi,
|
|
1543
1543
|
defaultStyle: "lowercase"
|
|
1544
|
-
}),
|
|
1544
|
+
}), xn = Cn.extend({
|
|
1545
1545
|
implicit: [
|
|
1546
|
-
|
|
1546
|
+
wn,
|
|
1547
1547
|
Sn,
|
|
1548
|
-
|
|
1549
|
-
|
|
1548
|
+
_n,
|
|
1549
|
+
In
|
|
1550
1550
|
]
|
|
1551
|
-
}),
|
|
1551
|
+
}), An = xn, jn = new RegExp(
|
|
1552
1552
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1553
1553
|
), $n = new RegExp(
|
|
1554
1554
|
"^([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]))?))?$"
|
|
@@ -1557,7 +1557,7 @@ function Gi(e) {
|
|
|
1557
1557
|
return e === null ? !1 : jn.exec(e) !== null || $n.exec(e) !== null;
|
|
1558
1558
|
}
|
|
1559
1559
|
function Qi(e) {
|
|
1560
|
-
var t, n, a, i, r, o, l, c = 0, u = null, s, d,
|
|
1560
|
+
var t, n, a, i, r, o, l, c = 0, u = null, s, d, k;
|
|
1561
1561
|
if (t = jn.exec(e), t === null && (t = $n.exec(e)), t === null)
|
|
1562
1562
|
throw new Error("Date resolve error");
|
|
1563
1563
|
if (n = +t[1], a = +t[2] - 1, i = +t[3], !t[4])
|
|
@@ -1567,7 +1567,7 @@ function Qi(e) {
|
|
|
1567
1567
|
c += "0";
|
|
1568
1568
|
c = +c;
|
|
1569
1569
|
}
|
|
1570
|
-
return t[9] && (s = +t[10], d = +(t[11] || 0), u = (s * 60 + d) * 6e4, t[9] === "-" && (u = -u)),
|
|
1570
|
+
return t[9] && (s = +t[10], d = +(t[11] || 0), u = (s * 60 + d) * 6e4, t[9] === "-" && (u = -u)), k = new Date(Date.UTC(n, a, i, r, o, l, c)), u && k.setTime(k.getTime() - u), k;
|
|
1571
1571
|
}
|
|
1572
1572
|
function Xi(e) {
|
|
1573
1573
|
return e.toISOString();
|
|
@@ -1585,12 +1585,12 @@ function er(e) {
|
|
|
1585
1585
|
var Kn = new oe("tag:yaml.org,2002:merge", {
|
|
1586
1586
|
kind: "scalar",
|
|
1587
1587
|
resolve: er
|
|
1588
|
-
}),
|
|
1588
|
+
}), _t = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1589
1589
|
\r`;
|
|
1590
1590
|
function tr(e) {
|
|
1591
1591
|
if (e === null)
|
|
1592
1592
|
return !1;
|
|
1593
|
-
var t, n, a = 0, i = e.length, r =
|
|
1593
|
+
var t, n, a = 0, i = e.length, r = _t;
|
|
1594
1594
|
for (n = 0; n < i; n++)
|
|
1595
1595
|
if (t = r.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1596
1596
|
if (t < 0)
|
|
@@ -1600,13 +1600,13 @@ function tr(e) {
|
|
|
1600
1600
|
return a % 8 === 0;
|
|
1601
1601
|
}
|
|
1602
1602
|
function nr(e) {
|
|
1603
|
-
var t, n, a = e.replace(/[\r\n=]/g, ""), i = a.length, r =
|
|
1603
|
+
var t, n, a = e.replace(/[\r\n=]/g, ""), i = a.length, r = _t, o = 0, l = [];
|
|
1604
1604
|
for (t = 0; t < i; t++)
|
|
1605
1605
|
t % 4 === 0 && t && (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)), o = o << 6 | r.indexOf(a.charAt(t));
|
|
1606
1606
|
return n = i % 4 * 6, n === 0 ? (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)) : n === 18 ? (l.push(o >> 10 & 255), l.push(o >> 2 & 255)) : n === 12 && l.push(o >> 4 & 255), new Uint8Array(l);
|
|
1607
1607
|
}
|
|
1608
1608
|
function ar(e) {
|
|
1609
|
-
var t = "", n = 0, a, i, r = e.length, o =
|
|
1609
|
+
var t = "", n = 0, a, i, r = e.length, o = _t;
|
|
1610
1610
|
for (a = 0; a < r; a++)
|
|
1611
1611
|
a % 3 === 0 && a && (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]), n = (n << 8) + e[a];
|
|
1612
1612
|
return i = r % 3, i === 0 ? (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]) : i === 2 ? (t += o[n >> 10 & 63], t += o[n >> 4 & 63], t += o[n << 2 & 63], t += o[64]) : i === 1 && (t += o[n >> 2 & 63], t += o[n << 4 & 63], t += o[64], t += o[64]), t;
|
|
@@ -1646,7 +1646,7 @@ function lr(e) {
|
|
|
1646
1646
|
function sr(e) {
|
|
1647
1647
|
return e !== null ? e : [];
|
|
1648
1648
|
}
|
|
1649
|
-
var
|
|
1649
|
+
var Nn = new oe("tag:yaml.org,2002:omap", {
|
|
1650
1650
|
kind: "sequence",
|
|
1651
1651
|
resolve: lr,
|
|
1652
1652
|
construct: sr
|
|
@@ -1670,7 +1670,7 @@ function dr(e) {
|
|
|
1670
1670
|
a = o[t], i = Object.keys(a), r[t] = [i[0], a[i[0]]];
|
|
1671
1671
|
return r;
|
|
1672
1672
|
}
|
|
1673
|
-
var
|
|
1673
|
+
var Mn = new oe("tag:yaml.org,2002:pairs", {
|
|
1674
1674
|
kind: "sequence",
|
|
1675
1675
|
resolve: ur,
|
|
1676
1676
|
construct: dr
|
|
@@ -1687,29 +1687,29 @@ function fr(e) {
|
|
|
1687
1687
|
function yr(e) {
|
|
1688
1688
|
return e !== null ? e : {};
|
|
1689
1689
|
}
|
|
1690
|
-
var
|
|
1690
|
+
var Fn = new oe("tag:yaml.org,2002:set", {
|
|
1691
1691
|
kind: "mapping",
|
|
1692
1692
|
resolve: fr,
|
|
1693
1693
|
construct: yr
|
|
1694
|
-
}),
|
|
1694
|
+
}), It = An.extend({
|
|
1695
1695
|
implicit: [
|
|
1696
1696
|
Tn,
|
|
1697
1697
|
Kn
|
|
1698
1698
|
],
|
|
1699
1699
|
explicit: [
|
|
1700
1700
|
On,
|
|
1701
|
+
Nn,
|
|
1701
1702
|
Mn,
|
|
1702
|
-
|
|
1703
|
-
Nn
|
|
1703
|
+
Fn
|
|
1704
1704
|
]
|
|
1705
|
-
}), je = Object.prototype.hasOwnProperty, Qe = 1,
|
|
1705
|
+
}), je = Object.prototype.hasOwnProperty, Qe = 1, En = 2, qn = 3, Xe = 4, ft = 1, mr = 2, Ut = 3, gr = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, hr = /[\x85\u2028\u2029]/, vr = /[,\[\]\{\}]/, Ln = /^(?:!|!!|![a-z\-]+!)$/i, Bn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1706
1706
|
function Rt(e) {
|
|
1707
1707
|
return Object.prototype.toString.call(e);
|
|
1708
1708
|
}
|
|
1709
1709
|
function ke(e) {
|
|
1710
1710
|
return e === 10 || e === 13;
|
|
1711
1711
|
}
|
|
1712
|
-
function
|
|
1712
|
+
function Ne(e) {
|
|
1713
1713
|
return e === 9 || e === 32;
|
|
1714
1714
|
}
|
|
1715
1715
|
function pe(e) {
|
|
@@ -1725,14 +1725,14 @@ function kr(e) {
|
|
|
1725
1725
|
function br(e) {
|
|
1726
1726
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1727
1727
|
}
|
|
1728
|
-
function
|
|
1728
|
+
function Cr(e) {
|
|
1729
1729
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1730
1730
|
}
|
|
1731
1731
|
function Vt(e) {
|
|
1732
1732
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1733
1733
|
` : 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" : "";
|
|
1734
1734
|
}
|
|
1735
|
-
function
|
|
1735
|
+
function wr(e) {
|
|
1736
1736
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1737
1737
|
(e - 65536 >> 10) + 55296,
|
|
1738
1738
|
(e - 65536 & 1023) + 56320
|
|
@@ -1742,7 +1742,7 @@ var Un = new Array(256), Rn = new Array(256);
|
|
|
1742
1742
|
for (var qe = 0; qe < 256; qe++)
|
|
1743
1743
|
Un[qe] = Vt(qe) ? 1 : 0, Rn[qe] = Vt(qe);
|
|
1744
1744
|
function Sr(e, t) {
|
|
1745
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema ||
|
|
1745
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || It, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.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 = [];
|
|
1746
1746
|
}
|
|
1747
1747
|
function Vn(e, t) {
|
|
1748
1748
|
var n = {
|
|
@@ -1753,7 +1753,7 @@ function Vn(e, t) {
|
|
|
1753
1753
|
line: e.line,
|
|
1754
1754
|
column: e.position - e.lineStart
|
|
1755
1755
|
};
|
|
1756
|
-
return n.snippet =
|
|
1756
|
+
return n.snippet = Ai(n), new ce(t, n);
|
|
1757
1757
|
}
|
|
1758
1758
|
function T(e, t) {
|
|
1759
1759
|
throw Vn(e, t);
|
|
@@ -1777,7 +1777,7 @@ var Dt = {
|
|
|
1777
1777
|
e.tagMap[a] = i;
|
|
1778
1778
|
}
|
|
1779
1779
|
};
|
|
1780
|
-
function
|
|
1780
|
+
function xe(e, t, n, a) {
|
|
1781
1781
|
var i, r, o, l;
|
|
1782
1782
|
if (t < n) {
|
|
1783
1783
|
if (l = e.input.slice(t, n), a)
|
|
@@ -1813,20 +1813,20 @@ function Ue(e, t, n, a, i, r, o, l, c) {
|
|
|
1813
1813
|
}) : t[i] = r, delete n[i];
|
|
1814
1814
|
return t;
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function xt(e) {
|
|
1817
1817
|
var t;
|
|
1818
1818
|
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : T(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1819
1819
|
}
|
|
1820
1820
|
function ne(e, t, n) {
|
|
1821
1821
|
for (var a = 0, i = e.input.charCodeAt(e.position); i !== 0; ) {
|
|
1822
|
-
for (;
|
|
1822
|
+
for (; Ne(i); )
|
|
1823
1823
|
i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
|
|
1824
1824
|
if (t && i === 35)
|
|
1825
1825
|
do
|
|
1826
1826
|
i = e.input.charCodeAt(++e.position);
|
|
1827
1827
|
while (i !== 10 && i !== 13 && i !== 0);
|
|
1828
1828
|
if (ke(i))
|
|
1829
|
-
for (
|
|
1829
|
+
for (xt(e), i = e.input.charCodeAt(e.position), a++, e.lineIndent = 0; i === 32; )
|
|
1830
1830
|
e.lineIndent++, i = e.input.charCodeAt(++e.position);
|
|
1831
1831
|
else
|
|
1832
1832
|
break;
|
|
@@ -1837,12 +1837,12 @@ function st(e) {
|
|
|
1837
1837
|
var t = e.position, n;
|
|
1838
1838
|
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || pe(n)));
|
|
1839
1839
|
}
|
|
1840
|
-
function
|
|
1840
|
+
function At(e, t) {
|
|
1841
1841
|
t === 1 ? e.result += " " : t > 1 && (e.result += ae.repeat(`
|
|
1842
1842
|
`, t - 1));
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1845
|
-
var a, i, r, o, l, c, u, s, d = e.kind,
|
|
1844
|
+
function _r(e, t, n) {
|
|
1845
|
+
var a, i, r, o, l, c, u, s, d = e.kind, k = e.result, f;
|
|
1846
1846
|
if (f = e.input.charCodeAt(e.position), pe(f) || Be(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (i = e.input.charCodeAt(e.position + 1), pe(i) || n && Be(i)))
|
|
1847
1847
|
return !1;
|
|
1848
1848
|
for (e.kind = "scalar", e.result = "", r = o = e.position, l = !1; f !== 0; ) {
|
|
@@ -1864,60 +1864,60 @@ function Ir(e, t, n) {
|
|
|
1864
1864
|
break;
|
|
1865
1865
|
}
|
|
1866
1866
|
}
|
|
1867
|
-
l && (
|
|
1867
|
+
l && (xe(e, r, o, !1), At(e, e.line - c), r = o = e.position, l = !1), Ne(f) || (o = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1868
1868
|
}
|
|
1869
|
-
return
|
|
1869
|
+
return xe(e, r, o, !1), e.result ? !0 : (e.kind = d, e.result = k, !1);
|
|
1870
1870
|
}
|
|
1871
|
-
function
|
|
1871
|
+
function Ir(e, t) {
|
|
1872
1872
|
var n, a, i;
|
|
1873
1873
|
if (n = e.input.charCodeAt(e.position), n !== 39)
|
|
1874
1874
|
return !1;
|
|
1875
1875
|
for (e.kind = "scalar", e.result = "", e.position++, a = i = e.position; (n = e.input.charCodeAt(e.position)) !== 0; )
|
|
1876
1876
|
if (n === 39)
|
|
1877
|
-
if (
|
|
1877
|
+
if (xe(e, a, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39)
|
|
1878
1878
|
a = e.position, e.position++, i = e.position;
|
|
1879
1879
|
else
|
|
1880
1880
|
return !0;
|
|
1881
1881
|
else
|
|
1882
|
-
ke(n) ? (
|
|
1882
|
+
ke(n) ? (xe(e, a, i, !0), At(e, ne(e, !1, t)), a = i = e.position) : e.position === e.lineStart && st(e) ? T(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
1883
1883
|
T(e, "unexpected end of the stream within a single quoted scalar");
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function xr(e, t) {
|
|
1886
1886
|
var n, a, i, r, o, l;
|
|
1887
1887
|
if (l = e.input.charCodeAt(e.position), l !== 34)
|
|
1888
1888
|
return !1;
|
|
1889
1889
|
for (e.kind = "scalar", e.result = "", e.position++, n = a = e.position; (l = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1890
1890
|
if (l === 34)
|
|
1891
|
-
return
|
|
1891
|
+
return xe(e, n, e.position, !0), e.position++, !0;
|
|
1892
1892
|
if (l === 92) {
|
|
1893
|
-
if (
|
|
1893
|
+
if (xe(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), ke(l))
|
|
1894
1894
|
ne(e, !1, t);
|
|
1895
1895
|
else if (l < 256 && Un[l])
|
|
1896
1896
|
e.result += Rn[l], e.position++;
|
|
1897
1897
|
else if ((o = br(l)) > 0) {
|
|
1898
1898
|
for (i = o, r = 0; i > 0; i--)
|
|
1899
1899
|
l = e.input.charCodeAt(++e.position), (o = kr(l)) >= 0 ? r = (r << 4) + o : T(e, "expected hexadecimal character");
|
|
1900
|
-
e.result +=
|
|
1900
|
+
e.result += wr(r), e.position++;
|
|
1901
1901
|
} else
|
|
1902
1902
|
T(e, "unknown escape sequence");
|
|
1903
1903
|
n = a = e.position;
|
|
1904
1904
|
} else
|
|
1905
|
-
ke(l) ? (
|
|
1905
|
+
ke(l) ? (xe(e, n, a, !0), At(e, ne(e, !1, t)), n = a = e.position) : e.position === e.lineStart && st(e) ? T(e, "unexpected end of the document within a double quoted scalar") : (e.position++, a = e.position);
|
|
1906
1906
|
}
|
|
1907
1907
|
T(e, "unexpected end of the stream within a double quoted scalar");
|
|
1908
1908
|
}
|
|
1909
|
-
function
|
|
1910
|
-
var n = !0, a, i, r, o = e.tag, l, c = e.anchor, u, s, d,
|
|
1911
|
-
if (
|
|
1909
|
+
function Ar(e, t) {
|
|
1910
|
+
var n = !0, a, i, r, o = e.tag, l, c = e.anchor, u, s, d, k, f, _ = /* @__PURE__ */ Object.create(null), $, w, q, h;
|
|
1911
|
+
if (h = e.input.charCodeAt(e.position), h === 91)
|
|
1912
1912
|
s = 93, f = !1, l = [];
|
|
1913
|
-
else if (
|
|
1913
|
+
else if (h === 123)
|
|
1914
1914
|
s = 125, f = !0, l = {};
|
|
1915
1915
|
else
|
|
1916
1916
|
return !1;
|
|
1917
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1918
|
-
if (ne(e, !0, t),
|
|
1917
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), h = e.input.charCodeAt(++e.position); h !== 0; ) {
|
|
1918
|
+
if (ne(e, !0, t), h = e.input.charCodeAt(e.position), h === s)
|
|
1919
1919
|
return e.position++, e.tag = o, e.anchor = c, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1920
|
-
n ?
|
|
1920
|
+
n ? h === 44 && T(e, "expected the node content, but found ','") : T(e, "missed comma between flow collection entries"), w = $ = q = null, d = k = !1, h === 63 && (u = e.input.charCodeAt(e.position + 1), pe(u) && (d = k = !0, e.position++, ne(e, !0, t))), a = e.line, i = e.lineStart, r = e.position, Re(e, t, Qe, !1, !0), w = e.tag, $ = e.result, ne(e, !0, t), h = e.input.charCodeAt(e.position), (k || e.line === a) && h === 58 && (d = !0, h = e.input.charCodeAt(++e.position), ne(e, !0, t), Re(e, t, Qe, !1, !0), q = e.result), f ? Ue(e, l, _, w, $, q, a, i, r) : d ? l.push(Ue(e, null, _, w, $, q, a, i, r)) : l.push($), ne(e, !0, t), h = e.input.charCodeAt(e.position), h === 44 ? (n = !0, h = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1921
1921
|
}
|
|
1922
1922
|
T(e, "unexpected end of the stream within a flow collection");
|
|
1923
1923
|
}
|
|
@@ -1932,21 +1932,21 @@ function jr(e, t) {
|
|
|
1932
1932
|
for (e.kind = "scalar", e.result = ""; d !== 0; )
|
|
1933
1933
|
if (d = e.input.charCodeAt(++e.position), d === 43 || d === 45)
|
|
1934
1934
|
ft === i ? i = d === 43 ? Ut : mr : T(e, "repeat of a chomping mode identifier");
|
|
1935
|
-
else if ((s =
|
|
1935
|
+
else if ((s = Cr(d)) >= 0)
|
|
1936
1936
|
s === 0 ? T(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? T(e, "repeat of an indentation width identifier") : (l = t + s - 1, o = !0);
|
|
1937
1937
|
else
|
|
1938
1938
|
break;
|
|
1939
|
-
if (
|
|
1939
|
+
if (Ne(d)) {
|
|
1940
1940
|
do
|
|
1941
1941
|
d = e.input.charCodeAt(++e.position);
|
|
1942
|
-
while (
|
|
1942
|
+
while (Ne(d));
|
|
1943
1943
|
if (d === 35)
|
|
1944
1944
|
do
|
|
1945
1945
|
d = e.input.charCodeAt(++e.position);
|
|
1946
1946
|
while (!ke(d) && d !== 0);
|
|
1947
1947
|
}
|
|
1948
1948
|
for (; d !== 0; ) {
|
|
1949
|
-
for (
|
|
1949
|
+
for (xt(e), e.lineIndent = 0, d = e.input.charCodeAt(e.position); (!o || e.lineIndent < l) && d === 32; )
|
|
1950
1950
|
e.lineIndent++, d = e.input.charCodeAt(++e.position);
|
|
1951
1951
|
if (!o && e.lineIndent > l && (l = e.lineIndent), ke(d)) {
|
|
1952
1952
|
c++;
|
|
@@ -1958,13 +1958,13 @@ function jr(e, t) {
|
|
|
1958
1958
|
`);
|
|
1959
1959
|
break;
|
|
1960
1960
|
}
|
|
1961
|
-
for (a ?
|
|
1961
|
+
for (a ? Ne(d) ? (u = !0, e.result += ae.repeat(`
|
|
1962
1962
|
`, r ? 1 + c : c)) : u ? (u = !1, e.result += ae.repeat(`
|
|
1963
1963
|
`, c + 1)) : c === 0 ? r && (e.result += " ") : e.result += ae.repeat(`
|
|
1964
1964
|
`, c) : e.result += ae.repeat(`
|
|
1965
1965
|
`, r ? 1 + c : c), r = !0, o = !0, c = 0, n = e.position; !ke(d) && d !== 0; )
|
|
1966
1966
|
d = e.input.charCodeAt(++e.position);
|
|
1967
|
-
|
|
1967
|
+
xe(e, n, e.position, !1);
|
|
1968
1968
|
}
|
|
1969
1969
|
return !0;
|
|
1970
1970
|
}
|
|
@@ -1985,35 +1985,35 @@ function zt(e, t) {
|
|
|
1985
1985
|
return l ? (e.tag = a, e.anchor = i, e.kind = "sequence", e.result = r, !0) : !1;
|
|
1986
1986
|
}
|
|
1987
1987
|
function $r(e, t, n) {
|
|
1988
|
-
var a, i, r, o, l, c, u = e.tag, s = e.anchor, d = {},
|
|
1988
|
+
var a, i, r, o, l, c, u = e.tag, s = e.anchor, d = {}, k = /* @__PURE__ */ Object.create(null), f = null, _ = null, $ = null, w = !1, q = !1, h;
|
|
1989
1989
|
if (e.firstTabInLine !== -1)
|
|
1990
1990
|
return !1;
|
|
1991
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = d),
|
|
1992
|
-
if (!
|
|
1993
|
-
|
|
1991
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = d), h = e.input.charCodeAt(e.position); h !== 0; ) {
|
|
1992
|
+
if (!w && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, T(e, "tab characters must not be used in indentation")), a = e.input.charCodeAt(e.position + 1), r = e.line, (h === 63 || h === 58) && pe(a))
|
|
1993
|
+
h === 63 ? (w && (Ue(e, d, k, f, _, null, o, l, c), f = _ = $ = null), q = !0, w = !0, i = !0) : w ? (w = !1, i = !0) : T(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, h = a;
|
|
1994
1994
|
else {
|
|
1995
|
-
if (o = e.line, l = e.lineStart, c = e.position, !Re(e, n,
|
|
1995
|
+
if (o = e.line, l = e.lineStart, c = e.position, !Re(e, n, En, !1, !0))
|
|
1996
1996
|
break;
|
|
1997
1997
|
if (e.line === r) {
|
|
1998
|
-
for (
|
|
1999
|
-
|
|
2000
|
-
if (
|
|
2001
|
-
|
|
2002
|
-
else if (
|
|
1998
|
+
for (h = e.input.charCodeAt(e.position); Ne(h); )
|
|
1999
|
+
h = e.input.charCodeAt(++e.position);
|
|
2000
|
+
if (h === 58)
|
|
2001
|
+
h = e.input.charCodeAt(++e.position), pe(h) || T(e, "a whitespace character is expected after the key-value separator within a block mapping"), w && (Ue(e, d, k, f, _, null, o, l, c), f = _ = $ = null), q = !0, w = !1, i = !1, f = e.tag, _ = e.result;
|
|
2002
|
+
else if (q)
|
|
2003
2003
|
T(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2004
2004
|
else
|
|
2005
2005
|
return e.tag = u, e.anchor = s, !0;
|
|
2006
|
-
} else if (
|
|
2006
|
+
} else if (q)
|
|
2007
2007
|
T(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2008
2008
|
else
|
|
2009
2009
|
return e.tag = u, e.anchor = s, !0;
|
|
2010
2010
|
}
|
|
2011
|
-
if ((e.line === r || e.lineIndent > t) && (
|
|
2011
|
+
if ((e.line === r || e.lineIndent > t) && (w && (o = e.line, l = e.lineStart, c = e.position), Re(e, t, Xe, !0, i) && (w ? _ = e.result : $ = e.result), w || (Ue(e, d, k, f, _, $, o, l, c), f = _ = $ = null), ne(e, !0, -1), h = e.input.charCodeAt(e.position)), (e.line === r || e.lineIndent > t) && h !== 0)
|
|
2012
2012
|
T(e, "bad indentation of a mapping entry");
|
|
2013
2013
|
else if (e.lineIndent < t)
|
|
2014
2014
|
break;
|
|
2015
2015
|
}
|
|
2016
|
-
return
|
|
2016
|
+
return w && Ue(e, d, k, f, _, null, o, l, c), q && (e.tag = u, e.anchor = s, e.kind = "mapping", e.result = d), q;
|
|
2017
2017
|
}
|
|
2018
2018
|
function Tr(e) {
|
|
2019
2019
|
var t, n = !1, a = !1, i, r, o;
|
|
@@ -2054,38 +2054,38 @@ function Or(e) {
|
|
|
2054
2054
|
return e.position === t && T(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), je.call(e.anchorMap, n) || T(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], ne(e, !0, -1), !0;
|
|
2055
2055
|
}
|
|
2056
2056
|
function Re(e, t, n, a, i) {
|
|
2057
|
-
var r, o, l, c = 1, u = !1, s = !1, d,
|
|
2057
|
+
var r, o, l, c = 1, u = !1, s = !1, d, k, f, _, $, w;
|
|
2058
2058
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, r = o = l = Xe === n || qn === n, a && ne(e, !0, -1) && (u = !0, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)), c === 1)
|
|
2059
2059
|
for (; Tr(e) || Kr(e); )
|
|
2060
2060
|
ne(e, !0, -1) ? (u = !0, l = r, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)) : l = !1;
|
|
2061
|
-
if (l && (l = u || i), (c === 1 || Xe === n) && (Qe === n ||
|
|
2061
|
+
if (l && (l = u || i), (c === 1 || Xe === n) && (Qe === n || En === n ? $ = t : $ = t + 1, w = e.position - e.lineStart, c === 1 ? l && (zt(e, w) || $r(e, w, $)) || Ar(e, $) ? s = !0 : (o && jr(e, $) || Ir(e, $) || xr(e, $) ? s = !0 : Or(e) ? (s = !0, (e.tag !== null || e.anchor !== null) && T(e, "alias node should not have any properties")) : _r(e, $, Qe === n) && (s = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (s = l && zt(e, w))), e.tag === null)
|
|
2062
2062
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2063
2063
|
else if (e.tag === "?") {
|
|
2064
|
-
for (e.result !== null && e.kind !== "scalar" && T(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), d = 0,
|
|
2065
|
-
if (
|
|
2066
|
-
e.result =
|
|
2064
|
+
for (e.result !== null && e.kind !== "scalar" && T(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), d = 0, k = e.implicitTypes.length; d < k; d += 1)
|
|
2065
|
+
if (_ = e.implicitTypes[d], _.resolve(e.result)) {
|
|
2066
|
+
e.result = _.construct(e.result), e.tag = _.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2067
2067
|
break;
|
|
2068
2068
|
}
|
|
2069
2069
|
} else if (e.tag !== "!") {
|
|
2070
2070
|
if (je.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2071
|
-
|
|
2071
|
+
_ = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2072
2072
|
else
|
|
2073
|
-
for (
|
|
2073
|
+
for (_ = null, f = e.typeMap.multi[e.kind || "fallback"], d = 0, k = f.length; d < k; d += 1)
|
|
2074
2074
|
if (e.tag.slice(0, f[d].tag.length) === f[d].tag) {
|
|
2075
|
-
|
|
2075
|
+
_ = f[d];
|
|
2076
2076
|
break;
|
|
2077
2077
|
}
|
|
2078
|
-
|
|
2078
|
+
_ || T(e, "unknown tag !<" + e.tag + ">"), e.result !== null && _.kind !== e.kind && T(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + _.kind + '", not "' + e.kind + '"'), _.resolve(e.result, e.tag) ? (e.result = _.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : T(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2079
2079
|
}
|
|
2080
2080
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || s;
|
|
2081
2081
|
}
|
|
2082
|
-
function
|
|
2082
|
+
function Nr(e) {
|
|
2083
2083
|
var t = e.position, n, a, i, r = !1, o;
|
|
2084
2084
|
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 && (ne(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
2085
2085
|
for (r = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !pe(o); )
|
|
2086
2086
|
o = e.input.charCodeAt(++e.position);
|
|
2087
2087
|
for (a = e.input.slice(n, e.position), i = [], a.length < 1 && T(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
2088
|
-
for (;
|
|
2088
|
+
for (; Ne(o); )
|
|
2089
2089
|
o = e.input.charCodeAt(++e.position);
|
|
2090
2090
|
if (o === 35) {
|
|
2091
2091
|
do
|
|
@@ -2099,7 +2099,7 @@ function Mr(e) {
|
|
|
2099
2099
|
o = e.input.charCodeAt(++e.position);
|
|
2100
2100
|
i.push(e.input.slice(n, e.position));
|
|
2101
2101
|
}
|
|
2102
|
-
o !== 0 &&
|
|
2102
|
+
o !== 0 && xt(e), je.call(Dt, a) ? Dt[a](e, a, i) : et(e, 'unknown document directive "' + a + '"');
|
|
2103
2103
|
}
|
|
2104
2104
|
if (ne(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, ne(e, !0, -1)) : r && T(e, "directives end mark is expected"), Re(e, e.lineIndent - 1, Xe, !1, !0), ne(e, !0, -1), e.checkLineBreaks && hr.test(e.input.slice(t, e.position)) && et(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && st(e)) {
|
|
2105
2105
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ne(e, !0, -1));
|
|
@@ -2117,10 +2117,10 @@ function Dn(e, t) {
|
|
|
2117
2117
|
for (a !== -1 && (n.position = a, T(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2118
2118
|
n.lineIndent += 1, n.position += 1;
|
|
2119
2119
|
for (; n.position < n.length - 1; )
|
|
2120
|
-
|
|
2120
|
+
Nr(n);
|
|
2121
2121
|
return n.documents;
|
|
2122
2122
|
}
|
|
2123
|
-
function
|
|
2123
|
+
function Mr(e, t, n) {
|
|
2124
2124
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
2125
2125
|
var a = Dn(e, n);
|
|
2126
2126
|
if (typeof t != "function")
|
|
@@ -2128,7 +2128,7 @@ function Er(e, t, n) {
|
|
|
2128
2128
|
for (var i = 0, r = a.length; i < r; i += 1)
|
|
2129
2129
|
t(a[i]);
|
|
2130
2130
|
}
|
|
2131
|
-
function
|
|
2131
|
+
function Fr(e, t) {
|
|
2132
2132
|
var n = Dn(e, t);
|
|
2133
2133
|
if (n.length !== 0) {
|
|
2134
2134
|
if (n.length === 1)
|
|
@@ -2136,8 +2136,8 @@ function Nr(e, t) {
|
|
|
2136
2136
|
throw new ce("expected a single document in the stream, but found more");
|
|
2137
2137
|
}
|
|
2138
2138
|
}
|
|
2139
|
-
var
|
|
2140
|
-
loadAll:
|
|
2139
|
+
var Er = Mr, qr = Fr, Pn = {
|
|
2140
|
+
loadAll: Er,
|
|
2141
2141
|
load: qr
|
|
2142
2142
|
}, zn = Object.prototype.toString, Jn = Object.prototype.hasOwnProperty, jt = 65279, Lr = 9, ze = 10, Br = 13, Ur = 32, Rr = 33, Vr = 34, gt = 35, Dr = 37, Pr = 38, zr = 39, Jr = 42, Hn = 44, Hr = 45, tt = 58, Wr = 61, Yr = 62, Zr = 63, Gr = 64, Wn = 91, Yn = 93, Qr = 96, Zn = 123, Xr = 124, Gn = 125, le = {};
|
|
2143
2143
|
le[0] = "\\0";
|
|
@@ -2195,7 +2195,7 @@ function ao(e) {
|
|
|
2195
2195
|
}
|
|
2196
2196
|
var io = 1, Je = 2;
|
|
2197
2197
|
function ro(e) {
|
|
2198
|
-
this.schema = e.schema ||
|
|
2198
|
+
this.schema = e.schema || It, 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 = no(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 === '"' ? Je : io, 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;
|
|
2199
2199
|
}
|
|
2200
2200
|
function Jt(e, t) {
|
|
2201
2201
|
for (var n = ae.repeat(" ", t), a = 0, i = -1, r = "", o, l = e.length; a < l; )
|
|
@@ -2250,25 +2250,25 @@ function Qn(e) {
|
|
|
2250
2250
|
}
|
|
2251
2251
|
var Xn = 1, vt = 2, ea = 3, ta = 4, Le = 5;
|
|
2252
2252
|
function co(e, t, n, a, i, r, o, l) {
|
|
2253
|
-
var c, u = 0, s = null, d = !1,
|
|
2253
|
+
var c, u = 0, s = null, d = !1, k = !1, f = a !== -1, _ = -1, $ = lo(De(e, 0)) && so(De(e, e.length - 1));
|
|
2254
2254
|
if (t || o)
|
|
2255
2255
|
for (c = 0; c < e.length; u >= 65536 ? c += 2 : c++) {
|
|
2256
2256
|
if (u = De(e, c), !He(u))
|
|
2257
2257
|
return Le;
|
|
2258
|
-
|
|
2258
|
+
$ = $ && Wt(u, s, l), s = u;
|
|
2259
2259
|
}
|
|
2260
2260
|
else {
|
|
2261
2261
|
for (c = 0; c < e.length; u >= 65536 ? c += 2 : c++) {
|
|
2262
2262
|
if (u = De(e, c), u === ze)
|
|
2263
|
-
d = !0, f && (
|
|
2264
|
-
c -
|
|
2263
|
+
d = !0, f && (k = k || // Foldable line = too long, and not more-indented.
|
|
2264
|
+
c - _ - 1 > a && e[_ + 1] !== " ", _ = c);
|
|
2265
2265
|
else if (!He(u))
|
|
2266
2266
|
return Le;
|
|
2267
|
-
|
|
2267
|
+
$ = $ && Wt(u, s, l), s = u;
|
|
2268
2268
|
}
|
|
2269
|
-
|
|
2269
|
+
k = k || f && c - _ - 1 > a && e[_ + 1] !== " ";
|
|
2270
2270
|
}
|
|
2271
|
-
return !d && !
|
|
2271
|
+
return !d && !k ? $ && !o && !i(e) ? Xn : r === Je ? Le : vt : n > 9 && Qn(e) ? Le : o ? r === Je ? Le : vt : k ? ta : ea;
|
|
2272
2272
|
}
|
|
2273
2273
|
function uo(e, t, n, a, i) {
|
|
2274
2274
|
e.dump = function() {
|
|
@@ -2364,7 +2364,7 @@ function mo(e, t, n) {
|
|
|
2364
2364
|
e.tag = i, e.dump = "{" + a + "}";
|
|
2365
2365
|
}
|
|
2366
2366
|
function go(e, t, n, a) {
|
|
2367
|
-
var i = "", r = e.tag, o = Object.keys(n), l, c, u, s, d,
|
|
2367
|
+
var i = "", r = e.tag, o = Object.keys(n), l, c, u, s, d, k;
|
|
2368
2368
|
if (e.sortKeys === !0)
|
|
2369
2369
|
o.sort();
|
|
2370
2370
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2372,7 +2372,7 @@ function go(e, t, n, a) {
|
|
|
2372
2372
|
else if (e.sortKeys)
|
|
2373
2373
|
throw new ce("sortKeys must be a boolean or a function");
|
|
2374
2374
|
for (l = 0, c = o.length; l < c; l += 1)
|
|
2375
|
-
|
|
2375
|
+
k = "", (!a || i !== "") && (k += ht(e, t)), u = o[l], s = n[u], e.replacer && (s = e.replacer.call(n, u, s)), be(e, t + 1, u, !0, !0, !0) && (d = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, d && (e.dump && ze === e.dump.charCodeAt(0) ? k += "?" : k += "? "), k += e.dump, d && (k += ht(e, t)), be(e, t + 1, s, !0, d) && (e.dump && ze === e.dump.charCodeAt(0) ? k += ":" : k += ": ", k += e.dump, i += k));
|
|
2376
2376
|
e.tag = r, e.dump = i || "{}";
|
|
2377
2377
|
}
|
|
2378
2378
|
function Xt(e, t, n) {
|
|
@@ -2396,14 +2396,14 @@ function be(e, t, n, a, i, r, o) {
|
|
|
2396
2396
|
e.tag = null, e.dump = n, Xt(e, n, !1) || Xt(e, n, !0);
|
|
2397
2397
|
var l = zn.call(e.dump), c = a, u;
|
|
2398
2398
|
a && (a = e.flowLevel < 0 || e.flowLevel > t);
|
|
2399
|
-
var s = l === "[object Object]" || l === "[object Array]", d,
|
|
2400
|
-
if (s && (d = e.duplicates.indexOf(n),
|
|
2399
|
+
var s = l === "[object Object]" || l === "[object Array]", d, k;
|
|
2400
|
+
if (s && (d = e.duplicates.indexOf(n), k = d !== -1), (e.tag !== null && e.tag !== "?" || k || e.indent !== 2 && t > 0) && (i = !1), k && e.usedDuplicates[d])
|
|
2401
2401
|
e.dump = "*ref_" + d;
|
|
2402
2402
|
else {
|
|
2403
|
-
if (s &&
|
|
2404
|
-
a && Object.keys(e.dump).length !== 0 ? (go(e, t, e.dump, i),
|
|
2403
|
+
if (s && k && !e.usedDuplicates[d] && (e.usedDuplicates[d] = !0), l === "[object Object]")
|
|
2404
|
+
a && Object.keys(e.dump).length !== 0 ? (go(e, t, e.dump, i), k && (e.dump = "&ref_" + d + e.dump)) : (mo(e, t, e.dump), k && (e.dump = "&ref_" + d + " " + e.dump));
|
|
2405
2405
|
else if (l === "[object Array]")
|
|
2406
|
-
a && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? Qt(e, t - 1, e.dump, i) : Qt(e, t, e.dump, i),
|
|
2406
|
+
a && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? Qt(e, t - 1, e.dump, i) : Qt(e, t, e.dump, i), k && (e.dump = "&ref_" + d + e.dump)) : (yo(e, t, e.dump), k && (e.dump = "&ref_" + d + " " + e.dump));
|
|
2407
2407
|
else if (l === "[object String]")
|
|
2408
2408
|
e.tag !== "?" && uo(e, e.dump, t, r, c);
|
|
2409
2409
|
else {
|
|
@@ -2451,37 +2451,37 @@ function $t(e, t) {
|
|
|
2451
2451
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2452
2452
|
};
|
|
2453
2453
|
}
|
|
2454
|
-
var
|
|
2454
|
+
var Co = oe, wo = hn, So = Cn, _o = xn, Io = An, xo = It, Ao = Pn.load, jo = Pn.loadAll, $o = bo.dump, To = ce, Ko = {
|
|
2455
2455
|
binary: On,
|
|
2456
|
-
float:
|
|
2456
|
+
float: In,
|
|
2457
2457
|
map: bn,
|
|
2458
|
-
null:
|
|
2459
|
-
pairs:
|
|
2460
|
-
set:
|
|
2458
|
+
null: wn,
|
|
2459
|
+
pairs: Mn,
|
|
2460
|
+
set: Fn,
|
|
2461
2461
|
timestamp: Tn,
|
|
2462
2462
|
bool: Sn,
|
|
2463
|
-
int:
|
|
2463
|
+
int: _n,
|
|
2464
2464
|
merge: Kn,
|
|
2465
|
-
omap:
|
|
2465
|
+
omap: Nn,
|
|
2466
2466
|
seq: kn,
|
|
2467
2467
|
str: vn
|
|
2468
|
-
}, Oo = $t("safeLoad", "load"),
|
|
2469
|
-
Type:
|
|
2470
|
-
Schema:
|
|
2468
|
+
}, Oo = $t("safeLoad", "load"), No = $t("safeLoadAll", "loadAll"), Mo = $t("safeDump", "dump"), Fo = {
|
|
2469
|
+
Type: Co,
|
|
2470
|
+
Schema: wo,
|
|
2471
2471
|
FAILSAFE_SCHEMA: So,
|
|
2472
|
-
JSON_SCHEMA:
|
|
2473
|
-
CORE_SCHEMA:
|
|
2474
|
-
DEFAULT_SCHEMA:
|
|
2475
|
-
load:
|
|
2472
|
+
JSON_SCHEMA: _o,
|
|
2473
|
+
CORE_SCHEMA: Io,
|
|
2474
|
+
DEFAULT_SCHEMA: xo,
|
|
2475
|
+
load: Ao,
|
|
2476
2476
|
loadAll: jo,
|
|
2477
2477
|
dump: $o,
|
|
2478
2478
|
YAMLException: To,
|
|
2479
2479
|
types: Ko,
|
|
2480
2480
|
safeLoad: Oo,
|
|
2481
|
-
safeLoadAll:
|
|
2482
|
-
safeDump:
|
|
2481
|
+
safeLoadAll: No,
|
|
2482
|
+
safeDump: Mo
|
|
2483
2483
|
};
|
|
2484
|
-
const
|
|
2484
|
+
const Eo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
2485
2485
|
__name: "YamlCodeBlock",
|
|
2486
2486
|
props: {
|
|
2487
2487
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2491,14 +2491,14 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2491
2491
|
}
|
|
2492
2492
|
},
|
|
2493
2493
|
setup(e) {
|
|
2494
|
-
const t = e, n =
|
|
2494
|
+
const t = e, n = I(() => {
|
|
2495
2495
|
const a = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, i]) => i !== null && i !== "" && (Array.isArray(i) ? i.length !== 0 : !0)));
|
|
2496
|
-
return Object.keys(a).length === 0 && a.constructor === Object ? "" :
|
|
2496
|
+
return Object.keys(a).length === 0 && a.constructor === Object ? "" : Fo.dump(a).trim();
|
|
2497
2497
|
});
|
|
2498
2498
|
return (a, i) => {
|
|
2499
|
-
const r =
|
|
2500
|
-
return
|
|
2501
|
-
t.yamlRecord ? (
|
|
2499
|
+
const r = U("KCodeBlock");
|
|
2500
|
+
return g(), K("div", Eo, [
|
|
2501
|
+
t.yamlRecord ? (g(), R(r, {
|
|
2502
2502
|
key: 0,
|
|
2503
2503
|
id: "yaml-codeblock",
|
|
2504
2504
|
code: n.value,
|
|
@@ -2553,28 +2553,28 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2553
2553
|
}
|
|
2554
2554
|
},
|
|
2555
2555
|
setup(e) {
|
|
2556
|
-
const t = e, n = bt(), { i18n: { t: a } } = ie.useI18n(), i = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), r =
|
|
2556
|
+
const t = e, n = bt(), { i18n: { t: a } } = ie.useI18n(), i = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), r = I(() => {
|
|
2557
2557
|
if (!t.record)
|
|
2558
2558
|
return t.record;
|
|
2559
2559
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
2560
2560
|
return delete o.created_at, delete o.updated_at, o;
|
|
2561
2561
|
});
|
|
2562
|
-
return (o, l) => (
|
|
2563
|
-
e.format === "structured" ? (
|
|
2564
|
-
(
|
|
2562
|
+
return (o, l) => (g(), K(me, null, [
|
|
2563
|
+
e.format === "structured" ? (g(), K("div", qo, [
|
|
2564
|
+
(g(!0), K(me, null, fe(e.propListTypes, (c) => (g(), K("div", {
|
|
2565
2565
|
key: `config-card-details-${c}-props`,
|
|
2566
|
-
class:
|
|
2566
|
+
class: Ae(`config-card-details-${c}-props`),
|
|
2567
2567
|
"data-testid": `config-card-details-${c}-props`
|
|
2568
2568
|
}, [
|
|
2569
|
-
c !== "basic" ? (
|
|
2570
|
-
(
|
|
2569
|
+
c !== "basic" ? (g(), K("div", Bo, F(c === "advanced" ? m(a)("baseConfigCard.sections.advanced") : m(a)("baseConfigCard.sections.plugin")), 1)) : J("", !0),
|
|
2570
|
+
(g(!0), K(me, null, fe(e.propertyCollections[c], (u) => (g(), R(Ge, {
|
|
2571
2571
|
key: u.key,
|
|
2572
2572
|
item: u
|
|
2573
|
-
},
|
|
2574
|
-
label:
|
|
2573
|
+
}, Me({
|
|
2574
|
+
label: b(() => [
|
|
2575
2575
|
ee(o.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2576
2576
|
]),
|
|
2577
|
-
[u.key]:
|
|
2577
|
+
[u.key]: b(({ rowValue: s }) => [
|
|
2578
2578
|
ee(o.$slots, u.key, {
|
|
2579
2579
|
row: u,
|
|
2580
2580
|
rowValue: s
|
|
@@ -2584,7 +2584,7 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2584
2584
|
}, [
|
|
2585
2585
|
i(u) ? {
|
|
2586
2586
|
name: "label-tooltip",
|
|
2587
|
-
fn:
|
|
2587
|
+
fn: b(() => [
|
|
2588
2588
|
ee(o.$slots, `${u.key}-label-tooltip`, { row: u }, void 0, !0)
|
|
2589
2589
|
]),
|
|
2590
2590
|
key: "0"
|
|
@@ -2592,14 +2592,14 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2592
2592
|
]), 1032, ["item"]))), 128))
|
|
2593
2593
|
], 10, Lo))), 128))
|
|
2594
2594
|
])) : J("", !0),
|
|
2595
|
-
e.format === "json" && t.record ? (
|
|
2595
|
+
e.format === "json" && t.record ? (g(), R(yn, {
|
|
2596
2596
|
key: 1,
|
|
2597
2597
|
config: t.config,
|
|
2598
2598
|
"fetcher-url": t.fetcherUrl,
|
|
2599
2599
|
"json-record": r.value,
|
|
2600
2600
|
"request-method": "get"
|
|
2601
2601
|
}, null, 8, ["config", "fetcher-url", "json-record"])) : J("", !0),
|
|
2602
|
-
e.format === "yaml" && t.record ? (
|
|
2602
|
+
e.format === "yaml" && t.record ? (g(), R(na, {
|
|
2603
2603
|
key: 2,
|
|
2604
2604
|
"yaml-record": r.value
|
|
2605
2605
|
}, null, 8, ["yaml-record"])) : J("", !0)
|
|
@@ -2610,10 +2610,10 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2610
2610
|
for (const [a, i] of t)
|
|
2611
2611
|
n[a] = i;
|
|
2612
2612
|
return n;
|
|
2613
|
-
}, Vo = (e) => (rt("data-v-
|
|
2613
|
+
}, Vo = (e) => (rt("data-v-1d2a8d30"), e = e(), ot(), e), Do = ["aria-hidden"], Po = {
|
|
2614
2614
|
key: 0,
|
|
2615
2615
|
"data-testid": "kui-icon-svg-title"
|
|
2616
|
-
}, zo = /* @__PURE__ */ Vo(() => /* @__PURE__ */
|
|
2616
|
+
}, zo = /* @__PURE__ */ Vo(() => /* @__PURE__ */ B("path", {
|
|
2617
2617
|
d: "M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",
|
|
2618
2618
|
fill: "currentColor"
|
|
2619
2619
|
}, null, -1)), Jo = /* @__PURE__ */ X({
|
|
@@ -2668,7 +2668,7 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2668
2668
|
}
|
|
2669
2669
|
},
|
|
2670
2670
|
setup(e) {
|
|
2671
|
-
const t = e, n =
|
|
2671
|
+
const t = e, n = I(() => {
|
|
2672
2672
|
if (typeof t.size == "number" && t.size > 0)
|
|
2673
2673
|
return `${t.size}px`;
|
|
2674
2674
|
if (typeof t.size == "string") {
|
|
@@ -2677,7 +2677,7 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2677
2677
|
return `${r}px`;
|
|
2678
2678
|
}
|
|
2679
2679
|
return $e;
|
|
2680
|
-
}), a =
|
|
2680
|
+
}), a = I(() => ({
|
|
2681
2681
|
boxSizing: "border-box",
|
|
2682
2682
|
color: t.color,
|
|
2683
2683
|
display: t.display,
|
|
@@ -2685,14 +2685,14 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2685
2685
|
lineHeight: "0",
|
|
2686
2686
|
width: n.value
|
|
2687
2687
|
}));
|
|
2688
|
-
return (i, r) => (
|
|
2688
|
+
return (i, r) => (g(), R(Te(e.as), {
|
|
2689
2689
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2690
2690
|
class: "kui-icon add-icon",
|
|
2691
2691
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
2692
2692
|
style: it(a.value)
|
|
2693
2693
|
}, {
|
|
2694
|
-
default:
|
|
2695
|
-
(
|
|
2694
|
+
default: b(() => [
|
|
2695
|
+
(g(), K("svg", {
|
|
2696
2696
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2697
2697
|
"data-testid": "kui-icon-svg-add-icon",
|
|
2698
2698
|
fill: "none",
|
|
@@ -2702,17 +2702,17 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2702
2702
|
width: "100%",
|
|
2703
2703
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2704
2704
|
}, [
|
|
2705
|
-
e.title ? (
|
|
2705
|
+
e.title ? (g(), K("title", Po, F(e.title), 1)) : J("", !0),
|
|
2706
2706
|
zo
|
|
2707
2707
|
], 8, Do))
|
|
2708
2708
|
]),
|
|
2709
2709
|
_: 1
|
|
2710
2710
|
}, 8, ["aria-hidden", "style"]));
|
|
2711
2711
|
}
|
|
2712
|
-
}), Ho = /* @__PURE__ */ ct(Jo, [["__scopeId", "data-v-
|
|
2712
|
+
}), Ho = /* @__PURE__ */ ct(Jo, [["__scopeId", "data-v-1d2a8d30"]]), Wo = (e) => (rt("data-v-929b4762"), e = e(), ot(), e), Yo = ["aria-hidden"], Zo = {
|
|
2713
2713
|
key: 0,
|
|
2714
2714
|
"data-testid": "kui-icon-svg-title"
|
|
2715
|
-
}, Go = /* @__PURE__ */ Wo(() => /* @__PURE__ */
|
|
2715
|
+
}, Go = /* @__PURE__ */ Wo(() => /* @__PURE__ */ B("path", {
|
|
2716
2716
|
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",
|
|
2717
2717
|
fill: "currentColor"
|
|
2718
2718
|
}, null, -1)), Qo = /* @__PURE__ */ X({
|
|
@@ -2767,7 +2767,7 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2767
2767
|
}
|
|
2768
2768
|
},
|
|
2769
2769
|
setup(e) {
|
|
2770
|
-
const t = e, n =
|
|
2770
|
+
const t = e, n = I(() => {
|
|
2771
2771
|
if (typeof t.size == "number" && t.size > 0)
|
|
2772
2772
|
return `${t.size}px`;
|
|
2773
2773
|
if (typeof t.size == "string") {
|
|
@@ -2776,7 +2776,7 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2776
2776
|
return `${r}px`;
|
|
2777
2777
|
}
|
|
2778
2778
|
return $e;
|
|
2779
|
-
}), a =
|
|
2779
|
+
}), a = I(() => ({
|
|
2780
2780
|
boxSizing: "border-box",
|
|
2781
2781
|
color: t.color,
|
|
2782
2782
|
display: t.display,
|
|
@@ -2784,14 +2784,14 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2784
2784
|
lineHeight: "0",
|
|
2785
2785
|
width: n.value
|
|
2786
2786
|
}));
|
|
2787
|
-
return (i, r) => (
|
|
2787
|
+
return (i, r) => (g(), R(Te(e.as), {
|
|
2788
2788
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2789
2789
|
class: "kui-icon book-icon",
|
|
2790
2790
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2791
2791
|
style: it(a.value)
|
|
2792
2792
|
}, {
|
|
2793
|
-
default:
|
|
2794
|
-
(
|
|
2793
|
+
default: b(() => [
|
|
2794
|
+
(g(), K("svg", {
|
|
2795
2795
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2796
2796
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2797
2797
|
fill: "none",
|
|
@@ -2801,17 +2801,17 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2801
2801
|
width: "100%",
|
|
2802
2802
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2803
2803
|
}, [
|
|
2804
|
-
e.title ? (
|
|
2804
|
+
e.title ? (g(), K("title", Zo, F(e.title), 1)) : J("", !0),
|
|
2805
2805
|
Go
|
|
2806
2806
|
], 8, Yo))
|
|
2807
2807
|
]),
|
|
2808
2808
|
_: 1
|
|
2809
2809
|
}, 8, ["aria-hidden", "style"]));
|
|
2810
2810
|
}
|
|
2811
|
-
}), Xo = /* @__PURE__ */ ct(Qo, [["__scopeId", "data-v-
|
|
2811
|
+
}), Xo = /* @__PURE__ */ ct(Qo, [["__scopeId", "data-v-929b4762"]]), el = (e) => (rt("data-v-219f8484"), e = e(), ot(), e), tl = ["aria-hidden"], nl = {
|
|
2812
2812
|
key: 0,
|
|
2813
2813
|
"data-testid": "kui-icon-svg-title"
|
|
2814
|
-
}, al = /* @__PURE__ */ el(() => /* @__PURE__ */
|
|
2814
|
+
}, al = /* @__PURE__ */ el(() => /* @__PURE__ */ B("path", {
|
|
2815
2815
|
d: "M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",
|
|
2816
2816
|
fill: "currentColor"
|
|
2817
2817
|
}, null, -1)), il = /* @__PURE__ */ X({
|
|
@@ -2866,7 +2866,7 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2866
2866
|
}
|
|
2867
2867
|
},
|
|
2868
2868
|
setup(e) {
|
|
2869
|
-
const t = e, n =
|
|
2869
|
+
const t = e, n = I(() => {
|
|
2870
2870
|
if (typeof t.size == "number" && t.size > 0)
|
|
2871
2871
|
return `${t.size}px`;
|
|
2872
2872
|
if (typeof t.size == "string") {
|
|
@@ -2875,7 +2875,7 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2875
2875
|
return `${r}px`;
|
|
2876
2876
|
}
|
|
2877
2877
|
return $e;
|
|
2878
|
-
}), a =
|
|
2878
|
+
}), a = I(() => ({
|
|
2879
2879
|
boxSizing: "border-box",
|
|
2880
2880
|
color: t.color,
|
|
2881
2881
|
display: t.display,
|
|
@@ -2883,14 +2883,14 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2883
2883
|
lineHeight: "0",
|
|
2884
2884
|
width: n.value
|
|
2885
2885
|
}));
|
|
2886
|
-
return (i, r) => (
|
|
2886
|
+
return (i, r) => (g(), R(Te(e.as), {
|
|
2887
2887
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2888
2888
|
class: "kui-icon chevron-down-icon",
|
|
2889
2889
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
2890
2890
|
style: it(a.value)
|
|
2891
2891
|
}, {
|
|
2892
|
-
default:
|
|
2893
|
-
(
|
|
2892
|
+
default: b(() => [
|
|
2893
|
+
(g(), K("svg", {
|
|
2894
2894
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2895
2895
|
"data-testid": "kui-icon-svg-chevron-down-icon",
|
|
2896
2896
|
fill: "none",
|
|
@@ -2900,17 +2900,17 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2900
2900
|
width: "100%",
|
|
2901
2901
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2902
2902
|
}, [
|
|
2903
|
-
e.title ? (
|
|
2903
|
+
e.title ? (g(), K("title", nl, F(e.title), 1)) : J("", !0),
|
|
2904
2904
|
al
|
|
2905
2905
|
], 8, tl))
|
|
2906
2906
|
]),
|
|
2907
2907
|
_: 1
|
|
2908
2908
|
}, 8, ["aria-hidden", "style"]));
|
|
2909
2909
|
}
|
|
2910
|
-
}), rl = /* @__PURE__ */ ct(il, [["__scopeId", "data-v-
|
|
2910
|
+
}), rl = /* @__PURE__ */ ct(il, [["__scopeId", "data-v-219f8484"]]), ol = (e) => (rt("data-v-ed11facd"), e = e(), ot(), e), ll = ["aria-hidden"], sl = {
|
|
2911
2911
|
key: 0,
|
|
2912
2912
|
"data-testid": "kui-icon-svg-title"
|
|
2913
|
-
}, cl = /* @__PURE__ */ ol(() => /* @__PURE__ */
|
|
2913
|
+
}, cl = /* @__PURE__ */ ol(() => /* @__PURE__ */ B("path", {
|
|
2914
2914
|
d: "M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",
|
|
2915
2915
|
fill: "currentColor"
|
|
2916
2916
|
}, null, -1)), ul = /* @__PURE__ */ X({
|
|
@@ -2965,7 +2965,7 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2965
2965
|
}
|
|
2966
2966
|
},
|
|
2967
2967
|
setup(e) {
|
|
2968
|
-
const t = e, n =
|
|
2968
|
+
const t = e, n = I(() => {
|
|
2969
2969
|
if (typeof t.size == "number" && t.size > 0)
|
|
2970
2970
|
return `${t.size}px`;
|
|
2971
2971
|
if (typeof t.size == "string") {
|
|
@@ -2974,7 +2974,7 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2974
2974
|
return `${r}px`;
|
|
2975
2975
|
}
|
|
2976
2976
|
return $e;
|
|
2977
|
-
}), a =
|
|
2977
|
+
}), a = I(() => ({
|
|
2978
2978
|
boxSizing: "border-box",
|
|
2979
2979
|
color: t.color,
|
|
2980
2980
|
display: t.display,
|
|
@@ -2982,14 +2982,14 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2982
2982
|
lineHeight: "0",
|
|
2983
2983
|
width: n.value
|
|
2984
2984
|
}));
|
|
2985
|
-
return (i, r) => (
|
|
2985
|
+
return (i, r) => (g(), R(Te(e.as), {
|
|
2986
2986
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2987
2987
|
class: "kui-icon close-icon",
|
|
2988
2988
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
2989
2989
|
style: it(a.value)
|
|
2990
2990
|
}, {
|
|
2991
|
-
default:
|
|
2992
|
-
(
|
|
2991
|
+
default: b(() => [
|
|
2992
|
+
(g(), K("svg", {
|
|
2993
2993
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2994
2994
|
"data-testid": "kui-icon-svg-close-icon",
|
|
2995
2995
|
fill: "none",
|
|
@@ -2999,14 +2999,14 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
2999
2999
|
width: "100%",
|
|
3000
3000
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3001
3001
|
}, [
|
|
3002
|
-
e.title ? (
|
|
3002
|
+
e.title ? (g(), K("title", sl, F(e.title), 1)) : J("", !0),
|
|
3003
3003
|
cl
|
|
3004
3004
|
], 8, ll))
|
|
3005
3005
|
]),
|
|
3006
3006
|
_: 1
|
|
3007
3007
|
}, 8, ["aria-hidden", "style"]));
|
|
3008
3008
|
}
|
|
3009
|
-
}), dl = /* @__PURE__ */ ct(ul, [["__scopeId", "data-v-
|
|
3009
|
+
}), dl = /* @__PURE__ */ ct(ul, [["__scopeId", "data-v-ed11facd"]]), pl = {
|
|
3010
3010
|
class: "config-card-title",
|
|
3011
3011
|
"data-testid": "config-card-title"
|
|
3012
3012
|
}, fl = { class: "config-card-actions" }, yl = ["href"], ml = { class: "config-card-details-section" }, gl = /* @__PURE__ */ X({
|
|
@@ -3102,9 +3102,9 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3102
3102
|
label: "YAML",
|
|
3103
3103
|
value: "yaml"
|
|
3104
3104
|
}
|
|
3105
|
-
], s =
|
|
3106
|
-
s.value =
|
|
3107
|
-
},
|
|
3105
|
+
], s = M("structured"), d = (y) => {
|
|
3106
|
+
s.value = y == null ? void 0 : y.value;
|
|
3107
|
+
}, k = {
|
|
3108
3108
|
id: {
|
|
3109
3109
|
type: Z.ID,
|
|
3110
3110
|
label: r("baseConfigCard.commonFields.id_label"),
|
|
@@ -3138,21 +3138,21 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3138
3138
|
// the last property displayed
|
|
3139
3139
|
section: se.Basic
|
|
3140
3140
|
}
|
|
3141
|
-
}, f =
|
|
3142
|
-
var
|
|
3143
|
-
if (!
|
|
3141
|
+
}, f = M(!1), _ = M(!1), $ = M(""), w = M({}), q = I(() => {
|
|
3142
|
+
var y, S, L;
|
|
3143
|
+
if (!w.value)
|
|
3144
3144
|
return [];
|
|
3145
|
-
const
|
|
3146
|
-
for (const
|
|
3147
|
-
const O = (S = (
|
|
3148
|
-
let W =
|
|
3149
|
-
(z || z === 0) && (W = z === -1 ?
|
|
3145
|
+
const A = [], P = Object.keys(w.value).length;
|
|
3146
|
+
for (const N in w.value) {
|
|
3147
|
+
const O = (S = (y = i.configSchema) == null ? void 0 : y[N]) == null ? void 0 : S.order, z = (L = k[N]) == null ? void 0 : L.order;
|
|
3148
|
+
let W = P;
|
|
3149
|
+
(z || z === 0) && (W = z === -1 ? P + 1 : z), O && (W = O === -1 ? P + 1 : O), A.push([N, W]);
|
|
3150
3150
|
}
|
|
3151
|
-
return
|
|
3152
|
-
return
|
|
3153
|
-
}),
|
|
3151
|
+
return A.sort(function(N, O) {
|
|
3152
|
+
return N[1] - O[1];
|
|
3153
|
+
}), A.map((N) => {
|
|
3154
3154
|
var O, z;
|
|
3155
|
-
const W =
|
|
3155
|
+
const W = N[0], ue = (O = w.value) == null ? void 0 : O[W], de = ((z = i.configSchema) == null ? void 0 : z[W]) || {}, ye = k[W];
|
|
3156
3156
|
return {
|
|
3157
3157
|
key: W,
|
|
3158
3158
|
value: ue,
|
|
@@ -3162,22 +3162,22 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3162
3162
|
tooltip: de.tooltip ?? ((ye == null ? void 0 : ye.tooltip) || void 0),
|
|
3163
3163
|
section: de.section ?? ((ye == null ? void 0 : ye.section) || se.Advanced)
|
|
3164
3164
|
};
|
|
3165
|
-
}).filter((
|
|
3166
|
-
}),
|
|
3167
|
-
var
|
|
3168
|
-
if (!
|
|
3165
|
+
}).filter((N) => !N.hidden && N.key !== i.pluginConfigKey);
|
|
3166
|
+
}), h = I(() => {
|
|
3167
|
+
var y, S;
|
|
3168
|
+
if (!w.value || !i.pluginConfigKey)
|
|
3169
3169
|
return [];
|
|
3170
|
-
const
|
|
3171
|
-
for (const
|
|
3172
|
-
const O = (S = (
|
|
3173
|
-
let W = z != null && z !== "" ?
|
|
3174
|
-
O && (W = O === -1 ?
|
|
3170
|
+
const L = w.value[i.pluginConfigKey] || {}, A = Object.keys(L).length, P = [];
|
|
3171
|
+
for (const N in L) {
|
|
3172
|
+
const O = (S = (y = i.pluginConfigSchema) == null ? void 0 : y[N]) == null ? void 0 : S.order, z = L[N];
|
|
3173
|
+
let W = z != null && z !== "" ? A - 1 : A;
|
|
3174
|
+
O && (W = O === -1 ? A + 1 : O), P.push([N, W]);
|
|
3175
3175
|
}
|
|
3176
|
-
return
|
|
3177
|
-
return
|
|
3178
|
-
}),
|
|
3176
|
+
return P.sort(function(N, O) {
|
|
3177
|
+
return N[1] - O[1];
|
|
3178
|
+
}), P.map((N) => {
|
|
3179
3179
|
var O;
|
|
3180
|
-
const z =
|
|
3180
|
+
const z = N[0], W = L[z], ue = ((O = i.pluginConfigSchema) == null ? void 0 : O[z]) || {};
|
|
3181
3181
|
return {
|
|
3182
3182
|
key: z,
|
|
3183
3183
|
value: W,
|
|
@@ -3187,115 +3187,115 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3187
3187
|
tooltip: ue.tooltip ?? void 0,
|
|
3188
3188
|
section: se.Plugin
|
|
3189
3189
|
};
|
|
3190
|
-
}).filter((
|
|
3191
|
-
}),
|
|
3192
|
-
var
|
|
3190
|
+
}).filter((N) => !N.hidden);
|
|
3191
|
+
}), D = I(() => {
|
|
3192
|
+
var y, S, L, A;
|
|
3193
3193
|
return {
|
|
3194
|
-
basic: (
|
|
3195
|
-
advanced: (S =
|
|
3196
|
-
plugin: (
|
|
3194
|
+
basic: (y = q.value) == null ? void 0 : y.filter((P) => P.section === se.Basic),
|
|
3195
|
+
advanced: (S = q.value) == null ? void 0 : S.filter((P) => P.section === se.Advanced),
|
|
3196
|
+
plugin: (A = h.value) == null ? void 0 : A.concat((L = q.value) == null ? void 0 : L.filter((P) => P.section === se.Plugin))
|
|
3197
3197
|
};
|
|
3198
|
-
}), v =
|
|
3199
|
-
const
|
|
3200
|
-
return
|
|
3201
|
-
}), p =
|
|
3202
|
-
var
|
|
3203
|
-
let
|
|
3204
|
-
return i.config.app === "konnect" ?
|
|
3198
|
+
}), v = I(() => {
|
|
3199
|
+
const y = [];
|
|
3200
|
+
return D.value.basic.length && y.push("basic"), D.value.advanced.length && y.push("advanced"), D.value.plugin.length && y.push("plugin"), y;
|
|
3201
|
+
}), p = I(() => {
|
|
3202
|
+
var y, S;
|
|
3203
|
+
let L = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3204
|
+
return i.config.app === "konnect" ? L = L.replace(/{controlPlaneId}/gi, ((y = i.config) == null ? void 0 : y.controlPlaneId) || "") : i.config.app === "kongManager" && (L = L.replace(/\/{workspace}/gi, (S = i.config) != null && S.workspace ? `/${i.config.workspace}` : "")), L = L.replace(/{id}/gi, i.config.entityId), L;
|
|
3205
3205
|
});
|
|
3206
|
-
return he(f, (
|
|
3207
|
-
a("loading",
|
|
3206
|
+
return he(f, (y) => {
|
|
3207
|
+
a("loading", y);
|
|
3208
3208
|
}, { immediate: !0 }), at(async () => {
|
|
3209
|
-
|
|
3209
|
+
_.value = !1, f.value = !0;
|
|
3210
3210
|
try {
|
|
3211
|
-
const { data:
|
|
3211
|
+
const { data: y } = await c.get(p.value);
|
|
3212
3212
|
if (i.dataKey)
|
|
3213
|
-
if (typeof
|
|
3214
|
-
|
|
3213
|
+
if (typeof y[i.dataKey] < "u")
|
|
3214
|
+
w.value = { ...y[i.dataKey] };
|
|
3215
3215
|
else
|
|
3216
3216
|
throw new Error(r("errors.dataKeyUndefined", { dataKey: i.dataKey }));
|
|
3217
3217
|
else
|
|
3218
|
-
|
|
3218
|
+
w.value = { ...y };
|
|
3219
3219
|
Object.keys(i.configSchema).filter((S) => i.configSchema[S].forceShow).forEach((S) => {
|
|
3220
|
-
|
|
3221
|
-
}), a("fetch:success",
|
|
3222
|
-
} catch (
|
|
3223
|
-
const S = o(
|
|
3224
|
-
|
|
3220
|
+
w.value && typeof w.value[S] > "u" && (w.value[S] = null);
|
|
3221
|
+
}), a("fetch:success", y);
|
|
3222
|
+
} catch (y) {
|
|
3223
|
+
const S = o(y);
|
|
3224
|
+
$.value = S.startsWith("code") ? r("baseConfigCard.errors.load") : S, _.value = !0, a("fetch:error", y);
|
|
3225
3225
|
} finally {
|
|
3226
3226
|
f.value = !1;
|
|
3227
3227
|
}
|
|
3228
|
-
}), (
|
|
3229
|
-
const
|
|
3230
|
-
return
|
|
3228
|
+
}), (y, S) => {
|
|
3229
|
+
const L = U("KLabel"), A = U("KSelect"), P = U("KButton"), N = U("KSkeleton"), O = U("KEmptyState"), z = U("KCard");
|
|
3230
|
+
return g(), R(z, {
|
|
3231
3231
|
class: "kong-ui-entity-base-config-card",
|
|
3232
3232
|
"title-tag": e.titleTag
|
|
3233
|
-
},
|
|
3234
|
-
actions:
|
|
3235
|
-
|
|
3236
|
-
ee(
|
|
3237
|
-
x(
|
|
3233
|
+
}, Me({
|
|
3234
|
+
actions: b(() => [
|
|
3235
|
+
B("div", fl, [
|
|
3236
|
+
ee(y.$slots, "actions", {}, void 0, !0),
|
|
3237
|
+
x(L, {
|
|
3238
3238
|
class: "config-format-select-label",
|
|
3239
3239
|
"data-testid": "config-format-select-label"
|
|
3240
3240
|
}, {
|
|
3241
|
-
default:
|
|
3242
|
-
G(
|
|
3241
|
+
default: b(() => [
|
|
3242
|
+
G(F(e.label), 1)
|
|
3243
3243
|
]),
|
|
3244
3244
|
_: 1
|
|
3245
3245
|
}),
|
|
3246
|
-
x(
|
|
3246
|
+
x(A, {
|
|
3247
3247
|
"data-testid": "select-config-format",
|
|
3248
3248
|
items: u,
|
|
3249
3249
|
onChange: d
|
|
3250
3250
|
}),
|
|
3251
|
-
e.configCardDoc ? (
|
|
3251
|
+
e.configCardDoc ? (g(), R(P, {
|
|
3252
3252
|
key: 0,
|
|
3253
3253
|
appearance: "tertiary",
|
|
3254
3254
|
class: "book-icon",
|
|
3255
3255
|
"data-testid": "book-icon"
|
|
3256
3256
|
}, {
|
|
3257
|
-
default:
|
|
3258
|
-
|
|
3257
|
+
default: b(() => [
|
|
3258
|
+
B("a", {
|
|
3259
3259
|
href: e.configCardDoc,
|
|
3260
3260
|
rel: "noopener",
|
|
3261
3261
|
target: "_blank"
|
|
3262
3262
|
}, [
|
|
3263
|
-
x(
|
|
3263
|
+
x(m(Xo), { size: m(ei) }, null, 8, ["size"])
|
|
3264
3264
|
], 8, yl)
|
|
3265
3265
|
]),
|
|
3266
3266
|
_: 1
|
|
3267
3267
|
})) : J("", !0)
|
|
3268
3268
|
])
|
|
3269
3269
|
]),
|
|
3270
|
-
default:
|
|
3271
|
-
f.value ? (
|
|
3270
|
+
default: b(() => [
|
|
3271
|
+
f.value ? (g(), R(N, {
|
|
3272
3272
|
key: 0,
|
|
3273
3273
|
"data-testid": "config-card-loader",
|
|
3274
3274
|
"table-columns": 2,
|
|
3275
3275
|
type: "table"
|
|
3276
|
-
})) :
|
|
3276
|
+
})) : _.value ? (g(), R(O, {
|
|
3277
3277
|
key: 1,
|
|
3278
3278
|
"data-testid": "config-card-fetch-error",
|
|
3279
3279
|
"icon-variant": "error"
|
|
3280
3280
|
}, {
|
|
3281
|
-
default:
|
|
3282
|
-
|
|
3281
|
+
default: b(() => [
|
|
3282
|
+
B("h3", null, F($.value), 1)
|
|
3283
3283
|
]),
|
|
3284
3284
|
_: 1
|
|
3285
3285
|
})) : J("", !0),
|
|
3286
|
-
|
|
3286
|
+
B("div", ml, [
|
|
3287
3287
|
x(Ro, {
|
|
3288
3288
|
config: e.config,
|
|
3289
3289
|
"fetcher-url": p.value,
|
|
3290
3290
|
format: s.value,
|
|
3291
3291
|
"prop-list-types": v.value,
|
|
3292
|
-
"property-collections":
|
|
3293
|
-
record:
|
|
3294
|
-
},
|
|
3295
|
-
fe(Object.keys(
|
|
3292
|
+
"property-collections": D.value,
|
|
3293
|
+
record: w.value
|
|
3294
|
+
}, Me({ _: 2 }, [
|
|
3295
|
+
fe(Object.keys(y.$slots), (W) => ({
|
|
3296
3296
|
name: W,
|
|
3297
|
-
fn:
|
|
3298
|
-
ee(
|
|
3297
|
+
fn: b(({ row: ue, rowValue: de }) => [
|
|
3298
|
+
ee(y.$slots, W, {
|
|
3299
3299
|
row: ue,
|
|
3300
3300
|
rowValue: de
|
|
3301
3301
|
}, void 0, !0)
|
|
@@ -3308,10 +3308,10 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3308
3308
|
}, [
|
|
3309
3309
|
e.hideTitle ? void 0 : {
|
|
3310
3310
|
name: "title",
|
|
3311
|
-
fn:
|
|
3312
|
-
|
|
3313
|
-
ee(
|
|
3314
|
-
G(
|
|
3311
|
+
fn: b(() => [
|
|
3312
|
+
B("span", pl, [
|
|
3313
|
+
ee(y.$slots, "title", {}, () => [
|
|
3314
|
+
G(F(m(r)("baseConfigCard.title")), 1)
|
|
3315
3315
|
], !0)
|
|
3316
3316
|
])
|
|
3317
3317
|
]),
|
|
@@ -3385,19 +3385,19 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3385
3385
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3386
3386
|
setup(e, { emit: t }) {
|
|
3387
3387
|
var n;
|
|
3388
|
-
const a = t, i = e, r =
|
|
3388
|
+
const a = t, i = e, r = Ct(), { i18n: { t: o } } = ie.useI18n(), { getMessageFromError: l } = ie.useErrors(), { axiosInstance: c } = ie.useAxios((n = i.config) == null ? void 0 : n.axiosRequestConfig), u = M(!1), s = M(!1), d = M(""), k = I(() => i.canSubmit === !1 || i.isReadonly), f = M(!1), _ = I(() => {
|
|
3389
3389
|
var v, p;
|
|
3390
|
-
let
|
|
3391
|
-
return i.config.app === "konnect" ?
|
|
3392
|
-
}),
|
|
3390
|
+
let y = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3391
|
+
return i.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, ((v = i.config) == null ? void 0 : v.controlPlaneId) || "") : i.config.app === "kongManager" && (y = y.replace(/\/{workspace}/gi, (p = i.config) != null && p.workspace ? `/${i.config.workspace}` : "")), i.editId ? (y = y.replace(/{id}/gi, i.editId), y) : (y = y.replace(/\/{id}/gi, ""), y);
|
|
3392
|
+
}), $ = () => {
|
|
3393
3393
|
f.value = !f.value;
|
|
3394
|
-
},
|
|
3395
|
-
i.config.cancelRoute ? r.push(i.config.cancelRoute) :
|
|
3396
|
-
},
|
|
3394
|
+
}, w = () => {
|
|
3395
|
+
i.config.cancelRoute ? r.push(i.config.cancelRoute) : q();
|
|
3396
|
+
}, q = () => {
|
|
3397
3397
|
a("cancel");
|
|
3398
|
-
},
|
|
3399
|
-
|
|
3400
|
-
},
|
|
3398
|
+
}, h = () => {
|
|
3399
|
+
k.value || a("submit");
|
|
3400
|
+
}, D = M([
|
|
3401
3401
|
{
|
|
3402
3402
|
title: o("baseForm.configuration.yaml"),
|
|
3403
3403
|
hash: "#yaml"
|
|
@@ -3413,7 +3413,7 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3413
3413
|
if (i.editId)
|
|
3414
3414
|
try {
|
|
3415
3415
|
s.value = !1, u.value = !0;
|
|
3416
|
-
const { data: v } = await c.get(
|
|
3416
|
+
const { data: v } = await c.get(_.value);
|
|
3417
3417
|
a("fetch:success", v);
|
|
3418
3418
|
} catch (v) {
|
|
3419
3419
|
const p = l(v);
|
|
@@ -3422,98 +3422,98 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3422
3422
|
u.value = !1;
|
|
3423
3423
|
}
|
|
3424
3424
|
}), (v, p) => {
|
|
3425
|
-
const
|
|
3426
|
-
return
|
|
3427
|
-
default:
|
|
3428
|
-
u.value ? (
|
|
3425
|
+
const y = U("KSkeleton"), S = U("KEmptyState"), L = U("KAlert"), A = U("KButton"), P = U("KTabs"), N = U("KSlideout"), O = U("KCard");
|
|
3426
|
+
return g(), R(O, { class: "kong-ui-entity-base-form" }, {
|
|
3427
|
+
default: b(() => [
|
|
3428
|
+
u.value ? (g(), R(y, {
|
|
3429
3429
|
key: 0,
|
|
3430
3430
|
type: "form"
|
|
3431
|
-
})) : s.value ? (
|
|
3431
|
+
})) : s.value ? (g(), R(S, {
|
|
3432
3432
|
key: 1,
|
|
3433
|
-
"action-button-text":
|
|
3433
|
+
"action-button-text": m(o)("baseForm.actions.back"),
|
|
3434
3434
|
"data-testid": "form-fetch-error",
|
|
3435
3435
|
"icon-variant": "error",
|
|
3436
|
-
onClickAction:
|
|
3436
|
+
onClickAction: w
|
|
3437
3437
|
}, {
|
|
3438
|
-
default:
|
|
3439
|
-
|
|
3438
|
+
default: b(() => [
|
|
3439
|
+
B("h3", null, F(d.value), 1)
|
|
3440
3440
|
]),
|
|
3441
3441
|
_: 1
|
|
3442
|
-
}, 8, ["action-button-text"])) : (
|
|
3442
|
+
}, 8, ["action-button-text"])) : (g(), K("form", {
|
|
3443
3443
|
key: 2,
|
|
3444
3444
|
"data-testid": "form-content",
|
|
3445
3445
|
novalidate: i.noValidate,
|
|
3446
|
-
onReset: yt(
|
|
3447
|
-
onSubmit: yt(
|
|
3446
|
+
onReset: yt(q, ["prevent"]),
|
|
3447
|
+
onSubmit: yt(h, ["prevent"])
|
|
3448
3448
|
}, [
|
|
3449
3449
|
ee(v.$slots, "default", {}, void 0, !0),
|
|
3450
|
-
e.errorMessage ? (
|
|
3450
|
+
e.errorMessage ? (g(), R(L, {
|
|
3451
3451
|
key: 0,
|
|
3452
3452
|
appearance: "danger",
|
|
3453
3453
|
"data-testid": "form-error",
|
|
3454
3454
|
message: e.errorMessage
|
|
3455
3455
|
}, null, 8, ["message"])) : J("", !0),
|
|
3456
|
-
|
|
3456
|
+
B("div", kl, [
|
|
3457
3457
|
ee(v.$slots, "form-actions", {}, () => [
|
|
3458
|
-
x(
|
|
3458
|
+
x(A, {
|
|
3459
3459
|
appearance: "tertiary",
|
|
3460
3460
|
"data-testid": "form-view-configuration",
|
|
3461
|
-
onClick: p[0] || (p[0] = (z) =>
|
|
3461
|
+
onClick: p[0] || (p[0] = (z) => $())
|
|
3462
3462
|
}, {
|
|
3463
|
-
default:
|
|
3464
|
-
G(
|
|
3463
|
+
default: b(() => [
|
|
3464
|
+
G(F(m(o)("baseForm.actions.viewConfiguration")), 1)
|
|
3465
3465
|
]),
|
|
3466
3466
|
_: 1
|
|
3467
3467
|
}),
|
|
3468
|
-
x(
|
|
3468
|
+
x(A, {
|
|
3469
3469
|
appearance: "secondary",
|
|
3470
3470
|
"data-testid": "form-cancel",
|
|
3471
3471
|
disabled: e.isReadonly,
|
|
3472
3472
|
type: "reset"
|
|
3473
3473
|
}, {
|
|
3474
|
-
default:
|
|
3475
|
-
G(
|
|
3474
|
+
default: b(() => [
|
|
3475
|
+
G(F(m(o)("baseForm.actions.cancel")), 1)
|
|
3476
3476
|
]),
|
|
3477
3477
|
_: 1
|
|
3478
3478
|
}, 8, ["disabled"]),
|
|
3479
|
-
x(
|
|
3479
|
+
x(A, {
|
|
3480
3480
|
appearance: "primary",
|
|
3481
3481
|
"data-testid": "form-submit",
|
|
3482
|
-
disabled:
|
|
3482
|
+
disabled: k.value,
|
|
3483
3483
|
type: "submit"
|
|
3484
3484
|
}, {
|
|
3485
|
-
default:
|
|
3486
|
-
G(
|
|
3485
|
+
default: b(() => [
|
|
3486
|
+
G(F(m(o)("baseForm.actions.save")), 1)
|
|
3487
3487
|
]),
|
|
3488
3488
|
_: 1
|
|
3489
3489
|
}, 8, ["disabled"])
|
|
3490
3490
|
], !0)
|
|
3491
3491
|
])
|
|
3492
3492
|
], 40, vl)),
|
|
3493
|
-
x(
|
|
3493
|
+
x(N, {
|
|
3494
3494
|
"close-on-blur": !1,
|
|
3495
3495
|
"data-testid": "form-view-configuration-slideout",
|
|
3496
3496
|
"has-overlay": !1,
|
|
3497
3497
|
"offset-top": 60,
|
|
3498
|
-
title:
|
|
3498
|
+
title: m(o)("baseForm.configuration.title"),
|
|
3499
3499
|
visible: f.value,
|
|
3500
|
-
onClose: p[1] || (p[1] = (z) =>
|
|
3500
|
+
onClose: p[1] || (p[1] = (z) => $())
|
|
3501
3501
|
}, {
|
|
3502
|
-
default:
|
|
3503
|
-
|
|
3504
|
-
x(
|
|
3502
|
+
default: b(() => [
|
|
3503
|
+
B("div", null, F(m(o)("baseForm.configuration.message")), 1),
|
|
3504
|
+
x(P, {
|
|
3505
3505
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3506
|
-
tabs:
|
|
3506
|
+
tabs: D.value
|
|
3507
3507
|
}, {
|
|
3508
|
-
json:
|
|
3508
|
+
json: b(() => [
|
|
3509
3509
|
x(yn, {
|
|
3510
3510
|
config: e.config,
|
|
3511
|
-
"fetcher-url":
|
|
3511
|
+
"fetcher-url": _.value,
|
|
3512
3512
|
"json-record": i.formFields,
|
|
3513
3513
|
"request-method": i.editId ? "put" : "post"
|
|
3514
3514
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3515
3515
|
]),
|
|
3516
|
-
yaml:
|
|
3516
|
+
yaml: b(() => [
|
|
3517
3517
|
x(na, {
|
|
3518
3518
|
"yaml-record": i.formFields
|
|
3519
3519
|
}, null, 8, ["yaml-record"])
|
|
@@ -3528,10 +3528,7 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3528
3528
|
});
|
|
3529
3529
|
};
|
|
3530
3530
|
}
|
|
3531
|
-
}),
|
|
3532
|
-
key: 0,
|
|
3533
|
-
"data-testid": "first-col"
|
|
3534
|
-
}, Sl = /* @__PURE__ */ X({
|
|
3531
|
+
}), Cl = /* @__PURE__ */ ve(bl, [["__scopeId", "data-v-3def74fe"]]), wl = ["data-truncate"], Sl = /* @__PURE__ */ X({
|
|
3535
3532
|
__name: "EntityBaseTableCell",
|
|
3536
3533
|
props: {
|
|
3537
3534
|
keyName: {
|
|
@@ -3541,71 +3538,83 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3541
3538
|
rowEl: {
|
|
3542
3539
|
type: [Object, null],
|
|
3543
3540
|
required: !0
|
|
3541
|
+
},
|
|
3542
|
+
tooltip: {
|
|
3543
|
+
type: Boolean,
|
|
3544
|
+
default: !1
|
|
3544
3545
|
}
|
|
3545
3546
|
},
|
|
3546
3547
|
setup(e) {
|
|
3547
|
-
const t = e, n =
|
|
3548
|
-
var
|
|
3549
|
-
return ((
|
|
3550
|
-
}), a =
|
|
3551
|
-
var
|
|
3552
|
-
return ((
|
|
3553
|
-
}), i =
|
|
3554
|
-
var
|
|
3555
|
-
const
|
|
3556
|
-
return
|
|
3557
|
-
});
|
|
3558
|
-
let
|
|
3559
|
-
const
|
|
3560
|
-
|
|
3561
|
-
},
|
|
3562
|
-
var
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3548
|
+
const t = e, n = I(() => {
|
|
3549
|
+
var w;
|
|
3550
|
+
return ((w = t.rowEl) == null ? void 0 : w.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3551
|
+
}), a = I(() => {
|
|
3552
|
+
var w;
|
|
3553
|
+
return ((w = n.value) == null ? void 0 : w.querySelector('[data-truncate="true"]')) || null;
|
|
3554
|
+
}), i = I(() => {
|
|
3555
|
+
var w, q;
|
|
3556
|
+
const h = (w = t.rowEl) == null ? void 0 : w.querySelectorAll("td");
|
|
3557
|
+
return h ? ((q = h[0]) == null ? void 0 : q.getAttribute("data-testid")) === t.keyName : !1;
|
|
3558
|
+
}), r = I(() => i.value || t.tooltip);
|
|
3559
|
+
let o;
|
|
3560
|
+
const l = () => {
|
|
3561
|
+
o && (o.disconnect(), o = void 0);
|
|
3562
|
+
}, c = () => {
|
|
3563
|
+
var w, q, h;
|
|
3564
|
+
let D = ((w = n.value) == null ? void 0 : w.clientWidth) || 0;
|
|
3565
|
+
if (n.value && "getComputedStyle" in window) {
|
|
3566
|
+
const v = window.getComputedStyle(n.value);
|
|
3567
|
+
D -= (parseFloat(v.paddingLeft) || 0) + (parseFloat(v.paddingRight) || 0);
|
|
3568
|
+
}
|
|
3569
|
+
s.value = ((q = a.value) == null ? void 0 : q.getBoundingClientRect().width) || 0, d.value = D, k.value = ((h = u.value) == null ? void 0 : h.innerText) || "";
|
|
3570
|
+
}, u = M({}), s = M(0), d = M(0), k = M(""), f = I(() => [a.value, n.value]), _ = he(
|
|
3571
|
+
f,
|
|
3572
|
+
(w) => {
|
|
3573
|
+
if (r.value && (l(), "ResizeObserver" in window && window)) {
|
|
3574
|
+
o = new ResizeObserver((q) => {
|
|
3569
3575
|
window.requestAnimationFrame(() => {
|
|
3570
|
-
!Array.isArray(
|
|
3576
|
+
!Array.isArray(q) || !q.length || c();
|
|
3571
3577
|
});
|
|
3572
3578
|
});
|
|
3573
|
-
for (const
|
|
3574
|
-
|
|
3579
|
+
for (const q of w)
|
|
3580
|
+
q && o.observe(q);
|
|
3575
3581
|
}
|
|
3576
3582
|
},
|
|
3577
3583
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3578
|
-
),
|
|
3584
|
+
), $ = I(() => r.value ? s.value > d.value : !1);
|
|
3579
3585
|
return ua(() => {
|
|
3580
|
-
|
|
3586
|
+
c();
|
|
3581
3587
|
}), da(() => {
|
|
3582
|
-
|
|
3583
|
-
}), (
|
|
3584
|
-
const
|
|
3585
|
-
return
|
|
3588
|
+
_();
|
|
3589
|
+
}), (w, q) => {
|
|
3590
|
+
const h = U("KTooltip");
|
|
3591
|
+
return g(), K("span", {
|
|
3586
3592
|
ref_key: "contentRef",
|
|
3587
|
-
ref:
|
|
3593
|
+
ref: u,
|
|
3588
3594
|
class: "content-wrapper"
|
|
3589
3595
|
}, [
|
|
3590
|
-
|
|
3591
|
-
|
|
3596
|
+
r.value ? (g(), K("span", {
|
|
3597
|
+
key: 0,
|
|
3598
|
+
"data-truncate": r.value || void 0
|
|
3599
|
+
}, [
|
|
3600
|
+
x(h, {
|
|
3592
3601
|
"max-width": "300",
|
|
3593
3602
|
placement: "bottomStart",
|
|
3594
|
-
text:
|
|
3603
|
+
text: $.value ? k.value : ""
|
|
3595
3604
|
}, {
|
|
3596
|
-
default:
|
|
3597
|
-
ee(
|
|
3605
|
+
default: b(() => [
|
|
3606
|
+
ee(w.$slots, "default", {}, void 0, !0)
|
|
3598
3607
|
]),
|
|
3599
3608
|
_: 3
|
|
3600
3609
|
}, 8, ["text"])
|
|
3601
|
-
])) : ee(
|
|
3610
|
+
], 8, wl)) : ee(w.$slots, "default", { key: 1 }, void 0, !0)
|
|
3602
3611
|
], 512);
|
|
3603
3612
|
};
|
|
3604
3613
|
}
|
|
3605
|
-
}),
|
|
3614
|
+
}), _l = /* @__PURE__ */ ve(Sl, [["__scopeId", "data-v-6019026f"]]), Il = { class: "toolbar-container" }, xl = {
|
|
3606
3615
|
key: 0,
|
|
3607
3616
|
class: "toolbar-button-container"
|
|
3608
|
-
},
|
|
3617
|
+
}, Al = ["data-testid"], jl = /* @__PURE__ */ X({
|
|
3609
3618
|
__name: "EntityBaseTable",
|
|
3610
3619
|
props: {
|
|
3611
3620
|
// table header configuration
|
|
@@ -3719,8 +3728,8 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3719
3728
|
},
|
|
3720
3729
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3721
3730
|
setup(e, { emit: t }) {
|
|
3722
|
-
const n = e, a = t, { i18n: { t: i } } = ie.useI18n(), r =
|
|
3723
|
-
var p,
|
|
3731
|
+
const n = e, a = t, { i18n: { t: i } } = ie.useI18n(), r = I(() => {
|
|
3732
|
+
var p, y;
|
|
3724
3733
|
return typeof n.errorMessage == "string" ? {
|
|
3725
3734
|
hasError: !!n.errorMessage,
|
|
3726
3735
|
title: n.errorMessage,
|
|
@@ -3728,15 +3737,15 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3728
3737
|
} : {
|
|
3729
3738
|
hasError: !!n.errorMessage,
|
|
3730
3739
|
title: (p = n.errorMessage) == null ? void 0 : p.title,
|
|
3731
|
-
message: (
|
|
3740
|
+
message: (y = n.errorMessage) == null ? void 0 : y.message
|
|
3732
3741
|
};
|
|
3733
|
-
}), o =
|
|
3742
|
+
}), o = I(() => n.cacheIdentifier || n.preferencesStorageKey), l = (p) => p.hasData || !!n.query, c = I(() => {
|
|
3734
3743
|
const p = [];
|
|
3735
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3736
|
-
const S = n.tableHeaders[
|
|
3744
|
+
return Object.keys(n.tableHeaders).forEach((y) => {
|
|
3745
|
+
const S = n.tableHeaders[y];
|
|
3737
3746
|
p.push({
|
|
3738
|
-
label: S.label ??
|
|
3739
|
-
key:
|
|
3747
|
+
label: S.label ?? y,
|
|
3748
|
+
key: y,
|
|
3740
3749
|
sortable: S.sortable ?? !1
|
|
3741
3750
|
});
|
|
3742
3751
|
}), n.enableEntityActions && p.push({
|
|
@@ -3747,56 +3756,56 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3747
3756
|
"data-rowid": p.id,
|
|
3748
3757
|
"data-testid": p.name,
|
|
3749
3758
|
...n.rowAttributes(p)
|
|
3750
|
-
}), s =
|
|
3751
|
-
var
|
|
3752
|
-
return (
|
|
3753
|
-
},
|
|
3754
|
-
const
|
|
3759
|
+
}), s = M({}), d = (p) => {
|
|
3760
|
+
var y;
|
|
3761
|
+
return (y = s.value) == null ? void 0 : y.$el.querySelector(`[data-rowid="${p.id}"]`);
|
|
3762
|
+
}, k = (p) => {
|
|
3763
|
+
const y = {
|
|
3755
3764
|
"data-testid": p.headerKey,
|
|
3756
3765
|
...n.cellAttributes(p)
|
|
3757
3766
|
};
|
|
3758
|
-
return p.colIndex === 0 && (
|
|
3767
|
+
return p.colIndex === 0 && (y.style = {
|
|
3759
3768
|
maxWidth: "250px",
|
|
3760
3769
|
overflowX: "hidden",
|
|
3761
3770
|
textOverflow: "ellipsis"
|
|
3762
|
-
}),
|
|
3771
|
+
}), y;
|
|
3763
3772
|
}, f = () => {
|
|
3764
|
-
a("empty-state-cta-clicked"),
|
|
3765
|
-
},
|
|
3773
|
+
a("empty-state-cta-clicked"), _();
|
|
3774
|
+
}, _ = () => {
|
|
3766
3775
|
a("clear-search-input");
|
|
3767
|
-
},
|
|
3768
|
-
a("click:row",
|
|
3769
|
-
}),
|
|
3776
|
+
}, $ = I(() => n.disableRowClick ? void 0 : (p, y) => {
|
|
3777
|
+
a("click:row", y);
|
|
3778
|
+
}), w = (p) => {
|
|
3770
3779
|
a("sort", p);
|
|
3771
|
-
}, { setTablePreferences:
|
|
3772
|
-
const p =
|
|
3780
|
+
}, { setTablePreferences: q, getTablePreferences: h } = ka(), D = I(() => {
|
|
3781
|
+
const p = h(n.preferencesStorageKey);
|
|
3773
3782
|
return {
|
|
3774
3783
|
...n.initialFetcherParams,
|
|
3775
3784
|
...p
|
|
3776
3785
|
};
|
|
3777
3786
|
}), v = (p) => {
|
|
3778
|
-
n.preferencesStorageKey &&
|
|
3787
|
+
n.preferencesStorageKey && q(n.preferencesStorageKey, p);
|
|
3779
3788
|
};
|
|
3780
|
-
return (p,
|
|
3781
|
-
const S =
|
|
3782
|
-
return
|
|
3789
|
+
return (p, y) => {
|
|
3790
|
+
const S = U("KIcon"), L = U("KButton"), A = U("KDropdown"), P = U("KTable"), N = U("KCard");
|
|
3791
|
+
return g(), R(N, {
|
|
3783
3792
|
class: "kong-ui-entity-base-table",
|
|
3784
3793
|
title: e.title,
|
|
3785
3794
|
"title-tag": e.titleTag
|
|
3786
3795
|
}, {
|
|
3787
|
-
default:
|
|
3788
|
-
x(
|
|
3796
|
+
default: b(() => [
|
|
3797
|
+
x(P, {
|
|
3789
3798
|
ref_key: "tableRefs",
|
|
3790
3799
|
ref: s,
|
|
3791
3800
|
"cache-identifier": o.value,
|
|
3792
|
-
"cell-attrs":
|
|
3801
|
+
"cell-attrs": k,
|
|
3793
3802
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3794
3803
|
"disable-sorting": e.disableSorting,
|
|
3795
|
-
"empty-state-action-message": e.query ?
|
|
3804
|
+
"empty-state-action-message": e.query ? m(i)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3796
3805
|
"empty-state-action-route": e.query ? void 0 : e.emptyStateOptions.ctaPath,
|
|
3797
3806
|
"empty-state-icon-variant": e.query ? "search" : "kong",
|
|
3798
|
-
"empty-state-message": e.query ?
|
|
3799
|
-
"empty-state-title": e.query ?
|
|
3807
|
+
"empty-state-message": e.query ? m(i)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3808
|
+
"empty-state-title": e.query ? m(i)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3800
3809
|
"enable-client-sort": e.enableClientSort,
|
|
3801
3810
|
"error-state-message": r.value.message,
|
|
3802
3811
|
"error-state-title": r.value.title,
|
|
@@ -3805,51 +3814,51 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3805
3814
|
"has-error": r.value.hasError,
|
|
3806
3815
|
headers: c.value,
|
|
3807
3816
|
"hide-pagination-when-optional": "",
|
|
3808
|
-
"initial-fetcher-params":
|
|
3817
|
+
"initial-fetcher-params": D.value,
|
|
3809
3818
|
"is-loading": e.isLoading,
|
|
3810
3819
|
"pagination-type": e.paginationType,
|
|
3811
3820
|
"row-attrs": u,
|
|
3812
3821
|
"search-input": e.query,
|
|
3813
3822
|
onKtableEmptyStateCtaClicked: f,
|
|
3814
|
-
"onRow:click":
|
|
3815
|
-
onSort:
|
|
3823
|
+
"onRow:click": $.value,
|
|
3824
|
+
onSort: y[0] || (y[0] = (O) => w(O)),
|
|
3816
3825
|
"onUpdate:tablePreferences": v
|
|
3817
|
-
},
|
|
3818
|
-
toolbar:
|
|
3819
|
-
Se(
|
|
3826
|
+
}, Me({
|
|
3827
|
+
toolbar: b(({ state: O }) => [
|
|
3828
|
+
Se(B("div", Il, [
|
|
3820
3829
|
ee(p.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3821
|
-
p.$slots["toolbar-button"] ? (
|
|
3830
|
+
p.$slots["toolbar-button"] ? (g(), K("div", xl, [
|
|
3822
3831
|
ee(p.$slots, "toolbar-button", {}, void 0, !0)
|
|
3823
3832
|
])) : J("", !0)
|
|
3824
3833
|
], 512), [
|
|
3825
|
-
[
|
|
3834
|
+
[_e, l(O)]
|
|
3826
3835
|
])
|
|
3827
3836
|
]),
|
|
3828
|
-
actions:
|
|
3829
|
-
|
|
3837
|
+
actions: b(({ row: O, rowKey: z, rowValue: W }) => [
|
|
3838
|
+
B("div", {
|
|
3830
3839
|
class: "actions-container",
|
|
3831
3840
|
"data-testid": O.name
|
|
3832
3841
|
}, [
|
|
3833
|
-
x(
|
|
3842
|
+
x(A, {
|
|
3834
3843
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3835
3844
|
width: e.dropdownMenuWidth
|
|
3836
3845
|
}, {
|
|
3837
|
-
items:
|
|
3846
|
+
items: b(() => [
|
|
3838
3847
|
ee(p.$slots, "actions", {
|
|
3839
3848
|
row: O,
|
|
3840
3849
|
rowKey: z,
|
|
3841
3850
|
rowValue: W
|
|
3842
3851
|
}, void 0, !0)
|
|
3843
3852
|
]),
|
|
3844
|
-
default:
|
|
3845
|
-
x(
|
|
3853
|
+
default: b(() => [
|
|
3854
|
+
x(L, {
|
|
3846
3855
|
class: "actions-trigger",
|
|
3847
3856
|
"data-testid": "overflow-actions-button",
|
|
3848
3857
|
size: "small"
|
|
3849
3858
|
}, {
|
|
3850
|
-
icon:
|
|
3859
|
+
icon: b(() => [
|
|
3851
3860
|
x(S, {
|
|
3852
|
-
color:
|
|
3861
|
+
color: m(Ga),
|
|
3853
3862
|
icon: "more",
|
|
3854
3863
|
size: "16"
|
|
3855
3864
|
}, null, 8, ["color"])
|
|
@@ -3859,34 +3868,35 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3859
3868
|
]),
|
|
3860
3869
|
_: 2
|
|
3861
3870
|
}, 1032, ["width"])
|
|
3862
|
-
], 8,
|
|
3871
|
+
], 8, Al)
|
|
3863
3872
|
]),
|
|
3864
3873
|
_: 2
|
|
3865
3874
|
}, [
|
|
3866
3875
|
fe(e.tableHeaders, (O, z) => ({
|
|
3867
3876
|
name: z,
|
|
3868
|
-
fn:
|
|
3869
|
-
x(
|
|
3877
|
+
fn: b(({ row: W, rowKey: ue, rowValue: de }) => [
|
|
3878
|
+
x(_l, {
|
|
3870
3879
|
"key-name": String(z),
|
|
3871
|
-
"row-el": d(W)
|
|
3880
|
+
"row-el": d(W),
|
|
3881
|
+
tooltip: O.tooltip
|
|
3872
3882
|
}, {
|
|
3873
|
-
default:
|
|
3883
|
+
default: b(() => [
|
|
3874
3884
|
ee(p.$slots, z, {
|
|
3875
3885
|
row: W,
|
|
3876
3886
|
rowKey: ue,
|
|
3877
3887
|
rowValue: de
|
|
3878
3888
|
}, () => [
|
|
3879
|
-
G(
|
|
3889
|
+
G(F(de), 1)
|
|
3880
3890
|
], !0)
|
|
3881
3891
|
]),
|
|
3882
3892
|
_: 2
|
|
3883
|
-
}, 1032, ["key-name", "row-el"])
|
|
3893
|
+
}, 1032, ["key-name", "row-el", "tooltip"])
|
|
3884
3894
|
])
|
|
3885
3895
|
})),
|
|
3886
3896
|
e.query ? void 0 : {
|
|
3887
3897
|
name: "empty-state-action-icon",
|
|
3888
|
-
fn:
|
|
3889
|
-
x(
|
|
3898
|
+
fn: b(() => [
|
|
3899
|
+
x(m(Ho))
|
|
3890
3900
|
]),
|
|
3891
3901
|
key: "0"
|
|
3892
3902
|
}
|
|
@@ -3896,7 +3906,7 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3896
3906
|
}, 8, ["title", "title-tag"]);
|
|
3897
3907
|
};
|
|
3898
3908
|
}
|
|
3899
|
-
}), $l = /* @__PURE__ */ ve(jl, [["__scopeId", "data-v-
|
|
3909
|
+
}), $l = /* @__PURE__ */ ve(jl, [["__scopeId", "data-v-adb02213"]]), Tl = {
|
|
3900
3910
|
key: 0,
|
|
3901
3911
|
class: "kong-ui-entity-delete-error"
|
|
3902
3912
|
}, Kl = {
|
|
@@ -3941,14 +3951,14 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3941
3951
|
},
|
|
3942
3952
|
emits: ["cancel", "proceed"],
|
|
3943
3953
|
setup(e, { emit: t }) {
|
|
3944
|
-
const { i18nT: n } = ie.useI18n(), a = e, i = t, r =
|
|
3954
|
+
const { i18nT: n } = ie.useI18n(), a = e, i = t, r = I(() => a.needConfirm ? a.entityName : ""), o = () => {
|
|
3945
3955
|
i("cancel");
|
|
3946
3956
|
}, l = () => {
|
|
3947
3957
|
i("proceed");
|
|
3948
3958
|
};
|
|
3949
3959
|
return (c, u) => {
|
|
3950
|
-
const s =
|
|
3951
|
-
return
|
|
3960
|
+
const s = U("KAlert"), d = U("KPrompt");
|
|
3961
|
+
return g(), R(d, {
|
|
3952
3962
|
"action-button-appearance": "danger",
|
|
3953
3963
|
"action-button-disabled": e.actionPending,
|
|
3954
3964
|
"action-button-text": "Yes, delete",
|
|
@@ -3959,36 +3969,36 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3959
3969
|
onCancel: o,
|
|
3960
3970
|
onProceed: l
|
|
3961
3971
|
}, {
|
|
3962
|
-
default:
|
|
3963
|
-
e.error ? (
|
|
3972
|
+
default: b(() => [
|
|
3973
|
+
e.error ? (g(), K("div", Tl, [
|
|
3964
3974
|
x(s, { appearance: "danger" }, {
|
|
3965
|
-
default:
|
|
3966
|
-
G(
|
|
3975
|
+
default: b(() => [
|
|
3976
|
+
G(F(e.error), 1)
|
|
3967
3977
|
]),
|
|
3968
3978
|
_: 1
|
|
3969
3979
|
})
|
|
3970
3980
|
])) : J("", !0),
|
|
3971
|
-
x(
|
|
3981
|
+
x(m(n), {
|
|
3972
3982
|
class: "message",
|
|
3973
3983
|
keypath: a.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3974
3984
|
tag: "p"
|
|
3975
|
-
},
|
|
3976
|
-
entityType:
|
|
3977
|
-
G(
|
|
3985
|
+
}, Me({
|
|
3986
|
+
entityType: b(() => [
|
|
3987
|
+
G(F(a.entityType), 1)
|
|
3978
3988
|
]),
|
|
3979
3989
|
_: 2
|
|
3980
3990
|
}, [
|
|
3981
3991
|
a.entityName ? {
|
|
3982
3992
|
name: "entityName",
|
|
3983
|
-
fn:
|
|
3984
|
-
|
|
3993
|
+
fn: b(() => [
|
|
3994
|
+
B("strong", null, F(a.entityName), 1)
|
|
3985
3995
|
]),
|
|
3986
3996
|
key: "0"
|
|
3987
3997
|
} : void 0
|
|
3988
3998
|
]), 1032, ["keypath"]),
|
|
3989
|
-
a.description || c.$slots.description ? (
|
|
3999
|
+
a.description || c.$slots.description ? (g(), K("div", Kl, [
|
|
3990
4000
|
ee(c.$slots, "description", {}, () => [
|
|
3991
|
-
|
|
4001
|
+
B("p", null, F(a.description), 1)
|
|
3992
4002
|
], !0)
|
|
3993
4003
|
])) : J("", !0)
|
|
3994
4004
|
]),
|
|
@@ -3996,13 +4006,13 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
3996
4006
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3997
4007
|
};
|
|
3998
4008
|
}
|
|
3999
|
-
}),
|
|
4009
|
+
}), Nl = /* @__PURE__ */ ve(Ol, [["__scopeId", "data-v-4361d622"]]), Ml = {
|
|
4000
4010
|
fill: "none",
|
|
4001
4011
|
height: "20",
|
|
4002
4012
|
viewBox: "0 0 20 20",
|
|
4003
4013
|
width: "20",
|
|
4004
4014
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4005
|
-
},
|
|
4015
|
+
}, Fl = {
|
|
4006
4016
|
id: "mask0_180_20349",
|
|
4007
4017
|
height: "20",
|
|
4008
4018
|
maskUnits: "userSpaceOnUse",
|
|
@@ -4010,7 +4020,7 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
4010
4020
|
width: "20",
|
|
4011
4021
|
x: "0",
|
|
4012
4022
|
y: "0"
|
|
4013
|
-
},
|
|
4023
|
+
}, El = ["fill"], ql = { mask: "url(#mask0_180_20349)" }, Ll = ["fill"], en = /* @__PURE__ */ X({
|
|
4014
4024
|
__name: "IconFilter",
|
|
4015
4025
|
props: {
|
|
4016
4026
|
color: {
|
|
@@ -4019,16 +4029,16 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
4019
4029
|
}
|
|
4020
4030
|
},
|
|
4021
4031
|
setup(e) {
|
|
4022
|
-
return (t, n) => (
|
|
4023
|
-
|
|
4024
|
-
|
|
4032
|
+
return (t, n) => (g(), K("svg", Ml, [
|
|
4033
|
+
B("mask", Fl, [
|
|
4034
|
+
B("rect", {
|
|
4025
4035
|
fill: e.color,
|
|
4026
4036
|
height: "20",
|
|
4027
4037
|
width: "20"
|
|
4028
|
-
}, null, 8,
|
|
4038
|
+
}, null, 8, El)
|
|
4029
4039
|
]),
|
|
4030
|
-
|
|
4031
|
-
|
|
4040
|
+
B("g", ql, [
|
|
4041
|
+
B("path", {
|
|
4032
4042
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
4033
4043
|
fill: e.color
|
|
4034
4044
|
}, null, 8, Ll)
|
|
@@ -4058,150 +4068,153 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
4058
4068
|
},
|
|
4059
4069
|
emits: ["update:modelValue"],
|
|
4060
4070
|
setup(e, { emit: t }) {
|
|
4061
|
-
const { i18n: { t: n } } = ie.useI18n(), a = e, i = t, r =
|
|
4071
|
+
const { i18n: { t: n } } = ie.useI18n(), a = e, i = t, r = M(!1), o = M({}), l = M(/* @__PURE__ */ new Set()), c = I(() => {
|
|
4062
4072
|
const v = [];
|
|
4063
|
-
return new URLSearchParams(a.modelValue).forEach((p,
|
|
4064
|
-
p !== "" && v.push(
|
|
4073
|
+
return new URLSearchParams(a.modelValue).forEach((p, y) => {
|
|
4074
|
+
p !== "" && v.push(y);
|
|
4065
4075
|
}), v;
|
|
4066
|
-
}), u =
|
|
4076
|
+
}), u = I(() => {
|
|
4067
4077
|
const v = a.config.fields;
|
|
4068
|
-
return Object.keys(v).filter((p) =>
|
|
4078
|
+
return Object.keys(v).filter((p) => {
|
|
4079
|
+
var y;
|
|
4080
|
+
return (y = v == null ? void 0 : v[p]) == null ? void 0 : y.searchable;
|
|
4081
|
+
}).map((p) => ({
|
|
4069
4082
|
label: v[p].label || p,
|
|
4070
4083
|
value: p,
|
|
4071
4084
|
expanded: !1
|
|
4072
4085
|
}));
|
|
4073
4086
|
});
|
|
4074
4087
|
he(() => a.modelValue, (v) => {
|
|
4075
|
-
o.value = {}, new URLSearchParams(v).forEach((p,
|
|
4076
|
-
o.value[
|
|
4088
|
+
o.value = {}, new URLSearchParams(v).forEach((p, y) => {
|
|
4089
|
+
o.value[y] = p;
|
|
4077
4090
|
});
|
|
4078
4091
|
});
|
|
4079
4092
|
const s = () => {
|
|
4080
4093
|
r.value = !r.value;
|
|
4081
4094
|
}, d = (v) => {
|
|
4082
4095
|
l.value.has(v) ? l.value.delete(v) : l.value.add(v);
|
|
4083
|
-
},
|
|
4096
|
+
}, k = (v) => {
|
|
4084
4097
|
i("update:modelValue", v);
|
|
4085
4098
|
}, f = () => {
|
|
4086
|
-
|
|
4087
|
-
},
|
|
4088
|
-
var p,
|
|
4089
|
-
return (((
|
|
4099
|
+
k("");
|
|
4100
|
+
}, _ = (v) => `filter-${v}`, $ = (v) => {
|
|
4101
|
+
var p, y;
|
|
4102
|
+
return (((y = (p = a.config.schema) == null ? void 0 : p[v]) == null ? void 0 : y.values) ?? []).map((S) => ({
|
|
4090
4103
|
value: S,
|
|
4091
4104
|
label: S
|
|
4092
4105
|
}));
|
|
4093
|
-
},
|
|
4094
|
-
var p,
|
|
4095
|
-
return ((
|
|
4096
|
-
},
|
|
4106
|
+
}, w = (v) => {
|
|
4107
|
+
var p, y;
|
|
4108
|
+
return ((y = (p = a.config.schema) == null ? void 0 : p[v]) == null ? void 0 : y.type) ?? "text";
|
|
4109
|
+
}, q = (v) => {
|
|
4097
4110
|
o.value = {
|
|
4098
4111
|
...o.value,
|
|
4099
4112
|
[v]: ""
|
|
4100
|
-
},
|
|
4101
|
-
},
|
|
4102
|
-
o.value = {},
|
|
4103
|
-
},
|
|
4104
|
-
const p = Object.keys(o.value).reduce((
|
|
4113
|
+
}, D();
|
|
4114
|
+
}, h = () => {
|
|
4115
|
+
o.value = {}, D(!0);
|
|
4116
|
+
}, D = (v = !1) => {
|
|
4117
|
+
const p = Object.keys(o.value).reduce((y, S) => (o.value[S] && (y[S] = `${o.value[S]}`), y), {});
|
|
4105
4118
|
v && (r.value = !1), i("update:modelValue", new URLSearchParams(p).toString());
|
|
4106
4119
|
};
|
|
4107
4120
|
return (v, p) => {
|
|
4108
|
-
const
|
|
4109
|
-
return e.config.isExactMatch ? (
|
|
4121
|
+
const y = U("KInput"), S = U("KButton"), L = U("KSelect");
|
|
4122
|
+
return e.config.isExactMatch ? (g(), R(y, {
|
|
4110
4123
|
key: 0,
|
|
4111
4124
|
autocomplete: "off",
|
|
4112
4125
|
class: "kong-ui-entity-filter-input",
|
|
4113
4126
|
"data-testid": "search-input",
|
|
4114
4127
|
"model-value": e.modelValue,
|
|
4115
4128
|
placeholder: e.config.placeholder,
|
|
4116
|
-
"onUpdate:modelValue":
|
|
4129
|
+
"onUpdate:modelValue": k
|
|
4117
4130
|
}, {
|
|
4118
|
-
before:
|
|
4131
|
+
before: b(() => [
|
|
4119
4132
|
x(en)
|
|
4120
4133
|
]),
|
|
4121
|
-
after:
|
|
4122
|
-
Se(x(
|
|
4134
|
+
after: b(() => [
|
|
4135
|
+
Se(x(m(dl), {
|
|
4123
4136
|
class: "kong-ui-entity-filter-clear",
|
|
4124
4137
|
onClick: f
|
|
4125
4138
|
}, null, 512), [
|
|
4126
|
-
[
|
|
4139
|
+
[_e, e.modelValue !== ""]
|
|
4127
4140
|
])
|
|
4128
4141
|
]),
|
|
4129
4142
|
_: 1
|
|
4130
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
4143
|
+
}, 8, ["model-value", "placeholder"])) : (g(), K("div", Bl, [
|
|
4131
4144
|
x(S, {
|
|
4132
4145
|
appearance: "tertiary",
|
|
4133
4146
|
"data-testid": "filter-button",
|
|
4134
4147
|
onClick: s
|
|
4135
4148
|
}, {
|
|
4136
|
-
default:
|
|
4149
|
+
default: b(() => [
|
|
4137
4150
|
x(en),
|
|
4138
|
-
G(" " +
|
|
4151
|
+
G(" " + F(m(n)("filter.filterButtonText")) + " " + F(c.value.length > 0 ? `(${c.value.length})` : ""), 1)
|
|
4139
4152
|
]),
|
|
4140
4153
|
_: 1
|
|
4141
4154
|
}),
|
|
4142
|
-
Se(
|
|
4155
|
+
Se(B("div", {
|
|
4143
4156
|
class: "kong-ui-entity-filter-backdrop",
|
|
4144
4157
|
onClick: s
|
|
4145
4158
|
}, null, 512), [
|
|
4146
|
-
[
|
|
4159
|
+
[_e, r.value]
|
|
4147
4160
|
]),
|
|
4148
|
-
Se(
|
|
4149
|
-
(
|
|
4150
|
-
var
|
|
4151
|
-
return
|
|
4152
|
-
key:
|
|
4161
|
+
Se(B("div", Ul, [
|
|
4162
|
+
(g(!0), K(me, null, fe(u.value, (A) => {
|
|
4163
|
+
var P, N;
|
|
4164
|
+
return g(), K("div", {
|
|
4165
|
+
key: A.value,
|
|
4153
4166
|
class: "kong-ui-entity-filter-menu-item",
|
|
4154
|
-
"data-testid":
|
|
4167
|
+
"data-testid": A.value
|
|
4155
4168
|
}, [
|
|
4156
|
-
|
|
4157
|
-
class:
|
|
4169
|
+
B("span", {
|
|
4170
|
+
class: Ae(["menu-item-title", { expanded: l.value.has(A.value) }]),
|
|
4158
4171
|
role: "button",
|
|
4159
4172
|
tabindex: "0",
|
|
4160
|
-
onClick: (O) => d(
|
|
4161
|
-
onKeydown: sa((O) => d(
|
|
4173
|
+
onClick: (O) => d(A.value),
|
|
4174
|
+
onKeydown: sa((O) => d(A.value), ["enter"])
|
|
4162
4175
|
}, [
|
|
4163
|
-
G(
|
|
4164
|
-
Se(
|
|
4165
|
-
[
|
|
4176
|
+
G(F(A.label) + " ", 1),
|
|
4177
|
+
Se(B("span", Dl, null, 512), [
|
|
4178
|
+
[_e, c.value.includes(A.value)]
|
|
4166
4179
|
]),
|
|
4167
|
-
x(
|
|
4168
|
-
class:
|
|
4169
|
-
color:
|
|
4180
|
+
x(m(rl), {
|
|
4181
|
+
class: Ae(["menu-item-expand-icon", { expanded: l.value.has(A.value) }]),
|
|
4182
|
+
color: m(Qa)
|
|
4170
4183
|
}, null, 8, ["class", "color"])
|
|
4171
4184
|
], 42, Vl),
|
|
4172
|
-
Se(
|
|
4173
|
-
|
|
4185
|
+
Se(B("div", Pl, [
|
|
4186
|
+
B("label", {
|
|
4174
4187
|
class: "menu-item-label",
|
|
4175
|
-
for:
|
|
4176
|
-
},
|
|
4177
|
-
((
|
|
4188
|
+
for: _(A.value)
|
|
4189
|
+
}, F(m(n)("filter.fieldLabel")), 9, zl),
|
|
4190
|
+
((N = (P = e.config.schema) == null ? void 0 : P[A.value]) == null ? void 0 : N.type) === "select" ? (g(), R(L, {
|
|
4178
4191
|
key: 0,
|
|
4179
|
-
id:
|
|
4180
|
-
modelValue: o.value[
|
|
4181
|
-
"onUpdate:modelValue": (O) => o.value[
|
|
4182
|
-
items:
|
|
4183
|
-
placeholder:
|
|
4184
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
4192
|
+
id: _(A.value),
|
|
4193
|
+
modelValue: o.value[A.value],
|
|
4194
|
+
"onUpdate:modelValue": (O) => o.value[A.value] = O,
|
|
4195
|
+
items: $(A.value),
|
|
4196
|
+
placeholder: m(n)("filter.selectPlaceholder")
|
|
4197
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (g(), R(y, {
|
|
4185
4198
|
key: 1,
|
|
4186
|
-
id:
|
|
4187
|
-
modelValue: o.value[
|
|
4188
|
-
"onUpdate:modelValue": (O) => o.value[
|
|
4199
|
+
id: _(A.value),
|
|
4200
|
+
modelValue: o.value[A.value],
|
|
4201
|
+
"onUpdate:modelValue": (O) => o.value[A.value] = O,
|
|
4189
4202
|
autocomplete: "off",
|
|
4190
|
-
placeholder:
|
|
4191
|
-
type:
|
|
4203
|
+
placeholder: m(n)("filter.inputPlaceholder"),
|
|
4204
|
+
type: w(A.value)
|
|
4192
4205
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4193
4206
|
], 512), [
|
|
4194
|
-
[
|
|
4207
|
+
[_e, l.value.has(A.value)]
|
|
4195
4208
|
]),
|
|
4196
|
-
Se(
|
|
4209
|
+
Se(B("div", Jl, [
|
|
4197
4210
|
x(S, {
|
|
4198
4211
|
appearance: "tertiary",
|
|
4199
4212
|
"data-testid": "apply-filter",
|
|
4200
4213
|
size: "small",
|
|
4201
|
-
onClick: p[0] || (p[0] = (O) =>
|
|
4214
|
+
onClick: p[0] || (p[0] = (O) => D(!0))
|
|
4202
4215
|
}, {
|
|
4203
|
-
default:
|
|
4204
|
-
G(
|
|
4216
|
+
default: b(() => [
|
|
4217
|
+
G(F(m(n)("filter.applyButtonText")), 1)
|
|
4205
4218
|
]),
|
|
4206
4219
|
_: 1
|
|
4207
4220
|
}),
|
|
@@ -4209,37 +4222,37 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
4209
4222
|
appearance: "tertiary",
|
|
4210
4223
|
"data-testid": "clear-filter",
|
|
4211
4224
|
size: "small",
|
|
4212
|
-
onClick: (O) =>
|
|
4225
|
+
onClick: (O) => q(A.value)
|
|
4213
4226
|
}, {
|
|
4214
|
-
default:
|
|
4215
|
-
G(
|
|
4227
|
+
default: b(() => [
|
|
4228
|
+
G(F(m(n)("filter.clearButtonText")), 1)
|
|
4216
4229
|
]),
|
|
4217
4230
|
_: 2
|
|
4218
4231
|
}, 1032, ["onClick"])
|
|
4219
4232
|
], 512), [
|
|
4220
|
-
[
|
|
4233
|
+
[_e, l.value.has(A.value)]
|
|
4221
4234
|
])
|
|
4222
4235
|
], 8, Rl);
|
|
4223
4236
|
}), 128)),
|
|
4224
|
-
|
|
4237
|
+
B("div", Hl, [
|
|
4225
4238
|
x(S, {
|
|
4226
4239
|
appearance: "tertiary",
|
|
4227
4240
|
size: "small",
|
|
4228
|
-
onClick:
|
|
4241
|
+
onClick: h
|
|
4229
4242
|
}, {
|
|
4230
|
-
default:
|
|
4231
|
-
G(
|
|
4243
|
+
default: b(() => [
|
|
4244
|
+
G(F(m(n)("filter.clearAllButtonText")), 1)
|
|
4232
4245
|
]),
|
|
4233
4246
|
_: 1
|
|
4234
4247
|
})
|
|
4235
4248
|
])
|
|
4236
4249
|
], 512), [
|
|
4237
|
-
[
|
|
4250
|
+
[_e, r.value]
|
|
4238
4251
|
])
|
|
4239
4252
|
]));
|
|
4240
4253
|
};
|
|
4241
4254
|
}
|
|
4242
|
-
}), Yl = /* @__PURE__ */ ve(Wl, [["__scopeId", "data-v-
|
|
4255
|
+
}), Yl = /* @__PURE__ */ ve(Wl, [["__scopeId", "data-v-9a370e3a"]]), Ye = /* @__PURE__ */ X({
|
|
4243
4256
|
__name: "PermissionsWrapper",
|
|
4244
4257
|
props: {
|
|
4245
4258
|
/**
|
|
@@ -4261,7 +4274,7 @@ const Fo = { class: "yaml-config" }, na = /* @__PURE__ */ X({
|
|
|
4261
4274
|
}
|
|
4262
4275
|
},
|
|
4263
4276
|
setup(e) {
|
|
4264
|
-
const t = e, n =
|
|
4277
|
+
const t = e, n = M(void 0), a = I(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4265
4278
|
return he(() => t.authFunction, async () => {
|
|
4266
4279
|
n.value = await t.authFunction();
|
|
4267
4280
|
}, { immediate: !0 }), (i, r) => a.value ? ee(i.$slots, "default", {
|
|
@@ -4335,42 +4348,42 @@ const ts = ["aria-labelledby"], ns = { class: "form-section-wrapper" }, as = {
|
|
|
4335
4348
|
},
|
|
4336
4349
|
setup(e) {
|
|
4337
4350
|
const t = bt(), n = es();
|
|
4338
|
-
return (a, i) => (
|
|
4339
|
-
"aria-labelledby": e.title ?
|
|
4340
|
-
class:
|
|
4351
|
+
return (a, i) => (g(), K("div", {
|
|
4352
|
+
"aria-labelledby": e.title ? m(n) : void 0,
|
|
4353
|
+
class: Ae(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4341
4354
|
role: "group"
|
|
4342
4355
|
}, [
|
|
4343
|
-
|
|
4344
|
-
e.hideInfoHeader ? J("", !0) : (
|
|
4356
|
+
B("div", ns, [
|
|
4357
|
+
e.hideInfoHeader ? J("", !0) : (g(), K("div", {
|
|
4345
4358
|
key: 0,
|
|
4346
|
-
class:
|
|
4359
|
+
class: Ae(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4347
4360
|
}, [
|
|
4348
|
-
e.title ? (
|
|
4361
|
+
e.title ? (g(), R(Te(e.titleTag), {
|
|
4349
4362
|
key: 0,
|
|
4350
|
-
id:
|
|
4363
|
+
id: m(n),
|
|
4351
4364
|
class: "form-section-title"
|
|
4352
4365
|
}, {
|
|
4353
|
-
default:
|
|
4354
|
-
G(
|
|
4366
|
+
default: b(() => [
|
|
4367
|
+
G(F(e.title), 1)
|
|
4355
4368
|
]),
|
|
4356
4369
|
_: 1
|
|
4357
4370
|
}, 8, ["id"])) : J("", !0),
|
|
4358
|
-
e.description ||
|
|
4371
|
+
e.description || m(t).description ? (g(), K("div", as, [
|
|
4359
4372
|
ee(a.$slots, "description", {}, () => [
|
|
4360
|
-
|
|
4373
|
+
B("p", null, F(e.description), 1)
|
|
4361
4374
|
], !0)
|
|
4362
4375
|
])) : J("", !0),
|
|
4363
|
-
|
|
4376
|
+
m(t).footer ? (g(), K("div", is, [
|
|
4364
4377
|
ee(a.$slots, "footer", {}, void 0, !0)
|
|
4365
4378
|
])) : J("", !0)
|
|
4366
4379
|
], 2)),
|
|
4367
|
-
|
|
4380
|
+
B("div", rs, [
|
|
4368
4381
|
ee(a.$slots, "default", {}, void 0, !0)
|
|
4369
4382
|
])
|
|
4370
4383
|
])
|
|
4371
4384
|
], 10, ts));
|
|
4372
4385
|
}
|
|
4373
|
-
}), nn = /* @__PURE__ */ ve(os, [["__scopeId", "data-v-
|
|
4386
|
+
}), nn = /* @__PURE__ */ ve(os, [["__scopeId", "data-v-b1f74200"]]), { useAxios: Tt, useDeleteUrlBuilder: ls, useErrors: ss, useExternalLinkCreator: Ts, useFetchUrlBuilder: Ks, useFetcher: cs, useDebouncedFilter: us, useStringHelpers: ds, useHelpers: Os, useGatewayFeatureSupported: Ns, useTruncationDetector: Ms, useValidators: Fs } = ie, ps = { class: "kong-ui-entities-keys-list" }, fs = { key: 1 }, ys = /* @__PURE__ */ X({
|
|
4374
4387
|
__name: "KeyList",
|
|
4375
4388
|
props: {
|
|
4376
4389
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4417,158 +4430,158 @@ const ts = ["aria-labelledby"], ns = { class: "form-section-wrapper" }, as = {
|
|
|
4417
4430
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
4418
4431
|
setup(e, { emit: t }) {
|
|
4419
4432
|
var We;
|
|
4420
|
-
const n = t, a = e, { i18n: { t: i } } =
|
|
4433
|
+
const n = t, a = e, { i18n: { t: i } } = wt.useI18n(), r = Ct(), { axiosInstance: o } = Tt((We = a.config) == null ? void 0 : We.axiosRequestConfig), l = M(1), c = I(() => a.config.app !== "kongManager" || !!a.config.disableSorting), u = {
|
|
4421
4434
|
name: { label: i("keys.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
4422
4435
|
kid: { label: i("keys.list.table_headers.key_id"), sortable: !0 },
|
|
4423
4436
|
tags: { label: i("keys.list.table_headers.tags") },
|
|
4424
4437
|
id: { label: i("keys.list.table_headers.id"), sortable: !0 }
|
|
4425
|
-
}, s = u, d =
|
|
4426
|
-
var
|
|
4427
|
-
let
|
|
4428
|
-
return a.config.app === "konnect" ?
|
|
4429
|
-
}),
|
|
4430
|
-
const
|
|
4431
|
-
if (
|
|
4438
|
+
}, s = u, d = I(() => {
|
|
4439
|
+
var C, j, H, te;
|
|
4440
|
+
let E = `${a.config.apiBaseUrl}${Ie.list[a.config.app][a.config.keySetId ? "forKeySet" : "all"]}`;
|
|
4441
|
+
return a.config.app === "konnect" ? E = E.replace(/{controlPlaneId}/gi, ((C = a.config) == null ? void 0 : C.controlPlaneId) || "").replace(/{keySetId}/gi, ((j = a.config) == null ? void 0 : j.keySetId) || "") : a.config.app === "kongManager" && (E = E.replace(/\/{workspace}/gi, (H = a.config) != null && H.workspace ? `/${a.config.workspace}` : "").replace(/{keySetId}/gi, ((te = a.config) == null ? void 0 : te.keySetId) || "")), E;
|
|
4442
|
+
}), k = M(""), f = I(() => {
|
|
4443
|
+
const E = a.config.app === "konnect" || a.config.isExactMatch;
|
|
4444
|
+
if (E)
|
|
4432
4445
|
return {
|
|
4433
|
-
isExactMatch:
|
|
4446
|
+
isExactMatch: E,
|
|
4434
4447
|
placeholder: i("keys.search.placeholder")
|
|
4435
4448
|
};
|
|
4436
|
-
const
|
|
4449
|
+
const C = { name: u.name };
|
|
4437
4450
|
return {
|
|
4438
|
-
isExactMatch:
|
|
4439
|
-
fields:
|
|
4451
|
+
isExactMatch: E,
|
|
4452
|
+
fields: C,
|
|
4440
4453
|
schema: a.config.filterSchema
|
|
4441
4454
|
};
|
|
4442
|
-
}), { fetcher:
|
|
4443
|
-
|
|
4444
|
-
},
|
|
4455
|
+
}), { fetcher: _, fetcherState: $ } = cs(a.config, d.value), w = () => {
|
|
4456
|
+
k.value = "";
|
|
4457
|
+
}, q = () => {
|
|
4445
4458
|
l.value++;
|
|
4446
|
-
},
|
|
4447
|
-
const
|
|
4448
|
-
if (!
|
|
4449
|
-
|
|
4459
|
+
}, h = M(null), D = (E, C) => {
|
|
4460
|
+
const j = E.id;
|
|
4461
|
+
if (!C(j)) {
|
|
4462
|
+
y(E, "id");
|
|
4450
4463
|
return;
|
|
4451
4464
|
}
|
|
4452
|
-
p(
|
|
4453
|
-
}, v = (
|
|
4454
|
-
const
|
|
4455
|
-
if (!
|
|
4465
|
+
p(E, "id");
|
|
4466
|
+
}, v = (E, C) => {
|
|
4467
|
+
const j = JSON.stringify(E);
|
|
4468
|
+
if (!C(j)) {
|
|
4456
4469
|
n("copy:error", {
|
|
4457
|
-
entity:
|
|
4470
|
+
entity: E,
|
|
4458
4471
|
message: i("keys.errors.copy")
|
|
4459
4472
|
});
|
|
4460
4473
|
return;
|
|
4461
4474
|
}
|
|
4462
4475
|
n("copy:success", {
|
|
4463
|
-
entity:
|
|
4476
|
+
entity: E,
|
|
4464
4477
|
message: i("keys.copy.success_brief")
|
|
4465
4478
|
});
|
|
4466
|
-
}, p = (
|
|
4479
|
+
}, p = (E, C) => {
|
|
4467
4480
|
n("copy:success", {
|
|
4468
|
-
entity:
|
|
4469
|
-
field:
|
|
4470
|
-
message: i("keys.copy.success", { val:
|
|
4481
|
+
entity: E,
|
|
4482
|
+
field: C,
|
|
4483
|
+
message: i("keys.copy.success", { val: E[C] })
|
|
4471
4484
|
});
|
|
4472
|
-
},
|
|
4485
|
+
}, y = (E, C) => {
|
|
4473
4486
|
n("copy:error", {
|
|
4474
|
-
entity:
|
|
4475
|
-
field:
|
|
4487
|
+
entity: E,
|
|
4488
|
+
field: C,
|
|
4476
4489
|
message: i("keys.errors.copy")
|
|
4477
4490
|
});
|
|
4478
|
-
}, S = async (
|
|
4479
|
-
var
|
|
4480
|
-
await ((
|
|
4481
|
-
},
|
|
4491
|
+
}, S = async (E) => {
|
|
4492
|
+
var j;
|
|
4493
|
+
await ((j = a.canRetrieve) == null ? void 0 : j.call(a, E)) && r.push(a.config.getViewRoute(E.id));
|
|
4494
|
+
}, L = (E) => ({
|
|
4482
4495
|
label: i("keys.actions.view"),
|
|
4483
|
-
to: a.config.getViewRoute(
|
|
4484
|
-
}),
|
|
4496
|
+
to: a.config.getViewRoute(E)
|
|
4497
|
+
}), A = (E) => ({
|
|
4485
4498
|
label: i("keys.actions.edit"),
|
|
4486
|
-
to: a.config.getEditRoute(
|
|
4487
|
-
}),
|
|
4488
|
-
|
|
4499
|
+
to: a.config.getEditRoute(E)
|
|
4500
|
+
}), P = M(void 0), N = M(!1), O = M(!1), z = M(""), W = ls(a.config, d.value), ue = (E) => {
|
|
4501
|
+
P.value = E, N.value = !0;
|
|
4489
4502
|
}, de = () => {
|
|
4490
|
-
|
|
4503
|
+
N.value = !1;
|
|
4491
4504
|
}, ye = async () => {
|
|
4492
|
-
var
|
|
4493
|
-
if ((
|
|
4505
|
+
var E, C, j;
|
|
4506
|
+
if ((E = P.value) != null && E.id) {
|
|
4494
4507
|
O.value = !0;
|
|
4495
4508
|
try {
|
|
4496
|
-
await o.delete(W(
|
|
4509
|
+
await o.delete(W(P.value.id)), O.value = !1, N.value = !1, l.value++, n("delete:success", P.value);
|
|
4497
4510
|
} catch (H) {
|
|
4498
|
-
z.value = ((
|
|
4511
|
+
z.value = ((j = (C = H.response) == null ? void 0 : C.data) == null ? void 0 : j.message) || H.message || i("keys.errors.delete"), n("error", H);
|
|
4499
4512
|
} finally {
|
|
4500
4513
|
O.value = !1;
|
|
4501
4514
|
}
|
|
4502
4515
|
}
|
|
4503
|
-
},
|
|
4504
|
-
he(
|
|
4505
|
-
var
|
|
4506
|
-
if (Array.isArray((
|
|
4507
|
-
|
|
4516
|
+
}, Fe = M(!0);
|
|
4517
|
+
he($, (E) => {
|
|
4518
|
+
var C, j, H, te;
|
|
4519
|
+
if (Array.isArray((C = E == null ? void 0 : E.response) == null ? void 0 : C.data) && (Fe.value = E.response.data.length > 0), E.status === Oe.Error) {
|
|
4520
|
+
h.value = {
|
|
4508
4521
|
title: i("keys.errors.general")
|
|
4509
|
-
}, (te = (H = (
|
|
4522
|
+
}, (te = (H = (j = E.error) == null ? void 0 : j.response) == null ? void 0 : H.data) != null && te.message && (h.value.message = E.error.response.data.message), n("error", E.error);
|
|
4510
4523
|
return;
|
|
4511
4524
|
}
|
|
4512
|
-
|
|
4525
|
+
h.value = null;
|
|
4513
4526
|
});
|
|
4514
|
-
const
|
|
4527
|
+
const Ee = M({
|
|
4515
4528
|
ctaPath: a.config.createRoute,
|
|
4516
4529
|
ctaText: void 0,
|
|
4517
4530
|
message: `${i("keys.list.empty_state.description")}${a.config.additionMessageForEmptyState ? ` ${a.config.additionMessageForEmptyState}` : ""}`,
|
|
4518
4531
|
title: i("keys.title")
|
|
4519
4532
|
});
|
|
4520
4533
|
return at(async () => {
|
|
4521
|
-
await a.canCreate() && (
|
|
4522
|
-
}), (
|
|
4523
|
-
const
|
|
4524
|
-
return
|
|
4525
|
-
x(
|
|
4534
|
+
await a.canCreate() && (Ee.value.title = i("keys.list.empty_state.title"), Ee.value.ctaText = i("keys.actions.create"));
|
|
4535
|
+
}), (E, C) => {
|
|
4536
|
+
const j = U("KButton"), H = U("KCopy"), te = U("KBadge"), ge = U("KTruncate"), V = U("KDropdownItem"), Y = U("KClipboardProvider");
|
|
4537
|
+
return g(), K("div", ps, [
|
|
4538
|
+
x(m($l), {
|
|
4526
4539
|
"cache-identifier": e.cacheIdentifier,
|
|
4527
4540
|
"disable-pagination-page-jump": "",
|
|
4528
4541
|
"disable-sorting": c.value,
|
|
4529
|
-
"empty-state-options":
|
|
4542
|
+
"empty-state-options": Ee.value,
|
|
4530
4543
|
"enable-entity-actions": "",
|
|
4531
|
-
"error-message":
|
|
4532
|
-
fetcher:
|
|
4544
|
+
"error-message": h.value,
|
|
4545
|
+
fetcher: m(_),
|
|
4533
4546
|
"fetcher-cache-key": l.value,
|
|
4534
4547
|
"pagination-type": "offset",
|
|
4535
4548
|
"preferences-storage-key": "kong-ui-entities-keys-list",
|
|
4536
|
-
query:
|
|
4537
|
-
"table-headers":
|
|
4549
|
+
query: k.value,
|
|
4550
|
+
"table-headers": m(s),
|
|
4538
4551
|
"use-action-outside": e.useActionOutside,
|
|
4539
|
-
onClearSearchInput:
|
|
4540
|
-
"onClick:row":
|
|
4541
|
-
onSort:
|
|
4552
|
+
onClearSearchInput: w,
|
|
4553
|
+
"onClick:row": C[2] || (C[2] = (Q) => S(Q)),
|
|
4554
|
+
onSort: q
|
|
4542
4555
|
}, {
|
|
4543
|
-
"toolbar-filter":
|
|
4544
|
-
x(
|
|
4545
|
-
modelValue:
|
|
4546
|
-
"onUpdate:modelValue":
|
|
4556
|
+
"toolbar-filter": b(() => [
|
|
4557
|
+
x(m(Yl), {
|
|
4558
|
+
modelValue: k.value,
|
|
4559
|
+
"onUpdate:modelValue": C[0] || (C[0] = (Q) => k.value = Q),
|
|
4547
4560
|
config: f.value
|
|
4548
4561
|
}, null, 8, ["modelValue", "config"])
|
|
4549
4562
|
]),
|
|
4550
|
-
"toolbar-button":
|
|
4551
|
-
(
|
|
4563
|
+
"toolbar-button": b(() => [
|
|
4564
|
+
(g(), R(Te(e.useActionOutside ? "Teleport" : "div"), {
|
|
4552
4565
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
4553
4566
|
}, {
|
|
4554
|
-
default:
|
|
4555
|
-
x(
|
|
4567
|
+
default: b(() => [
|
|
4568
|
+
x(m(Ye), {
|
|
4556
4569
|
"auth-function": () => e.canCreate()
|
|
4557
4570
|
}, {
|
|
4558
|
-
default:
|
|
4559
|
-
Se(x(
|
|
4571
|
+
default: b(() => [
|
|
4572
|
+
Se(x(j, {
|
|
4560
4573
|
appearance: "primary",
|
|
4561
4574
|
"data-testid": "toolbar-add-key",
|
|
4562
4575
|
icon: "plus",
|
|
4563
4576
|
size: "large",
|
|
4564
4577
|
to: e.config.createRoute
|
|
4565
4578
|
}, {
|
|
4566
|
-
default:
|
|
4567
|
-
G(
|
|
4579
|
+
default: b(() => [
|
|
4580
|
+
G(F(m(i)("keys.list.toolbar_actions.new_key")), 1)
|
|
4568
4581
|
]),
|
|
4569
4582
|
_: 1
|
|
4570
4583
|
}, 8, ["to"]), [
|
|
4571
|
-
[
|
|
4584
|
+
[_e, Fe.value]
|
|
4572
4585
|
])
|
|
4573
4586
|
]),
|
|
4574
4587
|
_: 1
|
|
@@ -4577,44 +4590,44 @@ const ts = ["aria-labelledby"], ns = { class: "form-section-wrapper" }, as = {
|
|
|
4577
4590
|
_: 1
|
|
4578
4591
|
}, 8, ["to"]))
|
|
4579
4592
|
]),
|
|
4580
|
-
name:
|
|
4581
|
-
|
|
4593
|
+
name: b(({ rowValue: Q }) => [
|
|
4594
|
+
B("b", null, F(Q ?? "-"), 1)
|
|
4582
4595
|
]),
|
|
4583
|
-
kid:
|
|
4596
|
+
kid: b(({ rowValue: Q }) => [
|
|
4584
4597
|
x(H, { text: Q }, null, 8, ["text"])
|
|
4585
4598
|
]),
|
|
4586
|
-
tags:
|
|
4587
|
-
(Q == null ? void 0 : Q.length) > 0 ? (
|
|
4588
|
-
default:
|
|
4589
|
-
(
|
|
4599
|
+
tags: b(({ rowValue: Q }) => [
|
|
4600
|
+
(Q == null ? void 0 : Q.length) > 0 ? (g(), R(ge, { key: 0 }, {
|
|
4601
|
+
default: b(() => [
|
|
4602
|
+
(g(!0), K(me, null, fe(Q, (Ke) => (g(), R(te, {
|
|
4590
4603
|
key: Ke,
|
|
4591
|
-
onClick:
|
|
4604
|
+
onClick: C[1] || (C[1] = yt(() => {
|
|
4592
4605
|
}, ["stop"]))
|
|
4593
4606
|
}, {
|
|
4594
|
-
default:
|
|
4595
|
-
G(
|
|
4607
|
+
default: b(() => [
|
|
4608
|
+
G(F(Ke), 1)
|
|
4596
4609
|
]),
|
|
4597
4610
|
_: 2
|
|
4598
4611
|
}, 1024))), 128))
|
|
4599
4612
|
]),
|
|
4600
4613
|
_: 2
|
|
4601
|
-
}, 1024)) : (
|
|
4614
|
+
}, 1024)) : (g(), K("span", fs, "-"))
|
|
4602
4615
|
]),
|
|
4603
|
-
id:
|
|
4616
|
+
id: b(({ rowValue: Q }) => [
|
|
4604
4617
|
x(H, {
|
|
4605
4618
|
text: Q,
|
|
4606
4619
|
truncate: ""
|
|
4607
4620
|
}, null, 8, ["text"])
|
|
4608
4621
|
]),
|
|
4609
|
-
actions:
|
|
4622
|
+
actions: b(({ row: Q }) => [
|
|
4610
4623
|
x(Y, null, {
|
|
4611
|
-
default:
|
|
4624
|
+
default: b(({ copyToClipboard: Ke }) => [
|
|
4612
4625
|
x(V, {
|
|
4613
4626
|
"data-testid": "action-entity-copy-id",
|
|
4614
|
-
onClick: (ia) =>
|
|
4627
|
+
onClick: (ia) => D(Q, Ke)
|
|
4615
4628
|
}, {
|
|
4616
|
-
default:
|
|
4617
|
-
G(
|
|
4629
|
+
default: b(() => [
|
|
4630
|
+
G(F(m(i)("keys.actions.copy_id")), 1)
|
|
4618
4631
|
]),
|
|
4619
4632
|
_: 2
|
|
4620
4633
|
}, 1032, ["onClick"])
|
|
@@ -4622,54 +4635,54 @@ const ts = ["aria-labelledby"], ns = { class: "form-section-wrapper" }, as = {
|
|
|
4622
4635
|
_: 2
|
|
4623
4636
|
}, 1024),
|
|
4624
4637
|
x(Y, null, {
|
|
4625
|
-
default:
|
|
4638
|
+
default: b(({ copyToClipboard: Ke }) => [
|
|
4626
4639
|
x(V, {
|
|
4627
4640
|
"data-testid": "action-entity-copy-json",
|
|
4628
4641
|
onClick: (ia) => v(Q, Ke)
|
|
4629
4642
|
}, {
|
|
4630
|
-
default:
|
|
4631
|
-
G(
|
|
4643
|
+
default: b(() => [
|
|
4644
|
+
G(F(m(i)("keys.actions.copy_json")), 1)
|
|
4632
4645
|
]),
|
|
4633
4646
|
_: 2
|
|
4634
4647
|
}, 1032, ["onClick"])
|
|
4635
4648
|
]),
|
|
4636
4649
|
_: 2
|
|
4637
4650
|
}, 1024),
|
|
4638
|
-
x(
|
|
4651
|
+
x(m(Ye), {
|
|
4639
4652
|
"auth-function": () => e.canRetrieve(Q)
|
|
4640
4653
|
}, {
|
|
4641
|
-
default:
|
|
4654
|
+
default: b(() => [
|
|
4642
4655
|
x(V, {
|
|
4643
4656
|
"data-testid": "action-entity-view",
|
|
4644
4657
|
"has-divider": "",
|
|
4645
|
-
item:
|
|
4658
|
+
item: L(Q.id)
|
|
4646
4659
|
}, null, 8, ["item"])
|
|
4647
4660
|
]),
|
|
4648
4661
|
_: 2
|
|
4649
4662
|
}, 1032, ["auth-function"]),
|
|
4650
|
-
x(
|
|
4663
|
+
x(m(Ye), {
|
|
4651
4664
|
"auth-function": () => e.canEdit(Q)
|
|
4652
4665
|
}, {
|
|
4653
|
-
default:
|
|
4666
|
+
default: b(() => [
|
|
4654
4667
|
x(V, {
|
|
4655
4668
|
"data-testid": "action-entity-edit",
|
|
4656
|
-
item:
|
|
4669
|
+
item: A(Q.id)
|
|
4657
4670
|
}, null, 8, ["item"])
|
|
4658
4671
|
]),
|
|
4659
4672
|
_: 2
|
|
4660
4673
|
}, 1032, ["auth-function"]),
|
|
4661
|
-
x(
|
|
4674
|
+
x(m(Ye), {
|
|
4662
4675
|
"auth-function": () => e.canDelete(Q)
|
|
4663
4676
|
}, {
|
|
4664
|
-
default:
|
|
4677
|
+
default: b(() => [
|
|
4665
4678
|
x(V, {
|
|
4666
4679
|
danger: "",
|
|
4667
4680
|
"data-testid": "action-entity-delete",
|
|
4668
4681
|
"has-divider": "",
|
|
4669
4682
|
onClick: (Ke) => ue(Q)
|
|
4670
4683
|
}, {
|
|
4671
|
-
default:
|
|
4672
|
-
G(
|
|
4684
|
+
default: b(() => [
|
|
4685
|
+
G(F(m(i)("keys.actions.delete")), 1)
|
|
4673
4686
|
]),
|
|
4674
4687
|
_: 2
|
|
4675
4688
|
}, 1032, ["onClick"])
|
|
@@ -4679,15 +4692,15 @@ const ts = ["aria-labelledby"], ns = { class: "form-section-wrapper" }, as = {
|
|
|
4679
4692
|
]),
|
|
4680
4693
|
_: 1
|
|
4681
4694
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "use-action-outside"]),
|
|
4682
|
-
x(
|
|
4695
|
+
x(m(Nl), {
|
|
4683
4696
|
"action-pending": O.value,
|
|
4684
|
-
description:
|
|
4685
|
-
"entity-name":
|
|
4686
|
-
"entity-type":
|
|
4697
|
+
description: m(i)("keys.delete.description"),
|
|
4698
|
+
"entity-name": P.value && (P.value.name || P.value.id),
|
|
4699
|
+
"entity-type": m(ln).Key,
|
|
4687
4700
|
error: z.value,
|
|
4688
4701
|
"need-confirm": !1,
|
|
4689
|
-
title:
|
|
4690
|
-
visible:
|
|
4702
|
+
title: m(i)("keys.delete.title"),
|
|
4703
|
+
visible: N.value,
|
|
4691
4704
|
onCancel: de,
|
|
4692
4705
|
onProceed: ye
|
|
4693
4706
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
@@ -4699,11 +4712,11 @@ const ts = ["aria-labelledby"], ns = { class: "form-section-wrapper" }, as = {
|
|
|
4699
4712
|
for (const [a, i] of t)
|
|
4700
4713
|
n[a] = i;
|
|
4701
4714
|
return n;
|
|
4702
|
-
},
|
|
4715
|
+
}, Es = /* @__PURE__ */ aa(ys, [["__scopeId", "data-v-3e18dfaf"]]), ms = { class: "kong-ui-entities-keys-form" }, gs = { "data-testid": "no-search-results" }, hs = { class: "select-item-container" }, vs = { class: "select-item-label" }, ks = { class: "select-item-description" }, bs = {
|
|
4703
4716
|
key: 0,
|
|
4704
4717
|
class: "invalid-key-set-message",
|
|
4705
4718
|
"data-testid": "invalid-key-set-message"
|
|
4706
|
-
},
|
|
4719
|
+
}, Cs = { "data-testid": "key-format-container" }, ws = /* @__PURE__ */ X({
|
|
4707
4720
|
__name: "KeyForm",
|
|
4708
4721
|
props: {
|
|
4709
4722
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4733,8 +4746,8 @@ const ts = ["aria-labelledby"], ns = { class: "form-section-wrapper" }, as = {
|
|
|
4733
4746
|
},
|
|
4734
4747
|
emits: ["update", "error", "loading"],
|
|
4735
4748
|
setup(e, { emit: t }) {
|
|
4736
|
-
var
|
|
4737
|
-
const n = t, a = e, i =
|
|
4749
|
+
var E;
|
|
4750
|
+
const n = t, a = e, i = Ct(), { i18n: { t: r } } = wt.useI18n(), { getMessageFromError: o } = ss(), { axiosInstance: l } = Tt((E = a.config) == null ? void 0 : E.axiosRequestConfig), c = I(() => a.keySetId ? Ie.form[a.config.app].edit.forKeySet.replace(/{keySetId}/gi, a.keySetId) : Ie.form[a.config.app].edit.all), u = I(() => a.keyId ? Ve.Edit : Ve.Create), s = Kt({
|
|
4738
4751
|
fields: {
|
|
4739
4752
|
name: "",
|
|
4740
4753
|
tags: "",
|
|
@@ -4756,7 +4769,7 @@ const ts = ["aria-labelledby"], ns = { class: "form-section-wrapper" }, as = {
|
|
|
4756
4769
|
jwk: "",
|
|
4757
4770
|
private_key: "",
|
|
4758
4771
|
public_key: ""
|
|
4759
|
-
}),
|
|
4772
|
+
}), k = [
|
|
4760
4773
|
{
|
|
4761
4774
|
label: r("keys.form.fields.key_format.options.jwk"),
|
|
4762
4775
|
value: "jwk"
|
|
@@ -4765,37 +4778,37 @@ const ts = ["aria-labelledby"], ns = { class: "form-section-wrapper" }, as = {
|
|
|
4765
4778
|
label: r("keys.form.fields.key_format.options.pem"),
|
|
4766
4779
|
value: "pem"
|
|
4767
4780
|
}
|
|
4768
|
-
], f =
|
|
4769
|
-
he(() => a.fixedKeySetId, (
|
|
4770
|
-
u.value === Ve.Create && (s.fields.key_set =
|
|
4781
|
+
], f = I(() => s.isReadonly || u.value === Ve.Create && !!a.fixedKeySetId), _ = I(() => !f.value);
|
|
4782
|
+
he(() => a.fixedKeySetId, (C) => {
|
|
4783
|
+
u.value === Ve.Create && (s.fields.key_set = C);
|
|
4771
4784
|
}, { immediate: !0 });
|
|
4772
|
-
const
|
|
4773
|
-
var
|
|
4774
|
-
s.fields.key_id = (
|
|
4775
|
-
},
|
|
4785
|
+
const $ = I(() => JSON.stringify(s.fields) !== JSON.stringify(d) && !!s.fields.key_id && !!s.fields.key_format && (s.fields.key_format === "jwk" && !!s.fields.jwk || s.fields.key_format === "pem" && !!s.fields.private_key && !!s.fields.public_key)), w = (C) => {
|
|
4786
|
+
var j, H, te, ge;
|
|
4787
|
+
s.fields.key_id = (C == null ? void 0 : C.kid) || "", s.fields.name = (C == null ? void 0 : C.name) || "", s.fields.tags = ((j = C == null ? void 0 : C.tags) == null ? void 0 : j.join(", ")) || "", s.fields.key_set = ((H = C == null ? void 0 : C.set) == null ? void 0 : H.id) || "", s.fields.key_format = C != null && C.pem ? "pem" : "jwk", s.fields.jwk = (C == null ? void 0 : C.jwk) || "", s.fields.private_key = ((te = C == null ? void 0 : C.pem) == null ? void 0 : te.private_key) || "", s.fields.public_key = ((ge = C == null ? void 0 : C.pem) == null ? void 0 : ge.public_key) || "", Object.assign(d, s.fields);
|
|
4788
|
+
}, q = () => {
|
|
4776
4789
|
i.push(a.config.cancelRoute);
|
|
4777
|
-
},
|
|
4778
|
-
var
|
|
4779
|
-
let
|
|
4780
|
-
return a.config.app === "konnect" ?
|
|
4781
|
-
}),
|
|
4782
|
-
var
|
|
4790
|
+
}, h = I(() => {
|
|
4791
|
+
var j, H;
|
|
4792
|
+
let C = `${a.config.apiBaseUrl}${Ie.form[a.config.app][u.value][a.keySetId ? "forKeySet" : "all"]}`;
|
|
4793
|
+
return a.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((j = a.config) == null ? void 0 : j.controlPlaneId) || "") : a.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (H = a.config) != null && H.workspace ? `/${a.config.workspace}` : "")), C = C.replace(/{id}/gi, a.keyId).replace(/{keySetId}/gi, a.keySetId || ""), C;
|
|
4794
|
+
}), D = I(() => {
|
|
4795
|
+
var C, j, H;
|
|
4783
4796
|
return {
|
|
4784
4797
|
kid: s.fields.key_id,
|
|
4785
4798
|
name: s.fields.name || null,
|
|
4786
|
-
tags: ((H = (
|
|
4799
|
+
tags: ((H = (j = (C = s.fields.tags) == null ? void 0 : C.split(",")) == null ? void 0 : j.map((te) => String(te || "").trim())) == null ? void 0 : H.filter((te) => te !== "")) || [],
|
|
4787
4800
|
set: s.fields.key_set ? { id: s.fields.key_set } : null,
|
|
4788
4801
|
jwk: s.fields.key_format === "jwk" ? s.fields.jwk : null,
|
|
4789
4802
|
pem: s.fields.key_format === "pem" ? { private_key: s.fields.private_key, public_key: s.fields.public_key } : null
|
|
4790
4803
|
};
|
|
4791
4804
|
}), v = async () => {
|
|
4792
|
-
var
|
|
4805
|
+
var C, j, H, te, ge;
|
|
4793
4806
|
try {
|
|
4794
4807
|
s.isReadonly = !0;
|
|
4795
4808
|
let V;
|
|
4796
|
-
if (u.value === "create" ? V = await l.post(
|
|
4809
|
+
if (u.value === "create" ? V = await l.post(h.value, D.value) : u.value === "edit" && (V = ((C = a.config) == null ? void 0 : C.app) === "konnect" ? await l.put(h.value, D.value) : await l.patch(h.value, D.value)), V) {
|
|
4797
4810
|
const { data: Y } = V;
|
|
4798
|
-
s.fields.key_id = (Y == null ? void 0 : Y.kid) || "", s.fields.name = (Y == null ? void 0 : Y.name) || "", s.fields.tags = ((
|
|
4811
|
+
s.fields.key_id = (Y == null ? void 0 : Y.kid) || "", s.fields.name = (Y == null ? void 0 : Y.name) || "", s.fields.tags = ((j = Y == null ? void 0 : Y.tags) == null ? void 0 : j.join(", ")) || "", s.fields.key_set = ((H = Y == null ? void 0 : Y.set) == null ? void 0 : H.id) || "", s.fields.key_format = Y != null && Y.pem ? "pem" : "jwk", s.fields.jwk = (Y == null ? void 0 : Y.jwk) || "", s.fields.private_key = ((te = Y == null ? void 0 : Y.pem) == null ? void 0 : te.private_key) || "", s.fields.public_key = ((ge = Y == null ? void 0 : Y.pem) == null ? void 0 : ge.public_key) || "", Object.assign(d, s.fields), n("update", V == null ? void 0 : V.data);
|
|
4799
4812
|
}
|
|
4800
4813
|
} catch (V) {
|
|
4801
4814
|
s.errorMessage = o(V), n("error", V);
|
|
@@ -4804,189 +4817,189 @@ const ts = ["aria-labelledby"], ns = { class: "form-section-wrapper" }, as = {
|
|
|
4804
4817
|
}
|
|
4805
4818
|
}, {
|
|
4806
4819
|
debouncedQueryChange: p,
|
|
4807
|
-
loading:
|
|
4820
|
+
loading: y,
|
|
4808
4821
|
allRecords: S,
|
|
4809
|
-
error:
|
|
4810
|
-
validationError:
|
|
4811
|
-
loadItems:
|
|
4812
|
-
results:
|
|
4813
|
-
} = us(a.config,
|
|
4822
|
+
error: L,
|
|
4823
|
+
validationError: A,
|
|
4824
|
+
loadItems: P,
|
|
4825
|
+
results: N
|
|
4826
|
+
} = us(a.config, Ie.form[a.config.app].keySets, void 0, {
|
|
4814
4827
|
fetchedItemsKey: "data",
|
|
4815
4828
|
searchKeys: ["id", "name"]
|
|
4816
|
-
}), O = (
|
|
4817
|
-
(!
|
|
4818
|
-
}, z =
|
|
4829
|
+
}), O = (C) => {
|
|
4830
|
+
(!C || C !== s.fields.key_set && C !== d.key_set) && p(C);
|
|
4831
|
+
}, z = I(() => L.value ? r("keys.errors.key_sets.fetch") : ""), W = I(() => A.value ? r("keys.errors.key_sets.invalid") : ""), ue = M(0), de = I(() => S.value === void 0), ye = I(() => {
|
|
4819
4832
|
if (de.value)
|
|
4820
4833
|
return a.config.app === "konnect" ? r("keys.form.fields.key_set.footer") : void 0;
|
|
4821
|
-
}),
|
|
4822
|
-
name:
|
|
4834
|
+
}), Fe = M(/* @__PURE__ */ new Set()), Ee = I(() => Array.from(Fe.value).map((j) => ({
|
|
4835
|
+
name: j.name || "",
|
|
4823
4836
|
// can't use name for label or it tries to search => 404
|
|
4824
4837
|
label: "",
|
|
4825
4838
|
// leave it blank so no flicker when used with selected-item-template
|
|
4826
|
-
value:
|
|
4827
|
-
selected: s.fields.key_set ===
|
|
4828
|
-
}))), We = (
|
|
4829
|
-
|
|
4830
|
-
let
|
|
4831
|
-
for (
|
|
4832
|
-
|
|
4839
|
+
value: j.id,
|
|
4840
|
+
selected: s.fields.key_set === j.id
|
|
4841
|
+
}))), We = (C) => {
|
|
4842
|
+
Fe.value.clear();
|
|
4843
|
+
let j;
|
|
4844
|
+
for (j of C)
|
|
4845
|
+
Fe.value.add(j);
|
|
4833
4846
|
};
|
|
4834
|
-
return he(
|
|
4835
|
-
We(
|
|
4836
|
-
}, { immediate: !0, deep: !0 }), he(
|
|
4847
|
+
return he(N, (C) => {
|
|
4848
|
+
We(C);
|
|
4849
|
+
}, { immediate: !0, deep: !0 }), he(Ee, () => {
|
|
4837
4850
|
ue.value++;
|
|
4838
4851
|
}, { immediate: !0, deep: !0 }), at(async () => {
|
|
4839
|
-
await
|
|
4840
|
-
}), (
|
|
4841
|
-
const H =
|
|
4842
|
-
return
|
|
4843
|
-
x(
|
|
4844
|
-
"can-submit":
|
|
4852
|
+
await P();
|
|
4853
|
+
}), (C, j) => {
|
|
4854
|
+
const H = U("KInput"), te = U("KSelect"), ge = U("KTextArea");
|
|
4855
|
+
return g(), K("div", ms, [
|
|
4856
|
+
x(m(Cl), {
|
|
4857
|
+
"can-submit": $.value,
|
|
4845
4858
|
config: e.config,
|
|
4846
4859
|
"edit-id": e.keyId,
|
|
4847
4860
|
"error-message": s.errorMessage || z.value,
|
|
4848
4861
|
"fetch-url": c.value,
|
|
4849
|
-
"form-fields":
|
|
4862
|
+
"form-fields": D.value,
|
|
4850
4863
|
"is-readonly": s.isReadonly,
|
|
4851
|
-
onCancel:
|
|
4852
|
-
"onFetch:error":
|
|
4853
|
-
"onFetch:success":
|
|
4854
|
-
onLoading:
|
|
4864
|
+
onCancel: q,
|
|
4865
|
+
"onFetch:error": j[8] || (j[8] = (V) => C.$emit("error", V)),
|
|
4866
|
+
"onFetch:success": w,
|
|
4867
|
+
onLoading: j[9] || (j[9] = (V) => C.$emit("loading", V)),
|
|
4855
4868
|
onSubmit: v
|
|
4856
4869
|
}, {
|
|
4857
|
-
default:
|
|
4858
|
-
x(
|
|
4859
|
-
description:
|
|
4860
|
-
title:
|
|
4870
|
+
default: b(() => [
|
|
4871
|
+
x(m(nn), {
|
|
4872
|
+
description: m(r)("keys.form.sections.general.description"),
|
|
4873
|
+
title: m(r)("keys.form.sections.general.title")
|
|
4861
4874
|
}, {
|
|
4862
|
-
default:
|
|
4875
|
+
default: b(() => [
|
|
4863
4876
|
x(H, {
|
|
4864
4877
|
modelValue: s.fields.key_id,
|
|
4865
|
-
"onUpdate:modelValue":
|
|
4878
|
+
"onUpdate:modelValue": j[0] || (j[0] = (V) => s.fields.key_id = V),
|
|
4866
4879
|
modelModifiers: { trim: !0 },
|
|
4867
4880
|
autocomplete: "off",
|
|
4868
4881
|
"data-testid": "key-form-id",
|
|
4869
|
-
help:
|
|
4870
|
-
label:
|
|
4871
|
-
"label-attributes": { info:
|
|
4872
|
-
placeholder:
|
|
4882
|
+
help: m(r)("keys.form.fields.id.help"),
|
|
4883
|
+
label: m(r)("keys.form.fields.id.label"),
|
|
4884
|
+
"label-attributes": { info: m(r)("keys.form.fields.id.tooltip") },
|
|
4885
|
+
placeholder: m(r)("keys.form.fields.id.placeholder"),
|
|
4873
4886
|
readonly: s.isReadonly,
|
|
4874
4887
|
required: "",
|
|
4875
4888
|
type: "text"
|
|
4876
4889
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"]),
|
|
4877
4890
|
x(H, {
|
|
4878
4891
|
modelValue: s.fields.name,
|
|
4879
|
-
"onUpdate:modelValue":
|
|
4892
|
+
"onUpdate:modelValue": j[1] || (j[1] = (V) => s.fields.name = V),
|
|
4880
4893
|
modelModifiers: { trim: !0 },
|
|
4881
4894
|
autocomplete: "off",
|
|
4882
4895
|
"data-testid": "key-form-name",
|
|
4883
|
-
label:
|
|
4884
|
-
placeholder:
|
|
4896
|
+
label: m(r)("keys.form.fields.name.label"),
|
|
4897
|
+
placeholder: m(r)("keys.form.fields.name.placeholder"),
|
|
4885
4898
|
readonly: s.isReadonly,
|
|
4886
4899
|
type: "text"
|
|
4887
4900
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
4888
4901
|
x(te, {
|
|
4889
4902
|
modelValue: s.fields.key_set,
|
|
4890
|
-
"onUpdate:modelValue":
|
|
4891
|
-
clearable:
|
|
4903
|
+
"onUpdate:modelValue": j[2] || (j[2] = (V) => s.fields.key_set = V),
|
|
4904
|
+
clearable: _.value,
|
|
4892
4905
|
"data-testid": "key-form-key-set",
|
|
4893
4906
|
"dropdown-footer-text": ye.value,
|
|
4894
4907
|
"enable-filtering": "",
|
|
4895
4908
|
"filter-function": () => !0,
|
|
4896
|
-
items:
|
|
4897
|
-
label:
|
|
4898
|
-
loading: y
|
|
4899
|
-
placeholder:
|
|
4909
|
+
items: Ee.value,
|
|
4910
|
+
label: m(r)("keys.form.fields.key_set.label"),
|
|
4911
|
+
loading: m(y),
|
|
4912
|
+
placeholder: m(r)("keys.form.fields.key_set.placeholder"),
|
|
4900
4913
|
readonly: f.value,
|
|
4901
4914
|
width: "100%",
|
|
4902
4915
|
onQueryChange: O
|
|
4903
4916
|
}, {
|
|
4904
|
-
loading:
|
|
4905
|
-
|
|
4917
|
+
loading: b(() => [
|
|
4918
|
+
B("div", null, F(m(r)("keys.actions.loading")), 1)
|
|
4906
4919
|
]),
|
|
4907
|
-
empty:
|
|
4908
|
-
|
|
4920
|
+
empty: b(() => [
|
|
4921
|
+
B("div", gs, F(m(r)("keys.search.no_results")), 1)
|
|
4909
4922
|
]),
|
|
4910
|
-
"selected-item-template":
|
|
4911
|
-
|
|
4923
|
+
"selected-item-template": b(({ item: V }) => [
|
|
4924
|
+
B("div", null, F(V.name), 1)
|
|
4912
4925
|
]),
|
|
4913
|
-
"item-template":
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4926
|
+
"item-template": b(({ item: V }) => [
|
|
4927
|
+
B("div", hs, [
|
|
4928
|
+
B("div", vs, F(V.name), 1),
|
|
4929
|
+
B("div", ks, F(V.value), 1)
|
|
4917
4930
|
])
|
|
4918
4931
|
]),
|
|
4919
4932
|
_: 1
|
|
4920
4933
|
}, 8, ["modelValue", "clearable", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly"]),
|
|
4921
|
-
W.value ? (
|
|
4934
|
+
W.value ? (g(), K("p", bs, F(W.value), 1)) : J("", !0),
|
|
4922
4935
|
x(H, {
|
|
4923
4936
|
modelValue: s.fields.tags,
|
|
4924
|
-
"onUpdate:modelValue":
|
|
4937
|
+
"onUpdate:modelValue": j[3] || (j[3] = (V) => s.fields.tags = V),
|
|
4925
4938
|
modelModifiers: { trim: !0 },
|
|
4926
4939
|
autocomplete: "off",
|
|
4927
4940
|
"data-testid": "key-form-tags",
|
|
4928
|
-
help:
|
|
4929
|
-
label:
|
|
4930
|
-
"label-attributes": { info:
|
|
4931
|
-
placeholder:
|
|
4941
|
+
help: m(r)("keys.form.fields.tags.help"),
|
|
4942
|
+
label: m(r)("keys.form.fields.tags.label"),
|
|
4943
|
+
"label-attributes": { info: m(r)("keys.form.fields.tags.tooltip") },
|
|
4944
|
+
placeholder: m(r)("keys.form.fields.tags.placeholder"),
|
|
4932
4945
|
readonly: s.isReadonly,
|
|
4933
4946
|
type: "text"
|
|
4934
4947
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
4935
4948
|
]),
|
|
4936
4949
|
_: 1
|
|
4937
4950
|
}, 8, ["description", "title"]),
|
|
4938
|
-
x(
|
|
4939
|
-
description:
|
|
4951
|
+
x(m(nn), {
|
|
4952
|
+
description: m(r)("keys.form.sections.keys.description"),
|
|
4940
4953
|
"has-divider": "",
|
|
4941
|
-
title:
|
|
4954
|
+
title: m(r)("keys.form.sections.keys.title")
|
|
4942
4955
|
}, {
|
|
4943
|
-
default:
|
|
4944
|
-
|
|
4956
|
+
default: b(() => [
|
|
4957
|
+
B("div", Cs, [
|
|
4945
4958
|
x(te, {
|
|
4946
4959
|
modelValue: s.fields.key_format,
|
|
4947
|
-
"onUpdate:modelValue":
|
|
4960
|
+
"onUpdate:modelValue": j[4] || (j[4] = (V) => s.fields.key_format = V),
|
|
4948
4961
|
"data-testid": "key-form-key-format",
|
|
4949
|
-
items:
|
|
4950
|
-
label:
|
|
4962
|
+
items: k,
|
|
4963
|
+
label: m(r)("keys.form.fields.key_format.label"),
|
|
4951
4964
|
readonly: s.isReadonly,
|
|
4952
4965
|
required: "",
|
|
4953
4966
|
width: "100%"
|
|
4954
4967
|
}, null, 8, ["modelValue", "label", "readonly"])
|
|
4955
4968
|
]),
|
|
4956
|
-
s.fields.key_format === "jwk" ? (
|
|
4969
|
+
s.fields.key_format === "jwk" ? (g(), R(ge, {
|
|
4957
4970
|
key: 0,
|
|
4958
4971
|
modelValue: s.fields.jwk,
|
|
4959
|
-
"onUpdate:modelValue":
|
|
4972
|
+
"onUpdate:modelValue": j[5] || (j[5] = (V) => s.fields.jwk = V),
|
|
4960
4973
|
modelModifiers: { trim: !0 },
|
|
4961
4974
|
class: "key-form-textarea",
|
|
4962
4975
|
"data-testid": "key-form-jwk",
|
|
4963
|
-
label:
|
|
4964
|
-
"label-attributes": { info:
|
|
4965
|
-
placeholder:
|
|
4976
|
+
label: m(r)("keys.form.fields.jwk.label"),
|
|
4977
|
+
"label-attributes": { info: m(r)("keys.form.fields.jwk.tooltip") },
|
|
4978
|
+
placeholder: m(r)("keys.form.fields.jwk.placeholder"),
|
|
4966
4979
|
readonly: s.isReadonly,
|
|
4967
4980
|
required: ""
|
|
4968
4981
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])) : J("", !0),
|
|
4969
|
-
s.fields.key_format === "pem" ? (
|
|
4982
|
+
s.fields.key_format === "pem" ? (g(), R(ge, {
|
|
4970
4983
|
key: 1,
|
|
4971
4984
|
modelValue: s.fields.private_key,
|
|
4972
|
-
"onUpdate:modelValue":
|
|
4985
|
+
"onUpdate:modelValue": j[6] || (j[6] = (V) => s.fields.private_key = V),
|
|
4973
4986
|
modelModifiers: { trim: !0 },
|
|
4974
4987
|
class: "key-form-textarea",
|
|
4975
4988
|
"data-testid": "key-form-private-key",
|
|
4976
|
-
label:
|
|
4977
|
-
placeholder:
|
|
4989
|
+
label: m(r)("keys.form.fields.private_key.label"),
|
|
4990
|
+
placeholder: m(r)("keys.form.fields.private_key.placeholder"),
|
|
4978
4991
|
readonly: s.isReadonly,
|
|
4979
4992
|
required: ""
|
|
4980
4993
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"])) : J("", !0),
|
|
4981
|
-
s.fields.key_format === "pem" ? (
|
|
4994
|
+
s.fields.key_format === "pem" ? (g(), R(ge, {
|
|
4982
4995
|
key: 2,
|
|
4983
4996
|
modelValue: s.fields.public_key,
|
|
4984
|
-
"onUpdate:modelValue":
|
|
4997
|
+
"onUpdate:modelValue": j[7] || (j[7] = (V) => s.fields.public_key = V),
|
|
4985
4998
|
modelModifiers: { trim: !0 },
|
|
4986
4999
|
class: "key-form-textarea",
|
|
4987
5000
|
"data-testid": "key-form-public-key",
|
|
4988
|
-
label:
|
|
4989
|
-
placeholder:
|
|
5001
|
+
label: m(r)("keys.form.fields.public_key.label"),
|
|
5002
|
+
placeholder: m(r)("keys.form.fields.public_key.placeholder"),
|
|
4990
5003
|
readonly: s.isReadonly,
|
|
4991
5004
|
required: ""
|
|
4992
5005
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"])) : J("", !0)
|
|
@@ -4999,7 +5012,7 @@ const ts = ["aria-labelledby"], ns = { class: "form-section-wrapper" }, as = {
|
|
|
4999
5012
|
]);
|
|
5000
5013
|
};
|
|
5001
5014
|
}
|
|
5002
|
-
}), qs = /* @__PURE__ */ aa(
|
|
5015
|
+
}), qs = /* @__PURE__ */ aa(ws, [["__scopeId", "data-v-e3c278d7"]]), Ss = { class: "kong-ui-entities-keys-entity-config-card" }, _s = { key: 2 }, Ls = /* @__PURE__ */ X({
|
|
5003
5016
|
__name: "KeyConfigCard",
|
|
5004
5017
|
props: {
|
|
5005
5018
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5033,51 +5046,51 @@ const ts = ["aria-labelledby"], ns = { class: "form-section-wrapper" }, as = {
|
|
|
5033
5046
|
},
|
|
5034
5047
|
emits: ["loading", "fetch:error", "fetch:success", "navigation-click"],
|
|
5035
5048
|
setup(e, { emit: t }) {
|
|
5036
|
-
var
|
|
5037
|
-
const n = t, a = e, { axiosInstance: i } = Tt((
|
|
5038
|
-
var
|
|
5039
|
-
return (
|
|
5040
|
-
}), u =
|
|
5041
|
-
var
|
|
5042
|
-
u.value =
|
|
5049
|
+
var q;
|
|
5050
|
+
const n = t, a = e, { axiosInstance: i } = Tt((q = a.config) == null ? void 0 : q.axiosRequestConfig), { convertKeyToTitle: r } = ds(), { i18n: { t: o } } = wt.useI18n(), l = I(() => a.keySetId ? `${Ie.form[a.config.app].edit.forKeySet}`.replace(/{keySetId}/gi, a.keySetId) : Ie.form[a.config.app].edit.all), c = I(() => {
|
|
5051
|
+
var h;
|
|
5052
|
+
return (h = Ie.form[a.config.app]) == null ? void 0 : h.getKeySet;
|
|
5053
|
+
}), u = M(), s = M({}), d = M(a.keySetId || ""), k = M(""), f = M(!1), _ = async (h) => {
|
|
5054
|
+
var D;
|
|
5055
|
+
u.value = h, d.value = (D = h == null ? void 0 : h.set) == null ? void 0 : D.id, n("fetch:success", h), $(h);
|
|
5043
5056
|
};
|
|
5044
5057
|
he(d, async () => {
|
|
5045
|
-
var
|
|
5058
|
+
var D, v;
|
|
5046
5059
|
if (!d.value)
|
|
5047
5060
|
return;
|
|
5048
|
-
let
|
|
5049
|
-
a.config.app === "konnect" ?
|
|
5061
|
+
let h = `${a.config.apiBaseUrl}${c.value}`;
|
|
5062
|
+
a.config.app === "konnect" ? h = h.replace(/{controlPlaneId}/gi, ((D = a.config) == null ? void 0 : D.controlPlaneId) || "").replace(/{keySetId}/gi, d.value || "") : a.config.app === "kongManager" && (h = h.replace(/\/{workspace}/gi, (v = a.config) != null && v.workspace ? `/${a.config.workspace}` : "").replace(/{keySetId}/gi, d.value || ""));
|
|
5050
5063
|
try {
|
|
5051
5064
|
f.value = !0;
|
|
5052
|
-
const { data: p } = await i.get(
|
|
5053
|
-
|
|
5065
|
+
const { data: p } = await i.get(h);
|
|
5066
|
+
k.value = (p == null ? void 0 : p.name) || (p == null ? void 0 : p.id);
|
|
5054
5067
|
} catch (p) {
|
|
5055
5068
|
n("fetch:error", p);
|
|
5056
5069
|
} finally {
|
|
5057
5070
|
f.value = !1;
|
|
5058
5071
|
}
|
|
5059
5072
|
}, { immediate: !0 });
|
|
5060
|
-
const
|
|
5061
|
-
var
|
|
5073
|
+
const $ = (h) => {
|
|
5074
|
+
var D, v;
|
|
5062
5075
|
try {
|
|
5063
|
-
if (
|
|
5064
|
-
const p = JSON.parse(
|
|
5065
|
-
Object.keys(p).forEach((
|
|
5076
|
+
if (h.jwk) {
|
|
5077
|
+
const p = JSON.parse(h.jwk);
|
|
5078
|
+
Object.keys(p).forEach((y) => {
|
|
5066
5079
|
s.value = {
|
|
5067
5080
|
...s.value,
|
|
5068
|
-
[`jwk.${
|
|
5081
|
+
[`jwk.${y}`]: p[y]
|
|
5069
5082
|
};
|
|
5070
5083
|
});
|
|
5071
5084
|
} else
|
|
5072
5085
|
s.value = {
|
|
5073
|
-
"pem.public_key": (
|
|
5074
|
-
"pem.private_key": (v =
|
|
5086
|
+
"pem.public_key": (D = h == null ? void 0 : h.pem) == null ? void 0 : D.public_key,
|
|
5087
|
+
"pem.private_key": (v = h == null ? void 0 : h.pem) == null ? void 0 : v.private_key
|
|
5075
5088
|
};
|
|
5076
5089
|
} catch (p) {
|
|
5077
5090
|
n("fetch:error", p);
|
|
5078
5091
|
}
|
|
5079
5092
|
return s;
|
|
5080
|
-
},
|
|
5093
|
+
}, w = M({
|
|
5081
5094
|
id: {},
|
|
5082
5095
|
name: {
|
|
5083
5096
|
tooltip: o("keys.form.fields.name.tooltip")
|
|
@@ -5109,61 +5122,61 @@ const ts = ["aria-labelledby"], ns = { class: "form-section-wrapper" }, as = {
|
|
|
5109
5122
|
type: Z.Json
|
|
5110
5123
|
}
|
|
5111
5124
|
});
|
|
5112
|
-
return (
|
|
5113
|
-
var p,
|
|
5114
|
-
const v =
|
|
5115
|
-
return
|
|
5116
|
-
x(
|
|
5125
|
+
return (h, D) => {
|
|
5126
|
+
var p, y;
|
|
5127
|
+
const v = U("KSkeleton");
|
|
5128
|
+
return g(), K("div", Ss, [
|
|
5129
|
+
x(m(hl), {
|
|
5117
5130
|
config: e.config,
|
|
5118
5131
|
"config-card-doc": e.configCardDoc,
|
|
5119
|
-
"config-schema":
|
|
5132
|
+
"config-schema": w.value,
|
|
5120
5133
|
"fetch-url": l.value,
|
|
5121
5134
|
"hide-title": e.hideTitle,
|
|
5122
|
-
"onFetch:error":
|
|
5123
|
-
"onFetch:success":
|
|
5124
|
-
onLoading:
|
|
5125
|
-
},
|
|
5126
|
-
set:
|
|
5127
|
-
f.value ? (
|
|
5135
|
+
"onFetch:error": D[0] || (D[0] = (S) => h.$emit("fetch:error", S)),
|
|
5136
|
+
"onFetch:success": _,
|
|
5137
|
+
onLoading: D[1] || (D[1] = (S) => h.$emit("loading", S))
|
|
5138
|
+
}, Me({
|
|
5139
|
+
set: b(({ row: S }) => [
|
|
5140
|
+
f.value ? (g(), R(v, {
|
|
5128
5141
|
key: 0,
|
|
5129
5142
|
"data-testid": "key-set-name-loader",
|
|
5130
5143
|
type: "spinner"
|
|
5131
|
-
})) : S.value && S.value.id === d.value &&
|
|
5144
|
+
})) : S.value && S.value.id === d.value && k.value ? (g(), R(m(fn), {
|
|
5132
5145
|
key: 1,
|
|
5133
5146
|
item: {
|
|
5134
5147
|
key: S.value.id,
|
|
5135
|
-
value:
|
|
5136
|
-
type:
|
|
5148
|
+
value: k.value,
|
|
5149
|
+
type: m(Z).LinkInternal
|
|
5137
5150
|
},
|
|
5138
|
-
onClick: (
|
|
5139
|
-
}, null, 8, ["item", "onClick"])) : (
|
|
5151
|
+
onClick: (L) => h.$emit("navigation-click", S.value.id, "key-sets")
|
|
5152
|
+
}, null, 8, ["item", "onClick"])) : (g(), K("div", _s, F("–")))
|
|
5140
5153
|
]),
|
|
5141
5154
|
_: 2
|
|
5142
5155
|
}, [
|
|
5143
5156
|
(p = u.value) != null && p.jwk ? {
|
|
5144
5157
|
name: "jwk",
|
|
5145
|
-
fn:
|
|
5146
|
-
(
|
|
5158
|
+
fn: b(() => [
|
|
5159
|
+
(g(!0), K(me, null, fe(Object.keys(s.value), (S) => (g(), R(m(Ge), {
|
|
5147
5160
|
key: S,
|
|
5148
5161
|
"data-testid": `${S}`,
|
|
5149
5162
|
item: {
|
|
5150
5163
|
key: S,
|
|
5151
|
-
label:
|
|
5164
|
+
label: m(r)(S),
|
|
5152
5165
|
value: s.value[S]
|
|
5153
5166
|
}
|
|
5154
5167
|
}, null, 8, ["data-testid", "item"]))), 128))
|
|
5155
5168
|
]),
|
|
5156
5169
|
key: "0"
|
|
5157
5170
|
} : void 0,
|
|
5158
|
-
(
|
|
5171
|
+
(y = u.value) != null && y.pem ? {
|
|
5159
5172
|
name: "pem",
|
|
5160
|
-
fn:
|
|
5161
|
-
(
|
|
5173
|
+
fn: b(() => [
|
|
5174
|
+
(g(!0), K(me, null, fe(Object.keys(s.value), (S) => (g(), R(m(Ge), {
|
|
5162
5175
|
key: S,
|
|
5163
5176
|
"data-testid": `${S}`,
|
|
5164
5177
|
item: {
|
|
5165
5178
|
key: S,
|
|
5166
|
-
label:
|
|
5179
|
+
label: m(r)(S),
|
|
5167
5180
|
value: s.value[S]
|
|
5168
5181
|
}
|
|
5169
5182
|
}, null, 8, ["data-testid", "item"]))), 128))
|
|
@@ -5178,5 +5191,5 @@ const ts = ["aria-labelledby"], ns = { class: "form-section-wrapper" }, as = {
|
|
|
5178
5191
|
export {
|
|
5179
5192
|
Ls as KeyConfigCard,
|
|
5180
5193
|
qs as KeyForm,
|
|
5181
|
-
|
|
5194
|
+
Es as KeyList
|
|
5182
5195
|
};
|