@kong-ui-public/entities-consumers 1.2.9 → 1.2.10
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-consumers.es.js +398 -398
- package/dist/entities-consumers.umd.js +22 -22
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as te, ref as E, computed as M, watch as ve, renderSlot as J, createCommentVNode as G, unref as g, useSlots as Ze, onBeforeMount as Qe, resolveComponent as L, openBlock as m, createBlock as D, createSlots as be, withCtx as y, createElementVNode as F, createTextVNode as W, toDisplayString as j, createVNode as O, createElementBlock as $, renderList as ce, Fragment as pe, normalizeClass as Ae, withModifiers as Ge, withDirectives as Ve, vShow as Ue, useCssVars as
|
|
1
|
+
import { defineComponent as te, ref as E, computed as M, watch as ve, renderSlot as J, createCommentVNode as G, unref as g, useSlots as Ze, onBeforeMount as Qe, resolveComponent as L, openBlock as m, createBlock as D, createSlots as be, withCtx as y, createElementVNode as F, createTextVNode as W, toDisplayString as j, createVNode as O, createElementBlock as $, renderList as ce, Fragment as pe, normalizeClass as Ae, withModifiers as Ge, withDirectives as Ve, vShow as Ue, useCssVars as la, resolveDynamicComponent as Ne, normalizeProps as sa, guardReactiveProps as ua, mergeProps as st, onMounted as ca, onUnmounted as da, normalizeStyle as pa, inject as fa, pushScopeId as ma, popScopeId as ga, reactive as Ft } from "vue";
|
|
2
2
|
import { useRouter as gt } from "vue-router";
|
|
3
3
|
import { createI18n as yt, i18nTComponent as rn } from "@kong-ui-public/i18n";
|
|
4
4
|
import ya from "axios";
|
|
@@ -134,7 +134,7 @@ const Xe = {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
|
-
var
|
|
137
|
+
var ln = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e))(ln || {}), ut = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ut || {}), we = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(we || {}), X = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(X || {}), ue = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ue || {});
|
|
138
138
|
function ht(e = {}) {
|
|
139
139
|
return {
|
|
140
140
|
axiosInstance: ya.create({
|
|
@@ -297,27 +297,27 @@ function Ea(e, n, t, a = {
|
|
|
297
297
|
t || (t = "100");
|
|
298
298
|
const { axiosInstance: o } = ht({
|
|
299
299
|
headers: e.requestHeaders
|
|
300
|
-
}), { i18n: { t: r } } = vt(), { debounce: i } = ka(),
|
|
300
|
+
}), { i18n: { t: r } } = vt(), { debounce: i } = ka(), l = i(async (v) => {
|
|
301
301
|
await I(v);
|
|
302
|
-
}, 200),
|
|
302
|
+
}, 200), s = E(!1), u = E(""), d = E(""), c = E([]), h = E(void 0), f = g(n);
|
|
303
303
|
let _ = `${e.apiBaseUrl}${f}`;
|
|
304
304
|
e.app === "konnect" ? _ = _.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (_ = _.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
305
305
|
const C = async () => {
|
|
306
306
|
try {
|
|
307
|
-
|
|
307
|
+
s.value = !0;
|
|
308
308
|
const { data: v } = await o.get(`${_}?size=${t}`);
|
|
309
309
|
v != null && v.next || (h.value = a.fetchedItemsKey in v ? v[a.fetchedItemsKey] : []), c.value = a.fetchedItemsKey in v ? v[a.fetchedItemsKey] : [];
|
|
310
310
|
} catch {
|
|
311
311
|
c.value = [], u.value = r("debouncedFilter.errors.fetch");
|
|
312
312
|
} finally {
|
|
313
|
-
|
|
313
|
+
s.value = !1;
|
|
314
314
|
}
|
|
315
315
|
}, p = E(""), I = async (v) => {
|
|
316
316
|
var b, K;
|
|
317
317
|
if (p.value !== v)
|
|
318
318
|
if (p.value = v || "", h.value === void 0)
|
|
319
319
|
try {
|
|
320
|
-
|
|
320
|
+
s.value = !0, u.value = "", d.value = "";
|
|
321
321
|
let w = _ + "";
|
|
322
322
|
v && (w += `/${v}`);
|
|
323
323
|
const { data: B } = await o.get(`${w}?size=${t}`);
|
|
@@ -325,10 +325,10 @@ function Ea(e, n, t, a = {
|
|
|
325
325
|
} catch (w) {
|
|
326
326
|
((b = w == null ? void 0 : w.response) == null ? void 0 : b.status) === 404 ? d.value = r("debouncedFilter.errors.invalid") : (c.value = [], u.value = r("debouncedFilter.errors.fetch"));
|
|
327
327
|
} finally {
|
|
328
|
-
|
|
328
|
+
s.value = !1;
|
|
329
329
|
}
|
|
330
330
|
else
|
|
331
|
-
|
|
331
|
+
s.value = !0, d.value = "", v ? (c.value = (K = h.value) == null ? void 0 : K.filter((w) => {
|
|
332
332
|
var B;
|
|
333
333
|
let R = !1;
|
|
334
334
|
for (const k of a.searchKeys) {
|
|
@@ -336,16 +336,16 @@ function Ea(e, n, t, a = {
|
|
|
336
336
|
A != null && A.includes(v.toLowerCase()) && (R = !0);
|
|
337
337
|
}
|
|
338
338
|
return R;
|
|
339
|
-
}), (!c.value || !c.value.length) && (d.value = r("debouncedFilter.errors.invalid"))) : c.value = h.value,
|
|
339
|
+
}), (!c.value || !c.value.length) && (d.value = r("debouncedFilter.errors.invalid"))) : c.value = h.value, s.value = !1;
|
|
340
340
|
};
|
|
341
341
|
return {
|
|
342
|
-
loading:
|
|
342
|
+
loading: s,
|
|
343
343
|
error: u,
|
|
344
344
|
validationError: d,
|
|
345
345
|
results: c,
|
|
346
346
|
allRecords: h,
|
|
347
347
|
loadItems: C,
|
|
348
|
-
debouncedQueryChange:
|
|
348
|
+
debouncedQueryChange: l
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
351
|
function Ba(e, n) {
|
|
@@ -382,19 +382,19 @@ function Fa() {
|
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function sn(e, n) {
|
|
386
386
|
const t = E(g(e)), a = E(g(n)), o = M(
|
|
387
387
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
388
388
|
), r = M(
|
|
389
389
|
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
390
390
|
);
|
|
391
391
|
return (i) => {
|
|
392
|
-
const { page:
|
|
392
|
+
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query: h } = i;
|
|
393
393
|
try {
|
|
394
394
|
let f = new URL(r.value.href);
|
|
395
395
|
return o.value && h ? (f.search = "", f = new URL(`${f.href}/${h}/`)) : (o.value || new URLSearchParams(h).forEach((_, C) => {
|
|
396
396
|
f.searchParams.append(C, _);
|
|
397
|
-
}), d && f.searchParams.append("sort_by", d), c === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(
|
|
397
|
+
}), 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;
|
|
398
398
|
} catch (f) {
|
|
399
399
|
return console.error("RouteList(fetcher)", f), a.value;
|
|
400
400
|
}
|
|
@@ -403,13 +403,13 @@ function ln(e, n) {
|
|
|
403
403
|
function Ka(e, n, t = "data") {
|
|
404
404
|
const a = g(n), { axiosInstance: o } = ht({
|
|
405
405
|
headers: e.requestHeaders
|
|
406
|
-
}), r =
|
|
406
|
+
}), r = sn(e, a), i = E({
|
|
407
407
|
status: we.Idle
|
|
408
408
|
});
|
|
409
|
-
return { fetcher: async (
|
|
409
|
+
return { fetcher: async (l) => {
|
|
410
410
|
try {
|
|
411
411
|
i.value = { status: we.Loading };
|
|
412
|
-
const
|
|
412
|
+
const s = r(l), { data: u } = await o.get(s), d = t && t.replace(/[^\w-_]/gi, "");
|
|
413
413
|
let c;
|
|
414
414
|
u[d] && Array.isArray(u[d]) ? c = u[d] : c = Object.keys(u).length ? [u] : [];
|
|
415
415
|
const h = {
|
|
@@ -425,19 +425,19 @@ function Ka(e, n, t = "data") {
|
|
|
425
425
|
status: we.Idle,
|
|
426
426
|
response: h
|
|
427
427
|
}, h;
|
|
428
|
-
} catch (
|
|
428
|
+
} catch (s) {
|
|
429
429
|
const u = {
|
|
430
430
|
data: [],
|
|
431
431
|
total: 0
|
|
432
432
|
};
|
|
433
|
-
return
|
|
433
|
+
return l.query && s.response.status === 404 ? (i.value = {
|
|
434
434
|
status: we.NoResults,
|
|
435
435
|
response: u,
|
|
436
|
-
error:
|
|
436
|
+
error: s
|
|
437
437
|
}, u) : (i.value = {
|
|
438
438
|
status: we.Error,
|
|
439
439
|
response: u,
|
|
440
|
-
error:
|
|
440
|
+
error: s
|
|
441
441
|
}, u);
|
|
442
442
|
}
|
|
443
443
|
}, fetcherState: i };
|
|
@@ -504,8 +504,8 @@ function Ua(e) {
|
|
|
504
504
|
const r = t[a];
|
|
505
505
|
if (!r)
|
|
506
506
|
return !1;
|
|
507
|
-
const [i,
|
|
508
|
-
return !(i && Pt(o, i, "<") ||
|
|
507
|
+
const [i, l] = r;
|
|
508
|
+
return !(i && Pt(o, i, "<") || l && Pt(o, l, ">"));
|
|
509
509
|
}
|
|
510
510
|
function Ga(e) {
|
|
511
511
|
const n = E(0), t = E(0), a = E(!1);
|
|
@@ -521,7 +521,7 @@ const oe = {
|
|
|
521
521
|
useDeleteUrlBuilder: Ba,
|
|
522
522
|
useErrors: Fa,
|
|
523
523
|
useFetcher: Ka,
|
|
524
|
-
useFetchUrlBuilder:
|
|
524
|
+
useFetchUrlBuilder: sn,
|
|
525
525
|
useHelpers: Na,
|
|
526
526
|
useStringHelpers: qa,
|
|
527
527
|
useI18n: vt,
|
|
@@ -587,14 +587,14 @@ const oe = {
|
|
|
587
587
|
placement: "bottomStart"
|
|
588
588
|
} : {
|
|
589
589
|
title: t.uuid
|
|
590
|
-
}), i = M(() => !!(t.tooltip && t.successTooltip)),
|
|
591
|
-
label:
|
|
590
|
+
}), i = M(() => !!(t.tooltip && t.successTooltip)), l = E(t.tooltip), s = M(() => t.tooltip ? {
|
|
591
|
+
label: l.value,
|
|
592
592
|
positionFixed: !0,
|
|
593
593
|
maxWidth: "500px",
|
|
594
594
|
placement: "bottomStart"
|
|
595
595
|
} : {}), u = M(() => t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${t.uuid.substring(0, 5)}` : t.uuid), d = (h) => {
|
|
596
|
-
|
|
597
|
-
|
|
596
|
+
l.value = h, setTimeout(() => {
|
|
597
|
+
l.value = t.tooltip;
|
|
598
598
|
}, 1800);
|
|
599
599
|
}, c = (h) => {
|
|
600
600
|
if (!h(t.uuid)) {
|
|
@@ -613,7 +613,7 @@ const oe = {
|
|
|
613
613
|
return (h, f) => {
|
|
614
614
|
const _ = L("KIcon"), C = L("KClipboardProvider");
|
|
615
615
|
return m(), $("div", Wa, [
|
|
616
|
-
e.format !== "hidden" ? (m(), D(Ne(e.idTooltip ? "KTooltip" : "div"),
|
|
616
|
+
e.format !== "hidden" ? (m(), D(Ne(e.idTooltip ? "KTooltip" : "div"), st({ key: 0 }, r.value, { "data-testid": "copy-id" }), {
|
|
617
617
|
default: y(() => [
|
|
618
618
|
F("div", {
|
|
619
619
|
class: Ae([
|
|
@@ -625,7 +625,7 @@ const oe = {
|
|
|
625
625
|
]),
|
|
626
626
|
_: 1
|
|
627
627
|
}, 16)) : G("", !0),
|
|
628
|
-
(m(), D(Ne(e.tooltip ? "KTooltip" : "div"),
|
|
628
|
+
(m(), D(Ne(e.tooltip ? "KTooltip" : "div"), st(s.value, { class: "uuid-icon-wrapper" }), {
|
|
629
629
|
default: y(() => [
|
|
630
630
|
O(C, null, {
|
|
631
631
|
default: y(({ copyToClipboard: p }) => [
|
|
@@ -679,18 +679,18 @@ const oe = {
|
|
|
679
679
|
},
|
|
680
680
|
setup(e) {
|
|
681
681
|
const n = e, { i18n: { t } } = oe.useI18n(), { convertKeyToTitle: a } = oe.useStringHelpers(), o = M(() => n.item.key ?? "json-array-item"), r = M(() => n.item.value ?? n.item), i = M(() => {
|
|
682
|
-
const
|
|
683
|
-
return n.isArrayItem && delete
|
|
684
|
-
}),
|
|
685
|
-
var
|
|
686
|
-
return n.isArrayItem ? (
|
|
682
|
+
const s = JSON.parse(JSON.stringify(r.value));
|
|
683
|
+
return n.isArrayItem && delete s.name, s;
|
|
684
|
+
}), l = M(() => {
|
|
685
|
+
var s;
|
|
686
|
+
return n.isArrayItem ? (s = r.value) != null && s.name ? a(r.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
687
687
|
});
|
|
688
|
-
return (
|
|
688
|
+
return (s, u) => (m(), D(Ne(e.isArrayItem ? "fieldset" : "div"), {
|
|
689
689
|
class: Ae(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
690
690
|
}, {
|
|
691
691
|
default: y(() => [
|
|
692
692
|
e.isArrayItem ? (m(), $("legend", eo, [
|
|
693
|
-
F("b", null, j(
|
|
693
|
+
F("b", null, j(l.value), 1)
|
|
694
694
|
])) : G("", !0),
|
|
695
695
|
(m(!0), $(pe, null, ce(Object.keys(i.value), (d, c) => (m(), D(bt, {
|
|
696
696
|
key: `${o.value}-property-${c}`,
|
|
@@ -758,7 +758,7 @@ const oe = {
|
|
|
758
758
|
}, 8, ["appearance"]);
|
|
759
759
|
};
|
|
760
760
|
}
|
|
761
|
-
}), ro = "#0044f4", io = "#e0e4ea",
|
|
761
|
+
}), ro = "#0044f4", io = "#e0e4ea", lo = "#3a3f51", so = "1px", uo = "20px", co = { class: "config-card-details-row" }, po = ["data-testid"], fo = ["data-testid"], mo = ["data-testid"], go = ["data-testid"], yo = { key: 1 }, ho = ["data-testid"], vo = ["data-testid"], bo = ["data-testid"], Co = ["data-testid"], ko = {
|
|
762
762
|
name: "ConfigCardItem",
|
|
763
763
|
components: { CopyUuid: dn, JsonCardItem: pn, StatusBadge: oo, InternalLinkItem: ao }
|
|
764
764
|
}, _o = /* @__PURE__ */ te({
|
|
@@ -782,13 +782,13 @@ const oe = {
|
|
|
782
782
|
emits: ["navigation-click"],
|
|
783
783
|
setup(e, { emit: n }) {
|
|
784
784
|
const t = e;
|
|
785
|
-
|
|
786
|
-
"
|
|
787
|
-
"
|
|
788
|
-
"
|
|
789
|
-
"
|
|
785
|
+
la((f) => ({
|
|
786
|
+
"77b12766": u.value ? "none" : `solid ${g(so)} ${g(io)}`,
|
|
787
|
+
"500c4499": s.value && i.value ? "block" : "flex",
|
|
788
|
+
"132371a7": s.value && i.value ? "100%" : t.slim ? "50%" : "25%",
|
|
789
|
+
"1325b782": s.value && i.value ? "100%" : t.slim ? "50%" : "75%"
|
|
790
790
|
}));
|
|
791
|
-
const a = Ze(), { i18n: { t: o, formatUnixTimeStamp: r } } = oe.useI18n(), i = M(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""),
|
|
791
|
+
const a = Ze(), { i18n: { t: o, formatUnixTimeStamp: r } } = oe.useI18n(), i = M(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), l = M(() => !!(t.item.tooltip || a["label-tooltip"])), s = M(() => t.item.type === X.Json || t.item.type === X.JsonArray), u = M(() => t.item.type === X.JsonArray), d = M(() => {
|
|
792
792
|
switch (t.item.type) {
|
|
793
793
|
case X.ID:
|
|
794
794
|
return {
|
|
@@ -907,7 +907,7 @@ const oe = {
|
|
|
907
907
|
};
|
|
908
908
|
default:
|
|
909
909
|
return {
|
|
910
|
-
tag: "
|
|
910
|
+
tag: "KTooltip",
|
|
911
911
|
attrs: {
|
|
912
912
|
"data-testid": `${t.item.key}-plain-text`
|
|
913
913
|
},
|
|
@@ -929,7 +929,7 @@ const oe = {
|
|
|
929
929
|
]),
|
|
930
930
|
_: 2
|
|
931
931
|
}, [
|
|
932
|
-
|
|
932
|
+
l.value ? {
|
|
933
933
|
name: "tooltip",
|
|
934
934
|
fn: y(() => [
|
|
935
935
|
F("div", {
|
|
@@ -953,7 +953,7 @@ const oe = {
|
|
|
953
953
|
rowValue: e.item.value
|
|
954
954
|
}, () => [
|
|
955
955
|
i.value ? (m(), $("div", yo, [
|
|
956
|
-
(m(), D(Ne(d.value.tag),
|
|
956
|
+
(m(), D(Ne(d.value.tag), sa(ua(d.value.attrs)), {
|
|
957
957
|
default: y(() => [
|
|
958
958
|
d.value.additionalComponent === "KBadge" ? (m(), $("div", {
|
|
959
959
|
key: 0,
|
|
@@ -976,7 +976,7 @@ const oe = {
|
|
|
976
976
|
class: "copy-uuid-array",
|
|
977
977
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
978
978
|
}, [
|
|
979
|
-
(m(!0), $(pe, null, ce(e.item.value, (b, K) => (m(), D(g(dn),
|
|
979
|
+
(m(!0), $(pe, null, ce(e.item.value, (b, K) => (m(), D(g(dn), st(d.value.childAttrs, {
|
|
980
980
|
key: `${e.item.key}-copy-uuid-${K}`,
|
|
981
981
|
"data-testid": `${e.item.key}-copy-uuid-${K}`,
|
|
982
982
|
uuid: b
|
|
@@ -1035,7 +1035,7 @@ const oe = {
|
|
|
1035
1035
|
]);
|
|
1036
1036
|
};
|
|
1037
1037
|
}
|
|
1038
|
-
}), bt = /* @__PURE__ */ me(_o, [["__scopeId", "data-v-
|
|
1038
|
+
}), bt = /* @__PURE__ */ me(_o, [["__scopeId", "data-v-9465176b"]]);
|
|
1039
1039
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1040
1040
|
function fn(e) {
|
|
1041
1041
|
return typeof e > "u" || e === null;
|
|
@@ -1084,10 +1084,10 @@ qe.prototype.constructor = qe;
|
|
|
1084
1084
|
qe.prototype.toString = function(e) {
|
|
1085
1085
|
return this.name + ": " + mn(this, e);
|
|
1086
1086
|
};
|
|
1087
|
-
var
|
|
1087
|
+
var le = qe;
|
|
1088
1088
|
function rt(e, n, t, a, o) {
|
|
1089
|
-
var r = "", i = "",
|
|
1090
|
-
return a - n >
|
|
1089
|
+
var r = "", i = "", l = Math.floor(o / 2) - 1;
|
|
1090
|
+
return a - n > l && (r = " ... ", n = a - l + r.length), t - a > l && (i = " ...", t = a + l - i.length), {
|
|
1091
1091
|
str: r + e.slice(n, t).replace(/\t/g, "→") + i,
|
|
1092
1092
|
pos: a - n + r.length
|
|
1093
1093
|
// relative position
|
|
@@ -1103,28 +1103,28 @@ function Bo(e, n) {
|
|
|
1103
1103
|
for (var t = /\r?\n|\r|\0/g, a = [0], o = [], r, i = -1; r = t.exec(e.buffer); )
|
|
1104
1104
|
o.push(r.index), a.push(r.index + r[0].length), e.position <= r.index && i < 0 && (i = a.length - 2);
|
|
1105
1105
|
i < 0 && (i = a.length - 1);
|
|
1106
|
-
var
|
|
1107
|
-
for (
|
|
1106
|
+
var l = "", s, u, d = Math.min(e.line + n.linesAfter, o.length).toString().length, c = n.maxLength - (n.indent + d + 3);
|
|
1107
|
+
for (s = 1; s <= n.linesBefore && !(i - s < 0); s++)
|
|
1108
1108
|
u = rt(
|
|
1109
1109
|
e.buffer,
|
|
1110
|
-
a[i -
|
|
1111
|
-
o[i -
|
|
1112
|
-
e.position - (a[i] - a[i -
|
|
1110
|
+
a[i - s],
|
|
1111
|
+
o[i - s],
|
|
1112
|
+
e.position - (a[i] - a[i - s]),
|
|
1113
1113
|
c
|
|
1114
|
-
),
|
|
1115
|
-
` +
|
|
1116
|
-
for (u = rt(e.buffer, a[i], o[i], e.position, c),
|
|
1117
|
-
`,
|
|
1118
|
-
`,
|
|
1114
|
+
), l = ne.repeat(" ", n.indent) + it((e.line - s + 1).toString(), d) + " | " + u.str + `
|
|
1115
|
+
` + l;
|
|
1116
|
+
for (u = rt(e.buffer, a[i], o[i], e.position, c), l += ne.repeat(" ", n.indent) + it((e.line + 1).toString(), d) + " | " + u.str + `
|
|
1117
|
+
`, l += ne.repeat("-", n.indent + d + 3 + u.pos) + `^
|
|
1118
|
+
`, s = 1; s <= n.linesAfter && !(i + s >= o.length); s++)
|
|
1119
1119
|
u = rt(
|
|
1120
1120
|
e.buffer,
|
|
1121
|
-
a[i +
|
|
1122
|
-
o[i +
|
|
1123
|
-
e.position - (a[i] - a[i +
|
|
1121
|
+
a[i + s],
|
|
1122
|
+
o[i + s],
|
|
1123
|
+
e.position - (a[i] - a[i + s]),
|
|
1124
1124
|
c
|
|
1125
|
-
),
|
|
1125
|
+
), l += ne.repeat(" ", n.indent) + it((e.line + s + 1).toString(), d) + " | " + u.str + `
|
|
1126
1126
|
`;
|
|
1127
|
-
return
|
|
1127
|
+
return l.replace(/\n$/, "");
|
|
1128
1128
|
}
|
|
1129
1129
|
var Fo = Bo, Ko = [
|
|
1130
1130
|
"kind",
|
|
@@ -1153,13 +1153,13 @@ function qo(e) {
|
|
|
1153
1153
|
function Lo(e, n) {
|
|
1154
1154
|
if (n = n || {}, Object.keys(n).forEach(function(t) {
|
|
1155
1155
|
if (Ko.indexOf(t) === -1)
|
|
1156
|
-
throw new
|
|
1156
|
+
throw new le('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1157
1157
|
}), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
|
|
1158
1158
|
return !0;
|
|
1159
1159
|
}, this.construct = n.construct || function(t) {
|
|
1160
1160
|
return t;
|
|
1161
1161
|
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = qo(n.styleAliases || null), No.indexOf(this.kind) === -1)
|
|
1162
|
-
throw new
|
|
1162
|
+
throw new le('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1163
1163
|
}
|
|
1164
1164
|
var re = Lo;
|
|
1165
1165
|
function Vt(e, n) {
|
|
@@ -1203,17 +1203,17 @@ ct.prototype.extend = function(e) {
|
|
|
1203
1203
|
else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit)))
|
|
1204
1204
|
e.implicit && (n = n.concat(e.implicit)), e.explicit && (t = t.concat(e.explicit));
|
|
1205
1205
|
else
|
|
1206
|
-
throw new
|
|
1206
|
+
throw new le("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1207
1207
|
n.forEach(function(o) {
|
|
1208
1208
|
if (!(o instanceof re))
|
|
1209
|
-
throw new
|
|
1209
|
+
throw new le("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1210
1210
|
if (o.loadKind && o.loadKind !== "scalar")
|
|
1211
|
-
throw new
|
|
1211
|
+
throw new le("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1212
1212
|
if (o.multi)
|
|
1213
|
-
throw new
|
|
1213
|
+
throw new le("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1214
1214
|
}), t.forEach(function(o) {
|
|
1215
1215
|
if (!(o instanceof re))
|
|
1216
|
-
throw new
|
|
1216
|
+
throw new le("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1217
1217
|
});
|
|
1218
1218
|
var a = Object.create(ct.prototype);
|
|
1219
1219
|
return a.implicit = (this.implicit || []).concat(n), a.explicit = (this.explicit || []).concat(t), a.compiledImplicit = Vt(a, "implicit"), a.compiledExplicit = Vt(a, "explicit"), a.compiledTypeMap = Po(a.compiledImplicit, a.compiledExplicit), a;
|
|
@@ -1479,19 +1479,19 @@ function rr(e) {
|
|
|
1479
1479
|
return e === null ? !1 : Sn.exec(e) !== null || xn.exec(e) !== null;
|
|
1480
1480
|
}
|
|
1481
1481
|
function ir(e) {
|
|
1482
|
-
var n, t, a, o, r, i,
|
|
1482
|
+
var n, t, a, o, r, i, l, s = 0, u = null, d, c, h;
|
|
1483
1483
|
if (n = Sn.exec(e), n === null && (n = xn.exec(e)), n === null)
|
|
1484
1484
|
throw new Error("Date resolve error");
|
|
1485
1485
|
if (t = +n[1], a = +n[2] - 1, o = +n[3], !n[4])
|
|
1486
1486
|
return new Date(Date.UTC(t, a, o));
|
|
1487
|
-
if (r = +n[4], i = +n[5],
|
|
1488
|
-
for (
|
|
1489
|
-
|
|
1490
|
-
|
|
1487
|
+
if (r = +n[4], i = +n[5], l = +n[6], n[7]) {
|
|
1488
|
+
for (s = n[7].slice(0, 3); s.length < 3; )
|
|
1489
|
+
s += "0";
|
|
1490
|
+
s = +s;
|
|
1491
1491
|
}
|
|
1492
|
-
return n[9] && (d = +n[10], c = +(n[11] || 0), u = (d * 60 + c) * 6e4, n[9] === "-" && (u = -u)), h = new Date(Date.UTC(t, a, o, r, i,
|
|
1492
|
+
return n[9] && (d = +n[10], c = +(n[11] || 0), u = (d * 60 + c) * 6e4, n[9] === "-" && (u = -u)), h = new Date(Date.UTC(t, a, o, r, i, l, s)), u && h.setTime(h.getTime() - u), h;
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1494
|
+
function lr(e) {
|
|
1495
1495
|
return e.toISOString();
|
|
1496
1496
|
}
|
|
1497
1497
|
var Tn = new re("tag:yaml.org,2002:timestamp", {
|
|
@@ -1499,14 +1499,14 @@ var Tn = new re("tag:yaml.org,2002:timestamp", {
|
|
|
1499
1499
|
resolve: rr,
|
|
1500
1500
|
construct: ir,
|
|
1501
1501
|
instanceOf: Date,
|
|
1502
|
-
represent:
|
|
1502
|
+
represent: lr
|
|
1503
1503
|
});
|
|
1504
|
-
function
|
|
1504
|
+
function sr(e) {
|
|
1505
1505
|
return e === "<<" || e === null;
|
|
1506
1506
|
}
|
|
1507
1507
|
var $n = new re("tag:yaml.org,2002:merge", {
|
|
1508
1508
|
kind: "scalar",
|
|
1509
|
-
resolve:
|
|
1509
|
+
resolve: sr
|
|
1510
1510
|
}), Ct = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1511
1511
|
\r`;
|
|
1512
1512
|
function ur(e) {
|
|
@@ -1522,10 +1522,10 @@ function ur(e) {
|
|
|
1522
1522
|
return a % 8 === 0;
|
|
1523
1523
|
}
|
|
1524
1524
|
function cr(e) {
|
|
1525
|
-
var n, t, a = e.replace(/[\r\n=]/g, ""), o = a.length, r = Ct, i = 0,
|
|
1525
|
+
var n, t, a = e.replace(/[\r\n=]/g, ""), o = a.length, r = Ct, i = 0, l = [];
|
|
1526
1526
|
for (n = 0; n < o; n++)
|
|
1527
|
-
n % 4 === 0 && n && (
|
|
1528
|
-
return t = o % 4 * 6, t === 0 ? (
|
|
1527
|
+
n % 4 === 0 && n && (l.push(i >> 16 & 255), l.push(i >> 8 & 255), l.push(i & 255)), i = i << 6 | r.indexOf(a.charAt(n));
|
|
1528
|
+
return t = o % 4 * 6, t === 0 ? (l.push(i >> 16 & 255), l.push(i >> 8 & 255), l.push(i & 255)) : t === 18 ? (l.push(i >> 10 & 255), l.push(i >> 2 & 255)) : t === 12 && l.push(i >> 4 & 255), new Uint8Array(l);
|
|
1529
1529
|
}
|
|
1530
1530
|
function dr(e) {
|
|
1531
1531
|
var n = "", t = 0, a, o, r = e.length, i = Ct;
|
|
@@ -1546,9 +1546,9 @@ var jn = new re("tag:yaml.org,2002:binary", {
|
|
|
1546
1546
|
function gr(e) {
|
|
1547
1547
|
if (e === null)
|
|
1548
1548
|
return !0;
|
|
1549
|
-
var n = [], t, a, o, r, i,
|
|
1550
|
-
for (t = 0, a =
|
|
1551
|
-
if (o =
|
|
1549
|
+
var n = [], t, a, o, r, i, l = e;
|
|
1550
|
+
for (t = 0, a = l.length; t < a; t += 1) {
|
|
1551
|
+
if (o = l[t], i = !1, mr.call(o) !== "[object Object]")
|
|
1552
1552
|
return !1;
|
|
1553
1553
|
for (r in o)
|
|
1554
1554
|
if (fr.call(o, r))
|
|
@@ -1624,7 +1624,7 @@ var En = new re("tag:yaml.org,2002:set", {
|
|
|
1624
1624
|
On,
|
|
1625
1625
|
En
|
|
1626
1626
|
]
|
|
1627
|
-
}), ke = Object.prototype.hasOwnProperty, He = 1, Bn = 2, Fn = 3, Ye = 4,
|
|
1627
|
+
}), ke = Object.prototype.hasOwnProperty, He = 1, Bn = 2, Fn = 3, Ye = 4, lt = 1, wr = 2, Ut = 3, Ir = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Ar = /[\x85\u2028\u2029]/, Sr = /[,\[\]\{\}]/, Kn = /^(?:!|!!|![a-z\-]+!)$/i, Nn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1628
1628
|
function Gt(e) {
|
|
1629
1629
|
return Object.prototype.toString.call(e);
|
|
1630
1630
|
}
|
|
@@ -1675,7 +1675,7 @@ function Pn(e, n) {
|
|
|
1675
1675
|
line: e.line,
|
|
1676
1676
|
column: e.position - e.lineStart
|
|
1677
1677
|
};
|
|
1678
|
-
return t.snippet = Fo(t), new
|
|
1678
|
+
return t.snippet = Fo(t), new le(n, t);
|
|
1679
1679
|
}
|
|
1680
1680
|
function x(e, n) {
|
|
1681
1681
|
throw Pn(e, n);
|
|
@@ -1700,22 +1700,22 @@ var Yt = {
|
|
|
1700
1700
|
}
|
|
1701
1701
|
};
|
|
1702
1702
|
function Ce(e, n, t, a) {
|
|
1703
|
-
var o, r, i,
|
|
1703
|
+
var o, r, i, l;
|
|
1704
1704
|
if (n < t) {
|
|
1705
|
-
if (
|
|
1706
|
-
for (o = 0, r =
|
|
1707
|
-
i =
|
|
1705
|
+
if (l = e.input.slice(n, t), a)
|
|
1706
|
+
for (o = 0, r = l.length; o < r; o += 1)
|
|
1707
|
+
i = l.charCodeAt(o), i === 9 || 32 <= i && i <= 1114111 || x(e, "expected valid JSON character");
|
|
1708
1708
|
else
|
|
1709
|
-
Ir.test(
|
|
1710
|
-
e.result +=
|
|
1709
|
+
Ir.test(l) && x(e, "the stream contains non-printable characters");
|
|
1710
|
+
e.result += l;
|
|
1711
1711
|
}
|
|
1712
1712
|
}
|
|
1713
1713
|
function zt(e, n, t, a) {
|
|
1714
|
-
var o, r, i,
|
|
1715
|
-
for (ne.isObject(t) || x(e, "cannot merge mappings; the provided source object is unacceptable"), o = Object.keys(t), i = 0,
|
|
1714
|
+
var o, r, i, l;
|
|
1715
|
+
for (ne.isObject(t) || x(e, "cannot merge mappings; the provided source object is unacceptable"), o = Object.keys(t), i = 0, l = o.length; i < l; i += 1)
|
|
1716
1716
|
r = o[i], ke.call(n, r) || (n[r] = t[r], a[r] = !0);
|
|
1717
1717
|
}
|
|
1718
|
-
function Ee(e, n, t, a, o, r, i,
|
|
1718
|
+
function Ee(e, n, t, a, o, r, i, l, s) {
|
|
1719
1719
|
var u, d;
|
|
1720
1720
|
if (Array.isArray(o))
|
|
1721
1721
|
for (o = Array.prototype.slice.call(o), u = 0, d = o.length; u < d; u += 1)
|
|
@@ -1727,7 +1727,7 @@ function Ee(e, n, t, a, o, r, i, s, l) {
|
|
|
1727
1727
|
else
|
|
1728
1728
|
zt(e, n, r, t);
|
|
1729
1729
|
else
|
|
1730
|
-
!e.json && !ke.call(t, o) && ke.call(n, o) && (e.line = i || e.line, e.lineStart =
|
|
1730
|
+
!e.json && !ke.call(t, o) && ke.call(n, o) && (e.line = i || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, x(e, "duplicated mapping key")), o === "__proto__" ? Object.defineProperty(n, o, {
|
|
1731
1731
|
configurable: !0,
|
|
1732
1732
|
enumerable: !0,
|
|
1733
1733
|
writable: !0,
|
|
@@ -1764,10 +1764,10 @@ function wt(e, n) {
|
|
|
1764
1764
|
`, n - 1));
|
|
1765
1765
|
}
|
|
1766
1766
|
function Or(e, n, t) {
|
|
1767
|
-
var a, o, r, i,
|
|
1767
|
+
var a, o, r, i, l, s, u, d, c = e.kind, h = e.result, f;
|
|
1768
1768
|
if (f = e.input.charCodeAt(e.position), de(f) || Oe(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) && (o = e.input.charCodeAt(e.position + 1), de(o) || t && Oe(o)))
|
|
1769
1769
|
return !1;
|
|
1770
|
-
for (e.kind = "scalar", e.result = "", r = i = e.position,
|
|
1770
|
+
for (e.kind = "scalar", e.result = "", r = i = e.position, l = !1; f !== 0; ) {
|
|
1771
1771
|
if (f === 58) {
|
|
1772
1772
|
if (o = e.input.charCodeAt(e.position + 1), de(o) || t && Oe(o))
|
|
1773
1773
|
break;
|
|
@@ -1778,15 +1778,15 @@ function Or(e, n, t) {
|
|
|
1778
1778
|
if (e.position === e.lineStart && et(e) || t && Oe(f))
|
|
1779
1779
|
break;
|
|
1780
1780
|
if (ge(f))
|
|
1781
|
-
if (
|
|
1782
|
-
|
|
1781
|
+
if (s = e.line, u = e.lineStart, d = e.lineIndent, ee(e, !1, -1), e.lineIndent >= n) {
|
|
1782
|
+
l = !0, f = e.input.charCodeAt(e.position);
|
|
1783
1783
|
continue;
|
|
1784
1784
|
} else {
|
|
1785
|
-
e.position = i, e.line =
|
|
1785
|
+
e.position = i, e.line = s, e.lineStart = u, e.lineIndent = d;
|
|
1786
1786
|
break;
|
|
1787
1787
|
}
|
|
1788
1788
|
}
|
|
1789
|
-
|
|
1789
|
+
l && (Ce(e, r, i, !1), wt(e, e.line - s), r = i = e.position, l = !1), Ie(f) || (i = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1790
1790
|
}
|
|
1791
1791
|
return Ce(e, r, i, !1), e.result ? !0 : (e.kind = c, e.result = h, !1);
|
|
1792
1792
|
}
|
|
@@ -1805,46 +1805,46 @@ function Er(e, n) {
|
|
|
1805
1805
|
x(e, "unexpected end of the stream within a single quoted scalar");
|
|
1806
1806
|
}
|
|
1807
1807
|
function Br(e, n) {
|
|
1808
|
-
var t, a, o, r, i,
|
|
1809
|
-
if (
|
|
1808
|
+
var t, a, o, r, i, l;
|
|
1809
|
+
if (l = e.input.charCodeAt(e.position), l !== 34)
|
|
1810
1810
|
return !1;
|
|
1811
|
-
for (e.kind = "scalar", e.result = "", e.position++, t = a = e.position; (
|
|
1812
|
-
if (
|
|
1811
|
+
for (e.kind = "scalar", e.result = "", e.position++, t = a = e.position; (l = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1812
|
+
if (l === 34)
|
|
1813
1813
|
return Ce(e, t, e.position, !0), e.position++, !0;
|
|
1814
|
-
if (
|
|
1815
|
-
if (Ce(e, t, e.position, !0),
|
|
1814
|
+
if (l === 92) {
|
|
1815
|
+
if (Ce(e, t, e.position, !0), l = e.input.charCodeAt(++e.position), ge(l))
|
|
1816
1816
|
ee(e, !1, n);
|
|
1817
|
-
else if (
|
|
1818
|
-
e.result += Ln[
|
|
1819
|
-
else if ((i = Tr(
|
|
1817
|
+
else if (l < 256 && qn[l])
|
|
1818
|
+
e.result += Ln[l], e.position++;
|
|
1819
|
+
else if ((i = Tr(l)) > 0) {
|
|
1820
1820
|
for (o = i, r = 0; o > 0; o--)
|
|
1821
|
-
|
|
1821
|
+
l = e.input.charCodeAt(++e.position), (i = xr(l)) >= 0 ? r = (r << 4) + i : x(e, "expected hexadecimal character");
|
|
1822
1822
|
e.result += jr(r), e.position++;
|
|
1823
1823
|
} else
|
|
1824
1824
|
x(e, "unknown escape sequence");
|
|
1825
1825
|
t = a = e.position;
|
|
1826
1826
|
} else
|
|
1827
|
-
ge(
|
|
1827
|
+
ge(l) ? (Ce(e, t, a, !0), wt(e, ee(e, !1, n)), t = a = e.position) : e.position === e.lineStart && et(e) ? x(e, "unexpected end of the document within a double quoted scalar") : (e.position++, a = e.position);
|
|
1828
1828
|
}
|
|
1829
1829
|
x(e, "unexpected end of the stream within a double quoted scalar");
|
|
1830
1830
|
}
|
|
1831
1831
|
function Fr(e, n) {
|
|
1832
|
-
var t = !0, a, o, r, i = e.tag,
|
|
1832
|
+
var t = !0, a, o, r, i = e.tag, l, s = e.anchor, u, d, c, h, f, _ = /* @__PURE__ */ Object.create(null), C, p, I, v;
|
|
1833
1833
|
if (v = e.input.charCodeAt(e.position), v === 91)
|
|
1834
|
-
d = 93, f = !1,
|
|
1834
|
+
d = 93, f = !1, l = [];
|
|
1835
1835
|
else if (v === 123)
|
|
1836
|
-
d = 125, f = !0,
|
|
1836
|
+
d = 125, f = !0, l = {};
|
|
1837
1837
|
else
|
|
1838
1838
|
return !1;
|
|
1839
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] =
|
|
1839
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), v = e.input.charCodeAt(++e.position); v !== 0; ) {
|
|
1840
1840
|
if (ee(e, !0, n), v = e.input.charCodeAt(e.position), v === d)
|
|
1841
|
-
return e.position++, e.tag = i, e.anchor =
|
|
1842
|
-
t ? v === 44 && x(e, "expected the node content, but found ','") : x(e, "missed comma between flow collection entries"), p = C = I = null, c = h = !1, v === 63 && (u = e.input.charCodeAt(e.position + 1), de(u) && (c = h = !0, e.position++, ee(e, !0, n))), a = e.line, o = e.lineStart, r = e.position, Be(e, n, He, !1, !0), p = e.tag, C = e.result, ee(e, !0, n), v = e.input.charCodeAt(e.position), (h || e.line === a) && v === 58 && (c = !0, v = e.input.charCodeAt(++e.position), ee(e, !0, n), Be(e, n, He, !1, !0), I = e.result), f ? Ee(e,
|
|
1841
|
+
return e.position++, e.tag = i, e.anchor = s, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1842
|
+
t ? v === 44 && x(e, "expected the node content, but found ','") : x(e, "missed comma between flow collection entries"), p = C = I = null, c = h = !1, v === 63 && (u = e.input.charCodeAt(e.position + 1), de(u) && (c = h = !0, e.position++, ee(e, !0, n))), a = e.line, o = e.lineStart, r = e.position, Be(e, n, He, !1, !0), p = e.tag, C = e.result, ee(e, !0, n), v = e.input.charCodeAt(e.position), (h || e.line === a) && v === 58 && (c = !0, v = e.input.charCodeAt(++e.position), ee(e, !0, n), Be(e, n, He, !1, !0), I = e.result), f ? Ee(e, l, _, p, C, I, a, o, r) : c ? l.push(Ee(e, null, _, p, C, I, a, o, r)) : l.push(C), ee(e, !0, n), v = e.input.charCodeAt(e.position), v === 44 ? (t = !0, v = e.input.charCodeAt(++e.position)) : t = !1;
|
|
1843
1843
|
}
|
|
1844
1844
|
x(e, "unexpected end of the stream within a flow collection");
|
|
1845
1845
|
}
|
|
1846
1846
|
function Kr(e, n) {
|
|
1847
|
-
var t, a, o =
|
|
1847
|
+
var t, a, o = lt, r = !1, i = !1, l = n, s = 0, u = !1, d, c;
|
|
1848
1848
|
if (c = e.input.charCodeAt(e.position), c === 124)
|
|
1849
1849
|
a = !1;
|
|
1850
1850
|
else if (c === 62)
|
|
@@ -1853,9 +1853,9 @@ function Kr(e, n) {
|
|
|
1853
1853
|
return !1;
|
|
1854
1854
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
1855
1855
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
1856
|
-
|
|
1856
|
+
lt === o ? o = c === 43 ? Ut : wr : x(e, "repeat of a chomping mode identifier");
|
|
1857
1857
|
else if ((d = $r(c)) >= 0)
|
|
1858
|
-
d === 0 ? x(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? x(e, "repeat of an indentation width identifier") : (
|
|
1858
|
+
d === 0 ? x(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? x(e, "repeat of an indentation width identifier") : (l = n + d - 1, i = !0);
|
|
1859
1859
|
else
|
|
1860
1860
|
break;
|
|
1861
1861
|
if (Ie(c)) {
|
|
@@ -1868,59 +1868,59 @@ function Kr(e, n) {
|
|
|
1868
1868
|
while (!ge(c) && c !== 0);
|
|
1869
1869
|
}
|
|
1870
1870
|
for (; c !== 0; ) {
|
|
1871
|
-
for (_t(e), e.lineIndent = 0, c = e.input.charCodeAt(e.position); (!i || e.lineIndent <
|
|
1871
|
+
for (_t(e), e.lineIndent = 0, c = e.input.charCodeAt(e.position); (!i || e.lineIndent < l) && c === 32; )
|
|
1872
1872
|
e.lineIndent++, c = e.input.charCodeAt(++e.position);
|
|
1873
|
-
if (!i && e.lineIndent >
|
|
1874
|
-
|
|
1873
|
+
if (!i && e.lineIndent > l && (l = e.lineIndent), ge(c)) {
|
|
1874
|
+
s++;
|
|
1875
1875
|
continue;
|
|
1876
1876
|
}
|
|
1877
|
-
if (e.lineIndent <
|
|
1877
|
+
if (e.lineIndent < l) {
|
|
1878
1878
|
o === Ut ? e.result += ne.repeat(`
|
|
1879
|
-
`, r ? 1 +
|
|
1879
|
+
`, r ? 1 + s : s) : o === lt && r && (e.result += `
|
|
1880
1880
|
`);
|
|
1881
1881
|
break;
|
|
1882
1882
|
}
|
|
1883
1883
|
for (a ? Ie(c) ? (u = !0, e.result += ne.repeat(`
|
|
1884
|
-
`, r ? 1 +
|
|
1885
|
-
`,
|
|
1886
|
-
`,
|
|
1887
|
-
`, r ? 1 +
|
|
1884
|
+
`, r ? 1 + s : s)) : u ? (u = !1, e.result += ne.repeat(`
|
|
1885
|
+
`, s + 1)) : s === 0 ? r && (e.result += " ") : e.result += ne.repeat(`
|
|
1886
|
+
`, s) : e.result += ne.repeat(`
|
|
1887
|
+
`, r ? 1 + s : s), r = !0, i = !0, s = 0, t = e.position; !ge(c) && c !== 0; )
|
|
1888
1888
|
c = e.input.charCodeAt(++e.position);
|
|
1889
1889
|
Ce(e, t, e.position, !1);
|
|
1890
1890
|
}
|
|
1891
1891
|
return !0;
|
|
1892
1892
|
}
|
|
1893
1893
|
function Jt(e, n) {
|
|
1894
|
-
var t, a = e.tag, o = e.anchor, r = [], i,
|
|
1894
|
+
var t, a = e.tag, o = e.anchor, r = [], i, l = !1, s;
|
|
1895
1895
|
if (e.firstTabInLine !== -1)
|
|
1896
1896
|
return !1;
|
|
1897
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = r),
|
|
1898
|
-
if (
|
|
1899
|
-
r.push(null),
|
|
1897
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = r), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, x(e, "tab characters must not be used in indentation")), !(s !== 45 || (i = e.input.charCodeAt(e.position + 1), !de(i)))); ) {
|
|
1898
|
+
if (l = !0, e.position++, ee(e, !0, -1) && e.lineIndent <= n) {
|
|
1899
|
+
r.push(null), s = e.input.charCodeAt(e.position);
|
|
1900
1900
|
continue;
|
|
1901
1901
|
}
|
|
1902
|
-
if (t = e.line, Be(e, n, Fn, !1, !0), r.push(e.result), ee(e, !0, -1),
|
|
1902
|
+
if (t = e.line, Be(e, n, Fn, !1, !0), r.push(e.result), ee(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && s !== 0)
|
|
1903
1903
|
x(e, "bad indentation of a sequence entry");
|
|
1904
1904
|
else if (e.lineIndent < n)
|
|
1905
1905
|
break;
|
|
1906
1906
|
}
|
|
1907
|
-
return
|
|
1907
|
+
return l ? (e.tag = a, e.anchor = o, e.kind = "sequence", e.result = r, !0) : !1;
|
|
1908
1908
|
}
|
|
1909
1909
|
function Nr(e, n, t) {
|
|
1910
|
-
var a, o, r, i,
|
|
1910
|
+
var a, o, r, i, l, s, u = e.tag, d = e.anchor, c = {}, h = /* @__PURE__ */ Object.create(null), f = null, _ = null, C = null, p = !1, I = !1, v;
|
|
1911
1911
|
if (e.firstTabInLine !== -1)
|
|
1912
1912
|
return !1;
|
|
1913
1913
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), v = e.input.charCodeAt(e.position); v !== 0; ) {
|
|
1914
1914
|
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, x(e, "tab characters must not be used in indentation")), a = e.input.charCodeAt(e.position + 1), r = e.line, (v === 63 || v === 58) && de(a))
|
|
1915
|
-
v === 63 ? (p && (Ee(e, c, h, f, _, null, i,
|
|
1915
|
+
v === 63 ? (p && (Ee(e, c, h, f, _, null, i, l, s), f = _ = C = null), I = !0, p = !0, o = !0) : p ? (p = !1, o = !0) : x(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, v = a;
|
|
1916
1916
|
else {
|
|
1917
|
-
if (i = e.line,
|
|
1917
|
+
if (i = e.line, l = e.lineStart, s = e.position, !Be(e, t, Bn, !1, !0))
|
|
1918
1918
|
break;
|
|
1919
1919
|
if (e.line === r) {
|
|
1920
1920
|
for (v = e.input.charCodeAt(e.position); Ie(v); )
|
|
1921
1921
|
v = e.input.charCodeAt(++e.position);
|
|
1922
1922
|
if (v === 58)
|
|
1923
|
-
v = e.input.charCodeAt(++e.position), de(v) || x(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ee(e, c, h, f, _, null, i,
|
|
1923
|
+
v = e.input.charCodeAt(++e.position), de(v) || x(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ee(e, c, h, f, _, null, i, l, s), f = _ = C = null), I = !0, p = !1, o = !1, f = e.tag, _ = e.result;
|
|
1924
1924
|
else if (I)
|
|
1925
1925
|
x(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1926
1926
|
else
|
|
@@ -1930,12 +1930,12 @@ function Nr(e, n, t) {
|
|
|
1930
1930
|
else
|
|
1931
1931
|
return e.tag = u, e.anchor = d, !0;
|
|
1932
1932
|
}
|
|
1933
|
-
if ((e.line === r || e.lineIndent > n) && (p && (i = e.line,
|
|
1933
|
+
if ((e.line === r || e.lineIndent > n) && (p && (i = e.line, l = e.lineStart, s = e.position), Be(e, n, Ye, !0, o) && (p ? _ = e.result : C = e.result), p || (Ee(e, c, h, f, _, C, i, l, s), f = _ = C = null), ee(e, !0, -1), v = e.input.charCodeAt(e.position)), (e.line === r || e.lineIndent > n) && v !== 0)
|
|
1934
1934
|
x(e, "bad indentation of a mapping entry");
|
|
1935
1935
|
else if (e.lineIndent < n)
|
|
1936
1936
|
break;
|
|
1937
1937
|
}
|
|
1938
|
-
return p && Ee(e, c, h, f, _, null, i,
|
|
1938
|
+
return p && Ee(e, c, h, f, _, null, i, l, s), I && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), I;
|
|
1939
1939
|
}
|
|
1940
1940
|
function qr(e) {
|
|
1941
1941
|
var n, t = !1, a = !1, o, r, i;
|
|
@@ -1976,11 +1976,11 @@ function Pr(e) {
|
|
|
1976
1976
|
return e.position === n && x(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), ke.call(e.anchorMap, t) || x(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], ee(e, !0, -1), !0;
|
|
1977
1977
|
}
|
|
1978
1978
|
function Be(e, n, t, a, o) {
|
|
1979
|
-
var r, i,
|
|
1980
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, r = i =
|
|
1979
|
+
var r, i, l, s = 1, u = !1, d = !1, c, h, f, _, C, p;
|
|
1980
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, r = i = l = Ye === t || Fn === t, a && ee(e, !0, -1) && (u = !0, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)), s === 1)
|
|
1981
1981
|
for (; qr(e) || Lr(e); )
|
|
1982
|
-
ee(e, !0, -1) ? (u = !0,
|
|
1983
|
-
if (
|
|
1982
|
+
ee(e, !0, -1) ? (u = !0, l = r, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)) : l = !1;
|
|
1983
|
+
if (l && (l = u || o), (s === 1 || Ye === t) && (He === t || Bn === t ? C = n : C = n + 1, p = e.position - e.lineStart, s === 1 ? l && (Jt(e, p) || Nr(e, p, C)) || Fr(e, C) ? d = !0 : (i && Kr(e, C) || Er(e, C) || Br(e, C) ? d = !0 : Pr(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && x(e, "alias node should not have any properties")) : Or(e, C, He === t) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && Jt(e, p))), e.tag === null)
|
|
1984
1984
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1985
1985
|
else if (e.tag === "?") {
|
|
1986
1986
|
for (e.result !== null && e.kind !== "scalar" && x(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, h = e.implicitTypes.length; c < h; c += 1)
|
|
@@ -2055,13 +2055,13 @@ function Vr(e, n) {
|
|
|
2055
2055
|
if (t.length !== 0) {
|
|
2056
2056
|
if (t.length === 1)
|
|
2057
2057
|
return t[0];
|
|
2058
|
-
throw new
|
|
2058
|
+
throw new le("expected a single document in the stream, but found more");
|
|
2059
2059
|
}
|
|
2060
2060
|
}
|
|
2061
2061
|
var Ur = Dr, Gr = Vr, Dn = {
|
|
2062
2062
|
loadAll: Ur,
|
|
2063
2063
|
load: Gr
|
|
2064
|
-
}, Vn = Object.prototype.toString, Un = Object.prototype.hasOwnProperty, It = 65279, Hr = 9, Le = 10, Yr = 13, zr = 32, Jr = 33, Wr = 34, dt = 35, Zr = 37, Qr = 38, Xr = 39, ei = 42, Gn = 44, ti = 45, Je = 58, ni = 61, ai = 62, oi = 63, ri = 64, Hn = 91, Yn = 93, ii = 96, zn = 123,
|
|
2064
|
+
}, Vn = Object.prototype.toString, Un = Object.prototype.hasOwnProperty, It = 65279, Hr = 9, Le = 10, Yr = 13, zr = 32, Jr = 33, Wr = 34, dt = 35, Zr = 37, Qr = 38, Xr = 39, ei = 42, Gn = 44, ti = 45, Je = 58, ni = 61, ai = 62, oi = 63, ri = 64, Hn = 91, Yn = 93, ii = 96, zn = 123, li = 124, Jn = 125, ie = {};
|
|
2065
2065
|
ie[0] = "\\0";
|
|
2066
2066
|
ie[7] = "\\a";
|
|
2067
2067
|
ie[8] = "\\b";
|
|
@@ -2077,7 +2077,7 @@ ie[133] = "\\N";
|
|
|
2077
2077
|
ie[160] = "\\_";
|
|
2078
2078
|
ie[8232] = "\\L";
|
|
2079
2079
|
ie[8233] = "\\P";
|
|
2080
|
-
var
|
|
2080
|
+
var si = [
|
|
2081
2081
|
"y",
|
|
2082
2082
|
"Y",
|
|
2083
2083
|
"yes",
|
|
@@ -2096,11 +2096,11 @@ var li = [
|
|
|
2096
2096
|
"OFF"
|
|
2097
2097
|
], ui = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2098
2098
|
function ci(e, n) {
|
|
2099
|
-
var t, a, o, r, i,
|
|
2099
|
+
var t, a, o, r, i, l, s;
|
|
2100
2100
|
if (n === null)
|
|
2101
2101
|
return {};
|
|
2102
2102
|
for (t = {}, a = Object.keys(n), o = 0, r = a.length; o < r; o += 1)
|
|
2103
|
-
i = a[o],
|
|
2103
|
+
i = a[o], l = String(n[i]), i.slice(0, 2) === "!!" && (i = "tag:yaml.org,2002:" + i.slice(2)), s = e.compiledTypeMap.fallback[i], s && Un.call(s.styleAliases, l) && (l = s.styleAliases[l]), t[i] = l;
|
|
2104
2104
|
return t;
|
|
2105
2105
|
}
|
|
2106
2106
|
function di(e) {
|
|
@@ -2112,7 +2112,7 @@ function di(e) {
|
|
|
2112
2112
|
else if (e <= 4294967295)
|
|
2113
2113
|
t = "U", a = 8;
|
|
2114
2114
|
else
|
|
2115
|
-
throw new
|
|
2115
|
+
throw new le("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2116
2116
|
return "\\" + t + ne.repeat("0", a - n.length) + n;
|
|
2117
2117
|
}
|
|
2118
2118
|
var pi = 1, Pe = 2;
|
|
@@ -2120,9 +2120,9 @@ function fi(e) {
|
|
|
2120
2120
|
this.schema = e.schema || kt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ne.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = ci(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 === '"' ? Pe : pi, 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;
|
|
2121
2121
|
}
|
|
2122
2122
|
function Wt(e, n) {
|
|
2123
|
-
for (var t = ne.repeat(" ", n), a = 0, o = -1, r = "", i,
|
|
2123
|
+
for (var t = ne.repeat(" ", n), a = 0, o = -1, r = "", i, l = e.length; a < l; )
|
|
2124
2124
|
o = e.indexOf(`
|
|
2125
|
-
`, a), o === -1 ? (i = e.slice(a), a =
|
|
2125
|
+
`, a), o === -1 ? (i = e.slice(a), a = l) : (i = e.slice(a, o + 1), a = o + 1), i.length && i !== `
|
|
2126
2126
|
` && (r += t), r += i;
|
|
2127
2127
|
return r;
|
|
2128
2128
|
}
|
|
@@ -2157,7 +2157,7 @@ function Qt(e, n, t) {
|
|
|
2157
2157
|
);
|
|
2158
2158
|
}
|
|
2159
2159
|
function gi(e) {
|
|
2160
|
-
return Re(e) && e !== It && !We(e) && e !== ti && e !== oi && e !== Je && e !== Gn && e !== Hn && e !== Yn && e !== zn && e !== Jn && e !== dt && e !== Qr && e !== ei && e !== Jr && e !==
|
|
2160
|
+
return Re(e) && e !== It && !We(e) && e !== ti && e !== oi && e !== Je && e !== Gn && e !== Hn && e !== Yn && e !== zn && e !== Jn && e !== dt && e !== Qr && e !== ei && e !== Jr && e !== li && e !== ni && e !== ai && e !== Xr && e !== Wr && e !== Zr && e !== ri && e !== ii;
|
|
2161
2161
|
}
|
|
2162
2162
|
function yi(e) {
|
|
2163
2163
|
return !We(e) && e !== Je;
|
|
@@ -2171,24 +2171,24 @@ function Wn(e) {
|
|
|
2171
2171
|
return n.test(e);
|
|
2172
2172
|
}
|
|
2173
2173
|
var Zn = 1, ft = 2, Qn = 3, Xn = 4, Me = 5;
|
|
2174
|
-
function hi(e, n, t, a, o, r, i,
|
|
2175
|
-
var
|
|
2174
|
+
function hi(e, n, t, a, o, r, i, l) {
|
|
2175
|
+
var s, u = 0, d = null, c = !1, h = !1, f = a !== -1, _ = -1, C = gi(Ke(e, 0)) && yi(Ke(e, e.length - 1));
|
|
2176
2176
|
if (n || i)
|
|
2177
|
-
for (
|
|
2178
|
-
if (u = Ke(e,
|
|
2177
|
+
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2178
|
+
if (u = Ke(e, s), !Re(u))
|
|
2179
2179
|
return Me;
|
|
2180
|
-
C = C && Qt(u, d,
|
|
2180
|
+
C = C && Qt(u, d, l), d = u;
|
|
2181
2181
|
}
|
|
2182
2182
|
else {
|
|
2183
|
-
for (
|
|
2184
|
-
if (u = Ke(e,
|
|
2183
|
+
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2184
|
+
if (u = Ke(e, s), u === Le)
|
|
2185
2185
|
c = !0, f && (h = h || // Foldable line = too long, and not more-indented.
|
|
2186
|
-
|
|
2186
|
+
s - _ - 1 > a && e[_ + 1] !== " ", _ = s);
|
|
2187
2187
|
else if (!Re(u))
|
|
2188
2188
|
return Me;
|
|
2189
|
-
C = C && Qt(u, d,
|
|
2189
|
+
C = C && Qt(u, d, l), d = u;
|
|
2190
2190
|
}
|
|
2191
|
-
h = h || f &&
|
|
2191
|
+
h = h || f && s - _ - 1 > a && e[_ + 1] !== " ";
|
|
2192
2192
|
}
|
|
2193
2193
|
return !c && !h ? C && !i && !o(e) ? Zn : r === Pe ? Me : ft : t > 9 && Wn(e) ? Me : i ? r === Pe ? Me : ft : h ? Xn : Qn;
|
|
2194
2194
|
}
|
|
@@ -2196,18 +2196,18 @@ function vi(e, n, t, a, o) {
|
|
|
2196
2196
|
e.dump = function() {
|
|
2197
2197
|
if (n.length === 0)
|
|
2198
2198
|
return e.quotingType === Pe ? '""' : "''";
|
|
2199
|
-
if (!e.noCompatMode && (
|
|
2199
|
+
if (!e.noCompatMode && (si.indexOf(n) !== -1 || ui.test(n)))
|
|
2200
2200
|
return e.quotingType === Pe ? '"' + n + '"' : "'" + n + "'";
|
|
2201
|
-
var r = e.indent * Math.max(1, t), i = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - r),
|
|
2202
|
-
function
|
|
2201
|
+
var r = e.indent * Math.max(1, t), i = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - r), l = a || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2202
|
+
function s(u) {
|
|
2203
2203
|
return mi(e, u);
|
|
2204
2204
|
}
|
|
2205
2205
|
switch (hi(
|
|
2206
2206
|
n,
|
|
2207
|
-
|
|
2207
|
+
l,
|
|
2208
2208
|
e.indent,
|
|
2209
2209
|
i,
|
|
2210
|
-
|
|
2210
|
+
s,
|
|
2211
2211
|
e.quotingType,
|
|
2212
2212
|
e.forceQuotes && !a,
|
|
2213
2213
|
o
|
|
@@ -2223,7 +2223,7 @@ function vi(e, n, t, a, o) {
|
|
|
2223
2223
|
case Me:
|
|
2224
2224
|
return '"' + Ci(n) + '"';
|
|
2225
2225
|
default:
|
|
2226
|
-
throw new
|
|
2226
|
+
throw new le("impossible error: invalid scalar style");
|
|
2227
2227
|
}
|
|
2228
2228
|
}();
|
|
2229
2229
|
}
|
|
@@ -2246,21 +2246,21 @@ function bi(e, n) {
|
|
|
2246
2246
|
return u = u !== -1 ? u : e.length, t.lastIndex = u, tn(e.slice(0, u), n);
|
|
2247
2247
|
}(), o = e[0] === `
|
|
2248
2248
|
` || e[0] === " ", r, i; i = t.exec(e); ) {
|
|
2249
|
-
var
|
|
2250
|
-
r =
|
|
2251
|
-
` : "") + tn(
|
|
2249
|
+
var l = i[1], s = i[2];
|
|
2250
|
+
r = s[0] === " ", a += l + (!o && !r && s !== "" ? `
|
|
2251
|
+
` : "") + tn(s, n), o = r;
|
|
2252
2252
|
}
|
|
2253
2253
|
return a;
|
|
2254
2254
|
}
|
|
2255
2255
|
function tn(e, n) {
|
|
2256
2256
|
if (e === "" || e[0] === " ")
|
|
2257
2257
|
return e;
|
|
2258
|
-
for (var t = / [^ ]/g, a, o = 0, r, i = 0,
|
|
2259
|
-
|
|
2260
|
-
` + e.slice(o, r), o = r + 1), i =
|
|
2261
|
-
return
|
|
2262
|
-
`, e.length - o > n && i > o ?
|
|
2263
|
-
` + e.slice(i + 1) :
|
|
2258
|
+
for (var t = / [^ ]/g, a, o = 0, r, i = 0, l = 0, s = ""; a = t.exec(e); )
|
|
2259
|
+
l = a.index, l - o > n && (r = i > o ? i : l, s += `
|
|
2260
|
+
` + e.slice(o, r), o = r + 1), i = l;
|
|
2261
|
+
return s += `
|
|
2262
|
+
`, e.length - o > n && i > o ? s += e.slice(o, i) + `
|
|
2263
|
+
` + e.slice(i + 1) : s += e.slice(o), s.slice(1);
|
|
2264
2264
|
}
|
|
2265
2265
|
function Ci(e) {
|
|
2266
2266
|
for (var n = "", t = 0, a, o = 0; o < e.length; t >= 65536 ? o += 2 : o++)
|
|
@@ -2268,46 +2268,46 @@ function Ci(e) {
|
|
|
2268
2268
|
return n;
|
|
2269
2269
|
}
|
|
2270
2270
|
function ki(e, n, t) {
|
|
2271
|
-
var a = "", o = e.tag, r, i,
|
|
2271
|
+
var a = "", o = e.tag, r, i, l;
|
|
2272
2272
|
for (r = 0, i = t.length; r < i; r += 1)
|
|
2273
|
-
|
|
2273
|
+
l = t[r], e.replacer && (l = e.replacer.call(t, String(r), l)), (he(e, n, l, !1, !1) || typeof l > "u" && he(e, n, null, !1, !1)) && (a !== "" && (a += "," + (e.condenseFlow ? "" : " ")), a += e.dump);
|
|
2274
2274
|
e.tag = o, e.dump = "[" + a + "]";
|
|
2275
2275
|
}
|
|
2276
2276
|
function nn(e, n, t, a) {
|
|
2277
|
-
var o = "", r = e.tag, i,
|
|
2278
|
-
for (i = 0,
|
|
2279
|
-
|
|
2277
|
+
var o = "", r = e.tag, i, l, s;
|
|
2278
|
+
for (i = 0, l = t.length; i < l; i += 1)
|
|
2279
|
+
s = t[i], e.replacer && (s = e.replacer.call(t, String(i), s)), (he(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && he(e, n + 1, null, !0, !0, !1, !0)) && ((!a || o !== "") && (o += pt(e, n)), e.dump && Le === e.dump.charCodeAt(0) ? o += "-" : o += "- ", o += e.dump);
|
|
2280
2280
|
e.tag = r, e.dump = o || "[]";
|
|
2281
2281
|
}
|
|
2282
2282
|
function _i(e, n, t) {
|
|
2283
|
-
var a = "", o = e.tag, r = Object.keys(t), i,
|
|
2284
|
-
for (i = 0,
|
|
2285
|
-
d = "", a !== "" && (d += ", "), e.condenseFlow && (d += '"'),
|
|
2283
|
+
var a = "", o = e.tag, r = Object.keys(t), i, l, s, u, d;
|
|
2284
|
+
for (i = 0, l = r.length; i < l; i += 1)
|
|
2285
|
+
d = "", a !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = r[i], u = t[s], e.replacer && (u = e.replacer.call(t, s, u)), he(e, n, s, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), he(e, n, u, !1, !1) && (d += e.dump, a += d));
|
|
2286
2286
|
e.tag = o, e.dump = "{" + a + "}";
|
|
2287
2287
|
}
|
|
2288
2288
|
function wi(e, n, t, a) {
|
|
2289
|
-
var o = "", r = e.tag, i = Object.keys(t),
|
|
2289
|
+
var o = "", r = e.tag, i = Object.keys(t), l, s, u, d, c, h;
|
|
2290
2290
|
if (e.sortKeys === !0)
|
|
2291
2291
|
i.sort();
|
|
2292
2292
|
else if (typeof e.sortKeys == "function")
|
|
2293
2293
|
i.sort(e.sortKeys);
|
|
2294
2294
|
else if (e.sortKeys)
|
|
2295
|
-
throw new
|
|
2296
|
-
for (
|
|
2297
|
-
h = "", (!a || o !== "") && (h += pt(e, n)), u = i[
|
|
2295
|
+
throw new le("sortKeys must be a boolean or a function");
|
|
2296
|
+
for (l = 0, s = i.length; l < s; l += 1)
|
|
2297
|
+
h = "", (!a || o !== "") && (h += pt(e, n)), u = i[l], d = t[u], e.replacer && (d = e.replacer.call(t, u, d)), he(e, n + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Le === e.dump.charCodeAt(0) ? h += "?" : h += "? "), h += e.dump, c && (h += pt(e, n)), he(e, n + 1, d, !0, c) && (e.dump && Le === e.dump.charCodeAt(0) ? h += ":" : h += ": ", h += e.dump, o += h));
|
|
2298
2298
|
e.tag = r, e.dump = o || "{}";
|
|
2299
2299
|
}
|
|
2300
2300
|
function an(e, n, t) {
|
|
2301
|
-
var a, o, r, i,
|
|
2301
|
+
var a, o, r, i, l, s;
|
|
2302
2302
|
for (o = t ? e.explicitTypes : e.implicitTypes, r = 0, i = o.length; r < i; r += 1)
|
|
2303
|
-
if (
|
|
2304
|
-
if (t ?
|
|
2305
|
-
if (
|
|
2306
|
-
a =
|
|
2307
|
-
else if (Un.call(
|
|
2308
|
-
a =
|
|
2303
|
+
if (l = o[r], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof n == "object" && n instanceof l.instanceOf) && (!l.predicate || l.predicate(n))) {
|
|
2304
|
+
if (t ? l.multi && l.representName ? e.tag = l.representName(n) : e.tag = l.tag : e.tag = "?", l.represent) {
|
|
2305
|
+
if (s = e.styleMap[l.tag] || l.defaultStyle, Vn.call(l.represent) === "[object Function]")
|
|
2306
|
+
a = l.represent(n, s);
|
|
2307
|
+
else if (Un.call(l.represent, s))
|
|
2308
|
+
a = l.represent[s](n, s);
|
|
2309
2309
|
else
|
|
2310
|
-
throw new
|
|
2310
|
+
throw new le("!<" + l.tag + '> tag resolver accepts not "' + s + '" style');
|
|
2311
2311
|
e.dump = a;
|
|
2312
2312
|
}
|
|
2313
2313
|
return !0;
|
|
@@ -2316,22 +2316,22 @@ function an(e, n, t) {
|
|
|
2316
2316
|
}
|
|
2317
2317
|
function he(e, n, t, a, o, r, i) {
|
|
2318
2318
|
e.tag = null, e.dump = t, an(e, t, !1) || an(e, t, !0);
|
|
2319
|
-
var
|
|
2319
|
+
var l = Vn.call(e.dump), s = a, u;
|
|
2320
2320
|
a && (a = e.flowLevel < 0 || e.flowLevel > n);
|
|
2321
|
-
var d =
|
|
2321
|
+
var d = l === "[object Object]" || l === "[object Array]", c, h;
|
|
2322
2322
|
if (d && (c = e.duplicates.indexOf(t), h = c !== -1), (e.tag !== null && e.tag !== "?" || h || e.indent !== 2 && n > 0) && (o = !1), h && e.usedDuplicates[c])
|
|
2323
2323
|
e.dump = "*ref_" + c;
|
|
2324
2324
|
else {
|
|
2325
|
-
if (d && h && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0),
|
|
2325
|
+
if (d && h && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), l === "[object Object]")
|
|
2326
2326
|
a && Object.keys(e.dump).length !== 0 ? (wi(e, n, e.dump, o), h && (e.dump = "&ref_" + c + e.dump)) : (_i(e, n, e.dump), h && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2327
|
-
else if (
|
|
2327
|
+
else if (l === "[object Array]")
|
|
2328
2328
|
a && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? nn(e, n - 1, e.dump, o) : nn(e, n, e.dump, o), h && (e.dump = "&ref_" + c + e.dump)) : (ki(e, n, e.dump), h && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2329
|
-
else if (
|
|
2330
|
-
e.tag !== "?" && vi(e, e.dump, n, r,
|
|
2329
|
+
else if (l === "[object String]")
|
|
2330
|
+
e.tag !== "?" && vi(e, e.dump, n, r, s);
|
|
2331
2331
|
else {
|
|
2332
|
-
if (
|
|
2332
|
+
if (l === "[object Undefined]" || e.skipInvalid)
|
|
2333
2333
|
return !1;
|
|
2334
|
-
throw new
|
|
2334
|
+
throw new le("unacceptable kind of an object to dump " + l);
|
|
2335
2335
|
}
|
|
2336
2336
|
e.tag !== null && e.tag !== "?" && (u = encodeURI(
|
|
2337
2337
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
@@ -2373,7 +2373,7 @@ function At(e, n) {
|
|
|
2373
2373
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2374
2374
|
};
|
|
2375
2375
|
}
|
|
2376
|
-
var Ti = re, $i = gn, ji = bn, Mi = In, Oi = An, Ei = kt, Bi = Dn.load, Fi = Dn.loadAll, Ki = xi.dump, Ni =
|
|
2376
|
+
var Ti = re, $i = gn, ji = bn, Mi = In, Oi = An, Ei = kt, Bi = Dn.load, Fi = Dn.loadAll, Ki = xi.dump, Ni = le, qi = {
|
|
2377
2377
|
binary: jn,
|
|
2378
2378
|
float: wn,
|
|
2379
2379
|
map: vn,
|
|
@@ -2441,10 +2441,10 @@ const Vi = {
|
|
|
2441
2441
|
}
|
|
2442
2442
|
},
|
|
2443
2443
|
setup(e) {
|
|
2444
|
-
const n = e, t = Ze(), { i18n: { t: a } } = oe.useI18n(), o = (
|
|
2445
|
-
return ve(() => n.format, (
|
|
2446
|
-
|
|
2447
|
-
}, { immediate: !0 }), (
|
|
2444
|
+
const n = e, t = Ze(), { i18n: { t: a } } = oe.useI18n(), o = (l) => !!(l.tooltip || t[`${l.key}-label-tooltip`]), r = E(""), i = E("");
|
|
2445
|
+
return ve(() => n.format, (l) => {
|
|
2446
|
+
l === "json" ? r.value = JSON.stringify(n.record, null, 2) : l === "yaml" && (i.value = Di.dump(n.record));
|
|
2447
|
+
}, { immediate: !0 }), (l, s) => {
|
|
2448
2448
|
const u = L("KCodeBlock");
|
|
2449
2449
|
return m(), $(pe, null, [
|
|
2450
2450
|
e.format === "structured" ? (m(), $("div", Vi, [
|
|
@@ -2459,10 +2459,10 @@ const Vi = {
|
|
|
2459
2459
|
item: c
|
|
2460
2460
|
}, be({
|
|
2461
2461
|
label: y(() => [
|
|
2462
|
-
J(
|
|
2462
|
+
J(l.$slots, `${c.key}-label`, { row: c }, void 0, !0)
|
|
2463
2463
|
]),
|
|
2464
2464
|
[c.key]: y(({ rowValue: h }) => [
|
|
2465
|
-
J(
|
|
2465
|
+
J(l.$slots, c.key, {
|
|
2466
2466
|
row: c,
|
|
2467
2467
|
rowValue: h
|
|
2468
2468
|
}, void 0, !0)
|
|
@@ -2472,7 +2472,7 @@ const Vi = {
|
|
|
2472
2472
|
o(c) ? {
|
|
2473
2473
|
name: "label-tooltip",
|
|
2474
2474
|
fn: y(() => [
|
|
2475
|
-
J(
|
|
2475
|
+
J(l.$slots, `${c.key}-label-tooltip`, { row: c }, void 0, !0)
|
|
2476
2476
|
]),
|
|
2477
2477
|
key: "0"
|
|
2478
2478
|
} : void 0
|
|
@@ -2506,10 +2506,10 @@ const Vi = {
|
|
|
2506
2506
|
}, Zi = (e) => (ma("data-v-877a88b1"), e = e(), ga(), e), Qi = ["aria-hidden"], Xi = {
|
|
2507
2507
|
key: 0,
|
|
2508
2508
|
"data-testid": "kui-icon-svg-title"
|
|
2509
|
-
},
|
|
2509
|
+
}, el = /* @__PURE__ */ Zi(() => /* @__PURE__ */ F("path", {
|
|
2510
2510
|
d: "M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",
|
|
2511
2511
|
fill: "currentColor"
|
|
2512
|
-
}, null, -1)),
|
|
2512
|
+
}, null, -1)), tl = /* @__PURE__ */ te({
|
|
2513
2513
|
__name: "BookIcon",
|
|
2514
2514
|
props: {
|
|
2515
2515
|
/** The accessibility text provided to screen readers */
|
|
@@ -2596,22 +2596,22 @@ const Vi = {
|
|
|
2596
2596
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2597
2597
|
}, [
|
|
2598
2598
|
e.title ? (m(), $("title", Xi, j(e.title), 1)) : G("", !0),
|
|
2599
|
-
|
|
2599
|
+
el
|
|
2600
2600
|
], 8, Qi))
|
|
2601
2601
|
]),
|
|
2602
2602
|
_: 1
|
|
2603
2603
|
}, 8, ["aria-hidden", "style"]));
|
|
2604
2604
|
}
|
|
2605
|
-
}),
|
|
2605
|
+
}), nl = /* @__PURE__ */ Wi(tl, [["__scopeId", "data-v-877a88b1"]]), al = { "data-testid": "config-card-title" }, ol = { class: "config-card-actions" }, rl = ["href"], il = {
|
|
2606
2606
|
key: 2,
|
|
2607
2607
|
class: "config-card-details-section"
|
|
2608
|
-
},
|
|
2608
|
+
}, ll = {
|
|
2609
2609
|
key: 3,
|
|
2610
2610
|
class: "config-card-details-section"
|
|
2611
|
-
},
|
|
2611
|
+
}, sl = ["data-testid"], ul = {
|
|
2612
2612
|
key: 0,
|
|
2613
2613
|
class: "config-card-prop-section-title"
|
|
2614
|
-
},
|
|
2614
|
+
}, cl = /* @__PURE__ */ te({
|
|
2615
2615
|
__name: "EntityBaseConfigCard",
|
|
2616
2616
|
props: {
|
|
2617
2617
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2686,7 +2686,7 @@ const Vi = {
|
|
|
2686
2686
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
2687
2687
|
setup(e, { emit: n }) {
|
|
2688
2688
|
var t;
|
|
2689
|
-
const a = e, o = Ze(), { i18n: { t: r } } = oe.useI18n(), { getMessageFromError: i } = oe.useErrors(), { convertKeyToTitle:
|
|
2689
|
+
const a = e, o = Ze(), { i18n: { t: r } } = oe.useI18n(), { getMessageFromError: i } = oe.useErrors(), { convertKeyToTitle: l } = oe.useStringHelpers(), { axiosInstance: s } = oe.useAxios({
|
|
2690
2690
|
headers: (t = a.config) == null ? void 0 : t.requestHeaders
|
|
2691
2691
|
}), u = [
|
|
2692
2692
|
{
|
|
@@ -2752,15 +2752,15 @@ const Vi = {
|
|
|
2752
2752
|
return N[1] - q[1];
|
|
2753
2753
|
}), U.map((N) => {
|
|
2754
2754
|
var q, V;
|
|
2755
|
-
const Z = N[0], H = (q = p.value) == null ? void 0 : q[Z], Q = ((V = a.configSchema) == null ? void 0 : V[Z]) || {},
|
|
2755
|
+
const Z = N[0], H = (q = p.value) == null ? void 0 : q[Z], Q = ((V = a.configSchema) == null ? void 0 : V[Z]) || {}, se = h[Z];
|
|
2756
2756
|
return {
|
|
2757
2757
|
key: Z,
|
|
2758
2758
|
value: H,
|
|
2759
2759
|
hidden: Q.hidden || !1,
|
|
2760
|
-
type: Q.type ?? ((
|
|
2761
|
-
label: Q.label ?? ((
|
|
2762
|
-
tooltip: Q.tooltip ?? ((
|
|
2763
|
-
section: Q.section ?? ((
|
|
2760
|
+
type: Q.type ?? ((se == null ? void 0 : se.type) || X.Text),
|
|
2761
|
+
label: Q.label ?? ((se == null ? void 0 : se.label) || l(Z)),
|
|
2762
|
+
tooltip: Q.tooltip ?? ((se == null ? void 0 : se.tooltip) || void 0),
|
|
2763
|
+
section: Q.section ?? ((se == null ? void 0 : se.section) || ue.Advanced)
|
|
2764
2764
|
};
|
|
2765
2765
|
}).filter((N) => !N.hidden && N.key !== a.pluginConfigKey);
|
|
2766
2766
|
}), v = M(() => {
|
|
@@ -2783,7 +2783,7 @@ const Vi = {
|
|
|
2783
2783
|
value: Z,
|
|
2784
2784
|
hidden: H.hidden || !1,
|
|
2785
2785
|
type: H.type ?? X.Text,
|
|
2786
|
-
label: H.label ??
|
|
2786
|
+
label: H.label ?? l(V),
|
|
2787
2787
|
tooltip: H.tooltip ?? void 0,
|
|
2788
2788
|
section: ue.Plugin
|
|
2789
2789
|
};
|
|
@@ -2810,7 +2810,7 @@ const Vi = {
|
|
|
2810
2810
|
}, { immediate: !0 }), Qe(async () => {
|
|
2811
2811
|
_.value = !1, f.value = !0;
|
|
2812
2812
|
try {
|
|
2813
|
-
const { data: k } = await
|
|
2813
|
+
const { data: k } = await s.get(B.value);
|
|
2814
2814
|
if (a.dataKey)
|
|
2815
2815
|
if (typeof k[a.dataKey] < "u")
|
|
2816
2816
|
p.value = { ...k[a.dataKey] };
|
|
@@ -2831,7 +2831,7 @@ const Vi = {
|
|
|
2831
2831
|
const P = L("KLabel"), U = L("KSelect"), S = L("KButton"), N = L("KClipboardProvider"), q = L("KSkeleton"), V = L("KEmptyState"), Z = L("KCard");
|
|
2832
2832
|
return m(), D(Z, { class: "kong-ui-entity-base-config-card" }, be({
|
|
2833
2833
|
actions: y(() => [
|
|
2834
|
-
F("div",
|
|
2834
|
+
F("div", ol, [
|
|
2835
2835
|
J(k.$slots, "actions", {}, void 0, !0),
|
|
2836
2836
|
e.config.jsonYamlEnabled ? (m(), D(P, {
|
|
2837
2837
|
key: 0,
|
|
@@ -2862,8 +2862,8 @@ const Vi = {
|
|
|
2862
2862
|
rel: "noopener",
|
|
2863
2863
|
target: "_blank"
|
|
2864
2864
|
}, [
|
|
2865
|
-
O(g(
|
|
2866
|
-
], 8,
|
|
2865
|
+
O(g(nl), { size: g(uo) }, null, 8, ["size"])
|
|
2866
|
+
], 8, rl)
|
|
2867
2867
|
]),
|
|
2868
2868
|
_: 1
|
|
2869
2869
|
})) : G("", !0),
|
|
@@ -2901,7 +2901,7 @@ const Vi = {
|
|
|
2901
2901
|
]),
|
|
2902
2902
|
_: 1
|
|
2903
2903
|
})) : G("", !0),
|
|
2904
|
-
e.config.jsonYamlEnabled ? (m(), $("div",
|
|
2904
|
+
e.config.jsonYamlEnabled ? (m(), $("div", il, [
|
|
2905
2905
|
O(Ji, {
|
|
2906
2906
|
format: d.value,
|
|
2907
2907
|
"prop-list-types": K.value,
|
|
@@ -2910,21 +2910,21 @@ const Vi = {
|
|
|
2910
2910
|
}, be({ _: 2 }, [
|
|
2911
2911
|
ce(Object.keys(k.$slots), (H) => ({
|
|
2912
2912
|
name: H,
|
|
2913
|
-
fn: y(({ row: Q, rowValue:
|
|
2913
|
+
fn: y(({ row: Q, rowValue: se }) => [
|
|
2914
2914
|
J(k.$slots, H, {
|
|
2915
2915
|
row: Q,
|
|
2916
|
-
rowValue:
|
|
2916
|
+
rowValue: se
|
|
2917
2917
|
}, void 0, !0)
|
|
2918
2918
|
])
|
|
2919
2919
|
}))
|
|
2920
2920
|
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
2921
|
-
])) : (m(), $("div",
|
|
2921
|
+
])) : (m(), $("div", ll, [
|
|
2922
2922
|
(m(!0), $(pe, null, ce(K.value, (H) => (m(), $("div", {
|
|
2923
2923
|
key: `config-card-details-${H}-props`,
|
|
2924
2924
|
class: Ae(`config-card-details-${H}-props`),
|
|
2925
2925
|
"data-testid": `config-card-details-${H}-props`
|
|
2926
2926
|
}, [
|
|
2927
|
-
H !== "basic" ? (m(), $("div",
|
|
2927
|
+
H !== "basic" ? (m(), $("div", ul, j(H === "advanced" ? g(r)("baseConfigCard.sections.advanced") : g(r)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
2928
2928
|
(m(!0), $(pe, null, ce(b.value[H], (Q) => (m(), D(bt, {
|
|
2929
2929
|
key: Q.key,
|
|
2930
2930
|
item: Q
|
|
@@ -2932,10 +2932,10 @@ const Vi = {
|
|
|
2932
2932
|
label: y(() => [
|
|
2933
2933
|
J(k.$slots, `${Q.key}-label`, { row: Q }, void 0, !0)
|
|
2934
2934
|
]),
|
|
2935
|
-
[Q.key]: y(({ rowValue:
|
|
2935
|
+
[Q.key]: y(({ rowValue: se }) => [
|
|
2936
2936
|
J(k.$slots, Q.key, {
|
|
2937
2937
|
row: Q,
|
|
2938
|
-
rowValue:
|
|
2938
|
+
rowValue: se
|
|
2939
2939
|
}, void 0, !0)
|
|
2940
2940
|
]),
|
|
2941
2941
|
_: 2
|
|
@@ -2948,7 +2948,7 @@ const Vi = {
|
|
|
2948
2948
|
key: "0"
|
|
2949
2949
|
} : void 0
|
|
2950
2950
|
]), 1032, ["item"]))), 128))
|
|
2951
|
-
], 10,
|
|
2951
|
+
], 10, sl))), 128))
|
|
2952
2952
|
]))
|
|
2953
2953
|
]),
|
|
2954
2954
|
_: 2
|
|
@@ -2956,7 +2956,7 @@ const Vi = {
|
|
|
2956
2956
|
e.hideTitle ? void 0 : {
|
|
2957
2957
|
name: "title",
|
|
2958
2958
|
fn: y(() => [
|
|
2959
|
-
F("div",
|
|
2959
|
+
F("div", al, [
|
|
2960
2960
|
J(k.$slots, "title", {}, () => [
|
|
2961
2961
|
W(j(g(r)("baseConfigCard.title")), 1)
|
|
2962
2962
|
], !0)
|
|
@@ -2967,10 +2967,10 @@ const Vi = {
|
|
|
2967
2967
|
]), 1024);
|
|
2968
2968
|
};
|
|
2969
2969
|
}
|
|
2970
|
-
}),
|
|
2970
|
+
}), dl = /* @__PURE__ */ me(cl, [["__scopeId", "data-v-64349aa2"]]), pl = ["onReset", "onSubmit"], fl = {
|
|
2971
2971
|
class: "form-actions",
|
|
2972
2972
|
"data-testid": "form-actions"
|
|
2973
|
-
},
|
|
2973
|
+
}, ml = /* @__PURE__ */ te({
|
|
2974
2974
|
__name: "EntityBaseForm",
|
|
2975
2975
|
props: {
|
|
2976
2976
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3020,9 +3020,9 @@ const Vi = {
|
|
|
3020
3020
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3021
3021
|
setup(e, { emit: n }) {
|
|
3022
3022
|
var t;
|
|
3023
|
-
const a = e, o = gt(), { i18n: { t: r } } = oe.useI18n(), { getMessageFromError: i } = oe.useErrors(), { axiosInstance:
|
|
3023
|
+
const a = e, o = gt(), { i18n: { t: r } } = oe.useI18n(), { getMessageFromError: i } = oe.useErrors(), { axiosInstance: l } = oe.useAxios({
|
|
3024
3024
|
headers: (t = a.config) == null ? void 0 : t.requestHeaders
|
|
3025
|
-
}),
|
|
3025
|
+
}), s = E(!1), u = E(!1), d = E(""), c = M(() => a.canSubmit === !1 || a.isReadonly), h = M(() => {
|
|
3026
3026
|
var p, I;
|
|
3027
3027
|
if (!a.editId)
|
|
3028
3028
|
return "";
|
|
@@ -3035,25 +3035,25 @@ const Vi = {
|
|
|
3035
3035
|
}, C = () => {
|
|
3036
3036
|
c.value || n("submit");
|
|
3037
3037
|
};
|
|
3038
|
-
return ve(() =>
|
|
3038
|
+
return ve(() => s.value, (p) => {
|
|
3039
3039
|
n("loading", p);
|
|
3040
3040
|
}, { immediate: !0 }), Qe(async () => {
|
|
3041
3041
|
if (a.editId)
|
|
3042
3042
|
try {
|
|
3043
|
-
u.value = !1,
|
|
3044
|
-
const { data: p } = await
|
|
3043
|
+
u.value = !1, s.value = !0;
|
|
3044
|
+
const { data: p } = await l.get(h.value);
|
|
3045
3045
|
n("fetch:success", p);
|
|
3046
3046
|
} catch (p) {
|
|
3047
3047
|
const I = i(p);
|
|
3048
3048
|
d.value = I.startsWith("code") ? r("baseForm.errors.edit") : I, u.value = !0, n("fetch:error", p);
|
|
3049
3049
|
} finally {
|
|
3050
|
-
|
|
3050
|
+
s.value = !1;
|
|
3051
3051
|
}
|
|
3052
3052
|
}), (p, I) => {
|
|
3053
3053
|
const v = L("KSkeleton"), b = L("KEmptyState"), K = L("KAlert"), w = L("KButton"), B = L("KCard");
|
|
3054
3054
|
return m(), D(B, { class: "kong-ui-entity-base-form" }, {
|
|
3055
3055
|
body: y(() => [
|
|
3056
|
-
|
|
3056
|
+
s.value ? (m(), D(v, {
|
|
3057
3057
|
key: 0,
|
|
3058
3058
|
type: "form"
|
|
3059
3059
|
})) : u.value ? (m(), D(b, {
|
|
@@ -3080,7 +3080,7 @@ const Vi = {
|
|
|
3080
3080
|
appearance: "danger",
|
|
3081
3081
|
"data-testid": "form-error"
|
|
3082
3082
|
}, null, 8, ["alert-message"])) : G("", !0),
|
|
3083
|
-
F("div",
|
|
3083
|
+
F("div", fl, [
|
|
3084
3084
|
J(p.$slots, "form-actions", {}, () => [
|
|
3085
3085
|
O(w, {
|
|
3086
3086
|
appearance: "outline",
|
|
@@ -3106,13 +3106,13 @@ const Vi = {
|
|
|
3106
3106
|
}, 8, ["disabled"])
|
|
3107
3107
|
], !0)
|
|
3108
3108
|
])
|
|
3109
|
-
], 40,
|
|
3109
|
+
], 40, pl))
|
|
3110
3110
|
]),
|
|
3111
3111
|
_: 3
|
|
3112
3112
|
});
|
|
3113
3113
|
};
|
|
3114
3114
|
}
|
|
3115
|
-
}),
|
|
3115
|
+
}), gl = /* @__PURE__ */ me(ml, [["__scopeId", "data-v-44a90aae"]]), yl = { key: 0 }, hl = /* @__PURE__ */ te({
|
|
3116
3116
|
__name: "EntityBaseTableCell",
|
|
3117
3117
|
props: {
|
|
3118
3118
|
keyName: {
|
|
@@ -3139,16 +3139,16 @@ const Vi = {
|
|
|
3139
3139
|
let r;
|
|
3140
3140
|
const i = () => {
|
|
3141
3141
|
r && (r.disconnect(), r = void 0);
|
|
3142
|
-
},
|
|
3142
|
+
}, l = () => {
|
|
3143
3143
|
var C, p, I;
|
|
3144
|
-
u.value = ((C = a.value) == null ? void 0 : C.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, c.value = ((I =
|
|
3145
|
-
},
|
|
3144
|
+
u.value = ((C = a.value) == null ? void 0 : C.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, c.value = ((I = s.value) == null ? void 0 : I.innerText) || "";
|
|
3145
|
+
}, s = E({}), u = E(0), d = E(0), c = E(""), h = M(() => [a.value, t.value]), f = ve(
|
|
3146
3146
|
h,
|
|
3147
3147
|
(C) => {
|
|
3148
3148
|
if (o.value && (i(), "ResizeObserver" in window && window)) {
|
|
3149
3149
|
r = new ResizeObserver((p) => {
|
|
3150
3150
|
window.requestAnimationFrame(() => {
|
|
3151
|
-
!Array.isArray(p) || !p.length ||
|
|
3151
|
+
!Array.isArray(p) || !p.length || l();
|
|
3152
3152
|
});
|
|
3153
3153
|
});
|
|
3154
3154
|
for (const p of C)
|
|
@@ -3158,17 +3158,17 @@ const Vi = {
|
|
|
3158
3158
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3159
3159
|
), _ = M(() => o.value ? u.value > d.value : !1);
|
|
3160
3160
|
return ca(() => {
|
|
3161
|
-
|
|
3161
|
+
l();
|
|
3162
3162
|
}), da(() => {
|
|
3163
3163
|
f();
|
|
3164
3164
|
}), (C, p) => {
|
|
3165
3165
|
const I = L("KTooltip");
|
|
3166
3166
|
return m(), $("span", {
|
|
3167
3167
|
ref_key: "contentRef",
|
|
3168
|
-
ref:
|
|
3168
|
+
ref: s,
|
|
3169
3169
|
class: "content-wrapper"
|
|
3170
3170
|
}, [
|
|
3171
|
-
o.value ? (m(), $("span",
|
|
3171
|
+
o.value ? (m(), $("span", yl, [
|
|
3172
3172
|
O(I, {
|
|
3173
3173
|
disabled: !_.value,
|
|
3174
3174
|
label: c.value,
|
|
@@ -3184,10 +3184,10 @@ const Vi = {
|
|
|
3184
3184
|
], 512);
|
|
3185
3185
|
};
|
|
3186
3186
|
}
|
|
3187
|
-
}),
|
|
3187
|
+
}), vl = /* @__PURE__ */ me(hl, [["__scopeId", "data-v-f8a220e9"]]), bl = { class: "toolbar-container" }, Cl = {
|
|
3188
3188
|
key: 0,
|
|
3189
3189
|
class: "toolbar-button-container"
|
|
3190
|
-
},
|
|
3190
|
+
}, kl = ["data-testid"], _l = /* @__PURE__ */ te({
|
|
3191
3191
|
__name: "EntityBaseTable",
|
|
3192
3192
|
props: {
|
|
3193
3193
|
// table header configuration
|
|
@@ -3309,13 +3309,13 @@ const Vi = {
|
|
|
3309
3309
|
key: "actions",
|
|
3310
3310
|
hideLabel: !0
|
|
3311
3311
|
}), b;
|
|
3312
|
-
}),
|
|
3312
|
+
}), l = (b) => ({
|
|
3313
3313
|
"data-rowid": b.id,
|
|
3314
3314
|
"data-testid": b.name,
|
|
3315
3315
|
...t.rowAttributes(b)
|
|
3316
|
-
}),
|
|
3316
|
+
}), s = E({}), u = (b) => {
|
|
3317
3317
|
var K;
|
|
3318
|
-
return (K =
|
|
3318
|
+
return (K = s.value) == null ? void 0 : K.$el.querySelector(`[data-rowid="${b.id}"]`);
|
|
3319
3319
|
}, d = (b) => {
|
|
3320
3320
|
const K = {
|
|
3321
3321
|
"data-testid": b.headerKey,
|
|
@@ -3352,7 +3352,7 @@ const Vi = {
|
|
|
3352
3352
|
body: y(() => [
|
|
3353
3353
|
O(k, {
|
|
3354
3354
|
ref_key: "tableRefs",
|
|
3355
|
-
ref:
|
|
3355
|
+
ref: s,
|
|
3356
3356
|
"cache-identifier": o.value,
|
|
3357
3357
|
"cell-attrs": d,
|
|
3358
3358
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
@@ -3374,7 +3374,7 @@ const Vi = {
|
|
|
3374
3374
|
"initial-fetcher-params": I.value,
|
|
3375
3375
|
"is-loading": e.isLoading,
|
|
3376
3376
|
"pagination-type": e.paginationType,
|
|
3377
|
-
"row-attrs":
|
|
3377
|
+
"row-attrs": l,
|
|
3378
3378
|
"search-input": e.query,
|
|
3379
3379
|
onKtableEmptyStateCtaClicked: c,
|
|
3380
3380
|
"onRow:click": f.value,
|
|
@@ -3382,9 +3382,9 @@ const Vi = {
|
|
|
3382
3382
|
"onUpdate:tablePreferences": v
|
|
3383
3383
|
}, be({
|
|
3384
3384
|
toolbar: y(({ state: P }) => [
|
|
3385
|
-
Ve(F("div",
|
|
3385
|
+
Ve(F("div", bl, [
|
|
3386
3386
|
J(b.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3387
|
-
b.$slots["toolbar-button"] ? (m(), $("div",
|
|
3387
|
+
b.$slots["toolbar-button"] ? (m(), $("div", Cl, [
|
|
3388
3388
|
J(b.$slots, "toolbar-button", {}, void 0, !0)
|
|
3389
3389
|
])) : G("", !0)
|
|
3390
3390
|
], 512), [
|
|
@@ -3415,7 +3415,7 @@ const Vi = {
|
|
|
3415
3415
|
}, {
|
|
3416
3416
|
icon: y(() => [
|
|
3417
3417
|
O(w, {
|
|
3418
|
-
color: g(
|
|
3418
|
+
color: g(lo),
|
|
3419
3419
|
icon: "more",
|
|
3420
3420
|
size: "16"
|
|
3421
3421
|
}, null, 8, ["color"])
|
|
@@ -3425,14 +3425,14 @@ const Vi = {
|
|
|
3425
3425
|
]),
|
|
3426
3426
|
_: 2
|
|
3427
3427
|
}, 1032, ["width"])
|
|
3428
|
-
], 8,
|
|
3428
|
+
], 8, kl)
|
|
3429
3429
|
]),
|
|
3430
3430
|
_: 2
|
|
3431
3431
|
}, [
|
|
3432
3432
|
ce(e.tableHeaders, (P, U) => ({
|
|
3433
3433
|
name: U,
|
|
3434
3434
|
fn: y(({ row: S, rowKey: N, rowValue: q }) => [
|
|
3435
|
-
O(
|
|
3435
|
+
O(vl, {
|
|
3436
3436
|
"key-name": String(U),
|
|
3437
3437
|
"row-el": u(S)
|
|
3438
3438
|
}, {
|
|
@@ -3455,13 +3455,13 @@ const Vi = {
|
|
|
3455
3455
|
}, 8, ["title"]);
|
|
3456
3456
|
};
|
|
3457
3457
|
}
|
|
3458
|
-
}),
|
|
3458
|
+
}), wl = /* @__PURE__ */ me(_l, [["__scopeId", "data-v-6bf92df6"]]), Il = {
|
|
3459
3459
|
key: 0,
|
|
3460
3460
|
class: "kong-ui-entity-delete-error"
|
|
3461
|
-
},
|
|
3461
|
+
}, Al = {
|
|
3462
3462
|
key: 1,
|
|
3463
3463
|
class: "description"
|
|
3464
|
-
},
|
|
3464
|
+
}, Sl = /* @__PURE__ */ te({
|
|
3465
3465
|
__name: "EntityDeleteModal",
|
|
3466
3466
|
props: {
|
|
3467
3467
|
visible: {
|
|
@@ -3505,7 +3505,7 @@ const Vi = {
|
|
|
3505
3505
|
}, i = () => {
|
|
3506
3506
|
n("proceed");
|
|
3507
3507
|
};
|
|
3508
|
-
return (
|
|
3508
|
+
return (l, s) => {
|
|
3509
3509
|
const u = L("KAlert"), d = L("KPrompt");
|
|
3510
3510
|
return m(), D(d, {
|
|
3511
3511
|
"action-button-text": "Yes, delete",
|
|
@@ -3519,7 +3519,7 @@ const Vi = {
|
|
|
3519
3519
|
onProceed: i
|
|
3520
3520
|
}, {
|
|
3521
3521
|
"body-content": y(() => [
|
|
3522
|
-
e.error ? (m(), $("div",
|
|
3522
|
+
e.error ? (m(), $("div", Il, [
|
|
3523
3523
|
O(u, { appearance: "danger" }, {
|
|
3524
3524
|
alertMessage: y(() => [
|
|
3525
3525
|
W(j(e.error), 1)
|
|
@@ -3545,8 +3545,8 @@ const Vi = {
|
|
|
3545
3545
|
key: "0"
|
|
3546
3546
|
} : void 0
|
|
3547
3547
|
]), 1032, ["keypath"]),
|
|
3548
|
-
t.description ||
|
|
3549
|
-
J(
|
|
3548
|
+
t.description || l.$slots.description ? (m(), $("div", Al, [
|
|
3549
|
+
J(l.$slots, "description", {}, () => [
|
|
3550
3550
|
F("p", null, j(t.description), 1)
|
|
3551
3551
|
], !0)
|
|
3552
3552
|
])) : G("", !0)
|
|
@@ -3555,13 +3555,13 @@ const Vi = {
|
|
|
3555
3555
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3556
3556
|
};
|
|
3557
3557
|
}
|
|
3558
|
-
}),
|
|
3558
|
+
}), xl = /* @__PURE__ */ me(Sl, [["__scopeId", "data-v-1c9a2a07"]]), Tl = {
|
|
3559
3559
|
fill: "none",
|
|
3560
3560
|
height: "20",
|
|
3561
3561
|
viewBox: "0 0 20 20",
|
|
3562
3562
|
width: "20",
|
|
3563
3563
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3564
|
-
}, $
|
|
3564
|
+
}, $l = {
|
|
3565
3565
|
id: "mask0_180_20349",
|
|
3566
3566
|
height: "20",
|
|
3567
3567
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3569,7 +3569,7 @@ const Vi = {
|
|
|
3569
3569
|
width: "20",
|
|
3570
3570
|
x: "0",
|
|
3571
3571
|
y: "0"
|
|
3572
|
-
},
|
|
3572
|
+
}, jl = ["fill"], Ml = { mask: "url(#mask0_180_20349)" }, Ol = ["fill"], El = /* @__PURE__ */ te({
|
|
3573
3573
|
__name: "IconFilter",
|
|
3574
3574
|
props: {
|
|
3575
3575
|
color: {
|
|
@@ -3578,26 +3578,26 @@ const Vi = {
|
|
|
3578
3578
|
}
|
|
3579
3579
|
},
|
|
3580
3580
|
setup(e) {
|
|
3581
|
-
return (n, t) => (m(), $("svg",
|
|
3582
|
-
F("mask", $
|
|
3581
|
+
return (n, t) => (m(), $("svg", Tl, [
|
|
3582
|
+
F("mask", $l, [
|
|
3583
3583
|
F("rect", {
|
|
3584
3584
|
fill: e.color,
|
|
3585
3585
|
height: "20",
|
|
3586
3586
|
width: "20"
|
|
3587
|
-
}, null, 8,
|
|
3587
|
+
}, null, 8, jl)
|
|
3588
3588
|
]),
|
|
3589
|
-
F("g",
|
|
3589
|
+
F("g", Ml, [
|
|
3590
3590
|
F("path", {
|
|
3591
3591
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3592
3592
|
fill: e.color
|
|
3593
|
-
}, null, 8,
|
|
3593
|
+
}, null, 8, Ol)
|
|
3594
3594
|
])
|
|
3595
3595
|
]));
|
|
3596
3596
|
}
|
|
3597
|
-
}),
|
|
3597
|
+
}), Bl = {
|
|
3598
3598
|
key: 1,
|
|
3599
3599
|
class: "kong-ui-entity-filter"
|
|
3600
|
-
},
|
|
3600
|
+
}, Fl = { class: "menu-item-title" }, Kl = { class: "menu-item-indicator" }, Nl = { class: "menu-item-body" }, ql = ["for"], Ll = { class: "menu-item-buttons" }, Pl = /* @__PURE__ */ te({
|
|
3601
3601
|
__name: "EntityFilter",
|
|
3602
3602
|
props: {
|
|
3603
3603
|
// filter config, either exact match or fuzzy match
|
|
@@ -3622,7 +3622,7 @@ const Vi = {
|
|
|
3622
3622
|
return new URLSearchParams(t.modelValue).forEach((I, v) => {
|
|
3623
3623
|
I !== "" && p.push(v);
|
|
3624
3624
|
}), p;
|
|
3625
|
-
}),
|
|
3625
|
+
}), l = M(() => {
|
|
3626
3626
|
const p = t.config.fields;
|
|
3627
3627
|
return Object.keys(p).filter((I) => p[I].searchable).map((I) => ({
|
|
3628
3628
|
label: p[I].label || I,
|
|
@@ -3634,7 +3634,7 @@ const Vi = {
|
|
|
3634
3634
|
r.value[v] = I;
|
|
3635
3635
|
});
|
|
3636
3636
|
});
|
|
3637
|
-
const
|
|
3637
|
+
const s = () => {
|
|
3638
3638
|
o.value = !o.value;
|
|
3639
3639
|
}, u = (p) => {
|
|
3640
3640
|
n("update:modelValue", p);
|
|
@@ -3670,15 +3670,15 @@ const Vi = {
|
|
|
3670
3670
|
"onUpdate:modelValue": u
|
|
3671
3671
|
}, {
|
|
3672
3672
|
icon: y(() => [
|
|
3673
|
-
O(
|
|
3673
|
+
O(El)
|
|
3674
3674
|
]),
|
|
3675
3675
|
_: 1
|
|
3676
|
-
}, 8, ["model-value", "placeholder"])) : (m(), $("div",
|
|
3676
|
+
}, 8, ["model-value", "placeholder"])) : (m(), $("div", Bl, [
|
|
3677
3677
|
O(b, {
|
|
3678
3678
|
appearance: "btn-link",
|
|
3679
3679
|
"data-testid": "filter-button",
|
|
3680
3680
|
icon: "filter",
|
|
3681
|
-
onClick:
|
|
3681
|
+
onClick: s
|
|
3682
3682
|
}, {
|
|
3683
3683
|
default: y(() => [
|
|
3684
3684
|
W(j(g(a)("filter.filterButtonText")) + " " + j(i.value.length > 0 ? `(${i.value.length})` : ""), 1)
|
|
@@ -3687,22 +3687,22 @@ const Vi = {
|
|
|
3687
3687
|
}),
|
|
3688
3688
|
Ve(F("div", {
|
|
3689
3689
|
class: "kong-ui-entity-filter-backdrop",
|
|
3690
|
-
onClick:
|
|
3690
|
+
onClick: s
|
|
3691
3691
|
}, null, 512), [
|
|
3692
3692
|
[Ue, o.value]
|
|
3693
3693
|
]),
|
|
3694
3694
|
Ve(O(B, { class: "kong-ui-entity-filter-menu" }, {
|
|
3695
3695
|
body: y(() => [
|
|
3696
|
-
(m(!0), $(pe, null, ce(
|
|
3696
|
+
(m(!0), $(pe, null, ce(l.value, (R, k) => (m(), D(w, {
|
|
3697
3697
|
key: R.value,
|
|
3698
3698
|
"data-testid": R.value,
|
|
3699
3699
|
expandable: "",
|
|
3700
|
-
"last-menu-item": k ===
|
|
3700
|
+
"last-menu-item": k === l.value.length - 1
|
|
3701
3701
|
}, {
|
|
3702
3702
|
itemTitle: y(() => [
|
|
3703
|
-
F("span",
|
|
3703
|
+
F("span", Fl, [
|
|
3704
3704
|
W(j(R.label) + " ", 1),
|
|
3705
|
-
Ve(F("span",
|
|
3705
|
+
Ve(F("span", Kl, null, 512), [
|
|
3706
3706
|
[Ue, i.value.includes(R.value)]
|
|
3707
3707
|
])
|
|
3708
3708
|
])
|
|
@@ -3710,11 +3710,11 @@ const Vi = {
|
|
|
3710
3710
|
itemBody: y(() => {
|
|
3711
3711
|
var A, P;
|
|
3712
3712
|
return [
|
|
3713
|
-
F("div",
|
|
3713
|
+
F("div", Nl, [
|
|
3714
3714
|
F("label", {
|
|
3715
3715
|
class: "menu-item-label",
|
|
3716
3716
|
for: d(R.value)
|
|
3717
|
-
}, j(g(a)("filter.fieldLabel")), 9,
|
|
3717
|
+
}, j(g(a)("filter.fieldLabel")), 9, ql),
|
|
3718
3718
|
((P = (A = e.config.schema) == null ? void 0 : A[R.value]) == null ? void 0 : P.type) === "select" ? (m(), D(K, {
|
|
3719
3719
|
key: 0,
|
|
3720
3720
|
id: d(R.value),
|
|
@@ -3734,7 +3734,7 @@ const Vi = {
|
|
|
3734
3734
|
type: h(R.value)
|
|
3735
3735
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3736
3736
|
]),
|
|
3737
|
-
F("div",
|
|
3737
|
+
F("div", Ll, [
|
|
3738
3738
|
O(b, {
|
|
3739
3739
|
appearance: "btn-link",
|
|
3740
3740
|
"data-testid": "apply-filter",
|
|
@@ -3778,7 +3778,7 @@ const Vi = {
|
|
|
3778
3778
|
]));
|
|
3779
3779
|
};
|
|
3780
3780
|
}
|
|
3781
|
-
}),
|
|
3781
|
+
}), Rl = /* @__PURE__ */ me(Pl, [["__scopeId", "data-v-745f38c0"]]), De = /* @__PURE__ */ te({
|
|
3782
3782
|
__name: "PermissionsWrapper",
|
|
3783
3783
|
props: {
|
|
3784
3784
|
/**
|
|
@@ -3808,16 +3808,16 @@ const Vi = {
|
|
|
3808
3808
|
isAllowed: t.value
|
|
3809
3809
|
}) : G("", !0);
|
|
3810
3810
|
}
|
|
3811
|
-
}),
|
|
3811
|
+
}), Dl = { class: "form-section-wrapper" }, Vl = {
|
|
3812
3812
|
key: 0,
|
|
3813
3813
|
class: "form-section-title"
|
|
3814
|
-
},
|
|
3814
|
+
}, Ul = {
|
|
3815
3815
|
key: 1,
|
|
3816
3816
|
class: "form-section-description"
|
|
3817
|
-
},
|
|
3817
|
+
}, Gl = {
|
|
3818
3818
|
key: 2,
|
|
3819
3819
|
class: "form-section-footer"
|
|
3820
|
-
},
|
|
3820
|
+
}, Hl = { class: "form-section-content" }, Yl = /* @__PURE__ */ te({
|
|
3821
3821
|
__name: "EntityFormSection",
|
|
3822
3822
|
props: {
|
|
3823
3823
|
title: {
|
|
@@ -3846,35 +3846,35 @@ const Vi = {
|
|
|
3846
3846
|
return (t, a) => (m(), $("fieldset", {
|
|
3847
3847
|
class: Ae(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
3848
3848
|
}, [
|
|
3849
|
-
F("div",
|
|
3849
|
+
F("div", Dl, [
|
|
3850
3850
|
e.hideInfoHeader ? G("", !0) : (m(), $("div", {
|
|
3851
3851
|
key: 0,
|
|
3852
3852
|
class: Ae(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
3853
3853
|
}, [
|
|
3854
|
-
e.title ? (m(), $("h4",
|
|
3855
|
-
e.description || g(n).description ? (m(), $("div",
|
|
3854
|
+
e.title ? (m(), $("h4", Vl, j(e.title), 1)) : G("", !0),
|
|
3855
|
+
e.description || g(n).description ? (m(), $("div", Ul, [
|
|
3856
3856
|
J(t.$slots, "description", {}, () => [
|
|
3857
3857
|
F("p", null, j(e.description), 1)
|
|
3858
3858
|
], !0)
|
|
3859
3859
|
])) : G("", !0),
|
|
3860
|
-
g(n).footer ? (m(), $("div",
|
|
3860
|
+
g(n).footer ? (m(), $("div", Gl, [
|
|
3861
3861
|
J(t.$slots, "footer", {}, void 0, !0)
|
|
3862
3862
|
])) : G("", !0)
|
|
3863
3863
|
], 2)),
|
|
3864
|
-
F("div",
|
|
3864
|
+
F("div", Hl, [
|
|
3865
3865
|
J(t.$slots, "default", {}, void 0, !0)
|
|
3866
3866
|
])
|
|
3867
3867
|
])
|
|
3868
3868
|
], 2));
|
|
3869
3869
|
}
|
|
3870
|
-
}),
|
|
3871
|
-
const
|
|
3870
|
+
}), zl = /* @__PURE__ */ me(Yl, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: St, useDeleteUrlBuilder: Jl, useErrors: Wl, useFetchUrlBuilder: Cs, useFetcher: Zl, useDebouncedFilter: Ql, useStringHelpers: ks, useHelpers: _s, useGatewayFeatureSupported: ws, useTruncationDetector: Is } = oe;
|
|
3871
|
+
const Xl = { class: "add-consumer-form-container" }, es = { class: "add-consumer-form-cta" }, ts = { class: "select-item-label" }, ns = {
|
|
3872
3872
|
key: 0,
|
|
3873
3873
|
class: "select-item-desc"
|
|
3874
|
-
},
|
|
3874
|
+
}, as = {
|
|
3875
3875
|
key: 0,
|
|
3876
3876
|
class: "kong-ui-entity-add-consumers-error"
|
|
3877
|
-
},
|
|
3877
|
+
}, os = { key: 0 }, rs = /* @__PURE__ */ te({
|
|
3878
3878
|
__name: "AddConsumerModal",
|
|
3879
3879
|
props: {
|
|
3880
3880
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3896,12 +3896,12 @@ const Xs = { class: "add-consumer-form-container" }, el = { class: "add-consumer
|
|
|
3896
3896
|
headers: (U = t.config) == null ? void 0 : U.requestHeaders
|
|
3897
3897
|
}), r = E([]), {
|
|
3898
3898
|
debouncedQueryChange: i,
|
|
3899
|
-
loading:
|
|
3900
|
-
allRecords:
|
|
3899
|
+
loading: l,
|
|
3900
|
+
allRecords: s,
|
|
3901
3901
|
error: u,
|
|
3902
3902
|
loadItems: d,
|
|
3903
3903
|
results: c
|
|
3904
|
-
} =
|
|
3904
|
+
} = Ql(
|
|
3905
3905
|
t.config,
|
|
3906
3906
|
Se.list[t.config.app].all,
|
|
3907
3907
|
"",
|
|
@@ -3909,7 +3909,7 @@ const Xs = { class: "add-consumer-form-container" }, el = { class: "add-consumer
|
|
|
3909
3909
|
fetchedItemsKey: "data",
|
|
3910
3910
|
searchKeys: ["username", "id"]
|
|
3911
3911
|
}
|
|
3912
|
-
), h = (S) => S, f = M(() => u.value ? a("consumers.errors.general") : ""), _ = E(0), C = M(() =>
|
|
3912
|
+
), h = (S) => S, f = M(() => u.value ? a("consumers.errors.general") : ""), _ = E(0), C = M(() => s.value === void 0), p = M(() => c.value.map((S) => ({
|
|
3913
3913
|
label: S.username || S.customId,
|
|
3914
3914
|
value: S.id,
|
|
3915
3915
|
selected: r.value.includes(S.id),
|
|
@@ -3917,7 +3917,7 @@ const Xs = { class: "add-consumer-form-container" }, el = { class: "add-consumer
|
|
|
3917
3917
|
// we need this to determine whether or not to show the description text
|
|
3918
3918
|
}))), I = (S) => {
|
|
3919
3919
|
var q;
|
|
3920
|
-
const N = C.value ? c.value.find((V) => V.id === S) : (q =
|
|
3920
|
+
const N = C.value ? c.value.find((V) => V.id === S) : (q = s.value) == null ? void 0 : q.find((V) => V.id === S);
|
|
3921
3921
|
return N ? N.username || N.custom_id : S;
|
|
3922
3922
|
}, v = () => {
|
|
3923
3923
|
w.value = "", b.value = [], A.value = [], n("cancel");
|
|
@@ -3975,8 +3975,8 @@ const Xs = { class: "add-consumer-form-container" }, el = { class: "add-consumer
|
|
|
3975
3975
|
onProceed: B
|
|
3976
3976
|
}, {
|
|
3977
3977
|
"body-content": y(() => [
|
|
3978
|
-
F("div",
|
|
3979
|
-
F("p",
|
|
3978
|
+
F("div", Xl, [
|
|
3979
|
+
F("p", es, j(g(a)("consumers.consumer_groups.add.ctaText")), 1),
|
|
3980
3980
|
O(q, {
|
|
3981
3981
|
modelValue: r.value,
|
|
3982
3982
|
"onUpdate:modelValue": N[0] || (N[0] = (H) => r.value = H),
|
|
@@ -3985,7 +3985,7 @@ const Xs = { class: "add-consumer-form-container" }, el = { class: "add-consumer
|
|
|
3985
3985
|
"dropdown-footer-text": C.value ? g(a)("consumers.consumer_groups.add.footer") : void 0,
|
|
3986
3986
|
items: p.value,
|
|
3987
3987
|
label: g(a)("consumers.consumer_groups.add.consumers_label"),
|
|
3988
|
-
loading: g(
|
|
3988
|
+
loading: g(l),
|
|
3989
3989
|
placeholder: g(a)("consumers.consumer_groups.add.consumer_placeholder"),
|
|
3990
3990
|
readonly: K.value,
|
|
3991
3991
|
required: "",
|
|
@@ -3993,16 +3993,16 @@ const Xs = { class: "add-consumer-form-container" }, el = { class: "add-consumer
|
|
|
3993
3993
|
onQueryChange: g(i)
|
|
3994
3994
|
}, {
|
|
3995
3995
|
"item-template": y(({ item: H }) => [
|
|
3996
|
-
F("div",
|
|
3997
|
-
h(H).data.username && h(H).data.custom_id ? (m(), $("div",
|
|
3996
|
+
F("div", ts, j(H.label), 1),
|
|
3997
|
+
h(H).data.username && h(H).data.custom_id ? (m(), $("div", ns, j(h(H).data.custom_id), 1)) : G("", !0)
|
|
3998
3998
|
]),
|
|
3999
3999
|
_: 1
|
|
4000
4000
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4001
|
-
w.value || f.value || A.value.length ? (m(), $("div",
|
|
4001
|
+
w.value || f.value || A.value.length ? (m(), $("div", as, [
|
|
4002
4002
|
O(V, { appearance: "danger" }, {
|
|
4003
4003
|
alertMessage: y(() => [
|
|
4004
4004
|
F("p", null, j(g(a)("consumers.errors.add")), 1),
|
|
4005
|
-
A.value.length ? (m(), $("ul",
|
|
4005
|
+
A.value.length ? (m(), $("ul", os, [
|
|
4006
4006
|
(m(!0), $(pe, null, ce(A.value, (H, Q) => (m(), $("li", { key: Q }, j(H), 1))), 128))
|
|
4007
4007
|
])) : G("", !0),
|
|
4008
4008
|
F("div", null, j(w.value || f.value), 1)
|
|
@@ -4022,7 +4022,7 @@ const xt = (e, n) => {
|
|
|
4022
4022
|
for (const [a, o] of n)
|
|
4023
4023
|
t[a] = o;
|
|
4024
4024
|
return t;
|
|
4025
|
-
},
|
|
4025
|
+
}, is = /* @__PURE__ */ xt(rs, [["__scopeId", "data-v-86f09821"]]), ls = { class: "kong-ui-entities-consumers-list" }, ss = { key: 1 }, us = /* @__PURE__ */ te({
|
|
4026
4026
|
__name: "ConsumerList",
|
|
4027
4027
|
props: {
|
|
4028
4028
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4066,7 +4066,7 @@ const xt = (e, n) => {
|
|
|
4066
4066
|
var Et;
|
|
4067
4067
|
const t = e, { i18nT: a, i18n: { t: o } } = Xe.useI18n(), r = gt(), { axiosInstance: i } = St({
|
|
4068
4068
|
headers: (Et = t.config) == null ? void 0 : Et.requestHeaders
|
|
4069
|
-
}),
|
|
4069
|
+
}), l = E(1), s = M(() => !!t.config.consumerGroupId), u = M(() => t.config.app !== "kongManager" || !!t.config.disableSorting), d = {
|
|
4070
4070
|
username: { label: o("consumers.list.table_headers.username"), searchable: !0, sortable: !0 },
|
|
4071
4071
|
custom_id: { label: o("consumers.list.table_headers.custom_id"), searchable: !0, sortable: !0 },
|
|
4072
4072
|
tags: { label: o("consumers.list.table_headers.tags"), sortable: !1 }
|
|
@@ -4074,7 +4074,7 @@ const xt = (e, n) => {
|
|
|
4074
4074
|
"data-testid": T.username ?? T.custom_id ?? T.id
|
|
4075
4075
|
}), f = M(() => {
|
|
4076
4076
|
var Y, ae, fe, _e;
|
|
4077
|
-
let T = `${t.config.apiBaseUrl}${Se.list[t.config.app][
|
|
4077
|
+
let T = `${t.config.apiBaseUrl}${Se.list[t.config.app][s.value ? "forConsumerGroup" : "all"]}`;
|
|
4078
4078
|
return t.config.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, ((Y = t.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((ae = t.config) == null ? void 0 : ae.consumerGroupId) || "") : t.config.app === "kongManager" && (T = T.replace(/\/{workspace}/gi, (fe = t.config) != null && fe.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((_e = t.config) == null ? void 0 : _e.consumerGroupId) || "")), T;
|
|
4079
4079
|
}), _ = E(""), C = M(() => {
|
|
4080
4080
|
const T = t.config.app === "konnect" || t.config.isExactMatch;
|
|
@@ -4089,10 +4089,10 @@ const xt = (e, n) => {
|
|
|
4089
4089
|
},
|
|
4090
4090
|
schema: t.config.filterSchema
|
|
4091
4091
|
};
|
|
4092
|
-
}), p = M(() =>
|
|
4092
|
+
}), p = M(() => s.value ? "consumers" : void 0), { fetcher: I, fetcherState: v } = Zl(t.config, f.value, p.value), b = () => {
|
|
4093
4093
|
_.value = "";
|
|
4094
4094
|
}, K = () => {
|
|
4095
|
-
|
|
4095
|
+
l.value++;
|
|
4096
4096
|
}, w = (T) => T ?? "-", B = E(""), R = (T, Y) => {
|
|
4097
4097
|
const ae = T.id;
|
|
4098
4098
|
if (!Y(ae)) {
|
|
@@ -4130,16 +4130,16 @@ const xt = (e, n) => {
|
|
|
4130
4130
|
}), U = (T) => ({
|
|
4131
4131
|
label: o("consumers.actions.edit"),
|
|
4132
4132
|
to: t.config.getEditRoute(T)
|
|
4133
|
-
}), S = E(void 0), N = E(!1), q = E(!1), V = E(""), Z =
|
|
4133
|
+
}), S = E(void 0), N = E(!1), q = E(!1), V = E(""), Z = Jl(t.config, f.value), H = (T) => {
|
|
4134
4134
|
S.value = T, N.value = !0;
|
|
4135
4135
|
}, Q = () => {
|
|
4136
4136
|
N.value = !1;
|
|
4137
|
-
},
|
|
4137
|
+
}, se = async () => {
|
|
4138
4138
|
var T, Y, ae;
|
|
4139
4139
|
if ((T = S.value) != null && T.id) {
|
|
4140
4140
|
q.value = !0;
|
|
4141
4141
|
try {
|
|
4142
|
-
await i.delete(Z(S.value.id)), q.value = !1, N.value = !1,
|
|
4142
|
+
await i.delete(Z(S.value.id)), q.value = !1, N.value = !1, l.value++, n("delete:success", S.value);
|
|
4143
4143
|
} catch (fe) {
|
|
4144
4144
|
V.value = ((ae = (Y = fe.response) == null ? void 0 : Y.data) == null ? void 0 : ae.message) || fe.message || o("consumers.errors.delete"), n("error", fe);
|
|
4145
4145
|
} finally {
|
|
@@ -4151,9 +4151,9 @@ const xt = (e, n) => {
|
|
|
4151
4151
|
}, $t = () => {
|
|
4152
4152
|
tt.value = !1;
|
|
4153
4153
|
}, jt = (T, Y) => {
|
|
4154
|
-
Y || $t(),
|
|
4154
|
+
Y || $t(), l.value++, n("add:success", T);
|
|
4155
4155
|
}, ea = () => {
|
|
4156
|
-
|
|
4156
|
+
s.value && Tt();
|
|
4157
4157
|
}, ye = E(void 0), nt = E(!1), ta = E(""), na = (T) => {
|
|
4158
4158
|
ye.value = T, nt.value = !0;
|
|
4159
4159
|
}, Mt = () => {
|
|
@@ -4167,7 +4167,7 @@ const xt = (e, n) => {
|
|
|
4167
4167
|
Ot.value = !0;
|
|
4168
4168
|
try {
|
|
4169
4169
|
const T = aa.value.replace(/{consumerId}/gi, ye.value.id);
|
|
4170
|
-
await i.delete(T), n("remove:success", ye.value), Mt(),
|
|
4170
|
+
await i.delete(T), n("remove:success", ye.value), Mt(), l.value++;
|
|
4171
4171
|
} catch (T) {
|
|
4172
4172
|
ta.value = T.message || o("consumers.errors.delete"), n("error", T);
|
|
4173
4173
|
} finally {
|
|
@@ -4183,26 +4183,26 @@ const xt = (e, n) => {
|
|
|
4183
4183
|
B.value = "";
|
|
4184
4184
|
});
|
|
4185
4185
|
const at = E({
|
|
4186
|
-
ctaPath:
|
|
4186
|
+
ctaPath: s.value ? void 0 : t.config.createRoute,
|
|
4187
4187
|
ctaText: void 0,
|
|
4188
4188
|
message: o("consumers.list.empty_state.description"),
|
|
4189
4189
|
title: o("consumers.title")
|
|
4190
4190
|
});
|
|
4191
4191
|
return Qe(async () => {
|
|
4192
|
-
await t.canCreate() && (at.value.title =
|
|
4192
|
+
await t.canCreate() && (at.value.title = s.value ? o("consumers.list.empty_state.title_for_consumer_group") : o("consumers.list.empty_state.title"), at.value.ctaText = s.value ? o("consumers.actions.add_consumer") : o("consumers.actions.create"));
|
|
4193
4193
|
}), (T, Y) => {
|
|
4194
4194
|
const ae = L("KButton"), fe = L("KBadge"), _e = L("KTruncate"), Fe = L("KDropdownItem"), Bt = L("KClipboardProvider"), ra = L("KPrompt");
|
|
4195
|
-
return m(), $("div",
|
|
4196
|
-
O(g(
|
|
4195
|
+
return m(), $("div", ls, [
|
|
4196
|
+
O(g(wl), {
|
|
4197
4197
|
"cache-identifier": e.cacheIdentifier,
|
|
4198
|
-
"disable-pagination":
|
|
4198
|
+
"disable-pagination": s.value,
|
|
4199
4199
|
"disable-pagination-page-jump": "",
|
|
4200
4200
|
"disable-sorting": u.value,
|
|
4201
4201
|
"empty-state-options": at.value,
|
|
4202
4202
|
"enable-entity-actions": "",
|
|
4203
4203
|
"error-message": B.value,
|
|
4204
4204
|
fetcher: g(I),
|
|
4205
|
-
"fetcher-cache-key":
|
|
4205
|
+
"fetcher-cache-key": l.value,
|
|
4206
4206
|
"pagination-type": "offset",
|
|
4207
4207
|
"preferences-storage-key": "kong-ui-entities-consumers-list",
|
|
4208
4208
|
query: _.value,
|
|
@@ -4214,7 +4214,7 @@ const xt = (e, n) => {
|
|
|
4214
4214
|
onSort: K
|
|
4215
4215
|
}, {
|
|
4216
4216
|
"toolbar-filter": y(() => [
|
|
4217
|
-
|
|
4217
|
+
s.value ? G("", !0) : (m(), D(g(Rl), {
|
|
4218
4218
|
key: 0,
|
|
4219
4219
|
modelValue: _.value,
|
|
4220
4220
|
"onUpdate:modelValue": Y[0] || (Y[0] = (z) => _.value = z),
|
|
@@ -4263,7 +4263,7 @@ const xt = (e, n) => {
|
|
|
4263
4263
|
}, 1024))), 128))
|
|
4264
4264
|
]),
|
|
4265
4265
|
_: 2
|
|
4266
|
-
}, 1024)) : (m(), $("span",
|
|
4266
|
+
}, 1024)) : (m(), $("span", ss, "-"))
|
|
4267
4267
|
]),
|
|
4268
4268
|
actions: y(({ row: z }) => [
|
|
4269
4269
|
O(Bt, null, {
|
|
@@ -4338,19 +4338,19 @@ const xt = (e, n) => {
|
|
|
4338
4338
|
]),
|
|
4339
4339
|
_: 1
|
|
4340
4340
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4341
|
-
O(g(
|
|
4341
|
+
O(g(xl), {
|
|
4342
4342
|
"action-pending": q.value,
|
|
4343
4343
|
"data-testid": "delete-consumer-modal",
|
|
4344
4344
|
description: g(o)("consumers.delete.description"),
|
|
4345
4345
|
"entity-name": S.value && (S.value.username || S.value.custom_id || S.value.id),
|
|
4346
|
-
"entity-type": g(
|
|
4346
|
+
"entity-type": g(ln).Consumer,
|
|
4347
4347
|
error: V.value,
|
|
4348
4348
|
title: g(o)("consumers.delete.title"),
|
|
4349
4349
|
visible: N.value,
|
|
4350
4350
|
onCancel: Q,
|
|
4351
|
-
onProceed:
|
|
4351
|
+
onProceed: se
|
|
4352
4352
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4353
|
-
e.config.consumerGroupId ? (m(), D(
|
|
4353
|
+
e.config.consumerGroupId ? (m(), D(is, {
|
|
4354
4354
|
key: 0,
|
|
4355
4355
|
config: e.config,
|
|
4356
4356
|
"data-testid": "add-consumer-modal",
|
|
@@ -4395,7 +4395,7 @@ const xt = (e, n) => {
|
|
|
4395
4395
|
};
|
|
4396
4396
|
}
|
|
4397
4397
|
});
|
|
4398
|
-
const
|
|
4398
|
+
const As = /* @__PURE__ */ xt(us, [["__scopeId", "data-v-45929bbf"]]), cs = { class: "kong-ui-entities-consumer-form" }, ds = { class: "fields-group-title" }, ps = { class: "fields-group-text" }, fs = /* @__PURE__ */ te({
|
|
4399
4399
|
__name: "ConsumerForm",
|
|
4400
4400
|
props: {
|
|
4401
4401
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4416,7 +4416,7 @@ const Al = /* @__PURE__ */ xt(ul, [["__scopeId", "data-v-45929bbf"]]), cl = { cl
|
|
|
4416
4416
|
var K;
|
|
4417
4417
|
const t = e, { i18nT: a, i18n: { t: o } } = Xe.useI18n(), r = gt(), { axiosInstance: i } = St({
|
|
4418
4418
|
headers: (K = t.config) == null ? void 0 : K.requestHeaders
|
|
4419
|
-
}), { getMessageFromError:
|
|
4419
|
+
}), { getMessageFromError: l } = Wl(), s = Ft({
|
|
4420
4420
|
fields: {
|
|
4421
4421
|
username: "",
|
|
4422
4422
|
customId: "",
|
|
@@ -4440,40 +4440,40 @@ const Al = /* @__PURE__ */ xt(ul, [["__scopeId", "data-v-45929bbf"]]), cl = { cl
|
|
|
4440
4440
|
n("error", w);
|
|
4441
4441
|
}, _ = (w) => {
|
|
4442
4442
|
var R, k, A;
|
|
4443
|
-
|
|
4443
|
+
s.fields.username = ((R = w == null ? void 0 : w.item) == null ? void 0 : R.username) || (w == null ? void 0 : w.username) || "", s.fields.customId = ((k = w == null ? void 0 : w.item) == null ? void 0 : k.custom_id) || (w == null ? void 0 : w.custom_id) || "";
|
|
4444
4444
|
const B = ((A = w == null ? void 0 : w.item) == null ? void 0 : A.tags) || (w == null ? void 0 : w.tags) || [];
|
|
4445
|
-
|
|
4445
|
+
s.fields.tags = (B == null ? void 0 : B.join(", ")) || "", Object.assign(u, s.fields);
|
|
4446
4446
|
}, C = M(() => t.consumerId ? ut.Edit : ut.Create), p = (w) => {
|
|
4447
4447
|
var R, k, A, P, U, S;
|
|
4448
4448
|
let B = `${(R = t.config) == null ? void 0 : R.apiBaseUrl}${Se.form[(k = t.config) == null ? void 0 : k.app][w]}`;
|
|
4449
4449
|
return ((A = t.config) == null ? void 0 : A.app) === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((P = t.config) == null ? void 0 : P.controlPlaneId) || "") : ((U = t.config) == null ? void 0 : U.app) === "kongManager" && (B = B.replace(/\/{workspace}/gi, (S = t.config) != null && S.workspace ? `/${t.config.workspace}` : "")), B = B.replace(/{id}/gi, t.consumerId), B;
|
|
4450
|
-
}, I = M(() => !!
|
|
4450
|
+
}, I = M(() => !!s.fields.username || !!s.fields.customId), v = M(() => JSON.stringify(s.fields) !== JSON.stringify(u)), b = async () => {
|
|
4451
4451
|
var w, B, R;
|
|
4452
4452
|
try {
|
|
4453
|
-
|
|
4453
|
+
s.readonly = !0;
|
|
4454
4454
|
const k = {
|
|
4455
|
-
username:
|
|
4456
|
-
custom_id:
|
|
4457
|
-
tags: (B = (w =
|
|
4455
|
+
username: s.fields.username || null,
|
|
4456
|
+
custom_id: s.fields.customId || null,
|
|
4457
|
+
tags: (B = (w = s.fields.tags.split(",")) == null ? void 0 : w.map((P) => String(P || "").trim())) == null ? void 0 : B.filter((P) => P !== "")
|
|
4458
4458
|
};
|
|
4459
4459
|
let A;
|
|
4460
4460
|
await i.post(p("validate"), k), C.value === "create" ? A = await i.post(p("create"), k) : C.value === "edit" && (A = ((R = t.config) == null ? void 0 : R.app) === "konnect" ? await i.put(p("edit"), k) : await i.patch(p("edit"), k)), _(A == null ? void 0 : A.data), n("update", A == null ? void 0 : A.data);
|
|
4461
4461
|
} catch (k) {
|
|
4462
|
-
|
|
4462
|
+
s.errorMessage = l(k), n("error", k);
|
|
4463
4463
|
} finally {
|
|
4464
|
-
|
|
4464
|
+
s.readonly = !1;
|
|
4465
4465
|
}
|
|
4466
4466
|
};
|
|
4467
4467
|
return (w, B) => {
|
|
4468
4468
|
const R = L("KInput"), k = L("KCard");
|
|
4469
|
-
return m(), $("div",
|
|
4470
|
-
O(g(
|
|
4469
|
+
return m(), $("div", cs, [
|
|
4470
|
+
O(g(gl), {
|
|
4471
4471
|
"can-submit": I.value && v.value,
|
|
4472
4472
|
config: e.config,
|
|
4473
4473
|
"edit-id": e.consumerId,
|
|
4474
|
-
"error-message":
|
|
4474
|
+
"error-message": s.errorMessage,
|
|
4475
4475
|
"fetch-url": d.value,
|
|
4476
|
-
"is-readonly":
|
|
4476
|
+
"is-readonly": s.readonly,
|
|
4477
4477
|
onCancel: c,
|
|
4478
4478
|
"onFetch:error": B[3] || (B[3] = (A) => f(A)),
|
|
4479
4479
|
"onFetch:success": _,
|
|
@@ -4482,21 +4482,21 @@ const Al = /* @__PURE__ */ xt(ul, [["__scopeId", "data-v-45929bbf"]]), cl = { cl
|
|
|
4482
4482
|
}, {
|
|
4483
4483
|
default: y(() => [
|
|
4484
4484
|
F("div", null, [
|
|
4485
|
-
O(g(
|
|
4485
|
+
O(g(zl), {
|
|
4486
4486
|
description: g(o)("consumers.form.info.description"),
|
|
4487
4487
|
"has-divider": "",
|
|
4488
4488
|
title: g(o)("consumers.form.info.title")
|
|
4489
4489
|
}, {
|
|
4490
4490
|
default: y(() => [
|
|
4491
4491
|
F("div", null, [
|
|
4492
|
-
F("h5",
|
|
4493
|
-
F("p",
|
|
4492
|
+
F("h5", ds, j(g(o)("consumers.form.consumer_identification.title")) + "* ", 1),
|
|
4493
|
+
F("p", ps, j(g(o)("consumers.form.consumer_identification.description")), 1)
|
|
4494
4494
|
]),
|
|
4495
4495
|
O(k, null, {
|
|
4496
4496
|
body: y(() => [
|
|
4497
4497
|
O(R, {
|
|
4498
|
-
modelValue:
|
|
4499
|
-
"onUpdate:modelValue": B[0] || (B[0] = (A) =>
|
|
4498
|
+
modelValue: s.fields.username,
|
|
4499
|
+
"onUpdate:modelValue": B[0] || (B[0] = (A) => s.fields.username = A),
|
|
4500
4500
|
modelModifiers: { trim: !0 },
|
|
4501
4501
|
autocomplete: "off",
|
|
4502
4502
|
class: "username-field",
|
|
@@ -4506,7 +4506,7 @@ const Al = /* @__PURE__ */ xt(ul, [["__scopeId", "data-v-45929bbf"]]), cl = { cl
|
|
|
4506
4506
|
tooltipAttributes: { maxWidth: "250" }
|
|
4507
4507
|
},
|
|
4508
4508
|
placeholder: g(o)("consumers.fields.username.placeholder"),
|
|
4509
|
-
readonly:
|
|
4509
|
+
readonly: s.readonly,
|
|
4510
4510
|
type: "text"
|
|
4511
4511
|
}, {
|
|
4512
4512
|
"label-tooltip": y(() => [
|
|
@@ -4523,8 +4523,8 @@ const Al = /* @__PURE__ */ xt(ul, [["__scopeId", "data-v-45929bbf"]]), cl = { cl
|
|
|
4523
4523
|
_: 1
|
|
4524
4524
|
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
4525
4525
|
O(R, {
|
|
4526
|
-
modelValue:
|
|
4527
|
-
"onUpdate:modelValue": B[1] || (B[1] = (A) =>
|
|
4526
|
+
modelValue: s.fields.customId,
|
|
4527
|
+
"onUpdate:modelValue": B[1] || (B[1] = (A) => s.fields.customId = A),
|
|
4528
4528
|
modelModifiers: { trim: !0 },
|
|
4529
4529
|
autocomplete: "off",
|
|
4530
4530
|
"data-testid": "consumer-form-custom-id",
|
|
@@ -4533,7 +4533,7 @@ const Al = /* @__PURE__ */ xt(ul, [["__scopeId", "data-v-45929bbf"]]), cl = { cl
|
|
|
4533
4533
|
tooltipAttributes: { maxWidth: "250" }
|
|
4534
4534
|
},
|
|
4535
4535
|
placeholder: g(o)("consumers.fields.custom_id.placeholder"),
|
|
4536
|
-
readonly:
|
|
4536
|
+
readonly: s.readonly,
|
|
4537
4537
|
type: "text"
|
|
4538
4538
|
}, {
|
|
4539
4539
|
"label-tooltip": y(() => [
|
|
@@ -4553,8 +4553,8 @@ const Al = /* @__PURE__ */ xt(ul, [["__scopeId", "data-v-45929bbf"]]), cl = { cl
|
|
|
4553
4553
|
_: 1
|
|
4554
4554
|
}),
|
|
4555
4555
|
O(R, {
|
|
4556
|
-
modelValue:
|
|
4557
|
-
"onUpdate:modelValue": B[2] || (B[2] = (A) =>
|
|
4556
|
+
modelValue: s.fields.tags,
|
|
4557
|
+
"onUpdate:modelValue": B[2] || (B[2] = (A) => s.fields.tags = A),
|
|
4558
4558
|
modelModifiers: { trim: !0 },
|
|
4559
4559
|
autocomplete: "off",
|
|
4560
4560
|
"data-testid": "consumer-form-tags",
|
|
@@ -4565,7 +4565,7 @@ const Al = /* @__PURE__ */ xt(ul, [["__scopeId", "data-v-45929bbf"]]), cl = { cl
|
|
|
4565
4565
|
tooltipAttributes: { maxWidth: "250" }
|
|
4566
4566
|
},
|
|
4567
4567
|
placeholder: g(o)("consumers.fields.tags.placeholder"),
|
|
4568
|
-
readonly:
|
|
4568
|
+
readonly: s.readonly,
|
|
4569
4569
|
type: "text"
|
|
4570
4570
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
4571
4571
|
]),
|
|
@@ -4579,7 +4579,7 @@ const Al = /* @__PURE__ */ xt(ul, [["__scopeId", "data-v-45929bbf"]]), cl = { cl
|
|
|
4579
4579
|
};
|
|
4580
4580
|
}
|
|
4581
4581
|
});
|
|
4582
|
-
const
|
|
4582
|
+
const Ss = /* @__PURE__ */ xt(fs, [["__scopeId", "data-v-335659fc"]]), ms = { class: "kong-ui-consumer-entity-config-card" }, xs = /* @__PURE__ */ te({
|
|
4583
4583
|
__name: "ConsumerConfigCard",
|
|
4584
4584
|
props: {
|
|
4585
4585
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4631,17 +4631,17 @@ const Sl = /* @__PURE__ */ xt(fl, [["__scopeId", "data-v-335659fc"]]), ml = { cl
|
|
|
4631
4631
|
hidden: !0
|
|
4632
4632
|
}
|
|
4633
4633
|
});
|
|
4634
|
-
return (i,
|
|
4635
|
-
O(g(
|
|
4634
|
+
return (i, l) => (m(), $("div", ms, [
|
|
4635
|
+
O(g(dl), {
|
|
4636
4636
|
config: e.config,
|
|
4637
4637
|
"config-card-doc": e.configCardDoc,
|
|
4638
4638
|
"config-schema": r.value,
|
|
4639
4639
|
"fetch-url": o.value,
|
|
4640
4640
|
"hide-title": e.hideTitle,
|
|
4641
|
-
"onCopy:success":
|
|
4642
|
-
"onFetch:error":
|
|
4643
|
-
"onFetch:success":
|
|
4644
|
-
onLoading:
|
|
4641
|
+
"onCopy:success": l[0] || (l[0] = (s) => i.$emit("copy:success", s)),
|
|
4642
|
+
"onFetch:error": l[1] || (l[1] = (s) => i.$emit("fetch:error", s)),
|
|
4643
|
+
"onFetch:success": l[2] || (l[2] = (s) => i.$emit("fetch:success", s)),
|
|
4644
|
+
onLoading: l[3] || (l[3] = (s) => i.$emit("loading", s))
|
|
4645
4645
|
}, {
|
|
4646
4646
|
"username-label-tooltip": y(() => [
|
|
4647
4647
|
O(g(a), {
|
|
@@ -4671,7 +4671,7 @@ const Sl = /* @__PURE__ */ xt(fl, [["__scopeId", "data-v-335659fc"]]), ml = { cl
|
|
|
4671
4671
|
}
|
|
4672
4672
|
});
|
|
4673
4673
|
export {
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4674
|
+
xs as ConsumerConfigCard,
|
|
4675
|
+
Ss as ConsumerForm,
|
|
4676
|
+
As as ConsumerList
|
|
4677
4677
|
};
|