@kong-ui-public/entities-consumers 2.2.5-pr.995.f7803beb.0 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-consumers.es.js +936 -960
- package/dist/entities-consumers.umd.js +24 -24
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as te, ref as
|
|
1
|
+
import { defineComponent as te, ref as O, computed as $, watch as he, renderSlot as Y, createCommentVNode as G, unref as g, useSlots as We, onBeforeMount as mt, resolveComponent as P, openBlock as m, createBlock as R, createSlots as ke, withCtx as y, createElementVNode as K, createTextVNode as W, toDisplayString as j, createVNode as F, createElementBlock as T, renderList as de, Fragment as fe, normalizeClass as Ae, withModifiers as De, withDirectives as Be, vShow as qe, useCssVars as ma, resolveDynamicComponent as Ee, normalizeProps as ga, guardReactiveProps as ya, mergeProps as st, onMounted as ha, onUnmounted as va, normalizeStyle as un, inject as ba, pushScopeId as cn, popScopeId as dn, Teleport as ka, reactive as Nt } from "vue";
|
|
2
2
|
import { useRouter as gt } from "vue-router";
|
|
3
3
|
import { createI18n as yt, i18nTComponent as pn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Ca from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as wa } from "@kong/kongponents";
|
|
6
|
-
const
|
|
6
|
+
const Ia = {
|
|
7
7
|
list: {
|
|
8
8
|
table_headers: {
|
|
9
9
|
username: "Username",
|
|
@@ -95,11 +95,11 @@ const _a = {
|
|
|
95
95
|
tooltip: "An optional set of strings associated with the Consumer for grouping and filtering."
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
},
|
|
99
|
-
consumers:
|
|
98
|
+
}, _a = {
|
|
99
|
+
consumers: Ia
|
|
100
100
|
};
|
|
101
101
|
function Aa() {
|
|
102
|
-
const e = yt("en-us",
|
|
102
|
+
const e = yt("en-us", _a);
|
|
103
103
|
return {
|
|
104
104
|
i18n: e,
|
|
105
105
|
i18nT: pn(e)
|
|
@@ -134,7 +134,7 @@ const Ze = {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
|
-
var fn = /* @__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))(fn || {}),
|
|
137
|
+
var fn = /* @__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))(fn || {}), lt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(lt || {}), Ie = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Ie || {}), X = /* @__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))(X || {}), ce = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ce || {});
|
|
138
138
|
function ht(e = {}) {
|
|
139
139
|
return {
|
|
140
140
|
axiosInstance: Ca.create({
|
|
@@ -202,7 +202,7 @@ const $a = {
|
|
|
202
202
|
}, ja = {
|
|
203
203
|
message: "Are you sure you want to delete this {entityType}?",
|
|
204
204
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
205
|
-
},
|
|
205
|
+
}, Ma = {
|
|
206
206
|
actions: {
|
|
207
207
|
save: "Save",
|
|
208
208
|
cancel: "Cancel",
|
|
@@ -211,13 +211,13 @@ const $a = {
|
|
|
211
211
|
errors: {
|
|
212
212
|
edit: "The entity could not be edited at this time."
|
|
213
213
|
}
|
|
214
|
-
},
|
|
214
|
+
}, Oa = {
|
|
215
215
|
emptyState: {
|
|
216
216
|
noSearchResultsTitle: "No results found",
|
|
217
217
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
218
218
|
noSearchResultsCtaText: "Clear"
|
|
219
219
|
}
|
|
220
|
-
},
|
|
220
|
+
}, Ea = {
|
|
221
221
|
title: "Configuration",
|
|
222
222
|
actions: {
|
|
223
223
|
copy: "Copy JSON"
|
|
@@ -260,12 +260,12 @@ const $a = {
|
|
|
260
260
|
applyButtonText: "Apply",
|
|
261
261
|
clearButtonText: "Clear",
|
|
262
262
|
clearAllButtonText: "Clear all filters"
|
|
263
|
-
},
|
|
263
|
+
}, Ka = {
|
|
264
264
|
errors: {
|
|
265
265
|
fetch: "Could not fetch available items",
|
|
266
266
|
invalid: "Please select a valid value"
|
|
267
267
|
}
|
|
268
|
-
},
|
|
268
|
+
}, Na = {
|
|
269
269
|
unexpected: "An unexpected error has occurred",
|
|
270
270
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
271
271
|
}, Ba = {
|
|
@@ -282,12 +282,12 @@ const $a = {
|
|
|
282
282
|
}, qa = {
|
|
283
283
|
global: $a,
|
|
284
284
|
deleteModal: ja,
|
|
285
|
-
baseForm:
|
|
286
|
-
baseTable:
|
|
287
|
-
baseConfigCard:
|
|
285
|
+
baseForm: Ma,
|
|
286
|
+
baseTable: Oa,
|
|
287
|
+
baseConfigCard: Ea,
|
|
288
288
|
filter: Fa,
|
|
289
|
-
debouncedFilter:
|
|
290
|
-
errors:
|
|
289
|
+
debouncedFilter: Ka,
|
|
290
|
+
errors: Na,
|
|
291
291
|
toggleModal: Ba
|
|
292
292
|
};
|
|
293
293
|
function vt() {
|
|
@@ -349,84 +349,84 @@ function La(e, n, t, a = {
|
|
|
349
349
|
t || (t = "100");
|
|
350
350
|
const { axiosInstance: r } = ht({
|
|
351
351
|
headers: e.requestHeaders
|
|
352
|
-
}), { i18n: { t: o } } = vt(), { debounce: i } = Sa(), s = i(async (
|
|
353
|
-
await q(
|
|
354
|
-
}, 200), l =
|
|
352
|
+
}), { i18n: { t: o } } = vt(), { debounce: i } = Sa(), s = i(async (_) => {
|
|
353
|
+
await q(_);
|
|
354
|
+
}, 200), l = O(!1), u = O(""), d = O(""), c = O([]), h = O([]), f = O(void 0), A = g(n);
|
|
355
355
|
let k = `${e.apiBaseUrl}${A}`;
|
|
356
356
|
e.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
357
|
-
const { isValidUuid:
|
|
357
|
+
const { isValidUuid: p } = mn(), S = async () => {
|
|
358
358
|
try {
|
|
359
359
|
l.value = !0;
|
|
360
|
-
const { data:
|
|
361
|
-
|
|
360
|
+
const { data: _ } = await r.get(`${k}?size=${t}`);
|
|
361
|
+
_ != null && _.next || (f.value = a.fetchedItemsKey in _ ? _[a.fetchedItemsKey] : []), h.value = a.fetchedItemsKey in _ ? _[a.fetchedItemsKey] : [], c.value = h.value;
|
|
362
362
|
} catch {
|
|
363
363
|
c.value = [], u.value = o("debouncedFilter.errors.fetch");
|
|
364
364
|
} finally {
|
|
365
365
|
l.value = !1;
|
|
366
366
|
}
|
|
367
|
-
}, v =
|
|
368
|
-
var w,
|
|
369
|
-
if (v.value !==
|
|
370
|
-
if (v.value =
|
|
367
|
+
}, v = O(""), q = async (_) => {
|
|
368
|
+
var w, N, U;
|
|
369
|
+
if (v.value !== _)
|
|
370
|
+
if (v.value = _ || "", f.value === void 0)
|
|
371
371
|
try {
|
|
372
372
|
if (l.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
373
373
|
let b = k + "";
|
|
374
|
-
|
|
374
|
+
_ && (b += `/${_}`);
|
|
375
375
|
const { data: C } = await r.get(`${b}?size=${t}`);
|
|
376
376
|
a.fetchedItemsKey in C ? c.value = C[a.fetchedItemsKey] : C != null && C.id ? c.value = [C] : c.value = [];
|
|
377
|
-
} else if (
|
|
377
|
+
} else if (_) {
|
|
378
378
|
const b = [];
|
|
379
|
-
|
|
380
|
-
const { data: B } = await r.get(`${k}/${
|
|
379
|
+
p(_) && a.searchKeys.includes("id") ? b.push((async () => {
|
|
380
|
+
const { data: B } = await r.get(`${k}/${_}`);
|
|
381
381
|
return [B[a.fetchedItemsKey] ?? B];
|
|
382
382
|
})()) : b.push(
|
|
383
383
|
...a.searchKeys.filter((B) => B !== "id").map(async (B) => {
|
|
384
|
-
const { data:
|
|
385
|
-
return
|
|
384
|
+
const { data: I } = await r.get(`${k}?${B}=${_}`);
|
|
385
|
+
return I[a.fetchedItemsKey];
|
|
386
386
|
})
|
|
387
387
|
);
|
|
388
|
-
const C = await Promise.all(b),
|
|
388
|
+
const C = await Promise.all(b), V = /* @__PURE__ */ new Set();
|
|
389
389
|
c.value = [], (w = C == null ? void 0 : C.forEach) == null || w.call(C, (B) => {
|
|
390
|
-
var
|
|
391
|
-
(
|
|
392
|
-
|
|
390
|
+
var I;
|
|
391
|
+
(I = B == null ? void 0 : B.forEach) == null || I.call(B, (E) => {
|
|
392
|
+
V.has(E.id) || (V.add(E.id), c.value.push(E));
|
|
393
393
|
});
|
|
394
394
|
});
|
|
395
395
|
} else
|
|
396
|
-
c.value =
|
|
396
|
+
c.value = h.value;
|
|
397
397
|
} catch (b) {
|
|
398
|
-
((
|
|
398
|
+
((N = b == null ? void 0 : b.response) == null ? void 0 : N.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (c.value = [], u.value = o("debouncedFilter.errors.fetch"));
|
|
399
399
|
} finally {
|
|
400
400
|
l.value = !1;
|
|
401
401
|
}
|
|
402
402
|
else
|
|
403
|
-
l.value = !0, d.value = "",
|
|
403
|
+
l.value = !0, d.value = "", _ ? (c.value = (U = f.value) == null ? void 0 : U.filter((b) => {
|
|
404
404
|
var C;
|
|
405
|
-
let
|
|
405
|
+
let V = !1;
|
|
406
406
|
for (const B of a.searchKeys) {
|
|
407
|
-
const
|
|
408
|
-
|
|
407
|
+
const I = typeof b[B] == "string" ? (C = b[B]) == null ? void 0 : C.toLowerCase() : b[B];
|
|
408
|
+
I != null && I.includes(_.toLowerCase()) && (V = !0);
|
|
409
409
|
}
|
|
410
|
-
return
|
|
411
|
-
}), (!c.value || !c.value.length) && (d.value = o("debouncedFilter.errors.invalid"))) : c.value =
|
|
410
|
+
return V;
|
|
411
|
+
}), (!c.value || !c.value.length) && (d.value = o("debouncedFilter.errors.invalid"))) : c.value = f.value, l.value = !1;
|
|
412
412
|
};
|
|
413
413
|
return {
|
|
414
414
|
loading: l,
|
|
415
415
|
error: u,
|
|
416
416
|
validationError: d,
|
|
417
417
|
results: c,
|
|
418
|
-
allRecords:
|
|
418
|
+
allRecords: f,
|
|
419
419
|
loadItems: S,
|
|
420
420
|
debouncedQueryChange: s
|
|
421
421
|
};
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
const t =
|
|
423
|
+
function Pa(e, n) {
|
|
424
|
+
const t = g(n), a = $(
|
|
425
425
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
426
426
|
);
|
|
427
427
|
return a.value.search = "", (r) => `${a.value.href}/${r}`;
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function Va() {
|
|
430
430
|
const { i18n: { t: e } } = vt();
|
|
431
431
|
return {
|
|
432
432
|
getMessageFromError: (n) => {
|
|
@@ -454,7 +454,7 @@ function Pa() {
|
|
|
454
454
|
}
|
|
455
455
|
};
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function Ra(e) {
|
|
458
458
|
const n = window.location.origin, t = n.endsWith("/") ? n : `${n}/`;
|
|
459
459
|
try {
|
|
460
460
|
const a = e.join("/"), r = `${t}${a}`, o = e.some((i) => i.trim() === "");
|
|
@@ -466,27 +466,27 @@ function Va(e) {
|
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
function gn(e, n) {
|
|
469
|
-
const t =
|
|
469
|
+
const t = O(g(e)), a = O(g(n)), r = $(
|
|
470
470
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
471
471
|
), o = $(
|
|
472
472
|
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
473
473
|
);
|
|
474
474
|
return (i) => {
|
|
475
|
-
const { page: s, pageSize: l, offset: u, sortColumnKey: d, sortColumnOrder: c, query:
|
|
475
|
+
const { page: s, pageSize: l, offset: u, sortColumnKey: d, sortColumnOrder: c, query: h } = i;
|
|
476
476
|
try {
|
|
477
|
-
let
|
|
478
|
-
return r.value &&
|
|
479
|
-
|
|
480
|
-
}), d &&
|
|
481
|
-
} catch (
|
|
482
|
-
return console.error("RouteList(fetcher)",
|
|
477
|
+
let f = new URL(o.value.href);
|
|
478
|
+
return r.value && h ? (f.search = "", f = new URL(`${f.href}?filter[name][contains]=${h}`)) : (r.value || new URLSearchParams(h).forEach((A, k) => {
|
|
479
|
+
f.searchParams.append(k, A);
|
|
480
|
+
}), d && f.searchParams.append("sort_by", d), c === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(l))), u && s !== 1 && f.searchParams.append("offset", String(u)), f.href;
|
|
481
|
+
} catch (f) {
|
|
482
|
+
return console.error("RouteList(fetcher)", f), a.value;
|
|
483
483
|
}
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
486
|
function Ua(e, n, t = "data") {
|
|
487
|
-
const a =
|
|
487
|
+
const a = g(n), { axiosInstance: r } = ht({
|
|
488
488
|
headers: e.requestHeaders
|
|
489
|
-
}), o = gn(e, a), i =
|
|
489
|
+
}), o = gn(e, a), i = O({
|
|
490
490
|
status: Ie.Idle
|
|
491
491
|
});
|
|
492
492
|
return { fetcher: async (s) => {
|
|
@@ -495,7 +495,7 @@ function Ua(e, n, t = "data") {
|
|
|
495
495
|
const l = o(s), { data: u } = await r.get(l), d = t && t.replace(/[^\w-_]/gi, "");
|
|
496
496
|
let c;
|
|
497
497
|
u[d] && Array.isArray(u[d]) ? c = u[d] : Array.isArray(u) ? c = u : c = Object.keys(u).length ? [u] : [];
|
|
498
|
-
const
|
|
498
|
+
const h = {
|
|
499
499
|
data: c,
|
|
500
500
|
total: c.length,
|
|
501
501
|
...u.offset ? {
|
|
@@ -506,8 +506,8 @@ function Ua(e, n, t = "data") {
|
|
|
506
506
|
};
|
|
507
507
|
return i.value = {
|
|
508
508
|
status: Ie.Idle,
|
|
509
|
-
response:
|
|
510
|
-
},
|
|
509
|
+
response: h
|
|
510
|
+
}, h;
|
|
511
511
|
} catch (l) {
|
|
512
512
|
const u = {
|
|
513
513
|
data: [],
|
|
@@ -547,7 +547,7 @@ const yn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
547
547
|
return 0;
|
|
548
548
|
const [t, a] = Ga(Lt(e), Lt(n));
|
|
549
549
|
return t > a ? 1 : t < a ? -1 : 0;
|
|
550
|
-
},
|
|
550
|
+
}, Pt = (e, n) => {
|
|
551
551
|
for (let t = 0; t < Math.max(e.length, n.length); t++) {
|
|
552
552
|
const a = Ha(e[t] || "0", n[t] || "0");
|
|
553
553
|
if (a !== 0)
|
|
@@ -555,9 +555,9 @@ const yn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
555
555
|
}
|
|
556
556
|
return 0;
|
|
557
557
|
}, za = (e, n) => {
|
|
558
|
-
const t = Bt(e), a = Bt(n), r = t.pop(), o = a.pop(), i =
|
|
559
|
-
return i !== 0 ? i : r && o ?
|
|
560
|
-
},
|
|
558
|
+
const t = Bt(e), a = Bt(n), r = t.pop(), o = a.pop(), i = Pt(t, a);
|
|
559
|
+
return i !== 0 ? i : r && o ? Pt(r.split("."), o.split(".")) : r || o ? r ? -1 : 1 : 0;
|
|
560
|
+
}, Vt = (e, n, t) => {
|
|
561
561
|
Ja(t);
|
|
562
562
|
const a = za(e, n);
|
|
563
563
|
return hn[t].includes(a);
|
|
@@ -568,11 +568,11 @@ const yn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
568
568
|
"<=": [-1, 0],
|
|
569
569
|
"<": [-1],
|
|
570
570
|
"!=": [-1, 1]
|
|
571
|
-
},
|
|
571
|
+
}, Rt = Object.keys(hn), Ja = (e) => {
|
|
572
572
|
if (typeof e != "string")
|
|
573
573
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
574
|
-
if (
|
|
575
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
574
|
+
if (Rt.indexOf(e) === -1)
|
|
575
|
+
throw new Error(`Invalid operator, expected one of ${Rt.join("|")}`);
|
|
576
576
|
}, Ya = (e) => typeof e == "string" && /^[v\d]/.test(e) && yn.test(e);
|
|
577
577
|
function Wa(e) {
|
|
578
578
|
const { gatewayInfo: n, supportedRange: t } = e;
|
|
@@ -585,10 +585,10 @@ function Wa(e) {
|
|
|
585
585
|
if (!o)
|
|
586
586
|
return !1;
|
|
587
587
|
const [i, s] = o;
|
|
588
|
-
return !(i &&
|
|
588
|
+
return !(i && Vt(r, i, "<") || s && Vt(r, s, ">"));
|
|
589
589
|
}
|
|
590
590
|
function Za(e) {
|
|
591
|
-
const n =
|
|
591
|
+
const n = O(0), t = O(0), a = O(!1);
|
|
592
592
|
return he(e, (r) => {
|
|
593
593
|
r && !a.value && (n.value = r.offsetWidth, t.value = r.scrollWidth, a.value = !0);
|
|
594
594
|
}), {
|
|
@@ -598,9 +598,9 @@ function Za(e) {
|
|
|
598
598
|
const re = {
|
|
599
599
|
useAxios: ht,
|
|
600
600
|
useDebouncedFilter: La,
|
|
601
|
-
useDeleteUrlBuilder:
|
|
602
|
-
useErrors:
|
|
603
|
-
useExternalLinkCreator:
|
|
601
|
+
useDeleteUrlBuilder: Pa,
|
|
602
|
+
useErrors: Va,
|
|
603
|
+
useExternalLinkCreator: Ra,
|
|
604
604
|
useFetcher: Ua,
|
|
605
605
|
useFetchUrlBuilder: gn,
|
|
606
606
|
useHelpers: mn,
|
|
@@ -625,10 +625,10 @@ const re = {
|
|
|
625
625
|
}, ar = (e) => (cn("data-v-641e0aee"), e = e(), dn(), e), rr = ["aria-hidden"], or = {
|
|
626
626
|
key: 0,
|
|
627
627
|
"data-testid": "kui-icon-svg-title"
|
|
628
|
-
}, ir = /* @__PURE__ */ ar(() => /* @__PURE__ */
|
|
628
|
+
}, ir = /* @__PURE__ */ ar(() => /* @__PURE__ */ K("path", {
|
|
629
629
|
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",
|
|
630
630
|
fill: "currentColor"
|
|
631
|
-
}, null, -1)),
|
|
631
|
+
}, null, -1)), sr = /* @__PURE__ */ te({
|
|
632
632
|
__name: "CopyIcon",
|
|
633
633
|
props: {
|
|
634
634
|
/** The accessibility text provided to screen readers */
|
|
@@ -697,13 +697,13 @@ const re = {
|
|
|
697
697
|
lineHeight: "0",
|
|
698
698
|
width: t.value
|
|
699
699
|
}));
|
|
700
|
-
return (r, o) => (m(),
|
|
700
|
+
return (r, o) => (m(), R(Ee(e.as), {
|
|
701
701
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
702
702
|
class: "kui-icon copy-icon",
|
|
703
703
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
704
704
|
style: un(a.value)
|
|
705
705
|
}, {
|
|
706
|
-
default:
|
|
706
|
+
default: y(() => [
|
|
707
707
|
(m(), T("svg", {
|
|
708
708
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
709
709
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
@@ -721,7 +721,7 @@ const re = {
|
|
|
721
721
|
_: 1
|
|
722
722
|
}, 8, ["aria-hidden", "style"]));
|
|
723
723
|
}
|
|
724
|
-
}),
|
|
724
|
+
}), lr = /* @__PURE__ */ nr(sr, [["__scopeId", "data-v-641e0aee"]]), ur = "16px", cr = { class: "kong-ui-copy-uuid" }, dr = ["onClick"], Dt = 15, pr = /* @__PURE__ */ te({
|
|
725
725
|
__name: "CopyUuid",
|
|
726
726
|
props: {
|
|
727
727
|
uuid: {
|
|
@@ -772,40 +772,40 @@ const re = {
|
|
|
772
772
|
placement: "bottomStart"
|
|
773
773
|
} : {
|
|
774
774
|
title: t.uuid
|
|
775
|
-
}), i = $(() => !!(t.tooltip && t.successTooltip)), s =
|
|
775
|
+
}), i = $(() => !!(t.tooltip && t.successTooltip)), s = O(t.tooltip), l = $(() => t.tooltip ? {
|
|
776
776
|
label: s.value,
|
|
777
777
|
positionFixed: !0,
|
|
778
778
|
maxWidth: "500px",
|
|
779
779
|
placement: "bottomStart"
|
|
780
780
|
} : {}), u = $(() => {
|
|
781
|
-
var
|
|
782
|
-
return t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${(
|
|
783
|
-
}), d = (
|
|
784
|
-
s.value =
|
|
781
|
+
var h;
|
|
782
|
+
return t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${(h = t.uuid) == null ? void 0 : h.substring(0, 5)}` : t.uuid;
|
|
783
|
+
}), d = (h) => {
|
|
784
|
+
s.value = h, setTimeout(() => {
|
|
785
785
|
s.value = t.tooltip;
|
|
786
786
|
}, 1800);
|
|
787
|
-
}, c = (
|
|
788
|
-
var
|
|
789
|
-
if (!
|
|
787
|
+
}, c = (h) => {
|
|
788
|
+
var f, A;
|
|
789
|
+
if (!h(t.uuid)) {
|
|
790
790
|
typeof r == "function" && r({
|
|
791
791
|
type: "error",
|
|
792
792
|
message: a("message.fail")
|
|
793
793
|
}), i.value ? d(a("message.fail")) : n("error", t.uuid);
|
|
794
794
|
return;
|
|
795
795
|
}
|
|
796
|
-
const k = ((
|
|
796
|
+
const k = ((f = t.uuid) == null ? void 0 : f.length) > Dt, p = t.format === "hidden" || t.format === "redacted" ? a("message.success.prefix") : `"${((A = t.uuid) == null ? void 0 : A.substring(0, Dt)) + (k ? "..." : "")}"`;
|
|
797
797
|
typeof r == "function" && r({
|
|
798
798
|
type: "success",
|
|
799
|
-
message: `${
|
|
799
|
+
message: `${p}${a("message.success.content")}`
|
|
800
800
|
}), i.value ? d(t.successTooltip) : n("success", t.uuid);
|
|
801
801
|
};
|
|
802
|
-
return (
|
|
803
|
-
const A =
|
|
802
|
+
return (h, f) => {
|
|
803
|
+
const A = P("KClipboardProvider");
|
|
804
804
|
return m(), T("div", cr, [
|
|
805
|
-
e.format !== "hidden" ? (m(),
|
|
806
|
-
default:
|
|
807
|
-
|
|
808
|
-
class:
|
|
805
|
+
e.format !== "hidden" ? (m(), R(Ee(e.idTooltip ? "KTooltip" : "div"), st({ key: 0 }, o.value, { "data-testid": "copy-id" }), {
|
|
806
|
+
default: y(() => [
|
|
807
|
+
K("div", {
|
|
808
|
+
class: Ae([
|
|
809
809
|
"uuid-container",
|
|
810
810
|
e.truncated ? "truncated-uuid" : null,
|
|
811
811
|
e.useMono ? "mono" : null
|
|
@@ -814,22 +814,22 @@ const re = {
|
|
|
814
814
|
]),
|
|
815
815
|
_: 1
|
|
816
816
|
}, 16)) : G("", !0),
|
|
817
|
-
(m(),
|
|
818
|
-
default:
|
|
819
|
-
|
|
820
|
-
default:
|
|
821
|
-
|
|
817
|
+
(m(), R(Ee(e.tooltip ? "KTooltip" : "div"), st(l.value, { class: "uuid-icon-wrapper" }), {
|
|
818
|
+
default: y(() => [
|
|
819
|
+
F(A, null, {
|
|
820
|
+
default: y(({ copyToClipboard: k }) => [
|
|
821
|
+
K("span", {
|
|
822
822
|
"data-testid": "copy-to-clipboard",
|
|
823
823
|
role: "button",
|
|
824
824
|
tabindex: "0",
|
|
825
|
-
onClick: De((
|
|
825
|
+
onClick: De((p) => c(k), ["stop"])
|
|
826
826
|
}, [
|
|
827
|
-
|
|
827
|
+
F(g(lr), {
|
|
828
828
|
class: "uuid-icon",
|
|
829
829
|
color: e.iconColor,
|
|
830
830
|
decorative: !!e.tooltip,
|
|
831
|
-
size:
|
|
832
|
-
title:
|
|
831
|
+
size: g(ur),
|
|
832
|
+
title: g(a)("iconTitle")
|
|
833
833
|
}, null, 8, ["color", "decorative", "size", "title"])
|
|
834
834
|
], 8, dr)
|
|
835
835
|
]),
|
|
@@ -873,18 +873,18 @@ const re = {
|
|
|
873
873
|
var l;
|
|
874
874
|
return n.isArrayItem ? (l = o.value) != null && l.name ? a(o.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
875
875
|
});
|
|
876
|
-
return (l, u) => (m(),
|
|
877
|
-
class:
|
|
876
|
+
return (l, u) => (m(), R(Ee(e.isArrayItem ? "fieldset" : "div"), {
|
|
877
|
+
class: Ae(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
878
878
|
}, {
|
|
879
|
-
default:
|
|
879
|
+
default: y(() => [
|
|
880
880
|
e.isArrayItem ? (m(), T("legend", mr, [
|
|
881
|
-
|
|
881
|
+
K("b", null, j(s.value), 1)
|
|
882
882
|
])) : G("", !0),
|
|
883
|
-
(m(!0), T(fe, null, de(Object.keys(i.value), (d, c) => (m(),
|
|
883
|
+
(m(!0), T(fe, null, de(Object.keys(i.value), (d, c) => (m(), R(bt, {
|
|
884
884
|
key: `${r.value}-property-${c}`,
|
|
885
885
|
item: {
|
|
886
886
|
key: d,
|
|
887
|
-
label:
|
|
887
|
+
label: g(a)(d),
|
|
888
888
|
value: i.value[d]
|
|
889
889
|
}
|
|
890
890
|
}, null, 8, ["item"]))), 128))
|
|
@@ -909,15 +909,15 @@ const re = {
|
|
|
909
909
|
setup(e) {
|
|
910
910
|
const { i18n: { t: n } } = re.useI18n();
|
|
911
911
|
return (t, a) => {
|
|
912
|
-
const r =
|
|
912
|
+
const r = P("KButton");
|
|
913
913
|
return m(), T("div", null, [
|
|
914
|
-
|
|
914
|
+
F(r, {
|
|
915
915
|
appearance: "tertiary",
|
|
916
916
|
class: "navigation-button",
|
|
917
917
|
onClick: a[0] || (a[0] = (o) => t.$emit("navigation-click", e.item))
|
|
918
918
|
}, {
|
|
919
|
-
default:
|
|
920
|
-
W(j(e.item.value ||
|
|
919
|
+
default: y(() => [
|
|
920
|
+
W(j(e.item.value || g(n)("baseConfigCard.commonFields.link")), 1)
|
|
921
921
|
]),
|
|
922
922
|
_: 1
|
|
923
923
|
})
|
|
@@ -935,21 +935,21 @@ const re = {
|
|
|
935
935
|
setup(e) {
|
|
936
936
|
const { i18n: { t: n } } = re.useI18n();
|
|
937
937
|
return (t, a) => {
|
|
938
|
-
const r =
|
|
939
|
-
return m(),
|
|
938
|
+
const r = P("KBadge");
|
|
939
|
+
return m(), R(r, {
|
|
940
940
|
appearance: e.status ? "success" : "neutral"
|
|
941
941
|
}, {
|
|
942
|
-
default:
|
|
943
|
-
W(j(e.status ?
|
|
942
|
+
default: y(() => [
|
|
943
|
+
W(j(e.status ? g(n)("baseConfigCard.statusBadge.enabledLabel") : g(n)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
944
944
|
]),
|
|
945
945
|
_: 1
|
|
946
946
|
}, 8, ["appearance"]);
|
|
947
947
|
};
|
|
948
948
|
}
|
|
949
|
-
}), br = "#0044f4", kr = "#e0e4ea", Cr = "#3a3f51", wr = "1px",
|
|
949
|
+
}), br = "#0044f4", kr = "#e0e4ea", Cr = "#3a3f51", wr = "1px", Ir = "20px", _r = { class: "config-card-details-row" }, Ar = ["data-testid"], Sr = ["data-testid"], xr = ["data-testid"], Tr = ["data-testid"], $r = { key: 1 }, jr = ["data-testid"], Mr = ["data-testid"], Or = ["data-testid"], Er = ["data-testid"], Fr = {
|
|
950
950
|
name: "ConfigCardItem",
|
|
951
951
|
components: { CopyUuid: vn, JsonCardItem: bn, StatusBadge: vr, InternalLinkItem: hr }
|
|
952
|
-
},
|
|
952
|
+
}, Kr = /* @__PURE__ */ te({
|
|
953
953
|
...Fr,
|
|
954
954
|
props: {
|
|
955
955
|
item: {
|
|
@@ -970,8 +970,8 @@ const re = {
|
|
|
970
970
|
emits: ["navigation-click"],
|
|
971
971
|
setup(e, { emit: n }) {
|
|
972
972
|
const t = e;
|
|
973
|
-
ma((
|
|
974
|
-
"0fea14db": u.value ? "none" : `solid ${
|
|
973
|
+
ma((f) => ({
|
|
974
|
+
"0fea14db": u.value ? "none" : `solid ${g(wr)} ${g(kr)}`,
|
|
975
975
|
"1cf0460e": l.value && i.value ? "block" : "flex",
|
|
976
976
|
"328cca12": l.value && i.value ? "100%" : t.slim ? "50%" : "25%",
|
|
977
977
|
"328f0fed": l.value && i.value ? "100%" : t.slim ? "50%" : "75%"
|
|
@@ -1062,8 +1062,8 @@ const re = {
|
|
|
1062
1062
|
attrs: {
|
|
1063
1063
|
"data-testid": `${t.item.key}-internal-link`,
|
|
1064
1064
|
item: t.item,
|
|
1065
|
-
onNavigationClick: (
|
|
1066
|
-
n("navigation-click",
|
|
1065
|
+
onNavigationClick: (f) => {
|
|
1066
|
+
n("navigation-click", f);
|
|
1067
1067
|
}
|
|
1068
1068
|
}
|
|
1069
1069
|
};
|
|
@@ -1102,28 +1102,28 @@ const re = {
|
|
|
1102
1102
|
text: t.item.value
|
|
1103
1103
|
};
|
|
1104
1104
|
}
|
|
1105
|
-
}), c =
|
|
1106
|
-
return (
|
|
1107
|
-
const k =
|
|
1108
|
-
return m(), T("div",
|
|
1109
|
-
|
|
1105
|
+
}), c = O(), { isTruncated: h } = re.useTruncationDetector(c);
|
|
1106
|
+
return (f, A) => {
|
|
1107
|
+
const k = P("KLabel"), p = P("KBadge"), S = P("KTooltip");
|
|
1108
|
+
return m(), T("div", _r, [
|
|
1109
|
+
K("div", {
|
|
1110
1110
|
class: "config-card-details-label",
|
|
1111
1111
|
"data-testid": `${e.item.key}-label`
|
|
1112
1112
|
}, [
|
|
1113
|
-
Y(
|
|
1114
|
-
|
|
1115
|
-
default:
|
|
1113
|
+
Y(f.$slots, "label", { item: e.item }, () => [
|
|
1114
|
+
F(k, { "tooltip-attributes": { maxWidth: "500px" } }, ke({
|
|
1115
|
+
default: y(() => [
|
|
1116
1116
|
W(j(e.item.label) + " ", 1)
|
|
1117
1117
|
]),
|
|
1118
1118
|
_: 2
|
|
1119
1119
|
}, [
|
|
1120
1120
|
s.value ? {
|
|
1121
1121
|
name: "tooltip",
|
|
1122
|
-
fn:
|
|
1123
|
-
|
|
1122
|
+
fn: y(() => [
|
|
1123
|
+
K("div", {
|
|
1124
1124
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1125
1125
|
}, [
|
|
1126
|
-
Y(
|
|
1126
|
+
Y(f.$slots, "label-tooltip", {}, () => [
|
|
1127
1127
|
W(j(e.item.tooltip), 1)
|
|
1128
1128
|
], !0)
|
|
1129
1129
|
], 8, Sr)
|
|
@@ -1133,28 +1133,28 @@ const re = {
|
|
|
1133
1133
|
]), 1024)
|
|
1134
1134
|
], !0)
|
|
1135
1135
|
], 8, Ar),
|
|
1136
|
-
|
|
1136
|
+
K("div", {
|
|
1137
1137
|
class: "config-card-details-value",
|
|
1138
1138
|
"data-testid": `${e.item.key}-property-value`
|
|
1139
1139
|
}, [
|
|
1140
|
-
Y(
|
|
1140
|
+
Y(f.$slots, e.item.key, {
|
|
1141
1141
|
rowValue: e.item.value
|
|
1142
1142
|
}, () => [
|
|
1143
1143
|
i.value ? (m(), T("div", $r, [
|
|
1144
|
-
(m(),
|
|
1145
|
-
default:
|
|
1144
|
+
(m(), R(Ee(d.value.tag), ga(ya(d.value.attrs)), {
|
|
1145
|
+
default: y(() => [
|
|
1146
1146
|
d.value.additionalComponent === "KBadge" ? (m(), T("div", {
|
|
1147
1147
|
key: 0,
|
|
1148
1148
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1149
1149
|
}, [
|
|
1150
|
-
(m(!0), T(fe, null, de(e.item.value, (v, q) => (m(),
|
|
1150
|
+
(m(!0), T(fe, null, de(e.item.value, (v, q) => (m(), R(p, {
|
|
1151
1151
|
key: `${e.item.key}-badge-tag-${q}`,
|
|
1152
1152
|
class: "config-badge",
|
|
1153
1153
|
"data-testid": `${e.item.key}-badge-tag-${q}`,
|
|
1154
1154
|
tooltip: v,
|
|
1155
1155
|
"truncation-tooltip": ""
|
|
1156
1156
|
}, {
|
|
1157
|
-
default:
|
|
1157
|
+
default: y(() => [
|
|
1158
1158
|
W(j(v), 1)
|
|
1159
1159
|
]),
|
|
1160
1160
|
_: 2
|
|
@@ -1165,47 +1165,47 @@ const re = {
|
|
|
1165
1165
|
class: "copy-uuid-array",
|
|
1166
1166
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1167
1167
|
}, [
|
|
1168
|
-
(m(!0), T(fe, null, de(e.item.value, (v, q) => (m(),
|
|
1168
|
+
(m(!0), T(fe, null, de(e.item.value, (v, q) => (m(), R(g(vn), st(d.value.childAttrs, {
|
|
1169
1169
|
key: `${e.item.key}-copy-uuid-${q}`,
|
|
1170
1170
|
"data-testid": `${e.item.key}-copy-uuid-${q}`,
|
|
1171
1171
|
uuid: v
|
|
1172
1172
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1173
|
-
], 8,
|
|
1173
|
+
], 8, Mr)) : d.value.additionalComponent === "KMethodBadge" ? (m(), T("div", {
|
|
1174
1174
|
key: 2,
|
|
1175
1175
|
class: "method-badge-array",
|
|
1176
1176
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1177
1177
|
}, [
|
|
1178
|
-
(m(!0), T(fe, null, de(e.item.value, (v, q) => (m(),
|
|
1178
|
+
(m(!0), T(fe, null, de(e.item.value, (v, q) => (m(), R(p, {
|
|
1179
1179
|
key: `${e.item.key}-badge-method-${q}`,
|
|
1180
|
-
appearance: Object.values(
|
|
1180
|
+
appearance: Object.values(g(wa)).includes(v.toLowerCase()) ? v.toLowerCase() : "custom",
|
|
1181
1181
|
class: "config-badge",
|
|
1182
1182
|
"data-testid": `${e.item.key}-badge-method-${q}`
|
|
1183
1183
|
}, {
|
|
1184
|
-
default:
|
|
1184
|
+
default: y(() => [
|
|
1185
1185
|
W(j(v), 1)
|
|
1186
1186
|
]),
|
|
1187
1187
|
_: 2
|
|
1188
1188
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1189
|
-
], 8,
|
|
1189
|
+
], 8, Or)) : G("", !0),
|
|
1190
1190
|
d.value.additionalComponent === "JsonCardItem" ? (m(), T("div", {
|
|
1191
1191
|
key: 3,
|
|
1192
1192
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1193
1193
|
}, [
|
|
1194
|
-
(m(!0), T(fe, null, de(e.item.value, (v, q) => (m(),
|
|
1194
|
+
(m(!0), T(fe, null, de(e.item.value, (v, q) => (m(), R(bn, {
|
|
1195
1195
|
key: `json-array-item-${q}`,
|
|
1196
1196
|
index: q,
|
|
1197
1197
|
"is-array-item": "",
|
|
1198
1198
|
item: v
|
|
1199
1199
|
}, null, 8, ["index", "item"]))), 128))
|
|
1200
|
-
], 8,
|
|
1200
|
+
], 8, Er)) : (m(), R(S, {
|
|
1201
1201
|
key: 4,
|
|
1202
|
-
label:
|
|
1202
|
+
label: g(h) ? e.item.value : ""
|
|
1203
1203
|
}, {
|
|
1204
|
-
default:
|
|
1205
|
-
|
|
1204
|
+
default: y(() => [
|
|
1205
|
+
K("span", {
|
|
1206
1206
|
ref_key: "textContent",
|
|
1207
1207
|
ref: c,
|
|
1208
|
-
class:
|
|
1208
|
+
class: Ae(["attrs-data-text", { truncated: e.truncated }])
|
|
1209
1209
|
}, j(d.value.text), 3)
|
|
1210
1210
|
]),
|
|
1211
1211
|
_: 1
|
|
@@ -1222,12 +1222,12 @@ const re = {
|
|
|
1222
1222
|
]);
|
|
1223
1223
|
};
|
|
1224
1224
|
}
|
|
1225
|
-
}), bt = /* @__PURE__ */ me(
|
|
1225
|
+
}), bt = /* @__PURE__ */ me(Kr, [["__scopeId", "data-v-4c7d8cc3"]]);
|
|
1226
1226
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1227
1227
|
function kn(e) {
|
|
1228
1228
|
return typeof e > "u" || e === null;
|
|
1229
1229
|
}
|
|
1230
|
-
function
|
|
1230
|
+
function Nr(e) {
|
|
1231
1231
|
return typeof e == "object" && e !== null;
|
|
1232
1232
|
}
|
|
1233
1233
|
function Br(e) {
|
|
@@ -1246,12 +1246,12 @@ function Lr(e, n) {
|
|
|
1246
1246
|
t += e;
|
|
1247
1247
|
return t;
|
|
1248
1248
|
}
|
|
1249
|
-
function
|
|
1249
|
+
function Pr(e) {
|
|
1250
1250
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1251
1251
|
}
|
|
1252
|
-
var
|
|
1253
|
-
isNothing:
|
|
1254
|
-
isObject:
|
|
1252
|
+
var Vr = kn, Rr = Nr, Ur = Br, Dr = Lr, Gr = Pr, Hr = qr, ae = {
|
|
1253
|
+
isNothing: Vr,
|
|
1254
|
+
isObject: Rr,
|
|
1255
1255
|
toArray: Ur,
|
|
1256
1256
|
repeat: Dr,
|
|
1257
1257
|
isNegativeZero: Gr,
|
|
@@ -1271,7 +1271,7 @@ Le.prototype.constructor = Le;
|
|
|
1271
1271
|
Le.prototype.toString = function(e) {
|
|
1272
1272
|
return this.name + ": " + Cn(this, e);
|
|
1273
1273
|
};
|
|
1274
|
-
var
|
|
1274
|
+
var se = Le;
|
|
1275
1275
|
function rt(e, n, t, a, r) {
|
|
1276
1276
|
var o = "", i = "", s = Math.floor(r / 2) - 1;
|
|
1277
1277
|
return a - n > s && (o = " ... ", n = a - s + o.length), t - a > s && (i = " ...", t = a + s - i.length), {
|
|
@@ -1340,13 +1340,13 @@ function Zr(e) {
|
|
|
1340
1340
|
function Qr(e, n) {
|
|
1341
1341
|
if (n = n || {}, Object.keys(n).forEach(function(t) {
|
|
1342
1342
|
if (Yr.indexOf(t) === -1)
|
|
1343
|
-
throw new
|
|
1343
|
+
throw new se('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1344
1344
|
}), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
|
|
1345
1345
|
return !0;
|
|
1346
1346
|
}, this.construct = n.construct || function(t) {
|
|
1347
1347
|
return t;
|
|
1348
1348
|
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = Zr(n.styleAliases || null), Wr.indexOf(this.kind) === -1)
|
|
1349
|
-
throw new
|
|
1349
|
+
throw new se('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1350
1350
|
}
|
|
1351
1351
|
var oe = Qr;
|
|
1352
1352
|
function Gt(e, n) {
|
|
@@ -1390,27 +1390,27 @@ ut.prototype.extend = function(e) {
|
|
|
1390
1390
|
else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit)))
|
|
1391
1391
|
e.implicit && (n = n.concat(e.implicit)), e.explicit && (t = t.concat(e.explicit));
|
|
1392
1392
|
else
|
|
1393
|
-
throw new
|
|
1393
|
+
throw new se("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1394
1394
|
n.forEach(function(r) {
|
|
1395
1395
|
if (!(r instanceof oe))
|
|
1396
|
-
throw new
|
|
1396
|
+
throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1397
1397
|
if (r.loadKind && r.loadKind !== "scalar")
|
|
1398
|
-
throw new
|
|
1398
|
+
throw new se("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1399
1399
|
if (r.multi)
|
|
1400
|
-
throw new
|
|
1400
|
+
throw new se("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1401
1401
|
}), t.forEach(function(r) {
|
|
1402
1402
|
if (!(r instanceof oe))
|
|
1403
|
-
throw new
|
|
1403
|
+
throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1404
1404
|
});
|
|
1405
1405
|
var a = Object.create(ut.prototype);
|
|
1406
1406
|
return a.implicit = (this.implicit || []).concat(n), a.explicit = (this.explicit || []).concat(t), a.compiledImplicit = Gt(a, "implicit"), a.compiledExplicit = Gt(a, "explicit"), a.compiledTypeMap = Xr(a.compiledImplicit, a.compiledExplicit), a;
|
|
1407
1407
|
};
|
|
1408
|
-
var wn = ut,
|
|
1408
|
+
var wn = ut, In = new oe("tag:yaml.org,2002:str", {
|
|
1409
1409
|
kind: "scalar",
|
|
1410
1410
|
construct: function(e) {
|
|
1411
1411
|
return e !== null ? e : "";
|
|
1412
1412
|
}
|
|
1413
|
-
}),
|
|
1413
|
+
}), _n = new oe("tag:yaml.org,2002:seq", {
|
|
1414
1414
|
kind: "sequence",
|
|
1415
1415
|
construct: function(e) {
|
|
1416
1416
|
return e !== null ? e : [];
|
|
@@ -1422,8 +1422,8 @@ var wn = ut, _n = new oe("tag:yaml.org,2002:str", {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
}), Sn = new wn({
|
|
1424
1424
|
explicit: [
|
|
1425
|
-
_n,
|
|
1426
1425
|
In,
|
|
1426
|
+
_n,
|
|
1427
1427
|
An
|
|
1428
1428
|
]
|
|
1429
1429
|
});
|
|
@@ -1496,10 +1496,10 @@ var Tn = new oe("tag:yaml.org,2002:bool", {
|
|
|
1496
1496
|
function io(e) {
|
|
1497
1497
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1498
1498
|
}
|
|
1499
|
-
function
|
|
1499
|
+
function so(e) {
|
|
1500
1500
|
return 48 <= e && e <= 55;
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1502
|
+
function lo(e) {
|
|
1503
1503
|
return 48 <= e && e <= 57;
|
|
1504
1504
|
}
|
|
1505
1505
|
function uo(e) {
|
|
@@ -1532,7 +1532,7 @@ function uo(e) {
|
|
|
1532
1532
|
if (r === "o") {
|
|
1533
1533
|
for (t++; t < n; t++)
|
|
1534
1534
|
if (r = e[t], r !== "_") {
|
|
1535
|
-
if (!
|
|
1535
|
+
if (!so(e.charCodeAt(t)))
|
|
1536
1536
|
return !1;
|
|
1537
1537
|
a = !0;
|
|
1538
1538
|
}
|
|
@@ -1543,7 +1543,7 @@ function uo(e) {
|
|
|
1543
1543
|
return !1;
|
|
1544
1544
|
for (; t < n; t++)
|
|
1545
1545
|
if (r = e[t], r !== "_") {
|
|
1546
|
-
if (!
|
|
1546
|
+
if (!lo(e.charCodeAt(t)))
|
|
1547
1547
|
return !1;
|
|
1548
1548
|
a = !0;
|
|
1549
1549
|
}
|
|
@@ -1650,24 +1650,24 @@ var jn = new oe("tag:yaml.org,2002:float", {
|
|
|
1650
1650
|
predicate: vo,
|
|
1651
1651
|
represent: ho,
|
|
1652
1652
|
defaultStyle: "lowercase"
|
|
1653
|
-
}),
|
|
1653
|
+
}), Mn = Sn.extend({
|
|
1654
1654
|
implicit: [
|
|
1655
1655
|
xn,
|
|
1656
1656
|
Tn,
|
|
1657
1657
|
$n,
|
|
1658
1658
|
jn
|
|
1659
1659
|
]
|
|
1660
|
-
}),
|
|
1660
|
+
}), On = Mn, En = new RegExp(
|
|
1661
1661
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1662
1662
|
), Fn = new RegExp(
|
|
1663
1663
|
"^([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]))?))?$"
|
|
1664
1664
|
);
|
|
1665
1665
|
function bo(e) {
|
|
1666
|
-
return e === null ? !1 :
|
|
1666
|
+
return e === null ? !1 : En.exec(e) !== null || Fn.exec(e) !== null;
|
|
1667
1667
|
}
|
|
1668
1668
|
function ko(e) {
|
|
1669
|
-
var n, t, a, r, o, i, s, l = 0, u = null, d, c,
|
|
1670
|
-
if (n =
|
|
1669
|
+
var n, t, a, r, o, i, s, l = 0, u = null, d, c, h;
|
|
1670
|
+
if (n = En.exec(e), n === null && (n = Fn.exec(e)), n === null)
|
|
1671
1671
|
throw new Error("Date resolve error");
|
|
1672
1672
|
if (t = +n[1], a = +n[2] - 1, r = +n[3], !n[4])
|
|
1673
1673
|
return new Date(Date.UTC(t, a, r));
|
|
@@ -1676,12 +1676,12 @@ function ko(e) {
|
|
|
1676
1676
|
l += "0";
|
|
1677
1677
|
l = +l;
|
|
1678
1678
|
}
|
|
1679
|
-
return n[9] && (d = +n[10], c = +(n[11] || 0), u = (d * 60 + c) * 6e4, n[9] === "-" && (u = -u)),
|
|
1679
|
+
return n[9] && (d = +n[10], c = +(n[11] || 0), u = (d * 60 + c) * 6e4, n[9] === "-" && (u = -u)), h = new Date(Date.UTC(t, a, r, o, i, s, l)), u && h.setTime(h.getTime() - u), h;
|
|
1680
1680
|
}
|
|
1681
1681
|
function Co(e) {
|
|
1682
1682
|
return e.toISOString();
|
|
1683
1683
|
}
|
|
1684
|
-
var
|
|
1684
|
+
var Kn = new oe("tag:yaml.org,2002:timestamp", {
|
|
1685
1685
|
kind: "scalar",
|
|
1686
1686
|
resolve: bo,
|
|
1687
1687
|
construct: ko,
|
|
@@ -1691,12 +1691,12 @@ var Nn = new oe("tag:yaml.org,2002:timestamp", {
|
|
|
1691
1691
|
function wo(e) {
|
|
1692
1692
|
return e === "<<" || e === null;
|
|
1693
1693
|
}
|
|
1694
|
-
var
|
|
1694
|
+
var Nn = new oe("tag:yaml.org,2002:merge", {
|
|
1695
1695
|
kind: "scalar",
|
|
1696
1696
|
resolve: wo
|
|
1697
1697
|
}), kt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1698
1698
|
\r`;
|
|
1699
|
-
function
|
|
1699
|
+
function Io(e) {
|
|
1700
1700
|
if (e === null)
|
|
1701
1701
|
return !1;
|
|
1702
1702
|
var n, t, a = 0, r = e.length, o = kt;
|
|
@@ -1708,7 +1708,7 @@ function _o(e) {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
return a % 8 === 0;
|
|
1710
1710
|
}
|
|
1711
|
-
function
|
|
1711
|
+
function _o(e) {
|
|
1712
1712
|
var n, t, a = e.replace(/[\r\n=]/g, ""), r = a.length, o = kt, i = 0, s = [];
|
|
1713
1713
|
for (n = 0; n < r; n++)
|
|
1714
1714
|
n % 4 === 0 && n && (s.push(i >> 16 & 255), s.push(i >> 8 & 255), s.push(i & 255)), i = i << 6 | o.indexOf(a.charAt(n));
|
|
@@ -1725,8 +1725,8 @@ function So(e) {
|
|
|
1725
1725
|
}
|
|
1726
1726
|
var Bn = new oe("tag:yaml.org,2002:binary", {
|
|
1727
1727
|
kind: "scalar",
|
|
1728
|
-
resolve:
|
|
1729
|
-
construct:
|
|
1728
|
+
resolve: Io,
|
|
1729
|
+
construct: _o,
|
|
1730
1730
|
predicate: So,
|
|
1731
1731
|
represent: Ao
|
|
1732
1732
|
}), xo = Object.prototype.hasOwnProperty, To = Object.prototype.toString;
|
|
@@ -1759,19 +1759,19 @@ var qn = new oe("tag:yaml.org,2002:omap", {
|
|
|
1759
1759
|
kind: "sequence",
|
|
1760
1760
|
resolve: $o,
|
|
1761
1761
|
construct: jo
|
|
1762
|
-
}),
|
|
1763
|
-
function
|
|
1762
|
+
}), Mo = Object.prototype.toString;
|
|
1763
|
+
function Oo(e) {
|
|
1764
1764
|
if (e === null)
|
|
1765
1765
|
return !0;
|
|
1766
1766
|
var n, t, a, r, o, i = e;
|
|
1767
1767
|
for (o = new Array(i.length), n = 0, t = i.length; n < t; n += 1) {
|
|
1768
|
-
if (a = i[n],
|
|
1768
|
+
if (a = i[n], Mo.call(a) !== "[object Object]" || (r = Object.keys(a), r.length !== 1))
|
|
1769
1769
|
return !1;
|
|
1770
1770
|
o[n] = [r[0], a[r[0]]];
|
|
1771
1771
|
}
|
|
1772
1772
|
return !0;
|
|
1773
1773
|
}
|
|
1774
|
-
function
|
|
1774
|
+
function Eo(e) {
|
|
1775
1775
|
if (e === null)
|
|
1776
1776
|
return [];
|
|
1777
1777
|
var n, t, a, r, o, i = e;
|
|
@@ -1781,10 +1781,10 @@ function Mo(e) {
|
|
|
1781
1781
|
}
|
|
1782
1782
|
var Ln = new oe("tag:yaml.org,2002:pairs", {
|
|
1783
1783
|
kind: "sequence",
|
|
1784
|
-
resolve:
|
|
1785
|
-
construct:
|
|
1784
|
+
resolve: Oo,
|
|
1785
|
+
construct: Eo
|
|
1786
1786
|
}), Fo = Object.prototype.hasOwnProperty;
|
|
1787
|
-
function
|
|
1787
|
+
function Ko(e) {
|
|
1788
1788
|
if (e === null)
|
|
1789
1789
|
return !0;
|
|
1790
1790
|
var n, t = e;
|
|
@@ -1793,45 +1793,45 @@ function No(e) {
|
|
|
1793
1793
|
return !1;
|
|
1794
1794
|
return !0;
|
|
1795
1795
|
}
|
|
1796
|
-
function
|
|
1796
|
+
function No(e) {
|
|
1797
1797
|
return e !== null ? e : {};
|
|
1798
1798
|
}
|
|
1799
|
-
var
|
|
1799
|
+
var Pn = new oe("tag:yaml.org,2002:set", {
|
|
1800
1800
|
kind: "mapping",
|
|
1801
|
-
resolve:
|
|
1802
|
-
construct:
|
|
1803
|
-
}), Ct =
|
|
1801
|
+
resolve: Ko,
|
|
1802
|
+
construct: No
|
|
1803
|
+
}), Ct = On.extend({
|
|
1804
1804
|
implicit: [
|
|
1805
|
-
|
|
1806
|
-
|
|
1805
|
+
Kn,
|
|
1806
|
+
Nn
|
|
1807
1807
|
],
|
|
1808
1808
|
explicit: [
|
|
1809
1809
|
Bn,
|
|
1810
1810
|
qn,
|
|
1811
1811
|
Ln,
|
|
1812
|
-
|
|
1812
|
+
Pn
|
|
1813
1813
|
]
|
|
1814
|
-
}),
|
|
1814
|
+
}), we = Object.prototype.hasOwnProperty, Ge = 1, Vn = 2, Rn = 3, He = 4, it = 1, Bo = 2, Ht = 3, qo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Lo = /[\x85\u2028\u2029]/, Po = /[,\[\]\{\}]/, Un = /^(?:!|!!|![a-z\-]+!)$/i, Dn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1815
1815
|
function zt(e) {
|
|
1816
1816
|
return Object.prototype.toString.call(e);
|
|
1817
1817
|
}
|
|
1818
1818
|
function ye(e) {
|
|
1819
1819
|
return e === 10 || e === 13;
|
|
1820
1820
|
}
|
|
1821
|
-
function
|
|
1821
|
+
function _e(e) {
|
|
1822
1822
|
return e === 9 || e === 32;
|
|
1823
1823
|
}
|
|
1824
1824
|
function pe(e) {
|
|
1825
1825
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1826
1826
|
}
|
|
1827
|
-
function
|
|
1827
|
+
function Me(e) {
|
|
1828
1828
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1830
|
+
function Vo(e) {
|
|
1831
1831
|
var n;
|
|
1832
1832
|
return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
1833
1833
|
}
|
|
1834
|
-
function
|
|
1834
|
+
function Ro(e) {
|
|
1835
1835
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1836
1836
|
}
|
|
1837
1837
|
function Uo(e) {
|
|
@@ -1862,9 +1862,9 @@ function zn(e, n) {
|
|
|
1862
1862
|
line: e.line,
|
|
1863
1863
|
column: e.position - e.lineStart
|
|
1864
1864
|
};
|
|
1865
|
-
return t.snippet = Jr(t), new
|
|
1865
|
+
return t.snippet = Jr(t), new se(n, t);
|
|
1866
1866
|
}
|
|
1867
|
-
function
|
|
1867
|
+
function M(e, n) {
|
|
1868
1868
|
throw zn(e, n);
|
|
1869
1869
|
}
|
|
1870
1870
|
function ze(e, n) {
|
|
@@ -1873,15 +1873,15 @@ function ze(e, n) {
|
|
|
1873
1873
|
var Yt = {
|
|
1874
1874
|
YAML: function(e, n, t) {
|
|
1875
1875
|
var a, r, o;
|
|
1876
|
-
e.version !== null &&
|
|
1876
|
+
e.version !== null && M(e, "duplication of %YAML directive"), t.length !== 1 && M(e, "YAML directive accepts exactly one argument"), a = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), a === null && M(e, "ill-formed argument of the YAML directive"), r = parseInt(a[1], 10), o = parseInt(a[2], 10), r !== 1 && M(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = o < 2, o !== 1 && o !== 2 && ze(e, "unsupported YAML version of the document");
|
|
1877
1877
|
},
|
|
1878
1878
|
TAG: function(e, n, t) {
|
|
1879
1879
|
var a, r;
|
|
1880
|
-
t.length !== 2 &&
|
|
1880
|
+
t.length !== 2 && M(e, "TAG directive accepts exactly two arguments"), a = t[0], r = t[1], Un.test(a) || M(e, "ill-formed tag handle (first argument) of the TAG directive"), we.call(e.tagMap, a) && M(e, 'there is a previously declared suffix for "' + a + '" tag handle'), Dn.test(r) || M(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1881
1881
|
try {
|
|
1882
1882
|
r = decodeURIComponent(r);
|
|
1883
1883
|
} catch {
|
|
1884
|
-
|
|
1884
|
+
M(e, "tag prefix is malformed: " + r);
|
|
1885
1885
|
}
|
|
1886
1886
|
e.tagMap[a] = r;
|
|
1887
1887
|
}
|
|
@@ -1891,22 +1891,22 @@ function Ce(e, n, t, a) {
|
|
|
1891
1891
|
if (n < t) {
|
|
1892
1892
|
if (s = e.input.slice(n, t), a)
|
|
1893
1893
|
for (r = 0, o = s.length; r < o; r += 1)
|
|
1894
|
-
i = s.charCodeAt(r), i === 9 || 32 <= i && i <= 1114111 ||
|
|
1894
|
+
i = s.charCodeAt(r), i === 9 || 32 <= i && i <= 1114111 || M(e, "expected valid JSON character");
|
|
1895
1895
|
else
|
|
1896
|
-
qo.test(s) &&
|
|
1896
|
+
qo.test(s) && M(e, "the stream contains non-printable characters");
|
|
1897
1897
|
e.result += s;
|
|
1898
1898
|
}
|
|
1899
1899
|
}
|
|
1900
1900
|
function Wt(e, n, t, a) {
|
|
1901
1901
|
var r, o, i, s;
|
|
1902
|
-
for (ae.isObject(t) ||
|
|
1903
|
-
o = r[i],
|
|
1902
|
+
for (ae.isObject(t) || M(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(t), i = 0, s = r.length; i < s; i += 1)
|
|
1903
|
+
o = r[i], we.call(n, o) || (n[o] = t[o], a[o] = !0);
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1905
|
+
function Oe(e, n, t, a, r, o, i, s, l) {
|
|
1906
1906
|
var u, d;
|
|
1907
1907
|
if (Array.isArray(r))
|
|
1908
1908
|
for (r = Array.prototype.slice.call(r), u = 0, d = r.length; u < d; u += 1)
|
|
1909
|
-
Array.isArray(r[u]) &&
|
|
1909
|
+
Array.isArray(r[u]) && M(e, "nested arrays are not supported inside keys"), typeof r == "object" && zt(r[u]) === "[object Object]" && (r[u] = "[object Object]");
|
|
1910
1910
|
if (typeof r == "object" && zt(r) === "[object Object]" && (r = "[object Object]"), r = String(r), n === null && (n = {}), a === "tag:yaml.org,2002:merge")
|
|
1911
1911
|
if (Array.isArray(o))
|
|
1912
1912
|
for (u = 0, d = o.length; u < d; u += 1)
|
|
@@ -1914,7 +1914,7 @@ function Ee(e, n, t, a, r, o, i, s, l) {
|
|
|
1914
1914
|
else
|
|
1915
1915
|
Wt(e, n, o, t);
|
|
1916
1916
|
else
|
|
1917
|
-
!e.json && !
|
|
1917
|
+
!e.json && !we.call(t, r) && we.call(n, r) && (e.line = i || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, M(e, "duplicated mapping key")), r === "__proto__" ? Object.defineProperty(n, r, {
|
|
1918
1918
|
configurable: !0,
|
|
1919
1919
|
enumerable: !0,
|
|
1920
1920
|
writable: !0,
|
|
@@ -1924,11 +1924,11 @@ function Ee(e, n, t, a, r, o, i, s, l) {
|
|
|
1924
1924
|
}
|
|
1925
1925
|
function wt(e) {
|
|
1926
1926
|
var n;
|
|
1927
|
-
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1927
|
+
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : M(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1928
1928
|
}
|
|
1929
1929
|
function ne(e, n, t) {
|
|
1930
1930
|
for (var a = 0, r = e.input.charCodeAt(e.position); r !== 0; ) {
|
|
1931
|
-
for (;
|
|
1931
|
+
for (; _e(r); )
|
|
1932
1932
|
r === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), r = e.input.charCodeAt(++e.position);
|
|
1933
1933
|
if (n && r === 35)
|
|
1934
1934
|
do
|
|
@@ -1946,36 +1946,36 @@ function Qe(e) {
|
|
|
1946
1946
|
var n = e.position, t;
|
|
1947
1947
|
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 || pe(t)));
|
|
1948
1948
|
}
|
|
1949
|
-
function
|
|
1949
|
+
function It(e, n) {
|
|
1950
1950
|
n === 1 ? e.result += " " : n > 1 && (e.result += ae.repeat(`
|
|
1951
1951
|
`, n - 1));
|
|
1952
1952
|
}
|
|
1953
1953
|
function Ho(e, n, t) {
|
|
1954
|
-
var a, r, o, i, s, l, u, d, c = e.kind,
|
|
1955
|
-
if (
|
|
1954
|
+
var a, r, o, i, s, l, u, d, c = e.kind, h = e.result, f;
|
|
1955
|
+
if (f = e.input.charCodeAt(e.position), pe(f) || Me(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) && (r = e.input.charCodeAt(e.position + 1), pe(r) || t && Me(r)))
|
|
1956
1956
|
return !1;
|
|
1957
|
-
for (e.kind = "scalar", e.result = "", o = i = e.position, s = !1;
|
|
1958
|
-
if (
|
|
1959
|
-
if (r = e.input.charCodeAt(e.position + 1), pe(r) || t &&
|
|
1957
|
+
for (e.kind = "scalar", e.result = "", o = i = e.position, s = !1; f !== 0; ) {
|
|
1958
|
+
if (f === 58) {
|
|
1959
|
+
if (r = e.input.charCodeAt(e.position + 1), pe(r) || t && Me(r))
|
|
1960
1960
|
break;
|
|
1961
|
-
} else if (
|
|
1961
|
+
} else if (f === 35) {
|
|
1962
1962
|
if (a = e.input.charCodeAt(e.position - 1), pe(a))
|
|
1963
1963
|
break;
|
|
1964
1964
|
} else {
|
|
1965
|
-
if (e.position === e.lineStart && Qe(e) || t &&
|
|
1965
|
+
if (e.position === e.lineStart && Qe(e) || t && Me(f))
|
|
1966
1966
|
break;
|
|
1967
|
-
if (ye(
|
|
1967
|
+
if (ye(f))
|
|
1968
1968
|
if (l = e.line, u = e.lineStart, d = e.lineIndent, ne(e, !1, -1), e.lineIndent >= n) {
|
|
1969
|
-
s = !0,
|
|
1969
|
+
s = !0, f = e.input.charCodeAt(e.position);
|
|
1970
1970
|
continue;
|
|
1971
1971
|
} else {
|
|
1972
1972
|
e.position = i, e.line = l, e.lineStart = u, e.lineIndent = d;
|
|
1973
1973
|
break;
|
|
1974
1974
|
}
|
|
1975
1975
|
}
|
|
1976
|
-
s && (Ce(e, o, i, !1),
|
|
1976
|
+
s && (Ce(e, o, i, !1), It(e, e.line - l), o = i = e.position, s = !1), _e(f) || (i = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1977
1977
|
}
|
|
1978
|
-
return Ce(e, o, i, !1), e.result ? !0 : (e.kind = c, e.result =
|
|
1978
|
+
return Ce(e, o, i, !1), e.result ? !0 : (e.kind = c, e.result = h, !1);
|
|
1979
1979
|
}
|
|
1980
1980
|
function zo(e, n) {
|
|
1981
1981
|
var t, a, r;
|
|
@@ -1988,8 +1988,8 @@ function zo(e, n) {
|
|
|
1988
1988
|
else
|
|
1989
1989
|
return !0;
|
|
1990
1990
|
else
|
|
1991
|
-
ye(t) ? (Ce(e, a, r, !0),
|
|
1992
|
-
|
|
1991
|
+
ye(t) ? (Ce(e, a, r, !0), It(e, ne(e, !1, n)), a = r = e.position) : e.position === e.lineStart && Qe(e) ? M(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
1992
|
+
M(e, "unexpected end of the stream within a single quoted scalar");
|
|
1993
1993
|
}
|
|
1994
1994
|
function Jo(e, n) {
|
|
1995
1995
|
var t, a, r, o, i, s;
|
|
@@ -2003,32 +2003,32 @@ function Jo(e, n) {
|
|
|
2003
2003
|
ne(e, !1, n);
|
|
2004
2004
|
else if (s < 256 && Gn[s])
|
|
2005
2005
|
e.result += Hn[s], e.position++;
|
|
2006
|
-
else if ((i =
|
|
2006
|
+
else if ((i = Ro(s)) > 0) {
|
|
2007
2007
|
for (r = i, o = 0; r > 0; r--)
|
|
2008
|
-
s = e.input.charCodeAt(++e.position), (i =
|
|
2008
|
+
s = e.input.charCodeAt(++e.position), (i = Vo(s)) >= 0 ? o = (o << 4) + i : M(e, "expected hexadecimal character");
|
|
2009
2009
|
e.result += Do(o), e.position++;
|
|
2010
2010
|
} else
|
|
2011
|
-
|
|
2011
|
+
M(e, "unknown escape sequence");
|
|
2012
2012
|
t = a = e.position;
|
|
2013
2013
|
} else
|
|
2014
|
-
ye(s) ? (Ce(e, t, a, !0),
|
|
2014
|
+
ye(s) ? (Ce(e, t, a, !0), It(e, ne(e, !1, n)), t = a = e.position) : e.position === e.lineStart && Qe(e) ? M(e, "unexpected end of the document within a double quoted scalar") : (e.position++, a = e.position);
|
|
2015
2015
|
}
|
|
2016
|
-
|
|
2016
|
+
M(e, "unexpected end of the stream within a double quoted scalar");
|
|
2017
2017
|
}
|
|
2018
2018
|
function Yo(e, n) {
|
|
2019
|
-
var t = !0, a, r, o, i = e.tag, s, l = e.anchor, u, d, c,
|
|
2019
|
+
var t = !0, a, r, o, i = e.tag, s, l = e.anchor, u, d, c, h, f, A = /* @__PURE__ */ Object.create(null), k, p, S, v;
|
|
2020
2020
|
if (v = e.input.charCodeAt(e.position), v === 91)
|
|
2021
|
-
d = 93,
|
|
2021
|
+
d = 93, f = !1, s = [];
|
|
2022
2022
|
else if (v === 123)
|
|
2023
|
-
d = 125,
|
|
2023
|
+
d = 125, f = !0, s = {};
|
|
2024
2024
|
else
|
|
2025
2025
|
return !1;
|
|
2026
2026
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), v = e.input.charCodeAt(++e.position); v !== 0; ) {
|
|
2027
2027
|
if (ne(e, !0, n), v = e.input.charCodeAt(e.position), v === d)
|
|
2028
|
-
return e.position++, e.tag = i, e.anchor = l, e.kind =
|
|
2029
|
-
t ? v === 44 &&
|
|
2028
|
+
return e.position++, e.tag = i, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
2029
|
+
t ? v === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), p = k = S = null, c = h = !1, v === 63 && (u = e.input.charCodeAt(e.position + 1), pe(u) && (c = h = !0, e.position++, ne(e, !0, n))), a = e.line, r = e.lineStart, o = e.position, Fe(e, n, Ge, !1, !0), p = e.tag, k = e.result, ne(e, !0, n), v = e.input.charCodeAt(e.position), (h || e.line === a) && v === 58 && (c = !0, v = e.input.charCodeAt(++e.position), ne(e, !0, n), Fe(e, n, Ge, !1, !0), S = e.result), f ? Oe(e, s, A, p, k, S, a, r, o) : c ? s.push(Oe(e, null, A, p, k, S, a, r, o)) : s.push(k), ne(e, !0, n), v = e.input.charCodeAt(e.position), v === 44 ? (t = !0, v = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2030
2030
|
}
|
|
2031
|
-
|
|
2031
|
+
M(e, "unexpected end of the stream within a flow collection");
|
|
2032
2032
|
}
|
|
2033
2033
|
function Wo(e, n) {
|
|
2034
2034
|
var t, a, r = it, o = !1, i = !1, s = n, l = 0, u = !1, d, c;
|
|
@@ -2040,15 +2040,15 @@ function Wo(e, n) {
|
|
|
2040
2040
|
return !1;
|
|
2041
2041
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
2042
2042
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
2043
|
-
it === r ? r = c === 43 ? Ht : Bo :
|
|
2043
|
+
it === r ? r = c === 43 ? Ht : Bo : M(e, "repeat of a chomping mode identifier");
|
|
2044
2044
|
else if ((d = Uo(c)) >= 0)
|
|
2045
|
-
d === 0 ?
|
|
2045
|
+
d === 0 ? M(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? M(e, "repeat of an indentation width identifier") : (s = n + d - 1, i = !0);
|
|
2046
2046
|
else
|
|
2047
2047
|
break;
|
|
2048
|
-
if (
|
|
2048
|
+
if (_e(c)) {
|
|
2049
2049
|
do
|
|
2050
2050
|
c = e.input.charCodeAt(++e.position);
|
|
2051
|
-
while (
|
|
2051
|
+
while (_e(c));
|
|
2052
2052
|
if (c === 35)
|
|
2053
2053
|
do
|
|
2054
2054
|
c = e.input.charCodeAt(++e.position);
|
|
@@ -2067,7 +2067,7 @@ function Wo(e, n) {
|
|
|
2067
2067
|
`);
|
|
2068
2068
|
break;
|
|
2069
2069
|
}
|
|
2070
|
-
for (a ?
|
|
2070
|
+
for (a ? _e(c) ? (u = !0, e.result += ae.repeat(`
|
|
2071
2071
|
`, o ? 1 + l : l)) : u ? (u = !1, e.result += ae.repeat(`
|
|
2072
2072
|
`, l + 1)) : l === 0 ? o && (e.result += " ") : e.result += ae.repeat(`
|
|
2073
2073
|
`, l) : e.result += ae.repeat(`
|
|
@@ -2081,110 +2081,110 @@ function Zt(e, n) {
|
|
|
2081
2081
|
var t, a = e.tag, r = e.anchor, o = [], i, s = !1, l;
|
|
2082
2082
|
if (e.firstTabInLine !== -1)
|
|
2083
2083
|
return !1;
|
|
2084
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2084
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), !(l !== 45 || (i = e.input.charCodeAt(e.position + 1), !pe(i)))); ) {
|
|
2085
2085
|
if (s = !0, e.position++, ne(e, !0, -1) && e.lineIndent <= n) {
|
|
2086
2086
|
o.push(null), l = e.input.charCodeAt(e.position);
|
|
2087
2087
|
continue;
|
|
2088
2088
|
}
|
|
2089
|
-
if (t = e.line, Fe(e, n,
|
|
2090
|
-
|
|
2089
|
+
if (t = e.line, Fe(e, n, Rn, !1, !0), o.push(e.result), ne(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && l !== 0)
|
|
2090
|
+
M(e, "bad indentation of a sequence entry");
|
|
2091
2091
|
else if (e.lineIndent < n)
|
|
2092
2092
|
break;
|
|
2093
2093
|
}
|
|
2094
2094
|
return s ? (e.tag = a, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
2095
2095
|
}
|
|
2096
2096
|
function Zo(e, n, t) {
|
|
2097
|
-
var a, r, o, i, s, l, u = e.tag, d = e.anchor, c = {},
|
|
2097
|
+
var a, r, o, i, s, l, u = e.tag, d = e.anchor, c = {}, h = /* @__PURE__ */ Object.create(null), f = null, A = null, k = null, p = !1, S = !1, v;
|
|
2098
2098
|
if (e.firstTabInLine !== -1)
|
|
2099
2099
|
return !1;
|
|
2100
2100
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), v = e.input.charCodeAt(e.position); v !== 0; ) {
|
|
2101
|
-
if (!
|
|
2102
|
-
v === 63 ? (
|
|
2101
|
+
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), a = e.input.charCodeAt(e.position + 1), o = e.line, (v === 63 || v === 58) && pe(a))
|
|
2102
|
+
v === 63 ? (p && (Oe(e, c, h, f, A, null, i, s, l), f = A = k = null), S = !0, p = !0, r = !0) : p ? (p = !1, r = !0) : M(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, v = a;
|
|
2103
2103
|
else {
|
|
2104
|
-
if (i = e.line, s = e.lineStart, l = e.position, !Fe(e, t,
|
|
2104
|
+
if (i = e.line, s = e.lineStart, l = e.position, !Fe(e, t, Vn, !1, !0))
|
|
2105
2105
|
break;
|
|
2106
2106
|
if (e.line === o) {
|
|
2107
|
-
for (v = e.input.charCodeAt(e.position);
|
|
2107
|
+
for (v = e.input.charCodeAt(e.position); _e(v); )
|
|
2108
2108
|
v = e.input.charCodeAt(++e.position);
|
|
2109
2109
|
if (v === 58)
|
|
2110
|
-
v = e.input.charCodeAt(++e.position), pe(v) ||
|
|
2110
|
+
v = e.input.charCodeAt(++e.position), pe(v) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Oe(e, c, h, f, A, null, i, s, l), f = A = k = null), S = !0, p = !1, r = !1, f = e.tag, A = e.result;
|
|
2111
2111
|
else if (S)
|
|
2112
|
-
|
|
2112
|
+
M(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2113
2113
|
else
|
|
2114
2114
|
return e.tag = u, e.anchor = d, !0;
|
|
2115
2115
|
} else if (S)
|
|
2116
|
-
|
|
2116
|
+
M(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2117
2117
|
else
|
|
2118
2118
|
return e.tag = u, e.anchor = d, !0;
|
|
2119
2119
|
}
|
|
2120
|
-
if ((e.line === o || e.lineIndent > n) && (
|
|
2121
|
-
|
|
2120
|
+
if ((e.line === o || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Fe(e, n, He, !0, r) && (p ? A = e.result : k = e.result), p || (Oe(e, c, h, f, A, k, i, s, l), f = A = k = null), ne(e, !0, -1), v = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && v !== 0)
|
|
2121
|
+
M(e, "bad indentation of a mapping entry");
|
|
2122
2122
|
else if (e.lineIndent < n)
|
|
2123
2123
|
break;
|
|
2124
2124
|
}
|
|
2125
|
-
return
|
|
2125
|
+
return p && Oe(e, c, h, f, A, null, i, s, l), S && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), S;
|
|
2126
2126
|
}
|
|
2127
2127
|
function Qo(e) {
|
|
2128
2128
|
var n, t = !1, a = !1, r, o, i;
|
|
2129
2129
|
if (i = e.input.charCodeAt(e.position), i !== 33)
|
|
2130
2130
|
return !1;
|
|
2131
|
-
if (e.tag !== null &&
|
|
2131
|
+
if (e.tag !== null && M(e, "duplication of a tag property"), i = e.input.charCodeAt(++e.position), i === 60 ? (t = !0, i = e.input.charCodeAt(++e.position)) : i === 33 ? (a = !0, r = "!!", i = e.input.charCodeAt(++e.position)) : r = "!", n = e.position, t) {
|
|
2132
2132
|
do
|
|
2133
2133
|
i = e.input.charCodeAt(++e.position);
|
|
2134
2134
|
while (i !== 0 && i !== 62);
|
|
2135
|
-
e.position < e.length ? (o = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) :
|
|
2135
|
+
e.position < e.length ? (o = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) : M(e, "unexpected end of the stream within a verbatim tag");
|
|
2136
2136
|
} else {
|
|
2137
2137
|
for (; i !== 0 && !pe(i); )
|
|
2138
|
-
i === 33 && (a ?
|
|
2139
|
-
o = e.input.slice(n, e.position),
|
|
2138
|
+
i === 33 && (a ? M(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(n - 1, e.position + 1), Un.test(r) || M(e, "named tag handle cannot contain such characters"), a = !0, n = e.position + 1)), i = e.input.charCodeAt(++e.position);
|
|
2139
|
+
o = e.input.slice(n, e.position), Po.test(o) && M(e, "tag suffix cannot contain flow indicator characters");
|
|
2140
2140
|
}
|
|
2141
|
-
o && !Dn.test(o) &&
|
|
2141
|
+
o && !Dn.test(o) && M(e, "tag name cannot contain such characters: " + o);
|
|
2142
2142
|
try {
|
|
2143
2143
|
o = decodeURIComponent(o);
|
|
2144
2144
|
} catch {
|
|
2145
|
-
|
|
2145
|
+
M(e, "tag name is malformed: " + o);
|
|
2146
2146
|
}
|
|
2147
|
-
return t ? e.tag = o :
|
|
2147
|
+
return t ? e.tag = o : we.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o : M(e, 'undeclared tag handle "' + r + '"'), !0;
|
|
2148
2148
|
}
|
|
2149
2149
|
function Xo(e) {
|
|
2150
2150
|
var n, t;
|
|
2151
2151
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2152
2152
|
return !1;
|
|
2153
|
-
for (e.anchor !== null &&
|
|
2153
|
+
for (e.anchor !== null && M(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !pe(t) && !Me(t); )
|
|
2154
2154
|
t = e.input.charCodeAt(++e.position);
|
|
2155
|
-
return e.position === n &&
|
|
2155
|
+
return e.position === n && M(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2156
2156
|
}
|
|
2157
2157
|
function ei(e) {
|
|
2158
2158
|
var n, t, a;
|
|
2159
2159
|
if (a = e.input.charCodeAt(e.position), a !== 42)
|
|
2160
2160
|
return !1;
|
|
2161
|
-
for (a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !pe(a) && !
|
|
2161
|
+
for (a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !pe(a) && !Me(a); )
|
|
2162
2162
|
a = e.input.charCodeAt(++e.position);
|
|
2163
|
-
return e.position === n &&
|
|
2163
|
+
return e.position === n && M(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), we.call(e.anchorMap, t) || M(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], ne(e, !0, -1), !0;
|
|
2164
2164
|
}
|
|
2165
2165
|
function Fe(e, n, t, a, r) {
|
|
2166
|
-
var o, i, s, l = 1, u = !1, d = !1, c,
|
|
2167
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = i = s = He === t ||
|
|
2166
|
+
var o, i, s, l = 1, u = !1, d = !1, c, h, f, A, k, p;
|
|
2167
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = i = s = He === t || Rn === t, a && ne(e, !0, -1) && (u = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2168
2168
|
for (; Qo(e) || Xo(e); )
|
|
2169
2169
|
ne(e, !0, -1) ? (u = !0, s = o, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2170
|
-
if (s && (s = u || r), (l === 1 || He === t) && (Ge === t ||
|
|
2170
|
+
if (s && (s = u || r), (l === 1 || He === t) && (Ge === t || Vn === t ? k = n : k = n + 1, p = e.position - e.lineStart, l === 1 ? s && (Zt(e, p) || Zo(e, p, k)) || Yo(e, k) ? d = !0 : (i && Wo(e, k) || zo(e, k) || Jo(e, k) ? d = !0 : ei(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && M(e, "alias node should not have any properties")) : Ho(e, k, Ge === t) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && Zt(e, p))), e.tag === null)
|
|
2171
2171
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2172
2172
|
else if (e.tag === "?") {
|
|
2173
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2173
|
+
for (e.result !== null && e.kind !== "scalar" && M(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, h = e.implicitTypes.length; c < h; c += 1)
|
|
2174
2174
|
if (A = e.implicitTypes[c], A.resolve(e.result)) {
|
|
2175
2175
|
e.result = A.construct(e.result), e.tag = A.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2176
2176
|
break;
|
|
2177
2177
|
}
|
|
2178
2178
|
} else if (e.tag !== "!") {
|
|
2179
|
-
if (
|
|
2179
|
+
if (we.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2180
2180
|
A = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2181
2181
|
else
|
|
2182
|
-
for (A = null,
|
|
2183
|
-
if (e.tag.slice(0,
|
|
2184
|
-
A =
|
|
2182
|
+
for (A = null, f = e.typeMap.multi[e.kind || "fallback"], c = 0, h = f.length; c < h; c += 1)
|
|
2183
|
+
if (e.tag.slice(0, f[c].tag.length) === f[c].tag) {
|
|
2184
|
+
A = f[c];
|
|
2185
2185
|
break;
|
|
2186
2186
|
}
|
|
2187
|
-
A ||
|
|
2187
|
+
A || M(e, "unknown tag !<" + e.tag + ">"), e.result !== null && A.kind !== e.kind && M(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + A.kind + '", not "' + e.kind + '"'), A.resolve(e.result, e.tag) ? (e.result = A.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : M(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2188
2188
|
}
|
|
2189
2189
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2190
2190
|
}
|
|
@@ -2193,8 +2193,8 @@ function ti(e) {
|
|
|
2193
2193
|
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 && (ne(e, !0, -1), i = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || i !== 37)); ) {
|
|
2194
2194
|
for (o = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !pe(i); )
|
|
2195
2195
|
i = e.input.charCodeAt(++e.position);
|
|
2196
|
-
for (a = e.input.slice(t, e.position), r = [], a.length < 1 &&
|
|
2197
|
-
for (;
|
|
2196
|
+
for (a = e.input.slice(t, e.position), r = [], a.length < 1 && M(e, "directive name must not be less than one character in length"); i !== 0; ) {
|
|
2197
|
+
for (; _e(i); )
|
|
2198
2198
|
i = e.input.charCodeAt(++e.position);
|
|
2199
2199
|
if (i === 35) {
|
|
2200
2200
|
do
|
|
@@ -2208,14 +2208,14 @@ function ti(e) {
|
|
|
2208
2208
|
i = e.input.charCodeAt(++e.position);
|
|
2209
2209
|
r.push(e.input.slice(t, e.position));
|
|
2210
2210
|
}
|
|
2211
|
-
i !== 0 && wt(e),
|
|
2211
|
+
i !== 0 && wt(e), we.call(Yt, a) ? Yt[a](e, a, r) : ze(e, 'unknown document directive "' + a + '"');
|
|
2212
2212
|
}
|
|
2213
|
-
if (ne(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, ne(e, !0, -1)) : o &&
|
|
2213
|
+
if (ne(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, ne(e, !0, -1)) : o && M(e, "directives end mark is expected"), Fe(e, e.lineIndent - 1, He, !1, !0), ne(e, !0, -1), e.checkLineBreaks && Lo.test(e.input.slice(n, e.position)) && ze(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Qe(e)) {
|
|
2214
2214
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ne(e, !0, -1));
|
|
2215
2215
|
return;
|
|
2216
2216
|
}
|
|
2217
2217
|
if (e.position < e.length - 1)
|
|
2218
|
-
|
|
2218
|
+
M(e, "end of the stream or a document separator is expected");
|
|
2219
2219
|
else
|
|
2220
2220
|
return;
|
|
2221
2221
|
}
|
|
@@ -2223,7 +2223,7 @@ function Jn(e, n) {
|
|
|
2223
2223
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2224
2224
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2225
2225
|
var t = new Go(e, n), a = e.indexOf("\0");
|
|
2226
|
-
for (a !== -1 && (t.position = a,
|
|
2226
|
+
for (a !== -1 && (t.position = a, M(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2227
2227
|
t.lineIndent += 1, t.position += 1;
|
|
2228
2228
|
for (; t.position < t.length - 1; )
|
|
2229
2229
|
ti(t);
|
|
@@ -2242,13 +2242,13 @@ function ai(e, n) {
|
|
|
2242
2242
|
if (t.length !== 0) {
|
|
2243
2243
|
if (t.length === 1)
|
|
2244
2244
|
return t[0];
|
|
2245
|
-
throw new
|
|
2245
|
+
throw new se("expected a single document in the stream, but found more");
|
|
2246
2246
|
}
|
|
2247
2247
|
}
|
|
2248
2248
|
var ri = ni, oi = ai, Yn = {
|
|
2249
2249
|
loadAll: ri,
|
|
2250
2250
|
load: oi
|
|
2251
|
-
}, Wn = Object.prototype.toString, Zn = Object.prototype.hasOwnProperty,
|
|
2251
|
+
}, Wn = Object.prototype.toString, Zn = Object.prototype.hasOwnProperty, _t = 65279, ii = 9, Pe = 10, si = 13, li = 32, ui = 33, ci = 34, ct = 35, di = 37, pi = 38, fi = 39, mi = 42, Qn = 44, gi = 45, Je = 58, yi = 61, hi = 62, vi = 63, bi = 64, Xn = 91, ea = 93, ki = 96, ta = 123, Ci = 124, na = 125, ie = {};
|
|
2252
2252
|
ie[0] = "\\0";
|
|
2253
2253
|
ie[7] = "\\a";
|
|
2254
2254
|
ie[8] = "\\b";
|
|
@@ -2281,8 +2281,8 @@ var wi = [
|
|
|
2281
2281
|
"off",
|
|
2282
2282
|
"Off",
|
|
2283
2283
|
"OFF"
|
|
2284
|
-
],
|
|
2285
|
-
function
|
|
2284
|
+
], Ii = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2285
|
+
function _i(e, n) {
|
|
2286
2286
|
var t, a, r, o, i, s, l;
|
|
2287
2287
|
if (n === null)
|
|
2288
2288
|
return {};
|
|
@@ -2299,12 +2299,12 @@ function Ai(e) {
|
|
|
2299
2299
|
else if (e <= 4294967295)
|
|
2300
2300
|
t = "U", a = 8;
|
|
2301
2301
|
else
|
|
2302
|
-
throw new
|
|
2302
|
+
throw new se("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2303
2303
|
return "\\" + t + ae.repeat("0", a - n.length) + n;
|
|
2304
2304
|
}
|
|
2305
|
-
var Si = 1,
|
|
2305
|
+
var Si = 1, Ve = 2;
|
|
2306
2306
|
function xi(e) {
|
|
2307
|
-
this.schema = e.schema || Ct, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ae.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap =
|
|
2307
|
+
this.schema = e.schema || Ct, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ae.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = _i(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? Ve : Si, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
2308
2308
|
}
|
|
2309
2309
|
function Qt(e, n) {
|
|
2310
2310
|
for (var t = ae.repeat(" ", n), a = 0, r = -1, o = "", i, s = e.length; a < s; )
|
|
@@ -2325,13 +2325,13 @@ function Ti(e, n) {
|
|
|
2325
2325
|
return !1;
|
|
2326
2326
|
}
|
|
2327
2327
|
function Ye(e) {
|
|
2328
|
-
return e ===
|
|
2328
|
+
return e === li || e === ii;
|
|
2329
2329
|
}
|
|
2330
|
-
function
|
|
2331
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2330
|
+
function Re(e) {
|
|
2331
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== _t || 65536 <= e && e <= 1114111;
|
|
2332
2332
|
}
|
|
2333
2333
|
function Xt(e) {
|
|
2334
|
-
return
|
|
2334
|
+
return Re(e) && e !== _t && e !== si && e !== Pe;
|
|
2335
2335
|
}
|
|
2336
2336
|
function en(e, n, t) {
|
|
2337
2337
|
var a = Xt(e), r = a && !Ye(e);
|
|
@@ -2344,12 +2344,12 @@ function en(e, n, t) {
|
|
|
2344
2344
|
);
|
|
2345
2345
|
}
|
|
2346
2346
|
function $i(e) {
|
|
2347
|
-
return
|
|
2347
|
+
return Re(e) && e !== _t && !Ye(e) && e !== gi && e !== vi && e !== Je && e !== Qn && e !== Xn && e !== ea && e !== ta && e !== na && e !== ct && e !== pi && e !== mi && e !== ui && e !== Ci && e !== yi && e !== hi && e !== fi && e !== ci && e !== di && e !== bi && e !== ki;
|
|
2348
2348
|
}
|
|
2349
2349
|
function ji(e) {
|
|
2350
2350
|
return !Ye(e) && e !== Je;
|
|
2351
2351
|
}
|
|
2352
|
-
function
|
|
2352
|
+
function Ne(e, n) {
|
|
2353
2353
|
var t = e.charCodeAt(n), a;
|
|
2354
2354
|
return t >= 55296 && t <= 56319 && n + 1 < e.length && (a = e.charCodeAt(n + 1), a >= 56320 && a <= 57343) ? (t - 55296) * 1024 + a - 56320 + 65536 : t;
|
|
2355
2355
|
}
|
|
@@ -2358,38 +2358,38 @@ function aa(e) {
|
|
|
2358
2358
|
return n.test(e);
|
|
2359
2359
|
}
|
|
2360
2360
|
var ra = 1, pt = 2, oa = 3, ia = 4, je = 5;
|
|
2361
|
-
function
|
|
2362
|
-
var l, u = 0, d = null, c = !1,
|
|
2361
|
+
function Mi(e, n, t, a, r, o, i, s) {
|
|
2362
|
+
var l, u = 0, d = null, c = !1, h = !1, f = a !== -1, A = -1, k = $i(Ne(e, 0)) && ji(Ne(e, e.length - 1));
|
|
2363
2363
|
if (n || i)
|
|
2364
2364
|
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2365
|
-
if (u =
|
|
2365
|
+
if (u = Ne(e, l), !Re(u))
|
|
2366
2366
|
return je;
|
|
2367
2367
|
k = k && en(u, d, s), d = u;
|
|
2368
2368
|
}
|
|
2369
2369
|
else {
|
|
2370
2370
|
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2371
|
-
if (u =
|
|
2372
|
-
c = !0,
|
|
2371
|
+
if (u = Ne(e, l), u === Pe)
|
|
2372
|
+
c = !0, f && (h = h || // Foldable line = too long, and not more-indented.
|
|
2373
2373
|
l - A - 1 > a && e[A + 1] !== " ", A = l);
|
|
2374
|
-
else if (!
|
|
2374
|
+
else if (!Re(u))
|
|
2375
2375
|
return je;
|
|
2376
2376
|
k = k && en(u, d, s), d = u;
|
|
2377
2377
|
}
|
|
2378
|
-
|
|
2378
|
+
h = h || f && l - A - 1 > a && e[A + 1] !== " ";
|
|
2379
2379
|
}
|
|
2380
|
-
return !c && !
|
|
2380
|
+
return !c && !h ? k && !i && !r(e) ? ra : o === Ve ? je : pt : t > 9 && aa(e) ? je : i ? o === Ve ? je : pt : h ? ia : oa;
|
|
2381
2381
|
}
|
|
2382
|
-
function
|
|
2382
|
+
function Oi(e, n, t, a, r) {
|
|
2383
2383
|
e.dump = function() {
|
|
2384
2384
|
if (n.length === 0)
|
|
2385
|
-
return e.quotingType ===
|
|
2386
|
-
if (!e.noCompatMode && (wi.indexOf(n) !== -1 ||
|
|
2387
|
-
return e.quotingType ===
|
|
2385
|
+
return e.quotingType === Ve ? '""' : "''";
|
|
2386
|
+
if (!e.noCompatMode && (wi.indexOf(n) !== -1 || Ii.test(n)))
|
|
2387
|
+
return e.quotingType === Ve ? '"' + n + '"' : "'" + n + "'";
|
|
2388
2388
|
var o = e.indent * Math.max(1, t), i = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), s = a || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2389
2389
|
function l(u) {
|
|
2390
2390
|
return Ti(e, u);
|
|
2391
2391
|
}
|
|
2392
|
-
switch (
|
|
2392
|
+
switch (Mi(
|
|
2393
2393
|
n,
|
|
2394
2394
|
s,
|
|
2395
2395
|
e.indent,
|
|
@@ -2406,11 +2406,11 @@ function Ei(e, n, t, a, r) {
|
|
|
2406
2406
|
case oa:
|
|
2407
2407
|
return "|" + tn(n, e.indent) + nn(Qt(n, o));
|
|
2408
2408
|
case ia:
|
|
2409
|
-
return ">" + tn(n, e.indent) + nn(Qt(
|
|
2409
|
+
return ">" + tn(n, e.indent) + nn(Qt(Ei(n, i), o));
|
|
2410
2410
|
case je:
|
|
2411
2411
|
return '"' + Fi(n) + '"';
|
|
2412
2412
|
default:
|
|
2413
|
-
throw new
|
|
2413
|
+
throw new se("impossible error: invalid scalar style");
|
|
2414
2414
|
}
|
|
2415
2415
|
}();
|
|
2416
2416
|
}
|
|
@@ -2426,7 +2426,7 @@ function nn(e) {
|
|
|
2426
2426
|
return e[e.length - 1] === `
|
|
2427
2427
|
` ? e.slice(0, -1) : e;
|
|
2428
2428
|
}
|
|
2429
|
-
function
|
|
2429
|
+
function Ei(e, n) {
|
|
2430
2430
|
for (var t = /(\n+)([^\n]*)/g, a = function() {
|
|
2431
2431
|
var u = e.indexOf(`
|
|
2432
2432
|
`);
|
|
@@ -2451,10 +2451,10 @@ function an(e, n) {
|
|
|
2451
2451
|
}
|
|
2452
2452
|
function Fi(e) {
|
|
2453
2453
|
for (var n = "", t = 0, a, r = 0; r < e.length; t >= 65536 ? r += 2 : r++)
|
|
2454
|
-
t =
|
|
2454
|
+
t = Ne(e, r), a = ie[t], !a && Re(t) ? (n += e[r], t >= 65536 && (n += e[r + 1])) : n += a || Ai(t);
|
|
2455
2455
|
return n;
|
|
2456
2456
|
}
|
|
2457
|
-
function
|
|
2457
|
+
function Ki(e, n, t) {
|
|
2458
2458
|
var a = "", r = e.tag, o, i, s;
|
|
2459
2459
|
for (o = 0, i = t.length; o < i; o += 1)
|
|
2460
2460
|
s = t[o], e.replacer && (s = e.replacer.call(t, String(o), s)), (be(e, n, s, !1, !1) || typeof s > "u" && be(e, n, null, !1, !1)) && (a !== "" && (a += "," + (e.condenseFlow ? "" : " ")), a += e.dump);
|
|
@@ -2463,25 +2463,25 @@ function Ni(e, n, t) {
|
|
|
2463
2463
|
function rn(e, n, t, a) {
|
|
2464
2464
|
var r = "", o = e.tag, i, s, l;
|
|
2465
2465
|
for (i = 0, s = t.length; i < s; i += 1)
|
|
2466
|
-
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (be(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && be(e, n + 1, null, !0, !0, !1, !0)) && ((!a || r !== "") && (r += dt(e, n)), e.dump &&
|
|
2466
|
+
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (be(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && be(e, n + 1, null, !0, !0, !1, !0)) && ((!a || r !== "") && (r += dt(e, n)), e.dump && Pe === e.dump.charCodeAt(0) ? r += "-" : r += "- ", r += e.dump);
|
|
2467
2467
|
e.tag = o, e.dump = r || "[]";
|
|
2468
2468
|
}
|
|
2469
|
-
function
|
|
2469
|
+
function Ni(e, n, t) {
|
|
2470
2470
|
var a = "", r = e.tag, o = Object.keys(t), i, s, l, u, d;
|
|
2471
2471
|
for (i = 0, s = o.length; i < s; i += 1)
|
|
2472
2472
|
d = "", a !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = o[i], u = t[l], e.replacer && (u = e.replacer.call(t, l, u)), be(e, n, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), be(e, n, u, !1, !1) && (d += e.dump, a += d));
|
|
2473
2473
|
e.tag = r, e.dump = "{" + a + "}";
|
|
2474
2474
|
}
|
|
2475
2475
|
function Bi(e, n, t, a) {
|
|
2476
|
-
var r = "", o = e.tag, i = Object.keys(t), s, l, u, d, c,
|
|
2476
|
+
var r = "", o = e.tag, i = Object.keys(t), s, l, u, d, c, h;
|
|
2477
2477
|
if (e.sortKeys === !0)
|
|
2478
2478
|
i.sort();
|
|
2479
2479
|
else if (typeof e.sortKeys == "function")
|
|
2480
2480
|
i.sort(e.sortKeys);
|
|
2481
2481
|
else if (e.sortKeys)
|
|
2482
|
-
throw new
|
|
2482
|
+
throw new se("sortKeys must be a boolean or a function");
|
|
2483
2483
|
for (s = 0, l = i.length; s < l; s += 1)
|
|
2484
|
-
|
|
2484
|
+
h = "", (!a || r !== "") && (h += dt(e, n)), u = i[s], d = t[u], e.replacer && (d = e.replacer.call(t, u, d)), be(e, n + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Pe === e.dump.charCodeAt(0) ? h += "?" : h += "? "), h += e.dump, c && (h += dt(e, n)), be(e, n + 1, d, !0, c) && (e.dump && Pe === e.dump.charCodeAt(0) ? h += ":" : h += ": ", h += e.dump, r += h));
|
|
2485
2485
|
e.tag = o, e.dump = r || "{}";
|
|
2486
2486
|
}
|
|
2487
2487
|
function on(e, n, t) {
|
|
@@ -2494,7 +2494,7 @@ function on(e, n, t) {
|
|
|
2494
2494
|
else if (Zn.call(s.represent, l))
|
|
2495
2495
|
a = s.represent[l](n, l);
|
|
2496
2496
|
else
|
|
2497
|
-
throw new
|
|
2497
|
+
throw new se("!<" + s.tag + '> tag resolver accepts not "' + l + '" style');
|
|
2498
2498
|
e.dump = a;
|
|
2499
2499
|
}
|
|
2500
2500
|
return !0;
|
|
@@ -2505,20 +2505,20 @@ function be(e, n, t, a, r, o, i) {
|
|
|
2505
2505
|
e.tag = null, e.dump = t, on(e, t, !1) || on(e, t, !0);
|
|
2506
2506
|
var s = Wn.call(e.dump), l = a, u;
|
|
2507
2507
|
a && (a = e.flowLevel < 0 || e.flowLevel > n);
|
|
2508
|
-
var d = s === "[object Object]" || s === "[object Array]", c,
|
|
2509
|
-
if (d && (c = e.duplicates.indexOf(t),
|
|
2508
|
+
var d = s === "[object Object]" || s === "[object Array]", c, h;
|
|
2509
|
+
if (d && (c = e.duplicates.indexOf(t), h = c !== -1), (e.tag !== null && e.tag !== "?" || h || e.indent !== 2 && n > 0) && (r = !1), h && e.usedDuplicates[c])
|
|
2510
2510
|
e.dump = "*ref_" + c;
|
|
2511
2511
|
else {
|
|
2512
|
-
if (d &&
|
|
2513
|
-
a && Object.keys(e.dump).length !== 0 ? (Bi(e, n, e.dump, r),
|
|
2512
|
+
if (d && h && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), s === "[object Object]")
|
|
2513
|
+
a && Object.keys(e.dump).length !== 0 ? (Bi(e, n, e.dump, r), h && (e.dump = "&ref_" + c + e.dump)) : (Ni(e, n, e.dump), h && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2514
2514
|
else if (s === "[object Array]")
|
|
2515
|
-
a && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? rn(e, n - 1, e.dump, r) : rn(e, n, e.dump, r),
|
|
2515
|
+
a && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? rn(e, n - 1, e.dump, r) : rn(e, n, e.dump, r), h && (e.dump = "&ref_" + c + e.dump)) : (Ki(e, n, e.dump), h && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2516
2516
|
else if (s === "[object String]")
|
|
2517
|
-
e.tag !== "?" &&
|
|
2517
|
+
e.tag !== "?" && Oi(e, e.dump, n, o, l);
|
|
2518
2518
|
else {
|
|
2519
2519
|
if (s === "[object Undefined]" || e.skipInvalid)
|
|
2520
2520
|
return !1;
|
|
2521
|
-
throw new
|
|
2521
|
+
throw new se("unacceptable kind of an object to dump " + s);
|
|
2522
2522
|
}
|
|
2523
2523
|
e.tag !== null && e.tag !== "?" && (u = encodeURI(
|
|
2524
2524
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
@@ -2552,30 +2552,30 @@ function Li(e, n) {
|
|
|
2552
2552
|
return t.replacer && (a = t.replacer.call({ "": a }, "", a)), be(t, 0, a, !0, !0) ? t.dump + `
|
|
2553
2553
|
` : "";
|
|
2554
2554
|
}
|
|
2555
|
-
var
|
|
2556
|
-
dump:
|
|
2555
|
+
var Pi = Li, Vi = {
|
|
2556
|
+
dump: Pi
|
|
2557
2557
|
};
|
|
2558
2558
|
function At(e, n) {
|
|
2559
2559
|
return function() {
|
|
2560
2560
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2561
2561
|
};
|
|
2562
2562
|
}
|
|
2563
|
-
var
|
|
2563
|
+
var Ri = oe, Ui = wn, Di = Sn, Gi = Mn, Hi = On, zi = Ct, Ji = Yn.load, Yi = Yn.loadAll, Wi = Vi.dump, Zi = se, Qi = {
|
|
2564
2564
|
binary: Bn,
|
|
2565
2565
|
float: jn,
|
|
2566
2566
|
map: An,
|
|
2567
2567
|
null: xn,
|
|
2568
2568
|
pairs: Ln,
|
|
2569
|
-
set:
|
|
2570
|
-
timestamp:
|
|
2569
|
+
set: Pn,
|
|
2570
|
+
timestamp: Kn,
|
|
2571
2571
|
bool: Tn,
|
|
2572
2572
|
int: $n,
|
|
2573
|
-
merge:
|
|
2573
|
+
merge: Nn,
|
|
2574
2574
|
omap: qn,
|
|
2575
|
-
seq:
|
|
2576
|
-
str:
|
|
2577
|
-
}, Xi = At("safeLoad", "load"),
|
|
2578
|
-
Type:
|
|
2575
|
+
seq: _n,
|
|
2576
|
+
str: In
|
|
2577
|
+
}, Xi = At("safeLoad", "load"), es = At("safeLoadAll", "loadAll"), ts = At("safeDump", "dump"), ns = {
|
|
2578
|
+
Type: Ri,
|
|
2579
2579
|
Schema: Ui,
|
|
2580
2580
|
FAILSAFE_SCHEMA: Di,
|
|
2581
2581
|
JSON_SCHEMA: Gi,
|
|
@@ -2587,25 +2587,22 @@ var Vi = oe, Ui = wn, Di = Sn, Gi = On, Hi = En, zi = Ct, Ji = Yn.load, Yi = Yn.
|
|
|
2587
2587
|
YAMLException: Zi,
|
|
2588
2588
|
types: Qi,
|
|
2589
2589
|
safeLoad: Xi,
|
|
2590
|
-
safeLoadAll:
|
|
2591
|
-
safeDump:
|
|
2590
|
+
safeLoadAll: es,
|
|
2591
|
+
safeDump: ts
|
|
2592
2592
|
};
|
|
2593
|
-
const
|
|
2593
|
+
const as = {
|
|
2594
2594
|
key: 0,
|
|
2595
2595
|
class: "config-card-display-form"
|
|
2596
|
-
},
|
|
2596
|
+
}, rs = ["data-testid"], os = {
|
|
2597
2597
|
key: 0,
|
|
2598
2598
|
class: "config-card-prop-section-title"
|
|
2599
|
-
},
|
|
2599
|
+
}, is = {
|
|
2600
2600
|
key: 1,
|
|
2601
2601
|
class: "config-card-display-json"
|
|
2602
|
-
},
|
|
2603
|
-
key: 0,
|
|
2604
|
-
class: "config-card-display-json-endpoint"
|
|
2605
|
-
}, sl = {
|
|
2602
|
+
}, ss = {
|
|
2606
2603
|
key: 2,
|
|
2607
2604
|
class: "config-card-display-yaml"
|
|
2608
|
-
},
|
|
2605
|
+
}, ls = /* @__PURE__ */ te({
|
|
2609
2606
|
__name: "ConfigCardDisplay",
|
|
2610
2607
|
props: {
|
|
2611
2608
|
propertyCollections: {
|
|
@@ -2628,80 +2625,60 @@ const al = {
|
|
|
2628
2625
|
type: Object,
|
|
2629
2626
|
required: !1,
|
|
2630
2627
|
default: () => null
|
|
2631
|
-
},
|
|
2632
|
-
fetchUrl: {
|
|
2633
|
-
type: String,
|
|
2634
|
-
required: !0
|
|
2635
2628
|
}
|
|
2636
2629
|
},
|
|
2637
2630
|
setup(e) {
|
|
2638
|
-
const n = e, t = We(), { i18n: { t: a } } = re.useI18n(), r = (
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
});
|
|
2644
|
-
return he(() => n.format, (l) => {
|
|
2645
|
-
if (l !== "structured") {
|
|
2646
|
-
const u = JSON.parse(JSON.stringify(n.record));
|
|
2647
|
-
delete u.created_at, delete u.updated_at, l === "json" ? o.value = JSON.stringify(u, null, 2) : l === "yaml" && (i.value = nl.dump(u));
|
|
2631
|
+
const n = e, t = We(), { i18n: { t: a } } = re.useI18n(), r = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), o = O(""), i = O("");
|
|
2632
|
+
return he(() => n.format, (s) => {
|
|
2633
|
+
if (s !== "structured") {
|
|
2634
|
+
const l = JSON.parse(JSON.stringify(n.record));
|
|
2635
|
+
delete l.created_at, delete l.updated_at, s === "json" ? o.value = JSON.stringify(l, null, 2) : s === "yaml" && (i.value = ns.dump(l));
|
|
2648
2636
|
}
|
|
2649
|
-
}, { immediate: !0 }), (
|
|
2650
|
-
const
|
|
2637
|
+
}, { immediate: !0 }), (s, l) => {
|
|
2638
|
+
const u = P("KCodeBlock");
|
|
2651
2639
|
return m(), T(fe, null, [
|
|
2652
|
-
e.format === "structured" ? (m(), T("div",
|
|
2653
|
-
(m(!0), T(fe, null, de(e.propListTypes, (
|
|
2654
|
-
key: `config-card-details-${
|
|
2655
|
-
class:
|
|
2656
|
-
"data-testid": `config-card-details-${
|
|
2640
|
+
e.format === "structured" ? (m(), T("div", as, [
|
|
2641
|
+
(m(!0), T(fe, null, de(e.propListTypes, (d) => (m(), T("div", {
|
|
2642
|
+
key: `config-card-details-${d}-props`,
|
|
2643
|
+
class: Ae(`config-card-details-${d}-props`),
|
|
2644
|
+
"data-testid": `config-card-details-${d}-props`
|
|
2657
2645
|
}, [
|
|
2658
|
-
|
|
2659
|
-
(m(!0), T(fe, null, de(e.propertyCollections[
|
|
2660
|
-
key:
|
|
2661
|
-
item:
|
|
2646
|
+
d !== "basic" ? (m(), T("div", os, j(d === "advanced" ? g(a)("baseConfigCard.sections.advanced") : g(a)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
2647
|
+
(m(!0), T(fe, null, de(e.propertyCollections[d], (c) => (m(), R(bt, {
|
|
2648
|
+
key: c.key,
|
|
2649
|
+
item: c
|
|
2662
2650
|
}, ke({
|
|
2663
|
-
label:
|
|
2664
|
-
Y(
|
|
2651
|
+
label: y(() => [
|
|
2652
|
+
Y(s.$slots, `${c.key}-label`, { row: c }, void 0, !0)
|
|
2665
2653
|
]),
|
|
2666
|
-
[
|
|
2667
|
-
Y(
|
|
2668
|
-
row:
|
|
2669
|
-
rowValue:
|
|
2654
|
+
[c.key]: y(({ rowValue: h }) => [
|
|
2655
|
+
Y(s.$slots, c.key, {
|
|
2656
|
+
row: c,
|
|
2657
|
+
rowValue: h
|
|
2670
2658
|
}, void 0, !0)
|
|
2671
2659
|
]),
|
|
2672
2660
|
_: 2
|
|
2673
2661
|
}, [
|
|
2674
|
-
r(
|
|
2662
|
+
r(c) ? {
|
|
2675
2663
|
name: "label-tooltip",
|
|
2676
|
-
fn:
|
|
2677
|
-
Y(
|
|
2664
|
+
fn: y(() => [
|
|
2665
|
+
Y(s.$slots, `${c.key}-label-tooltip`, { row: c }, void 0, !0)
|
|
2678
2666
|
]),
|
|
2679
2667
|
key: "0"
|
|
2680
2668
|
} : void 0
|
|
2681
2669
|
]), 1032, ["item"]))), 128))
|
|
2682
|
-
], 10,
|
|
2670
|
+
], 10, rs))), 128))
|
|
2683
2671
|
])) : G("", !0),
|
|
2684
|
-
e.format === "json" ? (m(), T("div",
|
|
2685
|
-
|
|
2686
|
-
E(d, { method: "get" }),
|
|
2687
|
-
E(c, {
|
|
2688
|
-
id: "config-card-endpoint-codeblock",
|
|
2689
|
-
code: s.value,
|
|
2690
|
-
"is-single-line": "",
|
|
2691
|
-
language: "json",
|
|
2692
|
-
theme: "dark"
|
|
2693
|
-
}, null, 8, ["code"])
|
|
2694
|
-
])) : G("", !0),
|
|
2695
|
-
E(c, {
|
|
2672
|
+
e.format === "json" ? (m(), T("div", is, [
|
|
2673
|
+
F(u, {
|
|
2696
2674
|
id: "config-card-codeblock",
|
|
2697
|
-
class: we({ "config-card-display-json-content": s.value }),
|
|
2698
2675
|
code: o.value,
|
|
2699
2676
|
language: "json",
|
|
2700
2677
|
theme: "dark"
|
|
2701
|
-
}, null, 8, ["
|
|
2678
|
+
}, null, 8, ["code"])
|
|
2702
2679
|
])) : G("", !0),
|
|
2703
|
-
e.format === "yaml" ? (m(), T("div",
|
|
2704
|
-
|
|
2680
|
+
e.format === "yaml" ? (m(), T("div", ss, [
|
|
2681
|
+
F(u, {
|
|
2705
2682
|
id: "config-card-codeblock",
|
|
2706
2683
|
code: i.value,
|
|
2707
2684
|
language: "yaml",
|
|
@@ -2711,18 +2688,18 @@ const al = {
|
|
|
2711
2688
|
], 64);
|
|
2712
2689
|
};
|
|
2713
2690
|
}
|
|
2714
|
-
}),
|
|
2691
|
+
}), us = /* @__PURE__ */ me(ls, [["__scopeId", "data-v-c914c7e4"]]), sn = "24px", cs = (e, n) => {
|
|
2715
2692
|
const t = e.__vccOpts || e;
|
|
2716
2693
|
for (const [a, r] of n)
|
|
2717
2694
|
t[a] = r;
|
|
2718
2695
|
return t;
|
|
2719
|
-
},
|
|
2696
|
+
}, ds = (e) => (cn("data-v-a53b73fd"), e = e(), dn(), e), ps = ["aria-hidden"], fs = {
|
|
2720
2697
|
key: 0,
|
|
2721
2698
|
"data-testid": "kui-icon-svg-title"
|
|
2722
|
-
},
|
|
2699
|
+
}, ms = /* @__PURE__ */ ds(() => /* @__PURE__ */ K("path", {
|
|
2723
2700
|
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",
|
|
2724
2701
|
fill: "currentColor"
|
|
2725
|
-
}, null, -1)),
|
|
2702
|
+
}, null, -1)), gs = /* @__PURE__ */ te({
|
|
2726
2703
|
__name: "BookIcon",
|
|
2727
2704
|
props: {
|
|
2728
2705
|
/** The accessibility text provided to screen readers */
|
|
@@ -2753,7 +2730,7 @@ const al = {
|
|
|
2753
2730
|
size: {
|
|
2754
2731
|
type: [Number, String],
|
|
2755
2732
|
required: !1,
|
|
2756
|
-
default:
|
|
2733
|
+
default: sn,
|
|
2757
2734
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2758
2735
|
validator: (e) => {
|
|
2759
2736
|
if (typeof e == "number" && e > 0)
|
|
@@ -2782,7 +2759,7 @@ const al = {
|
|
|
2782
2759
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
2783
2760
|
return `${o}px`;
|
|
2784
2761
|
}
|
|
2785
|
-
return
|
|
2762
|
+
return sn;
|
|
2786
2763
|
}), a = $(() => ({
|
|
2787
2764
|
boxSizing: "border-box",
|
|
2788
2765
|
color: n.color,
|
|
@@ -2791,13 +2768,13 @@ const al = {
|
|
|
2791
2768
|
lineHeight: "0",
|
|
2792
2769
|
width: t.value
|
|
2793
2770
|
}));
|
|
2794
|
-
return (r, o) => (m(),
|
|
2771
|
+
return (r, o) => (m(), R(Ee(e.as), {
|
|
2795
2772
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2796
2773
|
class: "kui-icon book-icon",
|
|
2797
2774
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2798
2775
|
style: un(a.value)
|
|
2799
2776
|
}, {
|
|
2800
|
-
default:
|
|
2777
|
+
default: y(() => [
|
|
2801
2778
|
(m(), T("svg", {
|
|
2802
2779
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2803
2780
|
"data-testid": "kui-icon-svg-book-icon",
|
|
@@ -2808,23 +2785,23 @@ const al = {
|
|
|
2808
2785
|
width: "100%",
|
|
2809
2786
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2810
2787
|
}, [
|
|
2811
|
-
e.title ? (m(), T("title",
|
|
2812
|
-
|
|
2813
|
-
], 8,
|
|
2788
|
+
e.title ? (m(), T("title", fs, j(e.title), 1)) : G("", !0),
|
|
2789
|
+
ms
|
|
2790
|
+
], 8, ps))
|
|
2814
2791
|
]),
|
|
2815
2792
|
_: 1
|
|
2816
2793
|
}, 8, ["aria-hidden", "style"]));
|
|
2817
2794
|
}
|
|
2818
|
-
}),
|
|
2795
|
+
}), ys = /* @__PURE__ */ cs(gs, [["__scopeId", "data-v-a53b73fd"]]), hs = { "data-testid": "config-card-title" }, vs = { class: "config-card-actions" }, bs = ["href"], ks = {
|
|
2819
2796
|
key: 2,
|
|
2820
2797
|
class: "config-card-details-section"
|
|
2821
|
-
},
|
|
2798
|
+
}, Cs = {
|
|
2822
2799
|
key: 3,
|
|
2823
2800
|
class: "config-card-details-section"
|
|
2824
|
-
},
|
|
2801
|
+
}, ws = ["data-testid"], Is = {
|
|
2825
2802
|
key: 0,
|
|
2826
2803
|
class: "config-card-prop-section-title"
|
|
2827
|
-
},
|
|
2804
|
+
}, _s = /* @__PURE__ */ te({
|
|
2828
2805
|
__name: "EntityBaseConfigCard",
|
|
2829
2806
|
props: {
|
|
2830
2807
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2915,9 +2892,9 @@ const al = {
|
|
|
2915
2892
|
label: "YAML",
|
|
2916
2893
|
value: "yaml"
|
|
2917
2894
|
}
|
|
2918
|
-
], d =
|
|
2895
|
+
], d = O("structured"), c = (b) => {
|
|
2919
2896
|
d.value = b == null ? void 0 : b.value;
|
|
2920
|
-
},
|
|
2897
|
+
}, h = {
|
|
2921
2898
|
id: {
|
|
2922
2899
|
type: X.ID,
|
|
2923
2900
|
label: o("baseConfigCard.commonFields.id_label"),
|
|
@@ -2951,46 +2928,46 @@ const al = {
|
|
|
2951
2928
|
// the last property displayed
|
|
2952
2929
|
section: ce.Basic
|
|
2953
2930
|
}
|
|
2954
|
-
},
|
|
2955
|
-
var b, C,
|
|
2956
|
-
if (!
|
|
2931
|
+
}, f = O(!1), A = O(!1), k = O(""), p = O(), S = $(() => {
|
|
2932
|
+
var b, C, V;
|
|
2933
|
+
if (!p.value)
|
|
2957
2934
|
return [];
|
|
2958
|
-
const B = [],
|
|
2959
|
-
for (const
|
|
2960
|
-
const L = (C = (b = a.configSchema) == null ? void 0 : b[
|
|
2961
|
-
let Z =
|
|
2962
|
-
(D || D === 0) && (Z = D === -1 ?
|
|
2935
|
+
const B = [], I = Object.keys(p.value).length;
|
|
2936
|
+
for (const E in p.value) {
|
|
2937
|
+
const L = (C = (b = a.configSchema) == null ? void 0 : b[E]) == null ? void 0 : C.order, D = (V = h[E]) == null ? void 0 : V.order;
|
|
2938
|
+
let Z = I;
|
|
2939
|
+
(D || D === 0) && (Z = D === -1 ? I + 1 : D), L && (Z = L === -1 ? I + 1 : L), B.push([E, Z]);
|
|
2963
2940
|
}
|
|
2964
|
-
return B.sort(function(
|
|
2965
|
-
return
|
|
2966
|
-
}), B.map((
|
|
2941
|
+
return B.sort(function(E, L) {
|
|
2942
|
+
return E[1] - L[1];
|
|
2943
|
+
}), B.map((E) => {
|
|
2967
2944
|
var L, D;
|
|
2968
|
-
const Z =
|
|
2945
|
+
const Z = E[0], z = (L = p.value) == null ? void 0 : L[Z], Q = ((D = a.configSchema) == null ? void 0 : D[Z]) || {}, le = h[Z];
|
|
2969
2946
|
return {
|
|
2970
2947
|
key: Z,
|
|
2971
2948
|
value: z,
|
|
2972
2949
|
hidden: Q.hidden || !1,
|
|
2973
|
-
type: Q.type ?? ((
|
|
2974
|
-
label: Q.label ?? ((
|
|
2975
|
-
tooltip: Q.tooltip ?? ((
|
|
2976
|
-
section: Q.section ?? ((
|
|
2950
|
+
type: Q.type ?? ((le == null ? void 0 : le.type) || X.Text),
|
|
2951
|
+
label: Q.label ?? ((le == null ? void 0 : le.label) || s(Z)),
|
|
2952
|
+
tooltip: Q.tooltip ?? ((le == null ? void 0 : le.tooltip) || void 0),
|
|
2953
|
+
section: Q.section ?? ((le == null ? void 0 : le.section) || ce.Advanced)
|
|
2977
2954
|
};
|
|
2978
|
-
}).filter((
|
|
2955
|
+
}).filter((E) => !E.hidden && E.key !== a.pluginConfigKey);
|
|
2979
2956
|
}), v = $(() => {
|
|
2980
2957
|
var b, C;
|
|
2981
|
-
if (!
|
|
2958
|
+
if (!p.value || !a.pluginConfigKey)
|
|
2982
2959
|
return [];
|
|
2983
|
-
const
|
|
2984
|
-
for (const
|
|
2985
|
-
const L = (C = (b = a.pluginConfigSchema) == null ? void 0 : b[
|
|
2960
|
+
const V = p.value[a.pluginConfigKey] || {}, B = Object.keys(V).length, I = [];
|
|
2961
|
+
for (const E in V) {
|
|
2962
|
+
const L = (C = (b = a.pluginConfigSchema) == null ? void 0 : b[E]) == null ? void 0 : C.order, D = V[E];
|
|
2986
2963
|
let Z = D != null && D !== "" ? B - 1 : B;
|
|
2987
|
-
L && (Z = L === -1 ? B + 1 : L),
|
|
2964
|
+
L && (Z = L === -1 ? B + 1 : L), I.push([E, Z]);
|
|
2988
2965
|
}
|
|
2989
|
-
return
|
|
2990
|
-
return
|
|
2991
|
-
}),
|
|
2966
|
+
return I.sort(function(E, L) {
|
|
2967
|
+
return E[1] - L[1];
|
|
2968
|
+
}), I.map((E) => {
|
|
2992
2969
|
var L;
|
|
2993
|
-
const D =
|
|
2970
|
+
const D = E[0], Z = V[D], z = ((L = a.pluginConfigSchema) == null ? void 0 : L[D]) || {};
|
|
2994
2971
|
return {
|
|
2995
2972
|
key: D,
|
|
2996
2973
|
value: Z,
|
|
@@ -3000,96 +2977,96 @@ const al = {
|
|
|
3000
2977
|
tooltip: z.tooltip ?? void 0,
|
|
3001
2978
|
section: ce.Plugin
|
|
3002
2979
|
};
|
|
3003
|
-
}).filter((
|
|
2980
|
+
}).filter((E) => !E.hidden);
|
|
3004
2981
|
}), q = $(() => {
|
|
3005
|
-
var b, C,
|
|
2982
|
+
var b, C, V, B;
|
|
3006
2983
|
return {
|
|
3007
|
-
basic: (b = S.value) == null ? void 0 : b.filter((
|
|
3008
|
-
advanced: (C = S.value) == null ? void 0 : C.filter((
|
|
3009
|
-
plugin: (B = v.value) == null ? void 0 : B.concat((
|
|
2984
|
+
basic: (b = S.value) == null ? void 0 : b.filter((I) => I.section === ce.Basic),
|
|
2985
|
+
advanced: (C = S.value) == null ? void 0 : C.filter((I) => I.section === ce.Advanced),
|
|
2986
|
+
plugin: (B = v.value) == null ? void 0 : B.concat((V = S.value) == null ? void 0 : V.filter((I) => I.section === ce.Plugin))
|
|
3010
2987
|
};
|
|
3011
|
-
}),
|
|
2988
|
+
}), _ = $(() => {
|
|
3012
2989
|
const b = [];
|
|
3013
2990
|
return q.value.basic.length && b.push("basic"), q.value.advanced.length && b.push("advanced"), q.value.plugin.length && b.push("plugin"), b;
|
|
3014
|
-
}), w = (b) => !!(b.tooltip || r[`${b.key}-label-tooltip`]),
|
|
2991
|
+
}), w = (b) => !!(b.tooltip || r[`${b.key}-label-tooltip`]), N = $(() => {
|
|
3015
2992
|
var b, C;
|
|
3016
|
-
let
|
|
3017
|
-
return a.config.app === "konnect" ?
|
|
2993
|
+
let V = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
2994
|
+
return a.config.app === "konnect" ? V = V.replace(/{controlPlaneId}/gi, ((b = a.config) == null ? void 0 : b.controlPlaneId) || "") : a.config.app === "kongManager" && (V = V.replace(/\/{workspace}/gi, (C = a.config) != null && C.workspace ? `/${a.config.workspace}` : "")), V = V.replace(/{id}/gi, a.config.entityId), V;
|
|
3018
2995
|
}), U = (b) => {
|
|
3019
|
-
|
|
2996
|
+
p.value && b(JSON.stringify(p.value)) ? n("copy:success", p.value) : n("copy:error");
|
|
3020
2997
|
};
|
|
3021
|
-
return he(
|
|
2998
|
+
return he(f, (b) => {
|
|
3022
2999
|
n("loading", b);
|
|
3023
3000
|
}, { immediate: !0 }), mt(async () => {
|
|
3024
|
-
A.value = !1,
|
|
3001
|
+
A.value = !1, f.value = !0;
|
|
3025
3002
|
try {
|
|
3026
|
-
const { data: b } = await l.get(
|
|
3003
|
+
const { data: b } = await l.get(N.value);
|
|
3027
3004
|
if (a.dataKey)
|
|
3028
3005
|
if (typeof b[a.dataKey] < "u")
|
|
3029
|
-
|
|
3006
|
+
p.value = { ...b[a.dataKey] };
|
|
3030
3007
|
else
|
|
3031
3008
|
throw new Error(o("errors.dataKeyUndefined", { dataKey: a.dataKey }));
|
|
3032
3009
|
else
|
|
3033
|
-
|
|
3010
|
+
p.value = { ...b };
|
|
3034
3011
|
Object.keys(a.configSchema).filter((C) => a.configSchema[C].forceShow).forEach((C) => {
|
|
3035
|
-
|
|
3012
|
+
p.value && typeof p.value[C] > "u" && (p.value[C] = null);
|
|
3036
3013
|
}), n("fetch:success", b);
|
|
3037
3014
|
} catch (b) {
|
|
3038
3015
|
const C = i(b);
|
|
3039
3016
|
k.value = C.startsWith("code") ? o("baseConfigCard.errors.load") : C, A.value = !0, n("fetch:error", b);
|
|
3040
3017
|
} finally {
|
|
3041
|
-
|
|
3018
|
+
f.value = !1;
|
|
3042
3019
|
}
|
|
3043
3020
|
}), (b, C) => {
|
|
3044
|
-
const
|
|
3045
|
-
return m(),
|
|
3046
|
-
actions:
|
|
3047
|
-
|
|
3021
|
+
const V = P("KLabel"), B = P("KSelect"), I = P("KButton"), E = P("KClipboardProvider"), L = P("KSkeleton"), D = P("KEmptyState"), Z = P("KCard");
|
|
3022
|
+
return m(), R(Z, { class: "kong-ui-entity-base-config-card" }, ke({
|
|
3023
|
+
actions: y(() => [
|
|
3024
|
+
K("div", vs, [
|
|
3048
3025
|
Y(b.$slots, "actions", {}, void 0, !0),
|
|
3049
|
-
e.config.jsonYamlEnabled ? (m(), V
|
|
3026
|
+
e.config.jsonYamlEnabled ? (m(), R(V, {
|
|
3050
3027
|
key: 0,
|
|
3051
3028
|
class: "config-format-select-label",
|
|
3052
3029
|
"data-testid": "config-format-select-label"
|
|
3053
3030
|
}, {
|
|
3054
|
-
default:
|
|
3031
|
+
default: y(() => [
|
|
3055
3032
|
W(j(e.label), 1)
|
|
3056
3033
|
]),
|
|
3057
3034
|
_: 1
|
|
3058
3035
|
})) : G("", !0),
|
|
3059
|
-
e.config.jsonYamlEnabled ? (m(),
|
|
3036
|
+
e.config.jsonYamlEnabled ? (m(), R(B, {
|
|
3060
3037
|
key: 1,
|
|
3061
3038
|
appearance: "select",
|
|
3062
3039
|
"data-testid": "select-config-format",
|
|
3063
3040
|
items: u,
|
|
3064
3041
|
onChange: c
|
|
3065
3042
|
})) : G("", !0),
|
|
3066
|
-
a.config.jsonYamlEnabled && e.configCardDoc ? (m(),
|
|
3043
|
+
a.config.jsonYamlEnabled && e.configCardDoc ? (m(), R(I, {
|
|
3067
3044
|
key: 2,
|
|
3068
3045
|
appearance: "tertiary",
|
|
3069
3046
|
class: "book-icon",
|
|
3070
3047
|
"data-testid": "book-icon"
|
|
3071
3048
|
}, {
|
|
3072
|
-
default:
|
|
3073
|
-
|
|
3049
|
+
default: y(() => [
|
|
3050
|
+
K("a", {
|
|
3074
3051
|
href: e.configCardDoc,
|
|
3075
3052
|
rel: "noopener",
|
|
3076
3053
|
target: "_blank"
|
|
3077
3054
|
}, [
|
|
3078
|
-
|
|
3079
|
-
], 8,
|
|
3055
|
+
F(g(ys), { size: g(Ir) }, null, 8, ["size"])
|
|
3056
|
+
], 8, bs)
|
|
3080
3057
|
]),
|
|
3081
3058
|
_: 1
|
|
3082
3059
|
})) : G("", !0),
|
|
3083
|
-
e.config.jsonYamlEnabled ? G("", !0) : (m(),
|
|
3084
|
-
default:
|
|
3085
|
-
!
|
|
3060
|
+
e.config.jsonYamlEnabled ? G("", !0) : (m(), R(E, { key: 3 }, {
|
|
3061
|
+
default: y(({ copyToClipboard: z }) => [
|
|
3062
|
+
!f.value && !A.value ? (m(), R(I, {
|
|
3086
3063
|
key: 0,
|
|
3087
3064
|
appearance: "tertiary",
|
|
3088
3065
|
"data-testid": "json-copy-button",
|
|
3089
3066
|
onClick: (Q) => U(z)
|
|
3090
3067
|
}, {
|
|
3091
|
-
default:
|
|
3092
|
-
W(j(
|
|
3068
|
+
default: y(() => [
|
|
3069
|
+
W(j(g(o)("baseConfigCard.actions.copy")), 1)
|
|
3093
3070
|
]),
|
|
3094
3071
|
_: 2
|
|
3095
3072
|
}, 1032, ["onClick"])) : G("", !0)
|
|
@@ -3098,81 +3075,80 @@ const al = {
|
|
|
3098
3075
|
}))
|
|
3099
3076
|
])
|
|
3100
3077
|
]),
|
|
3101
|
-
default:
|
|
3102
|
-
|
|
3078
|
+
default: y(() => [
|
|
3079
|
+
f.value ? (m(), R(L, {
|
|
3103
3080
|
key: 0,
|
|
3104
3081
|
"data-testid": "config-card-loader",
|
|
3105
3082
|
"table-columns": 2,
|
|
3106
3083
|
type: "table"
|
|
3107
|
-
})) : A.value ? (m(),
|
|
3084
|
+
})) : A.value ? (m(), R(D, {
|
|
3108
3085
|
key: 1,
|
|
3109
3086
|
"data-testid": "config-card-fetch-error",
|
|
3110
3087
|
"is-error": ""
|
|
3111
3088
|
}, {
|
|
3112
|
-
message:
|
|
3113
|
-
|
|
3089
|
+
message: y(() => [
|
|
3090
|
+
K("h3", null, j(k.value), 1)
|
|
3114
3091
|
]),
|
|
3115
3092
|
_: 1
|
|
3116
3093
|
})) : G("", !0),
|
|
3117
|
-
e.config.jsonYamlEnabled ? (m(), T("div",
|
|
3118
|
-
|
|
3119
|
-
"fetch-url": a.fetchUrl,
|
|
3094
|
+
e.config.jsonYamlEnabled ? (m(), T("div", ks, [
|
|
3095
|
+
F(us, {
|
|
3120
3096
|
format: d.value,
|
|
3121
|
-
"prop-list-types":
|
|
3097
|
+
"prop-list-types": _.value,
|
|
3122
3098
|
"property-collections": q.value,
|
|
3123
|
-
record:
|
|
3099
|
+
record: p.value
|
|
3124
3100
|
}, ke({ _: 2 }, [
|
|
3125
3101
|
de(Object.keys(b.$slots), (z) => ({
|
|
3126
3102
|
name: z,
|
|
3127
|
-
fn:
|
|
3103
|
+
fn: y(({ row: Q, rowValue: le }) => [
|
|
3128
3104
|
Y(b.$slots, z, {
|
|
3129
3105
|
row: Q,
|
|
3130
|
-
rowValue:
|
|
3106
|
+
rowValue: le
|
|
3131
3107
|
}, void 0, !0)
|
|
3132
3108
|
])
|
|
3133
3109
|
}))
|
|
3134
|
-
]), 1032, ["
|
|
3135
|
-
])) : (m(), T("div",
|
|
3136
|
-
(m(!0), T(fe, null, de(
|
|
3110
|
+
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
3111
|
+
])) : (m(), T("div", Cs, [
|
|
3112
|
+
(m(!0), T(fe, null, de(_.value, (z) => (m(), T("div", {
|
|
3137
3113
|
key: `config-card-details-${z}-props`,
|
|
3138
|
-
class:
|
|
3114
|
+
class: Ae(`config-card-details-${z}-props`),
|
|
3139
3115
|
"data-testid": `config-card-details-${z}-props`
|
|
3140
3116
|
}, [
|
|
3141
|
-
z !== "basic" ? (m(), T("div",
|
|
3142
|
-
(m(!0), T(fe, null, de(q.value[z], (Q) => (m(),
|
|
3117
|
+
z !== "basic" ? (m(), T("div", Is, j(z === "advanced" ? g(o)("baseConfigCard.sections.advanced") : g(o)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
3118
|
+
(m(!0), T(fe, null, de(q.value[z], (Q) => (m(), R(bt, {
|
|
3143
3119
|
key: Q.key,
|
|
3144
3120
|
item: Q
|
|
3145
3121
|
}, ke({
|
|
3146
|
-
label:
|
|
3122
|
+
label: y(() => [
|
|
3147
3123
|
Y(b.$slots, `${Q.key}-label`, { row: Q }, void 0, !0)
|
|
3148
3124
|
]),
|
|
3149
|
-
[Q.key]:
|
|
3125
|
+
[Q.key]: y(({ rowValue: le }) => [
|
|
3150
3126
|
Y(b.$slots, Q.key, {
|
|
3151
3127
|
row: Q,
|
|
3152
|
-
rowValue:
|
|
3128
|
+
rowValue: le
|
|
3153
3129
|
}, void 0, !0)
|
|
3154
3130
|
]),
|
|
3155
3131
|
_: 2
|
|
3156
3132
|
}, [
|
|
3157
3133
|
w(Q) ? {
|
|
3158
3134
|
name: "label-tooltip",
|
|
3159
|
-
fn:
|
|
3135
|
+
fn: y(() => [
|
|
3160
3136
|
Y(b.$slots, `${Q.key}-label-tooltip`, { row: Q }, void 0, !0)
|
|
3161
3137
|
]),
|
|
3162
3138
|
key: "0"
|
|
3163
3139
|
} : void 0
|
|
3164
3140
|
]), 1032, ["item"]))), 128))
|
|
3165
|
-
], 10,
|
|
3141
|
+
], 10, ws))), 128))
|
|
3166
3142
|
]))
|
|
3167
3143
|
]),
|
|
3168
3144
|
_: 2
|
|
3169
3145
|
}, [
|
|
3170
3146
|
e.hideTitle ? void 0 : {
|
|
3171
3147
|
name: "title",
|
|
3172
|
-
fn:
|
|
3173
|
-
|
|
3148
|
+
fn: y(() => [
|
|
3149
|
+
K("div", hs, [
|
|
3174
3150
|
Y(b.$slots, "title", {}, () => [
|
|
3175
|
-
W(j(
|
|
3151
|
+
W(j(g(o)("baseConfigCard.title")), 1)
|
|
3176
3152
|
], !0)
|
|
3177
3153
|
])
|
|
3178
3154
|
]),
|
|
@@ -3181,10 +3157,10 @@ const al = {
|
|
|
3181
3157
|
]), 1024);
|
|
3182
3158
|
};
|
|
3183
3159
|
}
|
|
3184
|
-
}),
|
|
3160
|
+
}), As = /* @__PURE__ */ me(_s, [["__scopeId", "data-v-bea4df63"]]), Ss = ["onReset", "onSubmit"], xs = {
|
|
3185
3161
|
class: "form-actions",
|
|
3186
3162
|
"data-testid": "form-actions"
|
|
3187
|
-
},
|
|
3163
|
+
}, Ts = /* @__PURE__ */ te({
|
|
3188
3164
|
__name: "EntityBaseForm",
|
|
3189
3165
|
props: {
|
|
3190
3166
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3236,49 +3212,49 @@ const al = {
|
|
|
3236
3212
|
var t;
|
|
3237
3213
|
const a = e, r = gt(), { i18n: { t: o } } = re.useI18n(), { getMessageFromError: i } = re.useErrors(), { axiosInstance: s } = re.useAxios({
|
|
3238
3214
|
headers: (t = a.config) == null ? void 0 : t.requestHeaders
|
|
3239
|
-
}), l =
|
|
3240
|
-
var
|
|
3215
|
+
}), l = O(!1), u = O(!1), d = O(""), c = $(() => a.canSubmit === !1 || a.isReadonly), h = $(() => {
|
|
3216
|
+
var p, S;
|
|
3241
3217
|
if (!a.editId)
|
|
3242
3218
|
return "";
|
|
3243
3219
|
let v = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3244
|
-
return a.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((
|
|
3245
|
-
}),
|
|
3220
|
+
return a.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((p = a.config) == null ? void 0 : p.controlPlaneId) || "") : a.config.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, (S = a.config) != null && S.workspace ? `/${a.config.workspace}` : "")), v = v.replace(/{id}/gi, a.editId), v;
|
|
3221
|
+
}), f = () => {
|
|
3246
3222
|
a.config.cancelRoute ? r.push(a.config.cancelRoute) : A();
|
|
3247
3223
|
}, A = () => {
|
|
3248
3224
|
n("cancel");
|
|
3249
3225
|
}, k = () => {
|
|
3250
3226
|
c.value || n("submit");
|
|
3251
3227
|
};
|
|
3252
|
-
return he(() => l.value, (
|
|
3253
|
-
n("loading",
|
|
3228
|
+
return he(() => l.value, (p) => {
|
|
3229
|
+
n("loading", p);
|
|
3254
3230
|
}, { immediate: !0 }), mt(async () => {
|
|
3255
3231
|
if (a.editId)
|
|
3256
3232
|
try {
|
|
3257
3233
|
u.value = !1, l.value = !0;
|
|
3258
|
-
const { data:
|
|
3259
|
-
n("fetch:success",
|
|
3260
|
-
} catch (
|
|
3261
|
-
const S = i(
|
|
3262
|
-
d.value = S.startsWith("code") ? o("baseForm.errors.edit") : S, u.value = !0, n("fetch:error",
|
|
3234
|
+
const { data: p } = await s.get(h.value);
|
|
3235
|
+
n("fetch:success", p);
|
|
3236
|
+
} catch (p) {
|
|
3237
|
+
const S = i(p);
|
|
3238
|
+
d.value = S.startsWith("code") ? o("baseForm.errors.edit") : S, u.value = !0, n("fetch:error", p);
|
|
3263
3239
|
} finally {
|
|
3264
3240
|
l.value = !1;
|
|
3265
3241
|
}
|
|
3266
|
-
}), (
|
|
3267
|
-
const v =
|
|
3268
|
-
return m(),
|
|
3269
|
-
default:
|
|
3270
|
-
l.value ? (m(),
|
|
3242
|
+
}), (p, S) => {
|
|
3243
|
+
const v = P("KSkeleton"), q = P("KEmptyState"), _ = P("KAlert"), w = P("KButton"), N = P("KCard");
|
|
3244
|
+
return m(), R(N, { class: "kong-ui-entity-base-form" }, {
|
|
3245
|
+
default: y(() => [
|
|
3246
|
+
l.value ? (m(), R(v, {
|
|
3271
3247
|
key: 0,
|
|
3272
3248
|
type: "form"
|
|
3273
|
-
})) : u.value ? (m(),
|
|
3249
|
+
})) : u.value ? (m(), R(q, {
|
|
3274
3250
|
key: 1,
|
|
3275
|
-
"cta-text":
|
|
3251
|
+
"cta-text": g(o)("baseForm.actions.back"),
|
|
3276
3252
|
"data-testid": "form-fetch-error",
|
|
3277
|
-
"handle-click":
|
|
3253
|
+
"handle-click": f,
|
|
3278
3254
|
"is-error": !0
|
|
3279
3255
|
}, {
|
|
3280
|
-
message:
|
|
3281
|
-
|
|
3256
|
+
message: y(() => [
|
|
3257
|
+
K("h3", null, j(d.value), 1)
|
|
3282
3258
|
]),
|
|
3283
3259
|
_: 1
|
|
3284
3260
|
}, 8, ["cta-text"])) : (m(), T("form", {
|
|
@@ -3287,49 +3263,49 @@ const al = {
|
|
|
3287
3263
|
onReset: De(A, ["prevent"]),
|
|
3288
3264
|
onSubmit: De(k, ["prevent"])
|
|
3289
3265
|
}, [
|
|
3290
|
-
Y(
|
|
3291
|
-
e.errorMessage ? (m(),
|
|
3266
|
+
Y(p.$slots, "default", {}, void 0, !0),
|
|
3267
|
+
e.errorMessage ? (m(), R(_, {
|
|
3292
3268
|
key: 0,
|
|
3293
3269
|
"alert-message": e.errorMessage,
|
|
3294
3270
|
appearance: "danger",
|
|
3295
3271
|
"data-testid": "form-error"
|
|
3296
3272
|
}, null, 8, ["alert-message"])) : G("", !0),
|
|
3297
|
-
|
|
3298
|
-
Y(
|
|
3299
|
-
|
|
3273
|
+
K("div", xs, [
|
|
3274
|
+
Y(p.$slots, "form-actions", {}, () => [
|
|
3275
|
+
F(w, {
|
|
3300
3276
|
appearance: "secondary",
|
|
3301
3277
|
"data-testid": "form-cancel",
|
|
3302
3278
|
disabled: e.isReadonly,
|
|
3303
3279
|
type: "reset"
|
|
3304
3280
|
}, {
|
|
3305
|
-
default:
|
|
3306
|
-
W(j(
|
|
3281
|
+
default: y(() => [
|
|
3282
|
+
W(j(g(o)("baseForm.actions.cancel")), 1)
|
|
3307
3283
|
]),
|
|
3308
3284
|
_: 1
|
|
3309
3285
|
}, 8, ["disabled"]),
|
|
3310
|
-
|
|
3286
|
+
F(w, {
|
|
3311
3287
|
appearance: "primary",
|
|
3312
3288
|
"data-testid": "form-submit",
|
|
3313
3289
|
disabled: c.value,
|
|
3314
3290
|
type: "submit"
|
|
3315
3291
|
}, {
|
|
3316
|
-
default:
|
|
3317
|
-
W(j(
|
|
3292
|
+
default: y(() => [
|
|
3293
|
+
W(j(g(o)("baseForm.actions.save")), 1)
|
|
3318
3294
|
]),
|
|
3319
3295
|
_: 1
|
|
3320
3296
|
}, 8, ["disabled"])
|
|
3321
3297
|
], !0)
|
|
3322
3298
|
])
|
|
3323
|
-
], 40,
|
|
3299
|
+
], 40, Ss))
|
|
3324
3300
|
]),
|
|
3325
3301
|
_: 3
|
|
3326
3302
|
});
|
|
3327
3303
|
};
|
|
3328
3304
|
}
|
|
3329
|
-
}),
|
|
3305
|
+
}), $s = /* @__PURE__ */ me(Ts, [["__scopeId", "data-v-448d8512"]]), js = {
|
|
3330
3306
|
key: 0,
|
|
3331
3307
|
"data-testid": "first-col"
|
|
3332
|
-
},
|
|
3308
|
+
}, Ms = /* @__PURE__ */ te({
|
|
3333
3309
|
__name: "EntityBaseTableCell",
|
|
3334
3310
|
props: {
|
|
3335
3311
|
keyName: {
|
|
@@ -3349,27 +3325,27 @@ const al = {
|
|
|
3349
3325
|
var k;
|
|
3350
3326
|
return ((k = t.value) == null ? void 0 : k.querySelector('[data-testid="first-col"]')) || null;
|
|
3351
3327
|
}), r = $(() => {
|
|
3352
|
-
var k,
|
|
3328
|
+
var k, p;
|
|
3353
3329
|
const S = (k = n.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3354
|
-
return S ? ((
|
|
3330
|
+
return S ? ((p = S[0]) == null ? void 0 : p.getAttribute("data-testid")) === n.keyName : !1;
|
|
3355
3331
|
});
|
|
3356
3332
|
let o;
|
|
3357
3333
|
const i = () => {
|
|
3358
3334
|
o && (o.disconnect(), o = void 0);
|
|
3359
3335
|
}, s = () => {
|
|
3360
|
-
var k,
|
|
3361
|
-
u.value = ((k = a.value) == null ? void 0 : k.getBoundingClientRect().width) || 0, d.value = ((
|
|
3362
|
-
}, l =
|
|
3363
|
-
|
|
3336
|
+
var k, p, S;
|
|
3337
|
+
u.value = ((k = a.value) == null ? void 0 : k.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, c.value = ((S = l.value) == null ? void 0 : S.innerText) || "";
|
|
3338
|
+
}, l = O({}), u = O(0), d = O(0), c = O(""), h = $(() => [a.value, t.value]), f = he(
|
|
3339
|
+
h,
|
|
3364
3340
|
(k) => {
|
|
3365
3341
|
if (r.value && (i(), "ResizeObserver" in window && window)) {
|
|
3366
|
-
o = new ResizeObserver((
|
|
3342
|
+
o = new ResizeObserver((p) => {
|
|
3367
3343
|
window.requestAnimationFrame(() => {
|
|
3368
|
-
!Array.isArray(
|
|
3344
|
+
!Array.isArray(p) || !p.length || s();
|
|
3369
3345
|
});
|
|
3370
3346
|
});
|
|
3371
|
-
for (const
|
|
3372
|
-
|
|
3347
|
+
for (const p of k)
|
|
3348
|
+
p && o.observe(p);
|
|
3373
3349
|
}
|
|
3374
3350
|
},
|
|
3375
3351
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
@@ -3377,21 +3353,21 @@ const al = {
|
|
|
3377
3353
|
return ha(() => {
|
|
3378
3354
|
s();
|
|
3379
3355
|
}), va(() => {
|
|
3380
|
-
|
|
3381
|
-
}), (k,
|
|
3382
|
-
const S =
|
|
3356
|
+
f();
|
|
3357
|
+
}), (k, p) => {
|
|
3358
|
+
const S = P("KTooltip");
|
|
3383
3359
|
return m(), T("span", {
|
|
3384
3360
|
ref_key: "contentRef",
|
|
3385
3361
|
ref: l,
|
|
3386
3362
|
class: "content-wrapper"
|
|
3387
3363
|
}, [
|
|
3388
|
-
r.value ? (m(), T("span",
|
|
3389
|
-
|
|
3364
|
+
r.value ? (m(), T("span", js, [
|
|
3365
|
+
F(S, {
|
|
3390
3366
|
label: A.value ? c.value : "",
|
|
3391
3367
|
"max-width": "300",
|
|
3392
3368
|
placement: "bottomStart"
|
|
3393
3369
|
}, {
|
|
3394
|
-
default:
|
|
3370
|
+
default: y(() => [
|
|
3395
3371
|
Y(k.$slots, "default", {}, void 0, !0)
|
|
3396
3372
|
]),
|
|
3397
3373
|
_: 3
|
|
@@ -3400,10 +3376,10 @@ const al = {
|
|
|
3400
3376
|
], 512);
|
|
3401
3377
|
};
|
|
3402
3378
|
}
|
|
3403
|
-
}),
|
|
3379
|
+
}), Os = /* @__PURE__ */ me(Ms, [["__scopeId", "data-v-e42a20c9"]]), Es = { class: "toolbar-container" }, Fs = {
|
|
3404
3380
|
key: 0,
|
|
3405
3381
|
class: "toolbar-button-container"
|
|
3406
|
-
},
|
|
3382
|
+
}, Ks = ["data-testid"], Ns = /* @__PURE__ */ te({
|
|
3407
3383
|
__name: "EntityBaseTable",
|
|
3408
3384
|
props: {
|
|
3409
3385
|
// table header configuration
|
|
@@ -3514,71 +3490,71 @@ const al = {
|
|
|
3514
3490
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3515
3491
|
setup(e, { emit: n }) {
|
|
3516
3492
|
const t = e, { i18n: { t: a } } = re.useI18n(), r = $(() => {
|
|
3517
|
-
var
|
|
3493
|
+
var _, w;
|
|
3518
3494
|
return typeof t.errorMessage == "string" ? {
|
|
3519
3495
|
hasError: !!t.errorMessage,
|
|
3520
3496
|
title: t.errorMessage,
|
|
3521
3497
|
message: void 0
|
|
3522
3498
|
} : {
|
|
3523
3499
|
hasError: !!t.errorMessage,
|
|
3524
|
-
title: (
|
|
3500
|
+
title: (_ = t.errorMessage) == null ? void 0 : _.title,
|
|
3525
3501
|
message: (w = t.errorMessage) == null ? void 0 : w.message
|
|
3526
3502
|
};
|
|
3527
|
-
}), o = $(() => t.cacheIdentifier || t.preferencesStorageKey), i = (
|
|
3528
|
-
const
|
|
3503
|
+
}), o = $(() => t.cacheIdentifier || t.preferencesStorageKey), i = (_) => _.hasData || !!t.query, s = $(() => {
|
|
3504
|
+
const _ = [];
|
|
3529
3505
|
return Object.keys(t.tableHeaders).forEach((w) => {
|
|
3530
|
-
const
|
|
3531
|
-
|
|
3532
|
-
label:
|
|
3506
|
+
const N = t.tableHeaders[w];
|
|
3507
|
+
_.push({
|
|
3508
|
+
label: N.label ?? w,
|
|
3533
3509
|
key: w,
|
|
3534
|
-
sortable:
|
|
3510
|
+
sortable: N.sortable ?? !1
|
|
3535
3511
|
});
|
|
3536
|
-
}), t.enableEntityActions &&
|
|
3512
|
+
}), t.enableEntityActions && _.push({
|
|
3537
3513
|
key: "actions",
|
|
3538
3514
|
hideLabel: !0
|
|
3539
|
-
}),
|
|
3540
|
-
}), l = (
|
|
3541
|
-
"data-rowid":
|
|
3542
|
-
"data-testid":
|
|
3543
|
-
...t.rowAttributes(
|
|
3544
|
-
}), u =
|
|
3515
|
+
}), _;
|
|
3516
|
+
}), l = (_) => ({
|
|
3517
|
+
"data-rowid": _.id,
|
|
3518
|
+
"data-testid": _.name,
|
|
3519
|
+
...t.rowAttributes(_)
|
|
3520
|
+
}), u = O({}), d = (_) => {
|
|
3545
3521
|
var w;
|
|
3546
|
-
return (w = u.value) == null ? void 0 : w.$el.querySelector(`[data-rowid="${
|
|
3547
|
-
}, c = (
|
|
3522
|
+
return (w = u.value) == null ? void 0 : w.$el.querySelector(`[data-rowid="${_.id}"]`);
|
|
3523
|
+
}, c = (_) => {
|
|
3548
3524
|
const w = {
|
|
3549
|
-
"data-testid":
|
|
3550
|
-
...t.cellAttributes(
|
|
3525
|
+
"data-testid": _.headerKey,
|
|
3526
|
+
...t.cellAttributes(_)
|
|
3551
3527
|
};
|
|
3552
|
-
return
|
|
3528
|
+
return _.colIndex === 0 && (w.style = {
|
|
3553
3529
|
maxWidth: "250px",
|
|
3554
3530
|
overflowX: "hidden",
|
|
3555
3531
|
textOverflow: "ellipsis"
|
|
3556
3532
|
}), w;
|
|
3557
|
-
},
|
|
3558
|
-
n("empty-state-cta-clicked"),
|
|
3559
|
-
},
|
|
3533
|
+
}, h = () => {
|
|
3534
|
+
n("empty-state-cta-clicked"), f();
|
|
3535
|
+
}, f = () => {
|
|
3560
3536
|
n("clear-search-input");
|
|
3561
|
-
}, A = $(() => t.disableRowClick ? void 0 : (
|
|
3537
|
+
}, A = $(() => t.disableRowClick ? void 0 : (_, w) => {
|
|
3562
3538
|
n("click:row", w);
|
|
3563
|
-
}), k = (
|
|
3564
|
-
n("sort",
|
|
3565
|
-
}, { setTablePreferences:
|
|
3566
|
-
const
|
|
3539
|
+
}), k = (_) => {
|
|
3540
|
+
n("sort", _);
|
|
3541
|
+
}, { setTablePreferences: p, getTablePreferences: S } = Ta(), v = $(() => {
|
|
3542
|
+
const _ = S(t.preferencesStorageKey);
|
|
3567
3543
|
return {
|
|
3568
3544
|
...t.initialFetcherParams,
|
|
3569
|
-
...
|
|
3545
|
+
..._
|
|
3570
3546
|
};
|
|
3571
|
-
}), q = (
|
|
3572
|
-
t.preferencesStorageKey &&
|
|
3547
|
+
}), q = (_) => {
|
|
3548
|
+
t.preferencesStorageKey && p(t.preferencesStorageKey, _);
|
|
3573
3549
|
};
|
|
3574
|
-
return (
|
|
3575
|
-
const
|
|
3576
|
-
return m(), V
|
|
3550
|
+
return (_, w) => {
|
|
3551
|
+
const N = P("KIcon"), U = P("KButton"), b = P("KDropdown"), C = P("KTable"), V = P("KCard");
|
|
3552
|
+
return m(), R(V, {
|
|
3577
3553
|
class: "kong-ui-entity-base-table",
|
|
3578
3554
|
title: e.title
|
|
3579
3555
|
}, {
|
|
3580
|
-
default:
|
|
3581
|
-
|
|
3556
|
+
default: y(() => [
|
|
3557
|
+
F(C, {
|
|
3582
3558
|
ref_key: "tableRefs",
|
|
3583
3559
|
ref: u,
|
|
3584
3560
|
"cache-identifier": o.value,
|
|
@@ -3586,12 +3562,12 @@ const al = {
|
|
|
3586
3562
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3587
3563
|
"disable-sorting": e.disableSorting,
|
|
3588
3564
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
3589
|
-
"empty-state-action-message": e.query ?
|
|
3565
|
+
"empty-state-action-message": e.query ? g(a)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3590
3566
|
"empty-state-action-route": e.query ? "" : e.emptyStateOptions.ctaPath,
|
|
3591
3567
|
"empty-state-icon": e.query ? "stateNoSearchResults" : "stateGruceo",
|
|
3592
3568
|
"empty-state-icon-size": "96",
|
|
3593
|
-
"empty-state-message": e.query ?
|
|
3594
|
-
"empty-state-title": e.query ?
|
|
3569
|
+
"empty-state-message": e.query ? g(a)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3570
|
+
"empty-state-title": e.query ? g(a)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3595
3571
|
"enable-client-sort": e.enableClientSort,
|
|
3596
3572
|
"error-state-message": r.value.message,
|
|
3597
3573
|
"error-state-title": r.value.title,
|
|
@@ -3605,46 +3581,46 @@ const al = {
|
|
|
3605
3581
|
"pagination-type": e.paginationType,
|
|
3606
3582
|
"row-attrs": l,
|
|
3607
3583
|
"search-input": e.query,
|
|
3608
|
-
onKtableEmptyStateCtaClicked:
|
|
3584
|
+
onKtableEmptyStateCtaClicked: h,
|
|
3609
3585
|
"onRow:click": A.value,
|
|
3610
3586
|
onSort: w[0] || (w[0] = (B) => k(B)),
|
|
3611
3587
|
"onUpdate:tablePreferences": q
|
|
3612
3588
|
}, ke({
|
|
3613
|
-
toolbar:
|
|
3614
|
-
Be(
|
|
3615
|
-
Y(
|
|
3616
|
-
|
|
3617
|
-
Y(
|
|
3589
|
+
toolbar: y(({ state: B }) => [
|
|
3590
|
+
Be(K("div", Es, [
|
|
3591
|
+
Y(_.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3592
|
+
_.$slots["toolbar-button"] ? (m(), T("div", Fs, [
|
|
3593
|
+
Y(_.$slots, "toolbar-button", {}, void 0, !0)
|
|
3618
3594
|
])) : G("", !0)
|
|
3619
3595
|
], 512), [
|
|
3620
3596
|
[qe, i(B)]
|
|
3621
3597
|
])
|
|
3622
3598
|
]),
|
|
3623
|
-
actions:
|
|
3624
|
-
|
|
3599
|
+
actions: y(({ row: B, rowKey: I, rowValue: E }) => [
|
|
3600
|
+
K("div", {
|
|
3625
3601
|
class: "actions-container",
|
|
3626
3602
|
"data-testid": B.name
|
|
3627
3603
|
}, [
|
|
3628
|
-
|
|
3604
|
+
F(b, {
|
|
3629
3605
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3630
3606
|
width: e.dropdownMenuWidth
|
|
3631
3607
|
}, {
|
|
3632
|
-
items:
|
|
3633
|
-
Y(
|
|
3608
|
+
items: y(() => [
|
|
3609
|
+
Y(_.$slots, "actions", {
|
|
3634
3610
|
row: B,
|
|
3635
|
-
rowKey:
|
|
3636
|
-
rowValue:
|
|
3611
|
+
rowKey: I,
|
|
3612
|
+
rowValue: E
|
|
3637
3613
|
}, void 0, !0)
|
|
3638
3614
|
]),
|
|
3639
|
-
default:
|
|
3640
|
-
|
|
3615
|
+
default: y(() => [
|
|
3616
|
+
F(U, {
|
|
3641
3617
|
class: "actions-trigger",
|
|
3642
3618
|
"data-testid": "overflow-actions-button",
|
|
3643
3619
|
size: "small"
|
|
3644
3620
|
}, {
|
|
3645
|
-
icon:
|
|
3646
|
-
|
|
3647
|
-
color:
|
|
3621
|
+
icon: y(() => [
|
|
3622
|
+
F(N, {
|
|
3623
|
+
color: g(Cr),
|
|
3648
3624
|
icon: "more",
|
|
3649
3625
|
size: "16"
|
|
3650
3626
|
}, null, 8, ["color"])
|
|
@@ -3654,20 +3630,20 @@ const al = {
|
|
|
3654
3630
|
]),
|
|
3655
3631
|
_: 2
|
|
3656
3632
|
}, 1032, ["width"])
|
|
3657
|
-
], 8,
|
|
3633
|
+
], 8, Ks)
|
|
3658
3634
|
]),
|
|
3659
3635
|
_: 2
|
|
3660
3636
|
}, [
|
|
3661
|
-
de(e.tableHeaders, (B,
|
|
3662
|
-
name:
|
|
3663
|
-
fn:
|
|
3664
|
-
|
|
3665
|
-
"key-name": String(
|
|
3666
|
-
"row-el": d(
|
|
3637
|
+
de(e.tableHeaders, (B, I) => ({
|
|
3638
|
+
name: I,
|
|
3639
|
+
fn: y(({ row: E, rowKey: L, rowValue: D }) => [
|
|
3640
|
+
F(Os, {
|
|
3641
|
+
"key-name": String(I),
|
|
3642
|
+
"row-el": d(E)
|
|
3667
3643
|
}, {
|
|
3668
|
-
default:
|
|
3669
|
-
Y(
|
|
3670
|
-
row:
|
|
3644
|
+
default: y(() => [
|
|
3645
|
+
Y(_.$slots, I, {
|
|
3646
|
+
row: E,
|
|
3671
3647
|
rowKey: L,
|
|
3672
3648
|
rowValue: D
|
|
3673
3649
|
}, () => [
|
|
@@ -3684,13 +3660,13 @@ const al = {
|
|
|
3684
3660
|
}, 8, ["title"]);
|
|
3685
3661
|
};
|
|
3686
3662
|
}
|
|
3687
|
-
}),
|
|
3663
|
+
}), Bs = /* @__PURE__ */ me(Ns, [["__scopeId", "data-v-57b5a97b"]]), qs = {
|
|
3688
3664
|
key: 0,
|
|
3689
3665
|
class: "kong-ui-entity-delete-error"
|
|
3690
|
-
},
|
|
3666
|
+
}, Ls = {
|
|
3691
3667
|
key: 1,
|
|
3692
3668
|
class: "description"
|
|
3693
|
-
},
|
|
3669
|
+
}, Ps = /* @__PURE__ */ te({
|
|
3694
3670
|
__name: "EntityDeleteModal",
|
|
3695
3671
|
props: {
|
|
3696
3672
|
visible: {
|
|
@@ -3735,8 +3711,8 @@ const al = {
|
|
|
3735
3711
|
n("proceed");
|
|
3736
3712
|
};
|
|
3737
3713
|
return (s, l) => {
|
|
3738
|
-
const u =
|
|
3739
|
-
return m(),
|
|
3714
|
+
const u = P("KAlert"), d = P("KPrompt");
|
|
3715
|
+
return m(), R(d, {
|
|
3740
3716
|
"action-button-text": "Yes, delete",
|
|
3741
3717
|
"action-pending": e.actionPending,
|
|
3742
3718
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3747,36 +3723,36 @@ const al = {
|
|
|
3747
3723
|
onCanceled: o,
|
|
3748
3724
|
onProceed: i
|
|
3749
3725
|
}, {
|
|
3750
|
-
"body-content":
|
|
3751
|
-
e.error ? (m(), T("div",
|
|
3752
|
-
|
|
3753
|
-
alertMessage:
|
|
3726
|
+
"body-content": y(() => [
|
|
3727
|
+
e.error ? (m(), T("div", qs, [
|
|
3728
|
+
F(u, { appearance: "danger" }, {
|
|
3729
|
+
alertMessage: y(() => [
|
|
3754
3730
|
W(j(e.error), 1)
|
|
3755
3731
|
]),
|
|
3756
3732
|
_: 1
|
|
3757
3733
|
})
|
|
3758
3734
|
])) : G("", !0),
|
|
3759
|
-
|
|
3735
|
+
F(g(a), {
|
|
3760
3736
|
class: "message",
|
|
3761
3737
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3762
3738
|
tag: "p"
|
|
3763
3739
|
}, ke({
|
|
3764
|
-
entityType:
|
|
3740
|
+
entityType: y(() => [
|
|
3765
3741
|
W(j(t.entityType), 1)
|
|
3766
3742
|
]),
|
|
3767
3743
|
_: 2
|
|
3768
3744
|
}, [
|
|
3769
3745
|
t.entityName ? {
|
|
3770
3746
|
name: "entityName",
|
|
3771
|
-
fn:
|
|
3772
|
-
|
|
3747
|
+
fn: y(() => [
|
|
3748
|
+
K("strong", null, j(t.entityName), 1)
|
|
3773
3749
|
]),
|
|
3774
3750
|
key: "0"
|
|
3775
3751
|
} : void 0
|
|
3776
3752
|
]), 1032, ["keypath"]),
|
|
3777
|
-
t.description || s.$slots.description ? (m(), T("div",
|
|
3753
|
+
t.description || s.$slots.description ? (m(), T("div", Ls, [
|
|
3778
3754
|
Y(s.$slots, "description", {}, () => [
|
|
3779
|
-
|
|
3755
|
+
K("p", null, j(t.description), 1)
|
|
3780
3756
|
], !0)
|
|
3781
3757
|
])) : G("", !0)
|
|
3782
3758
|
]),
|
|
@@ -3784,13 +3760,13 @@ const al = {
|
|
|
3784
3760
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3785
3761
|
};
|
|
3786
3762
|
}
|
|
3787
|
-
}),
|
|
3763
|
+
}), Vs = /* @__PURE__ */ me(Ps, [["__scopeId", "data-v-1c9a2a07"]]), Rs = {
|
|
3788
3764
|
fill: "none",
|
|
3789
3765
|
height: "20",
|
|
3790
3766
|
viewBox: "0 0 20 20",
|
|
3791
3767
|
width: "20",
|
|
3792
3768
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3793
|
-
},
|
|
3769
|
+
}, Us = {
|
|
3794
3770
|
id: "mask0_180_20349",
|
|
3795
3771
|
height: "20",
|
|
3796
3772
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3798,7 +3774,7 @@ const al = {
|
|
|
3798
3774
|
width: "20",
|
|
3799
3775
|
x: "0",
|
|
3800
3776
|
y: "0"
|
|
3801
|
-
},
|
|
3777
|
+
}, Ds = ["fill"], Gs = { mask: "url(#mask0_180_20349)" }, Hs = ["fill"], ln = /* @__PURE__ */ te({
|
|
3802
3778
|
__name: "IconFilter",
|
|
3803
3779
|
props: {
|
|
3804
3780
|
color: {
|
|
@@ -3807,26 +3783,26 @@ const al = {
|
|
|
3807
3783
|
}
|
|
3808
3784
|
},
|
|
3809
3785
|
setup(e) {
|
|
3810
|
-
return (n, t) => (m(), T("svg",
|
|
3811
|
-
|
|
3812
|
-
|
|
3786
|
+
return (n, t) => (m(), T("svg", Rs, [
|
|
3787
|
+
K("mask", Us, [
|
|
3788
|
+
K("rect", {
|
|
3813
3789
|
fill: e.color,
|
|
3814
3790
|
height: "20",
|
|
3815
3791
|
width: "20"
|
|
3816
|
-
}, null, 8,
|
|
3792
|
+
}, null, 8, Ds)
|
|
3817
3793
|
]),
|
|
3818
|
-
|
|
3819
|
-
|
|
3794
|
+
K("g", Gs, [
|
|
3795
|
+
K("path", {
|
|
3820
3796
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3821
3797
|
fill: e.color
|
|
3822
|
-
}, null, 8,
|
|
3798
|
+
}, null, 8, Hs)
|
|
3823
3799
|
])
|
|
3824
3800
|
]));
|
|
3825
3801
|
}
|
|
3826
|
-
}),
|
|
3802
|
+
}), zs = {
|
|
3827
3803
|
key: 1,
|
|
3828
3804
|
class: "kong-ui-entity-filter"
|
|
3829
|
-
},
|
|
3805
|
+
}, Js = { class: "menu-item-title" }, Ys = { class: "menu-item-indicator" }, Ws = { class: "menu-item-body" }, Zs = ["for"], Qs = { class: "menu-item-buttons" }, Xs = { class: "filter-clear-button-container" }, el = /* @__PURE__ */ te({
|
|
3830
3806
|
__name: "EntityFilter",
|
|
3831
3807
|
props: {
|
|
3832
3808
|
// filter config, either exact match or fuzzy match
|
|
@@ -3846,50 +3822,50 @@ const al = {
|
|
|
3846
3822
|
},
|
|
3847
3823
|
emits: ["update:modelValue"],
|
|
3848
3824
|
setup(e, { emit: n }) {
|
|
3849
|
-
const t = e, { i18n: { t: a } } = re.useI18n(), r =
|
|
3850
|
-
const
|
|
3825
|
+
const t = e, { i18n: { t: a } } = re.useI18n(), r = O(!1), o = O({}), i = $(() => {
|
|
3826
|
+
const p = [];
|
|
3851
3827
|
return new URLSearchParams(t.modelValue).forEach((S, v) => {
|
|
3852
|
-
S !== "" &&
|
|
3853
|
-
}),
|
|
3828
|
+
S !== "" && p.push(v);
|
|
3829
|
+
}), p;
|
|
3854
3830
|
}), s = $(() => {
|
|
3855
|
-
const
|
|
3856
|
-
return Object.keys(
|
|
3857
|
-
label:
|
|
3831
|
+
const p = t.config.fields;
|
|
3832
|
+
return Object.keys(p).filter((S) => p[S].searchable).map((S) => ({
|
|
3833
|
+
label: p[S].label || S,
|
|
3858
3834
|
value: S
|
|
3859
3835
|
}));
|
|
3860
3836
|
});
|
|
3861
|
-
he(() => t.modelValue, (
|
|
3862
|
-
o.value = {}, new URLSearchParams(
|
|
3837
|
+
he(() => t.modelValue, (p) => {
|
|
3838
|
+
o.value = {}, new URLSearchParams(p).forEach((S, v) => {
|
|
3863
3839
|
o.value[v] = S;
|
|
3864
3840
|
});
|
|
3865
3841
|
});
|
|
3866
3842
|
const l = () => {
|
|
3867
3843
|
r.value = !r.value;
|
|
3868
|
-
}, u = (
|
|
3869
|
-
n("update:modelValue",
|
|
3870
|
-
}, d = (
|
|
3844
|
+
}, u = (p) => {
|
|
3845
|
+
n("update:modelValue", p);
|
|
3846
|
+
}, d = (p) => `filter-${p}`, c = (p) => {
|
|
3871
3847
|
var S, v;
|
|
3872
|
-
return (((v = (S = t.config.schema) == null ? void 0 : S[
|
|
3848
|
+
return (((v = (S = t.config.schema) == null ? void 0 : S[p]) == null ? void 0 : v.values) ?? []).map((q) => ({
|
|
3873
3849
|
value: q,
|
|
3874
3850
|
label: q
|
|
3875
3851
|
}));
|
|
3876
|
-
},
|
|
3852
|
+
}, h = (p) => {
|
|
3877
3853
|
var S, v;
|
|
3878
|
-
return ((v = (S = t.config.schema) == null ? void 0 : S[
|
|
3879
|
-
},
|
|
3854
|
+
return ((v = (S = t.config.schema) == null ? void 0 : S[p]) == null ? void 0 : v.type) ?? "text";
|
|
3855
|
+
}, f = (p) => {
|
|
3880
3856
|
o.value = {
|
|
3881
3857
|
...o.value,
|
|
3882
|
-
[
|
|
3858
|
+
[p]: ""
|
|
3883
3859
|
}, k();
|
|
3884
3860
|
}, A = () => {
|
|
3885
3861
|
o.value = {}, k(!0);
|
|
3886
|
-
}, k = (
|
|
3862
|
+
}, k = (p = !1) => {
|
|
3887
3863
|
const S = Object.keys(o.value).reduce((v, q) => (o.value[q] && (v[q] = `${o.value[q]}`), v), {});
|
|
3888
|
-
|
|
3864
|
+
p && (r.value = !1), n("update:modelValue", new URLSearchParams(S).toString());
|
|
3889
3865
|
};
|
|
3890
|
-
return (
|
|
3891
|
-
const v =
|
|
3892
|
-
return e.config.isExactMatch ? (m(),
|
|
3866
|
+
return (p, S) => {
|
|
3867
|
+
const v = P("KInput"), q = P("KButton"), _ = P("KSelect"), w = P("KMenuItem"), N = P("KMenu");
|
|
3868
|
+
return e.config.isExactMatch ? (m(), R(v, {
|
|
3893
3869
|
key: 0,
|
|
3894
3870
|
autocomplete: "off",
|
|
3895
3871
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3898,90 +3874,90 @@ const al = {
|
|
|
3898
3874
|
placeholder: e.config.placeholder,
|
|
3899
3875
|
"onUpdate:modelValue": u
|
|
3900
3876
|
}, {
|
|
3901
|
-
before:
|
|
3902
|
-
|
|
3877
|
+
before: y(() => [
|
|
3878
|
+
F(ln)
|
|
3903
3879
|
]),
|
|
3904
3880
|
_: 1
|
|
3905
|
-
}, 8, ["model-value", "placeholder"])) : (m(), T("div",
|
|
3906
|
-
|
|
3881
|
+
}, 8, ["model-value", "placeholder"])) : (m(), T("div", zs, [
|
|
3882
|
+
F(q, {
|
|
3907
3883
|
appearance: "tertiary",
|
|
3908
3884
|
"data-testid": "filter-button",
|
|
3909
3885
|
onClick: l
|
|
3910
3886
|
}, {
|
|
3911
|
-
default:
|
|
3912
|
-
|
|
3913
|
-
W(" " + j(
|
|
3887
|
+
default: y(() => [
|
|
3888
|
+
F(ln),
|
|
3889
|
+
W(" " + j(g(a)("filter.filterButtonText")) + " " + j(i.value.length > 0 ? `(${i.value.length})` : ""), 1)
|
|
3914
3890
|
]),
|
|
3915
3891
|
_: 1
|
|
3916
3892
|
}),
|
|
3917
|
-
Be(
|
|
3893
|
+
Be(K("div", {
|
|
3918
3894
|
class: "kong-ui-entity-filter-backdrop",
|
|
3919
3895
|
onClick: l
|
|
3920
3896
|
}, null, 512), [
|
|
3921
3897
|
[qe, r.value]
|
|
3922
3898
|
]),
|
|
3923
|
-
Be(
|
|
3924
|
-
body:
|
|
3925
|
-
(m(!0), T(fe, null, de(s.value, (U, b) => (m(),
|
|
3899
|
+
Be(F(N, { class: "kong-ui-entity-filter-menu" }, {
|
|
3900
|
+
body: y(() => [
|
|
3901
|
+
(m(!0), T(fe, null, de(s.value, (U, b) => (m(), R(w, {
|
|
3926
3902
|
key: U.value,
|
|
3927
3903
|
"data-testid": U.value,
|
|
3928
3904
|
expandable: "",
|
|
3929
3905
|
"last-menu-item": b === s.value.length - 1
|
|
3930
3906
|
}, {
|
|
3931
|
-
itemTitle:
|
|
3932
|
-
|
|
3907
|
+
itemTitle: y(() => [
|
|
3908
|
+
K("span", Js, [
|
|
3933
3909
|
W(j(U.label) + " ", 1),
|
|
3934
|
-
Be(
|
|
3910
|
+
Be(K("span", Ys, null, 512), [
|
|
3935
3911
|
[qe, i.value.includes(U.value)]
|
|
3936
3912
|
])
|
|
3937
3913
|
])
|
|
3938
3914
|
]),
|
|
3939
|
-
itemBody:
|
|
3940
|
-
var C,
|
|
3915
|
+
itemBody: y(() => {
|
|
3916
|
+
var C, V;
|
|
3941
3917
|
return [
|
|
3942
|
-
|
|
3943
|
-
|
|
3918
|
+
K("div", Ws, [
|
|
3919
|
+
K("label", {
|
|
3944
3920
|
class: "menu-item-label",
|
|
3945
3921
|
for: d(U.value)
|
|
3946
|
-
}, j(
|
|
3947
|
-
((
|
|
3922
|
+
}, j(g(a)("filter.fieldLabel")), 9, Zs),
|
|
3923
|
+
((V = (C = e.config.schema) == null ? void 0 : C[U.value]) == null ? void 0 : V.type) === "select" ? (m(), R(_, {
|
|
3948
3924
|
key: 0,
|
|
3949
3925
|
id: d(U.value),
|
|
3950
3926
|
modelValue: o.value[U.value],
|
|
3951
3927
|
"onUpdate:modelValue": (B) => o.value[U.value] = B,
|
|
3952
3928
|
appearance: "select",
|
|
3953
3929
|
items: c(U.value),
|
|
3954
|
-
placeholder:
|
|
3955
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(),
|
|
3930
|
+
placeholder: g(a)("filter.selectPlaceholder")
|
|
3931
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), R(v, {
|
|
3956
3932
|
key: 1,
|
|
3957
3933
|
id: d(U.value),
|
|
3958
3934
|
modelValue: o.value[U.value],
|
|
3959
3935
|
"onUpdate:modelValue": (B) => o.value[U.value] = B,
|
|
3960
3936
|
autocomplete: "off",
|
|
3961
|
-
placeholder:
|
|
3962
|
-
type:
|
|
3937
|
+
placeholder: g(a)("filter.inputPlaceholder"),
|
|
3938
|
+
type: h(U.value)
|
|
3963
3939
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3964
3940
|
]),
|
|
3965
|
-
|
|
3966
|
-
|
|
3941
|
+
K("div", Qs, [
|
|
3942
|
+
F(q, {
|
|
3967
3943
|
appearance: "tertiary",
|
|
3968
3944
|
"data-testid": "apply-filter",
|
|
3969
3945
|
size: "small",
|
|
3970
3946
|
onClick: S[0] || (S[0] = (B) => k(!0))
|
|
3971
3947
|
}, {
|
|
3972
|
-
default:
|
|
3973
|
-
W(j(
|
|
3948
|
+
default: y(() => [
|
|
3949
|
+
W(j(g(a)("filter.applyButtonText")), 1)
|
|
3974
3950
|
]),
|
|
3975
3951
|
_: 1
|
|
3976
3952
|
}),
|
|
3977
|
-
|
|
3953
|
+
F(q, {
|
|
3978
3954
|
appearance: "tertiary",
|
|
3979
3955
|
"data-testid": "clear-filter",
|
|
3980
3956
|
size: "small",
|
|
3981
|
-
onClick: (B) =>
|
|
3957
|
+
onClick: (B) => f(U.value)
|
|
3982
3958
|
}, {
|
|
3983
|
-
default:
|
|
3984
|
-
W(j(
|
|
3959
|
+
default: y(() => [
|
|
3960
|
+
W(j(g(a)("filter.clearButtonText")), 1)
|
|
3985
3961
|
]),
|
|
3986
3962
|
_: 2
|
|
3987
3963
|
}, 1032, ["onClick"])
|
|
@@ -3991,15 +3967,15 @@ const al = {
|
|
|
3991
3967
|
_: 2
|
|
3992
3968
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
3993
3969
|
]),
|
|
3994
|
-
actionButton:
|
|
3995
|
-
|
|
3996
|
-
|
|
3970
|
+
actionButton: y(() => [
|
|
3971
|
+
K("div", Xs, [
|
|
3972
|
+
F(q, {
|
|
3997
3973
|
appearance: "tertiary",
|
|
3998
3974
|
size: "small",
|
|
3999
3975
|
onClick: A
|
|
4000
3976
|
}, {
|
|
4001
|
-
default:
|
|
4002
|
-
W(j(
|
|
3977
|
+
default: y(() => [
|
|
3978
|
+
W(j(g(a)("filter.clearAllButtonText")), 1)
|
|
4003
3979
|
]),
|
|
4004
3980
|
_: 1
|
|
4005
3981
|
})
|
|
@@ -4012,7 +3988,7 @@ const al = {
|
|
|
4012
3988
|
]));
|
|
4013
3989
|
};
|
|
4014
3990
|
}
|
|
4015
|
-
}),
|
|
3991
|
+
}), tl = /* @__PURE__ */ me(el, [["__scopeId", "data-v-15962ee2"]]), Ue = /* @__PURE__ */ te({
|
|
4016
3992
|
__name: "PermissionsWrapper",
|
|
4017
3993
|
props: {
|
|
4018
3994
|
/**
|
|
@@ -4034,7 +4010,7 @@ const al = {
|
|
|
4034
4010
|
}
|
|
4035
4011
|
},
|
|
4036
4012
|
setup(e) {
|
|
4037
|
-
const n = e, t =
|
|
4013
|
+
const n = e, t = O(void 0), a = $(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
4038
4014
|
return he(() => n.authFunction, async () => {
|
|
4039
4015
|
t.value = await n.authFunction();
|
|
4040
4016
|
}, { immediate: !0 }), (r, o) => a.value ? Y(r.$slots, "default", {
|
|
@@ -4042,16 +4018,16 @@ const al = {
|
|
|
4042
4018
|
isAllowed: t.value
|
|
4043
4019
|
}) : G("", !0);
|
|
4044
4020
|
}
|
|
4045
|
-
}),
|
|
4021
|
+
}), nl = { class: "form-section-wrapper" }, al = {
|
|
4046
4022
|
key: 0,
|
|
4047
4023
|
class: "form-section-title"
|
|
4048
|
-
},
|
|
4024
|
+
}, rl = {
|
|
4049
4025
|
key: 1,
|
|
4050
4026
|
class: "form-section-description"
|
|
4051
|
-
},
|
|
4027
|
+
}, ol = {
|
|
4052
4028
|
key: 2,
|
|
4053
4029
|
class: "form-section-footer"
|
|
4054
|
-
},
|
|
4030
|
+
}, il = { class: "form-section-content" }, sl = /* @__PURE__ */ te({
|
|
4055
4031
|
__name: "EntityFormSection",
|
|
4056
4032
|
props: {
|
|
4057
4033
|
title: {
|
|
@@ -4078,36 +4054,36 @@ const al = {
|
|
|
4078
4054
|
setup(e) {
|
|
4079
4055
|
const n = We();
|
|
4080
4056
|
return (t, a) => (m(), T("fieldset", {
|
|
4081
|
-
class:
|
|
4057
|
+
class: Ae(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4082
4058
|
}, [
|
|
4083
|
-
|
|
4059
|
+
K("div", nl, [
|
|
4084
4060
|
e.hideInfoHeader ? G("", !0) : (m(), T("div", {
|
|
4085
4061
|
key: 0,
|
|
4086
|
-
class:
|
|
4062
|
+
class: Ae(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4087
4063
|
}, [
|
|
4088
|
-
e.title ? (m(), T("h4",
|
|
4089
|
-
e.description ||
|
|
4064
|
+
e.title ? (m(), T("h4", al, j(e.title), 1)) : G("", !0),
|
|
4065
|
+
e.description || g(n).description ? (m(), T("div", rl, [
|
|
4090
4066
|
Y(t.$slots, "description", {}, () => [
|
|
4091
|
-
|
|
4067
|
+
K("p", null, j(e.description), 1)
|
|
4092
4068
|
], !0)
|
|
4093
4069
|
])) : G("", !0),
|
|
4094
|
-
|
|
4070
|
+
g(n).footer ? (m(), T("div", ol, [
|
|
4095
4071
|
Y(t.$slots, "footer", {}, void 0, !0)
|
|
4096
4072
|
])) : G("", !0)
|
|
4097
4073
|
], 2)),
|
|
4098
|
-
|
|
4074
|
+
K("div", il, [
|
|
4099
4075
|
Y(t.$slots, "default", {}, void 0, !0)
|
|
4100
4076
|
])
|
|
4101
4077
|
])
|
|
4102
4078
|
], 2));
|
|
4103
4079
|
}
|
|
4104
|
-
}),
|
|
4080
|
+
}), ll = /* @__PURE__ */ me(sl, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: St, useDeleteUrlBuilder: ul, useErrors: cl, useExternalLinkCreator: Fl, useFetchUrlBuilder: Kl, useFetcher: dl, useDebouncedFilter: pl, useStringHelpers: Nl, useHelpers: Bl, useGatewayFeatureSupported: ql, useTruncationDetector: Ll } = re, fl = { class: "add-consumer-form-container" }, ml = { class: "add-consumer-form-cta" }, gl = { class: "select-item-label" }, yl = {
|
|
4105
4081
|
key: 0,
|
|
4106
4082
|
class: "select-item-desc"
|
|
4107
|
-
},
|
|
4083
|
+
}, hl = {
|
|
4108
4084
|
key: 0,
|
|
4109
4085
|
class: "kong-ui-entity-add-consumers-error"
|
|
4110
|
-
},
|
|
4086
|
+
}, vl = { key: 0 }, bl = /* @__PURE__ */ te({
|
|
4111
4087
|
__name: "AddConsumerModal",
|
|
4112
4088
|
props: {
|
|
4113
4089
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4127,14 +4103,14 @@ const al = {
|
|
|
4127
4103
|
var B;
|
|
4128
4104
|
const t = e, { i18n: { t: a } } = Ze.useI18n(), { axiosInstance: r } = St({
|
|
4129
4105
|
headers: (B = t.config) == null ? void 0 : B.requestHeaders
|
|
4130
|
-
}), o =
|
|
4106
|
+
}), o = O([]), {
|
|
4131
4107
|
debouncedQueryChange: i,
|
|
4132
4108
|
loading: s,
|
|
4133
4109
|
allRecords: l,
|
|
4134
4110
|
error: u,
|
|
4135
4111
|
loadItems: d,
|
|
4136
4112
|
results: c
|
|
4137
|
-
} =
|
|
4113
|
+
} = pl(
|
|
4138
4114
|
t.config,
|
|
4139
4115
|
Se.list[t.config.app].all,
|
|
4140
4116
|
"",
|
|
@@ -4142,103 +4118,103 @@ const al = {
|
|
|
4142
4118
|
fetchedItemsKey: "data",
|
|
4143
4119
|
searchKeys: ["username", "id"]
|
|
4144
4120
|
}
|
|
4145
|
-
),
|
|
4146
|
-
label:
|
|
4147
|
-
value:
|
|
4148
|
-
selected: o.value.includes(
|
|
4149
|
-
data:
|
|
4121
|
+
), h = (I) => I, f = $(() => u.value ? a("consumers.errors.general") : ""), A = O(0), k = $(() => l.value === void 0), p = $(() => c.value.map((I) => ({
|
|
4122
|
+
label: I.username || I.customId,
|
|
4123
|
+
value: I.id,
|
|
4124
|
+
selected: o.value.includes(I.id),
|
|
4125
|
+
data: I
|
|
4150
4126
|
// we need this to determine whether or not to show the description text
|
|
4151
|
-
}))), S = (
|
|
4127
|
+
}))), S = (I) => {
|
|
4152
4128
|
var L;
|
|
4153
|
-
const
|
|
4154
|
-
return
|
|
4129
|
+
const E = k.value ? c.value.find((D) => D.id === I) : (L = l.value) == null ? void 0 : L.find((D) => D.id === I);
|
|
4130
|
+
return E ? E.username || E.custom_id : I;
|
|
4155
4131
|
}, v = () => {
|
|
4156
4132
|
w.value = "", q.value = [], C.value = [], n("cancel");
|
|
4157
|
-
}, q =
|
|
4133
|
+
}, q = O([]), _ = O(!1), w = O(""), N = async () => {
|
|
4158
4134
|
if (!o.value.length) {
|
|
4159
4135
|
w.value = "", C.value = [], n("cancel");
|
|
4160
4136
|
return;
|
|
4161
4137
|
}
|
|
4162
|
-
|
|
4138
|
+
_.value = !0, w.value = "", q.value = [], C.value = [];
|
|
4163
4139
|
try {
|
|
4164
|
-
const
|
|
4140
|
+
const I = o.value.map((D) => b(D)), E = await Promise.allSettled(I);
|
|
4165
4141
|
let L = !0;
|
|
4166
|
-
|
|
4142
|
+
E.forEach((D) => {
|
|
4167
4143
|
D.status !== "fulfilled" && (L = !1);
|
|
4168
|
-
}), L ? (q.value = [], C.value = [], n("add:success", o.value), o.value = []) : (q.value.length && n("add:partial-success", q.value), o.value = [],
|
|
4144
|
+
}), L ? (q.value = [], C.value = [], n("add:success", o.value), o.value = []) : (q.value.length && n("add:partial-success", q.value), o.value = [], V(E));
|
|
4169
4145
|
} catch {
|
|
4170
4146
|
w.value = a("consumers.errors.add"), n("error", w.value);
|
|
4171
4147
|
} finally {
|
|
4172
|
-
|
|
4148
|
+
_.value = !1;
|
|
4173
4149
|
}
|
|
4174
4150
|
}, U = $(() => {
|
|
4175
|
-
var
|
|
4176
|
-
let
|
|
4177
|
-
return t.config.app === "konnect" ?
|
|
4178
|
-
}), b = async (
|
|
4179
|
-
const
|
|
4180
|
-
consumer:
|
|
4151
|
+
var E, L, D, Z;
|
|
4152
|
+
let I = `${t.config.apiBaseUrl}${Se.list[t.config.app].forConsumerGroup}`;
|
|
4153
|
+
return t.config.app === "konnect" ? I = I.replace(/{controlPlaneId}/gi, ((E = t.config) == null ? void 0 : E.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((L = t.config) == null ? void 0 : L.consumerGroupId) || "") : t.config.app === "kongManager" && (I = I.replace(/\/{workspace}/gi, (D = t.config) != null && D.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((Z = t.config) == null ? void 0 : Z.consumerGroupId) || "")), I;
|
|
4154
|
+
}), b = async (I) => {
|
|
4155
|
+
const E = {
|
|
4156
|
+
consumer: I
|
|
4181
4157
|
};
|
|
4182
4158
|
try {
|
|
4183
|
-
const L = await r.post(U.value,
|
|
4184
|
-
return q.value.push(
|
|
4159
|
+
const L = await r.post(U.value, E);
|
|
4160
|
+
return q.value.push(I), L;
|
|
4185
4161
|
} catch (L) {
|
|
4186
|
-
let D = `${S(
|
|
4187
|
-
return L.response.status === 409 && (D = `${S(
|
|
4162
|
+
let D = `${S(I)} - ${L.message}`;
|
|
4163
|
+
return L.response.status === 409 && (D = `${S(I)} - ${a("consumers.errors.already_added")}`), Promise.reject(Error(D));
|
|
4188
4164
|
}
|
|
4189
|
-
}, C =
|
|
4190
|
-
C.value =
|
|
4165
|
+
}, C = O([]), V = (I) => {
|
|
4166
|
+
C.value = I.map((E) => {
|
|
4191
4167
|
var L;
|
|
4192
|
-
return (L =
|
|
4168
|
+
return (L = E.reason) == null ? void 0 : L.message;
|
|
4193
4169
|
}).filter(Boolean);
|
|
4194
4170
|
};
|
|
4195
|
-
return he(
|
|
4171
|
+
return he(p, () => {
|
|
4196
4172
|
A.value++;
|
|
4197
4173
|
}, { immediate: !0, deep: !0 }), he(() => t.visible, () => {
|
|
4198
4174
|
t.visible && d();
|
|
4199
|
-
}, { immediate: !0 }), (
|
|
4200
|
-
const L =
|
|
4201
|
-
return m(),
|
|
4202
|
-
"action-pending":
|
|
4175
|
+
}, { immediate: !0 }), (I, E) => {
|
|
4176
|
+
const L = P("KMultiselect"), D = P("KAlert"), Z = P("KPrompt");
|
|
4177
|
+
return m(), R(Z, {
|
|
4178
|
+
"action-pending": _.value,
|
|
4203
4179
|
class: "kong-ui-entities-add-consumers-modal",
|
|
4204
4180
|
"data-testid": "add-consumer-modal",
|
|
4205
4181
|
"is-visible": e.visible,
|
|
4206
|
-
title:
|
|
4182
|
+
title: g(a)("consumers.consumer_groups.add.title"),
|
|
4207
4183
|
onCanceled: v,
|
|
4208
|
-
onProceed:
|
|
4184
|
+
onProceed: N
|
|
4209
4185
|
}, {
|
|
4210
|
-
"body-content":
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4186
|
+
"body-content": y(() => [
|
|
4187
|
+
K("div", fl, [
|
|
4188
|
+
K("p", ml, j(g(a)("consumers.consumer_groups.add.ctaText")), 1),
|
|
4189
|
+
F(L, {
|
|
4214
4190
|
modelValue: o.value,
|
|
4215
|
-
"onUpdate:modelValue":
|
|
4191
|
+
"onUpdate:modelValue": E[0] || (E[0] = (z) => o.value = z),
|
|
4216
4192
|
autosuggest: "",
|
|
4217
4193
|
"data-testid": "add-consumers-multiselect",
|
|
4218
|
-
"dropdown-footer-text": k.value ?
|
|
4219
|
-
items:
|
|
4220
|
-
label:
|
|
4221
|
-
loading:
|
|
4222
|
-
placeholder:
|
|
4223
|
-
readonly:
|
|
4194
|
+
"dropdown-footer-text": k.value ? g(a)("consumers.consumer_groups.add.footer") : void 0,
|
|
4195
|
+
items: p.value,
|
|
4196
|
+
label: g(a)("consumers.consumer_groups.add.consumers_label"),
|
|
4197
|
+
loading: g(s),
|
|
4198
|
+
placeholder: g(a)("consumers.consumer_groups.add.consumer_placeholder"),
|
|
4199
|
+
readonly: _.value,
|
|
4224
4200
|
required: "",
|
|
4225
4201
|
width: "100%",
|
|
4226
|
-
onQueryChange:
|
|
4202
|
+
onQueryChange: g(i)
|
|
4227
4203
|
}, {
|
|
4228
|
-
"item-template":
|
|
4229
|
-
|
|
4230
|
-
|
|
4204
|
+
"item-template": y(({ item: z }) => [
|
|
4205
|
+
K("div", gl, j(z.label), 1),
|
|
4206
|
+
h(z).data.username && h(z).data.custom_id ? (m(), T("div", yl, j(h(z).data.custom_id), 1)) : G("", !0)
|
|
4231
4207
|
]),
|
|
4232
4208
|
_: 1
|
|
4233
4209
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4234
|
-
w.value ||
|
|
4235
|
-
|
|
4236
|
-
alertMessage:
|
|
4237
|
-
|
|
4238
|
-
C.value.length ? (m(), T("ul",
|
|
4210
|
+
w.value || f.value || C.value.length ? (m(), T("div", hl, [
|
|
4211
|
+
F(D, { appearance: "danger" }, {
|
|
4212
|
+
alertMessage: y(() => [
|
|
4213
|
+
K("p", null, j(g(a)("consumers.errors.add")), 1),
|
|
4214
|
+
C.value.length ? (m(), T("ul", vl, [
|
|
4239
4215
|
(m(!0), T(fe, null, de(C.value, (z, Q) => (m(), T("li", { key: Q }, j(z), 1))), 128))
|
|
4240
4216
|
])) : G("", !0),
|
|
4241
|
-
|
|
4217
|
+
K("div", null, j(w.value || f.value), 1)
|
|
4242
4218
|
]),
|
|
4243
4219
|
_: 1
|
|
4244
4220
|
})
|
|
@@ -4254,7 +4230,7 @@ const al = {
|
|
|
4254
4230
|
for (const [a, r] of n)
|
|
4255
4231
|
t[a] = r;
|
|
4256
4232
|
return t;
|
|
4257
|
-
},
|
|
4233
|
+
}, kl = /* @__PURE__ */ xt(bl, [["__scopeId", "data-v-68cc6403"]]), Cl = { class: "kong-ui-entities-consumers-list" }, wl = { key: 1 }, Il = /* @__PURE__ */ te({
|
|
4258
4234
|
__name: "ConsumerList",
|
|
4259
4235
|
props: {
|
|
4260
4236
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4303,17 +4279,17 @@ const al = {
|
|
|
4303
4279
|
var Ft;
|
|
4304
4280
|
const t = e, { i18nT: a, i18n: { t: r } } = Ze.useI18n(), o = gt(), { axiosInstance: i } = St({
|
|
4305
4281
|
headers: (Ft = t.config) == null ? void 0 : Ft.requestHeaders
|
|
4306
|
-
}), s =
|
|
4282
|
+
}), s = O(1), l = $(() => !!t.config.consumerGroupId), u = $(() => t.config.app !== "kongManager" || !!t.config.disableSorting), d = {
|
|
4307
4283
|
username: { label: r("consumers.list.table_headers.username"), searchable: !0, sortable: !0 },
|
|
4308
4284
|
custom_id: { label: r("consumers.list.table_headers.custom_id"), searchable: !0, sortable: !0 },
|
|
4309
4285
|
tags: { label: r("consumers.list.table_headers.tags"), sortable: !1 }
|
|
4310
|
-
}, c = d,
|
|
4286
|
+
}, c = d, h = (x) => ({
|
|
4311
4287
|
"data-testid": x.username ?? x.custom_id ?? x.id
|
|
4312
|
-
}),
|
|
4288
|
+
}), f = $(() => {
|
|
4313
4289
|
var H, ee, ue, ge;
|
|
4314
4290
|
let x = `${t.config.apiBaseUrl}${Se.list[t.config.app][l.value ? "forConsumerGroup" : "all"]}`;
|
|
4315
4291
|
return t.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((H = t.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((ee = t.config) == null ? void 0 : ee.consumerGroupId) || "") : t.config.app === "kongManager" && (x = x.replace(/\/{workspace}/gi, (ue = t.config) != null && ue.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ge = t.config) == null ? void 0 : ge.consumerGroupId) || "")), x;
|
|
4316
|
-
}), A =
|
|
4292
|
+
}), A = O(""), k = $(() => {
|
|
4317
4293
|
const x = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4318
4294
|
return x ? {
|
|
4319
4295
|
isExactMatch: x,
|
|
@@ -4326,11 +4302,11 @@ const al = {
|
|
|
4326
4302
|
},
|
|
4327
4303
|
schema: t.config.filterSchema
|
|
4328
4304
|
};
|
|
4329
|
-
}),
|
|
4305
|
+
}), p = $(() => l.value ? "consumers" : void 0), { fetcher: S, fetcherState: v } = dl(t.config, f.value, p.value), q = () => {
|
|
4330
4306
|
A.value = "";
|
|
4331
|
-
},
|
|
4307
|
+
}, _ = () => {
|
|
4332
4308
|
s.value++;
|
|
4333
|
-
}, w = (x) => x ?? "-",
|
|
4309
|
+
}, w = (x) => x ?? "-", N = O(null), U = (x, H) => {
|
|
4334
4310
|
const ee = x.id;
|
|
4335
4311
|
if (!H(ee)) {
|
|
4336
4312
|
n("copy:error", {
|
|
@@ -4361,68 +4337,68 @@ const al = {
|
|
|
4361
4337
|
}, C = async (x) => {
|
|
4362
4338
|
var ee;
|
|
4363
4339
|
await ((ee = t.canRetrieve) == null ? void 0 : ee.call(t, x)) && o.push(t.config.getViewRoute(x.id));
|
|
4364
|
-
},
|
|
4340
|
+
}, V = (x) => ({
|
|
4365
4341
|
label: r("consumers.actions.view"),
|
|
4366
4342
|
to: t.config.getViewRoute(x)
|
|
4367
4343
|
}), B = (x) => ({
|
|
4368
4344
|
label: r("consumers.actions.edit"),
|
|
4369
4345
|
to: t.config.getEditRoute(x)
|
|
4370
|
-
}),
|
|
4371
|
-
|
|
4346
|
+
}), I = O(void 0), E = O(!1), L = O(!1), D = O(""), Z = ul(t.config, f.value), z = (x) => {
|
|
4347
|
+
I.value = x, E.value = !0;
|
|
4372
4348
|
}, Q = () => {
|
|
4373
|
-
|
|
4374
|
-
},
|
|
4349
|
+
E.value = !1;
|
|
4350
|
+
}, le = async () => {
|
|
4375
4351
|
var x, H, ee;
|
|
4376
|
-
if ((x =
|
|
4352
|
+
if ((x = I.value) != null && x.id) {
|
|
4377
4353
|
L.value = !0;
|
|
4378
4354
|
try {
|
|
4379
|
-
await i.delete(Z(
|
|
4355
|
+
await i.delete(Z(I.value.id)), L.value = !1, E.value = !1, s.value++, n("delete:success", I.value);
|
|
4380
4356
|
} catch (ue) {
|
|
4381
4357
|
D.value = ((ee = (H = ue.response) == null ? void 0 : H.data) == null ? void 0 : ee.message) || ue.message || r("consumers.errors.delete"), n("error", ue);
|
|
4382
4358
|
} finally {
|
|
4383
4359
|
L.value = !1;
|
|
4384
4360
|
}
|
|
4385
4361
|
}
|
|
4386
|
-
}, Xe =
|
|
4362
|
+
}, Xe = O(!1), Tt = () => {
|
|
4387
4363
|
Xe.value = !0;
|
|
4388
4364
|
}, $t = () => {
|
|
4389
4365
|
Xe.value = !1;
|
|
4390
4366
|
}, jt = (x, H) => {
|
|
4391
4367
|
H || $t(), s.value++, n("add:success", x);
|
|
4392
|
-
},
|
|
4368
|
+
}, sa = () => {
|
|
4393
4369
|
l.value && Tt();
|
|
4394
|
-
}, ve =
|
|
4370
|
+
}, ve = O(void 0), et = O(!1), la = O(""), ua = (x) => {
|
|
4395
4371
|
ve.value = x, et.value = !0;
|
|
4396
|
-
},
|
|
4372
|
+
}, Mt = () => {
|
|
4397
4373
|
et.value = !1, ve.value = void 0;
|
|
4398
4374
|
}, ca = $(() => {
|
|
4399
4375
|
var H, ee, ue, ge;
|
|
4400
4376
|
let x = `${t.config.apiBaseUrl}${Se.list[t.config.app].oneForConsumerGroup}`;
|
|
4401
4377
|
return t.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((H = t.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((ee = t.config) == null ? void 0 : ee.consumerGroupId) || "") : t.config.app === "kongManager" && (x = x.replace(/\/{workspace}/gi, (ue = t.config) != null && ue.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ge = t.config) == null ? void 0 : ge.consumerGroupId) || "")), x;
|
|
4402
|
-
}),
|
|
4378
|
+
}), Ot = O(!1), da = async () => {
|
|
4403
4379
|
if (ve.value) {
|
|
4404
|
-
|
|
4380
|
+
Ot.value = !0;
|
|
4405
4381
|
try {
|
|
4406
4382
|
const x = ca.value.replace(/{consumerId}/gi, ve.value.id);
|
|
4407
|
-
await i.delete(x), n("remove:success", ve.value),
|
|
4383
|
+
await i.delete(x), n("remove:success", ve.value), Mt(), s.value++;
|
|
4408
4384
|
} catch (x) {
|
|
4409
|
-
|
|
4385
|
+
la.value = x.message || r("consumers.errors.delete"), n("error", x);
|
|
4410
4386
|
} finally {
|
|
4411
|
-
|
|
4387
|
+
Ot.value = !1;
|
|
4412
4388
|
}
|
|
4413
4389
|
}
|
|
4414
|
-
},
|
|
4390
|
+
}, Et = O(!0);
|
|
4415
4391
|
he(v, (x) => {
|
|
4416
4392
|
var H, ee, ue, ge;
|
|
4417
|
-
if (Array.isArray((H = x == null ? void 0 : x.response) == null ? void 0 : H.data) && (
|
|
4418
|
-
|
|
4393
|
+
if (Array.isArray((H = x == null ? void 0 : x.response) == null ? void 0 : H.data) && (Et.value = x.response.data.length > 0), x.status === Ie.Error) {
|
|
4394
|
+
N.value = {
|
|
4419
4395
|
title: r("consumers.errors.general")
|
|
4420
|
-
}, (ge = (ue = (ee = x.error) == null ? void 0 : ee.response) == null ? void 0 : ue.data) != null && ge.message && (
|
|
4396
|
+
}, (ge = (ue = (ee = x.error) == null ? void 0 : ee.response) == null ? void 0 : ue.data) != null && ge.message && (N.value.message = x.error.response.data.message), n("error", x.error);
|
|
4421
4397
|
return;
|
|
4422
4398
|
}
|
|
4423
|
-
|
|
4399
|
+
N.value = null;
|
|
4424
4400
|
});
|
|
4425
|
-
const tt =
|
|
4401
|
+
const tt = O({
|
|
4426
4402
|
ctaPath: l.value ? void 0 : t.config.createRoute,
|
|
4427
4403
|
ctaText: void 0,
|
|
4428
4404
|
message: r("consumers.list.empty_state.description"),
|
|
@@ -4431,152 +4407,152 @@ const al = {
|
|
|
4431
4407
|
return mt(async () => {
|
|
4432
4408
|
await t.canCreate() && (tt.value.title = l.value ? r("consumers.list.empty_state.title_for_consumer_group") : r("consumers.list.empty_state.title"), tt.value.ctaText = l.value ? r("consumers.actions.add_consumer") : r("consumers.actions.create"));
|
|
4433
4409
|
}), (x, H) => {
|
|
4434
|
-
const ee =
|
|
4435
|
-
return m(), T("div",
|
|
4436
|
-
|
|
4410
|
+
const ee = P("KButton"), ue = P("KBadge"), ge = P("KTruncate"), Ke = P("KDropdownItem"), Kt = P("KClipboardProvider"), pa = P("KPrompt");
|
|
4411
|
+
return m(), T("div", Cl, [
|
|
4412
|
+
F(g(Bs), {
|
|
4437
4413
|
"cache-identifier": e.cacheIdentifier,
|
|
4438
4414
|
"disable-pagination": l.value,
|
|
4439
4415
|
"disable-pagination-page-jump": "",
|
|
4440
4416
|
"disable-sorting": u.value,
|
|
4441
4417
|
"empty-state-options": tt.value,
|
|
4442
4418
|
"enable-entity-actions": "",
|
|
4443
|
-
"error-message":
|
|
4444
|
-
fetcher:
|
|
4419
|
+
"error-message": N.value,
|
|
4420
|
+
fetcher: g(S),
|
|
4445
4421
|
"fetcher-cache-key": s.value,
|
|
4446
4422
|
"pagination-type": "offset",
|
|
4447
4423
|
"preferences-storage-key": "kong-ui-entities-consumers-list",
|
|
4448
4424
|
query: A.value,
|
|
4449
|
-
"row-attributes":
|
|
4450
|
-
"table-headers":
|
|
4425
|
+
"row-attributes": h,
|
|
4426
|
+
"table-headers": g(c),
|
|
4451
4427
|
"use-action-outside": e.useActionOutside,
|
|
4452
4428
|
onClearSearchInput: q,
|
|
4453
4429
|
"onClick:row": H[3] || (H[3] = (J) => C(J)),
|
|
4454
|
-
onEmptyStateCtaClicked:
|
|
4455
|
-
onSort:
|
|
4430
|
+
onEmptyStateCtaClicked: sa,
|
|
4431
|
+
onSort: _
|
|
4456
4432
|
}, {
|
|
4457
|
-
"toolbar-filter":
|
|
4458
|
-
l.value ? G("", !0) : (m(),
|
|
4433
|
+
"toolbar-filter": y(() => [
|
|
4434
|
+
l.value ? G("", !0) : (m(), R(g(tl), {
|
|
4459
4435
|
key: 0,
|
|
4460
4436
|
modelValue: A.value,
|
|
4461
4437
|
"onUpdate:modelValue": H[0] || (H[0] = (J) => A.value = J),
|
|
4462
4438
|
config: k.value
|
|
4463
4439
|
}, null, 8, ["modelValue", "config"]))
|
|
4464
4440
|
]),
|
|
4465
|
-
"toolbar-button":
|
|
4466
|
-
(m(),
|
|
4441
|
+
"toolbar-button": y(() => [
|
|
4442
|
+
(m(), R(ka, {
|
|
4467
4443
|
disabled: !e.useActionOutside,
|
|
4468
4444
|
to: "#kong-ui-app-page-header-action-button"
|
|
4469
4445
|
}, [
|
|
4470
|
-
|
|
4446
|
+
F(g(Ue), {
|
|
4471
4447
|
"auth-function": () => e.canCreate()
|
|
4472
4448
|
}, {
|
|
4473
|
-
default:
|
|
4474
|
-
Be(
|
|
4449
|
+
default: y(() => [
|
|
4450
|
+
Be(F(ee, {
|
|
4475
4451
|
appearance: "primary",
|
|
4476
4452
|
"data-testid": "toolbar-add-consumer",
|
|
4477
4453
|
icon: "plus",
|
|
4478
4454
|
to: e.config.consumerGroupId ? void 0 : e.config.createRoute,
|
|
4479
4455
|
onClick: H[1] || (H[1] = () => e.config.consumerGroupId ? Tt() : void 0)
|
|
4480
4456
|
}, {
|
|
4481
|
-
default:
|
|
4482
|
-
W(j(e.config.consumerGroupId ?
|
|
4457
|
+
default: y(() => [
|
|
4458
|
+
W(j(e.config.consumerGroupId ? g(r)("consumers.actions.add_consumer") : g(r)("consumers.list.toolbar_actions.new_consumer")), 1)
|
|
4483
4459
|
]),
|
|
4484
4460
|
_: 1
|
|
4485
4461
|
}, 8, ["to"]), [
|
|
4486
|
-
[qe,
|
|
4462
|
+
[qe, Et.value]
|
|
4487
4463
|
])
|
|
4488
4464
|
]),
|
|
4489
4465
|
_: 1
|
|
4490
4466
|
}, 8, ["auth-function"])
|
|
4491
4467
|
], 8, ["disabled"]))
|
|
4492
4468
|
]),
|
|
4493
|
-
username:
|
|
4494
|
-
|
|
4469
|
+
username: y(({ rowValue: J }) => [
|
|
4470
|
+
K("b", null, j(w(J)), 1)
|
|
4495
4471
|
]),
|
|
4496
|
-
custom_id:
|
|
4472
|
+
custom_id: y(({ rowValue: J }) => [
|
|
4497
4473
|
W(j(w(J)), 1)
|
|
4498
4474
|
]),
|
|
4499
|
-
tags:
|
|
4500
|
-
J && J.length > 0 ? (m(),
|
|
4501
|
-
default:
|
|
4502
|
-
(m(!0), T(fe, null, de(J, (xe) => (m(),
|
|
4475
|
+
tags: y(({ rowValue: J }) => [
|
|
4476
|
+
J && J.length > 0 ? (m(), R(ge, { key: 0 }, {
|
|
4477
|
+
default: y(() => [
|
|
4478
|
+
(m(!0), T(fe, null, de(J, (xe) => (m(), R(ue, {
|
|
4503
4479
|
key: xe,
|
|
4504
4480
|
onClick: H[2] || (H[2] = De(() => {
|
|
4505
4481
|
}, ["stop"]))
|
|
4506
4482
|
}, {
|
|
4507
|
-
default:
|
|
4483
|
+
default: y(() => [
|
|
4508
4484
|
W(j(xe), 1)
|
|
4509
4485
|
]),
|
|
4510
4486
|
_: 2
|
|
4511
4487
|
}, 1024))), 128))
|
|
4512
4488
|
]),
|
|
4513
4489
|
_: 2
|
|
4514
|
-
}, 1024)) : (m(), T("span",
|
|
4490
|
+
}, 1024)) : (m(), T("span", wl, "-"))
|
|
4515
4491
|
]),
|
|
4516
|
-
actions:
|
|
4517
|
-
|
|
4518
|
-
default:
|
|
4519
|
-
|
|
4492
|
+
actions: y(({ row: J }) => [
|
|
4493
|
+
F(Kt, null, {
|
|
4494
|
+
default: y(({ copyToClipboard: xe }) => [
|
|
4495
|
+
F(Ke, {
|
|
4520
4496
|
"data-testid": "action-entity-copy-id",
|
|
4521
4497
|
onClick: (fa) => U(J, xe)
|
|
4522
4498
|
}, {
|
|
4523
|
-
default:
|
|
4524
|
-
W(j(
|
|
4499
|
+
default: y(() => [
|
|
4500
|
+
W(j(g(r)("consumers.actions.copy_id")), 1)
|
|
4525
4501
|
]),
|
|
4526
4502
|
_: 2
|
|
4527
4503
|
}, 1032, ["onClick"])
|
|
4528
4504
|
]),
|
|
4529
4505
|
_: 2
|
|
4530
4506
|
}, 1024),
|
|
4531
|
-
|
|
4532
|
-
default:
|
|
4533
|
-
|
|
4507
|
+
F(Kt, null, {
|
|
4508
|
+
default: y(({ copyToClipboard: xe }) => [
|
|
4509
|
+
F(Ke, {
|
|
4534
4510
|
"data-testid": "action-entity-copy-json",
|
|
4535
4511
|
onClick: (fa) => b(J, xe)
|
|
4536
4512
|
}, {
|
|
4537
|
-
default:
|
|
4538
|
-
W(j(
|
|
4513
|
+
default: y(() => [
|
|
4514
|
+
W(j(g(r)("consumers.actions.copy_json")), 1)
|
|
4539
4515
|
]),
|
|
4540
4516
|
_: 2
|
|
4541
4517
|
}, 1032, ["onClick"])
|
|
4542
4518
|
]),
|
|
4543
4519
|
_: 2
|
|
4544
4520
|
}, 1024),
|
|
4545
|
-
|
|
4521
|
+
F(g(Ue), {
|
|
4546
4522
|
"auth-function": () => e.canRetrieve(J)
|
|
4547
4523
|
}, {
|
|
4548
|
-
default:
|
|
4549
|
-
|
|
4524
|
+
default: y(() => [
|
|
4525
|
+
F(Ke, {
|
|
4550
4526
|
"data-testid": "action-entity-view",
|
|
4551
4527
|
"has-divider": "",
|
|
4552
|
-
item:
|
|
4528
|
+
item: V(J.id)
|
|
4553
4529
|
}, null, 8, ["item"])
|
|
4554
4530
|
]),
|
|
4555
4531
|
_: 2
|
|
4556
4532
|
}, 1032, ["auth-function"]),
|
|
4557
|
-
|
|
4533
|
+
F(g(Ue), {
|
|
4558
4534
|
"auth-function": () => e.canEdit(J)
|
|
4559
4535
|
}, {
|
|
4560
|
-
default:
|
|
4561
|
-
|
|
4536
|
+
default: y(() => [
|
|
4537
|
+
F(Ke, {
|
|
4562
4538
|
"data-testid": "action-entity-edit",
|
|
4563
4539
|
item: B(J.id)
|
|
4564
4540
|
}, null, 8, ["item"])
|
|
4565
4541
|
]),
|
|
4566
4542
|
_: 2
|
|
4567
4543
|
}, 1032, ["auth-function"]),
|
|
4568
|
-
|
|
4544
|
+
F(g(Ue), {
|
|
4569
4545
|
"auth-function": () => e.canDelete(J)
|
|
4570
4546
|
}, {
|
|
4571
|
-
default:
|
|
4572
|
-
|
|
4547
|
+
default: y(() => [
|
|
4548
|
+
F(Ke, {
|
|
4573
4549
|
danger: "",
|
|
4574
4550
|
"data-testid": "action-entity-delete",
|
|
4575
4551
|
"has-divider": "",
|
|
4576
4552
|
onClick: () => e.config.consumerGroupId ? ua(J) : z(J)
|
|
4577
4553
|
}, {
|
|
4578
|
-
default:
|
|
4579
|
-
W(j(e.config.consumerGroupId ?
|
|
4554
|
+
default: y(() => [
|
|
4555
|
+
W(j(e.config.consumerGroupId ? g(r)("consumers.actions.remove") : g(r)("consumers.actions.delete")), 1)
|
|
4580
4556
|
]),
|
|
4581
4557
|
_: 2
|
|
4582
4558
|
}, 1032, ["onClick"])
|
|
@@ -4586,19 +4562,19 @@ const al = {
|
|
|
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
|
-
|
|
4565
|
+
F(g(Vs), {
|
|
4590
4566
|
"action-pending": L.value,
|
|
4591
4567
|
"data-testid": "delete-consumer-modal",
|
|
4592
|
-
description:
|
|
4593
|
-
"entity-name":
|
|
4594
|
-
"entity-type":
|
|
4568
|
+
description: g(r)("consumers.delete.description"),
|
|
4569
|
+
"entity-name": I.value && (I.value.username || I.value.custom_id || I.value.id),
|
|
4570
|
+
"entity-type": g(fn).Consumer,
|
|
4595
4571
|
error: D.value,
|
|
4596
|
-
title:
|
|
4597
|
-
visible:
|
|
4572
|
+
title: g(r)("consumers.delete.title"),
|
|
4573
|
+
visible: E.value,
|
|
4598
4574
|
onCancel: Q,
|
|
4599
|
-
onProceed:
|
|
4575
|
+
onProceed: le
|
|
4600
4576
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4601
|
-
e.config.consumerGroupId ? (m(),
|
|
4577
|
+
e.config.consumerGroupId ? (m(), R(kl, {
|
|
4602
4578
|
key: 0,
|
|
4603
4579
|
config: e.config,
|
|
4604
4580
|
"data-testid": "add-consumer-modal",
|
|
@@ -4607,42 +4583,42 @@ const al = {
|
|
|
4607
4583
|
"onAdd:success": H[5] || (H[5] = (J) => jt(J)),
|
|
4608
4584
|
onCancel: $t
|
|
4609
4585
|
}, null, 8, ["config", "visible"])) : G("", !0),
|
|
4610
|
-
e.config.consumerGroupId && ve.value ? (m(),
|
|
4586
|
+
e.config.consumerGroupId && ve.value ? (m(), R(pa, {
|
|
4611
4587
|
key: 1,
|
|
4612
4588
|
"data-testid": "remove-consumer-modal",
|
|
4613
4589
|
"is-visible": et.value,
|
|
4614
|
-
title:
|
|
4590
|
+
title: g(r)("consumers.consumer_groups.remove.title"),
|
|
4615
4591
|
type: "danger",
|
|
4616
|
-
onCanceled:
|
|
4592
|
+
onCanceled: Mt,
|
|
4617
4593
|
onProceed: da
|
|
4618
4594
|
}, {
|
|
4619
|
-
"body-content":
|
|
4620
|
-
|
|
4595
|
+
"body-content": y(() => [
|
|
4596
|
+
F(g(a), {
|
|
4621
4597
|
class: "message",
|
|
4622
4598
|
keypath: e.config.consumerGroupName ? "consumers.consumer_groups.remove.confirmation" : "consumers.consumer_groups.remove.confirmationNoCG",
|
|
4623
4599
|
tag: "p"
|
|
4624
4600
|
}, ke({
|
|
4625
|
-
consumer:
|
|
4626
|
-
|
|
4601
|
+
consumer: y(() => [
|
|
4602
|
+
K("strong", null, j(ve.value.username || ve.value.custom_id || ve.value.id), 1)
|
|
4627
4603
|
]),
|
|
4628
4604
|
_: 2
|
|
4629
4605
|
}, [
|
|
4630
4606
|
e.config.consumerGroupName ? {
|
|
4631
4607
|
name: "consumerGroup",
|
|
4632
|
-
fn:
|
|
4633
|
-
|
|
4608
|
+
fn: y(() => [
|
|
4609
|
+
K("strong", null, j(e.config.consumerGroupName), 1)
|
|
4634
4610
|
]),
|
|
4635
4611
|
key: "0"
|
|
4636
4612
|
} : void 0
|
|
4637
4613
|
]), 1032, ["keypath"]),
|
|
4638
|
-
|
|
4614
|
+
K("p", null, j(g(r)("consumers.consumer_groups.remove.description")), 1)
|
|
4639
4615
|
]),
|
|
4640
4616
|
_: 1
|
|
4641
4617
|
}, 8, ["is-visible", "title"])) : G("", !0)
|
|
4642
4618
|
]);
|
|
4643
4619
|
};
|
|
4644
4620
|
}
|
|
4645
|
-
}),
|
|
4621
|
+
}), Pl = /* @__PURE__ */ xt(Il, [["__scopeId", "data-v-245027d1"]]), _l = { class: "kong-ui-entities-consumer-form" }, Al = { class: "fields-group-title" }, Sl = { class: "fields-group-text" }, xl = /* @__PURE__ */ te({
|
|
4646
4622
|
__name: "ConsumerForm",
|
|
4647
4623
|
props: {
|
|
4648
4624
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4660,10 +4636,10 @@ const al = {
|
|
|
4660
4636
|
},
|
|
4661
4637
|
emits: ["update", "error", "loading"],
|
|
4662
4638
|
setup(e, { emit: n }) {
|
|
4663
|
-
var
|
|
4639
|
+
var _;
|
|
4664
4640
|
const t = e, { i18nT: a, i18n: { t: r } } = Ze.useI18n(), o = gt(), { axiosInstance: i } = St({
|
|
4665
|
-
headers: (
|
|
4666
|
-
}), { getMessageFromError: s } =
|
|
4641
|
+
headers: (_ = t.config) == null ? void 0 : _.requestHeaders
|
|
4642
|
+
}), { getMessageFromError: s } = cl(), l = Nt({
|
|
4667
4643
|
fields: {
|
|
4668
4644
|
username: "",
|
|
4669
4645
|
customId: "",
|
|
@@ -4671,50 +4647,50 @@ const al = {
|
|
|
4671
4647
|
},
|
|
4672
4648
|
readonly: !1,
|
|
4673
4649
|
errorMessage: ""
|
|
4674
|
-
}), u =
|
|
4650
|
+
}), u = Nt({
|
|
4675
4651
|
username: "",
|
|
4676
4652
|
customId: "",
|
|
4677
4653
|
tags: ""
|
|
4678
4654
|
}), d = $(() => {
|
|
4679
|
-
var w,
|
|
4680
|
-
return (
|
|
4655
|
+
var w, N;
|
|
4656
|
+
return (N = Se.form[(w = t.config) == null ? void 0 : w.app]) == null ? void 0 : N.edit;
|
|
4681
4657
|
}), c = () => {
|
|
4682
4658
|
var w;
|
|
4683
4659
|
o.push(((w = t.config) == null ? void 0 : w.cancelRoute) || { name: "consumer-list" });
|
|
4684
|
-
},
|
|
4660
|
+
}, h = (w) => {
|
|
4685
4661
|
n("loading", w);
|
|
4686
|
-
},
|
|
4662
|
+
}, f = (w) => {
|
|
4687
4663
|
n("error", w);
|
|
4688
4664
|
}, A = (w) => {
|
|
4689
4665
|
var U, b, C;
|
|
4690
4666
|
l.fields.username = ((U = w == null ? void 0 : w.item) == null ? void 0 : U.username) || (w == null ? void 0 : w.username) || "", l.fields.customId = ((b = w == null ? void 0 : w.item) == null ? void 0 : b.custom_id) || (w == null ? void 0 : w.custom_id) || "";
|
|
4691
|
-
const
|
|
4692
|
-
l.fields.tags = (
|
|
4693
|
-
}, k = $(() => t.consumerId ?
|
|
4694
|
-
var U, b, C,
|
|
4695
|
-
let
|
|
4696
|
-
return ((C = t.config) == null ? void 0 : C.app) === "konnect" ?
|
|
4667
|
+
const N = ((C = w == null ? void 0 : w.item) == null ? void 0 : C.tags) || (w == null ? void 0 : w.tags) || [];
|
|
4668
|
+
l.fields.tags = (N == null ? void 0 : N.join(", ")) || "", Object.assign(u, l.fields);
|
|
4669
|
+
}, k = $(() => t.consumerId ? lt.Edit : lt.Create), p = (w) => {
|
|
4670
|
+
var U, b, C, V, B, I;
|
|
4671
|
+
let N = `${(U = t.config) == null ? void 0 : U.apiBaseUrl}${Se.form[(b = t.config) == null ? void 0 : b.app][w]}`;
|
|
4672
|
+
return ((C = t.config) == null ? void 0 : C.app) === "konnect" ? N = N.replace(/{controlPlaneId}/gi, ((V = t.config) == null ? void 0 : V.controlPlaneId) || "") : ((B = t.config) == null ? void 0 : B.app) === "kongManager" && (N = N.replace(/\/{workspace}/gi, (I = t.config) != null && I.workspace ? `/${t.config.workspace}` : "")), N = N.replace(/{id}/gi, t.consumerId), N;
|
|
4697
4673
|
}, S = $(() => !!l.fields.username || !!l.fields.customId), v = $(() => JSON.stringify(l.fields) !== JSON.stringify(u)), q = async () => {
|
|
4698
|
-
var w,
|
|
4674
|
+
var w, N, U;
|
|
4699
4675
|
try {
|
|
4700
4676
|
l.readonly = !0;
|
|
4701
4677
|
const b = {
|
|
4702
4678
|
username: l.fields.username || null,
|
|
4703
4679
|
custom_id: l.fields.customId || null,
|
|
4704
|
-
tags: (
|
|
4680
|
+
tags: (N = (w = l.fields.tags.split(",")) == null ? void 0 : w.map((V) => String(V || "").trim())) == null ? void 0 : N.filter((V) => V !== "")
|
|
4705
4681
|
};
|
|
4706
4682
|
let C;
|
|
4707
|
-
await i.post(
|
|
4683
|
+
await i.post(p("validate"), b), k.value === "create" ? C = await i.post(p("create"), b) : k.value === "edit" && (C = ((U = t.config) == null ? void 0 : U.app) === "konnect" ? await i.put(p("edit"), b) : await i.patch(p("edit"), b)), A(C == null ? void 0 : C.data), n("update", C == null ? void 0 : C.data);
|
|
4708
4684
|
} catch (b) {
|
|
4709
4685
|
l.errorMessage = s(b), n("error", b);
|
|
4710
4686
|
} finally {
|
|
4711
4687
|
l.readonly = !1;
|
|
4712
4688
|
}
|
|
4713
4689
|
};
|
|
4714
|
-
return (w,
|
|
4715
|
-
const U =
|
|
4716
|
-
return m(), T("div",
|
|
4717
|
-
|
|
4690
|
+
return (w, N) => {
|
|
4691
|
+
const U = P("KInput"), b = P("KCard");
|
|
4692
|
+
return m(), T("div", _l, [
|
|
4693
|
+
F(g($s), {
|
|
4718
4694
|
"can-submit": S.value && v.value,
|
|
4719
4695
|
config: e.config,
|
|
4720
4696
|
"edit-id": e.consumerId,
|
|
@@ -4722,74 +4698,74 @@ const al = {
|
|
|
4722
4698
|
"fetch-url": d.value,
|
|
4723
4699
|
"is-readonly": l.readonly,
|
|
4724
4700
|
onCancel: c,
|
|
4725
|
-
"onFetch:error":
|
|
4701
|
+
"onFetch:error": N[3] || (N[3] = (C) => f(C)),
|
|
4726
4702
|
"onFetch:success": A,
|
|
4727
|
-
onLoading:
|
|
4703
|
+
onLoading: N[4] || (N[4] = (C) => h(C)),
|
|
4728
4704
|
onSubmit: q
|
|
4729
4705
|
}, {
|
|
4730
|
-
default:
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
description:
|
|
4706
|
+
default: y(() => [
|
|
4707
|
+
K("div", null, [
|
|
4708
|
+
F(g(ll), {
|
|
4709
|
+
description: g(r)("consumers.form.info.description"),
|
|
4734
4710
|
"has-divider": "",
|
|
4735
|
-
title:
|
|
4711
|
+
title: g(r)("consumers.form.info.title")
|
|
4736
4712
|
}, {
|
|
4737
|
-
default:
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4713
|
+
default: y(() => [
|
|
4714
|
+
K("div", null, [
|
|
4715
|
+
K("h5", Al, j(g(r)("consumers.form.consumer_identification.title")) + "* ", 1),
|
|
4716
|
+
K("p", Sl, j(g(r)("consumers.form.consumer_identification.description")), 1)
|
|
4741
4717
|
]),
|
|
4742
|
-
|
|
4743
|
-
default:
|
|
4744
|
-
|
|
4718
|
+
F(b, null, {
|
|
4719
|
+
default: y(() => [
|
|
4720
|
+
F(U, {
|
|
4745
4721
|
modelValue: l.fields.username,
|
|
4746
|
-
"onUpdate:modelValue":
|
|
4722
|
+
"onUpdate:modelValue": N[0] || (N[0] = (C) => l.fields.username = C),
|
|
4747
4723
|
modelModifiers: { trim: !0 },
|
|
4748
4724
|
autocomplete: "off",
|
|
4749
4725
|
class: "username-field",
|
|
4750
4726
|
"data-testid": "consumer-form-username",
|
|
4751
|
-
label:
|
|
4727
|
+
label: g(r)("consumers.fields.username.label"),
|
|
4752
4728
|
"label-attributes": {
|
|
4753
4729
|
tooltipAttributes: { maxWidth: "250" }
|
|
4754
4730
|
},
|
|
4755
|
-
placeholder:
|
|
4731
|
+
placeholder: g(r)("consumers.fields.username.placeholder"),
|
|
4756
4732
|
readonly: l.readonly,
|
|
4757
4733
|
type: "text"
|
|
4758
4734
|
}, {
|
|
4759
|
-
"label-tooltip":
|
|
4760
|
-
|
|
4735
|
+
"label-tooltip": y(() => [
|
|
4736
|
+
F(g(a), {
|
|
4761
4737
|
keypath: "consumers.fields.username.tooltip",
|
|
4762
4738
|
scope: "global"
|
|
4763
4739
|
}, {
|
|
4764
|
-
custom_id:
|
|
4765
|
-
|
|
4740
|
+
custom_id: y(() => [
|
|
4741
|
+
K("code", null, j(g(r)("consumers.fields.username.custom_id")), 1)
|
|
4766
4742
|
]),
|
|
4767
4743
|
_: 1
|
|
4768
4744
|
})
|
|
4769
4745
|
]),
|
|
4770
4746
|
_: 1
|
|
4771
4747
|
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
4772
|
-
|
|
4748
|
+
F(U, {
|
|
4773
4749
|
modelValue: l.fields.customId,
|
|
4774
|
-
"onUpdate:modelValue":
|
|
4750
|
+
"onUpdate:modelValue": N[1] || (N[1] = (C) => l.fields.customId = C),
|
|
4775
4751
|
modelModifiers: { trim: !0 },
|
|
4776
4752
|
autocomplete: "off",
|
|
4777
4753
|
"data-testid": "consumer-form-custom-id",
|
|
4778
|
-
label:
|
|
4754
|
+
label: g(r)("consumers.fields.custom_id.label"),
|
|
4779
4755
|
"label-attributes": {
|
|
4780
4756
|
tooltipAttributes: { maxWidth: "250" }
|
|
4781
4757
|
},
|
|
4782
|
-
placeholder:
|
|
4758
|
+
placeholder: g(r)("consumers.fields.custom_id.placeholder"),
|
|
4783
4759
|
readonly: l.readonly,
|
|
4784
4760
|
type: "text"
|
|
4785
4761
|
}, {
|
|
4786
|
-
"label-tooltip":
|
|
4787
|
-
|
|
4762
|
+
"label-tooltip": y(() => [
|
|
4763
|
+
F(g(a), {
|
|
4788
4764
|
keypath: "consumers.fields.custom_id.tooltip",
|
|
4789
4765
|
scope: "global"
|
|
4790
4766
|
}, {
|
|
4791
|
-
username:
|
|
4792
|
-
|
|
4767
|
+
username: y(() => [
|
|
4768
|
+
K("code", null, j(g(r)("consumers.fields.custom_id.username")), 1)
|
|
4793
4769
|
]),
|
|
4794
4770
|
_: 1
|
|
4795
4771
|
})
|
|
@@ -4799,19 +4775,19 @@ const al = {
|
|
|
4799
4775
|
]),
|
|
4800
4776
|
_: 1
|
|
4801
4777
|
}),
|
|
4802
|
-
|
|
4778
|
+
F(U, {
|
|
4803
4779
|
modelValue: l.fields.tags,
|
|
4804
|
-
"onUpdate:modelValue":
|
|
4780
|
+
"onUpdate:modelValue": N[2] || (N[2] = (C) => l.fields.tags = C),
|
|
4805
4781
|
modelModifiers: { trim: !0 },
|
|
4806
4782
|
autocomplete: "off",
|
|
4807
4783
|
"data-testid": "consumer-form-tags",
|
|
4808
|
-
help:
|
|
4809
|
-
label:
|
|
4784
|
+
help: g(r)("consumers.fields.tags.help"),
|
|
4785
|
+
label: g(r)("consumers.fields.tags.label"),
|
|
4810
4786
|
"label-attributes": {
|
|
4811
|
-
info:
|
|
4787
|
+
info: g(r)("consumers.fields.tags.tooltip"),
|
|
4812
4788
|
tooltipAttributes: { maxWidth: "250" }
|
|
4813
4789
|
},
|
|
4814
|
-
placeholder:
|
|
4790
|
+
placeholder: g(r)("consumers.fields.tags.placeholder"),
|
|
4815
4791
|
readonly: l.readonly,
|
|
4816
4792
|
type: "text"
|
|
4817
4793
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
@@ -4825,7 +4801,7 @@ const al = {
|
|
|
4825
4801
|
]);
|
|
4826
4802
|
};
|
|
4827
4803
|
}
|
|
4828
|
-
}),
|
|
4804
|
+
}), Vl = /* @__PURE__ */ xt(xl, [["__scopeId", "data-v-99612940"]]), Tl = { class: "kong-ui-consumer-entity-config-card" }, Rl = /* @__PURE__ */ te({
|
|
4829
4805
|
__name: "ConsumerConfigCard",
|
|
4830
4806
|
props: {
|
|
4831
4807
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4852,7 +4828,7 @@ const al = {
|
|
|
4852
4828
|
},
|
|
4853
4829
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
4854
4830
|
setup(e) {
|
|
4855
|
-
const n = e, { i18n: { t }, i18nT: a } = Ze.useI18n(), r = $(() => Se.form[n.config.app].edit), o =
|
|
4831
|
+
const n = e, { i18n: { t }, i18nT: a } = Ze.useI18n(), r = $(() => Se.form[n.config.app].edit), o = O({
|
|
4856
4832
|
id: {},
|
|
4857
4833
|
username: {
|
|
4858
4834
|
section: ce.Basic,
|
|
@@ -4877,8 +4853,8 @@ const al = {
|
|
|
4877
4853
|
hidden: !0
|
|
4878
4854
|
}
|
|
4879
4855
|
});
|
|
4880
|
-
return (i, s) => (m(), T("div",
|
|
4881
|
-
|
|
4856
|
+
return (i, s) => (m(), T("div", Tl, [
|
|
4857
|
+
F(g(As), {
|
|
4882
4858
|
config: e.config,
|
|
4883
4859
|
"config-card-doc": e.configCardDoc,
|
|
4884
4860
|
"config-schema": o.value,
|
|
@@ -4889,24 +4865,24 @@ const al = {
|
|
|
4889
4865
|
"onFetch:success": s[2] || (s[2] = (l) => i.$emit("fetch:success", l)),
|
|
4890
4866
|
onLoading: s[3] || (s[3] = (l) => i.$emit("loading", l))
|
|
4891
4867
|
}, {
|
|
4892
|
-
"username-label-tooltip":
|
|
4893
|
-
|
|
4868
|
+
"username-label-tooltip": y(() => [
|
|
4869
|
+
F(g(a), {
|
|
4894
4870
|
keypath: "consumers.fields.username.tooltip",
|
|
4895
4871
|
scope: "global"
|
|
4896
4872
|
}, {
|
|
4897
|
-
custom_id:
|
|
4898
|
-
|
|
4873
|
+
custom_id: y(() => [
|
|
4874
|
+
K("code", null, j(g(t)("consumers.fields.username.custom_id")), 1)
|
|
4899
4875
|
]),
|
|
4900
4876
|
_: 1
|
|
4901
4877
|
})
|
|
4902
4878
|
]),
|
|
4903
|
-
"custom_id-label-tooltip":
|
|
4904
|
-
|
|
4879
|
+
"custom_id-label-tooltip": y(() => [
|
|
4880
|
+
F(g(a), {
|
|
4905
4881
|
keypath: "consumers.fields.custom_id.tooltip",
|
|
4906
4882
|
scope: "global"
|
|
4907
4883
|
}, {
|
|
4908
|
-
username:
|
|
4909
|
-
|
|
4884
|
+
username: y(() => [
|
|
4885
|
+
K("code", null, j(g(t)("consumers.fields.custom_id.username")), 1)
|
|
4910
4886
|
]),
|
|
4911
4887
|
_: 1
|
|
4912
4888
|
})
|
|
@@ -4917,7 +4893,7 @@ const al = {
|
|
|
4917
4893
|
}
|
|
4918
4894
|
});
|
|
4919
4895
|
export {
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4896
|
+
Rl as ConsumerConfigCard,
|
|
4897
|
+
Vl as ConsumerForm,
|
|
4898
|
+
Pl as ConsumerList
|
|
4923
4899
|
};
|