@kong-ui-public/entities-consumers 3.2.2-pr.1436.e4eeb147.0 → 3.2.2
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 +680 -680
- package/dist/entities-consumers.umd.js +22 -22
- package/dist/style.css +1 -1
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as W, computed as w, openBlock as f, createBlock as V, resolveDynamicComponent as be, normalizeStyle as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as W, computed as w, openBlock as f, createBlock as V, resolveDynamicComponent as be, normalizeStyle as Ue, withCtx as h, createElementBlock as O, toDisplayString as j, createCommentVNode as P, pushScopeId as Re, popScopeId as Ve, createElementVNode as F, ref as B, watch as ke, renderSlot as Q, unref as m, onBeforeMount as wt, resolveComponent as R, createSlots as Te, createVNode as T, createTextVNode as H, renderList as pe, withModifiers as gt, withDirectives as _e, vShow as Ie, Fragment as fe, normalizeClass as Ae, withKeys as Ir, useSlots as _t, useCssVars as yn, inject as Sr, onMounted as Ar, onUnmounted as xr, normalizeProps as $r, guardReactiveProps as Nr, mergeProps as Tr, Teleport as jr, reactive as Vt } from "vue";
|
|
2
|
+
import { useRouter as It } from "vue-router";
|
|
3
3
|
import { createI18n as hn, i18nTComponent as vn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Dt from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as Or } from "@kong/kongponents";
|
|
@@ -8,10 +8,10 @@ const Pt = "24px", Mr = (e, t) => {
|
|
|
8
8
|
for (const [r, a] of t)
|
|
9
9
|
n[r] = a;
|
|
10
10
|
return n;
|
|
11
|
-
},
|
|
11
|
+
}, Er = (e) => (Re("data-v-1d2a8d30"), e = e(), Ve(), e), qr = ["aria-hidden"], Fr = {
|
|
12
12
|
key: 0,
|
|
13
13
|
"data-testid": "kui-icon-svg-title"
|
|
14
|
-
}, Br = /* @__PURE__ */
|
|
14
|
+
}, Br = /* @__PURE__ */ Er(() => /* @__PURE__ */ F("path", {
|
|
15
15
|
d: "M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",
|
|
16
16
|
fill: "currentColor"
|
|
17
17
|
}, null, -1)), Kr = /* @__PURE__ */ W({
|
|
@@ -87,7 +87,7 @@ const Pt = "24px", Mr = (e, t) => {
|
|
|
87
87
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
88
88
|
class: "kui-icon add-icon",
|
|
89
89
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
90
|
-
style:
|
|
90
|
+
style: Ue(r.value)
|
|
91
91
|
}, {
|
|
92
92
|
default: h(() => [
|
|
93
93
|
(f(), O("svg", {
|
|
@@ -100,14 +100,14 @@ const Pt = "24px", Mr = (e, t) => {
|
|
|
100
100
|
width: "100%",
|
|
101
101
|
xmlns: "http://www.w3.org/2000/svg"
|
|
102
102
|
}, [
|
|
103
|
-
e.title ? (f(), O("title", Fr,
|
|
103
|
+
e.title ? (f(), O("title", Fr, j(e.title), 1)) : P("", !0),
|
|
104
104
|
Br
|
|
105
|
-
], 8,
|
|
105
|
+
], 8, qr))
|
|
106
106
|
]),
|
|
107
107
|
_: 1
|
|
108
108
|
}, 8, ["aria-hidden", "style"]));
|
|
109
109
|
}
|
|
110
|
-
}), Lr = /* @__PURE__ */ Mr(Kr, [["__scopeId", "data-v-1d2a8d30"]]),
|
|
110
|
+
}), Lr = /* @__PURE__ */ Mr(Kr, [["__scopeId", "data-v-1d2a8d30"]]), Ur = {
|
|
111
111
|
list: {
|
|
112
112
|
table_headers: {
|
|
113
113
|
username: "Username",
|
|
@@ -202,11 +202,11 @@ const Pt = "24px", Mr = (e, t) => {
|
|
|
202
202
|
tooltip: "An optional set of strings associated with the Consumer for grouping and filtering."
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
},
|
|
206
|
-
consumers:
|
|
205
|
+
}, Rr = {
|
|
206
|
+
consumers: Ur
|
|
207
207
|
};
|
|
208
208
|
function Vr() {
|
|
209
|
-
const e = hn("en-us",
|
|
209
|
+
const e = hn("en-us", Rr);
|
|
210
210
|
return {
|
|
211
211
|
i18n: e,
|
|
212
212
|
i18nT: vn(e)
|
|
@@ -215,7 +215,7 @@ function Vr() {
|
|
|
215
215
|
}
|
|
216
216
|
const at = {
|
|
217
217
|
useI18n: Vr
|
|
218
|
-
}, Me = "/v2/control-planes/{controlPlaneId}/core-entities",
|
|
218
|
+
}, Me = "/v2/control-planes/{controlPlaneId}/core-entities", Ee = "/{workspace}", je = {
|
|
219
219
|
list: {
|
|
220
220
|
konnect: {
|
|
221
221
|
all: `${Me}/consumers`,
|
|
@@ -223,9 +223,9 @@ const at = {
|
|
|
223
223
|
oneForConsumerGroup: `${Me}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`
|
|
224
224
|
},
|
|
225
225
|
kongManager: {
|
|
226
|
-
all: `${
|
|
227
|
-
forConsumerGroup: `${
|
|
228
|
-
oneForConsumerGroup: `${
|
|
226
|
+
all: `${Ee}/consumers`,
|
|
227
|
+
forConsumerGroup: `${Ee}/consumer_groups/{consumerGroupId}/consumers`,
|
|
228
|
+
oneForConsumerGroup: `${Ee}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`
|
|
229
229
|
}
|
|
230
230
|
},
|
|
231
231
|
form: {
|
|
@@ -235,18 +235,18 @@ const at = {
|
|
|
235
235
|
edit: `${Me}/consumers/{id}`
|
|
236
236
|
},
|
|
237
237
|
kongManager: {
|
|
238
|
-
validate: `${
|
|
239
|
-
create: `${
|
|
240
|
-
edit: `${
|
|
238
|
+
validate: `${Ee}/schemas/consumers/validate`,
|
|
239
|
+
create: `${Ee}/consumers`,
|
|
240
|
+
edit: `${Ee}/consumers/{id}`
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
|
-
var bn = /* @__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))(bn || {}), yt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(yt || {}), $e = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))($e || {}),
|
|
244
|
+
var bn = /* @__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))(bn || {}), yt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(yt || {}), $e = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))($e || {}), Y = /* @__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))(Y || {}), ce = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ce || {});
|
|
245
245
|
function Dr() {
|
|
246
246
|
return {
|
|
247
247
|
getAxiosInstance: (e = {}) => {
|
|
248
248
|
try {
|
|
249
|
-
const t =
|
|
249
|
+
const t = Sr("get-axios-instance", void 0);
|
|
250
250
|
return typeof t == "function" ? t(e) : Dt.create({
|
|
251
251
|
withCredentials: !0,
|
|
252
252
|
timeout: 3e4,
|
|
@@ -316,7 +316,7 @@ function Gr() {
|
|
|
316
316
|
}
|
|
317
317
|
};
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function St(e = {}) {
|
|
320
320
|
const { getAxiosInstance: t } = Dr();
|
|
321
321
|
return {
|
|
322
322
|
axiosInstance: t(e)
|
|
@@ -348,13 +348,13 @@ const Hr = {
|
|
|
348
348
|
errors: {
|
|
349
349
|
edit: "The entity could not be edited at this time."
|
|
350
350
|
}
|
|
351
|
-
},
|
|
351
|
+
}, Zr = {
|
|
352
352
|
emptyState: {
|
|
353
353
|
noSearchResultsTitle: "No results found",
|
|
354
354
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
355
355
|
noSearchResultsCtaText: "Clear"
|
|
356
356
|
}
|
|
357
|
-
},
|
|
357
|
+
}, Yr = {
|
|
358
358
|
title: "Configuration",
|
|
359
359
|
actions: {
|
|
360
360
|
copy: "Copy JSON"
|
|
@@ -422,8 +422,8 @@ const Hr = {
|
|
|
422
422
|
global: Hr,
|
|
423
423
|
deleteModal: Jr,
|
|
424
424
|
baseForm: Wr,
|
|
425
|
-
baseTable:
|
|
426
|
-
baseConfigCard:
|
|
425
|
+
baseTable: Zr,
|
|
426
|
+
baseConfigCard: Yr,
|
|
427
427
|
filter: Qr,
|
|
428
428
|
debouncedFilter: Xr,
|
|
429
429
|
errors: ea,
|
|
@@ -487,12 +487,12 @@ function aa(e, t, n, r = {
|
|
|
487
487
|
searchKeys: ["id"]
|
|
488
488
|
}) {
|
|
489
489
|
n || (n = "1000");
|
|
490
|
-
const { axiosInstance: a } =
|
|
490
|
+
const { axiosInstance: a } = St(e.axiosRequestConfig), { i18n: { t: i } } = it(), { debounce: o } = Pr(), l = o(async (v) => {
|
|
491
491
|
await J(v);
|
|
492
|
-
}, 200), s = B(!1), u = B(""), d = B(""), c = B([]), C = B([]), y = B(void 0),
|
|
493
|
-
let M = `${e.apiBaseUrl}${
|
|
492
|
+
}, 200), s = B(!1), u = B(""), d = B(""), c = B([]), C = B([]), y = B(void 0), _ = m(t);
|
|
493
|
+
let M = `${e.apiBaseUrl}${_}`;
|
|
494
494
|
e.app === "konnect" ? M = M.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (M = M.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
495
|
-
const { isValidUuid: k } = Cn(),
|
|
495
|
+
const { isValidUuid: k } = Cn(), U = async () => {
|
|
496
496
|
try {
|
|
497
497
|
s.value = !0;
|
|
498
498
|
const { data: v } = await a.get(`${M}?size=${n}`);
|
|
@@ -502,10 +502,10 @@ function aa(e, t, n, r = {
|
|
|
502
502
|
} finally {
|
|
503
503
|
s.value = !1;
|
|
504
504
|
}
|
|
505
|
-
},
|
|
506
|
-
var
|
|
507
|
-
if (
|
|
508
|
-
if (
|
|
505
|
+
}, x = B(""), J = async (v) => {
|
|
506
|
+
var S, p, A;
|
|
507
|
+
if (x.value !== v)
|
|
508
|
+
if (x.value = v || "", y.value === void 0)
|
|
509
509
|
try {
|
|
510
510
|
if (s.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
511
511
|
let b = M + "";
|
|
@@ -515,18 +515,18 @@ function aa(e, t, n, r = {
|
|
|
515
515
|
} else if (v) {
|
|
516
516
|
const b = [];
|
|
517
517
|
k(v) && r.searchKeys.includes("id") ? b.push((async () => {
|
|
518
|
-
const { data:
|
|
519
|
-
return [
|
|
518
|
+
const { data: E } = await a.get(`${M}/${v}`);
|
|
519
|
+
return [E[r.fetchedItemsKey] ?? E];
|
|
520
520
|
})()) : b.push(
|
|
521
|
-
...r.searchKeys.filter((
|
|
522
|
-
const { data:
|
|
523
|
-
return
|
|
521
|
+
...r.searchKeys.filter((E) => E !== "id").map(async (E) => {
|
|
522
|
+
const { data: I } = await a.get(`${M}?${E}=${v}`);
|
|
523
|
+
return I[r.fetchedItemsKey];
|
|
524
524
|
})
|
|
525
525
|
);
|
|
526
526
|
const g = await Promise.all(b), K = /* @__PURE__ */ new Set();
|
|
527
|
-
c.value = [], (
|
|
528
|
-
var
|
|
529
|
-
(
|
|
527
|
+
c.value = [], (S = g == null ? void 0 : g.forEach) == null || S.call(g, (E) => {
|
|
528
|
+
var I;
|
|
529
|
+
(I = E == null ? void 0 : E.forEach) == null || I.call(E, ($) => {
|
|
530
530
|
K.has($.id) || (K.add($.id), c.value.push($));
|
|
531
531
|
});
|
|
532
532
|
});
|
|
@@ -541,9 +541,9 @@ function aa(e, t, n, r = {
|
|
|
541
541
|
s.value = !0, d.value = "", v ? (c.value = (A = y.value) == null ? void 0 : A.filter((b) => {
|
|
542
542
|
var g;
|
|
543
543
|
let K = !1;
|
|
544
|
-
for (const
|
|
545
|
-
const
|
|
546
|
-
|
|
544
|
+
for (const E of r.searchKeys) {
|
|
545
|
+
const I = typeof b[E] == "string" ? (g = b[E]) == null ? void 0 : g.toLowerCase() : b[E];
|
|
546
|
+
I != null && I.includes(v.toLowerCase()) && (K = !0);
|
|
547
547
|
}
|
|
548
548
|
return K;
|
|
549
549
|
}), (!c.value || !c.value.length) && (d.value = i("debouncedFilter.errors.invalid"))) : c.value = y.value, s.value = !1;
|
|
@@ -554,7 +554,7 @@ function aa(e, t, n, r = {
|
|
|
554
554
|
validationError: d,
|
|
555
555
|
results: c,
|
|
556
556
|
allRecords: y,
|
|
557
|
-
loadItems:
|
|
557
|
+
loadItems: U,
|
|
558
558
|
debouncedQueryChange: l
|
|
559
559
|
};
|
|
560
560
|
}
|
|
@@ -615,8 +615,8 @@ function kn(e, t) {
|
|
|
615
615
|
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query: C } = o;
|
|
616
616
|
try {
|
|
617
617
|
let y = new URL(i.value.href);
|
|
618
|
-
return a.value && C ? (y.search = "", y = n.value.isExactMatch ? new URL(`${y.href}/${C}/`) : new URL(`${y.href}?filter[name][contains]=${C}`)) : (a.value || new URLSearchParams(C).forEach((
|
|
619
|
-
y.searchParams.append(M,
|
|
618
|
+
return a.value && C ? (y.search = "", y = n.value.isExactMatch ? new URL(`${y.href}/${C}/`) : new URL(`${y.href}?filter[name][contains]=${C}`)) : (a.value || new URLSearchParams(C).forEach((_, M) => {
|
|
619
|
+
y.searchParams.append(M, _);
|
|
620
620
|
}), d && y.searchParams.append("sort_by", d), c === "desc" && y.searchParams.append("sort_desc", "1"), y.searchParams.append("size", String(s))), u && l !== 1 && y.searchParams.append("offset", String(u)), y.href;
|
|
621
621
|
} catch (y) {
|
|
622
622
|
return console.error("RouteList(fetcher)", y), r.value;
|
|
@@ -624,7 +624,7 @@ function kn(e, t) {
|
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
626
|
function sa(e, t, n = "data") {
|
|
627
|
-
const r = m(t), { axiosInstance: a } =
|
|
627
|
+
const r = m(t), { axiosInstance: a } = St(e.axiosRequestConfig), i = kn(e, r), o = B({
|
|
628
628
|
status: $e.Idle
|
|
629
629
|
});
|
|
630
630
|
return { fetcher: async (l) => {
|
|
@@ -639,7 +639,7 @@ function sa(e, t, n = "data") {
|
|
|
639
639
|
const c = d.data, C = n && n.replace(/[^\w-_]/gi, "");
|
|
640
640
|
let y;
|
|
641
641
|
c[C] && Array.isArray(c[C]) ? y = c[C] : Array.isArray(c) ? y = c : y = Object.keys(c).length ? [c] : [];
|
|
642
|
-
const
|
|
642
|
+
const _ = {
|
|
643
643
|
data: y,
|
|
644
644
|
total: y.length,
|
|
645
645
|
...c.offset ? {
|
|
@@ -650,8 +650,8 @@ function sa(e, t, n = "data") {
|
|
|
650
650
|
};
|
|
651
651
|
return o.value = {
|
|
652
652
|
status: $e.Idle,
|
|
653
|
-
response:
|
|
654
|
-
},
|
|
653
|
+
response: _
|
|
654
|
+
}, _;
|
|
655
655
|
} catch (u) {
|
|
656
656
|
const d = {
|
|
657
657
|
data: [],
|
|
@@ -704,19 +704,19 @@ const wn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
704
704
|
}, Wt = (e, t, n) => {
|
|
705
705
|
fa(n);
|
|
706
706
|
const r = pa(e, t);
|
|
707
|
-
return
|
|
708
|
-
},
|
|
707
|
+
return _n[n].includes(r);
|
|
708
|
+
}, _n = {
|
|
709
709
|
">": [1],
|
|
710
710
|
">=": [0, 1],
|
|
711
711
|
"=": [0],
|
|
712
712
|
"<=": [-1, 0],
|
|
713
713
|
"<": [-1],
|
|
714
714
|
"!=": [-1, 1]
|
|
715
|
-
},
|
|
715
|
+
}, Zt = Object.keys(_n), fa = (e) => {
|
|
716
716
|
if (typeof e != "string")
|
|
717
717
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
718
|
-
if (
|
|
719
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
718
|
+
if (Zt.indexOf(e) === -1)
|
|
719
|
+
throw new Error(`Invalid operator, expected one of ${Zt.join("|")}`);
|
|
720
720
|
}, ma = (e) => typeof e == "string" && /^[v\d]/.test(e) && wn.test(e);
|
|
721
721
|
function ga(e) {
|
|
722
722
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
@@ -746,7 +746,7 @@ function ha() {
|
|
|
746
746
|
};
|
|
747
747
|
}
|
|
748
748
|
const ne = {
|
|
749
|
-
useAxios:
|
|
749
|
+
useAxios: St,
|
|
750
750
|
useDebouncedFilter: aa,
|
|
751
751
|
useDeleteUrlBuilder: ia,
|
|
752
752
|
useErrors: oa,
|
|
@@ -791,9 +791,9 @@ const ne = {
|
|
|
791
791
|
}, {
|
|
792
792
|
default: h(() => [
|
|
793
793
|
e.isArrayItem ? (f(), O("legend", va, [
|
|
794
|
-
F("b", null,
|
|
794
|
+
F("b", null, j(l.value), 1)
|
|
795
795
|
])) : P("", !0),
|
|
796
|
-
(f(!0), O(fe, null, pe(Object.keys(o.value), (d, c) => (f(), V(
|
|
796
|
+
(f(!0), O(fe, null, pe(Object.keys(o.value), (d, c) => (f(), V(Sn, {
|
|
797
797
|
key: `${a.value}-property-${c}`,
|
|
798
798
|
item: {
|
|
799
799
|
key: d,
|
|
@@ -810,7 +810,7 @@ const ne = {
|
|
|
810
810
|
for (const [r, a] of t)
|
|
811
811
|
n[r] = a;
|
|
812
812
|
return n;
|
|
813
|
-
},
|
|
813
|
+
}, In = /* @__PURE__ */ me(ba, [["__scopeId", "data-v-68ca83ec"]]), Ca = /* @__PURE__ */ W({
|
|
814
814
|
__name: "InternalLinkItem",
|
|
815
815
|
props: {
|
|
816
816
|
item: {
|
|
@@ -822,15 +822,15 @@ const ne = {
|
|
|
822
822
|
setup(e) {
|
|
823
823
|
const { i18n: { t } } = ne.useI18n();
|
|
824
824
|
return (n, r) => {
|
|
825
|
-
const a =
|
|
825
|
+
const a = R("KButton");
|
|
826
826
|
return f(), O("div", null, [
|
|
827
|
-
|
|
827
|
+
T(a, {
|
|
828
828
|
appearance: "tertiary",
|
|
829
829
|
class: "navigation-button",
|
|
830
830
|
onClick: r[0] || (r[0] = (i) => n.$emit("navigation-click", e.item))
|
|
831
831
|
}, {
|
|
832
832
|
default: h(() => [
|
|
833
|
-
H(
|
|
833
|
+
H(j(e.item.value || m(t)("baseConfigCard.commonFields.link")), 1)
|
|
834
834
|
]),
|
|
835
835
|
_: 1
|
|
836
836
|
})
|
|
@@ -848,20 +848,20 @@ const ne = {
|
|
|
848
848
|
setup(e) {
|
|
849
849
|
const { i18n: { t } } = ne.useI18n();
|
|
850
850
|
return (n, r) => {
|
|
851
|
-
const a =
|
|
851
|
+
const a = R("KBadge");
|
|
852
852
|
return f(), V(a, {
|
|
853
853
|
appearance: e.status ? "success" : "neutral"
|
|
854
854
|
}, {
|
|
855
855
|
default: h(() => [
|
|
856
|
-
H(
|
|
856
|
+
H(j(e.status ? m(t)("baseConfigCard.statusBadge.enabledLabel") : m(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
857
857
|
]),
|
|
858
858
|
_: 1
|
|
859
859
|
}, 8, ["appearance"]);
|
|
860
860
|
};
|
|
861
861
|
}
|
|
862
|
-
}),
|
|
862
|
+
}), _a = "#0044f4", Ia = "#e0e4ea", Sa = "#afb7c5", Aa = "1px", xa = "20px", $a = { class: "config-card-details-row" }, Na = ["data-testid"], Ta = ["data-testid"], ja = ["data-testid"], Oa = ["data-testid"], Ma = { key: 1 }, Ea = ["data-testid"], qa = ["data-testid"], Fa = ["data-testid"], Ba = ["data-testid"], Ka = {
|
|
863
863
|
name: "ConfigCardItem",
|
|
864
|
-
components: { JsonCardItem:
|
|
864
|
+
components: { JsonCardItem: In, StatusBadge: wa, InternalLinkItem: ka }
|
|
865
865
|
}, La = /* @__PURE__ */ W({
|
|
866
866
|
...Ka,
|
|
867
867
|
props: {
|
|
@@ -882,15 +882,15 @@ const ne = {
|
|
|
882
882
|
},
|
|
883
883
|
emits: ["navigation-click"],
|
|
884
884
|
setup(e, { emit: t }) {
|
|
885
|
-
yn((
|
|
886
|
-
dc1d91a8: d.value ? "none" : `solid ${m(Aa)} ${m(
|
|
885
|
+
yn((_) => ({
|
|
886
|
+
dc1d91a8: d.value ? "none" : `solid ${m(Aa)} ${m(Ia)}`,
|
|
887
887
|
"59ccec5f": u.value && l.value ? "block" : "flex",
|
|
888
888
|
"29318fbe": u.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
889
889
|
"292d0408": u.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
890
890
|
}));
|
|
891
|
-
const n = e, r = t, a =
|
|
891
|
+
const n = e, r = t, a = _t(), { i18n: { t: i, formatUnixTimeStamp: o } } = ne.useI18n(), l = w(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), s = w(() => !!(n.item.tooltip || a["label-tooltip"])), u = w(() => n.item.type === Y.Json || n.item.type === Y.JsonArray), d = w(() => n.item.type === Y.JsonArray), c = w(() => {
|
|
892
892
|
switch (n.item.type) {
|
|
893
|
-
case
|
|
893
|
+
case Y.ID:
|
|
894
894
|
return {
|
|
895
895
|
tag: "KCopy",
|
|
896
896
|
attrs: {
|
|
@@ -899,7 +899,7 @@ const ne = {
|
|
|
899
899
|
text: n.item.value
|
|
900
900
|
}
|
|
901
901
|
};
|
|
902
|
-
case
|
|
902
|
+
case Y.IdArray:
|
|
903
903
|
return {
|
|
904
904
|
tag: "div",
|
|
905
905
|
additionalComponent: "KCopy",
|
|
@@ -907,7 +907,7 @@ const ne = {
|
|
|
907
907
|
"copy-tooltip": i("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
908
908
|
}
|
|
909
909
|
};
|
|
910
|
-
case
|
|
910
|
+
case Y.Redacted:
|
|
911
911
|
return {
|
|
912
912
|
tag: "KCopy",
|
|
913
913
|
attrs: {
|
|
@@ -917,7 +917,7 @@ const ne = {
|
|
|
917
917
|
text: n.item.value
|
|
918
918
|
}
|
|
919
919
|
};
|
|
920
|
-
case
|
|
920
|
+
case Y.RedactedArray:
|
|
921
921
|
return {
|
|
922
922
|
tag: "div",
|
|
923
923
|
additionalComponent: "KCopy",
|
|
@@ -926,7 +926,7 @@ const ne = {
|
|
|
926
926
|
"copy-tooltip": i("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
927
927
|
}
|
|
928
928
|
};
|
|
929
|
-
case
|
|
929
|
+
case Y.Date:
|
|
930
930
|
return {
|
|
931
931
|
tag: "div",
|
|
932
932
|
attrs: {
|
|
@@ -934,7 +934,7 @@ const ne = {
|
|
|
934
934
|
},
|
|
935
935
|
text: o(n.item.value)
|
|
936
936
|
};
|
|
937
|
-
case
|
|
937
|
+
case Y.BadgeStatus:
|
|
938
938
|
return {
|
|
939
939
|
tag: "StatusBadge",
|
|
940
940
|
attrs: {
|
|
@@ -942,28 +942,28 @@ const ne = {
|
|
|
942
942
|
status: n.item.value
|
|
943
943
|
}
|
|
944
944
|
};
|
|
945
|
-
case
|
|
945
|
+
case Y.BadgeTag:
|
|
946
946
|
return {
|
|
947
947
|
tag: "div",
|
|
948
948
|
additionalComponent: "KBadge"
|
|
949
949
|
};
|
|
950
|
-
case
|
|
950
|
+
case Y.BadgeMethod:
|
|
951
951
|
return {
|
|
952
952
|
tag: "div",
|
|
953
953
|
additionalComponent: "KMethodBadge"
|
|
954
954
|
};
|
|
955
|
-
case
|
|
955
|
+
case Y.LinkInternal:
|
|
956
956
|
return {
|
|
957
957
|
tag: "InternalLinkItem",
|
|
958
958
|
attrs: {
|
|
959
959
|
"data-testid": `${n.item.key}-internal-link`,
|
|
960
960
|
item: n.item,
|
|
961
|
-
onNavigationClick: (
|
|
962
|
-
r("navigation-click",
|
|
961
|
+
onNavigationClick: (_) => {
|
|
962
|
+
r("navigation-click", _);
|
|
963
963
|
}
|
|
964
964
|
}
|
|
965
965
|
};
|
|
966
|
-
case
|
|
966
|
+
case Y.LinkExternal:
|
|
967
967
|
return {
|
|
968
968
|
tag: "KExternalLink",
|
|
969
969
|
attrs: {
|
|
@@ -972,7 +972,7 @@ const ne = {
|
|
|
972
972
|
},
|
|
973
973
|
text: n.item.value
|
|
974
974
|
};
|
|
975
|
-
case
|
|
975
|
+
case Y.Json:
|
|
976
976
|
return {
|
|
977
977
|
tag: "JsonCardItem",
|
|
978
978
|
attrs: {
|
|
@@ -980,7 +980,7 @@ const ne = {
|
|
|
980
980
|
item: n.item
|
|
981
981
|
}
|
|
982
982
|
};
|
|
983
|
-
case
|
|
983
|
+
case Y.JsonArray:
|
|
984
984
|
return {
|
|
985
985
|
tag: "div",
|
|
986
986
|
additionalComponent: "JsonCardItem",
|
|
@@ -999,17 +999,17 @@ const ne = {
|
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
1001
|
}), C = B(), { isTruncated: y } = ne.useTruncationDetector(C);
|
|
1002
|
-
return (
|
|
1003
|
-
const k =
|
|
1002
|
+
return (_, M) => {
|
|
1003
|
+
const k = R("KLabel"), U = R("KBadge"), x = R("KCopy"), J = R("KTooltip");
|
|
1004
1004
|
return f(), O("div", $a, [
|
|
1005
1005
|
F("div", {
|
|
1006
1006
|
class: "config-card-details-label",
|
|
1007
1007
|
"data-testid": `${e.item.key}-label`
|
|
1008
1008
|
}, [
|
|
1009
|
-
Q(
|
|
1010
|
-
|
|
1009
|
+
Q(_.$slots, "label", { item: e.item }, () => [
|
|
1010
|
+
T(k, { "tooltip-attributes": { maxWidth: "500px" } }, Te({
|
|
1011
1011
|
default: h(() => [
|
|
1012
|
-
H(
|
|
1012
|
+
H(j(e.item.label) + " ", 1)
|
|
1013
1013
|
]),
|
|
1014
1014
|
_: 2
|
|
1015
1015
|
}, [
|
|
@@ -1019,66 +1019,66 @@ const ne = {
|
|
|
1019
1019
|
F("div", {
|
|
1020
1020
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1021
1021
|
}, [
|
|
1022
|
-
Q(
|
|
1023
|
-
H(
|
|
1022
|
+
Q(_.$slots, "label-tooltip", {}, () => [
|
|
1023
|
+
H(j(e.item.tooltip), 1)
|
|
1024
1024
|
], !0)
|
|
1025
|
-
], 8,
|
|
1025
|
+
], 8, Ta)
|
|
1026
1026
|
]),
|
|
1027
1027
|
key: "0"
|
|
1028
1028
|
} : void 0
|
|
1029
1029
|
]), 1024)
|
|
1030
1030
|
], !0)
|
|
1031
|
-
], 8,
|
|
1031
|
+
], 8, Na),
|
|
1032
1032
|
F("div", {
|
|
1033
1033
|
class: "config-card-details-value",
|
|
1034
1034
|
"data-testid": `${e.item.key}-property-value`
|
|
1035
1035
|
}, [
|
|
1036
|
-
Q(
|
|
1036
|
+
Q(_.$slots, e.item.key, {
|
|
1037
1037
|
rowValue: e.item.value
|
|
1038
1038
|
}, () => [
|
|
1039
1039
|
l.value ? (f(), O("div", Ma, [
|
|
1040
|
-
(f(), V(be(c.value.tag), $r(
|
|
1040
|
+
(f(), V(be(c.value.tag), $r(Nr(c.value.attrs)), {
|
|
1041
1041
|
default: h(() => [
|
|
1042
1042
|
c.value.additionalComponent === "KBadge" ? (f(), O("div", {
|
|
1043
1043
|
key: 0,
|
|
1044
1044
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1045
1045
|
}, [
|
|
1046
|
-
(f(!0), O(fe, null, pe(e.item.value, (v,
|
|
1047
|
-
key: `${e.item.key}-badge-tag-${
|
|
1046
|
+
(f(!0), O(fe, null, pe(e.item.value, (v, S) => (f(), V(U, {
|
|
1047
|
+
key: `${e.item.key}-badge-tag-${S}`,
|
|
1048
1048
|
class: "config-badge",
|
|
1049
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1049
|
+
"data-testid": `${e.item.key}-badge-tag-${S}`,
|
|
1050
1050
|
tooltip: v,
|
|
1051
1051
|
"truncation-tooltip": ""
|
|
1052
1052
|
}, {
|
|
1053
1053
|
default: h(() => [
|
|
1054
|
-
H(
|
|
1054
|
+
H(j(v), 1)
|
|
1055
1055
|
]),
|
|
1056
1056
|
_: 2
|
|
1057
1057
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
1058
|
-
], 8,
|
|
1058
|
+
], 8, Ea)) : P("", !0),
|
|
1059
1059
|
c.value.additionalComponent === "KCopy" ? (f(), O("div", {
|
|
1060
1060
|
key: 1,
|
|
1061
1061
|
class: "copy-uuid-array",
|
|
1062
1062
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1063
1063
|
}, [
|
|
1064
|
-
(f(!0), O(fe, null, pe(e.item.value, (v,
|
|
1065
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1066
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1064
|
+
(f(!0), O(fe, null, pe(e.item.value, (v, S) => (f(), V(x, Tr({ ref_for: !0 }, c.value.childAttrs, {
|
|
1065
|
+
key: `${e.item.key}-copy-uuid-${S}`,
|
|
1066
|
+
"data-testid": `${e.item.key}-copy-uuid-${S}`,
|
|
1067
1067
|
text: v
|
|
1068
1068
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
1069
|
-
], 8,
|
|
1069
|
+
], 8, qa)) : c.value.additionalComponent === "KMethodBadge" ? (f(), O("div", {
|
|
1070
1070
|
key: 2,
|
|
1071
1071
|
class: "method-badge-array",
|
|
1072
1072
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1073
1073
|
}, [
|
|
1074
|
-
(f(!0), O(fe, null, pe(e.item.value, (v,
|
|
1075
|
-
key: `${e.item.key}-badge-method-${
|
|
1074
|
+
(f(!0), O(fe, null, pe(e.item.value, (v, S) => (f(), V(U, {
|
|
1075
|
+
key: `${e.item.key}-badge-method-${S}`,
|
|
1076
1076
|
appearance: Object.values(m(Or)).includes(v.toLowerCase()) ? v.toLowerCase() : "custom",
|
|
1077
1077
|
class: "config-badge",
|
|
1078
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1078
|
+
"data-testid": `${e.item.key}-badge-method-${S}`
|
|
1079
1079
|
}, {
|
|
1080
1080
|
default: h(() => [
|
|
1081
|
-
H(
|
|
1081
|
+
H(j(v), 1)
|
|
1082
1082
|
]),
|
|
1083
1083
|
_: 2
|
|
1084
1084
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
@@ -1087,9 +1087,9 @@ const ne = {
|
|
|
1087
1087
|
key: 3,
|
|
1088
1088
|
"data-testid": `${n.item.key}-json-array-content`
|
|
1089
1089
|
}, [
|
|
1090
|
-
(f(!0), O(fe, null, pe(e.item.value, (v,
|
|
1091
|
-
key: `json-array-item-${
|
|
1092
|
-
index:
|
|
1090
|
+
(f(!0), O(fe, null, pe(e.item.value, (v, S) => (f(), V(In, {
|
|
1091
|
+
key: `json-array-item-${S}`,
|
|
1092
|
+
index: S,
|
|
1093
1093
|
"is-array-item": "",
|
|
1094
1094
|
item: v
|
|
1095
1095
|
}, null, 8, ["index", "item"]))), 128))
|
|
@@ -1102,7 +1102,7 @@ const ne = {
|
|
|
1102
1102
|
ref_key: "textContent",
|
|
1103
1103
|
ref: C,
|
|
1104
1104
|
class: Ae(["attrs-data-text", { truncated: e.truncated }])
|
|
1105
|
-
},
|
|
1105
|
+
}, j(c.value.text), 3)
|
|
1106
1106
|
]),
|
|
1107
1107
|
_: 1
|
|
1108
1108
|
}, 8, ["text"]))
|
|
@@ -1114,11 +1114,11 @@ const ne = {
|
|
|
1114
1114
|
"data-testid": `${e.item.key}-no-value`
|
|
1115
1115
|
}, " – ", 8, Oa))
|
|
1116
1116
|
], !0)
|
|
1117
|
-
], 8,
|
|
1117
|
+
], 8, ja)
|
|
1118
1118
|
]);
|
|
1119
1119
|
};
|
|
1120
1120
|
}
|
|
1121
|
-
}),
|
|
1121
|
+
}), Sn = /* @__PURE__ */ me(La, [["__scopeId", "data-v-d268261c"]]), Ua = { class: "json-config" }, Ra = {
|
|
1122
1122
|
key: 0,
|
|
1123
1123
|
class: "json-endpoint"
|
|
1124
1124
|
}, An = /* @__PURE__ */ W({
|
|
@@ -1160,18 +1160,18 @@ const ne = {
|
|
|
1160
1160
|
return i.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? i[i.length - 1] : i[i.length - 2]).length;
|
|
1161
1161
|
});
|
|
1162
1162
|
return (a, i) => {
|
|
1163
|
-
const o =
|
|
1164
|
-
return f(), O("div",
|
|
1165
|
-
t.fetcherUrl ? (f(), O("div",
|
|
1166
|
-
|
|
1163
|
+
const o = R("KBadge"), l = R("KCodeBlock");
|
|
1164
|
+
return f(), O("div", Ua, [
|
|
1165
|
+
t.fetcherUrl ? (f(), O("div", Ra, [
|
|
1166
|
+
T(o, {
|
|
1167
1167
|
appearance: t.requestMethod
|
|
1168
1168
|
}, {
|
|
1169
1169
|
default: h(() => [
|
|
1170
|
-
H(
|
|
1170
|
+
H(j(t.requestMethod), 1)
|
|
1171
1171
|
]),
|
|
1172
1172
|
_: 1
|
|
1173
1173
|
}, 8, ["appearance"]),
|
|
1174
|
-
|
|
1174
|
+
T(l, {
|
|
1175
1175
|
id: "json-endpoint-codeblock",
|
|
1176
1176
|
code: t.fetcherUrl,
|
|
1177
1177
|
language: "json",
|
|
@@ -1192,14 +1192,14 @@ const ne = {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
});
|
|
1194
1194
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1195
|
-
function
|
|
1195
|
+
function xn(e) {
|
|
1196
1196
|
return typeof e > "u" || e === null;
|
|
1197
1197
|
}
|
|
1198
1198
|
function Va(e) {
|
|
1199
1199
|
return typeof e == "object" && e !== null;
|
|
1200
1200
|
}
|
|
1201
1201
|
function Da(e) {
|
|
1202
|
-
return Array.isArray(e) ? e :
|
|
1202
|
+
return Array.isArray(e) ? e : xn(e) ? [] : [e];
|
|
1203
1203
|
}
|
|
1204
1204
|
function Pa(e, t) {
|
|
1205
1205
|
var n, r, a, i;
|
|
@@ -1217,12 +1217,12 @@ function za(e, t) {
|
|
|
1217
1217
|
function Ga(e) {
|
|
1218
1218
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1219
1219
|
}
|
|
1220
|
-
var Ha =
|
|
1220
|
+
var Ha = xn, Ja = Va, Wa = Da, Za = za, Ya = Ga, Qa = Pa, te = {
|
|
1221
1221
|
isNothing: Ha,
|
|
1222
1222
|
isObject: Ja,
|
|
1223
1223
|
toArray: Wa,
|
|
1224
|
-
repeat:
|
|
1225
|
-
isNegativeZero:
|
|
1224
|
+
repeat: Za,
|
|
1225
|
+
isNegativeZero: Ya,
|
|
1226
1226
|
extend: Qa
|
|
1227
1227
|
};
|
|
1228
1228
|
function $n(e, t) {
|
|
@@ -1317,7 +1317,7 @@ function ai(e, t) {
|
|
|
1317
1317
|
throw new se('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1318
1318
|
}
|
|
1319
1319
|
var ie = ai;
|
|
1320
|
-
function
|
|
1320
|
+
function Yt(e, t) {
|
|
1321
1321
|
var n = [];
|
|
1322
1322
|
return e[t].forEach(function(r) {
|
|
1323
1323
|
var a = n.length;
|
|
@@ -1371,14 +1371,14 @@ ht.prototype.extend = function(e) {
|
|
|
1371
1371
|
throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1372
1372
|
});
|
|
1373
1373
|
var r = Object.create(ht.prototype);
|
|
1374
|
-
return r.implicit = (this.implicit || []).concat(t), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit =
|
|
1374
|
+
return r.implicit = (this.implicit || []).concat(t), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit = Yt(r, "implicit"), r.compiledExplicit = Yt(r, "explicit"), r.compiledTypeMap = ii(r.compiledImplicit, r.compiledExplicit), r;
|
|
1375
1375
|
};
|
|
1376
|
-
var
|
|
1376
|
+
var Nn = ht, Tn = new ie("tag:yaml.org,2002:str", {
|
|
1377
1377
|
kind: "scalar",
|
|
1378
1378
|
construct: function(e) {
|
|
1379
1379
|
return e !== null ? e : "";
|
|
1380
1380
|
}
|
|
1381
|
-
}),
|
|
1381
|
+
}), jn = new ie("tag:yaml.org,2002:seq", {
|
|
1382
1382
|
kind: "sequence",
|
|
1383
1383
|
construct: function(e) {
|
|
1384
1384
|
return e !== null ? e : [];
|
|
@@ -1388,10 +1388,10 @@ var Tn = ht, jn = new ie("tag:yaml.org,2002:str", {
|
|
|
1388
1388
|
construct: function(e) {
|
|
1389
1389
|
return e !== null ? e : {};
|
|
1390
1390
|
}
|
|
1391
|
-
}), Mn = new
|
|
1391
|
+
}), Mn = new Nn({
|
|
1392
1392
|
explicit: [
|
|
1393
|
+
Tn,
|
|
1393
1394
|
jn,
|
|
1394
|
-
Nn,
|
|
1395
1395
|
On
|
|
1396
1396
|
]
|
|
1397
1397
|
});
|
|
@@ -1407,7 +1407,7 @@ function li() {
|
|
|
1407
1407
|
function si(e) {
|
|
1408
1408
|
return e === null;
|
|
1409
1409
|
}
|
|
1410
|
-
var
|
|
1410
|
+
var En = new ie("tag:yaml.org,2002:null", {
|
|
1411
1411
|
kind: "scalar",
|
|
1412
1412
|
resolve: oi,
|
|
1413
1413
|
construct: li,
|
|
@@ -1443,7 +1443,7 @@ function ci(e) {
|
|
|
1443
1443
|
function di(e) {
|
|
1444
1444
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1445
1445
|
}
|
|
1446
|
-
var
|
|
1446
|
+
var qn = new ie("tag:yaml.org,2002:bool", {
|
|
1447
1447
|
kind: "scalar",
|
|
1448
1448
|
resolve: ui,
|
|
1449
1449
|
construct: ci,
|
|
@@ -1608,34 +1608,34 @@ function wi(e, t) {
|
|
|
1608
1608
|
return "-0.0";
|
|
1609
1609
|
return n = e.toString(10), ki.test(n) ? n.replace("e", ".e") : n;
|
|
1610
1610
|
}
|
|
1611
|
-
function
|
|
1611
|
+
function _i(e) {
|
|
1612
1612
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || te.isNegativeZero(e));
|
|
1613
1613
|
}
|
|
1614
1614
|
var Bn = new ie("tag:yaml.org,2002:float", {
|
|
1615
1615
|
kind: "scalar",
|
|
1616
1616
|
resolve: bi,
|
|
1617
1617
|
construct: Ci,
|
|
1618
|
-
predicate:
|
|
1618
|
+
predicate: _i,
|
|
1619
1619
|
represent: wi,
|
|
1620
1620
|
defaultStyle: "lowercase"
|
|
1621
1621
|
}), Kn = Mn.extend({
|
|
1622
1622
|
implicit: [
|
|
1623
|
-
qn,
|
|
1624
1623
|
En,
|
|
1624
|
+
qn,
|
|
1625
1625
|
Fn,
|
|
1626
1626
|
Bn
|
|
1627
1627
|
]
|
|
1628
|
-
}), Ln = Kn,
|
|
1628
|
+
}), Ln = Kn, Un = new RegExp(
|
|
1629
1629
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1630
|
-
),
|
|
1630
|
+
), Rn = new RegExp(
|
|
1631
1631
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
1632
1632
|
);
|
|
1633
|
-
function
|
|
1634
|
-
return e === null ? !1 :
|
|
1633
|
+
function Ii(e) {
|
|
1634
|
+
return e === null ? !1 : Un.exec(e) !== null || Rn.exec(e) !== null;
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1636
|
+
function Si(e) {
|
|
1637
1637
|
var t, n, r, a, i, o, l, s = 0, u = null, d, c, C;
|
|
1638
|
-
if (t =
|
|
1638
|
+
if (t = Un.exec(e), t === null && (t = Rn.exec(e)), t === null)
|
|
1639
1639
|
throw new Error("Date resolve error");
|
|
1640
1640
|
if (n = +t[1], r = +t[2] - 1, a = +t[3], !t[4])
|
|
1641
1641
|
return new Date(Date.UTC(n, r, a));
|
|
@@ -1651,17 +1651,17 @@ function Ai(e) {
|
|
|
1651
1651
|
}
|
|
1652
1652
|
var Vn = new ie("tag:yaml.org,2002:timestamp", {
|
|
1653
1653
|
kind: "scalar",
|
|
1654
|
-
resolve:
|
|
1655
|
-
construct:
|
|
1654
|
+
resolve: Ii,
|
|
1655
|
+
construct: Si,
|
|
1656
1656
|
instanceOf: Date,
|
|
1657
1657
|
represent: Ai
|
|
1658
1658
|
});
|
|
1659
|
-
function
|
|
1659
|
+
function xi(e) {
|
|
1660
1660
|
return e === "<<" || e === null;
|
|
1661
1661
|
}
|
|
1662
1662
|
var Dn = new ie("tag:yaml.org,2002:merge", {
|
|
1663
1663
|
kind: "scalar",
|
|
1664
|
-
resolve:
|
|
1664
|
+
resolve: xi
|
|
1665
1665
|
}), At = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1666
1666
|
\r`;
|
|
1667
1667
|
function $i(e) {
|
|
@@ -1676,29 +1676,29 @@ function $i(e) {
|
|
|
1676
1676
|
}
|
|
1677
1677
|
return r % 8 === 0;
|
|
1678
1678
|
}
|
|
1679
|
-
function
|
|
1679
|
+
function Ni(e) {
|
|
1680
1680
|
var t, n, r = e.replace(/[\r\n=]/g, ""), a = r.length, i = At, o = 0, l = [];
|
|
1681
1681
|
for (t = 0; t < a; t++)
|
|
1682
1682
|
t % 4 === 0 && t && (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)), o = o << 6 | i.indexOf(r.charAt(t));
|
|
1683
1683
|
return n = a % 4 * 6, n === 0 ? (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)) : n === 18 ? (l.push(o >> 10 & 255), l.push(o >> 2 & 255)) : n === 12 && l.push(o >> 4 & 255), new Uint8Array(l);
|
|
1684
1684
|
}
|
|
1685
|
-
function
|
|
1685
|
+
function Ti(e) {
|
|
1686
1686
|
var t = "", n = 0, r, a, i = e.length, o = At;
|
|
1687
1687
|
for (r = 0; r < i; r++)
|
|
1688
1688
|
r % 3 === 0 && r && (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]), n = (n << 8) + e[r];
|
|
1689
1689
|
return a = i % 3, a === 0 ? (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]) : a === 2 ? (t += o[n >> 10 & 63], t += o[n >> 4 & 63], t += o[n << 2 & 63], t += o[64]) : a === 1 && (t += o[n >> 2 & 63], t += o[n << 4 & 63], t += o[64], t += o[64]), t;
|
|
1690
1690
|
}
|
|
1691
|
-
function
|
|
1691
|
+
function ji(e) {
|
|
1692
1692
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1693
1693
|
}
|
|
1694
1694
|
var Pn = new ie("tag:yaml.org,2002:binary", {
|
|
1695
1695
|
kind: "scalar",
|
|
1696
1696
|
resolve: $i,
|
|
1697
|
-
construct:
|
|
1698
|
-
predicate:
|
|
1699
|
-
represent:
|
|
1697
|
+
construct: Ni,
|
|
1698
|
+
predicate: ji,
|
|
1699
|
+
represent: Ti
|
|
1700
1700
|
}), Oi = Object.prototype.hasOwnProperty, Mi = Object.prototype.toString;
|
|
1701
|
-
function
|
|
1701
|
+
function Ei(e) {
|
|
1702
1702
|
if (e === null)
|
|
1703
1703
|
return !0;
|
|
1704
1704
|
var t = [], n, r, a, i, o, l = e;
|
|
@@ -1720,13 +1720,13 @@ function qi(e) {
|
|
|
1720
1720
|
}
|
|
1721
1721
|
return !0;
|
|
1722
1722
|
}
|
|
1723
|
-
function
|
|
1723
|
+
function qi(e) {
|
|
1724
1724
|
return e !== null ? e : [];
|
|
1725
1725
|
}
|
|
1726
1726
|
var zn = new ie("tag:yaml.org,2002:omap", {
|
|
1727
1727
|
kind: "sequence",
|
|
1728
|
-
resolve:
|
|
1729
|
-
construct:
|
|
1728
|
+
resolve: Ei,
|
|
1729
|
+
construct: qi
|
|
1730
1730
|
}), Fi = Object.prototype.toString;
|
|
1731
1731
|
function Bi(e) {
|
|
1732
1732
|
if (e === null)
|
|
@@ -1752,7 +1752,7 @@ var Gn = new ie("tag:yaml.org,2002:pairs", {
|
|
|
1752
1752
|
resolve: Bi,
|
|
1753
1753
|
construct: Ki
|
|
1754
1754
|
}), Li = Object.prototype.hasOwnProperty;
|
|
1755
|
-
function
|
|
1755
|
+
function Ui(e) {
|
|
1756
1756
|
if (e === null)
|
|
1757
1757
|
return !0;
|
|
1758
1758
|
var t, n = e;
|
|
@@ -1761,14 +1761,14 @@ function Ri(e) {
|
|
|
1761
1761
|
return !1;
|
|
1762
1762
|
return !0;
|
|
1763
1763
|
}
|
|
1764
|
-
function
|
|
1764
|
+
function Ri(e) {
|
|
1765
1765
|
return e !== null ? e : {};
|
|
1766
1766
|
}
|
|
1767
1767
|
var Hn = new ie("tag:yaml.org,2002:set", {
|
|
1768
1768
|
kind: "mapping",
|
|
1769
|
-
resolve:
|
|
1770
|
-
construct:
|
|
1771
|
-
}),
|
|
1769
|
+
resolve: Ui,
|
|
1770
|
+
construct: Ri
|
|
1771
|
+
}), xt = Ln.extend({
|
|
1772
1772
|
implicit: [
|
|
1773
1773
|
Vn,
|
|
1774
1774
|
Dn
|
|
@@ -1779,14 +1779,14 @@ var Hn = new ie("tag:yaml.org,2002:set", {
|
|
|
1779
1779
|
Gn,
|
|
1780
1780
|
Hn
|
|
1781
1781
|
]
|
|
1782
|
-
}),
|
|
1782
|
+
}), xe = Object.prototype.hasOwnProperty, Xe = 1, Jn = 2, Wn = 3, et = 4, mt = 1, Vi = 2, Qt = 3, Di = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Pi = /[\x85\u2028\u2029]/, zi = /[,\[\]\{\}]/, Zn = /^(?:!|!!|![a-z\-]+!)$/i, Yn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1783
1783
|
function Xt(e) {
|
|
1784
1784
|
return Object.prototype.toString.call(e);
|
|
1785
1785
|
}
|
|
1786
1786
|
function he(e) {
|
|
1787
1787
|
return e === 10 || e === 13;
|
|
1788
1788
|
}
|
|
1789
|
-
function
|
|
1789
|
+
function Ne(e) {
|
|
1790
1790
|
return e === 9 || e === 32;
|
|
1791
1791
|
}
|
|
1792
1792
|
function de(e) {
|
|
@@ -1816,10 +1816,10 @@ function Wi(e) {
|
|
|
1816
1816
|
);
|
|
1817
1817
|
}
|
|
1818
1818
|
var Qn = new Array(256), Xn = new Array(256);
|
|
1819
|
-
for (var
|
|
1820
|
-
Qn[
|
|
1821
|
-
function
|
|
1822
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema ||
|
|
1819
|
+
for (var qe = 0; qe < 256; qe++)
|
|
1820
|
+
Qn[qe] = en(qe) ? 1 : 0, Xn[qe] = en(qe);
|
|
1821
|
+
function Zi(e, t) {
|
|
1822
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || xt, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1823
1823
|
}
|
|
1824
1824
|
function er(e, t) {
|
|
1825
1825
|
var n = {
|
|
@@ -1832,7 +1832,7 @@ function er(e, t) {
|
|
|
1832
1832
|
};
|
|
1833
1833
|
return n.snippet = ei(n), new se(t, n);
|
|
1834
1834
|
}
|
|
1835
|
-
function
|
|
1835
|
+
function q(e, t) {
|
|
1836
1836
|
throw er(e, t);
|
|
1837
1837
|
}
|
|
1838
1838
|
function tt(e, t) {
|
|
@@ -1841,40 +1841,40 @@ function tt(e, t) {
|
|
|
1841
1841
|
var tn = {
|
|
1842
1842
|
YAML: function(e, t, n) {
|
|
1843
1843
|
var r, a, i;
|
|
1844
|
-
e.version !== null &&
|
|
1844
|
+
e.version !== null && q(e, "duplication of %YAML directive"), n.length !== 1 && q(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), r === null && q(e, "ill-formed argument of the YAML directive"), a = parseInt(r[1], 10), i = parseInt(r[2], 10), a !== 1 && q(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = i < 2, i !== 1 && i !== 2 && tt(e, "unsupported YAML version of the document");
|
|
1845
1845
|
},
|
|
1846
1846
|
TAG: function(e, t, n) {
|
|
1847
1847
|
var r, a;
|
|
1848
|
-
n.length !== 2 &&
|
|
1848
|
+
n.length !== 2 && q(e, "TAG directive accepts exactly two arguments"), r = n[0], a = n[1], Zn.test(r) || q(e, "ill-formed tag handle (first argument) of the TAG directive"), xe.call(e.tagMap, r) && q(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Yn.test(a) || q(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1849
1849
|
try {
|
|
1850
1850
|
a = decodeURIComponent(a);
|
|
1851
1851
|
} catch {
|
|
1852
|
-
|
|
1852
|
+
q(e, "tag prefix is malformed: " + a);
|
|
1853
1853
|
}
|
|
1854
1854
|
e.tagMap[r] = a;
|
|
1855
1855
|
}
|
|
1856
1856
|
};
|
|
1857
|
-
function
|
|
1857
|
+
function Se(e, t, n, r) {
|
|
1858
1858
|
var a, i, o, l;
|
|
1859
1859
|
if (t < n) {
|
|
1860
1860
|
if (l = e.input.slice(t, n), r)
|
|
1861
1861
|
for (a = 0, i = l.length; a < i; a += 1)
|
|
1862
|
-
o = l.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 ||
|
|
1862
|
+
o = l.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 || q(e, "expected valid JSON character");
|
|
1863
1863
|
else
|
|
1864
|
-
Di.test(l) &&
|
|
1864
|
+
Di.test(l) && q(e, "the stream contains non-printable characters");
|
|
1865
1865
|
e.result += l;
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
1868
|
function nn(e, t, n, r) {
|
|
1869
1869
|
var a, i, o, l;
|
|
1870
|
-
for (te.isObject(n) ||
|
|
1871
|
-
i = a[o],
|
|
1870
|
+
for (te.isObject(n) || q(e, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(n), o = 0, l = a.length; o < l; o += 1)
|
|
1871
|
+
i = a[o], xe.call(t, i) || (t[i] = n[i], r[i] = !0);
|
|
1872
1872
|
}
|
|
1873
1873
|
function Ke(e, t, n, r, a, i, o, l, s) {
|
|
1874
1874
|
var u, d;
|
|
1875
1875
|
if (Array.isArray(a))
|
|
1876
1876
|
for (a = Array.prototype.slice.call(a), u = 0, d = a.length; u < d; u += 1)
|
|
1877
|
-
Array.isArray(a[u]) &&
|
|
1877
|
+
Array.isArray(a[u]) && q(e, "nested arrays are not supported inside keys"), typeof a == "object" && Xt(a[u]) === "[object Object]" && (a[u] = "[object Object]");
|
|
1878
1878
|
if (typeof a == "object" && Xt(a) === "[object Object]" && (a = "[object Object]"), a = String(a), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1879
1879
|
if (Array.isArray(i))
|
|
1880
1880
|
for (u = 0, d = i.length; u < d; u += 1)
|
|
@@ -1882,7 +1882,7 @@ function Ke(e, t, n, r, a, i, o, l, s) {
|
|
|
1882
1882
|
else
|
|
1883
1883
|
nn(e, t, i, n);
|
|
1884
1884
|
else
|
|
1885
|
-
!e.json && !
|
|
1885
|
+
!e.json && !xe.call(n, a) && xe.call(t, a) && (e.line = o || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, q(e, "duplicated mapping key")), a === "__proto__" ? Object.defineProperty(t, a, {
|
|
1886
1886
|
configurable: !0,
|
|
1887
1887
|
enumerable: !0,
|
|
1888
1888
|
writable: !0,
|
|
@@ -1892,11 +1892,11 @@ function Ke(e, t, n, r, a, i, o, l, s) {
|
|
|
1892
1892
|
}
|
|
1893
1893
|
function $t(e) {
|
|
1894
1894
|
var t;
|
|
1895
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1895
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : q(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1896
1896
|
}
|
|
1897
1897
|
function ee(e, t, n) {
|
|
1898
1898
|
for (var r = 0, a = e.input.charCodeAt(e.position); a !== 0; ) {
|
|
1899
|
-
for (;
|
|
1899
|
+
for (; Ne(a); )
|
|
1900
1900
|
a === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), a = e.input.charCodeAt(++e.position);
|
|
1901
1901
|
if (t && a === 35)
|
|
1902
1902
|
do
|
|
@@ -1914,11 +1914,11 @@ function ot(e) {
|
|
|
1914
1914
|
var t = e.position, n;
|
|
1915
1915
|
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || de(n)));
|
|
1916
1916
|
}
|
|
1917
|
-
function
|
|
1917
|
+
function Nt(e, t) {
|
|
1918
1918
|
t === 1 ? e.result += " " : t > 1 && (e.result += te.repeat(`
|
|
1919
1919
|
`, t - 1));
|
|
1920
1920
|
}
|
|
1921
|
-
function
|
|
1921
|
+
function Yi(e, t, n) {
|
|
1922
1922
|
var r, a, i, o, l, s, u, d, c = e.kind, C = e.result, y;
|
|
1923
1923
|
if (y = e.input.charCodeAt(e.position), de(y) || Be(y) || y === 35 || y === 38 || y === 42 || y === 33 || y === 124 || y === 62 || y === 39 || y === 34 || y === 37 || y === 64 || y === 96 || (y === 63 || y === 45) && (a = e.input.charCodeAt(e.position + 1), de(a) || n && Be(a)))
|
|
1924
1924
|
return !1;
|
|
@@ -1941,9 +1941,9 @@ function Zi(e, t, n) {
|
|
|
1941
1941
|
break;
|
|
1942
1942
|
}
|
|
1943
1943
|
}
|
|
1944
|
-
l && (
|
|
1944
|
+
l && (Se(e, i, o, !1), Nt(e, e.line - s), i = o = e.position, l = !1), Ne(y) || (o = e.position + 1), y = e.input.charCodeAt(++e.position);
|
|
1945
1945
|
}
|
|
1946
|
-
return
|
|
1946
|
+
return Se(e, i, o, !1), e.result ? !0 : (e.kind = c, e.result = C, !1);
|
|
1947
1947
|
}
|
|
1948
1948
|
function Qi(e, t) {
|
|
1949
1949
|
var n, r, a;
|
|
@@ -1951,13 +1951,13 @@ function Qi(e, t) {
|
|
|
1951
1951
|
return !1;
|
|
1952
1952
|
for (e.kind = "scalar", e.result = "", e.position++, r = a = e.position; (n = e.input.charCodeAt(e.position)) !== 0; )
|
|
1953
1953
|
if (n === 39)
|
|
1954
|
-
if (
|
|
1954
|
+
if (Se(e, r, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39)
|
|
1955
1955
|
r = e.position, e.position++, a = e.position;
|
|
1956
1956
|
else
|
|
1957
1957
|
return !0;
|
|
1958
1958
|
else
|
|
1959
|
-
he(n) ? (
|
|
1960
|
-
|
|
1959
|
+
he(n) ? (Se(e, r, a, !0), Nt(e, ee(e, !1, t)), r = a = e.position) : e.position === e.lineStart && ot(e) ? q(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
|
|
1960
|
+
q(e, "unexpected end of the stream within a single quoted scalar");
|
|
1961
1961
|
}
|
|
1962
1962
|
function Xi(e, t) {
|
|
1963
1963
|
var n, r, a, i, o, l;
|
|
@@ -1965,38 +1965,38 @@ function Xi(e, t) {
|
|
|
1965
1965
|
return !1;
|
|
1966
1966
|
for (e.kind = "scalar", e.result = "", e.position++, n = r = e.position; (l = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1967
1967
|
if (l === 34)
|
|
1968
|
-
return
|
|
1968
|
+
return Se(e, n, e.position, !0), e.position++, !0;
|
|
1969
1969
|
if (l === 92) {
|
|
1970
|
-
if (
|
|
1970
|
+
if (Se(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), he(l))
|
|
1971
1971
|
ee(e, !1, t);
|
|
1972
1972
|
else if (l < 256 && Qn[l])
|
|
1973
1973
|
e.result += Xn[l], e.position++;
|
|
1974
1974
|
else if ((o = Hi(l)) > 0) {
|
|
1975
1975
|
for (a = o, i = 0; a > 0; a--)
|
|
1976
|
-
l = e.input.charCodeAt(++e.position), (o = Gi(l)) >= 0 ? i = (i << 4) + o :
|
|
1976
|
+
l = e.input.charCodeAt(++e.position), (o = Gi(l)) >= 0 ? i = (i << 4) + o : q(e, "expected hexadecimal character");
|
|
1977
1977
|
e.result += Wi(i), e.position++;
|
|
1978
1978
|
} else
|
|
1979
|
-
|
|
1979
|
+
q(e, "unknown escape sequence");
|
|
1980
1980
|
n = r = e.position;
|
|
1981
1981
|
} else
|
|
1982
|
-
he(l) ? (
|
|
1982
|
+
he(l) ? (Se(e, n, r, !0), Nt(e, ee(e, !1, t)), n = r = e.position) : e.position === e.lineStart && ot(e) ? q(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1983
1983
|
}
|
|
1984
|
-
|
|
1984
|
+
q(e, "unexpected end of the stream within a double quoted scalar");
|
|
1985
1985
|
}
|
|
1986
1986
|
function eo(e, t) {
|
|
1987
|
-
var n = !0, r, a, i, o = e.tag, l, s = e.anchor, u, d, c, C, y,
|
|
1988
|
-
if (
|
|
1987
|
+
var n = !0, r, a, i, o = e.tag, l, s = e.anchor, u, d, c, C, y, _ = /* @__PURE__ */ Object.create(null), M, k, U, x;
|
|
1988
|
+
if (x = e.input.charCodeAt(e.position), x === 91)
|
|
1989
1989
|
d = 93, y = !1, l = [];
|
|
1990
|
-
else if (
|
|
1990
|
+
else if (x === 123)
|
|
1991
1991
|
d = 125, y = !0, l = {};
|
|
1992
1992
|
else
|
|
1993
1993
|
return !1;
|
|
1994
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1995
|
-
if (ee(e, !0, t),
|
|
1994
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), x = e.input.charCodeAt(++e.position); x !== 0; ) {
|
|
1995
|
+
if (ee(e, !0, t), x = e.input.charCodeAt(e.position), x === d)
|
|
1996
1996
|
return e.position++, e.tag = o, e.anchor = s, e.kind = y ? "mapping" : "sequence", e.result = l, !0;
|
|
1997
|
-
n ?
|
|
1997
|
+
n ? x === 44 && q(e, "expected the node content, but found ','") : q(e, "missed comma between flow collection entries"), k = M = U = null, c = C = !1, x === 63 && (u = e.input.charCodeAt(e.position + 1), de(u) && (c = C = !0, e.position++, ee(e, !0, t))), r = e.line, a = e.lineStart, i = e.position, Le(e, t, Xe, !1, !0), k = e.tag, M = e.result, ee(e, !0, t), x = e.input.charCodeAt(e.position), (C || e.line === r) && x === 58 && (c = !0, x = e.input.charCodeAt(++e.position), ee(e, !0, t), Le(e, t, Xe, !1, !0), U = e.result), y ? Ke(e, l, _, k, M, U, r, a, i) : c ? l.push(Ke(e, null, _, k, M, U, r, a, i)) : l.push(M), ee(e, !0, t), x = e.input.charCodeAt(e.position), x === 44 ? (n = !0, x = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1998
1998
|
}
|
|
1999
|
-
|
|
1999
|
+
q(e, "unexpected end of the stream within a flow collection");
|
|
2000
2000
|
}
|
|
2001
2001
|
function to(e, t) {
|
|
2002
2002
|
var n, r, a = mt, i = !1, o = !1, l = t, s = 0, u = !1, d, c;
|
|
@@ -2008,15 +2008,15 @@ function to(e, t) {
|
|
|
2008
2008
|
return !1;
|
|
2009
2009
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
2010
2010
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
2011
|
-
mt === a ? a = c === 43 ? Qt : Vi :
|
|
2011
|
+
mt === a ? a = c === 43 ? Qt : Vi : q(e, "repeat of a chomping mode identifier");
|
|
2012
2012
|
else if ((d = Ji(c)) >= 0)
|
|
2013
|
-
d === 0 ?
|
|
2013
|
+
d === 0 ? q(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? q(e, "repeat of an indentation width identifier") : (l = t + d - 1, o = !0);
|
|
2014
2014
|
else
|
|
2015
2015
|
break;
|
|
2016
|
-
if (
|
|
2016
|
+
if (Ne(c)) {
|
|
2017
2017
|
do
|
|
2018
2018
|
c = e.input.charCodeAt(++e.position);
|
|
2019
|
-
while (
|
|
2019
|
+
while (Ne(c));
|
|
2020
2020
|
if (c === 35)
|
|
2021
2021
|
do
|
|
2022
2022
|
c = e.input.charCodeAt(++e.position);
|
|
@@ -2035,13 +2035,13 @@ function to(e, t) {
|
|
|
2035
2035
|
`);
|
|
2036
2036
|
break;
|
|
2037
2037
|
}
|
|
2038
|
-
for (r ?
|
|
2038
|
+
for (r ? Ne(c) ? (u = !0, e.result += te.repeat(`
|
|
2039
2039
|
`, i ? 1 + s : s)) : u ? (u = !1, e.result += te.repeat(`
|
|
2040
2040
|
`, s + 1)) : s === 0 ? i && (e.result += " ") : e.result += te.repeat(`
|
|
2041
2041
|
`, s) : e.result += te.repeat(`
|
|
2042
2042
|
`, i ? 1 + s : s), i = !0, o = !0, s = 0, n = e.position; !he(c) && c !== 0; )
|
|
2043
2043
|
c = e.input.charCodeAt(++e.position);
|
|
2044
|
-
|
|
2044
|
+
Se(e, n, e.position, !1);
|
|
2045
2045
|
}
|
|
2046
2046
|
return !0;
|
|
2047
2047
|
}
|
|
@@ -2049,78 +2049,78 @@ function rn(e, t) {
|
|
|
2049
2049
|
var n, r = e.tag, a = e.anchor, i = [], o, l = !1, s;
|
|
2050
2050
|
if (e.firstTabInLine !== -1)
|
|
2051
2051
|
return !1;
|
|
2052
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2052
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, q(e, "tab characters must not be used in indentation")), !(s !== 45 || (o = e.input.charCodeAt(e.position + 1), !de(o)))); ) {
|
|
2053
2053
|
if (l = !0, e.position++, ee(e, !0, -1) && e.lineIndent <= t) {
|
|
2054
2054
|
i.push(null), s = e.input.charCodeAt(e.position);
|
|
2055
2055
|
continue;
|
|
2056
2056
|
}
|
|
2057
2057
|
if (n = e.line, Le(e, t, Wn, !1, !0), i.push(e.result), ee(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
2058
|
-
|
|
2058
|
+
q(e, "bad indentation of a sequence entry");
|
|
2059
2059
|
else if (e.lineIndent < t)
|
|
2060
2060
|
break;
|
|
2061
2061
|
}
|
|
2062
2062
|
return l ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = i, !0) : !1;
|
|
2063
2063
|
}
|
|
2064
2064
|
function no(e, t, n) {
|
|
2065
|
-
var r, a, i, o, l, s, u = e.tag, d = e.anchor, c = {}, C = /* @__PURE__ */ Object.create(null), y = null,
|
|
2065
|
+
var r, a, i, o, l, s, u = e.tag, d = e.anchor, c = {}, C = /* @__PURE__ */ Object.create(null), y = null, _ = null, M = null, k = !1, U = !1, x;
|
|
2066
2066
|
if (e.firstTabInLine !== -1)
|
|
2067
2067
|
return !1;
|
|
2068
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = c),
|
|
2069
|
-
if (!k && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2070
|
-
|
|
2068
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), x = e.input.charCodeAt(e.position); x !== 0; ) {
|
|
2069
|
+
if (!k && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, q(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), i = e.line, (x === 63 || x === 58) && de(r))
|
|
2070
|
+
x === 63 ? (k && (Ke(e, c, C, y, _, null, o, l, s), y = _ = M = null), U = !0, k = !0, a = !0) : k ? (k = !1, a = !0) : q(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, x = r;
|
|
2071
2071
|
else {
|
|
2072
2072
|
if (o = e.line, l = e.lineStart, s = e.position, !Le(e, n, Jn, !1, !0))
|
|
2073
2073
|
break;
|
|
2074
2074
|
if (e.line === i) {
|
|
2075
|
-
for (
|
|
2076
|
-
|
|
2077
|
-
if (
|
|
2078
|
-
|
|
2079
|
-
else if (
|
|
2080
|
-
|
|
2075
|
+
for (x = e.input.charCodeAt(e.position); Ne(x); )
|
|
2076
|
+
x = e.input.charCodeAt(++e.position);
|
|
2077
|
+
if (x === 58)
|
|
2078
|
+
x = e.input.charCodeAt(++e.position), de(x) || q(e, "a whitespace character is expected after the key-value separator within a block mapping"), k && (Ke(e, c, C, y, _, null, o, l, s), y = _ = M = null), U = !0, k = !1, a = !1, y = e.tag, _ = e.result;
|
|
2079
|
+
else if (U)
|
|
2080
|
+
q(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2081
2081
|
else
|
|
2082
2082
|
return e.tag = u, e.anchor = d, !0;
|
|
2083
|
-
} else if (
|
|
2084
|
-
|
|
2083
|
+
} else if (U)
|
|
2084
|
+
q(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2085
2085
|
else
|
|
2086
2086
|
return e.tag = u, e.anchor = d, !0;
|
|
2087
2087
|
}
|
|
2088
|
-
if ((e.line === i || e.lineIndent > t) && (k && (o = e.line, l = e.lineStart, s = e.position), Le(e, t, et, !0, a) && (k ?
|
|
2089
|
-
|
|
2088
|
+
if ((e.line === i || e.lineIndent > t) && (k && (o = e.line, l = e.lineStart, s = e.position), Le(e, t, et, !0, a) && (k ? _ = e.result : M = e.result), k || (Ke(e, c, C, y, _, M, o, l, s), y = _ = M = null), ee(e, !0, -1), x = e.input.charCodeAt(e.position)), (e.line === i || e.lineIndent > t) && x !== 0)
|
|
2089
|
+
q(e, "bad indentation of a mapping entry");
|
|
2090
2090
|
else if (e.lineIndent < t)
|
|
2091
2091
|
break;
|
|
2092
2092
|
}
|
|
2093
|
-
return k && Ke(e, c, C, y,
|
|
2093
|
+
return k && Ke(e, c, C, y, _, null, o, l, s), U && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), U;
|
|
2094
2094
|
}
|
|
2095
2095
|
function ro(e) {
|
|
2096
2096
|
var t, n = !1, r = !1, a, i, o;
|
|
2097
2097
|
if (o = e.input.charCodeAt(e.position), o !== 33)
|
|
2098
2098
|
return !1;
|
|
2099
|
-
if (e.tag !== null &&
|
|
2099
|
+
if (e.tag !== null && q(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (n = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (r = !0, a = "!!", o = e.input.charCodeAt(++e.position)) : a = "!", t = e.position, n) {
|
|
2100
2100
|
do
|
|
2101
2101
|
o = e.input.charCodeAt(++e.position);
|
|
2102
2102
|
while (o !== 0 && o !== 62);
|
|
2103
|
-
e.position < e.length ? (i = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) :
|
|
2103
|
+
e.position < e.length ? (i = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) : q(e, "unexpected end of the stream within a verbatim tag");
|
|
2104
2104
|
} else {
|
|
2105
2105
|
for (; o !== 0 && !de(o); )
|
|
2106
|
-
o === 33 && (r ?
|
|
2107
|
-
i = e.input.slice(t, e.position), zi.test(i) &&
|
|
2106
|
+
o === 33 && (r ? q(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(t - 1, e.position + 1), Zn.test(a) || q(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
2107
|
+
i = e.input.slice(t, e.position), zi.test(i) && q(e, "tag suffix cannot contain flow indicator characters");
|
|
2108
2108
|
}
|
|
2109
|
-
i && !
|
|
2109
|
+
i && !Yn.test(i) && q(e, "tag name cannot contain such characters: " + i);
|
|
2110
2110
|
try {
|
|
2111
2111
|
i = decodeURIComponent(i);
|
|
2112
2112
|
} catch {
|
|
2113
|
-
|
|
2113
|
+
q(e, "tag name is malformed: " + i);
|
|
2114
2114
|
}
|
|
2115
|
-
return n ? e.tag = i :
|
|
2115
|
+
return n ? e.tag = i : xe.call(e.tagMap, a) ? e.tag = e.tagMap[a] + i : a === "!" ? e.tag = "!" + i : a === "!!" ? e.tag = "tag:yaml.org,2002:" + i : q(e, 'undeclared tag handle "' + a + '"'), !0;
|
|
2116
2116
|
}
|
|
2117
2117
|
function ao(e) {
|
|
2118
2118
|
var t, n;
|
|
2119
2119
|
if (n = e.input.charCodeAt(e.position), n !== 38)
|
|
2120
2120
|
return !1;
|
|
2121
|
-
for (e.anchor !== null &&
|
|
2121
|
+
for (e.anchor !== null && q(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !de(n) && !Be(n); )
|
|
2122
2122
|
n = e.input.charCodeAt(++e.position);
|
|
2123
|
-
return e.position === t &&
|
|
2123
|
+
return e.position === t && q(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
2124
2124
|
}
|
|
2125
2125
|
function io(e) {
|
|
2126
2126
|
var t, n, r;
|
|
@@ -2128,31 +2128,31 @@ function io(e) {
|
|
|
2128
2128
|
return !1;
|
|
2129
2129
|
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !de(r) && !Be(r); )
|
|
2130
2130
|
r = e.input.charCodeAt(++e.position);
|
|
2131
|
-
return e.position === t &&
|
|
2131
|
+
return e.position === t && q(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), xe.call(e.anchorMap, n) || q(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], ee(e, !0, -1), !0;
|
|
2132
2132
|
}
|
|
2133
2133
|
function Le(e, t, n, r, a) {
|
|
2134
|
-
var i, o, l, s = 1, u = !1, d = !1, c, C, y,
|
|
2134
|
+
var i, o, l, s = 1, u = !1, d = !1, c, C, y, _, M, k;
|
|
2135
2135
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = o = l = et === n || Wn === n, r && ee(e, !0, -1) && (u = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
2136
2136
|
for (; ro(e) || ao(e); )
|
|
2137
2137
|
ee(e, !0, -1) ? (u = !0, l = i, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
2138
|
-
if (l && (l = u || a), (s === 1 || et === n) && (Xe === n || Jn === n ? M = t : M = t + 1, k = e.position - e.lineStart, s === 1 ? l && (rn(e, k) || no(e, k, M)) || eo(e, M) ? d = !0 : (o && to(e, M) || Qi(e, M) || Xi(e, M) ? d = !0 : io(e) ? (d = !0, (e.tag !== null || e.anchor !== null) &&
|
|
2138
|
+
if (l && (l = u || a), (s === 1 || et === n) && (Xe === n || Jn === n ? M = t : M = t + 1, k = e.position - e.lineStart, s === 1 ? l && (rn(e, k) || no(e, k, M)) || eo(e, M) ? d = !0 : (o && to(e, M) || Qi(e, M) || Xi(e, M) ? d = !0 : io(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && q(e, "alias node should not have any properties")) : Yi(e, M, Xe === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && rn(e, k))), e.tag === null)
|
|
2139
2139
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2140
2140
|
else if (e.tag === "?") {
|
|
2141
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2142
|
-
if (
|
|
2143
|
-
e.result =
|
|
2141
|
+
for (e.result !== null && e.kind !== "scalar" && q(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, C = e.implicitTypes.length; c < C; c += 1)
|
|
2142
|
+
if (_ = e.implicitTypes[c], _.resolve(e.result)) {
|
|
2143
|
+
e.result = _.construct(e.result), e.tag = _.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2144
2144
|
break;
|
|
2145
2145
|
}
|
|
2146
2146
|
} else if (e.tag !== "!") {
|
|
2147
|
-
if (
|
|
2148
|
-
|
|
2147
|
+
if (xe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2148
|
+
_ = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2149
2149
|
else
|
|
2150
|
-
for (
|
|
2150
|
+
for (_ = null, y = e.typeMap.multi[e.kind || "fallback"], c = 0, C = y.length; c < C; c += 1)
|
|
2151
2151
|
if (e.tag.slice(0, y[c].tag.length) === y[c].tag) {
|
|
2152
|
-
|
|
2152
|
+
_ = y[c];
|
|
2153
2153
|
break;
|
|
2154
2154
|
}
|
|
2155
|
-
|
|
2155
|
+
_ || q(e, "unknown tag !<" + e.tag + ">"), e.result !== null && _.kind !== e.kind && q(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + _.kind + '", not "' + e.kind + '"'), _.resolve(e.result, e.tag) ? (e.result = _.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : q(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2156
2156
|
}
|
|
2157
2157
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2158
2158
|
}
|
|
@@ -2161,8 +2161,8 @@ function oo(e) {
|
|
|
2161
2161
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (ee(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
2162
2162
|
for (i = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !de(o); )
|
|
2163
2163
|
o = e.input.charCodeAt(++e.position);
|
|
2164
|
-
for (r = e.input.slice(n, e.position), a = [], r.length < 1 &&
|
|
2165
|
-
for (;
|
|
2164
|
+
for (r = e.input.slice(n, e.position), a = [], r.length < 1 && q(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
2165
|
+
for (; Ne(o); )
|
|
2166
2166
|
o = e.input.charCodeAt(++e.position);
|
|
2167
2167
|
if (o === 35) {
|
|
2168
2168
|
do
|
|
@@ -2176,22 +2176,22 @@ function oo(e) {
|
|
|
2176
2176
|
o = e.input.charCodeAt(++e.position);
|
|
2177
2177
|
a.push(e.input.slice(n, e.position));
|
|
2178
2178
|
}
|
|
2179
|
-
o !== 0 && $t(e),
|
|
2179
|
+
o !== 0 && $t(e), xe.call(tn, r) ? tn[r](e, r, a) : tt(e, 'unknown document directive "' + r + '"');
|
|
2180
2180
|
}
|
|
2181
|
-
if (ee(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, ee(e, !0, -1)) : i &&
|
|
2181
|
+
if (ee(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, ee(e, !0, -1)) : i && q(e, "directives end mark is expected"), Le(e, e.lineIndent - 1, et, !1, !0), ee(e, !0, -1), e.checkLineBreaks && Pi.test(e.input.slice(t, e.position)) && tt(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && ot(e)) {
|
|
2182
2182
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ee(e, !0, -1));
|
|
2183
2183
|
return;
|
|
2184
2184
|
}
|
|
2185
2185
|
if (e.position < e.length - 1)
|
|
2186
|
-
|
|
2186
|
+
q(e, "end of the stream or a document separator is expected");
|
|
2187
2187
|
else
|
|
2188
2188
|
return;
|
|
2189
2189
|
}
|
|
2190
2190
|
function tr(e, t) {
|
|
2191
2191
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2192
2192
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2193
|
-
var n = new
|
|
2194
|
-
for (r !== -1 && (n.position = r,
|
|
2193
|
+
var n = new Zi(e, t), r = e.indexOf("\0");
|
|
2194
|
+
for (r !== -1 && (n.position = r, q(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2195
2195
|
n.lineIndent += 1, n.position += 1;
|
|
2196
2196
|
for (; n.position < n.length - 1; )
|
|
2197
2197
|
oo(n);
|
|
@@ -2216,7 +2216,7 @@ function so(e, t) {
|
|
|
2216
2216
|
var uo = lo, co = so, nr = {
|
|
2217
2217
|
loadAll: uo,
|
|
2218
2218
|
load: co
|
|
2219
|
-
}, rr = Object.prototype.toString, ar = Object.prototype.hasOwnProperty,
|
|
2219
|
+
}, rr = Object.prototype.toString, ar = Object.prototype.hasOwnProperty, Tt = 65279, po = 9, Ge = 10, fo = 13, mo = 32, go = 33, yo = 34, vt = 35, ho = 37, vo = 38, bo = 39, Co = 42, ir = 44, ko = 45, nt = 58, wo = 61, _o = 62, Io = 63, So = 64, or = 91, lr = 93, Ao = 96, sr = 123, xo = 124, ur = 125, le = {};
|
|
2220
2220
|
le[0] = "\\0";
|
|
2221
2221
|
le[7] = "\\a";
|
|
2222
2222
|
le[8] = "\\b";
|
|
@@ -2249,8 +2249,8 @@ var $o = [
|
|
|
2249
2249
|
"off",
|
|
2250
2250
|
"Off",
|
|
2251
2251
|
"OFF"
|
|
2252
|
-
],
|
|
2253
|
-
function
|
|
2252
|
+
], No = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2253
|
+
function To(e, t) {
|
|
2254
2254
|
var n, r, a, i, o, l, s;
|
|
2255
2255
|
if (t === null)
|
|
2256
2256
|
return {};
|
|
@@ -2258,7 +2258,7 @@ function jo(e, t) {
|
|
|
2258
2258
|
o = r[a], l = String(t[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), s = e.compiledTypeMap.fallback[o], s && ar.call(s.styleAliases, l) && (l = s.styleAliases[l]), n[o] = l;
|
|
2259
2259
|
return n;
|
|
2260
2260
|
}
|
|
2261
|
-
function
|
|
2261
|
+
function jo(e) {
|
|
2262
2262
|
var t, n, r;
|
|
2263
2263
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
2264
2264
|
n = "x", r = 2;
|
|
@@ -2272,7 +2272,7 @@ function No(e) {
|
|
|
2272
2272
|
}
|
|
2273
2273
|
var Oo = 1, He = 2;
|
|
2274
2274
|
function Mo(e) {
|
|
2275
|
-
this.schema = e.schema ||
|
|
2275
|
+
this.schema = e.schema || xt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = te.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = To(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 === '"' ? He : Oo, 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;
|
|
2276
2276
|
}
|
|
2277
2277
|
function an(e, t) {
|
|
2278
2278
|
for (var n = te.repeat(" ", t), r = 0, a = -1, i = "", o, l = e.length; r < l; )
|
|
@@ -2285,7 +2285,7 @@ function bt(e, t) {
|
|
|
2285
2285
|
return `
|
|
2286
2286
|
` + te.repeat(" ", e.indent * t);
|
|
2287
2287
|
}
|
|
2288
|
-
function
|
|
2288
|
+
function Eo(e, t) {
|
|
2289
2289
|
var n, r, a;
|
|
2290
2290
|
for (n = 0, r = e.implicitTypes.length; n < r; n += 1)
|
|
2291
2291
|
if (a = e.implicitTypes[n], a.resolve(t))
|
|
@@ -2296,10 +2296,10 @@ function rt(e) {
|
|
|
2296
2296
|
return e === mo || e === po;
|
|
2297
2297
|
}
|
|
2298
2298
|
function Je(e) {
|
|
2299
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2299
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Tt || 65536 <= e && e <= 1114111;
|
|
2300
2300
|
}
|
|
2301
2301
|
function on(e) {
|
|
2302
|
-
return Je(e) && e !==
|
|
2302
|
+
return Je(e) && e !== Tt && e !== fo && e !== Ge;
|
|
2303
2303
|
}
|
|
2304
2304
|
function ln(e, t, n) {
|
|
2305
2305
|
var r = on(e), a = r && !rt(e);
|
|
@@ -2311,8 +2311,8 @@ function ln(e, t, n) {
|
|
|
2311
2311
|
) : r && e !== ir && e !== or && e !== lr && e !== sr && e !== ur) && e !== vt && !(t === nt && !a) || on(t) && !rt(t) && e === vt || t === nt && a
|
|
2312
2312
|
);
|
|
2313
2313
|
}
|
|
2314
|
-
function
|
|
2315
|
-
return Je(e) && e !==
|
|
2314
|
+
function qo(e) {
|
|
2315
|
+
return Je(e) && e !== Tt && !rt(e) && e !== ko && e !== Io && e !== nt && e !== ir && e !== or && e !== lr && e !== sr && e !== ur && e !== vt && e !== vo && e !== Co && e !== go && e !== xo && e !== wo && e !== _o && e !== bo && e !== yo && e !== ho && e !== So && e !== Ao;
|
|
2316
2316
|
}
|
|
2317
2317
|
function Fo(e) {
|
|
2318
2318
|
return !rt(e) && e !== nt;
|
|
@@ -2327,7 +2327,7 @@ function cr(e) {
|
|
|
2327
2327
|
}
|
|
2328
2328
|
var dr = 1, Ct = 2, pr = 3, fr = 4, Fe = 5;
|
|
2329
2329
|
function Bo(e, t, n, r, a, i, o, l) {
|
|
2330
|
-
var s, u = 0, d = null, c = !1, C = !1, y = r !== -1,
|
|
2330
|
+
var s, u = 0, d = null, c = !1, C = !1, y = r !== -1, _ = -1, M = qo(Pe(e, 0)) && Fo(Pe(e, e.length - 1));
|
|
2331
2331
|
if (t || o)
|
|
2332
2332
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2333
2333
|
if (u = Pe(e, s), !Je(u))
|
|
@@ -2338,12 +2338,12 @@ function Bo(e, t, n, r, a, i, o, l) {
|
|
|
2338
2338
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2339
2339
|
if (u = Pe(e, s), u === Ge)
|
|
2340
2340
|
c = !0, y && (C = C || // Foldable line = too long, and not more-indented.
|
|
2341
|
-
s -
|
|
2341
|
+
s - _ - 1 > r && e[_ + 1] !== " ", _ = s);
|
|
2342
2342
|
else if (!Je(u))
|
|
2343
2343
|
return Fe;
|
|
2344
2344
|
M = M && ln(u, d, l), d = u;
|
|
2345
2345
|
}
|
|
2346
|
-
C = C || y && s -
|
|
2346
|
+
C = C || y && s - _ - 1 > r && e[_ + 1] !== " ";
|
|
2347
2347
|
}
|
|
2348
2348
|
return !c && !C ? M && !o && !a(e) ? dr : i === He ? Fe : Ct : n > 9 && cr(e) ? Fe : o ? i === He ? Fe : Ct : C ? fr : pr;
|
|
2349
2349
|
}
|
|
@@ -2351,11 +2351,11 @@ function Ko(e, t, n, r, a) {
|
|
|
2351
2351
|
e.dump = function() {
|
|
2352
2352
|
if (t.length === 0)
|
|
2353
2353
|
return e.quotingType === He ? '""' : "''";
|
|
2354
|
-
if (!e.noCompatMode && ($o.indexOf(t) !== -1 ||
|
|
2354
|
+
if (!e.noCompatMode && ($o.indexOf(t) !== -1 || No.test(t)))
|
|
2355
2355
|
return e.quotingType === He ? '"' + t + '"' : "'" + t + "'";
|
|
2356
2356
|
var i = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - i), l = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2357
2357
|
function s(u) {
|
|
2358
|
-
return
|
|
2358
|
+
return Eo(e, u);
|
|
2359
2359
|
}
|
|
2360
2360
|
switch (Bo(
|
|
2361
2361
|
t,
|
|
@@ -2376,7 +2376,7 @@ function Ko(e, t, n, r, a) {
|
|
|
2376
2376
|
case fr:
|
|
2377
2377
|
return ">" + sn(t, e.indent) + un(an(Lo(t, o), i));
|
|
2378
2378
|
case Fe:
|
|
2379
|
-
return '"' +
|
|
2379
|
+
return '"' + Uo(t) + '"';
|
|
2380
2380
|
default:
|
|
2381
2381
|
throw new se("impossible error: invalid scalar style");
|
|
2382
2382
|
}
|
|
@@ -2417,12 +2417,12 @@ function cn(e, t) {
|
|
|
2417
2417
|
`, e.length - a > t && o > a ? s += e.slice(a, o) + `
|
|
2418
2418
|
` + e.slice(o + 1) : s += e.slice(a), s.slice(1);
|
|
2419
2419
|
}
|
|
2420
|
-
function
|
|
2420
|
+
function Uo(e) {
|
|
2421
2421
|
for (var t = "", n = 0, r, a = 0; a < e.length; n >= 65536 ? a += 2 : a++)
|
|
2422
|
-
n = Pe(e, a), r = le[n], !r && Je(n) ? (t += e[a], n >= 65536 && (t += e[a + 1])) : t += r ||
|
|
2422
|
+
n = Pe(e, a), r = le[n], !r && Je(n) ? (t += e[a], n >= 65536 && (t += e[a + 1])) : t += r || jo(n);
|
|
2423
2423
|
return t;
|
|
2424
2424
|
}
|
|
2425
|
-
function
|
|
2425
|
+
function Ro(e, t, n) {
|
|
2426
2426
|
var r = "", a = e.tag, i, o, l;
|
|
2427
2427
|
for (i = 0, o = n.length; i < o; i += 1)
|
|
2428
2428
|
l = n[i], e.replacer && (l = e.replacer.call(n, String(i), l)), (we(e, t, l, !1, !1) || typeof l > "u" && we(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
@@ -2480,7 +2480,7 @@ function we(e, t, n, r, a, i, o) {
|
|
|
2480
2480
|
if (d && C && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), l === "[object Object]")
|
|
2481
2481
|
r && Object.keys(e.dump).length !== 0 ? (Do(e, t, e.dump, a), C && (e.dump = "&ref_" + c + e.dump)) : (Vo(e, t, e.dump), C && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2482
2482
|
else if (l === "[object Array]")
|
|
2483
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? dn(e, t - 1, e.dump, a) : dn(e, t, e.dump, a), C && (e.dump = "&ref_" + c + e.dump)) : (
|
|
2483
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? dn(e, t - 1, e.dump, a) : dn(e, t, e.dump, a), C && (e.dump = "&ref_" + c + e.dump)) : (Ro(e, t, e.dump), C && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2484
2484
|
else if (l === "[object String]")
|
|
2485
2485
|
e.tag !== "?" && Ko(e, e.dump, t, i, s);
|
|
2486
2486
|
else {
|
|
@@ -2523,30 +2523,30 @@ function zo(e, t) {
|
|
|
2523
2523
|
var Go = zo, Ho = {
|
|
2524
2524
|
dump: Go
|
|
2525
2525
|
};
|
|
2526
|
-
function
|
|
2526
|
+
function jt(e, t) {
|
|
2527
2527
|
return function() {
|
|
2528
2528
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2529
2529
|
};
|
|
2530
2530
|
}
|
|
2531
|
-
var Jo = ie, Wo =
|
|
2531
|
+
var Jo = ie, Wo = Nn, Zo = Mn, Yo = Kn, Qo = Ln, Xo = xt, el = nr.load, tl = nr.loadAll, nl = Ho.dump, rl = se, al = {
|
|
2532
2532
|
binary: Pn,
|
|
2533
2533
|
float: Bn,
|
|
2534
2534
|
map: On,
|
|
2535
|
-
null:
|
|
2535
|
+
null: En,
|
|
2536
2536
|
pairs: Gn,
|
|
2537
2537
|
set: Hn,
|
|
2538
2538
|
timestamp: Vn,
|
|
2539
|
-
bool:
|
|
2539
|
+
bool: qn,
|
|
2540
2540
|
int: Fn,
|
|
2541
2541
|
merge: Dn,
|
|
2542
2542
|
omap: zn,
|
|
2543
|
-
seq:
|
|
2544
|
-
str:
|
|
2545
|
-
}, il =
|
|
2543
|
+
seq: jn,
|
|
2544
|
+
str: Tn
|
|
2545
|
+
}, il = jt("safeLoad", "load"), ol = jt("safeLoadAll", "loadAll"), ll = jt("safeDump", "dump"), sl = {
|
|
2546
2546
|
Type: Jo,
|
|
2547
2547
|
Schema: Wo,
|
|
2548
|
-
FAILSAFE_SCHEMA:
|
|
2549
|
-
JSON_SCHEMA:
|
|
2548
|
+
FAILSAFE_SCHEMA: Zo,
|
|
2549
|
+
JSON_SCHEMA: Yo,
|
|
2550
2550
|
CORE_SCHEMA: Qo,
|
|
2551
2551
|
DEFAULT_SCHEMA: Xo,
|
|
2552
2552
|
load: el,
|
|
@@ -2573,7 +2573,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2573
2573
|
return Object.keys(r).length === 0 && r.constructor === Object ? "" : sl.dump(r).trim();
|
|
2574
2574
|
});
|
|
2575
2575
|
return (r, a) => {
|
|
2576
|
-
const i =
|
|
2576
|
+
const i = R("KCodeBlock");
|
|
2577
2577
|
return f(), O("div", ul, [
|
|
2578
2578
|
t.yamlRecord ? (f(), V(i, {
|
|
2579
2579
|
key: 0,
|
|
@@ -2630,7 +2630,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2630
2630
|
}
|
|
2631
2631
|
},
|
|
2632
2632
|
setup(e) {
|
|
2633
|
-
const t = e, n =
|
|
2633
|
+
const t = e, n = _t(), { i18n: { t: r } } = ne.useI18n(), a = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), i = w(() => {
|
|
2634
2634
|
if (!t.record)
|
|
2635
2635
|
return t.record;
|
|
2636
2636
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
@@ -2643,11 +2643,11 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2643
2643
|
class: Ae(`config-card-details-${s}-props`),
|
|
2644
2644
|
"data-testid": `config-card-details-${s}-props`
|
|
2645
2645
|
}, [
|
|
2646
|
-
s !== "basic" ? (f(), O("div", pl,
|
|
2647
|
-
(f(!0), O(fe, null, pe(e.propertyCollections[s], (u) => (f(), V(
|
|
2646
|
+
s !== "basic" ? (f(), O("div", pl, j(s === "advanced" ? m(r)("baseConfigCard.sections.advanced") : m(r)("baseConfigCard.sections.plugin")), 1)) : P("", !0),
|
|
2647
|
+
(f(!0), O(fe, null, pe(e.propertyCollections[s], (u) => (f(), V(Sn, {
|
|
2648
2648
|
key: u.key,
|
|
2649
2649
|
item: u
|
|
2650
|
-
},
|
|
2650
|
+
}, Te({
|
|
2651
2651
|
label: h(() => [
|
|
2652
2652
|
Q(o.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2653
2653
|
]),
|
|
@@ -2687,7 +2687,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2687
2687
|
for (const [r, a] of t)
|
|
2688
2688
|
n[r] = a;
|
|
2689
2689
|
return n;
|
|
2690
|
-
}, gl = (e) => (
|
|
2690
|
+
}, gl = (e) => (Re("data-v-1d2a8d30"), e = e(), Ve(), e), yl = ["aria-hidden"], hl = {
|
|
2691
2691
|
key: 0,
|
|
2692
2692
|
"data-testid": "kui-icon-svg-title"
|
|
2693
2693
|
}, vl = /* @__PURE__ */ gl(() => /* @__PURE__ */ F("path", {
|
|
@@ -2766,7 +2766,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2766
2766
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2767
2767
|
class: "kui-icon add-icon",
|
|
2768
2768
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
2769
|
-
style:
|
|
2769
|
+
style: Ue(r.value)
|
|
2770
2770
|
}, {
|
|
2771
2771
|
default: h(() => [
|
|
2772
2772
|
(f(), O("svg", {
|
|
@@ -2779,20 +2779,20 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2779
2779
|
width: "100%",
|
|
2780
2780
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2781
2781
|
}, [
|
|
2782
|
-
e.title ? (f(), O("title", hl,
|
|
2782
|
+
e.title ? (f(), O("title", hl, j(e.title), 1)) : P("", !0),
|
|
2783
2783
|
vl
|
|
2784
2784
|
], 8, yl))
|
|
2785
2785
|
]),
|
|
2786
2786
|
_: 1
|
|
2787
2787
|
}, 8, ["aria-hidden", "style"]));
|
|
2788
2788
|
}
|
|
2789
|
-
}), Cl = /* @__PURE__ */ We(bl, [["__scopeId", "data-v-1d2a8d30"]]), kl = (e) => (
|
|
2789
|
+
}), Cl = /* @__PURE__ */ We(bl, [["__scopeId", "data-v-1d2a8d30"]]), kl = (e) => (Re("data-v-929b4762"), e = e(), Ve(), e), wl = ["aria-hidden"], _l = {
|
|
2790
2790
|
key: 0,
|
|
2791
2791
|
"data-testid": "kui-icon-svg-title"
|
|
2792
|
-
},
|
|
2792
|
+
}, Il = /* @__PURE__ */ kl(() => /* @__PURE__ */ F("path", {
|
|
2793
2793
|
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",
|
|
2794
2794
|
fill: "currentColor"
|
|
2795
|
-
}, null, -1)),
|
|
2795
|
+
}, null, -1)), Sl = /* @__PURE__ */ W({
|
|
2796
2796
|
__name: "BookIcon",
|
|
2797
2797
|
props: {
|
|
2798
2798
|
/** The accessibility text provided to screen readers */
|
|
@@ -2865,7 +2865,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2865
2865
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2866
2866
|
class: "kui-icon book-icon",
|
|
2867
2867
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2868
|
-
style:
|
|
2868
|
+
style: Ue(r.value)
|
|
2869
2869
|
}, {
|
|
2870
2870
|
default: h(() => [
|
|
2871
2871
|
(f(), O("svg", {
|
|
@@ -2878,20 +2878,20 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2878
2878
|
width: "100%",
|
|
2879
2879
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2880
2880
|
}, [
|
|
2881
|
-
e.title ? (f(), O("title",
|
|
2882
|
-
|
|
2881
|
+
e.title ? (f(), O("title", _l, j(e.title), 1)) : P("", !0),
|
|
2882
|
+
Il
|
|
2883
2883
|
], 8, wl))
|
|
2884
2884
|
]),
|
|
2885
2885
|
_: 1
|
|
2886
2886
|
}, 8, ["aria-hidden", "style"]));
|
|
2887
2887
|
}
|
|
2888
|
-
}), Al = /* @__PURE__ */ We(
|
|
2888
|
+
}), Al = /* @__PURE__ */ We(Sl, [["__scopeId", "data-v-929b4762"]]), xl = (e) => (Re("data-v-219f8484"), e = e(), Ve(), e), $l = ["aria-hidden"], Nl = {
|
|
2889
2889
|
key: 0,
|
|
2890
2890
|
"data-testid": "kui-icon-svg-title"
|
|
2891
|
-
},
|
|
2891
|
+
}, Tl = /* @__PURE__ */ xl(() => /* @__PURE__ */ F("path", {
|
|
2892
2892
|
d: "M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",
|
|
2893
2893
|
fill: "currentColor"
|
|
2894
|
-
}, null, -1)),
|
|
2894
|
+
}, null, -1)), jl = /* @__PURE__ */ W({
|
|
2895
2895
|
__name: "ChevronDownIcon",
|
|
2896
2896
|
props: {
|
|
2897
2897
|
/** The accessibility text provided to screen readers */
|
|
@@ -2964,7 +2964,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2964
2964
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2965
2965
|
class: "kui-icon chevron-down-icon",
|
|
2966
2966
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
2967
|
-
style:
|
|
2967
|
+
style: Ue(r.value)
|
|
2968
2968
|
}, {
|
|
2969
2969
|
default: h(() => [
|
|
2970
2970
|
(f(), O("svg", {
|
|
@@ -2977,14 +2977,14 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
2977
2977
|
width: "100%",
|
|
2978
2978
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2979
2979
|
}, [
|
|
2980
|
-
e.title ? (f(), O("title",
|
|
2981
|
-
|
|
2980
|
+
e.title ? (f(), O("title", Nl, j(e.title), 1)) : P("", !0),
|
|
2981
|
+
Tl
|
|
2982
2982
|
], 8, $l))
|
|
2983
2983
|
]),
|
|
2984
2984
|
_: 1
|
|
2985
2985
|
}, 8, ["aria-hidden", "style"]));
|
|
2986
2986
|
}
|
|
2987
|
-
}), Ol = /* @__PURE__ */ We(
|
|
2987
|
+
}), Ol = /* @__PURE__ */ We(jl, [["__scopeId", "data-v-219f8484"]]), Ml = (e) => (Re("data-v-ed11facd"), e = e(), Ve(), e), El = ["aria-hidden"], ql = {
|
|
2988
2988
|
key: 0,
|
|
2989
2989
|
"data-testid": "kui-icon-svg-title"
|
|
2990
2990
|
}, Fl = /* @__PURE__ */ Ml(() => /* @__PURE__ */ F("path", {
|
|
@@ -3063,7 +3063,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3063
3063
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3064
3064
|
class: "kui-icon close-icon",
|
|
3065
3065
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
3066
|
-
style:
|
|
3066
|
+
style: Ue(r.value)
|
|
3067
3067
|
}, {
|
|
3068
3068
|
default: h(() => [
|
|
3069
3069
|
(f(), O("svg", {
|
|
@@ -3076,14 +3076,14 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3076
3076
|
width: "100%",
|
|
3077
3077
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3078
3078
|
}, [
|
|
3079
|
-
e.title ? (f(), O("title",
|
|
3079
|
+
e.title ? (f(), O("title", ql, j(e.title), 1)) : P("", !0),
|
|
3080
3080
|
Fl
|
|
3081
|
-
], 8,
|
|
3081
|
+
], 8, El))
|
|
3082
3082
|
]),
|
|
3083
3083
|
_: 1
|
|
3084
3084
|
}, 8, ["aria-hidden", "style"]));
|
|
3085
3085
|
}
|
|
3086
|
-
}), Kl = /* @__PURE__ */ We(Bl, [["__scopeId", "data-v-ed11facd"]]), Ll = (e) => (
|
|
3086
|
+
}), Kl = /* @__PURE__ */ We(Bl, [["__scopeId", "data-v-ed11facd"]]), Ll = (e) => (Re("data-v-cf4e7d0b"), e = e(), Ve(), e), Ul = ["aria-hidden"], Rl = {
|
|
3087
3087
|
key: 0,
|
|
3088
3088
|
"data-testid": "kui-icon-svg-title"
|
|
3089
3089
|
}, Vl = /* @__PURE__ */ Ll(() => /* @__PURE__ */ F("path", {
|
|
@@ -3162,7 +3162,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3162
3162
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3163
3163
|
class: "kui-icon more-icon",
|
|
3164
3164
|
"data-testid": "kui-icon-wrapper-more-icon",
|
|
3165
|
-
style:
|
|
3165
|
+
style: Ue(r.value)
|
|
3166
3166
|
}, {
|
|
3167
3167
|
default: h(() => [
|
|
3168
3168
|
(f(), O("svg", {
|
|
@@ -3175,9 +3175,9 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3175
3175
|
width: "100%",
|
|
3176
3176
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3177
3177
|
}, [
|
|
3178
|
-
e.title ? (f(), O("title",
|
|
3178
|
+
e.title ? (f(), O("title", Rl, j(e.title), 1)) : P("", !0),
|
|
3179
3179
|
Vl
|
|
3180
|
-
], 8,
|
|
3180
|
+
], 8, Ul))
|
|
3181
3181
|
]),
|
|
3182
3182
|
_: 1
|
|
3183
3183
|
}, 8, ["aria-hidden", "style"]));
|
|
@@ -3282,7 +3282,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3282
3282
|
d.value = p == null ? void 0 : p.value;
|
|
3283
3283
|
}, C = {
|
|
3284
3284
|
id: {
|
|
3285
|
-
type:
|
|
3285
|
+
type: Y.ID,
|
|
3286
3286
|
label: i("baseConfigCard.commonFields.id_label"),
|
|
3287
3287
|
order: 0,
|
|
3288
3288
|
section: ce.Basic
|
|
@@ -3292,89 +3292,89 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3292
3292
|
section: ce.Basic
|
|
3293
3293
|
},
|
|
3294
3294
|
enabled: {
|
|
3295
|
-
type:
|
|
3295
|
+
type: Y.BadgeStatus,
|
|
3296
3296
|
order: 2,
|
|
3297
3297
|
section: ce.Basic
|
|
3298
3298
|
},
|
|
3299
3299
|
updated_at: {
|
|
3300
|
-
type:
|
|
3300
|
+
type: Y.Date,
|
|
3301
3301
|
label: i("baseConfigCard.commonFields.updated_at_label"),
|
|
3302
3302
|
order: 3,
|
|
3303
3303
|
section: ce.Basic
|
|
3304
3304
|
},
|
|
3305
3305
|
created_at: {
|
|
3306
|
-
type:
|
|
3306
|
+
type: Y.Date,
|
|
3307
3307
|
label: i("baseConfigCard.commonFields.created_at_label"),
|
|
3308
3308
|
order: 4,
|
|
3309
3309
|
section: ce.Basic
|
|
3310
3310
|
},
|
|
3311
3311
|
tags: {
|
|
3312
|
-
type:
|
|
3312
|
+
type: Y.BadgeTag,
|
|
3313
3313
|
order: -1,
|
|
3314
3314
|
// the last property displayed
|
|
3315
3315
|
section: ce.Basic
|
|
3316
3316
|
}
|
|
3317
|
-
}, y = B(!1),
|
|
3317
|
+
}, y = B(!1), _ = B(!1), M = B(""), k = B({}), U = w(() => {
|
|
3318
3318
|
var p, A, b;
|
|
3319
3319
|
if (!k.value)
|
|
3320
3320
|
return [];
|
|
3321
3321
|
const g = [], K = Object.keys(k.value).length;
|
|
3322
|
-
for (const
|
|
3323
|
-
const
|
|
3322
|
+
for (const E in k.value) {
|
|
3323
|
+
const I = (A = (p = a.configSchema) == null ? void 0 : p[E]) == null ? void 0 : A.order, $ = (b = C[E]) == null ? void 0 : b.order;
|
|
3324
3324
|
let L = K;
|
|
3325
|
-
($ || $ === 0) && (L = $ === -1 ? K + 1 : $),
|
|
3325
|
+
($ || $ === 0) && (L = $ === -1 ? K + 1 : $), I && (L = I === -1 ? K + 1 : I), g.push([E, L]);
|
|
3326
3326
|
}
|
|
3327
|
-
return g.sort(function(
|
|
3328
|
-
return
|
|
3329
|
-
}), g.map((
|
|
3330
|
-
var
|
|
3331
|
-
const L =
|
|
3327
|
+
return g.sort(function(E, I) {
|
|
3328
|
+
return E[1] - I[1];
|
|
3329
|
+
}), g.map((E) => {
|
|
3330
|
+
var I, $;
|
|
3331
|
+
const L = E[0], D = (I = k.value) == null ? void 0 : I[L], z = (($ = a.configSchema) == null ? void 0 : $[L]) || {}, oe = C[L];
|
|
3332
3332
|
return {
|
|
3333
3333
|
key: L,
|
|
3334
3334
|
value: D,
|
|
3335
3335
|
hidden: z.hidden || !1,
|
|
3336
|
-
type: z.type ?? ((oe == null ? void 0 : oe.type) ||
|
|
3336
|
+
type: z.type ?? ((oe == null ? void 0 : oe.type) || Y.Text),
|
|
3337
3337
|
label: z.label ?? ((oe == null ? void 0 : oe.label) || l(L)),
|
|
3338
3338
|
tooltip: z.tooltip ?? ((oe == null ? void 0 : oe.tooltip) || void 0),
|
|
3339
3339
|
section: z.section ?? ((oe == null ? void 0 : oe.section) || ce.Advanced)
|
|
3340
3340
|
};
|
|
3341
|
-
}).filter((
|
|
3342
|
-
}),
|
|
3341
|
+
}).filter((E) => !E.hidden && E.key !== a.pluginConfigKey);
|
|
3342
|
+
}), x = w(() => {
|
|
3343
3343
|
var p, A;
|
|
3344
3344
|
if (!k.value || !a.pluginConfigKey)
|
|
3345
3345
|
return [];
|
|
3346
3346
|
const b = k.value[a.pluginConfigKey] || {}, g = Object.keys(b).length, K = [];
|
|
3347
|
-
for (const
|
|
3348
|
-
const
|
|
3347
|
+
for (const E in b) {
|
|
3348
|
+
const I = (A = (p = a.pluginConfigSchema) == null ? void 0 : p[E]) == null ? void 0 : A.order, $ = b[E];
|
|
3349
3349
|
let L = $ != null && $ !== "" ? g - 1 : g;
|
|
3350
|
-
|
|
3350
|
+
I && (L = I === -1 ? g + 1 : I), K.push([E, L]);
|
|
3351
3351
|
}
|
|
3352
|
-
return K.sort(function(
|
|
3353
|
-
return
|
|
3354
|
-
}), K.map((
|
|
3355
|
-
var
|
|
3356
|
-
const $ =
|
|
3352
|
+
return K.sort(function(E, I) {
|
|
3353
|
+
return E[1] - I[1];
|
|
3354
|
+
}), K.map((E) => {
|
|
3355
|
+
var I;
|
|
3356
|
+
const $ = E[0], L = b[$], D = ((I = a.pluginConfigSchema) == null ? void 0 : I[$]) || {};
|
|
3357
3357
|
return {
|
|
3358
3358
|
key: $,
|
|
3359
3359
|
value: L,
|
|
3360
3360
|
hidden: D.hidden || !1,
|
|
3361
|
-
type: D.type ??
|
|
3361
|
+
type: D.type ?? Y.Text,
|
|
3362
3362
|
label: D.label ?? l($),
|
|
3363
3363
|
tooltip: D.tooltip ?? void 0,
|
|
3364
3364
|
section: ce.Plugin
|
|
3365
3365
|
};
|
|
3366
|
-
}).filter((
|
|
3366
|
+
}).filter((E) => !E.hidden);
|
|
3367
3367
|
}), J = w(() => {
|
|
3368
3368
|
var p, A, b, g;
|
|
3369
3369
|
return {
|
|
3370
|
-
basic: (p =
|
|
3371
|
-
advanced: (A =
|
|
3372
|
-
plugin: (g =
|
|
3370
|
+
basic: (p = U.value) == null ? void 0 : p.filter((K) => K.section === ce.Basic),
|
|
3371
|
+
advanced: (A = U.value) == null ? void 0 : A.filter((K) => K.section === ce.Advanced),
|
|
3372
|
+
plugin: (g = x.value) == null ? void 0 : g.concat((b = U.value) == null ? void 0 : b.filter((K) => K.section === ce.Plugin))
|
|
3373
3373
|
};
|
|
3374
3374
|
}), v = w(() => {
|
|
3375
3375
|
const p = [];
|
|
3376
3376
|
return J.value.basic.length && p.push("basic"), J.value.advanced.length && p.push("advanced"), J.value.plugin.length && p.push("plugin"), p;
|
|
3377
|
-
}),
|
|
3377
|
+
}), S = w(() => {
|
|
3378
3378
|
var p, A;
|
|
3379
3379
|
let b = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3380
3380
|
return a.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((p = a.config) == null ? void 0 : p.controlPlaneId) || "") : a.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (A = a.config) != null && A.workspace ? `/${a.config.workspace}` : "")), b = b.replace(/{id}/gi, a.config.entityId), b;
|
|
@@ -3382,9 +3382,9 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3382
3382
|
return ke(y, (p) => {
|
|
3383
3383
|
r("loading", p);
|
|
3384
3384
|
}, { immediate: !0 }), wt(async () => {
|
|
3385
|
-
|
|
3385
|
+
_.value = !1, y.value = !0;
|
|
3386
3386
|
try {
|
|
3387
|
-
const { data: p } = await s.get(
|
|
3387
|
+
const { data: p } = await s.get(S.value);
|
|
3388
3388
|
if (a.dataKey)
|
|
3389
3389
|
if (typeof p[a.dataKey] < "u")
|
|
3390
3390
|
k.value = { ...p[a.dataKey] };
|
|
@@ -3397,29 +3397,29 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3397
3397
|
}), r("fetch:success", p);
|
|
3398
3398
|
} catch (p) {
|
|
3399
3399
|
const A = o(p);
|
|
3400
|
-
M.value = A.startsWith("code") ? i("baseConfigCard.errors.load") : A,
|
|
3400
|
+
M.value = A.startsWith("code") ? i("baseConfigCard.errors.load") : A, _.value = !0, r("fetch:error", p);
|
|
3401
3401
|
} finally {
|
|
3402
3402
|
y.value = !1;
|
|
3403
3403
|
}
|
|
3404
3404
|
}), (p, A) => {
|
|
3405
|
-
const b =
|
|
3405
|
+
const b = R("KLabel"), g = R("KSelect"), K = R("KButton"), E = R("KSkeleton"), I = R("KEmptyState"), $ = R("KCard");
|
|
3406
3406
|
return f(), V($, {
|
|
3407
3407
|
class: "kong-ui-entity-base-config-card",
|
|
3408
3408
|
"title-tag": e.titleTag
|
|
3409
|
-
},
|
|
3409
|
+
}, Te({
|
|
3410
3410
|
actions: h(() => [
|
|
3411
3411
|
F("div", Gl, [
|
|
3412
3412
|
Q(p.$slots, "actions", {}, void 0, !0),
|
|
3413
|
-
|
|
3413
|
+
T(b, {
|
|
3414
3414
|
class: "config-format-select-label",
|
|
3415
3415
|
"data-testid": "config-format-select-label"
|
|
3416
3416
|
}, {
|
|
3417
3417
|
default: h(() => [
|
|
3418
|
-
H(
|
|
3418
|
+
H(j(e.label), 1)
|
|
3419
3419
|
]),
|
|
3420
3420
|
_: 1
|
|
3421
3421
|
}),
|
|
3422
|
-
|
|
3422
|
+
T(g, {
|
|
3423
3423
|
"data-testid": "select-config-format",
|
|
3424
3424
|
items: u,
|
|
3425
3425
|
onChange: c
|
|
@@ -3436,7 +3436,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3436
3436
|
rel: "noopener",
|
|
3437
3437
|
target: "_blank"
|
|
3438
3438
|
}, [
|
|
3439
|
-
|
|
3439
|
+
T(m(Al), { size: m(xa) }, null, 8, ["size"])
|
|
3440
3440
|
], 8, Hl)
|
|
3441
3441
|
]),
|
|
3442
3442
|
_: 1
|
|
@@ -3444,30 +3444,30 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3444
3444
|
])
|
|
3445
3445
|
]),
|
|
3446
3446
|
default: h(() => [
|
|
3447
|
-
y.value ? (f(), V(
|
|
3447
|
+
y.value ? (f(), V(E, {
|
|
3448
3448
|
key: 0,
|
|
3449
3449
|
"data-testid": "config-card-loader",
|
|
3450
3450
|
"table-columns": 2,
|
|
3451
3451
|
type: "table"
|
|
3452
|
-
})) :
|
|
3452
|
+
})) : _.value ? (f(), V(I, {
|
|
3453
3453
|
key: 1,
|
|
3454
3454
|
"data-testid": "config-card-fetch-error",
|
|
3455
3455
|
"icon-variant": "error"
|
|
3456
3456
|
}, {
|
|
3457
3457
|
default: h(() => [
|
|
3458
|
-
F("h3", null,
|
|
3458
|
+
F("h3", null, j(M.value), 1)
|
|
3459
3459
|
]),
|
|
3460
3460
|
_: 1
|
|
3461
3461
|
})) : P("", !0),
|
|
3462
3462
|
F("div", Jl, [
|
|
3463
|
-
|
|
3463
|
+
T(ml, {
|
|
3464
3464
|
config: e.config,
|
|
3465
|
-
"fetcher-url":
|
|
3465
|
+
"fetcher-url": S.value,
|
|
3466
3466
|
format: d.value,
|
|
3467
3467
|
"prop-list-types": v.value,
|
|
3468
3468
|
"property-collections": J.value,
|
|
3469
3469
|
record: k.value
|
|
3470
|
-
},
|
|
3470
|
+
}, Te({ _: 2 }, [
|
|
3471
3471
|
pe(Object.keys(p.$slots), (L) => ({
|
|
3472
3472
|
name: L,
|
|
3473
3473
|
fn: h(({ row: D, rowValue: z }) => [
|
|
@@ -3487,7 +3487,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3487
3487
|
fn: h(() => [
|
|
3488
3488
|
F("span", zl, [
|
|
3489
3489
|
Q(p.$slots, "title", {}, () => [
|
|
3490
|
-
H(
|
|
3490
|
+
H(j(m(i)("baseConfigCard.title")), 1)
|
|
3491
3491
|
], !0)
|
|
3492
3492
|
])
|
|
3493
3493
|
]),
|
|
@@ -3496,7 +3496,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3496
3496
|
]), 1032, ["title-tag"]);
|
|
3497
3497
|
};
|
|
3498
3498
|
}
|
|
3499
|
-
}),
|
|
3499
|
+
}), Zl = /* @__PURE__ */ me(Wl, [["__scopeId", "data-v-f40a683b"]]), Yl = ["novalidate"], Ql = {
|
|
3500
3500
|
class: "form-actions",
|
|
3501
3501
|
"data-testid": "form-actions"
|
|
3502
3502
|
}, Xl = /* @__PURE__ */ W({
|
|
@@ -3568,17 +3568,17 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3568
3568
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3569
3569
|
setup(e, { emit: t }) {
|
|
3570
3570
|
var n;
|
|
3571
|
-
const r = t, a = e, i =
|
|
3572
|
-
var v,
|
|
3571
|
+
const r = t, a = e, i = It(), { i18n: { t: o } } = ne.useI18n(), { getMessageFromError: l } = ne.useErrors(), { axiosInstance: s } = ne.useAxios((n = a.config) == null ? void 0 : n.axiosRequestConfig), u = B(!1), d = B(!1), c = B(""), C = w(() => a.canSubmit === !1 || a.isReadonly), y = B(!1), _ = w(() => {
|
|
3572
|
+
var v, S;
|
|
3573
3573
|
let p = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3574
|
-
return a.config.app === "konnect" ? p = p.replace(/{controlPlaneId}/gi, ((v = a.config) == null ? void 0 : v.controlPlaneId) || "") : a.config.app === "kongManager" && (p = p.replace(/\/{workspace}/gi, (
|
|
3574
|
+
return a.config.app === "konnect" ? p = p.replace(/{controlPlaneId}/gi, ((v = a.config) == null ? void 0 : v.controlPlaneId) || "") : a.config.app === "kongManager" && (p = p.replace(/\/{workspace}/gi, (S = a.config) != null && S.workspace ? `/${a.config.workspace}` : "")), a.editId ? (p = p.replace(/{id}/gi, a.editId), p) : (p = p.replace(/\/{id}/gi, ""), p);
|
|
3575
3575
|
}), M = () => {
|
|
3576
3576
|
y.value = !y.value;
|
|
3577
3577
|
}, k = () => {
|
|
3578
|
-
a.config.cancelRoute ? i.push(a.config.cancelRoute) :
|
|
3579
|
-
},
|
|
3578
|
+
a.config.cancelRoute ? i.push(a.config.cancelRoute) : U();
|
|
3579
|
+
}, U = () => {
|
|
3580
3580
|
r("cancel");
|
|
3581
|
-
},
|
|
3581
|
+
}, x = () => {
|
|
3582
3582
|
C.value || r("submit");
|
|
3583
3583
|
}, J = B([
|
|
3584
3584
|
{
|
|
@@ -3596,16 +3596,16 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3596
3596
|
if (a.editId)
|
|
3597
3597
|
try {
|
|
3598
3598
|
d.value = !1, u.value = !0;
|
|
3599
|
-
const { data: v } = await s.get(
|
|
3599
|
+
const { data: v } = await s.get(_.value);
|
|
3600
3600
|
r("fetch:success", v);
|
|
3601
3601
|
} catch (v) {
|
|
3602
|
-
const
|
|
3603
|
-
c.value =
|
|
3602
|
+
const S = l(v);
|
|
3603
|
+
c.value = S.startsWith("code") ? o("baseForm.errors.edit") : S, d.value = !0, r("fetch:error", v);
|
|
3604
3604
|
} finally {
|
|
3605
3605
|
u.value = !1;
|
|
3606
3606
|
}
|
|
3607
|
-
}), (v,
|
|
3608
|
-
const p =
|
|
3607
|
+
}), (v, S) => {
|
|
3608
|
+
const p = R("KSkeleton"), A = R("KEmptyState"), b = R("KAlert"), g = R("KButton"), K = R("KTabs"), E = R("KSlideout");
|
|
3609
3609
|
return f(), V(be(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3610
3610
|
default: h(() => [
|
|
3611
3611
|
u.value ? (f(), V(p, {
|
|
@@ -3619,15 +3619,15 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3619
3619
|
onClickAction: k
|
|
3620
3620
|
}, {
|
|
3621
3621
|
default: h(() => [
|
|
3622
|
-
F("h3", null,
|
|
3622
|
+
F("h3", null, j(c.value), 1)
|
|
3623
3623
|
]),
|
|
3624
3624
|
_: 1
|
|
3625
3625
|
}, 8, ["action-button-text"])) : (f(), O("form", {
|
|
3626
3626
|
key: 2,
|
|
3627
3627
|
"data-testid": "form-content",
|
|
3628
3628
|
novalidate: a.noValidate,
|
|
3629
|
-
onReset: gt(
|
|
3630
|
-
onSubmit: gt(
|
|
3629
|
+
onReset: gt(U, ["prevent"]),
|
|
3630
|
+
onSubmit: gt(x, ["prevent"])
|
|
3631
3631
|
}, [
|
|
3632
3632
|
Q(v.$slots, "default", {}, void 0, !0),
|
|
3633
3633
|
e.errorMessage ? (f(), V(b, {
|
|
@@ -3638,66 +3638,66 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3638
3638
|
}, null, 8, ["message"])) : P("", !0),
|
|
3639
3639
|
F("div", Ql, [
|
|
3640
3640
|
Q(v.$slots, "form-actions", {}, () => [
|
|
3641
|
-
|
|
3641
|
+
T(g, {
|
|
3642
3642
|
appearance: "tertiary",
|
|
3643
3643
|
"data-testid": "form-view-configuration",
|
|
3644
|
-
onClick:
|
|
3644
|
+
onClick: S[0] || (S[0] = (I) => M())
|
|
3645
3645
|
}, {
|
|
3646
3646
|
default: h(() => [
|
|
3647
|
-
H(
|
|
3647
|
+
H(j(m(o)("baseForm.actions.viewConfiguration")), 1)
|
|
3648
3648
|
]),
|
|
3649
3649
|
_: 1
|
|
3650
3650
|
}),
|
|
3651
|
-
|
|
3651
|
+
T(g, {
|
|
3652
3652
|
appearance: "secondary",
|
|
3653
3653
|
"data-testid": "form-cancel",
|
|
3654
3654
|
disabled: e.isReadonly,
|
|
3655
3655
|
type: "reset"
|
|
3656
3656
|
}, {
|
|
3657
3657
|
default: h(() => [
|
|
3658
|
-
H(
|
|
3658
|
+
H(j(m(o)("baseForm.actions.cancel")), 1)
|
|
3659
3659
|
]),
|
|
3660
3660
|
_: 1
|
|
3661
3661
|
}, 8, ["disabled"]),
|
|
3662
|
-
|
|
3662
|
+
T(g, {
|
|
3663
3663
|
appearance: "primary",
|
|
3664
3664
|
"data-testid": "form-submit",
|
|
3665
3665
|
disabled: C.value,
|
|
3666
3666
|
type: "submit"
|
|
3667
3667
|
}, {
|
|
3668
3668
|
default: h(() => [
|
|
3669
|
-
H(
|
|
3669
|
+
H(j(m(o)("baseForm.actions.save")), 1)
|
|
3670
3670
|
]),
|
|
3671
3671
|
_: 1
|
|
3672
3672
|
}, 8, ["disabled"])
|
|
3673
3673
|
], !0)
|
|
3674
3674
|
])
|
|
3675
|
-
], 40,
|
|
3676
|
-
|
|
3675
|
+
], 40, Yl)),
|
|
3676
|
+
T(E, {
|
|
3677
3677
|
"close-on-blur": !1,
|
|
3678
3678
|
"data-testid": "form-view-configuration-slideout",
|
|
3679
3679
|
"has-overlay": !1,
|
|
3680
3680
|
"offset-top": 60,
|
|
3681
3681
|
title: m(o)("baseForm.configuration.title"),
|
|
3682
3682
|
visible: y.value,
|
|
3683
|
-
onClose:
|
|
3683
|
+
onClose: S[1] || (S[1] = (I) => M())
|
|
3684
3684
|
}, {
|
|
3685
3685
|
default: h(() => [
|
|
3686
|
-
F("div", null,
|
|
3687
|
-
|
|
3686
|
+
F("div", null, j(m(o)("baseForm.configuration.message")), 1),
|
|
3687
|
+
T(K, {
|
|
3688
3688
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3689
3689
|
tabs: J.value
|
|
3690
3690
|
}, {
|
|
3691
3691
|
json: h(() => [
|
|
3692
|
-
|
|
3692
|
+
T(An, {
|
|
3693
3693
|
config: e.config,
|
|
3694
|
-
"fetcher-url":
|
|
3694
|
+
"fetcher-url": _.value,
|
|
3695
3695
|
"json-record": a.formFields,
|
|
3696
3696
|
"request-method": a.editId ? "put" : "post"
|
|
3697
3697
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3698
3698
|
]),
|
|
3699
3699
|
yaml: h(() => [
|
|
3700
|
-
|
|
3700
|
+
T(mr, {
|
|
3701
3701
|
"yaml-record": a.formFields
|
|
3702
3702
|
}, null, 8, ["yaml-record"])
|
|
3703
3703
|
]),
|
|
@@ -3735,42 +3735,42 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3735
3735
|
var k;
|
|
3736
3736
|
return ((k = n.value) == null ? void 0 : k.querySelector('[data-truncate="true"]')) || null;
|
|
3737
3737
|
}), a = w(() => {
|
|
3738
|
-
var k,
|
|
3739
|
-
const
|
|
3740
|
-
return
|
|
3738
|
+
var k, U;
|
|
3739
|
+
const x = (k = t.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3740
|
+
return x ? ((U = x[0]) == null ? void 0 : U.getAttribute("data-testid")) === t.keyName : !1;
|
|
3741
3741
|
}), i = w(() => a.value || t.tooltip);
|
|
3742
3742
|
let o;
|
|
3743
3743
|
const l = () => {
|
|
3744
3744
|
o && (o.disconnect(), o = void 0);
|
|
3745
3745
|
}, s = () => {
|
|
3746
|
-
var k,
|
|
3746
|
+
var k, U, x;
|
|
3747
3747
|
let J = ((k = n.value) == null ? void 0 : k.clientWidth) || 0;
|
|
3748
3748
|
if (n.value && "getComputedStyle" in window) {
|
|
3749
3749
|
const v = window.getComputedStyle(n.value);
|
|
3750
3750
|
J -= (parseFloat(v.paddingLeft) || 0) + (parseFloat(v.paddingRight) || 0);
|
|
3751
3751
|
}
|
|
3752
|
-
d.value = ((
|
|
3753
|
-
}, u = B({}), d = B(0), c = B(0), C = B(""), y = w(() => [r.value, n.value]),
|
|
3752
|
+
d.value = ((U = r.value) == null ? void 0 : U.getBoundingClientRect().width) || 0, c.value = J, C.value = ((x = u.value) == null ? void 0 : x.innerText) || "";
|
|
3753
|
+
}, u = B({}), d = B(0), c = B(0), C = B(""), y = w(() => [r.value, n.value]), _ = ke(
|
|
3754
3754
|
y,
|
|
3755
3755
|
(k) => {
|
|
3756
3756
|
if (i.value && (l(), "ResizeObserver" in window && window)) {
|
|
3757
|
-
o = new ResizeObserver((
|
|
3757
|
+
o = new ResizeObserver((U) => {
|
|
3758
3758
|
window.requestAnimationFrame(() => {
|
|
3759
|
-
!Array.isArray(
|
|
3759
|
+
!Array.isArray(U) || !U.length || s();
|
|
3760
3760
|
});
|
|
3761
3761
|
});
|
|
3762
|
-
for (const
|
|
3763
|
-
|
|
3762
|
+
for (const U of k)
|
|
3763
|
+
U && o.observe(U);
|
|
3764
3764
|
}
|
|
3765
3765
|
},
|
|
3766
3766
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3767
3767
|
), M = w(() => i.value ? d.value > c.value : !1);
|
|
3768
3768
|
return Ar(() => {
|
|
3769
3769
|
s();
|
|
3770
|
-
}),
|
|
3771
|
-
|
|
3772
|
-
}), (k,
|
|
3773
|
-
const
|
|
3770
|
+
}), xr(() => {
|
|
3771
|
+
_();
|
|
3772
|
+
}), (k, U) => {
|
|
3773
|
+
const x = R("KTooltip");
|
|
3774
3774
|
return f(), O("span", {
|
|
3775
3775
|
ref_key: "contentRef",
|
|
3776
3776
|
ref: u,
|
|
@@ -3780,7 +3780,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3780
3780
|
key: 0,
|
|
3781
3781
|
"data-truncate": i.value || void 0
|
|
3782
3782
|
}, [
|
|
3783
|
-
|
|
3783
|
+
T(x, {
|
|
3784
3784
|
"max-width": "300",
|
|
3785
3785
|
placement: "bottomStart",
|
|
3786
3786
|
text: M.value ? C.value : ""
|
|
@@ -3958,31 +3958,31 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
3958
3958
|
textOverflow: "ellipsis"
|
|
3959
3959
|
}), A;
|
|
3960
3960
|
}, y = () => {
|
|
3961
|
-
r("empty-state-cta-clicked"),
|
|
3962
|
-
},
|
|
3961
|
+
r("empty-state-cta-clicked"), _();
|
|
3962
|
+
}, _ = () => {
|
|
3963
3963
|
r("clear-search-input");
|
|
3964
3964
|
}, M = w(() => n.disableRowClick ? void 0 : (p, A) => {
|
|
3965
3965
|
r("click:row", A);
|
|
3966
3966
|
}), k = (p) => {
|
|
3967
3967
|
r("sort", p);
|
|
3968
|
-
}, { setTablePreferences:
|
|
3969
|
-
const p =
|
|
3968
|
+
}, { setTablePreferences: U, getTablePreferences: x } = Gr(), J = B(x(o.value)), v = w(() => {
|
|
3969
|
+
const p = x(o.value);
|
|
3970
3970
|
return {
|
|
3971
3971
|
...n.initialFetcherParams,
|
|
3972
3972
|
...p
|
|
3973
3973
|
};
|
|
3974
|
-
}),
|
|
3975
|
-
J.value = p, o.value &&
|
|
3974
|
+
}), S = (p) => {
|
|
3975
|
+
J.value = p, o.value && U(o.value, p);
|
|
3976
3976
|
};
|
|
3977
3977
|
return (p, A) => {
|
|
3978
|
-
const b =
|
|
3979
|
-
return f(), V(
|
|
3978
|
+
const b = R("KButton"), g = R("KDropdown"), K = R("KTable"), E = R("KCard");
|
|
3979
|
+
return f(), V(E, {
|
|
3980
3980
|
class: "kong-ui-entity-base-table",
|
|
3981
3981
|
title: e.title,
|
|
3982
3982
|
"title-tag": e.titleTag
|
|
3983
3983
|
}, {
|
|
3984
3984
|
default: h(() => [
|
|
3985
|
-
|
|
3985
|
+
T(K, {
|
|
3986
3986
|
ref_key: "tableRefs",
|
|
3987
3987
|
ref: d,
|
|
3988
3988
|
"cache-identifier": o.value,
|
|
@@ -4012,37 +4012,37 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4012
4012
|
"table-preferences": J.value,
|
|
4013
4013
|
onEmptyStateActionClick: y,
|
|
4014
4014
|
"onRow:click": M.value,
|
|
4015
|
-
onSort: A[0] || (A[0] = (
|
|
4016
|
-
"onUpdate:tablePreferences":
|
|
4017
|
-
},
|
|
4018
|
-
toolbar: h(({ state:
|
|
4019
|
-
|
|
4015
|
+
onSort: A[0] || (A[0] = (I) => k(I)),
|
|
4016
|
+
"onUpdate:tablePreferences": S
|
|
4017
|
+
}, Te({
|
|
4018
|
+
toolbar: h(({ state: I }) => [
|
|
4019
|
+
_e(F("div", as, [
|
|
4020
4020
|
Q(p.$slots, "toolbar-filter", {}, void 0, !0),
|
|
4021
4021
|
p.$slots["toolbar-button"] ? (f(), O("div", is, [
|
|
4022
4022
|
Q(p.$slots, "toolbar-button", {}, void 0, !0)
|
|
4023
4023
|
])) : P("", !0)
|
|
4024
4024
|
], 512), [
|
|
4025
|
-
[
|
|
4025
|
+
[Ie, l(I)]
|
|
4026
4026
|
])
|
|
4027
4027
|
]),
|
|
4028
|
-
actions: h(({ row:
|
|
4028
|
+
actions: h(({ row: I, rowKey: $, rowValue: L }) => [
|
|
4029
4029
|
F("div", {
|
|
4030
4030
|
class: "actions-container",
|
|
4031
|
-
"data-testid":
|
|
4031
|
+
"data-testid": I.name
|
|
4032
4032
|
}, [
|
|
4033
|
-
|
|
4033
|
+
T(g, {
|
|
4034
4034
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
4035
4035
|
width: e.dropdownMenuWidth
|
|
4036
4036
|
}, {
|
|
4037
4037
|
items: h(() => [
|
|
4038
4038
|
Q(p.$slots, "actions", {
|
|
4039
|
-
row:
|
|
4039
|
+
row: I,
|
|
4040
4040
|
rowKey: $,
|
|
4041
4041
|
rowValue: L
|
|
4042
4042
|
}, void 0, !0)
|
|
4043
4043
|
]),
|
|
4044
4044
|
default: h(() => [
|
|
4045
|
-
|
|
4045
|
+
T(b, {
|
|
4046
4046
|
appearance: "tertiary",
|
|
4047
4047
|
class: "actions-trigger",
|
|
4048
4048
|
"data-testid": "overflow-actions-button",
|
|
@@ -4050,7 +4050,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4050
4050
|
size: "small"
|
|
4051
4051
|
}, {
|
|
4052
4052
|
default: h(() => [
|
|
4053
|
-
|
|
4053
|
+
T(m(Pl))
|
|
4054
4054
|
]),
|
|
4055
4055
|
_: 1
|
|
4056
4056
|
})
|
|
@@ -4061,13 +4061,13 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4061
4061
|
]),
|
|
4062
4062
|
_: 2
|
|
4063
4063
|
}, [
|
|
4064
|
-
pe(e.tableHeaders, (
|
|
4064
|
+
pe(e.tableHeaders, (I, $) => ({
|
|
4065
4065
|
name: $,
|
|
4066
4066
|
fn: h(({ row: L, rowKey: D, rowValue: z }) => [
|
|
4067
|
-
|
|
4067
|
+
T(rs, {
|
|
4068
4068
|
"key-name": String($),
|
|
4069
4069
|
"row-el": c(L),
|
|
4070
|
-
tooltip:
|
|
4070
|
+
tooltip: I.tooltip
|
|
4071
4071
|
}, {
|
|
4072
4072
|
default: h(() => [
|
|
4073
4073
|
Q(p.$slots, $, {
|
|
@@ -4075,7 +4075,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4075
4075
|
rowKey: D,
|
|
4076
4076
|
rowValue: z
|
|
4077
4077
|
}, () => [
|
|
4078
|
-
H(
|
|
4078
|
+
H(j(z), 1)
|
|
4079
4079
|
], !0)
|
|
4080
4080
|
]),
|
|
4081
4081
|
_: 2
|
|
@@ -4085,7 +4085,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4085
4085
|
e.query ? void 0 : {
|
|
4086
4086
|
name: "empty-state-action-icon",
|
|
4087
4087
|
fn: h(() => [
|
|
4088
|
-
|
|
4088
|
+
T(m(Cl))
|
|
4089
4089
|
]),
|
|
4090
4090
|
key: "0"
|
|
4091
4091
|
}
|
|
@@ -4146,7 +4146,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4146
4146
|
a("proceed");
|
|
4147
4147
|
};
|
|
4148
4148
|
return (s, u) => {
|
|
4149
|
-
const d =
|
|
4149
|
+
const d = R("KAlert"), c = R("KPrompt");
|
|
4150
4150
|
return f(), V(c, {
|
|
4151
4151
|
"action-button-appearance": "danger",
|
|
4152
4152
|
"action-button-disabled": e.actionPending,
|
|
@@ -4160,34 +4160,34 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4160
4160
|
}, {
|
|
4161
4161
|
default: h(() => [
|
|
4162
4162
|
e.error ? (f(), O("div", us, [
|
|
4163
|
-
|
|
4163
|
+
T(d, { appearance: "danger" }, {
|
|
4164
4164
|
default: h(() => [
|
|
4165
|
-
H(
|
|
4165
|
+
H(j(e.error), 1)
|
|
4166
4166
|
]),
|
|
4167
4167
|
_: 1
|
|
4168
4168
|
})
|
|
4169
4169
|
])) : P("", !0),
|
|
4170
|
-
|
|
4170
|
+
T(m(n), {
|
|
4171
4171
|
class: "message",
|
|
4172
4172
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
4173
4173
|
tag: "p"
|
|
4174
|
-
},
|
|
4174
|
+
}, Te({
|
|
4175
4175
|
entityType: h(() => [
|
|
4176
|
-
H(
|
|
4176
|
+
H(j(r.entityType), 1)
|
|
4177
4177
|
]),
|
|
4178
4178
|
_: 2
|
|
4179
4179
|
}, [
|
|
4180
4180
|
r.entityName ? {
|
|
4181
4181
|
name: "entityName",
|
|
4182
4182
|
fn: h(() => [
|
|
4183
|
-
F("strong", null,
|
|
4183
|
+
F("strong", null, j(r.entityName), 1)
|
|
4184
4184
|
]),
|
|
4185
4185
|
key: "0"
|
|
4186
4186
|
} : void 0
|
|
4187
4187
|
]), 1032, ["keypath"]),
|
|
4188
4188
|
r.description || s.$slots.description ? (f(), O("div", cs, [
|
|
4189
4189
|
Q(s.$slots, "description", {}, () => [
|
|
4190
|
-
F("p", null,
|
|
4190
|
+
F("p", null, j(r.description), 1)
|
|
4191
4191
|
], !0)
|
|
4192
4192
|
])) : P("", !0)
|
|
4193
4193
|
]),
|
|
@@ -4214,7 +4214,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4214
4214
|
props: {
|
|
4215
4215
|
color: {
|
|
4216
4216
|
type: String,
|
|
4217
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
4217
|
+
default: `var(--kong-ui-entity-filter-color, ${_a})`
|
|
4218
4218
|
}
|
|
4219
4219
|
},
|
|
4220
4220
|
setup(e) {
|
|
@@ -4237,7 +4237,7 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4237
4237
|
}), vs = {
|
|
4238
4238
|
key: 1,
|
|
4239
4239
|
class: "kong-ui-entity-filter"
|
|
4240
|
-
}, bs = { class: "kong-ui-entity-filter-menu" }, Cs = ["data-testid"], ks = ["onClick", "onKeydown"], ws = { class: "menu-item-indicator" },
|
|
4240
|
+
}, bs = { class: "kong-ui-entity-filter-menu" }, Cs = ["data-testid"], ks = ["onClick", "onKeydown"], ws = { class: "menu-item-indicator" }, _s = { class: "menu-item-body" }, Is = ["for"], Ss = { class: "menu-item-buttons" }, As = { class: "filter-clear-button-container" }, xs = /* @__PURE__ */ W({
|
|
4241
4241
|
__name: "EntityFilter",
|
|
4242
4242
|
props: {
|
|
4243
4243
|
// filter config, either exact match or fuzzy match
|
|
@@ -4259,23 +4259,23 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4259
4259
|
setup(e, { emit: t }) {
|
|
4260
4260
|
const { i18n: { t: n } } = ne.useI18n(), r = e, a = t, i = B(!1), o = B({}), l = B(/* @__PURE__ */ new Set()), s = w(() => {
|
|
4261
4261
|
const v = [];
|
|
4262
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
4263
|
-
|
|
4262
|
+
return new URLSearchParams(r.modelValue).forEach((S, p) => {
|
|
4263
|
+
S !== "" && v.push(p);
|
|
4264
4264
|
}), v;
|
|
4265
4265
|
}), u = w(() => {
|
|
4266
4266
|
const v = r.config.fields;
|
|
4267
|
-
return Object.keys(v).filter((
|
|
4267
|
+
return Object.keys(v).filter((S) => {
|
|
4268
4268
|
var p;
|
|
4269
|
-
return (p = v == null ? void 0 : v[
|
|
4270
|
-
}).map((
|
|
4271
|
-
label: v[
|
|
4272
|
-
value:
|
|
4269
|
+
return (p = v == null ? void 0 : v[S]) == null ? void 0 : p.searchable;
|
|
4270
|
+
}).map((S) => ({
|
|
4271
|
+
label: v[S].label || S,
|
|
4272
|
+
value: S,
|
|
4273
4273
|
expanded: !1
|
|
4274
4274
|
}));
|
|
4275
4275
|
});
|
|
4276
4276
|
ke(() => r.modelValue, (v) => {
|
|
4277
|
-
o.value = {}, new URLSearchParams(v).forEach((
|
|
4278
|
-
o.value[p] =
|
|
4277
|
+
o.value = {}, new URLSearchParams(v).forEach((S, p) => {
|
|
4278
|
+
o.value[p] = S;
|
|
4279
4279
|
});
|
|
4280
4280
|
});
|
|
4281
4281
|
const d = () => {
|
|
@@ -4286,28 +4286,28 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4286
4286
|
a("update:modelValue", v);
|
|
4287
4287
|
}, y = () => {
|
|
4288
4288
|
C("");
|
|
4289
|
-
},
|
|
4290
|
-
var
|
|
4291
|
-
return (((p = (
|
|
4289
|
+
}, _ = (v) => `filter-${v}`, M = (v) => {
|
|
4290
|
+
var S, p;
|
|
4291
|
+
return (((p = (S = r.config.schema) == null ? void 0 : S[v]) == null ? void 0 : p.values) ?? []).map((A) => ({
|
|
4292
4292
|
value: A,
|
|
4293
4293
|
label: A
|
|
4294
4294
|
}));
|
|
4295
4295
|
}, k = (v) => {
|
|
4296
|
-
var
|
|
4297
|
-
return ((p = (
|
|
4298
|
-
},
|
|
4296
|
+
var S, p;
|
|
4297
|
+
return ((p = (S = r.config.schema) == null ? void 0 : S[v]) == null ? void 0 : p.type) ?? "text";
|
|
4298
|
+
}, U = (v) => {
|
|
4299
4299
|
o.value = {
|
|
4300
4300
|
...o.value,
|
|
4301
4301
|
[v]: ""
|
|
4302
4302
|
}, J();
|
|
4303
|
-
},
|
|
4303
|
+
}, x = () => {
|
|
4304
4304
|
o.value = {}, J(!0);
|
|
4305
4305
|
}, J = (v = !1) => {
|
|
4306
|
-
const
|
|
4307
|
-
v && (i.value = !1), a("update:modelValue", new URLSearchParams(
|
|
4306
|
+
const S = Object.keys(o.value).reduce((p, A) => (o.value[A] && (p[A] = `${o.value[A]}`), p), {});
|
|
4307
|
+
v && (i.value = !1), a("update:modelValue", new URLSearchParams(S).toString());
|
|
4308
4308
|
};
|
|
4309
|
-
return (v,
|
|
4310
|
-
const p =
|
|
4309
|
+
return (v, S) => {
|
|
4310
|
+
const p = R("KInput"), A = R("KButton"), b = R("KSelect");
|
|
4311
4311
|
return e.config.isExactMatch ? (f(), V(p, {
|
|
4312
4312
|
key: 0,
|
|
4313
4313
|
autocomplete: "off",
|
|
@@ -4318,38 +4318,38 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4318
4318
|
"onUpdate:modelValue": C
|
|
4319
4319
|
}, {
|
|
4320
4320
|
before: h(() => [
|
|
4321
|
-
|
|
4321
|
+
T(fn)
|
|
4322
4322
|
]),
|
|
4323
4323
|
after: h(() => [
|
|
4324
|
-
|
|
4324
|
+
_e(T(m(Kl), {
|
|
4325
4325
|
class: "kong-ui-entity-filter-clear",
|
|
4326
4326
|
onClick: y
|
|
4327
4327
|
}, null, 512), [
|
|
4328
|
-
[
|
|
4328
|
+
[Ie, e.modelValue !== ""]
|
|
4329
4329
|
])
|
|
4330
4330
|
]),
|
|
4331
4331
|
_: 1
|
|
4332
4332
|
}, 8, ["model-value", "placeholder"])) : (f(), O("div", vs, [
|
|
4333
|
-
|
|
4333
|
+
T(A, {
|
|
4334
4334
|
appearance: "tertiary",
|
|
4335
4335
|
"data-testid": "filter-button",
|
|
4336
4336
|
onClick: d
|
|
4337
4337
|
}, {
|
|
4338
4338
|
default: h(() => [
|
|
4339
|
-
|
|
4340
|
-
H(" " +
|
|
4339
|
+
T(fn),
|
|
4340
|
+
H(" " + j(m(n)("filter.filterButtonText")) + " " + j(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
4341
4341
|
]),
|
|
4342
4342
|
_: 1
|
|
4343
4343
|
}),
|
|
4344
|
-
|
|
4344
|
+
_e(F("div", {
|
|
4345
4345
|
class: "kong-ui-entity-filter-backdrop",
|
|
4346
4346
|
onClick: d
|
|
4347
4347
|
}, null, 512), [
|
|
4348
|
-
[
|
|
4348
|
+
[Ie, i.value]
|
|
4349
4349
|
]),
|
|
4350
|
-
|
|
4350
|
+
_e(F("div", bs, [
|
|
4351
4351
|
(f(!0), O(fe, null, pe(u.value, (g) => {
|
|
4352
|
-
var K,
|
|
4352
|
+
var K, E;
|
|
4353
4353
|
return f(), O("div", {
|
|
4354
4354
|
key: g.value,
|
|
4355
4355
|
class: "kong-ui-entity-filter-menu-item",
|
|
@@ -4359,89 +4359,89 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4359
4359
|
class: Ae(["menu-item-title", { expanded: l.value.has(g.value) }]),
|
|
4360
4360
|
role: "button",
|
|
4361
4361
|
tabindex: "0",
|
|
4362
|
-
onClick: (
|
|
4363
|
-
onKeydown:
|
|
4362
|
+
onClick: (I) => c(g.value),
|
|
4363
|
+
onKeydown: Ir((I) => c(g.value), ["enter"])
|
|
4364
4364
|
}, [
|
|
4365
|
-
H(
|
|
4366
|
-
|
|
4367
|
-
[
|
|
4365
|
+
H(j(g.label) + " ", 1),
|
|
4366
|
+
_e(F("span", ws, null, 512), [
|
|
4367
|
+
[Ie, s.value.includes(g.value)]
|
|
4368
4368
|
]),
|
|
4369
|
-
|
|
4369
|
+
T(m(Ol), {
|
|
4370
4370
|
class: Ae(["menu-item-expand-icon", { expanded: l.value.has(g.value) }]),
|
|
4371
|
-
color: m(
|
|
4371
|
+
color: m(Sa)
|
|
4372
4372
|
}, null, 8, ["class", "color"])
|
|
4373
4373
|
], 42, ks),
|
|
4374
|
-
|
|
4374
|
+
_e(F("div", _s, [
|
|
4375
4375
|
F("label", {
|
|
4376
4376
|
class: "menu-item-label",
|
|
4377
|
-
for:
|
|
4378
|
-
},
|
|
4379
|
-
((
|
|
4377
|
+
for: _(g.value)
|
|
4378
|
+
}, j(m(n)("filter.fieldLabel")), 9, Is),
|
|
4379
|
+
((E = (K = e.config.schema) == null ? void 0 : K[g.value]) == null ? void 0 : E.type) === "select" ? (f(), V(b, {
|
|
4380
4380
|
key: 0,
|
|
4381
|
-
id:
|
|
4381
|
+
id: _(g.value),
|
|
4382
4382
|
modelValue: o.value[g.value],
|
|
4383
|
-
"onUpdate:modelValue": (
|
|
4383
|
+
"onUpdate:modelValue": (I) => o.value[g.value] = I,
|
|
4384
4384
|
items: M(g.value),
|
|
4385
4385
|
placeholder: m(n)("filter.selectPlaceholder")
|
|
4386
4386
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (f(), V(p, {
|
|
4387
4387
|
key: 1,
|
|
4388
|
-
id:
|
|
4388
|
+
id: _(g.value),
|
|
4389
4389
|
modelValue: o.value[g.value],
|
|
4390
|
-
"onUpdate:modelValue": (
|
|
4390
|
+
"onUpdate:modelValue": (I) => o.value[g.value] = I,
|
|
4391
4391
|
autocomplete: "off",
|
|
4392
4392
|
placeholder: m(n)("filter.inputPlaceholder"),
|
|
4393
4393
|
type: k(g.value)
|
|
4394
4394
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4395
4395
|
], 512), [
|
|
4396
|
-
[
|
|
4396
|
+
[Ie, l.value.has(g.value)]
|
|
4397
4397
|
]),
|
|
4398
|
-
|
|
4399
|
-
|
|
4398
|
+
_e(F("div", Ss, [
|
|
4399
|
+
T(A, {
|
|
4400
4400
|
appearance: "tertiary",
|
|
4401
4401
|
"data-testid": "apply-filter",
|
|
4402
4402
|
size: "small",
|
|
4403
|
-
onClick:
|
|
4403
|
+
onClick: S[0] || (S[0] = (I) => J(!0))
|
|
4404
4404
|
}, {
|
|
4405
4405
|
default: h(() => [
|
|
4406
|
-
H(
|
|
4406
|
+
H(j(m(n)("filter.applyButtonText")), 1)
|
|
4407
4407
|
]),
|
|
4408
4408
|
_: 1
|
|
4409
4409
|
}),
|
|
4410
|
-
|
|
4410
|
+
T(A, {
|
|
4411
4411
|
appearance: "tertiary",
|
|
4412
4412
|
"data-testid": "clear-filter",
|
|
4413
4413
|
size: "small",
|
|
4414
|
-
onClick: (
|
|
4414
|
+
onClick: (I) => U(g.value)
|
|
4415
4415
|
}, {
|
|
4416
4416
|
default: h(() => [
|
|
4417
|
-
H(
|
|
4417
|
+
H(j(m(n)("filter.clearButtonText")), 1)
|
|
4418
4418
|
]),
|
|
4419
4419
|
_: 2
|
|
4420
4420
|
}, 1032, ["onClick"])
|
|
4421
4421
|
], 512), [
|
|
4422
|
-
[
|
|
4422
|
+
[Ie, l.value.has(g.value)]
|
|
4423
4423
|
])
|
|
4424
4424
|
], 8, Cs);
|
|
4425
4425
|
}), 128)),
|
|
4426
4426
|
F("div", As, [
|
|
4427
|
-
|
|
4427
|
+
T(A, {
|
|
4428
4428
|
appearance: "tertiary",
|
|
4429
4429
|
size: "small",
|
|
4430
|
-
onClick:
|
|
4430
|
+
onClick: x
|
|
4431
4431
|
}, {
|
|
4432
4432
|
default: h(() => [
|
|
4433
|
-
H(
|
|
4433
|
+
H(j(m(n)("filter.clearAllButtonText")), 1)
|
|
4434
4434
|
]),
|
|
4435
4435
|
_: 1
|
|
4436
4436
|
})
|
|
4437
4437
|
])
|
|
4438
4438
|
], 512), [
|
|
4439
|
-
[
|
|
4439
|
+
[Ie, i.value]
|
|
4440
4440
|
])
|
|
4441
4441
|
]));
|
|
4442
4442
|
};
|
|
4443
4443
|
}
|
|
4444
|
-
}), $s = /* @__PURE__ */ me(
|
|
4444
|
+
}), $s = /* @__PURE__ */ me(xs, [["__scopeId", "data-v-94990087"]]), Ze = /* @__PURE__ */ W({
|
|
4445
4445
|
__name: "PermissionsWrapper",
|
|
4446
4446
|
props: {
|
|
4447
4447
|
/**
|
|
@@ -4472,17 +4472,17 @@ const ul = { class: "yaml-config" }, mr = /* @__PURE__ */ W({
|
|
|
4472
4472
|
}) : P("", !0);
|
|
4473
4473
|
}
|
|
4474
4474
|
});
|
|
4475
|
-
let
|
|
4476
|
-
const
|
|
4477
|
-
function
|
|
4478
|
-
if (!
|
|
4475
|
+
let Ye;
|
|
4476
|
+
const Ns = new Uint8Array(16);
|
|
4477
|
+
function Ts() {
|
|
4478
|
+
if (!Ye && (Ye = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Ye))
|
|
4479
4479
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
4480
|
-
return
|
|
4480
|
+
return Ye(Ns);
|
|
4481
4481
|
}
|
|
4482
4482
|
const re = [];
|
|
4483
4483
|
for (let e = 0; e < 256; ++e)
|
|
4484
4484
|
re.push((e + 256).toString(16).slice(1));
|
|
4485
|
-
function
|
|
4485
|
+
function js(e, t = 0) {
|
|
4486
4486
|
return re[e[t + 0]] + re[e[t + 1]] + re[e[t + 2]] + re[e[t + 3]] + "-" + re[e[t + 4]] + re[e[t + 5]] + "-" + re[e[t + 6]] + re[e[t + 7]] + "-" + re[e[t + 8]] + re[e[t + 9]] + "-" + re[e[t + 10]] + re[e[t + 11]] + re[e[t + 12]] + re[e[t + 13]] + re[e[t + 14]] + re[e[t + 15]];
|
|
4487
4487
|
}
|
|
4488
4488
|
const Os = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mn = {
|
|
@@ -4492,16 +4492,16 @@ function Ms(e, t, n) {
|
|
|
4492
4492
|
if (mn.randomUUID && !t && !e)
|
|
4493
4493
|
return mn.randomUUID();
|
|
4494
4494
|
e = e || {};
|
|
4495
|
-
const r = e.random || (e.rng ||
|
|
4495
|
+
const r = e.random || (e.rng || Ts)();
|
|
4496
4496
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
4497
4497
|
n = n || 0;
|
|
4498
4498
|
for (let a = 0; a < 16; ++a)
|
|
4499
4499
|
t[n + a] = r[a];
|
|
4500
4500
|
return t;
|
|
4501
4501
|
}
|
|
4502
|
-
return
|
|
4502
|
+
return js(r);
|
|
4503
4503
|
}
|
|
4504
|
-
const
|
|
4504
|
+
const Es = ["aria-labelledby"], qs = { class: "form-section-wrapper" }, Fs = {
|
|
4505
4505
|
key: 1,
|
|
4506
4506
|
class: "form-section-description"
|
|
4507
4507
|
}, Bs = {
|
|
@@ -4536,13 +4536,13 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
4536
4536
|
}
|
|
4537
4537
|
},
|
|
4538
4538
|
setup(e) {
|
|
4539
|
-
const t =
|
|
4539
|
+
const t = _t(), n = Ms();
|
|
4540
4540
|
return (r, a) => (f(), O("div", {
|
|
4541
4541
|
"aria-labelledby": e.title ? m(n) : void 0,
|
|
4542
4542
|
class: Ae(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4543
4543
|
role: "group"
|
|
4544
4544
|
}, [
|
|
4545
|
-
F("div",
|
|
4545
|
+
F("div", qs, [
|
|
4546
4546
|
e.hideInfoHeader ? P("", !0) : (f(), O("div", {
|
|
4547
4547
|
key: 0,
|
|
4548
4548
|
class: Ae(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
@@ -4553,13 +4553,13 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
4553
4553
|
class: "form-section-title"
|
|
4554
4554
|
}, {
|
|
4555
4555
|
default: h(() => [
|
|
4556
|
-
H(
|
|
4556
|
+
H(j(e.title), 1)
|
|
4557
4557
|
]),
|
|
4558
4558
|
_: 1
|
|
4559
4559
|
}, 8, ["id"])) : P("", !0),
|
|
4560
4560
|
e.description || m(t).description ? (f(), O("div", Fs, [
|
|
4561
4561
|
Q(r.$slots, "description", {}, () => [
|
|
4562
|
-
F("p", null,
|
|
4562
|
+
F("p", null, j(e.description), 1)
|
|
4563
4563
|
], !0)
|
|
4564
4564
|
])) : P("", !0),
|
|
4565
4565
|
m(t).footer ? (f(), O("div", Bs, [
|
|
@@ -4570,15 +4570,15 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
4570
4570
|
Q(r.$slots, "default", {}, void 0, !0)
|
|
4571
4571
|
])
|
|
4572
4572
|
])
|
|
4573
|
-
], 10,
|
|
4573
|
+
], 10, Es));
|
|
4574
4574
|
}
|
|
4575
|
-
}),
|
|
4575
|
+
}), Us = /* @__PURE__ */ me(Ls, [["__scopeId", "data-v-b1f74200"]]), { useAxios: Ot, useDeleteUrlBuilder: Rs, useErrors: Vs, useExternalLinkCreator: vu, useFetchUrlBuilder: bu, useFetcher: Ds, useDebouncedFilter: Ps, useStringHelpers: Cu, useHelpers: ku, useGatewayFeatureSupported: wu, useTruncationDetector: _u, useValidators: Iu } = ne, zs = { class: "add-consumer-form-container" }, Gs = { class: "add-consumer-form-cta" }, Hs = { class: "select-item-label" }, Js = {
|
|
4576
4576
|
key: 0,
|
|
4577
4577
|
class: "select-item-desc"
|
|
4578
4578
|
}, Ws = {
|
|
4579
4579
|
key: 0,
|
|
4580
4580
|
class: "kong-ui-entity-add-consumers-error"
|
|
4581
|
-
},
|
|
4581
|
+
}, Zs = { key: 0 }, Ys = /* @__PURE__ */ W({
|
|
4582
4582
|
__name: "AddConsumerModal",
|
|
4583
4583
|
props: {
|
|
4584
4584
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4595,8 +4595,8 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
4595
4595
|
},
|
|
4596
4596
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4597
4597
|
setup(e, { emit: t }) {
|
|
4598
|
-
var
|
|
4599
|
-
const { i18n: { t: n } } = at.useI18n(), r = e, a = t, { axiosInstance: i } = Ot((
|
|
4598
|
+
var I;
|
|
4599
|
+
const { i18n: { t: n } } = at.useI18n(), r = e, a = t, { axiosInstance: i } = Ot((I = r.config) == null ? void 0 : I.axiosRequestConfig), o = B([]), {
|
|
4600
4600
|
debouncedQueryChange: l,
|
|
4601
4601
|
loading: s,
|
|
4602
4602
|
allRecords: u,
|
|
@@ -4605,44 +4605,44 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
4605
4605
|
results: C
|
|
4606
4606
|
} = Ps(
|
|
4607
4607
|
r.config,
|
|
4608
|
-
|
|
4608
|
+
je.list[r.config.app].all,
|
|
4609
4609
|
"",
|
|
4610
4610
|
{
|
|
4611
4611
|
fetchedItemsKey: "data",
|
|
4612
4612
|
searchKeys: ["username", "id"]
|
|
4613
4613
|
}
|
|
4614
|
-
), y = ($) => $,
|
|
4614
|
+
), y = ($) => $, _ = w(() => d.value ? n("consumers.errors.general") : ""), M = B(0), k = w(() => u.value === void 0), U = w(() => C.value.map(($) => ({
|
|
4615
4615
|
label: $.username || $.customId,
|
|
4616
4616
|
value: $.id,
|
|
4617
4617
|
selected: o.value.includes($.id),
|
|
4618
4618
|
data: $
|
|
4619
4619
|
// we need this to determine whether or not to show the description text
|
|
4620
|
-
}))),
|
|
4620
|
+
}))), x = ($) => {
|
|
4621
4621
|
var D;
|
|
4622
4622
|
const L = k.value ? C.value.find((z) => z.id === $) : (D = u.value) == null ? void 0 : D.find((z) => z.id === $);
|
|
4623
4623
|
return L ? L.username || L.custom_id : $;
|
|
4624
4624
|
}, J = () => {
|
|
4625
4625
|
p.value = "", v.value = [], K.value = [], a("cancel");
|
|
4626
|
-
}, v = B([]),
|
|
4626
|
+
}, v = B([]), S = B(!1), p = B(""), A = async () => {
|
|
4627
4627
|
if (!o.value.length) {
|
|
4628
4628
|
p.value = "", K.value = [], a("cancel");
|
|
4629
4629
|
return;
|
|
4630
4630
|
}
|
|
4631
|
-
|
|
4631
|
+
S.value = !0, p.value = "", v.value = [], K.value = [];
|
|
4632
4632
|
try {
|
|
4633
4633
|
const $ = o.value.map((z) => g(z)), L = await Promise.allSettled($);
|
|
4634
4634
|
let D = !0;
|
|
4635
4635
|
L.forEach((z) => {
|
|
4636
4636
|
z.status !== "fulfilled" && (D = !1);
|
|
4637
|
-
}), D ? (v.value = [], K.value = [], a("add:success", o.value), o.value = []) : (v.value.length && a("add:partial-success", v.value), o.value = [],
|
|
4637
|
+
}), D ? (v.value = [], K.value = [], a("add:success", o.value), o.value = []) : (v.value.length && a("add:partial-success", v.value), o.value = [], E(L));
|
|
4638
4638
|
} catch {
|
|
4639
4639
|
p.value = n("consumers.errors.add"), a("error", p.value);
|
|
4640
4640
|
} finally {
|
|
4641
|
-
|
|
4641
|
+
S.value = !1;
|
|
4642
4642
|
}
|
|
4643
4643
|
}, b = w(() => {
|
|
4644
4644
|
var L, D, z, oe;
|
|
4645
|
-
let $ = `${r.config.apiBaseUrl}${
|
|
4645
|
+
let $ = `${r.config.apiBaseUrl}${je.list[r.config.app].forConsumerGroup}`;
|
|
4646
4646
|
return r.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((L = r.config) == null ? void 0 : L.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((D = r.config) == null ? void 0 : D.consumerGroupId) || "") : r.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (z = r.config) != null && z.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((oe = r.config) == null ? void 0 : oe.consumerGroupId) || "")), $;
|
|
4647
4647
|
}), g = async ($) => {
|
|
4648
4648
|
const L = {
|
|
@@ -4652,23 +4652,23 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
4652
4652
|
const D = await i.post(b.value, L);
|
|
4653
4653
|
return v.value.push($), D;
|
|
4654
4654
|
} catch (D) {
|
|
4655
|
-
let z = `${
|
|
4656
|
-
return D.response.status === 409 && (z = `${
|
|
4655
|
+
let z = `${x($)} - ${D.message}`;
|
|
4656
|
+
return D.response.status === 409 && (z = `${x($)} - ${n("consumers.errors.already_added")}`), Promise.reject(Error(z));
|
|
4657
4657
|
}
|
|
4658
|
-
}, K = B([]),
|
|
4658
|
+
}, K = B([]), E = ($) => {
|
|
4659
4659
|
K.value = $.map((L) => {
|
|
4660
4660
|
var D;
|
|
4661
4661
|
return (D = L.reason) == null ? void 0 : D.message;
|
|
4662
4662
|
}).filter(Boolean);
|
|
4663
4663
|
};
|
|
4664
|
-
return ke(
|
|
4664
|
+
return ke(U, () => {
|
|
4665
4665
|
M.value++;
|
|
4666
4666
|
}, { immediate: !0, deep: !0 }), ke(() => r.visible, () => {
|
|
4667
4667
|
r.visible && c();
|
|
4668
4668
|
}, { immediate: !0 }), ($, L) => {
|
|
4669
|
-
const D =
|
|
4669
|
+
const D = R("KMultiselect"), z = R("KAlert"), oe = R("KPrompt");
|
|
4670
4670
|
return f(), V(oe, {
|
|
4671
|
-
"action-button-disabled":
|
|
4671
|
+
"action-button-disabled": S.value,
|
|
4672
4672
|
class: "kong-ui-entities-add-consumers-modal",
|
|
4673
4673
|
"data-testid": "add-consumer-modal",
|
|
4674
4674
|
title: m(n)("consumers.consumer_groups.add.title"),
|
|
@@ -4678,36 +4678,36 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
4678
4678
|
}, {
|
|
4679
4679
|
default: h(() => [
|
|
4680
4680
|
F("div", zs, [
|
|
4681
|
-
F("p", Gs,
|
|
4682
|
-
|
|
4681
|
+
F("p", Gs, j(m(n)("consumers.consumer_groups.add.ctaText")), 1),
|
|
4682
|
+
T(D, {
|
|
4683
4683
|
modelValue: o.value,
|
|
4684
4684
|
"onUpdate:modelValue": L[0] || (L[0] = (ge) => o.value = ge),
|
|
4685
4685
|
autosuggest: "",
|
|
4686
4686
|
"data-testid": "add-consumers-multiselect",
|
|
4687
4687
|
"dropdown-footer-text": k.value ? m(n)("consumers.consumer_groups.add.footer") : void 0,
|
|
4688
|
-
items:
|
|
4688
|
+
items: U.value,
|
|
4689
4689
|
label: m(n)("consumers.consumer_groups.add.consumers_label"),
|
|
4690
4690
|
loading: m(s),
|
|
4691
4691
|
placeholder: m(n)("consumers.consumer_groups.add.consumer_placeholder"),
|
|
4692
|
-
readonly:
|
|
4692
|
+
readonly: S.value,
|
|
4693
4693
|
required: "",
|
|
4694
4694
|
width: "100%",
|
|
4695
4695
|
onQueryChange: m(l)
|
|
4696
4696
|
}, {
|
|
4697
4697
|
"item-template": h(({ item: ge }) => [
|
|
4698
|
-
F("div", Hs,
|
|
4699
|
-
y(ge).data.username && y(ge).data.custom_id ? (f(), O("div", Js,
|
|
4698
|
+
F("div", Hs, j(ge.label), 1),
|
|
4699
|
+
y(ge).data.username && y(ge).data.custom_id ? (f(), O("div", Js, j(y(ge).data.custom_id), 1)) : P("", !0)
|
|
4700
4700
|
]),
|
|
4701
4701
|
_: 1
|
|
4702
4702
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4703
|
-
p.value ||
|
|
4704
|
-
|
|
4703
|
+
p.value || _.value || K.value.length ? (f(), O("div", Ws, [
|
|
4704
|
+
T(z, { appearance: "danger" }, {
|
|
4705
4705
|
default: h(() => [
|
|
4706
|
-
F("p", null,
|
|
4707
|
-
K.value.length ? (f(), O("ul",
|
|
4708
|
-
(f(!0), O(fe, null, pe(K.value, (ge, lt) => (f(), O("li", { key: lt },
|
|
4706
|
+
F("p", null, j(m(n)("consumers.errors.add")), 1),
|
|
4707
|
+
K.value.length ? (f(), O("ul", Zs, [
|
|
4708
|
+
(f(!0), O(fe, null, pe(K.value, (ge, lt) => (f(), O("li", { key: lt }, j(ge), 1))), 128))
|
|
4709
4709
|
])) : P("", !0),
|
|
4710
|
-
F("div", null,
|
|
4710
|
+
F("div", null, j(p.value || _.value), 1)
|
|
4711
4711
|
]),
|
|
4712
4712
|
_: 1
|
|
4713
4713
|
})
|
|
@@ -4723,7 +4723,7 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
4723
4723
|
for (const [r, a] of t)
|
|
4724
4724
|
n[r] = a;
|
|
4725
4725
|
return n;
|
|
4726
|
-
}, Qs = /* @__PURE__ */ Mt(
|
|
4726
|
+
}, Qs = /* @__PURE__ */ Mt(Ys, [["__scopeId", "data-v-d54468ab"]]), Xs = { class: "kong-ui-entities-consumers-list" }, eu = { key: 1 }, tu = /* @__PURE__ */ W({
|
|
4727
4727
|
__name: "ConsumerList",
|
|
4728
4728
|
props: {
|
|
4729
4729
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4769,80 +4769,80 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
4769
4769
|
},
|
|
4770
4770
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4771
4771
|
setup(e, { emit: t }) {
|
|
4772
|
-
var
|
|
4773
|
-
const n = t, r = e, { i18nT: a, i18n: { t: i } } = at.useI18n(), o =
|
|
4772
|
+
var Ut;
|
|
4773
|
+
const n = t, r = e, { i18nT: a, i18n: { t: i } } = at.useI18n(), o = It(), { axiosInstance: l } = Ot((Ut = r.config) == null ? void 0 : Ut.axiosRequestConfig), s = B(1), u = w(() => !!r.config.consumerGroupId), d = w(
|
|
4774
4774
|
() => u.value ? "kong-ui-entities-consumers-list-in-group-page" : "kong-ui-entities-consumers-list"
|
|
4775
4775
|
), c = w(() => r.config.app !== "kongManager" || !!r.config.disableSorting), C = {
|
|
4776
4776
|
username: { label: i("consumers.list.table_headers.username"), searchable: !0, sortable: !0 },
|
|
4777
4777
|
custom_id: { label: i("consumers.list.table_headers.custom_id"), searchable: !0, sortable: !0 },
|
|
4778
4778
|
tags: { label: i("consumers.list.table_headers.tags"), sortable: !1 }
|
|
4779
|
-
}, y = C,
|
|
4780
|
-
"data-testid":
|
|
4779
|
+
}, y = C, _ = (N) => ({
|
|
4780
|
+
"data-testid": N.username ?? N.custom_id ?? N.id
|
|
4781
4781
|
}), M = w(() => {
|
|
4782
4782
|
var G, X, ue, ye;
|
|
4783
|
-
let
|
|
4784
|
-
return r.config.app === "konnect" ?
|
|
4785
|
-
}), k = B(""),
|
|
4786
|
-
const
|
|
4787
|
-
return
|
|
4788
|
-
isExactMatch:
|
|
4783
|
+
let N = `${r.config.apiBaseUrl}${je.list[r.config.app][u.value ? "forConsumerGroup" : "all"]}`;
|
|
4784
|
+
return r.config.app === "konnect" ? N = N.replace(/{controlPlaneId}/gi, ((G = r.config) == null ? void 0 : G.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((X = r.config) == null ? void 0 : X.consumerGroupId) || "") : r.config.app === "kongManager" && (N = N.replace(/\/{workspace}/gi, (ue = r.config) != null && ue.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ye = r.config) == null ? void 0 : ye.consumerGroupId) || "")), N;
|
|
4785
|
+
}), k = B(""), U = w(() => {
|
|
4786
|
+
const N = r.config.app === "konnect" || r.config.isExactMatch;
|
|
4787
|
+
return N ? {
|
|
4788
|
+
isExactMatch: N,
|
|
4789
4789
|
placeholder: i(`consumers.search.placeholder.${r.config.app}`)
|
|
4790
4790
|
} : {
|
|
4791
|
-
isExactMatch:
|
|
4791
|
+
isExactMatch: N,
|
|
4792
4792
|
fields: {
|
|
4793
4793
|
username: C.username,
|
|
4794
4794
|
custom_id: C.custom_id
|
|
4795
4795
|
},
|
|
4796
4796
|
schema: r.config.filterSchema
|
|
4797
4797
|
};
|
|
4798
|
-
}),
|
|
4798
|
+
}), x = w(() => u.value && !r.config.paginatedEndpoint ? "consumers" : void 0), { fetcher: J, fetcherState: v } = Ds(r.config, M.value, x.value), S = () => {
|
|
4799
4799
|
k.value = "";
|
|
4800
4800
|
}, p = () => {
|
|
4801
4801
|
s.value++;
|
|
4802
|
-
}, A = (
|
|
4803
|
-
const X =
|
|
4802
|
+
}, A = (N) => N ?? "-", b = B(null), g = (N, G) => {
|
|
4803
|
+
const X = N.id;
|
|
4804
4804
|
if (!G(X)) {
|
|
4805
4805
|
n("copy:error", {
|
|
4806
|
-
entity:
|
|
4806
|
+
entity: N,
|
|
4807
4807
|
field: "id",
|
|
4808
4808
|
message: i("consumers.errors.copy")
|
|
4809
4809
|
});
|
|
4810
4810
|
return;
|
|
4811
4811
|
}
|
|
4812
4812
|
n("copy:success", {
|
|
4813
|
-
entity:
|
|
4813
|
+
entity: N,
|
|
4814
4814
|
field: "id",
|
|
4815
4815
|
message: i("consumers.copy.success", { val: X })
|
|
4816
4816
|
});
|
|
4817
|
-
}, K = (
|
|
4818
|
-
const X = JSON.stringify(
|
|
4817
|
+
}, K = (N, G) => {
|
|
4818
|
+
const X = JSON.stringify(N);
|
|
4819
4819
|
if (!G(X)) {
|
|
4820
4820
|
n("copy:error", {
|
|
4821
|
-
entity:
|
|
4821
|
+
entity: N,
|
|
4822
4822
|
message: i("consumers.errors.copy")
|
|
4823
4823
|
});
|
|
4824
4824
|
return;
|
|
4825
4825
|
}
|
|
4826
4826
|
n("copy:success", {
|
|
4827
|
-
entity:
|
|
4827
|
+
entity: N,
|
|
4828
4828
|
message: i("consumers.copy.success_brief")
|
|
4829
4829
|
});
|
|
4830
|
-
},
|
|
4830
|
+
}, E = async (N) => {
|
|
4831
4831
|
var X;
|
|
4832
|
-
await ((X = r.canRetrieve) == null ? void 0 : X.call(r,
|
|
4833
|
-
},
|
|
4832
|
+
await ((X = r.canRetrieve) == null ? void 0 : X.call(r, N)) && o.push(r.config.getViewRoute(N.id));
|
|
4833
|
+
}, I = (N) => ({
|
|
4834
4834
|
label: i("consumers.actions.view"),
|
|
4835
|
-
to: r.config.getViewRoute(
|
|
4836
|
-
}), $ = (
|
|
4835
|
+
to: r.config.getViewRoute(N)
|
|
4836
|
+
}), $ = (N) => ({
|
|
4837
4837
|
label: i("consumers.actions.edit"),
|
|
4838
|
-
to: r.config.getEditRoute(
|
|
4839
|
-
}), L = B(void 0), D = B(!1), z = B(!1), oe = B(""), ge =
|
|
4840
|
-
L.value =
|
|
4838
|
+
to: r.config.getEditRoute(N)
|
|
4839
|
+
}), L = B(void 0), D = B(!1), z = B(!1), oe = B(""), ge = Rs(r.config, M.value), lt = (N) => {
|
|
4840
|
+
L.value = N, D.value = !0;
|
|
4841
4841
|
}, gr = () => {
|
|
4842
4842
|
D.value = !1;
|
|
4843
4843
|
}, yr = async () => {
|
|
4844
|
-
var
|
|
4845
|
-
if ((
|
|
4844
|
+
var N, G, X;
|
|
4845
|
+
if ((N = L.value) != null && N.id) {
|
|
4846
4846
|
z.value = !0;
|
|
4847
4847
|
try {
|
|
4848
4848
|
await l.delete(ge(L.value.id)), z.value = !1, D.value = !1, s.value++, n("delete:success", L.value);
|
|
@@ -4852,41 +4852,41 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
4852
4852
|
z.value = !1;
|
|
4853
4853
|
}
|
|
4854
4854
|
}
|
|
4855
|
-
}, st = B(!1),
|
|
4855
|
+
}, st = B(!1), Et = () => {
|
|
4856
4856
|
st.value = !0;
|
|
4857
|
-
},
|
|
4857
|
+
}, qt = () => {
|
|
4858
4858
|
st.value = !1;
|
|
4859
|
-
}, Ft = (
|
|
4860
|
-
G ||
|
|
4859
|
+
}, Ft = (N, G) => {
|
|
4860
|
+
G || qt(), s.value++, n("add:success", N);
|
|
4861
4861
|
}, hr = () => {
|
|
4862
|
-
u.value &&
|
|
4863
|
-
}, Ce = B(void 0), ut = B(!1), vr = B(""), br = (
|
|
4864
|
-
Ce.value =
|
|
4862
|
+
u.value && Et();
|
|
4863
|
+
}, Ce = B(void 0), ut = B(!1), vr = B(""), br = (N) => {
|
|
4864
|
+
Ce.value = N, ut.value = !0;
|
|
4865
4865
|
}, Bt = () => {
|
|
4866
4866
|
ut.value = !1, Ce.value = void 0;
|
|
4867
4867
|
}, Cr = w(() => {
|
|
4868
4868
|
var G, X, ue, ye;
|
|
4869
|
-
let
|
|
4870
|
-
return r.config.app === "konnect" ?
|
|
4869
|
+
let N = `${r.config.apiBaseUrl}${je.list[r.config.app].oneForConsumerGroup}`;
|
|
4870
|
+
return r.config.app === "konnect" ? N = N.replace(/{controlPlaneId}/gi, ((G = r.config) == null ? void 0 : G.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((X = r.config) == null ? void 0 : X.consumerGroupId) || "") : r.config.app === "kongManager" && (N = N.replace(/\/{workspace}/gi, (ue = r.config) != null && ue.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ye = r.config) == null ? void 0 : ye.consumerGroupId) || "")), N;
|
|
4871
4871
|
}), Kt = B(!1), kr = async () => {
|
|
4872
4872
|
if (Ce.value) {
|
|
4873
4873
|
Kt.value = !0;
|
|
4874
4874
|
try {
|
|
4875
|
-
const
|
|
4876
|
-
await l.delete(
|
|
4877
|
-
} catch (
|
|
4878
|
-
vr.value =
|
|
4875
|
+
const N = Cr.value.replace(/{consumerId}/gi, Ce.value.id);
|
|
4876
|
+
await l.delete(N), n("remove:success", Ce.value), Bt(), s.value++;
|
|
4877
|
+
} catch (N) {
|
|
4878
|
+
vr.value = N.message || i("consumers.errors.delete"), n("error", N);
|
|
4879
4879
|
} finally {
|
|
4880
4880
|
Kt.value = !1;
|
|
4881
4881
|
}
|
|
4882
4882
|
}
|
|
4883
4883
|
}, Lt = B(!0);
|
|
4884
|
-
ke(v, (
|
|
4884
|
+
ke(v, (N) => {
|
|
4885
4885
|
var G, X, ue, ye;
|
|
4886
|
-
if (Array.isArray((G =
|
|
4886
|
+
if (Array.isArray((G = N == null ? void 0 : N.response) == null ? void 0 : G.data) && (Lt.value = N.response.data.length > 0), N.status === $e.Error) {
|
|
4887
4887
|
b.value = {
|
|
4888
4888
|
title: i("consumers.errors.general")
|
|
4889
|
-
}, (ye = (ue = (X =
|
|
4889
|
+
}, (ye = (ue = (X = N.error) == null ? void 0 : X.response) == null ? void 0 : ue.data) != null && ye.message && (b.value.message = N.error.response.data.message), n("error", N.error);
|
|
4890
4890
|
return;
|
|
4891
4891
|
}
|
|
4892
4892
|
b.value = null;
|
|
@@ -4899,10 +4899,10 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
4899
4899
|
});
|
|
4900
4900
|
return wt(async () => {
|
|
4901
4901
|
await r.canCreate() && (ct.value.title = u.value ? i("consumers.list.empty_state.title_for_consumer_group") : i("consumers.list.empty_state.title"), ct.value.ctaText = u.value ? i("consumers.actions.add_consumer") : i("consumers.actions.create"));
|
|
4902
|
-
}), (
|
|
4903
|
-
const X =
|
|
4902
|
+
}), (N, G) => {
|
|
4903
|
+
const X = R("KButton"), ue = R("KBadge"), ye = R("KTruncate"), De = R("KDropdownItem"), Rt = R("KClipboardProvider"), wr = R("KPrompt");
|
|
4904
4904
|
return f(), O("div", Xs, [
|
|
4905
|
-
|
|
4905
|
+
T(m(ss), {
|
|
4906
4906
|
"cache-identifier": e.cacheIdentifier,
|
|
4907
4907
|
"disable-pagination": u.value && !e.config.paginatedEndpoint,
|
|
4908
4908
|
"disable-pagination-page-jump": "",
|
|
@@ -4915,11 +4915,11 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
4915
4915
|
"pagination-type": "offset",
|
|
4916
4916
|
"preferences-storage-key": d.value,
|
|
4917
4917
|
query: k.value,
|
|
4918
|
-
"row-attributes":
|
|
4918
|
+
"row-attributes": _,
|
|
4919
4919
|
"table-headers": m(y),
|
|
4920
4920
|
"use-action-outside": e.useActionOutside,
|
|
4921
|
-
onClearSearchInput:
|
|
4922
|
-
"onClick:row": G[3] || (G[3] = (
|
|
4921
|
+
onClearSearchInput: S,
|
|
4922
|
+
"onClick:row": G[3] || (G[3] = (Z) => E(Z)),
|
|
4923
4923
|
onEmptyStateCtaClicked: hr,
|
|
4924
4924
|
onSort: p
|
|
4925
4925
|
}, {
|
|
@@ -4927,55 +4927,55 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
4927
4927
|
u.value ? P("", !0) : (f(), V(m($s), {
|
|
4928
4928
|
key: 0,
|
|
4929
4929
|
modelValue: k.value,
|
|
4930
|
-
"onUpdate:modelValue": G[0] || (G[0] = (
|
|
4931
|
-
config:
|
|
4930
|
+
"onUpdate:modelValue": G[0] || (G[0] = (Z) => k.value = Z),
|
|
4931
|
+
config: U.value
|
|
4932
4932
|
}, null, 8, ["modelValue", "config"]))
|
|
4933
4933
|
]),
|
|
4934
4934
|
"toolbar-button": h(() => [
|
|
4935
|
-
(f(), V(
|
|
4935
|
+
(f(), V(jr, {
|
|
4936
4936
|
disabled: !e.useActionOutside,
|
|
4937
4937
|
to: "#kong-ui-app-page-header-action-button"
|
|
4938
4938
|
}, [
|
|
4939
|
-
|
|
4939
|
+
T(m(Ze), {
|
|
4940
4940
|
"auth-function": () => e.canCreate()
|
|
4941
4941
|
}, {
|
|
4942
4942
|
default: h(() => [
|
|
4943
|
-
|
|
4943
|
+
_e(T(X, {
|
|
4944
4944
|
appearance: "primary",
|
|
4945
4945
|
"data-testid": "toolbar-add-consumer",
|
|
4946
4946
|
size: "large",
|
|
4947
4947
|
to: e.config.consumerGroupId ? void 0 : e.config.createRoute,
|
|
4948
|
-
onClick: G[1] || (G[1] = () => e.config.consumerGroupId ?
|
|
4948
|
+
onClick: G[1] || (G[1] = () => e.config.consumerGroupId ? Et() : void 0)
|
|
4949
4949
|
}, {
|
|
4950
4950
|
default: h(() => [
|
|
4951
|
-
|
|
4952
|
-
H(" " +
|
|
4951
|
+
T(m(Lr)),
|
|
4952
|
+
H(" " + j(e.config.consumerGroupId ? m(i)("consumers.actions.add_consumer") : m(i)("consumers.list.toolbar_actions.new_consumer")), 1)
|
|
4953
4953
|
]),
|
|
4954
4954
|
_: 1
|
|
4955
4955
|
}, 8, ["to"]), [
|
|
4956
|
-
[
|
|
4956
|
+
[Ie, Lt.value]
|
|
4957
4957
|
])
|
|
4958
4958
|
]),
|
|
4959
4959
|
_: 1
|
|
4960
4960
|
}, 8, ["auth-function"])
|
|
4961
4961
|
], 8, ["disabled"]))
|
|
4962
4962
|
]),
|
|
4963
|
-
username: h(({ rowValue:
|
|
4964
|
-
F("b", null,
|
|
4963
|
+
username: h(({ rowValue: Z }) => [
|
|
4964
|
+
F("b", null, j(A(Z)), 1)
|
|
4965
4965
|
]),
|
|
4966
|
-
custom_id: h(({ rowValue:
|
|
4967
|
-
H(
|
|
4966
|
+
custom_id: h(({ rowValue: Z }) => [
|
|
4967
|
+
H(j(A(Z)), 1)
|
|
4968
4968
|
]),
|
|
4969
|
-
tags: h(({ rowValue:
|
|
4970
|
-
|
|
4969
|
+
tags: h(({ rowValue: Z }) => [
|
|
4970
|
+
Z && Z.length > 0 ? (f(), V(ye, { key: 0 }, {
|
|
4971
4971
|
default: h(() => [
|
|
4972
|
-
(f(!0), O(fe, null, pe(
|
|
4972
|
+
(f(!0), O(fe, null, pe(Z, (Oe) => (f(), V(ue, {
|
|
4973
4973
|
key: Oe,
|
|
4974
4974
|
onClick: G[2] || (G[2] = gt(() => {
|
|
4975
4975
|
}, ["stop"]))
|
|
4976
4976
|
}, {
|
|
4977
4977
|
default: h(() => [
|
|
4978
|
-
H(
|
|
4978
|
+
H(j(Oe), 1)
|
|
4979
4979
|
]),
|
|
4980
4980
|
_: 2
|
|
4981
4981
|
}, 1024))), 128))
|
|
@@ -4983,70 +4983,70 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
4983
4983
|
_: 2
|
|
4984
4984
|
}, 1024)) : (f(), O("span", eu, "-"))
|
|
4985
4985
|
]),
|
|
4986
|
-
actions: h(({ row:
|
|
4987
|
-
|
|
4986
|
+
actions: h(({ row: Z }) => [
|
|
4987
|
+
T(Rt, null, {
|
|
4988
4988
|
default: h(({ copyToClipboard: Oe }) => [
|
|
4989
|
-
|
|
4989
|
+
T(De, {
|
|
4990
4990
|
"data-testid": "action-entity-copy-id",
|
|
4991
|
-
onClick: (
|
|
4991
|
+
onClick: (_r) => g(Z, Oe)
|
|
4992
4992
|
}, {
|
|
4993
4993
|
default: h(() => [
|
|
4994
|
-
H(
|
|
4994
|
+
H(j(m(i)("consumers.actions.copy_id")), 1)
|
|
4995
4995
|
]),
|
|
4996
4996
|
_: 2
|
|
4997
4997
|
}, 1032, ["onClick"])
|
|
4998
4998
|
]),
|
|
4999
4999
|
_: 2
|
|
5000
5000
|
}, 1024),
|
|
5001
|
-
|
|
5001
|
+
T(Rt, null, {
|
|
5002
5002
|
default: h(({ copyToClipboard: Oe }) => [
|
|
5003
|
-
|
|
5003
|
+
T(De, {
|
|
5004
5004
|
"data-testid": "action-entity-copy-json",
|
|
5005
|
-
onClick: (
|
|
5005
|
+
onClick: (_r) => K(Z, Oe)
|
|
5006
5006
|
}, {
|
|
5007
5007
|
default: h(() => [
|
|
5008
|
-
H(
|
|
5008
|
+
H(j(m(i)("consumers.actions.copy_json")), 1)
|
|
5009
5009
|
]),
|
|
5010
5010
|
_: 2
|
|
5011
5011
|
}, 1032, ["onClick"])
|
|
5012
5012
|
]),
|
|
5013
5013
|
_: 2
|
|
5014
5014
|
}, 1024),
|
|
5015
|
-
|
|
5016
|
-
"auth-function": () => e.canRetrieve(
|
|
5015
|
+
T(m(Ze), {
|
|
5016
|
+
"auth-function": () => e.canRetrieve(Z)
|
|
5017
5017
|
}, {
|
|
5018
5018
|
default: h(() => [
|
|
5019
|
-
|
|
5019
|
+
T(De, {
|
|
5020
5020
|
"data-testid": "action-entity-view",
|
|
5021
5021
|
"has-divider": "",
|
|
5022
|
-
item:
|
|
5022
|
+
item: I(Z.id)
|
|
5023
5023
|
}, null, 8, ["item"])
|
|
5024
5024
|
]),
|
|
5025
5025
|
_: 2
|
|
5026
5026
|
}, 1032, ["auth-function"]),
|
|
5027
|
-
|
|
5028
|
-
"auth-function": () => e.canEdit(
|
|
5027
|
+
T(m(Ze), {
|
|
5028
|
+
"auth-function": () => e.canEdit(Z)
|
|
5029
5029
|
}, {
|
|
5030
5030
|
default: h(() => [
|
|
5031
|
-
|
|
5031
|
+
T(De, {
|
|
5032
5032
|
"data-testid": "action-entity-edit",
|
|
5033
|
-
item: $(
|
|
5033
|
+
item: $(Z.id)
|
|
5034
5034
|
}, null, 8, ["item"])
|
|
5035
5035
|
]),
|
|
5036
5036
|
_: 2
|
|
5037
5037
|
}, 1032, ["auth-function"]),
|
|
5038
|
-
|
|
5039
|
-
"auth-function": () => e.canDelete(
|
|
5038
|
+
T(m(Ze), {
|
|
5039
|
+
"auth-function": () => e.canDelete(Z)
|
|
5040
5040
|
}, {
|
|
5041
5041
|
default: h(() => [
|
|
5042
|
-
|
|
5042
|
+
T(De, {
|
|
5043
5043
|
danger: "",
|
|
5044
5044
|
"data-testid": "action-entity-delete",
|
|
5045
5045
|
"has-divider": "",
|
|
5046
|
-
onClick: () => e.config.consumerGroupId ? br(
|
|
5046
|
+
onClick: () => e.config.consumerGroupId ? br(Z) : lt(Z)
|
|
5047
5047
|
}, {
|
|
5048
5048
|
default: h(() => [
|
|
5049
|
-
H(
|
|
5049
|
+
H(j(e.config.consumerGroupId ? m(i)("consumers.actions.remove") : m(i)("consumers.actions.delete")), 1)
|
|
5050
5050
|
]),
|
|
5051
5051
|
_: 2
|
|
5052
5052
|
}, 1032, ["onClick"])
|
|
@@ -5056,7 +5056,7 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
5056
5056
|
]),
|
|
5057
5057
|
_: 1
|
|
5058
5058
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "preferences-storage-key", "query", "table-headers", "use-action-outside"]),
|
|
5059
|
-
|
|
5059
|
+
T(m(ps), {
|
|
5060
5060
|
"action-button-disabled": z.value,
|
|
5061
5061
|
"data-testid": "delete-consumer-modal",
|
|
5062
5062
|
description: m(i)("consumers.delete.description"),
|
|
@@ -5073,9 +5073,9 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
5073
5073
|
config: e.config,
|
|
5074
5074
|
"data-testid": "add-consumer-modal",
|
|
5075
5075
|
visible: st.value,
|
|
5076
|
-
"onAdd:partialSuccess": G[4] || (G[4] = (
|
|
5077
|
-
"onAdd:success": G[5] || (G[5] = (
|
|
5078
|
-
onCancel:
|
|
5076
|
+
"onAdd:partialSuccess": G[4] || (G[4] = (Z) => Ft(Z, !0)),
|
|
5077
|
+
"onAdd:success": G[5] || (G[5] = (Z) => Ft(Z)),
|
|
5078
|
+
onCancel: qt
|
|
5079
5079
|
}, null, 8, ["config", "visible"])) : P("", !0),
|
|
5080
5080
|
e.config.consumerGroupId && Ce.value ? (f(), V(wr, {
|
|
5081
5081
|
key: 1,
|
|
@@ -5087,32 +5087,32 @@ const qs = ["aria-labelledby"], Es = { class: "form-section-wrapper" }, Fs = {
|
|
|
5087
5087
|
onProceed: kr
|
|
5088
5088
|
}, {
|
|
5089
5089
|
default: h(() => [
|
|
5090
|
-
|
|
5090
|
+
T(m(a), {
|
|
5091
5091
|
class: "message",
|
|
5092
5092
|
keypath: e.config.consumerGroupName ? "consumers.consumer_groups.remove.confirmation" : "consumers.consumer_groups.remove.confirmationNoCG",
|
|
5093
5093
|
tag: "p"
|
|
5094
|
-
},
|
|
5094
|
+
}, Te({
|
|
5095
5095
|
consumer: h(() => [
|
|
5096
|
-
F("strong", null,
|
|
5096
|
+
F("strong", null, j(Ce.value.username || Ce.value.custom_id || Ce.value.id), 1)
|
|
5097
5097
|
]),
|
|
5098
5098
|
_: 2
|
|
5099
5099
|
}, [
|
|
5100
5100
|
e.config.consumerGroupName ? {
|
|
5101
5101
|
name: "consumerGroup",
|
|
5102
5102
|
fn: h(() => [
|
|
5103
|
-
F("strong", null,
|
|
5103
|
+
F("strong", null, j(e.config.consumerGroupName), 1)
|
|
5104
5104
|
]),
|
|
5105
5105
|
key: "0"
|
|
5106
5106
|
} : void 0
|
|
5107
5107
|
]), 1032, ["keypath"]),
|
|
5108
|
-
F("p", null,
|
|
5108
|
+
F("p", null, j(m(i)("consumers.consumer_groups.remove.description")), 1)
|
|
5109
5109
|
]),
|
|
5110
5110
|
_: 1
|
|
5111
5111
|
}, 8, ["title", "visible"])) : P("", !0)
|
|
5112
5112
|
]);
|
|
5113
5113
|
};
|
|
5114
5114
|
}
|
|
5115
|
-
}),
|
|
5115
|
+
}), Su = /* @__PURE__ */ Mt(tu, [["__scopeId", "data-v-20736a80"]]);
|
|
5116
5116
|
let Qe;
|
|
5117
5117
|
const nu = new Uint8Array(16);
|
|
5118
5118
|
function ru() {
|
|
@@ -5161,7 +5161,7 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5161
5161
|
emits: ["update", "error", "loading"],
|
|
5162
5162
|
setup(e, { emit: t }) {
|
|
5163
5163
|
var A;
|
|
5164
|
-
const n = e, r = t, { i18nT: a, i18n: { t: i } } = at.useI18n(), o =
|
|
5164
|
+
const n = e, r = t, { i18nT: a, i18n: { t: i } } = at.useI18n(), o = It(), { axiosInstance: l } = Ot((A = n.config) == null ? void 0 : A.axiosRequestConfig), { getMessageFromError: s } = Vs(), u = ou(), d = Vt({
|
|
5165
5165
|
fields: {
|
|
5166
5166
|
username: "",
|
|
5167
5167
|
customId: "",
|
|
@@ -5175,24 +5175,24 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5175
5175
|
tags: ""
|
|
5176
5176
|
}), C = w(() => {
|
|
5177
5177
|
var b, g;
|
|
5178
|
-
return (g =
|
|
5178
|
+
return (g = je.form[(b = n.config) == null ? void 0 : b.app]) == null ? void 0 : g.edit;
|
|
5179
5179
|
}), y = () => {
|
|
5180
5180
|
var b;
|
|
5181
5181
|
o.push(((b = n.config) == null ? void 0 : b.cancelRoute) || { name: "consumer-list" });
|
|
5182
|
-
},
|
|
5182
|
+
}, _ = (b) => {
|
|
5183
5183
|
r("loading", b);
|
|
5184
5184
|
}, M = (b) => {
|
|
5185
5185
|
r("error", b);
|
|
5186
5186
|
}, k = (b) => {
|
|
5187
|
-
var K,
|
|
5188
|
-
d.fields.username = ((K = b == null ? void 0 : b.item) == null ? void 0 : K.username) || (b == null ? void 0 : b.username) || "", d.fields.customId = ((
|
|
5189
|
-
const g = ((
|
|
5187
|
+
var K, E, I;
|
|
5188
|
+
d.fields.username = ((K = b == null ? void 0 : b.item) == null ? void 0 : K.username) || (b == null ? void 0 : b.username) || "", d.fields.customId = ((E = b == null ? void 0 : b.item) == null ? void 0 : E.custom_id) || (b == null ? void 0 : b.custom_id) || "";
|
|
5189
|
+
const g = ((I = b == null ? void 0 : b.item) == null ? void 0 : I.tags) || (b == null ? void 0 : b.tags) || [];
|
|
5190
5190
|
d.fields.tags = (g == null ? void 0 : g.join(", ")) || "", Object.assign(c, d.fields);
|
|
5191
|
-
},
|
|
5192
|
-
var K,
|
|
5193
|
-
let g = `${(K = n.config) == null ? void 0 : K.apiBaseUrl}${
|
|
5194
|
-
return ((
|
|
5195
|
-
}, J = w(() => !!d.fields.username || !!d.fields.customId), v = w(() => JSON.stringify(d.fields) !== JSON.stringify(c)),
|
|
5191
|
+
}, U = w(() => n.consumerId ? yt.Edit : yt.Create), x = (b) => {
|
|
5192
|
+
var K, E, I, $, L, D;
|
|
5193
|
+
let g = `${(K = n.config) == null ? void 0 : K.apiBaseUrl}${je.form[(E = n.config) == null ? void 0 : E.app][b]}`;
|
|
5194
|
+
return ((I = n.config) == null ? void 0 : I.app) === "konnect" ? g = g.replace(/{controlPlaneId}/gi, (($ = n.config) == null ? void 0 : $.controlPlaneId) || "") : ((L = n.config) == null ? void 0 : L.app) === "kongManager" && (g = g.replace(/\/{workspace}/gi, (D = n.config) != null && D.workspace ? `/${n.config.workspace}` : "")), g = g.replace(/{id}/gi, n.consumerId), g;
|
|
5195
|
+
}, J = w(() => !!d.fields.username || !!d.fields.customId), v = w(() => JSON.stringify(d.fields) !== JSON.stringify(c)), S = w(() => {
|
|
5196
5196
|
var b, g;
|
|
5197
5197
|
return {
|
|
5198
5198
|
username: d.fields.username || null,
|
|
@@ -5204,7 +5204,7 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5204
5204
|
try {
|
|
5205
5205
|
d.readonly = !0;
|
|
5206
5206
|
let g;
|
|
5207
|
-
await l.post(
|
|
5207
|
+
await l.post(x("validate"), S.value), U.value === "create" ? g = await l.post(x("create"), S.value) : U.value === "edit" && (g = ((b = n.config) == null ? void 0 : b.app) === "konnect" ? await l.put(x("edit"), S.value) : await l.patch(x("edit"), S.value)), k(g == null ? void 0 : g.data), r("update", g == null ? void 0 : g.data);
|
|
5208
5208
|
} catch (g) {
|
|
5209
5209
|
d.errorMessage = s(g), r("error", g);
|
|
5210
5210
|
} finally {
|
|
@@ -5212,25 +5212,25 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5212
5212
|
}
|
|
5213
5213
|
};
|
|
5214
5214
|
return (b, g) => {
|
|
5215
|
-
const K =
|
|
5215
|
+
const K = R("KInput"), E = R("KCard");
|
|
5216
5216
|
return f(), O("div", lu, [
|
|
5217
|
-
|
|
5217
|
+
T(m(es), {
|
|
5218
5218
|
"can-submit": J.value && v.value,
|
|
5219
5219
|
config: e.config,
|
|
5220
5220
|
"edit-id": e.consumerId,
|
|
5221
5221
|
"error-message": d.errorMessage,
|
|
5222
5222
|
"fetch-url": C.value,
|
|
5223
|
-
"form-fields":
|
|
5223
|
+
"form-fields": S.value,
|
|
5224
5224
|
"is-readonly": d.readonly,
|
|
5225
5225
|
onCancel: y,
|
|
5226
|
-
"onFetch:error": g[3] || (g[3] = (
|
|
5226
|
+
"onFetch:error": g[3] || (g[3] = (I) => M(I)),
|
|
5227
5227
|
"onFetch:success": k,
|
|
5228
|
-
onLoading: g[4] || (g[4] = (
|
|
5228
|
+
onLoading: g[4] || (g[4] = (I) => _(I)),
|
|
5229
5229
|
onSubmit: p
|
|
5230
5230
|
}, {
|
|
5231
5231
|
default: h(() => [
|
|
5232
5232
|
F("div", null, [
|
|
5233
|
-
|
|
5233
|
+
T(m(Us), {
|
|
5234
5234
|
description: m(i)("consumers.form.info.description"),
|
|
5235
5235
|
"has-divider": "",
|
|
5236
5236
|
title: m(i)("consumers.form.info.title")
|
|
@@ -5240,17 +5240,17 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5240
5240
|
F("h3", {
|
|
5241
5241
|
id: `fields-group-title-${m(u)}`,
|
|
5242
5242
|
class: "fields-group-title"
|
|
5243
|
-
},
|
|
5244
|
-
F("p", uu,
|
|
5243
|
+
}, j(m(i)("consumers.form.consumer_identification.title")) + "* ", 9, su),
|
|
5244
|
+
F("p", uu, j(m(i)("consumers.form.consumer_identification.description")), 1)
|
|
5245
5245
|
]),
|
|
5246
|
-
|
|
5246
|
+
T(E, null, {
|
|
5247
5247
|
default: h(() => [
|
|
5248
5248
|
F("fieldset", {
|
|
5249
5249
|
"aria-labelledby": `fields-group-title-${m(u)}`
|
|
5250
5250
|
}, [
|
|
5251
|
-
|
|
5251
|
+
T(K, {
|
|
5252
5252
|
modelValue: d.fields.username,
|
|
5253
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
5253
|
+
"onUpdate:modelValue": g[0] || (g[0] = (I) => d.fields.username = I),
|
|
5254
5254
|
modelModifiers: { trim: !0 },
|
|
5255
5255
|
autocomplete: "off",
|
|
5256
5256
|
class: "username-field",
|
|
@@ -5264,21 +5264,21 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5264
5264
|
type: "text"
|
|
5265
5265
|
}, {
|
|
5266
5266
|
"label-tooltip": h(() => [
|
|
5267
|
-
|
|
5267
|
+
T(m(a), {
|
|
5268
5268
|
keypath: "consumers.fields.username.tooltip",
|
|
5269
5269
|
scope: "global"
|
|
5270
5270
|
}, {
|
|
5271
5271
|
custom_id: h(() => [
|
|
5272
|
-
F("code", null,
|
|
5272
|
+
F("code", null, j(m(i)("consumers.fields.username.custom_id")), 1)
|
|
5273
5273
|
]),
|
|
5274
5274
|
_: 1
|
|
5275
5275
|
})
|
|
5276
5276
|
]),
|
|
5277
5277
|
_: 1
|
|
5278
5278
|
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
5279
|
-
|
|
5279
|
+
T(K, {
|
|
5280
5280
|
modelValue: d.fields.customId,
|
|
5281
|
-
"onUpdate:modelValue": g[1] || (g[1] = (
|
|
5281
|
+
"onUpdate:modelValue": g[1] || (g[1] = (I) => d.fields.customId = I),
|
|
5282
5282
|
modelModifiers: { trim: !0 },
|
|
5283
5283
|
autocomplete: "off",
|
|
5284
5284
|
"data-testid": "consumer-form-custom-id",
|
|
@@ -5291,12 +5291,12 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5291
5291
|
type: "text"
|
|
5292
5292
|
}, {
|
|
5293
5293
|
"label-tooltip": h(() => [
|
|
5294
|
-
|
|
5294
|
+
T(m(a), {
|
|
5295
5295
|
keypath: "consumers.fields.custom_id.tooltip",
|
|
5296
5296
|
scope: "global"
|
|
5297
5297
|
}, {
|
|
5298
5298
|
username: h(() => [
|
|
5299
|
-
F("code", null,
|
|
5299
|
+
F("code", null, j(m(i)("consumers.fields.custom_id.username")), 1)
|
|
5300
5300
|
]),
|
|
5301
5301
|
_: 1
|
|
5302
5302
|
})
|
|
@@ -5307,9 +5307,9 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5307
5307
|
]),
|
|
5308
5308
|
_: 1
|
|
5309
5309
|
}),
|
|
5310
|
-
|
|
5310
|
+
T(K, {
|
|
5311
5311
|
modelValue: d.fields.tags,
|
|
5312
|
-
"onUpdate:modelValue": g[2] || (g[2] = (
|
|
5312
|
+
"onUpdate:modelValue": g[2] || (g[2] = (I) => d.fields.tags = I),
|
|
5313
5313
|
modelModifiers: { trim: !0 },
|
|
5314
5314
|
autocomplete: "off",
|
|
5315
5315
|
"data-testid": "consumer-form-tags",
|
|
@@ -5333,7 +5333,7 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5333
5333
|
]);
|
|
5334
5334
|
};
|
|
5335
5335
|
}
|
|
5336
|
-
}), Au = /* @__PURE__ */ Mt(du, [["__scopeId", "data-v-d3813a74"]]), pu = { class: "kong-ui-consumer-entity-config-card" },
|
|
5336
|
+
}), Au = /* @__PURE__ */ Mt(du, [["__scopeId", "data-v-d3813a74"]]), pu = { class: "kong-ui-consumer-entity-config-card" }, xu = /* @__PURE__ */ W({
|
|
5337
5337
|
__name: "ConsumerConfigCard",
|
|
5338
5338
|
props: {
|
|
5339
5339
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5360,7 +5360,7 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5360
5360
|
},
|
|
5361
5361
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
5362
5362
|
setup(e) {
|
|
5363
|
-
const t = e, { i18n: { t: n }, i18nT: r } = at.useI18n(), a = w(() =>
|
|
5363
|
+
const t = e, { i18n: { t: n }, i18nT: r } = at.useI18n(), a = w(() => je.form[t.config.app].edit), i = B({
|
|
5364
5364
|
id: {},
|
|
5365
5365
|
username: {
|
|
5366
5366
|
section: ce.Basic,
|
|
@@ -5386,7 +5386,7 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5386
5386
|
}
|
|
5387
5387
|
});
|
|
5388
5388
|
return (o, l) => (f(), O("div", pu, [
|
|
5389
|
-
|
|
5389
|
+
T(m(Zl), {
|
|
5390
5390
|
config: e.config,
|
|
5391
5391
|
"config-card-doc": e.configCardDoc,
|
|
5392
5392
|
"config-schema": i.value,
|
|
@@ -5397,23 +5397,23 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5397
5397
|
onLoading: l[2] || (l[2] = (s) => o.$emit("loading", s))
|
|
5398
5398
|
}, {
|
|
5399
5399
|
"username-label-tooltip": h(() => [
|
|
5400
|
-
|
|
5400
|
+
T(m(r), {
|
|
5401
5401
|
keypath: "consumers.fields.username.tooltip",
|
|
5402
5402
|
scope: "global"
|
|
5403
5403
|
}, {
|
|
5404
5404
|
custom_id: h(() => [
|
|
5405
|
-
F("code", null,
|
|
5405
|
+
F("code", null, j(m(n)("consumers.fields.username.custom_id")), 1)
|
|
5406
5406
|
]),
|
|
5407
5407
|
_: 1
|
|
5408
5408
|
})
|
|
5409
5409
|
]),
|
|
5410
5410
|
"custom_id-label-tooltip": h(() => [
|
|
5411
|
-
|
|
5411
|
+
T(m(r), {
|
|
5412
5412
|
keypath: "consumers.fields.custom_id.tooltip",
|
|
5413
5413
|
scope: "global"
|
|
5414
5414
|
}, {
|
|
5415
5415
|
username: h(() => [
|
|
5416
|
-
F("code", null,
|
|
5416
|
+
F("code", null, j(m(n)("consumers.fields.custom_id.username")), 1)
|
|
5417
5417
|
]),
|
|
5418
5418
|
_: 1
|
|
5419
5419
|
})
|
|
@@ -5424,7 +5424,7 @@ const lu = { class: "kong-ui-entities-consumer-form" }, su = ["id"], uu = { clas
|
|
|
5424
5424
|
}
|
|
5425
5425
|
});
|
|
5426
5426
|
export {
|
|
5427
|
-
|
|
5427
|
+
xu as ConsumerConfigCard,
|
|
5428
5428
|
Au as ConsumerForm,
|
|
5429
|
-
|
|
5429
|
+
Su as ConsumerList
|
|
5430
5430
|
};
|