@kong-ui-public/entities-consumer-groups 2.5.4 → 2.5.5-pr.1246.fa61c0c3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-consumer-groups.es.js +734 -715
- package/dist/entities-consumer-groups.umd.js +13 -13
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as X, ref as E, computed as x, watch as xe, renderSlot as te, createCommentVNode as J, unref as h, onBeforeMount as ut, resolveComponent as U, openBlock as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as X, ref as E, computed as x, watch as xe, renderSlot as te, createCommentVNode as J, unref as h, onBeforeMount as ut, resolveComponent as U, openBlock as p, createBlock as D, createSlots as Le, withCtx as b, createElementVNode as P, createVNode as $, createTextVNode as Z, toDisplayString as N, renderList as ye, resolveDynamicComponent as Se, createElementBlock as j, withModifiers as Ct, withDirectives as Te, vShow as $e, Fragment as ve, normalizeClass as Ee, withKeys as vr, useSlots as St, useCssVars as gn, inject as br, onMounted as kr, onUnmounted as Cr, normalizeStyle as ct, normalizeProps as wr, guardReactiveProps as _r, mergeProps as Ar, pushScopeId as dt, popScopeId as pt, reactive as Vt } from "vue";
|
|
2
|
+
import { useRouter as Tt } from "vue-router";
|
|
3
3
|
import { createI18n as hn, i18nTComponent as yn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Dt from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as xr } from "@kong/kongponents";
|
|
@@ -95,11 +95,11 @@ const Ir = {
|
|
|
95
95
|
name: "The name can be any string containing letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
},
|
|
98
|
+
}, Sr = {
|
|
99
99
|
consumer_groups: Ir
|
|
100
100
|
};
|
|
101
|
-
function
|
|
102
|
-
const e = hn("en-us",
|
|
101
|
+
function Tr() {
|
|
102
|
+
const e = hn("en-us", Sr);
|
|
103
103
|
return {
|
|
104
104
|
i18n: e,
|
|
105
105
|
i18nT: yn(e)
|
|
@@ -107,8 +107,8 @@ function $r() {
|
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
const ft = {
|
|
110
|
-
useI18n:
|
|
111
|
-
}, _e = "/api/runtime_groups/{controlPlaneId}",
|
|
110
|
+
useI18n: Tr
|
|
111
|
+
}, _e = "/api/runtime_groups/{controlPlaneId}", Ae = "/{workspace}", je = {
|
|
112
112
|
list: {
|
|
113
113
|
konnect: {
|
|
114
114
|
all: `${_e}/consumer_groups`,
|
|
@@ -116,9 +116,9 @@ const ft = {
|
|
|
116
116
|
oneForConsumer: `${_e}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
117
117
|
},
|
|
118
118
|
kongManager: {
|
|
119
|
-
all: `${
|
|
120
|
-
forConsumer: `${
|
|
121
|
-
oneForConsumer: `${
|
|
119
|
+
all: `${Ae}/consumer_groups?counter=true`,
|
|
120
|
+
forConsumer: `${Ae}/consumers/{consumerId}/consumer_groups`,
|
|
121
|
+
oneForConsumer: `${Ae}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
124
|
form: {
|
|
@@ -131,17 +131,17 @@ const ft = {
|
|
|
131
131
|
getConsumers: `${_e}/consumer_groups/{id}/consumers`
|
|
132
132
|
},
|
|
133
133
|
kongManager: {
|
|
134
|
-
consumersList: `${
|
|
135
|
-
create: `${
|
|
136
|
-
edit: `${
|
|
137
|
-
addConsumer: `${
|
|
138
|
-
removeConsumer: `${
|
|
139
|
-
getConsumers: `${
|
|
134
|
+
consumersList: `${Ae}/consumers`,
|
|
135
|
+
create: `${Ae}/consumer_groups`,
|
|
136
|
+
edit: `${Ae}/consumer_groups/{id}`,
|
|
137
|
+
addConsumer: `${Ae}/consumer_groups/{id}/consumers`,
|
|
138
|
+
removeConsumer: `${Ae}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
139
|
+
getConsumers: `${Ae}/consumer_groups/{id}/consumers`
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
|
-
var vn = /* @__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))(vn || {}), rt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(rt || {}),
|
|
144
|
-
function
|
|
143
|
+
var vn = /* @__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))(vn || {}), rt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(rt || {}), Ke = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Ke || {}), ee = /* @__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))(ee || {}), he = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(he || {});
|
|
144
|
+
function $r() {
|
|
145
145
|
return {
|
|
146
146
|
getAxiosInstance: (e = {}) => {
|
|
147
147
|
try {
|
|
@@ -213,8 +213,8 @@ function Er() {
|
|
|
213
213
|
}
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
const { getAxiosInstance: n } =
|
|
216
|
+
function $t(e = {}) {
|
|
217
|
+
const { getAxiosInstance: n } = $r();
|
|
218
218
|
return {
|
|
219
219
|
axiosInstance: n(e)
|
|
220
220
|
};
|
|
@@ -245,13 +245,13 @@ const Or = {
|
|
|
245
245
|
errors: {
|
|
246
246
|
edit: "The entity could not be edited at this time."
|
|
247
247
|
}
|
|
248
|
-
},
|
|
248
|
+
}, Kr = {
|
|
249
249
|
emptyState: {
|
|
250
250
|
noSearchResultsTitle: "No results found",
|
|
251
251
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
252
252
|
noSearchResultsCtaText: "Clear"
|
|
253
253
|
}
|
|
254
|
-
},
|
|
254
|
+
}, qr = {
|
|
255
255
|
title: "Configuration",
|
|
256
256
|
actions: {
|
|
257
257
|
copy: "Copy JSON"
|
|
@@ -313,19 +313,19 @@ const Or = {
|
|
|
313
313
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
314
314
|
confirmText: "Yes, disable"
|
|
315
315
|
}
|
|
316
|
-
},
|
|
316
|
+
}, Rr = {
|
|
317
317
|
global: Or,
|
|
318
318
|
deleteModal: Nr,
|
|
319
319
|
baseForm: Fr,
|
|
320
|
-
baseTable:
|
|
321
|
-
baseConfigCard:
|
|
320
|
+
baseTable: Kr,
|
|
321
|
+
baseConfigCard: qr,
|
|
322
322
|
filter: Lr,
|
|
323
323
|
debouncedFilter: Br,
|
|
324
324
|
errors: Pr,
|
|
325
325
|
toggleModal: Ur
|
|
326
326
|
};
|
|
327
327
|
function jt() {
|
|
328
|
-
const e = hn("en-us",
|
|
328
|
+
const e = hn("en-us", Rr);
|
|
329
329
|
return {
|
|
330
330
|
i18n: e,
|
|
331
331
|
i18nT: yn(e)
|
|
@@ -376,38 +376,38 @@ function bn() {
|
|
|
376
376
|
isValidUuid: (t) => t ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(t) : !1
|
|
377
377
|
};
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function Vr(e, n, t, r = {
|
|
380
380
|
fetchedItemsKey: "data",
|
|
381
381
|
searchKeys: ["id"]
|
|
382
382
|
}) {
|
|
383
383
|
t || (t = "100");
|
|
384
|
-
const { axiosInstance: a } =
|
|
384
|
+
const { axiosInstance: a } = $t({
|
|
385
385
|
headers: e.requestHeaders
|
|
386
386
|
}), { i18n: { t: i } } = jt(), { debounce: o } = jr(), s = o(async (y) => {
|
|
387
387
|
await W(y);
|
|
388
|
-
}, 200), l = E(!1), u = E(""), d = E(""), c = E([]), v = E([]),
|
|
388
|
+
}, 200), l = E(!1), u = E(""), d = E(""), c = E([]), v = E([]), f = E(void 0), I = h(n);
|
|
389
389
|
let w = `${e.apiBaseUrl}${I}`;
|
|
390
390
|
e.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (w = w.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
391
|
-
const { isValidUuid: _ } = bn(),
|
|
391
|
+
const { isValidUuid: _ } = bn(), R = async () => {
|
|
392
392
|
try {
|
|
393
393
|
l.value = !0;
|
|
394
394
|
const { data: y } = await a.get(`${w}?size=${t}`);
|
|
395
|
-
y != null && y.next || (
|
|
395
|
+
y != null && y.next || (f.value = r.fetchedItemsKey in y ? y[r.fetchedItemsKey] : []), v.value = r.fetchedItemsKey in y ? y[r.fetchedItemsKey] : [], c.value = v.value;
|
|
396
396
|
} catch {
|
|
397
397
|
c.value = [], u.value = i("debouncedFilter.errors.fetch");
|
|
398
398
|
} finally {
|
|
399
399
|
l.value = !1;
|
|
400
400
|
}
|
|
401
|
-
},
|
|
401
|
+
}, q = E(""), W = async (y) => {
|
|
402
402
|
var m, g, F;
|
|
403
|
-
if (
|
|
404
|
-
if (
|
|
403
|
+
if (q.value !== y)
|
|
404
|
+
if (q.value = y || "", f.value === void 0)
|
|
405
405
|
try {
|
|
406
406
|
if (l.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
407
407
|
let L = w + "";
|
|
408
408
|
y && (L += `/${y}`);
|
|
409
|
-
const { data:
|
|
410
|
-
r.fetchedItemsKey in
|
|
409
|
+
const { data: A } = await a.get(`${L}?size=${t}`);
|
|
410
|
+
r.fetchedItemsKey in A ? c.value = A[r.fetchedItemsKey] : A != null && A.id ? c.value = [A] : c.value = [];
|
|
411
411
|
} else if (y) {
|
|
412
412
|
const L = [];
|
|
413
413
|
_(y) && r.searchKeys.includes("id") ? L.push((async () => {
|
|
@@ -419,11 +419,11 @@ function Rr(e, n, t, r = {
|
|
|
419
419
|
return k[r.fetchedItemsKey];
|
|
420
420
|
})
|
|
421
421
|
);
|
|
422
|
-
const
|
|
423
|
-
c.value = [], (m =
|
|
422
|
+
const A = await Promise.all(L), z = /* @__PURE__ */ new Set();
|
|
423
|
+
c.value = [], (m = A == null ? void 0 : A.forEach) == null || m.call(A, (O) => {
|
|
424
424
|
var k;
|
|
425
|
-
(k = O == null ? void 0 : O.forEach) == null || k.call(O, (
|
|
426
|
-
z.has(
|
|
425
|
+
(k = O == null ? void 0 : O.forEach) == null || k.call(O, (S) => {
|
|
426
|
+
z.has(S.id) || (z.add(S.id), c.value.push(S));
|
|
427
427
|
});
|
|
428
428
|
});
|
|
429
429
|
} else
|
|
@@ -434,23 +434,23 @@ function Rr(e, n, t, r = {
|
|
|
434
434
|
l.value = !1;
|
|
435
435
|
}
|
|
436
436
|
else
|
|
437
|
-
l.value = !0, d.value = "", y ? (c.value = (F =
|
|
438
|
-
var
|
|
437
|
+
l.value = !0, d.value = "", y ? (c.value = (F = f.value) == null ? void 0 : F.filter((L) => {
|
|
438
|
+
var A;
|
|
439
439
|
let z = !1;
|
|
440
440
|
for (const O of r.searchKeys) {
|
|
441
|
-
const k = typeof L[O] == "string" ? (
|
|
441
|
+
const k = typeof L[O] == "string" ? (A = L[O]) == null ? void 0 : A.toLowerCase() : L[O];
|
|
442
442
|
k != null && k.includes(y.toLowerCase()) && (z = !0);
|
|
443
443
|
}
|
|
444
444
|
return z;
|
|
445
|
-
}), (!c.value || !c.value.length) && (d.value = i("debouncedFilter.errors.invalid"))) : c.value =
|
|
445
|
+
}), (!c.value || !c.value.length) && (d.value = i("debouncedFilter.errors.invalid"))) : c.value = f.value, l.value = !1;
|
|
446
446
|
};
|
|
447
447
|
return {
|
|
448
448
|
loading: l,
|
|
449
449
|
error: u,
|
|
450
450
|
validationError: d,
|
|
451
451
|
results: c,
|
|
452
|
-
allRecords:
|
|
453
|
-
loadItems:
|
|
452
|
+
allRecords: f,
|
|
453
|
+
loadItems: R,
|
|
454
454
|
debouncedQueryChange: s
|
|
455
455
|
};
|
|
456
456
|
}
|
|
@@ -510,24 +510,24 @@ function kn(e, n) {
|
|
|
510
510
|
return (o) => {
|
|
511
511
|
const { page: s, pageSize: l, offset: u, sortColumnKey: d, sortColumnOrder: c, query: v } = o;
|
|
512
512
|
try {
|
|
513
|
-
let
|
|
514
|
-
return a.value && v ? (
|
|
515
|
-
|
|
516
|
-
}), d &&
|
|
517
|
-
} catch (
|
|
518
|
-
return console.error("RouteList(fetcher)",
|
|
513
|
+
let f = new URL(i.value.href);
|
|
514
|
+
return a.value && v ? (f.search = "", f = t.value.isExactMatch ? new URL(`${f.href}/${v}/`) : new URL(`${f.href}?filter[name][contains]=${v}`)) : (a.value || new URLSearchParams(v).forEach((I, w) => {
|
|
515
|
+
f.searchParams.append(w, I);
|
|
516
|
+
}), d && f.searchParams.append("sort_by", d), c === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(l))), u && s !== 1 && f.searchParams.append("offset", String(u)), f.href;
|
|
517
|
+
} catch (f) {
|
|
518
|
+
return console.error("RouteList(fetcher)", f), r.value;
|
|
519
519
|
}
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
522
|
function Hr(e, n, t = "data") {
|
|
523
|
-
const r = h(n), { axiosInstance: a } =
|
|
523
|
+
const r = h(n), { axiosInstance: a } = $t({
|
|
524
524
|
headers: e.requestHeaders
|
|
525
525
|
}), i = kn(e, r), o = E({
|
|
526
|
-
status:
|
|
526
|
+
status: Ke.Idle
|
|
527
527
|
});
|
|
528
528
|
return { fetcher: async (s) => {
|
|
529
529
|
try {
|
|
530
|
-
o.value = { status:
|
|
530
|
+
o.value = { status: Ke.Loading };
|
|
531
531
|
let l = i(s);
|
|
532
532
|
l.includes("filter[name]") && (l = `${l}&page[size]=${s.pageSize}&page[number]=${s.page}`);
|
|
533
533
|
const { data: u } = await a.get(l), d = t && t.replace(/[^\w-_]/gi, "");
|
|
@@ -543,7 +543,7 @@ function Hr(e, n, t = "data") {
|
|
|
543
543
|
} : null
|
|
544
544
|
};
|
|
545
545
|
return o.value = {
|
|
546
|
-
status:
|
|
546
|
+
status: Ke.Idle,
|
|
547
547
|
response: v
|
|
548
548
|
}, v;
|
|
549
549
|
} catch (l) {
|
|
@@ -552,11 +552,11 @@ function Hr(e, n, t = "data") {
|
|
|
552
552
|
total: 0
|
|
553
553
|
};
|
|
554
554
|
return s.query && l.response.status === 404 ? (o.value = {
|
|
555
|
-
status:
|
|
555
|
+
status: Ke.NoResults,
|
|
556
556
|
response: u,
|
|
557
557
|
error: l
|
|
558
558
|
}, u) : (o.value = {
|
|
559
|
-
status:
|
|
559
|
+
status: Ke.Error,
|
|
560
560
|
response: u,
|
|
561
561
|
error: l
|
|
562
562
|
}, u);
|
|
@@ -634,8 +634,8 @@ function ta(e) {
|
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
636
|
const se = {
|
|
637
|
-
useAxios:
|
|
638
|
-
useDebouncedFilter:
|
|
637
|
+
useAxios: $t,
|
|
638
|
+
useDebouncedFilter: Vr,
|
|
639
639
|
useDeleteUrlBuilder: Dr,
|
|
640
640
|
useErrors: zr,
|
|
641
641
|
useExternalLinkCreator: Gr,
|
|
@@ -673,14 +673,14 @@ const se = {
|
|
|
673
673
|
var l;
|
|
674
674
|
return n.isArrayItem ? (l = i.value) != null && l.name ? r(i.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
675
675
|
});
|
|
676
|
-
return (l, u) => (
|
|
677
|
-
class:
|
|
676
|
+
return (l, u) => (p(), D(Se(e.isArrayItem ? "fieldset" : "div"), {
|
|
677
|
+
class: Ee(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
678
678
|
}, {
|
|
679
679
|
default: b(() => [
|
|
680
|
-
e.isArrayItem ? (
|
|
681
|
-
|
|
680
|
+
e.isArrayItem ? (p(), j("legend", na, [
|
|
681
|
+
P("b", null, N(s.value), 1)
|
|
682
682
|
])) : J("", !0),
|
|
683
|
-
(
|
|
683
|
+
(p(!0), j(ve, null, ye(Object.keys(o.value), (d, c) => (p(), D(An, {
|
|
684
684
|
key: `${a.value}-property-${c}`,
|
|
685
685
|
item: {
|
|
686
686
|
key: d,
|
|
@@ -710,14 +710,14 @@ const se = {
|
|
|
710
710
|
const { i18n: { t: n } } = se.useI18n();
|
|
711
711
|
return (t, r) => {
|
|
712
712
|
const a = U("KButton");
|
|
713
|
-
return
|
|
714
|
-
|
|
713
|
+
return p(), j("div", null, [
|
|
714
|
+
$(a, {
|
|
715
715
|
appearance: "tertiary",
|
|
716
716
|
class: "navigation-button",
|
|
717
717
|
onClick: r[0] || (r[0] = (i) => t.$emit("navigation-click", e.item))
|
|
718
718
|
}, {
|
|
719
719
|
default: b(() => [
|
|
720
|
-
|
|
720
|
+
Z(N(e.item.value || h(n)("baseConfigCard.commonFields.link")), 1)
|
|
721
721
|
]),
|
|
722
722
|
_: 1
|
|
723
723
|
})
|
|
@@ -736,11 +736,11 @@ const se = {
|
|
|
736
736
|
const { i18n: { t: n } } = se.useI18n();
|
|
737
737
|
return (t, r) => {
|
|
738
738
|
const a = U("KBadge");
|
|
739
|
-
return
|
|
739
|
+
return p(), D(a, {
|
|
740
740
|
appearance: e.status ? "success" : "neutral"
|
|
741
741
|
}, {
|
|
742
742
|
default: b(() => [
|
|
743
|
-
|
|
743
|
+
Z(N(e.status ? h(n)("baseConfigCard.statusBadge.enabledLabel") : h(n)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
744
744
|
]),
|
|
745
745
|
_: 1
|
|
746
746
|
}, 8, ["appearance"]);
|
|
@@ -749,7 +749,7 @@ const se = {
|
|
|
749
749
|
}), sa = "#0044f4", la = "#e0e4ea", ua = "#3a3f51", ca = "#afb7c5", da = "1px", pa = "20px", fa = { class: "config-card-details-row" }, ma = ["data-testid"], ga = ["data-testid"], ha = ["data-testid"], ya = ["data-testid"], va = { key: 1 }, ba = ["data-testid"], ka = ["data-testid"], Ca = ["data-testid"], wa = ["data-testid"], _a = {
|
|
750
750
|
name: "ConfigCardItem",
|
|
751
751
|
components: { JsonCardItem: _n, StatusBadge: ia, InternalLinkItem: oa }
|
|
752
|
-
},
|
|
752
|
+
}, Aa = /* @__PURE__ */ X({
|
|
753
753
|
..._a,
|
|
754
754
|
props: {
|
|
755
755
|
item: {
|
|
@@ -775,7 +775,7 @@ const se = {
|
|
|
775
775
|
"5036b738": u.value && s.value ? "100%" : t.slim ? "50%" : "25%",
|
|
776
776
|
"5038fd13": u.value && s.value ? "100%" : t.slim ? "50%" : "75%"
|
|
777
777
|
}));
|
|
778
|
-
const t = e, r = n, a =
|
|
778
|
+
const t = e, r = n, a = St(), { i18n: { t: i, formatUnixTimeStamp: o } } = se.useI18n(), s = x(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), l = x(() => !!(t.item.tooltip || a["label-tooltip"])), u = x(() => t.item.type === ee.Json || t.item.type === ee.JsonArray), d = x(() => t.item.type === ee.JsonArray), c = x(() => {
|
|
779
779
|
switch (t.item.type) {
|
|
780
780
|
case ee.ID:
|
|
781
781
|
return {
|
|
@@ -885,29 +885,29 @@ const se = {
|
|
|
885
885
|
text: t.item.value
|
|
886
886
|
};
|
|
887
887
|
}
|
|
888
|
-
}), v = E(), { isTruncated:
|
|
888
|
+
}), v = E(), { isTruncated: f } = se.useTruncationDetector(v);
|
|
889
889
|
return (I, w) => {
|
|
890
|
-
const _ = U("KLabel"),
|
|
891
|
-
return
|
|
892
|
-
|
|
890
|
+
const _ = U("KLabel"), R = U("KBadge"), q = U("KCopy"), W = U("KTooltip");
|
|
891
|
+
return p(), j("div", fa, [
|
|
892
|
+
P("div", {
|
|
893
893
|
class: "config-card-details-label",
|
|
894
894
|
"data-testid": `${e.item.key}-label`
|
|
895
895
|
}, [
|
|
896
896
|
te(I.$slots, "label", { item: e.item }, () => [
|
|
897
|
-
|
|
897
|
+
$(_, { "tooltip-attributes": { maxWidth: "500px" } }, Le({
|
|
898
898
|
default: b(() => [
|
|
899
|
-
|
|
899
|
+
Z(N(e.item.label) + " ", 1)
|
|
900
900
|
]),
|
|
901
901
|
_: 2
|
|
902
902
|
}, [
|
|
903
903
|
l.value ? {
|
|
904
904
|
name: "tooltip",
|
|
905
905
|
fn: b(() => [
|
|
906
|
-
|
|
906
|
+
P("div", {
|
|
907
907
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
908
908
|
}, [
|
|
909
909
|
te(I.$slots, "label-tooltip", {}, () => [
|
|
910
|
-
|
|
910
|
+
Z(N(e.item.tooltip), 1)
|
|
911
911
|
], !0)
|
|
912
912
|
], 8, ga)
|
|
913
913
|
]),
|
|
@@ -916,21 +916,21 @@ const se = {
|
|
|
916
916
|
]), 1024)
|
|
917
917
|
], !0)
|
|
918
918
|
], 8, ma),
|
|
919
|
-
|
|
919
|
+
P("div", {
|
|
920
920
|
class: "config-card-details-value",
|
|
921
921
|
"data-testid": `${e.item.key}-property-value`
|
|
922
922
|
}, [
|
|
923
923
|
te(I.$slots, e.item.key, {
|
|
924
924
|
rowValue: e.item.value
|
|
925
925
|
}, () => [
|
|
926
|
-
s.value ? (
|
|
927
|
-
(
|
|
926
|
+
s.value ? (p(), j("div", va, [
|
|
927
|
+
(p(), D(Se(c.value.tag), wr(_r(c.value.attrs)), {
|
|
928
928
|
default: b(() => [
|
|
929
|
-
c.value.additionalComponent === "KBadge" ? (
|
|
929
|
+
c.value.additionalComponent === "KBadge" ? (p(), j("div", {
|
|
930
930
|
key: 0,
|
|
931
931
|
"data-testid": `${e.item.key}-badge-tags`
|
|
932
932
|
}, [
|
|
933
|
-
(
|
|
933
|
+
(p(!0), j(ve, null, ye(e.item.value, (y, m) => (p(), D(R, {
|
|
934
934
|
key: `${e.item.key}-badge-tag-${m}`,
|
|
935
935
|
class: "config-badge",
|
|
936
936
|
"data-testid": `${e.item.key}-badge-tag-${m}`,
|
|
@@ -938,57 +938,57 @@ const se = {
|
|
|
938
938
|
"truncation-tooltip": ""
|
|
939
939
|
}, {
|
|
940
940
|
default: b(() => [
|
|
941
|
-
|
|
941
|
+
Z(N(y), 1)
|
|
942
942
|
]),
|
|
943
943
|
_: 2
|
|
944
944
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
945
945
|
], 8, ba)) : J("", !0),
|
|
946
|
-
c.value.additionalComponent === "KCopy" ? (
|
|
946
|
+
c.value.additionalComponent === "KCopy" ? (p(), j("div", {
|
|
947
947
|
key: 1,
|
|
948
948
|
class: "copy-uuid-array",
|
|
949
949
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
950
950
|
}, [
|
|
951
|
-
(
|
|
951
|
+
(p(!0), j(ve, null, ye(e.item.value, (y, m) => (p(), D(q, Ar(c.value.childAttrs, {
|
|
952
952
|
key: `${e.item.key}-copy-uuid-${m}`,
|
|
953
953
|
"data-testid": `${e.item.key}-copy-uuid-${m}`,
|
|
954
954
|
text: y
|
|
955
955
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
956
|
-
], 8, ka)) : c.value.additionalComponent === "KMethodBadge" ? (
|
|
956
|
+
], 8, ka)) : c.value.additionalComponent === "KMethodBadge" ? (p(), j("div", {
|
|
957
957
|
key: 2,
|
|
958
958
|
class: "method-badge-array",
|
|
959
959
|
"data-testid": `${e.item.key}-badge-methods`
|
|
960
960
|
}, [
|
|
961
|
-
(
|
|
961
|
+
(p(!0), j(ve, null, ye(e.item.value, (y, m) => (p(), D(R, {
|
|
962
962
|
key: `${e.item.key}-badge-method-${m}`,
|
|
963
963
|
appearance: Object.values(h(xr)).includes(y.toLowerCase()) ? y.toLowerCase() : "custom",
|
|
964
964
|
class: "config-badge",
|
|
965
965
|
"data-testid": `${e.item.key}-badge-method-${m}`
|
|
966
966
|
}, {
|
|
967
967
|
default: b(() => [
|
|
968
|
-
|
|
968
|
+
Z(N(y), 1)
|
|
969
969
|
]),
|
|
970
970
|
_: 2
|
|
971
971
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
972
972
|
], 8, Ca)) : J("", !0),
|
|
973
|
-
c.value.additionalComponent === "JsonCardItem" ? (
|
|
973
|
+
c.value.additionalComponent === "JsonCardItem" ? (p(), j("div", {
|
|
974
974
|
key: 3,
|
|
975
975
|
"data-testid": `${t.item.key}-json-array-content`
|
|
976
976
|
}, [
|
|
977
|
-
(
|
|
977
|
+
(p(!0), j(ve, null, ye(e.item.value, (y, m) => (p(), D(_n, {
|
|
978
978
|
key: `json-array-item-${m}`,
|
|
979
979
|
index: m,
|
|
980
980
|
"is-array-item": "",
|
|
981
981
|
item: y
|
|
982
982
|
}, null, 8, ["index", "item"]))), 128))
|
|
983
|
-
], 8, wa)) : (
|
|
983
|
+
], 8, wa)) : (p(), D(W, {
|
|
984
984
|
key: 4,
|
|
985
|
-
text: h(
|
|
985
|
+
text: h(f) ? e.item.value : ""
|
|
986
986
|
}, {
|
|
987
987
|
default: b(() => [
|
|
988
|
-
|
|
988
|
+
P("span", {
|
|
989
989
|
ref_key: "textContent",
|
|
990
990
|
ref: v,
|
|
991
|
-
class:
|
|
991
|
+
class: Ee(["attrs-data-text", { truncated: e.truncated }])
|
|
992
992
|
}, N(c.value.text), 3)
|
|
993
993
|
]),
|
|
994
994
|
_: 1
|
|
@@ -996,7 +996,7 @@ const se = {
|
|
|
996
996
|
]),
|
|
997
997
|
_: 1
|
|
998
998
|
}, 16))
|
|
999
|
-
])) : (
|
|
999
|
+
])) : (p(), j("div", {
|
|
1000
1000
|
key: 0,
|
|
1001
1001
|
"data-testid": `${e.item.key}-no-value`
|
|
1002
1002
|
}, " – ", 8, ya))
|
|
@@ -1005,7 +1005,7 @@ const se = {
|
|
|
1005
1005
|
]);
|
|
1006
1006
|
};
|
|
1007
1007
|
}
|
|
1008
|
-
}),
|
|
1008
|
+
}), An = /* @__PURE__ */ be(Aa, [["__scopeId", "data-v-d056663c"]]), xa = { class: "json-config" }, Ia = {
|
|
1009
1009
|
key: 0,
|
|
1010
1010
|
class: "json-endpoint"
|
|
1011
1011
|
}, xn = /* @__PURE__ */ X({
|
|
@@ -1049,17 +1049,17 @@ const se = {
|
|
|
1049
1049
|
return (a, i) => {
|
|
1050
1050
|
var o;
|
|
1051
1051
|
const s = U("KBadge"), l = U("KCodeBlock");
|
|
1052
|
-
return
|
|
1053
|
-
n.fetcherUrl && (o = n.config) != null && o.jsonYamlFormsEnabled ? (
|
|
1054
|
-
|
|
1052
|
+
return p(), j("div", xa, [
|
|
1053
|
+
n.fetcherUrl && (o = n.config) != null && o.jsonYamlFormsEnabled ? (p(), j("div", Ia, [
|
|
1054
|
+
$(s, {
|
|
1055
1055
|
appearance: n.requestMethod
|
|
1056
1056
|
}, {
|
|
1057
1057
|
default: b(() => [
|
|
1058
|
-
|
|
1058
|
+
Z(N(n.requestMethod), 1)
|
|
1059
1059
|
]),
|
|
1060
1060
|
_: 1
|
|
1061
1061
|
}, 8, ["appearance"]),
|
|
1062
|
-
|
|
1062
|
+
$(l, {
|
|
1063
1063
|
id: "json-endpoint-codeblock",
|
|
1064
1064
|
code: n.fetcherUrl,
|
|
1065
1065
|
"is-single-line": "",
|
|
@@ -1067,10 +1067,10 @@ const se = {
|
|
|
1067
1067
|
theme: "dark"
|
|
1068
1068
|
}, null, 8, ["code"])
|
|
1069
1069
|
])) : J("", !0),
|
|
1070
|
-
n.jsonRecord ? (
|
|
1070
|
+
n.jsonRecord ? (p(), D(l, {
|
|
1071
1071
|
key: 1,
|
|
1072
1072
|
id: "json-codeblock",
|
|
1073
|
-
class:
|
|
1073
|
+
class: Ee({ "json-content": n.fetcherUrl }),
|
|
1074
1074
|
code: JSON.stringify(t.value, null, 2),
|
|
1075
1075
|
language: "json",
|
|
1076
1076
|
theme: "dark"
|
|
@@ -1083,13 +1083,13 @@ const se = {
|
|
|
1083
1083
|
function In(e) {
|
|
1084
1084
|
return typeof e > "u" || e === null;
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function Sa(e) {
|
|
1087
1087
|
return typeof e == "object" && e !== null;
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function Ta(e) {
|
|
1090
1090
|
return Array.isArray(e) ? e : In(e) ? [] : [e];
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function $a(e, n) {
|
|
1093
1093
|
var t, r, a, i;
|
|
1094
1094
|
if (n)
|
|
1095
1095
|
for (i = Object.keys(n), t = 0, r = i.length; t < r; t += 1)
|
|
@@ -1105,27 +1105,27 @@ function ja(e, n) {
|
|
|
1105
1105
|
function Ma(e) {
|
|
1106
1106
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1107
1107
|
}
|
|
1108
|
-
var Ea = In, Oa =
|
|
1108
|
+
var Ea = In, Oa = Sa, Na = Ta, Fa = ja, Ka = Ma, qa = $a, ie = {
|
|
1109
1109
|
isNothing: Ea,
|
|
1110
1110
|
isObject: Oa,
|
|
1111
1111
|
toArray: Na,
|
|
1112
1112
|
repeat: Fa,
|
|
1113
|
-
isNegativeZero:
|
|
1114
|
-
extend:
|
|
1113
|
+
isNegativeZero: Ka,
|
|
1114
|
+
extend: qa
|
|
1115
1115
|
};
|
|
1116
|
-
function
|
|
1116
|
+
function Sn(e, n) {
|
|
1117
1117
|
var t = "", r = e.reason || "(unknown reason)";
|
|
1118
1118
|
return e.mark ? (e.mark.name && (t += 'in "' + e.mark.name + '" '), t += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !n && e.mark.snippet && (t += `
|
|
1119
1119
|
|
|
1120
1120
|
` + e.mark.snippet), r + " " + t) : r;
|
|
1121
1121
|
}
|
|
1122
1122
|
function Ye(e, n) {
|
|
1123
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message =
|
|
1123
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = Sn(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1124
1124
|
}
|
|
1125
1125
|
Ye.prototype = Object.create(Error.prototype);
|
|
1126
1126
|
Ye.prototype.constructor = Ye;
|
|
1127
1127
|
Ye.prototype.toString = function(e) {
|
|
1128
|
-
return this.name + ": " +
|
|
1128
|
+
return this.name + ": " + Sn(this, e);
|
|
1129
1129
|
};
|
|
1130
1130
|
var fe = Ye;
|
|
1131
1131
|
function vt(e, n, t, r, a) {
|
|
@@ -1185,7 +1185,7 @@ var Ba = La, Pa = [
|
|
|
1185
1185
|
"sequence",
|
|
1186
1186
|
"mapping"
|
|
1187
1187
|
];
|
|
1188
|
-
function
|
|
1188
|
+
function Ra(e) {
|
|
1189
1189
|
var n = {};
|
|
1190
1190
|
return e !== null && Object.keys(e).forEach(function(t) {
|
|
1191
1191
|
e[t].forEach(function(r) {
|
|
@@ -1193,7 +1193,7 @@ function Va(e) {
|
|
|
1193
1193
|
});
|
|
1194
1194
|
}), n;
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function Va(e, n) {
|
|
1197
1197
|
if (n = n || {}, Object.keys(n).forEach(function(t) {
|
|
1198
1198
|
if (Pa.indexOf(t) === -1)
|
|
1199
1199
|
throw new fe('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
@@ -1201,10 +1201,10 @@ function Ra(e, n) {
|
|
|
1201
1201
|
return !0;
|
|
1202
1202
|
}, this.construct = n.construct || function(t) {
|
|
1203
1203
|
return t;
|
|
1204
|
-
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases =
|
|
1204
|
+
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = Ra(n.styleAliases || null), Ua.indexOf(this.kind) === -1)
|
|
1205
1205
|
throw new fe('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1206
1206
|
}
|
|
1207
|
-
var le =
|
|
1207
|
+
var le = Va;
|
|
1208
1208
|
function Zt(e, n) {
|
|
1209
1209
|
var t = [];
|
|
1210
1210
|
return e[n].forEach(function(r) {
|
|
@@ -1261,7 +1261,7 @@ wt.prototype.extend = function(e) {
|
|
|
1261
1261
|
var r = Object.create(wt.prototype);
|
|
1262
1262
|
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = Zt(r, "implicit"), r.compiledExplicit = Zt(r, "explicit"), r.compiledTypeMap = Da(r.compiledImplicit, r.compiledExplicit), r;
|
|
1263
1263
|
};
|
|
1264
|
-
var
|
|
1264
|
+
var Tn = wt, $n = new le("tag:yaml.org,2002:str", {
|
|
1265
1265
|
kind: "scalar",
|
|
1266
1266
|
construct: function(e) {
|
|
1267
1267
|
return e !== null ? e : "";
|
|
@@ -1276,9 +1276,9 @@ var $n = wt, Tn = new le("tag:yaml.org,2002:str", {
|
|
|
1276
1276
|
construct: function(e) {
|
|
1277
1277
|
return e !== null ? e : {};
|
|
1278
1278
|
}
|
|
1279
|
-
}), En = new
|
|
1279
|
+
}), En = new Tn({
|
|
1280
1280
|
explicit: [
|
|
1281
|
-
|
|
1281
|
+
$n,
|
|
1282
1282
|
jn,
|
|
1283
1283
|
Mn
|
|
1284
1284
|
]
|
|
@@ -1499,21 +1499,21 @@ function so(e, n) {
|
|
|
1499
1499
|
function lo(e) {
|
|
1500
1500
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ie.isNegativeZero(e));
|
|
1501
1501
|
}
|
|
1502
|
-
var
|
|
1502
|
+
var Kn = new le("tag:yaml.org,2002:float", {
|
|
1503
1503
|
kind: "scalar",
|
|
1504
1504
|
resolve: ao,
|
|
1505
1505
|
construct: oo,
|
|
1506
1506
|
predicate: lo,
|
|
1507
1507
|
represent: so,
|
|
1508
1508
|
defaultStyle: "lowercase"
|
|
1509
|
-
}),
|
|
1509
|
+
}), qn = En.extend({
|
|
1510
1510
|
implicit: [
|
|
1511
1511
|
On,
|
|
1512
1512
|
Nn,
|
|
1513
1513
|
Fn,
|
|
1514
|
-
|
|
1514
|
+
Kn
|
|
1515
1515
|
]
|
|
1516
|
-
}), Ln =
|
|
1516
|
+
}), Ln = qn, Bn = new RegExp(
|
|
1517
1517
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1518
1518
|
), Pn = new RegExp(
|
|
1519
1519
|
"^([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]))?))?$"
|
|
@@ -1547,7 +1547,7 @@ var Un = new le("tag:yaml.org,2002:timestamp", {
|
|
|
1547
1547
|
function fo(e) {
|
|
1548
1548
|
return e === "<<" || e === null;
|
|
1549
1549
|
}
|
|
1550
|
-
var
|
|
1550
|
+
var Rn = new le("tag:yaml.org,2002:merge", {
|
|
1551
1551
|
kind: "scalar",
|
|
1552
1552
|
resolve: fo
|
|
1553
1553
|
}), Mt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
@@ -1579,7 +1579,7 @@ function ho(e) {
|
|
|
1579
1579
|
function yo(e) {
|
|
1580
1580
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1581
1581
|
}
|
|
1582
|
-
var
|
|
1582
|
+
var Vn = new le("tag:yaml.org,2002:binary", {
|
|
1583
1583
|
kind: "scalar",
|
|
1584
1584
|
resolve: mo,
|
|
1585
1585
|
construct: go,
|
|
@@ -1627,7 +1627,7 @@ function _o(e) {
|
|
|
1627
1627
|
}
|
|
1628
1628
|
return !0;
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1630
|
+
function Ao(e) {
|
|
1631
1631
|
if (e === null)
|
|
1632
1632
|
return [];
|
|
1633
1633
|
var n, t, r, a, i, o = e;
|
|
@@ -1638,7 +1638,7 @@ function So(e) {
|
|
|
1638
1638
|
var zn = new le("tag:yaml.org,2002:pairs", {
|
|
1639
1639
|
kind: "sequence",
|
|
1640
1640
|
resolve: _o,
|
|
1641
|
-
construct:
|
|
1641
|
+
construct: Ao
|
|
1642
1642
|
}), xo = Object.prototype.hasOwnProperty;
|
|
1643
1643
|
function Io(e) {
|
|
1644
1644
|
if (e === null)
|
|
@@ -1649,25 +1649,25 @@ function Io(e) {
|
|
|
1649
1649
|
return !1;
|
|
1650
1650
|
return !0;
|
|
1651
1651
|
}
|
|
1652
|
-
function
|
|
1652
|
+
function So(e) {
|
|
1653
1653
|
return e !== null ? e : {};
|
|
1654
1654
|
}
|
|
1655
1655
|
var Gn = new le("tag:yaml.org,2002:set", {
|
|
1656
1656
|
kind: "mapping",
|
|
1657
1657
|
resolve: Io,
|
|
1658
|
-
construct:
|
|
1658
|
+
construct: So
|
|
1659
1659
|
}), Et = Ln.extend({
|
|
1660
1660
|
implicit: [
|
|
1661
1661
|
Un,
|
|
1662
|
-
|
|
1662
|
+
Rn
|
|
1663
1663
|
],
|
|
1664
1664
|
explicit: [
|
|
1665
|
-
|
|
1665
|
+
Vn,
|
|
1666
1666
|
Dn,
|
|
1667
1667
|
zn,
|
|
1668
1668
|
Gn
|
|
1669
1669
|
]
|
|
1670
|
-
}),
|
|
1670
|
+
}), Oe = Object.prototype.hasOwnProperty, at = 1, Hn = 2, Jn = 3, ot = 4, kt = 1, To = 2, Qt = 3, $o = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, jo = /[\x85\u2028\u2029]/, Mo = /[,\[\]\{\}]/, Yn = /^(?:!|!!|![a-z\-]+!)$/i, Wn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1671
1671
|
function Xt(e) {
|
|
1672
1672
|
return Object.prototype.toString.call(e);
|
|
1673
1673
|
}
|
|
@@ -1680,7 +1680,7 @@ function qe(e) {
|
|
|
1680
1680
|
function ge(e) {
|
|
1681
1681
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1682
1682
|
}
|
|
1683
|
-
function
|
|
1683
|
+
function Ve(e) {
|
|
1684
1684
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1685
1685
|
}
|
|
1686
1686
|
function Eo(e) {
|
|
@@ -1706,7 +1706,7 @@ function Fo(e) {
|
|
|
1706
1706
|
var Zn = new Array(256), Qn = new Array(256);
|
|
1707
1707
|
for (var Ue = 0; Ue < 256; Ue++)
|
|
1708
1708
|
Zn[Ue] = en(Ue) ? 1 : 0, Qn[Ue] = en(Ue);
|
|
1709
|
-
function
|
|
1709
|
+
function Ko(e, n) {
|
|
1710
1710
|
this.input = e, this.filename = n.filename || null, this.schema = n.schema || Et, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.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 = [];
|
|
1711
1711
|
}
|
|
1712
1712
|
function Xn(e, n) {
|
|
@@ -1733,7 +1733,7 @@ var tn = {
|
|
|
1733
1733
|
},
|
|
1734
1734
|
TAG: function(e, n, t) {
|
|
1735
1735
|
var r, a;
|
|
1736
|
-
t.length !== 2 && M(e, "TAG directive accepts exactly two arguments"), r = t[0], a = t[1], Yn.test(r) || M(e, "ill-formed tag handle (first argument) of the TAG directive"),
|
|
1736
|
+
t.length !== 2 && M(e, "TAG directive accepts exactly two arguments"), r = t[0], a = t[1], Yn.test(r) || M(e, "ill-formed tag handle (first argument) of the TAG directive"), Oe.call(e.tagMap, r) && M(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Wn.test(a) || M(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1737
1737
|
try {
|
|
1738
1738
|
a = decodeURIComponent(a);
|
|
1739
1739
|
} catch {
|
|
@@ -1742,21 +1742,21 @@ var tn = {
|
|
|
1742
1742
|
e.tagMap[r] = a;
|
|
1743
1743
|
}
|
|
1744
1744
|
};
|
|
1745
|
-
function
|
|
1745
|
+
function Me(e, n, t, r) {
|
|
1746
1746
|
var a, i, o, s;
|
|
1747
1747
|
if (n < t) {
|
|
1748
1748
|
if (s = e.input.slice(n, t), r)
|
|
1749
1749
|
for (a = 0, i = s.length; a < i; a += 1)
|
|
1750
1750
|
o = s.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 || M(e, "expected valid JSON character");
|
|
1751
1751
|
else
|
|
1752
|
-
|
|
1752
|
+
$o.test(s) && M(e, "the stream contains non-printable characters");
|
|
1753
1753
|
e.result += s;
|
|
1754
1754
|
}
|
|
1755
1755
|
}
|
|
1756
1756
|
function nn(e, n, t, r) {
|
|
1757
1757
|
var a, i, o, s;
|
|
1758
1758
|
for (ie.isObject(t) || M(e, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(t), o = 0, s = a.length; o < s; o += 1)
|
|
1759
|
-
i = a[o],
|
|
1759
|
+
i = a[o], Oe.call(n, i) || (n[i] = t[i], r[i] = !0);
|
|
1760
1760
|
}
|
|
1761
1761
|
function De(e, n, t, r, a, i, o, s, l) {
|
|
1762
1762
|
var u, d;
|
|
@@ -1770,7 +1770,7 @@ function De(e, n, t, r, a, i, o, s, l) {
|
|
|
1770
1770
|
else
|
|
1771
1771
|
nn(e, n, i, t);
|
|
1772
1772
|
else
|
|
1773
|
-
!e.json && !
|
|
1773
|
+
!e.json && !Oe.call(t, a) && Oe.call(n, a) && (e.line = o || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, M(e, "duplicated mapping key")), a === "__proto__" ? Object.defineProperty(n, a, {
|
|
1774
1774
|
configurable: !0,
|
|
1775
1775
|
enumerable: !0,
|
|
1776
1776
|
writable: !0,
|
|
@@ -1806,32 +1806,32 @@ function Nt(e, n) {
|
|
|
1806
1806
|
n === 1 ? e.result += " " : n > 1 && (e.result += ie.repeat(`
|
|
1807
1807
|
`, n - 1));
|
|
1808
1808
|
}
|
|
1809
|
-
function
|
|
1810
|
-
var r, a, i, o, s, l, u, d, c = e.kind, v = e.result,
|
|
1811
|
-
if (
|
|
1809
|
+
function qo(e, n, t) {
|
|
1810
|
+
var r, a, i, o, s, l, u, d, c = e.kind, v = e.result, f;
|
|
1811
|
+
if (f = e.input.charCodeAt(e.position), ge(f) || Ve(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (a = e.input.charCodeAt(e.position + 1), ge(a) || t && Ve(a)))
|
|
1812
1812
|
return !1;
|
|
1813
|
-
for (e.kind = "scalar", e.result = "", i = o = e.position, s = !1;
|
|
1814
|
-
if (
|
|
1815
|
-
if (a = e.input.charCodeAt(e.position + 1), ge(a) || t &&
|
|
1813
|
+
for (e.kind = "scalar", e.result = "", i = o = e.position, s = !1; f !== 0; ) {
|
|
1814
|
+
if (f === 58) {
|
|
1815
|
+
if (a = e.input.charCodeAt(e.position + 1), ge(a) || t && Ve(a))
|
|
1816
1816
|
break;
|
|
1817
|
-
} else if (
|
|
1817
|
+
} else if (f === 35) {
|
|
1818
1818
|
if (r = e.input.charCodeAt(e.position - 1), ge(r))
|
|
1819
1819
|
break;
|
|
1820
1820
|
} else {
|
|
1821
|
-
if (e.position === e.lineStart && mt(e) || t &&
|
|
1821
|
+
if (e.position === e.lineStart && mt(e) || t && Ve(f))
|
|
1822
1822
|
break;
|
|
1823
|
-
if (we(
|
|
1823
|
+
if (we(f))
|
|
1824
1824
|
if (l = e.line, u = e.lineStart, d = e.lineIndent, oe(e, !1, -1), e.lineIndent >= n) {
|
|
1825
|
-
s = !0,
|
|
1825
|
+
s = !0, f = e.input.charCodeAt(e.position);
|
|
1826
1826
|
continue;
|
|
1827
1827
|
} else {
|
|
1828
1828
|
e.position = o, e.line = l, e.lineStart = u, e.lineIndent = d;
|
|
1829
1829
|
break;
|
|
1830
1830
|
}
|
|
1831
1831
|
}
|
|
1832
|
-
s && (
|
|
1832
|
+
s && (Me(e, i, o, !1), Nt(e, e.line - l), i = o = e.position, s = !1), qe(f) || (o = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1833
1833
|
}
|
|
1834
|
-
return
|
|
1834
|
+
return Me(e, i, o, !1), e.result ? !0 : (e.kind = c, e.result = v, !1);
|
|
1835
1835
|
}
|
|
1836
1836
|
function Lo(e, n) {
|
|
1837
1837
|
var t, r, a;
|
|
@@ -1839,12 +1839,12 @@ function Lo(e, n) {
|
|
|
1839
1839
|
return !1;
|
|
1840
1840
|
for (e.kind = "scalar", e.result = "", e.position++, r = a = e.position; (t = e.input.charCodeAt(e.position)) !== 0; )
|
|
1841
1841
|
if (t === 39)
|
|
1842
|
-
if (
|
|
1842
|
+
if (Me(e, r, e.position, !0), t = e.input.charCodeAt(++e.position), t === 39)
|
|
1843
1843
|
r = e.position, e.position++, a = e.position;
|
|
1844
1844
|
else
|
|
1845
1845
|
return !0;
|
|
1846
1846
|
else
|
|
1847
|
-
we(t) ? (
|
|
1847
|
+
we(t) ? (Me(e, r, a, !0), Nt(e, oe(e, !1, n)), r = a = e.position) : e.position === e.lineStart && mt(e) ? M(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
|
|
1848
1848
|
M(e, "unexpected end of the stream within a single quoted scalar");
|
|
1849
1849
|
}
|
|
1850
1850
|
function Bo(e, n) {
|
|
@@ -1853,9 +1853,9 @@ function Bo(e, n) {
|
|
|
1853
1853
|
return !1;
|
|
1854
1854
|
for (e.kind = "scalar", e.result = "", e.position++, t = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1855
1855
|
if (s === 34)
|
|
1856
|
-
return
|
|
1856
|
+
return Me(e, t, e.position, !0), e.position++, !0;
|
|
1857
1857
|
if (s === 92) {
|
|
1858
|
-
if (
|
|
1858
|
+
if (Me(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), we(s))
|
|
1859
1859
|
oe(e, !1, n);
|
|
1860
1860
|
else if (s < 256 && Zn[s])
|
|
1861
1861
|
e.result += Qn[s], e.position++;
|
|
@@ -1867,22 +1867,22 @@ function Bo(e, n) {
|
|
|
1867
1867
|
M(e, "unknown escape sequence");
|
|
1868
1868
|
t = r = e.position;
|
|
1869
1869
|
} else
|
|
1870
|
-
we(s) ? (
|
|
1870
|
+
we(s) ? (Me(e, t, r, !0), Nt(e, oe(e, !1, n)), t = r = e.position) : e.position === e.lineStart && mt(e) ? M(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1871
1871
|
}
|
|
1872
1872
|
M(e, "unexpected end of the stream within a double quoted scalar");
|
|
1873
1873
|
}
|
|
1874
1874
|
function Po(e, n) {
|
|
1875
|
-
var t = !0, r, a, i, o = e.tag, s, l = e.anchor, u, d, c, v,
|
|
1876
|
-
if (
|
|
1877
|
-
d = 93,
|
|
1878
|
-
else if (
|
|
1879
|
-
d = 125,
|
|
1875
|
+
var t = !0, r, a, i, o = e.tag, s, l = e.anchor, u, d, c, v, f, I = /* @__PURE__ */ Object.create(null), w, _, R, q;
|
|
1876
|
+
if (q = e.input.charCodeAt(e.position), q === 91)
|
|
1877
|
+
d = 93, f = !1, s = [];
|
|
1878
|
+
else if (q === 123)
|
|
1879
|
+
d = 125, f = !0, s = {};
|
|
1880
1880
|
else
|
|
1881
1881
|
return !1;
|
|
1882
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = s),
|
|
1883
|
-
if (oe(e, !0, n),
|
|
1884
|
-
return e.position++, e.tag = o, e.anchor = l, e.kind =
|
|
1885
|
-
t ?
|
|
1882
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), q = e.input.charCodeAt(++e.position); q !== 0; ) {
|
|
1883
|
+
if (oe(e, !0, n), q = e.input.charCodeAt(e.position), q === d)
|
|
1884
|
+
return e.position++, e.tag = o, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
1885
|
+
t ? q === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), _ = w = R = null, c = v = !1, q === 63 && (u = e.input.charCodeAt(e.position + 1), ge(u) && (c = v = !0, e.position++, oe(e, !0, n))), r = e.line, a = e.lineStart, i = e.position, ze(e, n, at, !1, !0), _ = e.tag, w = e.result, oe(e, !0, n), q = e.input.charCodeAt(e.position), (v || e.line === r) && q === 58 && (c = !0, q = e.input.charCodeAt(++e.position), oe(e, !0, n), ze(e, n, at, !1, !0), R = e.result), f ? De(e, s, I, _, w, R, r, a, i) : c ? s.push(De(e, null, I, _, w, R, r, a, i)) : s.push(w), oe(e, !0, n), q = e.input.charCodeAt(e.position), q === 44 ? (t = !0, q = e.input.charCodeAt(++e.position)) : t = !1;
|
|
1886
1886
|
}
|
|
1887
1887
|
M(e, "unexpected end of the stream within a flow collection");
|
|
1888
1888
|
}
|
|
@@ -1896,7 +1896,7 @@ function Uo(e, n) {
|
|
|
1896
1896
|
return !1;
|
|
1897
1897
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
1898
1898
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
1899
|
-
kt === a ? a = c === 43 ? Qt :
|
|
1899
|
+
kt === a ? a = c === 43 ? Qt : To : M(e, "repeat of a chomping mode identifier");
|
|
1900
1900
|
else if ((d = No(c)) >= 0)
|
|
1901
1901
|
d === 0 ? M(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? M(e, "repeat of an indentation width identifier") : (s = n + d - 1, o = !0);
|
|
1902
1902
|
else
|
|
@@ -1929,7 +1929,7 @@ function Uo(e, n) {
|
|
|
1929
1929
|
`, l) : e.result += ie.repeat(`
|
|
1930
1930
|
`, i ? 1 + l : l), i = !0, o = !0, l = 0, t = e.position; !we(c) && c !== 0; )
|
|
1931
1931
|
c = e.input.charCodeAt(++e.position);
|
|
1932
|
-
|
|
1932
|
+
Me(e, t, e.position, !1);
|
|
1933
1933
|
}
|
|
1934
1934
|
return !0;
|
|
1935
1935
|
}
|
|
@@ -1949,38 +1949,38 @@ function rn(e, n) {
|
|
|
1949
1949
|
}
|
|
1950
1950
|
return s ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = i, !0) : !1;
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1953
|
-
var r, a, i, o, s, l, u = e.tag, d = e.anchor, c = {}, v = /* @__PURE__ */ Object.create(null),
|
|
1952
|
+
function Ro(e, n, t) {
|
|
1953
|
+
var r, a, i, o, s, l, u = e.tag, d = e.anchor, c = {}, v = /* @__PURE__ */ Object.create(null), f = null, I = null, w = null, _ = !1, R = !1, q;
|
|
1954
1954
|
if (e.firstTabInLine !== -1)
|
|
1955
1955
|
return !1;
|
|
1956
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = c),
|
|
1957
|
-
if (!_ && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), i = e.line, (
|
|
1958
|
-
|
|
1956
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), q = e.input.charCodeAt(e.position); q !== 0; ) {
|
|
1957
|
+
if (!_ && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), i = e.line, (q === 63 || q === 58) && ge(r))
|
|
1958
|
+
q === 63 ? (_ && (De(e, c, v, f, I, null, o, s, l), f = I = w = null), R = !0, _ = !0, a = !0) : _ ? (_ = !1, a = !0) : M(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, q = r;
|
|
1959
1959
|
else {
|
|
1960
1960
|
if (o = e.line, s = e.lineStart, l = e.position, !ze(e, t, Hn, !1, !0))
|
|
1961
1961
|
break;
|
|
1962
1962
|
if (e.line === i) {
|
|
1963
|
-
for (
|
|
1964
|
-
|
|
1965
|
-
if (
|
|
1966
|
-
|
|
1967
|
-
else if (
|
|
1963
|
+
for (q = e.input.charCodeAt(e.position); qe(q); )
|
|
1964
|
+
q = e.input.charCodeAt(++e.position);
|
|
1965
|
+
if (q === 58)
|
|
1966
|
+
q = e.input.charCodeAt(++e.position), ge(q) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), _ && (De(e, c, v, f, I, null, o, s, l), f = I = w = null), R = !0, _ = !1, a = !1, f = e.tag, I = e.result;
|
|
1967
|
+
else if (R)
|
|
1968
1968
|
M(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1969
1969
|
else
|
|
1970
1970
|
return e.tag = u, e.anchor = d, !0;
|
|
1971
|
-
} else if (
|
|
1971
|
+
} else if (R)
|
|
1972
1972
|
M(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1973
1973
|
else
|
|
1974
1974
|
return e.tag = u, e.anchor = d, !0;
|
|
1975
1975
|
}
|
|
1976
|
-
if ((e.line === i || e.lineIndent > n) && (_ && (o = e.line, s = e.lineStart, l = e.position), ze(e, n, ot, !0, a) && (_ ? I = e.result : w = e.result), _ || (De(e, c, v,
|
|
1976
|
+
if ((e.line === i || e.lineIndent > n) && (_ && (o = e.line, s = e.lineStart, l = e.position), ze(e, n, ot, !0, a) && (_ ? I = e.result : w = e.result), _ || (De(e, c, v, f, I, w, o, s, l), f = I = w = null), oe(e, !0, -1), q = e.input.charCodeAt(e.position)), (e.line === i || e.lineIndent > n) && q !== 0)
|
|
1977
1977
|
M(e, "bad indentation of a mapping entry");
|
|
1978
1978
|
else if (e.lineIndent < n)
|
|
1979
1979
|
break;
|
|
1980
1980
|
}
|
|
1981
|
-
return _ && De(e, c, v,
|
|
1981
|
+
return _ && De(e, c, v, f, I, null, o, s, l), R && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), R;
|
|
1982
1982
|
}
|
|
1983
|
-
function
|
|
1983
|
+
function Vo(e) {
|
|
1984
1984
|
var n, t = !1, r = !1, a, i, o;
|
|
1985
1985
|
if (o = e.input.charCodeAt(e.position), o !== 33)
|
|
1986
1986
|
return !1;
|
|
@@ -2000,13 +2000,13 @@ function Ro(e) {
|
|
|
2000
2000
|
} catch {
|
|
2001
2001
|
M(e, "tag name is malformed: " + i);
|
|
2002
2002
|
}
|
|
2003
|
-
return t ? e.tag = i :
|
|
2003
|
+
return t ? e.tag = i : Oe.call(e.tagMap, a) ? e.tag = e.tagMap[a] + i : a === "!" ? e.tag = "!" + i : a === "!!" ? e.tag = "tag:yaml.org,2002:" + i : M(e, 'undeclared tag handle "' + a + '"'), !0;
|
|
2004
2004
|
}
|
|
2005
2005
|
function Do(e) {
|
|
2006
2006
|
var n, t;
|
|
2007
2007
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2008
2008
|
return !1;
|
|
2009
|
-
for (e.anchor !== null && M(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !ge(t) && !
|
|
2009
|
+
for (e.anchor !== null && M(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !ge(t) && !Ve(t); )
|
|
2010
2010
|
t = e.input.charCodeAt(++e.position);
|
|
2011
2011
|
return e.position === n && M(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2012
2012
|
}
|
|
@@ -2014,16 +2014,16 @@ function zo(e) {
|
|
|
2014
2014
|
var n, t, r;
|
|
2015
2015
|
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
2016
2016
|
return !1;
|
|
2017
|
-
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !ge(r) && !
|
|
2017
|
+
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !ge(r) && !Ve(r); )
|
|
2018
2018
|
r = e.input.charCodeAt(++e.position);
|
|
2019
|
-
return e.position === n && M(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position),
|
|
2019
|
+
return e.position === n && M(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), Oe.call(e.anchorMap, t) || M(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], oe(e, !0, -1), !0;
|
|
2020
2020
|
}
|
|
2021
2021
|
function ze(e, n, t, r, a) {
|
|
2022
|
-
var i, o, s, l = 1, u = !1, d = !1, c, v,
|
|
2022
|
+
var i, o, s, l = 1, u = !1, d = !1, c, v, f, I, w, _;
|
|
2023
2023
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = o = s = ot === t || Jn === t, r && oe(e, !0, -1) && (u = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2024
|
-
for (;
|
|
2024
|
+
for (; Vo(e) || Do(e); )
|
|
2025
2025
|
oe(e, !0, -1) ? (u = !0, s = i, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2026
|
-
if (s && (s = u || a), (l === 1 || ot === t) && (at === t || Hn === t ? w = n : w = n + 1, _ = e.position - e.lineStart, l === 1 ? s && (rn(e, _) ||
|
|
2026
|
+
if (s && (s = u || a), (l === 1 || ot === t) && (at === t || Hn === t ? w = n : w = n + 1, _ = e.position - e.lineStart, l === 1 ? s && (rn(e, _) || Ro(e, _, w)) || Po(e, w) ? d = !0 : (o && Uo(e, w) || Lo(e, w) || Bo(e, w) ? d = !0 : zo(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && M(e, "alias node should not have any properties")) : qo(e, w, at === t) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && rn(e, _))), e.tag === null)
|
|
2027
2027
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2028
2028
|
else if (e.tag === "?") {
|
|
2029
2029
|
for (e.result !== null && e.kind !== "scalar" && M(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, v = e.implicitTypes.length; c < v; c += 1)
|
|
@@ -2032,12 +2032,12 @@ function ze(e, n, t, r, a) {
|
|
|
2032
2032
|
break;
|
|
2033
2033
|
}
|
|
2034
2034
|
} else if (e.tag !== "!") {
|
|
2035
|
-
if (
|
|
2035
|
+
if (Oe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2036
2036
|
I = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2037
2037
|
else
|
|
2038
|
-
for (I = null,
|
|
2039
|
-
if (e.tag.slice(0,
|
|
2040
|
-
I =
|
|
2038
|
+
for (I = null, f = e.typeMap.multi[e.kind || "fallback"], c = 0, v = f.length; c < v; c += 1)
|
|
2039
|
+
if (e.tag.slice(0, f[c].tag.length) === f[c].tag) {
|
|
2040
|
+
I = f[c];
|
|
2041
2041
|
break;
|
|
2042
2042
|
}
|
|
2043
2043
|
I || M(e, "unknown tag !<" + e.tag + ">"), e.result !== null && I.kind !== e.kind && M(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + I.kind + '", not "' + e.kind + '"'), I.resolve(e.result, e.tag) ? (e.result = I.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : M(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
@@ -2064,7 +2064,7 @@ function Go(e) {
|
|
|
2064
2064
|
o = e.input.charCodeAt(++e.position);
|
|
2065
2065
|
a.push(e.input.slice(t, e.position));
|
|
2066
2066
|
}
|
|
2067
|
-
o !== 0 && Ot(e),
|
|
2067
|
+
o !== 0 && Ot(e), Oe.call(tn, r) ? tn[r](e, r, a) : it(e, 'unknown document directive "' + r + '"');
|
|
2068
2068
|
}
|
|
2069
2069
|
if (oe(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, oe(e, !0, -1)) : i && M(e, "directives end mark is expected"), ze(e, e.lineIndent - 1, ot, !1, !0), oe(e, !0, -1), e.checkLineBreaks && jo.test(e.input.slice(n, e.position)) && it(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && mt(e)) {
|
|
2070
2070
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, oe(e, !0, -1));
|
|
@@ -2078,7 +2078,7 @@ function Go(e) {
|
|
|
2078
2078
|
function er(e, n) {
|
|
2079
2079
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2080
2080
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2081
|
-
var t = new
|
|
2081
|
+
var t = new Ko(e, n), r = e.indexOf("\0");
|
|
2082
2082
|
for (r !== -1 && (t.position = r, M(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2083
2083
|
t.lineIndent += 1, t.position += 1;
|
|
2084
2084
|
for (; t.position < t.length - 1; )
|
|
@@ -2169,7 +2169,7 @@ function an(e, n) {
|
|
|
2169
2169
|
` && (i += t), i += o;
|
|
2170
2170
|
return i;
|
|
2171
2171
|
}
|
|
2172
|
-
function
|
|
2172
|
+
function At(e, n) {
|
|
2173
2173
|
return `
|
|
2174
2174
|
` + ie.repeat(" ", e.indent * n);
|
|
2175
2175
|
}
|
|
@@ -2213,27 +2213,27 @@ function ur(e) {
|
|
|
2213
2213
|
var n = /^\n* /;
|
|
2214
2214
|
return n.test(e);
|
|
2215
2215
|
}
|
|
2216
|
-
var cr = 1, xt = 2, dr = 3, pr = 4,
|
|
2216
|
+
var cr = 1, xt = 2, dr = 3, pr = 4, Re = 5;
|
|
2217
2217
|
function wi(e, n, t, r, a, i, o, s) {
|
|
2218
|
-
var l, u = 0, d = null, c = !1, v = !1,
|
|
2218
|
+
var l, u = 0, d = null, c = !1, v = !1, f = r !== -1, I = -1, w = ki(Je(e, 0)) && Ci(Je(e, e.length - 1));
|
|
2219
2219
|
if (n || o)
|
|
2220
2220
|
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2221
2221
|
if (u = Je(e, l), !Qe(u))
|
|
2222
|
-
return
|
|
2222
|
+
return Re;
|
|
2223
2223
|
w = w && sn(u, d, s), d = u;
|
|
2224
2224
|
}
|
|
2225
2225
|
else {
|
|
2226
2226
|
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2227
2227
|
if (u = Je(e, l), u === We)
|
|
2228
|
-
c = !0,
|
|
2228
|
+
c = !0, f && (v = v || // Foldable line = too long, and not more-indented.
|
|
2229
2229
|
l - I - 1 > r && e[I + 1] !== " ", I = l);
|
|
2230
2230
|
else if (!Qe(u))
|
|
2231
|
-
return
|
|
2231
|
+
return Re;
|
|
2232
2232
|
w = w && sn(u, d, s), d = u;
|
|
2233
2233
|
}
|
|
2234
|
-
v = v ||
|
|
2234
|
+
v = v || f && l - I - 1 > r && e[I + 1] !== " ";
|
|
2235
2235
|
}
|
|
2236
|
-
return !c && !v ? w && !o && !a(e) ? cr : i === Ze ?
|
|
2236
|
+
return !c && !v ? w && !o && !a(e) ? cr : i === Ze ? Re : xt : t > 9 && ur(e) ? Re : o ? i === Ze ? Re : xt : v ? pr : dr;
|
|
2237
2237
|
}
|
|
2238
2238
|
function _i(e, n, t, r, a) {
|
|
2239
2239
|
e.dump = function() {
|
|
@@ -2262,8 +2262,8 @@ function _i(e, n, t, r, a) {
|
|
|
2262
2262
|
case dr:
|
|
2263
2263
|
return "|" + ln(n, e.indent) + un(an(n, i));
|
|
2264
2264
|
case pr:
|
|
2265
|
-
return ">" + ln(n, e.indent) + un(an(
|
|
2266
|
-
case
|
|
2265
|
+
return ">" + ln(n, e.indent) + un(an(Ai(n, o), i));
|
|
2266
|
+
case Re:
|
|
2267
2267
|
return '"' + xi(n) + '"';
|
|
2268
2268
|
default:
|
|
2269
2269
|
throw new fe("impossible error: invalid scalar style");
|
|
@@ -2282,7 +2282,7 @@ function un(e) {
|
|
|
2282
2282
|
return e[e.length - 1] === `
|
|
2283
2283
|
` ? e.slice(0, -1) : e;
|
|
2284
2284
|
}
|
|
2285
|
-
function
|
|
2285
|
+
function Ai(e, n) {
|
|
2286
2286
|
for (var t = /(\n+)([^\n]*)/g, r = function() {
|
|
2287
2287
|
var u = e.indexOf(`
|
|
2288
2288
|
`);
|
|
@@ -2319,16 +2319,16 @@ function Ii(e, n, t) {
|
|
|
2319
2319
|
function dn(e, n, t, r) {
|
|
2320
2320
|
var a = "", i = e.tag, o, s, l;
|
|
2321
2321
|
for (o = 0, s = t.length; o < s; o += 1)
|
|
2322
|
-
l = t[o], e.replacer && (l = e.replacer.call(t, String(o), l)), (Ie(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && Ie(e, n + 1, null, !0, !0, !1, !0)) && ((!r || a !== "") && (a +=
|
|
2322
|
+
l = t[o], e.replacer && (l = e.replacer.call(t, String(o), l)), (Ie(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && Ie(e, n + 1, null, !0, !0, !1, !0)) && ((!r || a !== "") && (a += At(e, n)), e.dump && We === e.dump.charCodeAt(0) ? a += "-" : a += "- ", a += e.dump);
|
|
2323
2323
|
e.tag = i, e.dump = a || "[]";
|
|
2324
2324
|
}
|
|
2325
|
-
function
|
|
2325
|
+
function Si(e, n, t) {
|
|
2326
2326
|
var r = "", a = e.tag, i = Object.keys(t), o, s, l, u, d;
|
|
2327
2327
|
for (o = 0, s = i.length; o < s; o += 1)
|
|
2328
2328
|
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = i[o], u = t[l], e.replacer && (u = e.replacer.call(t, l, u)), Ie(e, n, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), Ie(e, n, u, !1, !1) && (d += e.dump, r += d));
|
|
2329
2329
|
e.tag = a, e.dump = "{" + r + "}";
|
|
2330
2330
|
}
|
|
2331
|
-
function
|
|
2331
|
+
function Ti(e, n, t, r) {
|
|
2332
2332
|
var a = "", i = e.tag, o = Object.keys(t), s, l, u, d, c, v;
|
|
2333
2333
|
if (e.sortKeys === !0)
|
|
2334
2334
|
o.sort();
|
|
@@ -2337,7 +2337,7 @@ function $i(e, n, t, r) {
|
|
|
2337
2337
|
else if (e.sortKeys)
|
|
2338
2338
|
throw new fe("sortKeys must be a boolean or a function");
|
|
2339
2339
|
for (s = 0, l = o.length; s < l; s += 1)
|
|
2340
|
-
v = "", (!r || a !== "") && (v +=
|
|
2340
|
+
v = "", (!r || a !== "") && (v += At(e, n)), u = o[s], d = t[u], e.replacer && (d = e.replacer.call(t, u, d)), Ie(e, n + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && We === e.dump.charCodeAt(0) ? v += "?" : v += "? "), v += e.dump, c && (v += At(e, n)), Ie(e, n + 1, d, !0, c) && (e.dump && We === e.dump.charCodeAt(0) ? v += ":" : v += ": ", v += e.dump, a += v));
|
|
2341
2341
|
e.tag = i, e.dump = a || "{}";
|
|
2342
2342
|
}
|
|
2343
2343
|
function pn(e, n, t) {
|
|
@@ -2366,7 +2366,7 @@ function Ie(e, n, t, r, a, i, o) {
|
|
|
2366
2366
|
e.dump = "*ref_" + c;
|
|
2367
2367
|
else {
|
|
2368
2368
|
if (d && v && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), s === "[object Object]")
|
|
2369
|
-
r && Object.keys(e.dump).length !== 0 ? (
|
|
2369
|
+
r && Object.keys(e.dump).length !== 0 ? (Ti(e, n, e.dump, a), v && (e.dump = "&ref_" + c + e.dump)) : (Si(e, n, e.dump), v && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2370
2370
|
else if (s === "[object Array]")
|
|
2371
2371
|
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && n > 0 ? dn(e, n - 1, e.dump, a) : dn(e, n, e.dump, a), v && (e.dump = "&ref_" + c + e.dump)) : (Ii(e, n, e.dump), v && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2372
2372
|
else if (s === "[object String]")
|
|
@@ -2382,7 +2382,7 @@ function Ie(e, n, t, r, a, i, o) {
|
|
|
2382
2382
|
}
|
|
2383
2383
|
return !0;
|
|
2384
2384
|
}
|
|
2385
|
-
function
|
|
2385
|
+
function $i(e, n) {
|
|
2386
2386
|
var t = [], r = [], a, i;
|
|
2387
2387
|
for (It(e, t, r), a = 0, i = r.length; a < i; a += 1)
|
|
2388
2388
|
n.duplicates.push(t[r[a]]);
|
|
@@ -2403,7 +2403,7 @@ function It(e, n, t) {
|
|
|
2403
2403
|
function ji(e, n) {
|
|
2404
2404
|
n = n || {};
|
|
2405
2405
|
var t = new vi(n);
|
|
2406
|
-
t.noRefs ||
|
|
2406
|
+
t.noRefs || $i(e, t);
|
|
2407
2407
|
var r = e;
|
|
2408
2408
|
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), Ie(t, 0, r, !0, !0) ? t.dump + `
|
|
2409
2409
|
` : "";
|
|
@@ -2411,14 +2411,14 @@ function ji(e, n) {
|
|
|
2411
2411
|
var Mi = ji, Ei = {
|
|
2412
2412
|
dump: Mi
|
|
2413
2413
|
};
|
|
2414
|
-
function
|
|
2414
|
+
function Kt(e, n) {
|
|
2415
2415
|
return function() {
|
|
2416
2416
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2417
2417
|
};
|
|
2418
2418
|
}
|
|
2419
|
-
var Oi = le, Ni =
|
|
2420
|
-
binary:
|
|
2421
|
-
float:
|
|
2419
|
+
var Oi = le, Ni = Tn, Fi = En, Ki = qn, qi = Ln, Li = Et, Bi = tr.load, Pi = tr.loadAll, Ui = Ei.dump, Ri = fe, Vi = {
|
|
2420
|
+
binary: Vn,
|
|
2421
|
+
float: Kn,
|
|
2422
2422
|
map: Mn,
|
|
2423
2423
|
null: On,
|
|
2424
2424
|
pairs: zn,
|
|
@@ -2426,22 +2426,22 @@ var Oi = le, Ni = $n, Fi = En, qi = Kn, Ki = Ln, Li = Et, Bi = tr.load, Pi = tr.
|
|
|
2426
2426
|
timestamp: Un,
|
|
2427
2427
|
bool: Nn,
|
|
2428
2428
|
int: Fn,
|
|
2429
|
-
merge:
|
|
2429
|
+
merge: Rn,
|
|
2430
2430
|
omap: Dn,
|
|
2431
2431
|
seq: jn,
|
|
2432
|
-
str:
|
|
2433
|
-
}, Di =
|
|
2432
|
+
str: $n
|
|
2433
|
+
}, Di = Kt("safeLoad", "load"), zi = Kt("safeLoadAll", "loadAll"), Gi = Kt("safeDump", "dump"), Hi = {
|
|
2434
2434
|
Type: Oi,
|
|
2435
2435
|
Schema: Ni,
|
|
2436
2436
|
FAILSAFE_SCHEMA: Fi,
|
|
2437
|
-
JSON_SCHEMA:
|
|
2438
|
-
CORE_SCHEMA:
|
|
2437
|
+
JSON_SCHEMA: Ki,
|
|
2438
|
+
CORE_SCHEMA: qi,
|
|
2439
2439
|
DEFAULT_SCHEMA: Li,
|
|
2440
2440
|
load: Bi,
|
|
2441
2441
|
loadAll: Pi,
|
|
2442
2442
|
dump: Ui,
|
|
2443
|
-
YAMLException:
|
|
2444
|
-
types:
|
|
2443
|
+
YAMLException: Ri,
|
|
2444
|
+
types: Vi,
|
|
2445
2445
|
safeLoad: Di,
|
|
2446
2446
|
safeLoadAll: zi,
|
|
2447
2447
|
safeDump: Gi
|
|
@@ -2462,8 +2462,8 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2462
2462
|
});
|
|
2463
2463
|
return (r, a) => {
|
|
2464
2464
|
const i = U("KCodeBlock");
|
|
2465
|
-
return
|
|
2466
|
-
n.yamlRecord ? (
|
|
2465
|
+
return p(), j("div", Ji, [
|
|
2466
|
+
n.yamlRecord ? (p(), D(i, {
|
|
2467
2467
|
key: 0,
|
|
2468
2468
|
id: "yaml-codeblock",
|
|
2469
2469
|
code: t.value,
|
|
@@ -2518,24 +2518,24 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2518
2518
|
}
|
|
2519
2519
|
},
|
|
2520
2520
|
setup(e) {
|
|
2521
|
-
const n = e, t =
|
|
2521
|
+
const n = e, t = St(), { i18n: { t: r } } = se.useI18n(), a = (o) => !!(o.tooltip || t[`${o.key}-label-tooltip`]), i = x(() => {
|
|
2522
2522
|
if (!n.record)
|
|
2523
2523
|
return n.record;
|
|
2524
2524
|
const o = JSON.parse(JSON.stringify(n.record));
|
|
2525
2525
|
return delete o.created_at, delete o.updated_at, o;
|
|
2526
2526
|
});
|
|
2527
|
-
return (o, s) => (
|
|
2528
|
-
e.format === "structured" ? (
|
|
2529
|
-
(
|
|
2527
|
+
return (o, s) => (p(), j(ve, null, [
|
|
2528
|
+
e.format === "structured" ? (p(), j("div", Yi, [
|
|
2529
|
+
(p(!0), j(ve, null, ye(e.propListTypes, (l) => (p(), j("div", {
|
|
2530
2530
|
key: `config-card-details-${l}-props`,
|
|
2531
|
-
class:
|
|
2531
|
+
class: Ee(`config-card-details-${l}-props`),
|
|
2532
2532
|
"data-testid": `config-card-details-${l}-props`
|
|
2533
2533
|
}, [
|
|
2534
|
-
l !== "basic" ? (
|
|
2535
|
-
(
|
|
2534
|
+
l !== "basic" ? (p(), j("div", Zi, N(l === "advanced" ? h(r)("baseConfigCard.sections.advanced") : h(r)("baseConfigCard.sections.plugin")), 1)) : J("", !0),
|
|
2535
|
+
(p(!0), j(ve, null, ye(e.propertyCollections[l], (u) => (p(), D(An, {
|
|
2536
2536
|
key: u.key,
|
|
2537
2537
|
item: u
|
|
2538
|
-
},
|
|
2538
|
+
}, Le({
|
|
2539
2539
|
label: b(() => [
|
|
2540
2540
|
te(o.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2541
2541
|
]),
|
|
@@ -2557,20 +2557,20 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2557
2557
|
]), 1032, ["item"]))), 128))
|
|
2558
2558
|
], 10, Wi))), 128))
|
|
2559
2559
|
])) : J("", !0),
|
|
2560
|
-
e.format === "json" && n.record ? (
|
|
2560
|
+
e.format === "json" && n.record ? (p(), D(xn, {
|
|
2561
2561
|
key: 1,
|
|
2562
2562
|
config: n.config,
|
|
2563
2563
|
"fetcher-url": n.fetcherUrl,
|
|
2564
2564
|
"json-record": i.value,
|
|
2565
2565
|
"request-method": "get"
|
|
2566
2566
|
}, null, 8, ["config", "fetcher-url", "json-record"])) : J("", !0),
|
|
2567
|
-
e.format === "yaml" && n.record ? (
|
|
2567
|
+
e.format === "yaml" && n.record ? (p(), D(fr, {
|
|
2568
2568
|
key: 2,
|
|
2569
2569
|
"yaml-record": i.value
|
|
2570
2570
|
}, null, 8, ["yaml-record"])) : J("", !0)
|
|
2571
2571
|
], 64));
|
|
2572
2572
|
}
|
|
2573
|
-
}), Xi = /* @__PURE__ */ be(Qi, [["__scopeId", "data-v-147a2f70"]]),
|
|
2573
|
+
}), Xi = /* @__PURE__ */ be(Qi, [["__scopeId", "data-v-147a2f70"]]), Ne = "24px", gt = (e, n) => {
|
|
2574
2574
|
const t = e.__vccOpts || e;
|
|
2575
2575
|
for (const [r, a] of n)
|
|
2576
2576
|
t[r] = a;
|
|
@@ -2578,7 +2578,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2578
2578
|
}, es = (e) => (dt("data-v-2295e0fb"), e = e(), pt(), e), ts = ["aria-hidden"], ns = {
|
|
2579
2579
|
key: 0,
|
|
2580
2580
|
"data-testid": "kui-icon-svg-title"
|
|
2581
|
-
}, rs = /* @__PURE__ */ es(() => /* @__PURE__ */
|
|
2581
|
+
}, rs = /* @__PURE__ */ es(() => /* @__PURE__ */ P("path", {
|
|
2582
2582
|
d: "M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",
|
|
2583
2583
|
fill: "currentColor"
|
|
2584
2584
|
}, null, -1)), as = /* @__PURE__ */ X({
|
|
@@ -2612,7 +2612,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2612
2612
|
size: {
|
|
2613
2613
|
type: [Number, String],
|
|
2614
2614
|
required: !1,
|
|
2615
|
-
default:
|
|
2615
|
+
default: Ne,
|
|
2616
2616
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2617
2617
|
validator: (e) => {
|
|
2618
2618
|
if (typeof e == "number" && e > 0)
|
|
@@ -2641,7 +2641,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2641
2641
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2642
2642
|
return `${i}px`;
|
|
2643
2643
|
}
|
|
2644
|
-
return
|
|
2644
|
+
return Ne;
|
|
2645
2645
|
}), r = x(() => ({
|
|
2646
2646
|
boxSizing: "border-box",
|
|
2647
2647
|
color: n.color,
|
|
@@ -2650,14 +2650,14 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2650
2650
|
lineHeight: "0",
|
|
2651
2651
|
width: t.value
|
|
2652
2652
|
}));
|
|
2653
|
-
return (a, i) => (
|
|
2653
|
+
return (a, i) => (p(), D(Se(e.as), {
|
|
2654
2654
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2655
2655
|
class: "kui-icon add-icon",
|
|
2656
2656
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
2657
2657
|
style: ct(r.value)
|
|
2658
2658
|
}, {
|
|
2659
2659
|
default: b(() => [
|
|
2660
|
-
(
|
|
2660
|
+
(p(), j("svg", {
|
|
2661
2661
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2662
2662
|
"data-testid": "kui-icon-svg-add-icon",
|
|
2663
2663
|
fill: "none",
|
|
@@ -2667,7 +2667,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2667
2667
|
width: "100%",
|
|
2668
2668
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2669
2669
|
}, [
|
|
2670
|
-
e.title ? (
|
|
2670
|
+
e.title ? (p(), j("title", ns, N(e.title), 1)) : J("", !0),
|
|
2671
2671
|
rs
|
|
2672
2672
|
], 8, ts))
|
|
2673
2673
|
]),
|
|
@@ -2677,7 +2677,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2677
2677
|
}), os = /* @__PURE__ */ gt(as, [["__scopeId", "data-v-2295e0fb"]]), is = (e) => (dt("data-v-40a7f387"), e = e(), pt(), e), ss = ["aria-hidden"], ls = {
|
|
2678
2678
|
key: 0,
|
|
2679
2679
|
"data-testid": "kui-icon-svg-title"
|
|
2680
|
-
}, us = /* @__PURE__ */ is(() => /* @__PURE__ */
|
|
2680
|
+
}, us = /* @__PURE__ */ is(() => /* @__PURE__ */ P("path", {
|
|
2681
2681
|
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",
|
|
2682
2682
|
fill: "currentColor"
|
|
2683
2683
|
}, null, -1)), cs = /* @__PURE__ */ X({
|
|
@@ -2711,7 +2711,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2711
2711
|
size: {
|
|
2712
2712
|
type: [Number, String],
|
|
2713
2713
|
required: !1,
|
|
2714
|
-
default:
|
|
2714
|
+
default: Ne,
|
|
2715
2715
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2716
2716
|
validator: (e) => {
|
|
2717
2717
|
if (typeof e == "number" && e > 0)
|
|
@@ -2740,7 +2740,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2740
2740
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2741
2741
|
return `${i}px`;
|
|
2742
2742
|
}
|
|
2743
|
-
return
|
|
2743
|
+
return Ne;
|
|
2744
2744
|
}), r = x(() => ({
|
|
2745
2745
|
boxSizing: "border-box",
|
|
2746
2746
|
color: n.color,
|
|
@@ -2749,14 +2749,14 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2749
2749
|
lineHeight: "0",
|
|
2750
2750
|
width: t.value
|
|
2751
2751
|
}));
|
|
2752
|
-
return (a, i) => (
|
|
2752
|
+
return (a, i) => (p(), D(Se(e.as), {
|
|
2753
2753
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2754
2754
|
class: "kui-icon book-icon",
|
|
2755
2755
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2756
2756
|
style: ct(r.value)
|
|
2757
2757
|
}, {
|
|
2758
2758
|
default: b(() => [
|
|
2759
|
-
(
|
|
2759
|
+
(p(), j("svg", {
|
|
2760
2760
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2761
2761
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2762
2762
|
fill: "none",
|
|
@@ -2766,7 +2766,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2766
2766
|
width: "100%",
|
|
2767
2767
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2768
2768
|
}, [
|
|
2769
|
-
e.title ? (
|
|
2769
|
+
e.title ? (p(), j("title", ls, N(e.title), 1)) : J("", !0),
|
|
2770
2770
|
us
|
|
2771
2771
|
], 8, ss))
|
|
2772
2772
|
]),
|
|
@@ -2776,7 +2776,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2776
2776
|
}), ds = /* @__PURE__ */ gt(cs, [["__scopeId", "data-v-40a7f387"]]), ps = (e) => (dt("data-v-98c34919"), e = e(), pt(), e), fs = ["aria-hidden"], ms = {
|
|
2777
2777
|
key: 0,
|
|
2778
2778
|
"data-testid": "kui-icon-svg-title"
|
|
2779
|
-
}, gs = /* @__PURE__ */ ps(() => /* @__PURE__ */
|
|
2779
|
+
}, gs = /* @__PURE__ */ ps(() => /* @__PURE__ */ P("path", {
|
|
2780
2780
|
d: "M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",
|
|
2781
2781
|
fill: "currentColor"
|
|
2782
2782
|
}, null, -1)), hs = /* @__PURE__ */ X({
|
|
@@ -2810,7 +2810,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2810
2810
|
size: {
|
|
2811
2811
|
type: [Number, String],
|
|
2812
2812
|
required: !1,
|
|
2813
|
-
default:
|
|
2813
|
+
default: Ne,
|
|
2814
2814
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2815
2815
|
validator: (e) => {
|
|
2816
2816
|
if (typeof e == "number" && e > 0)
|
|
@@ -2839,7 +2839,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2839
2839
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2840
2840
|
return `${i}px`;
|
|
2841
2841
|
}
|
|
2842
|
-
return
|
|
2842
|
+
return Ne;
|
|
2843
2843
|
}), r = x(() => ({
|
|
2844
2844
|
boxSizing: "border-box",
|
|
2845
2845
|
color: n.color,
|
|
@@ -2848,14 +2848,14 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2848
2848
|
lineHeight: "0",
|
|
2849
2849
|
width: t.value
|
|
2850
2850
|
}));
|
|
2851
|
-
return (a, i) => (
|
|
2851
|
+
return (a, i) => (p(), D(Se(e.as), {
|
|
2852
2852
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2853
2853
|
class: "kui-icon chevron-down-icon",
|
|
2854
2854
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
2855
2855
|
style: ct(r.value)
|
|
2856
2856
|
}, {
|
|
2857
2857
|
default: b(() => [
|
|
2858
|
-
(
|
|
2858
|
+
(p(), j("svg", {
|
|
2859
2859
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2860
2860
|
"data-testid": "kui-icon-svg-chevron-down-icon",
|
|
2861
2861
|
fill: "none",
|
|
@@ -2865,7 +2865,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2865
2865
|
width: "100%",
|
|
2866
2866
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2867
2867
|
}, [
|
|
2868
|
-
e.title ? (
|
|
2868
|
+
e.title ? (p(), j("title", ms, N(e.title), 1)) : J("", !0),
|
|
2869
2869
|
gs
|
|
2870
2870
|
], 8, fs))
|
|
2871
2871
|
]),
|
|
@@ -2875,7 +2875,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2875
2875
|
}), ys = /* @__PURE__ */ gt(hs, [["__scopeId", "data-v-98c34919"]]), vs = (e) => (dt("data-v-19f4cbbe"), e = e(), pt(), e), bs = ["aria-hidden"], ks = {
|
|
2876
2876
|
key: 0,
|
|
2877
2877
|
"data-testid": "kui-icon-svg-title"
|
|
2878
|
-
}, Cs = /* @__PURE__ */ vs(() => /* @__PURE__ */
|
|
2878
|
+
}, Cs = /* @__PURE__ */ vs(() => /* @__PURE__ */ P("path", {
|
|
2879
2879
|
d: "M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",
|
|
2880
2880
|
fill: "currentColor"
|
|
2881
2881
|
}, null, -1)), ws = /* @__PURE__ */ X({
|
|
@@ -2909,7 +2909,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2909
2909
|
size: {
|
|
2910
2910
|
type: [Number, String],
|
|
2911
2911
|
required: !1,
|
|
2912
|
-
default:
|
|
2912
|
+
default: Ne,
|
|
2913
2913
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2914
2914
|
validator: (e) => {
|
|
2915
2915
|
if (typeof e == "number" && e > 0)
|
|
@@ -2938,7 +2938,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2938
2938
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2939
2939
|
return `${i}px`;
|
|
2940
2940
|
}
|
|
2941
|
-
return
|
|
2941
|
+
return Ne;
|
|
2942
2942
|
}), r = x(() => ({
|
|
2943
2943
|
boxSizing: "border-box",
|
|
2944
2944
|
color: n.color,
|
|
@@ -2947,14 +2947,14 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2947
2947
|
lineHeight: "0",
|
|
2948
2948
|
width: t.value
|
|
2949
2949
|
}));
|
|
2950
|
-
return (a, i) => (
|
|
2950
|
+
return (a, i) => (p(), D(Se(e.as), {
|
|
2951
2951
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2952
2952
|
class: "kui-icon close-icon",
|
|
2953
2953
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
2954
2954
|
style: ct(r.value)
|
|
2955
2955
|
}, {
|
|
2956
2956
|
default: b(() => [
|
|
2957
|
-
(
|
|
2957
|
+
(p(), j("svg", {
|
|
2958
2958
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2959
2959
|
"data-testid": "kui-icon-svg-close-icon",
|
|
2960
2960
|
fill: "none",
|
|
@@ -2964,14 +2964,14 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
2964
2964
|
width: "100%",
|
|
2965
2965
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2966
2966
|
}, [
|
|
2967
|
-
e.title ? (
|
|
2967
|
+
e.title ? (p(), j("title", ks, N(e.title), 1)) : J("", !0),
|
|
2968
2968
|
Cs
|
|
2969
2969
|
], 8, bs))
|
|
2970
2970
|
]),
|
|
2971
2971
|
_: 1
|
|
2972
2972
|
}, 8, ["aria-hidden", "style"]));
|
|
2973
2973
|
}
|
|
2974
|
-
}), _s = /* @__PURE__ */ gt(ws, [["__scopeId", "data-v-19f4cbbe"]]),
|
|
2974
|
+
}), _s = /* @__PURE__ */ gt(ws, [["__scopeId", "data-v-19f4cbbe"]]), As = { class: "config-card-actions" }, xs = ["href"], Is = { class: "config-card-details-section" }, Ss = /* @__PURE__ */ X({
|
|
2975
2975
|
__name: "EntityBaseConfigCard",
|
|
2976
2976
|
props: {
|
|
2977
2977
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3026,6 +3026,13 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3026
3026
|
type: Boolean,
|
|
3027
3027
|
default: !1
|
|
3028
3028
|
},
|
|
3029
|
+
/**
|
|
3030
|
+
* The tag to use for the title
|
|
3031
|
+
*/
|
|
3032
|
+
titleTag: {
|
|
3033
|
+
type: String,
|
|
3034
|
+
default: "h2"
|
|
3035
|
+
},
|
|
3029
3036
|
/**
|
|
3030
3037
|
* The label text to show for the select Format element
|
|
3031
3038
|
*/
|
|
@@ -3098,62 +3105,62 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3098
3105
|
// the last property displayed
|
|
3099
3106
|
section: he.Basic
|
|
3100
3107
|
}
|
|
3101
|
-
},
|
|
3108
|
+
}, f = E(!1), I = E(!1), w = E(""), _ = E({}), R = x(() => {
|
|
3102
3109
|
var g, F, L;
|
|
3103
3110
|
if (!_.value)
|
|
3104
3111
|
return [];
|
|
3105
|
-
const
|
|
3112
|
+
const A = [], z = Object.keys(_.value).length;
|
|
3106
3113
|
for (const O in _.value) {
|
|
3107
|
-
const k = (F = (g = a.configSchema) == null ? void 0 : g[O]) == null ? void 0 : F.order,
|
|
3108
|
-
let
|
|
3109
|
-
(
|
|
3114
|
+
const k = (F = (g = a.configSchema) == null ? void 0 : g[O]) == null ? void 0 : F.order, S = (L = v[O]) == null ? void 0 : L.order;
|
|
3115
|
+
let K = z;
|
|
3116
|
+
(S || S === 0) && (K = S === -1 ? z + 1 : S), k && (K = k === -1 ? z + 1 : k), A.push([O, K]);
|
|
3110
3117
|
}
|
|
3111
|
-
return
|
|
3118
|
+
return A.sort(function(O, k) {
|
|
3112
3119
|
return O[1] - k[1];
|
|
3113
|
-
}),
|
|
3114
|
-
var k,
|
|
3115
|
-
const
|
|
3120
|
+
}), A.map((O) => {
|
|
3121
|
+
var k, S;
|
|
3122
|
+
const K = O[0], G = (k = _.value) == null ? void 0 : k[K], ae = ((S = a.configSchema) == null ? void 0 : S[K]) || {}, ue = v[K];
|
|
3116
3123
|
return {
|
|
3117
|
-
key:
|
|
3124
|
+
key: K,
|
|
3118
3125
|
value: G,
|
|
3119
3126
|
hidden: ae.hidden || !1,
|
|
3120
3127
|
type: ae.type ?? ((ue == null ? void 0 : ue.type) || ee.Text),
|
|
3121
|
-
label: ae.label ?? ((ue == null ? void 0 : ue.label) || s(
|
|
3128
|
+
label: ae.label ?? ((ue == null ? void 0 : ue.label) || s(K)),
|
|
3122
3129
|
tooltip: ae.tooltip ?? ((ue == null ? void 0 : ue.tooltip) || void 0),
|
|
3123
3130
|
section: ae.section ?? ((ue == null ? void 0 : ue.section) || he.Advanced)
|
|
3124
3131
|
};
|
|
3125
3132
|
}).filter((O) => !O.hidden && O.key !== a.pluginConfigKey);
|
|
3126
|
-
}),
|
|
3133
|
+
}), q = x(() => {
|
|
3127
3134
|
var g, F;
|
|
3128
3135
|
if (!_.value || !a.pluginConfigKey)
|
|
3129
3136
|
return [];
|
|
3130
|
-
const L = _.value[a.pluginConfigKey] || {},
|
|
3137
|
+
const L = _.value[a.pluginConfigKey] || {}, A = Object.keys(L).length, z = [];
|
|
3131
3138
|
for (const O in L) {
|
|
3132
|
-
const k = (F = (g = a.pluginConfigSchema) == null ? void 0 : g[O]) == null ? void 0 : F.order,
|
|
3133
|
-
let
|
|
3134
|
-
k && (
|
|
3139
|
+
const k = (F = (g = a.pluginConfigSchema) == null ? void 0 : g[O]) == null ? void 0 : F.order, S = L[O];
|
|
3140
|
+
let K = S != null && S !== "" ? A - 1 : A;
|
|
3141
|
+
k && (K = k === -1 ? A + 1 : k), z.push([O, K]);
|
|
3135
3142
|
}
|
|
3136
3143
|
return z.sort(function(O, k) {
|
|
3137
3144
|
return O[1] - k[1];
|
|
3138
3145
|
}), z.map((O) => {
|
|
3139
3146
|
var k;
|
|
3140
|
-
const
|
|
3147
|
+
const S = O[0], K = L[S], G = ((k = a.pluginConfigSchema) == null ? void 0 : k[S]) || {};
|
|
3141
3148
|
return {
|
|
3142
|
-
key:
|
|
3143
|
-
value:
|
|
3149
|
+
key: S,
|
|
3150
|
+
value: K,
|
|
3144
3151
|
hidden: G.hidden || !1,
|
|
3145
3152
|
type: G.type ?? ee.Text,
|
|
3146
|
-
label: G.label ?? s(
|
|
3153
|
+
label: G.label ?? s(S),
|
|
3147
3154
|
tooltip: G.tooltip ?? void 0,
|
|
3148
3155
|
section: he.Plugin
|
|
3149
3156
|
};
|
|
3150
3157
|
}).filter((O) => !O.hidden);
|
|
3151
3158
|
}), W = x(() => {
|
|
3152
|
-
var g, F, L,
|
|
3159
|
+
var g, F, L, A;
|
|
3153
3160
|
return {
|
|
3154
|
-
basic: (g =
|
|
3155
|
-
advanced: (F =
|
|
3156
|
-
plugin: (
|
|
3161
|
+
basic: (g = R.value) == null ? void 0 : g.filter((z) => z.section === he.Basic),
|
|
3162
|
+
advanced: (F = R.value) == null ? void 0 : F.filter((z) => z.section === he.Advanced),
|
|
3163
|
+
plugin: (A = q.value) == null ? void 0 : A.concat((L = R.value) == null ? void 0 : L.filter((z) => z.section === he.Plugin))
|
|
3157
3164
|
};
|
|
3158
3165
|
}), y = x(() => {
|
|
3159
3166
|
const g = [];
|
|
@@ -3163,10 +3170,10 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3163
3170
|
let L = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3164
3171
|
return a.config.app === "konnect" ? L = L.replace(/{controlPlaneId}/gi, ((g = a.config) == null ? void 0 : g.controlPlaneId) || "") : a.config.app === "kongManager" && (L = L.replace(/\/{workspace}/gi, (F = a.config) != null && F.workspace ? `/${a.config.workspace}` : "")), L = L.replace(/{id}/gi, a.config.entityId), L;
|
|
3165
3172
|
});
|
|
3166
|
-
return xe(
|
|
3173
|
+
return xe(f, (g) => {
|
|
3167
3174
|
r("loading", g);
|
|
3168
3175
|
}, { immediate: !0 }), ut(async () => {
|
|
3169
|
-
I.value = !1,
|
|
3176
|
+
I.value = !1, f.value = !0;
|
|
3170
3177
|
try {
|
|
3171
3178
|
const { data: g } = await l.get(m.value);
|
|
3172
3179
|
if (a.dataKey)
|
|
@@ -3183,76 +3190,76 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3183
3190
|
const F = o(g);
|
|
3184
3191
|
w.value = F.startsWith("code") ? i("baseConfigCard.errors.load") : F, I.value = !0, r("fetch:error", g);
|
|
3185
3192
|
} finally {
|
|
3186
|
-
|
|
3193
|
+
f.value = !1;
|
|
3187
3194
|
}
|
|
3188
3195
|
}), (g, F) => {
|
|
3189
|
-
const L = U("KLabel"),
|
|
3190
|
-
return
|
|
3196
|
+
const L = U("KLabel"), A = U("KSelect"), z = U("KButton"), O = U("KSkeleton"), k = U("KEmptyState"), S = U("KCard");
|
|
3197
|
+
return p(), D(S, { class: "kong-ui-entity-base-config-card" }, Le({
|
|
3191
3198
|
actions: b(() => [
|
|
3192
|
-
|
|
3199
|
+
P("div", As, [
|
|
3193
3200
|
te(g.$slots, "actions", {}, void 0, !0),
|
|
3194
|
-
|
|
3201
|
+
$(L, {
|
|
3195
3202
|
class: "config-format-select-label",
|
|
3196
3203
|
"data-testid": "config-format-select-label"
|
|
3197
3204
|
}, {
|
|
3198
3205
|
default: b(() => [
|
|
3199
|
-
|
|
3206
|
+
Z(N(e.label), 1)
|
|
3200
3207
|
]),
|
|
3201
3208
|
_: 1
|
|
3202
3209
|
}),
|
|
3203
|
-
|
|
3210
|
+
$(A, {
|
|
3204
3211
|
"data-testid": "select-config-format",
|
|
3205
3212
|
items: u,
|
|
3206
3213
|
onChange: c
|
|
3207
3214
|
}),
|
|
3208
|
-
e.configCardDoc ? (
|
|
3215
|
+
e.configCardDoc ? (p(), D(z, {
|
|
3209
3216
|
key: 0,
|
|
3210
3217
|
appearance: "tertiary",
|
|
3211
3218
|
class: "book-icon",
|
|
3212
3219
|
"data-testid": "book-icon"
|
|
3213
3220
|
}, {
|
|
3214
3221
|
default: b(() => [
|
|
3215
|
-
|
|
3222
|
+
P("a", {
|
|
3216
3223
|
href: e.configCardDoc,
|
|
3217
3224
|
rel: "noopener",
|
|
3218
3225
|
target: "_blank"
|
|
3219
3226
|
}, [
|
|
3220
|
-
|
|
3221
|
-
], 8,
|
|
3227
|
+
$(h(ds), { size: h(pa) }, null, 8, ["size"])
|
|
3228
|
+
], 8, xs)
|
|
3222
3229
|
]),
|
|
3223
3230
|
_: 1
|
|
3224
3231
|
})) : J("", !0)
|
|
3225
3232
|
])
|
|
3226
3233
|
]),
|
|
3227
3234
|
default: b(() => [
|
|
3228
|
-
|
|
3235
|
+
f.value ? (p(), D(O, {
|
|
3229
3236
|
key: 0,
|
|
3230
3237
|
"data-testid": "config-card-loader",
|
|
3231
3238
|
"table-columns": 2,
|
|
3232
3239
|
type: "table"
|
|
3233
|
-
})) : I.value ? (
|
|
3240
|
+
})) : I.value ? (p(), D(k, {
|
|
3234
3241
|
key: 1,
|
|
3235
3242
|
"data-testid": "config-card-fetch-error",
|
|
3236
3243
|
"icon-variant": "error"
|
|
3237
3244
|
}, {
|
|
3238
3245
|
default: b(() => [
|
|
3239
|
-
|
|
3246
|
+
P("h3", null, N(w.value), 1)
|
|
3240
3247
|
]),
|
|
3241
3248
|
_: 1
|
|
3242
3249
|
})) : J("", !0),
|
|
3243
|
-
|
|
3244
|
-
|
|
3250
|
+
P("div", Is, [
|
|
3251
|
+
$(Xi, {
|
|
3245
3252
|
config: e.config,
|
|
3246
3253
|
"fetcher-url": m.value,
|
|
3247
3254
|
format: d.value,
|
|
3248
3255
|
"prop-list-types": y.value,
|
|
3249
3256
|
"property-collections": W.value,
|
|
3250
3257
|
record: _.value
|
|
3251
|
-
},
|
|
3252
|
-
ye(Object.keys(g.$slots), (
|
|
3253
|
-
name:
|
|
3258
|
+
}, Le({ _: 2 }, [
|
|
3259
|
+
ye(Object.keys(g.$slots), (K) => ({
|
|
3260
|
+
name: K,
|
|
3254
3261
|
fn: b(({ row: G, rowValue: ae }) => [
|
|
3255
|
-
te(g.$slots,
|
|
3262
|
+
te(g.$slots, K, {
|
|
3256
3263
|
row: G,
|
|
3257
3264
|
rowValue: ae
|
|
3258
3265
|
}, void 0, !0)
|
|
@@ -3266,21 +3273,24 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3266
3273
|
e.hideTitle ? void 0 : {
|
|
3267
3274
|
name: "title",
|
|
3268
3275
|
fn: b(() => [
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3276
|
+
(p(), D(Se(e.titleTag), { "data-testid": "config-card-title" }, {
|
|
3277
|
+
default: b(() => [
|
|
3278
|
+
te(g.$slots, "title", {}, () => [
|
|
3279
|
+
Z(N(h(i)("baseConfigCard.title")), 1)
|
|
3280
|
+
], !0)
|
|
3281
|
+
]),
|
|
3282
|
+
_: 3
|
|
3283
|
+
}))
|
|
3274
3284
|
]),
|
|
3275
3285
|
key: "0"
|
|
3276
3286
|
}
|
|
3277
3287
|
]), 1024);
|
|
3278
3288
|
};
|
|
3279
3289
|
}
|
|
3280
|
-
}), Ts = /* @__PURE__ */ be(
|
|
3290
|
+
}), Ts = /* @__PURE__ */ be(Ss, [["__scopeId", "data-v-f01e09b5"]]), $s = {
|
|
3281
3291
|
class: "form-actions",
|
|
3282
3292
|
"data-testid": "form-actions"
|
|
3283
|
-
},
|
|
3293
|
+
}, js = { key: 0 }, Ms = /* @__PURE__ */ X({
|
|
3284
3294
|
__name: "EntityBaseForm",
|
|
3285
3295
|
props: {
|
|
3286
3296
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3335,19 +3345,19 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3335
3345
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3336
3346
|
setup(e, { emit: n }) {
|
|
3337
3347
|
var t;
|
|
3338
|
-
const r = n, a = e, i =
|
|
3348
|
+
const r = n, a = e, i = Tt(), { i18n: { t: o } } = se.useI18n(), { getMessageFromError: s } = se.useErrors(), { axiosInstance: l } = se.useAxios({
|
|
3339
3349
|
headers: (t = a.config) == null ? void 0 : t.requestHeaders
|
|
3340
|
-
}), u = E(!1), d = E(!1), c = E(""), v = x(() => a.canSubmit === !1 || a.isReadonly),
|
|
3350
|
+
}), u = E(!1), d = E(!1), c = E(""), v = x(() => a.canSubmit === !1 || a.isReadonly), f = E(!1), I = x(() => {
|
|
3341
3351
|
var y, m;
|
|
3342
3352
|
let g = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3343
3353
|
return a.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((y = a.config) == null ? void 0 : y.controlPlaneId) || "") : a.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (m = a.config) != null && m.workspace ? `/${a.config.workspace}` : "")), a.editId ? (g = g.replace(/{id}/gi, a.editId), g) : (g = g.replace(/\/{id}/gi, ""), g);
|
|
3344
3354
|
}), w = () => {
|
|
3345
|
-
|
|
3355
|
+
f.value = !f.value;
|
|
3346
3356
|
}, _ = () => {
|
|
3347
|
-
a.config.cancelRoute ? i.push(a.config.cancelRoute) :
|
|
3348
|
-
},
|
|
3357
|
+
a.config.cancelRoute ? i.push(a.config.cancelRoute) : R();
|
|
3358
|
+
}, R = () => {
|
|
3349
3359
|
r("cancel");
|
|
3350
|
-
},
|
|
3360
|
+
}, q = () => {
|
|
3351
3361
|
v.value || r("submit");
|
|
3352
3362
|
}, W = E([
|
|
3353
3363
|
{
|
|
@@ -3374,13 +3384,13 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3374
3384
|
u.value = !1;
|
|
3375
3385
|
}
|
|
3376
3386
|
}), (y, m) => {
|
|
3377
|
-
const g = U("KSkeleton"), F = U("KEmptyState"), L = U("KAlert"),
|
|
3378
|
-
return
|
|
3387
|
+
const g = U("KSkeleton"), F = U("KEmptyState"), L = U("KAlert"), A = U("KButton"), z = U("KTabs"), O = U("KSlideout"), k = U("KCard");
|
|
3388
|
+
return p(), D(k, { class: "kong-ui-entity-base-form" }, {
|
|
3379
3389
|
default: b(() => [
|
|
3380
|
-
u.value ? (
|
|
3390
|
+
u.value ? (p(), D(g, {
|
|
3381
3391
|
key: 0,
|
|
3382
3392
|
type: "form"
|
|
3383
|
-
})) : d.value ? (
|
|
3393
|
+
})) : d.value ? (p(), D(F, {
|
|
3384
3394
|
key: 1,
|
|
3385
3395
|
"action-button-text": h(o)("baseForm.actions.back"),
|
|
3386
3396
|
"data-testid": "form-fetch-error",
|
|
@@ -3388,78 +3398,78 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3388
3398
|
onClickAction: _
|
|
3389
3399
|
}, {
|
|
3390
3400
|
default: b(() => [
|
|
3391
|
-
|
|
3401
|
+
P("h3", null, N(c.value), 1)
|
|
3392
3402
|
]),
|
|
3393
3403
|
_: 1
|
|
3394
|
-
}, 8, ["action-button-text"])) : (
|
|
3404
|
+
}, 8, ["action-button-text"])) : (p(), j("form", {
|
|
3395
3405
|
key: 2,
|
|
3396
3406
|
"data-testid": "form-content",
|
|
3397
|
-
onReset: Ct(
|
|
3398
|
-
onSubmit: Ct(
|
|
3407
|
+
onReset: Ct(R, ["prevent"]),
|
|
3408
|
+
onSubmit: Ct(q, ["prevent"])
|
|
3399
3409
|
}, [
|
|
3400
3410
|
te(y.$slots, "default", {}, void 0, !0),
|
|
3401
|
-
e.errorMessage ? (
|
|
3411
|
+
e.errorMessage ? (p(), D(L, {
|
|
3402
3412
|
key: 0,
|
|
3403
3413
|
appearance: "danger",
|
|
3404
3414
|
"data-testid": "form-error",
|
|
3405
3415
|
message: e.errorMessage
|
|
3406
3416
|
}, null, 8, ["message"])) : J("", !0),
|
|
3407
|
-
|
|
3417
|
+
P("div", $s, [
|
|
3408
3418
|
te(y.$slots, "form-actions", {}, () => [
|
|
3409
|
-
e.config.jsonYamlFormsEnabled ? (
|
|
3410
|
-
|
|
3419
|
+
e.config.jsonYamlFormsEnabled ? (p(), j("div", js, [
|
|
3420
|
+
$(A, {
|
|
3411
3421
|
appearance: "tertiary",
|
|
3412
3422
|
"data-testid": "form-view-configuration",
|
|
3413
|
-
onClick: m[0] || (m[0] = (
|
|
3423
|
+
onClick: m[0] || (m[0] = (S) => w())
|
|
3414
3424
|
}, {
|
|
3415
3425
|
default: b(() => [
|
|
3416
|
-
|
|
3426
|
+
Z(N(h(o)("baseForm.actions.viewConfiguration")), 1)
|
|
3417
3427
|
]),
|
|
3418
3428
|
_: 1
|
|
3419
3429
|
})
|
|
3420
3430
|
])) : J("", !0),
|
|
3421
|
-
|
|
3431
|
+
$(A, {
|
|
3422
3432
|
appearance: "secondary",
|
|
3423
3433
|
"data-testid": "form-cancel",
|
|
3424
3434
|
disabled: e.isReadonly,
|
|
3425
3435
|
type: "reset"
|
|
3426
3436
|
}, {
|
|
3427
3437
|
default: b(() => [
|
|
3428
|
-
|
|
3438
|
+
Z(N(h(o)("baseForm.actions.cancel")), 1)
|
|
3429
3439
|
]),
|
|
3430
3440
|
_: 1
|
|
3431
3441
|
}, 8, ["disabled"]),
|
|
3432
|
-
|
|
3442
|
+
$(A, {
|
|
3433
3443
|
appearance: "primary",
|
|
3434
3444
|
"data-testid": "form-submit",
|
|
3435
3445
|
disabled: v.value,
|
|
3436
3446
|
type: "submit"
|
|
3437
3447
|
}, {
|
|
3438
3448
|
default: b(() => [
|
|
3439
|
-
|
|
3449
|
+
Z(N(h(o)("baseForm.actions.save")), 1)
|
|
3440
3450
|
]),
|
|
3441
3451
|
_: 1
|
|
3442
3452
|
}, 8, ["disabled"])
|
|
3443
3453
|
], !0)
|
|
3444
3454
|
])
|
|
3445
3455
|
], 32)),
|
|
3446
|
-
|
|
3456
|
+
$(O, {
|
|
3447
3457
|
"close-on-blur": !1,
|
|
3448
3458
|
"data-testid": "form-view-configuration-slideout",
|
|
3449
3459
|
"has-overlay": !1,
|
|
3450
3460
|
"offset-top": 60,
|
|
3451
3461
|
title: h(o)("baseForm.configuration.title"),
|
|
3452
|
-
visible:
|
|
3453
|
-
onClose: m[1] || (m[1] = (
|
|
3462
|
+
visible: f.value,
|
|
3463
|
+
onClose: m[1] || (m[1] = (S) => w())
|
|
3454
3464
|
}, {
|
|
3455
3465
|
default: b(() => [
|
|
3456
|
-
|
|
3457
|
-
|
|
3466
|
+
P("div", null, N(h(o)("baseForm.configuration.message")), 1),
|
|
3467
|
+
$(z, {
|
|
3458
3468
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3459
3469
|
tabs: W.value
|
|
3460
3470
|
}, {
|
|
3461
3471
|
json: b(() => [
|
|
3462
|
-
|
|
3472
|
+
$(xn, {
|
|
3463
3473
|
config: e.config,
|
|
3464
3474
|
"fetcher-url": I.value,
|
|
3465
3475
|
"json-record": a.formFields,
|
|
@@ -3467,7 +3477,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3467
3477
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3468
3478
|
]),
|
|
3469
3479
|
yaml: b(() => [
|
|
3470
|
-
|
|
3480
|
+
$(fr, {
|
|
3471
3481
|
"yaml-record": a.formFields
|
|
3472
3482
|
}, null, 8, ["yaml-record"])
|
|
3473
3483
|
]),
|
|
@@ -3481,10 +3491,10 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3481
3491
|
});
|
|
3482
3492
|
};
|
|
3483
3493
|
}
|
|
3484
|
-
}),
|
|
3494
|
+
}), Es = /* @__PURE__ */ be(Ms, [["__scopeId", "data-v-acb5a965"]]), Os = {
|
|
3485
3495
|
key: 0,
|
|
3486
3496
|
"data-testid": "first-col"
|
|
3487
|
-
},
|
|
3497
|
+
}, Ns = /* @__PURE__ */ X({
|
|
3488
3498
|
__name: "EntityBaseTableCell",
|
|
3489
3499
|
props: {
|
|
3490
3500
|
keyName: {
|
|
@@ -3505,16 +3515,16 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3505
3515
|
return ((w = t.value) == null ? void 0 : w.querySelector('[data-testid="first-col"]')) || null;
|
|
3506
3516
|
}), a = x(() => {
|
|
3507
3517
|
var w, _;
|
|
3508
|
-
const
|
|
3509
|
-
return
|
|
3518
|
+
const R = (w = n.rowEl) == null ? void 0 : w.querySelectorAll("td");
|
|
3519
|
+
return R ? ((_ = R[0]) == null ? void 0 : _.getAttribute("data-testid")) === n.keyName : !1;
|
|
3510
3520
|
});
|
|
3511
3521
|
let i;
|
|
3512
3522
|
const o = () => {
|
|
3513
3523
|
i && (i.disconnect(), i = void 0);
|
|
3514
3524
|
}, s = () => {
|
|
3515
|
-
var w, _,
|
|
3516
|
-
u.value = ((w = r.value) == null ? void 0 : w.getBoundingClientRect().width) || 0, d.value = ((_ = t.value) == null ? void 0 : _.clientWidth) || 0, c.value = ((
|
|
3517
|
-
}, l = E({}), u = E(0), d = E(0), c = E(""), v = x(() => [r.value, t.value]),
|
|
3525
|
+
var w, _, R;
|
|
3526
|
+
u.value = ((w = r.value) == null ? void 0 : w.getBoundingClientRect().width) || 0, d.value = ((_ = t.value) == null ? void 0 : _.clientWidth) || 0, c.value = ((R = l.value) == null ? void 0 : R.innerText) || "";
|
|
3527
|
+
}, l = E({}), u = E(0), d = E(0), c = E(""), v = x(() => [r.value, t.value]), f = xe(
|
|
3518
3528
|
v,
|
|
3519
3529
|
(w) => {
|
|
3520
3530
|
if (a.value && (o(), "ResizeObserver" in window && window)) {
|
|
@@ -3532,16 +3542,16 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3532
3542
|
return kr(() => {
|
|
3533
3543
|
s();
|
|
3534
3544
|
}), Cr(() => {
|
|
3535
|
-
|
|
3545
|
+
f();
|
|
3536
3546
|
}), (w, _) => {
|
|
3537
|
-
const
|
|
3538
|
-
return
|
|
3547
|
+
const R = U("KTooltip");
|
|
3548
|
+
return p(), j("span", {
|
|
3539
3549
|
ref_key: "contentRef",
|
|
3540
3550
|
ref: l,
|
|
3541
3551
|
class: "content-wrapper"
|
|
3542
3552
|
}, [
|
|
3543
|
-
a.value ? (
|
|
3544
|
-
|
|
3553
|
+
a.value ? (p(), j("span", Os, [
|
|
3554
|
+
$(R, {
|
|
3545
3555
|
"max-width": "300",
|
|
3546
3556
|
placement: "bottomStart",
|
|
3547
3557
|
text: I.value ? c.value : ""
|
|
@@ -3555,10 +3565,10 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3555
3565
|
], 512);
|
|
3556
3566
|
};
|
|
3557
3567
|
}
|
|
3558
|
-
}),
|
|
3568
|
+
}), Fs = /* @__PURE__ */ be(Ns, [["__scopeId", "data-v-c4379fd4"]]), Ks = { class: "toolbar-container" }, qs = {
|
|
3559
3569
|
key: 0,
|
|
3560
3570
|
class: "toolbar-button-container"
|
|
3561
|
-
},
|
|
3571
|
+
}, Ls = ["data-testid"], Bs = /* @__PURE__ */ X({
|
|
3562
3572
|
__name: "EntityBaseTable",
|
|
3563
3573
|
props: {
|
|
3564
3574
|
// table header configuration
|
|
@@ -3709,7 +3719,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3709
3719
|
overflowX: "hidden",
|
|
3710
3720
|
textOverflow: "ellipsis"
|
|
3711
3721
|
}), g;
|
|
3712
|
-
},
|
|
3722
|
+
}, f = () => {
|
|
3713
3723
|
r("empty-state-cta-clicked"), I();
|
|
3714
3724
|
}, I = () => {
|
|
3715
3725
|
r("clear-search-input");
|
|
@@ -3717,23 +3727,23 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3717
3727
|
r("click:row", g);
|
|
3718
3728
|
}), _ = (m) => {
|
|
3719
3729
|
r("sort", m);
|
|
3720
|
-
}, { setTablePreferences:
|
|
3721
|
-
const m =
|
|
3730
|
+
}, { setTablePreferences: R, getTablePreferences: q } = Er(), W = x(() => {
|
|
3731
|
+
const m = q(t.preferencesStorageKey);
|
|
3722
3732
|
return {
|
|
3723
3733
|
...t.initialFetcherParams,
|
|
3724
3734
|
...m
|
|
3725
3735
|
};
|
|
3726
3736
|
}), y = (m) => {
|
|
3727
|
-
t.preferencesStorageKey &&
|
|
3737
|
+
t.preferencesStorageKey && R(t.preferencesStorageKey, m);
|
|
3728
3738
|
};
|
|
3729
3739
|
return (m, g) => {
|
|
3730
|
-
const F = U("KIcon"), L = U("KButton"),
|
|
3731
|
-
return
|
|
3740
|
+
const F = U("KIcon"), L = U("KButton"), A = U("KDropdown"), z = U("KTable"), O = U("KCard");
|
|
3741
|
+
return p(), D(O, {
|
|
3732
3742
|
class: "kong-ui-entity-base-table",
|
|
3733
3743
|
title: e.title
|
|
3734
3744
|
}, {
|
|
3735
3745
|
default: b(() => [
|
|
3736
|
-
|
|
3746
|
+
$(z, {
|
|
3737
3747
|
ref_key: "tableRefs",
|
|
3738
3748
|
ref: d,
|
|
3739
3749
|
"cache-identifier": o.value,
|
|
@@ -3758,45 +3768,45 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3758
3768
|
"pagination-type": e.paginationType,
|
|
3759
3769
|
"row-attrs": u,
|
|
3760
3770
|
"search-input": e.query,
|
|
3761
|
-
onKtableEmptyStateCtaClicked:
|
|
3771
|
+
onKtableEmptyStateCtaClicked: f,
|
|
3762
3772
|
"onRow:click": w.value,
|
|
3763
3773
|
onSort: g[0] || (g[0] = (k) => _(k)),
|
|
3764
3774
|
"onUpdate:tablePreferences": y
|
|
3765
|
-
},
|
|
3775
|
+
}, Le({
|
|
3766
3776
|
toolbar: b(({ state: k }) => [
|
|
3767
|
-
|
|
3777
|
+
Te(P("div", Ks, [
|
|
3768
3778
|
te(m.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3769
|
-
m.$slots["toolbar-button"] ? (
|
|
3779
|
+
m.$slots["toolbar-button"] ? (p(), j("div", qs, [
|
|
3770
3780
|
te(m.$slots, "toolbar-button", {}, void 0, !0)
|
|
3771
3781
|
])) : J("", !0)
|
|
3772
3782
|
], 512), [
|
|
3773
3783
|
[$e, s(k)]
|
|
3774
3784
|
])
|
|
3775
3785
|
]),
|
|
3776
|
-
actions: b(({ row: k, rowKey:
|
|
3777
|
-
|
|
3786
|
+
actions: b(({ row: k, rowKey: S, rowValue: K }) => [
|
|
3787
|
+
P("div", {
|
|
3778
3788
|
class: "actions-container",
|
|
3779
3789
|
"data-testid": k.name
|
|
3780
3790
|
}, [
|
|
3781
|
-
|
|
3791
|
+
$(A, {
|
|
3782
3792
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3783
3793
|
width: e.dropdownMenuWidth
|
|
3784
3794
|
}, {
|
|
3785
3795
|
items: b(() => [
|
|
3786
3796
|
te(m.$slots, "actions", {
|
|
3787
3797
|
row: k,
|
|
3788
|
-
rowKey:
|
|
3789
|
-
rowValue:
|
|
3798
|
+
rowKey: S,
|
|
3799
|
+
rowValue: K
|
|
3790
3800
|
}, void 0, !0)
|
|
3791
3801
|
]),
|
|
3792
3802
|
default: b(() => [
|
|
3793
|
-
|
|
3803
|
+
$(L, {
|
|
3794
3804
|
class: "actions-trigger",
|
|
3795
3805
|
"data-testid": "overflow-actions-button",
|
|
3796
3806
|
size: "small"
|
|
3797
3807
|
}, {
|
|
3798
3808
|
icon: b(() => [
|
|
3799
|
-
|
|
3809
|
+
$(F, {
|
|
3800
3810
|
color: h(ua),
|
|
3801
3811
|
icon: "more",
|
|
3802
3812
|
size: "16"
|
|
@@ -3807,24 +3817,24 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3807
3817
|
]),
|
|
3808
3818
|
_: 2
|
|
3809
3819
|
}, 1032, ["width"])
|
|
3810
|
-
], 8,
|
|
3820
|
+
], 8, Ls)
|
|
3811
3821
|
]),
|
|
3812
3822
|
_: 2
|
|
3813
3823
|
}, [
|
|
3814
|
-
ye(e.tableHeaders, (k,
|
|
3815
|
-
name:
|
|
3816
|
-
fn: b(({ row:
|
|
3817
|
-
|
|
3818
|
-
"key-name": String(
|
|
3819
|
-
"row-el": c(
|
|
3824
|
+
ye(e.tableHeaders, (k, S) => ({
|
|
3825
|
+
name: S,
|
|
3826
|
+
fn: b(({ row: K, rowKey: G, rowValue: ae }) => [
|
|
3827
|
+
$(Fs, {
|
|
3828
|
+
"key-name": String(S),
|
|
3829
|
+
"row-el": c(K)
|
|
3820
3830
|
}, {
|
|
3821
3831
|
default: b(() => [
|
|
3822
|
-
te(m.$slots,
|
|
3823
|
-
row:
|
|
3832
|
+
te(m.$slots, S, {
|
|
3833
|
+
row: K,
|
|
3824
3834
|
rowKey: G,
|
|
3825
3835
|
rowValue: ae
|
|
3826
3836
|
}, () => [
|
|
3827
|
-
|
|
3837
|
+
Z(N(ae), 1)
|
|
3828
3838
|
], !0)
|
|
3829
3839
|
]),
|
|
3830
3840
|
_: 2
|
|
@@ -3834,7 +3844,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3834
3844
|
e.query ? void 0 : {
|
|
3835
3845
|
name: "empty-state-action-icon",
|
|
3836
3846
|
fn: b(() => [
|
|
3837
|
-
|
|
3847
|
+
$(h(os))
|
|
3838
3848
|
]),
|
|
3839
3849
|
key: "0"
|
|
3840
3850
|
}
|
|
@@ -3844,13 +3854,13 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3844
3854
|
}, 8, ["title"]);
|
|
3845
3855
|
};
|
|
3846
3856
|
}
|
|
3847
|
-
}),
|
|
3857
|
+
}), Ps = /* @__PURE__ */ be(Bs, [["__scopeId", "data-v-273124cf"]]), Us = {
|
|
3848
3858
|
key: 0,
|
|
3849
3859
|
class: "kong-ui-entity-delete-error"
|
|
3850
3860
|
}, Rs = {
|
|
3851
3861
|
key: 1,
|
|
3852
3862
|
class: "description"
|
|
3853
|
-
},
|
|
3863
|
+
}, Vs = /* @__PURE__ */ X({
|
|
3854
3864
|
__name: "EntityDeleteModal",
|
|
3855
3865
|
props: {
|
|
3856
3866
|
visible: {
|
|
@@ -3896,7 +3906,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3896
3906
|
};
|
|
3897
3907
|
return (l, u) => {
|
|
3898
3908
|
const d = U("KAlert"), c = U("KPrompt");
|
|
3899
|
-
return
|
|
3909
|
+
return p(), D(c, {
|
|
3900
3910
|
"action-button-appearance": "danger",
|
|
3901
3911
|
"action-button-disabled": e.actionPending,
|
|
3902
3912
|
"action-button-text": "Yes, delete",
|
|
@@ -3908,35 +3918,35 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3908
3918
|
onProceed: s
|
|
3909
3919
|
}, {
|
|
3910
3920
|
default: b(() => [
|
|
3911
|
-
e.error ? (
|
|
3912
|
-
|
|
3921
|
+
e.error ? (p(), j("div", Us, [
|
|
3922
|
+
$(d, { appearance: "danger" }, {
|
|
3913
3923
|
default: b(() => [
|
|
3914
|
-
|
|
3924
|
+
Z(N(e.error), 1)
|
|
3915
3925
|
]),
|
|
3916
3926
|
_: 1
|
|
3917
3927
|
})
|
|
3918
3928
|
])) : J("", !0),
|
|
3919
|
-
|
|
3929
|
+
$(h(t), {
|
|
3920
3930
|
class: "message",
|
|
3921
3931
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3922
3932
|
tag: "p"
|
|
3923
|
-
},
|
|
3933
|
+
}, Le({
|
|
3924
3934
|
entityType: b(() => [
|
|
3925
|
-
|
|
3935
|
+
Z(N(r.entityType), 1)
|
|
3926
3936
|
]),
|
|
3927
3937
|
_: 2
|
|
3928
3938
|
}, [
|
|
3929
3939
|
r.entityName ? {
|
|
3930
3940
|
name: "entityName",
|
|
3931
3941
|
fn: b(() => [
|
|
3932
|
-
|
|
3942
|
+
P("strong", null, N(r.entityName), 1)
|
|
3933
3943
|
]),
|
|
3934
3944
|
key: "0"
|
|
3935
3945
|
} : void 0
|
|
3936
3946
|
]), 1032, ["keypath"]),
|
|
3937
|
-
r.description || l.$slots.description ? (
|
|
3947
|
+
r.description || l.$slots.description ? (p(), j("div", Rs, [
|
|
3938
3948
|
te(l.$slots, "description", {}, () => [
|
|
3939
|
-
|
|
3949
|
+
P("p", null, N(r.description), 1)
|
|
3940
3950
|
], !0)
|
|
3941
3951
|
])) : J("", !0)
|
|
3942
3952
|
]),
|
|
@@ -3944,13 +3954,13 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3944
3954
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3945
3955
|
};
|
|
3946
3956
|
}
|
|
3947
|
-
}),
|
|
3957
|
+
}), Ds = /* @__PURE__ */ be(Vs, [["__scopeId", "data-v-4361d622"]]), zs = {
|
|
3948
3958
|
fill: "none",
|
|
3949
3959
|
height: "20",
|
|
3950
3960
|
viewBox: "0 0 20 20",
|
|
3951
3961
|
width: "20",
|
|
3952
3962
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3953
|
-
},
|
|
3963
|
+
}, Gs = {
|
|
3954
3964
|
id: "mask0_180_20349",
|
|
3955
3965
|
height: "20",
|
|
3956
3966
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3958,7 +3968,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3958
3968
|
width: "20",
|
|
3959
3969
|
x: "0",
|
|
3960
3970
|
y: "0"
|
|
3961
|
-
},
|
|
3971
|
+
}, Hs = ["fill"], Js = { mask: "url(#mask0_180_20349)" }, Ys = ["fill"], fn = /* @__PURE__ */ X({
|
|
3962
3972
|
__name: "IconFilter",
|
|
3963
3973
|
props: {
|
|
3964
3974
|
color: {
|
|
@@ -3967,26 +3977,26 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
3967
3977
|
}
|
|
3968
3978
|
},
|
|
3969
3979
|
setup(e) {
|
|
3970
|
-
return (n, t) => (
|
|
3971
|
-
|
|
3972
|
-
|
|
3980
|
+
return (n, t) => (p(), j("svg", zs, [
|
|
3981
|
+
P("mask", Gs, [
|
|
3982
|
+
P("rect", {
|
|
3973
3983
|
fill: e.color,
|
|
3974
3984
|
height: "20",
|
|
3975
3985
|
width: "20"
|
|
3976
|
-
}, null, 8,
|
|
3986
|
+
}, null, 8, Hs)
|
|
3977
3987
|
]),
|
|
3978
|
-
|
|
3979
|
-
|
|
3988
|
+
P("g", Js, [
|
|
3989
|
+
P("path", {
|
|
3980
3990
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3981
3991
|
fill: e.color
|
|
3982
|
-
}, null, 8,
|
|
3992
|
+
}, null, 8, Ys)
|
|
3983
3993
|
])
|
|
3984
3994
|
]));
|
|
3985
3995
|
}
|
|
3986
|
-
}),
|
|
3996
|
+
}), Ws = {
|
|
3987
3997
|
key: 1,
|
|
3988
3998
|
class: "kong-ui-entity-filter"
|
|
3989
|
-
},
|
|
3999
|
+
}, Zs = { class: "kong-ui-entity-filter-menu" }, Qs = ["data-testid"], Xs = ["onClick", "onKeydown"], el = { class: "menu-item-indicator" }, tl = { class: "menu-item-body" }, nl = ["for"], rl = { class: "menu-item-buttons" }, al = { class: "filter-clear-button-container" }, ol = /* @__PURE__ */ X({
|
|
3990
4000
|
__name: "EntityFilter",
|
|
3991
4001
|
props: {
|
|
3992
4002
|
// filter config, either exact match or fuzzy match
|
|
@@ -4030,7 +4040,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4030
4040
|
s.value.has(y) ? s.value.delete(y) : s.value.add(y);
|
|
4031
4041
|
}, v = (y) => {
|
|
4032
4042
|
a("update:modelValue", y);
|
|
4033
|
-
},
|
|
4043
|
+
}, f = () => {
|
|
4034
4044
|
v("");
|
|
4035
4045
|
}, I = (y) => `filter-${y}`, w = (y) => {
|
|
4036
4046
|
var m, g;
|
|
@@ -4041,12 +4051,12 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4041
4051
|
}, _ = (y) => {
|
|
4042
4052
|
var m, g;
|
|
4043
4053
|
return ((g = (m = r.config.schema) == null ? void 0 : m[y]) == null ? void 0 : g.type) ?? "text";
|
|
4044
|
-
},
|
|
4054
|
+
}, R = (y) => {
|
|
4045
4055
|
o.value = {
|
|
4046
4056
|
...o.value,
|
|
4047
4057
|
[y]: ""
|
|
4048
4058
|
}, W();
|
|
4049
|
-
},
|
|
4059
|
+
}, q = () => {
|
|
4050
4060
|
o.value = {}, W(!0);
|
|
4051
4061
|
}, W = (y = !1) => {
|
|
4052
4062
|
const m = Object.keys(o.value).reduce((g, F) => (o.value[F] && (g[F] = `${o.value[F]}`), g), {});
|
|
@@ -4054,7 +4064,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4054
4064
|
};
|
|
4055
4065
|
return (y, m) => {
|
|
4056
4066
|
const g = U("KInput"), F = U("KButton"), L = U("KSelect");
|
|
4057
|
-
return e.config.isExactMatch ? (
|
|
4067
|
+
return e.config.isExactMatch ? (p(), D(g, {
|
|
4058
4068
|
key: 0,
|
|
4059
4069
|
autocomplete: "off",
|
|
4060
4070
|
class: "kong-ui-entity-filter-input",
|
|
@@ -4064,119 +4074,119 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4064
4074
|
"onUpdate:modelValue": v
|
|
4065
4075
|
}, {
|
|
4066
4076
|
before: b(() => [
|
|
4067
|
-
|
|
4077
|
+
$(fn)
|
|
4068
4078
|
]),
|
|
4069
4079
|
after: b(() => [
|
|
4070
|
-
|
|
4080
|
+
Te($(h(_s), {
|
|
4071
4081
|
class: "kong-ui-entity-filter-clear",
|
|
4072
|
-
onClick:
|
|
4082
|
+
onClick: f
|
|
4073
4083
|
}, null, 512), [
|
|
4074
4084
|
[$e, e.modelValue !== ""]
|
|
4075
4085
|
])
|
|
4076
4086
|
]),
|
|
4077
4087
|
_: 1
|
|
4078
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
4079
|
-
|
|
4088
|
+
}, 8, ["model-value", "placeholder"])) : (p(), j("div", Ws, [
|
|
4089
|
+
$(F, {
|
|
4080
4090
|
appearance: "tertiary",
|
|
4081
4091
|
"data-testid": "filter-button",
|
|
4082
4092
|
onClick: d
|
|
4083
4093
|
}, {
|
|
4084
4094
|
default: b(() => [
|
|
4085
|
-
|
|
4086
|
-
|
|
4095
|
+
$(fn),
|
|
4096
|
+
Z(" " + N(h(t)("filter.filterButtonText")) + " " + N(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
4087
4097
|
]),
|
|
4088
4098
|
_: 1
|
|
4089
4099
|
}),
|
|
4090
|
-
|
|
4100
|
+
Te(P("div", {
|
|
4091
4101
|
class: "kong-ui-entity-filter-backdrop",
|
|
4092
4102
|
onClick: d
|
|
4093
4103
|
}, null, 512), [
|
|
4094
4104
|
[$e, i.value]
|
|
4095
4105
|
]),
|
|
4096
|
-
|
|
4097
|
-
(
|
|
4106
|
+
Te(P("div", Zs, [
|
|
4107
|
+
(p(!0), j(ve, null, ye(u.value, (A) => {
|
|
4098
4108
|
var z, O;
|
|
4099
|
-
return
|
|
4100
|
-
key:
|
|
4109
|
+
return p(), j("div", {
|
|
4110
|
+
key: A.value,
|
|
4101
4111
|
class: "kong-ui-entity-filter-menu-item",
|
|
4102
|
-
"data-testid":
|
|
4112
|
+
"data-testid": A.value
|
|
4103
4113
|
}, [
|
|
4104
|
-
|
|
4105
|
-
class:
|
|
4114
|
+
P("span", {
|
|
4115
|
+
class: Ee(["menu-item-title", { expanded: s.value.has(A.value) }]),
|
|
4106
4116
|
role: "button",
|
|
4107
4117
|
tabindex: "0",
|
|
4108
|
-
onClick: (k) => c(
|
|
4109
|
-
onKeydown: vr((k) => c(
|
|
4118
|
+
onClick: (k) => c(A.value),
|
|
4119
|
+
onKeydown: vr((k) => c(A.value), ["enter"])
|
|
4110
4120
|
}, [
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
[$e, l.value.includes(
|
|
4121
|
+
Z(N(A.label) + " ", 1),
|
|
4122
|
+
Te(P("span", el, null, 512), [
|
|
4123
|
+
[$e, l.value.includes(A.value)]
|
|
4114
4124
|
]),
|
|
4115
|
-
|
|
4116
|
-
class:
|
|
4125
|
+
$(h(ys), {
|
|
4126
|
+
class: Ee(["menu-item-expand-icon", { expanded: s.value.has(A.value) }]),
|
|
4117
4127
|
color: h(ca)
|
|
4118
4128
|
}, null, 8, ["class", "color"])
|
|
4119
|
-
], 42,
|
|
4120
|
-
|
|
4121
|
-
|
|
4129
|
+
], 42, Xs),
|
|
4130
|
+
Te(P("div", tl, [
|
|
4131
|
+
P("label", {
|
|
4122
4132
|
class: "menu-item-label",
|
|
4123
|
-
for: I(
|
|
4124
|
-
}, N(h(t)("filter.fieldLabel")), 9,
|
|
4125
|
-
((O = (z = e.config.schema) == null ? void 0 : z[
|
|
4133
|
+
for: I(A.value)
|
|
4134
|
+
}, N(h(t)("filter.fieldLabel")), 9, nl),
|
|
4135
|
+
((O = (z = e.config.schema) == null ? void 0 : z[A.value]) == null ? void 0 : O.type) === "select" ? (p(), D(L, {
|
|
4126
4136
|
key: 0,
|
|
4127
|
-
id: I(
|
|
4128
|
-
modelValue: o.value[
|
|
4129
|
-
"onUpdate:modelValue": (k) => o.value[
|
|
4130
|
-
items: w(
|
|
4137
|
+
id: I(A.value),
|
|
4138
|
+
modelValue: o.value[A.value],
|
|
4139
|
+
"onUpdate:modelValue": (k) => o.value[A.value] = k,
|
|
4140
|
+
items: w(A.value),
|
|
4131
4141
|
placeholder: h(t)("filter.selectPlaceholder")
|
|
4132
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
4142
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (p(), D(g, {
|
|
4133
4143
|
key: 1,
|
|
4134
|
-
id: I(
|
|
4135
|
-
modelValue: o.value[
|
|
4136
|
-
"onUpdate:modelValue": (k) => o.value[
|
|
4144
|
+
id: I(A.value),
|
|
4145
|
+
modelValue: o.value[A.value],
|
|
4146
|
+
"onUpdate:modelValue": (k) => o.value[A.value] = k,
|
|
4137
4147
|
autocomplete: "off",
|
|
4138
4148
|
placeholder: h(t)("filter.inputPlaceholder"),
|
|
4139
|
-
type: _(
|
|
4149
|
+
type: _(A.value)
|
|
4140
4150
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4141
4151
|
], 512), [
|
|
4142
|
-
[$e, s.value.has(
|
|
4152
|
+
[$e, s.value.has(A.value)]
|
|
4143
4153
|
]),
|
|
4144
|
-
|
|
4145
|
-
|
|
4154
|
+
Te(P("div", rl, [
|
|
4155
|
+
$(F, {
|
|
4146
4156
|
appearance: "tertiary",
|
|
4147
4157
|
"data-testid": "apply-filter",
|
|
4148
4158
|
size: "small",
|
|
4149
4159
|
onClick: m[0] || (m[0] = (k) => W(!0))
|
|
4150
4160
|
}, {
|
|
4151
4161
|
default: b(() => [
|
|
4152
|
-
|
|
4162
|
+
Z(N(h(t)("filter.applyButtonText")), 1)
|
|
4153
4163
|
]),
|
|
4154
4164
|
_: 1
|
|
4155
4165
|
}),
|
|
4156
|
-
|
|
4166
|
+
$(F, {
|
|
4157
4167
|
appearance: "tertiary",
|
|
4158
4168
|
"data-testid": "clear-filter",
|
|
4159
4169
|
size: "small",
|
|
4160
|
-
onClick: (k) =>
|
|
4170
|
+
onClick: (k) => R(A.value)
|
|
4161
4171
|
}, {
|
|
4162
4172
|
default: b(() => [
|
|
4163
|
-
|
|
4173
|
+
Z(N(h(t)("filter.clearButtonText")), 1)
|
|
4164
4174
|
]),
|
|
4165
4175
|
_: 2
|
|
4166
4176
|
}, 1032, ["onClick"])
|
|
4167
4177
|
], 512), [
|
|
4168
|
-
[$e, s.value.has(
|
|
4178
|
+
[$e, s.value.has(A.value)]
|
|
4169
4179
|
])
|
|
4170
|
-
], 8,
|
|
4180
|
+
], 8, Qs);
|
|
4171
4181
|
}), 128)),
|
|
4172
|
-
|
|
4173
|
-
|
|
4182
|
+
P("div", al, [
|
|
4183
|
+
$(F, {
|
|
4174
4184
|
appearance: "tertiary",
|
|
4175
4185
|
size: "small",
|
|
4176
|
-
onClick:
|
|
4186
|
+
onClick: q
|
|
4177
4187
|
}, {
|
|
4178
4188
|
default: b(() => [
|
|
4179
|
-
|
|
4189
|
+
Z(N(h(t)("filter.clearAllButtonText")), 1)
|
|
4180
4190
|
]),
|
|
4181
4191
|
_: 1
|
|
4182
4192
|
})
|
|
@@ -4187,7 +4197,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4187
4197
|
]));
|
|
4188
4198
|
};
|
|
4189
4199
|
}
|
|
4190
|
-
}),
|
|
4200
|
+
}), il = /* @__PURE__ */ be(ol, [["__scopeId", "data-v-8cfadde3"]]), nt = /* @__PURE__ */ X({
|
|
4191
4201
|
__name: "PermissionsWrapper",
|
|
4192
4202
|
props: {
|
|
4193
4203
|
/**
|
|
@@ -4217,22 +4227,23 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4217
4227
|
isAllowed: t.value
|
|
4218
4228
|
}) : J("", !0);
|
|
4219
4229
|
}
|
|
4220
|
-
}),
|
|
4221
|
-
key: 0,
|
|
4222
|
-
class: "form-section-title"
|
|
4223
|
-
}, cl = {
|
|
4230
|
+
}), sl = { class: "form-section-wrapper" }, ll = {
|
|
4224
4231
|
key: 1,
|
|
4225
4232
|
class: "form-section-description"
|
|
4226
|
-
},
|
|
4233
|
+
}, ul = {
|
|
4227
4234
|
key: 2,
|
|
4228
4235
|
class: "form-section-footer"
|
|
4229
|
-
},
|
|
4236
|
+
}, cl = { class: "form-section-content" }, dl = /* @__PURE__ */ X({
|
|
4230
4237
|
__name: "EntityFormSection",
|
|
4231
4238
|
props: {
|
|
4232
4239
|
title: {
|
|
4233
4240
|
type: String,
|
|
4234
4241
|
default: ""
|
|
4235
4242
|
},
|
|
4243
|
+
titleTag: {
|
|
4244
|
+
type: String,
|
|
4245
|
+
default: "h2"
|
|
4246
|
+
},
|
|
4236
4247
|
description: {
|
|
4237
4248
|
type: String,
|
|
4238
4249
|
default: ""
|
|
@@ -4251,35 +4262,43 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4251
4262
|
}
|
|
4252
4263
|
},
|
|
4253
4264
|
setup(e) {
|
|
4254
|
-
const n =
|
|
4255
|
-
return (t, r) => (
|
|
4256
|
-
class:
|
|
4265
|
+
const n = St();
|
|
4266
|
+
return (t, r) => (p(), j("fieldset", {
|
|
4267
|
+
class: Ee(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4257
4268
|
}, [
|
|
4258
|
-
|
|
4259
|
-
e.hideInfoHeader ? J("", !0) : (
|
|
4269
|
+
P("div", sl, [
|
|
4270
|
+
e.hideInfoHeader ? J("", !0) : (p(), j("div", {
|
|
4260
4271
|
key: 0,
|
|
4261
|
-
class:
|
|
4272
|
+
class: Ee(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4262
4273
|
}, [
|
|
4263
|
-
e.title ? (
|
|
4264
|
-
|
|
4274
|
+
e.title ? (p(), D(Se(e.titleTag), {
|
|
4275
|
+
key: 0,
|
|
4276
|
+
class: "form-section-title"
|
|
4277
|
+
}, {
|
|
4278
|
+
default: b(() => [
|
|
4279
|
+
Z(N(e.title), 1)
|
|
4280
|
+
]),
|
|
4281
|
+
_: 1
|
|
4282
|
+
})) : J("", !0),
|
|
4283
|
+
e.description || h(n).description ? (p(), j("div", ll, [
|
|
4265
4284
|
te(t.$slots, "description", {}, () => [
|
|
4266
|
-
|
|
4285
|
+
P("p", null, N(e.description), 1)
|
|
4267
4286
|
], !0)
|
|
4268
4287
|
])) : J("", !0),
|
|
4269
|
-
h(n).footer ? (
|
|
4288
|
+
h(n).footer ? (p(), j("div", ul, [
|
|
4270
4289
|
te(t.$slots, "footer", {}, void 0, !0)
|
|
4271
4290
|
])) : J("", !0)
|
|
4272
4291
|
], 2)),
|
|
4273
|
-
|
|
4292
|
+
P("div", cl, [
|
|
4274
4293
|
te(t.$slots, "default", {}, void 0, !0)
|
|
4275
4294
|
])
|
|
4276
4295
|
])
|
|
4277
4296
|
], 2));
|
|
4278
4297
|
}
|
|
4279
|
-
}), mn = /* @__PURE__ */ be(
|
|
4298
|
+
}), mn = /* @__PURE__ */ be(dl, [["__scopeId", "data-v-04c961fd"]]), { useAxios: qt, useDeleteUrlBuilder: pl, useErrors: fl, useExternalLinkCreator: Fl, useFetchUrlBuilder: Kl, useFetcher: ml, useDebouncedFilter: mr, useStringHelpers: ql, useHelpers: Ll, useGatewayFeatureSupported: Bl, useTruncationDetector: Pl } = se, gl = { class: "add-to-group-form-container" }, hl = { class: "add-to-group-cta-text" }, yl = {
|
|
4280
4299
|
key: 0,
|
|
4281
4300
|
class: "kong-ui-entity-add-to-groups-error"
|
|
4282
|
-
},
|
|
4301
|
+
}, vl = { key: 0 }, bl = /* @__PURE__ */ X({
|
|
4283
4302
|
__name: "AddToGroupModal",
|
|
4284
4303
|
props: {
|
|
4285
4304
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4297,7 +4316,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4297
4316
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4298
4317
|
setup(e, { emit: n }) {
|
|
4299
4318
|
var O;
|
|
4300
|
-
const { i18n: { t } } = ft.useI18n(), r = e, a = n, { axiosInstance: i } =
|
|
4319
|
+
const { i18n: { t } } = ft.useI18n(), r = e, a = n, { axiosInstance: i } = qt({
|
|
4301
4320
|
headers: (O = r.config) == null ? void 0 : O.requestHeaders
|
|
4302
4321
|
}), o = E([]), {
|
|
4303
4322
|
debouncedQueryChange: s,
|
|
@@ -4308,83 +4327,83 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4308
4327
|
results: v
|
|
4309
4328
|
} = mr(
|
|
4310
4329
|
r.config,
|
|
4311
|
-
|
|
4330
|
+
je.list[r.config.app].all,
|
|
4312
4331
|
"",
|
|
4313
4332
|
{
|
|
4314
4333
|
fetchedItemsKey: "data",
|
|
4315
4334
|
searchKeys: ["name", "id"]
|
|
4316
4335
|
}
|
|
4317
|
-
),
|
|
4336
|
+
), f = x(() => d.value ? t("consumer_groups.errors.general") : ""), I = E(0), w = x(() => u.value === void 0), _ = x(() => v.value.map((k) => ({
|
|
4318
4337
|
label: k.name,
|
|
4319
4338
|
value: k.id,
|
|
4320
4339
|
selected: o.value.includes(k.id),
|
|
4321
4340
|
data: k
|
|
4322
4341
|
// we need this to determine whether or not to show the description text
|
|
4323
|
-
}))),
|
|
4324
|
-
var
|
|
4325
|
-
const
|
|
4326
|
-
return
|
|
4327
|
-
},
|
|
4328
|
-
m.value = "", W.value = [],
|
|
4342
|
+
}))), R = (k) => {
|
|
4343
|
+
var K;
|
|
4344
|
+
const S = w.value ? v.value.find((G) => G.id === k) : (K = u.value) == null ? void 0 : K.find((G) => G.id === k);
|
|
4345
|
+
return S ? S.name : k;
|
|
4346
|
+
}, q = () => {
|
|
4347
|
+
m.value = "", W.value = [], A.value = [], a("cancel");
|
|
4329
4348
|
}, W = E([]), y = E(!1), m = E(""), g = async () => {
|
|
4330
4349
|
if (!o.value.length) {
|
|
4331
|
-
m.value = "",
|
|
4350
|
+
m.value = "", A.value = [], a("cancel");
|
|
4332
4351
|
return;
|
|
4333
4352
|
}
|
|
4334
|
-
y.value = !0, m.value = "", W.value = [],
|
|
4353
|
+
y.value = !0, m.value = "", W.value = [], A.value = [];
|
|
4335
4354
|
try {
|
|
4336
|
-
const k = o.value.map((G) => L(G)),
|
|
4337
|
-
let
|
|
4338
|
-
|
|
4339
|
-
G.status !== "fulfilled" && (
|
|
4340
|
-
}),
|
|
4355
|
+
const k = o.value.map((G) => L(G)), S = await Promise.allSettled(k);
|
|
4356
|
+
let K = !0;
|
|
4357
|
+
S.forEach((G) => {
|
|
4358
|
+
G.status !== "fulfilled" && (K = !1);
|
|
4359
|
+
}), K ? (W.value = [], A.value = [], a("add:success", o.value), o.value = []) : (W.value.length && a("add:partial-success", W.value), o.value = [], z(S));
|
|
4341
4360
|
} catch {
|
|
4342
4361
|
m.value = t("consumer_groups.errors.add"), a("error", m.value);
|
|
4343
4362
|
} finally {
|
|
4344
4363
|
y.value = !1;
|
|
4345
4364
|
}
|
|
4346
4365
|
}, F = x(() => {
|
|
4347
|
-
var
|
|
4348
|
-
let k = `${r.config.apiBaseUrl}${
|
|
4349
|
-
return r.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((
|
|
4366
|
+
var S, K, G, ae;
|
|
4367
|
+
let k = `${r.config.apiBaseUrl}${je.list[r.config.app].forConsumer}`;
|
|
4368
|
+
return r.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((S = r.config) == null ? void 0 : S.controlPlaneId) || "").replace(/{consumerId}/gi, ((K = r.config) == null ? void 0 : K.consumerId) || "") : r.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (G = r.config) != null && G.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((ae = r.config) == null ? void 0 : ae.consumerId) || "")), k;
|
|
4350
4369
|
}), L = async (k) => {
|
|
4351
|
-
const
|
|
4370
|
+
const S = {
|
|
4352
4371
|
group: k
|
|
4353
4372
|
};
|
|
4354
4373
|
try {
|
|
4355
|
-
const
|
|
4356
|
-
return W.value.push(k),
|
|
4357
|
-
} catch (
|
|
4358
|
-
let G = `${
|
|
4359
|
-
return
|
|
4374
|
+
const K = await i.post(F.value, S);
|
|
4375
|
+
return W.value.push(k), K;
|
|
4376
|
+
} catch (K) {
|
|
4377
|
+
let G = `${R(k)} - ${K.message}`;
|
|
4378
|
+
return K.response.status === 409 && (G = `${R(k)} - ${t("consumer_groups.errors.already_added")}`), Promise.reject(Error(G));
|
|
4360
4379
|
}
|
|
4361
|
-
},
|
|
4362
|
-
|
|
4363
|
-
var
|
|
4364
|
-
return (
|
|
4380
|
+
}, A = E([]), z = (k) => {
|
|
4381
|
+
A.value = k.map((S) => {
|
|
4382
|
+
var K;
|
|
4383
|
+
return (K = S.reason) == null ? void 0 : K.message;
|
|
4365
4384
|
}).filter(Boolean);
|
|
4366
4385
|
};
|
|
4367
4386
|
return xe(_, () => {
|
|
4368
4387
|
I.value++;
|
|
4369
4388
|
}, { immediate: !0, deep: !0 }), xe(() => r.visible, () => {
|
|
4370
4389
|
r.visible && c();
|
|
4371
|
-
}, { immediate: !0 }), (k,
|
|
4372
|
-
const
|
|
4373
|
-
return
|
|
4390
|
+
}, { immediate: !0 }), (k, S) => {
|
|
4391
|
+
const K = U("KMultiselect"), G = U("KAlert"), ae = U("KPrompt");
|
|
4392
|
+
return p(), D(ae, {
|
|
4374
4393
|
"action-button-disabled": y.value,
|
|
4375
4394
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
4376
4395
|
"data-testid": "add-to-group-modal",
|
|
4377
4396
|
title: h(t)("consumer_groups.consumers.add.title"),
|
|
4378
4397
|
visible: e.visible,
|
|
4379
|
-
onCancel:
|
|
4398
|
+
onCancel: q,
|
|
4380
4399
|
onProceed: g
|
|
4381
4400
|
}, {
|
|
4382
4401
|
default: b(() => [
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4402
|
+
P("div", gl, [
|
|
4403
|
+
P("p", hl, N(h(t)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4404
|
+
$(K, {
|
|
4386
4405
|
modelValue: o.value,
|
|
4387
|
-
"onUpdate:modelValue":
|
|
4406
|
+
"onUpdate:modelValue": S[0] || (S[0] = (ue) => o.value = ue),
|
|
4388
4407
|
autosuggest: "",
|
|
4389
4408
|
"data-testid": "add-to-groups-multiselect",
|
|
4390
4409
|
"dropdown-footer-text": w.value ? h(t)("consumer_groups.consumers.add.footer") : void 0,
|
|
@@ -4397,14 +4416,14 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4397
4416
|
width: "100%",
|
|
4398
4417
|
onQueryChange: h(s)
|
|
4399
4418
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4400
|
-
m.value ||
|
|
4401
|
-
|
|
4419
|
+
m.value || f.value || A.value.length ? (p(), j("div", yl, [
|
|
4420
|
+
$(G, { appearance: "danger" }, {
|
|
4402
4421
|
default: b(() => [
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
(
|
|
4422
|
+
P("p", null, N(h(t)("consumer_groups.errors.add")), 1),
|
|
4423
|
+
A.value.length ? (p(), j("ul", vl, [
|
|
4424
|
+
(p(!0), j(ve, null, ye(A.value, (ue, Ge) => (p(), j("li", { key: Ge }, N(ue), 1))), 128))
|
|
4406
4425
|
])) : J("", !0),
|
|
4407
|
-
|
|
4426
|
+
P("div", null, N(m.value || f.value), 1)
|
|
4408
4427
|
]),
|
|
4409
4428
|
_: 1
|
|
4410
4429
|
})
|
|
@@ -4420,7 +4439,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4420
4439
|
for (const [r, a] of n)
|
|
4421
4440
|
t[r] = a;
|
|
4422
4441
|
return t;
|
|
4423
|
-
},
|
|
4442
|
+
}, kl = /* @__PURE__ */ Lt(bl, [["__scopeId", "data-v-303b382c"]]), Cl = { class: "kong-ui-entities-consumer-groups-list" }, wl = { key: 1 }, _l = /* @__PURE__ */ X({
|
|
4424
4443
|
__name: "ConsumerGroupList",
|
|
4425
4444
|
props: {
|
|
4426
4445
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4467,7 +4486,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4467
4486
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4468
4487
|
setup(e, { emit: n }) {
|
|
4469
4488
|
var Ut;
|
|
4470
|
-
const t = n, r = e, { i18nT: a, i18n: { t: i } } = ft.useI18n(), o =
|
|
4489
|
+
const t = n, r = e, { i18nT: a, i18n: { t: i } } = ft.useI18n(), o = Tt(), { axiosInstance: s } = qt({
|
|
4471
4490
|
headers: (Ut = r.config) == null ? void 0 : Ut.requestHeaders
|
|
4472
4491
|
}), l = E(1), u = x(() => !!r.config.consumerId), d = x(
|
|
4473
4492
|
() => u.value ? "kong-ui-entities-consumer-groups-list-in-consumer-page" : "kong-ui-entities-consumer-groups-list"
|
|
@@ -4475,79 +4494,79 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4475
4494
|
name: { label: i("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4476
4495
|
};
|
|
4477
4496
|
r.config.app === "kongManager" && (v.consumers_count = { label: i("consumer_groups.list.table_headers.consumers_count"), searchable: !1, sortable: !1 }), v.tags = { label: i("consumer_groups.list.table_headers.tags"), sortable: !1 };
|
|
4478
|
-
const
|
|
4479
|
-
"data-testid":
|
|
4497
|
+
const f = v, I = (T) => ({
|
|
4498
|
+
"data-testid": T.username ?? T.custom_id ?? T.id
|
|
4480
4499
|
}), w = x(() => {
|
|
4481
4500
|
var Y, re, me, Ce;
|
|
4482
|
-
let
|
|
4483
|
-
return r.config.app === "konnect" ?
|
|
4484
|
-
}), _ = E(""),
|
|
4485
|
-
const
|
|
4486
|
-
return
|
|
4487
|
-
isExactMatch:
|
|
4501
|
+
let T = `${r.config.apiBaseUrl}${je.list[r.config.app][u.value ? "forConsumer" : "all"]}`;
|
|
4502
|
+
return r.config.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, ((Y = r.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = r.config) == null ? void 0 : re.consumerId) || "") : r.config.app === "kongManager" && (T = T.replace(/\/{workspace}/gi, (me = r.config) != null && me.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((Ce = r.config) == null ? void 0 : Ce.consumerId) || "")), T;
|
|
4503
|
+
}), _ = E(""), R = x(() => {
|
|
4504
|
+
const T = r.config.app === "konnect" || r.config.isExactMatch;
|
|
4505
|
+
return T ? {
|
|
4506
|
+
isExactMatch: T,
|
|
4488
4507
|
fields: {
|
|
4489
4508
|
username: v.name,
|
|
4490
4509
|
id: { label: i("consumer_groups.list.table_headers.id") }
|
|
4491
4510
|
},
|
|
4492
4511
|
placeholder: i("consumer_groups.search.placeholder")
|
|
4493
4512
|
} : {
|
|
4494
|
-
isExactMatch:
|
|
4513
|
+
isExactMatch: T,
|
|
4495
4514
|
fields: {
|
|
4496
4515
|
name: v.name
|
|
4497
4516
|
},
|
|
4498
4517
|
schema: r.config.filterSchema
|
|
4499
4518
|
};
|
|
4500
|
-
}),
|
|
4519
|
+
}), q = x(() => u.value && !r.config.paginatedEndpoint ? "consumer_groups" : void 0), { fetcher: W, fetcherState: y } = ml(r.config, w.value, q.value), m = () => {
|
|
4501
4520
|
_.value = "";
|
|
4502
4521
|
}, g = () => {
|
|
4503
4522
|
l.value++;
|
|
4504
|
-
}, F = E(null), L = (
|
|
4505
|
-
const re =
|
|
4523
|
+
}, F = E(null), L = (T, Y) => {
|
|
4524
|
+
const re = T.id;
|
|
4506
4525
|
if (!Y(re)) {
|
|
4507
4526
|
t("copy:error", {
|
|
4508
|
-
entity:
|
|
4527
|
+
entity: T,
|
|
4509
4528
|
field: "id",
|
|
4510
4529
|
message: i("consumer_groups.errors.copy")
|
|
4511
4530
|
});
|
|
4512
4531
|
return;
|
|
4513
4532
|
}
|
|
4514
4533
|
t("copy:success", {
|
|
4515
|
-
entity:
|
|
4534
|
+
entity: T,
|
|
4516
4535
|
field: "id",
|
|
4517
4536
|
message: i("consumer_groups.copy.success", { val: re })
|
|
4518
4537
|
});
|
|
4519
|
-
},
|
|
4520
|
-
const re = JSON.stringify(
|
|
4538
|
+
}, A = (T, Y) => {
|
|
4539
|
+
const re = JSON.stringify(T);
|
|
4521
4540
|
if (!Y(re)) {
|
|
4522
4541
|
t("copy:error", {
|
|
4523
|
-
entity:
|
|
4542
|
+
entity: T,
|
|
4524
4543
|
message: i("consumer_groups.errors.copy")
|
|
4525
4544
|
});
|
|
4526
4545
|
return;
|
|
4527
4546
|
}
|
|
4528
4547
|
t("copy:success", {
|
|
4529
|
-
entity:
|
|
4548
|
+
entity: T,
|
|
4530
4549
|
message: i("consumer_groups.copy.success_brief")
|
|
4531
4550
|
});
|
|
4532
|
-
}, z = async (
|
|
4551
|
+
}, z = async (T) => {
|
|
4533
4552
|
var re;
|
|
4534
|
-
await ((re = r.canRetrieve) == null ? void 0 : re.call(r,
|
|
4535
|
-
}, O = (
|
|
4553
|
+
await ((re = r.canRetrieve) == null ? void 0 : re.call(r, T)) && o.push(r.config.getViewRoute(T.id));
|
|
4554
|
+
}, O = (T) => ({
|
|
4536
4555
|
label: i("consumer_groups.actions.view"),
|
|
4537
|
-
to: r.config.getViewRoute(
|
|
4538
|
-
}), k = (
|
|
4556
|
+
to: r.config.getViewRoute(T)
|
|
4557
|
+
}), k = (T) => ({
|
|
4539
4558
|
label: i("consumer_groups.actions.edit"),
|
|
4540
|
-
to: r.config.getEditRoute(
|
|
4541
|
-
}),
|
|
4542
|
-
|
|
4559
|
+
to: r.config.getEditRoute(T)
|
|
4560
|
+
}), S = E(void 0), K = E(!1), G = E(!1), ae = E(""), ue = pl(r.config, w.value), Ge = (T) => {
|
|
4561
|
+
S.value = T, K.value = !0;
|
|
4543
4562
|
}, Xe = () => {
|
|
4544
|
-
|
|
4563
|
+
K.value = !1;
|
|
4545
4564
|
}, et = async () => {
|
|
4546
|
-
var
|
|
4547
|
-
if ((
|
|
4565
|
+
var T, Y, re;
|
|
4566
|
+
if ((T = S.value) != null && T.id) {
|
|
4548
4567
|
G.value = !0;
|
|
4549
4568
|
try {
|
|
4550
|
-
await s.delete(ue(
|
|
4569
|
+
await s.delete(ue(S.value.id)), G.value = !1, K.value = !1, l.value++, t("delete:success", S.value);
|
|
4551
4570
|
} catch (me) {
|
|
4552
4571
|
ae.value = ((re = (Y = me.response) == null ? void 0 : Y.data) == null ? void 0 : re.message) || me.message || i("consumer_groups.errors.delete"), t("error", me);
|
|
4553
4572
|
} finally {
|
|
@@ -4556,39 +4575,39 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4556
4575
|
}
|
|
4557
4576
|
}, Be = E(!1), C = () => {
|
|
4558
4577
|
Be.value = !0;
|
|
4559
|
-
},
|
|
4578
|
+
}, B = () => {
|
|
4560
4579
|
Be.value = !1;
|
|
4561
|
-
}, ne = (
|
|
4562
|
-
Y ||
|
|
4580
|
+
}, ne = (T, Y) => {
|
|
4581
|
+
Y || B(), l.value++, t("add:success", T);
|
|
4563
4582
|
}, H = () => {
|
|
4564
4583
|
u.value && C();
|
|
4565
|
-
},
|
|
4566
|
-
|
|
4567
|
-
},
|
|
4568
|
-
ce.value = !1,
|
|
4584
|
+
}, V = E(void 0), ce = E(!1), ke = E(""), de = (T) => {
|
|
4585
|
+
V.value = T, ce.value = !0;
|
|
4586
|
+
}, Fe = () => {
|
|
4587
|
+
ce.value = !1, V.value = void 0;
|
|
4569
4588
|
}, tt = x(() => {
|
|
4570
4589
|
var Y, re, me, Ce;
|
|
4571
|
-
let
|
|
4572
|
-
return r.config.app === "konnect" ?
|
|
4590
|
+
let T = `${r.config.apiBaseUrl}${je.list[r.config.app].oneForConsumer}`;
|
|
4591
|
+
return r.config.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, ((Y = r.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = r.config) == null ? void 0 : re.consumerId) || "") : r.config.app === "kongManager" && (T = T.replace(/\/{workspace}/gi, (me = r.config) != null && me.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((Ce = r.config) == null ? void 0 : Ce.consumerId) || "")), T;
|
|
4573
4592
|
}), Bt = E(!1), gr = async () => {
|
|
4574
|
-
if (
|
|
4593
|
+
if (V.value) {
|
|
4575
4594
|
Bt.value = !0;
|
|
4576
4595
|
try {
|
|
4577
|
-
const
|
|
4578
|
-
await s.delete(
|
|
4579
|
-
} catch (
|
|
4580
|
-
ke.value =
|
|
4596
|
+
const T = tt.value.replace(/{consumerGroupId}/gi, V.value.id);
|
|
4597
|
+
await s.delete(T), t("remove:success", V.value), Fe(), l.value++;
|
|
4598
|
+
} catch (T) {
|
|
4599
|
+
ke.value = T.message || i("consumer_groups.errors.delete"), t("error", T);
|
|
4581
4600
|
} finally {
|
|
4582
4601
|
Bt.value = !1;
|
|
4583
4602
|
}
|
|
4584
4603
|
}
|
|
4585
4604
|
}, Pt = E(!0);
|
|
4586
|
-
xe(y, (
|
|
4605
|
+
xe(y, (T) => {
|
|
4587
4606
|
var Y, re, me, Ce;
|
|
4588
|
-
if (Array.isArray((Y =
|
|
4607
|
+
if (Array.isArray((Y = T == null ? void 0 : T.response) == null ? void 0 : Y.data) && (Pt.value = T.response.data.length > 0), T.status === Ke.Error) {
|
|
4589
4608
|
F.value = {
|
|
4590
4609
|
title: i("consumer_groups.errors.general")
|
|
4591
|
-
}, (Ce = (me = (re =
|
|
4610
|
+
}, (Ce = (me = (re = T.error) == null ? void 0 : re.response) == null ? void 0 : me.data) != null && Ce.message && (F.value.message = T.error.response.data.message), t("error", T.error);
|
|
4592
4611
|
return;
|
|
4593
4612
|
}
|
|
4594
4613
|
F.value = null;
|
|
@@ -4601,10 +4620,10 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4601
4620
|
});
|
|
4602
4621
|
return ut(async () => {
|
|
4603
4622
|
await r.canCreate() && (ht.value.title = u.value ? i("consumer_groups.list.empty_state.title_for_consumer") : i("consumer_groups.list.empty_state.title"), ht.value.ctaText = u.value ? i("consumer_groups.actions.add_to_group") : i("consumer_groups.actions.create"));
|
|
4604
|
-
}), (
|
|
4605
|
-
const re = U("KButton"), me = U("KBadge"), Ce = U("KTruncate"), He = U("KDropdownItem"),
|
|
4606
|
-
return
|
|
4607
|
-
|
|
4623
|
+
}), (T, Y) => {
|
|
4624
|
+
const re = U("KButton"), me = U("KBadge"), Ce = U("KTruncate"), He = U("KDropdownItem"), Rt = U("KClipboardProvider"), hr = U("KPrompt");
|
|
4625
|
+
return p(), j("div", Cl, [
|
|
4626
|
+
$(h(Ps), {
|
|
4608
4627
|
"cache-identifier": e.cacheIdentifier,
|
|
4609
4628
|
"disable-pagination": u.value && !e.config.paginatedEndpoint,
|
|
4610
4629
|
"disable-pagination-page-jump": "",
|
|
@@ -4618,31 +4637,31 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4618
4637
|
"preferences-storage-key": d.value,
|
|
4619
4638
|
query: _.value,
|
|
4620
4639
|
"row-attributes": I,
|
|
4621
|
-
"table-headers": h(
|
|
4640
|
+
"table-headers": h(f),
|
|
4622
4641
|
"use-action-outside": e.useActionOutside,
|
|
4623
4642
|
onClearSearchInput: m,
|
|
4624
|
-
"onClick:row": Y[3] || (Y[3] = (
|
|
4643
|
+
"onClick:row": Y[3] || (Y[3] = (Q) => z(Q)),
|
|
4625
4644
|
onEmptyStateCtaClicked: H,
|
|
4626
4645
|
onSort: g
|
|
4627
4646
|
}, {
|
|
4628
4647
|
"toolbar-filter": b(() => [
|
|
4629
|
-
u.value ? J("", !0) : (
|
|
4648
|
+
u.value ? J("", !0) : (p(), D(h(il), {
|
|
4630
4649
|
key: 0,
|
|
4631
4650
|
modelValue: _.value,
|
|
4632
|
-
"onUpdate:modelValue": Y[0] || (Y[0] = (
|
|
4633
|
-
config:
|
|
4651
|
+
"onUpdate:modelValue": Y[0] || (Y[0] = (Q) => _.value = Q),
|
|
4652
|
+
config: R.value
|
|
4634
4653
|
}, null, 8, ["modelValue", "config"]))
|
|
4635
4654
|
]),
|
|
4636
4655
|
"toolbar-button": b(() => [
|
|
4637
|
-
(
|
|
4656
|
+
(p(), D(Se(e.useActionOutside ? "Teleport" : "div"), {
|
|
4638
4657
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
4639
4658
|
}, {
|
|
4640
4659
|
default: b(() => [
|
|
4641
|
-
|
|
4660
|
+
$(h(nt), {
|
|
4642
4661
|
"auth-function": () => e.canCreate()
|
|
4643
4662
|
}, {
|
|
4644
4663
|
default: b(() => [
|
|
4645
|
-
|
|
4664
|
+
Te($(re, {
|
|
4646
4665
|
appearance: "primary",
|
|
4647
4666
|
"data-testid": "toolbar-add-consumer-group",
|
|
4648
4667
|
icon: "plus",
|
|
@@ -4651,7 +4670,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4651
4670
|
onClick: Y[1] || (Y[1] = () => e.config.consumerId ? C() : void 0)
|
|
4652
4671
|
}, {
|
|
4653
4672
|
default: b(() => [
|
|
4654
|
-
|
|
4673
|
+
Z(N(e.config.consumerId ? h(i)("consumer_groups.actions.add_to_group") : h(i)("consumer_groups.list.toolbar_actions.new_consumer_group")), 1)
|
|
4655
4674
|
]),
|
|
4656
4675
|
_: 1
|
|
4657
4676
|
}, 8, ["to"]), [
|
|
@@ -4664,93 +4683,93 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4664
4683
|
_: 1
|
|
4665
4684
|
}, 8, ["to"]))
|
|
4666
4685
|
]),
|
|
4667
|
-
name: b(({ rowValue:
|
|
4668
|
-
|
|
4686
|
+
name: b(({ rowValue: Q }) => [
|
|
4687
|
+
P("b", null, N(Q ?? "-"), 1)
|
|
4669
4688
|
]),
|
|
4670
|
-
consumers_count: b(({ rowValue:
|
|
4671
|
-
|
|
4689
|
+
consumers_count: b(({ rowValue: Q }) => [
|
|
4690
|
+
Z(N(Q ?? "-"), 1)
|
|
4672
4691
|
]),
|
|
4673
|
-
tags: b(({ rowValue:
|
|
4674
|
-
(
|
|
4692
|
+
tags: b(({ rowValue: Q }) => [
|
|
4693
|
+
(Q == null ? void 0 : Q.length) > 0 ? (p(), D(Ce, { key: 0 }, {
|
|
4675
4694
|
default: b(() => [
|
|
4676
|
-
(
|
|
4695
|
+
(p(!0), j(ve, null, ye(Q, (Pe) => (p(), D(me, {
|
|
4677
4696
|
key: Pe,
|
|
4678
4697
|
onClick: Y[2] || (Y[2] = Ct(() => {
|
|
4679
4698
|
}, ["stop"]))
|
|
4680
4699
|
}, {
|
|
4681
4700
|
default: b(() => [
|
|
4682
|
-
|
|
4701
|
+
Z(N(Pe), 1)
|
|
4683
4702
|
]),
|
|
4684
4703
|
_: 2
|
|
4685
4704
|
}, 1024))), 128))
|
|
4686
4705
|
]),
|
|
4687
4706
|
_: 2
|
|
4688
|
-
}, 1024)) : (
|
|
4707
|
+
}, 1024)) : (p(), j("span", wl, "-"))
|
|
4689
4708
|
]),
|
|
4690
|
-
actions: b(({ row:
|
|
4691
|
-
|
|
4709
|
+
actions: b(({ row: Q }) => [
|
|
4710
|
+
$(Rt, null, {
|
|
4692
4711
|
default: b(({ copyToClipboard: Pe }) => [
|
|
4693
|
-
|
|
4712
|
+
$(He, {
|
|
4694
4713
|
"data-testid": "action-entity-copy-id",
|
|
4695
|
-
onClick: (yr) => L(
|
|
4714
|
+
onClick: (yr) => L(Q, Pe)
|
|
4696
4715
|
}, {
|
|
4697
4716
|
default: b(() => [
|
|
4698
|
-
|
|
4717
|
+
Z(N(h(i)("consumer_groups.actions.copy_id")), 1)
|
|
4699
4718
|
]),
|
|
4700
4719
|
_: 2
|
|
4701
4720
|
}, 1032, ["onClick"])
|
|
4702
4721
|
]),
|
|
4703
4722
|
_: 2
|
|
4704
4723
|
}, 1024),
|
|
4705
|
-
|
|
4724
|
+
$(Rt, null, {
|
|
4706
4725
|
default: b(({ copyToClipboard: Pe }) => [
|
|
4707
|
-
|
|
4726
|
+
$(He, {
|
|
4708
4727
|
"data-testid": "action-entity-copy-json",
|
|
4709
|
-
onClick: (yr) =>
|
|
4728
|
+
onClick: (yr) => A(Q, Pe)
|
|
4710
4729
|
}, {
|
|
4711
4730
|
default: b(() => [
|
|
4712
|
-
|
|
4731
|
+
Z(N(h(i)("consumer_groups.actions.copy_json")), 1)
|
|
4713
4732
|
]),
|
|
4714
4733
|
_: 2
|
|
4715
4734
|
}, 1032, ["onClick"])
|
|
4716
4735
|
]),
|
|
4717
4736
|
_: 2
|
|
4718
4737
|
}, 1024),
|
|
4719
|
-
|
|
4720
|
-
"auth-function": () => e.canRetrieve(
|
|
4738
|
+
$(h(nt), {
|
|
4739
|
+
"auth-function": () => e.canRetrieve(Q)
|
|
4721
4740
|
}, {
|
|
4722
4741
|
default: b(() => [
|
|
4723
|
-
|
|
4742
|
+
$(He, {
|
|
4724
4743
|
"data-testid": "action-entity-view",
|
|
4725
4744
|
"has-divider": "",
|
|
4726
|
-
item: O(
|
|
4745
|
+
item: O(Q.id)
|
|
4727
4746
|
}, null, 8, ["item"])
|
|
4728
4747
|
]),
|
|
4729
4748
|
_: 2
|
|
4730
4749
|
}, 1032, ["auth-function"]),
|
|
4731
|
-
|
|
4732
|
-
"auth-function": () => e.canEdit(
|
|
4750
|
+
$(h(nt), {
|
|
4751
|
+
"auth-function": () => e.canEdit(Q)
|
|
4733
4752
|
}, {
|
|
4734
4753
|
default: b(() => [
|
|
4735
|
-
|
|
4754
|
+
$(He, {
|
|
4736
4755
|
"data-testid": "action-entity-edit",
|
|
4737
|
-
item: k(
|
|
4756
|
+
item: k(Q.id)
|
|
4738
4757
|
}, null, 8, ["item"])
|
|
4739
4758
|
]),
|
|
4740
4759
|
_: 2
|
|
4741
4760
|
}, 1032, ["auth-function"]),
|
|
4742
|
-
|
|
4743
|
-
"auth-function": () => e.canDelete(
|
|
4761
|
+
$(h(nt), {
|
|
4762
|
+
"auth-function": () => e.canDelete(Q)
|
|
4744
4763
|
}, {
|
|
4745
4764
|
default: b(() => [
|
|
4746
|
-
|
|
4765
|
+
$(He, {
|
|
4747
4766
|
danger: "",
|
|
4748
4767
|
"data-testid": "action-entity-delete",
|
|
4749
4768
|
"has-divider": "",
|
|
4750
|
-
onClick: () => e.config.consumerId ? de(
|
|
4769
|
+
onClick: () => e.config.consumerId ? de(Q) : Ge(Q)
|
|
4751
4770
|
}, {
|
|
4752
4771
|
default: b(() => [
|
|
4753
|
-
|
|
4772
|
+
Z(N(e.config.consumerId ? h(i)("consumer_groups.actions.exit") : h(i)("consumer_groups.actions.delete")), 1)
|
|
4754
4773
|
]),
|
|
4755
4774
|
_: 2
|
|
4756
4775
|
}, 1032, ["onClick"])
|
|
@@ -4760,66 +4779,66 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4760
4779
|
]),
|
|
4761
4780
|
_: 1
|
|
4762
4781
|
}, 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"]),
|
|
4763
|
-
|
|
4782
|
+
$(h(Ds), {
|
|
4764
4783
|
"action-pending": G.value,
|
|
4765
4784
|
"data-testid": "delete-consumer-group-modal",
|
|
4766
4785
|
description: h(i)("consumer_groups.delete.description"),
|
|
4767
|
-
"entity-name":
|
|
4786
|
+
"entity-name": S.value && (S.value.name || S.value.id),
|
|
4768
4787
|
"entity-type": h(vn).ConsumerGroup,
|
|
4769
4788
|
error: ae.value,
|
|
4770
4789
|
title: h(i)("consumer_groups.delete.title"),
|
|
4771
|
-
visible:
|
|
4790
|
+
visible: K.value,
|
|
4772
4791
|
onCancel: Xe,
|
|
4773
4792
|
onProceed: et
|
|
4774
4793
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4775
|
-
e.config.consumerId ? (
|
|
4794
|
+
e.config.consumerId ? (p(), D(kl, {
|
|
4776
4795
|
key: 0,
|
|
4777
4796
|
config: e.config,
|
|
4778
4797
|
"data-testid": "add-to-group-modal",
|
|
4779
4798
|
visible: Be.value,
|
|
4780
|
-
"onAdd:partialSuccess": Y[4] || (Y[4] = (
|
|
4781
|
-
"onAdd:success": Y[5] || (Y[5] = (
|
|
4782
|
-
onCancel:
|
|
4799
|
+
"onAdd:partialSuccess": Y[4] || (Y[4] = (Q) => ne(Q, !0)),
|
|
4800
|
+
"onAdd:success": Y[5] || (Y[5] = (Q) => ne(Q)),
|
|
4801
|
+
onCancel: B
|
|
4783
4802
|
}, null, 8, ["config", "visible"])) : J("", !0),
|
|
4784
|
-
e.config.consumerId &&
|
|
4803
|
+
e.config.consumerId && V.value ? (p(), D(hr, {
|
|
4785
4804
|
key: 1,
|
|
4786
4805
|
"action-button-appearance": "danger",
|
|
4787
4806
|
"data-testid": "exit-group-modal",
|
|
4788
4807
|
title: h(i)("consumer_groups.consumers.exit.title"),
|
|
4789
4808
|
visible: ce.value,
|
|
4790
|
-
onCancel:
|
|
4809
|
+
onCancel: Fe,
|
|
4791
4810
|
onProceed: gr
|
|
4792
4811
|
}, {
|
|
4793
4812
|
default: b(() => [
|
|
4794
|
-
|
|
4813
|
+
$(h(a), {
|
|
4795
4814
|
class: "exit-modal-message",
|
|
4796
4815
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
4797
4816
|
tag: "p"
|
|
4798
|
-
},
|
|
4817
|
+
}, Le({
|
|
4799
4818
|
consumerGroup: b(() => [
|
|
4800
|
-
|
|
4819
|
+
P("strong", null, N(V.value.name || V.value.id), 1)
|
|
4801
4820
|
]),
|
|
4802
4821
|
_: 2
|
|
4803
4822
|
}, [
|
|
4804
4823
|
e.config.consumerUsername ? {
|
|
4805
4824
|
name: "consumer",
|
|
4806
4825
|
fn: b(() => [
|
|
4807
|
-
|
|
4826
|
+
P("strong", null, N(e.config.consumerUsername), 1)
|
|
4808
4827
|
]),
|
|
4809
4828
|
key: "0"
|
|
4810
4829
|
} : void 0
|
|
4811
4830
|
]), 1032, ["keypath"]),
|
|
4812
|
-
|
|
4831
|
+
P("p", null, N(h(i)("consumer_groups.consumers.exit.description")), 1)
|
|
4813
4832
|
]),
|
|
4814
4833
|
_: 1
|
|
4815
4834
|
}, 8, ["title", "visible"])) : J("", !0)
|
|
4816
4835
|
]);
|
|
4817
4836
|
};
|
|
4818
4837
|
}
|
|
4819
|
-
}),
|
|
4838
|
+
}), Ul = /* @__PURE__ */ Lt(_l, [["__scopeId", "data-v-31674321"]]), Al = { class: "kong-ui-entities-consumer-group-form" }, xl = { class: "select-item-container" }, Il = { class: "select-item-label" }, Sl = {
|
|
4820
4839
|
key: 0,
|
|
4821
4840
|
class: "select-item-description"
|
|
4822
|
-
},
|
|
4841
|
+
}, Tl = /* @__PURE__ */ X({
|
|
4823
4842
|
__name: "ConsumerGroupForm",
|
|
4824
4843
|
props: {
|
|
4825
4844
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4838,7 +4857,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4838
4857
|
emits: ["update", "error", "loading"],
|
|
4839
4858
|
setup(e, { emit: n }) {
|
|
4840
4859
|
var Xe, et, Be;
|
|
4841
|
-
const t = e, r = n, { i18n: { t: a } } = ft.useI18n(), i =
|
|
4860
|
+
const t = e, r = n, { i18n: { t: a } } = ft.useI18n(), i = Tt(), o = Vt({
|
|
4842
4861
|
fields: {
|
|
4843
4862
|
name: "",
|
|
4844
4863
|
tags: "",
|
|
@@ -4846,7 +4865,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4846
4865
|
},
|
|
4847
4866
|
errorMessage: "",
|
|
4848
4867
|
readonly: !1
|
|
4849
|
-
}), s =
|
|
4868
|
+
}), s = Vt({
|
|
4850
4869
|
name: "",
|
|
4851
4870
|
tags: "",
|
|
4852
4871
|
consumers: []
|
|
@@ -4856,24 +4875,24 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4856
4875
|
error: d,
|
|
4857
4876
|
loadItems: c,
|
|
4858
4877
|
results: v
|
|
4859
|
-
} = mr(t.config, (et =
|
|
4878
|
+
} = mr(t.config, (et = je.form[(Xe = t.config) == null ? void 0 : Xe.app]) == null ? void 0 : et.consumersList, "", {
|
|
4860
4879
|
fetchedItemsKey: "data",
|
|
4861
4880
|
searchKeys: ["username", "custom_id", "id"]
|
|
4862
|
-
}), { axiosInstance:
|
|
4881
|
+
}), { axiosInstance: f } = qt({
|
|
4863
4882
|
headers: (Be = t.config) == null ? void 0 : Be.requestHeaders
|
|
4864
|
-
}), { getMessageFromError: I } =
|
|
4883
|
+
}), { getMessageFromError: I } = fl(), w = x(() => v.value.map((C) => ({
|
|
4865
4884
|
label: C.username || C.custom_id,
|
|
4866
4885
|
value: C.id,
|
|
4867
4886
|
selected: o.fields.consumers.includes(C.id),
|
|
4868
4887
|
data: C
|
|
4869
4888
|
// we need this to determine whether or not to show the description text
|
|
4870
4889
|
}))), _ = x(() => {
|
|
4871
|
-
var C,
|
|
4872
|
-
return (
|
|
4873
|
-
}),
|
|
4874
|
-
var
|
|
4875
|
-
let H = `${(
|
|
4876
|
-
return ((ke = t.config) == null ? void 0 : ke.app) === "konnect" ? H = H.replace(/{controlPlaneId}/gi, ((de = t.config) == null ? void 0 : de.controlPlaneId) || "") : ((
|
|
4890
|
+
var C, B;
|
|
4891
|
+
return (B = je.form[(C = t.config) == null ? void 0 : C.app]) == null ? void 0 : B.edit;
|
|
4892
|
+
}), R = x(() => t.consumerGroupId ? rt.Edit : rt.Create), q = x(() => !!o.fields.name && !A.value), W = x(() => JSON.stringify(o.fields) !== JSON.stringify(s)), y = (C, B = "", ne = "") => {
|
|
4893
|
+
var V, ce, ke, de, Fe, tt;
|
|
4894
|
+
let H = `${(V = t.config) == null ? void 0 : V.apiBaseUrl}${je.form[(ce = t.config) == null ? void 0 : ce.app][C]}`;
|
|
4895
|
+
return ((ke = t.config) == null ? void 0 : ke.app) === "konnect" ? H = H.replace(/{controlPlaneId}/gi, ((de = t.config) == null ? void 0 : de.controlPlaneId) || "") : ((Fe = t.config) == null ? void 0 : Fe.app) === "kongManager" && (H = H.replace(/\/{workspace}/gi, (tt = t.config) != null && tt.workspace ? `/${t.config.workspace}` : "")), H = H.replace(/{id}/gi, B || t.consumerGroupId), (C === "addConsumer" || C === "removeConsumer") && (H = H.replace(/{consumerId}/gi, ne)), H;
|
|
4877
4896
|
}, m = () => {
|
|
4878
4897
|
var C;
|
|
4879
4898
|
i.push(((C = t.config) == null ? void 0 : C.cancelRoute) || { name: "consumer-group-list" });
|
|
@@ -4882,113 +4901,113 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4882
4901
|
}, F = (C) => {
|
|
4883
4902
|
r("loading", C);
|
|
4884
4903
|
}, L = async (C) => {
|
|
4885
|
-
var ne, H,
|
|
4904
|
+
var ne, H, V, ce, ke;
|
|
4886
4905
|
o.fields.name = ((ne = C == null ? void 0 : C.item) == null ? void 0 : ne.name) || ((H = C == null ? void 0 : C.consumer_group) == null ? void 0 : H.name) || (C == null ? void 0 : C.name) || "";
|
|
4887
|
-
const
|
|
4888
|
-
if (o.fields.tags = (
|
|
4906
|
+
const B = ((V = C == null ? void 0 : C.item) == null ? void 0 : V.tags) || (C == null ? void 0 : C.consumer_group.tags) || (C == null ? void 0 : C.tags) || [];
|
|
4907
|
+
if (o.fields.tags = (B == null ? void 0 : B.join(", ")) || "", "consumers" in C)
|
|
4889
4908
|
o.fields.consumers = ((ce = C == null ? void 0 : C.consumers) == null ? void 0 : ce.map((de) => de.id)) || [];
|
|
4890
4909
|
else
|
|
4891
4910
|
try {
|
|
4892
|
-
const { data: de } = await
|
|
4893
|
-
o.fields.consumers = "consumers" in de ? (ke = de == null ? void 0 : de.consumers) == null ? void 0 : ke.map((
|
|
4911
|
+
const { data: de } = await f.get(y("getConsumers"));
|
|
4912
|
+
o.fields.consumers = "consumers" in de ? (ke = de == null ? void 0 : de.consumers) == null ? void 0 : ke.map((Fe) => Fe.id) : [];
|
|
4894
4913
|
} catch (de) {
|
|
4895
|
-
|
|
4914
|
+
S(de);
|
|
4896
4915
|
}
|
|
4897
4916
|
Object.assign(s, o.fields);
|
|
4898
|
-
},
|
|
4899
|
-
var C,
|
|
4917
|
+
}, A = x(() => /^[0-9a-zA-Z.\-_~]*$/.test(o.fields.name) ? "" : a("consumer_groups.form.validation_errors.name")), z = x(() => {
|
|
4918
|
+
var C, B;
|
|
4900
4919
|
return {
|
|
4901
4920
|
name: o.fields.name,
|
|
4902
|
-
tags: (
|
|
4921
|
+
tags: (B = (C = o.fields.tags.split(",")) == null ? void 0 : C.map((ne) => String(ne || "").trim())) == null ? void 0 : B.filter((ne) => ne !== "")
|
|
4903
4922
|
};
|
|
4904
|
-
}), O = async (C,
|
|
4923
|
+
}), O = async (C, B = "") => await f.post(y("addConsumer", B, C), { consumer: C }), k = async (C, B = "") => await f.delete(y("removeConsumer", B, C)), S = (C) => {
|
|
4905
4924
|
o.errorMessage = I(C), r("error", C);
|
|
4906
|
-
},
|
|
4925
|
+
}, K = (C = t.consumerGroupId) => {
|
|
4907
4926
|
Object.assign(s, o.fields), r("update", { ...o.fields, id: C });
|
|
4908
|
-
}, G = (C,
|
|
4909
|
-
const H = C == null ? void 0 : C.find((
|
|
4910
|
-
H ?
|
|
4927
|
+
}, G = (C, B, ne = t.consumerGroupId) => {
|
|
4928
|
+
const H = C == null ? void 0 : C.find((V) => V.status !== "fulfilled");
|
|
4929
|
+
H ? S({
|
|
4911
4930
|
code: H.status,
|
|
4912
|
-
message:
|
|
4913
|
-
}) :
|
|
4931
|
+
message: B
|
|
4932
|
+
}) : K(ne);
|
|
4914
4933
|
}, ae = async () => {
|
|
4915
4934
|
let C = "";
|
|
4916
4935
|
try {
|
|
4917
|
-
const { data:
|
|
4918
|
-
C = "item" in
|
|
4919
|
-
} catch (
|
|
4920
|
-
|
|
4936
|
+
const { data: B } = await f.post(y("create"), z.value);
|
|
4937
|
+
C = "item" in B ? B.item.id : B.id;
|
|
4938
|
+
} catch (B) {
|
|
4939
|
+
S(B);
|
|
4921
4940
|
}
|
|
4922
4941
|
if (o.fields.consumers.length > 0 && C)
|
|
4923
4942
|
try {
|
|
4924
|
-
const
|
|
4943
|
+
const B = o.fields.consumers.map((H) => O(H, C)), ne = await Promise.allSettled(B);
|
|
4925
4944
|
G(ne, a("consumer_groups.errors.add_consumer"), C);
|
|
4926
|
-
} catch (
|
|
4927
|
-
|
|
4945
|
+
} catch (B) {
|
|
4946
|
+
S(B);
|
|
4928
4947
|
}
|
|
4929
4948
|
else
|
|
4930
|
-
o.fields.consumers.length === 0 && C &&
|
|
4949
|
+
o.fields.consumers.length === 0 && C && K(C);
|
|
4931
4950
|
}, ue = async () => {
|
|
4932
4951
|
var ne;
|
|
4933
4952
|
try {
|
|
4934
|
-
((ne = t.config) == null ? void 0 : ne.app) === "konnect" ? await
|
|
4953
|
+
((ne = t.config) == null ? void 0 : ne.app) === "konnect" ? await f.put(y("edit"), z.value) : await f.patch(y("edit"), z.value);
|
|
4935
4954
|
} catch (H) {
|
|
4936
|
-
|
|
4955
|
+
S(H);
|
|
4937
4956
|
}
|
|
4938
|
-
const C = o.fields.consumers.filter((H) => !s.consumers.includes(H)),
|
|
4939
|
-
if (
|
|
4940
|
-
|
|
4957
|
+
const C = o.fields.consumers.filter((H) => !s.consumers.includes(H)), B = s.consumers.filter((H) => !o.fields.consumers.includes(H));
|
|
4958
|
+
if (B.length === 0 && C.length === 0)
|
|
4959
|
+
K();
|
|
4941
4960
|
else {
|
|
4942
|
-
if (
|
|
4961
|
+
if (B.length > 0)
|
|
4943
4962
|
try {
|
|
4944
|
-
const H =
|
|
4945
|
-
G(
|
|
4963
|
+
const H = B.map((ce) => k(ce)), V = await Promise.allSettled(H);
|
|
4964
|
+
G(V, a("consumer_groups.errors.remove_consumer"));
|
|
4946
4965
|
} catch (H) {
|
|
4947
|
-
|
|
4966
|
+
S(H);
|
|
4948
4967
|
}
|
|
4949
4968
|
if (C.length > 0)
|
|
4950
4969
|
try {
|
|
4951
|
-
const H = C.map((ce) => O(ce)),
|
|
4952
|
-
G(
|
|
4970
|
+
const H = C.map((ce) => O(ce)), V = await Promise.allSettled(H);
|
|
4971
|
+
G(V, a("consumer_groups.errors.add_consumer"));
|
|
4953
4972
|
} catch (H) {
|
|
4954
|
-
|
|
4973
|
+
S(H);
|
|
4955
4974
|
}
|
|
4956
4975
|
}
|
|
4957
4976
|
}, Ge = async () => {
|
|
4958
4977
|
try {
|
|
4959
|
-
o.readonly = !0,
|
|
4978
|
+
o.readonly = !0, R.value === rt.Create ? await ae() : await ue();
|
|
4960
4979
|
} finally {
|
|
4961
4980
|
o.readonly = !1;
|
|
4962
4981
|
}
|
|
4963
4982
|
};
|
|
4964
4983
|
return ut(async () => {
|
|
4965
4984
|
await c();
|
|
4966
|
-
}), (C,
|
|
4985
|
+
}), (C, B) => {
|
|
4967
4986
|
const ne = U("KInput"), H = U("KMultiselect");
|
|
4968
|
-
return
|
|
4969
|
-
|
|
4970
|
-
"can-submit":
|
|
4987
|
+
return p(), j("div", Al, [
|
|
4988
|
+
$(h(Es), {
|
|
4989
|
+
"can-submit": q.value && W.value,
|
|
4971
4990
|
config: e.config,
|
|
4972
4991
|
"edit-id": e.consumerGroupId,
|
|
4973
|
-
"error-message": o.errorMessage || h(d) ||
|
|
4992
|
+
"error-message": o.errorMessage || h(d) || A.value,
|
|
4974
4993
|
"fetch-url": _.value,
|
|
4975
4994
|
"form-fields": z.value,
|
|
4976
4995
|
"is-readonly": o.readonly,
|
|
4977
4996
|
onCancel: m,
|
|
4978
|
-
"onFetch:error":
|
|
4997
|
+
"onFetch:error": B[3] || (B[3] = (V) => g(V)),
|
|
4979
4998
|
"onFetch:success": L,
|
|
4980
|
-
onLoading:
|
|
4999
|
+
onLoading: B[4] || (B[4] = (V) => F(V)),
|
|
4981
5000
|
onSubmit: Ge
|
|
4982
5001
|
}, {
|
|
4983
5002
|
default: b(() => [
|
|
4984
|
-
|
|
5003
|
+
$(h(mn), {
|
|
4985
5004
|
description: h(a)("consumer_groups.form.general_info.description"),
|
|
4986
5005
|
title: h(a)("consumer_groups.form.general_info.title")
|
|
4987
5006
|
}, {
|
|
4988
5007
|
default: b(() => [
|
|
4989
|
-
|
|
5008
|
+
$(ne, {
|
|
4990
5009
|
modelValue: o.fields.name,
|
|
4991
|
-
"onUpdate:modelValue":
|
|
5010
|
+
"onUpdate:modelValue": B[0] || (B[0] = (V) => o.fields.name = V),
|
|
4992
5011
|
modelModifiers: { trim: !0 },
|
|
4993
5012
|
autocomplete: "off",
|
|
4994
5013
|
"data-testid": "consumer-group-form-name",
|
|
@@ -4997,9 +5016,9 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
4997
5016
|
required: "",
|
|
4998
5017
|
type: "text"
|
|
4999
5018
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
5000
|
-
|
|
5019
|
+
$(ne, {
|
|
5001
5020
|
modelValue: o.fields.tags,
|
|
5002
|
-
"onUpdate:modelValue":
|
|
5021
|
+
"onUpdate:modelValue": B[1] || (B[1] = (V) => o.fields.tags = V),
|
|
5003
5022
|
modelModifiers: { trim: !0 },
|
|
5004
5023
|
autocomplete: "off",
|
|
5005
5024
|
"data-testid": "consumer-group-form-tags",
|
|
@@ -5015,15 +5034,15 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
5015
5034
|
]),
|
|
5016
5035
|
_: 1
|
|
5017
5036
|
}, 8, ["description", "title"]),
|
|
5018
|
-
|
|
5037
|
+
$(h(mn), {
|
|
5019
5038
|
description: h(a)("consumer_groups.form.consumers.description"),
|
|
5020
5039
|
"has-divider": "",
|
|
5021
5040
|
title: h(a)("consumer_groups.form.consumers.title")
|
|
5022
5041
|
}, {
|
|
5023
5042
|
default: b(() => [
|
|
5024
|
-
|
|
5043
|
+
$(H, {
|
|
5025
5044
|
modelValue: o.fields.consumers,
|
|
5026
|
-
"onUpdate:modelValue":
|
|
5045
|
+
"onUpdate:modelValue": B[2] || (B[2] = (V) => o.fields.consumers = V),
|
|
5027
5046
|
appearance: "select",
|
|
5028
5047
|
autosuggest: "",
|
|
5029
5048
|
items: w.value,
|
|
@@ -5033,12 +5052,12 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
5033
5052
|
width: "auto",
|
|
5034
5053
|
onQueryChange: h(l)
|
|
5035
5054
|
}, {
|
|
5036
|
-
"item-template": b(({ item:
|
|
5055
|
+
"item-template": b(({ item: V }) => {
|
|
5037
5056
|
var ce, ke, de;
|
|
5038
5057
|
return [
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
(ce =
|
|
5058
|
+
P("div", xl, [
|
|
5059
|
+
P("div", Il, N(V.label), 1),
|
|
5060
|
+
(ce = V == null ? void 0 : V.data) != null && ce.username && ((ke = V == null ? void 0 : V.data) != null && ke.custom_id) ? (p(), j("div", Sl, N((de = V == null ? void 0 : V.data) == null ? void 0 : de.custom_id), 1)) : J("", !0)
|
|
5042
5061
|
])
|
|
5043
5062
|
];
|
|
5044
5063
|
}),
|
|
@@ -5053,7 +5072,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
5053
5072
|
]);
|
|
5054
5073
|
};
|
|
5055
5074
|
}
|
|
5056
|
-
}),
|
|
5075
|
+
}), Rl = /* @__PURE__ */ Lt(Tl, [["__scopeId", "data-v-89ee41dd"]]), $l = { class: "kong-ui-consumer-group-entity-config-card" }, Vl = /* @__PURE__ */ X({
|
|
5057
5076
|
__name: "ConsumerGroupConfigCard",
|
|
5058
5077
|
props: {
|
|
5059
5078
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5080,7 +5099,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
5080
5099
|
},
|
|
5081
5100
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
5082
5101
|
setup(e) {
|
|
5083
|
-
const n = e, { i18n: { t } } = ft.useI18n(), r = x(() =>
|
|
5102
|
+
const n = e, { i18n: { t } } = ft.useI18n(), r = x(() => je.form[n.config.app].edit), a = E({
|
|
5084
5103
|
id: {},
|
|
5085
5104
|
name: {},
|
|
5086
5105
|
created_at: {},
|
|
@@ -5089,8 +5108,8 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
5089
5108
|
tooltip: t("consumer_groups.form.fields.tags.tooltip")
|
|
5090
5109
|
}
|
|
5091
5110
|
});
|
|
5092
|
-
return (i, o) => (
|
|
5093
|
-
|
|
5111
|
+
return (i, o) => (p(), j("div", $l, [
|
|
5112
|
+
$(h(Ts), {
|
|
5094
5113
|
config: e.config,
|
|
5095
5114
|
"config-card-doc": e.configCardDoc,
|
|
5096
5115
|
"config-schema": a.value,
|
|
@@ -5105,7 +5124,7 @@ const Ji = { class: "yaml-config" }, fr = /* @__PURE__ */ X({
|
|
|
5105
5124
|
}
|
|
5106
5125
|
});
|
|
5107
5126
|
export {
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5127
|
+
Vl as ConsumerGroupConfigCard,
|
|
5128
|
+
Rl as ConsumerGroupForm,
|
|
5129
|
+
Ul as ConsumerGroupList
|
|
5111
5130
|
};
|