@kong-ui-public/entities-consumer-groups 1.2.22-pr.889.aec47fd9.0 → 1.3.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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as ae, ref as O, computed as M, watch as xe, renderSlot as Y, createCommentVNode as G, unref as y, useSlots as ut, onBeforeMount as Qe, resolveComponent as U, openBlock as m, createBlock as V, createSlots as Te, withCtx as h, createElementVNode as
|
|
1
|
+
import { defineComponent as ae, ref as O, computed as M, watch as xe, renderSlot as Y, createCommentVNode as G, unref as y, useSlots as ut, onBeforeMount as Qe, resolveComponent as U, openBlock as m, createBlock as V, createSlots as Te, withCtx as h, createElementVNode as R, createTextVNode as Z, toDisplayString as F, createVNode as K, createElementBlock as j, renderList as ye, Fragment as ve, normalizeClass as Ke, withModifiers as rt, withDirectives as et, vShow as tt, useCssVars as ur, resolveDynamicComponent as ze, normalizeProps as cr, guardReactiveProps as dr, mergeProps as ht, onMounted as pr, onUnmounted as fr, normalizeStyle as mr, inject as gr, pushScopeId as yr, popScopeId as hr, reactive as Pt } from "vue";
|
|
2
2
|
import { useRouter as wt } from "vue-router";
|
|
3
3
|
import { createI18n as It, i18nTComponent as cn } from "@kong-ui-public/i18n";
|
|
4
4
|
import vr from "axios";
|
|
5
5
|
import { MethodsArray as br } from "@kong/kongponents";
|
|
6
|
-
const
|
|
6
|
+
const Cr = {
|
|
7
7
|
list: {
|
|
8
8
|
table_headers: {
|
|
9
9
|
name: "Name",
|
|
@@ -95,11 +95,11 @@ const kr = {
|
|
|
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
|
-
},
|
|
99
|
-
consumer_groups:
|
|
98
|
+
}, kr = {
|
|
99
|
+
consumer_groups: Cr
|
|
100
100
|
};
|
|
101
101
|
function _r() {
|
|
102
|
-
const e = It("en-us",
|
|
102
|
+
const e = It("en-us", kr);
|
|
103
103
|
return {
|
|
104
104
|
i18n: e,
|
|
105
105
|
i18nT: cn(e)
|
|
@@ -108,7 +108,7 @@ function _r() {
|
|
|
108
108
|
}
|
|
109
109
|
const ct = {
|
|
110
110
|
useI18n: _r
|
|
111
|
-
}, Ie = "/api/runtime_groups/{controlPlaneId}",
|
|
111
|
+
}, Ie = "/api/runtime_groups/{controlPlaneId}", Ae = "/{workspace}", $e = {
|
|
112
112
|
list: {
|
|
113
113
|
konnect: {
|
|
114
114
|
all: `${Ie}/consumer_groups`,
|
|
@@ -116,9 +116,9 @@ const ct = {
|
|
|
116
116
|
oneForConsumer: `${Ie}/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 ct = {
|
|
|
131
131
|
getConsumers: `${Ie}/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
143
|
var dn = /* @__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))(dn || {}), nt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(nt || {}), Oe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Oe || {}), te = /* @__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))(te || {}), be = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(be || {});
|
|
144
|
-
function
|
|
144
|
+
function At(e = {}) {
|
|
145
145
|
return {
|
|
146
146
|
axiosInstance: vr.create({
|
|
147
147
|
withCredentials: !0,
|
|
@@ -167,7 +167,7 @@ const ft = "khcp-user-table-preferences", Ir = {
|
|
|
167
167
|
sortColumnKey: void 0,
|
|
168
168
|
sortColumnOrder: void 0
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function Ar() {
|
|
171
171
|
const e = (t) => {
|
|
172
172
|
if (typeof t == "string")
|
|
173
173
|
try {
|
|
@@ -198,7 +198,7 @@ function Sr() {
|
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const Sr = {
|
|
202
202
|
message: "Are you sure you want to delete this {entityType}?",
|
|
203
203
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
204
204
|
}, xr = {
|
|
@@ -278,8 +278,8 @@ const Ar = {
|
|
|
278
278
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
279
279
|
confirmText: "Yes, disable"
|
|
280
280
|
}
|
|
281
|
-
},
|
|
282
|
-
deleteModal:
|
|
281
|
+
}, Fr = {
|
|
282
|
+
deleteModal: Sr,
|
|
283
283
|
baseForm: xr,
|
|
284
284
|
baseTable: Tr,
|
|
285
285
|
baseConfigCard: $r,
|
|
@@ -288,8 +288,8 @@ const Ar = {
|
|
|
288
288
|
errors: Er,
|
|
289
289
|
toggleModal: Or
|
|
290
290
|
};
|
|
291
|
-
function
|
|
292
|
-
const e = It("en-us",
|
|
291
|
+
function St() {
|
|
292
|
+
const e = It("en-us", Fr);
|
|
293
293
|
return {
|
|
294
294
|
i18n: e,
|
|
295
295
|
i18nT: cn(e)
|
|
@@ -313,19 +313,19 @@ function pn() {
|
|
|
313
313
|
isValidUuid: (e) => e ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(e) : !1
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function Kr(e, n, t, r = {
|
|
317
317
|
fetchedItemsKey: "data",
|
|
318
318
|
searchKeys: ["id"]
|
|
319
319
|
}) {
|
|
320
320
|
t || (t = "100");
|
|
321
|
-
const { axiosInstance: o } =
|
|
321
|
+
const { axiosInstance: o } = At({
|
|
322
322
|
headers: e.requestHeaders
|
|
323
|
-
}), { i18n: { t: a } } =
|
|
324
|
-
await
|
|
325
|
-
}, 200), l = O(!1), c = O(""), d = O(""), u = O([]), g = O([]), f = O(void 0),
|
|
326
|
-
let v = `${e.apiBaseUrl}${
|
|
323
|
+
}), { i18n: { t: a } } = St(), { debounce: i } = wr(), s = i(async (I) => {
|
|
324
|
+
await C(I);
|
|
325
|
+
}, 200), l = O(!1), c = O(""), d = O(""), u = O([]), g = O([]), f = O(void 0), A = y(n);
|
|
326
|
+
let v = `${e.apiBaseUrl}${A}`;
|
|
327
327
|
e.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
328
|
-
const { isValidUuid: p } = pn(),
|
|
328
|
+
const { isValidUuid: p } = pn(), S = async () => {
|
|
329
329
|
try {
|
|
330
330
|
l.value = !0;
|
|
331
331
|
const { data: I } = await o.get(`${v}?size=${t}`);
|
|
@@ -335,48 +335,50 @@ function Fr(e, n, t, r = {
|
|
|
335
335
|
} finally {
|
|
336
336
|
l.value = !1;
|
|
337
337
|
}
|
|
338
|
-
}, b = O(""),
|
|
338
|
+
}, b = O(""), C = async (I) => {
|
|
339
339
|
var ne, pe, H;
|
|
340
340
|
if (b.value !== I)
|
|
341
341
|
if (b.value = I || "", f.value === void 0)
|
|
342
342
|
try {
|
|
343
343
|
if (l.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
344
|
-
let
|
|
345
|
-
I && (
|
|
346
|
-
const { data:
|
|
347
|
-
r.fetchedItemsKey in
|
|
348
|
-
} else {
|
|
349
|
-
const
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
344
|
+
let w = v + "";
|
|
345
|
+
I && (w += `/${I}`);
|
|
346
|
+
const { data: N } = await o.get(`${w}?size=${t}`);
|
|
347
|
+
r.fetchedItemsKey in N ? u.value = N[r.fetchedItemsKey] : N != null && N.id ? u.value = [N] : u.value = [];
|
|
348
|
+
} else if (I) {
|
|
349
|
+
const w = [];
|
|
350
|
+
p(I) && r.searchKeys.includes("id") ? w.push((async () => {
|
|
351
|
+
const { data: k } = await o.get(`${v}/${I}`);
|
|
352
|
+
return [k[r.fetchedItemsKey] ?? k];
|
|
353
|
+
})()) : w.push(
|
|
354
|
+
...r.searchKeys.filter((k) => k !== "id").map(async (k) => {
|
|
355
|
+
const { data: x } = await o.get(`${v}?${k}=${I}`);
|
|
356
|
+
return x[r.fetchedItemsKey];
|
|
354
357
|
})
|
|
355
|
-
)
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
});
|
|
358
|
+
);
|
|
359
|
+
const N = await Promise.all(w), B = /* @__PURE__ */ new Set();
|
|
360
|
+
u.value = [], (ne = N == null ? void 0 : N.forEach) == null || ne.call(N, (k) => {
|
|
361
|
+
var x;
|
|
362
|
+
(x = k == null ? void 0 : k.forEach) == null || x.call(k, (T) => {
|
|
363
|
+
B.has(T.id) || (B.add(T.id), u.value.push(T));
|
|
362
364
|
});
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
} catch (
|
|
367
|
-
((pe =
|
|
365
|
+
});
|
|
366
|
+
} else
|
|
367
|
+
u.value = g.value;
|
|
368
|
+
} catch (w) {
|
|
369
|
+
((pe = w == null ? void 0 : w.response) == null ? void 0 : pe.status) === 404 ? d.value = a("debouncedFilter.errors.invalid") : (u.value = [], c.value = a("debouncedFilter.errors.fetch"));
|
|
368
370
|
} finally {
|
|
369
371
|
l.value = !1;
|
|
370
372
|
}
|
|
371
373
|
else
|
|
372
|
-
l.value = !0, d.value = "", I ? (u.value = (H = f.value) == null ? void 0 : H.filter((
|
|
373
|
-
var
|
|
374
|
-
let
|
|
375
|
-
for (const
|
|
376
|
-
const x = typeof
|
|
377
|
-
x != null && x.includes(I.toLowerCase()) && (
|
|
374
|
+
l.value = !0, d.value = "", I ? (u.value = (H = f.value) == null ? void 0 : H.filter((w) => {
|
|
375
|
+
var N;
|
|
376
|
+
let B = !1;
|
|
377
|
+
for (const k of r.searchKeys) {
|
|
378
|
+
const x = typeof w[k] == "string" ? (N = w[k]) == null ? void 0 : N.toLowerCase() : w[k];
|
|
379
|
+
x != null && x.includes(I.toLowerCase()) && (B = !0);
|
|
378
380
|
}
|
|
379
|
-
return
|
|
381
|
+
return B;
|
|
380
382
|
}), (!u.value || !u.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : u.value = f.value, l.value = !1;
|
|
381
383
|
};
|
|
382
384
|
return {
|
|
@@ -385,18 +387,18 @@ function Fr(e, n, t, r = {
|
|
|
385
387
|
validationError: d,
|
|
386
388
|
results: u,
|
|
387
389
|
allRecords: f,
|
|
388
|
-
loadItems:
|
|
390
|
+
loadItems: S,
|
|
389
391
|
debouncedQueryChange: s
|
|
390
392
|
};
|
|
391
393
|
}
|
|
392
|
-
function
|
|
394
|
+
function Nr(e, n) {
|
|
393
395
|
const t = y(n), r = M(
|
|
394
396
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
395
397
|
);
|
|
396
398
|
return r.value.search = "", (o) => `${r.value.href}/${o}`;
|
|
397
399
|
}
|
|
398
|
-
function
|
|
399
|
-
const { i18n: { t: e } } =
|
|
400
|
+
function Br() {
|
|
401
|
+
const { i18n: { t: e } } = St();
|
|
400
402
|
return {
|
|
401
403
|
getMessageFromError: (n) => {
|
|
402
404
|
var t, r, o;
|
|
@@ -433,8 +435,8 @@ function fn(e, n) {
|
|
|
433
435
|
const { page: s, pageSize: l, offset: c, sortColumnKey: d, sortColumnOrder: u, query: g } = i;
|
|
434
436
|
try {
|
|
435
437
|
let f = new URL(a.value.href);
|
|
436
|
-
return o.value && g ? (f.search = "", f = new URL(`${f.href}/${g}/`)) : (o.value || new URLSearchParams(g).forEach((
|
|
437
|
-
f.searchParams.append(v,
|
|
438
|
+
return o.value && g ? (f.search = "", f = new URL(`${f.href}/${g}/`)) : (o.value || new URLSearchParams(g).forEach((A, v) => {
|
|
439
|
+
f.searchParams.append(v, A);
|
|
438
440
|
}), d && f.searchParams.append("sort_by", d), u === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(l))), c && s !== 1 && f.searchParams.append("offset", String(c)), f.href;
|
|
439
441
|
} catch (f) {
|
|
440
442
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
@@ -442,7 +444,7 @@ function fn(e, n) {
|
|
|
442
444
|
};
|
|
443
445
|
}
|
|
444
446
|
function Pr(e, n, t = "data") {
|
|
445
|
-
const r = y(n), { axiosInstance: o } =
|
|
447
|
+
const r = y(n), { axiosInstance: o } = At({
|
|
446
448
|
headers: e.requestHeaders
|
|
447
449
|
}), a = fn(e, r), i = O({
|
|
448
450
|
status: Oe.Idle
|
|
@@ -503,19 +505,19 @@ const mn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
503
505
|
return 0;
|
|
504
506
|
const [t, r] = Ur(qt(e), qt(n));
|
|
505
507
|
return t > r ? 1 : t < r ? -1 : 0;
|
|
506
|
-
},
|
|
508
|
+
}, Rt = (e, n) => {
|
|
507
509
|
for (let t = 0; t < Math.max(e.length, n.length); t++) {
|
|
508
510
|
const r = qr(e[t] || "0", n[t] || "0");
|
|
509
511
|
if (r !== 0)
|
|
510
512
|
return r;
|
|
511
513
|
}
|
|
512
514
|
return 0;
|
|
513
|
-
},
|
|
514
|
-
const t = Lt(e), r = Lt(n), o = t.pop(), a = r.pop(), i =
|
|
515
|
-
return i !== 0 ? i : o && a ?
|
|
515
|
+
}, Rr = (e, n) => {
|
|
516
|
+
const t = Lt(e), r = Lt(n), o = t.pop(), a = r.pop(), i = Rt(t, r);
|
|
517
|
+
return i !== 0 ? i : o && a ? Rt(o.split("."), a.split(".")) : o || a ? o ? -1 : 1 : 0;
|
|
516
518
|
}, Vt = (e, n, t) => {
|
|
517
519
|
Vr(t);
|
|
518
|
-
const r =
|
|
520
|
+
const r = Rr(e, n);
|
|
519
521
|
return gn[t].includes(r);
|
|
520
522
|
}, gn = {
|
|
521
523
|
">": [1],
|
|
@@ -524,18 +526,18 @@ const mn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
524
526
|
"<=": [-1, 0],
|
|
525
527
|
"<": [-1],
|
|
526
528
|
"!=": [-1, 1]
|
|
527
|
-
},
|
|
529
|
+
}, Dt = Object.keys(gn), Vr = (e) => {
|
|
528
530
|
if (typeof e != "string")
|
|
529
531
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
530
|
-
if (
|
|
531
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
532
|
-
},
|
|
532
|
+
if (Dt.indexOf(e) === -1)
|
|
533
|
+
throw new Error(`Invalid operator, expected one of ${Dt.join("|")}`);
|
|
534
|
+
}, Dr = (e) => typeof e == "string" && /^[v\d]/.test(e) && mn.test(e);
|
|
533
535
|
function Gr(e) {
|
|
534
536
|
const { gatewayInfo: n, supportedRange: t } = e;
|
|
535
537
|
if (!n)
|
|
536
538
|
return !0;
|
|
537
539
|
const { edition: r, version: o } = n;
|
|
538
|
-
if (!
|
|
540
|
+
if (!Dr(o))
|
|
539
541
|
return console.error("Invalid version"), !1;
|
|
540
542
|
const a = t[r];
|
|
541
543
|
if (!a)
|
|
@@ -552,15 +554,15 @@ function Hr(e) {
|
|
|
552
554
|
};
|
|
553
555
|
}
|
|
554
556
|
const ue = {
|
|
555
|
-
useAxios:
|
|
556
|
-
useDebouncedFilter:
|
|
557
|
-
useDeleteUrlBuilder:
|
|
558
|
-
useErrors:
|
|
557
|
+
useAxios: At,
|
|
558
|
+
useDebouncedFilter: Kr,
|
|
559
|
+
useDeleteUrlBuilder: Nr,
|
|
560
|
+
useErrors: Br,
|
|
559
561
|
useFetcher: Pr,
|
|
560
562
|
useFetchUrlBuilder: fn,
|
|
561
563
|
useHelpers: pn,
|
|
562
564
|
useStringHelpers: Lr,
|
|
563
|
-
useI18n:
|
|
565
|
+
useI18n: St,
|
|
564
566
|
useGatewayFeatureSupported: Gr,
|
|
565
567
|
useTruncationDetector: Hr
|
|
566
568
|
}, zr = {
|
|
@@ -640,19 +642,19 @@ const ue = {
|
|
|
640
642
|
}), i.value ? d(r("message.fail")) : n("error", t.uuid);
|
|
641
643
|
return;
|
|
642
644
|
}
|
|
643
|
-
const f = t.uuid.length > Gt,
|
|
645
|
+
const f = t.uuid.length > Gt, A = t.format === "hidden" || t.format === "redacted" ? r("message.success.prefix") : `"${t.uuid.substring(0, Gt) + (f ? "..." : "")}"`;
|
|
644
646
|
typeof o == "function" && o({
|
|
645
647
|
type: "success",
|
|
646
|
-
message: `${
|
|
648
|
+
message: `${A}${r("message.success.content")}`
|
|
647
649
|
}), i.value ? d(t.successTooltip) : n("success", t.uuid);
|
|
648
650
|
};
|
|
649
651
|
return (g, f) => {
|
|
650
|
-
const
|
|
652
|
+
const A = U("KIcon"), v = U("KClipboardProvider");
|
|
651
653
|
return m(), j("div", Zr, [
|
|
652
654
|
e.format !== "hidden" ? (m(), V(ze(e.idTooltip ? "KTooltip" : "div"), ht({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
653
655
|
default: h(() => [
|
|
654
|
-
|
|
655
|
-
class:
|
|
656
|
+
R("div", {
|
|
657
|
+
class: Ke([
|
|
656
658
|
"uuid-container",
|
|
657
659
|
e.truncated ? "truncated-uuid" : null,
|
|
658
660
|
e.useMono ? "mono" : null
|
|
@@ -663,15 +665,15 @@ const ue = {
|
|
|
663
665
|
}, 16)) : G("", !0),
|
|
664
666
|
(m(), V(ze(e.tooltip ? "KTooltip" : "div"), ht(l.value, { class: "uuid-icon-wrapper" }), {
|
|
665
667
|
default: h(() => [
|
|
666
|
-
|
|
668
|
+
K(v, null, {
|
|
667
669
|
default: h(({ copyToClipboard: p }) => [
|
|
668
|
-
|
|
670
|
+
R("span", {
|
|
669
671
|
"data-testid": "copy-to-clipboard",
|
|
670
672
|
role: "button",
|
|
671
673
|
tabindex: "0",
|
|
672
|
-
onClick: rt((
|
|
674
|
+
onClick: rt((S) => u(p), ["stop"])
|
|
673
675
|
}, [
|
|
674
|
-
|
|
676
|
+
K(A, {
|
|
675
677
|
class: "uuid-icon",
|
|
676
678
|
color: e.iconColor,
|
|
677
679
|
"hide-title": !!e.tooltip || void 0,
|
|
@@ -722,11 +724,11 @@ const ue = {
|
|
|
722
724
|
return n.isArrayItem ? (l = a.value) != null && l.name ? r(a.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
723
725
|
});
|
|
724
726
|
return (l, c) => (m(), V(ze(e.isArrayItem ? "fieldset" : "div"), {
|
|
725
|
-
class:
|
|
727
|
+
class: Ke(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
726
728
|
}, {
|
|
727
729
|
default: h(() => [
|
|
728
730
|
e.isArrayItem ? (m(), j("legend", to, [
|
|
729
|
-
|
|
731
|
+
R("b", null, F(s.value), 1)
|
|
730
732
|
])) : G("", !0),
|
|
731
733
|
(m(!0), j(ve, null, ye(Object.keys(i.value), (d, u) => (m(), V(xt, {
|
|
732
734
|
key: `${o.value}-property-${u}`,
|
|
@@ -740,12 +742,12 @@ const ue = {
|
|
|
740
742
|
_: 1
|
|
741
743
|
}, 8, ["class"]));
|
|
742
744
|
}
|
|
743
|
-
}),
|
|
745
|
+
}), ke = (e, n) => {
|
|
744
746
|
const t = e.__vccOpts || e;
|
|
745
747
|
for (const [r, o] of n)
|
|
746
748
|
t[r] = o;
|
|
747
749
|
return t;
|
|
748
|
-
}, hn = /* @__PURE__ */
|
|
750
|
+
}, hn = /* @__PURE__ */ ke(no, [["__scopeId", "data-v-68ca83ec"]]), ro = /* @__PURE__ */ ae({
|
|
749
751
|
__name: "InternalLinkItem",
|
|
750
752
|
props: {
|
|
751
753
|
item: {
|
|
@@ -759,7 +761,7 @@ const ue = {
|
|
|
759
761
|
return (t, r) => {
|
|
760
762
|
const o = U("KButton");
|
|
761
763
|
return m(), j("div", null, [
|
|
762
|
-
|
|
764
|
+
K(o, {
|
|
763
765
|
appearance: "btn-link",
|
|
764
766
|
class: "navigation-button",
|
|
765
767
|
onClick: r[0] || (r[0] = (a) => t.$emit("navigation-click", e.item))
|
|
@@ -772,7 +774,7 @@ const ue = {
|
|
|
772
774
|
]);
|
|
773
775
|
};
|
|
774
776
|
}
|
|
775
|
-
}), oo = /* @__PURE__ */
|
|
777
|
+
}), oo = /* @__PURE__ */ ke(ro, [["__scopeId", "data-v-7410504d"]]), ao = /* @__PURE__ */ ae({
|
|
776
778
|
__name: "StatusBadge",
|
|
777
779
|
props: {
|
|
778
780
|
status: {
|
|
@@ -794,7 +796,7 @@ const ue = {
|
|
|
794
796
|
}, 8, ["appearance"]);
|
|
795
797
|
};
|
|
796
798
|
}
|
|
797
|
-
}), io = "#0044f4", so = "#e0e4ea", lo = "#3a3f51", uo = "1px", co = "20px", po = { class: "config-card-details-row" }, fo = ["data-testid"], mo = ["data-testid"], go = ["data-testid"], yo = ["data-testid"], ho = { key: 1 }, vo = ["data-testid"], bo = ["data-testid"],
|
|
799
|
+
}), io = "#0044f4", so = "#e0e4ea", lo = "#3a3f51", uo = "1px", co = "20px", po = { class: "config-card-details-row" }, fo = ["data-testid"], mo = ["data-testid"], go = ["data-testid"], yo = ["data-testid"], ho = { key: 1 }, vo = ["data-testid"], bo = ["data-testid"], Co = ["data-testid"], ko = ["data-testid"], _o = {
|
|
798
800
|
name: "ConfigCardItem",
|
|
799
801
|
components: { CopyUuid: yn, JsonCardItem: hn, StatusBadge: ao, InternalLinkItem: oo }
|
|
800
802
|
}, wo = /* @__PURE__ */ ae({
|
|
@@ -951,15 +953,15 @@ const ue = {
|
|
|
951
953
|
};
|
|
952
954
|
}
|
|
953
955
|
}), u = O(), { isTruncated: g } = ue.useTruncationDetector(u);
|
|
954
|
-
return (f,
|
|
955
|
-
const v = U("KLabel"), p = U("KBadge"),
|
|
956
|
+
return (f, A) => {
|
|
957
|
+
const v = U("KLabel"), p = U("KBadge"), S = U("KMethodBadge"), b = U("KTooltip");
|
|
956
958
|
return m(), j("div", po, [
|
|
957
|
-
|
|
959
|
+
R("div", {
|
|
958
960
|
class: "config-card-details-label",
|
|
959
961
|
"data-testid": `${e.item.key}-label`
|
|
960
962
|
}, [
|
|
961
963
|
Y(f.$slots, "label", { item: e.item }, () => [
|
|
962
|
-
|
|
964
|
+
K(v, { "tooltip-attributes": { maxWidth: "500px" } }, Te({
|
|
963
965
|
default: h(() => [
|
|
964
966
|
Z(F(e.item.label) + " ", 1)
|
|
965
967
|
]),
|
|
@@ -968,7 +970,7 @@ const ue = {
|
|
|
968
970
|
s.value ? {
|
|
969
971
|
name: "tooltip",
|
|
970
972
|
fn: h(() => [
|
|
971
|
-
|
|
973
|
+
R("div", {
|
|
972
974
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
973
975
|
}, [
|
|
974
976
|
Y(f.$slots, "label-tooltip", {}, () => [
|
|
@@ -981,7 +983,7 @@ const ue = {
|
|
|
981
983
|
]), 1024)
|
|
982
984
|
], !0)
|
|
983
985
|
], 8, fo),
|
|
984
|
-
|
|
986
|
+
R("div", {
|
|
985
987
|
class: "config-card-details-value",
|
|
986
988
|
"data-testid": `${e.item.key}-property-value`
|
|
987
989
|
}, [
|
|
@@ -995,14 +997,14 @@ const ue = {
|
|
|
995
997
|
key: 0,
|
|
996
998
|
"data-testid": `${e.item.key}-badge-tags`
|
|
997
999
|
}, [
|
|
998
|
-
(m(!0), j(ve, null, ye(e.item.value, (
|
|
1000
|
+
(m(!0), j(ve, null, ye(e.item.value, (C, I) => (m(), V(p, {
|
|
999
1001
|
key: `${e.item.key}-badge-tag-${I}`,
|
|
1000
1002
|
class: "config-badge",
|
|
1001
1003
|
"data-testid": `${e.item.key}-badge-tag-${I}`,
|
|
1002
|
-
"truncation-tooltip":
|
|
1004
|
+
"truncation-tooltip": C
|
|
1003
1005
|
}, {
|
|
1004
1006
|
default: h(() => [
|
|
1005
|
-
Z(F(
|
|
1007
|
+
Z(F(C), 1)
|
|
1006
1008
|
]),
|
|
1007
1009
|
_: 2
|
|
1008
1010
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
@@ -1012,49 +1014,49 @@ const ue = {
|
|
|
1012
1014
|
class: "copy-uuid-array",
|
|
1013
1015
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1014
1016
|
}, [
|
|
1015
|
-
(m(!0), j(ve, null, ye(e.item.value, (
|
|
1017
|
+
(m(!0), j(ve, null, ye(e.item.value, (C, I) => (m(), V(y(yn), ht(d.value.childAttrs, {
|
|
1016
1018
|
key: `${e.item.key}-copy-uuid-${I}`,
|
|
1017
1019
|
"data-testid": `${e.item.key}-copy-uuid-${I}`,
|
|
1018
|
-
uuid:
|
|
1020
|
+
uuid: C
|
|
1019
1021
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1020
1022
|
], 8, bo)) : d.value.additionalComponent === "KMethodBadge" ? (m(), j("div", {
|
|
1021
1023
|
key: 2,
|
|
1022
1024
|
class: "method-badge-array",
|
|
1023
1025
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1024
1026
|
}, [
|
|
1025
|
-
(m(!0), j(ve, null, ye(e.item.value, (
|
|
1027
|
+
(m(!0), j(ve, null, ye(e.item.value, (C, I) => (m(), V(S, {
|
|
1026
1028
|
key: `${e.item.key}-badge-method-${I}`,
|
|
1027
1029
|
class: "config-badge",
|
|
1028
1030
|
"data-testid": `${e.item.key}-badge-method-${I}`,
|
|
1029
1031
|
"is-rounded": "",
|
|
1030
|
-
label:
|
|
1031
|
-
method: y(br).includes(
|
|
1032
|
+
label: C,
|
|
1033
|
+
method: y(br).includes(C.toLowerCase()) ? C.toLowerCase() : "custom"
|
|
1032
1034
|
}, {
|
|
1033
1035
|
default: h(() => [
|
|
1034
|
-
Z(F(
|
|
1036
|
+
Z(F(C), 1)
|
|
1035
1037
|
]),
|
|
1036
1038
|
_: 2
|
|
1037
1039
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
1038
|
-
], 8,
|
|
1040
|
+
], 8, Co)) : G("", !0),
|
|
1039
1041
|
d.value.additionalComponent === "JsonCardItem" ? (m(), j("div", {
|
|
1040
1042
|
key: 3,
|
|
1041
1043
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1042
1044
|
}, [
|
|
1043
|
-
(m(!0), j(ve, null, ye(e.item.value, (
|
|
1045
|
+
(m(!0), j(ve, null, ye(e.item.value, (C, I) => (m(), V(hn, {
|
|
1044
1046
|
key: `json-array-item-${I}`,
|
|
1045
1047
|
index: I,
|
|
1046
1048
|
"is-array-item": "",
|
|
1047
|
-
item:
|
|
1049
|
+
item: C
|
|
1048
1050
|
}, null, 8, ["index", "item"]))), 128))
|
|
1049
|
-
], 8,
|
|
1051
|
+
], 8, ko)) : (m(), V(b, {
|
|
1050
1052
|
key: 4,
|
|
1051
1053
|
label: y(g) ? e.item.value : ""
|
|
1052
1054
|
}, {
|
|
1053
1055
|
default: h(() => [
|
|
1054
|
-
|
|
1056
|
+
R("span", {
|
|
1055
1057
|
ref_key: "textContent",
|
|
1056
1058
|
ref: u,
|
|
1057
|
-
class:
|
|
1059
|
+
class: Ke(["attrs-data-text", { truncated: e.truncated }])
|
|
1058
1060
|
}, F(d.value.text), 3)
|
|
1059
1061
|
]),
|
|
1060
1062
|
_: 1
|
|
@@ -1071,7 +1073,7 @@ const ue = {
|
|
|
1071
1073
|
]);
|
|
1072
1074
|
};
|
|
1073
1075
|
}
|
|
1074
|
-
}), xt = /* @__PURE__ */
|
|
1076
|
+
}), xt = /* @__PURE__ */ ke(wo, [["__scopeId", "data-v-307ab96d"]]);
|
|
1075
1077
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1076
1078
|
function vn(e) {
|
|
1077
1079
|
return typeof e > "u" || e === null;
|
|
@@ -1079,10 +1081,10 @@ function vn(e) {
|
|
|
1079
1081
|
function Io(e) {
|
|
1080
1082
|
return typeof e == "object" && e !== null;
|
|
1081
1083
|
}
|
|
1082
|
-
function
|
|
1084
|
+
function Ao(e) {
|
|
1083
1085
|
return Array.isArray(e) ? e : vn(e) ? [] : [e];
|
|
1084
1086
|
}
|
|
1085
|
-
function
|
|
1087
|
+
function So(e, n) {
|
|
1086
1088
|
var t, r, o, a;
|
|
1087
1089
|
if (n)
|
|
1088
1090
|
for (a = Object.keys(n), t = 0, r = a.length; t < r; t += 1)
|
|
@@ -1098,13 +1100,13 @@ function xo(e, n) {
|
|
|
1098
1100
|
function To(e) {
|
|
1099
1101
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1100
1102
|
}
|
|
1101
|
-
var $o = vn, Mo = Io, jo =
|
|
1103
|
+
var $o = vn, Mo = Io, jo = Ao, Eo = xo, Oo = To, Fo = So, se = {
|
|
1102
1104
|
isNothing: $o,
|
|
1103
1105
|
isObject: Mo,
|
|
1104
1106
|
toArray: jo,
|
|
1105
1107
|
repeat: Eo,
|
|
1106
1108
|
isNegativeZero: Oo,
|
|
1107
|
-
extend:
|
|
1109
|
+
extend: Fo
|
|
1108
1110
|
};
|
|
1109
1111
|
function bn(e, n) {
|
|
1110
1112
|
var t = "", r = e.reason || "(unknown reason)";
|
|
@@ -1132,7 +1134,7 @@ function mt(e, n, t, r, o) {
|
|
|
1132
1134
|
function gt(e, n) {
|
|
1133
1135
|
return se.repeat(" ", n - e.length) + e;
|
|
1134
1136
|
}
|
|
1135
|
-
function
|
|
1137
|
+
function Ko(e, n) {
|
|
1136
1138
|
if (n = Object.create(n || null), !e.buffer)
|
|
1137
1139
|
return null;
|
|
1138
1140
|
n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2);
|
|
@@ -1162,7 +1164,7 @@ function Fo(e, n) {
|
|
|
1162
1164
|
`;
|
|
1163
1165
|
return s.replace(/\n$/, "");
|
|
1164
1166
|
}
|
|
1165
|
-
var
|
|
1167
|
+
var No = Ko, Bo = [
|
|
1166
1168
|
"kind",
|
|
1167
1169
|
"multi",
|
|
1168
1170
|
"resolve",
|
|
@@ -1188,7 +1190,7 @@ function Lo(e) {
|
|
|
1188
1190
|
}
|
|
1189
1191
|
function Uo(e, n) {
|
|
1190
1192
|
if (n = n || {}, Object.keys(n).forEach(function(t) {
|
|
1191
|
-
if (
|
|
1193
|
+
if (Bo.indexOf(t) === -1)
|
|
1192
1194
|
throw new me('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1193
1195
|
}), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
|
|
1194
1196
|
return !0;
|
|
@@ -1254,7 +1256,7 @@ vt.prototype.extend = function(e) {
|
|
|
1254
1256
|
var r = Object.create(vt.prototype);
|
|
1255
1257
|
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = Ht(r, "implicit"), r.compiledExplicit = Ht(r, "explicit"), r.compiledTypeMap = qo(r.compiledImplicit, r.compiledExplicit), r;
|
|
1256
1258
|
};
|
|
1257
|
-
var
|
|
1259
|
+
var Cn = vt, kn = new de("tag:yaml.org,2002:str", {
|
|
1258
1260
|
kind: "scalar",
|
|
1259
1261
|
construct: function(e) {
|
|
1260
1262
|
return e !== null ? e : "";
|
|
@@ -1269,14 +1271,14 @@ var kn = vt, Cn = new de("tag:yaml.org,2002:str", {
|
|
|
1269
1271
|
construct: function(e) {
|
|
1270
1272
|
return e !== null ? e : {};
|
|
1271
1273
|
}
|
|
1272
|
-
}), In = new
|
|
1274
|
+
}), In = new Cn({
|
|
1273
1275
|
explicit: [
|
|
1274
|
-
|
|
1276
|
+
kn,
|
|
1275
1277
|
_n,
|
|
1276
1278
|
wn
|
|
1277
1279
|
]
|
|
1278
1280
|
});
|
|
1279
|
-
function
|
|
1281
|
+
function Ro(e) {
|
|
1280
1282
|
if (e === null)
|
|
1281
1283
|
return !0;
|
|
1282
1284
|
var n = e.length;
|
|
@@ -1285,14 +1287,14 @@ function Do(e) {
|
|
|
1285
1287
|
function Vo() {
|
|
1286
1288
|
return null;
|
|
1287
1289
|
}
|
|
1288
|
-
function
|
|
1290
|
+
function Do(e) {
|
|
1289
1291
|
return e === null;
|
|
1290
1292
|
}
|
|
1291
|
-
var
|
|
1293
|
+
var An = new de("tag:yaml.org,2002:null", {
|
|
1292
1294
|
kind: "scalar",
|
|
1293
|
-
resolve:
|
|
1295
|
+
resolve: Ro,
|
|
1294
1296
|
construct: Vo,
|
|
1295
|
-
predicate:
|
|
1297
|
+
predicate: Do,
|
|
1296
1298
|
represent: {
|
|
1297
1299
|
canonical: function() {
|
|
1298
1300
|
return "~";
|
|
@@ -1324,7 +1326,7 @@ function Ho(e) {
|
|
|
1324
1326
|
function zo(e) {
|
|
1325
1327
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1326
1328
|
}
|
|
1327
|
-
var
|
|
1329
|
+
var Sn = new de("tag:yaml.org,2002:bool", {
|
|
1328
1330
|
kind: "scalar",
|
|
1329
1331
|
resolve: Go,
|
|
1330
1332
|
construct: Ho,
|
|
@@ -1501,8 +1503,8 @@ var Tn = new de("tag:yaml.org,2002:float", {
|
|
|
1501
1503
|
defaultStyle: "lowercase"
|
|
1502
1504
|
}), $n = In.extend({
|
|
1503
1505
|
implicit: [
|
|
1504
|
-
Sn,
|
|
1505
1506
|
An,
|
|
1507
|
+
Sn,
|
|
1506
1508
|
xn,
|
|
1507
1509
|
Tn
|
|
1508
1510
|
]
|
|
@@ -1540,7 +1542,7 @@ var On = new de("tag:yaml.org,2002:timestamp", {
|
|
|
1540
1542
|
function ua(e) {
|
|
1541
1543
|
return e === "<<" || e === null;
|
|
1542
1544
|
}
|
|
1543
|
-
var
|
|
1545
|
+
var Fn = new de("tag:yaml.org,2002:merge", {
|
|
1544
1546
|
kind: "scalar",
|
|
1545
1547
|
resolve: ua
|
|
1546
1548
|
}), Tt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
@@ -1572,7 +1574,7 @@ function pa(e) {
|
|
|
1572
1574
|
function fa(e) {
|
|
1573
1575
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1574
1576
|
}
|
|
1575
|
-
var
|
|
1577
|
+
var Kn = new de("tag:yaml.org,2002:binary", {
|
|
1576
1578
|
kind: "scalar",
|
|
1577
1579
|
resolve: ca,
|
|
1578
1580
|
construct: da,
|
|
@@ -1604,7 +1606,7 @@ function ya(e) {
|
|
|
1604
1606
|
function ha(e) {
|
|
1605
1607
|
return e !== null ? e : [];
|
|
1606
1608
|
}
|
|
1607
|
-
var
|
|
1609
|
+
var Nn = new de("tag:yaml.org,2002:omap", {
|
|
1608
1610
|
kind: "sequence",
|
|
1609
1611
|
resolve: ya,
|
|
1610
1612
|
construct: ha
|
|
@@ -1620,7 +1622,7 @@ function ba(e) {
|
|
|
1620
1622
|
}
|
|
1621
1623
|
return !0;
|
|
1622
1624
|
}
|
|
1623
|
-
function
|
|
1625
|
+
function Ca(e) {
|
|
1624
1626
|
if (e === null)
|
|
1625
1627
|
return [];
|
|
1626
1628
|
var n, t, r, o, a, i = e;
|
|
@@ -1628,17 +1630,17 @@ function ka(e) {
|
|
|
1628
1630
|
r = i[n], o = Object.keys(r), a[n] = [o[0], r[o[0]]];
|
|
1629
1631
|
return a;
|
|
1630
1632
|
}
|
|
1631
|
-
var
|
|
1633
|
+
var Bn = new de("tag:yaml.org,2002:pairs", {
|
|
1632
1634
|
kind: "sequence",
|
|
1633
1635
|
resolve: ba,
|
|
1634
|
-
construct:
|
|
1635
|
-
}),
|
|
1636
|
+
construct: Ca
|
|
1637
|
+
}), ka = Object.prototype.hasOwnProperty;
|
|
1636
1638
|
function _a(e) {
|
|
1637
1639
|
if (e === null)
|
|
1638
1640
|
return !0;
|
|
1639
1641
|
var n, t = e;
|
|
1640
1642
|
for (n in t)
|
|
1641
|
-
if (
|
|
1643
|
+
if (ka.call(t, n) && t[n] !== null)
|
|
1642
1644
|
return !1;
|
|
1643
1645
|
return !0;
|
|
1644
1646
|
}
|
|
@@ -1652,22 +1654,22 @@ var Pn = new de("tag:yaml.org,2002:set", {
|
|
|
1652
1654
|
}), $t = Mn.extend({
|
|
1653
1655
|
implicit: [
|
|
1654
1656
|
On,
|
|
1655
|
-
|
|
1657
|
+
Fn
|
|
1656
1658
|
],
|
|
1657
1659
|
explicit: [
|
|
1658
|
-
|
|
1659
|
-
Bn,
|
|
1660
|
+
Kn,
|
|
1660
1661
|
Nn,
|
|
1662
|
+
Bn,
|
|
1661
1663
|
Pn
|
|
1662
1664
|
]
|
|
1663
|
-
}), je = Object.prototype.hasOwnProperty, ot = 1, Ln = 2, Un = 3, at = 4, yt = 1, Ia = 2, zt = 3,
|
|
1665
|
+
}), je = Object.prototype.hasOwnProperty, ot = 1, Ln = 2, Un = 3, at = 4, yt = 1, Ia = 2, zt = 3, Aa = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Sa = /[\x85\u2028\u2029]/, xa = /[,\[\]\{\}]/, qn = /^(?:!|!!|![a-z\-]+!)$/i, Rn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1664
1666
|
function Jt(e) {
|
|
1665
1667
|
return Object.prototype.toString.call(e);
|
|
1666
1668
|
}
|
|
1667
1669
|
function we(e) {
|
|
1668
1670
|
return e === 10 || e === 13;
|
|
1669
1671
|
}
|
|
1670
|
-
function
|
|
1672
|
+
function Fe(e) {
|
|
1671
1673
|
return e === 9 || e === 32;
|
|
1672
1674
|
}
|
|
1673
1675
|
function he(e) {
|
|
@@ -1696,9 +1698,9 @@ function ja(e) {
|
|
|
1696
1698
|
(e - 65536 & 1023) + 56320
|
|
1697
1699
|
);
|
|
1698
1700
|
}
|
|
1699
|
-
var Vn = new Array(256),
|
|
1701
|
+
var Vn = new Array(256), Dn = new Array(256);
|
|
1700
1702
|
for (var Pe = 0; Pe < 256; Pe++)
|
|
1701
|
-
Vn[Pe] = Wt(Pe) ? 1 : 0,
|
|
1703
|
+
Vn[Pe] = Wt(Pe) ? 1 : 0, Dn[Pe] = Wt(Pe);
|
|
1702
1704
|
function Ea(e, n) {
|
|
1703
1705
|
this.input = e, this.filename = n.filename || null, this.schema = n.schema || $t, 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 = [];
|
|
1704
1706
|
}
|
|
@@ -1711,7 +1713,7 @@ function Gn(e, n) {
|
|
|
1711
1713
|
line: e.line,
|
|
1712
1714
|
column: e.position - e.lineStart
|
|
1713
1715
|
};
|
|
1714
|
-
return t.snippet =
|
|
1716
|
+
return t.snippet = No(t), new me(n, t);
|
|
1715
1717
|
}
|
|
1716
1718
|
function $(e, n) {
|
|
1717
1719
|
throw Gn(e, n);
|
|
@@ -1726,7 +1728,7 @@ var Yt = {
|
|
|
1726
1728
|
},
|
|
1727
1729
|
TAG: function(e, n, t) {
|
|
1728
1730
|
var r, o;
|
|
1729
|
-
t.length !== 2 && $(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1], qn.test(r) || $(e, "ill-formed tag handle (first argument) of the TAG directive"), je.call(e.tagMap, r) && $(e, 'there is a previously declared suffix for "' + r + '" tag handle'),
|
|
1731
|
+
t.length !== 2 && $(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1], qn.test(r) || $(e, "ill-formed tag handle (first argument) of the TAG directive"), je.call(e.tagMap, r) && $(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Rn.test(o) || $(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1730
1732
|
try {
|
|
1731
1733
|
o = decodeURIComponent(o);
|
|
1732
1734
|
} catch {
|
|
@@ -1742,7 +1744,7 @@ function Me(e, n, t, r) {
|
|
|
1742
1744
|
for (o = 0, a = s.length; o < a; o += 1)
|
|
1743
1745
|
i = s.charCodeAt(o), i === 9 || 32 <= i && i <= 1114111 || $(e, "expected valid JSON character");
|
|
1744
1746
|
else
|
|
1745
|
-
|
|
1747
|
+
Aa.test(s) && $(e, "the stream contains non-printable characters");
|
|
1746
1748
|
e.result += s;
|
|
1747
1749
|
}
|
|
1748
1750
|
}
|
|
@@ -1777,7 +1779,7 @@ function Mt(e) {
|
|
|
1777
1779
|
}
|
|
1778
1780
|
function oe(e, n, t) {
|
|
1779
1781
|
for (var r = 0, o = e.input.charCodeAt(e.position); o !== 0; ) {
|
|
1780
|
-
for (;
|
|
1782
|
+
for (; Fe(o); )
|
|
1781
1783
|
o === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), o = e.input.charCodeAt(++e.position);
|
|
1782
1784
|
if (n && o === 35)
|
|
1783
1785
|
do
|
|
@@ -1822,11 +1824,11 @@ function Oa(e, n, t) {
|
|
|
1822
1824
|
break;
|
|
1823
1825
|
}
|
|
1824
1826
|
}
|
|
1825
|
-
s && (Me(e, a, i, !1), jt(e, e.line - l), a = i = e.position, s = !1),
|
|
1827
|
+
s && (Me(e, a, i, !1), jt(e, e.line - l), a = i = e.position, s = !1), Fe(f) || (i = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1826
1828
|
}
|
|
1827
1829
|
return Me(e, a, i, !1), e.result ? !0 : (e.kind = u, e.result = g, !1);
|
|
1828
1830
|
}
|
|
1829
|
-
function
|
|
1831
|
+
function Fa(e, n) {
|
|
1830
1832
|
var t, r, o;
|
|
1831
1833
|
if (t = e.input.charCodeAt(e.position), t !== 39)
|
|
1832
1834
|
return !1;
|
|
@@ -1840,7 +1842,7 @@ function Ka(e, n) {
|
|
|
1840
1842
|
we(t) ? (Me(e, r, o, !0), jt(e, oe(e, !1, n)), r = o = e.position) : e.position === e.lineStart && dt(e) ? $(e, "unexpected end of the document within a single quoted scalar") : (e.position++, o = e.position);
|
|
1841
1843
|
$(e, "unexpected end of the stream within a single quoted scalar");
|
|
1842
1844
|
}
|
|
1843
|
-
function
|
|
1845
|
+
function Ka(e, n) {
|
|
1844
1846
|
var t, r, o, a, i, s;
|
|
1845
1847
|
if (s = e.input.charCodeAt(e.position), s !== 34)
|
|
1846
1848
|
return !1;
|
|
@@ -1851,7 +1853,7 @@ function Fa(e, n) {
|
|
|
1851
1853
|
if (Me(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), we(s))
|
|
1852
1854
|
oe(e, !1, n);
|
|
1853
1855
|
else if (s < 256 && Vn[s])
|
|
1854
|
-
e.result +=
|
|
1856
|
+
e.result += Dn[s], e.position++;
|
|
1855
1857
|
else if ((i = $a(s)) > 0) {
|
|
1856
1858
|
for (o = i, a = 0; o > 0; o--)
|
|
1857
1859
|
s = e.input.charCodeAt(++e.position), (i = Ta(s)) >= 0 ? a = (a << 4) + i : $(e, "expected hexadecimal character");
|
|
@@ -1864,8 +1866,8 @@ function Fa(e, n) {
|
|
|
1864
1866
|
}
|
|
1865
1867
|
$(e, "unexpected end of the stream within a double quoted scalar");
|
|
1866
1868
|
}
|
|
1867
|
-
function
|
|
1868
|
-
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, c, d, u, g, f,
|
|
1869
|
+
function Na(e, n) {
|
|
1870
|
+
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, c, d, u, g, f, A = /* @__PURE__ */ Object.create(null), v, p, S, b;
|
|
1869
1871
|
if (b = e.input.charCodeAt(e.position), b === 91)
|
|
1870
1872
|
d = 93, f = !1, s = [];
|
|
1871
1873
|
else if (b === 123)
|
|
@@ -1875,11 +1877,11 @@ function Ba(e, n) {
|
|
|
1875
1877
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), b = e.input.charCodeAt(++e.position); b !== 0; ) {
|
|
1876
1878
|
if (oe(e, !0, n), b = e.input.charCodeAt(e.position), b === d)
|
|
1877
1879
|
return e.position++, e.tag = i, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
1878
|
-
t ? b === 44 && $(e, "expected the node content, but found ','") : $(e, "missed comma between flow collection entries"), p = v =
|
|
1880
|
+
t ? b === 44 && $(e, "expected the node content, but found ','") : $(e, "missed comma between flow collection entries"), p = v = S = null, u = g = !1, b === 63 && (c = e.input.charCodeAt(e.position + 1), he(c) && (u = g = !0, e.position++, oe(e, !0, n))), r = e.line, o = e.lineStart, a = e.position, Re(e, n, ot, !1, !0), p = e.tag, v = e.result, oe(e, !0, n), b = e.input.charCodeAt(e.position), (g || e.line === r) && b === 58 && (u = !0, b = e.input.charCodeAt(++e.position), oe(e, !0, n), Re(e, n, ot, !1, !0), S = e.result), f ? qe(e, s, A, p, v, S, r, o, a) : u ? s.push(qe(e, null, A, p, v, S, r, o, a)) : s.push(v), oe(e, !0, n), b = e.input.charCodeAt(e.position), b === 44 ? (t = !0, b = e.input.charCodeAt(++e.position)) : t = !1;
|
|
1879
1881
|
}
|
|
1880
1882
|
$(e, "unexpected end of the stream within a flow collection");
|
|
1881
1883
|
}
|
|
1882
|
-
function
|
|
1884
|
+
function Ba(e, n) {
|
|
1883
1885
|
var t, r, o = yt, a = !1, i = !1, s = n, l = 0, c = !1, d, u;
|
|
1884
1886
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
1885
1887
|
r = !1;
|
|
@@ -1894,10 +1896,10 @@ function Na(e, n) {
|
|
|
1894
1896
|
d === 0 ? $(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? $(e, "repeat of an indentation width identifier") : (s = n + d - 1, i = !0);
|
|
1895
1897
|
else
|
|
1896
1898
|
break;
|
|
1897
|
-
if (
|
|
1899
|
+
if (Fe(u)) {
|
|
1898
1900
|
do
|
|
1899
1901
|
u = e.input.charCodeAt(++e.position);
|
|
1900
|
-
while (
|
|
1902
|
+
while (Fe(u));
|
|
1901
1903
|
if (u === 35)
|
|
1902
1904
|
do
|
|
1903
1905
|
u = e.input.charCodeAt(++e.position);
|
|
@@ -1916,7 +1918,7 @@ function Na(e, n) {
|
|
|
1916
1918
|
`);
|
|
1917
1919
|
break;
|
|
1918
1920
|
}
|
|
1919
|
-
for (r ?
|
|
1921
|
+
for (r ? Fe(u) ? (c = !0, e.result += se.repeat(`
|
|
1920
1922
|
`, a ? 1 + l : l)) : c ? (c = !1, e.result += se.repeat(`
|
|
1921
1923
|
`, l + 1)) : l === 0 ? a && (e.result += " ") : e.result += se.repeat(`
|
|
1922
1924
|
`, l) : e.result += se.repeat(`
|
|
@@ -1935,7 +1937,7 @@ function Qt(e, n) {
|
|
|
1935
1937
|
a.push(null), l = e.input.charCodeAt(e.position);
|
|
1936
1938
|
continue;
|
|
1937
1939
|
}
|
|
1938
|
-
if (t = e.line,
|
|
1940
|
+
if (t = e.line, Re(e, n, Un, !1, !0), a.push(e.result), oe(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && l !== 0)
|
|
1939
1941
|
$(e, "bad indentation of a sequence entry");
|
|
1940
1942
|
else if (e.lineIndent < n)
|
|
1941
1943
|
break;
|
|
@@ -1943,35 +1945,35 @@ function Qt(e, n) {
|
|
|
1943
1945
|
return s ? (e.tag = r, e.anchor = o, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1944
1946
|
}
|
|
1945
1947
|
function Pa(e, n, t) {
|
|
1946
|
-
var r, o, a, i, s, l, c = e.tag, d = e.anchor, u = {}, g = /* @__PURE__ */ Object.create(null), f = null,
|
|
1948
|
+
var r, o, a, i, s, l, c = e.tag, d = e.anchor, u = {}, g = /* @__PURE__ */ Object.create(null), f = null, A = null, v = null, p = !1, S = !1, b;
|
|
1947
1949
|
if (e.firstTabInLine !== -1)
|
|
1948
1950
|
return !1;
|
|
1949
1951
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), b = e.input.charCodeAt(e.position); b !== 0; ) {
|
|
1950
1952
|
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, $(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (b === 63 || b === 58) && he(r))
|
|
1951
|
-
b === 63 ? (p && (qe(e, u, g, f,
|
|
1953
|
+
b === 63 ? (p && (qe(e, u, g, f, A, null, i, s, l), f = A = v = null), S = !0, p = !0, o = !0) : p ? (p = !1, o = !0) : $(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, b = r;
|
|
1952
1954
|
else {
|
|
1953
|
-
if (i = e.line, s = e.lineStart, l = e.position, !
|
|
1955
|
+
if (i = e.line, s = e.lineStart, l = e.position, !Re(e, t, Ln, !1, !0))
|
|
1954
1956
|
break;
|
|
1955
1957
|
if (e.line === a) {
|
|
1956
|
-
for (b = e.input.charCodeAt(e.position);
|
|
1958
|
+
for (b = e.input.charCodeAt(e.position); Fe(b); )
|
|
1957
1959
|
b = e.input.charCodeAt(++e.position);
|
|
1958
1960
|
if (b === 58)
|
|
1959
|
-
b = e.input.charCodeAt(++e.position), he(b) || $(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (qe(e, u, g, f,
|
|
1960
|
-
else if (
|
|
1961
|
+
b = e.input.charCodeAt(++e.position), he(b) || $(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (qe(e, u, g, f, A, null, i, s, l), f = A = v = null), S = !0, p = !1, o = !1, f = e.tag, A = e.result;
|
|
1962
|
+
else if (S)
|
|
1961
1963
|
$(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1962
1964
|
else
|
|
1963
1965
|
return e.tag = c, e.anchor = d, !0;
|
|
1964
|
-
} else if (
|
|
1966
|
+
} else if (S)
|
|
1965
1967
|
$(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1966
1968
|
else
|
|
1967
1969
|
return e.tag = c, e.anchor = d, !0;
|
|
1968
1970
|
}
|
|
1969
|
-
if ((e.line === a || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position),
|
|
1971
|
+
if ((e.line === a || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Re(e, n, at, !0, o) && (p ? A = e.result : v = e.result), p || (qe(e, u, g, f, A, v, i, s, l), f = A = v = null), oe(e, !0, -1), b = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > n) && b !== 0)
|
|
1970
1972
|
$(e, "bad indentation of a mapping entry");
|
|
1971
1973
|
else if (e.lineIndent < n)
|
|
1972
1974
|
break;
|
|
1973
1975
|
}
|
|
1974
|
-
return p && qe(e, u, g, f,
|
|
1976
|
+
return p && qe(e, u, g, f, A, null, i, s, l), S && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), S;
|
|
1975
1977
|
}
|
|
1976
1978
|
function La(e) {
|
|
1977
1979
|
var n, t = !1, r = !1, o, a, i;
|
|
@@ -1987,7 +1989,7 @@ function La(e) {
|
|
|
1987
1989
|
i === 33 && (r ? $(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(n - 1, e.position + 1), qn.test(o) || $(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), i = e.input.charCodeAt(++e.position);
|
|
1988
1990
|
a = e.input.slice(n, e.position), xa.test(a) && $(e, "tag suffix cannot contain flow indicator characters");
|
|
1989
1991
|
}
|
|
1990
|
-
a && !
|
|
1992
|
+
a && !Rn.test(a) && $(e, "tag name cannot contain such characters: " + a);
|
|
1991
1993
|
try {
|
|
1992
1994
|
a = decodeURIComponent(a);
|
|
1993
1995
|
} catch {
|
|
@@ -2011,39 +2013,39 @@ function qa(e) {
|
|
|
2011
2013
|
r = e.input.charCodeAt(++e.position);
|
|
2012
2014
|
return e.position === n && $(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), je.call(e.anchorMap, t) || $(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], oe(e, !0, -1), !0;
|
|
2013
2015
|
}
|
|
2014
|
-
function
|
|
2015
|
-
var a, i, s, l = 1, c = !1, d = !1, u, g, f,
|
|
2016
|
+
function Re(e, n, t, r, o) {
|
|
2017
|
+
var a, i, s, l = 1, c = !1, d = !1, u, g, f, A, v, p;
|
|
2016
2018
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = i = s = at === t || Un === t, r && oe(e, !0, -1) && (c = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2017
2019
|
for (; La(e) || Ua(e); )
|
|
2018
2020
|
oe(e, !0, -1) ? (c = !0, s = a, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2019
|
-
if (s && (s = c || o), (l === 1 || at === t) && (ot === t || Ln === t ? v = n : v = n + 1, p = e.position - e.lineStart, l === 1 ? s && (Qt(e, p) || Pa(e, p, v)) ||
|
|
2021
|
+
if (s && (s = c || o), (l === 1 || at === t) && (ot === t || Ln === t ? v = n : v = n + 1, p = e.position - e.lineStart, l === 1 ? s && (Qt(e, p) || Pa(e, p, v)) || Na(e, v) ? d = !0 : (i && Ba(e, v) || Fa(e, v) || Ka(e, v) ? d = !0 : qa(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && $(e, "alias node should not have any properties")) : Oa(e, v, ot === t) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && Qt(e, p))), e.tag === null)
|
|
2020
2022
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2021
2023
|
else if (e.tag === "?") {
|
|
2022
2024
|
for (e.result !== null && e.kind !== "scalar" && $(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, g = e.implicitTypes.length; u < g; u += 1)
|
|
2023
|
-
if (
|
|
2024
|
-
e.result =
|
|
2025
|
+
if (A = e.implicitTypes[u], A.resolve(e.result)) {
|
|
2026
|
+
e.result = A.construct(e.result), e.tag = A.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2025
2027
|
break;
|
|
2026
2028
|
}
|
|
2027
2029
|
} else if (e.tag !== "!") {
|
|
2028
2030
|
if (je.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2029
|
-
|
|
2031
|
+
A = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2030
2032
|
else
|
|
2031
|
-
for (
|
|
2033
|
+
for (A = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, g = f.length; u < g; u += 1)
|
|
2032
2034
|
if (e.tag.slice(0, f[u].tag.length) === f[u].tag) {
|
|
2033
|
-
|
|
2035
|
+
A = f[u];
|
|
2034
2036
|
break;
|
|
2035
2037
|
}
|
|
2036
|
-
|
|
2038
|
+
A || $(e, "unknown tag !<" + e.tag + ">"), e.result !== null && A.kind !== e.kind && $(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + A.kind + '", not "' + e.kind + '"'), A.resolve(e.result, e.tag) ? (e.result = A.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : $(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2037
2039
|
}
|
|
2038
2040
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2039
2041
|
}
|
|
2040
|
-
function
|
|
2042
|
+
function Ra(e) {
|
|
2041
2043
|
var n = e.position, t, r, o, a = !1, i;
|
|
2042
2044
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (i = e.input.charCodeAt(e.position)) !== 0 && (oe(e, !0, -1), i = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || i !== 37)); ) {
|
|
2043
2045
|
for (a = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !he(i); )
|
|
2044
2046
|
i = e.input.charCodeAt(++e.position);
|
|
2045
2047
|
for (r = e.input.slice(t, e.position), o = [], r.length < 1 && $(e, "directive name must not be less than one character in length"); i !== 0; ) {
|
|
2046
|
-
for (;
|
|
2048
|
+
for (; Fe(i); )
|
|
2047
2049
|
i = e.input.charCodeAt(++e.position);
|
|
2048
2050
|
if (i === 35) {
|
|
2049
2051
|
do
|
|
@@ -2059,7 +2061,7 @@ function Da(e) {
|
|
|
2059
2061
|
}
|
|
2060
2062
|
i !== 0 && Mt(e), je.call(Yt, r) ? Yt[r](e, r, o) : it(e, 'unknown document directive "' + r + '"');
|
|
2061
2063
|
}
|
|
2062
|
-
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)) : a && $(e, "directives end mark is expected"),
|
|
2064
|
+
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)) : a && $(e, "directives end mark is expected"), Re(e, e.lineIndent - 1, at, !1, !0), oe(e, !0, -1), e.checkLineBreaks && Sa.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 && dt(e)) {
|
|
2063
2065
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, oe(e, !0, -1));
|
|
2064
2066
|
return;
|
|
2065
2067
|
}
|
|
@@ -2075,7 +2077,7 @@ function Hn(e, n) {
|
|
|
2075
2077
|
for (r !== -1 && (t.position = r, $(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2076
2078
|
t.lineIndent += 1, t.position += 1;
|
|
2077
2079
|
for (; t.position < t.length - 1; )
|
|
2078
|
-
|
|
2080
|
+
Ra(t);
|
|
2079
2081
|
return t.documents;
|
|
2080
2082
|
}
|
|
2081
2083
|
function Va(e, n, t) {
|
|
@@ -2086,7 +2088,7 @@ function Va(e, n, t) {
|
|
|
2086
2088
|
for (var o = 0, a = r.length; o < a; o += 1)
|
|
2087
2089
|
n(r[o]);
|
|
2088
2090
|
}
|
|
2089
|
-
function
|
|
2091
|
+
function Da(e, n) {
|
|
2090
2092
|
var t = Hn(e, n);
|
|
2091
2093
|
if (t.length !== 0) {
|
|
2092
2094
|
if (t.length === 1)
|
|
@@ -2094,7 +2096,7 @@ function Ra(e, n) {
|
|
|
2094
2096
|
throw new me("expected a single document in the stream, but found more");
|
|
2095
2097
|
}
|
|
2096
2098
|
}
|
|
2097
|
-
var Ga = Va, Ha =
|
|
2099
|
+
var Ga = Va, Ha = Da, zn = {
|
|
2098
2100
|
loadAll: Ga,
|
|
2099
2101
|
load: Ha
|
|
2100
2102
|
}, Jn = Object.prototype.toString, Wn = Object.prototype.hasOwnProperty, Et = 65279, za = 9, We = 10, Ja = 13, Wa = 32, Ya = 33, Za = 34, bt = 35, Qa = 37, Xa = 38, ei = 39, ti = 42, Yn = 44, ni = 45, st = 58, ri = 61, oi = 62, ai = 63, ii = 64, Zn = 91, Qn = 93, si = 96, Xn = 123, li = 124, er = 125, fe = {};
|
|
@@ -2162,7 +2164,7 @@ function Xt(e, n) {
|
|
|
2162
2164
|
` && (a += t), a += i;
|
|
2163
2165
|
return a;
|
|
2164
2166
|
}
|
|
2165
|
-
function
|
|
2167
|
+
function Ct(e, n) {
|
|
2166
2168
|
return `
|
|
2167
2169
|
` + se.repeat(" ", e.indent * n);
|
|
2168
2170
|
}
|
|
@@ -2206,9 +2208,9 @@ function tr(e) {
|
|
|
2206
2208
|
var n = /^\n* /;
|
|
2207
2209
|
return n.test(e);
|
|
2208
2210
|
}
|
|
2209
|
-
var nr = 1,
|
|
2211
|
+
var nr = 1, kt = 2, rr = 3, or = 4, Le = 5;
|
|
2210
2212
|
function vi(e, n, t, r, o, a, i, s) {
|
|
2211
|
-
var l, c = 0, d = null, u = !1, g = !1, f = r !== -1,
|
|
2213
|
+
var l, c = 0, d = null, u = !1, g = !1, f = r !== -1, A = -1, v = yi(He(e, 0)) && hi(He(e, e.length - 1));
|
|
2212
2214
|
if (n || i)
|
|
2213
2215
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2214
2216
|
if (c = He(e, l), !Ze(c))
|
|
@@ -2219,14 +2221,14 @@ function vi(e, n, t, r, o, a, i, s) {
|
|
|
2219
2221
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2220
2222
|
if (c = He(e, l), c === We)
|
|
2221
2223
|
u = !0, f && (g = g || // Foldable line = too long, and not more-indented.
|
|
2222
|
-
l -
|
|
2224
|
+
l - A - 1 > r && e[A + 1] !== " ", A = l);
|
|
2223
2225
|
else if (!Ze(c))
|
|
2224
2226
|
return Le;
|
|
2225
2227
|
v = v && tn(c, d, s), d = c;
|
|
2226
2228
|
}
|
|
2227
|
-
g = g || f && l -
|
|
2229
|
+
g = g || f && l - A - 1 > r && e[A + 1] !== " ";
|
|
2228
2230
|
}
|
|
2229
|
-
return !u && !g ? v && !i && !o(e) ? nr : a === Ye ? Le :
|
|
2231
|
+
return !u && !g ? v && !i && !o(e) ? nr : a === Ye ? Le : kt : t > 9 && tr(e) ? Le : i ? a === Ye ? Le : kt : g ? or : rr;
|
|
2230
2232
|
}
|
|
2231
2233
|
function bi(e, n, t, r, o) {
|
|
2232
2234
|
e.dump = function() {
|
|
@@ -2250,14 +2252,14 @@ function bi(e, n, t, r, o) {
|
|
|
2250
2252
|
)) {
|
|
2251
2253
|
case nr:
|
|
2252
2254
|
return n;
|
|
2253
|
-
case
|
|
2255
|
+
case kt:
|
|
2254
2256
|
return "'" + n.replace(/'/g, "''") + "'";
|
|
2255
2257
|
case rr:
|
|
2256
2258
|
return "|" + nn(n, e.indent) + rn(Xt(n, a));
|
|
2257
2259
|
case or:
|
|
2258
|
-
return ">" + nn(n, e.indent) + rn(Xt(
|
|
2260
|
+
return ">" + nn(n, e.indent) + rn(Xt(Ci(n, i), a));
|
|
2259
2261
|
case Le:
|
|
2260
|
-
return '"' +
|
|
2262
|
+
return '"' + ki(n) + '"';
|
|
2261
2263
|
default:
|
|
2262
2264
|
throw new me("impossible error: invalid scalar style");
|
|
2263
2265
|
}
|
|
@@ -2275,7 +2277,7 @@ function rn(e) {
|
|
|
2275
2277
|
return e[e.length - 1] === `
|
|
2276
2278
|
` ? e.slice(0, -1) : e;
|
|
2277
2279
|
}
|
|
2278
|
-
function
|
|
2280
|
+
function Ci(e, n) {
|
|
2279
2281
|
for (var t = /(\n+)([^\n]*)/g, r = function() {
|
|
2280
2282
|
var c = e.indexOf(`
|
|
2281
2283
|
`);
|
|
@@ -2298,7 +2300,7 @@ function on(e, n) {
|
|
|
2298
2300
|
`, e.length - o > n && i > o ? l += e.slice(o, i) + `
|
|
2299
2301
|
` + e.slice(i + 1) : l += e.slice(o), l.slice(1);
|
|
2300
2302
|
}
|
|
2301
|
-
function
|
|
2303
|
+
function ki(e) {
|
|
2302
2304
|
for (var n = "", t = 0, r, o = 0; o < e.length; t >= 65536 ? o += 2 : o++)
|
|
2303
2305
|
t = He(e, o), r = fe[t], !r && Ze(t) ? (n += e[o], t >= 65536 && (n += e[o + 1])) : n += r || pi(t);
|
|
2304
2306
|
return n;
|
|
@@ -2306,19 +2308,19 @@ function Ci(e) {
|
|
|
2306
2308
|
function _i(e, n, t) {
|
|
2307
2309
|
var r = "", o = e.tag, a, i, s;
|
|
2308
2310
|
for (a = 0, i = t.length; a < i; a += 1)
|
|
2309
|
-
s = t[a], e.replacer && (s = e.replacer.call(t, String(a), s)), (
|
|
2311
|
+
s = t[a], e.replacer && (s = e.replacer.call(t, String(a), s)), (Se(e, n, s, !1, !1) || typeof s > "u" && Se(e, n, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2310
2312
|
e.tag = o, e.dump = "[" + r + "]";
|
|
2311
2313
|
}
|
|
2312
2314
|
function an(e, n, t, r) {
|
|
2313
2315
|
var o = "", a = e.tag, i, s, l;
|
|
2314
2316
|
for (i = 0, s = t.length; i < s; i += 1)
|
|
2315
|
-
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (
|
|
2317
|
+
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (Se(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && Se(e, n + 1, null, !0, !0, !1, !0)) && ((!r || o !== "") && (o += Ct(e, n)), e.dump && We === e.dump.charCodeAt(0) ? o += "-" : o += "- ", o += e.dump);
|
|
2316
2318
|
e.tag = a, e.dump = o || "[]";
|
|
2317
2319
|
}
|
|
2318
2320
|
function wi(e, n, t) {
|
|
2319
2321
|
var r = "", o = e.tag, a = Object.keys(t), i, s, l, c, d;
|
|
2320
2322
|
for (i = 0, s = a.length; i < s; i += 1)
|
|
2321
|
-
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = a[i], c = t[l], e.replacer && (c = e.replacer.call(t, l, c)),
|
|
2323
|
+
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = a[i], c = t[l], e.replacer && (c = e.replacer.call(t, l, c)), Se(e, n, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), Se(e, n, c, !1, !1) && (d += e.dump, r += d));
|
|
2322
2324
|
e.tag = o, e.dump = "{" + r + "}";
|
|
2323
2325
|
}
|
|
2324
2326
|
function Ii(e, n, t, r) {
|
|
@@ -2330,7 +2332,7 @@ function Ii(e, n, t, r) {
|
|
|
2330
2332
|
else if (e.sortKeys)
|
|
2331
2333
|
throw new me("sortKeys must be a boolean or a function");
|
|
2332
2334
|
for (s = 0, l = i.length; s < l; s += 1)
|
|
2333
|
-
g = "", (!r || o !== "") && (g +=
|
|
2335
|
+
g = "", (!r || o !== "") && (g += Ct(e, n)), c = i[s], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)), Se(e, n + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && We === e.dump.charCodeAt(0) ? g += "?" : g += "? "), g += e.dump, u && (g += Ct(e, n)), Se(e, n + 1, d, !0, u) && (e.dump && We === e.dump.charCodeAt(0) ? g += ":" : g += ": ", g += e.dump, o += g));
|
|
2334
2336
|
e.tag = a, e.dump = o || "{}";
|
|
2335
2337
|
}
|
|
2336
2338
|
function sn(e, n, t) {
|
|
@@ -2350,7 +2352,7 @@ function sn(e, n, t) {
|
|
|
2350
2352
|
}
|
|
2351
2353
|
return !1;
|
|
2352
2354
|
}
|
|
2353
|
-
function
|
|
2355
|
+
function Se(e, n, t, r, o, a, i) {
|
|
2354
2356
|
e.tag = null, e.dump = t, sn(e, t, !1) || sn(e, t, !0);
|
|
2355
2357
|
var s = Jn.call(e.dump), l = r, c;
|
|
2356
2358
|
r && (r = e.flowLevel < 0 || e.flowLevel > n);
|
|
@@ -2375,7 +2377,7 @@ function Ae(e, n, t, r, o, a, i) {
|
|
|
2375
2377
|
}
|
|
2376
2378
|
return !0;
|
|
2377
2379
|
}
|
|
2378
|
-
function
|
|
2380
|
+
function Ai(e, n) {
|
|
2379
2381
|
var t = [], r = [], o, a;
|
|
2380
2382
|
for (_t(e, t, r), o = 0, a = r.length; o < a; o += 1)
|
|
2381
2383
|
n.duplicates.push(t[r[o]]);
|
|
@@ -2393,15 +2395,15 @@ function _t(e, n, t) {
|
|
|
2393
2395
|
for (r = Object.keys(e), o = 0, a = r.length; o < a; o += 1)
|
|
2394
2396
|
_t(e[r[o]], n, t);
|
|
2395
2397
|
}
|
|
2396
|
-
function
|
|
2398
|
+
function Si(e, n) {
|
|
2397
2399
|
n = n || {};
|
|
2398
2400
|
var t = new mi(n);
|
|
2399
|
-
t.noRefs ||
|
|
2401
|
+
t.noRefs || Ai(e, t);
|
|
2400
2402
|
var r = e;
|
|
2401
|
-
return t.replacer && (r = t.replacer.call({ "": r }, "", r)),
|
|
2403
|
+
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), Se(t, 0, r, !0, !0) ? t.dump + `
|
|
2402
2404
|
` : "";
|
|
2403
2405
|
}
|
|
2404
|
-
var xi =
|
|
2406
|
+
var xi = Si, Ti = {
|
|
2405
2407
|
dump: xi
|
|
2406
2408
|
};
|
|
2407
2409
|
function Ot(e, n) {
|
|
@@ -2409,37 +2411,37 @@ function Ot(e, n) {
|
|
|
2409
2411
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2410
2412
|
};
|
|
2411
2413
|
}
|
|
2412
|
-
var $i = de, Mi =
|
|
2413
|
-
binary:
|
|
2414
|
+
var $i = de, Mi = Cn, ji = In, Ei = $n, Oi = Mn, Fi = $t, Ki = zn.load, Ni = zn.loadAll, Bi = Ti.dump, Pi = me, Li = {
|
|
2415
|
+
binary: Kn,
|
|
2414
2416
|
float: Tn,
|
|
2415
2417
|
map: wn,
|
|
2416
|
-
null:
|
|
2417
|
-
pairs:
|
|
2418
|
+
null: An,
|
|
2419
|
+
pairs: Bn,
|
|
2418
2420
|
set: Pn,
|
|
2419
2421
|
timestamp: On,
|
|
2420
|
-
bool:
|
|
2422
|
+
bool: Sn,
|
|
2421
2423
|
int: xn,
|
|
2422
|
-
merge:
|
|
2423
|
-
omap:
|
|
2424
|
+
merge: Fn,
|
|
2425
|
+
omap: Nn,
|
|
2424
2426
|
seq: _n,
|
|
2425
|
-
str:
|
|
2426
|
-
}, Ui = Ot("safeLoad", "load"), qi = Ot("safeLoadAll", "loadAll"),
|
|
2427
|
+
str: kn
|
|
2428
|
+
}, Ui = Ot("safeLoad", "load"), qi = Ot("safeLoadAll", "loadAll"), Ri = Ot("safeDump", "dump"), Vi = {
|
|
2427
2429
|
Type: $i,
|
|
2428
2430
|
Schema: Mi,
|
|
2429
2431
|
FAILSAFE_SCHEMA: ji,
|
|
2430
2432
|
JSON_SCHEMA: Ei,
|
|
2431
2433
|
CORE_SCHEMA: Oi,
|
|
2432
|
-
DEFAULT_SCHEMA:
|
|
2433
|
-
load:
|
|
2434
|
-
loadAll:
|
|
2435
|
-
dump:
|
|
2434
|
+
DEFAULT_SCHEMA: Fi,
|
|
2435
|
+
load: Ki,
|
|
2436
|
+
loadAll: Ni,
|
|
2437
|
+
dump: Bi,
|
|
2436
2438
|
YAMLException: Pi,
|
|
2437
2439
|
types: Li,
|
|
2438
2440
|
safeLoad: Ui,
|
|
2439
2441
|
safeLoadAll: qi,
|
|
2440
|
-
safeDump:
|
|
2442
|
+
safeDump: Ri
|
|
2441
2443
|
};
|
|
2442
|
-
const
|
|
2444
|
+
const Di = {
|
|
2443
2445
|
key: 0,
|
|
2444
2446
|
class: "config-card-display-form"
|
|
2445
2447
|
}, Gi = ["data-testid"], Hi = {
|
|
@@ -2483,10 +2485,10 @@ const Ri = {
|
|
|
2483
2485
|
}, { immediate: !0 }), (s, l) => {
|
|
2484
2486
|
const c = U("KCodeBlock");
|
|
2485
2487
|
return m(), j(ve, null, [
|
|
2486
|
-
e.format === "structured" ? (m(), j("div",
|
|
2488
|
+
e.format === "structured" ? (m(), j("div", Di, [
|
|
2487
2489
|
(m(!0), j(ve, null, ye(e.propListTypes, (d) => (m(), j("div", {
|
|
2488
2490
|
key: `config-card-details-${d}-props`,
|
|
2489
|
-
class:
|
|
2491
|
+
class: Ke(`config-card-details-${d}-props`),
|
|
2490
2492
|
"data-testid": `config-card-details-${d}-props`
|
|
2491
2493
|
}, [
|
|
2492
2494
|
d !== "basic" ? (m(), j("div", Hi, F(d === "advanced" ? y(r)("baseConfigCard.sections.advanced") : y(r)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
@@ -2516,7 +2518,7 @@ const Ri = {
|
|
|
2516
2518
|
], 10, Gi))), 128))
|
|
2517
2519
|
])) : G("", !0),
|
|
2518
2520
|
e.format === "json" ? (m(), j("div", zi, [
|
|
2519
|
-
|
|
2521
|
+
K(c, {
|
|
2520
2522
|
id: "config-card-codeblock",
|
|
2521
2523
|
code: a.value,
|
|
2522
2524
|
language: "json",
|
|
@@ -2524,7 +2526,7 @@ const Ri = {
|
|
|
2524
2526
|
}, null, 8, ["code"])
|
|
2525
2527
|
])) : G("", !0),
|
|
2526
2528
|
e.format === "yaml" ? (m(), j("div", Ji, [
|
|
2527
|
-
|
|
2529
|
+
K(c, {
|
|
2528
2530
|
id: "config-card-codeblock",
|
|
2529
2531
|
code: i.value,
|
|
2530
2532
|
language: "yaml",
|
|
@@ -2534,7 +2536,7 @@ const Ri = {
|
|
|
2534
2536
|
], 64);
|
|
2535
2537
|
};
|
|
2536
2538
|
}
|
|
2537
|
-
}), Yi = /* @__PURE__ */
|
|
2539
|
+
}), Yi = /* @__PURE__ */ ke(Wi, [["__scopeId", "data-v-6c45e9e4"]]), ln = "24px", Zi = (e, n) => {
|
|
2538
2540
|
const t = e.__vccOpts || e;
|
|
2539
2541
|
for (const [r, o] of n)
|
|
2540
2542
|
t[r] = o;
|
|
@@ -2542,7 +2544,7 @@ const Ri = {
|
|
|
2542
2544
|
}, Qi = (e) => (yr("data-v-dd88a2bb"), e = e(), hr(), e), Xi = ["aria-hidden"], es = {
|
|
2543
2545
|
key: 0,
|
|
2544
2546
|
"data-testid": "kui-icon-svg-title"
|
|
2545
|
-
}, ts = /* @__PURE__ */ Qi(() => /* @__PURE__ */
|
|
2547
|
+
}, ts = /* @__PURE__ */ Qi(() => /* @__PURE__ */ R("path", {
|
|
2546
2548
|
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",
|
|
2547
2549
|
fill: "currentColor"
|
|
2548
2550
|
}, null, -1)), ns = /* @__PURE__ */ ae({
|
|
@@ -2738,8 +2740,8 @@ const Ri = {
|
|
|
2738
2740
|
label: "YAML",
|
|
2739
2741
|
value: "yaml"
|
|
2740
2742
|
}
|
|
2741
|
-
], d = O("structured"), u = (
|
|
2742
|
-
d.value =
|
|
2743
|
+
], d = O("structured"), u = (w) => {
|
|
2744
|
+
d.value = w == null ? void 0 : w.value;
|
|
2743
2745
|
}, g = {
|
|
2744
2746
|
id: {
|
|
2745
2747
|
type: te.ID,
|
|
@@ -2774,19 +2776,19 @@ const Ri = {
|
|
|
2774
2776
|
// the last property displayed
|
|
2775
2777
|
section: be.Basic
|
|
2776
2778
|
}
|
|
2777
|
-
}, f = O(!1),
|
|
2778
|
-
var
|
|
2779
|
+
}, f = O(!1), A = O(!1), v = O(""), p = O(), S = M(() => {
|
|
2780
|
+
var w, N, B;
|
|
2779
2781
|
if (!p.value)
|
|
2780
2782
|
return [];
|
|
2781
|
-
const
|
|
2783
|
+
const k = [], x = Object.keys(p.value).length;
|
|
2782
2784
|
for (const T in p.value) {
|
|
2783
|
-
const P = (
|
|
2785
|
+
const P = (N = (w = r.configSchema) == null ? void 0 : w[T]) == null ? void 0 : N.order, J = (B = g[T]) == null ? void 0 : B.order;
|
|
2784
2786
|
let Q = x;
|
|
2785
|
-
(J || J === 0) && (Q = J === -1 ? x + 1 : J), P && (Q = P === -1 ? x + 1 : P),
|
|
2787
|
+
(J || J === 0) && (Q = J === -1 ? x + 1 : J), P && (Q = P === -1 ? x + 1 : P), k.push([T, Q]);
|
|
2786
2788
|
}
|
|
2787
|
-
return
|
|
2789
|
+
return k.sort(function(T, P) {
|
|
2788
2790
|
return T[1] - P[1];
|
|
2789
|
-
}),
|
|
2791
|
+
}), k.map((T) => {
|
|
2790
2792
|
var P, J;
|
|
2791
2793
|
const Q = T[0], X = (P = p.value) == null ? void 0 : P[Q], ee = ((J = r.configSchema) == null ? void 0 : J[Q]) || {}, ie = g[Q];
|
|
2792
2794
|
return {
|
|
@@ -2800,20 +2802,20 @@ const Ri = {
|
|
|
2800
2802
|
};
|
|
2801
2803
|
}).filter((T) => !T.hidden && T.key !== r.pluginConfigKey);
|
|
2802
2804
|
}), b = M(() => {
|
|
2803
|
-
var
|
|
2805
|
+
var w, N;
|
|
2804
2806
|
if (!p.value || !r.pluginConfigKey)
|
|
2805
2807
|
return [];
|
|
2806
|
-
const
|
|
2807
|
-
for (const T in
|
|
2808
|
-
const P = (
|
|
2809
|
-
let Q = J != null && J !== "" ?
|
|
2810
|
-
P && (Q = P === -1 ?
|
|
2808
|
+
const B = p.value[r.pluginConfigKey] || {}, k = Object.keys(B).length, x = [];
|
|
2809
|
+
for (const T in B) {
|
|
2810
|
+
const P = (N = (w = r.pluginConfigSchema) == null ? void 0 : w[T]) == null ? void 0 : N.order, J = B[T];
|
|
2811
|
+
let Q = J != null && J !== "" ? k - 1 : k;
|
|
2812
|
+
P && (Q = P === -1 ? k + 1 : P), x.push([T, Q]);
|
|
2811
2813
|
}
|
|
2812
2814
|
return x.sort(function(T, P) {
|
|
2813
2815
|
return T[1] - P[1];
|
|
2814
2816
|
}), x.map((T) => {
|
|
2815
2817
|
var P;
|
|
2816
|
-
const J = T[0], Q =
|
|
2818
|
+
const J = T[0], Q = B[J], X = ((P = r.pluginConfigSchema) == null ? void 0 : P[J]) || {};
|
|
2817
2819
|
return {
|
|
2818
2820
|
key: J,
|
|
2819
2821
|
value: Q,
|
|
@@ -2824,52 +2826,52 @@ const Ri = {
|
|
|
2824
2826
|
section: be.Plugin
|
|
2825
2827
|
};
|
|
2826
2828
|
}).filter((T) => !T.hidden);
|
|
2827
|
-
}),
|
|
2828
|
-
var
|
|
2829
|
+
}), C = M(() => {
|
|
2830
|
+
var w, N, B, k;
|
|
2829
2831
|
return {
|
|
2830
|
-
basic: (
|
|
2831
|
-
advanced: (
|
|
2832
|
-
plugin: (
|
|
2832
|
+
basic: (w = S.value) == null ? void 0 : w.filter((x) => x.section === be.Basic),
|
|
2833
|
+
advanced: (N = S.value) == null ? void 0 : N.filter((x) => x.section === be.Advanced),
|
|
2834
|
+
plugin: (k = b.value) == null ? void 0 : k.concat((B = S.value) == null ? void 0 : B.filter((x) => x.section === be.Plugin))
|
|
2833
2835
|
};
|
|
2834
2836
|
}), I = M(() => {
|
|
2835
|
-
const
|
|
2836
|
-
return
|
|
2837
|
-
}), ne = (
|
|
2838
|
-
var
|
|
2839
|
-
let
|
|
2840
|
-
return r.config.app === "konnect" ?
|
|
2841
|
-
}), H = (
|
|
2842
|
-
p.value &&
|
|
2837
|
+
const w = [];
|
|
2838
|
+
return C.value.basic.length && w.push("basic"), C.value.advanced.length && w.push("advanced"), C.value.plugin.length && w.push("plugin"), w;
|
|
2839
|
+
}), ne = (w) => !!(w.tooltip || o[`${w.key}-label-tooltip`]), pe = M(() => {
|
|
2840
|
+
var w, N;
|
|
2841
|
+
let B = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2842
|
+
return r.config.app === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((w = r.config) == null ? void 0 : w.controlPlaneId) || "") : r.config.app === "kongManager" && (B = B.replace(/\/{workspace}/gi, (N = r.config) != null && N.workspace ? `/${r.config.workspace}` : "")), B = B.replace(/{id}/gi, r.config.entityId), B;
|
|
2843
|
+
}), H = (w) => {
|
|
2844
|
+
p.value && w(JSON.stringify(p.value)) ? n("copy:success", p.value) : n("copy:error");
|
|
2843
2845
|
};
|
|
2844
|
-
return xe(f, (
|
|
2845
|
-
n("loading",
|
|
2846
|
+
return xe(f, (w) => {
|
|
2847
|
+
n("loading", w);
|
|
2846
2848
|
}, { immediate: !0 }), Qe(async () => {
|
|
2847
|
-
|
|
2849
|
+
A.value = !1, f.value = !0;
|
|
2848
2850
|
try {
|
|
2849
|
-
const { data:
|
|
2851
|
+
const { data: w } = await l.get(pe.value);
|
|
2850
2852
|
if (r.dataKey)
|
|
2851
|
-
if (typeof
|
|
2852
|
-
p.value = { ...
|
|
2853
|
+
if (typeof w[r.dataKey] < "u")
|
|
2854
|
+
p.value = { ...w[r.dataKey] };
|
|
2853
2855
|
else
|
|
2854
2856
|
throw new Error(a("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
2855
2857
|
else
|
|
2856
|
-
p.value = { ...
|
|
2857
|
-
Object.keys(r.configSchema).filter((
|
|
2858
|
-
p.value && typeof p.value[
|
|
2859
|
-
}), n("fetch:success",
|
|
2860
|
-
} catch (
|
|
2861
|
-
const
|
|
2862
|
-
v.value =
|
|
2858
|
+
p.value = { ...w };
|
|
2859
|
+
Object.keys(r.configSchema).filter((N) => r.configSchema[N].forceShow).forEach((N) => {
|
|
2860
|
+
p.value && typeof p.value[N] > "u" && (p.value[N] = null);
|
|
2861
|
+
}), n("fetch:success", w);
|
|
2862
|
+
} catch (w) {
|
|
2863
|
+
const N = i(w);
|
|
2864
|
+
v.value = N.startsWith("code") ? a("baseConfigCard.errors.load") : N, A.value = !0, n("fetch:error", w);
|
|
2863
2865
|
} finally {
|
|
2864
2866
|
f.value = !1;
|
|
2865
2867
|
}
|
|
2866
|
-
}), (
|
|
2867
|
-
const
|
|
2868
|
+
}), (w, N) => {
|
|
2869
|
+
const B = U("KLabel"), k = U("KSelect"), x = U("KButton"), T = U("KClipboardProvider"), P = U("KSkeleton"), J = U("KEmptyState"), Q = U("KCard");
|
|
2868
2870
|
return m(), V(Q, { class: "kong-ui-entity-base-config-card" }, Te({
|
|
2869
2871
|
actions: h(() => [
|
|
2870
|
-
|
|
2871
|
-
Y(
|
|
2872
|
-
e.config.jsonYamlEnabled ? (m(), V(
|
|
2872
|
+
R("div", as, [
|
|
2873
|
+
Y(w.$slots, "actions", {}, void 0, !0),
|
|
2874
|
+
e.config.jsonYamlEnabled ? (m(), V(B, {
|
|
2873
2875
|
key: 0,
|
|
2874
2876
|
class: "config-format-select-label",
|
|
2875
2877
|
"data-testid": "config-format-select-label"
|
|
@@ -2879,7 +2881,7 @@ const Ri = {
|
|
|
2879
2881
|
]),
|
|
2880
2882
|
_: 1
|
|
2881
2883
|
})) : G("", !0),
|
|
2882
|
-
e.config.jsonYamlEnabled ? (m(), V(
|
|
2884
|
+
e.config.jsonYamlEnabled ? (m(), V(k, {
|
|
2883
2885
|
key: 1,
|
|
2884
2886
|
appearance: "select",
|
|
2885
2887
|
"data-testid": "select-config-format",
|
|
@@ -2893,19 +2895,19 @@ const Ri = {
|
|
|
2893
2895
|
"data-testid": "book-icon"
|
|
2894
2896
|
}, {
|
|
2895
2897
|
default: h(() => [
|
|
2896
|
-
|
|
2898
|
+
R("a", {
|
|
2897
2899
|
href: e.configCardDoc,
|
|
2898
2900
|
rel: "noopener",
|
|
2899
2901
|
target: "_blank"
|
|
2900
2902
|
}, [
|
|
2901
|
-
|
|
2903
|
+
K(y(rs), { size: y(co) }, null, 8, ["size"])
|
|
2902
2904
|
], 8, is)
|
|
2903
2905
|
]),
|
|
2904
2906
|
_: 1
|
|
2905
2907
|
})) : G("", !0),
|
|
2906
2908
|
e.config.jsonYamlEnabled ? G("", !0) : (m(), V(T, { key: 3 }, {
|
|
2907
2909
|
default: h(({ copyToClipboard: X }) => [
|
|
2908
|
-
!f.value && !
|
|
2910
|
+
!f.value && !A.value ? (m(), V(x, {
|
|
2909
2911
|
key: 0,
|
|
2910
2912
|
appearance: "btn-link",
|
|
2911
2913
|
"data-testid": "json-copy-button",
|
|
@@ -2927,27 +2929,27 @@ const Ri = {
|
|
|
2927
2929
|
"data-testid": "config-card-loader",
|
|
2928
2930
|
"table-columns": 2,
|
|
2929
2931
|
type: "table"
|
|
2930
|
-
})) :
|
|
2932
|
+
})) : A.value ? (m(), V(J, {
|
|
2931
2933
|
key: 1,
|
|
2932
2934
|
"data-testid": "config-card-fetch-error",
|
|
2933
2935
|
"is-error": ""
|
|
2934
2936
|
}, {
|
|
2935
2937
|
message: h(() => [
|
|
2936
|
-
|
|
2938
|
+
R("h3", null, F(v.value), 1)
|
|
2937
2939
|
]),
|
|
2938
2940
|
_: 1
|
|
2939
2941
|
})) : G("", !0),
|
|
2940
2942
|
e.config.jsonYamlEnabled ? (m(), j("div", ss, [
|
|
2941
|
-
|
|
2943
|
+
K(Yi, {
|
|
2942
2944
|
format: d.value,
|
|
2943
2945
|
"prop-list-types": I.value,
|
|
2944
|
-
"property-collections":
|
|
2946
|
+
"property-collections": C.value,
|
|
2945
2947
|
record: p.value
|
|
2946
2948
|
}, Te({ _: 2 }, [
|
|
2947
|
-
ye(Object.keys(
|
|
2949
|
+
ye(Object.keys(w.$slots), (X) => ({
|
|
2948
2950
|
name: X,
|
|
2949
2951
|
fn: h(({ row: ee, rowValue: ie }) => [
|
|
2950
|
-
Y(
|
|
2952
|
+
Y(w.$slots, X, {
|
|
2951
2953
|
row: ee,
|
|
2952
2954
|
rowValue: ie
|
|
2953
2955
|
}, void 0, !0)
|
|
@@ -2957,19 +2959,19 @@ const Ri = {
|
|
|
2957
2959
|
])) : (m(), j("div", ls, [
|
|
2958
2960
|
(m(!0), j(ve, null, ye(I.value, (X) => (m(), j("div", {
|
|
2959
2961
|
key: `config-card-details-${X}-props`,
|
|
2960
|
-
class:
|
|
2962
|
+
class: Ke(`config-card-details-${X}-props`),
|
|
2961
2963
|
"data-testid": `config-card-details-${X}-props`
|
|
2962
2964
|
}, [
|
|
2963
2965
|
X !== "basic" ? (m(), j("div", cs, F(X === "advanced" ? y(a)("baseConfigCard.sections.advanced") : y(a)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
2964
|
-
(m(!0), j(ve, null, ye(
|
|
2966
|
+
(m(!0), j(ve, null, ye(C.value[X], (ee) => (m(), V(xt, {
|
|
2965
2967
|
key: ee.key,
|
|
2966
2968
|
item: ee
|
|
2967
2969
|
}, Te({
|
|
2968
2970
|
label: h(() => [
|
|
2969
|
-
Y(
|
|
2971
|
+
Y(w.$slots, `${ee.key}-label`, { row: ee }, void 0, !0)
|
|
2970
2972
|
]),
|
|
2971
2973
|
[ee.key]: h(({ rowValue: ie }) => [
|
|
2972
|
-
Y(
|
|
2974
|
+
Y(w.$slots, ee.key, {
|
|
2973
2975
|
row: ee,
|
|
2974
2976
|
rowValue: ie
|
|
2975
2977
|
}, void 0, !0)
|
|
@@ -2979,7 +2981,7 @@ const Ri = {
|
|
|
2979
2981
|
ne(ee) ? {
|
|
2980
2982
|
name: "label-tooltip",
|
|
2981
2983
|
fn: h(() => [
|
|
2982
|
-
Y(
|
|
2984
|
+
Y(w.$slots, `${ee.key}-label-tooltip`, { row: ee }, void 0, !0)
|
|
2983
2985
|
]),
|
|
2984
2986
|
key: "0"
|
|
2985
2987
|
} : void 0
|
|
@@ -2992,8 +2994,8 @@ const Ri = {
|
|
|
2992
2994
|
e.hideTitle ? void 0 : {
|
|
2993
2995
|
name: "title",
|
|
2994
2996
|
fn: h(() => [
|
|
2995
|
-
|
|
2996
|
-
Y(
|
|
2997
|
+
R("div", os, [
|
|
2998
|
+
Y(w.$slots, "title", {}, () => [
|
|
2997
2999
|
Z(F(y(a)("baseConfigCard.title")), 1)
|
|
2998
3000
|
], !0)
|
|
2999
3001
|
])
|
|
@@ -3003,7 +3005,7 @@ const Ri = {
|
|
|
3003
3005
|
]), 1024);
|
|
3004
3006
|
};
|
|
3005
3007
|
}
|
|
3006
|
-
}), ps = /* @__PURE__ */
|
|
3008
|
+
}), ps = /* @__PURE__ */ ke(ds, [["__scopeId", "data-v-64349aa2"]]), fs = ["onReset", "onSubmit"], ms = {
|
|
3007
3009
|
class: "form-actions",
|
|
3008
3010
|
"data-testid": "form-actions"
|
|
3009
3011
|
}, gs = /* @__PURE__ */ ae({
|
|
@@ -3059,14 +3061,14 @@ const Ri = {
|
|
|
3059
3061
|
const r = e, o = wt(), { i18n: { t: a } } = ue.useI18n(), { getMessageFromError: i } = ue.useErrors(), { axiosInstance: s } = ue.useAxios({
|
|
3060
3062
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3061
3063
|
}), l = O(!1), c = O(!1), d = O(""), u = M(() => r.canSubmit === !1 || r.isReadonly), g = M(() => {
|
|
3062
|
-
var p,
|
|
3064
|
+
var p, S;
|
|
3063
3065
|
if (!r.editId)
|
|
3064
3066
|
return "";
|
|
3065
3067
|
let b = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3066
|
-
return r.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (
|
|
3068
|
+
return r.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (S = r.config) != null && S.workspace ? `/${r.config.workspace}` : "")), b = b.replace(/{id}/gi, r.editId), b;
|
|
3067
3069
|
}), f = () => {
|
|
3068
|
-
r.config.cancelRoute ? o.push(r.config.cancelRoute) :
|
|
3069
|
-
},
|
|
3070
|
+
r.config.cancelRoute ? o.push(r.config.cancelRoute) : A();
|
|
3071
|
+
}, A = () => {
|
|
3070
3072
|
n("cancel");
|
|
3071
3073
|
}, v = () => {
|
|
3072
3074
|
u.value || n("submit");
|
|
@@ -3080,19 +3082,19 @@ const Ri = {
|
|
|
3080
3082
|
const { data: p } = await s.get(g.value);
|
|
3081
3083
|
n("fetch:success", p);
|
|
3082
3084
|
} catch (p) {
|
|
3083
|
-
const
|
|
3084
|
-
d.value =
|
|
3085
|
+
const S = i(p);
|
|
3086
|
+
d.value = S.startsWith("code") ? a("baseForm.errors.edit") : S, c.value = !0, n("fetch:error", p);
|
|
3085
3087
|
} finally {
|
|
3086
3088
|
l.value = !1;
|
|
3087
3089
|
}
|
|
3088
|
-
}), (p,
|
|
3089
|
-
const b = U("KSkeleton"),
|
|
3090
|
+
}), (p, S) => {
|
|
3091
|
+
const b = U("KSkeleton"), C = U("KEmptyState"), I = U("KAlert"), ne = U("KButton"), pe = U("KCard");
|
|
3090
3092
|
return m(), V(pe, { class: "kong-ui-entity-base-form" }, {
|
|
3091
3093
|
body: h(() => [
|
|
3092
3094
|
l.value ? (m(), V(b, {
|
|
3093
3095
|
key: 0,
|
|
3094
3096
|
type: "form"
|
|
3095
|
-
})) : c.value ? (m(), V(
|
|
3097
|
+
})) : c.value ? (m(), V(C, {
|
|
3096
3098
|
key: 1,
|
|
3097
3099
|
"cta-text": y(a)("baseForm.actions.back"),
|
|
3098
3100
|
"data-testid": "form-fetch-error",
|
|
@@ -3100,13 +3102,13 @@ const Ri = {
|
|
|
3100
3102
|
"is-error": !0
|
|
3101
3103
|
}, {
|
|
3102
3104
|
message: h(() => [
|
|
3103
|
-
|
|
3105
|
+
R("h3", null, F(d.value), 1)
|
|
3104
3106
|
]),
|
|
3105
3107
|
_: 1
|
|
3106
3108
|
}, 8, ["cta-text"])) : (m(), j("form", {
|
|
3107
3109
|
key: 2,
|
|
3108
3110
|
"data-testid": "form-content",
|
|
3109
|
-
onReset: rt(
|
|
3111
|
+
onReset: rt(A, ["prevent"]),
|
|
3110
3112
|
onSubmit: rt(v, ["prevent"])
|
|
3111
3113
|
}, [
|
|
3112
3114
|
Y(p.$slots, "default", {}, void 0, !0),
|
|
@@ -3116,9 +3118,9 @@ const Ri = {
|
|
|
3116
3118
|
appearance: "danger",
|
|
3117
3119
|
"data-testid": "form-error"
|
|
3118
3120
|
}, null, 8, ["alert-message"])) : G("", !0),
|
|
3119
|
-
|
|
3121
|
+
R("div", ms, [
|
|
3120
3122
|
Y(p.$slots, "form-actions", {}, () => [
|
|
3121
|
-
|
|
3123
|
+
K(ne, {
|
|
3122
3124
|
appearance: "outline",
|
|
3123
3125
|
"data-testid": "form-cancel",
|
|
3124
3126
|
disabled: e.isReadonly,
|
|
@@ -3129,7 +3131,7 @@ const Ri = {
|
|
|
3129
3131
|
]),
|
|
3130
3132
|
_: 1
|
|
3131
3133
|
}, 8, ["disabled"]),
|
|
3132
|
-
|
|
3134
|
+
K(ne, {
|
|
3133
3135
|
appearance: "primary",
|
|
3134
3136
|
"data-testid": "form-submit",
|
|
3135
3137
|
disabled: u.value,
|
|
@@ -3148,7 +3150,7 @@ const Ri = {
|
|
|
3148
3150
|
});
|
|
3149
3151
|
};
|
|
3150
3152
|
}
|
|
3151
|
-
}), ys = /* @__PURE__ */
|
|
3153
|
+
}), ys = /* @__PURE__ */ ke(gs, [["__scopeId", "data-v-44a90aae"]]), hs = {
|
|
3152
3154
|
key: 0,
|
|
3153
3155
|
"data-testid": "first-col"
|
|
3154
3156
|
}, vs = /* @__PURE__ */ ae({
|
|
@@ -3172,15 +3174,15 @@ const Ri = {
|
|
|
3172
3174
|
return ((v = t.value) == null ? void 0 : v.querySelector('[data-testid="first-col"]')) || null;
|
|
3173
3175
|
}), o = M(() => {
|
|
3174
3176
|
var v, p;
|
|
3175
|
-
const
|
|
3176
|
-
return
|
|
3177
|
+
const S = (v = n.rowEl) == null ? void 0 : v.querySelectorAll("td");
|
|
3178
|
+
return S ? ((p = S[0]) == null ? void 0 : p.getAttribute("data-testid")) === n.keyName : !1;
|
|
3177
3179
|
});
|
|
3178
3180
|
let a;
|
|
3179
3181
|
const i = () => {
|
|
3180
3182
|
a && (a.disconnect(), a = void 0);
|
|
3181
3183
|
}, s = () => {
|
|
3182
|
-
var v, p,
|
|
3183
|
-
c.value = ((v = r.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((
|
|
3184
|
+
var v, p, S;
|
|
3185
|
+
c.value = ((v = r.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((S = l.value) == null ? void 0 : S.innerText) || "";
|
|
3184
3186
|
}, l = O({}), c = O(0), d = O(0), u = O(""), g = M(() => [r.value, t.value]), f = xe(
|
|
3185
3187
|
g,
|
|
3186
3188
|
(v) => {
|
|
@@ -3195,21 +3197,21 @@ const Ri = {
|
|
|
3195
3197
|
}
|
|
3196
3198
|
},
|
|
3197
3199
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3198
|
-
),
|
|
3200
|
+
), A = M(() => o.value ? c.value > d.value : !1);
|
|
3199
3201
|
return pr(() => {
|
|
3200
3202
|
s();
|
|
3201
3203
|
}), fr(() => {
|
|
3202
3204
|
f();
|
|
3203
3205
|
}), (v, p) => {
|
|
3204
|
-
const
|
|
3206
|
+
const S = U("KTooltip");
|
|
3205
3207
|
return m(), j("span", {
|
|
3206
3208
|
ref_key: "contentRef",
|
|
3207
3209
|
ref: l,
|
|
3208
3210
|
class: "content-wrapper"
|
|
3209
3211
|
}, [
|
|
3210
3212
|
o.value ? (m(), j("span", hs, [
|
|
3211
|
-
|
|
3212
|
-
label:
|
|
3213
|
+
K(S, {
|
|
3214
|
+
label: A.value ? u.value : "",
|
|
3213
3215
|
"max-width": "300",
|
|
3214
3216
|
placement: "bottomStart"
|
|
3215
3217
|
}, {
|
|
@@ -3222,7 +3224,7 @@ const Ri = {
|
|
|
3222
3224
|
], 512);
|
|
3223
3225
|
};
|
|
3224
3226
|
}
|
|
3225
|
-
}), bs = /* @__PURE__ */
|
|
3227
|
+
}), bs = /* @__PURE__ */ ke(vs, [["__scopeId", "data-v-e42a20c9"]]), Cs = { class: "toolbar-container" }, ks = {
|
|
3226
3228
|
key: 0,
|
|
3227
3229
|
class: "toolbar-button-container"
|
|
3228
3230
|
}, _s = ["data-testid"], ws = /* @__PURE__ */ ae({
|
|
@@ -3334,32 +3336,32 @@ const Ri = {
|
|
|
3334
3336
|
},
|
|
3335
3337
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3336
3338
|
setup(e, { emit: n }) {
|
|
3337
|
-
const t = e, { i18n: { t: r } } = ue.useI18n(), o = M(() => t.cacheIdentifier || t.preferencesStorageKey), a = (
|
|
3338
|
-
const
|
|
3339
|
+
const t = e, { i18n: { t: r } } = ue.useI18n(), o = M(() => t.cacheIdentifier || t.preferencesStorageKey), a = (C) => C.hasData || !!t.query, i = M(() => {
|
|
3340
|
+
const C = [];
|
|
3339
3341
|
return Object.keys(t.tableHeaders).forEach((I) => {
|
|
3340
3342
|
const ne = t.tableHeaders[I];
|
|
3341
|
-
|
|
3343
|
+
C.push({
|
|
3342
3344
|
label: ne.label ?? I,
|
|
3343
3345
|
key: I,
|
|
3344
3346
|
sortable: ne.sortable ?? !1
|
|
3345
3347
|
});
|
|
3346
|
-
}), t.enableEntityActions &&
|
|
3348
|
+
}), t.enableEntityActions && C.push({
|
|
3347
3349
|
key: "actions",
|
|
3348
3350
|
hideLabel: !0
|
|
3349
|
-
}),
|
|
3350
|
-
}), s = (
|
|
3351
|
-
"data-rowid":
|
|
3352
|
-
"data-testid":
|
|
3353
|
-
...t.rowAttributes(
|
|
3354
|
-
}), l = O({}), c = (
|
|
3351
|
+
}), C;
|
|
3352
|
+
}), s = (C) => ({
|
|
3353
|
+
"data-rowid": C.id,
|
|
3354
|
+
"data-testid": C.name,
|
|
3355
|
+
...t.rowAttributes(C)
|
|
3356
|
+
}), l = O({}), c = (C) => {
|
|
3355
3357
|
var I;
|
|
3356
|
-
return (I = l.value) == null ? void 0 : I.$el.querySelector(`[data-rowid="${
|
|
3357
|
-
}, d = (
|
|
3358
|
+
return (I = l.value) == null ? void 0 : I.$el.querySelector(`[data-rowid="${C.id}"]`);
|
|
3359
|
+
}, d = (C) => {
|
|
3358
3360
|
const I = {
|
|
3359
|
-
"data-testid":
|
|
3360
|
-
...t.cellAttributes(
|
|
3361
|
+
"data-testid": C.headerKey,
|
|
3362
|
+
...t.cellAttributes(C)
|
|
3361
3363
|
};
|
|
3362
|
-
return
|
|
3364
|
+
return C.colIndex === 0 && (I.style = {
|
|
3363
3365
|
maxWidth: "250px",
|
|
3364
3366
|
overflowX: "hidden",
|
|
3365
3367
|
textOverflow: "ellipsis"
|
|
@@ -3368,27 +3370,27 @@ const Ri = {
|
|
|
3368
3370
|
n("empty-state-cta-clicked"), g();
|
|
3369
3371
|
}, g = () => {
|
|
3370
3372
|
n("clear-search-input");
|
|
3371
|
-
}, f = M(() => t.disableRowClick ? void 0 : (
|
|
3373
|
+
}, f = M(() => t.disableRowClick ? void 0 : (C, I) => {
|
|
3372
3374
|
n("click:row", I);
|
|
3373
|
-
}),
|
|
3374
|
-
n("sort",
|
|
3375
|
-
}, { setTablePreferences: v, getTablePreferences: p } =
|
|
3376
|
-
const
|
|
3375
|
+
}), A = (C) => {
|
|
3376
|
+
n("sort", C);
|
|
3377
|
+
}, { setTablePreferences: v, getTablePreferences: p } = Ar(), S = M(() => {
|
|
3378
|
+
const C = p(t.preferencesStorageKey);
|
|
3377
3379
|
return {
|
|
3378
3380
|
...t.initialFetcherParams,
|
|
3379
|
-
...
|
|
3381
|
+
...C
|
|
3380
3382
|
};
|
|
3381
|
-
}), b = (
|
|
3382
|
-
t.preferencesStorageKey && v(t.preferencesStorageKey,
|
|
3383
|
+
}), b = (C) => {
|
|
3384
|
+
t.preferencesStorageKey && v(t.preferencesStorageKey, C);
|
|
3383
3385
|
};
|
|
3384
|
-
return (
|
|
3385
|
-
const ne = U("KIcon"), pe = U("KButton"), H = U("KDropdownMenu"),
|
|
3386
|
-
return m(), V(
|
|
3386
|
+
return (C, I) => {
|
|
3387
|
+
const ne = U("KIcon"), pe = U("KButton"), H = U("KDropdownMenu"), w = U("KTable"), N = U("KCard");
|
|
3388
|
+
return m(), V(N, {
|
|
3387
3389
|
class: "kong-ui-entity-base-table",
|
|
3388
3390
|
title: e.title
|
|
3389
3391
|
}, {
|
|
3390
3392
|
body: h(() => [
|
|
3391
|
-
|
|
3393
|
+
K(w, {
|
|
3392
3394
|
ref_key: "tableRefs",
|
|
3393
3395
|
ref: l,
|
|
3394
3396
|
"cache-identifier": o.value,
|
|
@@ -3409,50 +3411,50 @@ const Ri = {
|
|
|
3409
3411
|
"has-error": !!e.errorMessage,
|
|
3410
3412
|
headers: i.value,
|
|
3411
3413
|
"hide-pagination-when-optional": "",
|
|
3412
|
-
"initial-fetcher-params":
|
|
3414
|
+
"initial-fetcher-params": S.value,
|
|
3413
3415
|
"is-loading": e.isLoading,
|
|
3414
3416
|
"pagination-type": e.paginationType,
|
|
3415
3417
|
"row-attrs": s,
|
|
3416
3418
|
"search-input": e.query,
|
|
3417
3419
|
onKtableEmptyStateCtaClicked: u,
|
|
3418
3420
|
"onRow:click": f.value,
|
|
3419
|
-
onSort: I[0] || (I[0] = (
|
|
3421
|
+
onSort: I[0] || (I[0] = (B) => A(B)),
|
|
3420
3422
|
"onUpdate:tablePreferences": b
|
|
3421
3423
|
}, Te({
|
|
3422
|
-
toolbar: h(({ state:
|
|
3423
|
-
et(
|
|
3424
|
-
Y(
|
|
3425
|
-
|
|
3426
|
-
Y(
|
|
3424
|
+
toolbar: h(({ state: B }) => [
|
|
3425
|
+
et(R("div", Cs, [
|
|
3426
|
+
Y(C.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3427
|
+
C.$slots["toolbar-button"] ? (m(), j("div", ks, [
|
|
3428
|
+
Y(C.$slots, "toolbar-button", {}, void 0, !0)
|
|
3427
3429
|
])) : G("", !0)
|
|
3428
3430
|
], 512), [
|
|
3429
|
-
[tt, a(
|
|
3431
|
+
[tt, a(B)]
|
|
3430
3432
|
])
|
|
3431
3433
|
]),
|
|
3432
|
-
actions: h(({ row:
|
|
3433
|
-
|
|
3434
|
+
actions: h(({ row: B, rowKey: k, rowValue: x }) => [
|
|
3435
|
+
R("div", {
|
|
3434
3436
|
class: "actions-container",
|
|
3435
|
-
"data-testid":
|
|
3437
|
+
"data-testid": B.name
|
|
3436
3438
|
}, [
|
|
3437
|
-
|
|
3439
|
+
K(H, {
|
|
3438
3440
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3439
3441
|
width: e.dropdownMenuWidth
|
|
3440
3442
|
}, {
|
|
3441
3443
|
items: h(() => [
|
|
3442
|
-
Y(
|
|
3443
|
-
row:
|
|
3444
|
-
rowKey:
|
|
3444
|
+
Y(C.$slots, "actions", {
|
|
3445
|
+
row: B,
|
|
3446
|
+
rowKey: k,
|
|
3445
3447
|
rowValue: x
|
|
3446
3448
|
}, void 0, !0)
|
|
3447
3449
|
]),
|
|
3448
3450
|
default: h(() => [
|
|
3449
|
-
|
|
3451
|
+
K(pe, {
|
|
3450
3452
|
class: "actions-trigger",
|
|
3451
3453
|
"data-testid": "overflow-actions-button",
|
|
3452
3454
|
size: "small"
|
|
3453
3455
|
}, {
|
|
3454
3456
|
icon: h(() => [
|
|
3455
|
-
|
|
3457
|
+
K(ne, {
|
|
3456
3458
|
color: y(lo),
|
|
3457
3459
|
icon: "more",
|
|
3458
3460
|
size: "16"
|
|
@@ -3467,15 +3469,15 @@ const Ri = {
|
|
|
3467
3469
|
]),
|
|
3468
3470
|
_: 2
|
|
3469
3471
|
}, [
|
|
3470
|
-
ye(e.tableHeaders, (
|
|
3471
|
-
name:
|
|
3472
|
+
ye(e.tableHeaders, (B, k) => ({
|
|
3473
|
+
name: k,
|
|
3472
3474
|
fn: h(({ row: x, rowKey: T, rowValue: P }) => [
|
|
3473
|
-
|
|
3474
|
-
"key-name": String(
|
|
3475
|
+
K(bs, {
|
|
3476
|
+
"key-name": String(k),
|
|
3475
3477
|
"row-el": c(x)
|
|
3476
3478
|
}, {
|
|
3477
3479
|
default: h(() => [
|
|
3478
|
-
Y(
|
|
3480
|
+
Y(C.$slots, k, {
|
|
3479
3481
|
row: x,
|
|
3480
3482
|
rowKey: T,
|
|
3481
3483
|
rowValue: P
|
|
@@ -3493,10 +3495,10 @@ const Ri = {
|
|
|
3493
3495
|
}, 8, ["title"]);
|
|
3494
3496
|
};
|
|
3495
3497
|
}
|
|
3496
|
-
}), Is = /* @__PURE__ */
|
|
3498
|
+
}), Is = /* @__PURE__ */ ke(ws, [["__scopeId", "data-v-6bf92df6"]]), As = {
|
|
3497
3499
|
key: 0,
|
|
3498
3500
|
class: "kong-ui-entity-delete-error"
|
|
3499
|
-
},
|
|
3501
|
+
}, Ss = {
|
|
3500
3502
|
key: 1,
|
|
3501
3503
|
class: "description"
|
|
3502
3504
|
}, xs = /* @__PURE__ */ ae({
|
|
@@ -3557,15 +3559,15 @@ const Ri = {
|
|
|
3557
3559
|
onProceed: i
|
|
3558
3560
|
}, {
|
|
3559
3561
|
"body-content": h(() => [
|
|
3560
|
-
e.error ? (m(), j("div",
|
|
3561
|
-
|
|
3562
|
+
e.error ? (m(), j("div", As, [
|
|
3563
|
+
K(c, { appearance: "danger" }, {
|
|
3562
3564
|
alertMessage: h(() => [
|
|
3563
3565
|
Z(F(e.error), 1)
|
|
3564
3566
|
]),
|
|
3565
3567
|
_: 1
|
|
3566
3568
|
})
|
|
3567
3569
|
])) : G("", !0),
|
|
3568
|
-
|
|
3570
|
+
K(y(r), {
|
|
3569
3571
|
class: "message",
|
|
3570
3572
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3571
3573
|
tag: "p"
|
|
@@ -3578,14 +3580,14 @@ const Ri = {
|
|
|
3578
3580
|
t.entityName ? {
|
|
3579
3581
|
name: "entityName",
|
|
3580
3582
|
fn: h(() => [
|
|
3581
|
-
|
|
3583
|
+
R("strong", null, F(t.entityName), 1)
|
|
3582
3584
|
]),
|
|
3583
3585
|
key: "0"
|
|
3584
3586
|
} : void 0
|
|
3585
3587
|
]), 1032, ["keypath"]),
|
|
3586
|
-
t.description || s.$slots.description ? (m(), j("div",
|
|
3588
|
+
t.description || s.$slots.description ? (m(), j("div", Ss, [
|
|
3587
3589
|
Y(s.$slots, "description", {}, () => [
|
|
3588
|
-
|
|
3590
|
+
R("p", null, F(t.description), 1)
|
|
3589
3591
|
], !0)
|
|
3590
3592
|
])) : G("", !0)
|
|
3591
3593
|
]),
|
|
@@ -3593,7 +3595,7 @@ const Ri = {
|
|
|
3593
3595
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3594
3596
|
};
|
|
3595
3597
|
}
|
|
3596
|
-
}), Ts = /* @__PURE__ */
|
|
3598
|
+
}), Ts = /* @__PURE__ */ ke(xs, [["__scopeId", "data-v-1c9a2a07"]]), $s = {
|
|
3597
3599
|
fill: "none",
|
|
3598
3600
|
height: "20",
|
|
3599
3601
|
viewBox: "0 0 20 20",
|
|
@@ -3607,7 +3609,7 @@ const Ri = {
|
|
|
3607
3609
|
width: "20",
|
|
3608
3610
|
x: "0",
|
|
3609
3611
|
y: "0"
|
|
3610
|
-
}, js = ["fill"], Es = { mask: "url(#mask0_180_20349)" }, Os = ["fill"],
|
|
3612
|
+
}, js = ["fill"], Es = { mask: "url(#mask0_180_20349)" }, Os = ["fill"], Fs = /* @__PURE__ */ ae({
|
|
3611
3613
|
__name: "IconFilter",
|
|
3612
3614
|
props: {
|
|
3613
3615
|
color: {
|
|
@@ -3617,25 +3619,25 @@ const Ri = {
|
|
|
3617
3619
|
},
|
|
3618
3620
|
setup(e) {
|
|
3619
3621
|
return (n, t) => (m(), j("svg", $s, [
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
+
R("mask", Ms, [
|
|
3623
|
+
R("rect", {
|
|
3622
3624
|
fill: e.color,
|
|
3623
3625
|
height: "20",
|
|
3624
3626
|
width: "20"
|
|
3625
3627
|
}, null, 8, js)
|
|
3626
3628
|
]),
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
+
R("g", Es, [
|
|
3630
|
+
R("path", {
|
|
3629
3631
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3630
3632
|
fill: e.color
|
|
3631
3633
|
}, null, 8, Os)
|
|
3632
3634
|
])
|
|
3633
3635
|
]));
|
|
3634
3636
|
}
|
|
3635
|
-
}),
|
|
3637
|
+
}), Ks = {
|
|
3636
3638
|
key: 1,
|
|
3637
3639
|
class: "kong-ui-entity-filter"
|
|
3638
|
-
},
|
|
3640
|
+
}, Ns = { class: "menu-item-title" }, Bs = { class: "menu-item-indicator" }, Ps = { class: "menu-item-body" }, Ls = ["for"], Us = { class: "menu-item-buttons" }, qs = /* @__PURE__ */ ae({
|
|
3639
3641
|
__name: "EntityFilter",
|
|
3640
3642
|
props: {
|
|
3641
3643
|
// filter config, either exact match or fuzzy match
|
|
@@ -3657,19 +3659,19 @@ const Ri = {
|
|
|
3657
3659
|
setup(e, { emit: n }) {
|
|
3658
3660
|
const t = e, { i18n: { t: r } } = ue.useI18n(), o = O(!1), a = O({}), i = M(() => {
|
|
3659
3661
|
const p = [];
|
|
3660
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
3661
|
-
|
|
3662
|
+
return new URLSearchParams(t.modelValue).forEach((S, b) => {
|
|
3663
|
+
S !== "" && p.push(b);
|
|
3662
3664
|
}), p;
|
|
3663
3665
|
}), s = M(() => {
|
|
3664
3666
|
const p = t.config.fields;
|
|
3665
|
-
return Object.keys(p).filter((
|
|
3666
|
-
label: p[
|
|
3667
|
-
value:
|
|
3667
|
+
return Object.keys(p).filter((S) => p[S].searchable).map((S) => ({
|
|
3668
|
+
label: p[S].label || S,
|
|
3669
|
+
value: S
|
|
3668
3670
|
}));
|
|
3669
3671
|
});
|
|
3670
3672
|
xe(() => t.modelValue, (p) => {
|
|
3671
|
-
a.value = {}, new URLSearchParams(p).forEach((
|
|
3672
|
-
a.value[b] =
|
|
3673
|
+
a.value = {}, new URLSearchParams(p).forEach((S, b) => {
|
|
3674
|
+
a.value[b] = S;
|
|
3673
3675
|
});
|
|
3674
3676
|
});
|
|
3675
3677
|
const l = () => {
|
|
@@ -3677,27 +3679,27 @@ const Ri = {
|
|
|
3677
3679
|
}, c = (p) => {
|
|
3678
3680
|
n("update:modelValue", p);
|
|
3679
3681
|
}, d = (p) => `filter-${p}`, u = (p) => {
|
|
3680
|
-
var
|
|
3681
|
-
return (((b = (
|
|
3682
|
-
value:
|
|
3683
|
-
label:
|
|
3682
|
+
var S, b;
|
|
3683
|
+
return (((b = (S = t.config.schema) == null ? void 0 : S[p]) == null ? void 0 : b.values) ?? []).map((C) => ({
|
|
3684
|
+
value: C,
|
|
3685
|
+
label: C
|
|
3684
3686
|
}));
|
|
3685
3687
|
}, g = (p) => {
|
|
3686
|
-
var
|
|
3687
|
-
return ((b = (
|
|
3688
|
+
var S, b;
|
|
3689
|
+
return ((b = (S = t.config.schema) == null ? void 0 : S[p]) == null ? void 0 : b.type) ?? "text";
|
|
3688
3690
|
}, f = (p) => {
|
|
3689
3691
|
a.value = {
|
|
3690
3692
|
...a.value,
|
|
3691
3693
|
[p]: ""
|
|
3692
3694
|
}, v();
|
|
3693
|
-
},
|
|
3695
|
+
}, A = () => {
|
|
3694
3696
|
a.value = {}, v(!0);
|
|
3695
3697
|
}, v = (p = !1) => {
|
|
3696
|
-
const
|
|
3697
|
-
p && (o.value = !1), n("update:modelValue", new URLSearchParams(
|
|
3698
|
+
const S = Object.keys(a.value).reduce((b, C) => (a.value[C] && (b[C] = `${a.value[C]}`), b), {});
|
|
3699
|
+
p && (o.value = !1), n("update:modelValue", new URLSearchParams(S).toString());
|
|
3698
3700
|
};
|
|
3699
|
-
return (p,
|
|
3700
|
-
const b = U("KInput"),
|
|
3701
|
+
return (p, S) => {
|
|
3702
|
+
const b = U("KInput"), C = U("KButton"), I = U("KSelect"), ne = U("KMenuItem"), pe = U("KMenu");
|
|
3701
3703
|
return e.config.isExactMatch ? (m(), V(b, {
|
|
3702
3704
|
key: 0,
|
|
3703
3705
|
autocomplete: "off",
|
|
@@ -3708,11 +3710,11 @@ const Ri = {
|
|
|
3708
3710
|
"onUpdate:modelValue": c
|
|
3709
3711
|
}, {
|
|
3710
3712
|
icon: h(() => [
|
|
3711
|
-
|
|
3713
|
+
K(Fs)
|
|
3712
3714
|
]),
|
|
3713
3715
|
_: 1
|
|
3714
|
-
}, 8, ["model-value", "placeholder"])) : (m(), j("div",
|
|
3715
|
-
|
|
3716
|
+
}, 8, ["model-value", "placeholder"])) : (m(), j("div", Ks, [
|
|
3717
|
+
K(C, {
|
|
3716
3718
|
appearance: "btn-link",
|
|
3717
3719
|
"data-testid": "filter-button",
|
|
3718
3720
|
icon: "filter",
|
|
@@ -3723,41 +3725,41 @@ const Ri = {
|
|
|
3723
3725
|
]),
|
|
3724
3726
|
_: 1
|
|
3725
3727
|
}),
|
|
3726
|
-
et(
|
|
3728
|
+
et(R("div", {
|
|
3727
3729
|
class: "kong-ui-entity-filter-backdrop",
|
|
3728
3730
|
onClick: l
|
|
3729
3731
|
}, null, 512), [
|
|
3730
3732
|
[tt, o.value]
|
|
3731
3733
|
]),
|
|
3732
|
-
et(
|
|
3734
|
+
et(K(pe, { class: "kong-ui-entity-filter-menu" }, {
|
|
3733
3735
|
body: h(() => [
|
|
3734
|
-
(m(!0), j(ve, null, ye(s.value, (H,
|
|
3736
|
+
(m(!0), j(ve, null, ye(s.value, (H, w) => (m(), V(ne, {
|
|
3735
3737
|
key: H.value,
|
|
3736
3738
|
"data-testid": H.value,
|
|
3737
3739
|
expandable: "",
|
|
3738
|
-
"last-menu-item":
|
|
3740
|
+
"last-menu-item": w === s.value.length - 1
|
|
3739
3741
|
}, {
|
|
3740
3742
|
itemTitle: h(() => [
|
|
3741
|
-
|
|
3743
|
+
R("span", Ns, [
|
|
3742
3744
|
Z(F(H.label) + " ", 1),
|
|
3743
|
-
et(
|
|
3745
|
+
et(R("span", Bs, null, 512), [
|
|
3744
3746
|
[tt, i.value.includes(H.value)]
|
|
3745
3747
|
])
|
|
3746
3748
|
])
|
|
3747
3749
|
]),
|
|
3748
3750
|
itemBody: h(() => {
|
|
3749
|
-
var
|
|
3751
|
+
var N, B;
|
|
3750
3752
|
return [
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
+
R("div", Ps, [
|
|
3754
|
+
R("label", {
|
|
3753
3755
|
class: "menu-item-label",
|
|
3754
3756
|
for: d(H.value)
|
|
3755
3757
|
}, F(y(r)("filter.fieldLabel")), 9, Ls),
|
|
3756
|
-
((
|
|
3758
|
+
((B = (N = e.config.schema) == null ? void 0 : N[H.value]) == null ? void 0 : B.type) === "select" ? (m(), V(I, {
|
|
3757
3759
|
key: 0,
|
|
3758
3760
|
id: d(H.value),
|
|
3759
3761
|
modelValue: a.value[H.value],
|
|
3760
|
-
"onUpdate:modelValue": (
|
|
3762
|
+
"onUpdate:modelValue": (k) => a.value[H.value] = k,
|
|
3761
3763
|
appearance: "select",
|
|
3762
3764
|
items: u(H.value),
|
|
3763
3765
|
placeholder: y(r)("filter.selectPlaceholder")
|
|
@@ -3765,30 +3767,30 @@ const Ri = {
|
|
|
3765
3767
|
key: 1,
|
|
3766
3768
|
id: d(H.value),
|
|
3767
3769
|
modelValue: a.value[H.value],
|
|
3768
|
-
"onUpdate:modelValue": (
|
|
3770
|
+
"onUpdate:modelValue": (k) => a.value[H.value] = k,
|
|
3769
3771
|
autocomplete: "off",
|
|
3770
3772
|
placeholder: y(r)("filter.inputPlaceholder"),
|
|
3771
3773
|
size: "small",
|
|
3772
3774
|
type: g(H.value)
|
|
3773
3775
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3774
3776
|
]),
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
+
R("div", Us, [
|
|
3778
|
+
K(C, {
|
|
3777
3779
|
appearance: "btn-link",
|
|
3778
3780
|
"data-testid": "apply-filter",
|
|
3779
3781
|
size: "small",
|
|
3780
|
-
onClick:
|
|
3782
|
+
onClick: S[0] || (S[0] = (k) => v(!0))
|
|
3781
3783
|
}, {
|
|
3782
3784
|
default: h(() => [
|
|
3783
3785
|
Z(F(y(r)("filter.applyButtonText")), 1)
|
|
3784
3786
|
]),
|
|
3785
3787
|
_: 1
|
|
3786
3788
|
}),
|
|
3787
|
-
|
|
3789
|
+
K(C, {
|
|
3788
3790
|
appearance: "btn-link",
|
|
3789
3791
|
"data-testid": "clear-filter",
|
|
3790
3792
|
size: "small",
|
|
3791
|
-
onClick: (
|
|
3793
|
+
onClick: (k) => f(H.value)
|
|
3792
3794
|
}, {
|
|
3793
3795
|
default: h(() => [
|
|
3794
3796
|
Z(F(y(r)("filter.clearButtonText")), 1)
|
|
@@ -3802,7 +3804,7 @@ const Ri = {
|
|
|
3802
3804
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
3803
3805
|
]),
|
|
3804
3806
|
actionButton: h(() => [
|
|
3805
|
-
|
|
3807
|
+
K(C, { onClick: A }, {
|
|
3806
3808
|
default: h(() => [
|
|
3807
3809
|
Z(F(y(r)("filter.clearAllButtonText")), 1)
|
|
3808
3810
|
]),
|
|
@@ -3816,7 +3818,7 @@ const Ri = {
|
|
|
3816
3818
|
]));
|
|
3817
3819
|
};
|
|
3818
3820
|
}
|
|
3819
|
-
}),
|
|
3821
|
+
}), Rs = /* @__PURE__ */ ke(qs, [["__scopeId", "data-v-745f38c0"]]), Xe = /* @__PURE__ */ ae({
|
|
3820
3822
|
__name: "PermissionsWrapper",
|
|
3821
3823
|
props: {
|
|
3822
3824
|
/**
|
|
@@ -3846,7 +3848,7 @@ const Ri = {
|
|
|
3846
3848
|
isAllowed: t.value
|
|
3847
3849
|
}) : G("", !0);
|
|
3848
3850
|
}
|
|
3849
|
-
}), Vs = { class: "form-section-wrapper" },
|
|
3851
|
+
}), Vs = { class: "form-section-wrapper" }, Ds = {
|
|
3850
3852
|
key: 0,
|
|
3851
3853
|
class: "form-section-title"
|
|
3852
3854
|
}, Gs = {
|
|
@@ -3882,30 +3884,30 @@ const Ri = {
|
|
|
3882
3884
|
setup(e) {
|
|
3883
3885
|
const n = ut();
|
|
3884
3886
|
return (t, r) => (m(), j("fieldset", {
|
|
3885
|
-
class:
|
|
3887
|
+
class: Ke(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
3886
3888
|
}, [
|
|
3887
|
-
|
|
3889
|
+
R("div", Vs, [
|
|
3888
3890
|
e.hideInfoHeader ? G("", !0) : (m(), j("div", {
|
|
3889
3891
|
key: 0,
|
|
3890
|
-
class:
|
|
3892
|
+
class: Ke(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
3891
3893
|
}, [
|
|
3892
|
-
e.title ? (m(), j("h4",
|
|
3894
|
+
e.title ? (m(), j("h4", Ds, F(e.title), 1)) : G("", !0),
|
|
3893
3895
|
e.description || y(n).description ? (m(), j("div", Gs, [
|
|
3894
3896
|
Y(t.$slots, "description", {}, () => [
|
|
3895
|
-
|
|
3897
|
+
R("p", null, F(e.description), 1)
|
|
3896
3898
|
], !0)
|
|
3897
3899
|
])) : G("", !0),
|
|
3898
3900
|
y(n).footer ? (m(), j("div", Hs, [
|
|
3899
3901
|
Y(t.$slots, "footer", {}, void 0, !0)
|
|
3900
3902
|
])) : G("", !0)
|
|
3901
3903
|
], 2)),
|
|
3902
|
-
|
|
3904
|
+
R("div", zs, [
|
|
3903
3905
|
Y(t.$slots, "default", {}, void 0, !0)
|
|
3904
3906
|
])
|
|
3905
3907
|
])
|
|
3906
3908
|
], 2));
|
|
3907
3909
|
}
|
|
3908
|
-
}), un = /* @__PURE__ */
|
|
3910
|
+
}), un = /* @__PURE__ */ ke(Js, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Ft, useDeleteUrlBuilder: Ws, useErrors: Ys, useFetchUrlBuilder: hl, useFetcher: Zs, useDebouncedFilter: ar, useStringHelpers: vl, useHelpers: bl, useGatewayFeatureSupported: Cl, useTruncationDetector: kl } = ue;
|
|
3909
3911
|
const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group-cta-text" }, el = {
|
|
3910
3912
|
key: 0,
|
|
3911
3913
|
class: "kong-ui-entity-add-to-groups-error"
|
|
@@ -3926,9 +3928,9 @@ const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group
|
|
|
3926
3928
|
},
|
|
3927
3929
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
3928
3930
|
setup(e, { emit: n }) {
|
|
3929
|
-
var
|
|
3930
|
-
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } =
|
|
3931
|
-
headers: (
|
|
3931
|
+
var B;
|
|
3932
|
+
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } = Ft({
|
|
3933
|
+
headers: (B = t.config) == null ? void 0 : B.requestHeaders
|
|
3932
3934
|
}), a = O([]), {
|
|
3933
3935
|
debouncedQueryChange: i,
|
|
3934
3936
|
loading: s,
|
|
@@ -3944,52 +3946,52 @@ const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group
|
|
|
3944
3946
|
fetchedItemsKey: "data",
|
|
3945
3947
|
searchKeys: ["name", "id"]
|
|
3946
3948
|
}
|
|
3947
|
-
), g = M(() => c.value ? r("consumer_groups.errors.general") : ""), f = O(0),
|
|
3948
|
-
label:
|
|
3949
|
-
value:
|
|
3950
|
-
selected: a.value.includes(
|
|
3951
|
-
data:
|
|
3949
|
+
), g = M(() => c.value ? r("consumer_groups.errors.general") : ""), f = O(0), A = M(() => l.value === void 0), v = M(() => u.value.map((k) => ({
|
|
3950
|
+
label: k.name,
|
|
3951
|
+
value: k.id,
|
|
3952
|
+
selected: a.value.includes(k.id),
|
|
3953
|
+
data: k
|
|
3952
3954
|
// we need this to determine whether or not to show the description text
|
|
3953
|
-
}))), p = (
|
|
3955
|
+
}))), p = (k) => {
|
|
3954
3956
|
var T;
|
|
3955
|
-
const x =
|
|
3956
|
-
return x ? x.name :
|
|
3957
|
-
},
|
|
3958
|
-
I.value = "", b.value = [],
|
|
3959
|
-
}, b = O([]),
|
|
3957
|
+
const x = A.value ? u.value.find((P) => P.id === k) : (T = l.value) == null ? void 0 : T.find((P) => P.id === k);
|
|
3958
|
+
return x ? x.name : k;
|
|
3959
|
+
}, S = () => {
|
|
3960
|
+
I.value = "", b.value = [], w.value = [], n("cancel");
|
|
3961
|
+
}, b = O([]), C = O(!1), I = O(""), ne = async () => {
|
|
3960
3962
|
if (!a.value.length) {
|
|
3961
|
-
I.value = "",
|
|
3963
|
+
I.value = "", w.value = [], n("cancel");
|
|
3962
3964
|
return;
|
|
3963
3965
|
}
|
|
3964
|
-
|
|
3966
|
+
C.value = !0, I.value = "", b.value = [], w.value = [];
|
|
3965
3967
|
try {
|
|
3966
|
-
const
|
|
3968
|
+
const k = a.value.map((P) => H(P)), x = await Promise.allSettled(k);
|
|
3967
3969
|
let T = !0;
|
|
3968
3970
|
x.forEach((P) => {
|
|
3969
3971
|
P.status !== "fulfilled" && (T = !1);
|
|
3970
|
-
}), T ? (b.value = [],
|
|
3972
|
+
}), T ? (b.value = [], w.value = [], n("add:success", a.value), a.value = []) : (b.value.length && n("add:partial-success", b.value), a.value = [], N(x));
|
|
3971
3973
|
} catch {
|
|
3972
3974
|
I.value = r("consumer_groups.errors.add"), n("error", I.value);
|
|
3973
3975
|
} finally {
|
|
3974
|
-
|
|
3976
|
+
C.value = !1;
|
|
3975
3977
|
}
|
|
3976
3978
|
}, pe = M(() => {
|
|
3977
3979
|
var x, T, P, J;
|
|
3978
|
-
let
|
|
3979
|
-
return t.config.app === "konnect" ?
|
|
3980
|
-
}), H = async (
|
|
3980
|
+
let k = `${t.config.apiBaseUrl}${$e.list[t.config.app].forConsumer}`;
|
|
3981
|
+
return t.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((x = t.config) == null ? void 0 : x.controlPlaneId) || "").replace(/{consumerId}/gi, ((T = t.config) == null ? void 0 : T.consumerId) || "") : t.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (P = t.config) != null && P.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((J = t.config) == null ? void 0 : J.consumerId) || "")), k;
|
|
3982
|
+
}), H = async (k) => {
|
|
3981
3983
|
const x = {
|
|
3982
|
-
group:
|
|
3984
|
+
group: k
|
|
3983
3985
|
};
|
|
3984
3986
|
try {
|
|
3985
3987
|
const T = await o.post(pe.value, x);
|
|
3986
|
-
return b.value.push(
|
|
3988
|
+
return b.value.push(k), T;
|
|
3987
3989
|
} catch (T) {
|
|
3988
|
-
let P = `${p(
|
|
3989
|
-
return T.response.status === 409 && (P = `${p(
|
|
3990
|
+
let P = `${p(k)} - ${T.message}`;
|
|
3991
|
+
return T.response.status === 409 && (P = `${p(k)} - ${r("consumer_groups.errors.already_added")}`), Promise.reject(Error(P));
|
|
3990
3992
|
}
|
|
3991
|
-
},
|
|
3992
|
-
|
|
3993
|
+
}, w = O([]), N = (k) => {
|
|
3994
|
+
w.value = k.map((x) => {
|
|
3993
3995
|
var T;
|
|
3994
3996
|
return (T = x.reason) == null ? void 0 : T.message;
|
|
3995
3997
|
}).filter(Boolean);
|
|
@@ -3998,43 +4000,43 @@ const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group
|
|
|
3998
4000
|
f.value++;
|
|
3999
4001
|
}, { immediate: !0, deep: !0 }), Qe(async () => {
|
|
4000
4002
|
await d();
|
|
4001
|
-
}), (
|
|
4003
|
+
}), (k, x) => {
|
|
4002
4004
|
const T = U("KMultiselect"), P = U("KAlert"), J = U("KPrompt");
|
|
4003
4005
|
return m(), V(J, {
|
|
4004
|
-
"action-pending":
|
|
4006
|
+
"action-pending": C.value,
|
|
4005
4007
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
4006
4008
|
"data-testid": "add-to-group-modal",
|
|
4007
4009
|
"is-visible": e.visible,
|
|
4008
4010
|
title: y(r)("consumer_groups.consumers.add.title"),
|
|
4009
|
-
onCanceled:
|
|
4011
|
+
onCanceled: S,
|
|
4010
4012
|
onProceed: ne
|
|
4011
4013
|
}, {
|
|
4012
4014
|
"body-content": h(() => [
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4015
|
+
R("div", Qs, [
|
|
4016
|
+
R("p", Xs, F(y(r)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4017
|
+
K(T, {
|
|
4016
4018
|
modelValue: a.value,
|
|
4017
4019
|
"onUpdate:modelValue": x[0] || (x[0] = (Q) => a.value = Q),
|
|
4018
4020
|
autosuggest: "",
|
|
4019
4021
|
"data-testid": "add-to-groups-multiselect",
|
|
4020
|
-
"dropdown-footer-text":
|
|
4022
|
+
"dropdown-footer-text": A.value ? y(r)("consumer_groups.consumers.add.footer") : void 0,
|
|
4021
4023
|
items: v.value,
|
|
4022
4024
|
label: y(r)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
4023
4025
|
loading: y(s),
|
|
4024
4026
|
placeholder: y(r)("consumer_groups.consumers.add.consumer_group_placeholder"),
|
|
4025
|
-
readonly:
|
|
4027
|
+
readonly: C.value,
|
|
4026
4028
|
required: "",
|
|
4027
4029
|
width: "100%",
|
|
4028
4030
|
onQueryChange: y(i)
|
|
4029
4031
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4030
|
-
I.value || g.value ||
|
|
4031
|
-
|
|
4032
|
+
I.value || g.value || w.value.length ? (m(), j("div", el, [
|
|
4033
|
+
K(P, { appearance: "danger" }, {
|
|
4032
4034
|
alertMessage: h(() => [
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
(m(!0), j(ve, null, ye(
|
|
4035
|
+
R("p", null, F(y(r)("consumer_groups.errors.add")), 1),
|
|
4036
|
+
w.value.length ? (m(), j("ul", tl, [
|
|
4037
|
+
(m(!0), j(ve, null, ye(w.value, (Q, X) => (m(), j("li", { key: X }, F(Q), 1))), 128))
|
|
4036
4038
|
])) : G("", !0),
|
|
4037
|
-
|
|
4039
|
+
R("div", null, F(I.value || g.value), 1)
|
|
4038
4040
|
]),
|
|
4039
4041
|
_: 1
|
|
4040
4042
|
})
|
|
@@ -4046,12 +4048,12 @@ const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group
|
|
|
4046
4048
|
};
|
|
4047
4049
|
}
|
|
4048
4050
|
});
|
|
4049
|
-
const
|
|
4051
|
+
const Kt = (e, n) => {
|
|
4050
4052
|
const t = e.__vccOpts || e;
|
|
4051
4053
|
for (const [r, o] of n)
|
|
4052
4054
|
t[r] = o;
|
|
4053
4055
|
return t;
|
|
4054
|
-
}, rl = /* @__PURE__ */
|
|
4056
|
+
}, rl = /* @__PURE__ */ Kt(nl, [["__scopeId", "data-v-4d30f3c5"]]), ol = { class: "kong-ui-entities-consumer-groups-list" }, al = { key: 1 }, il = /* @__PURE__ */ ae({
|
|
4055
4057
|
__name: "ConsumerGroupList",
|
|
4056
4058
|
props: {
|
|
4057
4059
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4092,9 +4094,9 @@ const Ft = (e, n) => {
|
|
|
4092
4094
|
},
|
|
4093
4095
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4094
4096
|
setup(e, { emit: n }) {
|
|
4095
|
-
var
|
|
4096
|
-
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } =
|
|
4097
|
-
headers: (
|
|
4097
|
+
var Nt;
|
|
4098
|
+
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } = Ft({
|
|
4099
|
+
headers: (Nt = t.config) == null ? void 0 : Nt.requestHeaders
|
|
4098
4100
|
}), s = O(1), l = M(() => !!t.config.consumerId), c = M(() => t.config.app !== "kongManager" || !!t.config.disableSorting), d = {
|
|
4099
4101
|
name: { label: o("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4100
4102
|
};
|
|
@@ -4102,10 +4104,10 @@ const Ft = (e, n) => {
|
|
|
4102
4104
|
const u = d, g = (E) => ({
|
|
4103
4105
|
"data-testid": E.username ?? E.custom_id ?? E.id
|
|
4104
4106
|
}), f = M(() => {
|
|
4105
|
-
var z, le,
|
|
4107
|
+
var z, le, Ce, Ee;
|
|
4106
4108
|
let E = `${t.config.apiBaseUrl}${$e.list[t.config.app][l.value ? "forConsumer" : "all"]}`;
|
|
4107
|
-
return t.config.app === "konnect" ? E = E.replace(/{controlPlaneId}/gi, ((z = t.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerId}/gi, ((le = t.config) == null ? void 0 : le.consumerId) || "") : t.config.app === "kongManager" && (E = E.replace(/\/{workspace}/gi, (
|
|
4108
|
-
}),
|
|
4109
|
+
return t.config.app === "konnect" ? E = E.replace(/{controlPlaneId}/gi, ((z = t.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerId}/gi, ((le = t.config) == null ? void 0 : le.consumerId) || "") : t.config.app === "kongManager" && (E = E.replace(/\/{workspace}/gi, (Ce = t.config) != null && Ce.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), E;
|
|
4110
|
+
}), A = O(""), v = M(() => {
|
|
4109
4111
|
const E = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4110
4112
|
return E ? {
|
|
4111
4113
|
isExactMatch: E,
|
|
@@ -4121,8 +4123,8 @@ const Ft = (e, n) => {
|
|
|
4121
4123
|
},
|
|
4122
4124
|
schema: t.config.filterSchema
|
|
4123
4125
|
};
|
|
4124
|
-
}), p = M(() => l.value ? "consumer_groups" : void 0), { fetcher:
|
|
4125
|
-
|
|
4126
|
+
}), p = M(() => l.value ? "consumer_groups" : void 0), { fetcher: S, fetcherState: b } = Zs(t.config, f.value, p.value), C = () => {
|
|
4127
|
+
A.value = "";
|
|
4126
4128
|
}, I = () => {
|
|
4127
4129
|
s.value++;
|
|
4128
4130
|
}, ne = O(""), pe = (E, z) => {
|
|
@@ -4153,57 +4155,57 @@ const Ft = (e, n) => {
|
|
|
4153
4155
|
entity: E,
|
|
4154
4156
|
message: o("consumer_groups.copy.success_brief")
|
|
4155
4157
|
});
|
|
4156
|
-
},
|
|
4158
|
+
}, w = async (E) => {
|
|
4157
4159
|
var le;
|
|
4158
4160
|
await ((le = t.canRetrieve) == null ? void 0 : le.call(t, E)) && a.push(t.config.getViewRoute(E.id));
|
|
4159
|
-
},
|
|
4161
|
+
}, N = (E) => ({
|
|
4160
4162
|
label: o("consumer_groups.actions.view"),
|
|
4161
4163
|
to: t.config.getViewRoute(E)
|
|
4162
|
-
}),
|
|
4164
|
+
}), B = (E) => ({
|
|
4163
4165
|
label: o("consumer_groups.actions.edit"),
|
|
4164
4166
|
to: t.config.getEditRoute(E)
|
|
4165
|
-
}),
|
|
4166
|
-
|
|
4167
|
+
}), k = O(void 0), x = O(!1), T = O(!1), P = O(""), J = Ws(t.config, f.value), Q = (E) => {
|
|
4168
|
+
k.value = E, x.value = !0;
|
|
4167
4169
|
}, X = () => {
|
|
4168
4170
|
x.value = !1;
|
|
4169
4171
|
}, ee = async () => {
|
|
4170
4172
|
var E, z, le;
|
|
4171
|
-
if ((E =
|
|
4173
|
+
if ((E = k.value) != null && E.id) {
|
|
4172
4174
|
T.value = !0;
|
|
4173
4175
|
try {
|
|
4174
|
-
await i.delete(J(
|
|
4175
|
-
} catch (
|
|
4176
|
-
P.value = ((le = (z =
|
|
4176
|
+
await i.delete(J(k.value.id)), T.value = !1, x.value = !1, s.value++, n("delete:success", k.value);
|
|
4177
|
+
} catch (Ce) {
|
|
4178
|
+
P.value = ((le = (z = Ce.response) == null ? void 0 : z.data) == null ? void 0 : le.message) || Ce.message || o("consumer_groups.errors.delete"), n("error", Ce);
|
|
4177
4179
|
} finally {
|
|
4178
4180
|
T.value = !1;
|
|
4179
4181
|
}
|
|
4180
4182
|
}
|
|
4181
4183
|
}, ie = O(!1), Ve = () => {
|
|
4182
4184
|
ie.value = !0;
|
|
4183
|
-
},
|
|
4185
|
+
}, _ = () => {
|
|
4184
4186
|
ie.value = !1;
|
|
4185
4187
|
}, L = (E, z) => {
|
|
4186
|
-
z ||
|
|
4188
|
+
z || _(), s.value++, n("add:success", E);
|
|
4187
4189
|
}, re = () => {
|
|
4188
4190
|
l.value && Ve();
|
|
4189
|
-
}, q = O(void 0),
|
|
4190
|
-
q.value = E,
|
|
4191
|
+
}, q = O(void 0), D = O(!1), ge = O(""), _e = (E) => {
|
|
4192
|
+
q.value = E, D.value = !0;
|
|
4191
4193
|
}, ce = () => {
|
|
4192
|
-
|
|
4193
|
-
},
|
|
4194
|
-
var z, le,
|
|
4194
|
+
D.value = !1, q.value = void 0;
|
|
4195
|
+
}, Ne = M(() => {
|
|
4196
|
+
var z, le, Ce, Ee;
|
|
4195
4197
|
let E = `${t.config.apiBaseUrl}${$e.list[t.config.app].oneForConsumer}`;
|
|
4196
|
-
return t.config.app === "konnect" ? E = E.replace(/{controlPlaneId}/gi, ((z = t.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerId}/gi, ((le = t.config) == null ? void 0 : le.consumerId) || "") : t.config.app === "kongManager" && (E = E.replace(/\/{workspace}/gi, (
|
|
4197
|
-
}),
|
|
4198
|
+
return t.config.app === "konnect" ? E = E.replace(/{controlPlaneId}/gi, ((z = t.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerId}/gi, ((le = t.config) == null ? void 0 : le.consumerId) || "") : t.config.app === "kongManager" && (E = E.replace(/\/{workspace}/gi, (Ce = t.config) != null && Ce.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), E;
|
|
4199
|
+
}), De = O(!1), ir = async () => {
|
|
4198
4200
|
if (q.value) {
|
|
4199
|
-
|
|
4201
|
+
De.value = !0;
|
|
4200
4202
|
try {
|
|
4201
|
-
const E =
|
|
4203
|
+
const E = Ne.value.replace(/{consumerGroupId}/gi, q.value.id);
|
|
4202
4204
|
await i.delete(E), n("remove:success", q.value), ce(), s.value++;
|
|
4203
4205
|
} catch (E) {
|
|
4204
4206
|
ge.value = E.message || o("consumer_groups.errors.delete"), n("error", E);
|
|
4205
4207
|
} finally {
|
|
4206
|
-
|
|
4208
|
+
De.value = !1;
|
|
4207
4209
|
}
|
|
4208
4210
|
}
|
|
4209
4211
|
};
|
|
@@ -4223,9 +4225,9 @@ const Ft = (e, n) => {
|
|
|
4223
4225
|
return Qe(async () => {
|
|
4224
4226
|
await t.canCreate() && (pt.value.title = l.value ? o("consumer_groups.list.empty_state.title_for_consumer") : o("consumer_groups.list.empty_state.title"), pt.value.ctaText = l.value ? o("consumer_groups.actions.add_to_group") : o("consumer_groups.actions.create"));
|
|
4225
4227
|
}), (E, z) => {
|
|
4226
|
-
const le = U("KButton"),
|
|
4228
|
+
const le = U("KButton"), Ce = U("KBadge"), Ee = U("KTruncate"), Ge = U("KDropdownItem"), Bt = U("KClipboardProvider"), sr = U("KPrompt");
|
|
4227
4229
|
return m(), j("div", ol, [
|
|
4228
|
-
|
|
4230
|
+
K(y(Is), {
|
|
4229
4231
|
"cache-identifier": e.cacheIdentifier,
|
|
4230
4232
|
"disable-pagination": l.value,
|
|
4231
4233
|
"disable-pagination-page-jump": "",
|
|
@@ -4233,32 +4235,32 @@ const Ft = (e, n) => {
|
|
|
4233
4235
|
"empty-state-options": pt.value,
|
|
4234
4236
|
"enable-entity-actions": "",
|
|
4235
4237
|
"error-message": ne.value,
|
|
4236
|
-
fetcher: y(
|
|
4238
|
+
fetcher: y(S),
|
|
4237
4239
|
"fetcher-cache-key": s.value,
|
|
4238
4240
|
"pagination-type": "offset",
|
|
4239
4241
|
"preferences-storage-key": "kong-ui-entities-consumer-groups-list",
|
|
4240
|
-
query:
|
|
4242
|
+
query: A.value,
|
|
4241
4243
|
"row-attributes": g,
|
|
4242
4244
|
"table-headers": y(u),
|
|
4243
|
-
onClearSearchInput:
|
|
4244
|
-
"onClick:row": z[3] || (z[3] = (W) =>
|
|
4245
|
+
onClearSearchInput: C,
|
|
4246
|
+
"onClick:row": z[3] || (z[3] = (W) => w(W)),
|
|
4245
4247
|
onEmptyStateCtaClicked: re,
|
|
4246
4248
|
onSort: I
|
|
4247
4249
|
}, {
|
|
4248
4250
|
"toolbar-filter": h(() => [
|
|
4249
|
-
l.value ? G("", !0) : (m(), V(y(
|
|
4251
|
+
l.value ? G("", !0) : (m(), V(y(Rs), {
|
|
4250
4252
|
key: 0,
|
|
4251
|
-
modelValue:
|
|
4252
|
-
"onUpdate:modelValue": z[0] || (z[0] = (W) =>
|
|
4253
|
+
modelValue: A.value,
|
|
4254
|
+
"onUpdate:modelValue": z[0] || (z[0] = (W) => A.value = W),
|
|
4253
4255
|
config: v.value
|
|
4254
4256
|
}, null, 8, ["modelValue", "config"]))
|
|
4255
4257
|
]),
|
|
4256
4258
|
"toolbar-button": h(() => [
|
|
4257
|
-
|
|
4259
|
+
K(y(Xe), {
|
|
4258
4260
|
"auth-function": () => e.canCreate()
|
|
4259
4261
|
}, {
|
|
4260
4262
|
default: h(() => [
|
|
4261
|
-
|
|
4263
|
+
K(le, {
|
|
4262
4264
|
appearance: "primary",
|
|
4263
4265
|
"data-testid": "toolbar-add-consumer-group",
|
|
4264
4266
|
icon: "plus",
|
|
@@ -4275,7 +4277,7 @@ const Ft = (e, n) => {
|
|
|
4275
4277
|
}, 8, ["auth-function"])
|
|
4276
4278
|
]),
|
|
4277
4279
|
name: h(({ rowValue: W }) => [
|
|
4278
|
-
|
|
4280
|
+
R("b", null, F(W ?? "-"), 1)
|
|
4279
4281
|
]),
|
|
4280
4282
|
consumers_count: h(({ rowValue: W }) => [
|
|
4281
4283
|
Z(F(W ?? "-"), 1)
|
|
@@ -4283,13 +4285,13 @@ const Ft = (e, n) => {
|
|
|
4283
4285
|
tags: h(({ rowValue: W }) => [
|
|
4284
4286
|
(W == null ? void 0 : W.length) > 0 ? (m(), V(Ee, { key: 0 }, {
|
|
4285
4287
|
default: h(() => [
|
|
4286
|
-
(m(!0), j(ve, null, ye(W, (
|
|
4287
|
-
key:
|
|
4288
|
+
(m(!0), j(ve, null, ye(W, (Be) => (m(), V(Ce, {
|
|
4289
|
+
key: Be,
|
|
4288
4290
|
onClick: z[2] || (z[2] = rt(() => {
|
|
4289
4291
|
}, ["stop"]))
|
|
4290
4292
|
}, {
|
|
4291
4293
|
default: h(() => [
|
|
4292
|
-
Z(F(
|
|
4294
|
+
Z(F(Be), 1)
|
|
4293
4295
|
]),
|
|
4294
4296
|
_: 2
|
|
4295
4297
|
}, 1024))), 128))
|
|
@@ -4298,11 +4300,11 @@ const Ft = (e, n) => {
|
|
|
4298
4300
|
}, 1024)) : (m(), j("span", al, "-"))
|
|
4299
4301
|
]),
|
|
4300
4302
|
actions: h(({ row: W }) => [
|
|
4301
|
-
|
|
4302
|
-
default: h(({ copyToClipboard:
|
|
4303
|
-
|
|
4303
|
+
K(Bt, null, {
|
|
4304
|
+
default: h(({ copyToClipboard: Be }) => [
|
|
4305
|
+
K(Ge, {
|
|
4304
4306
|
"data-testid": "action-entity-copy-id",
|
|
4305
|
-
onClick: (lr) => pe(W,
|
|
4307
|
+
onClick: (lr) => pe(W, Be)
|
|
4306
4308
|
}, {
|
|
4307
4309
|
default: h(() => [
|
|
4308
4310
|
Z(F(y(o)("consumer_groups.actions.copy_id")), 1)
|
|
@@ -4312,11 +4314,11 @@ const Ft = (e, n) => {
|
|
|
4312
4314
|
]),
|
|
4313
4315
|
_: 2
|
|
4314
4316
|
}, 1024),
|
|
4315
|
-
|
|
4316
|
-
default: h(({ copyToClipboard:
|
|
4317
|
-
|
|
4317
|
+
K(Bt, null, {
|
|
4318
|
+
default: h(({ copyToClipboard: Be }) => [
|
|
4319
|
+
K(Ge, {
|
|
4318
4320
|
"data-testid": "action-entity-copy-json",
|
|
4319
|
-
onClick: (lr) => H(W,
|
|
4321
|
+
onClick: (lr) => H(W, Be)
|
|
4320
4322
|
}, {
|
|
4321
4323
|
default: h(() => [
|
|
4322
4324
|
Z(F(y(o)("consumer_groups.actions.copy_json")), 1)
|
|
@@ -4326,34 +4328,34 @@ const Ft = (e, n) => {
|
|
|
4326
4328
|
]),
|
|
4327
4329
|
_: 2
|
|
4328
4330
|
}, 1024),
|
|
4329
|
-
|
|
4331
|
+
K(y(Xe), {
|
|
4330
4332
|
"auth-function": () => e.canRetrieve(W)
|
|
4331
4333
|
}, {
|
|
4332
4334
|
default: h(() => [
|
|
4333
|
-
|
|
4335
|
+
K(Ge, {
|
|
4334
4336
|
"data-testid": "action-entity-view",
|
|
4335
4337
|
"has-divider": "",
|
|
4336
|
-
item:
|
|
4338
|
+
item: N(W.id)
|
|
4337
4339
|
}, null, 8, ["item"])
|
|
4338
4340
|
]),
|
|
4339
4341
|
_: 2
|
|
4340
4342
|
}, 1032, ["auth-function"]),
|
|
4341
|
-
|
|
4343
|
+
K(y(Xe), {
|
|
4342
4344
|
"auth-function": () => e.canEdit(W)
|
|
4343
4345
|
}, {
|
|
4344
4346
|
default: h(() => [
|
|
4345
|
-
|
|
4347
|
+
K(Ge, {
|
|
4346
4348
|
"data-testid": "action-entity-edit",
|
|
4347
|
-
item:
|
|
4349
|
+
item: B(W.id)
|
|
4348
4350
|
}, null, 8, ["item"])
|
|
4349
4351
|
]),
|
|
4350
4352
|
_: 2
|
|
4351
4353
|
}, 1032, ["auth-function"]),
|
|
4352
|
-
|
|
4354
|
+
K(y(Xe), {
|
|
4353
4355
|
"auth-function": () => e.canDelete(W)
|
|
4354
4356
|
}, {
|
|
4355
4357
|
default: h(() => [
|
|
4356
|
-
|
|
4358
|
+
K(Ge, {
|
|
4357
4359
|
"data-testid": "action-entity-delete",
|
|
4358
4360
|
"has-divider": "",
|
|
4359
4361
|
"is-dangerous": "",
|
|
@@ -4370,11 +4372,11 @@ const Ft = (e, n) => {
|
|
|
4370
4372
|
]),
|
|
4371
4373
|
_: 1
|
|
4372
4374
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4373
|
-
|
|
4375
|
+
K(y(Ts), {
|
|
4374
4376
|
"action-pending": T.value,
|
|
4375
4377
|
"data-testid": "delete-consumer-group-modal",
|
|
4376
4378
|
description: y(o)("consumer_groups.delete.description"),
|
|
4377
|
-
"entity-name":
|
|
4379
|
+
"entity-name": k.value && (k.value.name || k.value.id),
|
|
4378
4380
|
"entity-type": y(dn).ConsumerGroup,
|
|
4379
4381
|
error: P.value,
|
|
4380
4382
|
title: y(o)("consumer_groups.delete.title"),
|
|
@@ -4389,37 +4391,37 @@ const Ft = (e, n) => {
|
|
|
4389
4391
|
visible: ie.value,
|
|
4390
4392
|
"onAdd:partialSuccess": z[4] || (z[4] = (W) => L(W, !0)),
|
|
4391
4393
|
"onAdd:success": z[5] || (z[5] = (W) => L(W)),
|
|
4392
|
-
onCancel:
|
|
4394
|
+
onCancel: _
|
|
4393
4395
|
}, null, 8, ["config", "visible"])) : G("", !0),
|
|
4394
4396
|
e.config.consumerId && q.value ? (m(), V(sr, {
|
|
4395
4397
|
key: 1,
|
|
4396
4398
|
"data-testid": "exit-group-modal",
|
|
4397
|
-
"is-visible":
|
|
4399
|
+
"is-visible": D.value,
|
|
4398
4400
|
title: y(o)("consumer_groups.consumers.exit.title"),
|
|
4399
4401
|
type: "danger",
|
|
4400
4402
|
onCanceled: ce,
|
|
4401
4403
|
onProceed: ir
|
|
4402
4404
|
}, {
|
|
4403
4405
|
"body-content": h(() => [
|
|
4404
|
-
|
|
4406
|
+
K(y(r), {
|
|
4405
4407
|
class: "exit-modal-message",
|
|
4406
4408
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
4407
4409
|
tag: "p"
|
|
4408
4410
|
}, Te({
|
|
4409
4411
|
consumerGroup: h(() => [
|
|
4410
|
-
|
|
4412
|
+
R("strong", null, F(q.value.name || q.value.id), 1)
|
|
4411
4413
|
]),
|
|
4412
4414
|
_: 2
|
|
4413
4415
|
}, [
|
|
4414
4416
|
e.config.consumerUsername ? {
|
|
4415
4417
|
name: "consumer",
|
|
4416
4418
|
fn: h(() => [
|
|
4417
|
-
|
|
4419
|
+
R("strong", null, F(e.config.consumerUsername), 1)
|
|
4418
4420
|
]),
|
|
4419
4421
|
key: "0"
|
|
4420
4422
|
} : void 0
|
|
4421
4423
|
]), 1032, ["keypath"]),
|
|
4422
|
-
|
|
4424
|
+
R("p", null, F(y(o)("consumer_groups.consumers.exit.description")), 1)
|
|
4423
4425
|
]),
|
|
4424
4426
|
_: 1
|
|
4425
4427
|
}, 8, ["is-visible", "title"])) : G("", !0)
|
|
@@ -4427,7 +4429,7 @@ const Ft = (e, n) => {
|
|
|
4427
4429
|
};
|
|
4428
4430
|
}
|
|
4429
4431
|
});
|
|
4430
|
-
const _l = /* @__PURE__ */
|
|
4432
|
+
const _l = /* @__PURE__ */ Kt(il, [["__scopeId", "data-v-80c4522c"]]), sl = { class: "kong-ui-entities-consumer-group-form" }, ll = { class: "select-item-label" }, ul = {
|
|
4431
4433
|
key: 0,
|
|
4432
4434
|
class: "select-item-desc"
|
|
4433
4435
|
}, cl = /* @__PURE__ */ ae({
|
|
@@ -4469,98 +4471,98 @@ const _l = /* @__PURE__ */ Ft(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4469
4471
|
results: u
|
|
4470
4472
|
} = ar(t.config, (ie = $e.form[(ee = t.config) == null ? void 0 : ee.app]) == null ? void 0 : ie.consumersList, "", {
|
|
4471
4473
|
fetchedItemsKey: "data",
|
|
4472
|
-
searchKeys: ["username", "custom_id"]
|
|
4473
|
-
}), { axiosInstance: g } =
|
|
4474
|
+
searchKeys: ["username", "custom_id", "id"]
|
|
4475
|
+
}), { axiosInstance: g } = Ft({
|
|
4474
4476
|
headers: (Ve = t.config) == null ? void 0 : Ve.requestHeaders
|
|
4475
|
-
}), { getMessageFromError: f } = Ys(),
|
|
4476
|
-
label:
|
|
4477
|
-
value:
|
|
4478
|
-
selected: a.fields.consumers.includes(
|
|
4479
|
-
data:
|
|
4477
|
+
}), { getMessageFromError: f } = Ys(), A = M(() => u.value.map((_) => ({
|
|
4478
|
+
label: _.username || _.custom_id,
|
|
4479
|
+
value: _.id,
|
|
4480
|
+
selected: a.fields.consumers.includes(_.id),
|
|
4481
|
+
data: _
|
|
4480
4482
|
// we need this to determine whether or not to show the description text
|
|
4481
4483
|
}))), v = M(() => {
|
|
4482
|
-
var
|
|
4483
|
-
return (L = $e.form[(
|
|
4484
|
-
}), p = M(() => t.consumerGroupId ? nt.Edit : nt.Create),
|
|
4485
|
-
var
|
|
4486
|
-
let q = `${(
|
|
4487
|
-
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? q = q.replace(/{controlPlaneId}/gi, ((ce = t.config) == null ? void 0 : ce.controlPlaneId) || "") : ((
|
|
4484
|
+
var _, L;
|
|
4485
|
+
return (L = $e.form[(_ = t.config) == null ? void 0 : _.app]) == null ? void 0 : L.edit;
|
|
4486
|
+
}), p = M(() => t.consumerGroupId ? nt.Edit : nt.Create), S = M(() => !!a.fields.name && !w.value), b = M(() => JSON.stringify(a.fields) !== JSON.stringify(i)), C = (_, L = "", re = "") => {
|
|
4487
|
+
var D, ge, _e, ce, Ne, De;
|
|
4488
|
+
let q = `${(D = t.config) == null ? void 0 : D.apiBaseUrl}${$e.form[(ge = t.config) == null ? void 0 : ge.app][_]}`;
|
|
4489
|
+
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? q = q.replace(/{controlPlaneId}/gi, ((ce = t.config) == null ? void 0 : ce.controlPlaneId) || "") : ((Ne = t.config) == null ? void 0 : Ne.app) === "kongManager" && (q = q.replace(/\/{workspace}/gi, (De = t.config) != null && De.workspace ? `/${t.config.workspace}` : "")), q = q.replace(/{id}/gi, L || t.consumerGroupId), (_ === "addConsumer" || _ === "removeConsumer") && (q = q.replace(/{consumerId}/gi, re)), q;
|
|
4488
4490
|
}, I = () => {
|
|
4489
|
-
var
|
|
4490
|
-
o.push(((
|
|
4491
|
-
}, ne = (
|
|
4492
|
-
n("error",
|
|
4493
|
-
}, pe = (
|
|
4494
|
-
n("loading",
|
|
4495
|
-
}, H = async (
|
|
4496
|
-
var re, q,
|
|
4497
|
-
a.fields.name = ((re =
|
|
4498
|
-
const L = ((
|
|
4499
|
-
if (a.fields.tags = (L == null ? void 0 : L.join(", ")) || "", "consumers" in
|
|
4500
|
-
a.fields.consumers = ((ge =
|
|
4491
|
+
var _;
|
|
4492
|
+
o.push(((_ = t.config) == null ? void 0 : _.cancelRoute) || { name: "consumer-group-list" });
|
|
4493
|
+
}, ne = (_) => {
|
|
4494
|
+
n("error", _);
|
|
4495
|
+
}, pe = (_) => {
|
|
4496
|
+
n("loading", _);
|
|
4497
|
+
}, H = async (_) => {
|
|
4498
|
+
var re, q, D, ge, _e;
|
|
4499
|
+
a.fields.name = ((re = _ == null ? void 0 : _.item) == null ? void 0 : re.name) || ((q = _ == null ? void 0 : _.consumer_group) == null ? void 0 : q.name) || (_ == null ? void 0 : _.name) || "";
|
|
4500
|
+
const L = ((D = _ == null ? void 0 : _.item) == null ? void 0 : D.tags) || (_ == null ? void 0 : _.consumer_group.tags) || (_ == null ? void 0 : _.tags) || [];
|
|
4501
|
+
if (a.fields.tags = (L == null ? void 0 : L.join(", ")) || "", "consumers" in _)
|
|
4502
|
+
a.fields.consumers = ((ge = _ == null ? void 0 : _.consumers) == null ? void 0 : ge.map((ce) => ce.id)) || [];
|
|
4501
4503
|
else
|
|
4502
4504
|
try {
|
|
4503
|
-
const { data: ce } = await g.get(
|
|
4504
|
-
a.fields.consumers = "consumers" in ce ? (_e = ce == null ? void 0 : ce.consumers) == null ? void 0 : _e.map((
|
|
4505
|
+
const { data: ce } = await g.get(C("getConsumers"));
|
|
4506
|
+
a.fields.consumers = "consumers" in ce ? (_e = ce == null ? void 0 : ce.consumers) == null ? void 0 : _e.map((Ne) => Ne.id) : [];
|
|
4505
4507
|
} catch (ce) {
|
|
4506
4508
|
x(ce);
|
|
4507
4509
|
}
|
|
4508
4510
|
Object.assign(i, a.fields);
|
|
4509
|
-
},
|
|
4510
|
-
var
|
|
4511
|
+
}, w = M(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")), N = () => {
|
|
4512
|
+
var _, L;
|
|
4511
4513
|
return {
|
|
4512
4514
|
name: a.fields.name,
|
|
4513
|
-
tags: (L = (
|
|
4515
|
+
tags: (L = (_ = a.fields.tags.split(",")) == null ? void 0 : _.map((re) => String(re || "").trim())) == null ? void 0 : L.filter((re) => re !== "")
|
|
4514
4516
|
};
|
|
4515
|
-
},
|
|
4516
|
-
a.errorMessage = f(
|
|
4517
|
-
}, T = (
|
|
4518
|
-
Object.assign(i, a.fields), n("update", { ...a.fields, id:
|
|
4519
|
-
}, P = (
|
|
4520
|
-
const q =
|
|
4517
|
+
}, B = async (_, L = "") => await g.post(C("addConsumer", L, _), { consumer: _ }), k = async (_, L = "") => await g.delete(C("removeConsumer", L, _)), x = (_) => {
|
|
4518
|
+
a.errorMessage = f(_), n("error", _);
|
|
4519
|
+
}, T = (_ = t.consumerGroupId) => {
|
|
4520
|
+
Object.assign(i, a.fields), n("update", { ...a.fields, id: _ });
|
|
4521
|
+
}, P = (_, L, re = t.consumerGroupId) => {
|
|
4522
|
+
const q = _ == null ? void 0 : _.find((D) => D.status !== "fulfilled");
|
|
4521
4523
|
q ? x({
|
|
4522
4524
|
code: q.status,
|
|
4523
4525
|
message: L
|
|
4524
4526
|
}) : T(re);
|
|
4525
4527
|
}, J = async () => {
|
|
4526
|
-
let
|
|
4528
|
+
let _ = "";
|
|
4527
4529
|
try {
|
|
4528
|
-
const { data: L } = await g.post(
|
|
4529
|
-
|
|
4530
|
+
const { data: L } = await g.post(C("create"), N());
|
|
4531
|
+
_ = "item" in L ? L.item.id : L.id;
|
|
4530
4532
|
} catch (L) {
|
|
4531
4533
|
x(L);
|
|
4532
4534
|
}
|
|
4533
|
-
if (a.fields.consumers.length > 0 &&
|
|
4535
|
+
if (a.fields.consumers.length > 0 && _)
|
|
4534
4536
|
try {
|
|
4535
|
-
const L = a.fields.consumers.map((q) =>
|
|
4536
|
-
P(re, r("consumer_groups.errors.add_consumer"),
|
|
4537
|
+
const L = a.fields.consumers.map((q) => B(q, _)), re = await Promise.allSettled(L);
|
|
4538
|
+
P(re, r("consumer_groups.errors.add_consumer"), _);
|
|
4537
4539
|
} catch (L) {
|
|
4538
4540
|
x(L);
|
|
4539
4541
|
}
|
|
4540
4542
|
else
|
|
4541
|
-
a.fields.consumers.length === 0 &&
|
|
4543
|
+
a.fields.consumers.length === 0 && _ && T(_);
|
|
4542
4544
|
}, Q = async () => {
|
|
4543
4545
|
var re;
|
|
4544
4546
|
try {
|
|
4545
|
-
((re = t.config) == null ? void 0 : re.app) === "konnect" ? await g.put(
|
|
4547
|
+
((re = t.config) == null ? void 0 : re.app) === "konnect" ? await g.put(C("edit"), N()) : await g.patch(C("edit"), N());
|
|
4546
4548
|
} catch (q) {
|
|
4547
4549
|
x(q);
|
|
4548
4550
|
}
|
|
4549
|
-
const
|
|
4550
|
-
if (L.length === 0 &&
|
|
4551
|
+
const _ = a.fields.consumers.filter((q) => !i.consumers.includes(q)), L = i.consumers.filter((q) => !a.fields.consumers.includes(q));
|
|
4552
|
+
if (L.length === 0 && _.length === 0)
|
|
4551
4553
|
T();
|
|
4552
4554
|
else {
|
|
4553
4555
|
if (L.length > 0)
|
|
4554
4556
|
try {
|
|
4555
|
-
const q = L.map((ge) =>
|
|
4556
|
-
P(
|
|
4557
|
+
const q = L.map((ge) => k(ge)), D = await Promise.allSettled(q);
|
|
4558
|
+
P(D, r("consumer_groups.errors.remove_consumer"));
|
|
4557
4559
|
} catch (q) {
|
|
4558
4560
|
x(q);
|
|
4559
4561
|
}
|
|
4560
|
-
if (
|
|
4562
|
+
if (_.length > 0)
|
|
4561
4563
|
try {
|
|
4562
|
-
const q =
|
|
4563
|
-
P(
|
|
4564
|
+
const q = _.map((ge) => B(ge)), D = await Promise.allSettled(q);
|
|
4565
|
+
P(D, r("consumer_groups.errors.add_consumer"));
|
|
4564
4566
|
} catch (q) {
|
|
4565
4567
|
x(q);
|
|
4566
4568
|
}
|
|
@@ -4574,31 +4576,31 @@ const _l = /* @__PURE__ */ Ft(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4574
4576
|
};
|
|
4575
4577
|
return Qe(async () => {
|
|
4576
4578
|
await d();
|
|
4577
|
-
}), (
|
|
4579
|
+
}), (_, L) => {
|
|
4578
4580
|
const re = U("KInput"), q = U("KMultiselect");
|
|
4579
4581
|
return m(), j("div", sl, [
|
|
4580
|
-
|
|
4581
|
-
"can-submit":
|
|
4582
|
+
K(y(ys), {
|
|
4583
|
+
"can-submit": S.value && b.value,
|
|
4582
4584
|
config: e.config,
|
|
4583
4585
|
"edit-id": e.consumerGroupId,
|
|
4584
|
-
"error-message": a.errorMessage || y(c) ||
|
|
4586
|
+
"error-message": a.errorMessage || y(c) || w.value,
|
|
4585
4587
|
"fetch-url": v.value,
|
|
4586
4588
|
"is-readonly": a.readonly,
|
|
4587
4589
|
onCancel: I,
|
|
4588
|
-
"onFetch:error": L[3] || (L[3] = (
|
|
4590
|
+
"onFetch:error": L[3] || (L[3] = (D) => ne(D)),
|
|
4589
4591
|
"onFetch:success": H,
|
|
4590
|
-
onLoading: L[4] || (L[4] = (
|
|
4592
|
+
onLoading: L[4] || (L[4] = (D) => pe(D)),
|
|
4591
4593
|
onSubmit: X
|
|
4592
4594
|
}, {
|
|
4593
4595
|
default: h(() => [
|
|
4594
|
-
|
|
4596
|
+
K(y(un), {
|
|
4595
4597
|
description: y(r)("consumer_groups.form.general_info.description"),
|
|
4596
4598
|
title: y(r)("consumer_groups.form.general_info.title")
|
|
4597
4599
|
}, {
|
|
4598
4600
|
default: h(() => [
|
|
4599
|
-
|
|
4601
|
+
K(re, {
|
|
4600
4602
|
modelValue: a.fields.name,
|
|
4601
|
-
"onUpdate:modelValue": L[0] || (L[0] = (
|
|
4603
|
+
"onUpdate:modelValue": L[0] || (L[0] = (D) => a.fields.name = D),
|
|
4602
4604
|
modelModifiers: { trim: !0 },
|
|
4603
4605
|
autocomplete: "off",
|
|
4604
4606
|
"data-testid": "consumer-group-form-name",
|
|
@@ -4607,9 +4609,9 @@ const _l = /* @__PURE__ */ Ft(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4607
4609
|
required: "",
|
|
4608
4610
|
type: "text"
|
|
4609
4611
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
4610
|
-
|
|
4612
|
+
K(re, {
|
|
4611
4613
|
modelValue: a.fields.tags,
|
|
4612
|
-
"onUpdate:modelValue": L[1] || (L[1] = (
|
|
4614
|
+
"onUpdate:modelValue": L[1] || (L[1] = (D) => a.fields.tags = D),
|
|
4613
4615
|
modelModifiers: { trim: !0 },
|
|
4614
4616
|
autocomplete: "off",
|
|
4615
4617
|
"data-testid": "consumer-group-form-tags",
|
|
@@ -4625,30 +4627,30 @@ const _l = /* @__PURE__ */ Ft(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4625
4627
|
]),
|
|
4626
4628
|
_: 1
|
|
4627
4629
|
}, 8, ["description", "title"]),
|
|
4628
|
-
|
|
4630
|
+
K(y(un), {
|
|
4629
4631
|
description: y(r)("consumer_groups.form.consumers.description"),
|
|
4630
4632
|
"has-divider": "",
|
|
4631
4633
|
title: y(r)("consumer_groups.form.consumers.title")
|
|
4632
4634
|
}, {
|
|
4633
4635
|
default: h(() => [
|
|
4634
|
-
|
|
4636
|
+
K(q, {
|
|
4635
4637
|
modelValue: a.fields.consumers,
|
|
4636
|
-
"onUpdate:modelValue": L[2] || (L[2] = (
|
|
4638
|
+
"onUpdate:modelValue": L[2] || (L[2] = (D) => a.fields.consumers = D),
|
|
4637
4639
|
appearance: "select",
|
|
4638
4640
|
autosuggest: "",
|
|
4639
4641
|
"expand-selected": "",
|
|
4640
|
-
items:
|
|
4642
|
+
items: A.value,
|
|
4641
4643
|
label: y(r)("consumer_groups.form.fields.consumers.label"),
|
|
4642
4644
|
loading: y(l),
|
|
4643
4645
|
placeholder: y(r)("consumer_groups.form.fields.consumers.placeholder"),
|
|
4644
4646
|
width: "auto",
|
|
4645
4647
|
onQueryChange: y(s)
|
|
4646
4648
|
}, {
|
|
4647
|
-
"item-template": h(({ item:
|
|
4649
|
+
"item-template": h(({ item: D }) => {
|
|
4648
4650
|
var ge, _e, ce;
|
|
4649
4651
|
return [
|
|
4650
|
-
|
|
4651
|
-
(ge =
|
|
4652
|
+
R("div", ll, F(D.label), 1),
|
|
4653
|
+
(ge = D == null ? void 0 : D.data) != null && ge.username && ((_e = D == null ? void 0 : D.data) != null && _e.custom_id) ? (m(), j("div", ul, F((ce = D == null ? void 0 : D.data) == null ? void 0 : ce.custom_id), 1)) : G("", !0)
|
|
4652
4654
|
];
|
|
4653
4655
|
}),
|
|
4654
4656
|
_: 1
|
|
@@ -4663,7 +4665,7 @@ const _l = /* @__PURE__ */ Ft(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4663
4665
|
};
|
|
4664
4666
|
}
|
|
4665
4667
|
});
|
|
4666
|
-
const wl = /* @__PURE__ */
|
|
4668
|
+
const wl = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-102d40d2"]]), dl = { class: "kong-ui-consumer-group-entity-config-card" }, Il = /* @__PURE__ */ ae({
|
|
4667
4669
|
__name: "ConsumerGroupConfigCard",
|
|
4668
4670
|
props: {
|
|
4669
4671
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4700,7 +4702,7 @@ const wl = /* @__PURE__ */ Ft(cl, [["__scopeId", "data-v-2da12897"]]), dl = { cl
|
|
|
4700
4702
|
}
|
|
4701
4703
|
});
|
|
4702
4704
|
return (a, i) => (m(), j("div", dl, [
|
|
4703
|
-
|
|
4705
|
+
K(y(ps), {
|
|
4704
4706
|
config: e.config,
|
|
4705
4707
|
"config-card-doc": e.configCardDoc,
|
|
4706
4708
|
"config-schema": o.value,
|