@kong-ui-public/entities-snis 2.5.0 → 2.5.1
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-snis.es.js +347 -341
- package/dist/entities-snis.umd.js +18 -18
- package/package.json +2 -2
package/dist/entities-snis.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as re, ref as N, computed as j, watch as he, renderSlot as oe, createCommentVNode as X, unref as y, onBeforeMount as et, resolveComponent as $, openBlock as A, createBlock as H, withCtx as
|
|
1
|
+
import { defineComponent as re, ref as N, computed as j, watch as he, renderSlot as oe, createCommentVNode as X, unref as y, onBeforeMount as et, resolveComponent as $, openBlock as A, createBlock as H, withCtx as w, createElementVNode as K, toDisplayString as F, createElementBlock as L, withModifiers as Ye, createVNode as _, createTextVNode as Z, createSlots as Rt, withDirectives as pe, vShow as fe, renderList as tt, Fragment as Ut, normalizeClass as Ne, withKeys as Bn, useSlots as Pn, useCssVars as Dn, inject as Vn, onMounted as zn, onUnmounted as Hn, resolveDynamicComponent as Be, normalizeStyle as nt, pushScopeId as it, popScopeId as rt, reactive as gt } from "vue";
|
|
2
2
|
import { createI18n as Bt, i18nTComponent as Pt } from "@kong-ui-public/i18n";
|
|
3
3
|
import ht from "axios";
|
|
4
4
|
import "@kong/kongponents";
|
|
@@ -361,14 +361,14 @@ function hi(e, t, n, i = {
|
|
|
361
361
|
headers: e.requestHeaders
|
|
362
362
|
}), { i18n: { t: o } } = ot(), { debounce: a } = ni(), l = a(async (m) => {
|
|
363
363
|
await te(m);
|
|
364
|
-
}, 200), s = N(!1), u = N(""), d = N(""), c = N([]),
|
|
365
|
-
let h = `${e.apiBaseUrl}${
|
|
364
|
+
}, 200), s = N(!1), u = N(""), d = N(""), c = N([]), p = N([]), f = N(void 0), v = y(t);
|
|
365
|
+
let h = `${e.apiBaseUrl}${v}`;
|
|
366
366
|
e.app === "konnect" ? h = h.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (h = h.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
367
|
-
const { isValidUuid:
|
|
367
|
+
const { isValidUuid: x } = Ht(), M = async () => {
|
|
368
368
|
try {
|
|
369
369
|
s.value = !0;
|
|
370
370
|
const { data: m } = await r.get(`${h}?size=${n}`);
|
|
371
|
-
m != null && m.next || (
|
|
371
|
+
m != null && m.next || (f.value = i.fetchedItemsKey in m ? m[i.fetchedItemsKey] : []), p.value = i.fetchedItemsKey in m ? m[i.fetchedItemsKey] : [], c.value = p.value;
|
|
372
372
|
} catch {
|
|
373
373
|
c.value = [], u.value = o("debouncedFilter.errors.fetch");
|
|
374
374
|
} finally {
|
|
@@ -377,16 +377,16 @@ function hi(e, t, n, i = {
|
|
|
377
377
|
}, C = N(""), te = async (m) => {
|
|
378
378
|
var g, k, E;
|
|
379
379
|
if (C.value !== m)
|
|
380
|
-
if (C.value = m || "",
|
|
380
|
+
if (C.value = m || "", f.value === void 0)
|
|
381
381
|
try {
|
|
382
382
|
if (s.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
383
383
|
let R = h + "";
|
|
384
384
|
m && (R += `/${m}`);
|
|
385
|
-
const { data:
|
|
386
|
-
i.fetchedItemsKey in
|
|
385
|
+
const { data: I } = await r.get(`${R}?size=${n}`);
|
|
386
|
+
i.fetchedItemsKey in I ? c.value = I[i.fetchedItemsKey] : I != null && I.id ? c.value = [I] : c.value = [];
|
|
387
387
|
} else if (m) {
|
|
388
388
|
const R = [];
|
|
389
|
-
|
|
389
|
+
x(m) && i.searchKeys.includes("id") ? R.push((async () => {
|
|
390
390
|
const { data: U } = await r.get(`${h}/${m}`);
|
|
391
391
|
return [U[i.fetchedItemsKey] ?? U];
|
|
392
392
|
})()) : R.push(
|
|
@@ -395,37 +395,37 @@ function hi(e, t, n, i = {
|
|
|
395
395
|
return q[i.fetchedItemsKey];
|
|
396
396
|
})
|
|
397
397
|
);
|
|
398
|
-
const
|
|
399
|
-
c.value = [], (g =
|
|
398
|
+
const I = await Promise.all(R), J = /* @__PURE__ */ new Set();
|
|
399
|
+
c.value = [], (g = I == null ? void 0 : I.forEach) == null || g.call(I, (U) => {
|
|
400
400
|
var q;
|
|
401
401
|
(q = U == null ? void 0 : U.forEach) == null || q.call(U, (G) => {
|
|
402
402
|
J.has(G.id) || (J.add(G.id), c.value.push(G));
|
|
403
403
|
});
|
|
404
404
|
});
|
|
405
405
|
} else
|
|
406
|
-
c.value =
|
|
406
|
+
c.value = p.value;
|
|
407
407
|
} catch (R) {
|
|
408
408
|
((k = R == null ? void 0 : R.response) == null ? void 0 : k.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (c.value = [], u.value = o("debouncedFilter.errors.fetch"));
|
|
409
409
|
} finally {
|
|
410
410
|
s.value = !1;
|
|
411
411
|
}
|
|
412
412
|
else
|
|
413
|
-
s.value = !0, d.value = "", m ? (c.value = (E =
|
|
414
|
-
var
|
|
413
|
+
s.value = !0, d.value = "", m ? (c.value = (E = f.value) == null ? void 0 : E.filter((R) => {
|
|
414
|
+
var I;
|
|
415
415
|
let J = !1;
|
|
416
416
|
for (const U of i.searchKeys) {
|
|
417
|
-
const q = typeof R[U] == "string" ? (
|
|
417
|
+
const q = typeof R[U] == "string" ? (I = R[U]) == null ? void 0 : I.toLowerCase() : R[U];
|
|
418
418
|
q != null && q.includes(m.toLowerCase()) && (J = !0);
|
|
419
419
|
}
|
|
420
420
|
return J;
|
|
421
|
-
}), (!c.value || !c.value.length) && (d.value = o("debouncedFilter.errors.invalid"))) : c.value =
|
|
421
|
+
}), (!c.value || !c.value.length) && (d.value = o("debouncedFilter.errors.invalid"))) : c.value = f.value, s.value = !1;
|
|
422
422
|
};
|
|
423
423
|
return {
|
|
424
424
|
loading: s,
|
|
425
425
|
error: u,
|
|
426
426
|
validationError: d,
|
|
427
427
|
results: c,
|
|
428
|
-
allRecords:
|
|
428
|
+
allRecords: f,
|
|
429
429
|
loadItems: M,
|
|
430
430
|
debouncedQueryChange: l
|
|
431
431
|
};
|
|
@@ -484,62 +484,68 @@ function Wt(e, t) {
|
|
|
484
484
|
() => i.value.startsWith("/") ? new URL(`${window.location.origin}${i.value}`) : new URL(i.value)
|
|
485
485
|
);
|
|
486
486
|
return (a) => {
|
|
487
|
-
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query:
|
|
487
|
+
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query: p } = a;
|
|
488
488
|
try {
|
|
489
|
-
let
|
|
490
|
-
return r.value &&
|
|
491
|
-
|
|
492
|
-
}), d &&
|
|
493
|
-
} catch (
|
|
494
|
-
return console.error("RouteList(fetcher)",
|
|
489
|
+
let f = new URL(o.value.href);
|
|
490
|
+
return r.value && p ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${p}/`) : new URL(`${f.href}?filter[name][contains]=${p}`)) : (r.value || new URLSearchParams(p).forEach((v, h) => {
|
|
491
|
+
f.searchParams.append(h, v);
|
|
492
|
+
}), d && f.searchParams.append("sort_by", d), c === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(s))), u && l !== 1 && f.searchParams.append("offset", String(u)), f.href;
|
|
493
|
+
} catch (f) {
|
|
494
|
+
return console.error("RouteList(fetcher)", f), i.value;
|
|
495
495
|
}
|
|
496
496
|
};
|
|
497
497
|
}
|
|
498
498
|
function bi(e, t, n = "data") {
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
499
|
+
var i;
|
|
500
|
+
const r = y(t), { axiosInstance: o } = at({
|
|
501
|
+
...e.axiosRequestConfig,
|
|
502
|
+
headers: { ...(i = e.axiosRequestConfig) == null ? void 0 : i.headers, ...e.requestHeaders }
|
|
503
|
+
}), a = Wt(e, r), l = N({
|
|
502
504
|
status: ye.Idle
|
|
503
505
|
});
|
|
504
|
-
return { fetcher: async (
|
|
506
|
+
return { fetcher: async (s) => {
|
|
507
|
+
var u;
|
|
505
508
|
try {
|
|
506
|
-
|
|
507
|
-
let
|
|
508
|
-
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
const f =
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
509
|
+
l.value = { status: ye.Loading };
|
|
510
|
+
let d = a(s);
|
|
511
|
+
d.includes("filter[name]") && (d = `${d}&page[size]=${s.pageSize}&page[number]=${s.page}`);
|
|
512
|
+
const c = await o.get(d);
|
|
513
|
+
if (c.status >= 400)
|
|
514
|
+
throw c;
|
|
515
|
+
const p = c.data, f = n && n.replace(/[^\w-_]/gi, "");
|
|
516
|
+
let v;
|
|
517
|
+
p[f] && Array.isArray(p[f]) ? v = p[f] : Array.isArray(p) ? v = p : v = Object.keys(p).length ? [p] : [];
|
|
518
|
+
const h = {
|
|
519
|
+
data: v,
|
|
520
|
+
total: v.length,
|
|
521
|
+
...p.offset ? {
|
|
516
522
|
pagination: {
|
|
517
|
-
offset:
|
|
523
|
+
offset: p.offset
|
|
518
524
|
}
|
|
519
525
|
} : null
|
|
520
526
|
};
|
|
521
|
-
return
|
|
527
|
+
return l.value = {
|
|
522
528
|
status: ye.Idle,
|
|
523
|
-
response:
|
|
524
|
-
},
|
|
525
|
-
} catch (
|
|
526
|
-
const
|
|
529
|
+
response: h
|
|
530
|
+
}, h;
|
|
531
|
+
} catch (d) {
|
|
532
|
+
const c = {
|
|
527
533
|
data: [],
|
|
528
534
|
total: 0
|
|
529
535
|
};
|
|
530
|
-
return
|
|
536
|
+
return s.query && (((u = d.response) == null ? void 0 : u.status) === 404 || d.status === 404) ? (l.value = {
|
|
531
537
|
status: ye.NoResults,
|
|
532
|
-
response:
|
|
533
|
-
error:
|
|
534
|
-
},
|
|
538
|
+
response: c,
|
|
539
|
+
error: d.response ? d : { response: d }
|
|
540
|
+
}, c) : (l.value = {
|
|
535
541
|
status: ye.Error,
|
|
536
|
-
response:
|
|
537
|
-
error:
|
|
538
|
-
},
|
|
542
|
+
response: c,
|
|
543
|
+
error: d.response ? d : { response: d }
|
|
544
|
+
}, c);
|
|
539
545
|
}
|
|
540
|
-
}, fetcherState:
|
|
546
|
+
}, fetcherState: l };
|
|
541
547
|
}
|
|
542
|
-
function
|
|
548
|
+
function wi() {
|
|
543
549
|
const e = (n, i = "_") => n ? n.split(i).map((r) => r.toLowerCase() === "id" ? r.toUpperCase() : r.charAt(0).toUpperCase() + r.substring(1)).join(" ") : "", t = /(?:^|[\s-:'"])\w/g;
|
|
544
550
|
return {
|
|
545
551
|
capitalize: (n) => n ? n.replace(t, (i) => i.toUpperCase()) : "",
|
|
@@ -556,10 +562,10 @@ const Yt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
556
562
|
}, yt = (e) => e === "*" || e === "x" || e === "X", vt = (e) => {
|
|
557
563
|
const t = parseInt(e, 10);
|
|
558
564
|
return isNaN(t) ? e : t;
|
|
559
|
-
},
|
|
565
|
+
}, ki = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], Ci = (e, t) => {
|
|
560
566
|
if (yt(e) || yt(t))
|
|
561
567
|
return 0;
|
|
562
|
-
const [n, i] =
|
|
568
|
+
const [n, i] = ki(vt(e), vt(t));
|
|
563
569
|
return n > i ? 1 : n < i ? -1 : 0;
|
|
564
570
|
}, bt = (e, t) => {
|
|
565
571
|
for (let n = 0; n < Math.max(e.length, t.length); n++) {
|
|
@@ -571,7 +577,7 @@ const Yt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
571
577
|
}, Si = (e, t) => {
|
|
572
578
|
const n = mt(e), i = mt(t), r = n.pop(), o = i.pop(), a = bt(n, i);
|
|
573
579
|
return a !== 0 ? a : r && o ? bt(r.split("."), o.split(".")) : r || o ? r ? -1 : 1 : 0;
|
|
574
|
-
},
|
|
580
|
+
}, wt = (e, t, n) => {
|
|
575
581
|
Ai(n);
|
|
576
582
|
const i = Si(e, t);
|
|
577
583
|
return Jt[n].includes(i);
|
|
@@ -582,24 +588,24 @@ const Yt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
582
588
|
"<=": [-1, 0],
|
|
583
589
|
"<": [-1],
|
|
584
590
|
"!=": [-1, 1]
|
|
585
|
-
},
|
|
591
|
+
}, kt = Object.keys(Jt), Ai = (e) => {
|
|
586
592
|
if (typeof e != "string")
|
|
587
593
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
588
|
-
if (
|
|
589
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
590
|
-
},
|
|
591
|
-
function
|
|
594
|
+
if (kt.indexOf(e) === -1)
|
|
595
|
+
throw new Error(`Invalid operator, expected one of ${kt.join("|")}`);
|
|
596
|
+
}, Ii = (e) => typeof e == "string" && /^[v\d]/.test(e) && Yt.test(e);
|
|
597
|
+
function xi(e) {
|
|
592
598
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
593
599
|
if (!t)
|
|
594
600
|
return !0;
|
|
595
601
|
const { edition: i, version: r } = t;
|
|
596
|
-
if (!
|
|
602
|
+
if (!Ii(r))
|
|
597
603
|
return console.error("Invalid version"), !1;
|
|
598
604
|
const o = n[i];
|
|
599
605
|
if (!o)
|
|
600
606
|
return !1;
|
|
601
607
|
const [a, l] = o;
|
|
602
|
-
return !(a &&
|
|
608
|
+
return !(a && wt(r, a, "<") || l && wt(r, l, ">"));
|
|
603
609
|
}
|
|
604
610
|
function _i(e) {
|
|
605
611
|
const t = N(0), n = N(0), i = N(!1);
|
|
@@ -618,9 +624,9 @@ const ve = {
|
|
|
618
624
|
useFetcher: bi,
|
|
619
625
|
useFetchUrlBuilder: Wt,
|
|
620
626
|
useHelpers: Ht,
|
|
621
|
-
useStringHelpers:
|
|
627
|
+
useStringHelpers: wi,
|
|
622
628
|
useI18n: ot,
|
|
623
|
-
useGatewayFeatureSupported:
|
|
629
|
+
useGatewayFeatureSupported: xi,
|
|
624
630
|
useTruncationDetector: _i
|
|
625
631
|
}, _e = (e, t) => {
|
|
626
632
|
const n = e.__vccOpts || e;
|
|
@@ -675,7 +681,7 @@ const ve = {
|
|
|
675
681
|
_(a, {
|
|
676
682
|
appearance: t.requestMethod
|
|
677
683
|
}, {
|
|
678
|
-
default:
|
|
684
|
+
default: w(() => [
|
|
679
685
|
Z(F(t.requestMethod), 1)
|
|
680
686
|
]),
|
|
681
687
|
_: 1
|
|
@@ -1143,7 +1149,7 @@ function mr(e) {
|
|
|
1143
1149
|
return e === null ? !1 : un.exec(e) !== null || dn.exec(e) !== null;
|
|
1144
1150
|
}
|
|
1145
1151
|
function yr(e) {
|
|
1146
|
-
var t, n, i, r, o, a, l, s = 0, u = null, d, c,
|
|
1152
|
+
var t, n, i, r, o, a, l, s = 0, u = null, d, c, p;
|
|
1147
1153
|
if (t = un.exec(e), t === null && (t = dn.exec(e)), t === null)
|
|
1148
1154
|
throw new Error("Date resolve error");
|
|
1149
1155
|
if (n = +t[1], i = +t[2] - 1, r = +t[3], !t[4])
|
|
@@ -1153,7 +1159,7 @@ function yr(e) {
|
|
|
1153
1159
|
s += "0";
|
|
1154
1160
|
s = +s;
|
|
1155
1161
|
}
|
|
1156
|
-
return t[9] && (d = +t[10], c = +(t[11] || 0), u = (d * 60 + c) * 6e4, t[9] === "-" && (u = -u)),
|
|
1162
|
+
return t[9] && (d = +t[10], c = +(t[11] || 0), u = (d * 60 + c) * 6e4, t[9] === "-" && (u = -u)), p = new Date(Date.UTC(n, i, r, o, a, l, s)), u && p.setTime(p.getTime() - u), p;
|
|
1157
1163
|
}
|
|
1158
1164
|
function vr(e) {
|
|
1159
1165
|
return e.toISOString();
|
|
@@ -1173,7 +1179,7 @@ var fn = new Q("tag:yaml.org,2002:merge", {
|
|
|
1173
1179
|
resolve: br
|
|
1174
1180
|
}), lt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1175
1181
|
\r`;
|
|
1176
|
-
function
|
|
1182
|
+
function wr(e) {
|
|
1177
1183
|
if (e === null)
|
|
1178
1184
|
return !1;
|
|
1179
1185
|
var t, n, i = 0, r = e.length, o = lt;
|
|
@@ -1185,7 +1191,7 @@ function kr(e) {
|
|
|
1185
1191
|
}
|
|
1186
1192
|
return i % 8 === 0;
|
|
1187
1193
|
}
|
|
1188
|
-
function
|
|
1194
|
+
function kr(e) {
|
|
1189
1195
|
var t, n, i = e.replace(/[\r\n=]/g, ""), r = i.length, o = lt, a = 0, l = [];
|
|
1190
1196
|
for (t = 0; t < r; t++)
|
|
1191
1197
|
t % 4 === 0 && t && (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)), a = a << 6 | o.indexOf(i.charAt(t));
|
|
@@ -1202,17 +1208,17 @@ function Sr(e) {
|
|
|
1202
1208
|
}
|
|
1203
1209
|
var gn = new Q("tag:yaml.org,2002:binary", {
|
|
1204
1210
|
kind: "scalar",
|
|
1205
|
-
resolve:
|
|
1206
|
-
construct:
|
|
1211
|
+
resolve: wr,
|
|
1212
|
+
construct: kr,
|
|
1207
1213
|
predicate: Sr,
|
|
1208
1214
|
represent: Cr
|
|
1209
|
-
}), Ar = Object.prototype.hasOwnProperty,
|
|
1210
|
-
function
|
|
1215
|
+
}), Ar = Object.prototype.hasOwnProperty, Ir = Object.prototype.toString;
|
|
1216
|
+
function xr(e) {
|
|
1211
1217
|
if (e === null)
|
|
1212
1218
|
return !0;
|
|
1213
1219
|
var t = [], n, i, r, o, a, l = e;
|
|
1214
1220
|
for (n = 0, i = l.length; n < i; n += 1) {
|
|
1215
|
-
if (r = l[n], a = !1,
|
|
1221
|
+
if (r = l[n], a = !1, Ir.call(r) !== "[object Object]")
|
|
1216
1222
|
return !1;
|
|
1217
1223
|
for (o in r)
|
|
1218
1224
|
if (Ar.call(r, o))
|
|
@@ -1234,7 +1240,7 @@ function _r(e) {
|
|
|
1234
1240
|
}
|
|
1235
1241
|
var hn = new Q("tag:yaml.org,2002:omap", {
|
|
1236
1242
|
kind: "sequence",
|
|
1237
|
-
resolve:
|
|
1243
|
+
resolve: xr,
|
|
1238
1244
|
construct: _r
|
|
1239
1245
|
}), jr = Object.prototype.toString;
|
|
1240
1246
|
function Tr(e) {
|
|
@@ -1288,7 +1294,7 @@ var yn = new Q("tag:yaml.org,2002:set", {
|
|
|
1288
1294
|
mn,
|
|
1289
1295
|
yn
|
|
1290
1296
|
]
|
|
1291
|
-
}), me = Object.prototype.hasOwnProperty, qe = 1, vn = 2, bn = 3, $e = 4, He = 1, Fr = 2, St = 3, Lr = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, qr = /[\x85\u2028\u2029]/, $r = /[,\[\]\{\}]/,
|
|
1297
|
+
}), me = Object.prototype.hasOwnProperty, qe = 1, vn = 2, bn = 3, $e = 4, He = 1, Fr = 2, St = 3, Lr = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, qr = /[\x85\u2028\u2029]/, $r = /[,\[\]\{\}]/, wn = /^(?:!|!!|![a-z\-]+!)$/i, kn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1292
1298
|
function At(e) {
|
|
1293
1299
|
return Object.prototype.toString.call(e);
|
|
1294
1300
|
}
|
|
@@ -1314,7 +1320,7 @@ function Rr(e) {
|
|
|
1314
1320
|
function Ur(e) {
|
|
1315
1321
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1316
1322
|
}
|
|
1317
|
-
function
|
|
1323
|
+
function It(e) {
|
|
1318
1324
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1319
1325
|
` : 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" : "";
|
|
1320
1326
|
}
|
|
@@ -1325,8 +1331,8 @@ function Br(e) {
|
|
|
1325
1331
|
);
|
|
1326
1332
|
}
|
|
1327
1333
|
var Cn = new Array(256), Sn = new Array(256);
|
|
1328
|
-
for (var
|
|
1329
|
-
Cn[
|
|
1334
|
+
for (var ke = 0; ke < 256; ke++)
|
|
1335
|
+
Cn[ke] = It(ke) ? 1 : 0, Sn[ke] = It(ke);
|
|
1330
1336
|
function Pr(e, t) {
|
|
1331
1337
|
this.input = e, this.filename = t.filename || null, this.schema = t.schema || st, 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 = [];
|
|
1332
1338
|
}
|
|
@@ -1341,24 +1347,24 @@ function An(e, t) {
|
|
|
1341
1347
|
};
|
|
1342
1348
|
return n.snippet = Hi(n), new ie(t, n);
|
|
1343
1349
|
}
|
|
1344
|
-
function
|
|
1350
|
+
function b(e, t) {
|
|
1345
1351
|
throw An(e, t);
|
|
1346
1352
|
}
|
|
1347
1353
|
function Ke(e, t) {
|
|
1348
1354
|
e.onWarning && e.onWarning.call(null, An(e, t));
|
|
1349
1355
|
}
|
|
1350
|
-
var
|
|
1356
|
+
var xt = {
|
|
1351
1357
|
YAML: function(e, t, n) {
|
|
1352
1358
|
var i, r, o;
|
|
1353
|
-
e.version !== null &&
|
|
1359
|
+
e.version !== null && b(e, "duplication of %YAML directive"), n.length !== 1 && b(e, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), i === null && b(e, "ill-formed argument of the YAML directive"), r = parseInt(i[1], 10), o = parseInt(i[2], 10), r !== 1 && b(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Ke(e, "unsupported YAML version of the document");
|
|
1354
1360
|
},
|
|
1355
1361
|
TAG: function(e, t, n) {
|
|
1356
1362
|
var i, r;
|
|
1357
|
-
n.length !== 2 &&
|
|
1363
|
+
n.length !== 2 && b(e, "TAG directive accepts exactly two arguments"), i = n[0], r = n[1], wn.test(i) || b(e, "ill-formed tag handle (first argument) of the TAG directive"), me.call(e.tagMap, i) && b(e, 'there is a previously declared suffix for "' + i + '" tag handle'), kn.test(r) || b(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1358
1364
|
try {
|
|
1359
1365
|
r = decodeURIComponent(r);
|
|
1360
1366
|
} catch {
|
|
1361
|
-
|
|
1367
|
+
b(e, "tag prefix is malformed: " + r);
|
|
1362
1368
|
}
|
|
1363
1369
|
e.tagMap[i] = r;
|
|
1364
1370
|
}
|
|
@@ -1368,22 +1374,22 @@ function ge(e, t, n, i) {
|
|
|
1368
1374
|
if (t < n) {
|
|
1369
1375
|
if (l = e.input.slice(t, n), i)
|
|
1370
1376
|
for (r = 0, o = l.length; r < o; r += 1)
|
|
1371
|
-
a = l.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 ||
|
|
1377
|
+
a = l.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 || b(e, "expected valid JSON character");
|
|
1372
1378
|
else
|
|
1373
|
-
Lr.test(l) &&
|
|
1379
|
+
Lr.test(l) && b(e, "the stream contains non-printable characters");
|
|
1374
1380
|
e.result += l;
|
|
1375
1381
|
}
|
|
1376
1382
|
}
|
|
1377
1383
|
function _t(e, t, n, i) {
|
|
1378
1384
|
var r, o, a, l;
|
|
1379
|
-
for (Y.isObject(n) ||
|
|
1385
|
+
for (Y.isObject(n) || b(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(n), a = 0, l = r.length; a < l; a += 1)
|
|
1380
1386
|
o = r[a], me.call(t, o) || (t[o] = n[o], i[o] = !0);
|
|
1381
1387
|
}
|
|
1382
1388
|
function Ae(e, t, n, i, r, o, a, l, s) {
|
|
1383
1389
|
var u, d;
|
|
1384
1390
|
if (Array.isArray(r))
|
|
1385
1391
|
for (r = Array.prototype.slice.call(r), u = 0, d = r.length; u < d; u += 1)
|
|
1386
|
-
Array.isArray(r[u]) &&
|
|
1392
|
+
Array.isArray(r[u]) && b(e, "nested arrays are not supported inside keys"), typeof r == "object" && At(r[u]) === "[object Object]" && (r[u] = "[object Object]");
|
|
1387
1393
|
if (typeof r == "object" && At(r) === "[object Object]" && (r = "[object Object]"), r = String(r), t === null && (t = {}), i === "tag:yaml.org,2002:merge")
|
|
1388
1394
|
if (Array.isArray(o))
|
|
1389
1395
|
for (u = 0, d = o.length; u < d; u += 1)
|
|
@@ -1391,7 +1397,7 @@ function Ae(e, t, n, i, r, o, a, l, s) {
|
|
|
1391
1397
|
else
|
|
1392
1398
|
_t(e, t, o, n);
|
|
1393
1399
|
else
|
|
1394
|
-
!e.json && !me.call(n, r) && me.call(t, r) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position,
|
|
1400
|
+
!e.json && !me.call(n, r) && me.call(t, r) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, b(e, "duplicated mapping key")), r === "__proto__" ? Object.defineProperty(t, r, {
|
|
1395
1401
|
configurable: !0,
|
|
1396
1402
|
enumerable: !0,
|
|
1397
1403
|
writable: !0,
|
|
@@ -1401,7 +1407,7 @@ function Ae(e, t, n, i, r, o, a, l, s) {
|
|
|
1401
1407
|
}
|
|
1402
1408
|
function ct(e) {
|
|
1403
1409
|
var t;
|
|
1404
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1410
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : b(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1405
1411
|
}
|
|
1406
1412
|
function z(e, t, n) {
|
|
1407
1413
|
for (var i = 0, r = e.input.charCodeAt(e.position); r !== 0; ) {
|
|
@@ -1428,31 +1434,31 @@ function ut(e, t) {
|
|
|
1428
1434
|
`, t - 1));
|
|
1429
1435
|
}
|
|
1430
1436
|
function Dr(e, t, n) {
|
|
1431
|
-
var i, r, o, a, l, s, u, d, c = e.kind,
|
|
1432
|
-
if (
|
|
1437
|
+
var i, r, o, a, l, s, u, d, c = e.kind, p = e.result, f;
|
|
1438
|
+
if (f = e.input.charCodeAt(e.position), ae(f) || Se(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) && (r = e.input.charCodeAt(e.position + 1), ae(r) || n && Se(r)))
|
|
1433
1439
|
return !1;
|
|
1434
|
-
for (e.kind = "scalar", e.result = "", o = a = e.position, l = !1;
|
|
1435
|
-
if (
|
|
1440
|
+
for (e.kind = "scalar", e.result = "", o = a = e.position, l = !1; f !== 0; ) {
|
|
1441
|
+
if (f === 58) {
|
|
1436
1442
|
if (r = e.input.charCodeAt(e.position + 1), ae(r) || n && Se(r))
|
|
1437
1443
|
break;
|
|
1438
|
-
} else if (
|
|
1444
|
+
} else if (f === 35) {
|
|
1439
1445
|
if (i = e.input.charCodeAt(e.position - 1), ae(i))
|
|
1440
1446
|
break;
|
|
1441
1447
|
} else {
|
|
1442
|
-
if (e.position === e.lineStart && Pe(e) || n && Se(
|
|
1448
|
+
if (e.position === e.lineStart && Pe(e) || n && Se(f))
|
|
1443
1449
|
break;
|
|
1444
|
-
if (le(
|
|
1450
|
+
if (le(f))
|
|
1445
1451
|
if (s = e.line, u = e.lineStart, d = e.lineIndent, z(e, !1, -1), e.lineIndent >= t) {
|
|
1446
|
-
l = !0,
|
|
1452
|
+
l = !0, f = e.input.charCodeAt(e.position);
|
|
1447
1453
|
continue;
|
|
1448
1454
|
} else {
|
|
1449
1455
|
e.position = a, e.line = s, e.lineStart = u, e.lineIndent = d;
|
|
1450
1456
|
break;
|
|
1451
1457
|
}
|
|
1452
1458
|
}
|
|
1453
|
-
l && (ge(e, o, a, !1), ut(e, e.line - s), o = a = e.position, l = !1), be(
|
|
1459
|
+
l && (ge(e, o, a, !1), ut(e, e.line - s), o = a = e.position, l = !1), be(f) || (a = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1454
1460
|
}
|
|
1455
|
-
return ge(e, o, a, !1), e.result ? !0 : (e.kind = c, e.result =
|
|
1461
|
+
return ge(e, o, a, !1), e.result ? !0 : (e.kind = c, e.result = p, !1);
|
|
1456
1462
|
}
|
|
1457
1463
|
function Vr(e, t) {
|
|
1458
1464
|
var n, i, r;
|
|
@@ -1465,8 +1471,8 @@ function Vr(e, t) {
|
|
|
1465
1471
|
else
|
|
1466
1472
|
return !0;
|
|
1467
1473
|
else
|
|
1468
|
-
le(n) ? (ge(e, i, r, !0), ut(e, z(e, !1, t)), i = r = e.position) : e.position === e.lineStart && Pe(e) ?
|
|
1469
|
-
|
|
1474
|
+
le(n) ? (ge(e, i, r, !0), ut(e, z(e, !1, t)), i = r = e.position) : e.position === e.lineStart && Pe(e) ? b(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
1475
|
+
b(e, "unexpected end of the stream within a single quoted scalar");
|
|
1470
1476
|
}
|
|
1471
1477
|
function zr(e, t) {
|
|
1472
1478
|
var n, i, r, o, a, l;
|
|
@@ -1482,30 +1488,30 @@ function zr(e, t) {
|
|
|
1482
1488
|
e.result += Sn[l], e.position++;
|
|
1483
1489
|
else if ((a = Rr(l)) > 0) {
|
|
1484
1490
|
for (r = a, o = 0; r > 0; r--)
|
|
1485
|
-
l = e.input.charCodeAt(++e.position), (a = Kr(l)) >= 0 ? o = (o << 4) + a :
|
|
1491
|
+
l = e.input.charCodeAt(++e.position), (a = Kr(l)) >= 0 ? o = (o << 4) + a : b(e, "expected hexadecimal character");
|
|
1486
1492
|
e.result += Br(o), e.position++;
|
|
1487
1493
|
} else
|
|
1488
|
-
|
|
1494
|
+
b(e, "unknown escape sequence");
|
|
1489
1495
|
n = i = e.position;
|
|
1490
1496
|
} else
|
|
1491
|
-
le(l) ? (ge(e, n, i, !0), ut(e, z(e, !1, t)), n = i = e.position) : e.position === e.lineStart && Pe(e) ?
|
|
1497
|
+
le(l) ? (ge(e, n, i, !0), ut(e, z(e, !1, t)), n = i = e.position) : e.position === e.lineStart && Pe(e) ? b(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position);
|
|
1492
1498
|
}
|
|
1493
|
-
|
|
1499
|
+
b(e, "unexpected end of the stream within a double quoted scalar");
|
|
1494
1500
|
}
|
|
1495
1501
|
function Hr(e, t) {
|
|
1496
|
-
var n = !0, i, r, o, a = e.tag, l, s = e.anchor, u, d, c,
|
|
1502
|
+
var n = !0, i, r, o, a = e.tag, l, s = e.anchor, u, d, c, p, f, v = /* @__PURE__ */ Object.create(null), h, x, M, C;
|
|
1497
1503
|
if (C = e.input.charCodeAt(e.position), C === 91)
|
|
1498
|
-
d = 93,
|
|
1504
|
+
d = 93, f = !1, l = [];
|
|
1499
1505
|
else if (C === 123)
|
|
1500
|
-
d = 125,
|
|
1506
|
+
d = 125, f = !0, l = {};
|
|
1501
1507
|
else
|
|
1502
1508
|
return !1;
|
|
1503
1509
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), C = e.input.charCodeAt(++e.position); C !== 0; ) {
|
|
1504
1510
|
if (z(e, !0, t), C = e.input.charCodeAt(e.position), C === d)
|
|
1505
|
-
return e.position++, e.tag = a, e.anchor = s, e.kind =
|
|
1506
|
-
n ? C === 44 &&
|
|
1511
|
+
return e.position++, e.tag = a, e.anchor = s, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1512
|
+
n ? C === 44 && b(e, "expected the node content, but found ','") : b(e, "missed comma between flow collection entries"), x = h = M = null, c = p = !1, C === 63 && (u = e.input.charCodeAt(e.position + 1), ae(u) && (c = p = !0, e.position++, z(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, Ie(e, t, qe, !1, !0), x = e.tag, h = e.result, z(e, !0, t), C = e.input.charCodeAt(e.position), (p || e.line === i) && C === 58 && (c = !0, C = e.input.charCodeAt(++e.position), z(e, !0, t), Ie(e, t, qe, !1, !0), M = e.result), f ? Ae(e, l, v, x, h, M, i, r, o) : c ? l.push(Ae(e, null, v, x, h, M, i, r, o)) : l.push(h), z(e, !0, t), C = e.input.charCodeAt(e.position), C === 44 ? (n = !0, C = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1507
1513
|
}
|
|
1508
|
-
|
|
1514
|
+
b(e, "unexpected end of the stream within a flow collection");
|
|
1509
1515
|
}
|
|
1510
1516
|
function Wr(e, t) {
|
|
1511
1517
|
var n, i, r = He, o = !1, a = !1, l = t, s = 0, u = !1, d, c;
|
|
@@ -1517,9 +1523,9 @@ function Wr(e, t) {
|
|
|
1517
1523
|
return !1;
|
|
1518
1524
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
1519
1525
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
1520
|
-
He === r ? r = c === 43 ? St : Fr :
|
|
1526
|
+
He === r ? r = c === 43 ? St : Fr : b(e, "repeat of a chomping mode identifier");
|
|
1521
1527
|
else if ((d = Ur(c)) >= 0)
|
|
1522
|
-
d === 0 ?
|
|
1528
|
+
d === 0 ? b(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? b(e, "repeat of an indentation width identifier") : (l = t + d - 1, a = !0);
|
|
1523
1529
|
else
|
|
1524
1530
|
break;
|
|
1525
1531
|
if (be(c)) {
|
|
@@ -1558,78 +1564,78 @@ function jt(e, t) {
|
|
|
1558
1564
|
var n, i = e.tag, r = e.anchor, o = [], a, l = !1, s;
|
|
1559
1565
|
if (e.firstTabInLine !== -1)
|
|
1560
1566
|
return !1;
|
|
1561
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1567
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, b(e, "tab characters must not be used in indentation")), !(s !== 45 || (a = e.input.charCodeAt(e.position + 1), !ae(a)))); ) {
|
|
1562
1568
|
if (l = !0, e.position++, z(e, !0, -1) && e.lineIndent <= t) {
|
|
1563
1569
|
o.push(null), s = e.input.charCodeAt(e.position);
|
|
1564
1570
|
continue;
|
|
1565
1571
|
}
|
|
1566
|
-
if (n = e.line,
|
|
1567
|
-
|
|
1572
|
+
if (n = e.line, Ie(e, t, bn, !1, !0), o.push(e.result), z(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
1573
|
+
b(e, "bad indentation of a sequence entry");
|
|
1568
1574
|
else if (e.lineIndent < t)
|
|
1569
1575
|
break;
|
|
1570
1576
|
}
|
|
1571
1577
|
return l ? (e.tag = i, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1572
1578
|
}
|
|
1573
1579
|
function Yr(e, t, n) {
|
|
1574
|
-
var i, r, o, a, l, s, u = e.tag, d = e.anchor, c = {},
|
|
1580
|
+
var i, r, o, a, l, s, u = e.tag, d = e.anchor, c = {}, p = /* @__PURE__ */ Object.create(null), f = null, v = null, h = null, x = !1, M = !1, C;
|
|
1575
1581
|
if (e.firstTabInLine !== -1)
|
|
1576
1582
|
return !1;
|
|
1577
1583
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), C = e.input.charCodeAt(e.position); C !== 0; ) {
|
|
1578
|
-
if (!
|
|
1579
|
-
C === 63 ? (
|
|
1584
|
+
if (!x && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, b(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (C === 63 || C === 58) && ae(i))
|
|
1585
|
+
C === 63 ? (x && (Ae(e, c, p, f, v, null, a, l, s), f = v = h = null), M = !0, x = !0, r = !0) : x ? (x = !1, r = !0) : b(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, C = i;
|
|
1580
1586
|
else {
|
|
1581
|
-
if (a = e.line, l = e.lineStart, s = e.position, !
|
|
1587
|
+
if (a = e.line, l = e.lineStart, s = e.position, !Ie(e, n, vn, !1, !0))
|
|
1582
1588
|
break;
|
|
1583
1589
|
if (e.line === o) {
|
|
1584
1590
|
for (C = e.input.charCodeAt(e.position); be(C); )
|
|
1585
1591
|
C = e.input.charCodeAt(++e.position);
|
|
1586
1592
|
if (C === 58)
|
|
1587
|
-
C = e.input.charCodeAt(++e.position), ae(C) ||
|
|
1593
|
+
C = e.input.charCodeAt(++e.position), ae(C) || b(e, "a whitespace character is expected after the key-value separator within a block mapping"), x && (Ae(e, c, p, f, v, null, a, l, s), f = v = h = null), M = !0, x = !1, r = !1, f = e.tag, v = e.result;
|
|
1588
1594
|
else if (M)
|
|
1589
|
-
|
|
1595
|
+
b(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1590
1596
|
else
|
|
1591
1597
|
return e.tag = u, e.anchor = d, !0;
|
|
1592
1598
|
} else if (M)
|
|
1593
|
-
|
|
1599
|
+
b(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1594
1600
|
else
|
|
1595
1601
|
return e.tag = u, e.anchor = d, !0;
|
|
1596
1602
|
}
|
|
1597
|
-
if ((e.line === o || e.lineIndent > t) && (
|
|
1598
|
-
|
|
1603
|
+
if ((e.line === o || e.lineIndent > t) && (x && (a = e.line, l = e.lineStart, s = e.position), Ie(e, t, $e, !0, r) && (x ? v = e.result : h = e.result), x || (Ae(e, c, p, f, v, h, a, l, s), f = v = h = null), z(e, !0, -1), C = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && C !== 0)
|
|
1604
|
+
b(e, "bad indentation of a mapping entry");
|
|
1599
1605
|
else if (e.lineIndent < t)
|
|
1600
1606
|
break;
|
|
1601
1607
|
}
|
|
1602
|
-
return
|
|
1608
|
+
return x && Ae(e, c, p, f, v, null, a, l, s), M && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), M;
|
|
1603
1609
|
}
|
|
1604
1610
|
function Jr(e) {
|
|
1605
1611
|
var t, n = !1, i = !1, r, o, a;
|
|
1606
1612
|
if (a = e.input.charCodeAt(e.position), a !== 33)
|
|
1607
1613
|
return !1;
|
|
1608
|
-
if (e.tag !== null &&
|
|
1614
|
+
if (e.tag !== null && b(e, "duplication of a tag property"), a = e.input.charCodeAt(++e.position), a === 60 ? (n = !0, a = e.input.charCodeAt(++e.position)) : a === 33 ? (i = !0, r = "!!", a = e.input.charCodeAt(++e.position)) : r = "!", t = e.position, n) {
|
|
1609
1615
|
do
|
|
1610
1616
|
a = e.input.charCodeAt(++e.position);
|
|
1611
1617
|
while (a !== 0 && a !== 62);
|
|
1612
|
-
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) :
|
|
1618
|
+
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) : b(e, "unexpected end of the stream within a verbatim tag");
|
|
1613
1619
|
} else {
|
|
1614
1620
|
for (; a !== 0 && !ae(a); )
|
|
1615
|
-
a === 33 && (i ?
|
|
1616
|
-
o = e.input.slice(t, e.position), $r.test(o) &&
|
|
1621
|
+
a === 33 && (i ? b(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1), wn.test(r) || b(e, "named tag handle cannot contain such characters"), i = !0, t = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
1622
|
+
o = e.input.slice(t, e.position), $r.test(o) && b(e, "tag suffix cannot contain flow indicator characters");
|
|
1617
1623
|
}
|
|
1618
|
-
o && !
|
|
1624
|
+
o && !kn.test(o) && b(e, "tag name cannot contain such characters: " + o);
|
|
1619
1625
|
try {
|
|
1620
1626
|
o = decodeURIComponent(o);
|
|
1621
1627
|
} catch {
|
|
1622
|
-
|
|
1628
|
+
b(e, "tag name is malformed: " + o);
|
|
1623
1629
|
}
|
|
1624
|
-
return n ? e.tag = o : me.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o :
|
|
1630
|
+
return n ? e.tag = o : me.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o : b(e, 'undeclared tag handle "' + r + '"'), !0;
|
|
1625
1631
|
}
|
|
1626
1632
|
function Gr(e) {
|
|
1627
1633
|
var t, n;
|
|
1628
1634
|
if (n = e.input.charCodeAt(e.position), n !== 38)
|
|
1629
1635
|
return !1;
|
|
1630
|
-
for (e.anchor !== null &&
|
|
1636
|
+
for (e.anchor !== null && b(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !ae(n) && !Se(n); )
|
|
1631
1637
|
n = e.input.charCodeAt(++e.position);
|
|
1632
|
-
return e.position === t &&
|
|
1638
|
+
return e.position === t && b(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1633
1639
|
}
|
|
1634
1640
|
function Zr(e) {
|
|
1635
1641
|
var t, n, i;
|
|
@@ -1637,31 +1643,31 @@ function Zr(e) {
|
|
|
1637
1643
|
return !1;
|
|
1638
1644
|
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !ae(i) && !Se(i); )
|
|
1639
1645
|
i = e.input.charCodeAt(++e.position);
|
|
1640
|
-
return e.position === t &&
|
|
1646
|
+
return e.position === t && b(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), me.call(e.anchorMap, n) || b(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], z(e, !0, -1), !0;
|
|
1641
1647
|
}
|
|
1642
|
-
function
|
|
1643
|
-
var o, a, l, s = 1, u = !1, d = !1, c,
|
|
1648
|
+
function Ie(e, t, n, i, r) {
|
|
1649
|
+
var o, a, l, s = 1, u = !1, d = !1, c, p, f, v, h, x;
|
|
1644
1650
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = $e === n || bn === n, i && z(e, !0, -1) && (u = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
1645
1651
|
for (; Jr(e) || Gr(e); )
|
|
1646
1652
|
z(e, !0, -1) ? (u = !0, l = o, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
1647
|
-
if (l && (l = u || r), (s === 1 || $e === n) && (qe === n || vn === n ? h = t : h = t + 1,
|
|
1653
|
+
if (l && (l = u || r), (s === 1 || $e === n) && (qe === n || vn === n ? h = t : h = t + 1, x = e.position - e.lineStart, s === 1 ? l && (jt(e, x) || Yr(e, x, h)) || Hr(e, h) ? d = !0 : (a && Wr(e, h) || Vr(e, h) || zr(e, h) ? d = !0 : Zr(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && b(e, "alias node should not have any properties")) : Dr(e, h, qe === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && jt(e, x))), e.tag === null)
|
|
1648
1654
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1649
1655
|
else if (e.tag === "?") {
|
|
1650
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
1651
|
-
if (
|
|
1652
|
-
e.result =
|
|
1656
|
+
for (e.result !== null && e.kind !== "scalar" && b(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, p = e.implicitTypes.length; c < p; c += 1)
|
|
1657
|
+
if (v = e.implicitTypes[c], v.resolve(e.result)) {
|
|
1658
|
+
e.result = v.construct(e.result), e.tag = v.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1653
1659
|
break;
|
|
1654
1660
|
}
|
|
1655
1661
|
} else if (e.tag !== "!") {
|
|
1656
1662
|
if (me.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1657
|
-
|
|
1663
|
+
v = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1658
1664
|
else
|
|
1659
|
-
for (
|
|
1660
|
-
if (e.tag.slice(0,
|
|
1661
|
-
|
|
1665
|
+
for (v = null, f = e.typeMap.multi[e.kind || "fallback"], c = 0, p = f.length; c < p; c += 1)
|
|
1666
|
+
if (e.tag.slice(0, f[c].tag.length) === f[c].tag) {
|
|
1667
|
+
v = f[c];
|
|
1662
1668
|
break;
|
|
1663
1669
|
}
|
|
1664
|
-
|
|
1670
|
+
v || b(e, "unknown tag !<" + e.tag + ">"), e.result !== null && v.kind !== e.kind && b(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + v.kind + '", not "' + e.kind + '"'), v.resolve(e.result, e.tag) ? (e.result = v.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : b(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1665
1671
|
}
|
|
1666
1672
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
1667
1673
|
}
|
|
@@ -1670,7 +1676,7 @@ function Qr(e) {
|
|
|
1670
1676
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (a = e.input.charCodeAt(e.position)) !== 0 && (z(e, !0, -1), a = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || a !== 37)); ) {
|
|
1671
1677
|
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !ae(a); )
|
|
1672
1678
|
a = e.input.charCodeAt(++e.position);
|
|
1673
|
-
for (i = e.input.slice(n, e.position), r = [], i.length < 1 &&
|
|
1679
|
+
for (i = e.input.slice(n, e.position), r = [], i.length < 1 && b(e, "directive name must not be less than one character in length"); a !== 0; ) {
|
|
1674
1680
|
for (; be(a); )
|
|
1675
1681
|
a = e.input.charCodeAt(++e.position);
|
|
1676
1682
|
if (a === 35) {
|
|
@@ -1685,22 +1691,22 @@ function Qr(e) {
|
|
|
1685
1691
|
a = e.input.charCodeAt(++e.position);
|
|
1686
1692
|
r.push(e.input.slice(n, e.position));
|
|
1687
1693
|
}
|
|
1688
|
-
a !== 0 && ct(e), me.call(
|
|
1694
|
+
a !== 0 && ct(e), me.call(xt, i) ? xt[i](e, i, r) : Ke(e, 'unknown document directive "' + i + '"');
|
|
1689
1695
|
}
|
|
1690
|
-
if (z(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, z(e, !0, -1)) : o &&
|
|
1696
|
+
if (z(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, z(e, !0, -1)) : o && b(e, "directives end mark is expected"), Ie(e, e.lineIndent - 1, $e, !1, !0), z(e, !0, -1), e.checkLineBreaks && qr.test(e.input.slice(t, e.position)) && Ke(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Pe(e)) {
|
|
1691
1697
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, z(e, !0, -1));
|
|
1692
1698
|
return;
|
|
1693
1699
|
}
|
|
1694
1700
|
if (e.position < e.length - 1)
|
|
1695
|
-
|
|
1701
|
+
b(e, "end of the stream or a document separator is expected");
|
|
1696
1702
|
else
|
|
1697
1703
|
return;
|
|
1698
1704
|
}
|
|
1699
|
-
function
|
|
1705
|
+
function In(e, t) {
|
|
1700
1706
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
1701
1707
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
1702
1708
|
var n = new Pr(e, t), i = e.indexOf("\0");
|
|
1703
|
-
for (i !== -1 && (n.position = i,
|
|
1709
|
+
for (i !== -1 && (n.position = i, b(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
1704
1710
|
n.lineIndent += 1, n.position += 1;
|
|
1705
1711
|
for (; n.position < n.length - 1; )
|
|
1706
1712
|
Qr(n);
|
|
@@ -1708,21 +1714,21 @@ function xn(e, t) {
|
|
|
1708
1714
|
}
|
|
1709
1715
|
function Xr(e, t, n) {
|
|
1710
1716
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
1711
|
-
var i =
|
|
1717
|
+
var i = In(e, n);
|
|
1712
1718
|
if (typeof t != "function")
|
|
1713
1719
|
return i;
|
|
1714
1720
|
for (var r = 0, o = i.length; r < o; r += 1)
|
|
1715
1721
|
t(i[r]);
|
|
1716
1722
|
}
|
|
1717
1723
|
function ea(e, t) {
|
|
1718
|
-
var n =
|
|
1724
|
+
var n = In(e, t);
|
|
1719
1725
|
if (n.length !== 0) {
|
|
1720
1726
|
if (n.length === 1)
|
|
1721
1727
|
return n[0];
|
|
1722
1728
|
throw new ie("expected a single document in the stream, but found more");
|
|
1723
1729
|
}
|
|
1724
1730
|
}
|
|
1725
|
-
var ta = Xr, na = ea,
|
|
1731
|
+
var ta = Xr, na = ea, xn = {
|
|
1726
1732
|
loadAll: ta,
|
|
1727
1733
|
load: na
|
|
1728
1734
|
}, _n = Object.prototype.toString, jn = Object.prototype.hasOwnProperty, dt = 65279, ia = 9, Me = 10, ra = 13, aa = 32, oa = 33, la = 34, Ge = 35, sa = 37, ca = 38, ua = 39, da = 42, Tn = 44, pa = 45, Re = 58, fa = 61, ga = 62, ha = 63, ma = 64, Nn = 91, On = 93, ya = 96, Mn = 123, va = 124, En = 125, ee = {};
|
|
@@ -1758,8 +1764,8 @@ var ba = [
|
|
|
1758
1764
|
"off",
|
|
1759
1765
|
"Off",
|
|
1760
1766
|
"OFF"
|
|
1761
|
-
],
|
|
1762
|
-
function
|
|
1767
|
+
], wa = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
1768
|
+
function ka(e, t) {
|
|
1763
1769
|
var n, i, r, o, a, l, s;
|
|
1764
1770
|
if (t === null)
|
|
1765
1771
|
return {};
|
|
@@ -1781,7 +1787,7 @@ function Ca(e) {
|
|
|
1781
1787
|
}
|
|
1782
1788
|
var Sa = 1, Ee = 2;
|
|
1783
1789
|
function Aa(e) {
|
|
1784
|
-
this.schema = e.schema || st, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = Y.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap =
|
|
1790
|
+
this.schema = e.schema || st, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = Y.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = ka(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 === '"' ? Ee : Sa, 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;
|
|
1785
1791
|
}
|
|
1786
1792
|
function Tt(e, t) {
|
|
1787
1793
|
for (var n = Y.repeat(" ", t), i = 0, r = -1, o = "", a, l = e.length; i < l; )
|
|
@@ -1794,7 +1800,7 @@ function Ze(e, t) {
|
|
|
1794
1800
|
return `
|
|
1795
1801
|
` + Y.repeat(" ", e.indent * t);
|
|
1796
1802
|
}
|
|
1797
|
-
function
|
|
1803
|
+
function Ia(e, t) {
|
|
1798
1804
|
var n, i, r;
|
|
1799
1805
|
for (n = 0, i = e.implicitTypes.length; n < i; n += 1)
|
|
1800
1806
|
if (r = e.implicitTypes[n], r.resolve(t))
|
|
@@ -1820,7 +1826,7 @@ function Ot(e, t, n) {
|
|
|
1820
1826
|
) : i && e !== Tn && e !== Nn && e !== On && e !== Mn && e !== En) && e !== Ge && !(t === Re && !r) || Nt(t) && !Ue(t) && e === Ge || t === Re && r
|
|
1821
1827
|
);
|
|
1822
1828
|
}
|
|
1823
|
-
function
|
|
1829
|
+
function xa(e) {
|
|
1824
1830
|
return Fe(e) && e !== dt && !Ue(e) && e !== pa && e !== ha && e !== Re && e !== Tn && e !== Nn && e !== On && e !== Mn && e !== En && e !== Ge && e !== ca && e !== da && e !== oa && e !== va && e !== fa && e !== ga && e !== ua && e !== la && e !== sa && e !== ma && e !== ya;
|
|
1825
1831
|
}
|
|
1826
1832
|
function _a(e) {
|
|
@@ -1836,7 +1842,7 @@ function Fn(e) {
|
|
|
1836
1842
|
}
|
|
1837
1843
|
var Ln = 1, Qe = 2, qn = 3, $n = 4, Ce = 5;
|
|
1838
1844
|
function ja(e, t, n, i, r, o, a, l) {
|
|
1839
|
-
var s, u = 0, d = null, c = !1,
|
|
1845
|
+
var s, u = 0, d = null, c = !1, p = !1, f = i !== -1, v = -1, h = xa(Te(e, 0)) && _a(Te(e, e.length - 1));
|
|
1840
1846
|
if (t || a)
|
|
1841
1847
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
1842
1848
|
if (u = Te(e, s), !Fe(u))
|
|
@@ -1846,25 +1852,25 @@ function ja(e, t, n, i, r, o, a, l) {
|
|
|
1846
1852
|
else {
|
|
1847
1853
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
1848
1854
|
if (u = Te(e, s), u === Me)
|
|
1849
|
-
c = !0,
|
|
1850
|
-
s -
|
|
1855
|
+
c = !0, f && (p = p || // Foldable line = too long, and not more-indented.
|
|
1856
|
+
s - v - 1 > i && e[v + 1] !== " ", v = s);
|
|
1851
1857
|
else if (!Fe(u))
|
|
1852
1858
|
return Ce;
|
|
1853
1859
|
h = h && Ot(u, d, l), d = u;
|
|
1854
1860
|
}
|
|
1855
|
-
|
|
1861
|
+
p = p || f && s - v - 1 > i && e[v + 1] !== " ";
|
|
1856
1862
|
}
|
|
1857
|
-
return !c && !
|
|
1863
|
+
return !c && !p ? h && !a && !r(e) ? Ln : o === Ee ? Ce : Qe : n > 9 && Fn(e) ? Ce : a ? o === Ee ? Ce : Qe : p ? $n : qn;
|
|
1858
1864
|
}
|
|
1859
1865
|
function Ta(e, t, n, i, r) {
|
|
1860
1866
|
e.dump = function() {
|
|
1861
1867
|
if (t.length === 0)
|
|
1862
1868
|
return e.quotingType === Ee ? '""' : "''";
|
|
1863
|
-
if (!e.noCompatMode && (ba.indexOf(t) !== -1 ||
|
|
1869
|
+
if (!e.noCompatMode && (ba.indexOf(t) !== -1 || wa.test(t)))
|
|
1864
1870
|
return e.quotingType === Ee ? '"' + t + '"' : "'" + t + "'";
|
|
1865
1871
|
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = i || e.flowLevel > -1 && n >= e.flowLevel;
|
|
1866
1872
|
function s(u) {
|
|
1867
|
-
return
|
|
1873
|
+
return Ia(e, u);
|
|
1868
1874
|
}
|
|
1869
1875
|
switch (ja(
|
|
1870
1876
|
t,
|
|
@@ -1950,7 +1956,7 @@ function Ea(e, t, n) {
|
|
|
1950
1956
|
e.tag = r, e.dump = "{" + i + "}";
|
|
1951
1957
|
}
|
|
1952
1958
|
function Fa(e, t, n, i) {
|
|
1953
|
-
var r = "", o = e.tag, a = Object.keys(n), l, s, u, d, c,
|
|
1959
|
+
var r = "", o = e.tag, a = Object.keys(n), l, s, u, d, c, p;
|
|
1954
1960
|
if (e.sortKeys === !0)
|
|
1955
1961
|
a.sort();
|
|
1956
1962
|
else if (typeof e.sortKeys == "function")
|
|
@@ -1958,7 +1964,7 @@ function Fa(e, t, n, i) {
|
|
|
1958
1964
|
else if (e.sortKeys)
|
|
1959
1965
|
throw new ie("sortKeys must be a boolean or a function");
|
|
1960
1966
|
for (l = 0, s = a.length; l < s; l += 1)
|
|
1961
|
-
|
|
1967
|
+
p = "", (!i || r !== "") && (p += Ze(e, t)), u = a[l], d = n[u], e.replacer && (d = e.replacer.call(n, u, d)), ue(e, t + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Me === e.dump.charCodeAt(0) ? p += "?" : p += "? "), p += e.dump, c && (p += Ze(e, t)), ue(e, t + 1, d, !0, c) && (e.dump && Me === e.dump.charCodeAt(0) ? p += ":" : p += ": ", p += e.dump, r += p));
|
|
1962
1968
|
e.tag = o, e.dump = r || "{}";
|
|
1963
1969
|
}
|
|
1964
1970
|
function qt(e, t, n) {
|
|
@@ -1982,14 +1988,14 @@ function ue(e, t, n, i, r, o, a) {
|
|
|
1982
1988
|
e.tag = null, e.dump = n, qt(e, n, !1) || qt(e, n, !0);
|
|
1983
1989
|
var l = _n.call(e.dump), s = i, u;
|
|
1984
1990
|
i && (i = e.flowLevel < 0 || e.flowLevel > t);
|
|
1985
|
-
var d = l === "[object Object]" || l === "[object Array]", c,
|
|
1986
|
-
if (d && (c = e.duplicates.indexOf(n),
|
|
1991
|
+
var d = l === "[object Object]" || l === "[object Array]", c, p;
|
|
1992
|
+
if (d && (c = e.duplicates.indexOf(n), p = c !== -1), (e.tag !== null && e.tag !== "?" || p || e.indent !== 2 && t > 0) && (r = !1), p && e.usedDuplicates[c])
|
|
1987
1993
|
e.dump = "*ref_" + c;
|
|
1988
1994
|
else {
|
|
1989
|
-
if (d &&
|
|
1990
|
-
i && Object.keys(e.dump).length !== 0 ? (Fa(e, t, e.dump, r),
|
|
1995
|
+
if (d && p && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), l === "[object Object]")
|
|
1996
|
+
i && Object.keys(e.dump).length !== 0 ? (Fa(e, t, e.dump, r), p && (e.dump = "&ref_" + c + e.dump)) : (Ea(e, t, e.dump), p && (e.dump = "&ref_" + c + " " + e.dump));
|
|
1991
1997
|
else if (l === "[object Array]")
|
|
1992
|
-
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Lt(e, t - 1, e.dump, r) : Lt(e, t, e.dump, r),
|
|
1998
|
+
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Lt(e, t - 1, e.dump, r) : Lt(e, t, e.dump, r), p && (e.dump = "&ref_" + c + e.dump)) : (Ma(e, t, e.dump), p && (e.dump = "&ref_" + c + " " + e.dump));
|
|
1993
1999
|
else if (l === "[object String]")
|
|
1994
2000
|
e.tag !== "?" && Ta(e, e.dump, t, o, s);
|
|
1995
2001
|
else {
|
|
@@ -2037,7 +2043,7 @@ function pt(e, t) {
|
|
|
2037
2043
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2038
2044
|
};
|
|
2039
2045
|
}
|
|
2040
|
-
var Ra = Q, Ua = Qt, Ba = nn, Pa = sn, Da = cn, Va = st, za =
|
|
2046
|
+
var Ra = Q, Ua = Qt, Ba = nn, Pa = sn, Da = cn, Va = st, za = xn.load, Ha = xn.loadAll, Wa = Ka.dump, Ya = ie, Ja = {
|
|
2041
2047
|
binary: gn,
|
|
2042
2048
|
float: ln,
|
|
2043
2049
|
map: tn,
|
|
@@ -2094,7 +2100,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2094
2100
|
]);
|
|
2095
2101
|
};
|
|
2096
2102
|
}
|
|
2097
|
-
}),
|
|
2103
|
+
}), xe = "24px", ft = (e, t) => {
|
|
2098
2104
|
const n = e.__vccOpts || e;
|
|
2099
2105
|
for (const [i, r] of t)
|
|
2100
2106
|
n[i] = r;
|
|
@@ -2136,7 +2142,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2136
2142
|
size: {
|
|
2137
2143
|
type: [Number, String],
|
|
2138
2144
|
required: !1,
|
|
2139
|
-
default:
|
|
2145
|
+
default: xe,
|
|
2140
2146
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2141
2147
|
validator: (e) => {
|
|
2142
2148
|
if (typeof e == "number" && e > 0)
|
|
@@ -2165,7 +2171,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2165
2171
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
2166
2172
|
return `${o}px`;
|
|
2167
2173
|
}
|
|
2168
|
-
return
|
|
2174
|
+
return xe;
|
|
2169
2175
|
}), i = j(() => ({
|
|
2170
2176
|
boxSizing: "border-box",
|
|
2171
2177
|
color: t.color,
|
|
@@ -2180,7 +2186,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2180
2186
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
2181
2187
|
style: nt(i.value)
|
|
2182
2188
|
}, {
|
|
2183
|
-
default:
|
|
2189
|
+
default: w(() => [
|
|
2184
2190
|
(A(), L("svg", {
|
|
2185
2191
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2186
2192
|
"data-testid": "kui-icon-svg-add-icon",
|
|
@@ -2235,7 +2241,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2235
2241
|
size: {
|
|
2236
2242
|
type: [Number, String],
|
|
2237
2243
|
required: !1,
|
|
2238
|
-
default:
|
|
2244
|
+
default: xe,
|
|
2239
2245
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2240
2246
|
validator: (e) => {
|
|
2241
2247
|
if (typeof e == "number" && e > 0)
|
|
@@ -2264,7 +2270,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2264
2270
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
2265
2271
|
return `${o}px`;
|
|
2266
2272
|
}
|
|
2267
|
-
return
|
|
2273
|
+
return xe;
|
|
2268
2274
|
}), i = j(() => ({
|
|
2269
2275
|
boxSizing: "border-box",
|
|
2270
2276
|
color: t.color,
|
|
@@ -2279,7 +2285,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2279
2285
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
2280
2286
|
style: nt(i.value)
|
|
2281
2287
|
}, {
|
|
2282
|
-
default:
|
|
2288
|
+
default: w(() => [
|
|
2283
2289
|
(A(), L("svg", {
|
|
2284
2290
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2285
2291
|
"data-testid": "kui-icon-svg-chevron-down-icon",
|
|
@@ -2334,7 +2340,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2334
2340
|
size: {
|
|
2335
2341
|
type: [Number, String],
|
|
2336
2342
|
required: !1,
|
|
2337
|
-
default:
|
|
2343
|
+
default: xe,
|
|
2338
2344
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2339
2345
|
validator: (e) => {
|
|
2340
2346
|
if (typeof e == "number" && e > 0)
|
|
@@ -2363,7 +2369,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2363
2369
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
2364
2370
|
return `${o}px`;
|
|
2365
2371
|
}
|
|
2366
|
-
return
|
|
2372
|
+
return xe;
|
|
2367
2373
|
}), i = j(() => ({
|
|
2368
2374
|
boxSizing: "border-box",
|
|
2369
2375
|
color: t.color,
|
|
@@ -2378,7 +2384,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2378
2384
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
2379
2385
|
style: nt(i.value)
|
|
2380
2386
|
}, {
|
|
2381
|
-
default:
|
|
2387
|
+
default: w(() => [
|
|
2382
2388
|
(A(), L("svg", {
|
|
2383
2389
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2384
2390
|
"data-testid": "kui-icon-svg-close-icon",
|
|
@@ -2396,7 +2402,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2396
2402
|
_: 1
|
|
2397
2403
|
}, 8, ["aria-hidden", "style"]));
|
|
2398
2404
|
}
|
|
2399
|
-
}),
|
|
2405
|
+
}), wo = /* @__PURE__ */ ft(bo, [["__scopeId", "data-v-19f4cbbe"]]), ko = {
|
|
2400
2406
|
class: "form-actions",
|
|
2401
2407
|
"data-testid": "form-actions"
|
|
2402
2408
|
}, Co = /* @__PURE__ */ re({
|
|
@@ -2456,18 +2462,18 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2456
2462
|
var n;
|
|
2457
2463
|
const i = t, r = e, o = Dt(), { i18n: { t: a } } = ve.useI18n(), { getMessageFromError: l } = ve.useErrors(), { axiosInstance: s } = ve.useAxios({
|
|
2458
2464
|
headers: (n = r.config) == null ? void 0 : n.requestHeaders
|
|
2459
|
-
}), u = N(!1), d = N(!1), c = N(""),
|
|
2465
|
+
}), u = N(!1), d = N(!1), c = N(""), p = j(() => r.canSubmit === !1 || r.isReadonly), f = N(!1), v = j(() => {
|
|
2460
2466
|
var m, g;
|
|
2461
2467
|
let k = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2462
2468
|
return r.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((m = r.config) == null ? void 0 : m.controlPlaneId) || "") : r.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (g = r.config) != null && g.workspace ? `/${r.config.workspace}` : "")), r.editId ? (k = k.replace(/{id}/gi, r.editId), k) : (k = k.replace(/\/{id}/gi, ""), k);
|
|
2463
2469
|
}), h = () => {
|
|
2464
|
-
|
|
2465
|
-
},
|
|
2470
|
+
f.value = !f.value;
|
|
2471
|
+
}, x = () => {
|
|
2466
2472
|
r.config.cancelRoute ? o.push(r.config.cancelRoute) : M();
|
|
2467
2473
|
}, M = () => {
|
|
2468
2474
|
i("cancel");
|
|
2469
2475
|
}, C = () => {
|
|
2470
|
-
|
|
2476
|
+
p.value || i("submit");
|
|
2471
2477
|
}, te = N([
|
|
2472
2478
|
{
|
|
2473
2479
|
title: a("baseForm.configuration.yaml"),
|
|
@@ -2484,7 +2490,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2484
2490
|
if (r.editId)
|
|
2485
2491
|
try {
|
|
2486
2492
|
d.value = !1, u.value = !0;
|
|
2487
|
-
const { data: m } = await s.get(
|
|
2493
|
+
const { data: m } = await s.get(v.value);
|
|
2488
2494
|
i("fetch:success", m);
|
|
2489
2495
|
} catch (m) {
|
|
2490
2496
|
const g = l(m);
|
|
@@ -2493,9 +2499,9 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2493
2499
|
u.value = !1;
|
|
2494
2500
|
}
|
|
2495
2501
|
}), (m, g) => {
|
|
2496
|
-
const k = $("KSkeleton"), E = $("KEmptyState"), R = $("KAlert"),
|
|
2502
|
+
const k = $("KSkeleton"), E = $("KEmptyState"), R = $("KAlert"), I = $("KButton"), J = $("KTabs"), U = $("KSlideout"), q = $("KCard");
|
|
2497
2503
|
return A(), H(q, { class: "kong-ui-entity-base-form" }, {
|
|
2498
|
-
default:
|
|
2504
|
+
default: w(() => [
|
|
2499
2505
|
u.value ? (A(), H(k, {
|
|
2500
2506
|
key: 0,
|
|
2501
2507
|
type: "form"
|
|
@@ -2504,9 +2510,9 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2504
2510
|
"action-button-text": y(a)("baseForm.actions.back"),
|
|
2505
2511
|
"data-testid": "form-fetch-error",
|
|
2506
2512
|
"icon-variant": "error",
|
|
2507
|
-
onClickAction:
|
|
2513
|
+
onClickAction: x
|
|
2508
2514
|
}, {
|
|
2509
|
-
default:
|
|
2515
|
+
default: w(() => [
|
|
2510
2516
|
K("h3", null, F(c.value), 1)
|
|
2511
2517
|
]),
|
|
2512
2518
|
_: 1
|
|
@@ -2523,36 +2529,36 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2523
2529
|
"data-testid": "form-error",
|
|
2524
2530
|
message: e.errorMessage
|
|
2525
2531
|
}, null, 8, ["message"])) : X("", !0),
|
|
2526
|
-
K("div",
|
|
2532
|
+
K("div", ko, [
|
|
2527
2533
|
oe(m.$slots, "form-actions", {}, () => [
|
|
2528
|
-
_(
|
|
2534
|
+
_(I, {
|
|
2529
2535
|
appearance: "tertiary",
|
|
2530
2536
|
"data-testid": "form-view-configuration",
|
|
2531
2537
|
onClick: g[0] || (g[0] = (G) => h())
|
|
2532
2538
|
}, {
|
|
2533
|
-
default:
|
|
2539
|
+
default: w(() => [
|
|
2534
2540
|
Z(F(y(a)("baseForm.actions.viewConfiguration")), 1)
|
|
2535
2541
|
]),
|
|
2536
2542
|
_: 1
|
|
2537
2543
|
}),
|
|
2538
|
-
_(
|
|
2544
|
+
_(I, {
|
|
2539
2545
|
appearance: "secondary",
|
|
2540
2546
|
"data-testid": "form-cancel",
|
|
2541
2547
|
disabled: e.isReadonly,
|
|
2542
2548
|
type: "reset"
|
|
2543
2549
|
}, {
|
|
2544
|
-
default:
|
|
2550
|
+
default: w(() => [
|
|
2545
2551
|
Z(F(y(a)("baseForm.actions.cancel")), 1)
|
|
2546
2552
|
]),
|
|
2547
2553
|
_: 1
|
|
2548
2554
|
}, 8, ["disabled"]),
|
|
2549
|
-
_(
|
|
2555
|
+
_(I, {
|
|
2550
2556
|
appearance: "primary",
|
|
2551
2557
|
"data-testid": "form-submit",
|
|
2552
|
-
disabled:
|
|
2558
|
+
disabled: p.value,
|
|
2553
2559
|
type: "submit"
|
|
2554
2560
|
}, {
|
|
2555
|
-
default:
|
|
2561
|
+
default: w(() => [
|
|
2556
2562
|
Z(F(y(a)("baseForm.actions.save")), 1)
|
|
2557
2563
|
]),
|
|
2558
2564
|
_: 1
|
|
@@ -2566,24 +2572,24 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2566
2572
|
"has-overlay": !1,
|
|
2567
2573
|
"offset-top": 60,
|
|
2568
2574
|
title: y(a)("baseForm.configuration.title"),
|
|
2569
|
-
visible:
|
|
2575
|
+
visible: f.value,
|
|
2570
2576
|
onClose: g[1] || (g[1] = (G) => h())
|
|
2571
2577
|
}, {
|
|
2572
|
-
default:
|
|
2578
|
+
default: w(() => [
|
|
2573
2579
|
K("div", null, F(y(a)("baseForm.configuration.message")), 1),
|
|
2574
2580
|
_(J, {
|
|
2575
2581
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
2576
2582
|
tabs: te.value
|
|
2577
2583
|
}, {
|
|
2578
|
-
json:
|
|
2584
|
+
json: w(() => [
|
|
2579
2585
|
_(Ei, {
|
|
2580
2586
|
config: e.config,
|
|
2581
|
-
"fetcher-url":
|
|
2587
|
+
"fetcher-url": v.value,
|
|
2582
2588
|
"json-record": r.formFields,
|
|
2583
2589
|
"request-method": r.editId ? "put" : "post"
|
|
2584
2590
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
2585
2591
|
]),
|
|
2586
|
-
yaml:
|
|
2592
|
+
yaml: w(() => [
|
|
2587
2593
|
_(to, {
|
|
2588
2594
|
"yaml-record": r.formFields
|
|
2589
2595
|
}, null, 8, ["yaml-record"])
|
|
@@ -2601,7 +2607,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2601
2607
|
}), So = /* @__PURE__ */ _e(Co, [["__scopeId", "data-v-1d932d98"]]), Ao = {
|
|
2602
2608
|
key: 0,
|
|
2603
2609
|
"data-testid": "first-col"
|
|
2604
|
-
},
|
|
2610
|
+
}, Io = /* @__PURE__ */ re({
|
|
2605
2611
|
__name: "EntityBaseTableCell",
|
|
2606
2612
|
props: {
|
|
2607
2613
|
keyName: {
|
|
@@ -2621,36 +2627,36 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2621
2627
|
var h;
|
|
2622
2628
|
return ((h = n.value) == null ? void 0 : h.querySelector('[data-testid="first-col"]')) || null;
|
|
2623
2629
|
}), r = j(() => {
|
|
2624
|
-
var h,
|
|
2630
|
+
var h, x;
|
|
2625
2631
|
const M = (h = t.rowEl) == null ? void 0 : h.querySelectorAll("td");
|
|
2626
|
-
return M ? ((
|
|
2632
|
+
return M ? ((x = M[0]) == null ? void 0 : x.getAttribute("data-testid")) === t.keyName : !1;
|
|
2627
2633
|
});
|
|
2628
2634
|
let o;
|
|
2629
2635
|
const a = () => {
|
|
2630
2636
|
o && (o.disconnect(), o = void 0);
|
|
2631
2637
|
}, l = () => {
|
|
2632
|
-
var h,
|
|
2633
|
-
u.value = ((h = i.value) == null ? void 0 : h.getBoundingClientRect().width) || 0, d.value = ((
|
|
2634
|
-
}, s = N({}), u = N(0), d = N(0), c = N(""),
|
|
2635
|
-
|
|
2638
|
+
var h, x, M;
|
|
2639
|
+
u.value = ((h = i.value) == null ? void 0 : h.getBoundingClientRect().width) || 0, d.value = ((x = n.value) == null ? void 0 : x.clientWidth) || 0, c.value = ((M = s.value) == null ? void 0 : M.innerText) || "";
|
|
2640
|
+
}, s = N({}), u = N(0), d = N(0), c = N(""), p = j(() => [i.value, n.value]), f = he(
|
|
2641
|
+
p,
|
|
2636
2642
|
(h) => {
|
|
2637
2643
|
if (r.value && (a(), "ResizeObserver" in window && window)) {
|
|
2638
|
-
o = new ResizeObserver((
|
|
2644
|
+
o = new ResizeObserver((x) => {
|
|
2639
2645
|
window.requestAnimationFrame(() => {
|
|
2640
|
-
!Array.isArray(
|
|
2646
|
+
!Array.isArray(x) || !x.length || l();
|
|
2641
2647
|
});
|
|
2642
2648
|
});
|
|
2643
|
-
for (const
|
|
2644
|
-
|
|
2649
|
+
for (const x of h)
|
|
2650
|
+
x && o.observe(x);
|
|
2645
2651
|
}
|
|
2646
2652
|
},
|
|
2647
2653
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
2648
|
-
),
|
|
2654
|
+
), v = j(() => r.value ? u.value > d.value : !1);
|
|
2649
2655
|
return zn(() => {
|
|
2650
2656
|
l();
|
|
2651
2657
|
}), Hn(() => {
|
|
2652
|
-
|
|
2653
|
-
}), (h,
|
|
2658
|
+
f();
|
|
2659
|
+
}), (h, x) => {
|
|
2654
2660
|
const M = $("KTooltip");
|
|
2655
2661
|
return A(), L("span", {
|
|
2656
2662
|
ref_key: "contentRef",
|
|
@@ -2661,9 +2667,9 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2661
2667
|
_(M, {
|
|
2662
2668
|
"max-width": "300",
|
|
2663
2669
|
placement: "bottomStart",
|
|
2664
|
-
text:
|
|
2670
|
+
text: v.value ? c.value : ""
|
|
2665
2671
|
}, {
|
|
2666
|
-
default:
|
|
2672
|
+
default: w(() => [
|
|
2667
2673
|
oe(h.$slots, "default", {}, void 0, !0)
|
|
2668
2674
|
]),
|
|
2669
2675
|
_: 3
|
|
@@ -2672,7 +2678,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2672
2678
|
], 512);
|
|
2673
2679
|
};
|
|
2674
2680
|
}
|
|
2675
|
-
}),
|
|
2681
|
+
}), xo = /* @__PURE__ */ _e(Io, [["__scopeId", "data-v-c4379fd4"]]), _o = { class: "toolbar-container" }, jo = {
|
|
2676
2682
|
key: 0,
|
|
2677
2683
|
class: "toolbar-button-container"
|
|
2678
2684
|
}, To = ["data-testid"], No = /* @__PURE__ */ re({
|
|
@@ -2816,7 +2822,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2816
2822
|
}), d = N({}), c = (g) => {
|
|
2817
2823
|
var k;
|
|
2818
2824
|
return (k = d.value) == null ? void 0 : k.$el.querySelector(`[data-rowid="${g.id}"]`);
|
|
2819
|
-
},
|
|
2825
|
+
}, p = (g) => {
|
|
2820
2826
|
const k = {
|
|
2821
2827
|
"data-testid": g.headerKey,
|
|
2822
2828
|
...n.cellAttributes(g)
|
|
@@ -2826,13 +2832,13 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2826
2832
|
overflowX: "hidden",
|
|
2827
2833
|
textOverflow: "ellipsis"
|
|
2828
2834
|
}), k;
|
|
2829
|
-
},
|
|
2830
|
-
i("empty-state-cta-clicked"),
|
|
2831
|
-
},
|
|
2835
|
+
}, f = () => {
|
|
2836
|
+
i("empty-state-cta-clicked"), v();
|
|
2837
|
+
}, v = () => {
|
|
2832
2838
|
i("clear-search-input");
|
|
2833
2839
|
}, h = j(() => n.disableRowClick ? void 0 : (g, k) => {
|
|
2834
2840
|
i("click:row", k);
|
|
2835
|
-
}),
|
|
2841
|
+
}), x = (g) => {
|
|
2836
2842
|
i("sort", g);
|
|
2837
2843
|
}, { setTablePreferences: M, getTablePreferences: C } = ri(), te = j(() => {
|
|
2838
2844
|
const g = C(n.preferencesStorageKey);
|
|
@@ -2844,17 +2850,17 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2844
2850
|
n.preferencesStorageKey && M(n.preferencesStorageKey, g);
|
|
2845
2851
|
};
|
|
2846
2852
|
return (g, k) => {
|
|
2847
|
-
const E = $("KIcon"), R = $("KButton"),
|
|
2853
|
+
const E = $("KIcon"), R = $("KButton"), I = $("KDropdown"), J = $("KTable"), U = $("KCard");
|
|
2848
2854
|
return A(), H(U, {
|
|
2849
2855
|
class: "kong-ui-entity-base-table",
|
|
2850
2856
|
title: e.title
|
|
2851
2857
|
}, {
|
|
2852
|
-
default:
|
|
2858
|
+
default: w(() => [
|
|
2853
2859
|
_(J, {
|
|
2854
2860
|
ref_key: "tableRefs",
|
|
2855
2861
|
ref: d,
|
|
2856
2862
|
"cache-identifier": a.value,
|
|
2857
|
-
"cell-attrs":
|
|
2863
|
+
"cell-attrs": p,
|
|
2858
2864
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
2859
2865
|
"disable-sorting": e.disableSorting,
|
|
2860
2866
|
"empty-state-action-message": e.query ? y(r)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
@@ -2875,12 +2881,12 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2875
2881
|
"pagination-type": e.paginationType,
|
|
2876
2882
|
"row-attrs": u,
|
|
2877
2883
|
"search-input": e.query,
|
|
2878
|
-
onKtableEmptyStateCtaClicked:
|
|
2884
|
+
onKtableEmptyStateCtaClicked: f,
|
|
2879
2885
|
"onRow:click": h.value,
|
|
2880
|
-
onSort: k[0] || (k[0] = (q) =>
|
|
2886
|
+
onSort: k[0] || (k[0] = (q) => x(q)),
|
|
2881
2887
|
"onUpdate:tablePreferences": m
|
|
2882
2888
|
}, Rt({
|
|
2883
|
-
toolbar:
|
|
2889
|
+
toolbar: w(({ state: q }) => [
|
|
2884
2890
|
pe(K("div", _o, [
|
|
2885
2891
|
oe(g.$slots, "toolbar-filter", {}, void 0, !0),
|
|
2886
2892
|
g.$slots["toolbar-button"] ? (A(), L("div", jo, [
|
|
@@ -2890,29 +2896,29 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2890
2896
|
[fe, l(q)]
|
|
2891
2897
|
])
|
|
2892
2898
|
]),
|
|
2893
|
-
actions:
|
|
2899
|
+
actions: w(({ row: q, rowKey: G, rowValue: de }) => [
|
|
2894
2900
|
K("div", {
|
|
2895
2901
|
class: "actions-container",
|
|
2896
2902
|
"data-testid": q.name
|
|
2897
2903
|
}, [
|
|
2898
|
-
_(
|
|
2904
|
+
_(I, {
|
|
2899
2905
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
2900
2906
|
width: e.dropdownMenuWidth
|
|
2901
2907
|
}, {
|
|
2902
|
-
items:
|
|
2908
|
+
items: w(() => [
|
|
2903
2909
|
oe(g.$slots, "actions", {
|
|
2904
2910
|
row: q,
|
|
2905
2911
|
rowKey: G,
|
|
2906
2912
|
rowValue: de
|
|
2907
2913
|
}, void 0, !0)
|
|
2908
2914
|
]),
|
|
2909
|
-
default:
|
|
2915
|
+
default: w(() => [
|
|
2910
2916
|
_(R, {
|
|
2911
2917
|
class: "actions-trigger",
|
|
2912
2918
|
"data-testid": "overflow-actions-button",
|
|
2913
2919
|
size: "small"
|
|
2914
2920
|
}, {
|
|
2915
|
-
icon:
|
|
2921
|
+
icon: w(() => [
|
|
2916
2922
|
_(E, {
|
|
2917
2923
|
color: y(Ti),
|
|
2918
2924
|
icon: "more",
|
|
@@ -2930,15 +2936,15 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2930
2936
|
}, [
|
|
2931
2937
|
tt(e.tableHeaders, (q, G) => ({
|
|
2932
2938
|
name: G,
|
|
2933
|
-
fn:
|
|
2934
|
-
_(
|
|
2939
|
+
fn: w(({ row: de, rowKey: we, rowValue: se }) => [
|
|
2940
|
+
_(xo, {
|
|
2935
2941
|
"key-name": String(G),
|
|
2936
2942
|
"row-el": c(de)
|
|
2937
2943
|
}, {
|
|
2938
|
-
default:
|
|
2944
|
+
default: w(() => [
|
|
2939
2945
|
oe(g.$slots, G, {
|
|
2940
2946
|
row: de,
|
|
2941
|
-
rowKey:
|
|
2947
|
+
rowKey: we,
|
|
2942
2948
|
rowValue: se
|
|
2943
2949
|
}, () => [
|
|
2944
2950
|
Z(F(se), 1)
|
|
@@ -2950,7 +2956,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
2950
2956
|
})),
|
|
2951
2957
|
e.query ? void 0 : {
|
|
2952
2958
|
name: "empty-state-action-icon",
|
|
2953
|
-
fn:
|
|
2959
|
+
fn: w(() => [
|
|
2954
2960
|
_(y(lo))
|
|
2955
2961
|
]),
|
|
2956
2962
|
key: "0"
|
|
@@ -3024,10 +3030,10 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3024
3030
|
onCancel: a,
|
|
3025
3031
|
onProceed: l
|
|
3026
3032
|
}, {
|
|
3027
|
-
default:
|
|
3033
|
+
default: w(() => [
|
|
3028
3034
|
e.error ? (A(), L("div", Mo, [
|
|
3029
3035
|
_(d, { appearance: "danger" }, {
|
|
3030
|
-
default:
|
|
3036
|
+
default: w(() => [
|
|
3031
3037
|
Z(F(e.error), 1)
|
|
3032
3038
|
]),
|
|
3033
3039
|
_: 1
|
|
@@ -3038,14 +3044,14 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3038
3044
|
keypath: i.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3039
3045
|
tag: "p"
|
|
3040
3046
|
}, Rt({
|
|
3041
|
-
entityType:
|
|
3047
|
+
entityType: w(() => [
|
|
3042
3048
|
Z(F(i.entityType), 1)
|
|
3043
3049
|
]),
|
|
3044
3050
|
_: 2
|
|
3045
3051
|
}, [
|
|
3046
3052
|
i.entityName ? {
|
|
3047
3053
|
name: "entityName",
|
|
3048
|
-
fn:
|
|
3054
|
+
fn: w(() => [
|
|
3049
3055
|
K("strong", null, F(i.entityName), 1)
|
|
3050
3056
|
]),
|
|
3051
3057
|
key: "0"
|
|
@@ -3145,17 +3151,17 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3145
3151
|
o.value = !o.value;
|
|
3146
3152
|
}, c = (m) => {
|
|
3147
3153
|
l.value.has(m) ? l.value.delete(m) : l.value.add(m);
|
|
3148
|
-
},
|
|
3154
|
+
}, p = (m) => {
|
|
3149
3155
|
r("update:modelValue", m);
|
|
3150
|
-
},
|
|
3151
|
-
|
|
3152
|
-
},
|
|
3156
|
+
}, f = () => {
|
|
3157
|
+
p("");
|
|
3158
|
+
}, v = (m) => `filter-${m}`, h = (m) => {
|
|
3153
3159
|
var g, k;
|
|
3154
3160
|
return (((k = (g = i.config.schema) == null ? void 0 : g[m]) == null ? void 0 : k.values) ?? []).map((E) => ({
|
|
3155
3161
|
value: E,
|
|
3156
3162
|
label: E
|
|
3157
3163
|
}));
|
|
3158
|
-
},
|
|
3164
|
+
}, x = (m) => {
|
|
3159
3165
|
var g, k;
|
|
3160
3166
|
return ((k = (g = i.config.schema) == null ? void 0 : g[m]) == null ? void 0 : k.type) ?? "text";
|
|
3161
3167
|
}, M = (m) => {
|
|
@@ -3178,15 +3184,15 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3178
3184
|
"data-testid": "search-input",
|
|
3179
3185
|
"model-value": e.modelValue,
|
|
3180
3186
|
placeholder: e.config.placeholder,
|
|
3181
|
-
"onUpdate:modelValue":
|
|
3187
|
+
"onUpdate:modelValue": p
|
|
3182
3188
|
}, {
|
|
3183
|
-
before:
|
|
3189
|
+
before: w(() => [
|
|
3184
3190
|
_($t)
|
|
3185
3191
|
]),
|
|
3186
|
-
after:
|
|
3187
|
-
pe(_(y(
|
|
3192
|
+
after: w(() => [
|
|
3193
|
+
pe(_(y(wo), {
|
|
3188
3194
|
class: "kong-ui-entity-filter-clear",
|
|
3189
|
-
onClick:
|
|
3195
|
+
onClick: f
|
|
3190
3196
|
}, null, 512), [
|
|
3191
3197
|
[fe, e.modelValue !== ""]
|
|
3192
3198
|
])
|
|
@@ -3198,7 +3204,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3198
3204
|
"data-testid": "filter-button",
|
|
3199
3205
|
onClick: d
|
|
3200
3206
|
}, {
|
|
3201
|
-
default:
|
|
3207
|
+
default: w(() => [
|
|
3202
3208
|
_($t),
|
|
3203
3209
|
Z(" " + F(y(n)("filter.filterButtonText")) + " " + F(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
3204
3210
|
]),
|
|
@@ -3211,52 +3217,52 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3211
3217
|
[fe, o.value]
|
|
3212
3218
|
]),
|
|
3213
3219
|
pe(K("div", Po, [
|
|
3214
|
-
(A(!0), L(Ut, null, tt(u.value, (
|
|
3220
|
+
(A(!0), L(Ut, null, tt(u.value, (I) => {
|
|
3215
3221
|
var J, U;
|
|
3216
3222
|
return A(), L("div", {
|
|
3217
|
-
key:
|
|
3223
|
+
key: I.value,
|
|
3218
3224
|
class: "kong-ui-entity-filter-menu-item",
|
|
3219
|
-
"data-testid":
|
|
3225
|
+
"data-testid": I.value
|
|
3220
3226
|
}, [
|
|
3221
3227
|
K("span", {
|
|
3222
|
-
class: Ne(["menu-item-title", { expanded: l.value.has(
|
|
3228
|
+
class: Ne(["menu-item-title", { expanded: l.value.has(I.value) }]),
|
|
3223
3229
|
role: "button",
|
|
3224
3230
|
tabindex: "0",
|
|
3225
|
-
onClick: (q) => c(
|
|
3226
|
-
onKeydown: Bn((q) => c(
|
|
3231
|
+
onClick: (q) => c(I.value),
|
|
3232
|
+
onKeydown: Bn((q) => c(I.value), ["enter"])
|
|
3227
3233
|
}, [
|
|
3228
|
-
Z(F(
|
|
3234
|
+
Z(F(I.label) + " ", 1),
|
|
3229
3235
|
pe(K("span", zo, null, 512), [
|
|
3230
|
-
[fe, s.value.includes(
|
|
3236
|
+
[fe, s.value.includes(I.value)]
|
|
3231
3237
|
]),
|
|
3232
3238
|
_(y(go), {
|
|
3233
|
-
class: Ne(["menu-item-expand-icon", { expanded: l.value.has(
|
|
3239
|
+
class: Ne(["menu-item-expand-icon", { expanded: l.value.has(I.value) }]),
|
|
3234
3240
|
color: y(Ni)
|
|
3235
3241
|
}, null, 8, ["class", "color"])
|
|
3236
3242
|
], 42, Vo),
|
|
3237
3243
|
pe(K("div", Ho, [
|
|
3238
3244
|
K("label", {
|
|
3239
3245
|
class: "menu-item-label",
|
|
3240
|
-
for:
|
|
3246
|
+
for: v(I.value)
|
|
3241
3247
|
}, F(y(n)("filter.fieldLabel")), 9, Wo),
|
|
3242
|
-
((U = (J = e.config.schema) == null ? void 0 : J[
|
|
3248
|
+
((U = (J = e.config.schema) == null ? void 0 : J[I.value]) == null ? void 0 : U.type) === "select" ? (A(), H(R, {
|
|
3243
3249
|
key: 0,
|
|
3244
|
-
id:
|
|
3245
|
-
modelValue: a.value[
|
|
3246
|
-
"onUpdate:modelValue": (q) => a.value[
|
|
3247
|
-
items: h(
|
|
3250
|
+
id: v(I.value),
|
|
3251
|
+
modelValue: a.value[I.value],
|
|
3252
|
+
"onUpdate:modelValue": (q) => a.value[I.value] = q,
|
|
3253
|
+
items: h(I.value),
|
|
3248
3254
|
placeholder: y(n)("filter.selectPlaceholder")
|
|
3249
3255
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (A(), H(k, {
|
|
3250
3256
|
key: 1,
|
|
3251
|
-
id:
|
|
3252
|
-
modelValue: a.value[
|
|
3253
|
-
"onUpdate:modelValue": (q) => a.value[
|
|
3257
|
+
id: v(I.value),
|
|
3258
|
+
modelValue: a.value[I.value],
|
|
3259
|
+
"onUpdate:modelValue": (q) => a.value[I.value] = q,
|
|
3254
3260
|
autocomplete: "off",
|
|
3255
3261
|
placeholder: y(n)("filter.inputPlaceholder"),
|
|
3256
|
-
type: I
|
|
3262
|
+
type: x(I.value)
|
|
3257
3263
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3258
3264
|
], 512), [
|
|
3259
|
-
[fe, l.value.has(
|
|
3265
|
+
[fe, l.value.has(I.value)]
|
|
3260
3266
|
]),
|
|
3261
3267
|
pe(K("div", Yo, [
|
|
3262
3268
|
_(E, {
|
|
@@ -3265,7 +3271,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3265
3271
|
size: "small",
|
|
3266
3272
|
onClick: g[0] || (g[0] = (q) => te(!0))
|
|
3267
3273
|
}, {
|
|
3268
|
-
default:
|
|
3274
|
+
default: w(() => [
|
|
3269
3275
|
Z(F(y(n)("filter.applyButtonText")), 1)
|
|
3270
3276
|
]),
|
|
3271
3277
|
_: 1
|
|
@@ -3274,15 +3280,15 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3274
3280
|
appearance: "tertiary",
|
|
3275
3281
|
"data-testid": "clear-filter",
|
|
3276
3282
|
size: "small",
|
|
3277
|
-
onClick: (q) => M(
|
|
3283
|
+
onClick: (q) => M(I.value)
|
|
3278
3284
|
}, {
|
|
3279
|
-
default:
|
|
3285
|
+
default: w(() => [
|
|
3280
3286
|
Z(F(y(n)("filter.clearButtonText")), 1)
|
|
3281
3287
|
]),
|
|
3282
3288
|
_: 2
|
|
3283
3289
|
}, 1032, ["onClick"])
|
|
3284
3290
|
], 512), [
|
|
3285
|
-
[fe, l.value.has(
|
|
3291
|
+
[fe, l.value.has(I.value)]
|
|
3286
3292
|
])
|
|
3287
3293
|
], 8, Do);
|
|
3288
3294
|
}), 128)),
|
|
@@ -3292,7 +3298,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3292
3298
|
size: "small",
|
|
3293
3299
|
onClick: C
|
|
3294
3300
|
}, {
|
|
3295
|
-
default:
|
|
3301
|
+
default: w(() => [
|
|
3296
3302
|
Z(F(y(n)("filter.clearAllButtonText")), 1)
|
|
3297
3303
|
]),
|
|
3298
3304
|
_: 1
|
|
@@ -3393,7 +3399,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3393
3399
|
])
|
|
3394
3400
|
], 2));
|
|
3395
3401
|
}
|
|
3396
|
-
}), Kt = /* @__PURE__ */ _e(il, [["__scopeId", "data-v-3565daa7"]]), { useAxios: Kn, useDeleteUrlBuilder: rl, useErrors: al, useExternalLinkCreator:
|
|
3402
|
+
}), Kt = /* @__PURE__ */ _e(il, [["__scopeId", "data-v-3565daa7"]]), { useAxios: Kn, useDeleteUrlBuilder: rl, useErrors: al, useExternalLinkCreator: kl, useFetchUrlBuilder: Cl, useFetcher: ol, useDebouncedFilter: ll, useStringHelpers: Sl, useHelpers: Al, useGatewayFeatureSupported: Il, useTruncationDetector: xl } = ve, sl = { class: "kong-ui-entities-snis-list" }, cl = { key: 1 }, ul = { key: 1 }, dl = /* @__PURE__ */ re({
|
|
3397
3403
|
__name: "SniList",
|
|
3398
3404
|
props: {
|
|
3399
3405
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3454,7 +3460,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3454
3460
|
var D, W;
|
|
3455
3461
|
let T = `${i.config.apiBaseUrl}${je.list[i.config.app].all}`;
|
|
3456
3462
|
return i.config.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, ((D = i.config) == null ? void 0 : D.controlPlaneId) || "") : i.config.app === "kongManager" && (T = T.replace(/\/{workspace}/gi, (W = i.config) != null && W.workspace ? `/${i.config.workspace}` : "")), T;
|
|
3457
|
-
}),
|
|
3463
|
+
}), p = N(""), f = j(() => {
|
|
3458
3464
|
const T = i.config.app === "konnect" || i.config.isExactMatch;
|
|
3459
3465
|
if (T)
|
|
3460
3466
|
return {
|
|
@@ -3467,8 +3473,8 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3467
3473
|
fields: { name: D },
|
|
3468
3474
|
schema: i.config.filterSchema
|
|
3469
3475
|
};
|
|
3470
|
-
}), { fetcher:
|
|
3471
|
-
|
|
3476
|
+
}), { fetcher: v, fetcherState: h } = ol(i.config, c.value), x = () => {
|
|
3477
|
+
p.value = "";
|
|
3472
3478
|
}, M = () => {
|
|
3473
3479
|
a.value++;
|
|
3474
3480
|
}, C = N(null), te = N({
|
|
@@ -3507,26 +3513,26 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3507
3513
|
}, k = (T) => ({
|
|
3508
3514
|
label: r("actions.edit"),
|
|
3509
3515
|
to: i.config.getEditRoute(T)
|
|
3510
|
-
}), E = N(void 0), R = N(!1),
|
|
3516
|
+
}), E = N(void 0), R = N(!1), I = N(!1), J = N(""), U = rl(i.config, c.value), q = (T) => {
|
|
3511
3517
|
E.value = T, R.value = !0;
|
|
3512
3518
|
}, G = () => {
|
|
3513
3519
|
R.value = !1, E.value = void 0;
|
|
3514
3520
|
}, de = async () => {
|
|
3515
3521
|
var T, D, W;
|
|
3516
3522
|
if ((T = E.value) != null && T.id) {
|
|
3517
|
-
|
|
3523
|
+
I.value = !0;
|
|
3518
3524
|
try {
|
|
3519
|
-
await o.delete(U(E.value.id)), n("delete:success", E.value),
|
|
3525
|
+
await o.delete(U(E.value.id)), n("delete:success", E.value), I.value = !1, G(), a.value++;
|
|
3520
3526
|
} catch (S) {
|
|
3521
3527
|
J.value = ((W = (D = S.response) == null ? void 0 : D.data) == null ? void 0 : W.message) || S.message || r("errors.delete"), n("error", S);
|
|
3522
3528
|
} finally {
|
|
3523
|
-
|
|
3529
|
+
I.value = !1;
|
|
3524
3530
|
}
|
|
3525
3531
|
}
|
|
3526
|
-
},
|
|
3532
|
+
}, we = N(!0);
|
|
3527
3533
|
return he(h, (T) => {
|
|
3528
3534
|
var D, W, S, O;
|
|
3529
|
-
if (Array.isArray((D = T == null ? void 0 : T.response) == null ? void 0 : D.data) && (
|
|
3535
|
+
if (Array.isArray((D = T == null ? void 0 : T.response) == null ? void 0 : D.data) && (we.value = T.response.data.length > 0), T.status === ye.Error) {
|
|
3530
3536
|
C.value = {
|
|
3531
3537
|
title: r("errors.general")
|
|
3532
3538
|
}, (O = (S = (W = T.error) == null ? void 0 : W.response) == null ? void 0 : S.data) != null && O.message && (C.value.message = T.error.response.data.message), n("error", T.error);
|
|
@@ -3547,32 +3553,32 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3547
3553
|
"empty-state-options": te.value,
|
|
3548
3554
|
"enable-entity-actions": "",
|
|
3549
3555
|
"error-message": C.value,
|
|
3550
|
-
fetcher: y(
|
|
3556
|
+
fetcher: y(v),
|
|
3551
3557
|
"fetcher-cache-key": a.value,
|
|
3552
3558
|
"pagination-type": "offset",
|
|
3553
3559
|
"preferences-storage-key": "kong-ui-entities-snis-list",
|
|
3554
|
-
query:
|
|
3560
|
+
query: p.value,
|
|
3555
3561
|
"table-headers": y(u),
|
|
3556
3562
|
"use-action-outside": e.useActionOutside,
|
|
3557
|
-
onClearSearchInput:
|
|
3563
|
+
onClearSearchInput: x,
|
|
3558
3564
|
onSort: M
|
|
3559
3565
|
}, {
|
|
3560
|
-
"toolbar-filter":
|
|
3566
|
+
"toolbar-filter": w(() => [
|
|
3561
3567
|
_(y(Zo), {
|
|
3562
|
-
modelValue:
|
|
3563
|
-
"onUpdate:modelValue": D[0] || (D[0] = (P) =>
|
|
3564
|
-
config:
|
|
3568
|
+
modelValue: p.value,
|
|
3569
|
+
"onUpdate:modelValue": D[0] || (D[0] = (P) => p.value = P),
|
|
3570
|
+
config: f.value
|
|
3565
3571
|
}, null, 8, ["modelValue", "config"])
|
|
3566
3572
|
]),
|
|
3567
|
-
"toolbar-button":
|
|
3573
|
+
"toolbar-button": w(() => [
|
|
3568
3574
|
(A(), H(Be(e.useActionOutside ? "Teleport" : "div"), {
|
|
3569
3575
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
3570
3576
|
}, {
|
|
3571
|
-
default:
|
|
3577
|
+
default: w(() => [
|
|
3572
3578
|
_(y(We), {
|
|
3573
3579
|
"auth-function": () => e.canCreate()
|
|
3574
3580
|
}, {
|
|
3575
|
-
default:
|
|
3581
|
+
default: w(() => [
|
|
3576
3582
|
pe(_(W, {
|
|
3577
3583
|
appearance: "primary",
|
|
3578
3584
|
"data-testid": "toolbar-add-sni",
|
|
@@ -3580,12 +3586,12 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3580
3586
|
size: "large",
|
|
3581
3587
|
to: e.config.createRoute
|
|
3582
3588
|
}, {
|
|
3583
|
-
default:
|
|
3589
|
+
default: w(() => [
|
|
3584
3590
|
Z(F(y(r)("snis.list.toolbar_actions.new")), 1)
|
|
3585
3591
|
]),
|
|
3586
3592
|
_: 1
|
|
3587
3593
|
}, 8, ["to"]), [
|
|
3588
|
-
[fe,
|
|
3594
|
+
[fe, we.value]
|
|
3589
3595
|
])
|
|
3590
3596
|
]),
|
|
3591
3597
|
_: 1
|
|
@@ -3594,10 +3600,10 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3594
3600
|
_: 1
|
|
3595
3601
|
}, 8, ["to"]))
|
|
3596
3602
|
]),
|
|
3597
|
-
name:
|
|
3603
|
+
name: w(({ rowValue: P }) => [
|
|
3598
3604
|
K("b", null, F(P ?? "-"), 1)
|
|
3599
3605
|
]),
|
|
3600
|
-
certificate:
|
|
3606
|
+
certificate: w(({ row: P }) => [
|
|
3601
3607
|
P.certificate && P.certificate.id ? (A(), H(S, {
|
|
3602
3608
|
key: 0,
|
|
3603
3609
|
class: "copy-certificate-uuid",
|
|
@@ -3606,15 +3612,15 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3606
3612
|
truncate: ""
|
|
3607
3613
|
}, null, 8, ["text"])) : (A(), L("span", cl, "-"))
|
|
3608
3614
|
]),
|
|
3609
|
-
tags:
|
|
3615
|
+
tags: w(({ rowValue: P }) => [
|
|
3610
3616
|
P != null && P.length ? (A(), H(V, { key: 0 }, {
|
|
3611
|
-
default:
|
|
3617
|
+
default: w(() => [
|
|
3612
3618
|
(A(!0), L(Ut, null, tt(P, (B) => (A(), H(O, {
|
|
3613
3619
|
key: B,
|
|
3614
3620
|
onClick: D[1] || (D[1] = Ye(() => {
|
|
3615
3621
|
}, ["stop"]))
|
|
3616
3622
|
}, {
|
|
3617
|
-
default:
|
|
3623
|
+
default: w(() => [
|
|
3618
3624
|
Z(F(B), 1)
|
|
3619
3625
|
]),
|
|
3620
3626
|
_: 2
|
|
@@ -3623,14 +3629,14 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3623
3629
|
_: 2
|
|
3624
3630
|
}, 1024)) : (A(), L("span", ul, "-"))
|
|
3625
3631
|
]),
|
|
3626
|
-
actions:
|
|
3632
|
+
actions: w(({ row: P }) => [
|
|
3627
3633
|
_(ne, null, {
|
|
3628
|
-
default:
|
|
3634
|
+
default: w(({ copyToClipboard: B }) => [
|
|
3629
3635
|
_(ce, {
|
|
3630
3636
|
"data-testid": "action-entity-copy-id",
|
|
3631
3637
|
onClick: (Un) => m(P, B)
|
|
3632
3638
|
}, {
|
|
3633
|
-
default:
|
|
3639
|
+
default: w(() => [
|
|
3634
3640
|
Z(F(y(r)("actions.copy_id")), 1)
|
|
3635
3641
|
]),
|
|
3636
3642
|
_: 2
|
|
@@ -3639,12 +3645,12 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3639
3645
|
_: 2
|
|
3640
3646
|
}, 1024),
|
|
3641
3647
|
_(ne, null, {
|
|
3642
|
-
default:
|
|
3648
|
+
default: w(({ copyToClipboard: B }) => [
|
|
3643
3649
|
_(ce, {
|
|
3644
3650
|
"data-testid": "action-entity-copy-json",
|
|
3645
3651
|
onClick: (Un) => g(P, B)
|
|
3646
3652
|
}, {
|
|
3647
|
-
default:
|
|
3653
|
+
default: w(() => [
|
|
3648
3654
|
Z(F(y(r)("actions.copy_json")), 1)
|
|
3649
3655
|
]),
|
|
3650
3656
|
_: 2
|
|
@@ -3655,7 +3661,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3655
3661
|
_(y(We), {
|
|
3656
3662
|
"auth-function": () => e.canEdit(P)
|
|
3657
3663
|
}, {
|
|
3658
|
-
default:
|
|
3664
|
+
default: w(() => [
|
|
3659
3665
|
_(ce, {
|
|
3660
3666
|
"data-testid": "action-entity-edit",
|
|
3661
3667
|
item: k(P.id)
|
|
@@ -3666,14 +3672,14 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3666
3672
|
_(y(We), {
|
|
3667
3673
|
"auth-function": () => e.canDelete(P)
|
|
3668
3674
|
}, {
|
|
3669
|
-
default:
|
|
3675
|
+
default: w(() => [
|
|
3670
3676
|
_(ce, {
|
|
3671
3677
|
danger: "",
|
|
3672
3678
|
"data-testid": "action-entity-delete",
|
|
3673
3679
|
"has-divider": "",
|
|
3674
3680
|
onClick: (B) => q(P)
|
|
3675
3681
|
}, {
|
|
3676
|
-
default:
|
|
3682
|
+
default: w(() => [
|
|
3677
3683
|
Z(F(y(r)("actions.delete")), 1)
|
|
3678
3684
|
]),
|
|
3679
3685
|
_: 2
|
|
@@ -3685,7 +3691,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3685
3691
|
_: 1
|
|
3686
3692
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "use-action-outside"]),
|
|
3687
3693
|
_(y(Lo), {
|
|
3688
|
-
"action-pending":
|
|
3694
|
+
"action-pending": I.value,
|
|
3689
3695
|
description: y(r)("delete.description"),
|
|
3690
3696
|
"entity-name": E.value && (E.value.name || E.value.id),
|
|
3691
3697
|
"entity-type": y(zt).SNI,
|
|
@@ -3737,16 +3743,16 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3737
3743
|
},
|
|
3738
3744
|
isReadonly: !1,
|
|
3739
3745
|
errorMessage: ""
|
|
3740
|
-
}),
|
|
3746
|
+
}), p = gt({
|
|
3741
3747
|
name: "",
|
|
3742
3748
|
tags: "",
|
|
3743
3749
|
certificate_id: ""
|
|
3744
|
-
}),
|
|
3750
|
+
}), f = j(() => JSON.stringify(c.fields) !== JSON.stringify(p) && !!c.fields.name && !!(c.fields.certificate_id || d.value)), v = (S) => {
|
|
3745
3751
|
var O, V;
|
|
3746
|
-
c.fields.name = (S == null ? void 0 : S.name) || "", c.fields.tags = ((O = S == null ? void 0 : S.tags) == null ? void 0 : O.join(", ")) || "", c.fields.certificate_id = ((V = S == null ? void 0 : S.certificate) == null ? void 0 : V.id) || "", Object.assign(
|
|
3752
|
+
c.fields.name = (S == null ? void 0 : S.name) || "", c.fields.tags = ((O = S == null ? void 0 : S.tags) == null ? void 0 : O.join(", ")) || "", c.fields.certificate_id = ((V = S == null ? void 0 : S.certificate) == null ? void 0 : V.id) || "", Object.assign(p, c.fields);
|
|
3747
3753
|
}, h = () => {
|
|
3748
3754
|
r.push(i.config.cancelRoute);
|
|
3749
|
-
},
|
|
3755
|
+
}, x = j(() => {
|
|
3750
3756
|
var O, V;
|
|
3751
3757
|
let S = `${i.config.apiBaseUrl}${je.form[i.config.app].validate}`;
|
|
3752
3758
|
return i.config.app === "konnect" ? S = S.replace(/{controlPlaneId}/gi, ((O = i.config) == null ? void 0 : O.controlPlaneId) || "") : i.config.app === "kongManager" && (S = S.replace(/\/{workspace}/gi, (V = i.config) != null && V.workspace ? `/${i.config.workspace}` : "")), S = S.replace(/{id}/gi, i.sniId), S;
|
|
@@ -3766,7 +3772,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3766
3772
|
try {
|
|
3767
3773
|
c.isReadonly = !0;
|
|
3768
3774
|
let B;
|
|
3769
|
-
await l.post(
|
|
3775
|
+
await l.post(x.value, C.value), u.value === "create" ? B = await l.post(M.value, C.value) : u.value === "edit" && (B = ((S = i.config) == null ? void 0 : S.app) === "konnect" ? await l.put(M.value, C.value) : await l.patch(M.value, C.value)), c.fields.name = ((O = B == null ? void 0 : B.data) == null ? void 0 : O.name) || "", c.fields.tags = ((ce = (V = B == null ? void 0 : B.data) == null ? void 0 : V.tags) == null ? void 0 : ce.join(", ")) || "", c.fields.certificate_id = ((P = (ne = B == null ? void 0 : B.data) == null ? void 0 : ne.certificate) == null ? void 0 : P.id) || "", Object.assign(p, c.fields), n("update", B == null ? void 0 : B.data);
|
|
3770
3776
|
} catch (B) {
|
|
3771
3777
|
c.errorMessage = a(B), n("error", B);
|
|
3772
3778
|
} finally {
|
|
@@ -3778,11 +3784,11 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3778
3784
|
allRecords: k,
|
|
3779
3785
|
error: E,
|
|
3780
3786
|
validationError: R,
|
|
3781
|
-
loadItems:
|
|
3787
|
+
loadItems: I,
|
|
3782
3788
|
results: J
|
|
3783
3789
|
} = ll(i.config, je.form[i.config.app].certificates), U = (S) => {
|
|
3784
3790
|
m(S);
|
|
3785
|
-
}, q = j(() => E.value ? o("errors.certificates.fetch") : ""), G = j(() => R.value ? o("errors.certificates.invalid") : ""), de = N(0),
|
|
3791
|
+
}, q = j(() => E.value ? o("errors.certificates.fetch") : ""), G = j(() => R.value ? o("errors.certificates.invalid") : ""), de = N(0), we = j(() => k.value === void 0), se = N(/* @__PURE__ */ new Set()), T = j(() => Array.from(se.value).map((O) => ({
|
|
3786
3792
|
label: O,
|
|
3787
3793
|
value: O,
|
|
3788
3794
|
selected: c.fields.certificate_id === O
|
|
@@ -3797,12 +3803,12 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3797
3803
|
}, { immediate: !0, deep: !0 }), he(T, () => {
|
|
3798
3804
|
de.value++;
|
|
3799
3805
|
}, { immediate: !0, deep: !0 }), et(async () => {
|
|
3800
|
-
await
|
|
3806
|
+
await I();
|
|
3801
3807
|
}), (S, O) => {
|
|
3802
3808
|
const V = $("KInput"), ce = $("KSelect");
|
|
3803
3809
|
return A(), L("div", pl, [
|
|
3804
3810
|
_(y(So), {
|
|
3805
|
-
"can-submit":
|
|
3811
|
+
"can-submit": f.value,
|
|
3806
3812
|
config: e.config,
|
|
3807
3813
|
"edit-id": e.sniId,
|
|
3808
3814
|
"error-message": c.errorMessage || q.value,
|
|
@@ -3811,16 +3817,16 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3811
3817
|
"is-readonly": c.isReadonly,
|
|
3812
3818
|
onCancel: h,
|
|
3813
3819
|
"onFetch:error": O[3] || (O[3] = (ne) => S.$emit("error", ne)),
|
|
3814
|
-
"onFetch:success":
|
|
3820
|
+
"onFetch:success": v,
|
|
3815
3821
|
onLoading: O[4] || (O[4] = (ne) => S.$emit("loading", ne)),
|
|
3816
3822
|
onSubmit: te
|
|
3817
3823
|
}, {
|
|
3818
|
-
default:
|
|
3824
|
+
default: w(() => [
|
|
3819
3825
|
_(y(Kt), {
|
|
3820
3826
|
description: y(o)("form.sections.general.description"),
|
|
3821
3827
|
title: y(o)("form.sections.general.title")
|
|
3822
3828
|
}, {
|
|
3823
|
-
default:
|
|
3829
|
+
default: w(() => [
|
|
3824
3830
|
_(V, {
|
|
3825
3831
|
modelValue: c.fields.name,
|
|
3826
3832
|
"onUpdate:modelValue": O[0] || (O[0] = (ne) => c.fields.name = ne),
|
|
@@ -3854,7 +3860,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3854
3860
|
"has-divider": "",
|
|
3855
3861
|
title: y(o)("form.sections.certificate.title")
|
|
3856
3862
|
}, {
|
|
3857
|
-
default:
|
|
3863
|
+
default: w(() => [
|
|
3858
3864
|
d.value ? (A(), H(V, {
|
|
3859
3865
|
key: 0,
|
|
3860
3866
|
"data-testid": "sni-form-certificate-id",
|
|
@@ -3869,7 +3875,7 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3869
3875
|
"onUpdate:modelValue": O[2] || (O[2] = (ne) => c.fields.certificate_id = ne),
|
|
3870
3876
|
clearable: "",
|
|
3871
3877
|
"data-testid": "sni-form-certificate-id",
|
|
3872
|
-
"dropdown-footer-text":
|
|
3878
|
+
"dropdown-footer-text": we.value ? y(o)("form.fields.certificate_id.footer") : void 0,
|
|
3873
3879
|
"enable-filtering": "",
|
|
3874
3880
|
"filter-function": () => !0,
|
|
3875
3881
|
items: T.value,
|
|
@@ -3881,10 +3887,10 @@ const eo = { class: "yaml-config" }, to = /* @__PURE__ */ re({
|
|
|
3881
3887
|
width: "100%",
|
|
3882
3888
|
onQueryChange: U
|
|
3883
3889
|
}, {
|
|
3884
|
-
loading:
|
|
3890
|
+
loading: w(() => [
|
|
3885
3891
|
K("div", null, F(y(o)("actions.loading")), 1)
|
|
3886
3892
|
]),
|
|
3887
|
-
empty:
|
|
3893
|
+
empty: w(() => [
|
|
3888
3894
|
K("div", fl, F(y(o)("search.no_results")), 1)
|
|
3889
3895
|
]),
|
|
3890
3896
|
_: 1
|