@kong-ui-public/entities-shared 3.10.18 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-shared.es.js +158 -157
- package/dist/entities-shared.umd.js +20 -20
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -162,12 +162,12 @@ const cr = {
|
|
|
162
162
|
applyButtonText: "Apply",
|
|
163
163
|
clearButtonText: "Clear",
|
|
164
164
|
clearAllButtonText: "Clear all filters"
|
|
165
|
-
},
|
|
165
|
+
}, hr = {
|
|
166
166
|
errors: {
|
|
167
167
|
fetch: "Could not fetch available items",
|
|
168
168
|
invalid: "Please select a valid value"
|
|
169
169
|
}
|
|
170
|
-
},
|
|
170
|
+
}, mr = {
|
|
171
171
|
unexpected: "An unexpected error has occurred",
|
|
172
172
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
173
173
|
}, gr = {
|
|
@@ -190,8 +190,8 @@ const cr = {
|
|
|
190
190
|
baseTable: dr,
|
|
191
191
|
baseConfigCard: fr,
|
|
192
192
|
filter: pr,
|
|
193
|
-
debouncedFilter:
|
|
194
|
-
errors:
|
|
193
|
+
debouncedFilter: hr,
|
|
194
|
+
errors: mr,
|
|
195
195
|
validationErrors: gr,
|
|
196
196
|
toggleModal: yr
|
|
197
197
|
};
|
|
@@ -255,7 +255,7 @@ function br(e, t, n, r = {
|
|
|
255
255
|
}, 200), c = B(!1), u = B(""), d = B(""), s = B([]), p = B([]), f = B(void 0), g = $(() => {
|
|
256
256
|
const L = `${e.apiBaseUrl}${I(t)}`;
|
|
257
257
|
return e.app === "konnect" ? L.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? L.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : L;
|
|
258
|
-
}), { isValidUuid:
|
|
258
|
+
}), { isValidUuid: m } = Mt(), x = async () => {
|
|
259
259
|
try {
|
|
260
260
|
c.value = !0;
|
|
261
261
|
const { data: L } = await i.get(`${g.value}?size=${n}`);
|
|
@@ -266,7 +266,7 @@ function br(e, t, n, r = {
|
|
|
266
266
|
c.value = !1;
|
|
267
267
|
}
|
|
268
268
|
}, E = B(""), y = async (L) => {
|
|
269
|
-
var F, T,
|
|
269
|
+
var F, T, h;
|
|
270
270
|
if (E.value !== L) {
|
|
271
271
|
if (E.value = L ?? "", !L) {
|
|
272
272
|
s.value = p.value;
|
|
@@ -279,7 +279,7 @@ function br(e, t, n, r = {
|
|
|
279
279
|
r.fetchedItemsKey in S ? s.value = S[r.fetchedItemsKey] : S != null && S[r.exactMatchKey ?? "id"] ? s.value = [S] : s.value = [];
|
|
280
280
|
} else {
|
|
281
281
|
const A = [];
|
|
282
|
-
|
|
282
|
+
m(L) && r.searchKeys.includes("id") ? A.push((async () => {
|
|
283
283
|
const { data: b } = await i.get(`${g.value}/${L}`);
|
|
284
284
|
return [b[r.fetchedItemsKey] ?? b];
|
|
285
285
|
})()) : A.push(
|
|
@@ -302,7 +302,7 @@ function br(e, t, n, r = {
|
|
|
302
302
|
c.value = !1;
|
|
303
303
|
}
|
|
304
304
|
else
|
|
305
|
-
c.value = !0, d.value = "", s.value = (
|
|
305
|
+
c.value = !0, d.value = "", s.value = (h = f.value) == null ? void 0 : h.filter((A) => {
|
|
306
306
|
var w;
|
|
307
307
|
let S = !1;
|
|
308
308
|
for (const b of r.searchKeys) {
|
|
@@ -380,8 +380,8 @@ function Dt(e, t) {
|
|
|
380
380
|
const { page: l, pageSize: c, offset: u, sortColumnKey: d, sortColumnOrder: s, query: p } = a;
|
|
381
381
|
try {
|
|
382
382
|
let f = new URL(o.value.href);
|
|
383
|
-
return i.value && p ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${p}`) : new URL(`${f.href}?filter[name][contains]=${p}`)) : (i.value || new URLSearchParams(p).forEach((g,
|
|
384
|
-
f.searchParams.append(
|
|
383
|
+
return i.value && p ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${p}`) : new URL(`${f.href}?filter[name][contains]=${p}`)) : (i.value || new URLSearchParams(p).forEach((g, m) => {
|
|
384
|
+
f.searchParams.append(m, g);
|
|
385
385
|
}), d && f.searchParams.append("sort_by", d), s === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(c))), u && l !== 1 && f.searchParams.append("offset", String(u)), f.href;
|
|
386
386
|
} catch (f) {
|
|
387
387
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
@@ -399,10 +399,10 @@ function kr(e, t, n) {
|
|
|
399
399
|
l.value = r.value ? { status: ue.InitialLoad } : { status: ue.Loading }, r.value = !1;
|
|
400
400
|
let g = a(s);
|
|
401
401
|
g.includes("filter[name]") && (g = `${g}&page[size]=${s.pageSize}&page[number]=${s.page}`);
|
|
402
|
-
const
|
|
403
|
-
if (
|
|
404
|
-
throw
|
|
405
|
-
const x =
|
|
402
|
+
const m = await o.get(g);
|
|
403
|
+
if (m.status >= 400)
|
|
404
|
+
throw m;
|
|
405
|
+
const x = m.data, E = p && p.replace(/[^\w-_]/gi, "");
|
|
406
406
|
let y;
|
|
407
407
|
x[E] ? y = Array.isArray(x[E]) ? x[E] : [x[E]] : Array.isArray(x) ? y = x : y = Object.keys(x).length ? [x] : [];
|
|
408
408
|
const L = {
|
|
@@ -422,19 +422,19 @@ function kr(e, t, n) {
|
|
|
422
422
|
response: L
|
|
423
423
|
}, L;
|
|
424
424
|
} catch (g) {
|
|
425
|
-
const
|
|
425
|
+
const m = {
|
|
426
426
|
data: [],
|
|
427
427
|
total: 0
|
|
428
428
|
};
|
|
429
429
|
return s.query && (((f = g.response) == null ? void 0 : f.status) === 404 || g.status === 404) ? (l.value = {
|
|
430
430
|
status: ue.NoResults,
|
|
431
|
-
response:
|
|
431
|
+
response: m,
|
|
432
432
|
error: g.response ? g : { response: g }
|
|
433
|
-
},
|
|
433
|
+
}, m) : (l.value = {
|
|
434
434
|
status: ue.Error,
|
|
435
|
-
response:
|
|
435
|
+
response: m,
|
|
436
436
|
error: g.response ? g : { response: g }
|
|
437
|
-
},
|
|
437
|
+
}, m);
|
|
438
438
|
}
|
|
439
439
|
}, u = e.cacheIdentifier, d = jt(u);
|
|
440
440
|
return { fetcher: c, fetcherState: l, fetcherCacheKey: d };
|
|
@@ -468,7 +468,7 @@ const Ut = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
468
468
|
return 0;
|
|
469
469
|
const [n, r] = wr(pt(e), pt(t));
|
|
470
470
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
471
|
-
},
|
|
471
|
+
}, ht = (e, t) => {
|
|
472
472
|
for (let n = 0; n < Math.max(e.length, t.length); n++) {
|
|
473
473
|
const r = Sr(e[n] || "0", t[n] || "0");
|
|
474
474
|
if (r !== 0)
|
|
@@ -476,9 +476,9 @@ const Ut = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
476
476
|
}
|
|
477
477
|
return 0;
|
|
478
478
|
}, Tr = (e, t) => {
|
|
479
|
-
const n = dt(e), r = dt(t), i = n.pop(), o = r.pop(), a =
|
|
480
|
-
return a !== 0 ? a : i && o ?
|
|
481
|
-
},
|
|
479
|
+
const n = dt(e), r = dt(t), i = n.pop(), o = r.pop(), a = ht(n, r);
|
|
480
|
+
return a !== 0 ? a : i && o ? ht(i.split("."), o.split(".")) : i || o ? i ? -1 : 1 : 0;
|
|
481
|
+
}, mt = (e, t, n) => {
|
|
482
482
|
Ir(n);
|
|
483
483
|
const r = Tr(e, t);
|
|
484
484
|
return Pt[n].includes(r);
|
|
@@ -506,7 +506,7 @@ function Er(e) {
|
|
|
506
506
|
if (!o)
|
|
507
507
|
return !1;
|
|
508
508
|
const [a, l] = o;
|
|
509
|
-
return !(a &&
|
|
509
|
+
return !(a && mt(i, a, "<") || l && mt(i, l, ">"));
|
|
510
510
|
}
|
|
511
511
|
function Fr(e) {
|
|
512
512
|
const t = B(0), n = B(0), r = B(!1);
|
|
@@ -798,9 +798,9 @@ const We = Symbol("schema"), Lr = (e) => {
|
|
|
798
798
|
text: n.item.value
|
|
799
799
|
};
|
|
800
800
|
}
|
|
801
|
-
}), g = B(),
|
|
801
|
+
}), g = B(), m = B(), { isTruncated: x } = H.useTruncationDetector(g), { isTruncated: E } = H.useTruncationDetector(m);
|
|
802
802
|
return (y, L) => {
|
|
803
|
-
const F = j("KTooltip"), T = j("KLabel"),
|
|
803
|
+
const F = j("KTooltip"), T = j("KLabel"), h = j("KBadge"), A = j("KCopy");
|
|
804
804
|
return v(), R("div", Wr, [
|
|
805
805
|
M("div", {
|
|
806
806
|
class: "config-card-details-label",
|
|
@@ -854,7 +854,7 @@ const We = Symbol("schema"), Lr = (e) => {
|
|
|
854
854
|
key: 0,
|
|
855
855
|
"data-testid": `${e.item.key}-badge-tags`
|
|
856
856
|
}, [
|
|
857
|
-
(v(!0), R(le, null, oe(e.item.value, (S, w) => (v(), D(
|
|
857
|
+
(v(!0), R(le, null, oe(e.item.value, (S, w) => (v(), D(h, {
|
|
858
858
|
key: `${e.item.key}-badge-tag-${w}`,
|
|
859
859
|
class: "config-badge",
|
|
860
860
|
"data-testid": `${e.item.key}-badge-tag-${w}`,
|
|
@@ -882,7 +882,7 @@ const We = Symbol("schema"), Lr = (e) => {
|
|
|
882
882
|
class: "method-badge-array",
|
|
883
883
|
"data-testid": `${e.item.key}-badge-methods`
|
|
884
884
|
}, [
|
|
885
|
-
(v(!0), R(le, null, oe(e.item.value, (S, w) => (v(), D(
|
|
885
|
+
(v(!0), R(le, null, oe(e.item.value, (S, w) => (v(), D(h, {
|
|
886
886
|
key: `${e.item.key}-badge-method-${w}`,
|
|
887
887
|
appearance: Object.values(I(Wn)).includes(S.toLowerCase()) ? S.toLowerCase() : "custom",
|
|
888
888
|
class: "config-badge",
|
|
@@ -911,7 +911,7 @@ const We = Symbol("schema"), Lr = (e) => {
|
|
|
911
911
|
default: C(() => [
|
|
912
912
|
M("span", {
|
|
913
913
|
ref_key: "textContent",
|
|
914
|
-
ref:
|
|
914
|
+
ref: m,
|
|
915
915
|
class: fe(["attrs-data-text", { truncated: e.truncated }])
|
|
916
916
|
}, K(f.value.text), 3)
|
|
917
917
|
]),
|
|
@@ -1028,11 +1028,11 @@ function ui(e, t) {
|
|
|
1028
1028
|
function di(e) {
|
|
1029
1029
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1030
1030
|
}
|
|
1031
|
-
var fi = Vt, pi = li,
|
|
1031
|
+
var fi = Vt, pi = li, hi = ci, mi = ui, gi = di, yi = si, Q = {
|
|
1032
1032
|
isNothing: fi,
|
|
1033
1033
|
isObject: pi,
|
|
1034
|
-
toArray:
|
|
1035
|
-
repeat:
|
|
1034
|
+
toArray: hi,
|
|
1035
|
+
repeat: mi,
|
|
1036
1036
|
isNegativeZero: gi,
|
|
1037
1037
|
extend: yi
|
|
1038
1038
|
};
|
|
@@ -1562,14 +1562,14 @@ var pn = new X("tag:yaml.org,2002:set", {
|
|
|
1562
1562
|
fn,
|
|
1563
1563
|
pn
|
|
1564
1564
|
]
|
|
1565
|
-
}), pe = Object.prototype.hasOwnProperty, Le = 1,
|
|
1565
|
+
}), pe = Object.prototype.hasOwnProperty, Le = 1, hn = 2, mn = 3, Re = 4, Ye = 1, la = 2, vt = 3, ca = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, sa = /[\x85\u2028\u2029]/, ua = /[,\[\]\{\}]/, gn = /^(?:!|!!|![a-z\-]+!)$/i, yn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1566
1566
|
function bt(e) {
|
|
1567
1567
|
return Object.prototype.toString.call(e);
|
|
1568
1568
|
}
|
|
1569
1569
|
function ce(e) {
|
|
1570
1570
|
return e === 10 || e === 13;
|
|
1571
1571
|
}
|
|
1572
|
-
function
|
|
1572
|
+
function me(e) {
|
|
1573
1573
|
return e === 9 || e === 32;
|
|
1574
1574
|
}
|
|
1575
1575
|
function re(e) {
|
|
@@ -1592,7 +1592,7 @@ function xt(e) {
|
|
|
1592
1592
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1593
1593
|
` : 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" : "";
|
|
1594
1594
|
}
|
|
1595
|
-
function
|
|
1595
|
+
function ha(e) {
|
|
1596
1596
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1597
1597
|
(e - 65536 >> 10) + 55296,
|
|
1598
1598
|
(e - 65536 & 1023) + 56320
|
|
@@ -1601,7 +1601,7 @@ function ma(e) {
|
|
|
1601
1601
|
var vn = new Array(256), bn = new Array(256);
|
|
1602
1602
|
for (var ve = 0; ve < 256; ve++)
|
|
1603
1603
|
vn[ve] = xt(ve) ? 1 : 0, bn[ve] = xt(ve);
|
|
1604
|
-
function
|
|
1604
|
+
function ma(e, t) {
|
|
1605
1605
|
this.input = e, this.filename = t.filename || null, this.schema = t.schema || rt, 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 = [];
|
|
1606
1606
|
}
|
|
1607
1607
|
function xn(e, t) {
|
|
@@ -1678,7 +1678,7 @@ function it(e) {
|
|
|
1678
1678
|
}
|
|
1679
1679
|
function G(e, t, n) {
|
|
1680
1680
|
for (var r = 0, i = e.input.charCodeAt(e.position); i !== 0; ) {
|
|
1681
|
-
for (;
|
|
1681
|
+
for (; me(i); )
|
|
1682
1682
|
i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
|
|
1683
1683
|
if (t && i === 35)
|
|
1684
1684
|
do
|
|
@@ -1723,7 +1723,7 @@ function ga(e, t, n) {
|
|
|
1723
1723
|
break;
|
|
1724
1724
|
}
|
|
1725
1725
|
}
|
|
1726
|
-
l && (de(e, o, a, !1), at(e, e.line - c), o = a = e.position, l = !1),
|
|
1726
|
+
l && (de(e, o, a, !1), at(e, e.line - c), o = a = e.position, l = !1), me(f) || (a = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1727
1727
|
}
|
|
1728
1728
|
return de(e, o, a, !1), e.result ? !0 : (e.kind = s, e.result = p, !1);
|
|
1729
1729
|
}
|
|
@@ -1755,7 +1755,7 @@ function va(e, t) {
|
|
|
1755
1755
|
else if ((a = fa(l)) > 0) {
|
|
1756
1756
|
for (i = a, o = 0; i > 0; i--)
|
|
1757
1757
|
l = e.input.charCodeAt(++e.position), (a = da(l)) >= 0 ? o = (o << 4) + a : k(e, "expected hexadecimal character");
|
|
1758
|
-
e.result +=
|
|
1758
|
+
e.result += ha(o), e.position++;
|
|
1759
1759
|
} else
|
|
1760
1760
|
k(e, "unknown escape sequence");
|
|
1761
1761
|
n = r = e.position;
|
|
@@ -1764,7 +1764,7 @@ function va(e, t) {
|
|
|
1764
1764
|
k(e, "unexpected end of the stream within a double quoted scalar");
|
|
1765
1765
|
}
|
|
1766
1766
|
function ba(e, t) {
|
|
1767
|
-
var n = !0, r, i, o, a = e.tag, l, c = e.anchor, u, d, s, p, f, g = /* @__PURE__ */ Object.create(null),
|
|
1767
|
+
var n = !0, r, i, o, a = e.tag, l, c = e.anchor, u, d, s, p, f, g = /* @__PURE__ */ Object.create(null), m, x, E, y;
|
|
1768
1768
|
if (y = e.input.charCodeAt(e.position), y === 91)
|
|
1769
1769
|
d = 93, f = !1, l = [];
|
|
1770
1770
|
else if (y === 123)
|
|
@@ -1774,7 +1774,7 @@ function ba(e, t) {
|
|
|
1774
1774
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), y = e.input.charCodeAt(++e.position); y !== 0; ) {
|
|
1775
1775
|
if (G(e, !0, t), y = e.input.charCodeAt(e.position), y === d)
|
|
1776
1776
|
return e.position++, e.tag = a, e.anchor = c, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1777
|
-
n ? y === 44 && k(e, "expected the node content, but found ','") : k(e, "missed comma between flow collection entries"), x =
|
|
1777
|
+
n ? y === 44 && k(e, "expected the node content, but found ','") : k(e, "missed comma between flow collection entries"), x = m = E = null, s = p = !1, y === 63 && (u = e.input.charCodeAt(e.position + 1), re(u) && (s = p = !0, e.position++, G(e, !0, t))), r = e.line, i = e.lineStart, o = e.position, ke(e, t, Le, !1, !0), x = e.tag, m = e.result, G(e, !0, t), y = e.input.charCodeAt(e.position), (p || e.line === r) && y === 58 && (s = !0, y = e.input.charCodeAt(++e.position), G(e, !0, t), ke(e, t, Le, !1, !0), E = e.result), f ? Ce(e, l, g, x, m, E, r, i, o) : s ? l.push(Ce(e, null, g, x, m, E, r, i, o)) : l.push(m), G(e, !0, t), y = e.input.charCodeAt(e.position), y === 44 ? (n = !0, y = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1778
1778
|
}
|
|
1779
1779
|
k(e, "unexpected end of the stream within a flow collection");
|
|
1780
1780
|
}
|
|
@@ -1793,10 +1793,10 @@ function xa(e, t) {
|
|
|
1793
1793
|
d === 0 ? k(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? k(e, "repeat of an indentation width identifier") : (l = t + d - 1, a = !0);
|
|
1794
1794
|
else
|
|
1795
1795
|
break;
|
|
1796
|
-
if (
|
|
1796
|
+
if (me(s)) {
|
|
1797
1797
|
do
|
|
1798
1798
|
s = e.input.charCodeAt(++e.position);
|
|
1799
|
-
while (
|
|
1799
|
+
while (me(s));
|
|
1800
1800
|
if (s === 35)
|
|
1801
1801
|
do
|
|
1802
1802
|
s = e.input.charCodeAt(++e.position);
|
|
@@ -1815,7 +1815,7 @@ function xa(e, t) {
|
|
|
1815
1815
|
`);
|
|
1816
1816
|
break;
|
|
1817
1817
|
}
|
|
1818
|
-
for (r ?
|
|
1818
|
+
for (r ? me(s) ? (u = !0, e.result += Q.repeat(`
|
|
1819
1819
|
`, o ? 1 + c : c)) : u ? (u = !1, e.result += Q.repeat(`
|
|
1820
1820
|
`, c + 1)) : c === 0 ? o && (e.result += " ") : e.result += Q.repeat(`
|
|
1821
1821
|
`, c) : e.result += Q.repeat(`
|
|
@@ -1833,7 +1833,7 @@ function kt(e, t) {
|
|
|
1833
1833
|
o.push(null), c = e.input.charCodeAt(e.position);
|
|
1834
1834
|
continue;
|
|
1835
1835
|
}
|
|
1836
|
-
if (n = e.line, ke(e, t,
|
|
1836
|
+
if (n = e.line, ke(e, t, mn, !1, !0), o.push(e.result), G(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && c !== 0)
|
|
1837
1837
|
k(e, "bad indentation of a sequence entry");
|
|
1838
1838
|
else if (e.lineIndent < t)
|
|
1839
1839
|
break;
|
|
@@ -1841,19 +1841,19 @@ function kt(e, t) {
|
|
|
1841
1841
|
return l ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1842
1842
|
}
|
|
1843
1843
|
function Ca(e, t, n) {
|
|
1844
|
-
var r, i, o, a, l, c, u = e.tag, d = e.anchor, s = {}, p = /* @__PURE__ */ Object.create(null), f = null, g = null,
|
|
1844
|
+
var r, i, o, a, l, c, u = e.tag, d = e.anchor, s = {}, p = /* @__PURE__ */ Object.create(null), f = null, g = null, m = null, x = !1, E = !1, y;
|
|
1845
1845
|
if (e.firstTabInLine !== -1) return !1;
|
|
1846
1846
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), y = e.input.charCodeAt(e.position); y !== 0; ) {
|
|
1847
1847
|
if (!x && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, k(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (y === 63 || y === 58) && re(r))
|
|
1848
|
-
y === 63 ? (x && (Ce(e, s, p, f, g, null, a, l, c), f = g =
|
|
1848
|
+
y === 63 ? (x && (Ce(e, s, p, f, g, null, a, l, c), f = g = m = null), E = !0, x = !0, i = !0) : x ? (x = !1, i = !0) : k(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, y = r;
|
|
1849
1849
|
else {
|
|
1850
|
-
if (a = e.line, l = e.lineStart, c = e.position, !ke(e, n,
|
|
1850
|
+
if (a = e.line, l = e.lineStart, c = e.position, !ke(e, n, hn, !1, !0))
|
|
1851
1851
|
break;
|
|
1852
1852
|
if (e.line === o) {
|
|
1853
|
-
for (y = e.input.charCodeAt(e.position);
|
|
1853
|
+
for (y = e.input.charCodeAt(e.position); me(y); )
|
|
1854
1854
|
y = e.input.charCodeAt(++e.position);
|
|
1855
1855
|
if (y === 58)
|
|
1856
|
-
y = e.input.charCodeAt(++e.position), re(y) || k(e, "a whitespace character is expected after the key-value separator within a block mapping"), x && (Ce(e, s, p, f, g, null, a, l, c), f = g =
|
|
1856
|
+
y = e.input.charCodeAt(++e.position), re(y) || k(e, "a whitespace character is expected after the key-value separator within a block mapping"), x && (Ce(e, s, p, f, g, null, a, l, c), f = g = m = null), E = !0, x = !1, i = !1, f = e.tag, g = e.result;
|
|
1857
1857
|
else if (E)
|
|
1858
1858
|
k(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1859
1859
|
else
|
|
@@ -1863,7 +1863,7 @@ function Ca(e, t, n) {
|
|
|
1863
1863
|
else
|
|
1864
1864
|
return e.tag = u, e.anchor = d, !0;
|
|
1865
1865
|
}
|
|
1866
|
-
if ((e.line === o || e.lineIndent > t) && (x && (a = e.line, l = e.lineStart, c = e.position), ke(e, t, Re, !0, i) && (x ? g = e.result :
|
|
1866
|
+
if ((e.line === o || e.lineIndent > t) && (x && (a = e.line, l = e.lineStart, c = e.position), ke(e, t, Re, !0, i) && (x ? g = e.result : m = e.result), x || (Ce(e, s, p, f, g, m, a, l, c), f = g = m = null), G(e, !0, -1), y = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && y !== 0)
|
|
1867
1867
|
k(e, "bad indentation of a mapping entry");
|
|
1868
1868
|
else if (e.lineIndent < t)
|
|
1869
1869
|
break;
|
|
@@ -1906,11 +1906,11 @@ function _a(e) {
|
|
|
1906
1906
|
return e.position === t && k(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), pe.call(e.anchorMap, n) || k(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], G(e, !0, -1), !0;
|
|
1907
1907
|
}
|
|
1908
1908
|
function ke(e, t, n, r, i) {
|
|
1909
|
-
var o, a, l, c = 1, u = !1, d = !1, s, p, f, g,
|
|
1910
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = Re === n ||
|
|
1909
|
+
var o, a, l, c = 1, u = !1, d = !1, s, p, f, g, m, x;
|
|
1910
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = Re === n || mn === n, r && G(e, !0, -1) && (u = !0, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)), c === 1)
|
|
1911
1911
|
for (; Aa(e) || ka(e); )
|
|
1912
1912
|
G(e, !0, -1) ? (u = !0, l = o, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)) : l = !1;
|
|
1913
|
-
if (l && (l = u || i), (c === 1 || Re === n) && (Le === n ||
|
|
1913
|
+
if (l && (l = u || i), (c === 1 || Re === n) && (Le === n || hn === n ? m = t : m = t + 1, x = e.position - e.lineStart, c === 1 ? l && (kt(e, x) || Ca(e, x, m)) || ba(e, m) ? d = !0 : (a && xa(e, m) || ya(e, m) || va(e, m) ? d = !0 : _a(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && k(e, "alias node should not have any properties")) : ga(e, m, Le === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (d = l && kt(e, x))), e.tag === null)
|
|
1914
1914
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1915
1915
|
else if (e.tag === "?") {
|
|
1916
1916
|
for (e.result !== null && e.kind !== "scalar" && k(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), s = 0, p = e.implicitTypes.length; s < p; s += 1)
|
|
@@ -1937,7 +1937,7 @@ function wa(e) {
|
|
|
1937
1937
|
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !re(a); )
|
|
1938
1938
|
a = e.input.charCodeAt(++e.position);
|
|
1939
1939
|
for (r = e.input.slice(n, e.position), i = [], r.length < 1 && k(e, "directive name must not be less than one character in length"); a !== 0; ) {
|
|
1940
|
-
for (;
|
|
1940
|
+
for (; me(a); )
|
|
1941
1941
|
a = e.input.charCodeAt(++e.position);
|
|
1942
1942
|
if (a === 35) {
|
|
1943
1943
|
do
|
|
@@ -1964,7 +1964,7 @@ function wa(e) {
|
|
|
1964
1964
|
function Cn(e, t) {
|
|
1965
1965
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
1966
1966
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
1967
|
-
var n = new
|
|
1967
|
+
var n = new ma(e, t), r = e.indexOf("\0");
|
|
1968
1968
|
for (r !== -1 && (n.position = r, k(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
1969
1969
|
n.lineIndent += 1, n.position += 1;
|
|
1970
1970
|
for (; n.position < n.length - 1; )
|
|
@@ -2100,12 +2100,12 @@ function En(e) {
|
|
|
2100
2100
|
}
|
|
2101
2101
|
var Fn = 1, Qe = 2, On = 3, Ln = 4, be = 5;
|
|
2102
2102
|
function to(e, t, n, r, i, o, a, l) {
|
|
2103
|
-
var c, u = 0, d = null, s = !1, p = !1, f = r !== -1, g = -1,
|
|
2103
|
+
var c, u = 0, d = null, s = !1, p = !1, f = r !== -1, g = -1, m = Xa(we(e, 0)) && eo(we(e, e.length - 1));
|
|
2104
2104
|
if (t || a)
|
|
2105
2105
|
for (c = 0; c < e.length; u >= 65536 ? c += 2 : c++) {
|
|
2106
2106
|
if (u = we(e, c), !$e(u))
|
|
2107
2107
|
return be;
|
|
2108
|
-
|
|
2108
|
+
m = m && St(u, d, l), d = u;
|
|
2109
2109
|
}
|
|
2110
2110
|
else {
|
|
2111
2111
|
for (c = 0; c < e.length; u >= 65536 ? c += 2 : c++) {
|
|
@@ -2114,11 +2114,11 @@ function to(e, t, n, r, i, o, a, l) {
|
|
|
2114
2114
|
c - g - 1 > r && e[g + 1] !== " ", g = c);
|
|
2115
2115
|
else if (!$e(u))
|
|
2116
2116
|
return be;
|
|
2117
|
-
|
|
2117
|
+
m = m && St(u, d, l), d = u;
|
|
2118
2118
|
}
|
|
2119
2119
|
p = p || f && c - g - 1 > r && e[g + 1] !== " ";
|
|
2120
2120
|
}
|
|
2121
|
-
return !s && !p ?
|
|
2121
|
+
return !s && !p ? m && !a && !i(e) ? Fn : o === Ie ? be : Qe : n > 9 && En(e) ? be : a ? o === Ie ? be : Qe : p ? Ln : On;
|
|
2122
2122
|
}
|
|
2123
2123
|
function no(e, t, n, r, i) {
|
|
2124
2124
|
e.dump = function() {
|
|
@@ -2301,7 +2301,7 @@ function lt(e, t) {
|
|
|
2301
2301
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2302
2302
|
};
|
|
2303
2303
|
}
|
|
2304
|
-
var po = X,
|
|
2304
|
+
var po = X, ho = Jt, mo = Zt, go = rn, yo = an, vo = rt, bo = An.load, xo = An.loadAll, Co = fo.dump, Ao = ne, ko = {
|
|
2305
2305
|
binary: un,
|
|
2306
2306
|
float: nn,
|
|
2307
2307
|
map: Qt,
|
|
@@ -2317,8 +2317,8 @@ var po = X, mo = Jt, ho = Zt, go = rn, yo = an, vo = rt, bo = An.load, xo = An.l
|
|
|
2317
2317
|
str: Gt
|
|
2318
2318
|
}, _o = lt("safeLoad", "load"), wo = lt("safeLoadAll", "loadAll"), So = lt("safeDump", "dump"), To = {
|
|
2319
2319
|
Type: po,
|
|
2320
|
-
Schema:
|
|
2321
|
-
FAILSAFE_SCHEMA:
|
|
2320
|
+
Schema: ho,
|
|
2321
|
+
FAILSAFE_SCHEMA: mo,
|
|
2322
2322
|
JSON_SCHEMA: go,
|
|
2323
2323
|
CORE_SCHEMA: yo,
|
|
2324
2324
|
DEFAULT_SCHEMA: vo,
|
|
@@ -2393,10 +2393,10 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
2393
2393
|
return c ? s += `${d}}` : s = "{}", s;
|
|
2394
2394
|
const p = Object.fromEntries(Object.entries(l).filter(([, g]) => g !== null));
|
|
2395
2395
|
let f = "";
|
|
2396
|
-
for (const [g,
|
|
2397
|
-
Array.isArray(
|
|
2398
|
-
`, f += i(
|
|
2399
|
-
`, f += r(
|
|
2396
|
+
for (const [g, m] of Object.entries(p))
|
|
2397
|
+
Array.isArray(m) ? m.length === 0 ? f = "[]" : (f = `[
|
|
2398
|
+
`, f += i(m, void 0, d), f += `${d}${te}]`) : m && typeof m == "object" ? (f = `{
|
|
2399
|
+
`, f += r(m, void 0, d), f += `${d}${te}}`) : f = String(m ?? ""), typeof m == "string" && (f = `"${f}"`), s += `${d}${te}${g} = ${f}
|
|
2400
2400
|
`;
|
|
2401
2401
|
return c ? s += `${d}}
|
|
2402
2402
|
` : s;
|
|
@@ -2422,13 +2422,13 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
2422
2422
|
Array.isArray(d) ? c += i(d, u) : typeof d == "object" ? c += r(d, u) : c += n(d, u);
|
|
2423
2423
|
return c;
|
|
2424
2424
|
}, a = $(() => {
|
|
2425
|
-
var s, p, f, g,
|
|
2425
|
+
var s, p, f, g, m, x, E;
|
|
2426
2426
|
const l = Object.fromEntries(Object.entries(t.entityRecord).filter(([, y]) => y != null)), c = t.entityRecord.config ? Object.fromEntries(Object.entries((s = t.entityRecord) == null ? void 0 : s.config).filter(([, y]) => y != null)) : void 0;
|
|
2427
2427
|
if (c && (l.config = c), Object.keys(l).length === 0)
|
|
2428
2428
|
return "";
|
|
2429
2429
|
delete l.id;
|
|
2430
2430
|
let u = "", d = "";
|
|
2431
|
-
if ((p = l.service) != null && p.id ? (d = "service", delete l.service) : (f = l.route) != null && f.id ? (d = "route", delete l.route) : (g = l.consumer) != null && g.id ? (d = "consumer", delete l.consumer) : (
|
|
2431
|
+
if ((p = l.service) != null && p.id ? (d = "service", delete l.service) : (f = l.route) != null && f.id ? (d = "route", delete l.route) : (g = l.consumer) != null && g.id ? (d = "consumer", delete l.consumer) : (m = l.consumer_group) != null && m.id ? (d = "consumer_group", delete l.consumer_group) : (x = l.certificate) != null && x.id ? (d = "certificate", delete l.certificate) : (E = l.set) != null && E.id && (d = "set", delete l.set), t.entityType === "plugin") {
|
|
2432
2432
|
const y = t.credentialType.replace(/-/g, "_") || (l.name + "").replace(/-/g, "_");
|
|
2433
2433
|
delete l.name, u += `resource "konnect_gateway_plugin_${y}" "my_${y}" {
|
|
2434
2434
|
`;
|
|
@@ -2673,8 +2673,8 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
2673
2673
|
label: i("baseForm.configuration.terraform"),
|
|
2674
2674
|
value: "terraform"
|
|
2675
2675
|
});
|
|
2676
|
-
const u = B("structured"), d = (
|
|
2677
|
-
u.value =
|
|
2676
|
+
const u = B("structured"), d = (h) => {
|
|
2677
|
+
u.value = h == null ? void 0 : h.value;
|
|
2678
2678
|
}, s = {
|
|
2679
2679
|
id: {
|
|
2680
2680
|
type: P.ID,
|
|
@@ -2709,21 +2709,21 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
2709
2709
|
// the last property displayed
|
|
2710
2710
|
section: ie.Basic
|
|
2711
2711
|
}
|
|
2712
|
-
}, p = B(!1), f = B(!1), g = B(""),
|
|
2712
|
+
}, p = B(!1), f = B(!1), g = B(""), m = B({}), x = $(() => {
|
|
2713
2713
|
var S, w, b;
|
|
2714
|
-
if (!
|
|
2714
|
+
if (!m.value)
|
|
2715
2715
|
return [];
|
|
2716
|
-
const
|
|
2717
|
-
for (const _ in
|
|
2716
|
+
const h = [], A = Object.keys(m.value).length;
|
|
2717
|
+
for (const _ in m.value) {
|
|
2718
2718
|
const O = (w = (S = r.configSchema) == null ? void 0 : S[_]) == null ? void 0 : w.order, Y = (b = s[_]) == null ? void 0 : b.order;
|
|
2719
2719
|
let U = A;
|
|
2720
|
-
(Y || Y === 0) && (U = Y === -1 ? A + 1 : Y), O && (U = O === -1 ? A + 1 : O),
|
|
2720
|
+
(Y || Y === 0) && (U = Y === -1 ? A + 1 : Y), O && (U = O === -1 ? A + 1 : O), h.push([_, U]);
|
|
2721
2721
|
}
|
|
2722
|
-
return
|
|
2722
|
+
return h.sort(function(_, O) {
|
|
2723
2723
|
return _[1] - O[1];
|
|
2724
|
-
}),
|
|
2725
|
-
var
|
|
2726
|
-
const O = _[0], Y = (
|
|
2724
|
+
}), h.map((_) => {
|
|
2725
|
+
var he, Ee;
|
|
2726
|
+
const O = _[0], Y = (he = m.value) == null ? void 0 : he[O], U = ((Ee = r.configSchema) == null ? void 0 : Ee[O]) || {}, J = s[O];
|
|
2727
2727
|
return {
|
|
2728
2728
|
key: O,
|
|
2729
2729
|
value: Y,
|
|
@@ -2736,11 +2736,11 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
2736
2736
|
}).filter((_) => !_.hidden && _.key !== r.pluginConfigKey);
|
|
2737
2737
|
}), E = $(() => {
|
|
2738
2738
|
var w, b;
|
|
2739
|
-
if (!
|
|
2739
|
+
if (!m.value || !r.pluginConfigKey)
|
|
2740
2740
|
return [];
|
|
2741
|
-
const
|
|
2742
|
-
for (const _ in
|
|
2743
|
-
const O = (b = (w = r.pluginConfigSchema) == null ? void 0 : w[_]) == null ? void 0 : b.order, Y =
|
|
2741
|
+
const h = m.value[r.pluginConfigKey] || {}, A = Object.keys(h).length, S = [];
|
|
2742
|
+
for (const _ in h) {
|
|
2743
|
+
const O = (b = (w = r.pluginConfigSchema) == null ? void 0 : w[_]) == null ? void 0 : b.order, Y = h[_];
|
|
2744
2744
|
let U = Y != null && Y !== "" ? A - 1 : A;
|
|
2745
2745
|
O && (U = O === -1 ? A + 1 : O), S.push([_, U]);
|
|
2746
2746
|
}
|
|
@@ -2748,7 +2748,7 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
2748
2748
|
return _[1] - O[1];
|
|
2749
2749
|
}), S.map((_) => {
|
|
2750
2750
|
var J;
|
|
2751
|
-
const O = _[0], Y =
|
|
2751
|
+
const O = _[0], Y = h[O], U = ((J = r.pluginConfigSchema) == null ? void 0 : J[O]) || {};
|
|
2752
2752
|
return {
|
|
2753
2753
|
key: O,
|
|
2754
2754
|
value: Y,
|
|
@@ -2760,43 +2760,43 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
2760
2760
|
};
|
|
2761
2761
|
}).filter((_) => !_.hidden);
|
|
2762
2762
|
}), y = $(() => {
|
|
2763
|
-
var
|
|
2763
|
+
var h, A, S, w;
|
|
2764
2764
|
return {
|
|
2765
|
-
basic: (
|
|
2765
|
+
basic: (h = x.value) == null ? void 0 : h.filter((b) => b.section === ie.Basic),
|
|
2766
2766
|
advanced: (A = x.value) == null ? void 0 : A.filter((b) => b.section === ie.Advanced),
|
|
2767
2767
|
plugin: (w = E.value) == null ? void 0 : w.concat((S = x.value) == null ? void 0 : S.filter((b) => b.section === ie.Plugin))
|
|
2768
2768
|
};
|
|
2769
2769
|
}), L = $(() => {
|
|
2770
|
-
const
|
|
2771
|
-
return y.value.basic.length &&
|
|
2770
|
+
const h = [];
|
|
2771
|
+
return y.value.basic.length && h.push("basic"), y.value.advanced.length && h.push("advanced"), y.value.plugin.length && h.push("plugin"), h;
|
|
2772
2772
|
}), F = $(() => {
|
|
2773
2773
|
var A, S;
|
|
2774
|
-
let
|
|
2775
|
-
return r.config.app === "konnect" ?
|
|
2774
|
+
let h = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2775
|
+
return r.config.app === "konnect" ? h = h.replace(/{controlPlaneId}/gi, ((A = r.config) == null ? void 0 : A.controlPlaneId) || "") : r.config.app === "kongManager" && (h = h.replace(/\/{workspace}/gi, (S = r.config) != null && S.workspace ? `/${r.config.workspace}` : "")), h = h.replace(/{id}/gi, r.config.entityId), h;
|
|
2776
2776
|
});
|
|
2777
|
-
return _e(p, (
|
|
2778
|
-
n("loading",
|
|
2777
|
+
return _e(p, (h) => {
|
|
2778
|
+
n("loading", h);
|
|
2779
2779
|
}, { immediate: !0 }), Nt(async () => {
|
|
2780
2780
|
f.value = !1, p.value = !0;
|
|
2781
2781
|
try {
|
|
2782
|
-
const { data:
|
|
2782
|
+
const { data: h } = await l.get(F.value);
|
|
2783
2783
|
if (r.dataKey)
|
|
2784
|
-
if (typeof
|
|
2785
|
-
|
|
2784
|
+
if (typeof h[r.dataKey] < "u")
|
|
2785
|
+
m.value = { ...h[r.dataKey] };
|
|
2786
2786
|
else
|
|
2787
2787
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
2788
2788
|
else
|
|
2789
|
-
|
|
2789
|
+
m.value = { ...h };
|
|
2790
2790
|
Object.keys(r.configSchema).filter((S) => r.configSchema[S].forceShow).forEach((S) => {
|
|
2791
|
-
|
|
2792
|
-
}), n("fetch:success",
|
|
2793
|
-
} catch (
|
|
2794
|
-
const A = o(
|
|
2795
|
-
g.value = A.startsWith("code") ? i("baseConfigCard.errors.load") : A, f.value = !0, n("fetch:error",
|
|
2791
|
+
m.value && typeof m.value[S] > "u" && (m.value[S] = null);
|
|
2792
|
+
}), n("fetch:success", h);
|
|
2793
|
+
} catch (h) {
|
|
2794
|
+
const A = o(h);
|
|
2795
|
+
g.value = A.startsWith("code") ? i("baseConfigCard.errors.load") : A, f.value = !0, n("fetch:error", h);
|
|
2796
2796
|
} finally {
|
|
2797
2797
|
p.value = !1;
|
|
2798
2798
|
}
|
|
2799
|
-
}), (
|
|
2799
|
+
}), (h, A) => {
|
|
2800
2800
|
const S = j("KLabel"), w = j("KSelect"), b = j("KButton"), _ = j("KSkeleton"), O = j("KEmptyState"), Y = j("KCard");
|
|
2801
2801
|
return v(), D(Y, {
|
|
2802
2802
|
class: "kong-ui-entity-base-config-card",
|
|
@@ -2804,7 +2804,7 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
2804
2804
|
}, Ae({
|
|
2805
2805
|
actions: C(() => [
|
|
2806
2806
|
M("div", Ko, [
|
|
2807
|
-
W(
|
|
2807
|
+
W(h.$slots, "actions", {}, void 0, !0),
|
|
2808
2808
|
N(S, {
|
|
2809
2809
|
class: "config-format-select-label",
|
|
2810
2810
|
"data-testid": "config-format-select-label"
|
|
@@ -2862,14 +2862,14 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
2862
2862
|
format: u.value,
|
|
2863
2863
|
"prop-list-types": L.value,
|
|
2864
2864
|
"property-collections": y.value,
|
|
2865
|
-
record:
|
|
2865
|
+
record: m.value
|
|
2866
2866
|
}, Ae({ _: 2 }, [
|
|
2867
|
-
oe(Object.keys(
|
|
2867
|
+
oe(Object.keys(h.$slots), (U) => ({
|
|
2868
2868
|
name: U,
|
|
2869
|
-
fn: C(({ row: J, rowValue:
|
|
2870
|
-
W(
|
|
2869
|
+
fn: C(({ row: J, rowValue: he }) => [
|
|
2870
|
+
W(h.$slots, U, {
|
|
2871
2871
|
row: J,
|
|
2872
|
-
rowValue:
|
|
2872
|
+
rowValue: he
|
|
2873
2873
|
}, void 0, !0)
|
|
2874
2874
|
])
|
|
2875
2875
|
}))
|
|
@@ -2882,7 +2882,7 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
2882
2882
|
name: "title",
|
|
2883
2883
|
fn: C(() => [
|
|
2884
2884
|
M("span", Bo, [
|
|
2885
|
-
W(
|
|
2885
|
+
W(h.$slots, "title", {}, () => [
|
|
2886
2886
|
V(K(I(i)("baseConfigCard.title")), 1)
|
|
2887
2887
|
], !0)
|
|
2888
2888
|
])
|
|
@@ -2973,10 +2973,10 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
2973
2973
|
setup(e, { emit: t }) {
|
|
2974
2974
|
var F;
|
|
2975
2975
|
const n = t, r = e, i = tr(), { i18n: { t: o } } = H.useI18n(), { getMessageFromError: a } = H.useErrors(), { axiosInstance: l } = H.useAxios((F = r.config) == null ? void 0 : F.axiosRequestConfig), c = B(!1), u = $(() => !!r.editId), d = B(!1), s = B(""), p = $(() => r.canSubmit === !1 || r.isReadonly), f = B(!1), g = $(() => {
|
|
2976
|
-
var
|
|
2976
|
+
var h, A;
|
|
2977
2977
|
let T = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2978
|
-
return r.config.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, ((
|
|
2979
|
-
}),
|
|
2978
|
+
return r.config.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, ((h = r.config) == null ? void 0 : h.controlPlaneId) || "") : r.config.app === "kongManager" && (T = T.replace(/\/{workspace}/gi, (A = r.config) != null && A.workspace ? `/${r.config.workspace}` : "")), r.editId ? (T = T.replace(/{id}/gi, r.editId), T) : (T = T.replace(/\/{id}/gi, ""), T);
|
|
2979
|
+
}), m = () => {
|
|
2980
2980
|
f.value = !f.value;
|
|
2981
2981
|
}, x = () => {
|
|
2982
2982
|
r.config.cancelRoute ? i.push(r.config.cancelRoute) : E();
|
|
@@ -3006,12 +3006,12 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
3006
3006
|
const { data: T } = await l.get(g.value);
|
|
3007
3007
|
n("fetch:success", T);
|
|
3008
3008
|
} catch (T) {
|
|
3009
|
-
const
|
|
3010
|
-
s.value =
|
|
3009
|
+
const h = a(T);
|
|
3010
|
+
s.value = h.startsWith("code") ? o("baseForm.errors.edit") : h, d.value = !0, n("fetch:error", T);
|
|
3011
3011
|
} finally {
|
|
3012
3012
|
c.value = !1;
|
|
3013
3013
|
}
|
|
3014
|
-
}), (T,
|
|
3014
|
+
}), (T, h) => {
|
|
3015
3015
|
const A = j("KSkeleton"), S = j("KEmptyState"), w = j("KAlert"), b = j("KButton"), _ = j("KTabs"), O = j("KSlideout");
|
|
3016
3016
|
return v(), D(Me(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3017
3017
|
default: C(() => [
|
|
@@ -3048,7 +3048,7 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
3048
3048
|
N(b, {
|
|
3049
3049
|
appearance: "tertiary",
|
|
3050
3050
|
"data-testid": `${e.entityType}-${u.value ? "edit" : "create"}-form-view-configuration`,
|
|
3051
|
-
onClick:
|
|
3051
|
+
onClick: h[0] || (h[0] = (Y) => m())
|
|
3052
3052
|
}, {
|
|
3053
3053
|
default: C(() => [
|
|
3054
3054
|
V(K(I(o)("baseForm.actions.viewConfiguration")), 1)
|
|
@@ -3087,7 +3087,7 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
3087
3087
|
"offset-top": 60,
|
|
3088
3088
|
title: I(o)("baseForm.configuration.title"),
|
|
3089
3089
|
visible: f.value,
|
|
3090
|
-
onClose:
|
|
3090
|
+
onClose: h[1] || (h[1] = (Y) => m())
|
|
3091
3091
|
}, {
|
|
3092
3092
|
default: C(() => [
|
|
3093
3093
|
M("div", null, K(I(o)("baseForm.configuration.message")), 1),
|
|
@@ -3177,7 +3177,7 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
3177
3177
|
}
|
|
3178
3178
|
},
|
|
3179
3179
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3180
|
-
),
|
|
3180
|
+
), m = $(() => o.value ? d.value > s.value : !1);
|
|
3181
3181
|
return Un(() => {
|
|
3182
3182
|
c();
|
|
3183
3183
|
}), Pn(() => {
|
|
@@ -3196,7 +3196,7 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
3196
3196
|
N(y, {
|
|
3197
3197
|
"max-width": "300",
|
|
3198
3198
|
placement: "bottom-start",
|
|
3199
|
-
text:
|
|
3199
|
+
text: m.value ? p.value : ""
|
|
3200
3200
|
}, {
|
|
3201
3201
|
default: C(() => [
|
|
3202
3202
|
W(x.$slots, "default", {}, void 0, !0)
|
|
@@ -3388,14 +3388,14 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
3388
3388
|
r("clear-search-input");
|
|
3389
3389
|
}, g = $(() => n.disableRowClick ? void 0 : (b, _) => {
|
|
3390
3390
|
r("click:row", _);
|
|
3391
|
-
}),
|
|
3391
|
+
}), m = (b) => {
|
|
3392
3392
|
r("sort", b);
|
|
3393
3393
|
};
|
|
3394
3394
|
let x = "";
|
|
3395
3395
|
const E = B(!1), y = B(null), L = $(() => E.value ? !1 : y.value ? !y.value.hasData && !n.query : !0), F = (b) => {
|
|
3396
3396
|
b.hasData ? E.value = !0 : b.state === "success" && !b.hasData && !x && (E.value = !1), x = n.query, y.value = { ...b };
|
|
3397
|
-
}, { setTablePreferences: T, getTablePreferences:
|
|
3398
|
-
const b =
|
|
3397
|
+
}, { setTablePreferences: T, getTablePreferences: h } = lr(), A = B(h(a.value, n.defaultTablePreferences)), S = $(() => {
|
|
3398
|
+
const b = h(a.value);
|
|
3399
3399
|
return {
|
|
3400
3400
|
...n.initialFetcherParams,
|
|
3401
3401
|
...b
|
|
@@ -3445,7 +3445,7 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
3445
3445
|
"table-preferences": A.value,
|
|
3446
3446
|
onEmptyStateActionClick: p,
|
|
3447
3447
|
"onRow:click": g.value,
|
|
3448
|
-
onSort: _[0] || (_[0] = (U) =>
|
|
3448
|
+
onSort: _[0] || (_[0] = (U) => m(U)),
|
|
3449
3449
|
onState: F,
|
|
3450
3450
|
"onUpdate:tablePreferences": w
|
|
3451
3451
|
}, Ae({
|
|
@@ -3464,15 +3464,15 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
3464
3464
|
}, [
|
|
3465
3465
|
oe(e.tableHeaders, (U, J) => ({
|
|
3466
3466
|
name: J,
|
|
3467
|
-
fn: C(({ row:
|
|
3467
|
+
fn: C(({ row: he, rowKey: Ee, rowValue: ct }) => [
|
|
3468
3468
|
N(Yo, {
|
|
3469
3469
|
"key-name": String(J),
|
|
3470
|
-
"row-el": d(
|
|
3470
|
+
"row-el": d(he),
|
|
3471
3471
|
tooltip: U.tooltip
|
|
3472
3472
|
}, {
|
|
3473
3473
|
default: C(() => [
|
|
3474
3474
|
W(b.$slots, J, {
|
|
3475
|
-
row:
|
|
3475
|
+
row: he,
|
|
3476
3476
|
rowKey: Ee,
|
|
3477
3477
|
rowValue: ct
|
|
3478
3478
|
}, () => [
|
|
@@ -3660,14 +3660,14 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
3660
3660
|
setup(e, { emit: t }) {
|
|
3661
3661
|
const { i18n: { t: n } } = H.useI18n(), r = e, i = t, o = B(!1), a = B({}), l = B(/* @__PURE__ */ new Set()), c = $(() => {
|
|
3662
3662
|
const F = [];
|
|
3663
|
-
return new URLSearchParams(r.modelValue).forEach((T,
|
|
3664
|
-
T !== "" && F.push(
|
|
3663
|
+
return new URLSearchParams(r.modelValue).forEach((T, h) => {
|
|
3664
|
+
T !== "" && F.push(h);
|
|
3665
3665
|
}), F;
|
|
3666
3666
|
}), u = $(() => {
|
|
3667
3667
|
const F = r.config.fields;
|
|
3668
3668
|
return Object.keys(F).filter((T) => {
|
|
3669
|
-
var
|
|
3670
|
-
return (
|
|
3669
|
+
var h;
|
|
3670
|
+
return (h = F == null ? void 0 : F[T]) == null ? void 0 : h.searchable;
|
|
3671
3671
|
}).map((T) => ({
|
|
3672
3672
|
label: F[T].label || T,
|
|
3673
3673
|
value: T,
|
|
@@ -3675,8 +3675,8 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
3675
3675
|
}));
|
|
3676
3676
|
});
|
|
3677
3677
|
_e(() => r.modelValue, (F) => {
|
|
3678
|
-
a.value = {}, new URLSearchParams(F).forEach((T,
|
|
3679
|
-
a.value[
|
|
3678
|
+
a.value = {}, new URLSearchParams(F).forEach((T, h) => {
|
|
3679
|
+
a.value[h] = T;
|
|
3680
3680
|
});
|
|
3681
3681
|
});
|
|
3682
3682
|
const d = () => {
|
|
@@ -3687,15 +3687,15 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
3687
3687
|
i("update:modelValue", F);
|
|
3688
3688
|
}, f = () => {
|
|
3689
3689
|
p("");
|
|
3690
|
-
}, g = (F) => `filter-${F}`,
|
|
3691
|
-
var T,
|
|
3692
|
-
return (((
|
|
3690
|
+
}, g = (F) => `filter-${F}`, m = (F) => {
|
|
3691
|
+
var T, h;
|
|
3692
|
+
return (((h = (T = r.config.schema) == null ? void 0 : T[F]) == null ? void 0 : h.values) ?? []).map((A) => ({
|
|
3693
3693
|
value: A,
|
|
3694
3694
|
label: A
|
|
3695
3695
|
}));
|
|
3696
3696
|
}, x = (F) => {
|
|
3697
|
-
var T,
|
|
3698
|
-
return ((
|
|
3697
|
+
var T, h;
|
|
3698
|
+
return ((h = (T = r.config.schema) == null ? void 0 : T[F]) == null ? void 0 : h.type) ?? "text";
|
|
3699
3699
|
}, E = (F) => {
|
|
3700
3700
|
a.value = {
|
|
3701
3701
|
...a.value,
|
|
@@ -3704,12 +3704,12 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
3704
3704
|
}, y = () => {
|
|
3705
3705
|
a.value = {}, L(!0);
|
|
3706
3706
|
}, L = (F = !1) => {
|
|
3707
|
-
const T = Object.keys(a.value).reduce((
|
|
3707
|
+
const T = Object.keys(a.value).reduce((h, A) => (a.value[A] && (h[A] = `${a.value[A]}`), h), {});
|
|
3708
3708
|
F && (o.value = !1), i("update:modelValue", new URLSearchParams(T).toString());
|
|
3709
3709
|
};
|
|
3710
3710
|
return (F, T) => {
|
|
3711
|
-
const
|
|
3712
|
-
return e.config.isExactMatch ? (v(), D(
|
|
3711
|
+
const h = j("KInput"), A = j("KButton"), S = j("KSelect");
|
|
3712
|
+
return e.config.isExactMatch ? (v(), D(h, {
|
|
3713
3713
|
key: 0,
|
|
3714
3714
|
autocomplete: "off",
|
|
3715
3715
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3784,9 +3784,9 @@ const Io = { class: "yaml-config" }, Rn = /* @__PURE__ */ z({
|
|
|
3784
3784
|
id: g(w.value),
|
|
3785
3785
|
modelValue: a.value[w.value],
|
|
3786
3786
|
"onUpdate:modelValue": (O) => a.value[w.value] = O,
|
|
3787
|
-
items:
|
|
3787
|
+
items: m(w.value),
|
|
3788
3788
|
placeholder: I(n)("filter.selectPlaceholder")
|
|
3789
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (v(), D(
|
|
3789
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (v(), D(h, {
|
|
3790
3790
|
key: 1,
|
|
3791
3791
|
id: g(w.value),
|
|
3792
3792
|
modelValue: a.value[w.value],
|
|
@@ -3960,11 +3960,11 @@ for (var Ve = 0; Ve < 256; ++Ve)
|
|
|
3960
3960
|
function pl(e, t = 0) {
|
|
3961
3961
|
return (Z[e[t + 0]] + Z[e[t + 1]] + Z[e[t + 2]] + Z[e[t + 3]] + "-" + Z[e[t + 4]] + Z[e[t + 5]] + "-" + Z[e[t + 6]] + Z[e[t + 7]] + "-" + Z[e[t + 8]] + Z[e[t + 9]] + "-" + Z[e[t + 10]] + Z[e[t + 11]] + Z[e[t + 12]] + Z[e[t + 13]] + Z[e[t + 14]] + Z[e[t + 15]]).toLowerCase();
|
|
3962
3962
|
}
|
|
3963
|
-
var Fe,
|
|
3964
|
-
function
|
|
3963
|
+
var Fe, hl = new Uint8Array(16);
|
|
3964
|
+
function ml() {
|
|
3965
3965
|
if (!Fe && (Fe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Fe))
|
|
3966
3966
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
3967
|
-
return Fe(
|
|
3967
|
+
return Fe(hl);
|
|
3968
3968
|
}
|
|
3969
3969
|
var gl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
3970
3970
|
const Lt = {
|
|
@@ -3974,7 +3974,7 @@ function yl(e, t, n) {
|
|
|
3974
3974
|
if (Lt.randomUUID && !t && !e)
|
|
3975
3975
|
return Lt.randomUUID();
|
|
3976
3976
|
e = e || {};
|
|
3977
|
-
var r = e.random || (e.rng ||
|
|
3977
|
+
var r = e.random || (e.rng || ml)();
|
|
3978
3978
|
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, pl(r);
|
|
3979
3979
|
}
|
|
3980
3980
|
const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, xl = {
|
|
@@ -4090,7 +4090,7 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, xl = {
|
|
|
4090
4090
|
}, 1800));
|
|
4091
4091
|
};
|
|
4092
4092
|
return (s, p) => {
|
|
4093
|
-
const f = j("KTooltip"), g = j("KExternalLink"),
|
|
4093
|
+
const f = j("KTooltip"), g = j("KExternalLink"), m = j("KClipboardProvider");
|
|
4094
4094
|
return v(), R("div", _l, [
|
|
4095
4095
|
l.value ? (v(), R("div", wl, K(u.value), 1)) : c.value ? c.value ? (v(), D(g, {
|
|
4096
4096
|
key: 2,
|
|
@@ -4123,7 +4123,7 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, xl = {
|
|
|
4123
4123
|
text: a.value
|
|
4124
4124
|
}, {
|
|
4125
4125
|
default: C(() => [
|
|
4126
|
-
N(
|
|
4126
|
+
N(m, null, {
|
|
4127
4127
|
default: C(({ copyToClipboard: x }) => [
|
|
4128
4128
|
M("span", {
|
|
4129
4129
|
class: "entity-link-copy-id",
|
|
@@ -4191,7 +4191,7 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, xl = {
|
|
|
4191
4191
|
})) : (v(), R("span", $l, "-"));
|
|
4192
4192
|
};
|
|
4193
4193
|
}
|
|
4194
|
-
}), { useAxios: Vl, useDeleteUrlBuilder: Wl, useErrors: Jl, useExternalLinkCreator: Gl, useFetchUrlBuilder: zl, useFetcher: Ql,
|
|
4194
|
+
}), { useAxios: Vl, useDeleteUrlBuilder: Wl, useErrors: Jl, useExternalLinkCreator: Gl, useFetchUrlBuilder: zl, useFetcher: Ql, useFetcherCacheKey: Zl, useDebouncedFilter: Xl, useStringHelpers: ec, useHelpers: tc, useGatewayFeatureSupported: nc, useTruncationDetector: rc, useValidators: ic, useSchemaProvider: ac } = H;
|
|
4195
4195
|
export {
|
|
4196
4196
|
Ro as ConfigCardDisplay,
|
|
4197
4197
|
Ht as ConfigCardItem,
|
|
@@ -4217,16 +4217,17 @@ export {
|
|
|
4217
4217
|
Bn as TerraformCodeBlock,
|
|
4218
4218
|
Rn as YamlCodeBlock,
|
|
4219
4219
|
Vl as useAxios,
|
|
4220
|
-
|
|
4220
|
+
Xl as useDebouncedFilter,
|
|
4221
4221
|
Wl as useDeleteUrlBuilder,
|
|
4222
4222
|
Jl as useErrors,
|
|
4223
4223
|
Gl as useExternalLinkCreator,
|
|
4224
4224
|
zl as useFetchUrlBuilder,
|
|
4225
4225
|
Ql as useFetcher,
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
rc as
|
|
4226
|
+
Zl as useFetcherCacheKey,
|
|
4227
|
+
nc as useGatewayFeatureSupported,
|
|
4228
|
+
tc as useHelpers,
|
|
4229
|
+
ac as useSchemaProvider,
|
|
4230
|
+
ec as useStringHelpers,
|
|
4231
|
+
rc as useTruncationDetector,
|
|
4232
|
+
ic as useValidators
|
|
4232
4233
|
};
|