@kong-ui-public/entities-consumer-groups 1.3.3 → 1.3.4-pr.920.50af0ead.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
|
|
1
|
+
import { defineComponent as ie, ref as E, computed as T, watch as Se, renderSlot as Z, createCommentVNode as z, unref as y, useSlots as ut, onBeforeMount as Qe, resolveComponent as P, openBlock as m, createBlock as R, createSlots as Te, withCtx as v, createElementVNode as U, createTextVNode as Q, toDisplayString as K, createVNode as N, createElementBlock as j, renderList as he, Fragment as be, normalizeClass as Ne, 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 kr = {
|
|
7
7
|
list: {
|
|
8
8
|
table_headers: {
|
|
9
9
|
name: "Name",
|
|
@@ -95,11 +95,11 @@ const Cr = {
|
|
|
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
|
+
}, Cr = {
|
|
99
|
+
consumer_groups: kr
|
|
100
100
|
};
|
|
101
101
|
function _r() {
|
|
102
|
-
const e = It("en-us",
|
|
102
|
+
const e = It("en-us", Cr);
|
|
103
103
|
return {
|
|
104
104
|
i18n: e,
|
|
105
105
|
i18nT: cn(e)
|
|
@@ -140,7 +140,7 @@ const ct = {
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
};
|
|
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 || {}),
|
|
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 || {}), ne = /* @__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))(ne || {}), ke = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ke || {});
|
|
144
144
|
function At(e = {}) {
|
|
145
145
|
return {
|
|
146
146
|
axiosInstance: vr.create({
|
|
@@ -198,10 +198,10 @@ function Ar() {
|
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const xr = {
|
|
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
|
+
}, Sr = {
|
|
205
205
|
actions: {
|
|
206
206
|
save: "Save",
|
|
207
207
|
cancel: "Cancel",
|
|
@@ -278,9 +278,9 @@ const Sr = {
|
|
|
278
278
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
279
279
|
confirmText: "Yes, disable"
|
|
280
280
|
}
|
|
281
|
-
},
|
|
282
|
-
deleteModal:
|
|
283
|
-
baseForm:
|
|
281
|
+
}, Kr = {
|
|
282
|
+
deleteModal: xr,
|
|
283
|
+
baseForm: Sr,
|
|
284
284
|
baseTable: Tr,
|
|
285
285
|
baseConfigCard: $r,
|
|
286
286
|
filter: Mr,
|
|
@@ -288,8 +288,8 @@ const Sr = {
|
|
|
288
288
|
errors: Er,
|
|
289
289
|
toggleModal: Or
|
|
290
290
|
};
|
|
291
|
-
function
|
|
292
|
-
const e = It("en-us",
|
|
291
|
+
function xt() {
|
|
292
|
+
const e = It("en-us", Kr);
|
|
293
293
|
return {
|
|
294
294
|
i18n: e,
|
|
295
295
|
i18nT: cn(e)
|
|
@@ -313,72 +313,72 @@ 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 Nr(e, n, t, r = {
|
|
317
317
|
fetchedItemsKey: "data",
|
|
318
318
|
searchKeys: ["id"]
|
|
319
319
|
}) {
|
|
320
320
|
t || (t = "100");
|
|
321
321
|
const { axiosInstance: o } = At({
|
|
322
322
|
headers: e.requestHeaders
|
|
323
|
-
}), { i18n: { t: a } } =
|
|
324
|
-
await
|
|
325
|
-
}, 200), l =
|
|
326
|
-
let
|
|
327
|
-
e.app === "konnect" ?
|
|
328
|
-
const { isValidUuid: p } = pn(),
|
|
323
|
+
}), { i18n: { t: a } } = xt(), { debounce: i } = wr(), s = i(async (h) => {
|
|
324
|
+
await O(h);
|
|
325
|
+
}, 200), l = E(!1), c = E(""), d = E(""), u = E([]), g = E([]), f = E(void 0), I = y(n);
|
|
326
|
+
let k = `${e.apiBaseUrl}${I}`;
|
|
327
|
+
e.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
328
|
+
const { isValidUuid: p } = pn(), A = async () => {
|
|
329
329
|
try {
|
|
330
330
|
l.value = !0;
|
|
331
|
-
const { data:
|
|
332
|
-
|
|
331
|
+
const { data: h } = await o.get(`${k}?size=${t}`);
|
|
332
|
+
h != null && h.next || (f.value = r.fetchedItemsKey in h ? h[r.fetchedItemsKey] : []), g.value = r.fetchedItemsKey in h ? h[r.fetchedItemsKey] : [], u.value = g.value;
|
|
333
333
|
} catch {
|
|
334
334
|
u.value = [], c.value = a("debouncedFilter.errors.fetch");
|
|
335
335
|
} finally {
|
|
336
336
|
l.value = !1;
|
|
337
337
|
}
|
|
338
|
-
},
|
|
339
|
-
var
|
|
340
|
-
if (
|
|
341
|
-
if (
|
|
338
|
+
}, C = E(""), O = async (h) => {
|
|
339
|
+
var D, se, Y;
|
|
340
|
+
if (C.value !== h)
|
|
341
|
+
if (C.value = h || "", f.value === void 0)
|
|
342
342
|
try {
|
|
343
343
|
if (l.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
344
|
-
let w =
|
|
345
|
-
|
|
346
|
-
const { data:
|
|
347
|
-
r.fetchedItemsKey in
|
|
348
|
-
} else if (
|
|
344
|
+
let w = k + "";
|
|
345
|
+
h && (w += `/${h}`);
|
|
346
|
+
const { data: F } = await o.get(`${w}?size=${t}`);
|
|
347
|
+
r.fetchedItemsKey in F ? u.value = F[r.fetchedItemsKey] : F != null && F.id ? u.value = [F] : u.value = [];
|
|
348
|
+
} else if (h) {
|
|
349
349
|
const w = [];
|
|
350
|
-
p(
|
|
351
|
-
const { data:
|
|
352
|
-
return [
|
|
350
|
+
p(h) && r.searchKeys.includes("id") ? w.push((async () => {
|
|
351
|
+
const { data: b } = await o.get(`${k}/${h}`);
|
|
352
|
+
return [b[r.fetchedItemsKey] ?? b];
|
|
353
353
|
})()) : w.push(
|
|
354
|
-
...r.searchKeys.filter((
|
|
355
|
-
const { data: x } = await o.get(`${
|
|
354
|
+
...r.searchKeys.filter((b) => b !== "id").map(async (b) => {
|
|
355
|
+
const { data: x } = await o.get(`${k}?${b}=${h}`);
|
|
356
356
|
return x[r.fetchedItemsKey];
|
|
357
357
|
})
|
|
358
358
|
);
|
|
359
|
-
const
|
|
360
|
-
u.value = [], (
|
|
359
|
+
const F = await Promise.all(w), V = /* @__PURE__ */ new Set();
|
|
360
|
+
u.value = [], (D = F == null ? void 0 : F.forEach) == null || D.call(F, (b) => {
|
|
361
361
|
var x;
|
|
362
|
-
(x =
|
|
363
|
-
|
|
362
|
+
(x = b == null ? void 0 : b.forEach) == null || x.call(b, (S) => {
|
|
363
|
+
V.has(S.id) || (V.add(S.id), u.value.push(S));
|
|
364
364
|
});
|
|
365
365
|
});
|
|
366
366
|
} else
|
|
367
367
|
u.value = g.value;
|
|
368
368
|
} catch (w) {
|
|
369
|
-
((
|
|
369
|
+
((se = w == null ? void 0 : w.response) == null ? void 0 : se.status) === 404 ? d.value = a("debouncedFilter.errors.invalid") : (u.value = [], c.value = a("debouncedFilter.errors.fetch"));
|
|
370
370
|
} finally {
|
|
371
371
|
l.value = !1;
|
|
372
372
|
}
|
|
373
373
|
else
|
|
374
|
-
l.value = !0, d.value = "",
|
|
375
|
-
var
|
|
376
|
-
let
|
|
377
|
-
for (const
|
|
378
|
-
const x = typeof w[
|
|
379
|
-
x != null && x.includes(
|
|
374
|
+
l.value = !0, d.value = "", h ? (u.value = (Y = f.value) == null ? void 0 : Y.filter((w) => {
|
|
375
|
+
var F;
|
|
376
|
+
let V = !1;
|
|
377
|
+
for (const b of r.searchKeys) {
|
|
378
|
+
const x = typeof w[b] == "string" ? (F = w[b]) == null ? void 0 : F.toLowerCase() : w[b];
|
|
379
|
+
x != null && x.includes(h.toLowerCase()) && (V = !0);
|
|
380
380
|
}
|
|
381
|
-
return
|
|
381
|
+
return V;
|
|
382
382
|
}), (!u.value || !u.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : u.value = f.value, l.value = !1;
|
|
383
383
|
};
|
|
384
384
|
return {
|
|
@@ -387,18 +387,18 @@ function Kr(e, n, t, r = {
|
|
|
387
387
|
validationError: d,
|
|
388
388
|
results: u,
|
|
389
389
|
allRecords: f,
|
|
390
|
-
loadItems:
|
|
390
|
+
loadItems: A,
|
|
391
391
|
debouncedQueryChange: s
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
const t = y(n), r =
|
|
394
|
+
function Fr(e, n) {
|
|
395
|
+
const t = y(n), r = T(
|
|
396
396
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
397
397
|
);
|
|
398
398
|
return r.value.search = "", (o) => `${r.value.href}/${o}`;
|
|
399
399
|
}
|
|
400
400
|
function Br() {
|
|
401
|
-
const { i18n: { t: e } } =
|
|
401
|
+
const { i18n: { t: e } } = xt();
|
|
402
402
|
return {
|
|
403
403
|
getMessageFromError: (n) => {
|
|
404
404
|
var t, r, o;
|
|
@@ -426,17 +426,17 @@ function Br() {
|
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
428
|
function fn(e, n) {
|
|
429
|
-
const t =
|
|
429
|
+
const t = E(y(e)), r = E(y(n)), o = T(
|
|
430
430
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
431
|
-
), a =
|
|
431
|
+
), a = T(
|
|
432
432
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
433
433
|
);
|
|
434
434
|
return (i) => {
|
|
435
435
|
const { page: s, pageSize: l, offset: c, sortColumnKey: d, sortColumnOrder: u, query: g } = i;
|
|
436
436
|
try {
|
|
437
437
|
let f = new URL(a.value.href);
|
|
438
|
-
return o.value && g ? (f.search = "", f = new URL(`${f.href}/${g}/`)) : (o.value || new URLSearchParams(g).forEach((
|
|
439
|
-
f.searchParams.append(
|
|
438
|
+
return o.value && g ? (f.search = "", f = new URL(`${f.href}/${g}/`)) : (o.value || new URLSearchParams(g).forEach((I, k) => {
|
|
439
|
+
f.searchParams.append(k, I);
|
|
440
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;
|
|
441
441
|
} catch (f) {
|
|
442
442
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
@@ -446,7 +446,7 @@ function fn(e, n) {
|
|
|
446
446
|
function Pr(e, n, t = "data") {
|
|
447
447
|
const r = y(n), { axiosInstance: o } = At({
|
|
448
448
|
headers: e.requestHeaders
|
|
449
|
-
}), a = fn(e, r), i =
|
|
449
|
+
}), a = fn(e, r), i = E({
|
|
450
450
|
status: Oe.Idle
|
|
451
451
|
});
|
|
452
452
|
return { fetcher: async (s) => {
|
|
@@ -485,39 +485,39 @@ function Pr(e, n, t = "data") {
|
|
|
485
485
|
}
|
|
486
486
|
}, fetcherState: i };
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function qr() {
|
|
489
489
|
return {
|
|
490
490
|
convertKeyToTitle: (e, n = "_") => e ? e.split(n).map((t) => t.toLowerCase() === "id" ? t.toUpperCase() : t.charAt(0).toUpperCase() + t.substring(1)).join(" ") : ""
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
|
-
const mn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,
|
|
493
|
+
const mn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, qt = (e) => {
|
|
494
494
|
if (typeof e != "string")
|
|
495
495
|
throw new TypeError("Invalid argument expected string");
|
|
496
496
|
const n = e.match(mn);
|
|
497
497
|
if (!n)
|
|
498
498
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
499
499
|
return n.shift(), n;
|
|
500
|
-
},
|
|
500
|
+
}, Lt = (e) => e === "*" || e === "x" || e === "X", Ut = (e) => {
|
|
501
501
|
const n = parseInt(e, 10);
|
|
502
502
|
return isNaN(n) ? e : n;
|
|
503
|
-
},
|
|
504
|
-
if (
|
|
503
|
+
}, Lr = (e, n) => typeof e != typeof n ? [String(e), String(n)] : [e, n], Ur = (e, n) => {
|
|
504
|
+
if (Lt(e) || Lt(n))
|
|
505
505
|
return 0;
|
|
506
|
-
const [t, r] =
|
|
506
|
+
const [t, r] = Lr(Ut(e), Ut(n));
|
|
507
507
|
return t > r ? 1 : t < r ? -1 : 0;
|
|
508
|
-
},
|
|
508
|
+
}, Vt = (e, n) => {
|
|
509
509
|
for (let t = 0; t < Math.max(e.length, n.length); t++) {
|
|
510
|
-
const r =
|
|
510
|
+
const r = Ur(e[t] || "0", n[t] || "0");
|
|
511
511
|
if (r !== 0)
|
|
512
512
|
return r;
|
|
513
513
|
}
|
|
514
514
|
return 0;
|
|
515
|
-
},
|
|
516
|
-
const t =
|
|
517
|
-
return i !== 0 ? i : o && a ?
|
|
518
|
-
},
|
|
519
|
-
|
|
520
|
-
const r =
|
|
515
|
+
}, Vr = (e, n) => {
|
|
516
|
+
const t = qt(e), r = qt(n), o = t.pop(), a = r.pop(), i = Vt(t, r);
|
|
517
|
+
return i !== 0 ? i : o && a ? Vt(o.split("."), a.split(".")) : o || a ? o ? -1 : 1 : 0;
|
|
518
|
+
}, Rt = (e, n, t) => {
|
|
519
|
+
Rr(t);
|
|
520
|
+
const r = Vr(e, n);
|
|
521
521
|
return gn[t].includes(r);
|
|
522
522
|
}, gn = {
|
|
523
523
|
">": [1],
|
|
@@ -526,7 +526,7 @@ const mn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
526
526
|
"<=": [-1, 0],
|
|
527
527
|
"<": [-1],
|
|
528
528
|
"!=": [-1, 1]
|
|
529
|
-
}, Dt = Object.keys(gn),
|
|
529
|
+
}, Dt = Object.keys(gn), Rr = (e) => {
|
|
530
530
|
if (typeof e != "string")
|
|
531
531
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
532
532
|
if (Dt.indexOf(e) === -1)
|
|
@@ -543,26 +543,26 @@ function Gr(e) {
|
|
|
543
543
|
if (!a)
|
|
544
544
|
return !1;
|
|
545
545
|
const [i, s] = a;
|
|
546
|
-
return !(i &&
|
|
546
|
+
return !(i && Rt(o, i, "<") || s && Rt(o, s, ">"));
|
|
547
547
|
}
|
|
548
548
|
function Hr(e) {
|
|
549
|
-
const n =
|
|
550
|
-
return
|
|
549
|
+
const n = E(0), t = E(0), r = E(!1);
|
|
550
|
+
return Se(e, (o) => {
|
|
551
551
|
o && !r.value && (n.value = o.offsetWidth, t.value = o.scrollWidth, r.value = !0);
|
|
552
552
|
}), {
|
|
553
|
-
isTruncated:
|
|
553
|
+
isTruncated: T(() => n.value < t.value)
|
|
554
554
|
};
|
|
555
555
|
}
|
|
556
|
-
const
|
|
556
|
+
const ce = {
|
|
557
557
|
useAxios: At,
|
|
558
|
-
useDebouncedFilter:
|
|
559
|
-
useDeleteUrlBuilder:
|
|
558
|
+
useDebouncedFilter: Nr,
|
|
559
|
+
useDeleteUrlBuilder: Fr,
|
|
560
560
|
useErrors: Br,
|
|
561
561
|
useFetcher: Pr,
|
|
562
562
|
useFetchUrlBuilder: fn,
|
|
563
563
|
useHelpers: pn,
|
|
564
|
-
useStringHelpers:
|
|
565
|
-
useI18n:
|
|
564
|
+
useStringHelpers: qr,
|
|
565
|
+
useI18n: xt,
|
|
566
566
|
useGatewayFeatureSupported: Gr,
|
|
567
567
|
useTruncationDetector: Hr
|
|
568
568
|
}, zr = {
|
|
@@ -571,10 +571,10 @@ const ue = {
|
|
|
571
571
|
prefix: "Successfully",
|
|
572
572
|
content: " copied to clipboard"
|
|
573
573
|
}
|
|
574
|
-
}, Jr = "Copy to clipboard",
|
|
574
|
+
}, Jr = "Copy to clipboard", Yr = {
|
|
575
575
|
message: zr,
|
|
576
576
|
iconTitle: Jr
|
|
577
|
-
},
|
|
577
|
+
}, Wr = "kong-ui-copy-uuid-notify", Zr = { class: "kong-ui-copy-uuid" }, Qr = ["onClick"], Gt = 15, Xr = /* @__PURE__ */ ie({
|
|
578
578
|
__name: "CopyUuid",
|
|
579
579
|
props: {
|
|
580
580
|
uuid: {
|
|
@@ -618,19 +618,19 @@ const ue = {
|
|
|
618
618
|
},
|
|
619
619
|
emits: ["success", "error"],
|
|
620
620
|
setup(e, { emit: n }) {
|
|
621
|
-
const t = e, { t: r } = It("en-us",
|
|
622
|
-
}), a =
|
|
621
|
+
const t = e, { t: r } = It("en-us", Yr), o = t.notify || gr(Wr, () => {
|
|
622
|
+
}), a = T(() => t.idTooltip ? {
|
|
623
623
|
label: t.idTooltip,
|
|
624
624
|
positionFixed: !0,
|
|
625
625
|
placement: "bottomStart"
|
|
626
626
|
} : {
|
|
627
627
|
title: t.uuid
|
|
628
|
-
}), i =
|
|
628
|
+
}), i = T(() => !!(t.tooltip && t.successTooltip)), s = E(t.tooltip), l = T(() => t.tooltip ? {
|
|
629
629
|
label: s.value,
|
|
630
630
|
positionFixed: !0,
|
|
631
631
|
maxWidth: "500px",
|
|
632
632
|
placement: "bottomStart"
|
|
633
|
-
} : {}), c =
|
|
633
|
+
} : {}), c = T(() => t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${t.uuid.substring(0, 5)}` : t.uuid), d = (g) => {
|
|
634
634
|
s.value = g, setTimeout(() => {
|
|
635
635
|
s.value = t.tooltip;
|
|
636
636
|
}, 1800);
|
|
@@ -642,38 +642,38 @@ const ue = {
|
|
|
642
642
|
}), i.value ? d(r("message.fail")) : n("error", t.uuid);
|
|
643
643
|
return;
|
|
644
644
|
}
|
|
645
|
-
const f = t.uuid.length > Gt,
|
|
645
|
+
const f = t.uuid.length > Gt, I = t.format === "hidden" || t.format === "redacted" ? r("message.success.prefix") : `"${t.uuid.substring(0, Gt) + (f ? "..." : "")}"`;
|
|
646
646
|
typeof o == "function" && o({
|
|
647
647
|
type: "success",
|
|
648
|
-
message: `${
|
|
648
|
+
message: `${I}${r("message.success.content")}`
|
|
649
649
|
}), i.value ? d(t.successTooltip) : n("success", t.uuid);
|
|
650
650
|
};
|
|
651
651
|
return (g, f) => {
|
|
652
|
-
const
|
|
652
|
+
const I = P("KIcon"), k = P("KClipboardProvider");
|
|
653
653
|
return m(), j("div", Zr, [
|
|
654
|
-
e.format !== "hidden" ? (m(),
|
|
655
|
-
default:
|
|
656
|
-
|
|
657
|
-
class:
|
|
654
|
+
e.format !== "hidden" ? (m(), R(ze(e.idTooltip ? "KTooltip" : "div"), ht({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
655
|
+
default: v(() => [
|
|
656
|
+
U("div", {
|
|
657
|
+
class: Ne([
|
|
658
658
|
"uuid-container",
|
|
659
659
|
e.truncated ? "truncated-uuid" : null,
|
|
660
660
|
e.useMono ? "mono" : null
|
|
661
661
|
])
|
|
662
|
-
},
|
|
662
|
+
}, K(c.value), 3)
|
|
663
663
|
]),
|
|
664
664
|
_: 1
|
|
665
|
-
}, 16)) :
|
|
666
|
-
(m(),
|
|
667
|
-
default:
|
|
668
|
-
|
|
669
|
-
default:
|
|
670
|
-
|
|
665
|
+
}, 16)) : z("", !0),
|
|
666
|
+
(m(), R(ze(e.tooltip ? "KTooltip" : "div"), ht(l.value, { class: "uuid-icon-wrapper" }), {
|
|
667
|
+
default: v(() => [
|
|
668
|
+
N(k, null, {
|
|
669
|
+
default: v(({ copyToClipboard: p }) => [
|
|
670
|
+
U("span", {
|
|
671
671
|
"data-testid": "copy-to-clipboard",
|
|
672
672
|
role: "button",
|
|
673
673
|
tabindex: "0",
|
|
674
|
-
onClick: rt((
|
|
674
|
+
onClick: rt((A) => u(p), ["stop"])
|
|
675
675
|
}, [
|
|
676
|
-
|
|
676
|
+
N(I, {
|
|
677
677
|
class: "uuid-icon",
|
|
678
678
|
color: e.iconColor,
|
|
679
679
|
"hide-title": !!e.tooltip || void 0,
|
|
@@ -699,7 +699,7 @@ const ue = {
|
|
|
699
699
|
}, yn = /* @__PURE__ */ eo(Xr, [["__scopeId", "data-v-bfdaf6f7"]]), to = {
|
|
700
700
|
key: 0,
|
|
701
701
|
class: "config-card-fieldset-title"
|
|
702
|
-
}, no = /* @__PURE__ */
|
|
702
|
+
}, no = /* @__PURE__ */ ie({
|
|
703
703
|
__name: "JsonCardItem",
|
|
704
704
|
props: {
|
|
705
705
|
item: {
|
|
@@ -716,21 +716,21 @@ const ue = {
|
|
|
716
716
|
}
|
|
717
717
|
},
|
|
718
718
|
setup(e) {
|
|
719
|
-
const n = e, { i18n: { t } } =
|
|
719
|
+
const n = e, { i18n: { t } } = ce.useI18n(), { convertKeyToTitle: r } = ce.useStringHelpers(), o = T(() => n.item.key ?? "json-array-item"), a = T(() => n.item.value ?? n.item), i = T(() => {
|
|
720
720
|
const l = JSON.parse(JSON.stringify(a.value));
|
|
721
721
|
return n.isArrayItem && delete l.name, l;
|
|
722
|
-
}), s =
|
|
722
|
+
}), s = T(() => {
|
|
723
723
|
var l;
|
|
724
724
|
return n.isArrayItem ? (l = a.value) != null && l.name ? r(a.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
725
725
|
});
|
|
726
|
-
return (l, c) => (m(),
|
|
727
|
-
class:
|
|
726
|
+
return (l, c) => (m(), R(ze(e.isArrayItem ? "fieldset" : "div"), {
|
|
727
|
+
class: Ne(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
728
728
|
}, {
|
|
729
|
-
default:
|
|
729
|
+
default: v(() => [
|
|
730
730
|
e.isArrayItem ? (m(), j("legend", to, [
|
|
731
|
-
|
|
732
|
-
])) :
|
|
733
|
-
(m(!0), j(
|
|
731
|
+
U("b", null, K(s.value), 1)
|
|
732
|
+
])) : z("", !0),
|
|
733
|
+
(m(!0), j(be, null, he(Object.keys(i.value), (d, u) => (m(), R(St, {
|
|
734
734
|
key: `${o.value}-property-${u}`,
|
|
735
735
|
item: {
|
|
736
736
|
key: d,
|
|
@@ -742,12 +742,12 @@ const ue = {
|
|
|
742
742
|
_: 1
|
|
743
743
|
}, 8, ["class"]));
|
|
744
744
|
}
|
|
745
|
-
}),
|
|
745
|
+
}), Ce = (e, n) => {
|
|
746
746
|
const t = e.__vccOpts || e;
|
|
747
747
|
for (const [r, o] of n)
|
|
748
748
|
t[r] = o;
|
|
749
749
|
return t;
|
|
750
|
-
}, hn = /* @__PURE__ */
|
|
750
|
+
}, hn = /* @__PURE__ */ Ce(no, [["__scopeId", "data-v-68ca83ec"]]), ro = /* @__PURE__ */ ie({
|
|
751
751
|
__name: "InternalLinkItem",
|
|
752
752
|
props: {
|
|
753
753
|
item: {
|
|
@@ -757,24 +757,24 @@ const ue = {
|
|
|
757
757
|
},
|
|
758
758
|
emits: ["navigation-click"],
|
|
759
759
|
setup(e) {
|
|
760
|
-
const { i18n: { t: n } } =
|
|
760
|
+
const { i18n: { t: n } } = ce.useI18n();
|
|
761
761
|
return (t, r) => {
|
|
762
|
-
const o =
|
|
762
|
+
const o = P("KButton");
|
|
763
763
|
return m(), j("div", null, [
|
|
764
|
-
|
|
764
|
+
N(o, {
|
|
765
765
|
appearance: "btn-link",
|
|
766
766
|
class: "navigation-button",
|
|
767
767
|
onClick: r[0] || (r[0] = (a) => t.$emit("navigation-click", e.item))
|
|
768
768
|
}, {
|
|
769
|
-
default:
|
|
770
|
-
|
|
769
|
+
default: v(() => [
|
|
770
|
+
Q(K(e.item.value || y(n)("baseConfigCard.commonFields.link")), 1)
|
|
771
771
|
]),
|
|
772
772
|
_: 1
|
|
773
773
|
})
|
|
774
774
|
]);
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
|
-
}), oo = /* @__PURE__ */
|
|
777
|
+
}), oo = /* @__PURE__ */ Ce(ro, [["__scopeId", "data-v-7410504d"]]), ao = /* @__PURE__ */ ie({
|
|
778
778
|
__name: "StatusBadge",
|
|
779
779
|
props: {
|
|
780
780
|
status: {
|
|
@@ -783,23 +783,23 @@ const ue = {
|
|
|
783
783
|
}
|
|
784
784
|
},
|
|
785
785
|
setup(e) {
|
|
786
|
-
const { i18n: { t: n } } =
|
|
786
|
+
const { i18n: { t: n } } = ce.useI18n();
|
|
787
787
|
return (t, r) => {
|
|
788
|
-
const o =
|
|
789
|
-
return m(),
|
|
788
|
+
const o = P("KBadge");
|
|
789
|
+
return m(), R(o, {
|
|
790
790
|
appearance: e.status ? "success" : "neutral"
|
|
791
791
|
}, {
|
|
792
|
-
default:
|
|
793
|
-
|
|
792
|
+
default: v(() => [
|
|
793
|
+
Q(K(e.status ? y(n)("baseConfigCard.statusBadge.enabledLabel") : y(n)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
794
794
|
]),
|
|
795
795
|
_: 1
|
|
796
796
|
}, 8, ["appearance"]);
|
|
797
797
|
};
|
|
798
798
|
}
|
|
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"],
|
|
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"], ko = ["data-testid"], Co = ["data-testid"], _o = {
|
|
800
800
|
name: "ConfigCardItem",
|
|
801
801
|
components: { CopyUuid: yn, JsonCardItem: hn, StatusBadge: ao, InternalLinkItem: oo }
|
|
802
|
-
}, wo = /* @__PURE__ */
|
|
802
|
+
}, wo = /* @__PURE__ */ ie({
|
|
803
803
|
..._o,
|
|
804
804
|
props: {
|
|
805
805
|
item: {
|
|
@@ -826,9 +826,9 @@ const ue = {
|
|
|
826
826
|
"4d3dc7e7": l.value && i.value ? "100%" : t.slim ? "50%" : "25%",
|
|
827
827
|
"4d400dc2": l.value && i.value ? "100%" : t.slim ? "50%" : "75%"
|
|
828
828
|
}));
|
|
829
|
-
const r = ut(), { i18n: { t: o, formatUnixTimeStamp: a } } =
|
|
829
|
+
const r = ut(), { i18n: { t: o, formatUnixTimeStamp: a } } = ce.useI18n(), i = T(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = T(() => !!(t.item.tooltip || r["label-tooltip"])), l = T(() => t.item.type === ne.Json || t.item.type === ne.JsonArray), c = T(() => t.item.type === ne.JsonArray), d = T(() => {
|
|
830
830
|
switch (t.item.type) {
|
|
831
|
-
case
|
|
831
|
+
case ne.ID:
|
|
832
832
|
return {
|
|
833
833
|
tag: "CopyUuid",
|
|
834
834
|
attrs: {
|
|
@@ -841,7 +841,7 @@ const ue = {
|
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
843
|
};
|
|
844
|
-
case
|
|
844
|
+
case ne.IdArray:
|
|
845
845
|
return {
|
|
846
846
|
tag: "div",
|
|
847
847
|
additionalComponent: "CopyUuid",
|
|
@@ -853,7 +853,7 @@ const ue = {
|
|
|
853
853
|
}
|
|
854
854
|
}
|
|
855
855
|
};
|
|
856
|
-
case
|
|
856
|
+
case ne.Redacted:
|
|
857
857
|
return {
|
|
858
858
|
tag: "CopyUuid",
|
|
859
859
|
attrs: {
|
|
@@ -867,7 +867,7 @@ const ue = {
|
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
869
|
};
|
|
870
|
-
case
|
|
870
|
+
case ne.RedactedArray:
|
|
871
871
|
return {
|
|
872
872
|
tag: "div",
|
|
873
873
|
additionalComponent: "CopyUuid",
|
|
@@ -880,7 +880,7 @@ const ue = {
|
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
882
|
};
|
|
883
|
-
case
|
|
883
|
+
case ne.Date:
|
|
884
884
|
return {
|
|
885
885
|
tag: "div",
|
|
886
886
|
attrs: {
|
|
@@ -888,7 +888,7 @@ const ue = {
|
|
|
888
888
|
},
|
|
889
889
|
text: a(t.item.value)
|
|
890
890
|
};
|
|
891
|
-
case
|
|
891
|
+
case ne.BadgeStatus:
|
|
892
892
|
return {
|
|
893
893
|
tag: "StatusBadge",
|
|
894
894
|
attrs: {
|
|
@@ -896,17 +896,17 @@ const ue = {
|
|
|
896
896
|
status: t.item.value
|
|
897
897
|
}
|
|
898
898
|
};
|
|
899
|
-
case
|
|
899
|
+
case ne.BadgeTag:
|
|
900
900
|
return {
|
|
901
901
|
tag: "div",
|
|
902
902
|
additionalComponent: "KBadge"
|
|
903
903
|
};
|
|
904
|
-
case
|
|
904
|
+
case ne.BadgeMethod:
|
|
905
905
|
return {
|
|
906
906
|
tag: "div",
|
|
907
907
|
additionalComponent: "KMethodBadge"
|
|
908
908
|
};
|
|
909
|
-
case
|
|
909
|
+
case ne.LinkInternal:
|
|
910
910
|
return {
|
|
911
911
|
tag: "InternalLinkItem",
|
|
912
912
|
attrs: {
|
|
@@ -917,7 +917,7 @@ const ue = {
|
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
919
|
};
|
|
920
|
-
case
|
|
920
|
+
case ne.LinkExternal:
|
|
921
921
|
return {
|
|
922
922
|
tag: "KExternalLink",
|
|
923
923
|
attrs: {
|
|
@@ -926,7 +926,7 @@ const ue = {
|
|
|
926
926
|
},
|
|
927
927
|
text: t.item.value
|
|
928
928
|
};
|
|
929
|
-
case
|
|
929
|
+
case ne.Json:
|
|
930
930
|
return {
|
|
931
931
|
tag: "JsonCardItem",
|
|
932
932
|
attrs: {
|
|
@@ -934,7 +934,7 @@ const ue = {
|
|
|
934
934
|
item: t.item
|
|
935
935
|
}
|
|
936
936
|
};
|
|
937
|
-
case
|
|
937
|
+
case ne.JsonArray:
|
|
938
938
|
return {
|
|
939
939
|
tag: "div",
|
|
940
940
|
additionalComponent: "JsonCardItem",
|
|
@@ -952,29 +952,29 @@ const ue = {
|
|
|
952
952
|
text: t.item.value
|
|
953
953
|
};
|
|
954
954
|
}
|
|
955
|
-
}), u =
|
|
956
|
-
return (f,
|
|
957
|
-
const
|
|
955
|
+
}), u = E(), { isTruncated: g } = ce.useTruncationDetector(u);
|
|
956
|
+
return (f, I) => {
|
|
957
|
+
const k = P("KLabel"), p = P("KBadge"), A = P("KMethodBadge"), C = P("KTooltip");
|
|
958
958
|
return m(), j("div", po, [
|
|
959
|
-
|
|
959
|
+
U("div", {
|
|
960
960
|
class: "config-card-details-label",
|
|
961
961
|
"data-testid": `${e.item.key}-label`
|
|
962
962
|
}, [
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
default:
|
|
966
|
-
|
|
963
|
+
Z(f.$slots, "label", { item: e.item }, () => [
|
|
964
|
+
N(k, { "tooltip-attributes": { maxWidth: "500px" } }, Te({
|
|
965
|
+
default: v(() => [
|
|
966
|
+
Q(K(e.item.label) + " ", 1)
|
|
967
967
|
]),
|
|
968
968
|
_: 2
|
|
969
969
|
}, [
|
|
970
970
|
s.value ? {
|
|
971
971
|
name: "tooltip",
|
|
972
|
-
fn:
|
|
973
|
-
|
|
972
|
+
fn: v(() => [
|
|
973
|
+
U("div", {
|
|
974
974
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
975
975
|
}, [
|
|
976
|
-
|
|
977
|
-
|
|
976
|
+
Z(f.$slots, "label-tooltip", {}, () => [
|
|
977
|
+
Q(K(e.item.tooltip), 1)
|
|
978
978
|
], !0)
|
|
979
979
|
], 8, mo)
|
|
980
980
|
]),
|
|
@@ -983,81 +983,81 @@ const ue = {
|
|
|
983
983
|
]), 1024)
|
|
984
984
|
], !0)
|
|
985
985
|
], 8, fo),
|
|
986
|
-
|
|
986
|
+
U("div", {
|
|
987
987
|
class: "config-card-details-value",
|
|
988
988
|
"data-testid": `${e.item.key}-property-value`
|
|
989
989
|
}, [
|
|
990
|
-
|
|
990
|
+
Z(f.$slots, e.item.key, {
|
|
991
991
|
rowValue: e.item.value
|
|
992
992
|
}, () => [
|
|
993
993
|
i.value ? (m(), j("div", ho, [
|
|
994
|
-
(m(),
|
|
995
|
-
default:
|
|
994
|
+
(m(), R(ze(d.value.tag), cr(dr(d.value.attrs)), {
|
|
995
|
+
default: v(() => [
|
|
996
996
|
d.value.additionalComponent === "KBadge" ? (m(), j("div", {
|
|
997
997
|
key: 0,
|
|
998
998
|
"data-testid": `${e.item.key}-badge-tags`
|
|
999
999
|
}, [
|
|
1000
|
-
(m(!0), j(
|
|
1001
|
-
key: `${e.item.key}-badge-tag-${
|
|
1000
|
+
(m(!0), j(be, null, he(e.item.value, (O, h) => (m(), R(p, {
|
|
1001
|
+
key: `${e.item.key}-badge-tag-${h}`,
|
|
1002
1002
|
class: "config-badge",
|
|
1003
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1004
|
-
"truncation-tooltip":
|
|
1003
|
+
"data-testid": `${e.item.key}-badge-tag-${h}`,
|
|
1004
|
+
"truncation-tooltip": O
|
|
1005
1005
|
}, {
|
|
1006
|
-
default:
|
|
1007
|
-
|
|
1006
|
+
default: v(() => [
|
|
1007
|
+
Q(K(O), 1)
|
|
1008
1008
|
]),
|
|
1009
1009
|
_: 2
|
|
1010
1010
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
1011
|
-
], 8, vo)) :
|
|
1011
|
+
], 8, vo)) : z("", !0),
|
|
1012
1012
|
d.value.additionalComponent === "CopyUuid" ? (m(), j("div", {
|
|
1013
1013
|
key: 1,
|
|
1014
1014
|
class: "copy-uuid-array",
|
|
1015
1015
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1016
1016
|
}, [
|
|
1017
|
-
(m(!0), j(
|
|
1018
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1019
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1020
|
-
uuid:
|
|
1017
|
+
(m(!0), j(be, null, he(e.item.value, (O, h) => (m(), R(y(yn), ht(d.value.childAttrs, {
|
|
1018
|
+
key: `${e.item.key}-copy-uuid-${h}`,
|
|
1019
|
+
"data-testid": `${e.item.key}-copy-uuid-${h}`,
|
|
1020
|
+
uuid: O
|
|
1021
1021
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1022
1022
|
], 8, bo)) : d.value.additionalComponent === "KMethodBadge" ? (m(), j("div", {
|
|
1023
1023
|
key: 2,
|
|
1024
1024
|
class: "method-badge-array",
|
|
1025
1025
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1026
1026
|
}, [
|
|
1027
|
-
(m(!0), j(
|
|
1028
|
-
key: `${e.item.key}-badge-method-${
|
|
1027
|
+
(m(!0), j(be, null, he(e.item.value, (O, h) => (m(), R(A, {
|
|
1028
|
+
key: `${e.item.key}-badge-method-${h}`,
|
|
1029
1029
|
class: "config-badge",
|
|
1030
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1030
|
+
"data-testid": `${e.item.key}-badge-method-${h}`,
|
|
1031
1031
|
"is-rounded": "",
|
|
1032
|
-
label:
|
|
1033
|
-
method: y(br).includes(
|
|
1032
|
+
label: O,
|
|
1033
|
+
method: y(br).includes(O.toLowerCase()) ? O.toLowerCase() : "custom"
|
|
1034
1034
|
}, {
|
|
1035
|
-
default:
|
|
1036
|
-
|
|
1035
|
+
default: v(() => [
|
|
1036
|
+
Q(K(O), 1)
|
|
1037
1037
|
]),
|
|
1038
1038
|
_: 2
|
|
1039
1039
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
1040
|
-
], 8,
|
|
1040
|
+
], 8, ko)) : z("", !0),
|
|
1041
1041
|
d.value.additionalComponent === "JsonCardItem" ? (m(), j("div", {
|
|
1042
1042
|
key: 3,
|
|
1043
1043
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1044
1044
|
}, [
|
|
1045
|
-
(m(!0), j(
|
|
1046
|
-
key: `json-array-item-${
|
|
1047
|
-
index:
|
|
1045
|
+
(m(!0), j(be, null, he(e.item.value, (O, h) => (m(), R(hn, {
|
|
1046
|
+
key: `json-array-item-${h}`,
|
|
1047
|
+
index: h,
|
|
1048
1048
|
"is-array-item": "",
|
|
1049
|
-
item:
|
|
1049
|
+
item: O
|
|
1050
1050
|
}, null, 8, ["index", "item"]))), 128))
|
|
1051
|
-
], 8,
|
|
1051
|
+
], 8, Co)) : (m(), R(C, {
|
|
1052
1052
|
key: 4,
|
|
1053
1053
|
label: y(g) ? e.item.value : ""
|
|
1054
1054
|
}, {
|
|
1055
|
-
default:
|
|
1056
|
-
|
|
1055
|
+
default: v(() => [
|
|
1056
|
+
U("span", {
|
|
1057
1057
|
ref_key: "textContent",
|
|
1058
1058
|
ref: u,
|
|
1059
|
-
class:
|
|
1060
|
-
},
|
|
1059
|
+
class: Ne(["attrs-data-text", { truncated: e.truncated }])
|
|
1060
|
+
}, K(d.value.text), 3)
|
|
1061
1061
|
]),
|
|
1062
1062
|
_: 1
|
|
1063
1063
|
}, 8, ["label"]))
|
|
@@ -1073,7 +1073,7 @@ const ue = {
|
|
|
1073
1073
|
]);
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
|
-
}),
|
|
1076
|
+
}), St = /* @__PURE__ */ Ce(wo, [["__scopeId", "data-v-307ab96d"]]);
|
|
1077
1077
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1078
1078
|
function vn(e) {
|
|
1079
1079
|
return typeof e > "u" || e === null;
|
|
@@ -1084,14 +1084,14 @@ function Io(e) {
|
|
|
1084
1084
|
function Ao(e) {
|
|
1085
1085
|
return Array.isArray(e) ? e : vn(e) ? [] : [e];
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1087
|
+
function xo(e, n) {
|
|
1088
1088
|
var t, r, o, a;
|
|
1089
1089
|
if (n)
|
|
1090
1090
|
for (a = Object.keys(n), t = 0, r = a.length; t < r; t += 1)
|
|
1091
1091
|
o = a[t], e[o] = n[o];
|
|
1092
1092
|
return e;
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1094
|
+
function So(e, n) {
|
|
1095
1095
|
var t = "", r;
|
|
1096
1096
|
for (r = 0; r < n; r += 1)
|
|
1097
1097
|
t += e;
|
|
@@ -1100,13 +1100,13 @@ function xo(e, n) {
|
|
|
1100
1100
|
function To(e) {
|
|
1101
1101
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1102
1102
|
}
|
|
1103
|
-
var $o = vn, Mo = Io, jo = Ao, Eo =
|
|
1103
|
+
var $o = vn, Mo = Io, jo = Ao, Eo = So, Oo = To, Ko = xo, ue = {
|
|
1104
1104
|
isNothing: $o,
|
|
1105
1105
|
isObject: Mo,
|
|
1106
1106
|
toArray: jo,
|
|
1107
1107
|
repeat: Eo,
|
|
1108
1108
|
isNegativeZero: Oo,
|
|
1109
|
-
extend:
|
|
1109
|
+
extend: Ko
|
|
1110
1110
|
};
|
|
1111
1111
|
function bn(e, n) {
|
|
1112
1112
|
var t = "", r = e.reason || "(unknown reason)";
|
|
@@ -1132,9 +1132,9 @@ function mt(e, n, t, r, o) {
|
|
|
1132
1132
|
};
|
|
1133
1133
|
}
|
|
1134
1134
|
function gt(e, n) {
|
|
1135
|
-
return
|
|
1135
|
+
return ue.repeat(" ", n - e.length) + e;
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1137
|
+
function No(e, n) {
|
|
1138
1138
|
if (n = Object.create(n || null), !e.buffer)
|
|
1139
1139
|
return null;
|
|
1140
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);
|
|
@@ -1149,10 +1149,10 @@ function Ko(e, n) {
|
|
|
1149
1149
|
o[i - l],
|
|
1150
1150
|
e.position - (r[i] - r[i - l]),
|
|
1151
1151
|
u
|
|
1152
|
-
), s =
|
|
1152
|
+
), s = ue.repeat(" ", n.indent) + gt((e.line - l + 1).toString(), d) + " | " + c.str + `
|
|
1153
1153
|
` + s;
|
|
1154
|
-
for (c = mt(e.buffer, r[i], o[i], e.position, u), s +=
|
|
1155
|
-
`, s +=
|
|
1154
|
+
for (c = mt(e.buffer, r[i], o[i], e.position, u), s += ue.repeat(" ", n.indent) + gt((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1155
|
+
`, s += ue.repeat("-", n.indent + d + 3 + c.pos) + `^
|
|
1156
1156
|
`, l = 1; l <= n.linesAfter && !(i + l >= o.length); l++)
|
|
1157
1157
|
c = mt(
|
|
1158
1158
|
e.buffer,
|
|
@@ -1160,11 +1160,11 @@ function Ko(e, n) {
|
|
|
1160
1160
|
o[i + l],
|
|
1161
1161
|
e.position - (r[i] - r[i + l]),
|
|
1162
1162
|
u
|
|
1163
|
-
), s +=
|
|
1163
|
+
), s += ue.repeat(" ", n.indent) + gt((e.line + l + 1).toString(), d) + " | " + c.str + `
|
|
1164
1164
|
`;
|
|
1165
1165
|
return s.replace(/\n$/, "");
|
|
1166
1166
|
}
|
|
1167
|
-
var
|
|
1167
|
+
var Fo = No, Bo = [
|
|
1168
1168
|
"kind",
|
|
1169
1169
|
"multi",
|
|
1170
1170
|
"resolve",
|
|
@@ -1180,7 +1180,7 @@ var No = Ko, Bo = [
|
|
|
1180
1180
|
"sequence",
|
|
1181
1181
|
"mapping"
|
|
1182
1182
|
];
|
|
1183
|
-
function
|
|
1183
|
+
function qo(e) {
|
|
1184
1184
|
var n = {};
|
|
1185
1185
|
return e !== null && Object.keys(e).forEach(function(t) {
|
|
1186
1186
|
e[t].forEach(function(r) {
|
|
@@ -1188,7 +1188,7 @@ function Lo(e) {
|
|
|
1188
1188
|
});
|
|
1189
1189
|
}), n;
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function Lo(e, n) {
|
|
1192
1192
|
if (n = n || {}, Object.keys(n).forEach(function(t) {
|
|
1193
1193
|
if (Bo.indexOf(t) === -1)
|
|
1194
1194
|
throw new me('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
@@ -1196,10 +1196,10 @@ function Uo(e, n) {
|
|
|
1196
1196
|
return !0;
|
|
1197
1197
|
}, this.construct = n.construct || function(t) {
|
|
1198
1198
|
return t;
|
|
1199
|
-
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases =
|
|
1199
|
+
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = qo(n.styleAliases || null), Po.indexOf(this.kind) === -1)
|
|
1200
1200
|
throw new me('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1201
1201
|
}
|
|
1202
|
-
var
|
|
1202
|
+
var pe = Lo;
|
|
1203
1203
|
function Ht(e, n) {
|
|
1204
1204
|
var t = [];
|
|
1205
1205
|
return e[n].forEach(function(r) {
|
|
@@ -1209,7 +1209,7 @@ function Ht(e, n) {
|
|
|
1209
1209
|
}), t[o] = r;
|
|
1210
1210
|
}), t;
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1212
|
+
function Uo() {
|
|
1213
1213
|
var e = {
|
|
1214
1214
|
scalar: {},
|
|
1215
1215
|
sequence: {},
|
|
@@ -1234,7 +1234,7 @@ function vt(e) {
|
|
|
1234
1234
|
}
|
|
1235
1235
|
vt.prototype.extend = function(e) {
|
|
1236
1236
|
var n = [], t = [];
|
|
1237
|
-
if (e instanceof
|
|
1237
|
+
if (e instanceof pe)
|
|
1238
1238
|
t.push(e);
|
|
1239
1239
|
else if (Array.isArray(e))
|
|
1240
1240
|
t = t.concat(e);
|
|
@@ -1243,57 +1243,57 @@ vt.prototype.extend = function(e) {
|
|
|
1243
1243
|
else
|
|
1244
1244
|
throw new me("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1245
1245
|
n.forEach(function(o) {
|
|
1246
|
-
if (!(o instanceof
|
|
1246
|
+
if (!(o instanceof pe))
|
|
1247
1247
|
throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1248
1248
|
if (o.loadKind && o.loadKind !== "scalar")
|
|
1249
1249
|
throw new me("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1250
1250
|
if (o.multi)
|
|
1251
1251
|
throw new me("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1252
1252
|
}), t.forEach(function(o) {
|
|
1253
|
-
if (!(o instanceof
|
|
1253
|
+
if (!(o instanceof pe))
|
|
1254
1254
|
throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1255
1255
|
});
|
|
1256
1256
|
var r = Object.create(vt.prototype);
|
|
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 =
|
|
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 = Uo(r.compiledImplicit, r.compiledExplicit), r;
|
|
1258
1258
|
};
|
|
1259
|
-
var
|
|
1259
|
+
var kn = vt, Cn = new pe("tag:yaml.org,2002:str", {
|
|
1260
1260
|
kind: "scalar",
|
|
1261
1261
|
construct: function(e) {
|
|
1262
1262
|
return e !== null ? e : "";
|
|
1263
1263
|
}
|
|
1264
|
-
}), _n = new
|
|
1264
|
+
}), _n = new pe("tag:yaml.org,2002:seq", {
|
|
1265
1265
|
kind: "sequence",
|
|
1266
1266
|
construct: function(e) {
|
|
1267
1267
|
return e !== null ? e : [];
|
|
1268
1268
|
}
|
|
1269
|
-
}), wn = new
|
|
1269
|
+
}), wn = new pe("tag:yaml.org,2002:map", {
|
|
1270
1270
|
kind: "mapping",
|
|
1271
1271
|
construct: function(e) {
|
|
1272
1272
|
return e !== null ? e : {};
|
|
1273
1273
|
}
|
|
1274
|
-
}), In = new
|
|
1274
|
+
}), In = new kn({
|
|
1275
1275
|
explicit: [
|
|
1276
|
-
|
|
1276
|
+
Cn,
|
|
1277
1277
|
_n,
|
|
1278
1278
|
wn
|
|
1279
1279
|
]
|
|
1280
1280
|
});
|
|
1281
|
-
function
|
|
1281
|
+
function Vo(e) {
|
|
1282
1282
|
if (e === null)
|
|
1283
1283
|
return !0;
|
|
1284
1284
|
var n = e.length;
|
|
1285
1285
|
return n === 1 && e === "~" || n === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1287
|
+
function Ro() {
|
|
1288
1288
|
return null;
|
|
1289
1289
|
}
|
|
1290
1290
|
function Do(e) {
|
|
1291
1291
|
return e === null;
|
|
1292
1292
|
}
|
|
1293
|
-
var An = new
|
|
1293
|
+
var An = new pe("tag:yaml.org,2002:null", {
|
|
1294
1294
|
kind: "scalar",
|
|
1295
|
-
resolve:
|
|
1296
|
-
construct:
|
|
1295
|
+
resolve: Vo,
|
|
1296
|
+
construct: Ro,
|
|
1297
1297
|
predicate: Do,
|
|
1298
1298
|
represent: {
|
|
1299
1299
|
canonical: function() {
|
|
@@ -1326,7 +1326,7 @@ function Ho(e) {
|
|
|
1326
1326
|
function zo(e) {
|
|
1327
1327
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1328
1328
|
}
|
|
1329
|
-
var
|
|
1329
|
+
var xn = new pe("tag:yaml.org,2002:bool", {
|
|
1330
1330
|
kind: "scalar",
|
|
1331
1331
|
resolve: Go,
|
|
1332
1332
|
construct: Ho,
|
|
@@ -1347,10 +1347,10 @@ var Sn = new de("tag:yaml.org,2002:bool", {
|
|
|
1347
1347
|
function Jo(e) {
|
|
1348
1348
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function Yo(e) {
|
|
1351
1351
|
return 48 <= e && e <= 55;
|
|
1352
1352
|
}
|
|
1353
|
-
function
|
|
1353
|
+
function Wo(e) {
|
|
1354
1354
|
return 48 <= e && e <= 57;
|
|
1355
1355
|
}
|
|
1356
1356
|
function Zo(e) {
|
|
@@ -1383,7 +1383,7 @@ function Zo(e) {
|
|
|
1383
1383
|
if (o === "o") {
|
|
1384
1384
|
for (t++; t < n; t++)
|
|
1385
1385
|
if (o = e[t], o !== "_") {
|
|
1386
|
-
if (!
|
|
1386
|
+
if (!Yo(e.charCodeAt(t)))
|
|
1387
1387
|
return !1;
|
|
1388
1388
|
r = !0;
|
|
1389
1389
|
}
|
|
@@ -1394,7 +1394,7 @@ function Zo(e) {
|
|
|
1394
1394
|
return !1;
|
|
1395
1395
|
for (; t < n; t++)
|
|
1396
1396
|
if (o = e[t], o !== "_") {
|
|
1397
|
-
if (!
|
|
1397
|
+
if (!Wo(e.charCodeAt(t)))
|
|
1398
1398
|
return !1;
|
|
1399
1399
|
r = !0;
|
|
1400
1400
|
}
|
|
@@ -1415,9 +1415,9 @@ function Qo(e) {
|
|
|
1415
1415
|
return t * parseInt(n, 10);
|
|
1416
1416
|
}
|
|
1417
1417
|
function Xo(e) {
|
|
1418
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !
|
|
1418
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ue.isNegativeZero(e);
|
|
1419
1419
|
}
|
|
1420
|
-
var
|
|
1420
|
+
var Sn = new pe("tag:yaml.org,2002:int", {
|
|
1421
1421
|
kind: "scalar",
|
|
1422
1422
|
resolve: Zo,
|
|
1423
1423
|
construct: Qo,
|
|
@@ -1487,14 +1487,14 @@ function oa(e, n) {
|
|
|
1487
1487
|
case "camelcase":
|
|
1488
1488
|
return "-.Inf";
|
|
1489
1489
|
}
|
|
1490
|
-
else if (
|
|
1490
|
+
else if (ue.isNegativeZero(e))
|
|
1491
1491
|
return "-0.0";
|
|
1492
1492
|
return t = e.toString(10), ra.test(t) ? t.replace("e", ".e") : t;
|
|
1493
1493
|
}
|
|
1494
1494
|
function aa(e) {
|
|
1495
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 ||
|
|
1495
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ue.isNegativeZero(e));
|
|
1496
1496
|
}
|
|
1497
|
-
var Tn = new
|
|
1497
|
+
var Tn = new pe("tag:yaml.org,2002:float", {
|
|
1498
1498
|
kind: "scalar",
|
|
1499
1499
|
resolve: ta,
|
|
1500
1500
|
construct: na,
|
|
@@ -1504,8 +1504,8 @@ var Tn = new de("tag:yaml.org,2002:float", {
|
|
|
1504
1504
|
}), $n = In.extend({
|
|
1505
1505
|
implicit: [
|
|
1506
1506
|
An,
|
|
1507
|
-
Sn,
|
|
1508
1507
|
xn,
|
|
1508
|
+
Sn,
|
|
1509
1509
|
Tn
|
|
1510
1510
|
]
|
|
1511
1511
|
}), Mn = $n, jn = new RegExp(
|
|
@@ -1532,7 +1532,7 @@ function sa(e) {
|
|
|
1532
1532
|
function la(e) {
|
|
1533
1533
|
return e.toISOString();
|
|
1534
1534
|
}
|
|
1535
|
-
var On = new
|
|
1535
|
+
var On = new pe("tag:yaml.org,2002:timestamp", {
|
|
1536
1536
|
kind: "scalar",
|
|
1537
1537
|
resolve: ia,
|
|
1538
1538
|
construct: sa,
|
|
@@ -1542,7 +1542,7 @@ var On = new de("tag:yaml.org,2002:timestamp", {
|
|
|
1542
1542
|
function ua(e) {
|
|
1543
1543
|
return e === "<<" || e === null;
|
|
1544
1544
|
}
|
|
1545
|
-
var
|
|
1545
|
+
var Kn = new pe("tag:yaml.org,2002:merge", {
|
|
1546
1546
|
kind: "scalar",
|
|
1547
1547
|
resolve: ua
|
|
1548
1548
|
}), Tt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
@@ -1574,7 +1574,7 @@ function pa(e) {
|
|
|
1574
1574
|
function fa(e) {
|
|
1575
1575
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1576
1576
|
}
|
|
1577
|
-
var
|
|
1577
|
+
var Nn = new pe("tag:yaml.org,2002:binary", {
|
|
1578
1578
|
kind: "scalar",
|
|
1579
1579
|
resolve: ca,
|
|
1580
1580
|
construct: da,
|
|
@@ -1606,7 +1606,7 @@ function ya(e) {
|
|
|
1606
1606
|
function ha(e) {
|
|
1607
1607
|
return e !== null ? e : [];
|
|
1608
1608
|
}
|
|
1609
|
-
var
|
|
1609
|
+
var Fn = new pe("tag:yaml.org,2002:omap", {
|
|
1610
1610
|
kind: "sequence",
|
|
1611
1611
|
resolve: ya,
|
|
1612
1612
|
construct: ha
|
|
@@ -1622,7 +1622,7 @@ function ba(e) {
|
|
|
1622
1622
|
}
|
|
1623
1623
|
return !0;
|
|
1624
1624
|
}
|
|
1625
|
-
function
|
|
1625
|
+
function ka(e) {
|
|
1626
1626
|
if (e === null)
|
|
1627
1627
|
return [];
|
|
1628
1628
|
var n, t, r, o, a, i = e;
|
|
@@ -1630,52 +1630,52 @@ function Ca(e) {
|
|
|
1630
1630
|
r = i[n], o = Object.keys(r), a[n] = [o[0], r[o[0]]];
|
|
1631
1631
|
return a;
|
|
1632
1632
|
}
|
|
1633
|
-
var Bn = new
|
|
1633
|
+
var Bn = new pe("tag:yaml.org,2002:pairs", {
|
|
1634
1634
|
kind: "sequence",
|
|
1635
1635
|
resolve: ba,
|
|
1636
|
-
construct:
|
|
1637
|
-
}),
|
|
1636
|
+
construct: ka
|
|
1637
|
+
}), Ca = Object.prototype.hasOwnProperty;
|
|
1638
1638
|
function _a(e) {
|
|
1639
1639
|
if (e === null)
|
|
1640
1640
|
return !0;
|
|
1641
1641
|
var n, t = e;
|
|
1642
1642
|
for (n in t)
|
|
1643
|
-
if (
|
|
1643
|
+
if (Ca.call(t, n) && t[n] !== null)
|
|
1644
1644
|
return !1;
|
|
1645
1645
|
return !0;
|
|
1646
1646
|
}
|
|
1647
1647
|
function wa(e) {
|
|
1648
1648
|
return e !== null ? e : {};
|
|
1649
1649
|
}
|
|
1650
|
-
var Pn = new
|
|
1650
|
+
var Pn = new pe("tag:yaml.org,2002:set", {
|
|
1651
1651
|
kind: "mapping",
|
|
1652
1652
|
resolve: _a,
|
|
1653
1653
|
construct: wa
|
|
1654
1654
|
}), $t = Mn.extend({
|
|
1655
1655
|
implicit: [
|
|
1656
1656
|
On,
|
|
1657
|
-
|
|
1657
|
+
Kn
|
|
1658
1658
|
],
|
|
1659
1659
|
explicit: [
|
|
1660
|
-
Kn,
|
|
1661
1660
|
Nn,
|
|
1661
|
+
Fn,
|
|
1662
1662
|
Bn,
|
|
1663
1663
|
Pn
|
|
1664
1664
|
]
|
|
1665
|
-
}), je = Object.prototype.hasOwnProperty, ot = 1,
|
|
1665
|
+
}), je = Object.prototype.hasOwnProperty, ot = 1, qn = 2, Ln = 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]/, xa = /[\x85\u2028\u2029]/, Sa = /[,\[\]\{\}]/, Un = /^(?:!|!!|![a-z\-]+!)$/i, Vn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1666
1666
|
function Jt(e) {
|
|
1667
1667
|
return Object.prototype.toString.call(e);
|
|
1668
1668
|
}
|
|
1669
1669
|
function we(e) {
|
|
1670
1670
|
return e === 10 || e === 13;
|
|
1671
1671
|
}
|
|
1672
|
-
function
|
|
1672
|
+
function Ke(e) {
|
|
1673
1673
|
return e === 9 || e === 32;
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1675
|
+
function ve(e) {
|
|
1676
1676
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1677
1677
|
}
|
|
1678
|
-
function
|
|
1678
|
+
function Le(e) {
|
|
1679
1679
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1680
1680
|
}
|
|
1681
1681
|
function Ta(e) {
|
|
@@ -1688,7 +1688,7 @@ function $a(e) {
|
|
|
1688
1688
|
function Ma(e) {
|
|
1689
1689
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1690
1690
|
}
|
|
1691
|
-
function
|
|
1691
|
+
function Yt(e) {
|
|
1692
1692
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1693
1693
|
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1694
1694
|
}
|
|
@@ -1698,9 +1698,9 @@ function ja(e) {
|
|
|
1698
1698
|
(e - 65536 & 1023) + 56320
|
|
1699
1699
|
);
|
|
1700
1700
|
}
|
|
1701
|
-
var
|
|
1701
|
+
var Rn = new Array(256), Dn = new Array(256);
|
|
1702
1702
|
for (var Pe = 0; Pe < 256; Pe++)
|
|
1703
|
-
|
|
1703
|
+
Rn[Pe] = Yt(Pe) ? 1 : 0, Dn[Pe] = Yt(Pe);
|
|
1704
1704
|
function Ea(e, n) {
|
|
1705
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 = [];
|
|
1706
1706
|
}
|
|
@@ -1713,7 +1713,7 @@ function Gn(e, n) {
|
|
|
1713
1713
|
line: e.line,
|
|
1714
1714
|
column: e.position - e.lineStart
|
|
1715
1715
|
};
|
|
1716
|
-
return t.snippet =
|
|
1716
|
+
return t.snippet = Fo(t), new me(n, t);
|
|
1717
1717
|
}
|
|
1718
1718
|
function $(e, n) {
|
|
1719
1719
|
throw Gn(e, n);
|
|
@@ -1721,14 +1721,14 @@ function $(e, n) {
|
|
|
1721
1721
|
function it(e, n) {
|
|
1722
1722
|
e.onWarning && e.onWarning.call(null, Gn(e, n));
|
|
1723
1723
|
}
|
|
1724
|
-
var
|
|
1724
|
+
var Wt = {
|
|
1725
1725
|
YAML: function(e, n, t) {
|
|
1726
1726
|
var r, o, a;
|
|
1727
1727
|
e.version !== null && $(e, "duplication of %YAML directive"), t.length !== 1 && $(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), r === null && $(e, "ill-formed argument of the YAML directive"), o = parseInt(r[1], 10), a = parseInt(r[2], 10), o !== 1 && $(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && it(e, "unsupported YAML version of the document");
|
|
1728
1728
|
},
|
|
1729
1729
|
TAG: function(e, n, t) {
|
|
1730
1730
|
var r, o;
|
|
1731
|
-
t.length !== 2 && $(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1],
|
|
1731
|
+
t.length !== 2 && $(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1], Un.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'), Vn.test(o) || $(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1732
1732
|
try {
|
|
1733
1733
|
o = decodeURIComponent(o);
|
|
1734
1734
|
} catch {
|
|
@@ -1750,10 +1750,10 @@ function Me(e, n, t, r) {
|
|
|
1750
1750
|
}
|
|
1751
1751
|
function Zt(e, n, t, r) {
|
|
1752
1752
|
var o, a, i, s;
|
|
1753
|
-
for (
|
|
1753
|
+
for (ue.isObject(t) || $(e, "cannot merge mappings; the provided source object is unacceptable"), o = Object.keys(t), i = 0, s = o.length; i < s; i += 1)
|
|
1754
1754
|
a = o[i], je.call(n, a) || (n[a] = t[a], r[a] = !0);
|
|
1755
1755
|
}
|
|
1756
|
-
function
|
|
1756
|
+
function Ue(e, n, t, r, o, a, i, s, l) {
|
|
1757
1757
|
var c, d;
|
|
1758
1758
|
if (Array.isArray(o))
|
|
1759
1759
|
for (o = Array.prototype.slice.call(o), c = 0, d = o.length; c < d; c += 1)
|
|
@@ -1777,9 +1777,9 @@ function Mt(e) {
|
|
|
1777
1777
|
var n;
|
|
1778
1778
|
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : $(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1780
|
+
function ae(e, n, t) {
|
|
1781
1781
|
for (var r = 0, o = e.input.charCodeAt(e.position); o !== 0; ) {
|
|
1782
|
-
for (;
|
|
1782
|
+
for (; Ke(o); )
|
|
1783
1783
|
o === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), o = e.input.charCodeAt(++e.position);
|
|
1784
1784
|
if (n && o === 35)
|
|
1785
1785
|
do
|
|
@@ -1795,28 +1795,28 @@ function oe(e, n, t) {
|
|
|
1795
1795
|
}
|
|
1796
1796
|
function dt(e) {
|
|
1797
1797
|
var n = e.position, t;
|
|
1798
|
-
return t = e.input.charCodeAt(n), !!((t === 45 || t === 46) && t === e.input.charCodeAt(n + 1) && t === e.input.charCodeAt(n + 2) && (n += 3, t = e.input.charCodeAt(n), t === 0 ||
|
|
1798
|
+
return t = e.input.charCodeAt(n), !!((t === 45 || t === 46) && t === e.input.charCodeAt(n + 1) && t === e.input.charCodeAt(n + 2) && (n += 3, t = e.input.charCodeAt(n), t === 0 || ve(t)));
|
|
1799
1799
|
}
|
|
1800
1800
|
function jt(e, n) {
|
|
1801
|
-
n === 1 ? e.result += " " : n > 1 && (e.result +=
|
|
1801
|
+
n === 1 ? e.result += " " : n > 1 && (e.result += ue.repeat(`
|
|
1802
1802
|
`, n - 1));
|
|
1803
1803
|
}
|
|
1804
1804
|
function Oa(e, n, t) {
|
|
1805
1805
|
var r, o, a, i, s, l, c, d, u = e.kind, g = e.result, f;
|
|
1806
|
-
if (f = e.input.charCodeAt(e.position),
|
|
1806
|
+
if (f = e.input.charCodeAt(e.position), ve(f) || Le(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (o = e.input.charCodeAt(e.position + 1), ve(o) || t && Le(o)))
|
|
1807
1807
|
return !1;
|
|
1808
1808
|
for (e.kind = "scalar", e.result = "", a = i = e.position, s = !1; f !== 0; ) {
|
|
1809
1809
|
if (f === 58) {
|
|
1810
|
-
if (o = e.input.charCodeAt(e.position + 1),
|
|
1810
|
+
if (o = e.input.charCodeAt(e.position + 1), ve(o) || t && Le(o))
|
|
1811
1811
|
break;
|
|
1812
1812
|
} else if (f === 35) {
|
|
1813
|
-
if (r = e.input.charCodeAt(e.position - 1),
|
|
1813
|
+
if (r = e.input.charCodeAt(e.position - 1), ve(r))
|
|
1814
1814
|
break;
|
|
1815
1815
|
} else {
|
|
1816
|
-
if (e.position === e.lineStart && dt(e) || t &&
|
|
1816
|
+
if (e.position === e.lineStart && dt(e) || t && Le(f))
|
|
1817
1817
|
break;
|
|
1818
1818
|
if (we(f))
|
|
1819
|
-
if (l = e.line, c = e.lineStart, d = e.lineIndent,
|
|
1819
|
+
if (l = e.line, c = e.lineStart, d = e.lineIndent, ae(e, !1, -1), e.lineIndent >= n) {
|
|
1820
1820
|
s = !0, f = e.input.charCodeAt(e.position);
|
|
1821
1821
|
continue;
|
|
1822
1822
|
} else {
|
|
@@ -1824,11 +1824,11 @@ function Oa(e, n, t) {
|
|
|
1824
1824
|
break;
|
|
1825
1825
|
}
|
|
1826
1826
|
}
|
|
1827
|
-
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), Ke(f) || (i = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1828
1828
|
}
|
|
1829
1829
|
return Me(e, a, i, !1), e.result ? !0 : (e.kind = u, e.result = g, !1);
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1831
|
+
function Ka(e, n) {
|
|
1832
1832
|
var t, r, o;
|
|
1833
1833
|
if (t = e.input.charCodeAt(e.position), t !== 39)
|
|
1834
1834
|
return !1;
|
|
@@ -1839,10 +1839,10 @@ function Fa(e, n) {
|
|
|
1839
1839
|
else
|
|
1840
1840
|
return !0;
|
|
1841
1841
|
else
|
|
1842
|
-
we(t) ? (Me(e, r, o, !0), jt(e,
|
|
1842
|
+
we(t) ? (Me(e, r, o, !0), jt(e, ae(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);
|
|
1843
1843
|
$(e, "unexpected end of the stream within a single quoted scalar");
|
|
1844
1844
|
}
|
|
1845
|
-
function
|
|
1845
|
+
function Na(e, n) {
|
|
1846
1846
|
var t, r, o, a, i, s;
|
|
1847
1847
|
if (s = e.input.charCodeAt(e.position), s !== 34)
|
|
1848
1848
|
return !1;
|
|
@@ -1851,8 +1851,8 @@ function Ka(e, n) {
|
|
|
1851
1851
|
return Me(e, t, e.position, !0), e.position++, !0;
|
|
1852
1852
|
if (s === 92) {
|
|
1853
1853
|
if (Me(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), we(s))
|
|
1854
|
-
|
|
1855
|
-
else if (s < 256 &&
|
|
1854
|
+
ae(e, !1, n);
|
|
1855
|
+
else if (s < 256 && Rn[s])
|
|
1856
1856
|
e.result += Dn[s], e.position++;
|
|
1857
1857
|
else if ((i = $a(s)) > 0) {
|
|
1858
1858
|
for (o = i, a = 0; o > 0; o--)
|
|
@@ -1862,22 +1862,22 @@ function Ka(e, n) {
|
|
|
1862
1862
|
$(e, "unknown escape sequence");
|
|
1863
1863
|
t = r = e.position;
|
|
1864
1864
|
} else
|
|
1865
|
-
we(s) ? (Me(e, t, r, !0), jt(e,
|
|
1865
|
+
we(s) ? (Me(e, t, r, !0), jt(e, ae(e, !1, n)), t = r = e.position) : e.position === e.lineStart && dt(e) ? $(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1866
1866
|
}
|
|
1867
1867
|
$(e, "unexpected end of the stream within a double quoted scalar");
|
|
1868
1868
|
}
|
|
1869
|
-
function
|
|
1870
|
-
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, c, d, u, g, f,
|
|
1871
|
-
if (
|
|
1869
|
+
function Fa(e, n) {
|
|
1870
|
+
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, c, d, u, g, f, I = /* @__PURE__ */ Object.create(null), k, p, A, C;
|
|
1871
|
+
if (C = e.input.charCodeAt(e.position), C === 91)
|
|
1872
1872
|
d = 93, f = !1, s = [];
|
|
1873
|
-
else if (
|
|
1873
|
+
else if (C === 123)
|
|
1874
1874
|
d = 125, f = !0, s = {};
|
|
1875
1875
|
else
|
|
1876
1876
|
return !1;
|
|
1877
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = s),
|
|
1878
|
-
if (
|
|
1877
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), C = e.input.charCodeAt(++e.position); C !== 0; ) {
|
|
1878
|
+
if (ae(e, !0, n), C = e.input.charCodeAt(e.position), C === d)
|
|
1879
1879
|
return e.position++, e.tag = i, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
1880
|
-
t ?
|
|
1880
|
+
t ? C === 44 && $(e, "expected the node content, but found ','") : $(e, "missed comma between flow collection entries"), p = k = A = null, u = g = !1, C === 63 && (c = e.input.charCodeAt(e.position + 1), ve(c) && (u = g = !0, e.position++, ae(e, !0, n))), r = e.line, o = e.lineStart, a = e.position, Ve(e, n, ot, !1, !0), p = e.tag, k = e.result, ae(e, !0, n), C = e.input.charCodeAt(e.position), (g || e.line === r) && C === 58 && (u = !0, C = e.input.charCodeAt(++e.position), ae(e, !0, n), Ve(e, n, ot, !1, !0), A = e.result), f ? Ue(e, s, I, p, k, A, r, o, a) : u ? s.push(Ue(e, null, I, p, k, A, r, o, a)) : s.push(k), ae(e, !0, n), C = e.input.charCodeAt(e.position), C === 44 ? (t = !0, C = e.input.charCodeAt(++e.position)) : t = !1;
|
|
1881
1881
|
}
|
|
1882
1882
|
$(e, "unexpected end of the stream within a flow collection");
|
|
1883
1883
|
}
|
|
@@ -1896,10 +1896,10 @@ function Ba(e, n) {
|
|
|
1896
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);
|
|
1897
1897
|
else
|
|
1898
1898
|
break;
|
|
1899
|
-
if (
|
|
1899
|
+
if (Ke(u)) {
|
|
1900
1900
|
do
|
|
1901
1901
|
u = e.input.charCodeAt(++e.position);
|
|
1902
|
-
while (
|
|
1902
|
+
while (Ke(u));
|
|
1903
1903
|
if (u === 35)
|
|
1904
1904
|
do
|
|
1905
1905
|
u = e.input.charCodeAt(++e.position);
|
|
@@ -1913,15 +1913,15 @@ function Ba(e, n) {
|
|
|
1913
1913
|
continue;
|
|
1914
1914
|
}
|
|
1915
1915
|
if (e.lineIndent < s) {
|
|
1916
|
-
o === zt ? e.result +=
|
|
1916
|
+
o === zt ? e.result += ue.repeat(`
|
|
1917
1917
|
`, a ? 1 + l : l) : o === yt && a && (e.result += `
|
|
1918
1918
|
`);
|
|
1919
1919
|
break;
|
|
1920
1920
|
}
|
|
1921
|
-
for (r ?
|
|
1922
|
-
`, a ? 1 + l : l)) : c ? (c = !1, e.result +=
|
|
1923
|
-
`, l + 1)) : l === 0 ? a && (e.result += " ") : e.result +=
|
|
1924
|
-
`, l) : e.result +=
|
|
1921
|
+
for (r ? Ke(u) ? (c = !0, e.result += ue.repeat(`
|
|
1922
|
+
`, a ? 1 + l : l)) : c ? (c = !1, e.result += ue.repeat(`
|
|
1923
|
+
`, l + 1)) : l === 0 ? a && (e.result += " ") : e.result += ue.repeat(`
|
|
1924
|
+
`, l) : e.result += ue.repeat(`
|
|
1925
1925
|
`, a ? 1 + l : l), a = !0, i = !0, l = 0, t = e.position; !we(u) && u !== 0; )
|
|
1926
1926
|
u = e.input.charCodeAt(++e.position);
|
|
1927
1927
|
Me(e, t, e.position, !1);
|
|
@@ -1932,12 +1932,12 @@ function Qt(e, n) {
|
|
|
1932
1932
|
var t, r = e.tag, o = e.anchor, a = [], i, s = !1, l;
|
|
1933
1933
|
if (e.firstTabInLine !== -1)
|
|
1934
1934
|
return !1;
|
|
1935
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, $(e, "tab characters must not be used in indentation")), !(l !== 45 || (i = e.input.charCodeAt(e.position + 1), !
|
|
1936
|
-
if (s = !0, e.position++,
|
|
1935
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, $(e, "tab characters must not be used in indentation")), !(l !== 45 || (i = e.input.charCodeAt(e.position + 1), !ve(i)))); ) {
|
|
1936
|
+
if (s = !0, e.position++, ae(e, !0, -1) && e.lineIndent <= n) {
|
|
1937
1937
|
a.push(null), l = e.input.charCodeAt(e.position);
|
|
1938
1938
|
continue;
|
|
1939
1939
|
}
|
|
1940
|
-
if (t = e.line,
|
|
1940
|
+
if (t = e.line, Ve(e, n, Ln, !1, !0), a.push(e.result), ae(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && l !== 0)
|
|
1941
1941
|
$(e, "bad indentation of a sequence entry");
|
|
1942
1942
|
else if (e.lineIndent < n)
|
|
1943
1943
|
break;
|
|
@@ -1945,37 +1945,37 @@ function Qt(e, n) {
|
|
|
1945
1945
|
return s ? (e.tag = r, e.anchor = o, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1946
1946
|
}
|
|
1947
1947
|
function Pa(e, n, t) {
|
|
1948
|
-
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, I = null, k = null, p = !1, A = !1, C;
|
|
1949
1949
|
if (e.firstTabInLine !== -1)
|
|
1950
1950
|
return !1;
|
|
1951
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = u),
|
|
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, (
|
|
1953
|
-
|
|
1951
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), C = e.input.charCodeAt(e.position); C !== 0; ) {
|
|
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, (C === 63 || C === 58) && ve(r))
|
|
1953
|
+
C === 63 ? (p && (Ue(e, u, g, f, I, null, i, s, l), f = I = k = null), A = !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, C = r;
|
|
1954
1954
|
else {
|
|
1955
|
-
if (i = e.line, s = e.lineStart, l = e.position, !
|
|
1955
|
+
if (i = e.line, s = e.lineStart, l = e.position, !Ve(e, t, qn, !1, !0))
|
|
1956
1956
|
break;
|
|
1957
1957
|
if (e.line === a) {
|
|
1958
|
-
for (
|
|
1959
|
-
|
|
1960
|
-
if (
|
|
1961
|
-
|
|
1962
|
-
else if (
|
|
1958
|
+
for (C = e.input.charCodeAt(e.position); Ke(C); )
|
|
1959
|
+
C = e.input.charCodeAt(++e.position);
|
|
1960
|
+
if (C === 58)
|
|
1961
|
+
C = e.input.charCodeAt(++e.position), ve(C) || $(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ue(e, u, g, f, I, null, i, s, l), f = I = k = null), A = !0, p = !1, o = !1, f = e.tag, I = e.result;
|
|
1962
|
+
else if (A)
|
|
1963
1963
|
$(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1964
1964
|
else
|
|
1965
1965
|
return e.tag = c, e.anchor = d, !0;
|
|
1966
|
-
} else if (
|
|
1966
|
+
} else if (A)
|
|
1967
1967
|
$(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1968
1968
|
else
|
|
1969
1969
|
return e.tag = c, e.anchor = d, !0;
|
|
1970
1970
|
}
|
|
1971
|
-
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), Ve(e, n, at, !0, o) && (p ? I = e.result : k = e.result), p || (Ue(e, u, g, f, I, k, i, s, l), f = I = k = null), ae(e, !0, -1), C = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > n) && C !== 0)
|
|
1972
1972
|
$(e, "bad indentation of a mapping entry");
|
|
1973
1973
|
else if (e.lineIndent < n)
|
|
1974
1974
|
break;
|
|
1975
1975
|
}
|
|
1976
|
-
return p &&
|
|
1976
|
+
return p && Ue(e, u, g, f, I, null, i, s, l), A && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), A;
|
|
1977
1977
|
}
|
|
1978
|
-
function
|
|
1978
|
+
function qa(e) {
|
|
1979
1979
|
var n, t = !1, r = !1, o, a, i;
|
|
1980
1980
|
if (i = e.input.charCodeAt(e.position), i !== 33)
|
|
1981
1981
|
return !1;
|
|
@@ -1985,11 +1985,11 @@ function La(e) {
|
|
|
1985
1985
|
while (i !== 0 && i !== 62);
|
|
1986
1986
|
e.position < e.length ? (a = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) : $(e, "unexpected end of the stream within a verbatim tag");
|
|
1987
1987
|
} else {
|
|
1988
|
-
for (; i !== 0 && !
|
|
1989
|
-
i === 33 && (r ? $(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(n - 1, e.position + 1),
|
|
1990
|
-
a = e.input.slice(n, e.position),
|
|
1988
|
+
for (; i !== 0 && !ve(i); )
|
|
1989
|
+
i === 33 && (r ? $(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(n - 1, e.position + 1), Un.test(o) || $(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), i = e.input.charCodeAt(++e.position);
|
|
1990
|
+
a = e.input.slice(n, e.position), Sa.test(a) && $(e, "tag suffix cannot contain flow indicator characters");
|
|
1991
1991
|
}
|
|
1992
|
-
a && !
|
|
1992
|
+
a && !Vn.test(a) && $(e, "tag name cannot contain such characters: " + a);
|
|
1993
1993
|
try {
|
|
1994
1994
|
a = decodeURIComponent(a);
|
|
1995
1995
|
} catch {
|
|
@@ -1997,55 +1997,55 @@ function La(e) {
|
|
|
1997
1997
|
}
|
|
1998
1998
|
return t ? e.tag = a : je.call(e.tagMap, o) ? e.tag = e.tagMap[o] + a : o === "!" ? e.tag = "!" + a : o === "!!" ? e.tag = "tag:yaml.org,2002:" + a : $(e, 'undeclared tag handle "' + o + '"'), !0;
|
|
1999
1999
|
}
|
|
2000
|
-
function
|
|
2000
|
+
function La(e) {
|
|
2001
2001
|
var n, t;
|
|
2002
2002
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2003
2003
|
return !1;
|
|
2004
|
-
for (e.anchor !== null && $(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !
|
|
2004
|
+
for (e.anchor !== null && $(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !ve(t) && !Le(t); )
|
|
2005
2005
|
t = e.input.charCodeAt(++e.position);
|
|
2006
2006
|
return e.position === n && $(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2007
2007
|
}
|
|
2008
|
-
function
|
|
2008
|
+
function Ua(e) {
|
|
2009
2009
|
var n, t, r;
|
|
2010
2010
|
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
2011
2011
|
return !1;
|
|
2012
|
-
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !
|
|
2012
|
+
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !ve(r) && !Le(r); )
|
|
2013
2013
|
r = e.input.charCodeAt(++e.position);
|
|
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],
|
|
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], ae(e, !0, -1), !0;
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2017
|
-
var a, i, s, l = 1, c = !1, d = !1, u, g, f,
|
|
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 ||
|
|
2019
|
-
for (;
|
|
2020
|
-
|
|
2021
|
-
if (s && (s = c || o), (l === 1 || at === t) && (ot === t ||
|
|
2016
|
+
function Ve(e, n, t, r, o) {
|
|
2017
|
+
var a, i, s, l = 1, c = !1, d = !1, u, g, f, I, k, p;
|
|
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 || Ln === t, r && ae(e, !0, -1) && (c = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2019
|
+
for (; qa(e) || La(e); )
|
|
2020
|
+
ae(e, !0, -1) ? (c = !0, s = a, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2021
|
+
if (s && (s = c || o), (l === 1 || at === t) && (ot === t || qn === t ? k = n : k = n + 1, p = e.position - e.lineStart, l === 1 ? s && (Qt(e, p) || Pa(e, p, k)) || Fa(e, k) ? d = !0 : (i && Ba(e, k) || Ka(e, k) || Na(e, k) ? d = !0 : Ua(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && $(e, "alias node should not have any properties")) : Oa(e, k, 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)
|
|
2022
2022
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2023
2023
|
else if (e.tag === "?") {
|
|
2024
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)
|
|
2025
|
-
if (
|
|
2026
|
-
e.result =
|
|
2025
|
+
if (I = e.implicitTypes[u], I.resolve(e.result)) {
|
|
2026
|
+
e.result = I.construct(e.result), e.tag = I.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2027
2027
|
break;
|
|
2028
2028
|
}
|
|
2029
2029
|
} else if (e.tag !== "!") {
|
|
2030
2030
|
if (je.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2031
|
-
|
|
2031
|
+
I = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2032
2032
|
else
|
|
2033
|
-
for (
|
|
2033
|
+
for (I = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, g = f.length; u < g; u += 1)
|
|
2034
2034
|
if (e.tag.slice(0, f[u].tag.length) === f[u].tag) {
|
|
2035
|
-
|
|
2035
|
+
I = f[u];
|
|
2036
2036
|
break;
|
|
2037
2037
|
}
|
|
2038
|
-
|
|
2038
|
+
I || $(e, "unknown tag !<" + e.tag + ">"), e.result !== null && I.kind !== e.kind && $(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + I.kind + '", not "' + e.kind + '"'), I.resolve(e.result, e.tag) ? (e.result = I.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : $(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2039
2039
|
}
|
|
2040
2040
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2041
2041
|
}
|
|
2042
|
-
function
|
|
2042
|
+
function Va(e) {
|
|
2043
2043
|
var n = e.position, t, r, o, a = !1, i;
|
|
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 && (
|
|
2045
|
-
for (a = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !
|
|
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 && (ae(e, !0, -1), i = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || i !== 37)); ) {
|
|
2045
|
+
for (a = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !ve(i); )
|
|
2046
2046
|
i = e.input.charCodeAt(++e.position);
|
|
2047
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; ) {
|
|
2048
|
-
for (;
|
|
2048
|
+
for (; Ke(i); )
|
|
2049
2049
|
i = e.input.charCodeAt(++e.position);
|
|
2050
2050
|
if (i === 35) {
|
|
2051
2051
|
do
|
|
@@ -2055,14 +2055,14 @@ function Ra(e) {
|
|
|
2055
2055
|
}
|
|
2056
2056
|
if (we(i))
|
|
2057
2057
|
break;
|
|
2058
|
-
for (t = e.position; i !== 0 && !
|
|
2058
|
+
for (t = e.position; i !== 0 && !ve(i); )
|
|
2059
2059
|
i = e.input.charCodeAt(++e.position);
|
|
2060
2060
|
o.push(e.input.slice(t, e.position));
|
|
2061
2061
|
}
|
|
2062
|
-
i !== 0 && Mt(e), je.call(
|
|
2062
|
+
i !== 0 && Mt(e), je.call(Wt, r) ? Wt[r](e, r, o) : it(e, 'unknown document directive "' + r + '"');
|
|
2063
2063
|
}
|
|
2064
|
-
if (
|
|
2065
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
2064
|
+
if (ae(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, ae(e, !0, -1)) : a && $(e, "directives end mark is expected"), Ve(e, e.lineIndent - 1, at, !1, !0), ae(e, !0, -1), e.checkLineBreaks && xa.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)) {
|
|
2065
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ae(e, !0, -1));
|
|
2066
2066
|
return;
|
|
2067
2067
|
}
|
|
2068
2068
|
if (e.position < e.length - 1)
|
|
@@ -2077,10 +2077,10 @@ function Hn(e, n) {
|
|
|
2077
2077
|
for (r !== -1 && (t.position = r, $(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2078
2078
|
t.lineIndent += 1, t.position += 1;
|
|
2079
2079
|
for (; t.position < t.length - 1; )
|
|
2080
|
-
|
|
2080
|
+
Va(t);
|
|
2081
2081
|
return t.documents;
|
|
2082
2082
|
}
|
|
2083
|
-
function
|
|
2083
|
+
function Ra(e, n, t) {
|
|
2084
2084
|
n !== null && typeof n == "object" && typeof t > "u" && (t = n, n = null);
|
|
2085
2085
|
var r = Hn(e, t);
|
|
2086
2086
|
if (typeof n != "function")
|
|
@@ -2096,10 +2096,10 @@ function Da(e, n) {
|
|
|
2096
2096
|
throw new me("expected a single document in the stream, but found more");
|
|
2097
2097
|
}
|
|
2098
2098
|
}
|
|
2099
|
-
var Ga =
|
|
2099
|
+
var Ga = Ra, Ha = Da, zn = {
|
|
2100
2100
|
loadAll: Ga,
|
|
2101
2101
|
load: Ha
|
|
2102
|
-
}, Jn = Object.prototype.toString,
|
|
2102
|
+
}, Jn = Object.prototype.toString, Yn = Object.prototype.hasOwnProperty, Et = 65279, za = 9, Ye = 10, Ja = 13, Ya = 32, Wa = 33, Za = 34, bt = 35, Qa = 37, Xa = 38, ei = 39, ti = 42, Wn = 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 = {};
|
|
2103
2103
|
fe[0] = "\\0";
|
|
2104
2104
|
fe[7] = "\\a";
|
|
2105
2105
|
fe[8] = "\\b";
|
|
@@ -2138,7 +2138,7 @@ function di(e, n) {
|
|
|
2138
2138
|
if (n === null)
|
|
2139
2139
|
return {};
|
|
2140
2140
|
for (t = {}, r = Object.keys(n), o = 0, a = r.length; o < a; o += 1)
|
|
2141
|
-
i = r[o], s = String(n[i]), i.slice(0, 2) === "!!" && (i = "tag:yaml.org,2002:" + i.slice(2)), l = e.compiledTypeMap.fallback[i], l &&
|
|
2141
|
+
i = r[o], s = String(n[i]), i.slice(0, 2) === "!!" && (i = "tag:yaml.org,2002:" + i.slice(2)), l = e.compiledTypeMap.fallback[i], l && Yn.call(l.styleAliases, s) && (s = l.styleAliases[s]), t[i] = s;
|
|
2142
2142
|
return t;
|
|
2143
2143
|
}
|
|
2144
2144
|
function pi(e) {
|
|
@@ -2151,22 +2151,22 @@ function pi(e) {
|
|
|
2151
2151
|
t = "U", r = 8;
|
|
2152
2152
|
else
|
|
2153
2153
|
throw new me("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2154
|
-
return "\\" + t +
|
|
2154
|
+
return "\\" + t + ue.repeat("0", r - n.length) + n;
|
|
2155
2155
|
}
|
|
2156
|
-
var fi = 1,
|
|
2156
|
+
var fi = 1, We = 2;
|
|
2157
2157
|
function mi(e) {
|
|
2158
|
-
this.schema = e.schema || $t, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel =
|
|
2158
|
+
this.schema = e.schema || $t, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ue.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = di(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? We : fi, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
2159
2159
|
}
|
|
2160
2160
|
function Xt(e, n) {
|
|
2161
|
-
for (var t =
|
|
2161
|
+
for (var t = ue.repeat(" ", n), r = 0, o = -1, a = "", i, s = e.length; r < s; )
|
|
2162
2162
|
o = e.indexOf(`
|
|
2163
2163
|
`, r), o === -1 ? (i = e.slice(r), r = s) : (i = e.slice(r, o + 1), r = o + 1), i.length && i !== `
|
|
2164
2164
|
` && (a += t), a += i;
|
|
2165
2165
|
return a;
|
|
2166
2166
|
}
|
|
2167
|
-
function
|
|
2167
|
+
function kt(e, n) {
|
|
2168
2168
|
return `
|
|
2169
|
-
` +
|
|
2169
|
+
` + ue.repeat(" ", e.indent * n);
|
|
2170
2170
|
}
|
|
2171
2171
|
function gi(e, n) {
|
|
2172
2172
|
var t, r, o;
|
|
@@ -2176,13 +2176,13 @@ function gi(e, n) {
|
|
|
2176
2176
|
return !1;
|
|
2177
2177
|
}
|
|
2178
2178
|
function lt(e) {
|
|
2179
|
-
return e ===
|
|
2179
|
+
return e === Ya || e === za;
|
|
2180
2180
|
}
|
|
2181
2181
|
function Ze(e) {
|
|
2182
2182
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Et || 65536 <= e && e <= 1114111;
|
|
2183
2183
|
}
|
|
2184
2184
|
function en(e) {
|
|
2185
|
-
return Ze(e) && e !== Et && e !== Ja && e !==
|
|
2185
|
+
return Ze(e) && e !== Et && e !== Ja && e !== Ye;
|
|
2186
2186
|
}
|
|
2187
2187
|
function tn(e, n, t) {
|
|
2188
2188
|
var r = en(e), o = r && !lt(e);
|
|
@@ -2191,11 +2191,11 @@ function tn(e, n, t) {
|
|
|
2191
2191
|
(t ? (
|
|
2192
2192
|
// c = flow-in
|
|
2193
2193
|
r
|
|
2194
|
-
) : r && e !==
|
|
2194
|
+
) : r && e !== Wn && e !== Zn && e !== Qn && e !== Xn && e !== er) && e !== bt && !(n === st && !o) || en(n) && !lt(n) && e === bt || n === st && o
|
|
2195
2195
|
);
|
|
2196
2196
|
}
|
|
2197
2197
|
function yi(e) {
|
|
2198
|
-
return Ze(e) && e !== Et && !lt(e) && e !== ni && e !== ai && e !== st && e !==
|
|
2198
|
+
return Ze(e) && e !== Et && !lt(e) && e !== ni && e !== ai && e !== st && e !== Wn && e !== Zn && e !== Qn && e !== Xn && e !== er && e !== bt && e !== Xa && e !== ti && e !== Wa && e !== li && e !== ri && e !== oi && e !== ei && e !== Za && e !== Qa && e !== ii && e !== si;
|
|
2199
2199
|
}
|
|
2200
2200
|
function hi(e) {
|
|
2201
2201
|
return !lt(e) && e !== st;
|
|
@@ -2208,34 +2208,34 @@ function tr(e) {
|
|
|
2208
2208
|
var n = /^\n* /;
|
|
2209
2209
|
return n.test(e);
|
|
2210
2210
|
}
|
|
2211
|
-
var nr = 1,
|
|
2211
|
+
var nr = 1, Ct = 2, rr = 3, or = 4, qe = 5;
|
|
2212
2212
|
function vi(e, n, t, r, o, a, i, s) {
|
|
2213
|
-
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, I = -1, k = yi(He(e, 0)) && hi(He(e, e.length - 1));
|
|
2214
2214
|
if (n || i)
|
|
2215
2215
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2216
2216
|
if (c = He(e, l), !Ze(c))
|
|
2217
|
-
return
|
|
2218
|
-
|
|
2217
|
+
return qe;
|
|
2218
|
+
k = k && tn(c, d, s), d = c;
|
|
2219
2219
|
}
|
|
2220
2220
|
else {
|
|
2221
2221
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2222
|
-
if (c = He(e, l), c ===
|
|
2222
|
+
if (c = He(e, l), c === Ye)
|
|
2223
2223
|
u = !0, f && (g = g || // Foldable line = too long, and not more-indented.
|
|
2224
|
-
l -
|
|
2224
|
+
l - I - 1 > r && e[I + 1] !== " ", I = l);
|
|
2225
2225
|
else if (!Ze(c))
|
|
2226
|
-
return
|
|
2227
|
-
|
|
2226
|
+
return qe;
|
|
2227
|
+
k = k && tn(c, d, s), d = c;
|
|
2228
2228
|
}
|
|
2229
|
-
g = g || f && l -
|
|
2229
|
+
g = g || f && l - I - 1 > r && e[I + 1] !== " ";
|
|
2230
2230
|
}
|
|
2231
|
-
return !u && !g ?
|
|
2231
|
+
return !u && !g ? k && !i && !o(e) ? nr : a === We ? qe : Ct : t > 9 && tr(e) ? qe : i ? a === We ? qe : Ct : g ? or : rr;
|
|
2232
2232
|
}
|
|
2233
2233
|
function bi(e, n, t, r, o) {
|
|
2234
2234
|
e.dump = function() {
|
|
2235
2235
|
if (n.length === 0)
|
|
2236
|
-
return e.quotingType ===
|
|
2236
|
+
return e.quotingType === We ? '""' : "''";
|
|
2237
2237
|
if (!e.noCompatMode && (ui.indexOf(n) !== -1 || ci.test(n)))
|
|
2238
|
-
return e.quotingType ===
|
|
2238
|
+
return e.quotingType === We ? '"' + n + '"' : "'" + n + "'";
|
|
2239
2239
|
var a = e.indent * Math.max(1, t), i = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), s = r || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2240
2240
|
function l(c) {
|
|
2241
2241
|
return gi(e, c);
|
|
@@ -2252,14 +2252,14 @@ function bi(e, n, t, r, o) {
|
|
|
2252
2252
|
)) {
|
|
2253
2253
|
case nr:
|
|
2254
2254
|
return n;
|
|
2255
|
-
case
|
|
2255
|
+
case Ct:
|
|
2256
2256
|
return "'" + n.replace(/'/g, "''") + "'";
|
|
2257
2257
|
case rr:
|
|
2258
2258
|
return "|" + nn(n, e.indent) + rn(Xt(n, a));
|
|
2259
2259
|
case or:
|
|
2260
|
-
return ">" + nn(n, e.indent) + rn(Xt(
|
|
2261
|
-
case
|
|
2262
|
-
return '"' +
|
|
2260
|
+
return ">" + nn(n, e.indent) + rn(Xt(ki(n, i), a));
|
|
2261
|
+
case qe:
|
|
2262
|
+
return '"' + Ci(n) + '"';
|
|
2263
2263
|
default:
|
|
2264
2264
|
throw new me("impossible error: invalid scalar style");
|
|
2265
2265
|
}
|
|
@@ -2277,7 +2277,7 @@ function rn(e) {
|
|
|
2277
2277
|
return e[e.length - 1] === `
|
|
2278
2278
|
` ? e.slice(0, -1) : e;
|
|
2279
2279
|
}
|
|
2280
|
-
function
|
|
2280
|
+
function ki(e, n) {
|
|
2281
2281
|
for (var t = /(\n+)([^\n]*)/g, r = function() {
|
|
2282
2282
|
var c = e.indexOf(`
|
|
2283
2283
|
`);
|
|
@@ -2300,7 +2300,7 @@ function on(e, n) {
|
|
|
2300
2300
|
`, e.length - o > n && i > o ? l += e.slice(o, i) + `
|
|
2301
2301
|
` + e.slice(i + 1) : l += e.slice(o), l.slice(1);
|
|
2302
2302
|
}
|
|
2303
|
-
function
|
|
2303
|
+
function Ci(e) {
|
|
2304
2304
|
for (var n = "", t = 0, r, o = 0; o < e.length; t >= 65536 ? o += 2 : o++)
|
|
2305
2305
|
t = He(e, o), r = fe[t], !r && Ze(t) ? (n += e[o], t >= 65536 && (n += e[o + 1])) : n += r || pi(t);
|
|
2306
2306
|
return n;
|
|
@@ -2308,19 +2308,19 @@ function ki(e) {
|
|
|
2308
2308
|
function _i(e, n, t) {
|
|
2309
2309
|
var r = "", o = e.tag, a, i, s;
|
|
2310
2310
|
for (a = 0, i = t.length; a < i; a += 1)
|
|
2311
|
-
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)), (xe(e, n, s, !1, !1) || typeof s > "u" && xe(e, n, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2312
2312
|
e.tag = o, e.dump = "[" + r + "]";
|
|
2313
2313
|
}
|
|
2314
2314
|
function an(e, n, t, r) {
|
|
2315
2315
|
var o = "", a = e.tag, i, s, l;
|
|
2316
2316
|
for (i = 0, s = t.length; i < s; i += 1)
|
|
2317
|
-
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)), (xe(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && xe(e, n + 1, null, !0, !0, !1, !0)) && ((!r || o !== "") && (o += kt(e, n)), e.dump && Ye === e.dump.charCodeAt(0) ? o += "-" : o += "- ", o += e.dump);
|
|
2318
2318
|
e.tag = a, e.dump = o || "[]";
|
|
2319
2319
|
}
|
|
2320
2320
|
function wi(e, n, t) {
|
|
2321
2321
|
var r = "", o = e.tag, a = Object.keys(t), i, s, l, c, d;
|
|
2322
2322
|
for (i = 0, s = a.length; i < s; i += 1)
|
|
2323
|
-
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)), xe(e, n, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), xe(e, n, c, !1, !1) && (d += e.dump, r += d));
|
|
2324
2324
|
e.tag = o, e.dump = "{" + r + "}";
|
|
2325
2325
|
}
|
|
2326
2326
|
function Ii(e, n, t, r) {
|
|
@@ -2332,7 +2332,7 @@ function Ii(e, n, t, r) {
|
|
|
2332
2332
|
else if (e.sortKeys)
|
|
2333
2333
|
throw new me("sortKeys must be a boolean or a function");
|
|
2334
2334
|
for (s = 0, l = i.length; s < l; s += 1)
|
|
2335
|
-
g = "", (!r || o !== "") && (g +=
|
|
2335
|
+
g = "", (!r || o !== "") && (g += kt(e, n)), c = i[s], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)), xe(e, n + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Ye === e.dump.charCodeAt(0) ? g += "?" : g += "? "), g += e.dump, u && (g += kt(e, n)), xe(e, n + 1, d, !0, u) && (e.dump && Ye === e.dump.charCodeAt(0) ? g += ":" : g += ": ", g += e.dump, o += g));
|
|
2336
2336
|
e.tag = a, e.dump = o || "{}";
|
|
2337
2337
|
}
|
|
2338
2338
|
function sn(e, n, t) {
|
|
@@ -2342,7 +2342,7 @@ function sn(e, n, t) {
|
|
|
2342
2342
|
if (t ? s.multi && s.representName ? e.tag = s.representName(n) : e.tag = s.tag : e.tag = "?", s.represent) {
|
|
2343
2343
|
if (l = e.styleMap[s.tag] || s.defaultStyle, Jn.call(s.represent) === "[object Function]")
|
|
2344
2344
|
r = s.represent(n, l);
|
|
2345
|
-
else if (
|
|
2345
|
+
else if (Yn.call(s.represent, l))
|
|
2346
2346
|
r = s.represent[l](n, l);
|
|
2347
2347
|
else
|
|
2348
2348
|
throw new me("!<" + s.tag + '> tag resolver accepts not "' + l + '" style');
|
|
@@ -2352,7 +2352,7 @@ function sn(e, n, t) {
|
|
|
2352
2352
|
}
|
|
2353
2353
|
return !1;
|
|
2354
2354
|
}
|
|
2355
|
-
function
|
|
2355
|
+
function xe(e, n, t, r, o, a, i) {
|
|
2356
2356
|
e.tag = null, e.dump = t, sn(e, t, !1) || sn(e, t, !0);
|
|
2357
2357
|
var s = Jn.call(e.dump), l = r, c;
|
|
2358
2358
|
r && (r = e.flowLevel < 0 || e.flowLevel > n);
|
|
@@ -2395,51 +2395,51 @@ function _t(e, n, t) {
|
|
|
2395
2395
|
for (r = Object.keys(e), o = 0, a = r.length; o < a; o += 1)
|
|
2396
2396
|
_t(e[r[o]], n, t);
|
|
2397
2397
|
}
|
|
2398
|
-
function
|
|
2398
|
+
function xi(e, n) {
|
|
2399
2399
|
n = n || {};
|
|
2400
2400
|
var t = new mi(n);
|
|
2401
2401
|
t.noRefs || Ai(e, t);
|
|
2402
2402
|
var r = e;
|
|
2403
|
-
return t.replacer && (r = t.replacer.call({ "": r }, "", r)),
|
|
2403
|
+
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), xe(t, 0, r, !0, !0) ? t.dump + `
|
|
2404
2404
|
` : "";
|
|
2405
2405
|
}
|
|
2406
|
-
var
|
|
2407
|
-
dump:
|
|
2406
|
+
var Si = xi, Ti = {
|
|
2407
|
+
dump: Si
|
|
2408
2408
|
};
|
|
2409
2409
|
function Ot(e, n) {
|
|
2410
2410
|
return function() {
|
|
2411
2411
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2412
2412
|
};
|
|
2413
2413
|
}
|
|
2414
|
-
var $i =
|
|
2415
|
-
binary:
|
|
2414
|
+
var $i = pe, Mi = kn, ji = In, Ei = $n, Oi = Mn, Ki = $t, Ni = zn.load, Fi = zn.loadAll, Bi = Ti.dump, Pi = me, qi = {
|
|
2415
|
+
binary: Nn,
|
|
2416
2416
|
float: Tn,
|
|
2417
2417
|
map: wn,
|
|
2418
2418
|
null: An,
|
|
2419
2419
|
pairs: Bn,
|
|
2420
2420
|
set: Pn,
|
|
2421
2421
|
timestamp: On,
|
|
2422
|
-
bool:
|
|
2423
|
-
int:
|
|
2424
|
-
merge:
|
|
2425
|
-
omap:
|
|
2422
|
+
bool: xn,
|
|
2423
|
+
int: Sn,
|
|
2424
|
+
merge: Kn,
|
|
2425
|
+
omap: Fn,
|
|
2426
2426
|
seq: _n,
|
|
2427
|
-
str:
|
|
2428
|
-
},
|
|
2427
|
+
str: Cn
|
|
2428
|
+
}, Li = Ot("safeLoad", "load"), Ui = Ot("safeLoadAll", "loadAll"), Vi = Ot("safeDump", "dump"), Ri = {
|
|
2429
2429
|
Type: $i,
|
|
2430
2430
|
Schema: Mi,
|
|
2431
2431
|
FAILSAFE_SCHEMA: ji,
|
|
2432
2432
|
JSON_SCHEMA: Ei,
|
|
2433
2433
|
CORE_SCHEMA: Oi,
|
|
2434
|
-
DEFAULT_SCHEMA:
|
|
2435
|
-
load:
|
|
2436
|
-
loadAll:
|
|
2434
|
+
DEFAULT_SCHEMA: Ki,
|
|
2435
|
+
load: Ni,
|
|
2436
|
+
loadAll: Fi,
|
|
2437
2437
|
dump: Bi,
|
|
2438
2438
|
YAMLException: Pi,
|
|
2439
|
-
types:
|
|
2440
|
-
safeLoad:
|
|
2441
|
-
safeLoadAll:
|
|
2442
|
-
safeDump:
|
|
2439
|
+
types: qi,
|
|
2440
|
+
safeLoad: Li,
|
|
2441
|
+
safeLoadAll: Ui,
|
|
2442
|
+
safeDump: Vi
|
|
2443
2443
|
};
|
|
2444
2444
|
const Di = {
|
|
2445
2445
|
key: 0,
|
|
@@ -2453,7 +2453,7 @@ const Di = {
|
|
|
2453
2453
|
}, Ji = {
|
|
2454
2454
|
key: 2,
|
|
2455
2455
|
class: "config-card-display-yaml"
|
|
2456
|
-
},
|
|
2456
|
+
}, Yi = /* @__PURE__ */ ie({
|
|
2457
2457
|
__name: "ConfigCardDisplay",
|
|
2458
2458
|
props: {
|
|
2459
2459
|
propertyCollections: {
|
|
@@ -2479,28 +2479,28 @@ const Di = {
|
|
|
2479
2479
|
}
|
|
2480
2480
|
},
|
|
2481
2481
|
setup(e) {
|
|
2482
|
-
const n = e, t = ut(), { i18n: { t: r } } =
|
|
2483
|
-
return
|
|
2484
|
-
s === "json" ? a.value = JSON.stringify(n.record, null, 2) : s === "yaml" && (i.value =
|
|
2482
|
+
const n = e, t = ut(), { i18n: { t: r } } = ce.useI18n(), o = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), a = E(""), i = E("");
|
|
2483
|
+
return Se(() => n.format, (s) => {
|
|
2484
|
+
s === "json" ? a.value = JSON.stringify(n.record, null, 2) : s === "yaml" && (i.value = Ri.dump(n.record));
|
|
2485
2485
|
}, { immediate: !0 }), (s, l) => {
|
|
2486
|
-
const c =
|
|
2487
|
-
return m(), j(
|
|
2486
|
+
const c = P("KCodeBlock");
|
|
2487
|
+
return m(), j(be, null, [
|
|
2488
2488
|
e.format === "structured" ? (m(), j("div", Di, [
|
|
2489
|
-
(m(!0), j(
|
|
2489
|
+
(m(!0), j(be, null, he(e.propListTypes, (d) => (m(), j("div", {
|
|
2490
2490
|
key: `config-card-details-${d}-props`,
|
|
2491
|
-
class:
|
|
2491
|
+
class: Ne(`config-card-details-${d}-props`),
|
|
2492
2492
|
"data-testid": `config-card-details-${d}-props`
|
|
2493
2493
|
}, [
|
|
2494
|
-
d !== "basic" ? (m(), j("div", Hi,
|
|
2495
|
-
(m(!0), j(
|
|
2494
|
+
d !== "basic" ? (m(), j("div", Hi, K(d === "advanced" ? y(r)("baseConfigCard.sections.advanced") : y(r)("baseConfigCard.sections.plugin")), 1)) : z("", !0),
|
|
2495
|
+
(m(!0), j(be, null, he(e.propertyCollections[d], (u) => (m(), R(St, {
|
|
2496
2496
|
key: u.key,
|
|
2497
2497
|
item: u
|
|
2498
2498
|
}, Te({
|
|
2499
|
-
label:
|
|
2500
|
-
|
|
2499
|
+
label: v(() => [
|
|
2500
|
+
Z(s.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2501
2501
|
]),
|
|
2502
|
-
[u.key]:
|
|
2503
|
-
|
|
2502
|
+
[u.key]: v(({ rowValue: g }) => [
|
|
2503
|
+
Z(s.$slots, u.key, {
|
|
2504
2504
|
row: u,
|
|
2505
2505
|
rowValue: g
|
|
2506
2506
|
}, void 0, !0)
|
|
@@ -2509,34 +2509,34 @@ const Di = {
|
|
|
2509
2509
|
}, [
|
|
2510
2510
|
o(u) ? {
|
|
2511
2511
|
name: "label-tooltip",
|
|
2512
|
-
fn:
|
|
2513
|
-
|
|
2512
|
+
fn: v(() => [
|
|
2513
|
+
Z(s.$slots, `${u.key}-label-tooltip`, { row: u }, void 0, !0)
|
|
2514
2514
|
]),
|
|
2515
2515
|
key: "0"
|
|
2516
2516
|
} : void 0
|
|
2517
2517
|
]), 1032, ["item"]))), 128))
|
|
2518
2518
|
], 10, Gi))), 128))
|
|
2519
|
-
])) :
|
|
2519
|
+
])) : z("", !0),
|
|
2520
2520
|
e.format === "json" ? (m(), j("div", zi, [
|
|
2521
|
-
|
|
2521
|
+
N(c, {
|
|
2522
2522
|
id: "config-card-codeblock",
|
|
2523
2523
|
code: a.value,
|
|
2524
2524
|
language: "json",
|
|
2525
2525
|
theme: "dark"
|
|
2526
2526
|
}, null, 8, ["code"])
|
|
2527
|
-
])) :
|
|
2527
|
+
])) : z("", !0),
|
|
2528
2528
|
e.format === "yaml" ? (m(), j("div", Ji, [
|
|
2529
|
-
|
|
2529
|
+
N(c, {
|
|
2530
2530
|
id: "config-card-codeblock",
|
|
2531
2531
|
code: i.value,
|
|
2532
2532
|
language: "yaml",
|
|
2533
2533
|
theme: "dark"
|
|
2534
2534
|
}, null, 8, ["code"])
|
|
2535
|
-
])) :
|
|
2535
|
+
])) : z("", !0)
|
|
2536
2536
|
], 64);
|
|
2537
2537
|
};
|
|
2538
2538
|
}
|
|
2539
|
-
}),
|
|
2539
|
+
}), Wi = /* @__PURE__ */ Ce(Yi, [["__scopeId", "data-v-6c45e9e4"]]), ln = "24px", Zi = (e, n) => {
|
|
2540
2540
|
const t = e.__vccOpts || e;
|
|
2541
2541
|
for (const [r, o] of n)
|
|
2542
2542
|
t[r] = o;
|
|
@@ -2544,10 +2544,10 @@ const Di = {
|
|
|
2544
2544
|
}, Qi = (e) => (yr("data-v-dd88a2bb"), e = e(), hr(), e), Xi = ["aria-hidden"], es = {
|
|
2545
2545
|
key: 0,
|
|
2546
2546
|
"data-testid": "kui-icon-svg-title"
|
|
2547
|
-
}, ts = /* @__PURE__ */ Qi(() => /* @__PURE__ */
|
|
2547
|
+
}, ts = /* @__PURE__ */ Qi(() => /* @__PURE__ */ U("path", {
|
|
2548
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",
|
|
2549
2549
|
fill: "currentColor"
|
|
2550
|
-
}, null, -1)), ns = /* @__PURE__ */
|
|
2550
|
+
}, null, -1)), ns = /* @__PURE__ */ ie({
|
|
2551
2551
|
__name: "BookIcon",
|
|
2552
2552
|
props: {
|
|
2553
2553
|
/** The accessibility text provided to screen readers */
|
|
@@ -2599,7 +2599,7 @@ const Di = {
|
|
|
2599
2599
|
}
|
|
2600
2600
|
},
|
|
2601
2601
|
setup(e) {
|
|
2602
|
-
const n = e, t =
|
|
2602
|
+
const n = e, t = T(() => {
|
|
2603
2603
|
if (typeof n.size == "number" && n.size > 0)
|
|
2604
2604
|
return `${n.size}px`;
|
|
2605
2605
|
if (typeof n.size == "string") {
|
|
@@ -2608,7 +2608,7 @@ const Di = {
|
|
|
2608
2608
|
return `${a}px`;
|
|
2609
2609
|
}
|
|
2610
2610
|
return ln;
|
|
2611
|
-
}), r =
|
|
2611
|
+
}), r = T(() => ({
|
|
2612
2612
|
boxSizing: "border-box",
|
|
2613
2613
|
color: n.color,
|
|
2614
2614
|
display: n.display,
|
|
@@ -2616,13 +2616,13 @@ const Di = {
|
|
|
2616
2616
|
lineHeight: "0",
|
|
2617
2617
|
width: t.value
|
|
2618
2618
|
}));
|
|
2619
|
-
return (o, a) => (m(),
|
|
2619
|
+
return (o, a) => (m(), R(ze(e.as), {
|
|
2620
2620
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2621
2621
|
class: "kui-icon book-icon",
|
|
2622
2622
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2623
2623
|
style: mr(r.value)
|
|
2624
2624
|
}, {
|
|
2625
|
-
default:
|
|
2625
|
+
default: v(() => [
|
|
2626
2626
|
(m(), j("svg", {
|
|
2627
2627
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2628
2628
|
"data-testid": "kui-icon-svg-book-icon",
|
|
@@ -2633,7 +2633,7 @@ const Di = {
|
|
|
2633
2633
|
width: "100%",
|
|
2634
2634
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2635
2635
|
}, [
|
|
2636
|
-
e.title ? (m(), j("title", es,
|
|
2636
|
+
e.title ? (m(), j("title", es, K(e.title), 1)) : z("", !0),
|
|
2637
2637
|
ts
|
|
2638
2638
|
], 8, Xi))
|
|
2639
2639
|
]),
|
|
@@ -2649,7 +2649,7 @@ const Di = {
|
|
|
2649
2649
|
}, us = ["data-testid"], cs = {
|
|
2650
2650
|
key: 0,
|
|
2651
2651
|
class: "config-card-prop-section-title"
|
|
2652
|
-
}, ds = /* @__PURE__ */
|
|
2652
|
+
}, ds = /* @__PURE__ */ ie({
|
|
2653
2653
|
__name: "EntityBaseConfigCard",
|
|
2654
2654
|
props: {
|
|
2655
2655
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2724,7 +2724,7 @@ const Di = {
|
|
|
2724
2724
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
2725
2725
|
setup(e, { emit: n }) {
|
|
2726
2726
|
var t;
|
|
2727
|
-
const r = e, o = ut(), { i18n: { t: a } } =
|
|
2727
|
+
const r = e, o = ut(), { i18n: { t: a } } = ce.useI18n(), { getMessageFromError: i } = ce.useErrors(), { convertKeyToTitle: s } = ce.useStringHelpers(), { axiosInstance: l } = ce.useAxios({
|
|
2728
2728
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
2729
2729
|
}), c = [
|
|
2730
2730
|
{
|
|
@@ -2740,115 +2740,115 @@ const Di = {
|
|
|
2740
2740
|
label: "YAML",
|
|
2741
2741
|
value: "yaml"
|
|
2742
2742
|
}
|
|
2743
|
-
], d =
|
|
2743
|
+
], d = E("structured"), u = (w) => {
|
|
2744
2744
|
d.value = w == null ? void 0 : w.value;
|
|
2745
2745
|
}, g = {
|
|
2746
2746
|
id: {
|
|
2747
|
-
type:
|
|
2747
|
+
type: ne.ID,
|
|
2748
2748
|
label: a("baseConfigCard.commonFields.id_label"),
|
|
2749
2749
|
order: 0,
|
|
2750
|
-
section:
|
|
2750
|
+
section: ke.Basic
|
|
2751
2751
|
},
|
|
2752
2752
|
name: {
|
|
2753
2753
|
order: 1,
|
|
2754
|
-
section:
|
|
2754
|
+
section: ke.Basic
|
|
2755
2755
|
},
|
|
2756
2756
|
enabled: {
|
|
2757
|
-
type:
|
|
2757
|
+
type: ne.BadgeStatus,
|
|
2758
2758
|
order: 2,
|
|
2759
|
-
section:
|
|
2759
|
+
section: ke.Basic
|
|
2760
2760
|
},
|
|
2761
2761
|
updated_at: {
|
|
2762
|
-
type:
|
|
2762
|
+
type: ne.Date,
|
|
2763
2763
|
label: a("baseConfigCard.commonFields.updated_at_label"),
|
|
2764
2764
|
order: 3,
|
|
2765
|
-
section:
|
|
2765
|
+
section: ke.Basic
|
|
2766
2766
|
},
|
|
2767
2767
|
created_at: {
|
|
2768
|
-
type:
|
|
2768
|
+
type: ne.Date,
|
|
2769
2769
|
label: a("baseConfigCard.commonFields.created_at_label"),
|
|
2770
2770
|
order: 4,
|
|
2771
|
-
section:
|
|
2771
|
+
section: ke.Basic
|
|
2772
2772
|
},
|
|
2773
2773
|
tags: {
|
|
2774
|
-
type:
|
|
2774
|
+
type: ne.BadgeTag,
|
|
2775
2775
|
order: -1,
|
|
2776
2776
|
// the last property displayed
|
|
2777
|
-
section:
|
|
2777
|
+
section: ke.Basic
|
|
2778
2778
|
}
|
|
2779
|
-
}, f =
|
|
2780
|
-
var w,
|
|
2779
|
+
}, f = E(!1), I = E(!1), k = E(""), p = E(), A = T(() => {
|
|
2780
|
+
var w, F, V;
|
|
2781
2781
|
if (!p.value)
|
|
2782
2782
|
return [];
|
|
2783
|
-
const
|
|
2784
|
-
for (const
|
|
2785
|
-
const
|
|
2786
|
-
let
|
|
2787
|
-
(J || J === 0) && (
|
|
2783
|
+
const b = [], x = Object.keys(p.value).length;
|
|
2784
|
+
for (const S in p.value) {
|
|
2785
|
+
const q = (F = (w = r.configSchema) == null ? void 0 : w[S]) == null ? void 0 : F.order, J = (V = g[S]) == null ? void 0 : V.order;
|
|
2786
|
+
let X = x;
|
|
2787
|
+
(J || J === 0) && (X = J === -1 ? x + 1 : J), q && (X = q === -1 ? x + 1 : q), b.push([S, X]);
|
|
2788
2788
|
}
|
|
2789
|
-
return
|
|
2790
|
-
return
|
|
2791
|
-
}),
|
|
2792
|
-
var
|
|
2793
|
-
const
|
|
2789
|
+
return b.sort(function(S, q) {
|
|
2790
|
+
return S[1] - q[1];
|
|
2791
|
+
}), b.map((S) => {
|
|
2792
|
+
var q, J;
|
|
2793
|
+
const X = S[0], ee = (q = p.value) == null ? void 0 : q[X], te = ((J = r.configSchema) == null ? void 0 : J[X]) || {}, le = g[X];
|
|
2794
2794
|
return {
|
|
2795
|
-
key:
|
|
2796
|
-
value:
|
|
2797
|
-
hidden:
|
|
2798
|
-
type:
|
|
2799
|
-
label:
|
|
2800
|
-
tooltip:
|
|
2801
|
-
section:
|
|
2795
|
+
key: X,
|
|
2796
|
+
value: ee,
|
|
2797
|
+
hidden: te.hidden || !1,
|
|
2798
|
+
type: te.type ?? ((le == null ? void 0 : le.type) || ne.Text),
|
|
2799
|
+
label: te.label ?? ((le == null ? void 0 : le.label) || s(X)),
|
|
2800
|
+
tooltip: te.tooltip ?? ((le == null ? void 0 : le.tooltip) || void 0),
|
|
2801
|
+
section: te.section ?? ((le == null ? void 0 : le.section) || ke.Advanced)
|
|
2802
2802
|
};
|
|
2803
|
-
}).filter((
|
|
2804
|
-
}),
|
|
2805
|
-
var w,
|
|
2803
|
+
}).filter((S) => !S.hidden && S.key !== r.pluginConfigKey);
|
|
2804
|
+
}), C = T(() => {
|
|
2805
|
+
var w, F;
|
|
2806
2806
|
if (!p.value || !r.pluginConfigKey)
|
|
2807
2807
|
return [];
|
|
2808
|
-
const
|
|
2809
|
-
for (const
|
|
2810
|
-
const
|
|
2811
|
-
let
|
|
2812
|
-
|
|
2808
|
+
const V = p.value[r.pluginConfigKey] || {}, b = Object.keys(V).length, x = [];
|
|
2809
|
+
for (const S in V) {
|
|
2810
|
+
const q = (F = (w = r.pluginConfigSchema) == null ? void 0 : w[S]) == null ? void 0 : F.order, J = V[S];
|
|
2811
|
+
let X = J != null && J !== "" ? b - 1 : b;
|
|
2812
|
+
q && (X = q === -1 ? b + 1 : q), x.push([S, X]);
|
|
2813
2813
|
}
|
|
2814
|
-
return x.sort(function(
|
|
2815
|
-
return
|
|
2816
|
-
}), x.map((
|
|
2817
|
-
var
|
|
2818
|
-
const J =
|
|
2814
|
+
return x.sort(function(S, q) {
|
|
2815
|
+
return S[1] - q[1];
|
|
2816
|
+
}), x.map((S) => {
|
|
2817
|
+
var q;
|
|
2818
|
+
const J = S[0], X = V[J], ee = ((q = r.pluginConfigSchema) == null ? void 0 : q[J]) || {};
|
|
2819
2819
|
return {
|
|
2820
2820
|
key: J,
|
|
2821
|
-
value:
|
|
2822
|
-
hidden:
|
|
2823
|
-
type:
|
|
2824
|
-
label:
|
|
2825
|
-
tooltip:
|
|
2826
|
-
section:
|
|
2821
|
+
value: X,
|
|
2822
|
+
hidden: ee.hidden || !1,
|
|
2823
|
+
type: ee.type ?? ne.Text,
|
|
2824
|
+
label: ee.label ?? s(J),
|
|
2825
|
+
tooltip: ee.tooltip ?? void 0,
|
|
2826
|
+
section: ke.Plugin
|
|
2827
2827
|
};
|
|
2828
|
-
}).filter((
|
|
2829
|
-
}),
|
|
2830
|
-
var w,
|
|
2828
|
+
}).filter((S) => !S.hidden);
|
|
2829
|
+
}), O = T(() => {
|
|
2830
|
+
var w, F, V, b;
|
|
2831
2831
|
return {
|
|
2832
|
-
basic: (w =
|
|
2833
|
-
advanced: (
|
|
2834
|
-
plugin: (
|
|
2832
|
+
basic: (w = A.value) == null ? void 0 : w.filter((x) => x.section === ke.Basic),
|
|
2833
|
+
advanced: (F = A.value) == null ? void 0 : F.filter((x) => x.section === ke.Advanced),
|
|
2834
|
+
plugin: (b = C.value) == null ? void 0 : b.concat((V = A.value) == null ? void 0 : V.filter((x) => x.section === ke.Plugin))
|
|
2835
2835
|
};
|
|
2836
|
-
}),
|
|
2836
|
+
}), h = T(() => {
|
|
2837
2837
|
const w = [];
|
|
2838
|
-
return
|
|
2839
|
-
}),
|
|
2840
|
-
var w,
|
|
2841
|
-
let
|
|
2842
|
-
return r.config.app === "konnect" ?
|
|
2843
|
-
}),
|
|
2838
|
+
return O.value.basic.length && w.push("basic"), O.value.advanced.length && w.push("advanced"), O.value.plugin.length && w.push("plugin"), w;
|
|
2839
|
+
}), D = (w) => !!(w.tooltip || o[`${w.key}-label-tooltip`]), se = T(() => {
|
|
2840
|
+
var w, F;
|
|
2841
|
+
let V = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2842
|
+
return r.config.app === "konnect" ? V = V.replace(/{controlPlaneId}/gi, ((w = r.config) == null ? void 0 : w.controlPlaneId) || "") : r.config.app === "kongManager" && (V = V.replace(/\/{workspace}/gi, (F = r.config) != null && F.workspace ? `/${r.config.workspace}` : "")), V = V.replace(/{id}/gi, r.config.entityId), V;
|
|
2843
|
+
}), Y = (w) => {
|
|
2844
2844
|
p.value && w(JSON.stringify(p.value)) ? n("copy:success", p.value) : n("copy:error");
|
|
2845
2845
|
};
|
|
2846
|
-
return
|
|
2846
|
+
return Se(f, (w) => {
|
|
2847
2847
|
n("loading", w);
|
|
2848
2848
|
}, { immediate: !0 }), Qe(async () => {
|
|
2849
|
-
|
|
2849
|
+
I.value = !1, f.value = !0;
|
|
2850
2850
|
try {
|
|
2851
|
-
const { data: w } = await l.get(
|
|
2851
|
+
const { data: w } = await l.get(se.value);
|
|
2852
2852
|
if (r.dataKey)
|
|
2853
2853
|
if (typeof w[r.dataKey] < "u")
|
|
2854
2854
|
p.value = { ...w[r.dataKey] };
|
|
@@ -2856,132 +2856,132 @@ const Di = {
|
|
|
2856
2856
|
throw new Error(a("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
2857
2857
|
else
|
|
2858
2858
|
p.value = { ...w };
|
|
2859
|
-
Object.keys(r.configSchema).filter((
|
|
2860
|
-
p.value && typeof p.value[
|
|
2859
|
+
Object.keys(r.configSchema).filter((F) => r.configSchema[F].forceShow).forEach((F) => {
|
|
2860
|
+
p.value && typeof p.value[F] > "u" && (p.value[F] = null);
|
|
2861
2861
|
}), n("fetch:success", w);
|
|
2862
2862
|
} catch (w) {
|
|
2863
|
-
const
|
|
2864
|
-
|
|
2863
|
+
const F = i(w);
|
|
2864
|
+
k.value = F.startsWith("code") ? a("baseConfigCard.errors.load") : F, I.value = !0, n("fetch:error", w);
|
|
2865
2865
|
} finally {
|
|
2866
2866
|
f.value = !1;
|
|
2867
2867
|
}
|
|
2868
|
-
}), (w,
|
|
2869
|
-
const
|
|
2870
|
-
return m(),
|
|
2871
|
-
actions:
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
e.config.jsonYamlEnabled ? (m(), V
|
|
2868
|
+
}), (w, F) => {
|
|
2869
|
+
const V = P("KLabel"), b = P("KSelect"), x = P("KButton"), S = P("KClipboardProvider"), q = P("KSkeleton"), J = P("KEmptyState"), X = P("KCard");
|
|
2870
|
+
return m(), R(X, { class: "kong-ui-entity-base-config-card" }, Te({
|
|
2871
|
+
actions: v(() => [
|
|
2872
|
+
U("div", as, [
|
|
2873
|
+
Z(w.$slots, "actions", {}, void 0, !0),
|
|
2874
|
+
e.config.jsonYamlEnabled ? (m(), R(V, {
|
|
2875
2875
|
key: 0,
|
|
2876
2876
|
class: "config-format-select-label",
|
|
2877
2877
|
"data-testid": "config-format-select-label"
|
|
2878
2878
|
}, {
|
|
2879
|
-
default:
|
|
2880
|
-
|
|
2879
|
+
default: v(() => [
|
|
2880
|
+
Q(K(e.label), 1)
|
|
2881
2881
|
]),
|
|
2882
2882
|
_: 1
|
|
2883
|
-
})) :
|
|
2884
|
-
e.config.jsonYamlEnabled ? (m(),
|
|
2883
|
+
})) : z("", !0),
|
|
2884
|
+
e.config.jsonYamlEnabled ? (m(), R(b, {
|
|
2885
2885
|
key: 1,
|
|
2886
2886
|
appearance: "select",
|
|
2887
2887
|
"data-testid": "select-config-format",
|
|
2888
2888
|
items: c,
|
|
2889
2889
|
onChange: u
|
|
2890
|
-
})) :
|
|
2891
|
-
r.config.jsonYamlEnabled && e.configCardDoc ? (m(),
|
|
2890
|
+
})) : z("", !0),
|
|
2891
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (m(), R(x, {
|
|
2892
2892
|
key: 2,
|
|
2893
2893
|
appearance: "btn-link",
|
|
2894
2894
|
class: "book-icon",
|
|
2895
2895
|
"data-testid": "book-icon"
|
|
2896
2896
|
}, {
|
|
2897
|
-
default:
|
|
2898
|
-
|
|
2897
|
+
default: v(() => [
|
|
2898
|
+
U("a", {
|
|
2899
2899
|
href: e.configCardDoc,
|
|
2900
2900
|
rel: "noopener",
|
|
2901
2901
|
target: "_blank"
|
|
2902
2902
|
}, [
|
|
2903
|
-
|
|
2903
|
+
N(y(rs), { size: y(co) }, null, 8, ["size"])
|
|
2904
2904
|
], 8, is)
|
|
2905
2905
|
]),
|
|
2906
2906
|
_: 1
|
|
2907
|
-
})) :
|
|
2908
|
-
e.config.jsonYamlEnabled ?
|
|
2909
|
-
default:
|
|
2910
|
-
!f.value && !
|
|
2907
|
+
})) : z("", !0),
|
|
2908
|
+
e.config.jsonYamlEnabled ? z("", !0) : (m(), R(S, { key: 3 }, {
|
|
2909
|
+
default: v(({ copyToClipboard: ee }) => [
|
|
2910
|
+
!f.value && !I.value ? (m(), R(x, {
|
|
2911
2911
|
key: 0,
|
|
2912
2912
|
appearance: "btn-link",
|
|
2913
2913
|
"data-testid": "json-copy-button",
|
|
2914
|
-
onClick: (
|
|
2914
|
+
onClick: (te) => Y(ee)
|
|
2915
2915
|
}, {
|
|
2916
|
-
default:
|
|
2917
|
-
|
|
2916
|
+
default: v(() => [
|
|
2917
|
+
Q(K(y(a)("baseConfigCard.actions.copy")), 1)
|
|
2918
2918
|
]),
|
|
2919
2919
|
_: 2
|
|
2920
|
-
}, 1032, ["onClick"])) :
|
|
2920
|
+
}, 1032, ["onClick"])) : z("", !0)
|
|
2921
2921
|
]),
|
|
2922
2922
|
_: 1
|
|
2923
2923
|
}))
|
|
2924
2924
|
])
|
|
2925
2925
|
]),
|
|
2926
|
-
body:
|
|
2927
|
-
f.value ? (m(),
|
|
2926
|
+
body: v(() => [
|
|
2927
|
+
f.value ? (m(), R(q, {
|
|
2928
2928
|
key: 0,
|
|
2929
2929
|
"data-testid": "config-card-loader",
|
|
2930
2930
|
"table-columns": 2,
|
|
2931
2931
|
type: "table"
|
|
2932
|
-
})) :
|
|
2932
|
+
})) : I.value ? (m(), R(J, {
|
|
2933
2933
|
key: 1,
|
|
2934
2934
|
"data-testid": "config-card-fetch-error",
|
|
2935
2935
|
"is-error": ""
|
|
2936
2936
|
}, {
|
|
2937
|
-
message:
|
|
2938
|
-
|
|
2937
|
+
message: v(() => [
|
|
2938
|
+
U("h3", null, K(k.value), 1)
|
|
2939
2939
|
]),
|
|
2940
2940
|
_: 1
|
|
2941
|
-
})) :
|
|
2941
|
+
})) : z("", !0),
|
|
2942
2942
|
e.config.jsonYamlEnabled ? (m(), j("div", ss, [
|
|
2943
|
-
|
|
2943
|
+
N(Wi, {
|
|
2944
2944
|
format: d.value,
|
|
2945
|
-
"prop-list-types":
|
|
2946
|
-
"property-collections":
|
|
2945
|
+
"prop-list-types": h.value,
|
|
2946
|
+
"property-collections": O.value,
|
|
2947
2947
|
record: p.value
|
|
2948
2948
|
}, Te({ _: 2 }, [
|
|
2949
|
-
|
|
2950
|
-
name:
|
|
2951
|
-
fn:
|
|
2952
|
-
|
|
2953
|
-
row:
|
|
2954
|
-
rowValue:
|
|
2949
|
+
he(Object.keys(w.$slots), (ee) => ({
|
|
2950
|
+
name: ee,
|
|
2951
|
+
fn: v(({ row: te, rowValue: le }) => [
|
|
2952
|
+
Z(w.$slots, ee, {
|
|
2953
|
+
row: te,
|
|
2954
|
+
rowValue: le
|
|
2955
2955
|
}, void 0, !0)
|
|
2956
2956
|
])
|
|
2957
2957
|
}))
|
|
2958
2958
|
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
2959
2959
|
])) : (m(), j("div", ls, [
|
|
2960
|
-
(m(!0), j(
|
|
2961
|
-
key: `config-card-details-${
|
|
2962
|
-
class:
|
|
2963
|
-
"data-testid": `config-card-details-${
|
|
2960
|
+
(m(!0), j(be, null, he(h.value, (ee) => (m(), j("div", {
|
|
2961
|
+
key: `config-card-details-${ee}-props`,
|
|
2962
|
+
class: Ne(`config-card-details-${ee}-props`),
|
|
2963
|
+
"data-testid": `config-card-details-${ee}-props`
|
|
2964
2964
|
}, [
|
|
2965
|
-
|
|
2966
|
-
(m(!0), j(
|
|
2967
|
-
key:
|
|
2968
|
-
item:
|
|
2965
|
+
ee !== "basic" ? (m(), j("div", cs, K(ee === "advanced" ? y(a)("baseConfigCard.sections.advanced") : y(a)("baseConfigCard.sections.plugin")), 1)) : z("", !0),
|
|
2966
|
+
(m(!0), j(be, null, he(O.value[ee], (te) => (m(), R(St, {
|
|
2967
|
+
key: te.key,
|
|
2968
|
+
item: te
|
|
2969
2969
|
}, Te({
|
|
2970
|
-
label:
|
|
2971
|
-
|
|
2970
|
+
label: v(() => [
|
|
2971
|
+
Z(w.$slots, `${te.key}-label`, { row: te }, void 0, !0)
|
|
2972
2972
|
]),
|
|
2973
|
-
[
|
|
2974
|
-
|
|
2975
|
-
row:
|
|
2976
|
-
rowValue:
|
|
2973
|
+
[te.key]: v(({ rowValue: le }) => [
|
|
2974
|
+
Z(w.$slots, te.key, {
|
|
2975
|
+
row: te,
|
|
2976
|
+
rowValue: le
|
|
2977
2977
|
}, void 0, !0)
|
|
2978
2978
|
]),
|
|
2979
2979
|
_: 2
|
|
2980
2980
|
}, [
|
|
2981
|
-
|
|
2981
|
+
D(te) ? {
|
|
2982
2982
|
name: "label-tooltip",
|
|
2983
|
-
fn:
|
|
2984
|
-
|
|
2983
|
+
fn: v(() => [
|
|
2984
|
+
Z(w.$slots, `${te.key}-label-tooltip`, { row: te }, void 0, !0)
|
|
2985
2985
|
]),
|
|
2986
2986
|
key: "0"
|
|
2987
2987
|
} : void 0
|
|
@@ -2993,10 +2993,10 @@ const Di = {
|
|
|
2993
2993
|
}, [
|
|
2994
2994
|
e.hideTitle ? void 0 : {
|
|
2995
2995
|
name: "title",
|
|
2996
|
-
fn:
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
2996
|
+
fn: v(() => [
|
|
2997
|
+
U("div", os, [
|
|
2998
|
+
Z(w.$slots, "title", {}, () => [
|
|
2999
|
+
Q(K(y(a)("baseConfigCard.title")), 1)
|
|
3000
3000
|
], !0)
|
|
3001
3001
|
])
|
|
3002
3002
|
]),
|
|
@@ -3005,10 +3005,10 @@ const Di = {
|
|
|
3005
3005
|
]), 1024);
|
|
3006
3006
|
};
|
|
3007
3007
|
}
|
|
3008
|
-
}), ps = /* @__PURE__ */
|
|
3008
|
+
}), ps = /* @__PURE__ */ Ce(ds, [["__scopeId", "data-v-64349aa2"]]), fs = ["onReset", "onSubmit"], ms = {
|
|
3009
3009
|
class: "form-actions",
|
|
3010
3010
|
"data-testid": "form-actions"
|
|
3011
|
-
}, gs = /* @__PURE__ */
|
|
3011
|
+
}, gs = /* @__PURE__ */ ie({
|
|
3012
3012
|
__name: "EntityBaseForm",
|
|
3013
3013
|
props: {
|
|
3014
3014
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3058,22 +3058,22 @@ const Di = {
|
|
|
3058
3058
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3059
3059
|
setup(e, { emit: n }) {
|
|
3060
3060
|
var t;
|
|
3061
|
-
const r = e, o = wt(), { i18n: { t: a } } =
|
|
3061
|
+
const r = e, o = wt(), { i18n: { t: a } } = ce.useI18n(), { getMessageFromError: i } = ce.useErrors(), { axiosInstance: s } = ce.useAxios({
|
|
3062
3062
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3063
|
-
}), l =
|
|
3064
|
-
var p,
|
|
3063
|
+
}), l = E(!1), c = E(!1), d = E(""), u = T(() => r.canSubmit === !1 || r.isReadonly), g = T(() => {
|
|
3064
|
+
var p, A;
|
|
3065
3065
|
if (!r.editId)
|
|
3066
3066
|
return "";
|
|
3067
|
-
let
|
|
3068
|
-
return r.config.app === "konnect" ?
|
|
3067
|
+
let C = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3068
|
+
return r.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (A = r.config) != null && A.workspace ? `/${r.config.workspace}` : "")), C = C.replace(/{id}/gi, r.editId), C;
|
|
3069
3069
|
}), f = () => {
|
|
3070
|
-
r.config.cancelRoute ? o.push(r.config.cancelRoute) :
|
|
3071
|
-
},
|
|
3070
|
+
r.config.cancelRoute ? o.push(r.config.cancelRoute) : I();
|
|
3071
|
+
}, I = () => {
|
|
3072
3072
|
n("cancel");
|
|
3073
|
-
},
|
|
3073
|
+
}, k = () => {
|
|
3074
3074
|
u.value || n("submit");
|
|
3075
3075
|
};
|
|
3076
|
-
return
|
|
3076
|
+
return Se(() => l.value, (p) => {
|
|
3077
3077
|
n("loading", p);
|
|
3078
3078
|
}, { immediate: !0 }), Qe(async () => {
|
|
3079
3079
|
if (r.editId)
|
|
@@ -3082,63 +3082,63 @@ const Di = {
|
|
|
3082
3082
|
const { data: p } = await s.get(g.value);
|
|
3083
3083
|
n("fetch:success", p);
|
|
3084
3084
|
} catch (p) {
|
|
3085
|
-
const
|
|
3086
|
-
d.value =
|
|
3085
|
+
const A = i(p);
|
|
3086
|
+
d.value = A.startsWith("code") ? a("baseForm.errors.edit") : A, c.value = !0, n("fetch:error", p);
|
|
3087
3087
|
} finally {
|
|
3088
3088
|
l.value = !1;
|
|
3089
3089
|
}
|
|
3090
|
-
}), (p,
|
|
3091
|
-
const
|
|
3092
|
-
return m(),
|
|
3093
|
-
body:
|
|
3094
|
-
l.value ? (m(),
|
|
3090
|
+
}), (p, A) => {
|
|
3091
|
+
const C = P("KSkeleton"), O = P("KEmptyState"), h = P("KAlert"), D = P("KButton"), se = P("KCard");
|
|
3092
|
+
return m(), R(se, { class: "kong-ui-entity-base-form" }, {
|
|
3093
|
+
body: v(() => [
|
|
3094
|
+
l.value ? (m(), R(C, {
|
|
3095
3095
|
key: 0,
|
|
3096
3096
|
type: "form"
|
|
3097
|
-
})) : c.value ? (m(),
|
|
3097
|
+
})) : c.value ? (m(), R(O, {
|
|
3098
3098
|
key: 1,
|
|
3099
3099
|
"cta-text": y(a)("baseForm.actions.back"),
|
|
3100
3100
|
"data-testid": "form-fetch-error",
|
|
3101
3101
|
"handle-click": f,
|
|
3102
3102
|
"is-error": !0
|
|
3103
3103
|
}, {
|
|
3104
|
-
message:
|
|
3105
|
-
|
|
3104
|
+
message: v(() => [
|
|
3105
|
+
U("h3", null, K(d.value), 1)
|
|
3106
3106
|
]),
|
|
3107
3107
|
_: 1
|
|
3108
3108
|
}, 8, ["cta-text"])) : (m(), j("form", {
|
|
3109
3109
|
key: 2,
|
|
3110
3110
|
"data-testid": "form-content",
|
|
3111
|
-
onReset: rt(
|
|
3112
|
-
onSubmit: rt(
|
|
3111
|
+
onReset: rt(I, ["prevent"]),
|
|
3112
|
+
onSubmit: rt(k, ["prevent"])
|
|
3113
3113
|
}, [
|
|
3114
|
-
|
|
3115
|
-
e.errorMessage ? (m(),
|
|
3114
|
+
Z(p.$slots, "default", {}, void 0, !0),
|
|
3115
|
+
e.errorMessage ? (m(), R(h, {
|
|
3116
3116
|
key: 0,
|
|
3117
3117
|
"alert-message": e.errorMessage,
|
|
3118
3118
|
appearance: "danger",
|
|
3119
3119
|
"data-testid": "form-error"
|
|
3120
|
-
}, null, 8, ["alert-message"])) :
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3120
|
+
}, null, 8, ["alert-message"])) : z("", !0),
|
|
3121
|
+
U("div", ms, [
|
|
3122
|
+
Z(p.$slots, "form-actions", {}, () => [
|
|
3123
|
+
N(D, {
|
|
3124
3124
|
appearance: "outline",
|
|
3125
3125
|
"data-testid": "form-cancel",
|
|
3126
3126
|
disabled: e.isReadonly,
|
|
3127
3127
|
type: "reset"
|
|
3128
3128
|
}, {
|
|
3129
|
-
default:
|
|
3130
|
-
|
|
3129
|
+
default: v(() => [
|
|
3130
|
+
Q(K(y(a)("baseForm.actions.cancel")), 1)
|
|
3131
3131
|
]),
|
|
3132
3132
|
_: 1
|
|
3133
3133
|
}, 8, ["disabled"]),
|
|
3134
|
-
|
|
3134
|
+
N(D, {
|
|
3135
3135
|
appearance: "primary",
|
|
3136
3136
|
"data-testid": "form-submit",
|
|
3137
3137
|
disabled: u.value,
|
|
3138
3138
|
type: "submit"
|
|
3139
3139
|
}, {
|
|
3140
|
-
default:
|
|
3141
|
-
|
|
3140
|
+
default: v(() => [
|
|
3141
|
+
Q(K(y(a)("baseForm.actions.save")), 1)
|
|
3142
3142
|
]),
|
|
3143
3143
|
_: 1
|
|
3144
3144
|
}, 8, ["disabled"])
|
|
@@ -3150,10 +3150,10 @@ const Di = {
|
|
|
3150
3150
|
});
|
|
3151
3151
|
};
|
|
3152
3152
|
}
|
|
3153
|
-
}), ys = /* @__PURE__ */
|
|
3153
|
+
}), ys = /* @__PURE__ */ Ce(gs, [["__scopeId", "data-v-44a90aae"]]), hs = {
|
|
3154
3154
|
key: 0,
|
|
3155
3155
|
"data-testid": "first-col"
|
|
3156
|
-
}, vs = /* @__PURE__ */
|
|
3156
|
+
}, vs = /* @__PURE__ */ ie({
|
|
3157
3157
|
__name: "EntityBaseTableCell",
|
|
3158
3158
|
props: {
|
|
3159
3159
|
keyName: {
|
|
@@ -3166,68 +3166,68 @@ const Di = {
|
|
|
3166
3166
|
}
|
|
3167
3167
|
},
|
|
3168
3168
|
setup(e) {
|
|
3169
|
-
const n = e, t =
|
|
3170
|
-
var
|
|
3171
|
-
return ((
|
|
3172
|
-
}), r =
|
|
3173
|
-
var
|
|
3174
|
-
return ((
|
|
3175
|
-
}), o =
|
|
3176
|
-
var
|
|
3177
|
-
const
|
|
3178
|
-
return
|
|
3169
|
+
const n = e, t = T(() => {
|
|
3170
|
+
var k;
|
|
3171
|
+
return ((k = n.rowEl) == null ? void 0 : k.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3172
|
+
}), r = T(() => {
|
|
3173
|
+
var k;
|
|
3174
|
+
return ((k = t.value) == null ? void 0 : k.querySelector('[data-testid="first-col"]')) || null;
|
|
3175
|
+
}), o = T(() => {
|
|
3176
|
+
var k, p;
|
|
3177
|
+
const A = (k = n.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3178
|
+
return A ? ((p = A[0]) == null ? void 0 : p.getAttribute("data-testid")) === n.keyName : !1;
|
|
3179
3179
|
});
|
|
3180
3180
|
let a;
|
|
3181
3181
|
const i = () => {
|
|
3182
3182
|
a && (a.disconnect(), a = void 0);
|
|
3183
3183
|
}, s = () => {
|
|
3184
|
-
var
|
|
3185
|
-
c.value = ((
|
|
3186
|
-
}, l =
|
|
3184
|
+
var k, p, A;
|
|
3185
|
+
c.value = ((k = r.value) == null ? void 0 : k.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((A = l.value) == null ? void 0 : A.innerText) || "";
|
|
3186
|
+
}, l = E({}), c = E(0), d = E(0), u = E(""), g = T(() => [r.value, t.value]), f = Se(
|
|
3187
3187
|
g,
|
|
3188
|
-
(
|
|
3188
|
+
(k) => {
|
|
3189
3189
|
if (o.value && (i(), "ResizeObserver" in window && window)) {
|
|
3190
3190
|
a = new ResizeObserver((p) => {
|
|
3191
3191
|
window.requestAnimationFrame(() => {
|
|
3192
3192
|
!Array.isArray(p) || !p.length || s();
|
|
3193
3193
|
});
|
|
3194
3194
|
});
|
|
3195
|
-
for (const p of
|
|
3195
|
+
for (const p of k)
|
|
3196
3196
|
p && a.observe(p);
|
|
3197
3197
|
}
|
|
3198
3198
|
},
|
|
3199
3199
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3200
|
-
),
|
|
3200
|
+
), I = T(() => o.value ? c.value > d.value : !1);
|
|
3201
3201
|
return pr(() => {
|
|
3202
3202
|
s();
|
|
3203
3203
|
}), fr(() => {
|
|
3204
3204
|
f();
|
|
3205
|
-
}), (
|
|
3206
|
-
const
|
|
3205
|
+
}), (k, p) => {
|
|
3206
|
+
const A = P("KTooltip");
|
|
3207
3207
|
return m(), j("span", {
|
|
3208
3208
|
ref_key: "contentRef",
|
|
3209
3209
|
ref: l,
|
|
3210
3210
|
class: "content-wrapper"
|
|
3211
3211
|
}, [
|
|
3212
3212
|
o.value ? (m(), j("span", hs, [
|
|
3213
|
-
|
|
3214
|
-
label:
|
|
3213
|
+
N(A, {
|
|
3214
|
+
label: I.value ? u.value : "",
|
|
3215
3215
|
"max-width": "300",
|
|
3216
3216
|
placement: "bottomStart"
|
|
3217
3217
|
}, {
|
|
3218
|
-
default:
|
|
3219
|
-
|
|
3218
|
+
default: v(() => [
|
|
3219
|
+
Z(k.$slots, "default", {}, void 0, !0)
|
|
3220
3220
|
]),
|
|
3221
3221
|
_: 3
|
|
3222
3222
|
}, 8, ["label"])
|
|
3223
|
-
])) :
|
|
3223
|
+
])) : Z(k.$slots, "default", { key: 1 }, void 0, !0)
|
|
3224
3224
|
], 512);
|
|
3225
3225
|
};
|
|
3226
3226
|
}
|
|
3227
|
-
}), bs = /* @__PURE__ */
|
|
3227
|
+
}), bs = /* @__PURE__ */ Ce(vs, [["__scopeId", "data-v-e42a20c9"]]), ks = { class: "toolbar-container" }, Cs = {
|
|
3228
3228
|
key: 0,
|
|
3229
3229
|
class: "toolbar-button-container"
|
|
3230
|
-
}, _s = ["data-testid"], ws = /* @__PURE__ */
|
|
3230
|
+
}, _s = ["data-testid"], ws = /* @__PURE__ */ ie({
|
|
3231
3231
|
__name: "EntityBaseTable",
|
|
3232
3232
|
props: {
|
|
3233
3233
|
// table header configuration
|
|
@@ -3287,8 +3287,8 @@ const Di = {
|
|
|
3287
3287
|
// error message to show in the error state
|
|
3288
3288
|
// this prop being set (or empty) determines if the KTable is in an error state
|
|
3289
3289
|
errorMessage: {
|
|
3290
|
-
type: String,
|
|
3291
|
-
default:
|
|
3290
|
+
type: [String, Object],
|
|
3291
|
+
default: null
|
|
3292
3292
|
},
|
|
3293
3293
|
disablePaginationPageJump: {
|
|
3294
3294
|
type: Boolean,
|
|
@@ -3336,65 +3336,76 @@ const Di = {
|
|
|
3336
3336
|
},
|
|
3337
3337
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3338
3338
|
setup(e, { emit: n }) {
|
|
3339
|
-
const t = e, { i18n: { t: r } } =
|
|
3340
|
-
|
|
3341
|
-
return
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3339
|
+
const t = e, { i18n: { t: r } } = ce.useI18n(), o = T(() => {
|
|
3340
|
+
var h, D;
|
|
3341
|
+
return typeof t.errorMessage == "string" ? {
|
|
3342
|
+
hasError: !!t.errorMessage,
|
|
3343
|
+
title: t.errorMessage,
|
|
3344
|
+
message: void 0
|
|
3345
|
+
} : {
|
|
3346
|
+
hasError: !!t.errorMessage,
|
|
3347
|
+
title: (h = t.errorMessage) == null ? void 0 : h.title,
|
|
3348
|
+
message: (D = t.errorMessage) == null ? void 0 : D.message
|
|
3349
|
+
};
|
|
3350
|
+
}), a = T(() => t.cacheIdentifier || t.preferencesStorageKey), i = (h) => h.hasData || !!t.query, s = T(() => {
|
|
3351
|
+
const h = [];
|
|
3352
|
+
return Object.keys(t.tableHeaders).forEach((D) => {
|
|
3353
|
+
const se = t.tableHeaders[D];
|
|
3354
|
+
h.push({
|
|
3355
|
+
label: se.label ?? D,
|
|
3356
|
+
key: D,
|
|
3357
|
+
sortable: se.sortable ?? !1
|
|
3347
3358
|
});
|
|
3348
|
-
}), t.enableEntityActions &&
|
|
3359
|
+
}), t.enableEntityActions && h.push({
|
|
3349
3360
|
key: "actions",
|
|
3350
3361
|
hideLabel: !0
|
|
3351
|
-
}),
|
|
3352
|
-
}),
|
|
3353
|
-
"data-rowid":
|
|
3354
|
-
"data-testid":
|
|
3355
|
-
...t.rowAttributes(
|
|
3356
|
-
}),
|
|
3357
|
-
var
|
|
3358
|
-
return (
|
|
3359
|
-
},
|
|
3360
|
-
const
|
|
3361
|
-
"data-testid":
|
|
3362
|
-
...t.cellAttributes(
|
|
3362
|
+
}), h;
|
|
3363
|
+
}), l = (h) => ({
|
|
3364
|
+
"data-rowid": h.id,
|
|
3365
|
+
"data-testid": h.name,
|
|
3366
|
+
...t.rowAttributes(h)
|
|
3367
|
+
}), c = E({}), d = (h) => {
|
|
3368
|
+
var D;
|
|
3369
|
+
return (D = c.value) == null ? void 0 : D.$el.querySelector(`[data-rowid="${h.id}"]`);
|
|
3370
|
+
}, u = (h) => {
|
|
3371
|
+
const D = {
|
|
3372
|
+
"data-testid": h.headerKey,
|
|
3373
|
+
...t.cellAttributes(h)
|
|
3363
3374
|
};
|
|
3364
|
-
return
|
|
3375
|
+
return h.colIndex === 0 && (D.style = {
|
|
3365
3376
|
maxWidth: "250px",
|
|
3366
3377
|
overflowX: "hidden",
|
|
3367
3378
|
textOverflow: "ellipsis"
|
|
3368
|
-
}),
|
|
3369
|
-
}, u = () => {
|
|
3370
|
-
n("empty-state-cta-clicked"), g();
|
|
3379
|
+
}), D;
|
|
3371
3380
|
}, g = () => {
|
|
3381
|
+
n("empty-state-cta-clicked"), f();
|
|
3382
|
+
}, f = () => {
|
|
3372
3383
|
n("clear-search-input");
|
|
3373
|
-
},
|
|
3374
|
-
n("click:row",
|
|
3375
|
-
}),
|
|
3376
|
-
n("sort",
|
|
3377
|
-
}, { setTablePreferences:
|
|
3378
|
-
const
|
|
3384
|
+
}, I = T(() => t.disableRowClick ? void 0 : (h, D) => {
|
|
3385
|
+
n("click:row", D);
|
|
3386
|
+
}), k = (h) => {
|
|
3387
|
+
n("sort", h);
|
|
3388
|
+
}, { setTablePreferences: p, getTablePreferences: A } = Ar(), C = T(() => {
|
|
3389
|
+
const h = A(t.preferencesStorageKey);
|
|
3379
3390
|
return {
|
|
3380
3391
|
...t.initialFetcherParams,
|
|
3381
|
-
...
|
|
3392
|
+
...h
|
|
3382
3393
|
};
|
|
3383
|
-
}),
|
|
3384
|
-
t.preferencesStorageKey &&
|
|
3394
|
+
}), O = (h) => {
|
|
3395
|
+
t.preferencesStorageKey && p(t.preferencesStorageKey, h);
|
|
3385
3396
|
};
|
|
3386
|
-
return (
|
|
3387
|
-
const
|
|
3388
|
-
return m(), V
|
|
3397
|
+
return (h, D) => {
|
|
3398
|
+
const se = P("KIcon"), Y = P("KButton"), w = P("KDropdownMenu"), F = P("KTable"), V = P("KCard");
|
|
3399
|
+
return m(), R(V, {
|
|
3389
3400
|
class: "kong-ui-entity-base-table",
|
|
3390
3401
|
title: e.title
|
|
3391
3402
|
}, {
|
|
3392
|
-
body:
|
|
3393
|
-
|
|
3403
|
+
body: v(() => [
|
|
3404
|
+
N(F, {
|
|
3394
3405
|
ref_key: "tableRefs",
|
|
3395
|
-
ref:
|
|
3396
|
-
"cache-identifier":
|
|
3397
|
-
"cell-attrs":
|
|
3406
|
+
ref: c,
|
|
3407
|
+
"cache-identifier": a.value,
|
|
3408
|
+
"cell-attrs": u,
|
|
3398
3409
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3399
3410
|
"disable-sorting": e.disableSorting,
|
|
3400
3411
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
@@ -3405,56 +3416,57 @@ const Di = {
|
|
|
3405
3416
|
"empty-state-message": e.query ? y(r)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3406
3417
|
"empty-state-title": e.query ? y(r)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3407
3418
|
"enable-client-sort": e.enableClientSort,
|
|
3408
|
-
"error-state-
|
|
3419
|
+
"error-state-message": o.value.message,
|
|
3420
|
+
"error-state-title": o.value.title,
|
|
3409
3421
|
fetcher: e.fetcher,
|
|
3410
3422
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3411
|
-
"has-error":
|
|
3412
|
-
headers:
|
|
3423
|
+
"has-error": o.value.hasError,
|
|
3424
|
+
headers: s.value,
|
|
3413
3425
|
"hide-pagination-when-optional": "",
|
|
3414
|
-
"initial-fetcher-params":
|
|
3426
|
+
"initial-fetcher-params": C.value,
|
|
3415
3427
|
"is-loading": e.isLoading,
|
|
3416
3428
|
"pagination-type": e.paginationType,
|
|
3417
|
-
"row-attrs":
|
|
3429
|
+
"row-attrs": l,
|
|
3418
3430
|
"search-input": e.query,
|
|
3419
|
-
onKtableEmptyStateCtaClicked:
|
|
3420
|
-
"onRow:click":
|
|
3421
|
-
onSort:
|
|
3422
|
-
"onUpdate:tablePreferences":
|
|
3431
|
+
onKtableEmptyStateCtaClicked: g,
|
|
3432
|
+
"onRow:click": I.value,
|
|
3433
|
+
onSort: D[0] || (D[0] = (b) => k(b)),
|
|
3434
|
+
"onUpdate:tablePreferences": O
|
|
3423
3435
|
}, Te({
|
|
3424
|
-
toolbar:
|
|
3425
|
-
et(
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
])) :
|
|
3436
|
+
toolbar: v(({ state: b }) => [
|
|
3437
|
+
et(U("div", ks, [
|
|
3438
|
+
Z(h.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3439
|
+
h.$slots["toolbar-button"] ? (m(), j("div", Cs, [
|
|
3440
|
+
Z(h.$slots, "toolbar-button", {}, void 0, !0)
|
|
3441
|
+
])) : z("", !0)
|
|
3430
3442
|
], 512), [
|
|
3431
|
-
[tt,
|
|
3443
|
+
[tt, i(b)]
|
|
3432
3444
|
])
|
|
3433
3445
|
]),
|
|
3434
|
-
actions:
|
|
3435
|
-
|
|
3446
|
+
actions: v(({ row: b, rowKey: x, rowValue: S }) => [
|
|
3447
|
+
U("div", {
|
|
3436
3448
|
class: "actions-container",
|
|
3437
|
-
"data-testid":
|
|
3449
|
+
"data-testid": b.name
|
|
3438
3450
|
}, [
|
|
3439
|
-
|
|
3451
|
+
N(w, {
|
|
3440
3452
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3441
3453
|
width: e.dropdownMenuWidth
|
|
3442
3454
|
}, {
|
|
3443
|
-
items:
|
|
3444
|
-
|
|
3445
|
-
row:
|
|
3446
|
-
rowKey:
|
|
3447
|
-
rowValue:
|
|
3455
|
+
items: v(() => [
|
|
3456
|
+
Z(h.$slots, "actions", {
|
|
3457
|
+
row: b,
|
|
3458
|
+
rowKey: x,
|
|
3459
|
+
rowValue: S
|
|
3448
3460
|
}, void 0, !0)
|
|
3449
3461
|
]),
|
|
3450
|
-
default:
|
|
3451
|
-
|
|
3462
|
+
default: v(() => [
|
|
3463
|
+
N(Y, {
|
|
3452
3464
|
class: "actions-trigger",
|
|
3453
3465
|
"data-testid": "overflow-actions-button",
|
|
3454
3466
|
size: "small"
|
|
3455
3467
|
}, {
|
|
3456
|
-
icon:
|
|
3457
|
-
|
|
3468
|
+
icon: v(() => [
|
|
3469
|
+
N(se, {
|
|
3458
3470
|
color: y(lo),
|
|
3459
3471
|
icon: "more",
|
|
3460
3472
|
size: "16"
|
|
@@ -3469,39 +3481,39 @@ const Di = {
|
|
|
3469
3481
|
]),
|
|
3470
3482
|
_: 2
|
|
3471
3483
|
}, [
|
|
3472
|
-
|
|
3473
|
-
name:
|
|
3474
|
-
fn:
|
|
3475
|
-
|
|
3476
|
-
"key-name": String(
|
|
3477
|
-
"row-el":
|
|
3484
|
+
he(e.tableHeaders, (b, x) => ({
|
|
3485
|
+
name: x,
|
|
3486
|
+
fn: v(({ row: S, rowKey: q, rowValue: J }) => [
|
|
3487
|
+
N(bs, {
|
|
3488
|
+
"key-name": String(x),
|
|
3489
|
+
"row-el": d(S)
|
|
3478
3490
|
}, {
|
|
3479
|
-
default:
|
|
3480
|
-
|
|
3481
|
-
row:
|
|
3482
|
-
rowKey:
|
|
3483
|
-
rowValue:
|
|
3491
|
+
default: v(() => [
|
|
3492
|
+
Z(h.$slots, x, {
|
|
3493
|
+
row: S,
|
|
3494
|
+
rowKey: q,
|
|
3495
|
+
rowValue: J
|
|
3484
3496
|
}, () => [
|
|
3485
|
-
|
|
3497
|
+
Q(K(J), 1)
|
|
3486
3498
|
], !0)
|
|
3487
3499
|
]),
|
|
3488
3500
|
_: 2
|
|
3489
3501
|
}, 1032, ["key-name", "row-el"])
|
|
3490
3502
|
])
|
|
3491
3503
|
}))
|
|
3492
|
-
]), 1032, ["cache-identifier", "disable-pagination-page-jump", "disable-sorting", "empty-state-action-button-icon", "empty-state-action-message", "empty-state-action-route", "empty-state-icon", "empty-state-message", "empty-state-title", "enable-client-sort", "error-state-title", "fetcher", "fetcher-cache-key", "has-error", "headers", "initial-fetcher-params", "is-loading", "pagination-type", "search-input", "onRow:click"])
|
|
3504
|
+
]), 1032, ["cache-identifier", "disable-pagination-page-jump", "disable-sorting", "empty-state-action-button-icon", "empty-state-action-message", "empty-state-action-route", "empty-state-icon", "empty-state-message", "empty-state-title", "enable-client-sort", "error-state-message", "error-state-title", "fetcher", "fetcher-cache-key", "has-error", "headers", "initial-fetcher-params", "is-loading", "pagination-type", "search-input", "onRow:click"])
|
|
3493
3505
|
]),
|
|
3494
3506
|
_: 3
|
|
3495
3507
|
}, 8, ["title"]);
|
|
3496
3508
|
};
|
|
3497
3509
|
}
|
|
3498
|
-
}), Is = /* @__PURE__ */
|
|
3510
|
+
}), Is = /* @__PURE__ */ Ce(ws, [["__scopeId", "data-v-11bb0e6e"]]), As = {
|
|
3499
3511
|
key: 0,
|
|
3500
3512
|
class: "kong-ui-entity-delete-error"
|
|
3501
|
-
},
|
|
3513
|
+
}, xs = {
|
|
3502
3514
|
key: 1,
|
|
3503
3515
|
class: "description"
|
|
3504
|
-
},
|
|
3516
|
+
}, Ss = /* @__PURE__ */ ie({
|
|
3505
3517
|
__name: "EntityDeleteModal",
|
|
3506
3518
|
props: {
|
|
3507
3519
|
visible: {
|
|
@@ -3540,14 +3552,14 @@ const Di = {
|
|
|
3540
3552
|
},
|
|
3541
3553
|
emits: ["cancel", "proceed"],
|
|
3542
3554
|
setup(e, { emit: n }) {
|
|
3543
|
-
const t = e, { i18nT: r } =
|
|
3555
|
+
const t = e, { i18nT: r } = ce.useI18n(), o = T(() => t.needConfirm ? t.entityName : ""), a = () => {
|
|
3544
3556
|
n("cancel");
|
|
3545
3557
|
}, i = () => {
|
|
3546
3558
|
n("proceed");
|
|
3547
3559
|
};
|
|
3548
3560
|
return (s, l) => {
|
|
3549
|
-
const c =
|
|
3550
|
-
return m(),
|
|
3561
|
+
const c = P("KAlert"), d = P("KPrompt");
|
|
3562
|
+
return m(), R(d, {
|
|
3551
3563
|
"action-button-text": "Yes, delete",
|
|
3552
3564
|
"action-pending": e.actionPending,
|
|
3553
3565
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3558,44 +3570,44 @@ const Di = {
|
|
|
3558
3570
|
onCanceled: a,
|
|
3559
3571
|
onProceed: i
|
|
3560
3572
|
}, {
|
|
3561
|
-
"body-content":
|
|
3573
|
+
"body-content": v(() => [
|
|
3562
3574
|
e.error ? (m(), j("div", As, [
|
|
3563
|
-
|
|
3564
|
-
alertMessage:
|
|
3565
|
-
|
|
3575
|
+
N(c, { appearance: "danger" }, {
|
|
3576
|
+
alertMessage: v(() => [
|
|
3577
|
+
Q(K(e.error), 1)
|
|
3566
3578
|
]),
|
|
3567
3579
|
_: 1
|
|
3568
3580
|
})
|
|
3569
|
-
])) :
|
|
3570
|
-
|
|
3581
|
+
])) : z("", !0),
|
|
3582
|
+
N(y(r), {
|
|
3571
3583
|
class: "message",
|
|
3572
3584
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3573
3585
|
tag: "p"
|
|
3574
3586
|
}, Te({
|
|
3575
|
-
entityType:
|
|
3576
|
-
|
|
3587
|
+
entityType: v(() => [
|
|
3588
|
+
Q(K(t.entityType), 1)
|
|
3577
3589
|
]),
|
|
3578
3590
|
_: 2
|
|
3579
3591
|
}, [
|
|
3580
3592
|
t.entityName ? {
|
|
3581
3593
|
name: "entityName",
|
|
3582
|
-
fn:
|
|
3583
|
-
|
|
3594
|
+
fn: v(() => [
|
|
3595
|
+
U("strong", null, K(t.entityName), 1)
|
|
3584
3596
|
]),
|
|
3585
3597
|
key: "0"
|
|
3586
3598
|
} : void 0
|
|
3587
3599
|
]), 1032, ["keypath"]),
|
|
3588
|
-
t.description || s.$slots.description ? (m(), j("div",
|
|
3589
|
-
|
|
3590
|
-
|
|
3600
|
+
t.description || s.$slots.description ? (m(), j("div", xs, [
|
|
3601
|
+
Z(s.$slots, "description", {}, () => [
|
|
3602
|
+
U("p", null, K(t.description), 1)
|
|
3591
3603
|
], !0)
|
|
3592
|
-
])) :
|
|
3604
|
+
])) : z("", !0)
|
|
3593
3605
|
]),
|
|
3594
3606
|
_: 3
|
|
3595
3607
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3596
3608
|
};
|
|
3597
3609
|
}
|
|
3598
|
-
}), Ts = /* @__PURE__ */
|
|
3610
|
+
}), Ts = /* @__PURE__ */ Ce(Ss, [["__scopeId", "data-v-1c9a2a07"]]), $s = {
|
|
3599
3611
|
fill: "none",
|
|
3600
3612
|
height: "20",
|
|
3601
3613
|
viewBox: "0 0 20 20",
|
|
@@ -3609,7 +3621,7 @@ const Di = {
|
|
|
3609
3621
|
width: "20",
|
|
3610
3622
|
x: "0",
|
|
3611
3623
|
y: "0"
|
|
3612
|
-
}, js = ["fill"], Es = { mask: "url(#mask0_180_20349)" }, Os = ["fill"],
|
|
3624
|
+
}, js = ["fill"], Es = { mask: "url(#mask0_180_20349)" }, Os = ["fill"], Ks = /* @__PURE__ */ ie({
|
|
3613
3625
|
__name: "IconFilter",
|
|
3614
3626
|
props: {
|
|
3615
3627
|
color: {
|
|
@@ -3619,25 +3631,25 @@ const Di = {
|
|
|
3619
3631
|
},
|
|
3620
3632
|
setup(e) {
|
|
3621
3633
|
return (n, t) => (m(), j("svg", $s, [
|
|
3622
|
-
|
|
3623
|
-
|
|
3634
|
+
U("mask", Ms, [
|
|
3635
|
+
U("rect", {
|
|
3624
3636
|
fill: e.color,
|
|
3625
3637
|
height: "20",
|
|
3626
3638
|
width: "20"
|
|
3627
3639
|
}, null, 8, js)
|
|
3628
3640
|
]),
|
|
3629
|
-
|
|
3630
|
-
|
|
3641
|
+
U("g", Es, [
|
|
3642
|
+
U("path", {
|
|
3631
3643
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3632
3644
|
fill: e.color
|
|
3633
3645
|
}, null, 8, Os)
|
|
3634
3646
|
])
|
|
3635
3647
|
]));
|
|
3636
3648
|
}
|
|
3637
|
-
}),
|
|
3649
|
+
}), Ns = {
|
|
3638
3650
|
key: 1,
|
|
3639
3651
|
class: "kong-ui-entity-filter"
|
|
3640
|
-
},
|
|
3652
|
+
}, Fs = { class: "menu-item-title" }, Bs = { class: "menu-item-indicator" }, Ps = { class: "menu-item-body" }, qs = ["for"], Ls = { class: "menu-item-buttons" }, Us = /* @__PURE__ */ ie({
|
|
3641
3653
|
__name: "EntityFilter",
|
|
3642
3654
|
props: {
|
|
3643
3655
|
// filter config, either exact match or fuzzy match
|
|
@@ -3657,21 +3669,21 @@ const Di = {
|
|
|
3657
3669
|
},
|
|
3658
3670
|
emits: ["update:modelValue"],
|
|
3659
3671
|
setup(e, { emit: n }) {
|
|
3660
|
-
const t = e, { i18n: { t: r } } =
|
|
3672
|
+
const t = e, { i18n: { t: r } } = ce.useI18n(), o = E(!1), a = E({}), i = T(() => {
|
|
3661
3673
|
const p = [];
|
|
3662
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
3663
|
-
|
|
3674
|
+
return new URLSearchParams(t.modelValue).forEach((A, C) => {
|
|
3675
|
+
A !== "" && p.push(C);
|
|
3664
3676
|
}), p;
|
|
3665
|
-
}), s =
|
|
3677
|
+
}), s = T(() => {
|
|
3666
3678
|
const p = t.config.fields;
|
|
3667
|
-
return Object.keys(p).filter((
|
|
3668
|
-
label: p[
|
|
3669
|
-
value:
|
|
3679
|
+
return Object.keys(p).filter((A) => p[A].searchable).map((A) => ({
|
|
3680
|
+
label: p[A].label || A,
|
|
3681
|
+
value: A
|
|
3670
3682
|
}));
|
|
3671
3683
|
});
|
|
3672
|
-
|
|
3673
|
-
a.value = {}, new URLSearchParams(p).forEach((
|
|
3674
|
-
a.value[
|
|
3684
|
+
Se(() => t.modelValue, (p) => {
|
|
3685
|
+
a.value = {}, new URLSearchParams(p).forEach((A, C) => {
|
|
3686
|
+
a.value[C] = A;
|
|
3675
3687
|
});
|
|
3676
3688
|
});
|
|
3677
3689
|
const l = () => {
|
|
@@ -3679,28 +3691,28 @@ const Di = {
|
|
|
3679
3691
|
}, c = (p) => {
|
|
3680
3692
|
n("update:modelValue", p);
|
|
3681
3693
|
}, d = (p) => `filter-${p}`, u = (p) => {
|
|
3682
|
-
var
|
|
3683
|
-
return (((
|
|
3684
|
-
value:
|
|
3685
|
-
label:
|
|
3694
|
+
var A, C;
|
|
3695
|
+
return (((C = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : C.values) ?? []).map((O) => ({
|
|
3696
|
+
value: O,
|
|
3697
|
+
label: O
|
|
3686
3698
|
}));
|
|
3687
3699
|
}, g = (p) => {
|
|
3688
|
-
var
|
|
3689
|
-
return ((
|
|
3700
|
+
var A, C;
|
|
3701
|
+
return ((C = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : C.type) ?? "text";
|
|
3690
3702
|
}, f = (p) => {
|
|
3691
3703
|
a.value = {
|
|
3692
3704
|
...a.value,
|
|
3693
3705
|
[p]: ""
|
|
3694
|
-
},
|
|
3695
|
-
},
|
|
3696
|
-
a.value = {},
|
|
3697
|
-
},
|
|
3698
|
-
const
|
|
3699
|
-
p && (o.value = !1), n("update:modelValue", new URLSearchParams(
|
|
3706
|
+
}, k();
|
|
3707
|
+
}, I = () => {
|
|
3708
|
+
a.value = {}, k(!0);
|
|
3709
|
+
}, k = (p = !1) => {
|
|
3710
|
+
const A = Object.keys(a.value).reduce((C, O) => (a.value[O] && (C[O] = `${a.value[O]}`), C), {});
|
|
3711
|
+
p && (o.value = !1), n("update:modelValue", new URLSearchParams(A).toString());
|
|
3700
3712
|
};
|
|
3701
|
-
return (p,
|
|
3702
|
-
const
|
|
3703
|
-
return e.config.isExactMatch ? (m(),
|
|
3713
|
+
return (p, A) => {
|
|
3714
|
+
const C = P("KInput"), O = P("KButton"), h = P("KSelect"), D = P("KMenuItem"), se = P("KMenu");
|
|
3715
|
+
return e.config.isExactMatch ? (m(), R(C, {
|
|
3704
3716
|
key: 0,
|
|
3705
3717
|
autocomplete: "off",
|
|
3706
3718
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3709,91 +3721,91 @@ const Di = {
|
|
|
3709
3721
|
placeholder: e.config.placeholder,
|
|
3710
3722
|
"onUpdate:modelValue": c
|
|
3711
3723
|
}, {
|
|
3712
|
-
icon:
|
|
3713
|
-
|
|
3724
|
+
icon: v(() => [
|
|
3725
|
+
N(Ks)
|
|
3714
3726
|
]),
|
|
3715
3727
|
_: 1
|
|
3716
|
-
}, 8, ["model-value", "placeholder"])) : (m(), j("div",
|
|
3717
|
-
|
|
3728
|
+
}, 8, ["model-value", "placeholder"])) : (m(), j("div", Ns, [
|
|
3729
|
+
N(O, {
|
|
3718
3730
|
appearance: "btn-link",
|
|
3719
3731
|
"data-testid": "filter-button",
|
|
3720
3732
|
icon: "filter",
|
|
3721
3733
|
onClick: l
|
|
3722
3734
|
}, {
|
|
3723
|
-
default:
|
|
3724
|
-
|
|
3735
|
+
default: v(() => [
|
|
3736
|
+
Q(K(y(r)("filter.filterButtonText")) + " " + K(i.value.length > 0 ? `(${i.value.length})` : ""), 1)
|
|
3725
3737
|
]),
|
|
3726
3738
|
_: 1
|
|
3727
3739
|
}),
|
|
3728
|
-
et(
|
|
3740
|
+
et(U("div", {
|
|
3729
3741
|
class: "kong-ui-entity-filter-backdrop",
|
|
3730
3742
|
onClick: l
|
|
3731
3743
|
}, null, 512), [
|
|
3732
3744
|
[tt, o.value]
|
|
3733
3745
|
]),
|
|
3734
|
-
et(
|
|
3735
|
-
body:
|
|
3736
|
-
(m(!0), j(
|
|
3737
|
-
key:
|
|
3738
|
-
"data-testid":
|
|
3746
|
+
et(N(se, { class: "kong-ui-entity-filter-menu" }, {
|
|
3747
|
+
body: v(() => [
|
|
3748
|
+
(m(!0), j(be, null, he(s.value, (Y, w) => (m(), R(D, {
|
|
3749
|
+
key: Y.value,
|
|
3750
|
+
"data-testid": Y.value,
|
|
3739
3751
|
expandable: "",
|
|
3740
3752
|
"last-menu-item": w === s.value.length - 1
|
|
3741
3753
|
}, {
|
|
3742
|
-
itemTitle:
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
et(
|
|
3746
|
-
[tt, i.value.includes(
|
|
3754
|
+
itemTitle: v(() => [
|
|
3755
|
+
U("span", Fs, [
|
|
3756
|
+
Q(K(Y.label) + " ", 1),
|
|
3757
|
+
et(U("span", Bs, null, 512), [
|
|
3758
|
+
[tt, i.value.includes(Y.value)]
|
|
3747
3759
|
])
|
|
3748
3760
|
])
|
|
3749
3761
|
]),
|
|
3750
|
-
itemBody:
|
|
3751
|
-
var
|
|
3762
|
+
itemBody: v(() => {
|
|
3763
|
+
var F, V;
|
|
3752
3764
|
return [
|
|
3753
|
-
|
|
3754
|
-
|
|
3765
|
+
U("div", Ps, [
|
|
3766
|
+
U("label", {
|
|
3755
3767
|
class: "menu-item-label",
|
|
3756
|
-
for: d(
|
|
3757
|
-
},
|
|
3758
|
-
((
|
|
3768
|
+
for: d(Y.value)
|
|
3769
|
+
}, K(y(r)("filter.fieldLabel")), 9, qs),
|
|
3770
|
+
((V = (F = e.config.schema) == null ? void 0 : F[Y.value]) == null ? void 0 : V.type) === "select" ? (m(), R(h, {
|
|
3759
3771
|
key: 0,
|
|
3760
|
-
id: d(
|
|
3761
|
-
modelValue: a.value[
|
|
3762
|
-
"onUpdate:modelValue": (
|
|
3772
|
+
id: d(Y.value),
|
|
3773
|
+
modelValue: a.value[Y.value],
|
|
3774
|
+
"onUpdate:modelValue": (b) => a.value[Y.value] = b,
|
|
3763
3775
|
appearance: "select",
|
|
3764
|
-
items: u(
|
|
3776
|
+
items: u(Y.value),
|
|
3765
3777
|
placeholder: y(r)("filter.selectPlaceholder")
|
|
3766
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(),
|
|
3778
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), R(C, {
|
|
3767
3779
|
key: 1,
|
|
3768
|
-
id: d(
|
|
3769
|
-
modelValue: a.value[
|
|
3770
|
-
"onUpdate:modelValue": (
|
|
3780
|
+
id: d(Y.value),
|
|
3781
|
+
modelValue: a.value[Y.value],
|
|
3782
|
+
"onUpdate:modelValue": (b) => a.value[Y.value] = b,
|
|
3771
3783
|
autocomplete: "off",
|
|
3772
3784
|
placeholder: y(r)("filter.inputPlaceholder"),
|
|
3773
3785
|
size: "small",
|
|
3774
|
-
type: g(
|
|
3786
|
+
type: g(Y.value)
|
|
3775
3787
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3776
3788
|
]),
|
|
3777
|
-
|
|
3778
|
-
|
|
3789
|
+
U("div", Ls, [
|
|
3790
|
+
N(O, {
|
|
3779
3791
|
appearance: "btn-link",
|
|
3780
3792
|
"data-testid": "apply-filter",
|
|
3781
3793
|
size: "small",
|
|
3782
|
-
onClick:
|
|
3794
|
+
onClick: A[0] || (A[0] = (b) => k(!0))
|
|
3783
3795
|
}, {
|
|
3784
|
-
default:
|
|
3785
|
-
|
|
3796
|
+
default: v(() => [
|
|
3797
|
+
Q(K(y(r)("filter.applyButtonText")), 1)
|
|
3786
3798
|
]),
|
|
3787
3799
|
_: 1
|
|
3788
3800
|
}),
|
|
3789
|
-
|
|
3801
|
+
N(O, {
|
|
3790
3802
|
appearance: "btn-link",
|
|
3791
3803
|
"data-testid": "clear-filter",
|
|
3792
3804
|
size: "small",
|
|
3793
|
-
onClick: (
|
|
3805
|
+
onClick: (b) => f(Y.value)
|
|
3794
3806
|
}, {
|
|
3795
|
-
default:
|
|
3796
|
-
|
|
3807
|
+
default: v(() => [
|
|
3808
|
+
Q(K(y(r)("filter.clearButtonText")), 1)
|
|
3797
3809
|
]),
|
|
3798
3810
|
_: 2
|
|
3799
3811
|
}, 1032, ["onClick"])
|
|
@@ -3803,10 +3815,10 @@ const Di = {
|
|
|
3803
3815
|
_: 2
|
|
3804
3816
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
3805
3817
|
]),
|
|
3806
|
-
actionButton:
|
|
3807
|
-
|
|
3808
|
-
default:
|
|
3809
|
-
|
|
3818
|
+
actionButton: v(() => [
|
|
3819
|
+
N(O, { onClick: I }, {
|
|
3820
|
+
default: v(() => [
|
|
3821
|
+
Q(K(y(r)("filter.clearAllButtonText")), 1)
|
|
3810
3822
|
]),
|
|
3811
3823
|
_: 1
|
|
3812
3824
|
})
|
|
@@ -3818,7 +3830,7 @@ const Di = {
|
|
|
3818
3830
|
]));
|
|
3819
3831
|
};
|
|
3820
3832
|
}
|
|
3821
|
-
}),
|
|
3833
|
+
}), Vs = /* @__PURE__ */ Ce(Us, [["__scopeId", "data-v-745f38c0"]]), Xe = /* @__PURE__ */ ie({
|
|
3822
3834
|
__name: "PermissionsWrapper",
|
|
3823
3835
|
props: {
|
|
3824
3836
|
/**
|
|
@@ -3840,15 +3852,15 @@ const Di = {
|
|
|
3840
3852
|
}
|
|
3841
3853
|
},
|
|
3842
3854
|
setup(e) {
|
|
3843
|
-
const n = e, t =
|
|
3844
|
-
return
|
|
3855
|
+
const n = e, t = E(void 0), r = T(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
3856
|
+
return Se(() => n.authFunction, async () => {
|
|
3845
3857
|
t.value = await n.authFunction();
|
|
3846
|
-
}, { immediate: !0 }), (o, a) => r.value ?
|
|
3858
|
+
}, { immediate: !0 }), (o, a) => r.value ? Z(o.$slots, "default", {
|
|
3847
3859
|
key: 0,
|
|
3848
3860
|
isAllowed: t.value
|
|
3849
|
-
}) :
|
|
3861
|
+
}) : z("", !0);
|
|
3850
3862
|
}
|
|
3851
|
-
}),
|
|
3863
|
+
}), Rs = { class: "form-section-wrapper" }, Ds = {
|
|
3852
3864
|
key: 0,
|
|
3853
3865
|
class: "form-section-title"
|
|
3854
3866
|
}, Gs = {
|
|
@@ -3857,7 +3869,7 @@ const Di = {
|
|
|
3857
3869
|
}, Hs = {
|
|
3858
3870
|
key: 2,
|
|
3859
3871
|
class: "form-section-footer"
|
|
3860
|
-
}, zs = { class: "form-section-content" }, Js = /* @__PURE__ */
|
|
3872
|
+
}, zs = { class: "form-section-content" }, Js = /* @__PURE__ */ ie({
|
|
3861
3873
|
__name: "EntityFormSection",
|
|
3862
3874
|
props: {
|
|
3863
3875
|
title: {
|
|
@@ -3884,34 +3896,34 @@ const Di = {
|
|
|
3884
3896
|
setup(e) {
|
|
3885
3897
|
const n = ut();
|
|
3886
3898
|
return (t, r) => (m(), j("fieldset", {
|
|
3887
|
-
class:
|
|
3899
|
+
class: Ne(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
3888
3900
|
}, [
|
|
3889
|
-
|
|
3890
|
-
e.hideInfoHeader ?
|
|
3901
|
+
U("div", Rs, [
|
|
3902
|
+
e.hideInfoHeader ? z("", !0) : (m(), j("div", {
|
|
3891
3903
|
key: 0,
|
|
3892
|
-
class:
|
|
3904
|
+
class: Ne(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
3893
3905
|
}, [
|
|
3894
|
-
e.title ? (m(), j("h4", Ds,
|
|
3906
|
+
e.title ? (m(), j("h4", Ds, K(e.title), 1)) : z("", !0),
|
|
3895
3907
|
e.description || y(n).description ? (m(), j("div", Gs, [
|
|
3896
|
-
|
|
3897
|
-
|
|
3908
|
+
Z(t.$slots, "description", {}, () => [
|
|
3909
|
+
U("p", null, K(e.description), 1)
|
|
3898
3910
|
], !0)
|
|
3899
|
-
])) :
|
|
3911
|
+
])) : z("", !0),
|
|
3900
3912
|
y(n).footer ? (m(), j("div", Hs, [
|
|
3901
|
-
|
|
3902
|
-
])) :
|
|
3913
|
+
Z(t.$slots, "footer", {}, void 0, !0)
|
|
3914
|
+
])) : z("", !0)
|
|
3903
3915
|
], 2)),
|
|
3904
|
-
|
|
3905
|
-
|
|
3916
|
+
U("div", zs, [
|
|
3917
|
+
Z(t.$slots, "default", {}, void 0, !0)
|
|
3906
3918
|
])
|
|
3907
3919
|
])
|
|
3908
3920
|
], 2));
|
|
3909
3921
|
}
|
|
3910
|
-
}), un = /* @__PURE__ */
|
|
3922
|
+
}), un = /* @__PURE__ */ Ce(Js, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Kt, useDeleteUrlBuilder: Ys, useErrors: Ws, useFetchUrlBuilder: hl, useFetcher: Zs, useDebouncedFilter: ar, useStringHelpers: vl, useHelpers: bl, useGatewayFeatureSupported: kl, useTruncationDetector: Cl } = ce;
|
|
3911
3923
|
const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group-cta-text" }, el = {
|
|
3912
3924
|
key: 0,
|
|
3913
3925
|
class: "kong-ui-entity-add-to-groups-error"
|
|
3914
|
-
}, tl = { key: 0 }, nl = /* @__PURE__ */
|
|
3926
|
+
}, tl = { key: 0 }, nl = /* @__PURE__ */ ie({
|
|
3915
3927
|
__name: "AddToGroupModal",
|
|
3916
3928
|
props: {
|
|
3917
3929
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3928,10 +3940,10 @@ const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group
|
|
|
3928
3940
|
},
|
|
3929
3941
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
3930
3942
|
setup(e, { emit: n }) {
|
|
3931
|
-
var
|
|
3932
|
-
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } =
|
|
3933
|
-
headers: (
|
|
3934
|
-
}), a =
|
|
3943
|
+
var V;
|
|
3944
|
+
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } = Kt({
|
|
3945
|
+
headers: (V = t.config) == null ? void 0 : V.requestHeaders
|
|
3946
|
+
}), a = E([]), {
|
|
3935
3947
|
debouncedQueryChange: i,
|
|
3936
3948
|
loading: s,
|
|
3937
3949
|
allRecords: l,
|
|
@@ -3946,101 +3958,101 @@ const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group
|
|
|
3946
3958
|
fetchedItemsKey: "data",
|
|
3947
3959
|
searchKeys: ["name", "id"]
|
|
3948
3960
|
}
|
|
3949
|
-
), g =
|
|
3950
|
-
label:
|
|
3951
|
-
value:
|
|
3952
|
-
selected: a.value.includes(
|
|
3953
|
-
data:
|
|
3961
|
+
), g = T(() => c.value ? r("consumer_groups.errors.general") : ""), f = E(0), I = T(() => l.value === void 0), k = T(() => u.value.map((b) => ({
|
|
3962
|
+
label: b.name,
|
|
3963
|
+
value: b.id,
|
|
3964
|
+
selected: a.value.includes(b.id),
|
|
3965
|
+
data: b
|
|
3954
3966
|
// we need this to determine whether or not to show the description text
|
|
3955
|
-
}))), p = (
|
|
3956
|
-
var
|
|
3957
|
-
const x =
|
|
3958
|
-
return x ? x.name :
|
|
3959
|
-
},
|
|
3960
|
-
|
|
3961
|
-
},
|
|
3967
|
+
}))), p = (b) => {
|
|
3968
|
+
var S;
|
|
3969
|
+
const x = I.value ? u.value.find((q) => q.id === b) : (S = l.value) == null ? void 0 : S.find((q) => q.id === b);
|
|
3970
|
+
return x ? x.name : b;
|
|
3971
|
+
}, A = () => {
|
|
3972
|
+
h.value = "", C.value = [], w.value = [], n("cancel");
|
|
3973
|
+
}, C = E([]), O = E(!1), h = E(""), D = async () => {
|
|
3962
3974
|
if (!a.value.length) {
|
|
3963
|
-
|
|
3975
|
+
h.value = "", w.value = [], n("cancel");
|
|
3964
3976
|
return;
|
|
3965
3977
|
}
|
|
3966
|
-
|
|
3978
|
+
O.value = !0, h.value = "", C.value = [], w.value = [];
|
|
3967
3979
|
try {
|
|
3968
|
-
const
|
|
3969
|
-
let
|
|
3970
|
-
x.forEach((
|
|
3971
|
-
|
|
3972
|
-
}),
|
|
3980
|
+
const b = a.value.map((q) => Y(q)), x = await Promise.allSettled(b);
|
|
3981
|
+
let S = !0;
|
|
3982
|
+
x.forEach((q) => {
|
|
3983
|
+
q.status !== "fulfilled" && (S = !1);
|
|
3984
|
+
}), S ? (C.value = [], w.value = [], n("add:success", a.value), a.value = []) : (C.value.length && n("add:partial-success", C.value), a.value = [], F(x));
|
|
3973
3985
|
} catch {
|
|
3974
|
-
|
|
3986
|
+
h.value = r("consumer_groups.errors.add"), n("error", h.value);
|
|
3975
3987
|
} finally {
|
|
3976
|
-
|
|
3988
|
+
O.value = !1;
|
|
3977
3989
|
}
|
|
3978
|
-
},
|
|
3979
|
-
var x,
|
|
3980
|
-
let
|
|
3981
|
-
return t.config.app === "konnect" ?
|
|
3982
|
-
}),
|
|
3990
|
+
}, se = T(() => {
|
|
3991
|
+
var x, S, q, J;
|
|
3992
|
+
let b = `${t.config.apiBaseUrl}${$e.list[t.config.app].forConsumer}`;
|
|
3993
|
+
return t.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((x = t.config) == null ? void 0 : x.controlPlaneId) || "").replace(/{consumerId}/gi, ((S = t.config) == null ? void 0 : S.consumerId) || "") : t.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (q = t.config) != null && q.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((J = t.config) == null ? void 0 : J.consumerId) || "")), b;
|
|
3994
|
+
}), Y = async (b) => {
|
|
3983
3995
|
const x = {
|
|
3984
|
-
group:
|
|
3996
|
+
group: b
|
|
3985
3997
|
};
|
|
3986
3998
|
try {
|
|
3987
|
-
const
|
|
3988
|
-
return
|
|
3989
|
-
} catch (
|
|
3990
|
-
let
|
|
3991
|
-
return
|
|
3999
|
+
const S = await o.post(se.value, x);
|
|
4000
|
+
return C.value.push(b), S;
|
|
4001
|
+
} catch (S) {
|
|
4002
|
+
let q = `${p(b)} - ${S.message}`;
|
|
4003
|
+
return S.response.status === 409 && (q = `${p(b)} - ${r("consumer_groups.errors.already_added")}`), Promise.reject(Error(q));
|
|
3992
4004
|
}
|
|
3993
|
-
}, w =
|
|
3994
|
-
w.value =
|
|
3995
|
-
var
|
|
3996
|
-
return (
|
|
4005
|
+
}, w = E([]), F = (b) => {
|
|
4006
|
+
w.value = b.map((x) => {
|
|
4007
|
+
var S;
|
|
4008
|
+
return (S = x.reason) == null ? void 0 : S.message;
|
|
3997
4009
|
}).filter(Boolean);
|
|
3998
4010
|
};
|
|
3999
|
-
return
|
|
4011
|
+
return Se(k, () => {
|
|
4000
4012
|
f.value++;
|
|
4001
4013
|
}, { immediate: !0, deep: !0 }), Qe(async () => {
|
|
4002
4014
|
await d();
|
|
4003
|
-
}), (
|
|
4004
|
-
const
|
|
4005
|
-
return m(),
|
|
4006
|
-
"action-pending":
|
|
4015
|
+
}), (b, x) => {
|
|
4016
|
+
const S = P("KMultiselect"), q = P("KAlert"), J = P("KPrompt");
|
|
4017
|
+
return m(), R(J, {
|
|
4018
|
+
"action-pending": O.value,
|
|
4007
4019
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
4008
4020
|
"data-testid": "add-to-group-modal",
|
|
4009
4021
|
"is-visible": e.visible,
|
|
4010
4022
|
title: y(r)("consumer_groups.consumers.add.title"),
|
|
4011
|
-
onCanceled:
|
|
4012
|
-
onProceed:
|
|
4023
|
+
onCanceled: A,
|
|
4024
|
+
onProceed: D
|
|
4013
4025
|
}, {
|
|
4014
|
-
"body-content":
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4026
|
+
"body-content": v(() => [
|
|
4027
|
+
U("div", Qs, [
|
|
4028
|
+
U("p", Xs, K(y(r)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4029
|
+
N(S, {
|
|
4018
4030
|
modelValue: a.value,
|
|
4019
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
4031
|
+
"onUpdate:modelValue": x[0] || (x[0] = (X) => a.value = X),
|
|
4020
4032
|
autosuggest: "",
|
|
4021
4033
|
"data-testid": "add-to-groups-multiselect",
|
|
4022
|
-
"dropdown-footer-text":
|
|
4023
|
-
items:
|
|
4034
|
+
"dropdown-footer-text": I.value ? y(r)("consumer_groups.consumers.add.footer") : void 0,
|
|
4035
|
+
items: k.value,
|
|
4024
4036
|
label: y(r)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
4025
4037
|
loading: y(s),
|
|
4026
4038
|
placeholder: y(r)("consumer_groups.consumers.add.consumer_group_placeholder"),
|
|
4027
|
-
readonly:
|
|
4039
|
+
readonly: O.value,
|
|
4028
4040
|
required: "",
|
|
4029
4041
|
width: "100%",
|
|
4030
4042
|
onQueryChange: y(i)
|
|
4031
4043
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
alertMessage:
|
|
4035
|
-
|
|
4044
|
+
h.value || g.value || w.value.length ? (m(), j("div", el, [
|
|
4045
|
+
N(q, { appearance: "danger" }, {
|
|
4046
|
+
alertMessage: v(() => [
|
|
4047
|
+
U("p", null, K(y(r)("consumer_groups.errors.add")), 1),
|
|
4036
4048
|
w.value.length ? (m(), j("ul", tl, [
|
|
4037
|
-
(m(!0), j(
|
|
4038
|
-
])) :
|
|
4039
|
-
|
|
4049
|
+
(m(!0), j(be, null, he(w.value, (X, ee) => (m(), j("li", { key: ee }, K(X), 1))), 128))
|
|
4050
|
+
])) : z("", !0),
|
|
4051
|
+
U("div", null, K(h.value || g.value), 1)
|
|
4040
4052
|
]),
|
|
4041
4053
|
_: 1
|
|
4042
4054
|
})
|
|
4043
|
-
])) :
|
|
4055
|
+
])) : z("", !0)
|
|
4044
4056
|
])
|
|
4045
4057
|
]),
|
|
4046
4058
|
_: 1
|
|
@@ -4048,12 +4060,12 @@ const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group
|
|
|
4048
4060
|
};
|
|
4049
4061
|
}
|
|
4050
4062
|
});
|
|
4051
|
-
const
|
|
4063
|
+
const Nt = (e, n) => {
|
|
4052
4064
|
const t = e.__vccOpts || e;
|
|
4053
4065
|
for (const [r, o] of n)
|
|
4054
4066
|
t[r] = o;
|
|
4055
4067
|
return t;
|
|
4056
|
-
}, rl = /* @__PURE__ */
|
|
4068
|
+
}, rl = /* @__PURE__ */ Nt(nl, [["__scopeId", "data-v-4d30f3c5"]]), ol = { class: "kong-ui-entities-consumer-groups-list" }, al = { key: 1 }, il = /* @__PURE__ */ ie({
|
|
4057
4069
|
__name: "ConsumerGroupList",
|
|
4058
4070
|
props: {
|
|
4059
4071
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4094,129 +4106,132 @@ const Kt = (e, n) => {
|
|
|
4094
4106
|
},
|
|
4095
4107
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4096
4108
|
setup(e, { emit: n }) {
|
|
4097
|
-
var
|
|
4098
|
-
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } =
|
|
4099
|
-
headers: (
|
|
4100
|
-
}), s =
|
|
4109
|
+
var Ft;
|
|
4110
|
+
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } = Kt({
|
|
4111
|
+
headers: (Ft = t.config) == null ? void 0 : Ft.requestHeaders
|
|
4112
|
+
}), s = E(1), l = T(() => !!t.config.consumerId), c = T(() => t.config.app !== "kongManager" || !!t.config.disableSorting), d = {
|
|
4101
4113
|
name: { label: o("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4102
4114
|
};
|
|
4103
4115
|
t.config.app === "kongManager" && (d.consumers_count = { label: o("consumer_groups.list.table_headers.consumers_count"), searchable: !1, sortable: !1 }), d.tags = { label: o("consumer_groups.list.table_headers.tags"), sortable: !1 };
|
|
4104
|
-
const u = d, g = (
|
|
4105
|
-
"data-testid":
|
|
4106
|
-
}), f =
|
|
4107
|
-
var
|
|
4108
|
-
let
|
|
4109
|
-
return t.config.app === "konnect" ?
|
|
4110
|
-
}),
|
|
4111
|
-
const
|
|
4112
|
-
return
|
|
4113
|
-
isExactMatch:
|
|
4116
|
+
const u = d, g = (M) => ({
|
|
4117
|
+
"data-testid": M.username ?? M.custom_id ?? M.id
|
|
4118
|
+
}), f = T(() => {
|
|
4119
|
+
var H, re, ye, Ee;
|
|
4120
|
+
let M = `${t.config.apiBaseUrl}${$e.list[t.config.app][l.value ? "forConsumer" : "all"]}`;
|
|
4121
|
+
return t.config.app === "konnect" ? M = M.replace(/{controlPlaneId}/gi, ((H = t.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = t.config) == null ? void 0 : re.consumerId) || "") : t.config.app === "kongManager" && (M = M.replace(/\/{workspace}/gi, (ye = t.config) != null && ye.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), M;
|
|
4122
|
+
}), I = E(""), k = T(() => {
|
|
4123
|
+
const M = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4124
|
+
return M ? {
|
|
4125
|
+
isExactMatch: M,
|
|
4114
4126
|
fields: {
|
|
4115
4127
|
username: d.name,
|
|
4116
4128
|
id: { label: o("consumer_groups.list.table_headers.id") }
|
|
4117
4129
|
},
|
|
4118
4130
|
placeholder: o("consumer_groups.search.placeholder")
|
|
4119
4131
|
} : {
|
|
4120
|
-
isExactMatch:
|
|
4132
|
+
isExactMatch: M,
|
|
4121
4133
|
fields: {
|
|
4122
4134
|
name: d.name
|
|
4123
4135
|
},
|
|
4124
4136
|
schema: t.config.filterSchema
|
|
4125
4137
|
};
|
|
4126
|
-
}), p =
|
|
4127
|
-
|
|
4128
|
-
},
|
|
4138
|
+
}), p = T(() => l.value ? "consumer_groups" : void 0), { fetcher: A, fetcherState: C } = Zs(t.config, f.value, p.value), O = () => {
|
|
4139
|
+
I.value = "";
|
|
4140
|
+
}, h = () => {
|
|
4129
4141
|
s.value++;
|
|
4130
|
-
},
|
|
4131
|
-
const
|
|
4132
|
-
if (!
|
|
4142
|
+
}, D = E(null), se = (M, H) => {
|
|
4143
|
+
const re = M.id;
|
|
4144
|
+
if (!H(re)) {
|
|
4133
4145
|
n("copy:error", {
|
|
4134
|
-
entity:
|
|
4146
|
+
entity: M,
|
|
4135
4147
|
field: "id",
|
|
4136
4148
|
message: o("consumer_groups.errors.copy")
|
|
4137
4149
|
});
|
|
4138
4150
|
return;
|
|
4139
4151
|
}
|
|
4140
4152
|
n("copy:success", {
|
|
4141
|
-
entity:
|
|
4153
|
+
entity: M,
|
|
4142
4154
|
field: "id",
|
|
4143
|
-
message: o("consumer_groups.copy.success", { val:
|
|
4155
|
+
message: o("consumer_groups.copy.success", { val: re })
|
|
4144
4156
|
});
|
|
4145
|
-
},
|
|
4146
|
-
const
|
|
4147
|
-
if (!
|
|
4157
|
+
}, Y = (M, H) => {
|
|
4158
|
+
const re = JSON.stringify(M);
|
|
4159
|
+
if (!H(re)) {
|
|
4148
4160
|
n("copy:error", {
|
|
4149
|
-
entity:
|
|
4161
|
+
entity: M,
|
|
4150
4162
|
message: o("consumer_groups.errors.copy")
|
|
4151
4163
|
});
|
|
4152
4164
|
return;
|
|
4153
4165
|
}
|
|
4154
4166
|
n("copy:success", {
|
|
4155
|
-
entity:
|
|
4167
|
+
entity: M,
|
|
4156
4168
|
message: o("consumer_groups.copy.success_brief")
|
|
4157
4169
|
});
|
|
4158
|
-
}, w = async (
|
|
4159
|
-
var
|
|
4160
|
-
await ((
|
|
4161
|
-
},
|
|
4170
|
+
}, w = async (M) => {
|
|
4171
|
+
var re;
|
|
4172
|
+
await ((re = t.canRetrieve) == null ? void 0 : re.call(t, M)) && a.push(t.config.getViewRoute(M.id));
|
|
4173
|
+
}, F = (M) => ({
|
|
4162
4174
|
label: o("consumer_groups.actions.view"),
|
|
4163
|
-
to: t.config.getViewRoute(
|
|
4164
|
-
}),
|
|
4175
|
+
to: t.config.getViewRoute(M)
|
|
4176
|
+
}), V = (M) => ({
|
|
4165
4177
|
label: o("consumer_groups.actions.edit"),
|
|
4166
|
-
to: t.config.getEditRoute(
|
|
4167
|
-
}),
|
|
4168
|
-
|
|
4169
|
-
},
|
|
4178
|
+
to: t.config.getEditRoute(M)
|
|
4179
|
+
}), b = E(void 0), x = E(!1), S = E(!1), q = E(""), J = Ys(t.config, f.value), X = (M) => {
|
|
4180
|
+
b.value = M, x.value = !0;
|
|
4181
|
+
}, ee = () => {
|
|
4170
4182
|
x.value = !1;
|
|
4171
|
-
},
|
|
4172
|
-
var
|
|
4173
|
-
if ((
|
|
4174
|
-
|
|
4183
|
+
}, te = async () => {
|
|
4184
|
+
var M, H, re;
|
|
4185
|
+
if ((M = b.value) != null && M.id) {
|
|
4186
|
+
S.value = !0;
|
|
4175
4187
|
try {
|
|
4176
|
-
await i.delete(J(
|
|
4177
|
-
} catch (
|
|
4178
|
-
|
|
4188
|
+
await i.delete(J(b.value.id)), S.value = !1, x.value = !1, s.value++, n("delete:success", b.value);
|
|
4189
|
+
} catch (ye) {
|
|
4190
|
+
q.value = ((re = (H = ye.response) == null ? void 0 : H.data) == null ? void 0 : re.message) || ye.message || o("consumer_groups.errors.delete"), n("error", ye);
|
|
4179
4191
|
} finally {
|
|
4180
|
-
|
|
4192
|
+
S.value = !1;
|
|
4181
4193
|
}
|
|
4182
4194
|
}
|
|
4183
|
-
},
|
|
4184
|
-
|
|
4195
|
+
}, le = E(!1), Re = () => {
|
|
4196
|
+
le.value = !0;
|
|
4185
4197
|
}, _ = () => {
|
|
4186
|
-
|
|
4187
|
-
},
|
|
4188
|
-
|
|
4189
|
-
},
|
|
4190
|
-
l.value &&
|
|
4191
|
-
},
|
|
4192
|
-
|
|
4193
|
-
},
|
|
4194
|
-
|
|
4195
|
-
},
|
|
4196
|
-
var
|
|
4197
|
-
let
|
|
4198
|
-
return t.config.app === "konnect" ?
|
|
4199
|
-
}), De =
|
|
4200
|
-
if (
|
|
4198
|
+
le.value = !1;
|
|
4199
|
+
}, B = (M, H) => {
|
|
4200
|
+
H || _(), s.value++, n("add:success", M);
|
|
4201
|
+
}, oe = () => {
|
|
4202
|
+
l.value && Re();
|
|
4203
|
+
}, L = E(void 0), G = E(!1), ge = E(""), _e = (M) => {
|
|
4204
|
+
L.value = M, G.value = !0;
|
|
4205
|
+
}, de = () => {
|
|
4206
|
+
G.value = !1, L.value = void 0;
|
|
4207
|
+
}, Fe = T(() => {
|
|
4208
|
+
var H, re, ye, Ee;
|
|
4209
|
+
let M = `${t.config.apiBaseUrl}${$e.list[t.config.app].oneForConsumer}`;
|
|
4210
|
+
return t.config.app === "konnect" ? M = M.replace(/{controlPlaneId}/gi, ((H = t.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = t.config) == null ? void 0 : re.consumerId) || "") : t.config.app === "kongManager" && (M = M.replace(/\/{workspace}/gi, (ye = t.config) != null && ye.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), M;
|
|
4211
|
+
}), De = E(!1), ir = async () => {
|
|
4212
|
+
if (L.value) {
|
|
4201
4213
|
De.value = !0;
|
|
4202
4214
|
try {
|
|
4203
|
-
const
|
|
4204
|
-
await i.delete(
|
|
4205
|
-
} catch (
|
|
4206
|
-
ge.value =
|
|
4215
|
+
const M = Fe.value.replace(/{consumerGroupId}/gi, L.value.id);
|
|
4216
|
+
await i.delete(M), n("remove:success", L.value), de(), s.value++;
|
|
4217
|
+
} catch (M) {
|
|
4218
|
+
ge.value = M.message || o("consumer_groups.errors.delete"), n("error", M);
|
|
4207
4219
|
} finally {
|
|
4208
4220
|
De.value = !1;
|
|
4209
4221
|
}
|
|
4210
4222
|
}
|
|
4211
4223
|
};
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4224
|
+
Se(C, (M) => {
|
|
4225
|
+
var H, re, ye;
|
|
4226
|
+
if (M.status === Oe.Error) {
|
|
4227
|
+
D.value = {
|
|
4228
|
+
title: o("consumer_groups.errors.general")
|
|
4229
|
+
}, (ye = (re = (H = M.error) == null ? void 0 : H.response) == null ? void 0 : re.data) != null && ye.message && (D.value.message = M.error.response.data.message), n("error", M.error);
|
|
4215
4230
|
return;
|
|
4216
4231
|
}
|
|
4217
|
-
|
|
4232
|
+
D.value = null;
|
|
4218
4233
|
});
|
|
4219
|
-
const pt =
|
|
4234
|
+
const pt = E({
|
|
4220
4235
|
ctaPath: l.value ? void 0 : t.config.createRoute,
|
|
4221
4236
|
ctaText: void 0,
|
|
4222
4237
|
message: o("consumer_groups.list.empty_state.description"),
|
|
@@ -4224,51 +4239,51 @@ const Kt = (e, n) => {
|
|
|
4224
4239
|
});
|
|
4225
4240
|
return Qe(async () => {
|
|
4226
4241
|
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"));
|
|
4227
|
-
}), (
|
|
4228
|
-
const
|
|
4242
|
+
}), (M, H) => {
|
|
4243
|
+
const re = P("KButton"), ye = P("KBadge"), Ee = P("KTruncate"), Ge = P("KDropdownItem"), Bt = P("KClipboardProvider"), sr = P("KPrompt");
|
|
4229
4244
|
return m(), j("div", ol, [
|
|
4230
|
-
|
|
4245
|
+
N(y(Is), {
|
|
4231
4246
|
"cache-identifier": e.cacheIdentifier,
|
|
4232
4247
|
"disable-pagination": l.value,
|
|
4233
4248
|
"disable-pagination-page-jump": "",
|
|
4234
4249
|
"disable-sorting": c.value,
|
|
4235
4250
|
"empty-state-options": pt.value,
|
|
4236
4251
|
"enable-entity-actions": "",
|
|
4237
|
-
"error-message":
|
|
4238
|
-
fetcher: y(
|
|
4252
|
+
"error-message": D.value,
|
|
4253
|
+
fetcher: y(A),
|
|
4239
4254
|
"fetcher-cache-key": s.value,
|
|
4240
4255
|
"pagination-type": "offset",
|
|
4241
4256
|
"preferences-storage-key": "kong-ui-entities-consumer-groups-list",
|
|
4242
|
-
query:
|
|
4257
|
+
query: I.value,
|
|
4243
4258
|
"row-attributes": g,
|
|
4244
4259
|
"table-headers": y(u),
|
|
4245
|
-
onClearSearchInput:
|
|
4246
|
-
"onClick:row":
|
|
4247
|
-
onEmptyStateCtaClicked:
|
|
4248
|
-
onSort:
|
|
4260
|
+
onClearSearchInput: O,
|
|
4261
|
+
"onClick:row": H[3] || (H[3] = (W) => w(W)),
|
|
4262
|
+
onEmptyStateCtaClicked: oe,
|
|
4263
|
+
onSort: h
|
|
4249
4264
|
}, {
|
|
4250
|
-
"toolbar-filter":
|
|
4251
|
-
l.value ?
|
|
4265
|
+
"toolbar-filter": v(() => [
|
|
4266
|
+
l.value ? z("", !0) : (m(), R(y(Vs), {
|
|
4252
4267
|
key: 0,
|
|
4253
|
-
modelValue:
|
|
4254
|
-
"onUpdate:modelValue":
|
|
4255
|
-
config:
|
|
4268
|
+
modelValue: I.value,
|
|
4269
|
+
"onUpdate:modelValue": H[0] || (H[0] = (W) => I.value = W),
|
|
4270
|
+
config: k.value
|
|
4256
4271
|
}, null, 8, ["modelValue", "config"]))
|
|
4257
4272
|
]),
|
|
4258
|
-
"toolbar-button":
|
|
4259
|
-
|
|
4273
|
+
"toolbar-button": v(() => [
|
|
4274
|
+
N(y(Xe), {
|
|
4260
4275
|
"auth-function": () => e.canCreate()
|
|
4261
4276
|
}, {
|
|
4262
|
-
default:
|
|
4263
|
-
|
|
4277
|
+
default: v(() => [
|
|
4278
|
+
N(re, {
|
|
4264
4279
|
appearance: "primary",
|
|
4265
4280
|
"data-testid": "toolbar-add-consumer-group",
|
|
4266
4281
|
icon: "plus",
|
|
4267
4282
|
to: e.config.consumerId ? void 0 : e.config.createRoute,
|
|
4268
|
-
onClick:
|
|
4283
|
+
onClick: H[1] || (H[1] = () => e.config.consumerId ? Re() : void 0)
|
|
4269
4284
|
}, {
|
|
4270
|
-
default:
|
|
4271
|
-
|
|
4285
|
+
default: v(() => [
|
|
4286
|
+
Q(K(e.config.consumerId ? y(o)("consumer_groups.actions.add_to_group") : y(o)("consumer_groups.list.toolbar_actions.new_consumer_group")), 1)
|
|
4272
4287
|
]),
|
|
4273
4288
|
_: 1
|
|
4274
4289
|
}, 8, ["to"])
|
|
@@ -4276,22 +4291,22 @@ const Kt = (e, n) => {
|
|
|
4276
4291
|
_: 1
|
|
4277
4292
|
}, 8, ["auth-function"])
|
|
4278
4293
|
]),
|
|
4279
|
-
name:
|
|
4280
|
-
|
|
4294
|
+
name: v(({ rowValue: W }) => [
|
|
4295
|
+
U("b", null, K(W ?? "-"), 1)
|
|
4281
4296
|
]),
|
|
4282
|
-
consumers_count:
|
|
4283
|
-
|
|
4297
|
+
consumers_count: v(({ rowValue: W }) => [
|
|
4298
|
+
Q(K(W ?? "-"), 1)
|
|
4284
4299
|
]),
|
|
4285
|
-
tags:
|
|
4286
|
-
(W == null ? void 0 : W.length) > 0 ? (m(),
|
|
4287
|
-
default:
|
|
4288
|
-
(m(!0), j(
|
|
4300
|
+
tags: v(({ rowValue: W }) => [
|
|
4301
|
+
(W == null ? void 0 : W.length) > 0 ? (m(), R(Ee, { key: 0 }, {
|
|
4302
|
+
default: v(() => [
|
|
4303
|
+
(m(!0), j(be, null, he(W, (Be) => (m(), R(ye, {
|
|
4289
4304
|
key: Be,
|
|
4290
|
-
onClick:
|
|
4305
|
+
onClick: H[2] || (H[2] = rt(() => {
|
|
4291
4306
|
}, ["stop"]))
|
|
4292
4307
|
}, {
|
|
4293
|
-
default:
|
|
4294
|
-
|
|
4308
|
+
default: v(() => [
|
|
4309
|
+
Q(K(Be), 1)
|
|
4295
4310
|
]),
|
|
4296
4311
|
_: 2
|
|
4297
4312
|
}, 1024))), 128))
|
|
@@ -4299,70 +4314,70 @@ const Kt = (e, n) => {
|
|
|
4299
4314
|
_: 2
|
|
4300
4315
|
}, 1024)) : (m(), j("span", al, "-"))
|
|
4301
4316
|
]),
|
|
4302
|
-
actions:
|
|
4303
|
-
|
|
4304
|
-
default:
|
|
4305
|
-
|
|
4317
|
+
actions: v(({ row: W }) => [
|
|
4318
|
+
N(Bt, null, {
|
|
4319
|
+
default: v(({ copyToClipboard: Be }) => [
|
|
4320
|
+
N(Ge, {
|
|
4306
4321
|
"data-testid": "action-entity-copy-id",
|
|
4307
|
-
onClick: (lr) =>
|
|
4322
|
+
onClick: (lr) => se(W, Be)
|
|
4308
4323
|
}, {
|
|
4309
|
-
default:
|
|
4310
|
-
|
|
4324
|
+
default: v(() => [
|
|
4325
|
+
Q(K(y(o)("consumer_groups.actions.copy_id")), 1)
|
|
4311
4326
|
]),
|
|
4312
4327
|
_: 2
|
|
4313
4328
|
}, 1032, ["onClick"])
|
|
4314
4329
|
]),
|
|
4315
4330
|
_: 2
|
|
4316
4331
|
}, 1024),
|
|
4317
|
-
|
|
4318
|
-
default:
|
|
4319
|
-
|
|
4332
|
+
N(Bt, null, {
|
|
4333
|
+
default: v(({ copyToClipboard: Be }) => [
|
|
4334
|
+
N(Ge, {
|
|
4320
4335
|
"data-testid": "action-entity-copy-json",
|
|
4321
|
-
onClick: (lr) =>
|
|
4336
|
+
onClick: (lr) => Y(W, Be)
|
|
4322
4337
|
}, {
|
|
4323
|
-
default:
|
|
4324
|
-
|
|
4338
|
+
default: v(() => [
|
|
4339
|
+
Q(K(y(o)("consumer_groups.actions.copy_json")), 1)
|
|
4325
4340
|
]),
|
|
4326
4341
|
_: 2
|
|
4327
4342
|
}, 1032, ["onClick"])
|
|
4328
4343
|
]),
|
|
4329
4344
|
_: 2
|
|
4330
4345
|
}, 1024),
|
|
4331
|
-
|
|
4346
|
+
N(y(Xe), {
|
|
4332
4347
|
"auth-function": () => e.canRetrieve(W)
|
|
4333
4348
|
}, {
|
|
4334
|
-
default:
|
|
4335
|
-
|
|
4349
|
+
default: v(() => [
|
|
4350
|
+
N(Ge, {
|
|
4336
4351
|
"data-testid": "action-entity-view",
|
|
4337
4352
|
"has-divider": "",
|
|
4338
|
-
item:
|
|
4353
|
+
item: F(W.id)
|
|
4339
4354
|
}, null, 8, ["item"])
|
|
4340
4355
|
]),
|
|
4341
4356
|
_: 2
|
|
4342
4357
|
}, 1032, ["auth-function"]),
|
|
4343
|
-
|
|
4358
|
+
N(y(Xe), {
|
|
4344
4359
|
"auth-function": () => e.canEdit(W)
|
|
4345
4360
|
}, {
|
|
4346
|
-
default:
|
|
4347
|
-
|
|
4361
|
+
default: v(() => [
|
|
4362
|
+
N(Ge, {
|
|
4348
4363
|
"data-testid": "action-entity-edit",
|
|
4349
|
-
item:
|
|
4364
|
+
item: V(W.id)
|
|
4350
4365
|
}, null, 8, ["item"])
|
|
4351
4366
|
]),
|
|
4352
4367
|
_: 2
|
|
4353
4368
|
}, 1032, ["auth-function"]),
|
|
4354
|
-
|
|
4369
|
+
N(y(Xe), {
|
|
4355
4370
|
"auth-function": () => e.canDelete(W)
|
|
4356
4371
|
}, {
|
|
4357
|
-
default:
|
|
4358
|
-
|
|
4372
|
+
default: v(() => [
|
|
4373
|
+
N(Ge, {
|
|
4359
4374
|
"data-testid": "action-entity-delete",
|
|
4360
4375
|
"has-divider": "",
|
|
4361
4376
|
"is-dangerous": "",
|
|
4362
|
-
onClick: () => e.config.consumerId ? _e(W) :
|
|
4377
|
+
onClick: () => e.config.consumerId ? _e(W) : X(W)
|
|
4363
4378
|
}, {
|
|
4364
|
-
default:
|
|
4365
|
-
|
|
4379
|
+
default: v(() => [
|
|
4380
|
+
Q(K(e.config.consumerId ? y(o)("consumer_groups.actions.exit") : y(o)("consumer_groups.actions.delete")), 1)
|
|
4366
4381
|
]),
|
|
4367
4382
|
_: 2
|
|
4368
4383
|
}, 1032, ["onClick"])
|
|
@@ -4372,67 +4387,67 @@ const Kt = (e, n) => {
|
|
|
4372
4387
|
]),
|
|
4373
4388
|
_: 1
|
|
4374
4389
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4375
|
-
|
|
4376
|
-
"action-pending":
|
|
4390
|
+
N(y(Ts), {
|
|
4391
|
+
"action-pending": S.value,
|
|
4377
4392
|
"data-testid": "delete-consumer-group-modal",
|
|
4378
4393
|
description: y(o)("consumer_groups.delete.description"),
|
|
4379
|
-
"entity-name":
|
|
4394
|
+
"entity-name": b.value && (b.value.name || b.value.id),
|
|
4380
4395
|
"entity-type": y(dn).ConsumerGroup,
|
|
4381
|
-
error:
|
|
4396
|
+
error: q.value,
|
|
4382
4397
|
title: y(o)("consumer_groups.delete.title"),
|
|
4383
4398
|
visible: x.value,
|
|
4384
|
-
onCancel:
|
|
4385
|
-
onProceed:
|
|
4399
|
+
onCancel: ee,
|
|
4400
|
+
onProceed: te
|
|
4386
4401
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4387
|
-
e.config.consumerId ? (m(),
|
|
4402
|
+
e.config.consumerId ? (m(), R(rl, {
|
|
4388
4403
|
key: 0,
|
|
4389
4404
|
config: e.config,
|
|
4390
4405
|
"data-testid": "add-to-group-modal",
|
|
4391
|
-
visible:
|
|
4392
|
-
"onAdd:partialSuccess":
|
|
4393
|
-
"onAdd:success":
|
|
4406
|
+
visible: le.value,
|
|
4407
|
+
"onAdd:partialSuccess": H[4] || (H[4] = (W) => B(W, !0)),
|
|
4408
|
+
"onAdd:success": H[5] || (H[5] = (W) => B(W)),
|
|
4394
4409
|
onCancel: _
|
|
4395
|
-
}, null, 8, ["config", "visible"])) :
|
|
4396
|
-
e.config.consumerId &&
|
|
4410
|
+
}, null, 8, ["config", "visible"])) : z("", !0),
|
|
4411
|
+
e.config.consumerId && L.value ? (m(), R(sr, {
|
|
4397
4412
|
key: 1,
|
|
4398
4413
|
"data-testid": "exit-group-modal",
|
|
4399
|
-
"is-visible":
|
|
4414
|
+
"is-visible": G.value,
|
|
4400
4415
|
title: y(o)("consumer_groups.consumers.exit.title"),
|
|
4401
4416
|
type: "danger",
|
|
4402
|
-
onCanceled:
|
|
4417
|
+
onCanceled: de,
|
|
4403
4418
|
onProceed: ir
|
|
4404
4419
|
}, {
|
|
4405
|
-
"body-content":
|
|
4406
|
-
|
|
4420
|
+
"body-content": v(() => [
|
|
4421
|
+
N(y(r), {
|
|
4407
4422
|
class: "exit-modal-message",
|
|
4408
4423
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
4409
4424
|
tag: "p"
|
|
4410
4425
|
}, Te({
|
|
4411
|
-
consumerGroup:
|
|
4412
|
-
|
|
4426
|
+
consumerGroup: v(() => [
|
|
4427
|
+
U("strong", null, K(L.value.name || L.value.id), 1)
|
|
4413
4428
|
]),
|
|
4414
4429
|
_: 2
|
|
4415
4430
|
}, [
|
|
4416
4431
|
e.config.consumerUsername ? {
|
|
4417
4432
|
name: "consumer",
|
|
4418
|
-
fn:
|
|
4419
|
-
|
|
4433
|
+
fn: v(() => [
|
|
4434
|
+
U("strong", null, K(e.config.consumerUsername), 1)
|
|
4420
4435
|
]),
|
|
4421
4436
|
key: "0"
|
|
4422
4437
|
} : void 0
|
|
4423
4438
|
]), 1032, ["keypath"]),
|
|
4424
|
-
|
|
4439
|
+
U("p", null, K(y(o)("consumer_groups.consumers.exit.description")), 1)
|
|
4425
4440
|
]),
|
|
4426
4441
|
_: 1
|
|
4427
|
-
}, 8, ["is-visible", "title"])) :
|
|
4442
|
+
}, 8, ["is-visible", "title"])) : z("", !0)
|
|
4428
4443
|
]);
|
|
4429
4444
|
};
|
|
4430
4445
|
}
|
|
4431
4446
|
});
|
|
4432
|
-
const _l = /* @__PURE__ */
|
|
4447
|
+
const _l = /* @__PURE__ */ Nt(il, [["__scopeId", "data-v-d623df4d"]]), sl = { class: "kong-ui-entities-consumer-group-form" }, ll = { class: "select-item-label" }, ul = {
|
|
4433
4448
|
key: 0,
|
|
4434
4449
|
class: "select-item-desc"
|
|
4435
|
-
}, cl = /* @__PURE__ */
|
|
4450
|
+
}, cl = /* @__PURE__ */ ie({
|
|
4436
4451
|
__name: "ConsumerGroupForm",
|
|
4437
4452
|
props: {
|
|
4438
4453
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4450,7 +4465,7 @@ const _l = /* @__PURE__ */ Kt(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4450
4465
|
},
|
|
4451
4466
|
emits: ["update", "error", "loading"],
|
|
4452
4467
|
setup(e, { emit: n }) {
|
|
4453
|
-
var
|
|
4468
|
+
var te, le, Re;
|
|
4454
4469
|
const t = e, { i18n: { t: r } } = ct.useI18n(), o = wt(), a = Pt({
|
|
4455
4470
|
fields: {
|
|
4456
4471
|
name: "",
|
|
@@ -4469,138 +4484,138 @@ const _l = /* @__PURE__ */ Kt(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4469
4484
|
error: c,
|
|
4470
4485
|
loadItems: d,
|
|
4471
4486
|
results: u
|
|
4472
|
-
} = ar(t.config, (
|
|
4487
|
+
} = ar(t.config, (le = $e.form[(te = t.config) == null ? void 0 : te.app]) == null ? void 0 : le.consumersList, "", {
|
|
4473
4488
|
fetchedItemsKey: "data",
|
|
4474
4489
|
searchKeys: ["username", "custom_id", "id"]
|
|
4475
|
-
}), { axiosInstance: g } =
|
|
4476
|
-
headers: (
|
|
4477
|
-
}), { getMessageFromError: f } =
|
|
4490
|
+
}), { axiosInstance: g } = Kt({
|
|
4491
|
+
headers: (Re = t.config) == null ? void 0 : Re.requestHeaders
|
|
4492
|
+
}), { getMessageFromError: f } = Ws(), I = T(() => u.value.map((_) => ({
|
|
4478
4493
|
label: _.username || _.custom_id,
|
|
4479
4494
|
value: _.id,
|
|
4480
4495
|
selected: a.fields.consumers.includes(_.id),
|
|
4481
4496
|
data: _
|
|
4482
4497
|
// we need this to determine whether or not to show the description text
|
|
4483
|
-
}))),
|
|
4484
|
-
var _,
|
|
4485
|
-
return (
|
|
4486
|
-
}), p =
|
|
4487
|
-
var
|
|
4488
|
-
let
|
|
4489
|
-
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ?
|
|
4490
|
-
},
|
|
4498
|
+
}))), k = T(() => {
|
|
4499
|
+
var _, B;
|
|
4500
|
+
return (B = $e.form[(_ = t.config) == null ? void 0 : _.app]) == null ? void 0 : B.edit;
|
|
4501
|
+
}), p = T(() => t.consumerGroupId ? nt.Edit : nt.Create), A = T(() => !!a.fields.name && !w.value), C = T(() => JSON.stringify(a.fields) !== JSON.stringify(i)), O = (_, B = "", oe = "") => {
|
|
4502
|
+
var G, ge, _e, de, Fe, De;
|
|
4503
|
+
let L = `${(G = t.config) == null ? void 0 : G.apiBaseUrl}${$e.form[(ge = t.config) == null ? void 0 : ge.app][_]}`;
|
|
4504
|
+
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? L = L.replace(/{controlPlaneId}/gi, ((de = t.config) == null ? void 0 : de.controlPlaneId) || "") : ((Fe = t.config) == null ? void 0 : Fe.app) === "kongManager" && (L = L.replace(/\/{workspace}/gi, (De = t.config) != null && De.workspace ? `/${t.config.workspace}` : "")), L = L.replace(/{id}/gi, B || t.consumerGroupId), (_ === "addConsumer" || _ === "removeConsumer") && (L = L.replace(/{consumerId}/gi, oe)), L;
|
|
4505
|
+
}, h = () => {
|
|
4491
4506
|
var _;
|
|
4492
4507
|
o.push(((_ = t.config) == null ? void 0 : _.cancelRoute) || { name: "consumer-group-list" });
|
|
4493
|
-
},
|
|
4508
|
+
}, D = (_) => {
|
|
4494
4509
|
n("error", _);
|
|
4495
|
-
},
|
|
4510
|
+
}, se = (_) => {
|
|
4496
4511
|
n("loading", _);
|
|
4497
|
-
},
|
|
4498
|
-
var
|
|
4499
|
-
a.fields.name = ((
|
|
4500
|
-
const
|
|
4501
|
-
if (a.fields.tags = (
|
|
4502
|
-
a.fields.consumers = ((ge = _ == null ? void 0 : _.consumers) == null ? void 0 : ge.map((
|
|
4512
|
+
}, Y = async (_) => {
|
|
4513
|
+
var oe, L, G, ge, _e;
|
|
4514
|
+
a.fields.name = ((oe = _ == null ? void 0 : _.item) == null ? void 0 : oe.name) || ((L = _ == null ? void 0 : _.consumer_group) == null ? void 0 : L.name) || (_ == null ? void 0 : _.name) || "";
|
|
4515
|
+
const B = ((G = _ == null ? void 0 : _.item) == null ? void 0 : G.tags) || (_ == null ? void 0 : _.consumer_group.tags) || (_ == null ? void 0 : _.tags) || [];
|
|
4516
|
+
if (a.fields.tags = (B == null ? void 0 : B.join(", ")) || "", "consumers" in _)
|
|
4517
|
+
a.fields.consumers = ((ge = _ == null ? void 0 : _.consumers) == null ? void 0 : ge.map((de) => de.id)) || [];
|
|
4503
4518
|
else
|
|
4504
4519
|
try {
|
|
4505
|
-
const { data:
|
|
4506
|
-
a.fields.consumers = "consumers" in
|
|
4507
|
-
} catch (
|
|
4508
|
-
x(
|
|
4520
|
+
const { data: de } = await g.get(O("getConsumers"));
|
|
4521
|
+
a.fields.consumers = "consumers" in de ? (_e = de == null ? void 0 : de.consumers) == null ? void 0 : _e.map((Fe) => Fe.id) : [];
|
|
4522
|
+
} catch (de) {
|
|
4523
|
+
x(de);
|
|
4509
4524
|
}
|
|
4510
4525
|
Object.assign(i, a.fields);
|
|
4511
|
-
}, w =
|
|
4512
|
-
var _,
|
|
4526
|
+
}, w = T(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")), F = () => {
|
|
4527
|
+
var _, B;
|
|
4513
4528
|
return {
|
|
4514
4529
|
name: a.fields.name,
|
|
4515
|
-
tags: (
|
|
4530
|
+
tags: (B = (_ = a.fields.tags.split(",")) == null ? void 0 : _.map((oe) => String(oe || "").trim())) == null ? void 0 : B.filter((oe) => oe !== "")
|
|
4516
4531
|
};
|
|
4517
|
-
},
|
|
4532
|
+
}, V = async (_, B = "") => await g.post(O("addConsumer", B, _), { consumer: _ }), b = async (_, B = "") => await g.delete(O("removeConsumer", B, _)), x = (_) => {
|
|
4518
4533
|
a.errorMessage = f(_), n("error", _);
|
|
4519
|
-
},
|
|
4534
|
+
}, S = (_ = t.consumerGroupId) => {
|
|
4520
4535
|
Object.assign(i, a.fields), n("update", { ...a.fields, id: _ });
|
|
4521
|
-
},
|
|
4522
|
-
const
|
|
4523
|
-
|
|
4524
|
-
code:
|
|
4525
|
-
message:
|
|
4526
|
-
}) :
|
|
4536
|
+
}, q = (_, B, oe = t.consumerGroupId) => {
|
|
4537
|
+
const L = _ == null ? void 0 : _.find((G) => G.status !== "fulfilled");
|
|
4538
|
+
L ? x({
|
|
4539
|
+
code: L.status,
|
|
4540
|
+
message: B
|
|
4541
|
+
}) : S(oe);
|
|
4527
4542
|
}, J = async () => {
|
|
4528
4543
|
let _ = "";
|
|
4529
4544
|
try {
|
|
4530
|
-
const { data:
|
|
4531
|
-
_ = "item" in
|
|
4532
|
-
} catch (
|
|
4533
|
-
x(
|
|
4545
|
+
const { data: B } = await g.post(O("create"), F());
|
|
4546
|
+
_ = "item" in B ? B.item.id : B.id;
|
|
4547
|
+
} catch (B) {
|
|
4548
|
+
x(B);
|
|
4534
4549
|
}
|
|
4535
4550
|
if (a.fields.consumers.length > 0 && _)
|
|
4536
4551
|
try {
|
|
4537
|
-
const
|
|
4538
|
-
|
|
4539
|
-
} catch (
|
|
4540
|
-
x(
|
|
4552
|
+
const B = a.fields.consumers.map((L) => V(L, _)), oe = await Promise.allSettled(B);
|
|
4553
|
+
q(oe, r("consumer_groups.errors.add_consumer"), _);
|
|
4554
|
+
} catch (B) {
|
|
4555
|
+
x(B);
|
|
4541
4556
|
}
|
|
4542
4557
|
else
|
|
4543
|
-
a.fields.consumers.length === 0 && _ &&
|
|
4544
|
-
},
|
|
4545
|
-
var
|
|
4558
|
+
a.fields.consumers.length === 0 && _ && S(_);
|
|
4559
|
+
}, X = async () => {
|
|
4560
|
+
var oe;
|
|
4546
4561
|
try {
|
|
4547
|
-
((
|
|
4548
|
-
} catch (
|
|
4549
|
-
x(
|
|
4562
|
+
((oe = t.config) == null ? void 0 : oe.app) === "konnect" ? await g.put(O("edit"), F()) : await g.patch(O("edit"), F());
|
|
4563
|
+
} catch (L) {
|
|
4564
|
+
x(L);
|
|
4550
4565
|
}
|
|
4551
|
-
const _ = a.fields.consumers.filter((
|
|
4552
|
-
if (
|
|
4553
|
-
|
|
4566
|
+
const _ = a.fields.consumers.filter((L) => !i.consumers.includes(L)), B = i.consumers.filter((L) => !a.fields.consumers.includes(L));
|
|
4567
|
+
if (B.length === 0 && _.length === 0)
|
|
4568
|
+
S();
|
|
4554
4569
|
else {
|
|
4555
|
-
if (
|
|
4570
|
+
if (B.length > 0)
|
|
4556
4571
|
try {
|
|
4557
|
-
const
|
|
4558
|
-
|
|
4559
|
-
} catch (
|
|
4560
|
-
x(
|
|
4572
|
+
const L = B.map((ge) => b(ge)), G = await Promise.allSettled(L);
|
|
4573
|
+
q(G, r("consumer_groups.errors.remove_consumer"));
|
|
4574
|
+
} catch (L) {
|
|
4575
|
+
x(L);
|
|
4561
4576
|
}
|
|
4562
4577
|
if (_.length > 0)
|
|
4563
4578
|
try {
|
|
4564
|
-
const
|
|
4565
|
-
|
|
4566
|
-
} catch (
|
|
4567
|
-
x(
|
|
4579
|
+
const L = _.map((ge) => V(ge)), G = await Promise.allSettled(L);
|
|
4580
|
+
q(G, r("consumer_groups.errors.add_consumer"));
|
|
4581
|
+
} catch (L) {
|
|
4582
|
+
x(L);
|
|
4568
4583
|
}
|
|
4569
4584
|
}
|
|
4570
|
-
},
|
|
4585
|
+
}, ee = async () => {
|
|
4571
4586
|
try {
|
|
4572
|
-
a.readonly = !0, p.value === nt.Create ? await J() : await
|
|
4587
|
+
a.readonly = !0, p.value === nt.Create ? await J() : await X();
|
|
4573
4588
|
} finally {
|
|
4574
4589
|
a.readonly = !1;
|
|
4575
4590
|
}
|
|
4576
4591
|
};
|
|
4577
4592
|
return Qe(async () => {
|
|
4578
4593
|
await d();
|
|
4579
|
-
}), (_,
|
|
4580
|
-
const
|
|
4594
|
+
}), (_, B) => {
|
|
4595
|
+
const oe = P("KInput"), L = P("KMultiselect");
|
|
4581
4596
|
return m(), j("div", sl, [
|
|
4582
|
-
|
|
4583
|
-
"can-submit":
|
|
4597
|
+
N(y(ys), {
|
|
4598
|
+
"can-submit": A.value && C.value,
|
|
4584
4599
|
config: e.config,
|
|
4585
4600
|
"edit-id": e.consumerGroupId,
|
|
4586
4601
|
"error-message": a.errorMessage || y(c) || w.value,
|
|
4587
|
-
"fetch-url":
|
|
4602
|
+
"fetch-url": k.value,
|
|
4588
4603
|
"is-readonly": a.readonly,
|
|
4589
|
-
onCancel:
|
|
4590
|
-
"onFetch:error":
|
|
4591
|
-
"onFetch:success":
|
|
4592
|
-
onLoading:
|
|
4593
|
-
onSubmit:
|
|
4604
|
+
onCancel: h,
|
|
4605
|
+
"onFetch:error": B[3] || (B[3] = (G) => D(G)),
|
|
4606
|
+
"onFetch:success": Y,
|
|
4607
|
+
onLoading: B[4] || (B[4] = (G) => se(G)),
|
|
4608
|
+
onSubmit: ee
|
|
4594
4609
|
}, {
|
|
4595
|
-
default:
|
|
4596
|
-
|
|
4610
|
+
default: v(() => [
|
|
4611
|
+
N(y(un), {
|
|
4597
4612
|
description: y(r)("consumer_groups.form.general_info.description"),
|
|
4598
4613
|
title: y(r)("consumer_groups.form.general_info.title")
|
|
4599
4614
|
}, {
|
|
4600
|
-
default:
|
|
4601
|
-
|
|
4615
|
+
default: v(() => [
|
|
4616
|
+
N(oe, {
|
|
4602
4617
|
modelValue: a.fields.name,
|
|
4603
|
-
"onUpdate:modelValue":
|
|
4618
|
+
"onUpdate:modelValue": B[0] || (B[0] = (G) => a.fields.name = G),
|
|
4604
4619
|
modelModifiers: { trim: !0 },
|
|
4605
4620
|
autocomplete: "off",
|
|
4606
4621
|
"data-testid": "consumer-group-form-name",
|
|
@@ -4609,9 +4624,9 @@ const _l = /* @__PURE__ */ Kt(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4609
4624
|
required: "",
|
|
4610
4625
|
type: "text"
|
|
4611
4626
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
4612
|
-
|
|
4627
|
+
N(oe, {
|
|
4613
4628
|
modelValue: a.fields.tags,
|
|
4614
|
-
"onUpdate:modelValue":
|
|
4629
|
+
"onUpdate:modelValue": B[1] || (B[1] = (G) => a.fields.tags = G),
|
|
4615
4630
|
modelModifiers: { trim: !0 },
|
|
4616
4631
|
autocomplete: "off",
|
|
4617
4632
|
"data-testid": "consumer-group-form-tags",
|
|
@@ -4627,30 +4642,30 @@ const _l = /* @__PURE__ */ Kt(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4627
4642
|
]),
|
|
4628
4643
|
_: 1
|
|
4629
4644
|
}, 8, ["description", "title"]),
|
|
4630
|
-
|
|
4645
|
+
N(y(un), {
|
|
4631
4646
|
description: y(r)("consumer_groups.form.consumers.description"),
|
|
4632
4647
|
"has-divider": "",
|
|
4633
4648
|
title: y(r)("consumer_groups.form.consumers.title")
|
|
4634
4649
|
}, {
|
|
4635
|
-
default:
|
|
4636
|
-
|
|
4650
|
+
default: v(() => [
|
|
4651
|
+
N(L, {
|
|
4637
4652
|
modelValue: a.fields.consumers,
|
|
4638
|
-
"onUpdate:modelValue":
|
|
4653
|
+
"onUpdate:modelValue": B[2] || (B[2] = (G) => a.fields.consumers = G),
|
|
4639
4654
|
appearance: "select",
|
|
4640
4655
|
autosuggest: "",
|
|
4641
4656
|
"expand-selected": "",
|
|
4642
|
-
items:
|
|
4657
|
+
items: I.value,
|
|
4643
4658
|
label: y(r)("consumer_groups.form.fields.consumers.label"),
|
|
4644
4659
|
loading: y(l),
|
|
4645
4660
|
placeholder: y(r)("consumer_groups.form.fields.consumers.placeholder"),
|
|
4646
4661
|
width: "auto",
|
|
4647
4662
|
onQueryChange: y(s)
|
|
4648
4663
|
}, {
|
|
4649
|
-
"item-template":
|
|
4650
|
-
var ge, _e,
|
|
4664
|
+
"item-template": v(({ item: G }) => {
|
|
4665
|
+
var ge, _e, de;
|
|
4651
4666
|
return [
|
|
4652
|
-
|
|
4653
|
-
(ge =
|
|
4667
|
+
U("div", ll, K(G.label), 1),
|
|
4668
|
+
(ge = G == null ? void 0 : G.data) != null && ge.username && ((_e = G == null ? void 0 : G.data) != null && _e.custom_id) ? (m(), j("div", ul, K((de = G == null ? void 0 : G.data) == null ? void 0 : de.custom_id), 1)) : z("", !0)
|
|
4654
4669
|
];
|
|
4655
4670
|
}),
|
|
4656
4671
|
_: 1
|
|
@@ -4665,7 +4680,7 @@ const _l = /* @__PURE__ */ Kt(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4665
4680
|
};
|
|
4666
4681
|
}
|
|
4667
4682
|
});
|
|
4668
|
-
const wl = /* @__PURE__ */
|
|
4683
|
+
const wl = /* @__PURE__ */ Nt(cl, [["__scopeId", "data-v-102d40d2"]]), dl = { class: "kong-ui-consumer-group-entity-config-card" }, Il = /* @__PURE__ */ ie({
|
|
4669
4684
|
__name: "ConsumerGroupConfigCard",
|
|
4670
4685
|
props: {
|
|
4671
4686
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4692,7 +4707,7 @@ const wl = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-102d40d2"]]), dl = { cl
|
|
|
4692
4707
|
},
|
|
4693
4708
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
4694
4709
|
setup(e) {
|
|
4695
|
-
const n = e, { i18n: { t } } = ct.useI18n(), r =
|
|
4710
|
+
const n = e, { i18n: { t } } = ct.useI18n(), r = T(() => $e.form[n.config.app].edit), o = E({
|
|
4696
4711
|
id: {},
|
|
4697
4712
|
name: {},
|
|
4698
4713
|
created_at: {},
|
|
@@ -4702,7 +4717,7 @@ const wl = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-102d40d2"]]), dl = { cl
|
|
|
4702
4717
|
}
|
|
4703
4718
|
});
|
|
4704
4719
|
return (a, i) => (m(), j("div", dl, [
|
|
4705
|
-
|
|
4720
|
+
N(y(ps), {
|
|
4706
4721
|
config: e.config,
|
|
4707
4722
|
"config-card-doc": e.configCardDoc,
|
|
4708
4723
|
"config-schema": o.value,
|