@kong-ui-public/entities-consumer-groups 2.1.9-pr.995.f7803beb.0 → 2.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-consumer-groups.es.js +876 -900
- package/dist/entities-consumer-groups.umd.js +17 -17
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ae, ref as
|
|
1
|
+
import { defineComponent as ae, ref as E, computed as $, watch as Ae, renderSlot as Z, createCommentVNode as H, unref as y, useSlots as lt, onBeforeMount as ut, resolveComponent as L, openBlock as m, createBlock as U, createSlots as $e, withCtx as v, createElementVNode as V, createTextVNode as Q, toDisplayString as O, createVNode as F, createElementBlock as M, renderList as he, Fragment as be, normalizeClass as Fe, withModifiers as nt, withDirectives as Je, vShow as Ye, useCssVars as gr, resolveDynamicComponent as Ue, normalizeProps as yr, guardReactiveProps as hr, mergeProps as ht, onMounted as vr, onUnmounted as br, normalizeStyle as fn, inject as kr, pushScopeId as mn, popScopeId as gn, Teleport as Cr, reactive as Lt } from "vue";
|
|
2
2
|
import { useRouter as _t } from "vue-router";
|
|
3
3
|
import { createI18n as It, i18nTComponent as yn } from "@kong-ui-public/i18n";
|
|
4
4
|
import wr from "axios";
|
|
@@ -108,7 +108,7 @@ function xr() {
|
|
|
108
108
|
}
|
|
109
109
|
const ct = {
|
|
110
110
|
useI18n: xr
|
|
111
|
-
}, xe = "/api/runtime_groups/{controlPlaneId}", Se = "/{workspace}",
|
|
111
|
+
}, xe = "/api/runtime_groups/{controlPlaneId}", Se = "/{workspace}", Me = {
|
|
112
112
|
list: {
|
|
113
113
|
konnect: {
|
|
114
114
|
all: `${xe}/consumer_groups`,
|
|
@@ -140,7 +140,7 @@ const ct = {
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
|
-
var hn = /* @__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))(hn || {}), tt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(tt || {}),
|
|
143
|
+
var hn = /* @__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))(hn || {}), tt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(tt || {}), 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: wr.create({
|
|
@@ -198,17 +198,17 @@ function $r() {
|
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const Mr = {
|
|
202
202
|
actions: {
|
|
203
203
|
copyId: "Copy ID",
|
|
204
204
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
205
205
|
copyToClipboard: "Copied successfully!",
|
|
206
206
|
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
207
207
|
}
|
|
208
|
-
},
|
|
208
|
+
}, jr = {
|
|
209
209
|
message: "Are you sure you want to delete this {entityType}?",
|
|
210
210
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
211
|
-
},
|
|
211
|
+
}, Er = {
|
|
212
212
|
actions: {
|
|
213
213
|
save: "Save",
|
|
214
214
|
cancel: "Cancel",
|
|
@@ -217,13 +217,13 @@ const jr = {
|
|
|
217
217
|
errors: {
|
|
218
218
|
edit: "The entity could not be edited at this time."
|
|
219
219
|
}
|
|
220
|
-
},
|
|
220
|
+
}, Or = {
|
|
221
221
|
emptyState: {
|
|
222
222
|
noSearchResultsTitle: "No results found",
|
|
223
223
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
224
224
|
noSearchResultsCtaText: "Clear"
|
|
225
225
|
}
|
|
226
|
-
},
|
|
226
|
+
}, Kr = {
|
|
227
227
|
title: "Configuration",
|
|
228
228
|
actions: {
|
|
229
229
|
copy: "Copy JSON"
|
|
@@ -258,7 +258,7 @@ const jr = {
|
|
|
258
258
|
entryTitle: "Entry {index}",
|
|
259
259
|
structuredFormat: "Structured"
|
|
260
260
|
}
|
|
261
|
-
},
|
|
261
|
+
}, Fr = {
|
|
262
262
|
filterButtonText: "Filter",
|
|
263
263
|
fieldLabel: "Filter by:",
|
|
264
264
|
inputPlaceholder: "Enter a value",
|
|
@@ -286,12 +286,12 @@ const jr = {
|
|
|
286
286
|
confirmText: "Yes, disable"
|
|
287
287
|
}
|
|
288
288
|
}, Lr = {
|
|
289
|
-
global:
|
|
290
|
-
deleteModal:
|
|
291
|
-
baseForm:
|
|
292
|
-
baseTable:
|
|
293
|
-
baseConfigCard:
|
|
294
|
-
filter:
|
|
289
|
+
global: Mr,
|
|
290
|
+
deleteModal: jr,
|
|
291
|
+
baseForm: Er,
|
|
292
|
+
baseTable: Or,
|
|
293
|
+
baseConfigCard: Kr,
|
|
294
|
+
filter: Fr,
|
|
295
295
|
debouncedFilter: Nr,
|
|
296
296
|
errors: Br,
|
|
297
297
|
toggleModal: qr
|
|
@@ -357,82 +357,82 @@ function Pr(e, n, t, r = {
|
|
|
357
357
|
headers: e.requestHeaders
|
|
358
358
|
}), { i18n: { t: o } } = xt(), { debounce: i } = Sr(), s = i(async (_) => {
|
|
359
359
|
await K(_);
|
|
360
|
-
}, 200), l =
|
|
360
|
+
}, 200), l = E(!1), c = E(""), d = E(""), u = E([]), g = E([]), f = E(void 0), I = y(n);
|
|
361
361
|
let b = `${e.apiBaseUrl}${I}`;
|
|
362
362
|
e.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
363
|
-
const { isValidUuid:
|
|
363
|
+
const { isValidUuid: p } = vn(), A = async () => {
|
|
364
364
|
try {
|
|
365
365
|
l.value = !0;
|
|
366
366
|
const { data: _ } = await a.get(`${b}?size=${t}`);
|
|
367
|
-
_ != null && _.next || (
|
|
367
|
+
_ != null && _.next || (f.value = r.fetchedItemsKey in _ ? _[r.fetchedItemsKey] : []), g.value = r.fetchedItemsKey in _ ? _[r.fetchedItemsKey] : [], u.value = g.value;
|
|
368
368
|
} catch {
|
|
369
|
-
|
|
369
|
+
u.value = [], c.value = o("debouncedFilter.errors.fetch");
|
|
370
370
|
} finally {
|
|
371
371
|
l.value = !1;
|
|
372
372
|
}
|
|
373
|
-
}, h =
|
|
373
|
+
}, h = E(""), K = async (_) => {
|
|
374
374
|
var D, se, Y;
|
|
375
375
|
if (h.value !== _)
|
|
376
|
-
if (h.value = _ || "",
|
|
376
|
+
if (h.value = _ || "", f.value === void 0)
|
|
377
377
|
try {
|
|
378
|
-
if (l.value = !0,
|
|
378
|
+
if (l.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
379
379
|
let w = b + "";
|
|
380
380
|
_ && (w += `/${_}`);
|
|
381
381
|
const { data: N } = await a.get(`${w}?size=${t}`);
|
|
382
|
-
r.fetchedItemsKey in N ?
|
|
382
|
+
r.fetchedItemsKey in N ? u.value = N[r.fetchedItemsKey] : N != null && N.id ? u.value = [N] : u.value = [];
|
|
383
383
|
} else if (_) {
|
|
384
384
|
const w = [];
|
|
385
|
-
|
|
385
|
+
p(_) && r.searchKeys.includes("id") ? w.push((async () => {
|
|
386
386
|
const { data: k } = await a.get(`${b}/${_}`);
|
|
387
387
|
return [k[r.fetchedItemsKey] ?? k];
|
|
388
388
|
})()) : w.push(
|
|
389
389
|
...r.searchKeys.filter((k) => k !== "id").map(async (k) => {
|
|
390
|
-
const { data:
|
|
391
|
-
return
|
|
390
|
+
const { data: x } = await a.get(`${b}?${k}=${_}`);
|
|
391
|
+
return x[r.fetchedItemsKey];
|
|
392
392
|
})
|
|
393
393
|
);
|
|
394
|
-
const N = await Promise.all(w),
|
|
395
|
-
|
|
396
|
-
var
|
|
397
|
-
(
|
|
398
|
-
|
|
394
|
+
const N = await Promise.all(w), R = /* @__PURE__ */ new Set();
|
|
395
|
+
u.value = [], (D = N == null ? void 0 : N.forEach) == null || D.call(N, (k) => {
|
|
396
|
+
var x;
|
|
397
|
+
(x = k == null ? void 0 : k.forEach) == null || x.call(k, (S) => {
|
|
398
|
+
R.has(S.id) || (R.add(S.id), u.value.push(S));
|
|
399
399
|
});
|
|
400
400
|
});
|
|
401
401
|
} else
|
|
402
|
-
|
|
402
|
+
u.value = g.value;
|
|
403
403
|
} catch (w) {
|
|
404
|
-
((se = w == null ? void 0 : w.response) == null ? void 0 : se.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (
|
|
404
|
+
((se = w == null ? void 0 : w.response) == null ? void 0 : se.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (u.value = [], c.value = o("debouncedFilter.errors.fetch"));
|
|
405
405
|
} finally {
|
|
406
406
|
l.value = !1;
|
|
407
407
|
}
|
|
408
408
|
else
|
|
409
|
-
l.value = !0, d.value = "", _ ? (
|
|
409
|
+
l.value = !0, d.value = "", _ ? (u.value = (Y = f.value) == null ? void 0 : Y.filter((w) => {
|
|
410
410
|
var N;
|
|
411
|
-
let
|
|
411
|
+
let R = !1;
|
|
412
412
|
for (const k of r.searchKeys) {
|
|
413
|
-
const
|
|
414
|
-
|
|
413
|
+
const x = typeof w[k] == "string" ? (N = w[k]) == null ? void 0 : N.toLowerCase() : w[k];
|
|
414
|
+
x != null && x.includes(_.toLowerCase()) && (R = !0);
|
|
415
415
|
}
|
|
416
|
-
return
|
|
417
|
-
}), (!
|
|
416
|
+
return R;
|
|
417
|
+
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid"))) : u.value = f.value, l.value = !1;
|
|
418
418
|
};
|
|
419
419
|
return {
|
|
420
420
|
loading: l,
|
|
421
|
-
error:
|
|
421
|
+
error: c,
|
|
422
422
|
validationError: d,
|
|
423
|
-
results:
|
|
424
|
-
allRecords:
|
|
423
|
+
results: u,
|
|
424
|
+
allRecords: f,
|
|
425
425
|
loadItems: A,
|
|
426
426
|
debouncedQueryChange: s
|
|
427
427
|
};
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
const t = y(n), r =
|
|
429
|
+
function Vr(e, n) {
|
|
430
|
+
const t = y(n), r = $(
|
|
431
431
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
432
432
|
);
|
|
433
433
|
return r.value.search = "", (a) => `${r.value.href}/${a}`;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function Ur() {
|
|
436
436
|
const { i18n: { t: e } } = xt();
|
|
437
437
|
return {
|
|
438
438
|
getMessageFromError: (n) => {
|
|
@@ -460,7 +460,7 @@ function Rr() {
|
|
|
460
460
|
}
|
|
461
461
|
};
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function Rr(e) {
|
|
464
464
|
const n = window.location.origin, t = n.endsWith("/") ? n : `${n}/`;
|
|
465
465
|
try {
|
|
466
466
|
const r = e.join("/"), a = `${t}${r}`, o = e.some((i) => i.trim() === "");
|
|
@@ -472,62 +472,62 @@ function Vr(e) {
|
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
function bn(e, n) {
|
|
475
|
-
const t =
|
|
475
|
+
const t = E(y(e)), r = E(y(n)), a = $(
|
|
476
476
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
477
|
-
), o =
|
|
477
|
+
), o = $(
|
|
478
478
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
479
479
|
);
|
|
480
480
|
return (i) => {
|
|
481
|
-
const { page: s, pageSize: l, offset:
|
|
481
|
+
const { page: s, pageSize: l, offset: c, sortColumnKey: d, sortColumnOrder: u, query: g } = i;
|
|
482
482
|
try {
|
|
483
|
-
let
|
|
484
|
-
return a.value &&
|
|
485
|
-
|
|
486
|
-
}), d &&
|
|
487
|
-
} catch (
|
|
488
|
-
return console.error("RouteList(fetcher)",
|
|
483
|
+
let f = new URL(o.value.href);
|
|
484
|
+
return a.value && g ? (f.search = "", f = new URL(`${f.href}?filter[name][contains]=${g}`)) : (a.value || new URLSearchParams(g).forEach((I, b) => {
|
|
485
|
+
f.searchParams.append(b, I);
|
|
486
|
+
}), 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;
|
|
487
|
+
} catch (f) {
|
|
488
|
+
return console.error("RouteList(fetcher)", f), r.value;
|
|
489
489
|
}
|
|
490
490
|
};
|
|
491
491
|
}
|
|
492
492
|
function Dr(e, n, t = "data") {
|
|
493
493
|
const r = y(n), { axiosInstance: a } = At({
|
|
494
494
|
headers: e.requestHeaders
|
|
495
|
-
}), o = bn(e, r), i =
|
|
496
|
-
status:
|
|
495
|
+
}), o = bn(e, r), i = E({
|
|
496
|
+
status: Oe.Idle
|
|
497
497
|
});
|
|
498
498
|
return { fetcher: async (s) => {
|
|
499
499
|
try {
|
|
500
|
-
i.value = { status:
|
|
501
|
-
const l = o(s), { data:
|
|
502
|
-
let
|
|
503
|
-
|
|
504
|
-
const
|
|
505
|
-
data:
|
|
506
|
-
total:
|
|
507
|
-
...
|
|
500
|
+
i.value = { status: Oe.Loading };
|
|
501
|
+
const l = o(s), { data: c } = await a.get(l), d = t && t.replace(/[^\w-_]/gi, "");
|
|
502
|
+
let u;
|
|
503
|
+
c[d] && Array.isArray(c[d]) ? u = c[d] : Array.isArray(c) ? u = c : u = Object.keys(c).length ? [c] : [];
|
|
504
|
+
const g = {
|
|
505
|
+
data: u,
|
|
506
|
+
total: u.length,
|
|
507
|
+
...c.offset ? {
|
|
508
508
|
pagination: {
|
|
509
|
-
offset:
|
|
509
|
+
offset: c.offset
|
|
510
510
|
}
|
|
511
511
|
} : null
|
|
512
512
|
};
|
|
513
513
|
return i.value = {
|
|
514
|
-
status:
|
|
515
|
-
response:
|
|
516
|
-
},
|
|
514
|
+
status: Oe.Idle,
|
|
515
|
+
response: g
|
|
516
|
+
}, g;
|
|
517
517
|
} catch (l) {
|
|
518
|
-
const
|
|
518
|
+
const c = {
|
|
519
519
|
data: [],
|
|
520
520
|
total: 0
|
|
521
521
|
};
|
|
522
522
|
return s.query && l.response.status === 404 ? (i.value = {
|
|
523
|
-
status:
|
|
524
|
-
response:
|
|
523
|
+
status: Oe.NoResults,
|
|
524
|
+
response: c,
|
|
525
525
|
error: l
|
|
526
|
-
},
|
|
527
|
-
status:
|
|
528
|
-
response:
|
|
526
|
+
}, c) : (i.value = {
|
|
527
|
+
status: Oe.Error,
|
|
528
|
+
response: c,
|
|
529
529
|
error: l
|
|
530
|
-
},
|
|
530
|
+
}, c);
|
|
531
531
|
}
|
|
532
532
|
}, fetcherState: i };
|
|
533
533
|
}
|
|
@@ -545,15 +545,15 @@ const kn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
545
545
|
if (!n)
|
|
546
546
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
547
547
|
return n.shift(), n;
|
|
548
|
-
},
|
|
548
|
+
}, Vt = (e) => e === "*" || e === "x" || e === "X", Ut = (e) => {
|
|
549
549
|
const n = parseInt(e, 10);
|
|
550
550
|
return isNaN(n) ? e : n;
|
|
551
551
|
}, Hr = (e, n) => typeof e != typeof n ? [String(e), String(n)] : [e, n], zr = (e, n) => {
|
|
552
|
-
if (
|
|
552
|
+
if (Vt(e) || Vt(n))
|
|
553
553
|
return 0;
|
|
554
|
-
const [t, r] = Hr(
|
|
554
|
+
const [t, r] = Hr(Ut(e), Ut(n));
|
|
555
555
|
return t > r ? 1 : t < r ? -1 : 0;
|
|
556
|
-
},
|
|
556
|
+
}, Rt = (e, n) => {
|
|
557
557
|
for (let t = 0; t < Math.max(e.length, n.length); t++) {
|
|
558
558
|
const r = zr(e[t] || "0", n[t] || "0");
|
|
559
559
|
if (r !== 0)
|
|
@@ -561,8 +561,8 @@ const kn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
561
561
|
}
|
|
562
562
|
return 0;
|
|
563
563
|
}, Jr = (e, n) => {
|
|
564
|
-
const t = Pt(e), r = Pt(n), a = t.pop(), o = r.pop(), i =
|
|
565
|
-
return i !== 0 ? i : a && o ?
|
|
564
|
+
const t = Pt(e), r = Pt(n), a = t.pop(), o = r.pop(), i = Rt(t, r);
|
|
565
|
+
return i !== 0 ? i : a && o ? Rt(a.split("."), o.split(".")) : a || o ? a ? -1 : 1 : 0;
|
|
566
566
|
}, Dt = (e, n, t) => {
|
|
567
567
|
Yr(t);
|
|
568
568
|
const r = Jr(e, n);
|
|
@@ -594,19 +594,19 @@ function Zr(e) {
|
|
|
594
594
|
return !(i && Dt(a, i, "<") || s && Dt(a, s, ">"));
|
|
595
595
|
}
|
|
596
596
|
function Qr(e) {
|
|
597
|
-
const n =
|
|
597
|
+
const n = E(0), t = E(0), r = E(!1);
|
|
598
598
|
return Ae(e, (a) => {
|
|
599
599
|
a && !r.value && (n.value = a.offsetWidth, t.value = a.scrollWidth, r.value = !0);
|
|
600
600
|
}), {
|
|
601
|
-
isTruncated:
|
|
601
|
+
isTruncated: $(() => n.value < t.value)
|
|
602
602
|
};
|
|
603
603
|
}
|
|
604
604
|
const ce = {
|
|
605
605
|
useAxios: At,
|
|
606
606
|
useDebouncedFilter: Pr,
|
|
607
|
-
useDeleteUrlBuilder:
|
|
608
|
-
useErrors:
|
|
609
|
-
useExternalLinkCreator:
|
|
607
|
+
useDeleteUrlBuilder: Vr,
|
|
608
|
+
useErrors: Ur,
|
|
609
|
+
useExternalLinkCreator: Rr,
|
|
610
610
|
useFetcher: Dr,
|
|
611
611
|
useFetchUrlBuilder: bn,
|
|
612
612
|
useHelpers: vn,
|
|
@@ -631,7 +631,7 @@ const ce = {
|
|
|
631
631
|
}, aa = (e) => (mn("data-v-641e0aee"), e = e(), gn(), e), oa = ["aria-hidden"], ia = {
|
|
632
632
|
key: 0,
|
|
633
633
|
"data-testid": "kui-icon-svg-title"
|
|
634
|
-
}, sa = /* @__PURE__ */ aa(() => /* @__PURE__ */
|
|
634
|
+
}, sa = /* @__PURE__ */ aa(() => /* @__PURE__ */ V("path", {
|
|
635
635
|
d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
|
|
636
636
|
fill: "currentColor"
|
|
637
637
|
}, null, -1)), la = /* @__PURE__ */ ae({
|
|
@@ -686,7 +686,7 @@ const ce = {
|
|
|
686
686
|
}
|
|
687
687
|
},
|
|
688
688
|
setup(e) {
|
|
689
|
-
const n = e, t =
|
|
689
|
+
const n = e, t = $(() => {
|
|
690
690
|
if (typeof n.size == "number" && n.size > 0)
|
|
691
691
|
return `${n.size}px`;
|
|
692
692
|
if (typeof n.size == "string") {
|
|
@@ -695,7 +695,7 @@ const ce = {
|
|
|
695
695
|
return `${o}px`;
|
|
696
696
|
}
|
|
697
697
|
return Ht;
|
|
698
|
-
}), r =
|
|
698
|
+
}), r = $(() => ({
|
|
699
699
|
boxSizing: "border-box",
|
|
700
700
|
color: n.color,
|
|
701
701
|
display: n.display,
|
|
@@ -703,14 +703,14 @@ const ce = {
|
|
|
703
703
|
lineHeight: "0",
|
|
704
704
|
width: t.value
|
|
705
705
|
}));
|
|
706
|
-
return (a, o) => (
|
|
706
|
+
return (a, o) => (m(), U(Ue(e.as), {
|
|
707
707
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
708
708
|
class: "kui-icon copy-icon",
|
|
709
709
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
710
710
|
style: fn(r.value)
|
|
711
711
|
}, {
|
|
712
712
|
default: v(() => [
|
|
713
|
-
(
|
|
713
|
+
(m(), M("svg", {
|
|
714
714
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
715
715
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
716
716
|
fill: "none",
|
|
@@ -720,7 +720,7 @@ const ce = {
|
|
|
720
720
|
width: "100%",
|
|
721
721
|
xmlns: "http://www.w3.org/2000/svg"
|
|
722
722
|
}, [
|
|
723
|
-
e.title ? (
|
|
723
|
+
e.title ? (m(), M("title", ia, O(e.title), 1)) : H("", !0),
|
|
724
724
|
sa
|
|
725
725
|
], 8, oa))
|
|
726
726
|
]),
|
|
@@ -772,65 +772,65 @@ const ce = {
|
|
|
772
772
|
emits: ["success", "error"],
|
|
773
773
|
setup(e, { emit: n }) {
|
|
774
774
|
const t = e, { t: r } = It("en-us", ta), a = t.notify || kr(na, () => {
|
|
775
|
-
}), o =
|
|
775
|
+
}), o = $(() => t.idTooltip ? {
|
|
776
776
|
label: t.idTooltip,
|
|
777
777
|
positionFixed: !0,
|
|
778
778
|
placement: "bottomStart"
|
|
779
779
|
} : {
|
|
780
780
|
title: t.uuid
|
|
781
|
-
}), i =
|
|
781
|
+
}), i = $(() => !!(t.tooltip && t.successTooltip)), s = E(t.tooltip), l = $(() => t.tooltip ? {
|
|
782
782
|
label: s.value,
|
|
783
783
|
positionFixed: !0,
|
|
784
784
|
maxWidth: "500px",
|
|
785
785
|
placement: "bottomStart"
|
|
786
|
-
} : {}),
|
|
787
|
-
var
|
|
788
|
-
return t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${(
|
|
789
|
-
}), d = (
|
|
790
|
-
s.value =
|
|
786
|
+
} : {}), c = $(() => {
|
|
787
|
+
var g;
|
|
788
|
+
return t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${(g = t.uuid) == null ? void 0 : g.substring(0, 5)}` : t.uuid;
|
|
789
|
+
}), d = (g) => {
|
|
790
|
+
s.value = g, setTimeout(() => {
|
|
791
791
|
s.value = t.tooltip;
|
|
792
792
|
}, 1800);
|
|
793
|
-
},
|
|
794
|
-
var
|
|
795
|
-
if (!
|
|
793
|
+
}, u = (g) => {
|
|
794
|
+
var f, I;
|
|
795
|
+
if (!g(t.uuid)) {
|
|
796
796
|
typeof a == "function" && a({
|
|
797
797
|
type: "error",
|
|
798
798
|
message: r("message.fail")
|
|
799
799
|
}), i.value ? d(r("message.fail")) : n("error", t.uuid);
|
|
800
800
|
return;
|
|
801
801
|
}
|
|
802
|
-
const b = ((
|
|
802
|
+
const b = ((f = t.uuid) == null ? void 0 : f.length) > zt, p = t.format === "hidden" || t.format === "redacted" ? r("message.success.prefix") : `"${((I = t.uuid) == null ? void 0 : I.substring(0, zt)) + (b ? "..." : "")}"`;
|
|
803
803
|
typeof a == "function" && a({
|
|
804
804
|
type: "success",
|
|
805
|
-
message: `${
|
|
805
|
+
message: `${p}${r("message.success.content")}`
|
|
806
806
|
}), i.value ? d(t.successTooltip) : n("success", t.uuid);
|
|
807
807
|
};
|
|
808
|
-
return (
|
|
808
|
+
return (g, f) => {
|
|
809
809
|
const I = L("KClipboardProvider");
|
|
810
|
-
return
|
|
811
|
-
e.format !== "hidden" ? (
|
|
810
|
+
return m(), M("div", da, [
|
|
811
|
+
e.format !== "hidden" ? (m(), U(Ue(e.idTooltip ? "KTooltip" : "div"), ht({ key: 0 }, o.value, { "data-testid": "copy-id" }), {
|
|
812
812
|
default: v(() => [
|
|
813
|
-
|
|
814
|
-
class:
|
|
813
|
+
V("div", {
|
|
814
|
+
class: Fe([
|
|
815
815
|
"uuid-container",
|
|
816
816
|
e.truncated ? "truncated-uuid" : null,
|
|
817
817
|
e.useMono ? "mono" : null
|
|
818
818
|
])
|
|
819
|
-
},
|
|
819
|
+
}, O(c.value), 3)
|
|
820
820
|
]),
|
|
821
821
|
_: 1
|
|
822
822
|
}, 16)) : H("", !0),
|
|
823
|
-
(
|
|
823
|
+
(m(), U(Ue(e.tooltip ? "KTooltip" : "div"), ht(l.value, { class: "uuid-icon-wrapper" }), {
|
|
824
824
|
default: v(() => [
|
|
825
|
-
|
|
825
|
+
F(I, null, {
|
|
826
826
|
default: v(({ copyToClipboard: b }) => [
|
|
827
|
-
|
|
827
|
+
V("span", {
|
|
828
828
|
"data-testid": "copy-to-clipboard",
|
|
829
829
|
role: "button",
|
|
830
830
|
tabindex: "0",
|
|
831
|
-
onClick: nt((
|
|
831
|
+
onClick: nt((p) => u(b), ["stop"])
|
|
832
832
|
}, [
|
|
833
|
-
|
|
833
|
+
F(y(ua), {
|
|
834
834
|
class: "uuid-icon",
|
|
835
835
|
color: e.iconColor,
|
|
836
836
|
decorative: !!e.tooltip,
|
|
@@ -872,22 +872,22 @@ const ce = {
|
|
|
872
872
|
}
|
|
873
873
|
},
|
|
874
874
|
setup(e) {
|
|
875
|
-
const n = e, { i18n: { t } } = ce.useI18n(), { convertKeyToTitle: r } = ce.useStringHelpers(), a =
|
|
875
|
+
const n = e, { i18n: { t } } = ce.useI18n(), { convertKeyToTitle: r } = ce.useStringHelpers(), a = $(() => n.item.key ?? "json-array-item"), o = $(() => n.item.value ?? n.item), i = $(() => {
|
|
876
876
|
const l = JSON.parse(JSON.stringify(o.value));
|
|
877
877
|
return n.isArrayItem && delete l.name, l;
|
|
878
|
-
}), s =
|
|
878
|
+
}), s = $(() => {
|
|
879
879
|
var l;
|
|
880
880
|
return n.isArrayItem ? (l = o.value) != null && l.name ? r(o.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
881
881
|
});
|
|
882
|
-
return (l,
|
|
883
|
-
class:
|
|
882
|
+
return (l, c) => (m(), U(Ue(e.isArrayItem ? "fieldset" : "div"), {
|
|
883
|
+
class: Fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
884
884
|
}, {
|
|
885
885
|
default: v(() => [
|
|
886
|
-
e.isArrayItem ? (
|
|
887
|
-
|
|
886
|
+
e.isArrayItem ? (m(), M("legend", ga, [
|
|
887
|
+
V("b", null, O(s.value), 1)
|
|
888
888
|
])) : H("", !0),
|
|
889
|
-
(
|
|
890
|
-
key: `${a.value}-property-${
|
|
889
|
+
(m(!0), M(be, null, he(Object.keys(i.value), (d, u) => (m(), U(St, {
|
|
890
|
+
key: `${a.value}-property-${u}`,
|
|
891
891
|
item: {
|
|
892
892
|
key: d,
|
|
893
893
|
label: y(r)(d),
|
|
@@ -916,14 +916,14 @@ const ce = {
|
|
|
916
916
|
const { i18n: { t: n } } = ce.useI18n();
|
|
917
917
|
return (t, r) => {
|
|
918
918
|
const a = L("KButton");
|
|
919
|
-
return
|
|
920
|
-
|
|
919
|
+
return m(), M("div", null, [
|
|
920
|
+
F(a, {
|
|
921
921
|
appearance: "tertiary",
|
|
922
922
|
class: "navigation-button",
|
|
923
923
|
onClick: r[0] || (r[0] = (o) => t.$emit("navigation-click", e.item))
|
|
924
924
|
}, {
|
|
925
925
|
default: v(() => [
|
|
926
|
-
Q(
|
|
926
|
+
Q(O(e.item.value || y(n)("baseConfigCard.commonFields.link")), 1)
|
|
927
927
|
]),
|
|
928
928
|
_: 1
|
|
929
929
|
})
|
|
@@ -942,21 +942,21 @@ const ce = {
|
|
|
942
942
|
const { i18n: { t: n } } = ce.useI18n();
|
|
943
943
|
return (t, r) => {
|
|
944
944
|
const a = L("KBadge");
|
|
945
|
-
return
|
|
945
|
+
return m(), U(a, {
|
|
946
946
|
appearance: e.status ? "success" : "neutral"
|
|
947
947
|
}, {
|
|
948
948
|
default: v(() => [
|
|
949
|
-
Q(
|
|
949
|
+
Q(O(e.status ? y(n)("baseConfigCard.statusBadge.enabledLabel") : y(n)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
950
950
|
]),
|
|
951
951
|
_: 1
|
|
952
952
|
}, 8, ["appearance"]);
|
|
953
953
|
};
|
|
954
954
|
}
|
|
955
|
-
}), ka = "#0044f4", Ca = "#e0e4ea", wa = "#3a3f51", _a = "1px", Ia = "20px", Aa = { class: "config-card-details-row" }, xa = ["data-testid"], Sa = ["data-testid"], Ta = ["data-testid"], $a = ["data-testid"],
|
|
955
|
+
}), ka = "#0044f4", Ca = "#e0e4ea", wa = "#3a3f51", _a = "1px", Ia = "20px", Aa = { class: "config-card-details-row" }, xa = ["data-testid"], Sa = ["data-testid"], Ta = ["data-testid"], $a = ["data-testid"], Ma = { key: 1 }, ja = ["data-testid"], Ea = ["data-testid"], Oa = ["data-testid"], Ka = ["data-testid"], Fa = {
|
|
956
956
|
name: "ConfigCardItem",
|
|
957
957
|
components: { CopyUuid: wn, JsonCardItem: _n, StatusBadge: ba, InternalLinkItem: va }
|
|
958
958
|
}, Na = /* @__PURE__ */ ae({
|
|
959
|
-
...
|
|
959
|
+
...Fa,
|
|
960
960
|
props: {
|
|
961
961
|
item: {
|
|
962
962
|
type: Object,
|
|
@@ -976,13 +976,13 @@ const ce = {
|
|
|
976
976
|
emits: ["navigation-click"],
|
|
977
977
|
setup(e, { emit: n }) {
|
|
978
978
|
const t = e;
|
|
979
|
-
gr((
|
|
980
|
-
"0fea14db":
|
|
979
|
+
gr((f) => ({
|
|
980
|
+
"0fea14db": c.value ? "none" : `solid ${y(_a)} ${y(Ca)}`,
|
|
981
981
|
"1cf0460e": l.value && i.value ? "block" : "flex",
|
|
982
982
|
"328cca12": l.value && i.value ? "100%" : t.slim ? "50%" : "25%",
|
|
983
983
|
"328f0fed": l.value && i.value ? "100%" : t.slim ? "50%" : "75%"
|
|
984
984
|
}));
|
|
985
|
-
const r = lt(), { i18n: { t: a, formatUnixTimeStamp: o } } = ce.useI18n(), i =
|
|
985
|
+
const r = lt(), { i18n: { t: a, formatUnixTimeStamp: o } } = ce.useI18n(), i = $(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = $(() => !!(t.item.tooltip || r["label-tooltip"])), l = $(() => t.item.type === ne.Json || t.item.type === ne.JsonArray), c = $(() => t.item.type === ne.JsonArray), d = $(() => {
|
|
986
986
|
switch (t.item.type) {
|
|
987
987
|
case ne.ID:
|
|
988
988
|
return {
|
|
@@ -1068,8 +1068,8 @@ const ce = {
|
|
|
1068
1068
|
attrs: {
|
|
1069
1069
|
"data-testid": `${t.item.key}-internal-link`,
|
|
1070
1070
|
item: t.item,
|
|
1071
|
-
onNavigationClick: (
|
|
1072
|
-
n("navigation-click",
|
|
1071
|
+
onNavigationClick: (f) => {
|
|
1072
|
+
n("navigation-click", f);
|
|
1073
1073
|
}
|
|
1074
1074
|
}
|
|
1075
1075
|
};
|
|
@@ -1108,29 +1108,29 @@ const ce = {
|
|
|
1108
1108
|
text: t.item.value
|
|
1109
1109
|
};
|
|
1110
1110
|
}
|
|
1111
|
-
}),
|
|
1112
|
-
return (
|
|
1113
|
-
const b = L("KLabel"),
|
|
1114
|
-
return
|
|
1115
|
-
|
|
1111
|
+
}), u = E(), { isTruncated: g } = ce.useTruncationDetector(u);
|
|
1112
|
+
return (f, I) => {
|
|
1113
|
+
const b = L("KLabel"), p = L("KBadge"), A = L("KTooltip");
|
|
1114
|
+
return m(), M("div", Aa, [
|
|
1115
|
+
V("div", {
|
|
1116
1116
|
class: "config-card-details-label",
|
|
1117
1117
|
"data-testid": `${e.item.key}-label`
|
|
1118
1118
|
}, [
|
|
1119
|
-
Z(
|
|
1120
|
-
|
|
1119
|
+
Z(f.$slots, "label", { item: e.item }, () => [
|
|
1120
|
+
F(b, { "tooltip-attributes": { maxWidth: "500px" } }, $e({
|
|
1121
1121
|
default: v(() => [
|
|
1122
|
-
Q(
|
|
1122
|
+
Q(O(e.item.label) + " ", 1)
|
|
1123
1123
|
]),
|
|
1124
1124
|
_: 2
|
|
1125
1125
|
}, [
|
|
1126
1126
|
s.value ? {
|
|
1127
1127
|
name: "tooltip",
|
|
1128
1128
|
fn: v(() => [
|
|
1129
|
-
|
|
1129
|
+
V("div", {
|
|
1130
1130
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1131
1131
|
}, [
|
|
1132
|
-
Z(
|
|
1133
|
-
Q(
|
|
1132
|
+
Z(f.$slots, "label-tooltip", {}, () => [
|
|
1133
|
+
Q(O(e.item.tooltip), 1)
|
|
1134
1134
|
], !0)
|
|
1135
1135
|
], 8, Sa)
|
|
1136
1136
|
]),
|
|
@@ -1139,21 +1139,21 @@ const ce = {
|
|
|
1139
1139
|
]), 1024)
|
|
1140
1140
|
], !0)
|
|
1141
1141
|
], 8, xa),
|
|
1142
|
-
|
|
1142
|
+
V("div", {
|
|
1143
1143
|
class: "config-card-details-value",
|
|
1144
1144
|
"data-testid": `${e.item.key}-property-value`
|
|
1145
1145
|
}, [
|
|
1146
|
-
Z(
|
|
1146
|
+
Z(f.$slots, e.item.key, {
|
|
1147
1147
|
rowValue: e.item.value
|
|
1148
1148
|
}, () => [
|
|
1149
|
-
i.value ? (
|
|
1150
|
-
(
|
|
1149
|
+
i.value ? (m(), M("div", Ma, [
|
|
1150
|
+
(m(), U(Ue(d.value.tag), yr(hr(d.value.attrs)), {
|
|
1151
1151
|
default: v(() => [
|
|
1152
|
-
d.value.additionalComponent === "KBadge" ? (
|
|
1152
|
+
d.value.additionalComponent === "KBadge" ? (m(), M("div", {
|
|
1153
1153
|
key: 0,
|
|
1154
1154
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1155
1155
|
}, [
|
|
1156
|
-
(
|
|
1156
|
+
(m(!0), M(be, null, he(e.item.value, (h, K) => (m(), U(p, {
|
|
1157
1157
|
key: `${e.item.key}-badge-tag-${K}`,
|
|
1158
1158
|
class: "config-badge",
|
|
1159
1159
|
"data-testid": `${e.item.key}-badge-tag-${K}`,
|
|
@@ -1161,65 +1161,65 @@ const ce = {
|
|
|
1161
1161
|
"truncation-tooltip": ""
|
|
1162
1162
|
}, {
|
|
1163
1163
|
default: v(() => [
|
|
1164
|
-
Q(
|
|
1164
|
+
Q(O(h), 1)
|
|
1165
1165
|
]),
|
|
1166
1166
|
_: 2
|
|
1167
1167
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
1168
|
-
], 8,
|
|
1169
|
-
d.value.additionalComponent === "CopyUuid" ? (
|
|
1168
|
+
], 8, ja)) : H("", !0),
|
|
1169
|
+
d.value.additionalComponent === "CopyUuid" ? (m(), M("div", {
|
|
1170
1170
|
key: 1,
|
|
1171
1171
|
class: "copy-uuid-array",
|
|
1172
1172
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1173
1173
|
}, [
|
|
1174
|
-
(
|
|
1174
|
+
(m(!0), M(be, null, he(e.item.value, (h, K) => (m(), U(y(wn), ht(d.value.childAttrs, {
|
|
1175
1175
|
key: `${e.item.key}-copy-uuid-${K}`,
|
|
1176
1176
|
"data-testid": `${e.item.key}-copy-uuid-${K}`,
|
|
1177
1177
|
uuid: h
|
|
1178
1178
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1179
|
-
], 8,
|
|
1179
|
+
], 8, Ea)) : d.value.additionalComponent === "KMethodBadge" ? (m(), M("div", {
|
|
1180
1180
|
key: 2,
|
|
1181
1181
|
class: "method-badge-array",
|
|
1182
1182
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1183
1183
|
}, [
|
|
1184
|
-
(
|
|
1184
|
+
(m(!0), M(be, null, he(e.item.value, (h, K) => (m(), U(p, {
|
|
1185
1185
|
key: `${e.item.key}-badge-method-${K}`,
|
|
1186
1186
|
appearance: Object.values(y(_r)).includes(h.toLowerCase()) ? h.toLowerCase() : "custom",
|
|
1187
1187
|
class: "config-badge",
|
|
1188
1188
|
"data-testid": `${e.item.key}-badge-method-${K}`
|
|
1189
1189
|
}, {
|
|
1190
1190
|
default: v(() => [
|
|
1191
|
-
Q(
|
|
1191
|
+
Q(O(h), 1)
|
|
1192
1192
|
]),
|
|
1193
1193
|
_: 2
|
|
1194
1194
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1195
|
-
], 8,
|
|
1196
|
-
d.value.additionalComponent === "JsonCardItem" ? (
|
|
1195
|
+
], 8, Oa)) : H("", !0),
|
|
1196
|
+
d.value.additionalComponent === "JsonCardItem" ? (m(), M("div", {
|
|
1197
1197
|
key: 3,
|
|
1198
1198
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1199
1199
|
}, [
|
|
1200
|
-
(
|
|
1200
|
+
(m(!0), M(be, null, he(e.item.value, (h, K) => (m(), U(_n, {
|
|
1201
1201
|
key: `json-array-item-${K}`,
|
|
1202
1202
|
index: K,
|
|
1203
1203
|
"is-array-item": "",
|
|
1204
1204
|
item: h
|
|
1205
1205
|
}, null, 8, ["index", "item"]))), 128))
|
|
1206
|
-
], 8,
|
|
1206
|
+
], 8, Ka)) : (m(), U(A, {
|
|
1207
1207
|
key: 4,
|
|
1208
|
-
label: y(
|
|
1208
|
+
label: y(g) ? e.item.value : ""
|
|
1209
1209
|
}, {
|
|
1210
1210
|
default: v(() => [
|
|
1211
|
-
|
|
1211
|
+
V("span", {
|
|
1212
1212
|
ref_key: "textContent",
|
|
1213
|
-
ref:
|
|
1214
|
-
class:
|
|
1215
|
-
},
|
|
1213
|
+
ref: u,
|
|
1214
|
+
class: Fe(["attrs-data-text", { truncated: e.truncated }])
|
|
1215
|
+
}, O(d.value.text), 3)
|
|
1216
1216
|
]),
|
|
1217
1217
|
_: 1
|
|
1218
1218
|
}, 8, ["label"]))
|
|
1219
1219
|
]),
|
|
1220
1220
|
_: 1
|
|
1221
1221
|
}, 16))
|
|
1222
|
-
])) : (
|
|
1222
|
+
])) : (m(), M("div", {
|
|
1223
1223
|
key: 0,
|
|
1224
1224
|
"data-testid": `${e.item.key}-no-value`
|
|
1225
1225
|
}, " – ", 8, $a))
|
|
@@ -1252,12 +1252,12 @@ function Pa(e, n) {
|
|
|
1252
1252
|
t += e;
|
|
1253
1253
|
return t;
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function Va(e) {
|
|
1256
1256
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1257
1257
|
}
|
|
1258
|
-
var
|
|
1259
|
-
isNothing:
|
|
1260
|
-
isObject:
|
|
1258
|
+
var Ua = In, Ra = Ba, Da = qa, Ga = Pa, Ha = Va, za = La, ue = {
|
|
1259
|
+
isNothing: Ua,
|
|
1260
|
+
isObject: Ra,
|
|
1261
1261
|
toArray: Da,
|
|
1262
1262
|
repeat: Ga,
|
|
1263
1263
|
isNegativeZero: Ha,
|
|
@@ -1296,26 +1296,26 @@ function Ja(e, n) {
|
|
|
1296
1296
|
for (var t = /\r?\n|\r|\0/g, r = [0], a = [], o, i = -1; o = t.exec(e.buffer); )
|
|
1297
1297
|
a.push(o.index), r.push(o.index + o[0].length), e.position <= o.index && i < 0 && (i = r.length - 2);
|
|
1298
1298
|
i < 0 && (i = r.length - 1);
|
|
1299
|
-
var s = "", l,
|
|
1299
|
+
var s = "", l, c, d = Math.min(e.line + n.linesAfter, a.length).toString().length, u = n.maxLength - (n.indent + d + 3);
|
|
1300
1300
|
for (l = 1; l <= n.linesBefore && !(i - l < 0); l++)
|
|
1301
|
-
|
|
1301
|
+
c = mt(
|
|
1302
1302
|
e.buffer,
|
|
1303
1303
|
r[i - l],
|
|
1304
1304
|
a[i - l],
|
|
1305
1305
|
e.position - (r[i] - r[i - l]),
|
|
1306
|
-
|
|
1307
|
-
), s = ue.repeat(" ", n.indent) + gt((e.line - l + 1).toString(), d) + " | " +
|
|
1306
|
+
u
|
|
1307
|
+
), s = ue.repeat(" ", n.indent) + gt((e.line - l + 1).toString(), d) + " | " + c.str + `
|
|
1308
1308
|
` + s;
|
|
1309
|
-
for (
|
|
1310
|
-
`, s += ue.repeat("-", n.indent + d + 3 +
|
|
1309
|
+
for (c = mt(e.buffer, r[i], a[i], e.position, u), s += ue.repeat(" ", n.indent) + gt((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1310
|
+
`, s += ue.repeat("-", n.indent + d + 3 + c.pos) + `^
|
|
1311
1311
|
`, l = 1; l <= n.linesAfter && !(i + l >= a.length); l++)
|
|
1312
|
-
|
|
1312
|
+
c = mt(
|
|
1313
1313
|
e.buffer,
|
|
1314
1314
|
r[i + l],
|
|
1315
1315
|
a[i + l],
|
|
1316
1316
|
e.position - (r[i] - r[i + l]),
|
|
1317
|
-
|
|
1318
|
-
), s += ue.repeat(" ", n.indent) + gt((e.line + l + 1).toString(), d) + " | " +
|
|
1317
|
+
u
|
|
1318
|
+
), s += ue.repeat(" ", n.indent) + gt((e.line + l + 1).toString(), d) + " | " + c.str + `
|
|
1319
1319
|
`;
|
|
1320
1320
|
return s.replace(/\n$/, "");
|
|
1321
1321
|
}
|
|
@@ -1426,7 +1426,7 @@ var xn = vt, Sn = new pe("tag:yaml.org,2002:str", {
|
|
|
1426
1426
|
construct: function(e) {
|
|
1427
1427
|
return e !== null ? e : {};
|
|
1428
1428
|
}
|
|
1429
|
-
}),
|
|
1429
|
+
}), Mn = new xn({
|
|
1430
1430
|
explicit: [
|
|
1431
1431
|
Sn,
|
|
1432
1432
|
Tn,
|
|
@@ -1445,7 +1445,7 @@ function no() {
|
|
|
1445
1445
|
function ro(e) {
|
|
1446
1446
|
return e === null;
|
|
1447
1447
|
}
|
|
1448
|
-
var
|
|
1448
|
+
var jn = new pe("tag:yaml.org,2002:null", {
|
|
1449
1449
|
kind: "scalar",
|
|
1450
1450
|
resolve: to,
|
|
1451
1451
|
construct: no,
|
|
@@ -1481,7 +1481,7 @@ function oo(e) {
|
|
|
1481
1481
|
function io(e) {
|
|
1482
1482
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1483
1483
|
}
|
|
1484
|
-
var
|
|
1484
|
+
var En = new pe("tag:yaml.org,2002:bool", {
|
|
1485
1485
|
kind: "scalar",
|
|
1486
1486
|
resolve: ao,
|
|
1487
1487
|
construct: oo,
|
|
@@ -1572,7 +1572,7 @@ function po(e) {
|
|
|
1572
1572
|
function fo(e) {
|
|
1573
1573
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ue.isNegativeZero(e);
|
|
1574
1574
|
}
|
|
1575
|
-
var
|
|
1575
|
+
var On = new pe("tag:yaml.org,2002:int", {
|
|
1576
1576
|
kind: "scalar",
|
|
1577
1577
|
resolve: co,
|
|
1578
1578
|
construct: po,
|
|
@@ -1649,21 +1649,21 @@ function vo(e, n) {
|
|
|
1649
1649
|
function bo(e) {
|
|
1650
1650
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ue.isNegativeZero(e));
|
|
1651
1651
|
}
|
|
1652
|
-
var
|
|
1652
|
+
var Kn = new pe("tag:yaml.org,2002:float", {
|
|
1653
1653
|
kind: "scalar",
|
|
1654
1654
|
resolve: go,
|
|
1655
1655
|
construct: yo,
|
|
1656
1656
|
predicate: bo,
|
|
1657
1657
|
represent: vo,
|
|
1658
1658
|
defaultStyle: "lowercase"
|
|
1659
|
-
}),
|
|
1659
|
+
}), Fn = Mn.extend({
|
|
1660
1660
|
implicit: [
|
|
1661
|
+
jn,
|
|
1661
1662
|
En,
|
|
1662
1663
|
On,
|
|
1663
|
-
|
|
1664
|
-
Fn
|
|
1664
|
+
Kn
|
|
1665
1665
|
]
|
|
1666
|
-
}), Nn =
|
|
1666
|
+
}), Nn = Fn, Bn = new RegExp(
|
|
1667
1667
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1668
1668
|
), qn = new RegExp(
|
|
1669
1669
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
@@ -1672,7 +1672,7 @@ function ko(e) {
|
|
|
1672
1672
|
return e === null ? !1 : Bn.exec(e) !== null || qn.exec(e) !== null;
|
|
1673
1673
|
}
|
|
1674
1674
|
function Co(e) {
|
|
1675
|
-
var n, t, r, a, o, i, s, l = 0,
|
|
1675
|
+
var n, t, r, a, o, i, s, l = 0, c = null, d, u, g;
|
|
1676
1676
|
if (n = Bn.exec(e), n === null && (n = qn.exec(e)), n === null)
|
|
1677
1677
|
throw new Error("Date resolve error");
|
|
1678
1678
|
if (t = +n[1], r = +n[2] - 1, a = +n[3], !n[4])
|
|
@@ -1682,7 +1682,7 @@ function Co(e) {
|
|
|
1682
1682
|
l += "0";
|
|
1683
1683
|
l = +l;
|
|
1684
1684
|
}
|
|
1685
|
-
return n[9] && (d = +n[10],
|
|
1685
|
+
return n[9] && (d = +n[10], u = +(n[11] || 0), c = (d * 60 + u) * 6e4, n[9] === "-" && (c = -c)), g = new Date(Date.UTC(t, r, a, o, i, s, l)), c && g.setTime(g.getTime() - c), g;
|
|
1686
1686
|
}
|
|
1687
1687
|
function wo(e) {
|
|
1688
1688
|
return e.toISOString();
|
|
@@ -1729,14 +1729,14 @@ function xo(e) {
|
|
|
1729
1729
|
function So(e) {
|
|
1730
1730
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1731
1731
|
}
|
|
1732
|
-
var
|
|
1732
|
+
var Vn = new pe("tag:yaml.org,2002:binary", {
|
|
1733
1733
|
kind: "scalar",
|
|
1734
1734
|
resolve: Io,
|
|
1735
1735
|
construct: Ao,
|
|
1736
1736
|
predicate: So,
|
|
1737
1737
|
represent: xo
|
|
1738
1738
|
}), To = Object.prototype.hasOwnProperty, $o = Object.prototype.toString;
|
|
1739
|
-
function
|
|
1739
|
+
function Mo(e) {
|
|
1740
1740
|
if (e === null)
|
|
1741
1741
|
return !0;
|
|
1742
1742
|
var n = [], t, r, a, o, i, s = e;
|
|
@@ -1758,26 +1758,26 @@ function jo(e) {
|
|
|
1758
1758
|
}
|
|
1759
1759
|
return !0;
|
|
1760
1760
|
}
|
|
1761
|
-
function
|
|
1761
|
+
function jo(e) {
|
|
1762
1762
|
return e !== null ? e : [];
|
|
1763
1763
|
}
|
|
1764
|
-
var
|
|
1764
|
+
var Un = new pe("tag:yaml.org,2002:omap", {
|
|
1765
1765
|
kind: "sequence",
|
|
1766
|
-
resolve:
|
|
1767
|
-
construct:
|
|
1768
|
-
}),
|
|
1769
|
-
function
|
|
1766
|
+
resolve: Mo,
|
|
1767
|
+
construct: jo
|
|
1768
|
+
}), Eo = Object.prototype.toString;
|
|
1769
|
+
function Oo(e) {
|
|
1770
1770
|
if (e === null)
|
|
1771
1771
|
return !0;
|
|
1772
1772
|
var n, t, r, a, o, i = e;
|
|
1773
1773
|
for (o = new Array(i.length), n = 0, t = i.length; n < t; n += 1) {
|
|
1774
|
-
if (r = i[n],
|
|
1774
|
+
if (r = i[n], Eo.call(r) !== "[object Object]" || (a = Object.keys(r), a.length !== 1))
|
|
1775
1775
|
return !1;
|
|
1776
1776
|
o[n] = [a[0], r[a[0]]];
|
|
1777
1777
|
}
|
|
1778
1778
|
return !0;
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1780
|
+
function Ko(e) {
|
|
1781
1781
|
if (e === null)
|
|
1782
1782
|
return [];
|
|
1783
1783
|
var n, t, r, a, o, i = e;
|
|
@@ -1785,17 +1785,17 @@ function Fo(e) {
|
|
|
1785
1785
|
r = i[n], a = Object.keys(r), o[n] = [a[0], r[a[0]]];
|
|
1786
1786
|
return o;
|
|
1787
1787
|
}
|
|
1788
|
-
var
|
|
1788
|
+
var Rn = new pe("tag:yaml.org,2002:pairs", {
|
|
1789
1789
|
kind: "sequence",
|
|
1790
|
-
resolve:
|
|
1791
|
-
construct:
|
|
1792
|
-
}),
|
|
1790
|
+
resolve: Oo,
|
|
1791
|
+
construct: Ko
|
|
1792
|
+
}), Fo = Object.prototype.hasOwnProperty;
|
|
1793
1793
|
function No(e) {
|
|
1794
1794
|
if (e === null)
|
|
1795
1795
|
return !0;
|
|
1796
1796
|
var n, t = e;
|
|
1797
1797
|
for (n in t)
|
|
1798
|
-
if (
|
|
1798
|
+
if (Fo.call(t, n) && t[n] !== null)
|
|
1799
1799
|
return !1;
|
|
1800
1800
|
return !0;
|
|
1801
1801
|
}
|
|
@@ -1812,12 +1812,12 @@ var Dn = new pe("tag:yaml.org,2002:set", {
|
|
|
1812
1812
|
Pn
|
|
1813
1813
|
],
|
|
1814
1814
|
explicit: [
|
|
1815
|
+
Vn,
|
|
1815
1816
|
Un,
|
|
1816
1817
|
Rn,
|
|
1817
|
-
Vn,
|
|
1818
1818
|
Dn
|
|
1819
1819
|
]
|
|
1820
|
-
}),
|
|
1820
|
+
}), Ee = Object.prototype.hasOwnProperty, rt = 1, Gn = 2, Hn = 3, at = 4, yt = 1, qo = 2, Yt = 3, Lo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Po = /[\x85\u2028\u2029]/, Vo = /[,\[\]\{\}]/, zn = /^(?:!|!!|![a-z\-]+!)$/i, Jn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1821
1821
|
function Wt(e) {
|
|
1822
1822
|
return Object.prototype.toString.call(e);
|
|
1823
1823
|
}
|
|
@@ -1833,11 +1833,11 @@ function ve(e) {
|
|
|
1833
1833
|
function Pe(e) {
|
|
1834
1834
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1835
1835
|
}
|
|
1836
|
-
function
|
|
1836
|
+
function Uo(e) {
|
|
1837
1837
|
var n;
|
|
1838
1838
|
return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
1839
1839
|
}
|
|
1840
|
-
function
|
|
1840
|
+
function Ro(e) {
|
|
1841
1841
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1842
1842
|
}
|
|
1843
1843
|
function Do(e) {
|
|
@@ -1870,7 +1870,7 @@ function Zn(e, n) {
|
|
|
1870
1870
|
};
|
|
1871
1871
|
return t.snippet = Ya(t), new me(n, t);
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1873
|
+
function j(e, n) {
|
|
1874
1874
|
throw Zn(e, n);
|
|
1875
1875
|
}
|
|
1876
1876
|
function ot(e, n) {
|
|
@@ -1879,48 +1879,48 @@ function ot(e, n) {
|
|
|
1879
1879
|
var Qt = {
|
|
1880
1880
|
YAML: function(e, n, t) {
|
|
1881
1881
|
var r, a, o;
|
|
1882
|
-
e.version !== null &&
|
|
1882
|
+
e.version !== null && j(e, "duplication of %YAML directive"), t.length !== 1 && j(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), r === null && j(e, "ill-formed argument of the YAML directive"), a = parseInt(r[1], 10), o = parseInt(r[2], 10), a !== 1 && j(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = o < 2, o !== 1 && o !== 2 && ot(e, "unsupported YAML version of the document");
|
|
1883
1883
|
},
|
|
1884
1884
|
TAG: function(e, n, t) {
|
|
1885
1885
|
var r, a;
|
|
1886
|
-
t.length !== 2 &&
|
|
1886
|
+
t.length !== 2 && j(e, "TAG directive accepts exactly two arguments"), r = t[0], a = t[1], zn.test(r) || j(e, "ill-formed tag handle (first argument) of the TAG directive"), Ee.call(e.tagMap, r) && j(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Jn.test(a) || j(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1887
1887
|
try {
|
|
1888
1888
|
a = decodeURIComponent(a);
|
|
1889
1889
|
} catch {
|
|
1890
|
-
|
|
1890
|
+
j(e, "tag prefix is malformed: " + a);
|
|
1891
1891
|
}
|
|
1892
1892
|
e.tagMap[r] = a;
|
|
1893
1893
|
}
|
|
1894
1894
|
};
|
|
1895
|
-
function
|
|
1895
|
+
function je(e, n, t, r) {
|
|
1896
1896
|
var a, o, i, s;
|
|
1897
1897
|
if (n < t) {
|
|
1898
1898
|
if (s = e.input.slice(n, t), r)
|
|
1899
1899
|
for (a = 0, o = s.length; a < o; a += 1)
|
|
1900
|
-
i = s.charCodeAt(a), i === 9 || 32 <= i && i <= 1114111 ||
|
|
1900
|
+
i = s.charCodeAt(a), i === 9 || 32 <= i && i <= 1114111 || j(e, "expected valid JSON character");
|
|
1901
1901
|
else
|
|
1902
|
-
Lo.test(s) &&
|
|
1902
|
+
Lo.test(s) && j(e, "the stream contains non-printable characters");
|
|
1903
1903
|
e.result += s;
|
|
1904
1904
|
}
|
|
1905
1905
|
}
|
|
1906
1906
|
function Xt(e, n, t, r) {
|
|
1907
1907
|
var a, o, i, s;
|
|
1908
|
-
for (ue.isObject(t) ||
|
|
1909
|
-
o = a[i],
|
|
1908
|
+
for (ue.isObject(t) || j(e, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(t), i = 0, s = a.length; i < s; i += 1)
|
|
1909
|
+
o = a[i], Ee.call(n, o) || (n[o] = t[o], r[o] = !0);
|
|
1910
1910
|
}
|
|
1911
|
-
function
|
|
1912
|
-
var
|
|
1911
|
+
function Ve(e, n, t, r, a, o, i, s, l) {
|
|
1912
|
+
var c, d;
|
|
1913
1913
|
if (Array.isArray(a))
|
|
1914
|
-
for (a = Array.prototype.slice.call(a),
|
|
1915
|
-
Array.isArray(a[
|
|
1914
|
+
for (a = Array.prototype.slice.call(a), c = 0, d = a.length; c < d; c += 1)
|
|
1915
|
+
Array.isArray(a[c]) && j(e, "nested arrays are not supported inside keys"), typeof a == "object" && Wt(a[c]) === "[object Object]" && (a[c] = "[object Object]");
|
|
1916
1916
|
if (typeof a == "object" && Wt(a) === "[object Object]" && (a = "[object Object]"), a = String(a), n === null && (n = {}), r === "tag:yaml.org,2002:merge")
|
|
1917
1917
|
if (Array.isArray(o))
|
|
1918
|
-
for (
|
|
1919
|
-
Xt(e, n, o[
|
|
1918
|
+
for (c = 0, d = o.length; c < d; c += 1)
|
|
1919
|
+
Xt(e, n, o[c], t);
|
|
1920
1920
|
else
|
|
1921
1921
|
Xt(e, n, o, t);
|
|
1922
1922
|
else
|
|
1923
|
-
!e.json && !
|
|
1923
|
+
!e.json && !Ee.call(t, a) && Ee.call(n, a) && (e.line = i || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, j(e, "duplicated mapping key")), a === "__proto__" ? Object.defineProperty(n, a, {
|
|
1924
1924
|
configurable: !0,
|
|
1925
1925
|
enumerable: !0,
|
|
1926
1926
|
writable: !0,
|
|
@@ -1928,9 +1928,9 @@ function Ue(e, n, t, r, a, o, i, s, l) {
|
|
|
1928
1928
|
}) : n[a] = o, delete t[a];
|
|
1929
1929
|
return n;
|
|
1930
1930
|
}
|
|
1931
|
-
function
|
|
1931
|
+
function Mt(e) {
|
|
1932
1932
|
var n;
|
|
1933
|
-
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1933
|
+
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : j(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1934
1934
|
}
|
|
1935
1935
|
function ie(e, n, t) {
|
|
1936
1936
|
for (var r = 0, a = e.input.charCodeAt(e.position); a !== 0; ) {
|
|
@@ -1941,7 +1941,7 @@ function ie(e, n, t) {
|
|
|
1941
1941
|
a = e.input.charCodeAt(++e.position);
|
|
1942
1942
|
while (a !== 10 && a !== 13 && a !== 0);
|
|
1943
1943
|
if (Ie(a))
|
|
1944
|
-
for (
|
|
1944
|
+
for (Mt(e), a = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; a === 32; )
|
|
1945
1945
|
e.lineIndent++, a = e.input.charCodeAt(++e.position);
|
|
1946
1946
|
else
|
|
1947
1947
|
break;
|
|
@@ -1952,36 +1952,36 @@ function dt(e) {
|
|
|
1952
1952
|
var n = e.position, t;
|
|
1953
1953
|
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)));
|
|
1954
1954
|
}
|
|
1955
|
-
function
|
|
1955
|
+
function jt(e, n) {
|
|
1956
1956
|
n === 1 ? e.result += " " : n > 1 && (e.result += ue.repeat(`
|
|
1957
1957
|
`, n - 1));
|
|
1958
1958
|
}
|
|
1959
1959
|
function zo(e, n, t) {
|
|
1960
|
-
var r, a, o, i, s, l,
|
|
1961
|
-
if (
|
|
1960
|
+
var r, a, o, i, s, l, c, d, u = e.kind, g = e.result, f;
|
|
1961
|
+
if (f = e.input.charCodeAt(e.position), ve(f) || Pe(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (a = e.input.charCodeAt(e.position + 1), ve(a) || t && Pe(a)))
|
|
1962
1962
|
return !1;
|
|
1963
|
-
for (e.kind = "scalar", e.result = "", o = i = e.position, s = !1;
|
|
1964
|
-
if (
|
|
1963
|
+
for (e.kind = "scalar", e.result = "", o = i = e.position, s = !1; f !== 0; ) {
|
|
1964
|
+
if (f === 58) {
|
|
1965
1965
|
if (a = e.input.charCodeAt(e.position + 1), ve(a) || t && Pe(a))
|
|
1966
1966
|
break;
|
|
1967
|
-
} else if (
|
|
1967
|
+
} else if (f === 35) {
|
|
1968
1968
|
if (r = e.input.charCodeAt(e.position - 1), ve(r))
|
|
1969
1969
|
break;
|
|
1970
1970
|
} else {
|
|
1971
|
-
if (e.position === e.lineStart && dt(e) || t && Pe(
|
|
1971
|
+
if (e.position === e.lineStart && dt(e) || t && Pe(f))
|
|
1972
1972
|
break;
|
|
1973
|
-
if (Ie(
|
|
1974
|
-
if (l = e.line,
|
|
1975
|
-
s = !0,
|
|
1973
|
+
if (Ie(f))
|
|
1974
|
+
if (l = e.line, c = e.lineStart, d = e.lineIndent, ie(e, !1, -1), e.lineIndent >= n) {
|
|
1975
|
+
s = !0, f = e.input.charCodeAt(e.position);
|
|
1976
1976
|
continue;
|
|
1977
1977
|
} else {
|
|
1978
|
-
e.position = i, e.line = l, e.lineStart =
|
|
1978
|
+
e.position = i, e.line = l, e.lineStart = c, e.lineIndent = d;
|
|
1979
1979
|
break;
|
|
1980
1980
|
}
|
|
1981
1981
|
}
|
|
1982
|
-
s && (
|
|
1982
|
+
s && (je(e, o, i, !1), jt(e, e.line - l), o = i = e.position, s = !1), Ke(f) || (i = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1983
1983
|
}
|
|
1984
|
-
return
|
|
1984
|
+
return je(e, o, i, !1), e.result ? !0 : (e.kind = u, e.result = g, !1);
|
|
1985
1985
|
}
|
|
1986
1986
|
function Jo(e, n) {
|
|
1987
1987
|
var t, r, a;
|
|
@@ -1989,13 +1989,13 @@ function Jo(e, n) {
|
|
|
1989
1989
|
return !1;
|
|
1990
1990
|
for (e.kind = "scalar", e.result = "", e.position++, r = a = e.position; (t = e.input.charCodeAt(e.position)) !== 0; )
|
|
1991
1991
|
if (t === 39)
|
|
1992
|
-
if (
|
|
1992
|
+
if (je(e, r, e.position, !0), t = e.input.charCodeAt(++e.position), t === 39)
|
|
1993
1993
|
r = e.position, e.position++, a = e.position;
|
|
1994
1994
|
else
|
|
1995
1995
|
return !0;
|
|
1996
1996
|
else
|
|
1997
|
-
Ie(t) ? (
|
|
1998
|
-
|
|
1997
|
+
Ie(t) ? (je(e, r, a, !0), jt(e, ie(e, !1, n)), r = a = e.position) : e.position === e.lineStart && dt(e) ? j(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
|
|
1998
|
+
j(e, "unexpected end of the stream within a single quoted scalar");
|
|
1999
1999
|
}
|
|
2000
2000
|
function Yo(e, n) {
|
|
2001
2001
|
var t, r, a, o, i, s;
|
|
@@ -2003,67 +2003,67 @@ function Yo(e, n) {
|
|
|
2003
2003
|
return !1;
|
|
2004
2004
|
for (e.kind = "scalar", e.result = "", e.position++, t = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
2005
2005
|
if (s === 34)
|
|
2006
|
-
return
|
|
2006
|
+
return je(e, t, e.position, !0), e.position++, !0;
|
|
2007
2007
|
if (s === 92) {
|
|
2008
|
-
if (
|
|
2008
|
+
if (je(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), Ie(s))
|
|
2009
2009
|
ie(e, !1, n);
|
|
2010
2010
|
else if (s < 256 && Yn[s])
|
|
2011
2011
|
e.result += Wn[s], e.position++;
|
|
2012
|
-
else if ((i =
|
|
2012
|
+
else if ((i = Ro(s)) > 0) {
|
|
2013
2013
|
for (a = i, o = 0; a > 0; a--)
|
|
2014
|
-
s = e.input.charCodeAt(++e.position), (i =
|
|
2014
|
+
s = e.input.charCodeAt(++e.position), (i = Uo(s)) >= 0 ? o = (o << 4) + i : j(e, "expected hexadecimal character");
|
|
2015
2015
|
e.result += Go(o), e.position++;
|
|
2016
2016
|
} else
|
|
2017
|
-
|
|
2017
|
+
j(e, "unknown escape sequence");
|
|
2018
2018
|
t = r = e.position;
|
|
2019
2019
|
} else
|
|
2020
|
-
Ie(s) ? (
|
|
2020
|
+
Ie(s) ? (je(e, t, r, !0), jt(e, ie(e, !1, n)), t = r = e.position) : e.position === e.lineStart && dt(e) ? j(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
2021
2021
|
}
|
|
2022
|
-
|
|
2022
|
+
j(e, "unexpected end of the stream within a double quoted scalar");
|
|
2023
2023
|
}
|
|
2024
2024
|
function Wo(e, n) {
|
|
2025
|
-
var t = !0, r, a, o, i = e.tag, s, l = e.anchor,
|
|
2025
|
+
var t = !0, r, a, o, i = e.tag, s, l = e.anchor, c, d, u, g, f, I = /* @__PURE__ */ Object.create(null), b, p, A, h;
|
|
2026
2026
|
if (h = e.input.charCodeAt(e.position), h === 91)
|
|
2027
|
-
d = 93,
|
|
2027
|
+
d = 93, f = !1, s = [];
|
|
2028
2028
|
else if (h === 123)
|
|
2029
|
-
d = 125,
|
|
2029
|
+
d = 125, f = !0, s = {};
|
|
2030
2030
|
else
|
|
2031
2031
|
return !1;
|
|
2032
2032
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), h = e.input.charCodeAt(++e.position); h !== 0; ) {
|
|
2033
2033
|
if (ie(e, !0, n), h = e.input.charCodeAt(e.position), h === d)
|
|
2034
|
-
return e.position++, e.tag = i, e.anchor = l, e.kind =
|
|
2035
|
-
t ? h === 44 &&
|
|
2034
|
+
return e.position++, e.tag = i, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
2035
|
+
t ? h === 44 && j(e, "expected the node content, but found ','") : j(e, "missed comma between flow collection entries"), p = b = A = null, u = g = !1, h === 63 && (c = e.input.charCodeAt(e.position + 1), ve(c) && (u = g = !0, e.position++, ie(e, !0, n))), r = e.line, a = e.lineStart, o = e.position, Re(e, n, rt, !1, !0), p = e.tag, b = e.result, ie(e, !0, n), h = e.input.charCodeAt(e.position), (g || e.line === r) && h === 58 && (u = !0, h = e.input.charCodeAt(++e.position), ie(e, !0, n), Re(e, n, rt, !1, !0), A = e.result), f ? Ve(e, s, I, p, b, A, r, a, o) : u ? s.push(Ve(e, null, I, p, b, A, r, a, o)) : s.push(b), ie(e, !0, n), h = e.input.charCodeAt(e.position), h === 44 ? (t = !0, h = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2036
2036
|
}
|
|
2037
|
-
|
|
2037
|
+
j(e, "unexpected end of the stream within a flow collection");
|
|
2038
2038
|
}
|
|
2039
2039
|
function Zo(e, n) {
|
|
2040
|
-
var t, r, a = yt, o = !1, i = !1, s = n, l = 0,
|
|
2041
|
-
if (
|
|
2040
|
+
var t, r, a = yt, o = !1, i = !1, s = n, l = 0, c = !1, d, u;
|
|
2041
|
+
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
2042
2042
|
r = !1;
|
|
2043
|
-
else if (
|
|
2043
|
+
else if (u === 62)
|
|
2044
2044
|
r = !0;
|
|
2045
2045
|
else
|
|
2046
2046
|
return !1;
|
|
2047
|
-
for (e.kind = "scalar", e.result = "";
|
|
2048
|
-
if (
|
|
2049
|
-
yt === a ? a =
|
|
2050
|
-
else if ((d = Do(
|
|
2051
|
-
d === 0 ?
|
|
2047
|
+
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
2048
|
+
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
2049
|
+
yt === a ? a = u === 43 ? Yt : qo : j(e, "repeat of a chomping mode identifier");
|
|
2050
|
+
else if ((d = Do(u)) >= 0)
|
|
2051
|
+
d === 0 ? j(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? j(e, "repeat of an indentation width identifier") : (s = n + d - 1, i = !0);
|
|
2052
2052
|
else
|
|
2053
2053
|
break;
|
|
2054
|
-
if (Ke(
|
|
2054
|
+
if (Ke(u)) {
|
|
2055
2055
|
do
|
|
2056
|
-
|
|
2057
|
-
while (Ke(
|
|
2058
|
-
if (
|
|
2056
|
+
u = e.input.charCodeAt(++e.position);
|
|
2057
|
+
while (Ke(u));
|
|
2058
|
+
if (u === 35)
|
|
2059
2059
|
do
|
|
2060
|
-
|
|
2061
|
-
while (!Ie(
|
|
2060
|
+
u = e.input.charCodeAt(++e.position);
|
|
2061
|
+
while (!Ie(u) && u !== 0);
|
|
2062
2062
|
}
|
|
2063
|
-
for (;
|
|
2064
|
-
for (
|
|
2065
|
-
e.lineIndent++,
|
|
2066
|
-
if (!i && e.lineIndent > s && (s = e.lineIndent), Ie(
|
|
2063
|
+
for (; u !== 0; ) {
|
|
2064
|
+
for (Mt(e), e.lineIndent = 0, u = e.input.charCodeAt(e.position); (!i || e.lineIndent < s) && u === 32; )
|
|
2065
|
+
e.lineIndent++, u = e.input.charCodeAt(++e.position);
|
|
2066
|
+
if (!i && e.lineIndent > s && (s = e.lineIndent), Ie(u)) {
|
|
2067
2067
|
l++;
|
|
2068
2068
|
continue;
|
|
2069
2069
|
}
|
|
@@ -2073,13 +2073,13 @@ function Zo(e, n) {
|
|
|
2073
2073
|
`);
|
|
2074
2074
|
break;
|
|
2075
2075
|
}
|
|
2076
|
-
for (r ? Ke(
|
|
2077
|
-
`, o ? 1 + l : l)) :
|
|
2076
|
+
for (r ? Ke(u) ? (c = !0, e.result += ue.repeat(`
|
|
2077
|
+
`, o ? 1 + l : l)) : c ? (c = !1, e.result += ue.repeat(`
|
|
2078
2078
|
`, l + 1)) : l === 0 ? o && (e.result += " ") : e.result += ue.repeat(`
|
|
2079
2079
|
`, l) : e.result += ue.repeat(`
|
|
2080
|
-
`, o ? 1 + l : l), o = !0, i = !0, l = 0, t = e.position; !Ie(
|
|
2081
|
-
|
|
2082
|
-
|
|
2080
|
+
`, o ? 1 + l : l), o = !0, i = !0, l = 0, t = e.position; !Ie(u) && u !== 0; )
|
|
2081
|
+
u = e.input.charCodeAt(++e.position);
|
|
2082
|
+
je(e, t, e.position, !1);
|
|
2083
2083
|
}
|
|
2084
2084
|
return !0;
|
|
2085
2085
|
}
|
|
@@ -2087,78 +2087,78 @@ function en(e, n) {
|
|
|
2087
2087
|
var t, r = e.tag, a = e.anchor, o = [], i, s = !1, l;
|
|
2088
2088
|
if (e.firstTabInLine !== -1)
|
|
2089
2089
|
return !1;
|
|
2090
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2090
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, j(e, "tab characters must not be used in indentation")), !(l !== 45 || (i = e.input.charCodeAt(e.position + 1), !ve(i)))); ) {
|
|
2091
2091
|
if (s = !0, e.position++, ie(e, !0, -1) && e.lineIndent <= n) {
|
|
2092
2092
|
o.push(null), l = e.input.charCodeAt(e.position);
|
|
2093
2093
|
continue;
|
|
2094
2094
|
}
|
|
2095
|
-
if (t = e.line,
|
|
2096
|
-
|
|
2095
|
+
if (t = e.line, Re(e, n, Hn, !1, !0), o.push(e.result), ie(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && l !== 0)
|
|
2096
|
+
j(e, "bad indentation of a sequence entry");
|
|
2097
2097
|
else if (e.lineIndent < n)
|
|
2098
2098
|
break;
|
|
2099
2099
|
}
|
|
2100
2100
|
return s ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = o, !0) : !1;
|
|
2101
2101
|
}
|
|
2102
2102
|
function Qo(e, n, t) {
|
|
2103
|
-
var r, a, o, i, s, l,
|
|
2103
|
+
var r, a, o, i, s, l, c = e.tag, d = e.anchor, u = {}, g = /* @__PURE__ */ Object.create(null), f = null, I = null, b = null, p = !1, A = !1, h;
|
|
2104
2104
|
if (e.firstTabInLine !== -1)
|
|
2105
2105
|
return !1;
|
|
2106
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] =
|
|
2107
|
-
if (!
|
|
2108
|
-
h === 63 ? (
|
|
2106
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), h = e.input.charCodeAt(e.position); h !== 0; ) {
|
|
2107
|
+
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, j(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (h === 63 || h === 58) && ve(r))
|
|
2108
|
+
h === 63 ? (p && (Ve(e, u, g, f, I, null, i, s, l), f = I = b = null), A = !0, p = !0, a = !0) : p ? (p = !1, a = !0) : j(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, h = r;
|
|
2109
2109
|
else {
|
|
2110
|
-
if (i = e.line, s = e.lineStart, l = e.position, !
|
|
2110
|
+
if (i = e.line, s = e.lineStart, l = e.position, !Re(e, t, Gn, !1, !0))
|
|
2111
2111
|
break;
|
|
2112
2112
|
if (e.line === o) {
|
|
2113
2113
|
for (h = e.input.charCodeAt(e.position); Ke(h); )
|
|
2114
2114
|
h = e.input.charCodeAt(++e.position);
|
|
2115
2115
|
if (h === 58)
|
|
2116
|
-
h = e.input.charCodeAt(++e.position), ve(h) ||
|
|
2116
|
+
h = e.input.charCodeAt(++e.position), ve(h) || j(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ve(e, u, g, f, I, null, i, s, l), f = I = b = null), A = !0, p = !1, a = !1, f = e.tag, I = e.result;
|
|
2117
2117
|
else if (A)
|
|
2118
|
-
|
|
2118
|
+
j(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2119
2119
|
else
|
|
2120
|
-
return e.tag =
|
|
2120
|
+
return e.tag = c, e.anchor = d, !0;
|
|
2121
2121
|
} else if (A)
|
|
2122
|
-
|
|
2122
|
+
j(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2123
2123
|
else
|
|
2124
|
-
return e.tag =
|
|
2124
|
+
return e.tag = c, e.anchor = d, !0;
|
|
2125
2125
|
}
|
|
2126
|
-
if ((e.line === o || e.lineIndent > n) && (
|
|
2127
|
-
|
|
2126
|
+
if ((e.line === o || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Re(e, n, at, !0, a) && (p ? I = e.result : b = e.result), p || (Ve(e, u, g, f, I, b, i, s, l), f = I = b = null), ie(e, !0, -1), h = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && h !== 0)
|
|
2127
|
+
j(e, "bad indentation of a mapping entry");
|
|
2128
2128
|
else if (e.lineIndent < n)
|
|
2129
2129
|
break;
|
|
2130
2130
|
}
|
|
2131
|
-
return
|
|
2131
|
+
return p && Ve(e, u, g, f, I, null, i, s, l), A && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), A;
|
|
2132
2132
|
}
|
|
2133
2133
|
function Xo(e) {
|
|
2134
2134
|
var n, t = !1, r = !1, a, o, i;
|
|
2135
2135
|
if (i = e.input.charCodeAt(e.position), i !== 33)
|
|
2136
2136
|
return !1;
|
|
2137
|
-
if (e.tag !== null &&
|
|
2137
|
+
if (e.tag !== null && j(e, "duplication of a tag property"), i = e.input.charCodeAt(++e.position), i === 60 ? (t = !0, i = e.input.charCodeAt(++e.position)) : i === 33 ? (r = !0, a = "!!", i = e.input.charCodeAt(++e.position)) : a = "!", n = e.position, t) {
|
|
2138
2138
|
do
|
|
2139
2139
|
i = e.input.charCodeAt(++e.position);
|
|
2140
2140
|
while (i !== 0 && i !== 62);
|
|
2141
|
-
e.position < e.length ? (o = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) :
|
|
2141
|
+
e.position < e.length ? (o = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) : j(e, "unexpected end of the stream within a verbatim tag");
|
|
2142
2142
|
} else {
|
|
2143
2143
|
for (; i !== 0 && !ve(i); )
|
|
2144
|
-
i === 33 && (r ?
|
|
2145
|
-
o = e.input.slice(n, e.position),
|
|
2144
|
+
i === 33 && (r ? j(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(n - 1, e.position + 1), zn.test(a) || j(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), i = e.input.charCodeAt(++e.position);
|
|
2145
|
+
o = e.input.slice(n, e.position), Vo.test(o) && j(e, "tag suffix cannot contain flow indicator characters");
|
|
2146
2146
|
}
|
|
2147
|
-
o && !Jn.test(o) &&
|
|
2147
|
+
o && !Jn.test(o) && j(e, "tag name cannot contain such characters: " + o);
|
|
2148
2148
|
try {
|
|
2149
2149
|
o = decodeURIComponent(o);
|
|
2150
2150
|
} catch {
|
|
2151
|
-
|
|
2151
|
+
j(e, "tag name is malformed: " + o);
|
|
2152
2152
|
}
|
|
2153
|
-
return t ? e.tag = o :
|
|
2153
|
+
return t ? e.tag = o : Ee.call(e.tagMap, a) ? e.tag = e.tagMap[a] + o : a === "!" ? e.tag = "!" + o : a === "!!" ? e.tag = "tag:yaml.org,2002:" + o : j(e, 'undeclared tag handle "' + a + '"'), !0;
|
|
2154
2154
|
}
|
|
2155
2155
|
function ei(e) {
|
|
2156
2156
|
var n, t;
|
|
2157
2157
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2158
2158
|
return !1;
|
|
2159
|
-
for (e.anchor !== null &&
|
|
2159
|
+
for (e.anchor !== null && j(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !ve(t) && !Pe(t); )
|
|
2160
2160
|
t = e.input.charCodeAt(++e.position);
|
|
2161
|
-
return e.position === n &&
|
|
2161
|
+
return e.position === n && j(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2162
2162
|
}
|
|
2163
2163
|
function ti(e) {
|
|
2164
2164
|
var n, t, r;
|
|
@@ -2166,31 +2166,31 @@ function ti(e) {
|
|
|
2166
2166
|
return !1;
|
|
2167
2167
|
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !ve(r) && !Pe(r); )
|
|
2168
2168
|
r = e.input.charCodeAt(++e.position);
|
|
2169
|
-
return e.position === n &&
|
|
2169
|
+
return e.position === n && j(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), Ee.call(e.anchorMap, t) || j(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], ie(e, !0, -1), !0;
|
|
2170
2170
|
}
|
|
2171
|
-
function
|
|
2172
|
-
var o, i, s, l = 1,
|
|
2173
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = i = s = at === t || Hn === t, r && ie(e, !0, -1) && (
|
|
2171
|
+
function Re(e, n, t, r, a) {
|
|
2172
|
+
var o, i, s, l = 1, c = !1, d = !1, u, g, f, I, b, p;
|
|
2173
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = i = s = at === t || Hn === t, r && ie(e, !0, -1) && (c = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2174
2174
|
for (; Xo(e) || ei(e); )
|
|
2175
|
-
ie(e, !0, -1) ? (
|
|
2176
|
-
if (s && (s =
|
|
2175
|
+
ie(e, !0, -1) ? (c = !0, s = o, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2176
|
+
if (s && (s = c || a), (l === 1 || at === t) && (rt === t || Gn === t ? b = n : b = n + 1, p = e.position - e.lineStart, l === 1 ? s && (en(e, p) || Qo(e, p, b)) || Wo(e, b) ? d = !0 : (i && Zo(e, b) || Jo(e, b) || Yo(e, b) ? d = !0 : ti(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && j(e, "alias node should not have any properties")) : zo(e, b, rt === t) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && en(e, p))), e.tag === null)
|
|
2177
2177
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2178
2178
|
else if (e.tag === "?") {
|
|
2179
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2180
|
-
if (I = e.implicitTypes[
|
|
2179
|
+
for (e.result !== null && e.kind !== "scalar" && j(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, g = e.implicitTypes.length; u < g; u += 1)
|
|
2180
|
+
if (I = e.implicitTypes[u], I.resolve(e.result)) {
|
|
2181
2181
|
e.result = I.construct(e.result), e.tag = I.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2182
2182
|
break;
|
|
2183
2183
|
}
|
|
2184
2184
|
} else if (e.tag !== "!") {
|
|
2185
|
-
if (
|
|
2185
|
+
if (Ee.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2186
2186
|
I = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2187
2187
|
else
|
|
2188
|
-
for (I = null,
|
|
2189
|
-
if (e.tag.slice(0,
|
|
2190
|
-
I =
|
|
2188
|
+
for (I = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, g = f.length; u < g; u += 1)
|
|
2189
|
+
if (e.tag.slice(0, f[u].tag.length) === f[u].tag) {
|
|
2190
|
+
I = f[u];
|
|
2191
2191
|
break;
|
|
2192
2192
|
}
|
|
2193
|
-
I ||
|
|
2193
|
+
I || j(e, "unknown tag !<" + e.tag + ">"), e.result !== null && I.kind !== e.kind && j(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)) : j(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2194
2194
|
}
|
|
2195
2195
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2196
2196
|
}
|
|
@@ -2199,7 +2199,7 @@ function ni(e) {
|
|
|
2199
2199
|
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 && (ie(e, !0, -1), i = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || i !== 37)); ) {
|
|
2200
2200
|
for (o = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !ve(i); )
|
|
2201
2201
|
i = e.input.charCodeAt(++e.position);
|
|
2202
|
-
for (r = e.input.slice(t, e.position), a = [], r.length < 1 &&
|
|
2202
|
+
for (r = e.input.slice(t, e.position), a = [], r.length < 1 && j(e, "directive name must not be less than one character in length"); i !== 0; ) {
|
|
2203
2203
|
for (; Ke(i); )
|
|
2204
2204
|
i = e.input.charCodeAt(++e.position);
|
|
2205
2205
|
if (i === 35) {
|
|
@@ -2214,14 +2214,14 @@ function ni(e) {
|
|
|
2214
2214
|
i = e.input.charCodeAt(++e.position);
|
|
2215
2215
|
a.push(e.input.slice(t, e.position));
|
|
2216
2216
|
}
|
|
2217
|
-
i !== 0 &&
|
|
2217
|
+
i !== 0 && Mt(e), Ee.call(Qt, r) ? Qt[r](e, r, a) : ot(e, 'unknown document directive "' + r + '"');
|
|
2218
2218
|
}
|
|
2219
|
-
if (ie(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, ie(e, !0, -1)) : o &&
|
|
2219
|
+
if (ie(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, ie(e, !0, -1)) : o && j(e, "directives end mark is expected"), Re(e, e.lineIndent - 1, at, !1, !0), ie(e, !0, -1), e.checkLineBreaks && Po.test(e.input.slice(n, e.position)) && ot(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && dt(e)) {
|
|
2220
2220
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ie(e, !0, -1));
|
|
2221
2221
|
return;
|
|
2222
2222
|
}
|
|
2223
2223
|
if (e.position < e.length - 1)
|
|
2224
|
-
|
|
2224
|
+
j(e, "end of the stream or a document separator is expected");
|
|
2225
2225
|
else
|
|
2226
2226
|
return;
|
|
2227
2227
|
}
|
|
@@ -2229,7 +2229,7 @@ function Qn(e, n) {
|
|
|
2229
2229
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2230
2230
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2231
2231
|
var t = new Ho(e, n), r = e.indexOf("\0");
|
|
2232
|
-
for (r !== -1 && (t.position = r,
|
|
2232
|
+
for (r !== -1 && (t.position = r, j(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2233
2233
|
t.lineIndent += 1, t.position += 1;
|
|
2234
2234
|
for (; t.position < t.length - 1; )
|
|
2235
2235
|
ni(t);
|
|
@@ -2254,7 +2254,7 @@ function ai(e, n) {
|
|
|
2254
2254
|
var oi = ri, ii = ai, Xn = {
|
|
2255
2255
|
loadAll: oi,
|
|
2256
2256
|
load: ii
|
|
2257
|
-
}, er = Object.prototype.toString, tr = Object.prototype.hasOwnProperty,
|
|
2257
|
+
}, er = Object.prototype.toString, tr = Object.prototype.hasOwnProperty, Et = 65279, si = 9, Ze = 10, li = 13, ui = 32, ci = 33, di = 34, bt = 35, pi = 37, fi = 38, mi = 39, gi = 42, nr = 44, yi = 45, it = 58, hi = 61, vi = 62, bi = 63, ki = 64, rr = 91, ar = 93, Ci = 96, or = 123, wi = 124, ir = 125, fe = {};
|
|
2258
2258
|
fe[0] = "\\0";
|
|
2259
2259
|
fe[7] = "\\a";
|
|
2260
2260
|
fe[8] = "\\b";
|
|
@@ -2334,10 +2334,10 @@ function st(e) {
|
|
|
2334
2334
|
return e === ui || e === si;
|
|
2335
2335
|
}
|
|
2336
2336
|
function Xe(e) {
|
|
2337
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2337
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Et || 65536 <= e && e <= 1114111;
|
|
2338
2338
|
}
|
|
2339
2339
|
function nn(e) {
|
|
2340
|
-
return Xe(e) && e !==
|
|
2340
|
+
return Xe(e) && e !== Et && e !== li && e !== Ze;
|
|
2341
2341
|
}
|
|
2342
2342
|
function rn(e, n, t) {
|
|
2343
2343
|
var r = nn(e), a = r && !st(e);
|
|
@@ -2349,10 +2349,10 @@ function rn(e, n, t) {
|
|
|
2349
2349
|
) : r && e !== nr && e !== rr && e !== ar && e !== or && e !== ir) && e !== bt && !(n === it && !a) || nn(n) && !st(n) && e === bt || n === it && a
|
|
2350
2350
|
);
|
|
2351
2351
|
}
|
|
2352
|
-
function
|
|
2353
|
-
return Xe(e) && e !==
|
|
2352
|
+
function Mi(e) {
|
|
2353
|
+
return Xe(e) && e !== Et && !st(e) && e !== yi && e !== bi && e !== it && e !== nr && e !== rr && e !== ar && e !== or && e !== ir && e !== bt && e !== fi && e !== gi && e !== ci && e !== wi && e !== hi && e !== vi && e !== mi && e !== di && e !== pi && e !== ki && e !== Ci;
|
|
2354
2354
|
}
|
|
2355
|
-
function
|
|
2355
|
+
function ji(e) {
|
|
2356
2356
|
return !st(e) && e !== it;
|
|
2357
2357
|
}
|
|
2358
2358
|
function ze(e, n) {
|
|
@@ -2364,38 +2364,38 @@ function sr(e) {
|
|
|
2364
2364
|
return n.test(e);
|
|
2365
2365
|
}
|
|
2366
2366
|
var lr = 1, Ct = 2, ur = 3, cr = 4, Le = 5;
|
|
2367
|
-
function
|
|
2368
|
-
var l,
|
|
2367
|
+
function Ei(e, n, t, r, a, o, i, s) {
|
|
2368
|
+
var l, c = 0, d = null, u = !1, g = !1, f = r !== -1, I = -1, b = Mi(ze(e, 0)) && ji(ze(e, e.length - 1));
|
|
2369
2369
|
if (n || i)
|
|
2370
|
-
for (l = 0; l < e.length;
|
|
2371
|
-
if (
|
|
2370
|
+
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2371
|
+
if (c = ze(e, l), !Xe(c))
|
|
2372
2372
|
return Le;
|
|
2373
|
-
b = b && rn(
|
|
2373
|
+
b = b && rn(c, d, s), d = c;
|
|
2374
2374
|
}
|
|
2375
2375
|
else {
|
|
2376
|
-
for (l = 0; l < e.length;
|
|
2377
|
-
if (
|
|
2378
|
-
|
|
2376
|
+
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2377
|
+
if (c = ze(e, l), c === Ze)
|
|
2378
|
+
u = !0, f && (g = g || // Foldable line = too long, and not more-indented.
|
|
2379
2379
|
l - I - 1 > r && e[I + 1] !== " ", I = l);
|
|
2380
|
-
else if (!Xe(
|
|
2380
|
+
else if (!Xe(c))
|
|
2381
2381
|
return Le;
|
|
2382
|
-
b = b && rn(
|
|
2382
|
+
b = b && rn(c, d, s), d = c;
|
|
2383
2383
|
}
|
|
2384
|
-
|
|
2384
|
+
g = g || f && l - I - 1 > r && e[I + 1] !== " ";
|
|
2385
2385
|
}
|
|
2386
|
-
return !
|
|
2386
|
+
return !u && !g ? b && !i && !a(e) ? lr : o === Qe ? Le : Ct : t > 9 && sr(e) ? Le : i ? o === Qe ? Le : Ct : g ? cr : ur;
|
|
2387
2387
|
}
|
|
2388
|
-
function
|
|
2388
|
+
function Oi(e, n, t, r, a) {
|
|
2389
2389
|
e.dump = function() {
|
|
2390
2390
|
if (n.length === 0)
|
|
2391
2391
|
return e.quotingType === Qe ? '""' : "''";
|
|
2392
2392
|
if (!e.noCompatMode && (_i.indexOf(n) !== -1 || Ii.test(n)))
|
|
2393
2393
|
return e.quotingType === Qe ? '"' + n + '"' : "'" + n + "'";
|
|
2394
2394
|
var o = e.indent * Math.max(1, t), i = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), s = r || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2395
|
-
function l(
|
|
2396
|
-
return $i(e,
|
|
2395
|
+
function l(c) {
|
|
2396
|
+
return $i(e, c);
|
|
2397
2397
|
}
|
|
2398
|
-
switch (
|
|
2398
|
+
switch (Ei(
|
|
2399
2399
|
n,
|
|
2400
2400
|
s,
|
|
2401
2401
|
e.indent,
|
|
@@ -2412,9 +2412,9 @@ function Mi(e, n, t, r, a) {
|
|
|
2412
2412
|
case ur:
|
|
2413
2413
|
return "|" + an(n, e.indent) + on(tn(n, o));
|
|
2414
2414
|
case cr:
|
|
2415
|
-
return ">" + an(n, e.indent) + on(tn(
|
|
2415
|
+
return ">" + an(n, e.indent) + on(tn(Ki(n, i), o));
|
|
2416
2416
|
case Le:
|
|
2417
|
-
return '"' +
|
|
2417
|
+
return '"' + Fi(n) + '"';
|
|
2418
2418
|
default:
|
|
2419
2419
|
throw new me("impossible error: invalid scalar style");
|
|
2420
2420
|
}
|
|
@@ -2432,11 +2432,11 @@ function on(e) {
|
|
|
2432
2432
|
return e[e.length - 1] === `
|
|
2433
2433
|
` ? e.slice(0, -1) : e;
|
|
2434
2434
|
}
|
|
2435
|
-
function
|
|
2435
|
+
function Ki(e, n) {
|
|
2436
2436
|
for (var t = /(\n+)([^\n]*)/g, r = function() {
|
|
2437
|
-
var
|
|
2437
|
+
var c = e.indexOf(`
|
|
2438
2438
|
`);
|
|
2439
|
-
return
|
|
2439
|
+
return c = c !== -1 ? c : e.length, t.lastIndex = c, sn(e.slice(0, c), n);
|
|
2440
2440
|
}(), a = e[0] === `
|
|
2441
2441
|
` || e[0] === " ", o, i; i = t.exec(e); ) {
|
|
2442
2442
|
var s = i[1], l = i[2];
|
|
@@ -2455,7 +2455,7 @@ function sn(e, n) {
|
|
|
2455
2455
|
`, e.length - a > n && i > a ? l += e.slice(a, i) + `
|
|
2456
2456
|
` + e.slice(i + 1) : l += e.slice(a), l.slice(1);
|
|
2457
2457
|
}
|
|
2458
|
-
function
|
|
2458
|
+
function Fi(e) {
|
|
2459
2459
|
for (var n = "", t = 0, r, a = 0; a < e.length; t >= 65536 ? a += 2 : a++)
|
|
2460
2460
|
t = ze(e, a), r = fe[t], !r && Xe(t) ? (n += e[a], t >= 65536 && (n += e[a + 1])) : n += r || xi(t);
|
|
2461
2461
|
return n;
|
|
@@ -2473,13 +2473,13 @@ function ln(e, n, t, r) {
|
|
|
2473
2473
|
e.tag = o, e.dump = a || "[]";
|
|
2474
2474
|
}
|
|
2475
2475
|
function Bi(e, n, t) {
|
|
2476
|
-
var r = "", a = e.tag, o = Object.keys(t), i, s, l,
|
|
2476
|
+
var r = "", a = e.tag, o = Object.keys(t), i, s, l, c, d;
|
|
2477
2477
|
for (i = 0, s = o.length; i < s; i += 1)
|
|
2478
|
-
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = o[i],
|
|
2478
|
+
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = o[i], c = t[l], e.replacer && (c = e.replacer.call(t, l, c)), Te(e, n, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), Te(e, n, c, !1, !1) && (d += e.dump, r += d));
|
|
2479
2479
|
e.tag = a, e.dump = "{" + r + "}";
|
|
2480
2480
|
}
|
|
2481
2481
|
function qi(e, n, t, r) {
|
|
2482
|
-
var a = "", o = e.tag, i = Object.keys(t), s, l,
|
|
2482
|
+
var a = "", o = e.tag, i = Object.keys(t), s, l, c, d, u, g;
|
|
2483
2483
|
if (e.sortKeys === !0)
|
|
2484
2484
|
i.sort();
|
|
2485
2485
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2487,7 +2487,7 @@ function qi(e, n, t, r) {
|
|
|
2487
2487
|
else if (e.sortKeys)
|
|
2488
2488
|
throw new me("sortKeys must be a boolean or a function");
|
|
2489
2489
|
for (s = 0, l = i.length; s < l; s += 1)
|
|
2490
|
-
|
|
2490
|
+
g = "", (!r || a !== "") && (g += kt(e, n)), c = i[s], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)), Te(e, n + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Ze === e.dump.charCodeAt(0) ? g += "?" : g += "? "), g += e.dump, u && (g += kt(e, n)), Te(e, n + 1, d, !0, u) && (e.dump && Ze === e.dump.charCodeAt(0) ? g += ":" : g += ": ", g += e.dump, a += g));
|
|
2491
2491
|
e.tag = o, e.dump = a || "{}";
|
|
2492
2492
|
}
|
|
2493
2493
|
function un(e, n, t) {
|
|
@@ -2509,26 +2509,26 @@ function un(e, n, t) {
|
|
|
2509
2509
|
}
|
|
2510
2510
|
function Te(e, n, t, r, a, o, i) {
|
|
2511
2511
|
e.tag = null, e.dump = t, un(e, t, !1) || un(e, t, !0);
|
|
2512
|
-
var s = er.call(e.dump), l = r,
|
|
2512
|
+
var s = er.call(e.dump), l = r, c;
|
|
2513
2513
|
r && (r = e.flowLevel < 0 || e.flowLevel > n);
|
|
2514
|
-
var d = s === "[object Object]" || s === "[object Array]",
|
|
2515
|
-
if (d && (
|
|
2516
|
-
e.dump = "*ref_" +
|
|
2514
|
+
var d = s === "[object Object]" || s === "[object Array]", u, g;
|
|
2515
|
+
if (d && (u = e.duplicates.indexOf(t), g = u !== -1), (e.tag !== null && e.tag !== "?" || g || e.indent !== 2 && n > 0) && (a = !1), g && e.usedDuplicates[u])
|
|
2516
|
+
e.dump = "*ref_" + u;
|
|
2517
2517
|
else {
|
|
2518
|
-
if (d &&
|
|
2519
|
-
r && Object.keys(e.dump).length !== 0 ? (qi(e, n, e.dump, a),
|
|
2518
|
+
if (d && g && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), s === "[object Object]")
|
|
2519
|
+
r && Object.keys(e.dump).length !== 0 ? (qi(e, n, e.dump, a), g && (e.dump = "&ref_" + u + e.dump)) : (Bi(e, n, e.dump), g && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2520
2520
|
else if (s === "[object Array]")
|
|
2521
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? ln(e, n - 1, e.dump, a) : ln(e, n, e.dump, a),
|
|
2521
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? ln(e, n - 1, e.dump, a) : ln(e, n, e.dump, a), g && (e.dump = "&ref_" + u + e.dump)) : (Ni(e, n, e.dump), g && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2522
2522
|
else if (s === "[object String]")
|
|
2523
|
-
e.tag !== "?" &&
|
|
2523
|
+
e.tag !== "?" && Oi(e, e.dump, n, o, l);
|
|
2524
2524
|
else {
|
|
2525
2525
|
if (s === "[object Undefined]" || e.skipInvalid)
|
|
2526
2526
|
return !1;
|
|
2527
2527
|
throw new me("unacceptable kind of an object to dump " + s);
|
|
2528
2528
|
}
|
|
2529
|
-
e.tag !== null && e.tag !== "?" && (
|
|
2529
|
+
e.tag !== null && e.tag !== "?" && (c = encodeURI(
|
|
2530
2530
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
2531
|
-
).replace(/!/g, "%21"), e.tag[0] === "!" ?
|
|
2531
|
+
).replace(/!/g, "%21"), e.tag[0] === "!" ? c = "!" + c : c.slice(0, 18) === "tag:yaml.org,2002:" ? c = "!!" + c.slice(18) : c = "!<" + c + ">", e.dump = c + " " + e.dump);
|
|
2532
2532
|
}
|
|
2533
2533
|
return !0;
|
|
2534
2534
|
}
|
|
@@ -2558,30 +2558,30 @@ function Pi(e, n) {
|
|
|
2558
2558
|
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), Te(t, 0, r, !0, !0) ? t.dump + `
|
|
2559
2559
|
` : "";
|
|
2560
2560
|
}
|
|
2561
|
-
var
|
|
2562
|
-
dump:
|
|
2561
|
+
var Vi = Pi, Ui = {
|
|
2562
|
+
dump: Vi
|
|
2563
2563
|
};
|
|
2564
|
-
function
|
|
2564
|
+
function Ot(e, n) {
|
|
2565
2565
|
return function() {
|
|
2566
2566
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2567
2567
|
};
|
|
2568
2568
|
}
|
|
2569
|
-
var
|
|
2570
|
-
binary:
|
|
2571
|
-
float:
|
|
2569
|
+
var Ri = pe, Di = xn, Gi = Mn, Hi = Fn, zi = Nn, Ji = $t, Yi = Xn.load, Wi = Xn.loadAll, Zi = Ui.dump, Qi = me, Xi = {
|
|
2570
|
+
binary: Vn,
|
|
2571
|
+
float: Kn,
|
|
2572
2572
|
map: $n,
|
|
2573
|
-
null:
|
|
2574
|
-
pairs:
|
|
2573
|
+
null: jn,
|
|
2574
|
+
pairs: Rn,
|
|
2575
2575
|
set: Dn,
|
|
2576
2576
|
timestamp: Ln,
|
|
2577
|
-
bool:
|
|
2578
|
-
int:
|
|
2577
|
+
bool: En,
|
|
2578
|
+
int: On,
|
|
2579
2579
|
merge: Pn,
|
|
2580
|
-
omap:
|
|
2580
|
+
omap: Un,
|
|
2581
2581
|
seq: Tn,
|
|
2582
2582
|
str: Sn
|
|
2583
|
-
}, es =
|
|
2584
|
-
Type:
|
|
2583
|
+
}, es = Ot("safeLoad", "load"), ts = Ot("safeLoadAll", "loadAll"), ns = Ot("safeDump", "dump"), rs = {
|
|
2584
|
+
Type: Ri,
|
|
2585
2585
|
Schema: Di,
|
|
2586
2586
|
FAILSAFE_SCHEMA: Gi,
|
|
2587
2587
|
JSON_SCHEMA: Hi,
|
|
@@ -2606,12 +2606,9 @@ const as = {
|
|
|
2606
2606
|
key: 1,
|
|
2607
2607
|
class: "config-card-display-json"
|
|
2608
2608
|
}, ls = {
|
|
2609
|
-
key: 0,
|
|
2610
|
-
class: "config-card-display-json-endpoint"
|
|
2611
|
-
}, us = {
|
|
2612
2609
|
key: 2,
|
|
2613
2610
|
class: "config-card-display-yaml"
|
|
2614
|
-
},
|
|
2611
|
+
}, us = /* @__PURE__ */ ae({
|
|
2615
2612
|
__name: "ConfigCardDisplay",
|
|
2616
2613
|
props: {
|
|
2617
2614
|
propertyCollections: {
|
|
@@ -2634,80 +2631,60 @@ const as = {
|
|
|
2634
2631
|
type: Object,
|
|
2635
2632
|
required: !1,
|
|
2636
2633
|
default: () => null
|
|
2637
|
-
},
|
|
2638
|
-
fetchUrl: {
|
|
2639
|
-
type: String,
|
|
2640
|
-
required: !0
|
|
2641
2634
|
}
|
|
2642
2635
|
},
|
|
2643
2636
|
setup(e) {
|
|
2644
|
-
const n = e, t = lt(), { i18n: { t: r } } = ce.useI18n(), a = (
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
});
|
|
2650
|
-
return Ae(() => n.format, (l) => {
|
|
2651
|
-
if (l !== "structured") {
|
|
2652
|
-
const u = JSON.parse(JSON.stringify(n.record));
|
|
2653
|
-
delete u.created_at, delete u.updated_at, l === "json" ? o.value = JSON.stringify(u, null, 2) : l === "yaml" && (i.value = rs.dump(u));
|
|
2637
|
+
const n = e, t = lt(), { i18n: { t: r } } = ce.useI18n(), a = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), o = E(""), i = E("");
|
|
2638
|
+
return Ae(() => n.format, (s) => {
|
|
2639
|
+
if (s !== "structured") {
|
|
2640
|
+
const l = JSON.parse(JSON.stringify(n.record));
|
|
2641
|
+
delete l.created_at, delete l.updated_at, s === "json" ? o.value = JSON.stringify(l, null, 2) : s === "yaml" && (i.value = rs.dump(l));
|
|
2654
2642
|
}
|
|
2655
|
-
}, { immediate: !0 }), (
|
|
2656
|
-
const
|
|
2657
|
-
return
|
|
2658
|
-
e.format === "structured" ? (
|
|
2659
|
-
(
|
|
2660
|
-
key: `config-card-details-${
|
|
2661
|
-
class:
|
|
2662
|
-
"data-testid": `config-card-details-${
|
|
2643
|
+
}, { immediate: !0 }), (s, l) => {
|
|
2644
|
+
const c = L("KCodeBlock");
|
|
2645
|
+
return m(), M(be, null, [
|
|
2646
|
+
e.format === "structured" ? (m(), M("div", as, [
|
|
2647
|
+
(m(!0), M(be, null, he(e.propListTypes, (d) => (m(), M("div", {
|
|
2648
|
+
key: `config-card-details-${d}-props`,
|
|
2649
|
+
class: Fe(`config-card-details-${d}-props`),
|
|
2650
|
+
"data-testid": `config-card-details-${d}-props`
|
|
2663
2651
|
}, [
|
|
2664
|
-
|
|
2665
|
-
(
|
|
2666
|
-
key:
|
|
2667
|
-
item:
|
|
2652
|
+
d !== "basic" ? (m(), M("div", is, O(d === "advanced" ? y(r)("baseConfigCard.sections.advanced") : y(r)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
2653
|
+
(m(!0), M(be, null, he(e.propertyCollections[d], (u) => (m(), U(St, {
|
|
2654
|
+
key: u.key,
|
|
2655
|
+
item: u
|
|
2668
2656
|
}, $e({
|
|
2669
2657
|
label: v(() => [
|
|
2670
|
-
Z(
|
|
2658
|
+
Z(s.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2671
2659
|
]),
|
|
2672
|
-
[
|
|
2673
|
-
Z(
|
|
2674
|
-
row:
|
|
2675
|
-
rowValue:
|
|
2660
|
+
[u.key]: v(({ rowValue: g }) => [
|
|
2661
|
+
Z(s.$slots, u.key, {
|
|
2662
|
+
row: u,
|
|
2663
|
+
rowValue: g
|
|
2676
2664
|
}, void 0, !0)
|
|
2677
2665
|
]),
|
|
2678
2666
|
_: 2
|
|
2679
2667
|
}, [
|
|
2680
|
-
a(
|
|
2668
|
+
a(u) ? {
|
|
2681
2669
|
name: "label-tooltip",
|
|
2682
2670
|
fn: v(() => [
|
|
2683
|
-
Z(
|
|
2671
|
+
Z(s.$slots, `${u.key}-label-tooltip`, { row: u }, void 0, !0)
|
|
2684
2672
|
]),
|
|
2685
2673
|
key: "0"
|
|
2686
2674
|
} : void 0
|
|
2687
2675
|
]), 1032, ["item"]))), 128))
|
|
2688
2676
|
], 10, os))), 128))
|
|
2689
2677
|
])) : H("", !0),
|
|
2690
|
-
e.format === "json" ? (
|
|
2691
|
-
|
|
2692
|
-
M(d, { method: "get" }),
|
|
2693
|
-
M(c, {
|
|
2694
|
-
id: "config-card-endpoint-codeblock",
|
|
2695
|
-
code: s.value,
|
|
2696
|
-
"is-single-line": "",
|
|
2697
|
-
language: "json",
|
|
2698
|
-
theme: "dark"
|
|
2699
|
-
}, null, 8, ["code"])
|
|
2700
|
-
])) : H("", !0),
|
|
2701
|
-
M(c, {
|
|
2678
|
+
e.format === "json" ? (m(), M("div", ss, [
|
|
2679
|
+
F(c, {
|
|
2702
2680
|
id: "config-card-codeblock",
|
|
2703
|
-
class: Oe({ "config-card-display-json-content": s.value }),
|
|
2704
2681
|
code: o.value,
|
|
2705
2682
|
language: "json",
|
|
2706
2683
|
theme: "dark"
|
|
2707
|
-
}, null, 8, ["
|
|
2684
|
+
}, null, 8, ["code"])
|
|
2708
2685
|
])) : H("", !0),
|
|
2709
|
-
e.format === "yaml" ? (
|
|
2710
|
-
|
|
2686
|
+
e.format === "yaml" ? (m(), M("div", ls, [
|
|
2687
|
+
F(c, {
|
|
2711
2688
|
id: "config-card-codeblock",
|
|
2712
2689
|
code: i.value,
|
|
2713
2690
|
language: "yaml",
|
|
@@ -2717,18 +2694,18 @@ const as = {
|
|
|
2717
2694
|
], 64);
|
|
2718
2695
|
};
|
|
2719
2696
|
}
|
|
2720
|
-
}),
|
|
2697
|
+
}), cs = /* @__PURE__ */ Ce(us, [["__scopeId", "data-v-c914c7e4"]]), cn = "24px", ds = (e, n) => {
|
|
2721
2698
|
const t = e.__vccOpts || e;
|
|
2722
2699
|
for (const [r, a] of n)
|
|
2723
2700
|
t[r] = a;
|
|
2724
2701
|
return t;
|
|
2725
|
-
},
|
|
2702
|
+
}, ps = (e) => (mn("data-v-a53b73fd"), e = e(), gn(), e), fs = ["aria-hidden"], ms = {
|
|
2726
2703
|
key: 0,
|
|
2727
2704
|
"data-testid": "kui-icon-svg-title"
|
|
2728
|
-
},
|
|
2705
|
+
}, gs = /* @__PURE__ */ ps(() => /* @__PURE__ */ V("path", {
|
|
2729
2706
|
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",
|
|
2730
2707
|
fill: "currentColor"
|
|
2731
|
-
}, null, -1)),
|
|
2708
|
+
}, null, -1)), ys = /* @__PURE__ */ ae({
|
|
2732
2709
|
__name: "BookIcon",
|
|
2733
2710
|
props: {
|
|
2734
2711
|
/** The accessibility text provided to screen readers */
|
|
@@ -2780,7 +2757,7 @@ const as = {
|
|
|
2780
2757
|
}
|
|
2781
2758
|
},
|
|
2782
2759
|
setup(e) {
|
|
2783
|
-
const n = e, t =
|
|
2760
|
+
const n = e, t = $(() => {
|
|
2784
2761
|
if (typeof n.size == "number" && n.size > 0)
|
|
2785
2762
|
return `${n.size}px`;
|
|
2786
2763
|
if (typeof n.size == "string") {
|
|
@@ -2789,7 +2766,7 @@ const as = {
|
|
|
2789
2766
|
return `${o}px`;
|
|
2790
2767
|
}
|
|
2791
2768
|
return cn;
|
|
2792
|
-
}), r =
|
|
2769
|
+
}), r = $(() => ({
|
|
2793
2770
|
boxSizing: "border-box",
|
|
2794
2771
|
color: n.color,
|
|
2795
2772
|
display: n.display,
|
|
@@ -2797,14 +2774,14 @@ const as = {
|
|
|
2797
2774
|
lineHeight: "0",
|
|
2798
2775
|
width: t.value
|
|
2799
2776
|
}));
|
|
2800
|
-
return (a, o) => (
|
|
2777
|
+
return (a, o) => (m(), U(Ue(e.as), {
|
|
2801
2778
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2802
2779
|
class: "kui-icon book-icon",
|
|
2803
2780
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2804
2781
|
style: fn(r.value)
|
|
2805
2782
|
}, {
|
|
2806
2783
|
default: v(() => [
|
|
2807
|
-
(
|
|
2784
|
+
(m(), M("svg", {
|
|
2808
2785
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2809
2786
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2810
2787
|
fill: "none",
|
|
@@ -2814,23 +2791,23 @@ const as = {
|
|
|
2814
2791
|
width: "100%",
|
|
2815
2792
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2816
2793
|
}, [
|
|
2817
|
-
e.title ? (
|
|
2818
|
-
|
|
2819
|
-
], 8,
|
|
2794
|
+
e.title ? (m(), M("title", ms, O(e.title), 1)) : H("", !0),
|
|
2795
|
+
gs
|
|
2796
|
+
], 8, fs))
|
|
2820
2797
|
]),
|
|
2821
2798
|
_: 1
|
|
2822
2799
|
}, 8, ["aria-hidden", "style"]));
|
|
2823
2800
|
}
|
|
2824
|
-
}),
|
|
2801
|
+
}), hs = /* @__PURE__ */ ds(ys, [["__scopeId", "data-v-a53b73fd"]]), vs = { "data-testid": "config-card-title" }, bs = { class: "config-card-actions" }, ks = ["href"], Cs = {
|
|
2825
2802
|
key: 2,
|
|
2826
2803
|
class: "config-card-details-section"
|
|
2827
|
-
},
|
|
2804
|
+
}, ws = {
|
|
2828
2805
|
key: 3,
|
|
2829
2806
|
class: "config-card-details-section"
|
|
2830
|
-
},
|
|
2807
|
+
}, _s = ["data-testid"], Is = {
|
|
2831
2808
|
key: 0,
|
|
2832
2809
|
class: "config-card-prop-section-title"
|
|
2833
|
-
},
|
|
2810
|
+
}, As = /* @__PURE__ */ ae({
|
|
2834
2811
|
__name: "EntityBaseConfigCard",
|
|
2835
2812
|
props: {
|
|
2836
2813
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2907,7 +2884,7 @@ const as = {
|
|
|
2907
2884
|
var t;
|
|
2908
2885
|
const r = e, a = lt(), { i18n: { t: o } } = ce.useI18n(), { getMessageFromError: i } = ce.useErrors(), { convertKeyToTitle: s } = ce.useStringHelpers(), { axiosInstance: l } = ce.useAxios({
|
|
2909
2886
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
2910
|
-
}),
|
|
2887
|
+
}), c = [
|
|
2911
2888
|
{
|
|
2912
2889
|
label: o("baseConfigCard.general.structuredFormat"),
|
|
2913
2890
|
value: "structured",
|
|
@@ -2921,9 +2898,9 @@ const as = {
|
|
|
2921
2898
|
label: "YAML",
|
|
2922
2899
|
value: "yaml"
|
|
2923
2900
|
}
|
|
2924
|
-
], d =
|
|
2901
|
+
], d = E("structured"), u = (w) => {
|
|
2925
2902
|
d.value = w == null ? void 0 : w.value;
|
|
2926
|
-
},
|
|
2903
|
+
}, g = {
|
|
2927
2904
|
id: {
|
|
2928
2905
|
type: ne.ID,
|
|
2929
2906
|
label: o("baseConfigCard.commonFields.id_label"),
|
|
@@ -2957,21 +2934,21 @@ const as = {
|
|
|
2957
2934
|
// the last property displayed
|
|
2958
2935
|
section: ke.Basic
|
|
2959
2936
|
}
|
|
2960
|
-
},
|
|
2961
|
-
var w, N,
|
|
2962
|
-
if (!
|
|
2937
|
+
}, f = E(!1), I = E(!1), b = E(""), p = E(), A = $(() => {
|
|
2938
|
+
var w, N, R;
|
|
2939
|
+
if (!p.value)
|
|
2963
2940
|
return [];
|
|
2964
|
-
const k = [],
|
|
2965
|
-
for (const
|
|
2966
|
-
const q = (N = (w = r.configSchema) == null ? void 0 : w[
|
|
2967
|
-
let X =
|
|
2968
|
-
(J || J === 0) && (X = J === -1 ?
|
|
2941
|
+
const k = [], x = Object.keys(p.value).length;
|
|
2942
|
+
for (const S in p.value) {
|
|
2943
|
+
const q = (N = (w = r.configSchema) == null ? void 0 : w[S]) == null ? void 0 : N.order, J = (R = g[S]) == null ? void 0 : R.order;
|
|
2944
|
+
let X = x;
|
|
2945
|
+
(J || J === 0) && (X = J === -1 ? x + 1 : J), q && (X = q === -1 ? x + 1 : q), k.push([S, X]);
|
|
2969
2946
|
}
|
|
2970
|
-
return k.sort(function(
|
|
2971
|
-
return
|
|
2972
|
-
}), k.map((
|
|
2947
|
+
return k.sort(function(S, q) {
|
|
2948
|
+
return S[1] - q[1];
|
|
2949
|
+
}), k.map((S) => {
|
|
2973
2950
|
var q, J;
|
|
2974
|
-
const X =
|
|
2951
|
+
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];
|
|
2975
2952
|
return {
|
|
2976
2953
|
key: X,
|
|
2977
2954
|
value: ee,
|
|
@@ -2981,22 +2958,22 @@ const as = {
|
|
|
2981
2958
|
tooltip: te.tooltip ?? ((le == null ? void 0 : le.tooltip) || void 0),
|
|
2982
2959
|
section: te.section ?? ((le == null ? void 0 : le.section) || ke.Advanced)
|
|
2983
2960
|
};
|
|
2984
|
-
}).filter((
|
|
2985
|
-
}), h =
|
|
2961
|
+
}).filter((S) => !S.hidden && S.key !== r.pluginConfigKey);
|
|
2962
|
+
}), h = $(() => {
|
|
2986
2963
|
var w, N;
|
|
2987
|
-
if (!
|
|
2964
|
+
if (!p.value || !r.pluginConfigKey)
|
|
2988
2965
|
return [];
|
|
2989
|
-
const
|
|
2990
|
-
for (const
|
|
2991
|
-
const q = (N = (w = r.pluginConfigSchema) == null ? void 0 : w[
|
|
2966
|
+
const R = p.value[r.pluginConfigKey] || {}, k = Object.keys(R).length, x = [];
|
|
2967
|
+
for (const S in R) {
|
|
2968
|
+
const q = (N = (w = r.pluginConfigSchema) == null ? void 0 : w[S]) == null ? void 0 : N.order, J = R[S];
|
|
2992
2969
|
let X = J != null && J !== "" ? k - 1 : k;
|
|
2993
|
-
q && (X = q === -1 ? k + 1 : q),
|
|
2970
|
+
q && (X = q === -1 ? k + 1 : q), x.push([S, X]);
|
|
2994
2971
|
}
|
|
2995
|
-
return
|
|
2996
|
-
return
|
|
2997
|
-
}),
|
|
2972
|
+
return x.sort(function(S, q) {
|
|
2973
|
+
return S[1] - q[1];
|
|
2974
|
+
}), x.map((S) => {
|
|
2998
2975
|
var q;
|
|
2999
|
-
const J =
|
|
2976
|
+
const J = S[0], X = R[J], ee = ((q = r.pluginConfigSchema) == null ? void 0 : q[J]) || {};
|
|
3000
2977
|
return {
|
|
3001
2978
|
key: J,
|
|
3002
2979
|
value: X,
|
|
@@ -3006,96 +2983,96 @@ const as = {
|
|
|
3006
2983
|
tooltip: ee.tooltip ?? void 0,
|
|
3007
2984
|
section: ke.Plugin
|
|
3008
2985
|
};
|
|
3009
|
-
}).filter((
|
|
3010
|
-
}), K =
|
|
3011
|
-
var w, N,
|
|
2986
|
+
}).filter((S) => !S.hidden);
|
|
2987
|
+
}), K = $(() => {
|
|
2988
|
+
var w, N, R, k;
|
|
3012
2989
|
return {
|
|
3013
|
-
basic: (w = A.value) == null ? void 0 : w.filter((
|
|
3014
|
-
advanced: (N = A.value) == null ? void 0 : N.filter((
|
|
3015
|
-
plugin: (k = h.value) == null ? void 0 : k.concat((
|
|
2990
|
+
basic: (w = A.value) == null ? void 0 : w.filter((x) => x.section === ke.Basic),
|
|
2991
|
+
advanced: (N = A.value) == null ? void 0 : N.filter((x) => x.section === ke.Advanced),
|
|
2992
|
+
plugin: (k = h.value) == null ? void 0 : k.concat((R = A.value) == null ? void 0 : R.filter((x) => x.section === ke.Plugin))
|
|
3016
2993
|
};
|
|
3017
|
-
}), _ =
|
|
2994
|
+
}), _ = $(() => {
|
|
3018
2995
|
const w = [];
|
|
3019
2996
|
return K.value.basic.length && w.push("basic"), K.value.advanced.length && w.push("advanced"), K.value.plugin.length && w.push("plugin"), w;
|
|
3020
|
-
}), D = (w) => !!(w.tooltip || a[`${w.key}-label-tooltip`]), se =
|
|
2997
|
+
}), D = (w) => !!(w.tooltip || a[`${w.key}-label-tooltip`]), se = $(() => {
|
|
3021
2998
|
var w, N;
|
|
3022
|
-
let
|
|
3023
|
-
return r.config.app === "konnect" ?
|
|
2999
|
+
let R = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3000
|
+
return r.config.app === "konnect" ? R = R.replace(/{controlPlaneId}/gi, ((w = r.config) == null ? void 0 : w.controlPlaneId) || "") : r.config.app === "kongManager" && (R = R.replace(/\/{workspace}/gi, (N = r.config) != null && N.workspace ? `/${r.config.workspace}` : "")), R = R.replace(/{id}/gi, r.config.entityId), R;
|
|
3024
3001
|
}), Y = (w) => {
|
|
3025
|
-
|
|
3002
|
+
p.value && w(JSON.stringify(p.value)) ? n("copy:success", p.value) : n("copy:error");
|
|
3026
3003
|
};
|
|
3027
|
-
return Ae(
|
|
3004
|
+
return Ae(f, (w) => {
|
|
3028
3005
|
n("loading", w);
|
|
3029
3006
|
}, { immediate: !0 }), ut(async () => {
|
|
3030
|
-
I.value = !1,
|
|
3007
|
+
I.value = !1, f.value = !0;
|
|
3031
3008
|
try {
|
|
3032
3009
|
const { data: w } = await l.get(se.value);
|
|
3033
3010
|
if (r.dataKey)
|
|
3034
3011
|
if (typeof w[r.dataKey] < "u")
|
|
3035
|
-
|
|
3012
|
+
p.value = { ...w[r.dataKey] };
|
|
3036
3013
|
else
|
|
3037
3014
|
throw new Error(o("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3038
3015
|
else
|
|
3039
|
-
|
|
3016
|
+
p.value = { ...w };
|
|
3040
3017
|
Object.keys(r.configSchema).filter((N) => r.configSchema[N].forceShow).forEach((N) => {
|
|
3041
|
-
|
|
3018
|
+
p.value && typeof p.value[N] > "u" && (p.value[N] = null);
|
|
3042
3019
|
}), n("fetch:success", w);
|
|
3043
3020
|
} catch (w) {
|
|
3044
3021
|
const N = i(w);
|
|
3045
3022
|
b.value = N.startsWith("code") ? o("baseConfigCard.errors.load") : N, I.value = !0, n("fetch:error", w);
|
|
3046
3023
|
} finally {
|
|
3047
|
-
|
|
3024
|
+
f.value = !1;
|
|
3048
3025
|
}
|
|
3049
3026
|
}), (w, N) => {
|
|
3050
|
-
const
|
|
3051
|
-
return
|
|
3027
|
+
const R = L("KLabel"), k = L("KSelect"), x = L("KButton"), S = L("KClipboardProvider"), q = L("KSkeleton"), J = L("KEmptyState"), X = L("KCard");
|
|
3028
|
+
return m(), U(X, { class: "kong-ui-entity-base-config-card" }, $e({
|
|
3052
3029
|
actions: v(() => [
|
|
3053
|
-
|
|
3030
|
+
V("div", bs, [
|
|
3054
3031
|
Z(w.$slots, "actions", {}, void 0, !0),
|
|
3055
|
-
e.config.jsonYamlEnabled ? (
|
|
3032
|
+
e.config.jsonYamlEnabled ? (m(), U(R, {
|
|
3056
3033
|
key: 0,
|
|
3057
3034
|
class: "config-format-select-label",
|
|
3058
3035
|
"data-testid": "config-format-select-label"
|
|
3059
3036
|
}, {
|
|
3060
3037
|
default: v(() => [
|
|
3061
|
-
Q(
|
|
3038
|
+
Q(O(e.label), 1)
|
|
3062
3039
|
]),
|
|
3063
3040
|
_: 1
|
|
3064
3041
|
})) : H("", !0),
|
|
3065
|
-
e.config.jsonYamlEnabled ? (
|
|
3042
|
+
e.config.jsonYamlEnabled ? (m(), U(k, {
|
|
3066
3043
|
key: 1,
|
|
3067
3044
|
appearance: "select",
|
|
3068
3045
|
"data-testid": "select-config-format",
|
|
3069
|
-
items:
|
|
3070
|
-
onChange:
|
|
3046
|
+
items: c,
|
|
3047
|
+
onChange: u
|
|
3071
3048
|
})) : H("", !0),
|
|
3072
|
-
r.config.jsonYamlEnabled && e.configCardDoc ? (
|
|
3049
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (m(), U(x, {
|
|
3073
3050
|
key: 2,
|
|
3074
3051
|
appearance: "tertiary",
|
|
3075
3052
|
class: "book-icon",
|
|
3076
3053
|
"data-testid": "book-icon"
|
|
3077
3054
|
}, {
|
|
3078
3055
|
default: v(() => [
|
|
3079
|
-
|
|
3056
|
+
V("a", {
|
|
3080
3057
|
href: e.configCardDoc,
|
|
3081
3058
|
rel: "noopener",
|
|
3082
3059
|
target: "_blank"
|
|
3083
3060
|
}, [
|
|
3084
|
-
|
|
3085
|
-
], 8,
|
|
3061
|
+
F(y(hs), { size: y(Ia) }, null, 8, ["size"])
|
|
3062
|
+
], 8, ks)
|
|
3086
3063
|
]),
|
|
3087
3064
|
_: 1
|
|
3088
3065
|
})) : H("", !0),
|
|
3089
|
-
e.config.jsonYamlEnabled ? H("", !0) : (
|
|
3066
|
+
e.config.jsonYamlEnabled ? H("", !0) : (m(), U(S, { key: 3 }, {
|
|
3090
3067
|
default: v(({ copyToClipboard: ee }) => [
|
|
3091
|
-
!
|
|
3068
|
+
!f.value && !I.value ? (m(), U(x, {
|
|
3092
3069
|
key: 0,
|
|
3093
3070
|
appearance: "tertiary",
|
|
3094
3071
|
"data-testid": "json-copy-button",
|
|
3095
3072
|
onClick: (te) => Y(ee)
|
|
3096
3073
|
}, {
|
|
3097
3074
|
default: v(() => [
|
|
3098
|
-
Q(
|
|
3075
|
+
Q(O(y(o)("baseConfigCard.actions.copy")), 1)
|
|
3099
3076
|
]),
|
|
3100
3077
|
_: 2
|
|
3101
3078
|
}, 1032, ["onClick"])) : H("", !0)
|
|
@@ -3105,28 +3082,27 @@ const as = {
|
|
|
3105
3082
|
])
|
|
3106
3083
|
]),
|
|
3107
3084
|
default: v(() => [
|
|
3108
|
-
|
|
3085
|
+
f.value ? (m(), U(q, {
|
|
3109
3086
|
key: 0,
|
|
3110
3087
|
"data-testid": "config-card-loader",
|
|
3111
3088
|
"table-columns": 2,
|
|
3112
3089
|
type: "table"
|
|
3113
|
-
})) : I.value ? (
|
|
3090
|
+
})) : I.value ? (m(), U(J, {
|
|
3114
3091
|
key: 1,
|
|
3115
3092
|
"data-testid": "config-card-fetch-error",
|
|
3116
3093
|
"is-error": ""
|
|
3117
3094
|
}, {
|
|
3118
3095
|
message: v(() => [
|
|
3119
|
-
|
|
3096
|
+
V("h3", null, O(b.value), 1)
|
|
3120
3097
|
]),
|
|
3121
3098
|
_: 1
|
|
3122
3099
|
})) : H("", !0),
|
|
3123
|
-
e.config.jsonYamlEnabled ? (
|
|
3124
|
-
|
|
3125
|
-
"fetch-url": r.fetchUrl,
|
|
3100
|
+
e.config.jsonYamlEnabled ? (m(), M("div", Cs, [
|
|
3101
|
+
F(cs, {
|
|
3126
3102
|
format: d.value,
|
|
3127
3103
|
"prop-list-types": _.value,
|
|
3128
3104
|
"property-collections": K.value,
|
|
3129
|
-
record:
|
|
3105
|
+
record: p.value
|
|
3130
3106
|
}, $e({ _: 2 }, [
|
|
3131
3107
|
he(Object.keys(w.$slots), (ee) => ({
|
|
3132
3108
|
name: ee,
|
|
@@ -3137,15 +3113,15 @@ const as = {
|
|
|
3137
3113
|
}, void 0, !0)
|
|
3138
3114
|
])
|
|
3139
3115
|
}))
|
|
3140
|
-
]), 1032, ["
|
|
3141
|
-
])) : (
|
|
3142
|
-
(
|
|
3116
|
+
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
3117
|
+
])) : (m(), M("div", ws, [
|
|
3118
|
+
(m(!0), M(be, null, he(_.value, (ee) => (m(), M("div", {
|
|
3143
3119
|
key: `config-card-details-${ee}-props`,
|
|
3144
|
-
class:
|
|
3120
|
+
class: Fe(`config-card-details-${ee}-props`),
|
|
3145
3121
|
"data-testid": `config-card-details-${ee}-props`
|
|
3146
3122
|
}, [
|
|
3147
|
-
ee !== "basic" ? (
|
|
3148
|
-
(
|
|
3123
|
+
ee !== "basic" ? (m(), M("div", Is, O(ee === "advanced" ? y(o)("baseConfigCard.sections.advanced") : y(o)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
3124
|
+
(m(!0), M(be, null, he(K.value[ee], (te) => (m(), U(St, {
|
|
3149
3125
|
key: te.key,
|
|
3150
3126
|
item: te
|
|
3151
3127
|
}, $e({
|
|
@@ -3168,7 +3144,7 @@ const as = {
|
|
|
3168
3144
|
key: "0"
|
|
3169
3145
|
} : void 0
|
|
3170
3146
|
]), 1032, ["item"]))), 128))
|
|
3171
|
-
], 10,
|
|
3147
|
+
], 10, _s))), 128))
|
|
3172
3148
|
]))
|
|
3173
3149
|
]),
|
|
3174
3150
|
_: 2
|
|
@@ -3176,9 +3152,9 @@ const as = {
|
|
|
3176
3152
|
e.hideTitle ? void 0 : {
|
|
3177
3153
|
name: "title",
|
|
3178
3154
|
fn: v(() => [
|
|
3179
|
-
|
|
3155
|
+
V("div", vs, [
|
|
3180
3156
|
Z(w.$slots, "title", {}, () => [
|
|
3181
|
-
Q(
|
|
3157
|
+
Q(O(y(o)("baseConfigCard.title")), 1)
|
|
3182
3158
|
], !0)
|
|
3183
3159
|
])
|
|
3184
3160
|
]),
|
|
@@ -3187,10 +3163,10 @@ const as = {
|
|
|
3187
3163
|
]), 1024);
|
|
3188
3164
|
};
|
|
3189
3165
|
}
|
|
3190
|
-
}),
|
|
3166
|
+
}), xs = /* @__PURE__ */ Ce(As, [["__scopeId", "data-v-bea4df63"]]), Ss = ["onReset", "onSubmit"], Ts = {
|
|
3191
3167
|
class: "form-actions",
|
|
3192
3168
|
"data-testid": "form-actions"
|
|
3193
|
-
},
|
|
3169
|
+
}, $s = /* @__PURE__ */ ae({
|
|
3194
3170
|
__name: "EntityBaseForm",
|
|
3195
3171
|
props: {
|
|
3196
3172
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3242,100 +3218,100 @@ const as = {
|
|
|
3242
3218
|
var t;
|
|
3243
3219
|
const r = e, a = _t(), { i18n: { t: o } } = ce.useI18n(), { getMessageFromError: i } = ce.useErrors(), { axiosInstance: s } = ce.useAxios({
|
|
3244
3220
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3245
|
-
}), l =
|
|
3246
|
-
var
|
|
3221
|
+
}), l = E(!1), c = E(!1), d = E(""), u = $(() => r.canSubmit === !1 || r.isReadonly), g = $(() => {
|
|
3222
|
+
var p, A;
|
|
3247
3223
|
if (!r.editId)
|
|
3248
3224
|
return "";
|
|
3249
3225
|
let h = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3250
|
-
return r.config.app === "konnect" ? h = h.replace(/{controlPlaneId}/gi, ((
|
|
3251
|
-
}),
|
|
3226
|
+
return r.config.app === "konnect" ? h = h.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (h = h.replace(/\/{workspace}/gi, (A = r.config) != null && A.workspace ? `/${r.config.workspace}` : "")), h = h.replace(/{id}/gi, r.editId), h;
|
|
3227
|
+
}), f = () => {
|
|
3252
3228
|
r.config.cancelRoute ? a.push(r.config.cancelRoute) : I();
|
|
3253
3229
|
}, I = () => {
|
|
3254
3230
|
n("cancel");
|
|
3255
3231
|
}, b = () => {
|
|
3256
|
-
|
|
3232
|
+
u.value || n("submit");
|
|
3257
3233
|
};
|
|
3258
|
-
return Ae(() => l.value, (
|
|
3259
|
-
n("loading",
|
|
3234
|
+
return Ae(() => l.value, (p) => {
|
|
3235
|
+
n("loading", p);
|
|
3260
3236
|
}, { immediate: !0 }), ut(async () => {
|
|
3261
3237
|
if (r.editId)
|
|
3262
3238
|
try {
|
|
3263
|
-
|
|
3264
|
-
const { data:
|
|
3265
|
-
n("fetch:success",
|
|
3266
|
-
} catch (
|
|
3267
|
-
const A = i(
|
|
3268
|
-
d.value = A.startsWith("code") ? o("baseForm.errors.edit") : A,
|
|
3239
|
+
c.value = !1, l.value = !0;
|
|
3240
|
+
const { data: p } = await s.get(g.value);
|
|
3241
|
+
n("fetch:success", p);
|
|
3242
|
+
} catch (p) {
|
|
3243
|
+
const A = i(p);
|
|
3244
|
+
d.value = A.startsWith("code") ? o("baseForm.errors.edit") : A, c.value = !0, n("fetch:error", p);
|
|
3269
3245
|
} finally {
|
|
3270
3246
|
l.value = !1;
|
|
3271
3247
|
}
|
|
3272
|
-
}), (
|
|
3248
|
+
}), (p, A) => {
|
|
3273
3249
|
const h = L("KSkeleton"), K = L("KEmptyState"), _ = L("KAlert"), D = L("KButton"), se = L("KCard");
|
|
3274
|
-
return
|
|
3250
|
+
return m(), U(se, { class: "kong-ui-entity-base-form" }, {
|
|
3275
3251
|
default: v(() => [
|
|
3276
|
-
l.value ? (
|
|
3252
|
+
l.value ? (m(), U(h, {
|
|
3277
3253
|
key: 0,
|
|
3278
3254
|
type: "form"
|
|
3279
|
-
})) :
|
|
3255
|
+
})) : c.value ? (m(), U(K, {
|
|
3280
3256
|
key: 1,
|
|
3281
3257
|
"cta-text": y(o)("baseForm.actions.back"),
|
|
3282
3258
|
"data-testid": "form-fetch-error",
|
|
3283
|
-
"handle-click":
|
|
3259
|
+
"handle-click": f,
|
|
3284
3260
|
"is-error": !0
|
|
3285
3261
|
}, {
|
|
3286
3262
|
message: v(() => [
|
|
3287
|
-
|
|
3263
|
+
V("h3", null, O(d.value), 1)
|
|
3288
3264
|
]),
|
|
3289
3265
|
_: 1
|
|
3290
|
-
}, 8, ["cta-text"])) : (
|
|
3266
|
+
}, 8, ["cta-text"])) : (m(), M("form", {
|
|
3291
3267
|
key: 2,
|
|
3292
3268
|
"data-testid": "form-content",
|
|
3293
3269
|
onReset: nt(I, ["prevent"]),
|
|
3294
3270
|
onSubmit: nt(b, ["prevent"])
|
|
3295
3271
|
}, [
|
|
3296
|
-
Z(
|
|
3297
|
-
e.errorMessage ? (
|
|
3272
|
+
Z(p.$slots, "default", {}, void 0, !0),
|
|
3273
|
+
e.errorMessage ? (m(), U(_, {
|
|
3298
3274
|
key: 0,
|
|
3299
3275
|
"alert-message": e.errorMessage,
|
|
3300
3276
|
appearance: "danger",
|
|
3301
3277
|
"data-testid": "form-error"
|
|
3302
3278
|
}, null, 8, ["alert-message"])) : H("", !0),
|
|
3303
|
-
|
|
3304
|
-
Z(
|
|
3305
|
-
|
|
3279
|
+
V("div", Ts, [
|
|
3280
|
+
Z(p.$slots, "form-actions", {}, () => [
|
|
3281
|
+
F(D, {
|
|
3306
3282
|
appearance: "secondary",
|
|
3307
3283
|
"data-testid": "form-cancel",
|
|
3308
3284
|
disabled: e.isReadonly,
|
|
3309
3285
|
type: "reset"
|
|
3310
3286
|
}, {
|
|
3311
3287
|
default: v(() => [
|
|
3312
|
-
Q(
|
|
3288
|
+
Q(O(y(o)("baseForm.actions.cancel")), 1)
|
|
3313
3289
|
]),
|
|
3314
3290
|
_: 1
|
|
3315
3291
|
}, 8, ["disabled"]),
|
|
3316
|
-
|
|
3292
|
+
F(D, {
|
|
3317
3293
|
appearance: "primary",
|
|
3318
3294
|
"data-testid": "form-submit",
|
|
3319
|
-
disabled:
|
|
3295
|
+
disabled: u.value,
|
|
3320
3296
|
type: "submit"
|
|
3321
3297
|
}, {
|
|
3322
3298
|
default: v(() => [
|
|
3323
|
-
Q(
|
|
3299
|
+
Q(O(y(o)("baseForm.actions.save")), 1)
|
|
3324
3300
|
]),
|
|
3325
3301
|
_: 1
|
|
3326
3302
|
}, 8, ["disabled"])
|
|
3327
3303
|
], !0)
|
|
3328
3304
|
])
|
|
3329
|
-
], 40,
|
|
3305
|
+
], 40, Ss))
|
|
3330
3306
|
]),
|
|
3331
3307
|
_: 3
|
|
3332
3308
|
});
|
|
3333
3309
|
};
|
|
3334
3310
|
}
|
|
3335
|
-
}),
|
|
3311
|
+
}), Ms = /* @__PURE__ */ Ce($s, [["__scopeId", "data-v-448d8512"]]), js = {
|
|
3336
3312
|
key: 0,
|
|
3337
3313
|
"data-testid": "first-col"
|
|
3338
|
-
},
|
|
3314
|
+
}, Es = /* @__PURE__ */ ae({
|
|
3339
3315
|
__name: "EntityBaseTableCell",
|
|
3340
3316
|
props: {
|
|
3341
3317
|
keyName: {
|
|
@@ -3348,52 +3324,52 @@ const as = {
|
|
|
3348
3324
|
}
|
|
3349
3325
|
},
|
|
3350
3326
|
setup(e) {
|
|
3351
|
-
const n = e, t =
|
|
3327
|
+
const n = e, t = $(() => {
|
|
3352
3328
|
var b;
|
|
3353
3329
|
return ((b = n.rowEl) == null ? void 0 : b.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3354
|
-
}), r =
|
|
3330
|
+
}), r = $(() => {
|
|
3355
3331
|
var b;
|
|
3356
3332
|
return ((b = t.value) == null ? void 0 : b.querySelector('[data-testid="first-col"]')) || null;
|
|
3357
|
-
}), a =
|
|
3358
|
-
var b,
|
|
3333
|
+
}), a = $(() => {
|
|
3334
|
+
var b, p;
|
|
3359
3335
|
const A = (b = n.rowEl) == null ? void 0 : b.querySelectorAll("td");
|
|
3360
|
-
return A ? ((
|
|
3336
|
+
return A ? ((p = A[0]) == null ? void 0 : p.getAttribute("data-testid")) === n.keyName : !1;
|
|
3361
3337
|
});
|
|
3362
3338
|
let o;
|
|
3363
3339
|
const i = () => {
|
|
3364
3340
|
o && (o.disconnect(), o = void 0);
|
|
3365
3341
|
}, s = () => {
|
|
3366
|
-
var b,
|
|
3367
|
-
|
|
3368
|
-
}, l =
|
|
3369
|
-
|
|
3342
|
+
var b, p, A;
|
|
3343
|
+
c.value = ((b = r.value) == null ? void 0 : b.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((A = l.value) == null ? void 0 : A.innerText) || "";
|
|
3344
|
+
}, l = E({}), c = E(0), d = E(0), u = E(""), g = $(() => [r.value, t.value]), f = Ae(
|
|
3345
|
+
g,
|
|
3370
3346
|
(b) => {
|
|
3371
3347
|
if (a.value && (i(), "ResizeObserver" in window && window)) {
|
|
3372
|
-
o = new ResizeObserver((
|
|
3348
|
+
o = new ResizeObserver((p) => {
|
|
3373
3349
|
window.requestAnimationFrame(() => {
|
|
3374
|
-
!Array.isArray(
|
|
3350
|
+
!Array.isArray(p) || !p.length || s();
|
|
3375
3351
|
});
|
|
3376
3352
|
});
|
|
3377
|
-
for (const
|
|
3378
|
-
|
|
3353
|
+
for (const p of b)
|
|
3354
|
+
p && o.observe(p);
|
|
3379
3355
|
}
|
|
3380
3356
|
},
|
|
3381
3357
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3382
|
-
), I =
|
|
3358
|
+
), I = $(() => a.value ? c.value > d.value : !1);
|
|
3383
3359
|
return vr(() => {
|
|
3384
3360
|
s();
|
|
3385
3361
|
}), br(() => {
|
|
3386
|
-
|
|
3387
|
-
}), (b,
|
|
3362
|
+
f();
|
|
3363
|
+
}), (b, p) => {
|
|
3388
3364
|
const A = L("KTooltip");
|
|
3389
|
-
return
|
|
3365
|
+
return m(), M("span", {
|
|
3390
3366
|
ref_key: "contentRef",
|
|
3391
3367
|
ref: l,
|
|
3392
3368
|
class: "content-wrapper"
|
|
3393
3369
|
}, [
|
|
3394
|
-
a.value ? (
|
|
3395
|
-
|
|
3396
|
-
label: I.value ?
|
|
3370
|
+
a.value ? (m(), M("span", js, [
|
|
3371
|
+
F(A, {
|
|
3372
|
+
label: I.value ? u.value : "",
|
|
3397
3373
|
"max-width": "300",
|
|
3398
3374
|
placement: "bottomStart"
|
|
3399
3375
|
}, {
|
|
@@ -3406,10 +3382,10 @@ const as = {
|
|
|
3406
3382
|
], 512);
|
|
3407
3383
|
};
|
|
3408
3384
|
}
|
|
3409
|
-
}),
|
|
3385
|
+
}), Os = /* @__PURE__ */ Ce(Es, [["__scopeId", "data-v-e42a20c9"]]), Ks = { class: "toolbar-container" }, Fs = {
|
|
3410
3386
|
key: 0,
|
|
3411
3387
|
class: "toolbar-button-container"
|
|
3412
|
-
},
|
|
3388
|
+
}, Ns = ["data-testid"], Bs = /* @__PURE__ */ ae({
|
|
3413
3389
|
__name: "EntityBaseTable",
|
|
3414
3390
|
props: {
|
|
3415
3391
|
// table header configuration
|
|
@@ -3519,7 +3495,7 @@ const as = {
|
|
|
3519
3495
|
},
|
|
3520
3496
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3521
3497
|
setup(e, { emit: n }) {
|
|
3522
|
-
const t = e, { i18n: { t: r } } = ce.useI18n(), a =
|
|
3498
|
+
const t = e, { i18n: { t: r } } = ce.useI18n(), a = $(() => {
|
|
3523
3499
|
var _, D;
|
|
3524
3500
|
return typeof t.errorMessage == "string" ? {
|
|
3525
3501
|
hasError: !!t.errorMessage,
|
|
@@ -3530,7 +3506,7 @@ const as = {
|
|
|
3530
3506
|
title: (_ = t.errorMessage) == null ? void 0 : _.title,
|
|
3531
3507
|
message: (D = t.errorMessage) == null ? void 0 : D.message
|
|
3532
3508
|
};
|
|
3533
|
-
}), o =
|
|
3509
|
+
}), o = $(() => t.cacheIdentifier || t.preferencesStorageKey), i = (_) => _.hasData || !!t.query, s = $(() => {
|
|
3534
3510
|
const _ = [];
|
|
3535
3511
|
return Object.keys(t.tableHeaders).forEach((D) => {
|
|
3536
3512
|
const se = t.tableHeaders[D];
|
|
@@ -3547,10 +3523,10 @@ const as = {
|
|
|
3547
3523
|
"data-rowid": _.id,
|
|
3548
3524
|
"data-testid": _.name,
|
|
3549
3525
|
...t.rowAttributes(_)
|
|
3550
|
-
}),
|
|
3526
|
+
}), c = E({}), d = (_) => {
|
|
3551
3527
|
var D;
|
|
3552
|
-
return (D =
|
|
3553
|
-
},
|
|
3528
|
+
return (D = c.value) == null ? void 0 : D.$el.querySelector(`[data-rowid="${_.id}"]`);
|
|
3529
|
+
}, u = (_) => {
|
|
3554
3530
|
const D = {
|
|
3555
3531
|
"data-testid": _.headerKey,
|
|
3556
3532
|
...t.cellAttributes(_)
|
|
@@ -3560,35 +3536,35 @@ const as = {
|
|
|
3560
3536
|
overflowX: "hidden",
|
|
3561
3537
|
textOverflow: "ellipsis"
|
|
3562
3538
|
}), D;
|
|
3563
|
-
},
|
|
3564
|
-
n("empty-state-cta-clicked"),
|
|
3565
|
-
},
|
|
3539
|
+
}, g = () => {
|
|
3540
|
+
n("empty-state-cta-clicked"), f();
|
|
3541
|
+
}, f = () => {
|
|
3566
3542
|
n("clear-search-input");
|
|
3567
|
-
}, I =
|
|
3543
|
+
}, I = $(() => t.disableRowClick ? void 0 : (_, D) => {
|
|
3568
3544
|
n("click:row", D);
|
|
3569
3545
|
}), b = (_) => {
|
|
3570
3546
|
n("sort", _);
|
|
3571
|
-
}, { setTablePreferences:
|
|
3547
|
+
}, { setTablePreferences: p, getTablePreferences: A } = $r(), h = $(() => {
|
|
3572
3548
|
const _ = A(t.preferencesStorageKey);
|
|
3573
3549
|
return {
|
|
3574
3550
|
...t.initialFetcherParams,
|
|
3575
3551
|
..._
|
|
3576
3552
|
};
|
|
3577
3553
|
}), K = (_) => {
|
|
3578
|
-
t.preferencesStorageKey &&
|
|
3554
|
+
t.preferencesStorageKey && p(t.preferencesStorageKey, _);
|
|
3579
3555
|
};
|
|
3580
3556
|
return (_, D) => {
|
|
3581
|
-
const se = L("KIcon"), Y = L("KButton"), w = L("KDropdown"), N = L("KTable"),
|
|
3582
|
-
return
|
|
3557
|
+
const se = L("KIcon"), Y = L("KButton"), w = L("KDropdown"), N = L("KTable"), R = L("KCard");
|
|
3558
|
+
return m(), U(R, {
|
|
3583
3559
|
class: "kong-ui-entity-base-table",
|
|
3584
3560
|
title: e.title
|
|
3585
3561
|
}, {
|
|
3586
3562
|
default: v(() => [
|
|
3587
|
-
|
|
3563
|
+
F(N, {
|
|
3588
3564
|
ref_key: "tableRefs",
|
|
3589
|
-
ref:
|
|
3565
|
+
ref: c,
|
|
3590
3566
|
"cache-identifier": o.value,
|
|
3591
|
-
"cell-attrs":
|
|
3567
|
+
"cell-attrs": u,
|
|
3592
3568
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3593
3569
|
"disable-sorting": e.disableSorting,
|
|
3594
3570
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
@@ -3611,45 +3587,45 @@ const as = {
|
|
|
3611
3587
|
"pagination-type": e.paginationType,
|
|
3612
3588
|
"row-attrs": l,
|
|
3613
3589
|
"search-input": e.query,
|
|
3614
|
-
onKtableEmptyStateCtaClicked:
|
|
3590
|
+
onKtableEmptyStateCtaClicked: g,
|
|
3615
3591
|
"onRow:click": I.value,
|
|
3616
3592
|
onSort: D[0] || (D[0] = (k) => b(k)),
|
|
3617
3593
|
"onUpdate:tablePreferences": K
|
|
3618
3594
|
}, $e({
|
|
3619
3595
|
toolbar: v(({ state: k }) => [
|
|
3620
|
-
Je(
|
|
3596
|
+
Je(V("div", Ks, [
|
|
3621
3597
|
Z(_.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3622
|
-
_.$slots["toolbar-button"] ? (
|
|
3598
|
+
_.$slots["toolbar-button"] ? (m(), M("div", Fs, [
|
|
3623
3599
|
Z(_.$slots, "toolbar-button", {}, void 0, !0)
|
|
3624
3600
|
])) : H("", !0)
|
|
3625
3601
|
], 512), [
|
|
3626
3602
|
[Ye, i(k)]
|
|
3627
3603
|
])
|
|
3628
3604
|
]),
|
|
3629
|
-
actions: v(({ row: k, rowKey:
|
|
3630
|
-
|
|
3605
|
+
actions: v(({ row: k, rowKey: x, rowValue: S }) => [
|
|
3606
|
+
V("div", {
|
|
3631
3607
|
class: "actions-container",
|
|
3632
3608
|
"data-testid": k.name
|
|
3633
3609
|
}, [
|
|
3634
|
-
|
|
3610
|
+
F(w, {
|
|
3635
3611
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3636
3612
|
width: e.dropdownMenuWidth
|
|
3637
3613
|
}, {
|
|
3638
3614
|
items: v(() => [
|
|
3639
3615
|
Z(_.$slots, "actions", {
|
|
3640
3616
|
row: k,
|
|
3641
|
-
rowKey:
|
|
3642
|
-
rowValue:
|
|
3617
|
+
rowKey: x,
|
|
3618
|
+
rowValue: S
|
|
3643
3619
|
}, void 0, !0)
|
|
3644
3620
|
]),
|
|
3645
3621
|
default: v(() => [
|
|
3646
|
-
|
|
3622
|
+
F(Y, {
|
|
3647
3623
|
class: "actions-trigger",
|
|
3648
3624
|
"data-testid": "overflow-actions-button",
|
|
3649
3625
|
size: "small"
|
|
3650
3626
|
}, {
|
|
3651
3627
|
icon: v(() => [
|
|
3652
|
-
|
|
3628
|
+
F(se, {
|
|
3653
3629
|
color: y(wa),
|
|
3654
3630
|
icon: "more",
|
|
3655
3631
|
size: "16"
|
|
@@ -3660,24 +3636,24 @@ const as = {
|
|
|
3660
3636
|
]),
|
|
3661
3637
|
_: 2
|
|
3662
3638
|
}, 1032, ["width"])
|
|
3663
|
-
], 8,
|
|
3639
|
+
], 8, Ns)
|
|
3664
3640
|
]),
|
|
3665
3641
|
_: 2
|
|
3666
3642
|
}, [
|
|
3667
|
-
he(e.tableHeaders, (k,
|
|
3668
|
-
name:
|
|
3669
|
-
fn: v(({ row:
|
|
3670
|
-
|
|
3671
|
-
"key-name": String(
|
|
3672
|
-
"row-el": d(
|
|
3643
|
+
he(e.tableHeaders, (k, x) => ({
|
|
3644
|
+
name: x,
|
|
3645
|
+
fn: v(({ row: S, rowKey: q, rowValue: J }) => [
|
|
3646
|
+
F(Os, {
|
|
3647
|
+
"key-name": String(x),
|
|
3648
|
+
"row-el": d(S)
|
|
3673
3649
|
}, {
|
|
3674
3650
|
default: v(() => [
|
|
3675
|
-
Z(_.$slots,
|
|
3676
|
-
row:
|
|
3651
|
+
Z(_.$slots, x, {
|
|
3652
|
+
row: S,
|
|
3677
3653
|
rowKey: q,
|
|
3678
3654
|
rowValue: J
|
|
3679
3655
|
}, () => [
|
|
3680
|
-
Q(
|
|
3656
|
+
Q(O(J), 1)
|
|
3681
3657
|
], !0)
|
|
3682
3658
|
]),
|
|
3683
3659
|
_: 2
|
|
@@ -3690,13 +3666,13 @@ const as = {
|
|
|
3690
3666
|
}, 8, ["title"]);
|
|
3691
3667
|
};
|
|
3692
3668
|
}
|
|
3693
|
-
}),
|
|
3669
|
+
}), qs = /* @__PURE__ */ Ce(Bs, [["__scopeId", "data-v-57b5a97b"]]), Ls = {
|
|
3694
3670
|
key: 0,
|
|
3695
3671
|
class: "kong-ui-entity-delete-error"
|
|
3696
|
-
},
|
|
3672
|
+
}, Ps = {
|
|
3697
3673
|
key: 1,
|
|
3698
3674
|
class: "description"
|
|
3699
|
-
},
|
|
3675
|
+
}, Vs = /* @__PURE__ */ ae({
|
|
3700
3676
|
__name: "EntityDeleteModal",
|
|
3701
3677
|
props: {
|
|
3702
3678
|
visible: {
|
|
@@ -3735,14 +3711,14 @@ const as = {
|
|
|
3735
3711
|
},
|
|
3736
3712
|
emits: ["cancel", "proceed"],
|
|
3737
3713
|
setup(e, { emit: n }) {
|
|
3738
|
-
const t = e, { i18nT: r } = ce.useI18n(), a =
|
|
3714
|
+
const t = e, { i18nT: r } = ce.useI18n(), a = $(() => t.needConfirm ? t.entityName : ""), o = () => {
|
|
3739
3715
|
n("cancel");
|
|
3740
3716
|
}, i = () => {
|
|
3741
3717
|
n("proceed");
|
|
3742
3718
|
};
|
|
3743
3719
|
return (s, l) => {
|
|
3744
|
-
const
|
|
3745
|
-
return
|
|
3720
|
+
const c = L("KAlert"), d = L("KPrompt");
|
|
3721
|
+
return m(), U(d, {
|
|
3746
3722
|
"action-button-text": "Yes, delete",
|
|
3747
3723
|
"action-pending": e.actionPending,
|
|
3748
3724
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3754,35 +3730,35 @@ const as = {
|
|
|
3754
3730
|
onProceed: i
|
|
3755
3731
|
}, {
|
|
3756
3732
|
"body-content": v(() => [
|
|
3757
|
-
e.error ? (
|
|
3758
|
-
|
|
3733
|
+
e.error ? (m(), M("div", Ls, [
|
|
3734
|
+
F(c, { appearance: "danger" }, {
|
|
3759
3735
|
alertMessage: v(() => [
|
|
3760
|
-
Q(
|
|
3736
|
+
Q(O(e.error), 1)
|
|
3761
3737
|
]),
|
|
3762
3738
|
_: 1
|
|
3763
3739
|
})
|
|
3764
3740
|
])) : H("", !0),
|
|
3765
|
-
|
|
3741
|
+
F(y(r), {
|
|
3766
3742
|
class: "message",
|
|
3767
3743
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3768
3744
|
tag: "p"
|
|
3769
3745
|
}, $e({
|
|
3770
3746
|
entityType: v(() => [
|
|
3771
|
-
Q(
|
|
3747
|
+
Q(O(t.entityType), 1)
|
|
3772
3748
|
]),
|
|
3773
3749
|
_: 2
|
|
3774
3750
|
}, [
|
|
3775
3751
|
t.entityName ? {
|
|
3776
3752
|
name: "entityName",
|
|
3777
3753
|
fn: v(() => [
|
|
3778
|
-
|
|
3754
|
+
V("strong", null, O(t.entityName), 1)
|
|
3779
3755
|
]),
|
|
3780
3756
|
key: "0"
|
|
3781
3757
|
} : void 0
|
|
3782
3758
|
]), 1032, ["keypath"]),
|
|
3783
|
-
t.description || s.$slots.description ? (
|
|
3759
|
+
t.description || s.$slots.description ? (m(), M("div", Ps, [
|
|
3784
3760
|
Z(s.$slots, "description", {}, () => [
|
|
3785
|
-
|
|
3761
|
+
V("p", null, O(t.description), 1)
|
|
3786
3762
|
], !0)
|
|
3787
3763
|
])) : H("", !0)
|
|
3788
3764
|
]),
|
|
@@ -3790,13 +3766,13 @@ const as = {
|
|
|
3790
3766
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3791
3767
|
};
|
|
3792
3768
|
}
|
|
3793
|
-
}),
|
|
3769
|
+
}), Us = /* @__PURE__ */ Ce(Vs, [["__scopeId", "data-v-1c9a2a07"]]), Rs = {
|
|
3794
3770
|
fill: "none",
|
|
3795
3771
|
height: "20",
|
|
3796
3772
|
viewBox: "0 0 20 20",
|
|
3797
3773
|
width: "20",
|
|
3798
3774
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3799
|
-
},
|
|
3775
|
+
}, Ds = {
|
|
3800
3776
|
id: "mask0_180_20349",
|
|
3801
3777
|
height: "20",
|
|
3802
3778
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3804,7 +3780,7 @@ const as = {
|
|
|
3804
3780
|
width: "20",
|
|
3805
3781
|
x: "0",
|
|
3806
3782
|
y: "0"
|
|
3807
|
-
},
|
|
3783
|
+
}, Gs = ["fill"], Hs = { mask: "url(#mask0_180_20349)" }, zs = ["fill"], dn = /* @__PURE__ */ ae({
|
|
3808
3784
|
__name: "IconFilter",
|
|
3809
3785
|
props: {
|
|
3810
3786
|
color: {
|
|
@@ -3813,26 +3789,26 @@ const as = {
|
|
|
3813
3789
|
}
|
|
3814
3790
|
},
|
|
3815
3791
|
setup(e) {
|
|
3816
|
-
return (n, t) => (
|
|
3817
|
-
|
|
3818
|
-
|
|
3792
|
+
return (n, t) => (m(), M("svg", Rs, [
|
|
3793
|
+
V("mask", Ds, [
|
|
3794
|
+
V("rect", {
|
|
3819
3795
|
fill: e.color,
|
|
3820
3796
|
height: "20",
|
|
3821
3797
|
width: "20"
|
|
3822
|
-
}, null, 8,
|
|
3798
|
+
}, null, 8, Gs)
|
|
3823
3799
|
]),
|
|
3824
|
-
|
|
3825
|
-
|
|
3800
|
+
V("g", Hs, [
|
|
3801
|
+
V("path", {
|
|
3826
3802
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3827
3803
|
fill: e.color
|
|
3828
|
-
}, null, 8,
|
|
3804
|
+
}, null, 8, zs)
|
|
3829
3805
|
])
|
|
3830
3806
|
]));
|
|
3831
3807
|
}
|
|
3832
|
-
}),
|
|
3808
|
+
}), Js = {
|
|
3833
3809
|
key: 1,
|
|
3834
3810
|
class: "kong-ui-entity-filter"
|
|
3835
|
-
},
|
|
3811
|
+
}, Ys = { class: "menu-item-title" }, Ws = { class: "menu-item-indicator" }, Zs = { class: "menu-item-body" }, Qs = ["for"], Xs = { class: "menu-item-buttons" }, el = { class: "filter-clear-button-container" }, tl = /* @__PURE__ */ ae({
|
|
3836
3812
|
__name: "EntityFilter",
|
|
3837
3813
|
props: {
|
|
3838
3814
|
// filter config, either exact match or fuzzy match
|
|
@@ -3852,142 +3828,142 @@ const as = {
|
|
|
3852
3828
|
},
|
|
3853
3829
|
emits: ["update:modelValue"],
|
|
3854
3830
|
setup(e, { emit: n }) {
|
|
3855
|
-
const t = e, { i18n: { t: r } } = ce.useI18n(), a =
|
|
3856
|
-
const
|
|
3831
|
+
const t = e, { i18n: { t: r } } = ce.useI18n(), a = E(!1), o = E({}), i = $(() => {
|
|
3832
|
+
const p = [];
|
|
3857
3833
|
return new URLSearchParams(t.modelValue).forEach((A, h) => {
|
|
3858
|
-
A !== "" &&
|
|
3859
|
-
}),
|
|
3860
|
-
}), s =
|
|
3861
|
-
const
|
|
3862
|
-
return Object.keys(
|
|
3863
|
-
label:
|
|
3834
|
+
A !== "" && p.push(h);
|
|
3835
|
+
}), p;
|
|
3836
|
+
}), s = $(() => {
|
|
3837
|
+
const p = t.config.fields;
|
|
3838
|
+
return Object.keys(p).filter((A) => p[A].searchable).map((A) => ({
|
|
3839
|
+
label: p[A].label || A,
|
|
3864
3840
|
value: A
|
|
3865
3841
|
}));
|
|
3866
3842
|
});
|
|
3867
|
-
Ae(() => t.modelValue, (
|
|
3868
|
-
o.value = {}, new URLSearchParams(
|
|
3843
|
+
Ae(() => t.modelValue, (p) => {
|
|
3844
|
+
o.value = {}, new URLSearchParams(p).forEach((A, h) => {
|
|
3869
3845
|
o.value[h] = A;
|
|
3870
3846
|
});
|
|
3871
3847
|
});
|
|
3872
3848
|
const l = () => {
|
|
3873
3849
|
a.value = !a.value;
|
|
3874
|
-
},
|
|
3875
|
-
n("update:modelValue",
|
|
3876
|
-
}, d = (
|
|
3850
|
+
}, c = (p) => {
|
|
3851
|
+
n("update:modelValue", p);
|
|
3852
|
+
}, d = (p) => `filter-${p}`, u = (p) => {
|
|
3877
3853
|
var A, h;
|
|
3878
|
-
return (((h = (A = t.config.schema) == null ? void 0 : A[
|
|
3854
|
+
return (((h = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : h.values) ?? []).map((K) => ({
|
|
3879
3855
|
value: K,
|
|
3880
3856
|
label: K
|
|
3881
3857
|
}));
|
|
3882
|
-
},
|
|
3858
|
+
}, g = (p) => {
|
|
3883
3859
|
var A, h;
|
|
3884
|
-
return ((h = (A = t.config.schema) == null ? void 0 : A[
|
|
3885
|
-
},
|
|
3860
|
+
return ((h = (A = t.config.schema) == null ? void 0 : A[p]) == null ? void 0 : h.type) ?? "text";
|
|
3861
|
+
}, f = (p) => {
|
|
3886
3862
|
o.value = {
|
|
3887
3863
|
...o.value,
|
|
3888
|
-
[
|
|
3864
|
+
[p]: ""
|
|
3889
3865
|
}, b();
|
|
3890
3866
|
}, I = () => {
|
|
3891
3867
|
o.value = {}, b(!0);
|
|
3892
|
-
}, b = (
|
|
3868
|
+
}, b = (p = !1) => {
|
|
3893
3869
|
const A = Object.keys(o.value).reduce((h, K) => (o.value[K] && (h[K] = `${o.value[K]}`), h), {});
|
|
3894
|
-
|
|
3870
|
+
p && (a.value = !1), n("update:modelValue", new URLSearchParams(A).toString());
|
|
3895
3871
|
};
|
|
3896
|
-
return (
|
|
3872
|
+
return (p, A) => {
|
|
3897
3873
|
const h = L("KInput"), K = L("KButton"), _ = L("KSelect"), D = L("KMenuItem"), se = L("KMenu");
|
|
3898
|
-
return e.config.isExactMatch ? (
|
|
3874
|
+
return e.config.isExactMatch ? (m(), U(h, {
|
|
3899
3875
|
key: 0,
|
|
3900
3876
|
autocomplete: "off",
|
|
3901
3877
|
class: "kong-ui-entity-filter-input",
|
|
3902
3878
|
"data-testid": "search-input",
|
|
3903
3879
|
"model-value": e.modelValue,
|
|
3904
3880
|
placeholder: e.config.placeholder,
|
|
3905
|
-
"onUpdate:modelValue":
|
|
3881
|
+
"onUpdate:modelValue": c
|
|
3906
3882
|
}, {
|
|
3907
3883
|
before: v(() => [
|
|
3908
|
-
|
|
3884
|
+
F(dn)
|
|
3909
3885
|
]),
|
|
3910
3886
|
_: 1
|
|
3911
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
3912
|
-
|
|
3887
|
+
}, 8, ["model-value", "placeholder"])) : (m(), M("div", Js, [
|
|
3888
|
+
F(K, {
|
|
3913
3889
|
appearance: "tertiary",
|
|
3914
3890
|
"data-testid": "filter-button",
|
|
3915
3891
|
onClick: l
|
|
3916
3892
|
}, {
|
|
3917
3893
|
default: v(() => [
|
|
3918
|
-
|
|
3919
|
-
Q(" " +
|
|
3894
|
+
F(dn),
|
|
3895
|
+
Q(" " + O(y(r)("filter.filterButtonText")) + " " + O(i.value.length > 0 ? `(${i.value.length})` : ""), 1)
|
|
3920
3896
|
]),
|
|
3921
3897
|
_: 1
|
|
3922
3898
|
}),
|
|
3923
|
-
Je(
|
|
3899
|
+
Je(V("div", {
|
|
3924
3900
|
class: "kong-ui-entity-filter-backdrop",
|
|
3925
3901
|
onClick: l
|
|
3926
3902
|
}, null, 512), [
|
|
3927
3903
|
[Ye, a.value]
|
|
3928
3904
|
]),
|
|
3929
|
-
Je(
|
|
3905
|
+
Je(F(se, { class: "kong-ui-entity-filter-menu" }, {
|
|
3930
3906
|
body: v(() => [
|
|
3931
|
-
(
|
|
3907
|
+
(m(!0), M(be, null, he(s.value, (Y, w) => (m(), U(D, {
|
|
3932
3908
|
key: Y.value,
|
|
3933
3909
|
"data-testid": Y.value,
|
|
3934
3910
|
expandable: "",
|
|
3935
3911
|
"last-menu-item": w === s.value.length - 1
|
|
3936
3912
|
}, {
|
|
3937
3913
|
itemTitle: v(() => [
|
|
3938
|
-
|
|
3939
|
-
Q(
|
|
3940
|
-
Je(
|
|
3914
|
+
V("span", Ys, [
|
|
3915
|
+
Q(O(Y.label) + " ", 1),
|
|
3916
|
+
Je(V("span", Ws, null, 512), [
|
|
3941
3917
|
[Ye, i.value.includes(Y.value)]
|
|
3942
3918
|
])
|
|
3943
3919
|
])
|
|
3944
3920
|
]),
|
|
3945
3921
|
itemBody: v(() => {
|
|
3946
|
-
var N,
|
|
3922
|
+
var N, R;
|
|
3947
3923
|
return [
|
|
3948
|
-
|
|
3949
|
-
|
|
3924
|
+
V("div", Zs, [
|
|
3925
|
+
V("label", {
|
|
3950
3926
|
class: "menu-item-label",
|
|
3951
3927
|
for: d(Y.value)
|
|
3952
|
-
},
|
|
3953
|
-
((
|
|
3928
|
+
}, O(y(r)("filter.fieldLabel")), 9, Qs),
|
|
3929
|
+
((R = (N = e.config.schema) == null ? void 0 : N[Y.value]) == null ? void 0 : R.type) === "select" ? (m(), U(_, {
|
|
3954
3930
|
key: 0,
|
|
3955
3931
|
id: d(Y.value),
|
|
3956
3932
|
modelValue: o.value[Y.value],
|
|
3957
3933
|
"onUpdate:modelValue": (k) => o.value[Y.value] = k,
|
|
3958
3934
|
appearance: "select",
|
|
3959
|
-
items:
|
|
3935
|
+
items: u(Y.value),
|
|
3960
3936
|
placeholder: y(r)("filter.selectPlaceholder")
|
|
3961
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
3937
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), U(h, {
|
|
3962
3938
|
key: 1,
|
|
3963
3939
|
id: d(Y.value),
|
|
3964
3940
|
modelValue: o.value[Y.value],
|
|
3965
3941
|
"onUpdate:modelValue": (k) => o.value[Y.value] = k,
|
|
3966
3942
|
autocomplete: "off",
|
|
3967
3943
|
placeholder: y(r)("filter.inputPlaceholder"),
|
|
3968
|
-
type:
|
|
3944
|
+
type: g(Y.value)
|
|
3969
3945
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3970
3946
|
]),
|
|
3971
|
-
|
|
3972
|
-
|
|
3947
|
+
V("div", Xs, [
|
|
3948
|
+
F(K, {
|
|
3973
3949
|
appearance: "tertiary",
|
|
3974
3950
|
"data-testid": "apply-filter",
|
|
3975
3951
|
size: "small",
|
|
3976
3952
|
onClick: A[0] || (A[0] = (k) => b(!0))
|
|
3977
3953
|
}, {
|
|
3978
3954
|
default: v(() => [
|
|
3979
|
-
Q(
|
|
3955
|
+
Q(O(y(r)("filter.applyButtonText")), 1)
|
|
3980
3956
|
]),
|
|
3981
3957
|
_: 1
|
|
3982
3958
|
}),
|
|
3983
|
-
|
|
3959
|
+
F(K, {
|
|
3984
3960
|
appearance: "tertiary",
|
|
3985
3961
|
"data-testid": "clear-filter",
|
|
3986
3962
|
size: "small",
|
|
3987
|
-
onClick: (k) =>
|
|
3963
|
+
onClick: (k) => f(Y.value)
|
|
3988
3964
|
}, {
|
|
3989
3965
|
default: v(() => [
|
|
3990
|
-
Q(
|
|
3966
|
+
Q(O(y(r)("filter.clearButtonText")), 1)
|
|
3991
3967
|
]),
|
|
3992
3968
|
_: 2
|
|
3993
3969
|
}, 1032, ["onClick"])
|
|
@@ -3998,14 +3974,14 @@ const as = {
|
|
|
3998
3974
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
3999
3975
|
]),
|
|
4000
3976
|
actionButton: v(() => [
|
|
4001
|
-
|
|
4002
|
-
|
|
3977
|
+
V("div", el, [
|
|
3978
|
+
F(K, {
|
|
4003
3979
|
appearance: "tertiary",
|
|
4004
3980
|
size: "small",
|
|
4005
3981
|
onClick: I
|
|
4006
3982
|
}, {
|
|
4007
3983
|
default: v(() => [
|
|
4008
|
-
Q(
|
|
3984
|
+
Q(O(y(r)("filter.clearAllButtonText")), 1)
|
|
4009
3985
|
]),
|
|
4010
3986
|
_: 1
|
|
4011
3987
|
})
|
|
@@ -4018,7 +3994,7 @@ const as = {
|
|
|
4018
3994
|
]));
|
|
4019
3995
|
};
|
|
4020
3996
|
}
|
|
4021
|
-
}),
|
|
3997
|
+
}), nl = /* @__PURE__ */ Ce(tl, [["__scopeId", "data-v-15962ee2"]]), et = /* @__PURE__ */ ae({
|
|
4022
3998
|
__name: "PermissionsWrapper",
|
|
4023
3999
|
props: {
|
|
4024
4000
|
/**
|
|
@@ -4040,7 +4016,7 @@ const as = {
|
|
|
4040
4016
|
}
|
|
4041
4017
|
},
|
|
4042
4018
|
setup(e) {
|
|
4043
|
-
const n = e, t =
|
|
4019
|
+
const n = e, t = E(void 0), r = $(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
4044
4020
|
return Ae(() => n.authFunction, async () => {
|
|
4045
4021
|
t.value = await n.authFunction();
|
|
4046
4022
|
}, { immediate: !0 }), (a, o) => r.value ? Z(a.$slots, "default", {
|
|
@@ -4048,16 +4024,16 @@ const as = {
|
|
|
4048
4024
|
isAllowed: t.value
|
|
4049
4025
|
}) : H("", !0);
|
|
4050
4026
|
}
|
|
4051
|
-
}),
|
|
4027
|
+
}), rl = { class: "form-section-wrapper" }, al = {
|
|
4052
4028
|
key: 0,
|
|
4053
4029
|
class: "form-section-title"
|
|
4054
|
-
},
|
|
4030
|
+
}, ol = {
|
|
4055
4031
|
key: 1,
|
|
4056
4032
|
class: "form-section-description"
|
|
4057
|
-
},
|
|
4033
|
+
}, il = {
|
|
4058
4034
|
key: 2,
|
|
4059
4035
|
class: "form-section-footer"
|
|
4060
|
-
},
|
|
4036
|
+
}, sl = { class: "form-section-content" }, ll = /* @__PURE__ */ ae({
|
|
4061
4037
|
__name: "EntityFormSection",
|
|
4062
4038
|
props: {
|
|
4063
4039
|
title: {
|
|
@@ -4083,34 +4059,34 @@ const as = {
|
|
|
4083
4059
|
},
|
|
4084
4060
|
setup(e) {
|
|
4085
4061
|
const n = lt();
|
|
4086
|
-
return (t, r) => (
|
|
4087
|
-
class:
|
|
4062
|
+
return (t, r) => (m(), M("fieldset", {
|
|
4063
|
+
class: Fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4088
4064
|
}, [
|
|
4089
|
-
|
|
4090
|
-
e.hideInfoHeader ? H("", !0) : (
|
|
4065
|
+
V("div", rl, [
|
|
4066
|
+
e.hideInfoHeader ? H("", !0) : (m(), M("div", {
|
|
4091
4067
|
key: 0,
|
|
4092
|
-
class:
|
|
4068
|
+
class: Fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4093
4069
|
}, [
|
|
4094
|
-
e.title ? (
|
|
4095
|
-
e.description || y(n).description ? (
|
|
4070
|
+
e.title ? (m(), M("h4", al, O(e.title), 1)) : H("", !0),
|
|
4071
|
+
e.description || y(n).description ? (m(), M("div", ol, [
|
|
4096
4072
|
Z(t.$slots, "description", {}, () => [
|
|
4097
|
-
|
|
4073
|
+
V("p", null, O(e.description), 1)
|
|
4098
4074
|
], !0)
|
|
4099
4075
|
])) : H("", !0),
|
|
4100
|
-
y(n).footer ? (
|
|
4076
|
+
y(n).footer ? (m(), M("div", il, [
|
|
4101
4077
|
Z(t.$slots, "footer", {}, void 0, !0)
|
|
4102
4078
|
])) : H("", !0)
|
|
4103
4079
|
], 2)),
|
|
4104
|
-
|
|
4080
|
+
V("div", sl, [
|
|
4105
4081
|
Z(t.$slots, "default", {}, void 0, !0)
|
|
4106
4082
|
])
|
|
4107
4083
|
])
|
|
4108
4084
|
], 2));
|
|
4109
4085
|
}
|
|
4110
|
-
}), pn = /* @__PURE__ */ Ce(
|
|
4086
|
+
}), pn = /* @__PURE__ */ Ce(ll, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Kt, useDeleteUrlBuilder: ul, useErrors: cl, useExternalLinkCreator: jl, useFetchUrlBuilder: El, useFetcher: dl, useDebouncedFilter: dr, useStringHelpers: Ol, useHelpers: Kl, useGatewayFeatureSupported: Fl, useTruncationDetector: Nl } = ce, pl = { class: "add-to-group-form-container" }, fl = { class: "add-to-group-cta-text" }, ml = {
|
|
4111
4087
|
key: 0,
|
|
4112
4088
|
class: "kong-ui-entity-add-to-groups-error"
|
|
4113
|
-
},
|
|
4089
|
+
}, gl = { key: 0 }, yl = /* @__PURE__ */ ae({
|
|
4114
4090
|
__name: "AddToGroupModal",
|
|
4115
4091
|
props: {
|
|
4116
4092
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4127,81 +4103,81 @@ const as = {
|
|
|
4127
4103
|
},
|
|
4128
4104
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4129
4105
|
setup(e, { emit: n }) {
|
|
4130
|
-
var
|
|
4131
|
-
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: a } =
|
|
4132
|
-
headers: (
|
|
4133
|
-
}), o =
|
|
4106
|
+
var R;
|
|
4107
|
+
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: a } = Kt({
|
|
4108
|
+
headers: (R = t.config) == null ? void 0 : R.requestHeaders
|
|
4109
|
+
}), o = E([]), {
|
|
4134
4110
|
debouncedQueryChange: i,
|
|
4135
4111
|
loading: s,
|
|
4136
4112
|
allRecords: l,
|
|
4137
|
-
error:
|
|
4113
|
+
error: c,
|
|
4138
4114
|
loadItems: d,
|
|
4139
|
-
results:
|
|
4115
|
+
results: u
|
|
4140
4116
|
} = dr(
|
|
4141
4117
|
t.config,
|
|
4142
|
-
|
|
4118
|
+
Me.list[t.config.app].all,
|
|
4143
4119
|
"",
|
|
4144
4120
|
{
|
|
4145
4121
|
fetchedItemsKey: "data",
|
|
4146
4122
|
searchKeys: ["name", "id"]
|
|
4147
4123
|
}
|
|
4148
|
-
),
|
|
4124
|
+
), g = $(() => c.value ? r("consumer_groups.errors.general") : ""), f = E(0), I = $(() => l.value === void 0), b = $(() => u.value.map((k) => ({
|
|
4149
4125
|
label: k.name,
|
|
4150
4126
|
value: k.id,
|
|
4151
4127
|
selected: o.value.includes(k.id),
|
|
4152
4128
|
data: k
|
|
4153
4129
|
// we need this to determine whether or not to show the description text
|
|
4154
|
-
}))),
|
|
4155
|
-
var
|
|
4156
|
-
const
|
|
4157
|
-
return
|
|
4130
|
+
}))), p = (k) => {
|
|
4131
|
+
var S;
|
|
4132
|
+
const x = I.value ? u.value.find((q) => q.id === k) : (S = l.value) == null ? void 0 : S.find((q) => q.id === k);
|
|
4133
|
+
return x ? x.name : k;
|
|
4158
4134
|
}, A = () => {
|
|
4159
4135
|
_.value = "", h.value = [], w.value = [], n("cancel");
|
|
4160
|
-
}, h =
|
|
4136
|
+
}, h = E([]), K = E(!1), _ = E(""), D = async () => {
|
|
4161
4137
|
if (!o.value.length) {
|
|
4162
4138
|
_.value = "", w.value = [], n("cancel");
|
|
4163
4139
|
return;
|
|
4164
4140
|
}
|
|
4165
4141
|
K.value = !0, _.value = "", h.value = [], w.value = [];
|
|
4166
4142
|
try {
|
|
4167
|
-
const k = o.value.map((q) => Y(q)),
|
|
4168
|
-
let
|
|
4169
|
-
|
|
4170
|
-
q.status !== "fulfilled" && (
|
|
4171
|
-
}),
|
|
4143
|
+
const k = o.value.map((q) => Y(q)), x = await Promise.allSettled(k);
|
|
4144
|
+
let S = !0;
|
|
4145
|
+
x.forEach((q) => {
|
|
4146
|
+
q.status !== "fulfilled" && (S = !1);
|
|
4147
|
+
}), S ? (h.value = [], w.value = [], n("add:success", o.value), o.value = []) : (h.value.length && n("add:partial-success", h.value), o.value = [], N(x));
|
|
4172
4148
|
} catch {
|
|
4173
4149
|
_.value = r("consumer_groups.errors.add"), n("error", _.value);
|
|
4174
4150
|
} finally {
|
|
4175
4151
|
K.value = !1;
|
|
4176
4152
|
}
|
|
4177
|
-
}, se =
|
|
4178
|
-
var
|
|
4179
|
-
let k = `${t.config.apiBaseUrl}${
|
|
4180
|
-
return t.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((
|
|
4153
|
+
}, se = $(() => {
|
|
4154
|
+
var x, S, q, J;
|
|
4155
|
+
let k = `${t.config.apiBaseUrl}${Me.list[t.config.app].forConsumer}`;
|
|
4156
|
+
return t.config.app === "konnect" ? k = k.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" && (k = k.replace(/\/{workspace}/gi, (q = t.config) != null && q.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((J = t.config) == null ? void 0 : J.consumerId) || "")), k;
|
|
4181
4157
|
}), Y = async (k) => {
|
|
4182
|
-
const
|
|
4158
|
+
const x = {
|
|
4183
4159
|
group: k
|
|
4184
4160
|
};
|
|
4185
4161
|
try {
|
|
4186
|
-
const
|
|
4187
|
-
return h.value.push(k),
|
|
4188
|
-
} catch (
|
|
4189
|
-
let q = `${
|
|
4190
|
-
return
|
|
4162
|
+
const S = await a.post(se.value, x);
|
|
4163
|
+
return h.value.push(k), S;
|
|
4164
|
+
} catch (S) {
|
|
4165
|
+
let q = `${p(k)} - ${S.message}`;
|
|
4166
|
+
return S.response.status === 409 && (q = `${p(k)} - ${r("consumer_groups.errors.already_added")}`), Promise.reject(Error(q));
|
|
4191
4167
|
}
|
|
4192
|
-
}, w =
|
|
4193
|
-
w.value = k.map((
|
|
4194
|
-
var
|
|
4195
|
-
return (
|
|
4168
|
+
}, w = E([]), N = (k) => {
|
|
4169
|
+
w.value = k.map((x) => {
|
|
4170
|
+
var S;
|
|
4171
|
+
return (S = x.reason) == null ? void 0 : S.message;
|
|
4196
4172
|
}).filter(Boolean);
|
|
4197
4173
|
};
|
|
4198
4174
|
return Ae(b, () => {
|
|
4199
|
-
|
|
4175
|
+
f.value++;
|
|
4200
4176
|
}, { immediate: !0, deep: !0 }), Ae(() => t.visible, () => {
|
|
4201
4177
|
t.visible && d();
|
|
4202
|
-
}, { immediate: !0 }), (k,
|
|
4203
|
-
const
|
|
4204
|
-
return
|
|
4178
|
+
}, { immediate: !0 }), (k, x) => {
|
|
4179
|
+
const S = L("KMultiselect"), q = L("KAlert"), J = L("KPrompt");
|
|
4180
|
+
return m(), U(J, {
|
|
4205
4181
|
"action-pending": K.value,
|
|
4206
4182
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
4207
4183
|
"data-testid": "add-to-group-modal",
|
|
@@ -4211,11 +4187,11 @@ const as = {
|
|
|
4211
4187
|
onProceed: D
|
|
4212
4188
|
}, {
|
|
4213
4189
|
"body-content": v(() => [
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4190
|
+
V("div", pl, [
|
|
4191
|
+
V("p", fl, O(y(r)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4192
|
+
F(S, {
|
|
4217
4193
|
modelValue: o.value,
|
|
4218
|
-
"onUpdate:modelValue":
|
|
4194
|
+
"onUpdate:modelValue": x[0] || (x[0] = (X) => o.value = X),
|
|
4219
4195
|
autosuggest: "",
|
|
4220
4196
|
"data-testid": "add-to-groups-multiselect",
|
|
4221
4197
|
"dropdown-footer-text": I.value ? y(r)("consumer_groups.consumers.add.footer") : void 0,
|
|
@@ -4228,14 +4204,14 @@ const as = {
|
|
|
4228
4204
|
width: "100%",
|
|
4229
4205
|
onQueryChange: y(i)
|
|
4230
4206
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4231
|
-
_.value ||
|
|
4232
|
-
|
|
4207
|
+
_.value || g.value || w.value.length ? (m(), M("div", ml, [
|
|
4208
|
+
F(q, { appearance: "danger" }, {
|
|
4233
4209
|
alertMessage: v(() => [
|
|
4234
|
-
|
|
4235
|
-
w.value.length ? (
|
|
4236
|
-
(
|
|
4210
|
+
V("p", null, O(y(r)("consumer_groups.errors.add")), 1),
|
|
4211
|
+
w.value.length ? (m(), M("ul", gl, [
|
|
4212
|
+
(m(!0), M(be, null, he(w.value, (X, ee) => (m(), M("li", { key: ee }, O(X), 1))), 128))
|
|
4237
4213
|
])) : H("", !0),
|
|
4238
|
-
|
|
4214
|
+
V("div", null, O(_.value || g.value), 1)
|
|
4239
4215
|
]),
|
|
4240
4216
|
_: 1
|
|
4241
4217
|
})
|
|
@@ -4246,12 +4222,12 @@ const as = {
|
|
|
4246
4222
|
}, 8, ["action-pending", "is-visible", "title"]);
|
|
4247
4223
|
};
|
|
4248
4224
|
}
|
|
4249
|
-
}),
|
|
4225
|
+
}), Ft = (e, n) => {
|
|
4250
4226
|
const t = e.__vccOpts || e;
|
|
4251
4227
|
for (const [r, a] of n)
|
|
4252
4228
|
t[r] = a;
|
|
4253
4229
|
return t;
|
|
4254
|
-
},
|
|
4230
|
+
}, hl = /* @__PURE__ */ Ft(yl, [["__scopeId", "data-v-3808b4c0"]]), vl = { class: "kong-ui-entities-consumer-groups-list" }, bl = { key: 1 }, kl = /* @__PURE__ */ ae({
|
|
4255
4231
|
__name: "ConsumerGroupList",
|
|
4256
4232
|
props: {
|
|
4257
4233
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4298,131 +4274,131 @@ const as = {
|
|
|
4298
4274
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4299
4275
|
setup(e, { emit: n }) {
|
|
4300
4276
|
var Bt;
|
|
4301
|
-
const t = e, { i18nT: r, i18n: { t: a } } = ct.useI18n(), o = _t(), { axiosInstance: i } =
|
|
4277
|
+
const t = e, { i18nT: r, i18n: { t: a } } = ct.useI18n(), o = _t(), { axiosInstance: i } = Kt({
|
|
4302
4278
|
headers: (Bt = t.config) == null ? void 0 : Bt.requestHeaders
|
|
4303
|
-
}), s =
|
|
4279
|
+
}), s = E(1), l = $(() => !!t.config.consumerId), c = $(() => t.config.app !== "kongManager" || !!t.config.disableSorting), d = {
|
|
4304
4280
|
name: { label: a("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4305
4281
|
};
|
|
4306
4282
|
t.config.app === "kongManager" && (d.consumers_count = { label: a("consumer_groups.list.table_headers.consumers_count"), searchable: !1, sortable: !1 }), d.tags = { label: a("consumer_groups.list.table_headers.tags"), sortable: !1 };
|
|
4307
|
-
const
|
|
4308
|
-
"data-testid":
|
|
4309
|
-
}),
|
|
4283
|
+
const u = d, g = (T) => ({
|
|
4284
|
+
"data-testid": T.username ?? T.custom_id ?? T.id
|
|
4285
|
+
}), f = $(() => {
|
|
4310
4286
|
var z, re, ye, _e;
|
|
4311
|
-
let
|
|
4312
|
-
return t.config.app === "konnect" ?
|
|
4313
|
-
}), I =
|
|
4314
|
-
const
|
|
4315
|
-
return
|
|
4316
|
-
isExactMatch:
|
|
4287
|
+
let T = `${t.config.apiBaseUrl}${Me.list[t.config.app][l.value ? "forConsumer" : "all"]}`;
|
|
4288
|
+
return t.config.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, ((z = t.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = t.config) == null ? void 0 : re.consumerId) || "") : t.config.app === "kongManager" && (T = T.replace(/\/{workspace}/gi, (ye = t.config) != null && ye.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((_e = t.config) == null ? void 0 : _e.consumerId) || "")), T;
|
|
4289
|
+
}), I = E(""), b = $(() => {
|
|
4290
|
+
const T = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4291
|
+
return T ? {
|
|
4292
|
+
isExactMatch: T,
|
|
4317
4293
|
fields: {
|
|
4318
4294
|
username: d.name,
|
|
4319
4295
|
id: { label: a("consumer_groups.list.table_headers.id") }
|
|
4320
4296
|
},
|
|
4321
4297
|
placeholder: a("consumer_groups.search.placeholder")
|
|
4322
4298
|
} : {
|
|
4323
|
-
isExactMatch:
|
|
4299
|
+
isExactMatch: T,
|
|
4324
4300
|
fields: {
|
|
4325
4301
|
name: d.name
|
|
4326
4302
|
},
|
|
4327
4303
|
schema: t.config.filterSchema
|
|
4328
4304
|
};
|
|
4329
|
-
}),
|
|
4305
|
+
}), p = $(() => l.value ? "consumer_groups" : void 0), { fetcher: A, fetcherState: h } = dl(t.config, f.value, p.value), K = () => {
|
|
4330
4306
|
I.value = "";
|
|
4331
4307
|
}, _ = () => {
|
|
4332
4308
|
s.value++;
|
|
4333
|
-
}, D =
|
|
4334
|
-
const re =
|
|
4309
|
+
}, D = E(null), se = (T, z) => {
|
|
4310
|
+
const re = T.id;
|
|
4335
4311
|
if (!z(re)) {
|
|
4336
4312
|
n("copy:error", {
|
|
4337
|
-
entity:
|
|
4313
|
+
entity: T,
|
|
4338
4314
|
field: "id",
|
|
4339
4315
|
message: a("consumer_groups.errors.copy")
|
|
4340
4316
|
});
|
|
4341
4317
|
return;
|
|
4342
4318
|
}
|
|
4343
4319
|
n("copy:success", {
|
|
4344
|
-
entity:
|
|
4320
|
+
entity: T,
|
|
4345
4321
|
field: "id",
|
|
4346
4322
|
message: a("consumer_groups.copy.success", { val: re })
|
|
4347
4323
|
});
|
|
4348
|
-
}, Y = (
|
|
4349
|
-
const re = JSON.stringify(
|
|
4324
|
+
}, Y = (T, z) => {
|
|
4325
|
+
const re = JSON.stringify(T);
|
|
4350
4326
|
if (!z(re)) {
|
|
4351
4327
|
n("copy:error", {
|
|
4352
|
-
entity:
|
|
4328
|
+
entity: T,
|
|
4353
4329
|
message: a("consumer_groups.errors.copy")
|
|
4354
4330
|
});
|
|
4355
4331
|
return;
|
|
4356
4332
|
}
|
|
4357
4333
|
n("copy:success", {
|
|
4358
|
-
entity:
|
|
4334
|
+
entity: T,
|
|
4359
4335
|
message: a("consumer_groups.copy.success_brief")
|
|
4360
4336
|
});
|
|
4361
|
-
}, w = async (
|
|
4337
|
+
}, w = async (T) => {
|
|
4362
4338
|
var re;
|
|
4363
|
-
await ((re = t.canRetrieve) == null ? void 0 : re.call(t,
|
|
4364
|
-
}, N = (
|
|
4339
|
+
await ((re = t.canRetrieve) == null ? void 0 : re.call(t, T)) && o.push(t.config.getViewRoute(T.id));
|
|
4340
|
+
}, N = (T) => ({
|
|
4365
4341
|
label: a("consumer_groups.actions.view"),
|
|
4366
|
-
to: t.config.getViewRoute(
|
|
4367
|
-
}),
|
|
4342
|
+
to: t.config.getViewRoute(T)
|
|
4343
|
+
}), R = (T) => ({
|
|
4368
4344
|
label: a("consumer_groups.actions.edit"),
|
|
4369
|
-
to: t.config.getEditRoute(
|
|
4370
|
-
}), k =
|
|
4371
|
-
k.value =
|
|
4345
|
+
to: t.config.getEditRoute(T)
|
|
4346
|
+
}), k = E(void 0), x = E(!1), S = E(!1), q = E(""), J = ul(t.config, f.value), X = (T) => {
|
|
4347
|
+
k.value = T, x.value = !0;
|
|
4372
4348
|
}, ee = () => {
|
|
4373
|
-
|
|
4349
|
+
x.value = !1;
|
|
4374
4350
|
}, te = async () => {
|
|
4375
|
-
var
|
|
4376
|
-
if ((
|
|
4377
|
-
|
|
4351
|
+
var T, z, re;
|
|
4352
|
+
if ((T = k.value) != null && T.id) {
|
|
4353
|
+
S.value = !0;
|
|
4378
4354
|
try {
|
|
4379
|
-
await i.delete(J(k.value.id)),
|
|
4355
|
+
await i.delete(J(k.value.id)), S.value = !1, x.value = !1, s.value++, n("delete:success", k.value);
|
|
4380
4356
|
} catch (ye) {
|
|
4381
4357
|
q.value = ((re = (z = ye.response) == null ? void 0 : z.data) == null ? void 0 : re.message) || ye.message || a("consumer_groups.errors.delete"), n("error", ye);
|
|
4382
4358
|
} finally {
|
|
4383
|
-
|
|
4359
|
+
S.value = !1;
|
|
4384
4360
|
}
|
|
4385
4361
|
}
|
|
4386
|
-
}, le =
|
|
4362
|
+
}, le = E(!1), De = () => {
|
|
4387
4363
|
le.value = !0;
|
|
4388
4364
|
}, C = () => {
|
|
4389
4365
|
le.value = !1;
|
|
4390
|
-
}, B = (
|
|
4391
|
-
z || C(), s.value++, n("add:success",
|
|
4366
|
+
}, B = (T, z) => {
|
|
4367
|
+
z || C(), s.value++, n("add:success", T);
|
|
4392
4368
|
}, oe = () => {
|
|
4393
4369
|
l.value && De();
|
|
4394
|
-
}, P =
|
|
4395
|
-
P.value =
|
|
4370
|
+
}, P = E(void 0), G = E(!1), ge = E(""), we = (T) => {
|
|
4371
|
+
P.value = T, G.value = !0;
|
|
4396
4372
|
}, de = () => {
|
|
4397
4373
|
G.value = !1, P.value = void 0;
|
|
4398
|
-
}, Ne =
|
|
4374
|
+
}, Ne = $(() => {
|
|
4399
4375
|
var z, re, ye, _e;
|
|
4400
|
-
let
|
|
4401
|
-
return t.config.app === "konnect" ?
|
|
4402
|
-
}), Ge =
|
|
4376
|
+
let T = `${t.config.apiBaseUrl}${Me.list[t.config.app].oneForConsumer}`;
|
|
4377
|
+
return t.config.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, ((z = t.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = t.config) == null ? void 0 : re.consumerId) || "") : t.config.app === "kongManager" && (T = T.replace(/\/{workspace}/gi, (ye = t.config) != null && ye.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((_e = t.config) == null ? void 0 : _e.consumerId) || "")), T;
|
|
4378
|
+
}), Ge = E(!1), pr = async () => {
|
|
4403
4379
|
if (P.value) {
|
|
4404
4380
|
Ge.value = !0;
|
|
4405
4381
|
try {
|
|
4406
|
-
const
|
|
4407
|
-
await i.delete(
|
|
4408
|
-
} catch (
|
|
4409
|
-
ge.value =
|
|
4382
|
+
const T = Ne.value.replace(/{consumerGroupId}/gi, P.value.id);
|
|
4383
|
+
await i.delete(T), n("remove:success", P.value), de(), s.value++;
|
|
4384
|
+
} catch (T) {
|
|
4385
|
+
ge.value = T.message || a("consumer_groups.errors.delete"), n("error", T);
|
|
4410
4386
|
} finally {
|
|
4411
4387
|
Ge.value = !1;
|
|
4412
4388
|
}
|
|
4413
4389
|
}
|
|
4414
|
-
}, Nt =
|
|
4415
|
-
Ae(h, (
|
|
4390
|
+
}, Nt = E(!0);
|
|
4391
|
+
Ae(h, (T) => {
|
|
4416
4392
|
var z, re, ye, _e;
|
|
4417
|
-
if (Array.isArray((z =
|
|
4393
|
+
if (Array.isArray((z = T == null ? void 0 : T.response) == null ? void 0 : z.data) && (Nt.value = T.response.data.length > 0), T.status === Oe.Error) {
|
|
4418
4394
|
D.value = {
|
|
4419
4395
|
title: a("consumer_groups.errors.general")
|
|
4420
|
-
}, (_e = (ye = (re =
|
|
4396
|
+
}, (_e = (ye = (re = T.error) == null ? void 0 : re.response) == null ? void 0 : ye.data) != null && _e.message && (D.value.message = T.error.response.data.message), n("error", T.error);
|
|
4421
4397
|
return;
|
|
4422
4398
|
}
|
|
4423
4399
|
D.value = null;
|
|
4424
4400
|
});
|
|
4425
|
-
const pt =
|
|
4401
|
+
const pt = E({
|
|
4426
4402
|
ctaPath: l.value ? void 0 : t.config.createRoute,
|
|
4427
4403
|
ctaText: void 0,
|
|
4428
4404
|
message: a("consumer_groups.list.empty_state.description"),
|
|
@@ -4430,14 +4406,14 @@ const as = {
|
|
|
4430
4406
|
});
|
|
4431
4407
|
return ut(async () => {
|
|
4432
4408
|
await t.canCreate() && (pt.value.title = l.value ? a("consumer_groups.list.empty_state.title_for_consumer") : a("consumer_groups.list.empty_state.title"), pt.value.ctaText = l.value ? a("consumer_groups.actions.add_to_group") : a("consumer_groups.actions.create"));
|
|
4433
|
-
}), (
|
|
4409
|
+
}), (T, z) => {
|
|
4434
4410
|
const re = L("KButton"), ye = L("KBadge"), _e = L("KTruncate"), He = L("KDropdownItem"), qt = L("KClipboardProvider"), fr = L("KPrompt");
|
|
4435
|
-
return
|
|
4436
|
-
|
|
4411
|
+
return m(), M("div", vl, [
|
|
4412
|
+
F(y(qs), {
|
|
4437
4413
|
"cache-identifier": e.cacheIdentifier,
|
|
4438
4414
|
"disable-pagination": l.value,
|
|
4439
4415
|
"disable-pagination-page-jump": "",
|
|
4440
|
-
"disable-sorting":
|
|
4416
|
+
"disable-sorting": c.value,
|
|
4441
4417
|
"empty-state-options": pt.value,
|
|
4442
4418
|
"enable-entity-actions": "",
|
|
4443
4419
|
"error-message": D.value,
|
|
@@ -4446,8 +4422,8 @@ const as = {
|
|
|
4446
4422
|
"pagination-type": "offset",
|
|
4447
4423
|
"preferences-storage-key": "kong-ui-entities-consumer-groups-list",
|
|
4448
4424
|
query: I.value,
|
|
4449
|
-
"row-attributes":
|
|
4450
|
-
"table-headers": y(
|
|
4425
|
+
"row-attributes": g,
|
|
4426
|
+
"table-headers": y(u),
|
|
4451
4427
|
"use-action-outside": e.useActionOutside,
|
|
4452
4428
|
onClearSearchInput: K,
|
|
4453
4429
|
"onClick:row": z[3] || (z[3] = (W) => w(W)),
|
|
@@ -4455,7 +4431,7 @@ const as = {
|
|
|
4455
4431
|
onSort: _
|
|
4456
4432
|
}, {
|
|
4457
4433
|
"toolbar-filter": v(() => [
|
|
4458
|
-
l.value ? H("", !0) : (
|
|
4434
|
+
l.value ? H("", !0) : (m(), U(y(nl), {
|
|
4459
4435
|
key: 0,
|
|
4460
4436
|
modelValue: I.value,
|
|
4461
4437
|
"onUpdate:modelValue": z[0] || (z[0] = (W) => I.value = W),
|
|
@@ -4463,15 +4439,15 @@ const as = {
|
|
|
4463
4439
|
}, null, 8, ["modelValue", "config"]))
|
|
4464
4440
|
]),
|
|
4465
4441
|
"toolbar-button": v(() => [
|
|
4466
|
-
(
|
|
4442
|
+
(m(), U(Cr, {
|
|
4467
4443
|
disabled: !e.useActionOutside,
|
|
4468
4444
|
to: "#kong-ui-app-page-header-action-button"
|
|
4469
4445
|
}, [
|
|
4470
|
-
|
|
4446
|
+
F(y(et), {
|
|
4471
4447
|
"auth-function": () => e.canCreate()
|
|
4472
4448
|
}, {
|
|
4473
4449
|
default: v(() => [
|
|
4474
|
-
Je(
|
|
4450
|
+
Je(F(re, {
|
|
4475
4451
|
appearance: "primary",
|
|
4476
4452
|
"data-testid": "toolbar-add-consumer-group",
|
|
4477
4453
|
icon: "plus",
|
|
@@ -4479,7 +4455,7 @@ const as = {
|
|
|
4479
4455
|
onClick: z[1] || (z[1] = () => e.config.consumerId ? De() : void 0)
|
|
4480
4456
|
}, {
|
|
4481
4457
|
default: v(() => [
|
|
4482
|
-
Q(
|
|
4458
|
+
Q(O(e.config.consumerId ? y(a)("consumer_groups.actions.add_to_group") : y(a)("consumer_groups.list.toolbar_actions.new_consumer_group")), 1)
|
|
4483
4459
|
]),
|
|
4484
4460
|
_: 1
|
|
4485
4461
|
}, 8, ["to"]), [
|
|
@@ -4491,62 +4467,62 @@ const as = {
|
|
|
4491
4467
|
], 8, ["disabled"]))
|
|
4492
4468
|
]),
|
|
4493
4469
|
name: v(({ rowValue: W }) => [
|
|
4494
|
-
|
|
4470
|
+
V("b", null, O(W ?? "-"), 1)
|
|
4495
4471
|
]),
|
|
4496
4472
|
consumers_count: v(({ rowValue: W }) => [
|
|
4497
|
-
Q(
|
|
4473
|
+
Q(O(W ?? "-"), 1)
|
|
4498
4474
|
]),
|
|
4499
4475
|
tags: v(({ rowValue: W }) => [
|
|
4500
|
-
(W == null ? void 0 : W.length) > 0 ? (
|
|
4476
|
+
(W == null ? void 0 : W.length) > 0 ? (m(), U(_e, { key: 0 }, {
|
|
4501
4477
|
default: v(() => [
|
|
4502
|
-
(
|
|
4478
|
+
(m(!0), M(be, null, he(W, (Be) => (m(), U(ye, {
|
|
4503
4479
|
key: Be,
|
|
4504
4480
|
onClick: z[2] || (z[2] = nt(() => {
|
|
4505
4481
|
}, ["stop"]))
|
|
4506
4482
|
}, {
|
|
4507
4483
|
default: v(() => [
|
|
4508
|
-
Q(
|
|
4484
|
+
Q(O(Be), 1)
|
|
4509
4485
|
]),
|
|
4510
4486
|
_: 2
|
|
4511
4487
|
}, 1024))), 128))
|
|
4512
4488
|
]),
|
|
4513
4489
|
_: 2
|
|
4514
|
-
}, 1024)) : (
|
|
4490
|
+
}, 1024)) : (m(), M("span", bl, "-"))
|
|
4515
4491
|
]),
|
|
4516
4492
|
actions: v(({ row: W }) => [
|
|
4517
|
-
|
|
4493
|
+
F(qt, null, {
|
|
4518
4494
|
default: v(({ copyToClipboard: Be }) => [
|
|
4519
|
-
|
|
4495
|
+
F(He, {
|
|
4520
4496
|
"data-testid": "action-entity-copy-id",
|
|
4521
4497
|
onClick: (mr) => se(W, Be)
|
|
4522
4498
|
}, {
|
|
4523
4499
|
default: v(() => [
|
|
4524
|
-
Q(
|
|
4500
|
+
Q(O(y(a)("consumer_groups.actions.copy_id")), 1)
|
|
4525
4501
|
]),
|
|
4526
4502
|
_: 2
|
|
4527
4503
|
}, 1032, ["onClick"])
|
|
4528
4504
|
]),
|
|
4529
4505
|
_: 2
|
|
4530
4506
|
}, 1024),
|
|
4531
|
-
|
|
4507
|
+
F(qt, null, {
|
|
4532
4508
|
default: v(({ copyToClipboard: Be }) => [
|
|
4533
|
-
|
|
4509
|
+
F(He, {
|
|
4534
4510
|
"data-testid": "action-entity-copy-json",
|
|
4535
4511
|
onClick: (mr) => Y(W, Be)
|
|
4536
4512
|
}, {
|
|
4537
4513
|
default: v(() => [
|
|
4538
|
-
Q(
|
|
4514
|
+
Q(O(y(a)("consumer_groups.actions.copy_json")), 1)
|
|
4539
4515
|
]),
|
|
4540
4516
|
_: 2
|
|
4541
4517
|
}, 1032, ["onClick"])
|
|
4542
4518
|
]),
|
|
4543
4519
|
_: 2
|
|
4544
4520
|
}, 1024),
|
|
4545
|
-
|
|
4521
|
+
F(y(et), {
|
|
4546
4522
|
"auth-function": () => e.canRetrieve(W)
|
|
4547
4523
|
}, {
|
|
4548
4524
|
default: v(() => [
|
|
4549
|
-
|
|
4525
|
+
F(He, {
|
|
4550
4526
|
"data-testid": "action-entity-view",
|
|
4551
4527
|
"has-divider": "",
|
|
4552
4528
|
item: N(W.id)
|
|
@@ -4554,29 +4530,29 @@ const as = {
|
|
|
4554
4530
|
]),
|
|
4555
4531
|
_: 2
|
|
4556
4532
|
}, 1032, ["auth-function"]),
|
|
4557
|
-
|
|
4533
|
+
F(y(et), {
|
|
4558
4534
|
"auth-function": () => e.canEdit(W)
|
|
4559
4535
|
}, {
|
|
4560
4536
|
default: v(() => [
|
|
4561
|
-
|
|
4537
|
+
F(He, {
|
|
4562
4538
|
"data-testid": "action-entity-edit",
|
|
4563
|
-
item:
|
|
4539
|
+
item: R(W.id)
|
|
4564
4540
|
}, null, 8, ["item"])
|
|
4565
4541
|
]),
|
|
4566
4542
|
_: 2
|
|
4567
4543
|
}, 1032, ["auth-function"]),
|
|
4568
|
-
|
|
4544
|
+
F(y(et), {
|
|
4569
4545
|
"auth-function": () => e.canDelete(W)
|
|
4570
4546
|
}, {
|
|
4571
4547
|
default: v(() => [
|
|
4572
|
-
|
|
4548
|
+
F(He, {
|
|
4573
4549
|
danger: "",
|
|
4574
4550
|
"data-testid": "action-entity-delete",
|
|
4575
4551
|
"has-divider": "",
|
|
4576
4552
|
onClick: () => e.config.consumerId ? we(W) : X(W)
|
|
4577
4553
|
}, {
|
|
4578
4554
|
default: v(() => [
|
|
4579
|
-
Q(
|
|
4555
|
+
Q(O(e.config.consumerId ? y(a)("consumer_groups.actions.exit") : y(a)("consumer_groups.actions.delete")), 1)
|
|
4580
4556
|
]),
|
|
4581
4557
|
_: 2
|
|
4582
4558
|
}, 1032, ["onClick"])
|
|
@@ -4586,19 +4562,19 @@ const as = {
|
|
|
4586
4562
|
]),
|
|
4587
4563
|
_: 1
|
|
4588
4564
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "use-action-outside"]),
|
|
4589
|
-
|
|
4590
|
-
"action-pending":
|
|
4565
|
+
F(y(Us), {
|
|
4566
|
+
"action-pending": S.value,
|
|
4591
4567
|
"data-testid": "delete-consumer-group-modal",
|
|
4592
4568
|
description: y(a)("consumer_groups.delete.description"),
|
|
4593
4569
|
"entity-name": k.value && (k.value.name || k.value.id),
|
|
4594
4570
|
"entity-type": y(hn).ConsumerGroup,
|
|
4595
4571
|
error: q.value,
|
|
4596
4572
|
title: y(a)("consumer_groups.delete.title"),
|
|
4597
|
-
visible:
|
|
4573
|
+
visible: x.value,
|
|
4598
4574
|
onCancel: ee,
|
|
4599
4575
|
onProceed: te
|
|
4600
4576
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4601
|
-
e.config.consumerId ? (
|
|
4577
|
+
e.config.consumerId ? (m(), U(hl, {
|
|
4602
4578
|
key: 0,
|
|
4603
4579
|
config: e.config,
|
|
4604
4580
|
"data-testid": "add-to-group-modal",
|
|
@@ -4607,7 +4583,7 @@ const as = {
|
|
|
4607
4583
|
"onAdd:success": z[5] || (z[5] = (W) => B(W)),
|
|
4608
4584
|
onCancel: C
|
|
4609
4585
|
}, null, 8, ["config", "visible"])) : H("", !0),
|
|
4610
|
-
e.config.consumerId && P.value ? (
|
|
4586
|
+
e.config.consumerId && P.value ? (m(), U(fr, {
|
|
4611
4587
|
key: 1,
|
|
4612
4588
|
"data-testid": "exit-group-modal",
|
|
4613
4589
|
"is-visible": G.value,
|
|
@@ -4617,35 +4593,35 @@ const as = {
|
|
|
4617
4593
|
onProceed: pr
|
|
4618
4594
|
}, {
|
|
4619
4595
|
"body-content": v(() => [
|
|
4620
|
-
|
|
4596
|
+
F(y(r), {
|
|
4621
4597
|
class: "exit-modal-message",
|
|
4622
4598
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
4623
4599
|
tag: "p"
|
|
4624
4600
|
}, $e({
|
|
4625
4601
|
consumerGroup: v(() => [
|
|
4626
|
-
|
|
4602
|
+
V("strong", null, O(P.value.name || P.value.id), 1)
|
|
4627
4603
|
]),
|
|
4628
4604
|
_: 2
|
|
4629
4605
|
}, [
|
|
4630
4606
|
e.config.consumerUsername ? {
|
|
4631
4607
|
name: "consumer",
|
|
4632
4608
|
fn: v(() => [
|
|
4633
|
-
|
|
4609
|
+
V("strong", null, O(e.config.consumerUsername), 1)
|
|
4634
4610
|
]),
|
|
4635
4611
|
key: "0"
|
|
4636
4612
|
} : void 0
|
|
4637
4613
|
]), 1032, ["keypath"]),
|
|
4638
|
-
|
|
4614
|
+
V("p", null, O(y(a)("consumer_groups.consumers.exit.description")), 1)
|
|
4639
4615
|
]),
|
|
4640
4616
|
_: 1
|
|
4641
4617
|
}, 8, ["is-visible", "title"])) : H("", !0)
|
|
4642
4618
|
]);
|
|
4643
4619
|
};
|
|
4644
4620
|
}
|
|
4645
|
-
}),
|
|
4621
|
+
}), Bl = /* @__PURE__ */ Ft(kl, [["__scopeId", "data-v-12149d54"]]), Cl = { class: "kong-ui-entities-consumer-group-form" }, wl = { class: "select-item-label" }, _l = {
|
|
4646
4622
|
key: 0,
|
|
4647
4623
|
class: "select-item-desc"
|
|
4648
|
-
},
|
|
4624
|
+
}, Il = /* @__PURE__ */ ae({
|
|
4649
4625
|
__name: "ConsumerGroupForm",
|
|
4650
4626
|
props: {
|
|
4651
4627
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4679,26 +4655,26 @@ const as = {
|
|
|
4679
4655
|
}), {
|
|
4680
4656
|
debouncedQueryChange: s,
|
|
4681
4657
|
loading: l,
|
|
4682
|
-
error:
|
|
4658
|
+
error: c,
|
|
4683
4659
|
loadItems: d,
|
|
4684
|
-
results:
|
|
4685
|
-
} = dr(t.config, (le =
|
|
4660
|
+
results: u
|
|
4661
|
+
} = dr(t.config, (le = Me.form[(te = t.config) == null ? void 0 : te.app]) == null ? void 0 : le.consumersList, "", {
|
|
4686
4662
|
fetchedItemsKey: "data",
|
|
4687
4663
|
searchKeys: ["username", "custom_id", "id"]
|
|
4688
|
-
}), { axiosInstance:
|
|
4664
|
+
}), { axiosInstance: g } = Kt({
|
|
4689
4665
|
headers: (De = t.config) == null ? void 0 : De.requestHeaders
|
|
4690
|
-
}), { getMessageFromError:
|
|
4666
|
+
}), { getMessageFromError: f } = cl(), I = $(() => u.value.map((C) => ({
|
|
4691
4667
|
label: C.username || C.custom_id,
|
|
4692
4668
|
value: C.id,
|
|
4693
4669
|
selected: o.fields.consumers.includes(C.id),
|
|
4694
4670
|
data: C
|
|
4695
4671
|
// we need this to determine whether or not to show the description text
|
|
4696
|
-
}))), b =
|
|
4672
|
+
}))), b = $(() => {
|
|
4697
4673
|
var C, B;
|
|
4698
|
-
return (B =
|
|
4699
|
-
}),
|
|
4674
|
+
return (B = Me.form[(C = t.config) == null ? void 0 : C.app]) == null ? void 0 : B.edit;
|
|
4675
|
+
}), p = $(() => t.consumerGroupId ? tt.Edit : tt.Create), A = $(() => !!o.fields.name && !w.value), h = $(() => JSON.stringify(o.fields) !== JSON.stringify(i)), K = (C, B = "", oe = "") => {
|
|
4700
4676
|
var G, ge, we, de, Ne, Ge;
|
|
4701
|
-
let P = `${(G = t.config) == null ? void 0 : G.apiBaseUrl}${
|
|
4677
|
+
let P = `${(G = t.config) == null ? void 0 : G.apiBaseUrl}${Me.form[(ge = t.config) == null ? void 0 : ge.app][C]}`;
|
|
4702
4678
|
return ((we = t.config) == null ? void 0 : we.app) === "konnect" ? P = P.replace(/{controlPlaneId}/gi, ((de = t.config) == null ? void 0 : de.controlPlaneId) || "") : ((Ne = t.config) == null ? void 0 : Ne.app) === "kongManager" && (P = P.replace(/\/{workspace}/gi, (Ge = t.config) != null && Ge.workspace ? `/${t.config.workspace}` : "")), P = P.replace(/{id}/gi, B || t.consumerGroupId), (C === "addConsumer" || C === "removeConsumer") && (P = P.replace(/{consumerId}/gi, oe)), P;
|
|
4703
4679
|
}, _ = () => {
|
|
4704
4680
|
var C;
|
|
@@ -4715,74 +4691,74 @@ const as = {
|
|
|
4715
4691
|
o.fields.consumers = ((ge = C == null ? void 0 : C.consumers) == null ? void 0 : ge.map((de) => de.id)) || [];
|
|
4716
4692
|
else
|
|
4717
4693
|
try {
|
|
4718
|
-
const { data: de } = await
|
|
4694
|
+
const { data: de } = await g.get(K("getConsumers"));
|
|
4719
4695
|
o.fields.consumers = "consumers" in de ? (we = de == null ? void 0 : de.consumers) == null ? void 0 : we.map((Ne) => Ne.id) : [];
|
|
4720
4696
|
} catch (de) {
|
|
4721
|
-
|
|
4697
|
+
x(de);
|
|
4722
4698
|
}
|
|
4723
4699
|
Object.assign(i, o.fields);
|
|
4724
|
-
}, w =
|
|
4700
|
+
}, w = $(() => /^[0-9a-zA-Z.\-_~]*$/.test(o.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")), N = () => {
|
|
4725
4701
|
var C, B;
|
|
4726
4702
|
return {
|
|
4727
4703
|
name: o.fields.name,
|
|
4728
4704
|
tags: (B = (C = o.fields.tags.split(",")) == null ? void 0 : C.map((oe) => String(oe || "").trim())) == null ? void 0 : B.filter((oe) => oe !== "")
|
|
4729
4705
|
};
|
|
4730
|
-
},
|
|
4731
|
-
o.errorMessage =
|
|
4732
|
-
},
|
|
4706
|
+
}, R = async (C, B = "") => await g.post(K("addConsumer", B, C), { consumer: C }), k = async (C, B = "") => await g.delete(K("removeConsumer", B, C)), x = (C) => {
|
|
4707
|
+
o.errorMessage = f(C), n("error", C);
|
|
4708
|
+
}, S = (C = t.consumerGroupId) => {
|
|
4733
4709
|
Object.assign(i, o.fields), n("update", { ...o.fields, id: C });
|
|
4734
4710
|
}, q = (C, B, oe = t.consumerGroupId) => {
|
|
4735
4711
|
const P = C == null ? void 0 : C.find((G) => G.status !== "fulfilled");
|
|
4736
|
-
P ?
|
|
4712
|
+
P ? x({
|
|
4737
4713
|
code: P.status,
|
|
4738
4714
|
message: B
|
|
4739
|
-
}) :
|
|
4715
|
+
}) : S(oe);
|
|
4740
4716
|
}, J = async () => {
|
|
4741
4717
|
let C = "";
|
|
4742
4718
|
try {
|
|
4743
|
-
const { data: B } = await
|
|
4719
|
+
const { data: B } = await g.post(K("create"), N());
|
|
4744
4720
|
C = "item" in B ? B.item.id : B.id;
|
|
4745
4721
|
} catch (B) {
|
|
4746
|
-
|
|
4722
|
+
x(B);
|
|
4747
4723
|
}
|
|
4748
4724
|
if (o.fields.consumers.length > 0 && C)
|
|
4749
4725
|
try {
|
|
4750
|
-
const B = o.fields.consumers.map((P) =>
|
|
4726
|
+
const B = o.fields.consumers.map((P) => R(P, C)), oe = await Promise.allSettled(B);
|
|
4751
4727
|
q(oe, r("consumer_groups.errors.add_consumer"), C);
|
|
4752
4728
|
} catch (B) {
|
|
4753
|
-
|
|
4729
|
+
x(B);
|
|
4754
4730
|
}
|
|
4755
4731
|
else
|
|
4756
|
-
o.fields.consumers.length === 0 && C &&
|
|
4732
|
+
o.fields.consumers.length === 0 && C && S(C);
|
|
4757
4733
|
}, X = async () => {
|
|
4758
4734
|
var oe;
|
|
4759
4735
|
try {
|
|
4760
|
-
((oe = t.config) == null ? void 0 : oe.app) === "konnect" ? await
|
|
4736
|
+
((oe = t.config) == null ? void 0 : oe.app) === "konnect" ? await g.put(K("edit"), N()) : await g.patch(K("edit"), N());
|
|
4761
4737
|
} catch (P) {
|
|
4762
|
-
|
|
4738
|
+
x(P);
|
|
4763
4739
|
}
|
|
4764
4740
|
const C = o.fields.consumers.filter((P) => !i.consumers.includes(P)), B = i.consumers.filter((P) => !o.fields.consumers.includes(P));
|
|
4765
4741
|
if (B.length === 0 && C.length === 0)
|
|
4766
|
-
|
|
4742
|
+
S();
|
|
4767
4743
|
else {
|
|
4768
4744
|
if (B.length > 0)
|
|
4769
4745
|
try {
|
|
4770
4746
|
const P = B.map((ge) => k(ge)), G = await Promise.allSettled(P);
|
|
4771
4747
|
q(G, r("consumer_groups.errors.remove_consumer"));
|
|
4772
4748
|
} catch (P) {
|
|
4773
|
-
|
|
4749
|
+
x(P);
|
|
4774
4750
|
}
|
|
4775
4751
|
if (C.length > 0)
|
|
4776
4752
|
try {
|
|
4777
|
-
const P = C.map((ge) =>
|
|
4753
|
+
const P = C.map((ge) => R(ge)), G = await Promise.allSettled(P);
|
|
4778
4754
|
q(G, r("consumer_groups.errors.add_consumer"));
|
|
4779
4755
|
} catch (P) {
|
|
4780
|
-
|
|
4756
|
+
x(P);
|
|
4781
4757
|
}
|
|
4782
4758
|
}
|
|
4783
4759
|
}, ee = async () => {
|
|
4784
4760
|
try {
|
|
4785
|
-
o.readonly = !0,
|
|
4761
|
+
o.readonly = !0, p.value === tt.Create ? await J() : await X();
|
|
4786
4762
|
} finally {
|
|
4787
4763
|
o.readonly = !1;
|
|
4788
4764
|
}
|
|
@@ -4791,12 +4767,12 @@ const as = {
|
|
|
4791
4767
|
await d();
|
|
4792
4768
|
}), (C, B) => {
|
|
4793
4769
|
const oe = L("KInput"), P = L("KMultiselect");
|
|
4794
|
-
return
|
|
4795
|
-
|
|
4770
|
+
return m(), M("div", Cl, [
|
|
4771
|
+
F(y(Ms), {
|
|
4796
4772
|
"can-submit": A.value && h.value,
|
|
4797
4773
|
config: e.config,
|
|
4798
4774
|
"edit-id": e.consumerGroupId,
|
|
4799
|
-
"error-message": o.errorMessage || y(
|
|
4775
|
+
"error-message": o.errorMessage || y(c) || w.value,
|
|
4800
4776
|
"fetch-url": b.value,
|
|
4801
4777
|
"is-readonly": o.readonly,
|
|
4802
4778
|
onCancel: _,
|
|
@@ -4806,12 +4782,12 @@ const as = {
|
|
|
4806
4782
|
onSubmit: ee
|
|
4807
4783
|
}, {
|
|
4808
4784
|
default: v(() => [
|
|
4809
|
-
|
|
4785
|
+
F(y(pn), {
|
|
4810
4786
|
description: y(r)("consumer_groups.form.general_info.description"),
|
|
4811
4787
|
title: y(r)("consumer_groups.form.general_info.title")
|
|
4812
4788
|
}, {
|
|
4813
4789
|
default: v(() => [
|
|
4814
|
-
|
|
4790
|
+
F(oe, {
|
|
4815
4791
|
modelValue: o.fields.name,
|
|
4816
4792
|
"onUpdate:modelValue": B[0] || (B[0] = (G) => o.fields.name = G),
|
|
4817
4793
|
modelModifiers: { trim: !0 },
|
|
@@ -4822,7 +4798,7 @@ const as = {
|
|
|
4822
4798
|
required: "",
|
|
4823
4799
|
type: "text"
|
|
4824
4800
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
4825
|
-
|
|
4801
|
+
F(oe, {
|
|
4826
4802
|
modelValue: o.fields.tags,
|
|
4827
4803
|
"onUpdate:modelValue": B[1] || (B[1] = (G) => o.fields.tags = G),
|
|
4828
4804
|
modelModifiers: { trim: !0 },
|
|
@@ -4840,13 +4816,13 @@ const as = {
|
|
|
4840
4816
|
]),
|
|
4841
4817
|
_: 1
|
|
4842
4818
|
}, 8, ["description", "title"]),
|
|
4843
|
-
|
|
4819
|
+
F(y(pn), {
|
|
4844
4820
|
description: y(r)("consumer_groups.form.consumers.description"),
|
|
4845
4821
|
"has-divider": "",
|
|
4846
4822
|
title: y(r)("consumer_groups.form.consumers.title")
|
|
4847
4823
|
}, {
|
|
4848
4824
|
default: v(() => [
|
|
4849
|
-
|
|
4825
|
+
F(P, {
|
|
4850
4826
|
modelValue: o.fields.consumers,
|
|
4851
4827
|
"onUpdate:modelValue": B[2] || (B[2] = (G) => o.fields.consumers = G),
|
|
4852
4828
|
appearance: "select",
|
|
@@ -4862,8 +4838,8 @@ const as = {
|
|
|
4862
4838
|
"item-template": v(({ item: G }) => {
|
|
4863
4839
|
var ge, we, de;
|
|
4864
4840
|
return [
|
|
4865
|
-
|
|
4866
|
-
(ge = G == null ? void 0 : G.data) != null && ge.username && ((we = G == null ? void 0 : G.data) != null && we.custom_id) ? (
|
|
4841
|
+
V("div", wl, O(G.label), 1),
|
|
4842
|
+
(ge = G == null ? void 0 : G.data) != null && ge.username && ((we = G == null ? void 0 : G.data) != null && we.custom_id) ? (m(), M("div", _l, O((de = G == null ? void 0 : G.data) == null ? void 0 : de.custom_id), 1)) : H("", !0)
|
|
4867
4843
|
];
|
|
4868
4844
|
}),
|
|
4869
4845
|
_: 1
|
|
@@ -4877,7 +4853,7 @@ const as = {
|
|
|
4877
4853
|
]);
|
|
4878
4854
|
};
|
|
4879
4855
|
}
|
|
4880
|
-
}),
|
|
4856
|
+
}), ql = /* @__PURE__ */ Ft(Il, [["__scopeId", "data-v-102d40d2"]]), Al = { class: "kong-ui-consumer-group-entity-config-card" }, Ll = /* @__PURE__ */ ae({
|
|
4881
4857
|
__name: "ConsumerGroupConfigCard",
|
|
4882
4858
|
props: {
|
|
4883
4859
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4904,7 +4880,7 @@ const as = {
|
|
|
4904
4880
|
},
|
|
4905
4881
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
4906
4882
|
setup(e) {
|
|
4907
|
-
const n = e, { i18n: { t } } = ct.useI18n(), r =
|
|
4883
|
+
const n = e, { i18n: { t } } = ct.useI18n(), r = $(() => Me.form[n.config.app].edit), a = E({
|
|
4908
4884
|
id: {},
|
|
4909
4885
|
name: {},
|
|
4910
4886
|
created_at: {},
|
|
@@ -4913,8 +4889,8 @@ const as = {
|
|
|
4913
4889
|
tooltip: t("consumer_groups.form.fields.tags.tooltip")
|
|
4914
4890
|
}
|
|
4915
4891
|
});
|
|
4916
|
-
return (o, i) => (
|
|
4917
|
-
|
|
4892
|
+
return (o, i) => (m(), M("div", Al, [
|
|
4893
|
+
F(y(xs), {
|
|
4918
4894
|
config: e.config,
|
|
4919
4895
|
"config-card-doc": e.configCardDoc,
|
|
4920
4896
|
"config-schema": a.value,
|
|
@@ -4930,7 +4906,7 @@ const as = {
|
|
|
4930
4906
|
}
|
|
4931
4907
|
});
|
|
4932
4908
|
export {
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4909
|
+
Ll as ConsumerGroupConfigCard,
|
|
4910
|
+
ql as ConsumerGroupForm,
|
|
4911
|
+
Bl as ConsumerGroupList
|
|
4936
4912
|
};
|