@kong-ui-public/entities-shared 3.35.0 → 3.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-shared.es.js +915 -894
- package/dist/entities-shared.umd.js +26 -26
- package/dist/style.css +1 -1
- package/dist/types/components/common/DeckCodeBlock.vue.d.ts +4 -0
- package/dist/types/components/common/DeckCodeBlock.vue.d.ts.map +1 -1
- package/dist/types/components/entity-base-form/EntityBaseForm.vue.d.ts.map +1 -1
- package/dist/types/types/app-config.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { inject as qt, ref as N, computed as
|
|
1
|
+
import { inject as qt, ref as N, computed as S, unref as _, toValue as ge, watch as be, toRef as zn, provide as Ht, defineComponent as z, createBlock as K, openBlock as g, resolveDynamicComponent as je, normalizeClass as fe, withCtx as w, createElementBlock as $, createCommentVNode as D, createElementVNode as L, toDisplayString as I, Fragment as ue, renderList as ce, resolveComponent as j, createVNode as R, createTextVNode as q, useCssVars as Vt, useId as Qn, useSlots as Ue, renderSlot as U, createSlots as ke, normalizeProps as Zn, guardReactiveProps as Xn, mergeProps as Yt, onMounted as it, onBeforeMount as rt, withModifiers as Re, Teleport as Wt, onUnmounted as ei, withDirectives as Ce, vShow as xe, withKeys as ti, warn as ni } from "vue";
|
|
2
2
|
import mt from "axios";
|
|
3
3
|
import { createI18n as ii, i18nTComponent as ri } from "@kong-ui-public/i18n";
|
|
4
|
-
import { BadgeMethodAppearances as ai, KExternalLink as oi, KButton as
|
|
4
|
+
import { BadgeMethodAppearances as ai, KExternalLink as oi, KButton as gt, KTruncate as li, KBadge as si } from "@kong/kongponents";
|
|
5
5
|
import { createdBundledHighlighter as ci, createSingletonShorthands as ui } from "@shikijs/core";
|
|
6
6
|
import { createJavaScriptRegexEngine as di } from "@shikijs/engine-javascript";
|
|
7
|
-
import { BookIcon as Jt, LanguageShellIcon as
|
|
8
|
-
import { useRouter as
|
|
9
|
-
var
|
|
10
|
-
const qe = Object.values(
|
|
7
|
+
import { BookIcon as Jt, LanguageShellIcon as ht, LanguageBashIcon as yt, AddIcon as Gt, CloseIcon as fi, ChevronDownIcon as pi, CopyIcon as mi } from "@kong/icons";
|
|
8
|
+
import { useRouter as gi } from "vue-router";
|
|
9
|
+
var hi = /* @__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.Secret = "secret", e.RedisConfiguration = "redis configuration", e))(hi || {}), yi = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(yi || {}), me = /* @__PURE__ */ ((e) => (e[e.InitialLoad = 0] = "InitialLoad", e[e.Loading = 1] = "Loading", e[e.Idle = 2] = "Idle", e[e.NoResults = 3] = "NoResults", e[e.NoRecords = 4] = "NoRecords", e[e.Error = 5] = "Error", e))(me || {}), $e = /* @__PURE__ */ ((e) => (e.CaCertificate = "ca_certificate", e.Certificate = "certificate", e.Consumer = "consumer", e.ConsumerGroup = "consumer_group", e.GatewayService = "service", e.Key = "key", e.KeySet = "set", e.Plugin = "plugin", e.Route = "route", e.SNI = "sni", e.Upstream = "upstream", e.Target = "target", e.Vault = "vault", e.Partial = "partial", e.BackendCluster = "backend_cluster", e.VirtualCluster = "virtual_cluster", e.Listener = "listener", e.ProducePolicy = "produce_policy", e.ConsumePolicy = "consume_policy", e.ClusterPolicy = "cluster_policy", e.ListenerPolicy = "listener_policy", e.SchemaRegistry = "schema_registry", e.StaticKey = "static_key", e.AuthServer = "auth_server", e.AuthServerScopes = "auth_server_scopes", e.AuthServerClaims = "auth_server_claims", e.AuthServerClients = "auth_server_clients", e.Other = "other", e))($e || {});
|
|
10
|
+
const qe = Object.values($e), vi = [
|
|
11
11
|
"ca_certificate",
|
|
12
12
|
"certificate",
|
|
13
13
|
"consumer",
|
|
@@ -23,7 +23,7 @@ const qe = Object.values(Se), vi = [
|
|
|
23
23
|
"partial"
|
|
24
24
|
/* Partial */
|
|
25
25
|
], bi = ["backend_cluster", "virtual_cluster", "listener", "produce_policy", "consume_policy", "cluster_policy", "listener_policy", "schema_registry", "static_key"], ki = ["auth_server", "auth_server_scopes", "auth_server_claims", "auth_server_clients"];
|
|
26
|
-
var
|
|
26
|
+
var W = /* @__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.CopyBadge = "copy-badge", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(W || {}), ae = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e.Policy = "policy", e))(ae || {});
|
|
27
27
|
const vt = [
|
|
28
28
|
"primary",
|
|
29
29
|
"secondary"
|
|
@@ -211,7 +211,10 @@ const wi = {
|
|
|
211
211
|
confirmText: "Yes, disable"
|
|
212
212
|
}
|
|
213
213
|
}, Ki = {
|
|
214
|
-
hint:
|
|
214
|
+
hint: {
|
|
215
|
+
konnect: "The {token} environment variable must be added first. See {link} for details.",
|
|
216
|
+
kongManager: "If your Admin API is secured, set up authentication following {link}."
|
|
217
|
+
},
|
|
215
218
|
documentation: "the documentation"
|
|
216
219
|
}, Ni = {
|
|
217
220
|
global: wi,
|
|
@@ -283,11 +286,11 @@ function Mi(e, t, n, i = {
|
|
|
283
286
|
}) {
|
|
284
287
|
n || (n = "1000");
|
|
285
288
|
const { axiosInstance: r } = at(e.axiosRequestConfig), { i18n: { t: o } } = He(), { debounce: a } = xi(), l = a(async (B) => {
|
|
286
|
-
await
|
|
287
|
-
}, 200), s = N(!1), c = N(""), d = N(""), u = N([]), p = N([]), m = N(void 0), y =
|
|
288
|
-
const B = `${e.apiBaseUrl}${
|
|
289
|
+
await A(B);
|
|
290
|
+
}, 200), s = N(!1), c = N(""), d = N(""), u = N([]), p = N([]), m = N(void 0), y = S(() => {
|
|
291
|
+
const B = `${e.apiBaseUrl}${_(t)}`;
|
|
289
292
|
return e.app === "konnect" ? B.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? B.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : B;
|
|
290
|
-
}), { isValidUuid:
|
|
293
|
+
}), { isValidUuid: h } = zt(), b = async () => {
|
|
291
294
|
try {
|
|
292
295
|
s.value = !0;
|
|
293
296
|
const { data: B } = await r.get(`${y.value}?size=${n}`);
|
|
@@ -297,51 +300,51 @@ function Mi(e, t, n, i = {
|
|
|
297
300
|
} finally {
|
|
298
301
|
s.value = !1;
|
|
299
302
|
}
|
|
300
|
-
},
|
|
301
|
-
var
|
|
302
|
-
if (
|
|
303
|
-
if (
|
|
303
|
+
}, k = N(""), A = async (B) => {
|
|
304
|
+
var P, ee, M;
|
|
305
|
+
if (k.value !== B) {
|
|
306
|
+
if (k.value = B ?? "", !B) {
|
|
304
307
|
u.value = p.value;
|
|
305
308
|
return;
|
|
306
309
|
}
|
|
307
310
|
if (m.value === void 0)
|
|
308
311
|
try {
|
|
309
312
|
if (s.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
310
|
-
const
|
|
311
|
-
i.fetchedItemsKey in
|
|
313
|
+
const F = `${y.value}/${B}`, { data: x } = await r.get(`${F}?size=${n}`);
|
|
314
|
+
i.fetchedItemsKey in x ? u.value = x[i.fetchedItemsKey] : x != null && x[i.exactMatchKey ?? "id"] ? u.value = [x] : u.value = [];
|
|
312
315
|
} else {
|
|
313
|
-
const
|
|
314
|
-
|
|
316
|
+
const F = [];
|
|
317
|
+
h(B) && i.searchKeys.includes("id") ? F.push((async () => {
|
|
315
318
|
const { data: v } = await r.get(`${y.value}/${B}`);
|
|
316
319
|
return [v[i.fetchedItemsKey] ?? v];
|
|
317
|
-
})()) :
|
|
320
|
+
})()) : F.push(
|
|
318
321
|
...i.searchKeys.filter((v) => v !== "id").map(async (v) => {
|
|
319
|
-
const { data:
|
|
320
|
-
return
|
|
322
|
+
const { data: C } = await r.get(`${y.value}?${v}=${B}`);
|
|
323
|
+
return C[i.fetchedItemsKey];
|
|
321
324
|
})
|
|
322
325
|
);
|
|
323
|
-
const
|
|
324
|
-
u.value = [], (
|
|
325
|
-
var
|
|
326
|
-
(
|
|
327
|
-
f.has(
|
|
326
|
+
const x = await Promise.all(F), f = /* @__PURE__ */ new Set();
|
|
327
|
+
u.value = [], (P = x == null ? void 0 : x.forEach) == null || P.call(x, (v) => {
|
|
328
|
+
var C;
|
|
329
|
+
(C = v == null ? void 0 : v.forEach) == null || C.call(v, (Y) => {
|
|
330
|
+
f.has(Y.id) || (f.add(Y.id), u.value.push(Y));
|
|
328
331
|
});
|
|
329
332
|
});
|
|
330
333
|
}
|
|
331
|
-
} catch (
|
|
332
|
-
((
|
|
334
|
+
} catch (F) {
|
|
335
|
+
((ee = F == null ? void 0 : F.response) == null ? void 0 : ee.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (u.value = [], c.value = o("debouncedFilter.errors.fetch"));
|
|
333
336
|
} finally {
|
|
334
337
|
s.value = !1;
|
|
335
338
|
}
|
|
336
339
|
else
|
|
337
|
-
s.value = !0, d.value = "", u.value = (
|
|
340
|
+
s.value = !0, d.value = "", u.value = (M = m.value) == null ? void 0 : M.filter((F) => {
|
|
338
341
|
var f;
|
|
339
|
-
let
|
|
342
|
+
let x = !1;
|
|
340
343
|
for (const v of i.searchKeys) {
|
|
341
|
-
const
|
|
342
|
-
|
|
344
|
+
const C = typeof F[v] == "string" ? (f = F[v]) == null ? void 0 : f.toLowerCase() : F[v];
|
|
345
|
+
C != null && C.includes(B.toLowerCase()) && (x = !0);
|
|
343
346
|
}
|
|
344
|
-
return
|
|
347
|
+
return x;
|
|
345
348
|
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid")), s.value = !1;
|
|
346
349
|
}
|
|
347
350
|
};
|
|
@@ -351,17 +354,17 @@ function Mi(e, t, n, i = {
|
|
|
351
354
|
validationError: d,
|
|
352
355
|
results: u,
|
|
353
356
|
allRecords: m,
|
|
354
|
-
loadItems:
|
|
357
|
+
loadItems: b,
|
|
355
358
|
debouncedQueryChange: l
|
|
356
359
|
};
|
|
357
360
|
}
|
|
358
|
-
function
|
|
359
|
-
const n =
|
|
361
|
+
function Di(e, t) {
|
|
362
|
+
const n = _(t), i = S(
|
|
360
363
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
361
364
|
);
|
|
362
365
|
return i.value.search = "", (r) => `${i.value.href}/${r}`;
|
|
363
366
|
}
|
|
364
|
-
function
|
|
367
|
+
function Pi() {
|
|
365
368
|
const { i18n: { t: e } } = He();
|
|
366
369
|
return {
|
|
367
370
|
getErrorFieldsFromError: (i) => {
|
|
@@ -433,7 +436,7 @@ function Di() {
|
|
|
433
436
|
}
|
|
434
437
|
};
|
|
435
438
|
}
|
|
436
|
-
function
|
|
439
|
+
function ji(e) {
|
|
437
440
|
const t = window.location.origin, n = t.endsWith("/") ? t : `${t}/`;
|
|
438
441
|
try {
|
|
439
442
|
const i = e.join("/"), r = `${n}${i}`, o = e.some((l) => l.trim() === "");
|
|
@@ -445,48 +448,48 @@ function Pi(e) {
|
|
|
445
448
|
}
|
|
446
449
|
}
|
|
447
450
|
function Qt(e, t) {
|
|
448
|
-
const n =
|
|
449
|
-
const r =
|
|
451
|
+
const n = S(() => {
|
|
452
|
+
const r = ge(e);
|
|
450
453
|
return r.app === "konnect" || !!r.isExactMatch;
|
|
451
|
-
}), i =
|
|
452
|
-
const r =
|
|
454
|
+
}), i = S(() => {
|
|
455
|
+
const r = ge(t);
|
|
453
456
|
return r.startsWith("/") ? new URL(`${window.location.origin}${r}`) : new URL(r);
|
|
454
457
|
});
|
|
455
458
|
return (r) => {
|
|
456
459
|
const { page: o, pageSize: a, offset: l, sortColumnKey: s, sortColumnOrder: c, query: d } = r;
|
|
457
460
|
try {
|
|
458
461
|
let u = new URL(i.value.href);
|
|
459
|
-
return n.value && d ? (u.search = "", u =
|
|
462
|
+
return n.value && d ? (u.search = "", u = ge(e).isExactMatch ? new URL(`${u.href}/${d}`) : new URL(`${u.href}?filter[name][contains]=${d}`)) : (n.value || new URLSearchParams(d).forEach((p, m) => {
|
|
460
463
|
u.searchParams.append(m, p);
|
|
461
464
|
}), s && u.searchParams.append("sort_by", s), c === "desc" && u.searchParams.append("sort_desc", "1"), u.searchParams.append("size", String(a))), l && o !== 1 && u.searchParams.append("offset", String(l)), u.href;
|
|
462
465
|
} catch (u) {
|
|
463
|
-
return console.error("RouteList(fetcher)", u),
|
|
466
|
+
return console.error("RouteList(fetcher)", u), ge(t);
|
|
464
467
|
}
|
|
465
468
|
};
|
|
466
469
|
}
|
|
467
470
|
const bt = /* @__PURE__ */ new Map();
|
|
468
471
|
function Ui(e, t, n) {
|
|
469
|
-
const i = N(!0), r =
|
|
472
|
+
const i = N(!0), r = ge(e), { axiosInstance: o } = at(r.axiosRequestConfig), a = Qt(e, t), l = N({
|
|
470
473
|
status: me.Idle
|
|
471
474
|
}), s = async (u) => {
|
|
472
475
|
var m;
|
|
473
|
-
const p =
|
|
476
|
+
const p = ge(n) || "data";
|
|
474
477
|
try {
|
|
475
478
|
l.value = i.value ? { status: me.InitialLoad } : { status: me.Loading }, i.value = !1;
|
|
476
479
|
let y = a(u);
|
|
477
480
|
y.includes("filter[name]") && (y = `${y}&page[size]=${u.pageSize}&page[number]=${u.page}`);
|
|
478
|
-
const
|
|
479
|
-
if (
|
|
480
|
-
throw
|
|
481
|
-
const
|
|
482
|
-
let
|
|
483
|
-
k
|
|
481
|
+
const h = await o.get(y);
|
|
482
|
+
if (h.status >= 400)
|
|
483
|
+
throw h;
|
|
484
|
+
const b = h.data, k = p && p.replace(/[^\w-_]/gi, "");
|
|
485
|
+
let A;
|
|
486
|
+
b[k] ? A = Array.isArray(b[k]) ? b[k] : [b[k]] : Array.isArray(b) ? A = b : A = Object.keys(b).length ? [b] : [];
|
|
484
487
|
const B = {
|
|
485
|
-
data:
|
|
486
|
-
total:
|
|
487
|
-
...
|
|
488
|
+
data: A,
|
|
489
|
+
total: A.length,
|
|
490
|
+
...b.offset ? {
|
|
488
491
|
pagination: {
|
|
489
|
-
offset:
|
|
492
|
+
offset: b.offset
|
|
490
493
|
}
|
|
491
494
|
} : null
|
|
492
495
|
};
|
|
@@ -498,19 +501,19 @@ function Ui(e, t, n) {
|
|
|
498
501
|
response: B
|
|
499
502
|
}, B;
|
|
500
503
|
} catch (y) {
|
|
501
|
-
const
|
|
504
|
+
const h = {
|
|
502
505
|
data: [],
|
|
503
506
|
total: 0
|
|
504
507
|
};
|
|
505
508
|
return u.query && (((m = y.response) == null ? void 0 : m.status) === 404 || y.status === 404) ? (l.value = {
|
|
506
509
|
status: me.NoResults,
|
|
507
|
-
response:
|
|
510
|
+
response: h,
|
|
508
511
|
error: y.response ? y : { response: y }
|
|
509
|
-
},
|
|
512
|
+
}, h) : (l.value = {
|
|
510
513
|
status: me.Error,
|
|
511
|
-
response:
|
|
514
|
+
response: h,
|
|
512
515
|
error: y.response ? y : { response: y }
|
|
513
|
-
},
|
|
516
|
+
}, h);
|
|
514
517
|
}
|
|
515
518
|
}, c = r.cacheIdentifier, d = Zt(c);
|
|
516
519
|
return { fetcher: s, fetcherState: l, fetcherCacheKey: d };
|
|
@@ -589,7 +592,7 @@ function zi(e) {
|
|
|
589
592
|
return be(e, (o) => {
|
|
590
593
|
o && !i.value && (t.value = o.offsetWidth, n.value = o.scrollWidth, i.value = !0);
|
|
591
594
|
}), {
|
|
592
|
-
isTruncated:
|
|
595
|
+
isTruncated: S(() => t.value < n.value)
|
|
593
596
|
};
|
|
594
597
|
}
|
|
595
598
|
function Qi() {
|
|
@@ -607,25 +610,25 @@ const Qe = Symbol("schema"), Zi = (e) => {
|
|
|
607
610
|
};
|
|
608
611
|
function er(e) {
|
|
609
612
|
let t = "";
|
|
610
|
-
const n = N(!1), i = N(null), r =
|
|
613
|
+
const n = N(!1), i = N(null), r = S(() => {
|
|
611
614
|
let a;
|
|
612
|
-
return n.value ? a = !0 : i.value ? a = i.value.hasData || e &&
|
|
615
|
+
return n.value ? a = !0 : i.value ? a = i.value.hasData || e && ge(e) : a = !1, !a;
|
|
613
616
|
});
|
|
614
617
|
return {
|
|
615
618
|
tableState: i,
|
|
616
619
|
hasRecords: n,
|
|
617
620
|
hideTableToolbar: r,
|
|
618
621
|
handleStateChange: (a) => {
|
|
619
|
-
a.hasData ? n.value = !0 : a.state === "success" && !a.hasData && (!e || !t) && (n.value = !1), e && (t =
|
|
622
|
+
a.hasData ? n.value = !0 : a.state === "success" && !a.hasData && (!e || !t) && (n.value = !1), e && (t = ge(e)), i.value = { ...a };
|
|
620
623
|
}
|
|
621
624
|
};
|
|
622
625
|
}
|
|
623
|
-
const
|
|
626
|
+
const J = {
|
|
624
627
|
useAxios: at,
|
|
625
628
|
useDebouncedFilter: Mi,
|
|
626
|
-
useDeleteUrlBuilder:
|
|
627
|
-
useErrors:
|
|
628
|
-
useExternalLinkCreator:
|
|
629
|
+
useDeleteUrlBuilder: Di,
|
|
630
|
+
useErrors: Pi,
|
|
631
|
+
useExternalLinkCreator: ji,
|
|
629
632
|
useFetcher: Ui,
|
|
630
633
|
useFetcherCacheKey: Zt,
|
|
631
634
|
useFetchUrlBuilder: Qt,
|
|
@@ -658,25 +661,25 @@ const W = {
|
|
|
658
661
|
}
|
|
659
662
|
},
|
|
660
663
|
setup(e) {
|
|
661
|
-
const t = e, { i18n: { t: n } } =
|
|
664
|
+
const t = e, { i18n: { t: n } } = J.useI18n(), { convertKeyToTitle: i } = J.useStringHelpers(), r = S(() => t.item.key ?? "json-array-item"), o = S(() => t.item.value ?? t.item), a = S(() => {
|
|
662
665
|
const s = JSON.parse(JSON.stringify(o.value));
|
|
663
666
|
return t.isArrayItem && delete s.name, s;
|
|
664
|
-
}), l =
|
|
667
|
+
}), l = S(() => {
|
|
665
668
|
var s;
|
|
666
669
|
return t.isArrayItem ? (s = o.value) != null && s.name ? i(o.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
667
670
|
});
|
|
668
|
-
return (s, c) => (
|
|
671
|
+
return (s, c) => (g(), K(je(e.isArrayItem ? "fieldset" : "div"), {
|
|
669
672
|
class: fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
670
673
|
}, {
|
|
671
|
-
default:
|
|
672
|
-
e.isArrayItem ? (
|
|
673
|
-
L("b", null,
|
|
674
|
-
])) :
|
|
675
|
-
(
|
|
674
|
+
default: w(() => [
|
|
675
|
+
e.isArrayItem ? (g(), $("legend", tr, [
|
|
676
|
+
L("b", null, I(l.value), 1)
|
|
677
|
+
])) : D("", !0),
|
|
678
|
+
(g(!0), $(ue, null, ce(Object.keys(a.value), (d, u) => (g(), K(nn, {
|
|
676
679
|
key: `${r.value}-property-${u}`,
|
|
677
680
|
item: {
|
|
678
681
|
key: d,
|
|
679
|
-
label:
|
|
682
|
+
label: _(i)(d),
|
|
680
683
|
value: a.value[d]
|
|
681
684
|
}
|
|
682
685
|
}, null, 8, ["item"]))), 128))
|
|
@@ -699,17 +702,17 @@ const W = {
|
|
|
699
702
|
},
|
|
700
703
|
emits: ["navigation-click"],
|
|
701
704
|
setup(e) {
|
|
702
|
-
const { i18n: { t } } =
|
|
705
|
+
const { i18n: { t } } = J.useI18n();
|
|
703
706
|
return (n, i) => {
|
|
704
|
-
const r =
|
|
705
|
-
return
|
|
706
|
-
|
|
707
|
+
const r = j("KButton");
|
|
708
|
+
return g(), $("div", null, [
|
|
709
|
+
R(r, {
|
|
707
710
|
appearance: "tertiary",
|
|
708
711
|
class: "navigation-button",
|
|
709
712
|
onClick: i[0] || (i[0] = (o) => n.$emit("navigation-click", e.item))
|
|
710
713
|
}, {
|
|
711
|
-
default:
|
|
712
|
-
q(
|
|
714
|
+
default: w(() => [
|
|
715
|
+
q(I(e.item.value || _(t)("baseConfigCard.commonFields.link")), 1)
|
|
713
716
|
]),
|
|
714
717
|
_: 1
|
|
715
718
|
})
|
|
@@ -725,14 +728,14 @@ const W = {
|
|
|
725
728
|
}
|
|
726
729
|
},
|
|
727
730
|
setup(e) {
|
|
728
|
-
const { i18n: { t } } =
|
|
731
|
+
const { i18n: { t } } = J.useI18n();
|
|
729
732
|
return (n, i) => {
|
|
730
|
-
const r =
|
|
731
|
-
return
|
|
733
|
+
const r = j("KBadge");
|
|
734
|
+
return g(), K(r, {
|
|
732
735
|
appearance: e.status ? "success" : "neutral"
|
|
733
736
|
}, {
|
|
734
|
-
default:
|
|
735
|
-
q(
|
|
737
|
+
default: w(() => [
|
|
738
|
+
q(I(e.status ? _(t)("baseConfigCard.statusBadge.enabledLabel") : _(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
736
739
|
]),
|
|
737
740
|
_: 1
|
|
738
741
|
}, 8, ["appearance"]);
|
|
@@ -759,7 +762,7 @@ const W = {
|
|
|
759
762
|
async function Te({ codeElement: e, code: t, language: n, theme: i }) {
|
|
760
763
|
e.innerHTML = await mr(t, { lang: n, theme: i === "dark" ? "catppuccin-mocha" : "catppuccin-latte", structure: "inline" });
|
|
761
764
|
}
|
|
762
|
-
const
|
|
765
|
+
const gr = { class: "config-card-details-row" }, hr = ["data-testid"], yr = ["data-testid"], vr = ["data-testid"], br = ["data-testid"], kr = { key: 1 }, Cr = ["data-testid"], xr = ["data-testid"], Ar = ["data-testid"], _r = ["data-testid"], wr = {
|
|
763
766
|
name: "ConfigCardItem",
|
|
764
767
|
components: { JsonCardItem: tn, StatusBadge: ar, InternalLinkItem: rr }
|
|
765
768
|
}, Sr = /* @__PURE__ */ z({
|
|
@@ -782,18 +785,18 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
782
785
|
},
|
|
783
786
|
emits: ["navigation-click"],
|
|
784
787
|
setup(e, { emit: t }) {
|
|
785
|
-
Vt((
|
|
786
|
-
v0b2cd434: p.value ? "none" : `solid ${
|
|
788
|
+
Vt((P) => ({
|
|
789
|
+
v0b2cd434: p.value ? "none" : `solid ${_(ur)} ${_(lr)}`,
|
|
787
790
|
bb02ad32: u.value && c.value ? "block" : "flex",
|
|
788
791
|
d92de3ce: u.value && c.value ? "100%" : n.slim ? "50%" : "25%",
|
|
789
792
|
d9295818: u.value && c.value ? "100%" : n.slim ? "50%" : "75%"
|
|
790
793
|
}));
|
|
791
|
-
const n = e, i = t, r = Qn(), o = Ue(), { i18n: { t: a, formatIsoDate: l, formatUnixTimeStamp: s } } =
|
|
792
|
-
var
|
|
793
|
-
return n.item.type ? n.item.type : (
|
|
794
|
-
}),
|
|
794
|
+
const n = e, i = t, r = Qn(), o = Ue(), { i18n: { t: a, formatIsoDate: l, formatUnixTimeStamp: s } } = J.useI18n(), c = S(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), d = S(() => !!(n.item.tooltip || o["label-tooltip"])), u = S(() => n.item.type === W.Json || n.item.type === W.JsonArray), p = S(() => n.item.type === W.JsonArray), m = J.useSubSchema(n.item.key), y = S(() => {
|
|
795
|
+
var P;
|
|
796
|
+
return n.item.type ? n.item.type : (P = m == null ? void 0 : m.value) != null && P.encrypted ? W.Redacted : void 0;
|
|
797
|
+
}), h = S(() => {
|
|
795
798
|
switch (y.value) {
|
|
796
|
-
case
|
|
799
|
+
case W.ID:
|
|
797
800
|
return {
|
|
798
801
|
tag: "KCopy",
|
|
799
802
|
attrs: {
|
|
@@ -802,7 +805,7 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
802
805
|
text: n.item.value
|
|
803
806
|
}
|
|
804
807
|
};
|
|
805
|
-
case
|
|
808
|
+
case W.IdArray:
|
|
806
809
|
return {
|
|
807
810
|
tag: "div",
|
|
808
811
|
additionalComponent: "KCopy",
|
|
@@ -810,7 +813,7 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
810
813
|
"copy-tooltip": a("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
811
814
|
}
|
|
812
815
|
};
|
|
813
|
-
case
|
|
816
|
+
case W.Redacted:
|
|
814
817
|
return {
|
|
815
818
|
tag: "KCopy",
|
|
816
819
|
attrs: {
|
|
@@ -820,7 +823,7 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
820
823
|
text: n.item.value
|
|
821
824
|
}
|
|
822
825
|
};
|
|
823
|
-
case
|
|
826
|
+
case W.RedactedArray:
|
|
824
827
|
return {
|
|
825
828
|
tag: "div",
|
|
826
829
|
additionalComponent: "KCopy",
|
|
@@ -829,7 +832,7 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
829
832
|
"copy-tooltip": a("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
830
833
|
}
|
|
831
834
|
};
|
|
832
|
-
case
|
|
835
|
+
case W.Date:
|
|
833
836
|
return {
|
|
834
837
|
tag: "div",
|
|
835
838
|
attrs: {
|
|
@@ -837,7 +840,7 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
837
840
|
},
|
|
838
841
|
text: isNaN(Number(n.item.value)) ? l(n.item.value) : s(n.item.value)
|
|
839
842
|
};
|
|
840
|
-
case
|
|
843
|
+
case W.BadgeStatus:
|
|
841
844
|
return {
|
|
842
845
|
tag: "StatusBadge",
|
|
843
846
|
attrs: {
|
|
@@ -845,12 +848,12 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
845
848
|
status: n.item.value
|
|
846
849
|
}
|
|
847
850
|
};
|
|
848
|
-
case
|
|
851
|
+
case W.BadgeTag:
|
|
849
852
|
return {
|
|
850
853
|
tag: "div",
|
|
851
854
|
additionalComponent: "KBadge"
|
|
852
855
|
};
|
|
853
|
-
case
|
|
856
|
+
case W.CopyBadge:
|
|
854
857
|
return {
|
|
855
858
|
tag: "div",
|
|
856
859
|
additionalComponent: "KCopy",
|
|
@@ -861,23 +864,23 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
861
864
|
text: n.item.value
|
|
862
865
|
}
|
|
863
866
|
};
|
|
864
|
-
case
|
|
867
|
+
case W.BadgeMethod:
|
|
865
868
|
return {
|
|
866
869
|
tag: "div",
|
|
867
870
|
additionalComponent: "KMethodBadge"
|
|
868
871
|
};
|
|
869
|
-
case
|
|
872
|
+
case W.LinkInternal:
|
|
870
873
|
return {
|
|
871
874
|
tag: "InternalLinkItem",
|
|
872
875
|
attrs: {
|
|
873
876
|
"data-testid": `${n.item.key}-internal-link`,
|
|
874
877
|
item: n.item,
|
|
875
|
-
onNavigationClick: (
|
|
876
|
-
i("navigation-click",
|
|
878
|
+
onNavigationClick: (P) => {
|
|
879
|
+
i("navigation-click", P);
|
|
877
880
|
}
|
|
878
881
|
}
|
|
879
882
|
};
|
|
880
|
-
case
|
|
883
|
+
case W.LinkExternal:
|
|
881
884
|
return {
|
|
882
885
|
tag: "KExternalLink",
|
|
883
886
|
attrs: {
|
|
@@ -886,7 +889,7 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
886
889
|
},
|
|
887
890
|
text: n.item.value
|
|
888
891
|
};
|
|
889
|
-
case
|
|
892
|
+
case W.Json:
|
|
890
893
|
return {
|
|
891
894
|
tag: "JsonCardItem",
|
|
892
895
|
attrs: {
|
|
@@ -894,7 +897,7 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
894
897
|
item: n.item
|
|
895
898
|
}
|
|
896
899
|
};
|
|
897
|
-
case
|
|
900
|
+
case W.JsonArray:
|
|
898
901
|
return {
|
|
899
902
|
tag: "div",
|
|
900
903
|
additionalComponent: "JsonCardItem",
|
|
@@ -923,26 +926,26 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
923
926
|
text: n.item.value
|
|
924
927
|
};
|
|
925
928
|
}
|
|
926
|
-
}),
|
|
927
|
-
return (
|
|
928
|
-
const
|
|
929
|
-
return
|
|
929
|
+
}), b = N(), k = N(), { isTruncated: A } = J.useTruncationDetector(b), { isTruncated: B } = J.useTruncationDetector(k);
|
|
930
|
+
return (P, ee) => {
|
|
931
|
+
const M = j("KTooltip"), F = j("KLabel"), x = j("KBadge"), f = j("KCopy");
|
|
932
|
+
return g(), $("div", gr, [
|
|
930
933
|
L("div", {
|
|
931
934
|
class: "config-card-details-label",
|
|
932
935
|
"data-testid": `${e.item.key}-label`
|
|
933
936
|
}, [
|
|
934
|
-
U(
|
|
935
|
-
|
|
936
|
-
default:
|
|
937
|
-
|
|
938
|
-
text: A
|
|
937
|
+
U(P.$slots, "label", { item: e.item }, () => [
|
|
938
|
+
R(F, { "tooltip-attributes": { maxWidth: "500px" } }, ke({
|
|
939
|
+
default: w(() => [
|
|
940
|
+
R(M, {
|
|
941
|
+
text: _(A) ? e.item.label : ""
|
|
939
942
|
}, {
|
|
940
|
-
default:
|
|
943
|
+
default: w(() => [
|
|
941
944
|
L("span", {
|
|
942
945
|
ref_key: "labelContent",
|
|
943
|
-
ref:
|
|
946
|
+
ref: b,
|
|
944
947
|
class: "label-content"
|
|
945
|
-
},
|
|
948
|
+
}, I(e.item.label), 513)
|
|
946
949
|
]),
|
|
947
950
|
_: 1
|
|
948
951
|
}, 8, ["text"])
|
|
@@ -951,12 +954,12 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
951
954
|
}, [
|
|
952
955
|
d.value ? {
|
|
953
956
|
name: "tooltip",
|
|
954
|
-
fn:
|
|
957
|
+
fn: w(() => [
|
|
955
958
|
L("div", {
|
|
956
959
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
957
960
|
}, [
|
|
958
|
-
U(
|
|
959
|
-
q(
|
|
961
|
+
U(P.$slots, "label-tooltip", {}, () => [
|
|
962
|
+
q(I(e.item.tooltip), 1)
|
|
960
963
|
], !0)
|
|
961
964
|
], 8, yr)
|
|
962
965
|
]),
|
|
@@ -964,86 +967,86 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
964
967
|
} : void 0
|
|
965
968
|
]), 1024)
|
|
966
969
|
], !0)
|
|
967
|
-
], 8,
|
|
970
|
+
], 8, hr),
|
|
968
971
|
L("div", {
|
|
969
972
|
class: "config-card-details-value",
|
|
970
973
|
"data-testid": `${e.item.key}-property-value`
|
|
971
974
|
}, [
|
|
972
|
-
U(
|
|
975
|
+
U(P.$slots, e.item.key, {
|
|
973
976
|
rowValue: e.item.value
|
|
974
977
|
}, () => [
|
|
975
|
-
c.value ? (
|
|
976
|
-
(
|
|
977
|
-
default:
|
|
978
|
-
|
|
978
|
+
c.value ? (g(), $("div", kr, [
|
|
979
|
+
(g(), K(je(h.value.tag), Zn(Xn(h.value.attrs)), {
|
|
980
|
+
default: w(() => [
|
|
981
|
+
h.value.additionalComponent === "KBadge" ? (g(), $("div", {
|
|
979
982
|
key: 0,
|
|
980
983
|
"data-testid": `${e.item.key}-badge-tags`
|
|
981
984
|
}, [
|
|
982
|
-
(
|
|
983
|
-
key: `${e.item.key}-badge-tag-${
|
|
985
|
+
(g(!0), $(ue, null, ce(e.item.value, (v, C) => (g(), K(x, {
|
|
986
|
+
key: `${e.item.key}-badge-tag-${C}`,
|
|
984
987
|
class: "config-badge",
|
|
985
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
988
|
+
"data-testid": `${e.item.key}-badge-tag-${C}`,
|
|
986
989
|
tooltip: v,
|
|
987
990
|
"truncation-tooltip": ""
|
|
988
991
|
}, {
|
|
989
|
-
default:
|
|
990
|
-
q(
|
|
992
|
+
default: w(() => [
|
|
993
|
+
q(I(v), 1)
|
|
991
994
|
]),
|
|
992
995
|
_: 2
|
|
993
996
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
994
|
-
], 8, Cr)) :
|
|
997
|
+
], 8, Cr)) : h.value.additionalComponent === "KCopy" ? (g(), $("div", {
|
|
995
998
|
key: 1,
|
|
996
999
|
class: "copy-uuid-array",
|
|
997
1000
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
998
1001
|
}, [
|
|
999
|
-
(
|
|
1000
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1001
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1002
|
+
(g(!0), $(ue, null, ce(e.item.value, (v, C) => (g(), K(f, Yt({ ref_for: !0 }, h.value.childAttrs, {
|
|
1003
|
+
key: `${e.item.key}-copy-uuid-${C}`,
|
|
1004
|
+
"data-testid": `${e.item.key}-copy-uuid-${C}`,
|
|
1002
1005
|
text: v
|
|
1003
1006
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
1004
|
-
], 8, xr)) :
|
|
1007
|
+
], 8, xr)) : h.value.additionalComponent === "KMethodBadge" ? (g(), $("div", {
|
|
1005
1008
|
key: 2,
|
|
1006
1009
|
class: "method-badge-array",
|
|
1007
1010
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1008
1011
|
}, [
|
|
1009
|
-
(
|
|
1010
|
-
key: `${e.item.key}-badge-method-${
|
|
1011
|
-
appearance: Object.values(
|
|
1012
|
+
(g(!0), $(ue, null, ce(e.item.value, (v, C) => (g(), K(x, {
|
|
1013
|
+
key: `${e.item.key}-badge-method-${C}`,
|
|
1014
|
+
appearance: Object.values(_(ai)).includes(v.toLowerCase()) ? v.toLowerCase() : "custom",
|
|
1012
1015
|
class: "config-badge",
|
|
1013
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1016
|
+
"data-testid": `${e.item.key}-badge-method-${C}`
|
|
1014
1017
|
}, {
|
|
1015
|
-
default:
|
|
1016
|
-
q(
|
|
1018
|
+
default: w(() => [
|
|
1019
|
+
q(I(v), 1)
|
|
1017
1020
|
]),
|
|
1018
1021
|
_: 2
|
|
1019
1022
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1020
|
-
], 8, Ar)) :
|
|
1023
|
+
], 8, Ar)) : h.value.additionalComponent === "JsonCardItem" ? (g(), $("div", {
|
|
1021
1024
|
key: 3,
|
|
1022
1025
|
"data-testid": `${n.item.key}-json-array-content`
|
|
1023
1026
|
}, [
|
|
1024
|
-
(
|
|
1025
|
-
key: `json-array-item-${
|
|
1026
|
-
index:
|
|
1027
|
+
(g(!0), $(ue, null, ce(e.item.value, (v, C) => (g(), K(tn, {
|
|
1028
|
+
key: `json-array-item-${C}`,
|
|
1029
|
+
index: C,
|
|
1027
1030
|
"is-array-item": "",
|
|
1028
1031
|
item: v
|
|
1029
1032
|
}, null, 8, ["index", "item"]))), 128))
|
|
1030
|
-
], 8, _r)) : (
|
|
1033
|
+
], 8, _r)) : (g(), K(M, {
|
|
1031
1034
|
key: 4,
|
|
1032
|
-
text:
|
|
1035
|
+
text: _(B) ? e.item.value : ""
|
|
1033
1036
|
}, {
|
|
1034
|
-
default:
|
|
1037
|
+
default: w(() => [
|
|
1035
1038
|
L("span", {
|
|
1036
1039
|
ref_key: "textContent",
|
|
1037
|
-
ref:
|
|
1040
|
+
ref: k,
|
|
1038
1041
|
class: fe(["attrs-data-text", { truncated: e.truncated }])
|
|
1039
|
-
},
|
|
1042
|
+
}, I(h.value.text), 3)
|
|
1040
1043
|
]),
|
|
1041
1044
|
_: 1
|
|
1042
1045
|
}, 8, ["text"]))
|
|
1043
1046
|
]),
|
|
1044
1047
|
_: 1
|
|
1045
1048
|
}, 16))
|
|
1046
|
-
])) : (
|
|
1049
|
+
])) : (g(), $("div", {
|
|
1047
1050
|
key: 0,
|
|
1048
1051
|
"data-testid": `${e.item.key}-no-value`
|
|
1049
1052
|
}, " – ", 8, br))
|
|
@@ -1086,7 +1089,7 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
1086
1089
|
Vt((r) => ({
|
|
1087
1090
|
v58418ff6: `${i.value}ch`
|
|
1088
1091
|
}));
|
|
1089
|
-
const t = e, n =
|
|
1092
|
+
const t = e, n = S(() => t.entityRecord), i = S(() => {
|
|
1090
1093
|
var a;
|
|
1091
1094
|
if (!t.fetcherUrl)
|
|
1092
1095
|
return 0;
|
|
@@ -1094,34 +1097,34 @@ const hr = { class: "config-card-details-row" }, gr = ["data-testid"], yr = ["da
|
|
|
1094
1097
|
return r.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? r[r.length - 1] : r[r.length - 2]).length;
|
|
1095
1098
|
});
|
|
1096
1099
|
return (r, o) => {
|
|
1097
|
-
const a =
|
|
1098
|
-
return
|
|
1099
|
-
t.fetcherUrl ? (
|
|
1100
|
-
|
|
1100
|
+
const a = j("KBadge"), l = j("KCodeBlock");
|
|
1101
|
+
return g(), $("div", $r, [
|
|
1102
|
+
t.fetcherUrl ? (g(), $("div", Tr, [
|
|
1103
|
+
R(a, {
|
|
1101
1104
|
appearance: t.requestMethod
|
|
1102
1105
|
}, {
|
|
1103
|
-
default:
|
|
1104
|
-
q(
|
|
1106
|
+
default: w(() => [
|
|
1107
|
+
q(I(t.requestMethod), 1)
|
|
1105
1108
|
]),
|
|
1106
1109
|
_: 1
|
|
1107
1110
|
}, 8, ["appearance"]),
|
|
1108
|
-
|
|
1111
|
+
R(l, {
|
|
1109
1112
|
id: "json-endpoint-codeblock",
|
|
1110
1113
|
code: t.fetcherUrl,
|
|
1111
1114
|
language: "plaintext",
|
|
1112
1115
|
"single-line": "",
|
|
1113
1116
|
theme: "dark"
|
|
1114
1117
|
}, null, 8, ["code"])
|
|
1115
|
-
])) :
|
|
1116
|
-
t.entityRecord ? (
|
|
1118
|
+
])) : D("", !0),
|
|
1119
|
+
t.entityRecord ? (g(), K(l, {
|
|
1117
1120
|
key: 1,
|
|
1118
1121
|
id: "json-codeblock",
|
|
1119
1122
|
class: fe({ "json-content": t.fetcherUrl }),
|
|
1120
1123
|
code: JSON.stringify(n.value, null, 2),
|
|
1121
1124
|
language: "json",
|
|
1122
1125
|
theme: "dark",
|
|
1123
|
-
onCodeBlockRender:
|
|
1124
|
-
}, null, 8, ["class", "code", "onCodeBlockRender"])) :
|
|
1126
|
+
onCodeBlockRender: _(Te)
|
|
1127
|
+
}, null, 8, ["class", "code", "onCodeBlockRender"])) : D("", !0)
|
|
1125
1128
|
]);
|
|
1126
1129
|
};
|
|
1127
1130
|
}
|
|
@@ -1152,13 +1155,13 @@ function Or(e, t) {
|
|
|
1152
1155
|
function Br(e) {
|
|
1153
1156
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1154
1157
|
}
|
|
1155
|
-
var Lr = an, Rr = Er, Kr = Ir, Nr = Or, Mr = Br,
|
|
1158
|
+
var Lr = an, Rr = Er, Kr = Ir, Nr = Or, Mr = Br, Dr = Fr, X = {
|
|
1156
1159
|
isNothing: Lr,
|
|
1157
1160
|
isObject: Rr,
|
|
1158
1161
|
toArray: Kr,
|
|
1159
1162
|
repeat: Nr,
|
|
1160
1163
|
isNegativeZero: Mr,
|
|
1161
|
-
extend:
|
|
1164
|
+
extend: Dr
|
|
1162
1165
|
};
|
|
1163
1166
|
function on(e, t) {
|
|
1164
1167
|
var n = "", i = e.reason || "(unknown reason)";
|
|
@@ -1184,9 +1187,9 @@ function We(e, t, n, i, r) {
|
|
|
1184
1187
|
};
|
|
1185
1188
|
}
|
|
1186
1189
|
function Je(e, t) {
|
|
1187
|
-
return
|
|
1190
|
+
return X.repeat(" ", t - e.length) + e;
|
|
1188
1191
|
}
|
|
1189
|
-
function
|
|
1192
|
+
function Pr(e, t) {
|
|
1190
1193
|
if (t = Object.create(t || null), !e.buffer) return null;
|
|
1191
1194
|
t.maxLength || (t.maxLength = 79), typeof t.indent != "number" && (t.indent = 1), typeof t.linesBefore != "number" && (t.linesBefore = 3), typeof t.linesAfter != "number" && (t.linesAfter = 2);
|
|
1192
1195
|
for (var n = /\r?\n|\r|\0/g, i = [0], r = [], o, a = -1; o = n.exec(e.buffer); )
|
|
@@ -1200,10 +1203,10 @@ function Dr(e, t) {
|
|
|
1200
1203
|
r[a - s],
|
|
1201
1204
|
e.position - (i[a] - i[a - s]),
|
|
1202
1205
|
u
|
|
1203
|
-
), l =
|
|
1206
|
+
), l = X.repeat(" ", t.indent) + Je((e.line - s + 1).toString(), d) + " | " + c.str + `
|
|
1204
1207
|
` + l;
|
|
1205
|
-
for (c = We(e.buffer, i[a], r[a], e.position, u), l +=
|
|
1206
|
-
`, l +=
|
|
1208
|
+
for (c = We(e.buffer, i[a], r[a], e.position, u), l += X.repeat(" ", t.indent) + Je((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1209
|
+
`, l += X.repeat("-", t.indent + d + 3 + c.pos) + `^
|
|
1207
1210
|
`, s = 1; s <= t.linesAfter && !(a + s >= r.length); s++)
|
|
1208
1211
|
c = We(
|
|
1209
1212
|
e.buffer,
|
|
@@ -1211,11 +1214,11 @@ function Dr(e, t) {
|
|
|
1211
1214
|
r[a + s],
|
|
1212
1215
|
e.position - (i[a] - i[a + s]),
|
|
1213
1216
|
u
|
|
1214
|
-
), l +=
|
|
1217
|
+
), l += X.repeat(" ", t.indent) + Je((e.line + s + 1).toString(), d) + " | " + c.str + `
|
|
1215
1218
|
`;
|
|
1216
1219
|
return l.replace(/\n$/, "");
|
|
1217
1220
|
}
|
|
1218
|
-
var
|
|
1221
|
+
var jr = Pr, Ur = [
|
|
1219
1222
|
"kind",
|
|
1220
1223
|
"multi",
|
|
1221
1224
|
"resolve",
|
|
@@ -1453,7 +1456,7 @@ function ia(e) {
|
|
|
1453
1456
|
return n * parseInt(t, 10);
|
|
1454
1457
|
}
|
|
1455
1458
|
function ra(e) {
|
|
1456
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !
|
|
1459
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !X.isNegativeZero(e);
|
|
1457
1460
|
}
|
|
1458
1461
|
var mn = new ie("tag:yaml.org,2002:int", {
|
|
1459
1462
|
kind: "scalar",
|
|
@@ -1525,28 +1528,28 @@ function ca(e, t) {
|
|
|
1525
1528
|
case "camelcase":
|
|
1526
1529
|
return "-.Inf";
|
|
1527
1530
|
}
|
|
1528
|
-
else if (
|
|
1531
|
+
else if (X.isNegativeZero(e))
|
|
1529
1532
|
return "-0.0";
|
|
1530
1533
|
return n = e.toString(10), sa.test(n) ? n.replace("e", ".e") : n;
|
|
1531
1534
|
}
|
|
1532
1535
|
function ua(e) {
|
|
1533
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 ||
|
|
1536
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || X.isNegativeZero(e));
|
|
1534
1537
|
}
|
|
1535
|
-
var
|
|
1538
|
+
var gn = new ie("tag:yaml.org,2002:float", {
|
|
1536
1539
|
kind: "scalar",
|
|
1537
1540
|
resolve: oa,
|
|
1538
1541
|
construct: la,
|
|
1539
1542
|
predicate: ua,
|
|
1540
1543
|
represent: ca,
|
|
1541
1544
|
defaultStyle: "lowercase"
|
|
1542
|
-
}),
|
|
1545
|
+
}), hn = dn.extend({
|
|
1543
1546
|
implicit: [
|
|
1544
1547
|
fn,
|
|
1545
1548
|
pn,
|
|
1546
1549
|
mn,
|
|
1547
|
-
|
|
1550
|
+
gn
|
|
1548
1551
|
]
|
|
1549
|
-
}), yn =
|
|
1552
|
+
}), yn = hn, vn = new RegExp(
|
|
1550
1553
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1551
1554
|
), bn = new RegExp(
|
|
1552
1555
|
"^([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]))?))?$"
|
|
@@ -1584,7 +1587,7 @@ var Cn = new ie("tag:yaml.org,2002:merge", {
|
|
|
1584
1587
|
resolve: ma
|
|
1585
1588
|
}), ot = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1586
1589
|
\r`;
|
|
1587
|
-
function
|
|
1590
|
+
function ga(e) {
|
|
1588
1591
|
if (e === null) return !1;
|
|
1589
1592
|
var t, n, i = 0, r = e.length, o = ot;
|
|
1590
1593
|
for (n = 0; n < r; n++)
|
|
@@ -1594,7 +1597,7 @@ function ha(e) {
|
|
|
1594
1597
|
}
|
|
1595
1598
|
return i % 8 === 0;
|
|
1596
1599
|
}
|
|
1597
|
-
function
|
|
1600
|
+
function ha(e) {
|
|
1598
1601
|
var t, n, i = e.replace(/[\r\n=]/g, ""), r = i.length, o = ot, a = 0, l = [];
|
|
1599
1602
|
for (t = 0; t < r; t++)
|
|
1600
1603
|
t % 4 === 0 && t && (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)), a = a << 6 | o.indexOf(i.charAt(t));
|
|
@@ -1611,8 +1614,8 @@ function va(e) {
|
|
|
1611
1614
|
}
|
|
1612
1615
|
var xn = new ie("tag:yaml.org,2002:binary", {
|
|
1613
1616
|
kind: "scalar",
|
|
1614
|
-
resolve:
|
|
1615
|
-
construct:
|
|
1617
|
+
resolve: ga,
|
|
1618
|
+
construct: ha,
|
|
1616
1619
|
predicate: va,
|
|
1617
1620
|
represent: ya
|
|
1618
1621
|
}), ba = Object.prototype.hasOwnProperty, ka = Object.prototype.toString;
|
|
@@ -1699,7 +1702,7 @@ function ve(e) {
|
|
|
1699
1702
|
function se(e) {
|
|
1700
1703
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1701
1704
|
}
|
|
1702
|
-
function
|
|
1705
|
+
function we(e) {
|
|
1703
1706
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1704
1707
|
}
|
|
1705
1708
|
function Ba(e) {
|
|
@@ -1731,8 +1734,8 @@ function In(e, t, n) {
|
|
|
1731
1734
|
}) : e[t] = n;
|
|
1732
1735
|
}
|
|
1733
1736
|
var Fn = new Array(256), On = new Array(256);
|
|
1734
|
-
for (var
|
|
1735
|
-
Fn[
|
|
1737
|
+
for (var Ae = 0; Ae < 256; Ae++)
|
|
1738
|
+
Fn[Ae] = Et(Ae) ? 1 : 0, On[Ae] = Et(Ae);
|
|
1736
1739
|
function Na(e, t) {
|
|
1737
1740
|
this.input = e, this.filename = t.filename || null, this.schema = t.schema || lt, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1738
1741
|
}
|
|
@@ -1745,9 +1748,9 @@ function Bn(e, t) {
|
|
|
1745
1748
|
line: e.line,
|
|
1746
1749
|
column: e.position - e.lineStart
|
|
1747
1750
|
};
|
|
1748
|
-
return n.snippet =
|
|
1751
|
+
return n.snippet = jr(n), new oe(t, n);
|
|
1749
1752
|
}
|
|
1750
|
-
function
|
|
1753
|
+
function T(e, t) {
|
|
1751
1754
|
throw Bn(e, t);
|
|
1752
1755
|
}
|
|
1753
1756
|
function Me(e, t) {
|
|
@@ -1756,39 +1759,39 @@ function Me(e, t) {
|
|
|
1756
1759
|
var It = {
|
|
1757
1760
|
YAML: function(t, n, i) {
|
|
1758
1761
|
var r, o, a;
|
|
1759
|
-
t.version !== null &&
|
|
1762
|
+
t.version !== null && T(t, "duplication of %YAML directive"), i.length !== 1 && T(t, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(i[0]), r === null && T(t, "ill-formed argument of the YAML directive"), o = parseInt(r[1], 10), a = parseInt(r[2], 10), o !== 1 && T(t, "unacceptable YAML version of the document"), t.version = i[0], t.checkLineBreaks = a < 2, a !== 1 && a !== 2 && Me(t, "unsupported YAML version of the document");
|
|
1760
1763
|
},
|
|
1761
1764
|
TAG: function(t, n, i) {
|
|
1762
1765
|
var r, o;
|
|
1763
|
-
i.length !== 2 &&
|
|
1766
|
+
i.length !== 2 && T(t, "TAG directive accepts exactly two arguments"), r = i[0], o = i[1], Tn.test(r) || T(t, "ill-formed tag handle (first argument) of the TAG directive"), ye.call(t.tagMap, r) && T(t, 'there is a previously declared suffix for "' + r + '" tag handle'), En.test(o) || T(t, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1764
1767
|
try {
|
|
1765
1768
|
o = decodeURIComponent(o);
|
|
1766
1769
|
} catch {
|
|
1767
|
-
|
|
1770
|
+
T(t, "tag prefix is malformed: " + o);
|
|
1768
1771
|
}
|
|
1769
1772
|
t.tagMap[r] = o;
|
|
1770
1773
|
}
|
|
1771
1774
|
};
|
|
1772
|
-
function
|
|
1775
|
+
function he(e, t, n, i) {
|
|
1773
1776
|
var r, o, a, l;
|
|
1774
1777
|
if (t < n) {
|
|
1775
1778
|
if (l = e.input.slice(t, n), i)
|
|
1776
1779
|
for (r = 0, o = l.length; r < o; r += 1)
|
|
1777
|
-
a = l.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 ||
|
|
1778
|
-
else Ia.test(l) &&
|
|
1780
|
+
a = l.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 || T(e, "expected valid JSON character");
|
|
1781
|
+
else Ia.test(l) && T(e, "the stream contains non-printable characters");
|
|
1779
1782
|
e.result += l;
|
|
1780
1783
|
}
|
|
1781
1784
|
}
|
|
1782
1785
|
function Ft(e, t, n, i) {
|
|
1783
1786
|
var r, o, a, l;
|
|
1784
|
-
for (
|
|
1787
|
+
for (X.isObject(n) || T(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(n), a = 0, l = r.length; a < l; a += 1)
|
|
1785
1788
|
o = r[a], ye.call(t, o) || (In(t, o, n[o]), i[o] = !0);
|
|
1786
1789
|
}
|
|
1787
|
-
function
|
|
1790
|
+
function Se(e, t, n, i, r, o, a, l, s) {
|
|
1788
1791
|
var c, d;
|
|
1789
1792
|
if (Array.isArray(r))
|
|
1790
1793
|
for (r = Array.prototype.slice.call(r), c = 0, d = r.length; c < d; c += 1)
|
|
1791
|
-
Array.isArray(r[c]) &&
|
|
1794
|
+
Array.isArray(r[c]) && T(e, "nested arrays are not supported inside keys"), typeof r == "object" && Tt(r[c]) === "[object Object]" && (r[c] = "[object Object]");
|
|
1792
1795
|
if (typeof r == "object" && Tt(r) === "[object Object]" && (r = "[object Object]"), r = String(r), t === null && (t = {}), i === "tag:yaml.org,2002:merge")
|
|
1793
1796
|
if (Array.isArray(o))
|
|
1794
1797
|
for (c = 0, d = o.length; c < d; c += 1)
|
|
@@ -1796,12 +1799,12 @@ function we(e, t, n, i, r, o, a, l, s) {
|
|
|
1796
1799
|
else
|
|
1797
1800
|
Ft(e, t, o, n);
|
|
1798
1801
|
else
|
|
1799
|
-
!e.json && !ye.call(n, r) && ye.call(t, r) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position,
|
|
1802
|
+
!e.json && !ye.call(n, r) && ye.call(t, r) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, T(e, "duplicated mapping key")), In(t, r, o), delete n[r];
|
|
1800
1803
|
return t;
|
|
1801
1804
|
}
|
|
1802
1805
|
function st(e) {
|
|
1803
1806
|
var t;
|
|
1804
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1807
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : T(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1805
1808
|
}
|
|
1806
1809
|
function Z(e, t, n) {
|
|
1807
1810
|
for (var i = 0, r = e.input.charCodeAt(e.position); r !== 0; ) {
|
|
@@ -1824,22 +1827,22 @@ function Ve(e) {
|
|
|
1824
1827
|
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || se(n)));
|
|
1825
1828
|
}
|
|
1826
1829
|
function ct(e, t) {
|
|
1827
|
-
t === 1 ? e.result += " " : t > 1 && (e.result +=
|
|
1830
|
+
t === 1 ? e.result += " " : t > 1 && (e.result += X.repeat(`
|
|
1828
1831
|
`, t - 1));
|
|
1829
1832
|
}
|
|
1830
1833
|
function Ma(e, t, n) {
|
|
1831
1834
|
var i, r, o, a, l, s, c, d, u = e.kind, p = e.result, m;
|
|
1832
|
-
if (m = e.input.charCodeAt(e.position), se(m) ||
|
|
1835
|
+
if (m = e.input.charCodeAt(e.position), se(m) || we(m) || m === 35 || m === 38 || m === 42 || m === 33 || m === 124 || m === 62 || m === 39 || m === 34 || m === 37 || m === 64 || m === 96 || (m === 63 || m === 45) && (r = e.input.charCodeAt(e.position + 1), se(r) || n && we(r)))
|
|
1833
1836
|
return !1;
|
|
1834
1837
|
for (e.kind = "scalar", e.result = "", o = a = e.position, l = !1; m !== 0; ) {
|
|
1835
1838
|
if (m === 58) {
|
|
1836
|
-
if (r = e.input.charCodeAt(e.position + 1), se(r) || n &&
|
|
1839
|
+
if (r = e.input.charCodeAt(e.position + 1), se(r) || n && we(r))
|
|
1837
1840
|
break;
|
|
1838
1841
|
} else if (m === 35) {
|
|
1839
1842
|
if (i = e.input.charCodeAt(e.position - 1), se(i))
|
|
1840
1843
|
break;
|
|
1841
1844
|
} else {
|
|
1842
|
-
if (e.position === e.lineStart && Ve(e) || n &&
|
|
1845
|
+
if (e.position === e.lineStart && Ve(e) || n && we(m))
|
|
1843
1846
|
break;
|
|
1844
1847
|
if (de(m))
|
|
1845
1848
|
if (s = e.line, c = e.lineStart, d = e.lineIndent, Z(e, !1, -1), e.lineIndent >= t) {
|
|
@@ -1850,60 +1853,60 @@ function Ma(e, t, n) {
|
|
|
1850
1853
|
break;
|
|
1851
1854
|
}
|
|
1852
1855
|
}
|
|
1853
|
-
l && (
|
|
1856
|
+
l && (he(e, o, a, !1), ct(e, e.line - s), o = a = e.position, l = !1), ve(m) || (a = e.position + 1), m = e.input.charCodeAt(++e.position);
|
|
1854
1857
|
}
|
|
1855
|
-
return
|
|
1858
|
+
return he(e, o, a, !1), e.result ? !0 : (e.kind = u, e.result = p, !1);
|
|
1856
1859
|
}
|
|
1857
|
-
function
|
|
1860
|
+
function Da(e, t) {
|
|
1858
1861
|
var n, i, r;
|
|
1859
1862
|
if (n = e.input.charCodeAt(e.position), n !== 39)
|
|
1860
1863
|
return !1;
|
|
1861
1864
|
for (e.kind = "scalar", e.result = "", e.position++, i = r = e.position; (n = e.input.charCodeAt(e.position)) !== 0; )
|
|
1862
1865
|
if (n === 39)
|
|
1863
|
-
if (
|
|
1866
|
+
if (he(e, i, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39)
|
|
1864
1867
|
i = e.position, e.position++, r = e.position;
|
|
1865
1868
|
else
|
|
1866
1869
|
return !0;
|
|
1867
|
-
else de(n) ? (
|
|
1868
|
-
|
|
1870
|
+
else de(n) ? (he(e, i, r, !0), ct(e, Z(e, !1, t)), i = r = e.position) : e.position === e.lineStart && Ve(e) ? T(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
1871
|
+
T(e, "unexpected end of the stream within a single quoted scalar");
|
|
1869
1872
|
}
|
|
1870
|
-
function
|
|
1873
|
+
function Pa(e, t) {
|
|
1871
1874
|
var n, i, r, o, a, l;
|
|
1872
1875
|
if (l = e.input.charCodeAt(e.position), l !== 34)
|
|
1873
1876
|
return !1;
|
|
1874
1877
|
for (e.kind = "scalar", e.result = "", e.position++, n = i = e.position; (l = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1875
1878
|
if (l === 34)
|
|
1876
|
-
return
|
|
1879
|
+
return he(e, n, e.position, !0), e.position++, !0;
|
|
1877
1880
|
if (l === 92) {
|
|
1878
|
-
if (
|
|
1881
|
+
if (he(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), de(l))
|
|
1879
1882
|
Z(e, !1, t);
|
|
1880
1883
|
else if (l < 256 && Fn[l])
|
|
1881
1884
|
e.result += On[l], e.position++;
|
|
1882
1885
|
else if ((a = La(l)) > 0) {
|
|
1883
1886
|
for (r = a, o = 0; r > 0; r--)
|
|
1884
|
-
l = e.input.charCodeAt(++e.position), (a = Ba(l)) >= 0 ? o = (o << 4) + a :
|
|
1887
|
+
l = e.input.charCodeAt(++e.position), (a = Ba(l)) >= 0 ? o = (o << 4) + a : T(e, "expected hexadecimal character");
|
|
1885
1888
|
e.result += Ka(o), e.position++;
|
|
1886
1889
|
} else
|
|
1887
|
-
|
|
1890
|
+
T(e, "unknown escape sequence");
|
|
1888
1891
|
n = i = e.position;
|
|
1889
|
-
} else de(l) ? (
|
|
1892
|
+
} else de(l) ? (he(e, n, i, !0), ct(e, Z(e, !1, t)), n = i = e.position) : e.position === e.lineStart && Ve(e) ? T(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position);
|
|
1890
1893
|
}
|
|
1891
|
-
|
|
1894
|
+
T(e, "unexpected end of the stream within a double quoted scalar");
|
|
1892
1895
|
}
|
|
1893
|
-
function
|
|
1894
|
-
var n = !0, i, r, o, a = e.tag, l, s = e.anchor, c, d, u, p, m, y = /* @__PURE__ */ Object.create(null),
|
|
1895
|
-
if (
|
|
1896
|
+
function ja(e, t) {
|
|
1897
|
+
var n = !0, i, r, o, a = e.tag, l, s = e.anchor, c, d, u, p, m, y = /* @__PURE__ */ Object.create(null), h, b, k, A;
|
|
1898
|
+
if (A = e.input.charCodeAt(e.position), A === 91)
|
|
1896
1899
|
d = 93, m = !1, l = [];
|
|
1897
|
-
else if (
|
|
1900
|
+
else if (A === 123)
|
|
1898
1901
|
d = 125, m = !0, l = {};
|
|
1899
1902
|
else
|
|
1900
1903
|
return !1;
|
|
1901
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1902
|
-
if (Z(e, !0, t),
|
|
1904
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), A = e.input.charCodeAt(++e.position); A !== 0; ) {
|
|
1905
|
+
if (Z(e, !0, t), A = e.input.charCodeAt(e.position), A === d)
|
|
1903
1906
|
return e.position++, e.tag = a, e.anchor = s, e.kind = m ? "mapping" : "sequence", e.result = l, !0;
|
|
1904
|
-
n ?
|
|
1907
|
+
n ? A === 44 && T(e, "expected the node content, but found ','") : T(e, "missed comma between flow collection entries"), b = h = k = null, u = p = !1, A === 63 && (c = e.input.charCodeAt(e.position + 1), se(c) && (u = p = !0, e.position++, Z(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, Ee(e, t, Ke, !1, !0), b = e.tag, h = e.result, Z(e, !0, t), A = e.input.charCodeAt(e.position), (p || e.line === i) && A === 58 && (u = !0, A = e.input.charCodeAt(++e.position), Z(e, !0, t), Ee(e, t, Ke, !1, !0), k = e.result), m ? Se(e, l, y, b, h, k, i, r, o) : u ? l.push(Se(e, null, y, b, h, k, i, r, o)) : l.push(h), Z(e, !0, t), A = e.input.charCodeAt(e.position), A === 44 ? (n = !0, A = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1905
1908
|
}
|
|
1906
|
-
|
|
1909
|
+
T(e, "unexpected end of the stream within a flow collection");
|
|
1907
1910
|
}
|
|
1908
1911
|
function Ua(e, t) {
|
|
1909
1912
|
var n, i, r = Ge, o = !1, a = !1, l = t, s = 0, c = !1, d, u;
|
|
@@ -1915,9 +1918,9 @@ function Ua(e, t) {
|
|
|
1915
1918
|
return !1;
|
|
1916
1919
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1917
1920
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1918
|
-
Ge === r ? r = u === 43 ? $t : Ea :
|
|
1921
|
+
Ge === r ? r = u === 43 ? $t : Ea : T(e, "repeat of a chomping mode identifier");
|
|
1919
1922
|
else if ((d = Ra(u)) >= 0)
|
|
1920
|
-
d === 0 ?
|
|
1923
|
+
d === 0 ? T(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? T(e, "repeat of an indentation width identifier") : (l = t + d - 1, a = !0);
|
|
1921
1924
|
else
|
|
1922
1925
|
break;
|
|
1923
1926
|
if (ve(u)) {
|
|
@@ -1937,110 +1940,110 @@ function Ua(e, t) {
|
|
|
1937
1940
|
continue;
|
|
1938
1941
|
}
|
|
1939
1942
|
if (e.lineIndent < l) {
|
|
1940
|
-
r === $t ? e.result +=
|
|
1943
|
+
r === $t ? e.result += X.repeat(`
|
|
1941
1944
|
`, o ? 1 + s : s) : r === Ge && o && (e.result += `
|
|
1942
1945
|
`);
|
|
1943
1946
|
break;
|
|
1944
1947
|
}
|
|
1945
|
-
for (i ? ve(u) ? (c = !0, e.result +=
|
|
1946
|
-
`, o ? 1 + s : s)) : c ? (c = !1, e.result +=
|
|
1947
|
-
`, s + 1)) : s === 0 ? o && (e.result += " ") : e.result +=
|
|
1948
|
-
`, s) : e.result +=
|
|
1948
|
+
for (i ? ve(u) ? (c = !0, e.result += X.repeat(`
|
|
1949
|
+
`, o ? 1 + s : s)) : c ? (c = !1, e.result += X.repeat(`
|
|
1950
|
+
`, s + 1)) : s === 0 ? o && (e.result += " ") : e.result += X.repeat(`
|
|
1951
|
+
`, s) : e.result += X.repeat(`
|
|
1949
1952
|
`, o ? 1 + s : s), o = !0, a = !0, s = 0, n = e.position; !de(u) && u !== 0; )
|
|
1950
1953
|
u = e.input.charCodeAt(++e.position);
|
|
1951
|
-
|
|
1954
|
+
he(e, n, e.position, !1);
|
|
1952
1955
|
}
|
|
1953
1956
|
return !0;
|
|
1954
1957
|
}
|
|
1955
1958
|
function Ot(e, t) {
|
|
1956
1959
|
var n, i = e.tag, r = e.anchor, o = [], a, l = !1, s;
|
|
1957
1960
|
if (e.firstTabInLine !== -1) return !1;
|
|
1958
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1961
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, T(e, "tab characters must not be used in indentation")), !(s !== 45 || (a = e.input.charCodeAt(e.position + 1), !se(a)))); ) {
|
|
1959
1962
|
if (l = !0, e.position++, Z(e, !0, -1) && e.lineIndent <= t) {
|
|
1960
1963
|
o.push(null), s = e.input.charCodeAt(e.position);
|
|
1961
1964
|
continue;
|
|
1962
1965
|
}
|
|
1963
1966
|
if (n = e.line, Ee(e, t, $n, !1, !0), o.push(e.result), Z(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
1964
|
-
|
|
1967
|
+
T(e, "bad indentation of a sequence entry");
|
|
1965
1968
|
else if (e.lineIndent < t)
|
|
1966
1969
|
break;
|
|
1967
1970
|
}
|
|
1968
1971
|
return l ? (e.tag = i, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1969
1972
|
}
|
|
1970
1973
|
function qa(e, t, n) {
|
|
1971
|
-
var i, r, o, a, l, s, c = e.tag, d = e.anchor, u = {}, p = /* @__PURE__ */ Object.create(null), m = null, y = null,
|
|
1974
|
+
var i, r, o, a, l, s, c = e.tag, d = e.anchor, u = {}, p = /* @__PURE__ */ Object.create(null), m = null, y = null, h = null, b = !1, k = !1, A;
|
|
1972
1975
|
if (e.firstTabInLine !== -1) return !1;
|
|
1973
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = u),
|
|
1974
|
-
if (!
|
|
1975
|
-
|
|
1976
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), A = e.input.charCodeAt(e.position); A !== 0; ) {
|
|
1977
|
+
if (!b && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, T(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (A === 63 || A === 58) && se(i))
|
|
1978
|
+
A === 63 ? (b && (Se(e, u, p, m, y, null, a, l, s), m = y = h = null), k = !0, b = !0, r = !0) : b ? (b = !1, r = !0) : T(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, A = i;
|
|
1976
1979
|
else {
|
|
1977
1980
|
if (a = e.line, l = e.lineStart, s = e.position, !Ee(e, n, Sn, !1, !0))
|
|
1978
1981
|
break;
|
|
1979
1982
|
if (e.line === o) {
|
|
1980
|
-
for (
|
|
1981
|
-
|
|
1982
|
-
if (
|
|
1983
|
-
|
|
1984
|
-
else if (
|
|
1985
|
-
|
|
1983
|
+
for (A = e.input.charCodeAt(e.position); ve(A); )
|
|
1984
|
+
A = e.input.charCodeAt(++e.position);
|
|
1985
|
+
if (A === 58)
|
|
1986
|
+
A = e.input.charCodeAt(++e.position), se(A) || T(e, "a whitespace character is expected after the key-value separator within a block mapping"), b && (Se(e, u, p, m, y, null, a, l, s), m = y = h = null), k = !0, b = !1, r = !1, m = e.tag, y = e.result;
|
|
1987
|
+
else if (k)
|
|
1988
|
+
T(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1986
1989
|
else
|
|
1987
1990
|
return e.tag = c, e.anchor = d, !0;
|
|
1988
|
-
} else if (
|
|
1989
|
-
|
|
1991
|
+
} else if (k)
|
|
1992
|
+
T(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1990
1993
|
else
|
|
1991
1994
|
return e.tag = c, e.anchor = d, !0;
|
|
1992
1995
|
}
|
|
1993
|
-
if ((e.line === o || e.lineIndent > t) && (
|
|
1994
|
-
|
|
1996
|
+
if ((e.line === o || e.lineIndent > t) && (b && (a = e.line, l = e.lineStart, s = e.position), Ee(e, t, Ne, !0, r) && (b ? y = e.result : h = e.result), b || (Se(e, u, p, m, y, h, a, l, s), m = y = h = null), Z(e, !0, -1), A = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && A !== 0)
|
|
1997
|
+
T(e, "bad indentation of a mapping entry");
|
|
1995
1998
|
else if (e.lineIndent < t)
|
|
1996
1999
|
break;
|
|
1997
2000
|
}
|
|
1998
|
-
return
|
|
2001
|
+
return b && Se(e, u, p, m, y, null, a, l, s), k && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), k;
|
|
1999
2002
|
}
|
|
2000
2003
|
function Ha(e) {
|
|
2001
2004
|
var t, n = !1, i = !1, r, o, a;
|
|
2002
2005
|
if (a = e.input.charCodeAt(e.position), a !== 33) return !1;
|
|
2003
|
-
if (e.tag !== null &&
|
|
2006
|
+
if (e.tag !== null && T(e, "duplication of a tag property"), a = e.input.charCodeAt(++e.position), a === 60 ? (n = !0, a = e.input.charCodeAt(++e.position)) : a === 33 ? (i = !0, r = "!!", a = e.input.charCodeAt(++e.position)) : r = "!", t = e.position, n) {
|
|
2004
2007
|
do
|
|
2005
2008
|
a = e.input.charCodeAt(++e.position);
|
|
2006
2009
|
while (a !== 0 && a !== 62);
|
|
2007
|
-
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) :
|
|
2010
|
+
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) : T(e, "unexpected end of the stream within a verbatim tag");
|
|
2008
2011
|
} else {
|
|
2009
2012
|
for (; a !== 0 && !se(a); )
|
|
2010
|
-
a === 33 && (i ?
|
|
2011
|
-
o = e.input.slice(t, e.position), Oa.test(o) &&
|
|
2013
|
+
a === 33 && (i ? T(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1), Tn.test(r) || T(e, "named tag handle cannot contain such characters"), i = !0, t = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
2014
|
+
o = e.input.slice(t, e.position), Oa.test(o) && T(e, "tag suffix cannot contain flow indicator characters");
|
|
2012
2015
|
}
|
|
2013
|
-
o && !En.test(o) &&
|
|
2016
|
+
o && !En.test(o) && T(e, "tag name cannot contain such characters: " + o);
|
|
2014
2017
|
try {
|
|
2015
2018
|
o = decodeURIComponent(o);
|
|
2016
2019
|
} catch {
|
|
2017
|
-
|
|
2020
|
+
T(e, "tag name is malformed: " + o);
|
|
2018
2021
|
}
|
|
2019
|
-
return n ? e.tag = o : ye.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o :
|
|
2022
|
+
return n ? e.tag = o : ye.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o : T(e, 'undeclared tag handle "' + r + '"'), !0;
|
|
2020
2023
|
}
|
|
2021
2024
|
function Va(e) {
|
|
2022
2025
|
var t, n;
|
|
2023
2026
|
if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
|
|
2024
|
-
for (e.anchor !== null &&
|
|
2027
|
+
for (e.anchor !== null && T(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !se(n) && !we(n); )
|
|
2025
2028
|
n = e.input.charCodeAt(++e.position);
|
|
2026
|
-
return e.position === t &&
|
|
2029
|
+
return e.position === t && T(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
2027
2030
|
}
|
|
2028
2031
|
function Ya(e) {
|
|
2029
2032
|
var t, n, i;
|
|
2030
2033
|
if (i = e.input.charCodeAt(e.position), i !== 42) return !1;
|
|
2031
|
-
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !se(i) && !
|
|
2034
|
+
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !se(i) && !we(i); )
|
|
2032
2035
|
i = e.input.charCodeAt(++e.position);
|
|
2033
|
-
return e.position === t &&
|
|
2036
|
+
return e.position === t && T(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), ye.call(e.anchorMap, n) || T(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], Z(e, !0, -1), !0;
|
|
2034
2037
|
}
|
|
2035
2038
|
function Ee(e, t, n, i, r) {
|
|
2036
|
-
var o, a, l, s = 1, c = !1, d = !1, u, p, m, y,
|
|
2039
|
+
var o, a, l, s = 1, c = !1, d = !1, u, p, m, y, h, b;
|
|
2037
2040
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = Ne === n || $n === n, i && Z(e, !0, -1) && (c = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
2038
2041
|
for (; Ha(e) || Va(e); )
|
|
2039
2042
|
Z(e, !0, -1) ? (c = !0, l = o, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
2040
|
-
if (l && (l = c || r), (s === 1 || Ne === n) && (Ke === n || Sn === n ?
|
|
2043
|
+
if (l && (l = c || r), (s === 1 || Ne === n) && (Ke === n || Sn === n ? h = t : h = t + 1, b = e.position - e.lineStart, s === 1 ? l && (Ot(e, b) || qa(e, b, h)) || ja(e, h) ? d = !0 : (a && Ua(e, h) || Da(e, h) || Pa(e, h) ? d = !0 : Ya(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && T(e, "alias node should not have any properties")) : Ma(e, h, Ke === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && Ot(e, b))), e.tag === null)
|
|
2041
2044
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2042
2045
|
else if (e.tag === "?") {
|
|
2043
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2046
|
+
for (e.result !== null && e.kind !== "scalar" && T(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, p = e.implicitTypes.length; u < p; u += 1)
|
|
2044
2047
|
if (y = e.implicitTypes[u], y.resolve(e.result)) {
|
|
2045
2048
|
e.result = y.construct(e.result), e.tag = y.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2046
2049
|
break;
|
|
@@ -2054,7 +2057,7 @@ function Ee(e, t, n, i, r) {
|
|
|
2054
2057
|
y = m[u];
|
|
2055
2058
|
break;
|
|
2056
2059
|
}
|
|
2057
|
-
y ||
|
|
2060
|
+
y || T(e, "unknown tag !<" + e.tag + ">"), e.result !== null && y.kind !== e.kind && T(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + y.kind + '", not "' + e.kind + '"'), y.resolve(e.result, e.tag) ? (e.result = y.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : T(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2058
2061
|
}
|
|
2059
2062
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2060
2063
|
}
|
|
@@ -2063,7 +2066,7 @@ function Wa(e) {
|
|
|
2063
2066
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (a = e.input.charCodeAt(e.position)) !== 0 && (Z(e, !0, -1), a = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || a !== 37)); ) {
|
|
2064
2067
|
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !se(a); )
|
|
2065
2068
|
a = e.input.charCodeAt(++e.position);
|
|
2066
|
-
for (i = e.input.slice(n, e.position), r = [], i.length < 1 &&
|
|
2069
|
+
for (i = e.input.slice(n, e.position), r = [], i.length < 1 && T(e, "directive name must not be less than one character in length"); a !== 0; ) {
|
|
2067
2070
|
for (; ve(a); )
|
|
2068
2071
|
a = e.input.charCodeAt(++e.position);
|
|
2069
2072
|
if (a === 35) {
|
|
@@ -2079,12 +2082,12 @@ function Wa(e) {
|
|
|
2079
2082
|
}
|
|
2080
2083
|
a !== 0 && st(e), ye.call(It, i) ? It[i](e, i, r) : Me(e, 'unknown document directive "' + i + '"');
|
|
2081
2084
|
}
|
|
2082
|
-
if (Z(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, Z(e, !0, -1)) : o &&
|
|
2085
|
+
if (Z(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, Z(e, !0, -1)) : o && T(e, "directives end mark is expected"), Ee(e, e.lineIndent - 1, Ne, !1, !0), Z(e, !0, -1), e.checkLineBreaks && Fa.test(e.input.slice(t, e.position)) && Me(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Ve(e)) {
|
|
2083
2086
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, Z(e, !0, -1));
|
|
2084
2087
|
return;
|
|
2085
2088
|
}
|
|
2086
2089
|
if (e.position < e.length - 1)
|
|
2087
|
-
|
|
2090
|
+
T(e, "end of the stream or a document separator is expected");
|
|
2088
2091
|
else
|
|
2089
2092
|
return;
|
|
2090
2093
|
}
|
|
@@ -2092,7 +2095,7 @@ function Ln(e, t) {
|
|
|
2092
2095
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2093
2096
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2094
2097
|
var n = new Na(e, t), i = e.indexOf("\0");
|
|
2095
|
-
for (i !== -1 && (n.position = i,
|
|
2098
|
+
for (i !== -1 && (n.position = i, T(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2096
2099
|
n.lineIndent += 1, n.position += 1;
|
|
2097
2100
|
for (; n.position < n.length - 1; )
|
|
2098
2101
|
Wa(n);
|
|
@@ -2117,7 +2120,7 @@ function Ga(e, t) {
|
|
|
2117
2120
|
var za = Ja, Qa = Ga, Rn = {
|
|
2118
2121
|
loadAll: za,
|
|
2119
2122
|
load: Qa
|
|
2120
|
-
}, Kn = Object.prototype.toString, Nn = Object.prototype.hasOwnProperty, ut = 65279, Za = 9, Oe = 10, Xa = 13, eo = 32, to = 33, no = 34, Xe = 35, io = 37, ro = 38, ao = 39, oo = 42, Mn = 44, lo = 45,
|
|
2123
|
+
}, Kn = Object.prototype.toString, Nn = Object.prototype.hasOwnProperty, ut = 65279, Za = 9, Oe = 10, Xa = 13, eo = 32, to = 33, no = 34, Xe = 35, io = 37, ro = 38, ao = 39, oo = 42, Mn = 44, lo = 45, De = 58, so = 61, co = 62, uo = 63, fo = 64, Dn = 91, Pn = 93, po = 96, jn = 123, mo = 124, Un = 125, re = {};
|
|
2121
2124
|
re[0] = "\\0";
|
|
2122
2125
|
re[7] = "\\a";
|
|
2123
2126
|
re[8] = "\\b";
|
|
@@ -2133,7 +2136,7 @@ re[133] = "\\N";
|
|
|
2133
2136
|
re[160] = "\\_";
|
|
2134
2137
|
re[8232] = "\\L";
|
|
2135
2138
|
re[8233] = "\\P";
|
|
2136
|
-
var
|
|
2139
|
+
var go = [
|
|
2137
2140
|
"y",
|
|
2138
2141
|
"Y",
|
|
2139
2142
|
"yes",
|
|
@@ -2150,7 +2153,7 @@ var ho = [
|
|
|
2150
2153
|
"off",
|
|
2151
2154
|
"Off",
|
|
2152
2155
|
"OFF"
|
|
2153
|
-
],
|
|
2156
|
+
], ho = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2154
2157
|
function yo(e, t) {
|
|
2155
2158
|
var n, i, r, o, a, l, s;
|
|
2156
2159
|
if (t === null) return {};
|
|
@@ -2168,14 +2171,14 @@ function vo(e) {
|
|
|
2168
2171
|
n = "U", i = 8;
|
|
2169
2172
|
else
|
|
2170
2173
|
throw new oe("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2171
|
-
return "\\" + n +
|
|
2174
|
+
return "\\" + n + X.repeat("0", i - t.length) + t;
|
|
2172
2175
|
}
|
|
2173
2176
|
var bo = 1, Be = 2;
|
|
2174
2177
|
function ko(e) {
|
|
2175
|
-
this.schema = e.schema || lt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel =
|
|
2178
|
+
this.schema = e.schema || lt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = X.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = yo(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 === '"' ? Be : bo, 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;
|
|
2176
2179
|
}
|
|
2177
2180
|
function Bt(e, t) {
|
|
2178
|
-
for (var n =
|
|
2181
|
+
for (var n = X.repeat(" ", t), i = 0, r = -1, o = "", a, l = e.length; i < l; )
|
|
2179
2182
|
r = e.indexOf(`
|
|
2180
2183
|
`, i), r === -1 ? (a = e.slice(i), i = l) : (a = e.slice(i, r + 1), i = r + 1), a.length && a !== `
|
|
2181
2184
|
` && (o += n), o += a;
|
|
@@ -2183,7 +2186,7 @@ function Bt(e, t) {
|
|
|
2183
2186
|
}
|
|
2184
2187
|
function et(e, t) {
|
|
2185
2188
|
return `
|
|
2186
|
-
` +
|
|
2189
|
+
` + X.repeat(" ", e.indent * t);
|
|
2187
2190
|
}
|
|
2188
2191
|
function Co(e, t) {
|
|
2189
2192
|
var n, i, r;
|
|
@@ -2192,7 +2195,7 @@ function Co(e, t) {
|
|
|
2192
2195
|
return !0;
|
|
2193
2196
|
return !1;
|
|
2194
2197
|
}
|
|
2195
|
-
function
|
|
2198
|
+
function Pe(e) {
|
|
2196
2199
|
return e === eo || e === Za;
|
|
2197
2200
|
}
|
|
2198
2201
|
function Le(e) {
|
|
@@ -2202,20 +2205,20 @@ function Lt(e) {
|
|
|
2202
2205
|
return Le(e) && e !== ut && e !== Xa && e !== Oe;
|
|
2203
2206
|
}
|
|
2204
2207
|
function Rt(e, t, n) {
|
|
2205
|
-
var i = Lt(e), r = i && !
|
|
2208
|
+
var i = Lt(e), r = i && !Pe(e);
|
|
2206
2209
|
return (
|
|
2207
2210
|
// ns-plain-safe
|
|
2208
2211
|
(n ? (
|
|
2209
2212
|
// c = flow-in
|
|
2210
2213
|
i
|
|
2211
|
-
) : i && e !== Mn && e !==
|
|
2214
|
+
) : i && e !== Mn && e !== Dn && e !== Pn && e !== jn && e !== Un) && e !== Xe && !(t === De && !r) || Lt(t) && !Pe(t) && e === Xe || t === De && r
|
|
2212
2215
|
);
|
|
2213
2216
|
}
|
|
2214
2217
|
function xo(e) {
|
|
2215
|
-
return Le(e) && e !== ut && !
|
|
2218
|
+
return Le(e) && e !== ut && !Pe(e) && e !== lo && e !== uo && e !== De && e !== Mn && e !== Dn && e !== Pn && e !== jn && e !== Un && e !== Xe && e !== ro && e !== oo && e !== to && e !== mo && e !== so && e !== co && e !== ao && e !== no && e !== io && e !== fo && e !== po;
|
|
2216
2219
|
}
|
|
2217
2220
|
function Ao(e) {
|
|
2218
|
-
return !
|
|
2221
|
+
return !Pe(e) && e !== De;
|
|
2219
2222
|
}
|
|
2220
2223
|
function Ie(e, t) {
|
|
2221
2224
|
var n = e.charCodeAt(t), i;
|
|
@@ -2225,14 +2228,14 @@ function qn(e) {
|
|
|
2225
2228
|
var t = /^\n* /;
|
|
2226
2229
|
return t.test(e);
|
|
2227
2230
|
}
|
|
2228
|
-
var Hn = 1, tt = 2, Vn = 3, Yn = 4,
|
|
2231
|
+
var Hn = 1, tt = 2, Vn = 3, Yn = 4, _e = 5;
|
|
2229
2232
|
function _o(e, t, n, i, r, o, a, l) {
|
|
2230
|
-
var s, c = 0, d = null, u = !1, p = !1, m = i !== -1, y = -1,
|
|
2233
|
+
var s, c = 0, d = null, u = !1, p = !1, m = i !== -1, y = -1, h = xo(Ie(e, 0)) && Ao(Ie(e, e.length - 1));
|
|
2231
2234
|
if (t || a)
|
|
2232
2235
|
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2233
2236
|
if (c = Ie(e, s), !Le(c))
|
|
2234
|
-
return
|
|
2235
|
-
|
|
2237
|
+
return _e;
|
|
2238
|
+
h = h && Rt(c, d, l), d = c;
|
|
2236
2239
|
}
|
|
2237
2240
|
else {
|
|
2238
2241
|
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
@@ -2240,18 +2243,18 @@ function _o(e, t, n, i, r, o, a, l) {
|
|
|
2240
2243
|
u = !0, m && (p = p || // Foldable line = too long, and not more-indented.
|
|
2241
2244
|
s - y - 1 > i && e[y + 1] !== " ", y = s);
|
|
2242
2245
|
else if (!Le(c))
|
|
2243
|
-
return
|
|
2244
|
-
|
|
2246
|
+
return _e;
|
|
2247
|
+
h = h && Rt(c, d, l), d = c;
|
|
2245
2248
|
}
|
|
2246
2249
|
p = p || m && s - y - 1 > i && e[y + 1] !== " ";
|
|
2247
2250
|
}
|
|
2248
|
-
return !u && !p ?
|
|
2251
|
+
return !u && !p ? h && !a && !r(e) ? Hn : o === Be ? _e : tt : n > 9 && qn(e) ? _e : a ? o === Be ? _e : tt : p ? Yn : Vn;
|
|
2249
2252
|
}
|
|
2250
2253
|
function wo(e, t, n, i, r) {
|
|
2251
2254
|
e.dump = function() {
|
|
2252
2255
|
if (t.length === 0)
|
|
2253
2256
|
return e.quotingType === Be ? '""' : "''";
|
|
2254
|
-
if (!e.noCompatMode && (
|
|
2257
|
+
if (!e.noCompatMode && (go.indexOf(t) !== -1 || ho.test(t)))
|
|
2255
2258
|
return e.quotingType === Be ? '"' + t + '"' : "'" + t + "'";
|
|
2256
2259
|
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = i || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2257
2260
|
function s(c) {
|
|
@@ -2275,7 +2278,7 @@ function wo(e, t, n, i, r) {
|
|
|
2275
2278
|
return "|" + Kt(t, e.indent) + Nt(Bt(t, o));
|
|
2276
2279
|
case Yn:
|
|
2277
2280
|
return ">" + Kt(t, e.indent) + Nt(Bt(So(t, a), o));
|
|
2278
|
-
case
|
|
2281
|
+
case _e:
|
|
2279
2282
|
return '"' + $o(t) + '"';
|
|
2280
2283
|
default:
|
|
2281
2284
|
throw new oe("impossible error: invalid scalar style");
|
|
@@ -2327,7 +2330,7 @@ function To(e, t, n) {
|
|
|
2327
2330
|
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), (pe(e, t, l, !1, !1) || typeof l > "u" && pe(e, t, null, !1, !1)) && (i !== "" && (i += "," + (e.condenseFlow ? "" : " ")), i += e.dump);
|
|
2328
2331
|
e.tag = r, e.dump = "[" + i + "]";
|
|
2329
2332
|
}
|
|
2330
|
-
function
|
|
2333
|
+
function Dt(e, t, n, i) {
|
|
2331
2334
|
var r = "", o = e.tag, a, l, s;
|
|
2332
2335
|
for (a = 0, l = n.length; a < l; a += 1)
|
|
2333
2336
|
s = n[a], e.replacer && (s = e.replacer.call(n, String(a), s)), (pe(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && pe(e, t + 1, null, !0, !0, !1, !0)) && ((!i || r !== "") && (r += et(e, t)), e.dump && Oe === e.dump.charCodeAt(0) ? r += "-" : r += "- ", r += e.dump);
|
|
@@ -2351,7 +2354,7 @@ function Io(e, t, n, i) {
|
|
|
2351
2354
|
p = "", (!i || r !== "") && (p += et(e, t)), c = a[l], d = n[c], e.replacer && (d = e.replacer.call(n, c, d)), pe(e, t + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Oe === e.dump.charCodeAt(0) ? p += "?" : p += "? "), p += e.dump, u && (p += et(e, t)), pe(e, t + 1, d, !0, u) && (e.dump && Oe === e.dump.charCodeAt(0) ? p += ":" : p += ": ", p += e.dump, r += p));
|
|
2352
2355
|
e.tag = o, e.dump = r || "{}";
|
|
2353
2356
|
}
|
|
2354
|
-
function
|
|
2357
|
+
function Pt(e, t, n) {
|
|
2355
2358
|
var i, r, o, a, l, s;
|
|
2356
2359
|
for (r = n ? e.explicitTypes : e.implicitTypes, o = 0, a = r.length; o < a; o += 1)
|
|
2357
2360
|
if (l = r[o], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof t == "object" && t instanceof l.instanceOf) && (!l.predicate || l.predicate(t))) {
|
|
@@ -2369,7 +2372,7 @@ function Dt(e, t, n) {
|
|
|
2369
2372
|
return !1;
|
|
2370
2373
|
}
|
|
2371
2374
|
function pe(e, t, n, i, r, o, a) {
|
|
2372
|
-
e.tag = null, e.dump = n,
|
|
2375
|
+
e.tag = null, e.dump = n, Pt(e, n, !1) || Pt(e, n, !0);
|
|
2373
2376
|
var l = Kn.call(e.dump), s = i, c;
|
|
2374
2377
|
i && (i = e.flowLevel < 0 || e.flowLevel > t);
|
|
2375
2378
|
var d = l === "[object Object]" || l === "[object Array]", u, p;
|
|
@@ -2379,7 +2382,7 @@ function pe(e, t, n, i, r, o, a) {
|
|
|
2379
2382
|
if (d && p && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), l === "[object Object]")
|
|
2380
2383
|
i && Object.keys(e.dump).length !== 0 ? (Io(e, t, e.dump, r), p && (e.dump = "&ref_" + u + e.dump)) : (Eo(e, t, e.dump), p && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2381
2384
|
else if (l === "[object Array]")
|
|
2382
|
-
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ?
|
|
2385
|
+
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Dt(e, t - 1, e.dump, r) : Dt(e, t, e.dump, r), p && (e.dump = "&ref_" + u + e.dump)) : (To(e, t, e.dump), p && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2383
2386
|
else if (l === "[object String]")
|
|
2384
2387
|
e.tag !== "?" && wo(e, e.dump, t, o, s);
|
|
2385
2388
|
else {
|
|
@@ -2428,9 +2431,9 @@ function dt(e, t) {
|
|
|
2428
2431
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2429
2432
|
};
|
|
2430
2433
|
}
|
|
2431
|
-
var Ro = ie, Ko = ln, No = dn, Mo =
|
|
2434
|
+
var Ro = ie, Ko = ln, No = dn, Mo = hn, Do = yn, Po = lt, jo = Rn.load, Uo = Rn.loadAll, qo = Lo.dump, Ho = oe, Vo = {
|
|
2432
2435
|
binary: xn,
|
|
2433
|
-
float:
|
|
2436
|
+
float: gn,
|
|
2434
2437
|
map: un,
|
|
2435
2438
|
null: fn,
|
|
2436
2439
|
pairs: _n,
|
|
@@ -2447,9 +2450,9 @@ var Ro = ie, Ko = ln, No = dn, Mo = gn, jo = yn, Do = lt, Po = Rn.load, Uo = Rn.
|
|
|
2447
2450
|
Schema: Ko,
|
|
2448
2451
|
FAILSAFE_SCHEMA: No,
|
|
2449
2452
|
JSON_SCHEMA: Mo,
|
|
2450
|
-
CORE_SCHEMA:
|
|
2451
|
-
DEFAULT_SCHEMA:
|
|
2452
|
-
load:
|
|
2453
|
+
CORE_SCHEMA: Do,
|
|
2454
|
+
DEFAULT_SCHEMA: Po,
|
|
2455
|
+
load: jo,
|
|
2453
2456
|
loadAll: Uo,
|
|
2454
2457
|
dump: qo,
|
|
2455
2458
|
YAMLException: Ho,
|
|
@@ -2468,21 +2471,21 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2468
2471
|
}
|
|
2469
2472
|
},
|
|
2470
2473
|
setup(e) {
|
|
2471
|
-
const t = e, n =
|
|
2474
|
+
const t = e, n = S(() => {
|
|
2472
2475
|
const i = Object.fromEntries(Object.entries(t.entityRecord).filter(([, r]) => r !== null && r !== "" && (Array.isArray(r) ? r.length !== 0 : !0)));
|
|
2473
2476
|
return Object.keys(i).length === 0 && i.constructor === Object ? "" : Wn.dump(i).trim();
|
|
2474
2477
|
});
|
|
2475
2478
|
return (i, r) => {
|
|
2476
|
-
const o =
|
|
2477
|
-
return
|
|
2478
|
-
t.entityRecord ? (
|
|
2479
|
+
const o = j("KCodeBlock");
|
|
2480
|
+
return g(), $("div", Go, [
|
|
2481
|
+
t.entityRecord ? (g(), K(o, {
|
|
2479
2482
|
key: 0,
|
|
2480
2483
|
id: "yaml-codeblock",
|
|
2481
2484
|
code: n.value,
|
|
2482
2485
|
language: "yaml",
|
|
2483
2486
|
theme: "dark",
|
|
2484
|
-
onCodeBlockRender:
|
|
2485
|
-
}, null, 8, ["code", "onCodeBlockRender"])) :
|
|
2487
|
+
onCodeBlockRender: _(Te)
|
|
2488
|
+
}, null, 8, ["code", "onCodeBlockRender"])) : D("", !0)
|
|
2486
2489
|
]);
|
|
2487
2490
|
};
|
|
2488
2491
|
}
|
|
@@ -2510,7 +2513,7 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2510
2513
|
}
|
|
2511
2514
|
},
|
|
2512
2515
|
setup(e) {
|
|
2513
|
-
const t = e, n =
|
|
2516
|
+
const t = e, n = S(() => bi.includes(t.entityType)), i = S(() => ki.includes(t.entityType)), r = (c, d) => {
|
|
2514
2517
|
const u = te;
|
|
2515
2518
|
let p = "";
|
|
2516
2519
|
return typeof c == "string" ? p += `${u}${d} = "${c}"
|
|
@@ -2524,12 +2527,12 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2524
2527
|
if (d && (m += `${p}${d} = {
|
|
2525
2528
|
`), c === null)
|
|
2526
2529
|
return d ? m += `${p}}` : m = "{}", m;
|
|
2527
|
-
const y = Object.fromEntries(Object.entries(c).filter(([,
|
|
2528
|
-
let
|
|
2529
|
-
for (const [
|
|
2530
|
-
Array.isArray(
|
|
2531
|
-
`,
|
|
2532
|
-
`,
|
|
2530
|
+
const y = Object.fromEntries(Object.entries(c).filter(([, b]) => b !== null));
|
|
2531
|
+
let h = "";
|
|
2532
|
+
for (const [b, k] of Object.entries(y))
|
|
2533
|
+
Array.isArray(k) ? k.length === 0 ? h = "[]" : (h = `[
|
|
2534
|
+
`, h += a(k, void 0, p), h += `${p}${te}]`) : k && typeof k == "object" ? (h = `{
|
|
2535
|
+
`, h += o(k, void 0, p), h += `${p}${te}}`) : h = String(k ?? ""), typeof k == "string" && (h = `"${h}"`), m += `${p}${te}${b} = ${h}
|
|
2533
2536
|
`;
|
|
2534
2537
|
return d ? m += `${p}}
|
|
2535
2538
|
` : m;
|
|
@@ -2541,9 +2544,9 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2541
2544
|
d && (c.length === 0 ? m += `${p}${d} = [` : m += `${p}${d} = [
|
|
2542
2545
|
`);
|
|
2543
2546
|
for (let y = 0; y < c.length; y++) {
|
|
2544
|
-
const
|
|
2545
|
-
typeof
|
|
2546
|
-
`, m += o(
|
|
2547
|
+
const h = c[y];
|
|
2548
|
+
typeof h == "object" ? (m += `${p}${te}{
|
|
2549
|
+
`, m += o(h, void 0, p), m += `${p}${te}}`) : typeof h == "string" ? m += `${p}${te}"${h}"` : m += `${p}${te}${String(h ?? "")}`, y < c.length - 1 && (m += ","), m += `
|
|
2547
2550
|
`;
|
|
2548
2551
|
}
|
|
2549
2552
|
return d && (c.length === 0 ? m += `]
|
|
@@ -2554,21 +2557,21 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2554
2557
|
for (const [u, p] of Object.entries(c))
|
|
2555
2558
|
Array.isArray(p) ? d += a(p, u) : typeof p == "object" ? d += o(p, u) : d += r(p, u);
|
|
2556
2559
|
return d;
|
|
2557
|
-
}, s =
|
|
2558
|
-
var m, y,
|
|
2559
|
-
const c = Object.fromEntries(Object.entries(t.entityRecord).filter(([,
|
|
2560
|
+
}, s = S(() => {
|
|
2561
|
+
var m, y, h, b, k, A, B;
|
|
2562
|
+
const c = Object.fromEntries(Object.entries(t.entityRecord).filter(([, P]) => P != null)), d = t.entityRecord.config ? Object.fromEntries(Object.entries((m = t.entityRecord) == null ? void 0 : m.config).filter(([, P]) => P != null)) : void 0;
|
|
2560
2563
|
if (d && (c.config = d), Object.keys(c).length === 0)
|
|
2561
2564
|
return "";
|
|
2562
2565
|
delete c.id;
|
|
2563
2566
|
let u = "", p = "";
|
|
2564
|
-
if ((y = c.service) != null && y.id ? (p = "service", delete c.service) : (
|
|
2565
|
-
const
|
|
2566
|
-
u += `resource "konnect_event_gateway_${
|
|
2567
|
+
if ((y = c.service) != null && y.id ? (p = "service", delete c.service) : (h = c.route) != null && h.id ? (p = "route", delete c.route) : (b = c.consumer) != null && b.id ? (p = "consumer", delete c.consumer) : (k = c.consumer_group) != null && k.id ? (p = "consumer_group", delete c.consumer_group) : (A = c.certificate) != null && A.id ? (p = "certificate", delete c.certificate) : (B = c.set) != null && B.id && (p = "set", delete c.set), n.value) {
|
|
2568
|
+
const P = t.subEntityType ? `${t.entityType}_${t.subEntityType}` : t.entityType;
|
|
2569
|
+
u += `resource "konnect_event_gateway_${P}" "my_eventgateway${P.replaceAll("_", "")}" {
|
|
2567
2570
|
`, u += `${te}provider = konnect-beta
|
|
2568
2571
|
`;
|
|
2569
2572
|
} else if (t.entityType === "plugin") {
|
|
2570
|
-
const
|
|
2571
|
-
delete c.name, u += `resource "konnect_gateway_plugin_${
|
|
2573
|
+
const P = t.credentialType.replace(/-/g, "_") || (c.name + "").replace(/-/g, "_");
|
|
2574
|
+
delete c.name, u += `resource "konnect_gateway_plugin_${P}" "my_${P}" {
|
|
2572
2575
|
`;
|
|
2573
2576
|
} else i.value ? (u += `resource "konnect_${t.entityType}" "my_${t.entityType}" {
|
|
2574
2577
|
`, u += `${te}provider = konnect-beta
|
|
@@ -2582,16 +2585,16 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2582
2585
|
`, u;
|
|
2583
2586
|
});
|
|
2584
2587
|
return (c, d) => {
|
|
2585
|
-
const u =
|
|
2586
|
-
return
|
|
2587
|
-
t.entityRecord ? (
|
|
2588
|
+
const u = j("KCodeBlock");
|
|
2589
|
+
return g(), $("div", zo, [
|
|
2590
|
+
t.entityRecord ? (g(), K(u, {
|
|
2588
2591
|
key: 0,
|
|
2589
2592
|
id: "terraform-codeblock",
|
|
2590
2593
|
code: s.value,
|
|
2591
2594
|
language: "terraform",
|
|
2592
2595
|
theme: "dark",
|
|
2593
|
-
onCodeBlockRender:
|
|
2594
|
-
}, null, 8, ["code", "onCodeBlockRender"])) :
|
|
2596
|
+
onCodeBlockRender: _(Te)
|
|
2597
|
+
}, null, 8, ["code", "onCodeBlockRender"])) : D("", !0)
|
|
2595
2598
|
]);
|
|
2596
2599
|
};
|
|
2597
2600
|
}
|
|
@@ -2658,31 +2661,31 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2658
2661
|
}
|
|
2659
2662
|
},
|
|
2660
2663
|
setup(e) {
|
|
2661
|
-
const t = e, n = Ue(), { i18n: { t: i } } =
|
|
2664
|
+
const t = e, n = Ue(), { i18n: { t: i } } = J.useI18n(), r = (l) => !!(l.tooltip || n[`${l.key}-label-tooltip`]), o = S(() => {
|
|
2662
2665
|
if (!t.record)
|
|
2663
2666
|
return t.record;
|
|
2664
2667
|
let l = t.record;
|
|
2665
2668
|
t.codeBlockRecordFormatter && (l = t.codeBlockRecordFormatter(l, t.format));
|
|
2666
2669
|
const s = JSON.parse(JSON.stringify(l));
|
|
2667
2670
|
return delete s.created_at, delete s.updated_at, s;
|
|
2668
|
-
}), a =
|
|
2669
|
-
return (l, s) => (
|
|
2670
|
-
e.format === "structured" ? (
|
|
2671
|
-
(
|
|
2671
|
+
}), a = S(() => t.fetcherUrl.replace(/(\?|&)__ui_data=true/, ""));
|
|
2672
|
+
return (l, s) => (g(), $(ue, null, [
|
|
2673
|
+
e.format === "structured" ? (g(), $("div", Qo, [
|
|
2674
|
+
(g(!0), $(ue, null, ce(e.propListTypes, (c) => (g(), $("div", {
|
|
2672
2675
|
key: `config-card-details-${c}-props`,
|
|
2673
2676
|
class: fe(`config-card-details-${c}-props`),
|
|
2674
2677
|
"data-testid": `config-card-details-${c}-props`
|
|
2675
2678
|
}, [
|
|
2676
|
-
c !== "basic" ? (
|
|
2677
|
-
(
|
|
2679
|
+
c !== "basic" ? (g(), $("div", Xo, I(c === "advanced" ? _(i)("baseConfigCard.sections.advanced") : c === "plugin" ? _(i)("baseConfigCard.sections.plugin") : _(i)("baseConfigCard.sections.policy")), 1)) : D("", !0),
|
|
2680
|
+
(g(!0), $(ue, null, ce(e.propertyCollections[c], (d) => U(l.$slots, `config-card-item-${d.key}`, {
|
|
2678
2681
|
key: d.key,
|
|
2679
2682
|
item: d
|
|
2680
2683
|
}, () => [
|
|
2681
|
-
|
|
2682
|
-
label:
|
|
2684
|
+
R(nn, { item: d }, ke({
|
|
2685
|
+
label: w(() => [
|
|
2683
2686
|
U(l.$slots, `${d.key}-label`, { row: d }, void 0, !0)
|
|
2684
2687
|
]),
|
|
2685
|
-
[d.key]:
|
|
2688
|
+
[d.key]: w(({ rowValue: u }) => [
|
|
2686
2689
|
U(l.$slots, d.key, {
|
|
2687
2690
|
row: d,
|
|
2688
2691
|
rowValue: u
|
|
@@ -2692,7 +2695,7 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2692
2695
|
}, [
|
|
2693
2696
|
r(d) ? {
|
|
2694
2697
|
name: "label-tooltip",
|
|
2695
|
-
fn:
|
|
2698
|
+
fn: w(() => [
|
|
2696
2699
|
U(l.$slots, `${d.key}-label-tooltip`, { row: d }, void 0, !0)
|
|
2697
2700
|
]),
|
|
2698
2701
|
key: "0"
|
|
@@ -2700,24 +2703,24 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2700
2703
|
]), 1032, ["item"])
|
|
2701
2704
|
], !0)), 128))
|
|
2702
2705
|
], 10, Zo))), 128))
|
|
2703
|
-
])) :
|
|
2704
|
-
e.format === "json" && o.value ? (
|
|
2706
|
+
])) : D("", !0),
|
|
2707
|
+
e.format === "json" && o.value ? (g(), K(rn, {
|
|
2705
2708
|
key: 1,
|
|
2706
2709
|
config: t.config,
|
|
2707
2710
|
"entity-record": o.value,
|
|
2708
2711
|
"fetcher-url": a.value,
|
|
2709
2712
|
"request-method": "get"
|
|
2710
|
-
}, null, 8, ["config", "entity-record", "fetcher-url"])) :
|
|
2711
|
-
e.format === "yaml" && o.value ? (
|
|
2713
|
+
}, null, 8, ["config", "entity-record", "fetcher-url"])) : D("", !0),
|
|
2714
|
+
e.format === "yaml" && o.value ? (g(), K(Jn, {
|
|
2712
2715
|
key: 2,
|
|
2713
2716
|
"entity-record": o.value
|
|
2714
|
-
}, null, 8, ["entity-record"])) :
|
|
2715
|
-
e.format === "terraform" && o.value ? (
|
|
2717
|
+
}, null, 8, ["entity-record"])) : D("", !0),
|
|
2718
|
+
e.format === "terraform" && o.value ? (g(), K(Gn, {
|
|
2716
2719
|
key: 3,
|
|
2717
2720
|
"entity-record": o.value,
|
|
2718
2721
|
"entity-type": t.entityType,
|
|
2719
2722
|
"sub-entity-type": t.subEntityType
|
|
2720
|
-
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])) :
|
|
2723
|
+
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])) : D("", !0)
|
|
2721
2724
|
], 64));
|
|
2722
2725
|
}
|
|
2723
2726
|
}), tl = /* @__PURE__ */ le(el, [["__scopeId", "data-v-a7689049"]]), nl = {
|
|
@@ -2845,10 +2848,10 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2845
2848
|
},
|
|
2846
2849
|
emits: ["loading", "fetch:success", "fetch:error", "configFormatChange"],
|
|
2847
2850
|
setup(e, { emit: t }) {
|
|
2848
|
-
var
|
|
2849
|
-
const n = t, i = e, { i18n: { t: r } } =
|
|
2850
|
-
|
|
2851
|
-
const { axiosInstance: l } =
|
|
2851
|
+
var x;
|
|
2852
|
+
const n = t, i = e, { i18n: { t: r } } = J.useI18n(), { getMessageFromError: o } = J.useErrors(), { convertKeyToTitle: a } = J.useStringHelpers();
|
|
2853
|
+
J.useSubSchema(i.pluginConfigKey);
|
|
2854
|
+
const { axiosInstance: l } = J.useAxios((x = i.config) == null ? void 0 : x.axiosRequestConfig), s = [
|
|
2852
2855
|
{
|
|
2853
2856
|
label: r("baseConfigCard.general.structuredFormat"),
|
|
2854
2857
|
value: "structured",
|
|
@@ -2882,7 +2885,7 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2882
2885
|
});
|
|
2883
2886
|
const m = {
|
|
2884
2887
|
id: {
|
|
2885
|
-
type:
|
|
2888
|
+
type: W.ID,
|
|
2886
2889
|
label: r("baseConfigCard.commonFields.id_label"),
|
|
2887
2890
|
order: 0,
|
|
2888
2891
|
section: ae.Basic
|
|
@@ -2892,224 +2895,224 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
2892
2895
|
section: ae.Basic
|
|
2893
2896
|
},
|
|
2894
2897
|
enabled: {
|
|
2895
|
-
type:
|
|
2898
|
+
type: W.BadgeStatus,
|
|
2896
2899
|
order: 2,
|
|
2897
2900
|
section: ae.Basic
|
|
2898
2901
|
},
|
|
2899
2902
|
updated_at: {
|
|
2900
|
-
type:
|
|
2903
|
+
type: W.Date,
|
|
2901
2904
|
label: r("baseConfigCard.commonFields.updated_at_label"),
|
|
2902
2905
|
order: 3,
|
|
2903
2906
|
section: ae.Basic
|
|
2904
2907
|
},
|
|
2905
2908
|
created_at: {
|
|
2906
|
-
type:
|
|
2909
|
+
type: W.Date,
|
|
2907
2910
|
label: r("baseConfigCard.commonFields.created_at_label"),
|
|
2908
2911
|
order: 4,
|
|
2909
2912
|
section: ae.Basic
|
|
2910
2913
|
},
|
|
2911
2914
|
tags: {
|
|
2912
|
-
type:
|
|
2915
|
+
type: W.BadgeTag,
|
|
2913
2916
|
order: -1,
|
|
2914
2917
|
// the last property displayed
|
|
2915
2918
|
section: ae.Basic
|
|
2916
2919
|
},
|
|
2917
2920
|
partials: {
|
|
2918
|
-
type:
|
|
2921
|
+
type: W.LinkInternal,
|
|
2919
2922
|
label: r("baseConfigCard.commonFields.partial_label"),
|
|
2920
2923
|
order: -1,
|
|
2921
2924
|
// the last property displayed
|
|
2922
2925
|
section: ae.Basic
|
|
2923
2926
|
}
|
|
2924
|
-
}, y = N(!1),
|
|
2925
|
-
var
|
|
2926
|
-
if (!
|
|
2927
|
+
}, y = N(!1), h = N(!1), b = N(""), k = N({}), A = S(() => {
|
|
2928
|
+
var C, Y, G;
|
|
2929
|
+
if (!k.value)
|
|
2927
2930
|
return [];
|
|
2928
|
-
const f = [], v = Object.keys(
|
|
2929
|
-
for (const E in
|
|
2931
|
+
const f = [], v = Object.keys(k.value).length;
|
|
2932
|
+
for (const E in k.value) {
|
|
2930
2933
|
if (E === "__ui_data") continue;
|
|
2931
|
-
const
|
|
2934
|
+
const O = (Y = (C = i.configSchema) == null ? void 0 : C[E]) == null ? void 0 : Y.order, V = (G = m[E]) == null ? void 0 : G.order;
|
|
2932
2935
|
let H = v;
|
|
2933
|
-
(
|
|
2936
|
+
(V || V === 0) && (H = V === -1 ? v + 1 : V), O && (H = O === -1 ? v + 1 : O), f.push([E, H]);
|
|
2934
2937
|
}
|
|
2935
|
-
return f.sort(function(E,
|
|
2936
|
-
return E[1] -
|
|
2938
|
+
return f.sort(function(E, O) {
|
|
2939
|
+
return E[1] - O[1];
|
|
2937
2940
|
}), f.map((E) => {
|
|
2938
2941
|
var ft, pt;
|
|
2939
|
-
const
|
|
2942
|
+
const O = E[0], V = (ft = k.value) == null ? void 0 : ft[O], H = ((pt = i.configSchema) == null ? void 0 : pt[O]) || {}, Q = m[O];
|
|
2940
2943
|
return {
|
|
2941
|
-
key:
|
|
2942
|
-
value:
|
|
2944
|
+
key: O,
|
|
2945
|
+
value: V,
|
|
2943
2946
|
hidden: H.hidden || !1,
|
|
2944
|
-
type: H.type ?? ((Q == null ? void 0 : Q.type) ||
|
|
2945
|
-
label: H.label ?? ((Q == null ? void 0 : Q.label) || a(
|
|
2947
|
+
type: H.type ?? ((Q == null ? void 0 : Q.type) || W.Text),
|
|
2948
|
+
label: H.label ?? ((Q == null ? void 0 : Q.label) || a(O)),
|
|
2946
2949
|
tooltip: H.tooltip ?? ((Q == null ? void 0 : Q.tooltip) || void 0),
|
|
2947
2950
|
section: H.section ?? ((Q == null ? void 0 : Q.section) || ae.Advanced)
|
|
2948
2951
|
};
|
|
2949
2952
|
}).filter((E) => !E.hidden && E.key !== i.pluginConfigKey);
|
|
2950
|
-
}), B =
|
|
2951
|
-
var
|
|
2952
|
-
if (!
|
|
2953
|
+
}), B = S(() => {
|
|
2954
|
+
var Y, G;
|
|
2955
|
+
if (!k.value || !i.pluginConfigKey)
|
|
2953
2956
|
return [];
|
|
2954
|
-
const f =
|
|
2957
|
+
const f = k.value[i.pluginConfigKey] || {}, v = Object.keys(f).length, C = [];
|
|
2955
2958
|
for (const E in f) {
|
|
2956
|
-
const
|
|
2957
|
-
let H =
|
|
2958
|
-
|
|
2959
|
+
const O = (G = (Y = i.pluginConfigSchema) == null ? void 0 : Y[E]) == null ? void 0 : G.order, V = f[E];
|
|
2960
|
+
let H = V != null && V !== "" ? v - 1 : v;
|
|
2961
|
+
O && (H = O === -1 ? v + 1 : O), C.push([E, H]);
|
|
2959
2962
|
}
|
|
2960
|
-
return
|
|
2961
|
-
return E[1] -
|
|
2962
|
-
}),
|
|
2963
|
+
return C.sort(function(E, O) {
|
|
2964
|
+
return E[1] - O[1];
|
|
2965
|
+
}), C.map((E) => {
|
|
2963
2966
|
var Q;
|
|
2964
|
-
const
|
|
2967
|
+
const O = E[0], V = f[O], H = ((Q = i.pluginConfigSchema) == null ? void 0 : Q[O]) || {};
|
|
2965
2968
|
return {
|
|
2966
|
-
key:
|
|
2967
|
-
value:
|
|
2969
|
+
key: O,
|
|
2970
|
+
value: V,
|
|
2968
2971
|
hidden: H.hidden || !1,
|
|
2969
|
-
type: H.type ??
|
|
2970
|
-
label: H.label ?? a(
|
|
2972
|
+
type: H.type ?? W.Text,
|
|
2973
|
+
label: H.label ?? a(O),
|
|
2971
2974
|
tooltip: H.tooltip ?? void 0,
|
|
2972
2975
|
section: ae.Plugin
|
|
2973
2976
|
};
|
|
2974
2977
|
}).filter((E) => !E.hidden);
|
|
2975
|
-
}),
|
|
2976
|
-
var
|
|
2977
|
-
if (!
|
|
2978
|
+
}), P = S(() => {
|
|
2979
|
+
var Y, G;
|
|
2980
|
+
if (!k.value || !i.policyConfigKey)
|
|
2978
2981
|
return [];
|
|
2979
|
-
const f =
|
|
2982
|
+
const f = k.value[i.policyConfigKey] || {}, v = Object.keys(f).length, C = [];
|
|
2980
2983
|
for (const E in f) {
|
|
2981
|
-
const
|
|
2982
|
-
let H =
|
|
2983
|
-
|
|
2984
|
+
const O = (G = (Y = i.policyConfigSchema) == null ? void 0 : Y[E]) == null ? void 0 : G.order, V = f[E];
|
|
2985
|
+
let H = V != null && V !== "" ? v - 1 : v;
|
|
2986
|
+
O && (H = O === -1 ? v + 1 : O), C.push([E, H]);
|
|
2984
2987
|
}
|
|
2985
|
-
return
|
|
2986
|
-
return E[1] -
|
|
2987
|
-
}),
|
|
2988
|
+
return C.sort(function(E, O) {
|
|
2989
|
+
return E[1] - O[1];
|
|
2990
|
+
}), C.map((E) => {
|
|
2988
2991
|
var Q;
|
|
2989
|
-
const
|
|
2992
|
+
const O = E[0], V = f[O], H = ((Q = i.policyConfigSchema) == null ? void 0 : Q[O]) || {};
|
|
2990
2993
|
return {
|
|
2991
|
-
key:
|
|
2992
|
-
value:
|
|
2994
|
+
key: O,
|
|
2995
|
+
value: V,
|
|
2993
2996
|
hidden: H.hidden || !1,
|
|
2994
|
-
type: H.type ??
|
|
2995
|
-
label: H.label ?? a(
|
|
2997
|
+
type: H.type ?? W.Text,
|
|
2998
|
+
label: H.label ?? a(O),
|
|
2996
2999
|
tooltip: H.tooltip ?? void 0,
|
|
2997
3000
|
section: ae.Policy
|
|
2998
3001
|
};
|
|
2999
3002
|
}).filter((E) => !E.hidden);
|
|
3000
|
-
}),
|
|
3001
|
-
var f, v,
|
|
3003
|
+
}), ee = S(() => {
|
|
3004
|
+
var f, v, C, Y, G, E;
|
|
3002
3005
|
return {
|
|
3003
|
-
basic: (f =
|
|
3004
|
-
advanced: (v =
|
|
3005
|
-
plugin: (
|
|
3006
|
-
policy: (E =
|
|
3006
|
+
basic: (f = A.value) == null ? void 0 : f.filter((O) => O.section === ae.Basic),
|
|
3007
|
+
advanced: (v = A.value) == null ? void 0 : v.filter((O) => O.section === ae.Advanced),
|
|
3008
|
+
plugin: (Y = B.value) == null ? void 0 : Y.concat((C = A.value) == null ? void 0 : C.filter((O) => O.section === ae.Plugin)),
|
|
3009
|
+
policy: (E = P.value) == null ? void 0 : E.concat((G = A.value) == null ? void 0 : G.filter((O) => O.section === ae.Policy))
|
|
3007
3010
|
};
|
|
3008
|
-
}),
|
|
3011
|
+
}), M = S(() => {
|
|
3009
3012
|
const f = [];
|
|
3010
|
-
return
|
|
3011
|
-
}),
|
|
3012
|
-
var v,
|
|
3013
|
+
return ee.value.basic.length && f.push("basic"), ee.value.advanced.length && f.push("advanced"), ee.value.plugin.length && f.push("plugin"), ee.value.policy.length && f.push("policy"), f;
|
|
3014
|
+
}), F = S(() => {
|
|
3015
|
+
var v, C;
|
|
3013
3016
|
let f = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3014
|
-
return i.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((v = i.config) == null ? void 0 : v.controlPlaneId) || "") : i.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (
|
|
3017
|
+
return i.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((v = i.config) == null ? void 0 : v.controlPlaneId) || "") : i.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (C = i.config) != null && C.workspace ? `/${i.config.workspace}` : "")), f = f.replace(/{id}/gi, i.config.entityId), f;
|
|
3015
3018
|
});
|
|
3016
3019
|
return be(y, (f) => {
|
|
3017
3020
|
n("loading", f);
|
|
3018
3021
|
}, { immediate: !0 }), rt(async () => {
|
|
3019
|
-
|
|
3022
|
+
h.value = !1, y.value = !0;
|
|
3020
3023
|
try {
|
|
3021
|
-
const { data: f } = await l.get(
|
|
3024
|
+
const { data: f } = await l.get(F.value);
|
|
3022
3025
|
if (i.dataKey)
|
|
3023
3026
|
if (typeof f[i.dataKey] < "u")
|
|
3024
|
-
|
|
3027
|
+
k.value = { ...f[i.dataKey] };
|
|
3025
3028
|
else
|
|
3026
3029
|
throw new Error(r("errors.dataKeyUndefined", { dataKey: i.dataKey }));
|
|
3027
|
-
else i.recordResolver ?
|
|
3028
|
-
Object.keys(i.configSchema).filter((
|
|
3029
|
-
|
|
3030
|
+
else i.recordResolver ? k.value = { ...i.recordResolver(f) } : k.value = { ...f };
|
|
3031
|
+
Object.keys(i.configSchema).filter((C) => i.configSchema[C].forceShow).forEach((C) => {
|
|
3032
|
+
k.value && typeof k.value[C] > "u" && (k.value[C] = null);
|
|
3030
3033
|
}), n("fetch:success", f);
|
|
3031
3034
|
} catch (f) {
|
|
3032
3035
|
const v = o(f);
|
|
3033
|
-
|
|
3036
|
+
b.value = v.startsWith("code") ? r("baseConfigCard.errors.load") : v, h.value = !0, n("fetch:error", f);
|
|
3034
3037
|
} finally {
|
|
3035
3038
|
y.value = !1;
|
|
3036
3039
|
}
|
|
3037
3040
|
}), (f, v) => {
|
|
3038
|
-
const
|
|
3039
|
-
return
|
|
3041
|
+
const C = j("KLabel"), Y = j("KSelect"), G = j("KButton"), E = j("KSkeleton"), O = j("KEmptyState"), V = j("KCard");
|
|
3042
|
+
return g(), K(V, {
|
|
3040
3043
|
class: "kong-ui-entity-base-config-card",
|
|
3041
3044
|
"title-tag": e.titleTag
|
|
3042
|
-
},
|
|
3043
|
-
actions:
|
|
3045
|
+
}, ke({
|
|
3046
|
+
actions: w(() => [
|
|
3044
3047
|
L("div", il, [
|
|
3045
3048
|
U(f.$slots, "actions", {}, void 0, !0),
|
|
3046
|
-
|
|
3049
|
+
R(C, {
|
|
3047
3050
|
class: "config-format-select-label",
|
|
3048
3051
|
"data-testid": "config-format-select-label"
|
|
3049
3052
|
}, {
|
|
3050
|
-
default:
|
|
3051
|
-
q(
|
|
3053
|
+
default: w(() => [
|
|
3054
|
+
q(I(e.label), 1)
|
|
3052
3055
|
]),
|
|
3053
3056
|
_: 1
|
|
3054
3057
|
}),
|
|
3055
|
-
|
|
3058
|
+
R(Y, {
|
|
3056
3059
|
modelValue: d.value,
|
|
3057
3060
|
"onUpdate:modelValue": v[0] || (v[0] = (H) => d.value = H),
|
|
3058
3061
|
"data-testid": "select-config-format",
|
|
3059
3062
|
items: s,
|
|
3060
3063
|
onChange: u
|
|
3061
3064
|
}, null, 8, ["modelValue"]),
|
|
3062
|
-
e.configCardDoc ? (
|
|
3065
|
+
e.configCardDoc ? (g(), K(G, {
|
|
3063
3066
|
key: 0,
|
|
3064
3067
|
appearance: "tertiary",
|
|
3065
3068
|
class: "book-icon",
|
|
3066
3069
|
"data-testid": "book-icon"
|
|
3067
3070
|
}, {
|
|
3068
|
-
default:
|
|
3071
|
+
default: w(() => [
|
|
3069
3072
|
L("a", {
|
|
3070
3073
|
href: e.configCardDoc,
|
|
3071
3074
|
rel: "noopener",
|
|
3072
3075
|
target: "_blank"
|
|
3073
3076
|
}, [
|
|
3074
|
-
|
|
3077
|
+
R(_(Jt), { size: _(fr) }, null, 8, ["size"])
|
|
3075
3078
|
], 8, rl)
|
|
3076
3079
|
]),
|
|
3077
3080
|
_: 1
|
|
3078
|
-
})) :
|
|
3081
|
+
})) : D("", !0)
|
|
3079
3082
|
])
|
|
3080
3083
|
]),
|
|
3081
|
-
default:
|
|
3082
|
-
y.value ? (
|
|
3084
|
+
default: w(() => [
|
|
3085
|
+
y.value ? (g(), K(E, {
|
|
3083
3086
|
key: 0,
|
|
3084
3087
|
"data-testid": "config-card-loader",
|
|
3085
3088
|
"table-columns": 2,
|
|
3086
3089
|
type: "table"
|
|
3087
|
-
})) :
|
|
3090
|
+
})) : h.value ? (g(), K(O, {
|
|
3088
3091
|
key: 1,
|
|
3089
3092
|
"data-testid": "config-card-fetch-error",
|
|
3090
3093
|
"icon-variant": "error"
|
|
3091
3094
|
}, {
|
|
3092
|
-
default:
|
|
3093
|
-
L("h3", null,
|
|
3095
|
+
default: w(() => [
|
|
3096
|
+
L("h3", null, I(b.value), 1)
|
|
3094
3097
|
]),
|
|
3095
3098
|
_: 1
|
|
3096
|
-
})) :
|
|
3099
|
+
})) : D("", !0),
|
|
3097
3100
|
L("div", al, [
|
|
3098
|
-
|
|
3101
|
+
R(tl, {
|
|
3099
3102
|
"code-block-record-formatter": e.codeBlockRecordFormatter,
|
|
3100
3103
|
config: e.config,
|
|
3101
3104
|
"entity-type": e.entityType,
|
|
3102
|
-
"fetcher-url":
|
|
3105
|
+
"fetcher-url": F.value,
|
|
3103
3106
|
format: d.value,
|
|
3104
|
-
"prop-list-types":
|
|
3105
|
-
"property-collections":
|
|
3106
|
-
record:
|
|
3107
|
+
"prop-list-types": M.value,
|
|
3108
|
+
"property-collections": ee.value,
|
|
3109
|
+
record: k.value,
|
|
3107
3110
|
"sub-entity-type": e.subEntityType
|
|
3108
|
-
},
|
|
3111
|
+
}, ke({ _: 2 }, [
|
|
3109
3112
|
ce(Object.keys(f.$slots), (H) => ({
|
|
3110
3113
|
name: H,
|
|
3111
|
-
fn:
|
|
3112
|
-
U(f.$slots, H, Yt({ record:
|
|
3114
|
+
fn: w((Q) => [
|
|
3115
|
+
U(f.$slots, H, Yt({ record: k.value }, Q), void 0, !0)
|
|
3113
3116
|
])
|
|
3114
3117
|
}))
|
|
3115
3118
|
]), 1032, ["code-block-record-formatter", "config", "entity-type", "fetcher-url", "format", "prop-list-types", "property-collections", "record", "sub-entity-type"])
|
|
@@ -3119,10 +3122,10 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
3119
3122
|
}, [
|
|
3120
3123
|
e.hideTitle ? void 0 : {
|
|
3121
3124
|
name: "title",
|
|
3122
|
-
fn:
|
|
3125
|
+
fn: w(() => [
|
|
3123
3126
|
L("span", nl, [
|
|
3124
3127
|
U(f.$slots, "title", {}, () => [
|
|
3125
|
-
q(
|
|
3128
|
+
q(I(_(r)("baseConfigCard.title")), 1)
|
|
3126
3129
|
], !0)
|
|
3127
3130
|
])
|
|
3128
3131
|
]),
|
|
@@ -3134,98 +3137,111 @@ const Go = { class: "yaml-config config-card-code-block" }, Jn = /* @__PURE__ */
|
|
|
3134
3137
|
}), Fs = /* @__PURE__ */ le(ol, [["__scopeId", "data-v-f2b42324"]]), ll = { class: "deck-config config-card-code-block" }, sl = /* @__PURE__ */ z({
|
|
3135
3138
|
__name: "DeckCodeBlock",
|
|
3136
3139
|
props: {
|
|
3140
|
+
app: {},
|
|
3137
3141
|
entityRecord: {},
|
|
3138
3142
|
entityType: {},
|
|
3139
3143
|
geoApiServerUrl: {},
|
|
3140
|
-
controlPlaneName: {}
|
|
3144
|
+
controlPlaneName: {},
|
|
3145
|
+
kongAdminApiUrl: {},
|
|
3146
|
+
workspace: {}
|
|
3141
3147
|
},
|
|
3142
3148
|
setup(e) {
|
|
3143
|
-
const t = e, { i18n: n, i18nT: i } =
|
|
3149
|
+
const t = e, { i18n: n, i18nT: i } = J.useI18n(), r = [
|
|
3144
3150
|
{ value: "bash", label: "Linux / macOS Bash" },
|
|
3145
3151
|
{ value: "powershell", label: "Windows PowerShell" }
|
|
3146
|
-
], o = N(navigator.userAgent.toLowerCase().includes("windows") ? "powershell" : "bash"), a =
|
|
3152
|
+
], o = N(navigator.userAgent.toLowerCase().includes("windows") ? "powershell" : "bash"), a = S(() => {
|
|
3147
3153
|
const d = {
|
|
3148
3154
|
_format_version: "3.0"
|
|
3149
3155
|
};
|
|
3150
|
-
return t.controlPlaneName
|
|
3156
|
+
return t.controlPlaneName ? d._konnect = {
|
|
3151
3157
|
control_plane_name: t.controlPlaneName
|
|
3152
|
-
}), d;
|
|
3153
|
-
}), l =
|
|
3154
|
-
var m, y,
|
|
3155
|
-
const d = Object.fromEntries(Object.entries(t.entityRecord).filter(([,
|
|
3156
|
-
t.entityType ===
|
|
3157
|
-
const u = t.entityType ===
|
|
3158
|
+
} : t.workspace && (d._workspace = t.workspace), d;
|
|
3159
|
+
}), l = S(() => {
|
|
3160
|
+
var m, y, h, b, k;
|
|
3161
|
+
const d = Object.fromEntries(Object.entries(t.entityRecord).filter(([, A]) => A !== null && A !== "" && (Array.isArray(A) ? A.length !== 0 : !0)));
|
|
3162
|
+
t.entityType === $e.Plugin ? ((m = d.service) != null && m.id && (d.service = d.service.id), (y = d.route) != null && y.id && (d.route = d.route.id), (h = d.consumer) != null && h.id && (d.consumer = d.consumer.id), (b = d.consumer_group) != null && b.id && (d.consumer_group = d.consumer_group.id)) : t.entityType === $e.Key && (k = d.key_set) != null && k.id && (d.key_set = d.key_set.id);
|
|
3163
|
+
const u = t.entityType === $e.KeySet ? "key_sets" : t.entityType + "s", p = {
|
|
3158
3164
|
...a.value,
|
|
3159
3165
|
[u]: [d]
|
|
3160
3166
|
};
|
|
3161
3167
|
return Wn.dump(p, { quotingType: '"' }).trim();
|
|
3162
|
-
}), s =
|
|
3168
|
+
}), s = S(() => o.value === "bash" ? "export DECK_KONNECT_TOKEN='YOUR_KONNECT_PAT'" : '$env:DECK_KONNECT_TOKEN = "YOUR_KONNECT_PAT"'), c = S(() => {
|
|
3163
3169
|
let d = "deck gateway apply -";
|
|
3164
|
-
return t.geoApiServerUrl
|
|
3170
|
+
return t.geoApiServerUrl ? d += ` --konnect-addr ${t.geoApiServerUrl}` : t.kongAdminApiUrl && (d += ` --kong-addr ${t.kongAdminApiUrl}`), o.value === "bash" ? `echo '
|
|
3165
3171
|
${l.value}
|
|
3166
3172
|
' | ${d}` : `@'
|
|
3167
3173
|
${l.value}
|
|
3168
3174
|
'@ | ${d}`;
|
|
3169
3175
|
});
|
|
3170
3176
|
return (d, u) => {
|
|
3171
|
-
const p =
|
|
3172
|
-
return
|
|
3173
|
-
|
|
3177
|
+
const p = j("KSelect"), m = j("KBadge"), y = j("KCodeBlock");
|
|
3178
|
+
return g(), $("div", ll, [
|
|
3179
|
+
R(p, {
|
|
3174
3180
|
modelValue: o.value,
|
|
3175
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
3181
|
+
"onUpdate:modelValue": u[0] || (u[0] = (h) => o.value = h),
|
|
3176
3182
|
items: r
|
|
3177
3183
|
}, {
|
|
3178
|
-
"item-template":
|
|
3179
|
-
|
|
3180
|
-
q(" " +
|
|
3184
|
+
"item-template": w(({ item: h }) => [
|
|
3185
|
+
h.value === "powershell" ? (g(), K(_(ht), { key: 0 })) : (g(), K(_(yt), { key: 1 })),
|
|
3186
|
+
q(" " + I(h.label), 1)
|
|
3181
3187
|
]),
|
|
3182
|
-
"selected-item-template":
|
|
3183
|
-
|
|
3184
|
-
q(" " +
|
|
3188
|
+
"selected-item-template": w(({ item: h }) => [
|
|
3189
|
+
h.value === "powershell" ? (g(), K(_(ht), { key: 0 })) : (g(), K(_(yt), { key: 1 })),
|
|
3190
|
+
q(" " + I(h.label), 1)
|
|
3185
3191
|
]),
|
|
3186
3192
|
_: 1
|
|
3187
3193
|
}, 8, ["modelValue"]),
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3194
|
+
R(_(i), {
|
|
3195
|
+
"data-testid": `deck-hint-${e.app}`,
|
|
3196
|
+
keypath: `deckCodeBlock.hint.${e.app}`,
|
|
3197
|
+
tag: "p"
|
|
3198
|
+
}, ke({
|
|
3199
|
+
link: w(() => [
|
|
3200
|
+
R(_(oi), {
|
|
3201
|
+
href: e.app === "konnect" ? "https://developer.konghq.com/deck/get-started/" : "https://developer.konghq.com/deck/gateway/configuration/"
|
|
3202
|
+
}, {
|
|
3203
|
+
default: w(() => [
|
|
3204
|
+
q(I(_(n).t("deckCodeBlock.documentation")), 1)
|
|
3205
|
+
]),
|
|
3206
|
+
_: 1
|
|
3207
|
+
}, 8, ["href"])
|
|
3208
|
+
]),
|
|
3209
|
+
_: 2
|
|
3210
|
+
}, [
|
|
3211
|
+
e.app === "konnect" ? {
|
|
3212
|
+
name: "token",
|
|
3213
|
+
fn: w(() => [
|
|
3214
|
+
R(m, null, {
|
|
3215
|
+
default: w(() => [...u[1] || (u[1] = [
|
|
3193
3216
|
q("DECK_KONNECT_TOKEN", -1)
|
|
3194
3217
|
])]),
|
|
3195
3218
|
_: 1
|
|
3196
3219
|
})
|
|
3197
3220
|
]),
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
_: 1
|
|
3204
|
-
})
|
|
3205
|
-
]),
|
|
3206
|
-
_: 1
|
|
3207
|
-
})
|
|
3208
|
-
]),
|
|
3209
|
-
K(y, {
|
|
3221
|
+
key: "0"
|
|
3222
|
+
} : void 0
|
|
3223
|
+
]), 1032, ["data-testid", "keypath"]),
|
|
3224
|
+
e.app === "konnect" ? (g(), K(y, {
|
|
3225
|
+
key: 0,
|
|
3210
3226
|
id: "deck-env-codeblock",
|
|
3211
3227
|
code: s.value,
|
|
3212
3228
|
language: o.value,
|
|
3213
3229
|
"single-line": "",
|
|
3214
3230
|
theme: "dark",
|
|
3215
|
-
onCodeBlockRender:
|
|
3216
|
-
}, null, 8, ["code", "language", "onCodeBlockRender"]),
|
|
3217
|
-
t.entityRecord ? (
|
|
3218
|
-
key:
|
|
3231
|
+
onCodeBlockRender: _(Te)
|
|
3232
|
+
}, null, 8, ["code", "language", "onCodeBlockRender"])) : D("", !0),
|
|
3233
|
+
t.entityRecord ? (g(), K(y, {
|
|
3234
|
+
key: 1,
|
|
3219
3235
|
id: "deck-codeblock",
|
|
3220
3236
|
code: c.value,
|
|
3221
3237
|
language: o.value,
|
|
3222
3238
|
theme: "dark",
|
|
3223
|
-
onCodeBlockRender:
|
|
3224
|
-
}, null, 8, ["code", "language", "onCodeBlockRender"])) :
|
|
3239
|
+
onCodeBlockRender: _(Te)
|
|
3240
|
+
}, null, 8, ["code", "language", "onCodeBlockRender"])) : D("", !0)
|
|
3225
3241
|
]);
|
|
3226
3242
|
};
|
|
3227
3243
|
}
|
|
3228
|
-
}), cl = /* @__PURE__ */ le(sl, [["__scopeId", "data-v-
|
|
3244
|
+
}), cl = /* @__PURE__ */ le(sl, [["__scopeId", "data-v-04c956bc"]]), ul = ["novalidate"], dl = /* @__PURE__ */ z({
|
|
3229
3245
|
__name: "EntityBaseForm",
|
|
3230
3246
|
props: {
|
|
3231
3247
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3348,20 +3364,20 @@ ${l.value}
|
|
|
3348
3364
|
},
|
|
3349
3365
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel", "codeBlockTabChange"],
|
|
3350
3366
|
setup(e, { expose: t, emit: n }) {
|
|
3351
|
-
var
|
|
3352
|
-
const i = n, r = e, o =
|
|
3353
|
-
var
|
|
3354
|
-
let
|
|
3355
|
-
return r.config.app === "konnect" ?
|
|
3356
|
-
}),
|
|
3367
|
+
var F;
|
|
3368
|
+
const i = n, r = e, o = gi(), { i18n: { t: a } } = J.useI18n(), { getMessageFromError: l } = J.useErrors(), { axiosInstance: s } = J.useAxios((F = r.config) == null ? void 0 : F.axiosRequestConfig), c = N(!1), d = S(() => !!r.editId), u = N(!1), p = N(""), m = S(() => r.canSubmit === !1 || r.isReadonly), y = N(!1), h = S(() => {
|
|
3369
|
+
var f, v;
|
|
3370
|
+
let x = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3371
|
+
return r.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((f = r.config) == null ? void 0 : f.controlPlaneId) || "") : r.config.app === "kongManager" && (x = x.replace(/\/{workspace}/gi, (v = r.config) != null && v.workspace ? `/${r.config.workspace}` : "")), r.editId ? (x = x.replace(/{id}/gi, r.editId), x) : (x = x.replace(/\/{id}/gi, ""), x);
|
|
3372
|
+
}), b = () => {
|
|
3357
3373
|
y.value = !y.value;
|
|
3358
|
-
},
|
|
3359
|
-
r.config.cancelRoute ? o.push(r.config.cancelRoute) :
|
|
3360
|
-
},
|
|
3374
|
+
}, k = () => {
|
|
3375
|
+
r.config.cancelRoute ? o.push(r.config.cancelRoute) : A();
|
|
3376
|
+
}, A = () => {
|
|
3361
3377
|
i("cancel");
|
|
3362
3378
|
}, B = () => {
|
|
3363
3379
|
m.value || i("submit");
|
|
3364
|
-
},
|
|
3380
|
+
}, P = N([
|
|
3365
3381
|
{
|
|
3366
3382
|
title: a("baseForm.configuration.json"),
|
|
3367
3383
|
hash: "#json"
|
|
@@ -3371,63 +3387,65 @@ ${l.value}
|
|
|
3371
3387
|
hash: "#yaml"
|
|
3372
3388
|
}
|
|
3373
3389
|
]);
|
|
3374
|
-
|
|
3390
|
+
r.config.app === "konnect" && r.entityType !== $e.Other && P.value.splice(1, 0, {
|
|
3375
3391
|
title: a("baseForm.configuration.terraform"),
|
|
3376
3392
|
hash: "#terraform"
|
|
3377
|
-
})
|
|
3393
|
+
});
|
|
3394
|
+
const ee = vi.includes(r.entityType);
|
|
3395
|
+
return (r.config.app === "kongManager" || r.config.enableDeckTab) && ee && P.value.push({
|
|
3378
3396
|
title: a("baseForm.configuration.deck"),
|
|
3379
3397
|
hash: "#deck"
|
|
3380
|
-
}), be(() => c.value, (
|
|
3381
|
-
i("loading",
|
|
3398
|
+
}), be(() => c.value, (x) => {
|
|
3399
|
+
i("loading", x);
|
|
3382
3400
|
}, { immediate: !0 }), rt(async () => {
|
|
3383
3401
|
if (r.editId)
|
|
3384
3402
|
try {
|
|
3385
3403
|
u.value = !1, c.value = !0;
|
|
3386
|
-
const { data:
|
|
3387
|
-
i("fetch:success",
|
|
3388
|
-
} catch (
|
|
3389
|
-
const
|
|
3390
|
-
p.value =
|
|
3404
|
+
const { data: x } = await s.get(h.value);
|
|
3405
|
+
i("fetch:success", x);
|
|
3406
|
+
} catch (x) {
|
|
3407
|
+
const f = l(x);
|
|
3408
|
+
p.value = f.startsWith("code") ? a("baseForm.errors.edit") : f, u.value = !0, i("fetch:error", x);
|
|
3391
3409
|
} finally {
|
|
3392
3410
|
c.value = !1;
|
|
3393
3411
|
}
|
|
3394
3412
|
}), t({
|
|
3395
|
-
viewConfig:
|
|
3396
|
-
formCancel:
|
|
3413
|
+
viewConfig: b,
|
|
3414
|
+
formCancel: A,
|
|
3397
3415
|
formSubmit: B
|
|
3398
|
-
}), (
|
|
3399
|
-
const
|
|
3400
|
-
return
|
|
3401
|
-
default:
|
|
3402
|
-
c.value ? (
|
|
3416
|
+
}), (x, f) => {
|
|
3417
|
+
const v = j("KSkeleton"), C = j("KEmptyState"), Y = j("KAlert"), G = j("KButton"), E = j("KTabs"), O = j("KSlideout");
|
|
3418
|
+
return g(), K(je(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3419
|
+
default: w(() => [
|
|
3420
|
+
c.value ? (g(), K(v, {
|
|
3403
3421
|
key: 0,
|
|
3404
3422
|
type: "form"
|
|
3405
|
-
})) : u.value ? (
|
|
3423
|
+
})) : u.value ? (g(), K(C, {
|
|
3406
3424
|
key: 1,
|
|
3407
|
-
"action-button-text":
|
|
3425
|
+
"action-button-text": _(a)("baseForm.actions.back"),
|
|
3408
3426
|
"data-testid": "form-fetch-error",
|
|
3409
3427
|
"icon-variant": "error",
|
|
3410
|
-
onClickAction:
|
|
3428
|
+
onClickAction: k
|
|
3411
3429
|
}, {
|
|
3412
|
-
default:
|
|
3413
|
-
L("h3", null,
|
|
3430
|
+
default: w(() => [
|
|
3431
|
+
L("h3", null, I(p.value), 1)
|
|
3414
3432
|
]),
|
|
3415
3433
|
_: 1
|
|
3416
|
-
}, 8, ["action-button-text"])) : (
|
|
3434
|
+
}, 8, ["action-button-text"])) : (g(), $("form", {
|
|
3417
3435
|
key: 2,
|
|
3418
3436
|
"data-testid": "form-content",
|
|
3419
3437
|
novalidate: r.noValidate,
|
|
3420
|
-
onReset: Re(
|
|
3438
|
+
onReset: Re(A, ["prevent"]),
|
|
3421
3439
|
onSubmit: Re(B, ["prevent"])
|
|
3422
3440
|
}, [
|
|
3423
|
-
U(
|
|
3424
|
-
e.errorMessage ? (
|
|
3441
|
+
U(x.$slots, "default", {}, void 0, !0),
|
|
3442
|
+
e.errorMessage ? (g(), K(Y, {
|
|
3425
3443
|
key: 0,
|
|
3426
3444
|
appearance: "danger",
|
|
3427
3445
|
"data-testid": "form-error",
|
|
3428
3446
|
message: e.errorMessage
|
|
3429
|
-
}, null, 8, ["message"])) :
|
|
3430
|
-
e.hideActions ?
|
|
3447
|
+
}, null, 8, ["message"])) : D("", !0),
|
|
3448
|
+
e.hideActions ? D("", !0) : (g(), K(Wt, {
|
|
3431
3449
|
key: 1,
|
|
3432
3450
|
disabled: !e.actionTeleportTarget,
|
|
3433
3451
|
to: e.actionTeleportTarget
|
|
@@ -3436,38 +3454,38 @@ ${l.value}
|
|
|
3436
3454
|
class: fe(["form-actions", { "form-actions-reverted": e.alignActionButtonToLeft }]),
|
|
3437
3455
|
"data-testid": "form-actions"
|
|
3438
3456
|
}, [
|
|
3439
|
-
U(
|
|
3440
|
-
|
|
3457
|
+
U(x.$slots, "form-actions", {}, () => [
|
|
3458
|
+
R(G, {
|
|
3441
3459
|
appearance: "tertiary",
|
|
3442
3460
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-view-configuration`,
|
|
3443
|
-
onClick:
|
|
3461
|
+
onClick: f[0] || (f[0] = (V) => b())
|
|
3444
3462
|
}, {
|
|
3445
|
-
default:
|
|
3446
|
-
q(
|
|
3463
|
+
default: w(() => [
|
|
3464
|
+
q(I(_(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3447
3465
|
]),
|
|
3448
3466
|
_: 1
|
|
3449
3467
|
}, 8, ["data-testid"]),
|
|
3450
|
-
|
|
3468
|
+
R(G, {
|
|
3451
3469
|
appearance: "secondary",
|
|
3452
3470
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-cancel`,
|
|
3453
3471
|
disabled: e.isReadonly,
|
|
3454
3472
|
type: "reset",
|
|
3455
|
-
onClick:
|
|
3473
|
+
onClick: f[1] || (f[1] = (V) => !!e.actionTeleportTarget && A())
|
|
3456
3474
|
}, {
|
|
3457
|
-
default:
|
|
3458
|
-
q(
|
|
3475
|
+
default: w(() => [
|
|
3476
|
+
q(I(e.cancelButtonText ?? _(a)("baseForm.actions.cancel")), 1)
|
|
3459
3477
|
]),
|
|
3460
3478
|
_: 1
|
|
3461
3479
|
}, 8, ["data-testid", "disabled"]),
|
|
3462
|
-
|
|
3480
|
+
R(G, {
|
|
3463
3481
|
appearance: "primary",
|
|
3464
3482
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-submit`,
|
|
3465
3483
|
disabled: m.value,
|
|
3466
3484
|
type: "submit",
|
|
3467
|
-
onClick:
|
|
3485
|
+
onClick: f[2] || (f[2] = (V) => !!e.actionTeleportTarget && B())
|
|
3468
3486
|
}, {
|
|
3469
|
-
default:
|
|
3470
|
-
q(
|
|
3487
|
+
default: w(() => [
|
|
3488
|
+
q(I(e.saveButtonText ?? _(a)("baseForm.actions.save")), 1)
|
|
3471
3489
|
]),
|
|
3472
3490
|
_: 1
|
|
3473
3491
|
}, 8, ["data-testid", "disabled"])
|
|
@@ -3475,49 +3493,52 @@ ${l.value}
|
|
|
3475
3493
|
], 2)
|
|
3476
3494
|
], 8, ["disabled", "to"]))
|
|
3477
3495
|
], 40, ul)),
|
|
3478
|
-
|
|
3496
|
+
R(O, {
|
|
3479
3497
|
"close-on-blur": !1,
|
|
3480
3498
|
"data-testid": "form-view-configuration-slideout",
|
|
3481
3499
|
"has-overlay": !1,
|
|
3482
3500
|
"offset-top": e.slidoutTopOffset,
|
|
3483
|
-
title:
|
|
3501
|
+
title: _(a)("baseForm.configuration.title"),
|
|
3484
3502
|
visible: y.value,
|
|
3485
|
-
onClose:
|
|
3503
|
+
onClose: f[4] || (f[4] = (V) => b())
|
|
3486
3504
|
}, {
|
|
3487
|
-
default:
|
|
3488
|
-
L("div", null,
|
|
3489
|
-
|
|
3505
|
+
default: w(() => [
|
|
3506
|
+
L("div", null, I(_(a)("baseForm.configuration.message")), 1),
|
|
3507
|
+
R(E, {
|
|
3490
3508
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3491
|
-
tabs:
|
|
3492
|
-
onChange:
|
|
3509
|
+
tabs: P.value,
|
|
3510
|
+
onChange: f[3] || (f[3] = (V) => i("codeBlockTabChange", V.replace("#", "")))
|
|
3493
3511
|
}, {
|
|
3494
|
-
json:
|
|
3495
|
-
|
|
3512
|
+
json: w(() => [
|
|
3513
|
+
R(rn, {
|
|
3496
3514
|
config: e.config,
|
|
3497
3515
|
"entity-record": r.formFields,
|
|
3498
|
-
"fetcher-url":
|
|
3516
|
+
"fetcher-url": h.value,
|
|
3499
3517
|
"request-method": r.editId ? "put" : "post"
|
|
3500
3518
|
}, null, 8, ["config", "entity-record", "fetcher-url", "request-method"])
|
|
3501
3519
|
]),
|
|
3502
|
-
yaml:
|
|
3503
|
-
|
|
3520
|
+
yaml: w(() => [
|
|
3521
|
+
R(Jn, {
|
|
3504
3522
|
"entity-record": r.formFields
|
|
3505
3523
|
}, null, 8, ["entity-record"])
|
|
3506
3524
|
]),
|
|
3507
|
-
terraform:
|
|
3508
|
-
|
|
3525
|
+
terraform: w(() => [
|
|
3526
|
+
R(Gn, {
|
|
3509
3527
|
"entity-record": r.formFields,
|
|
3510
3528
|
"entity-type": e.entityType,
|
|
3511
3529
|
"sub-entity-type": e.subEntityType
|
|
3512
3530
|
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])
|
|
3513
3531
|
]),
|
|
3514
|
-
deck:
|
|
3515
|
-
|
|
3532
|
+
deck: w(() => [
|
|
3533
|
+
R(cl, {
|
|
3534
|
+
app: e.config.app,
|
|
3516
3535
|
"control-plane-name": e.config.app === "konnect" ? e.config.controlPlaneName : void 0,
|
|
3517
3536
|
"entity-record": r.formFields,
|
|
3518
3537
|
"entity-type": e.entityType,
|
|
3519
|
-
"geo-api-server-url": e.config.app === "konnect" ? e.config.geoApiServerUrl : void 0
|
|
3520
|
-
|
|
3538
|
+
"geo-api-server-url": e.config.app === "konnect" ? e.config.geoApiServerUrl : void 0,
|
|
3539
|
+
"kong-admin-api-url": e.config.app === "kongManager" ? e.config.apiBaseUrl : void 0,
|
|
3540
|
+
workspace: e.config.app === "kongManager" ? e.config.workspace : void 0
|
|
3541
|
+
}, null, 8, ["app", "control-plane-name", "entity-record", "entity-type", "geo-api-server-url", "kong-admin-api-url", "workspace"])
|
|
3521
3542
|
]),
|
|
3522
3543
|
_: 1
|
|
3523
3544
|
}, 8, ["tabs"])
|
|
@@ -3529,7 +3550,7 @@ ${l.value}
|
|
|
3529
3550
|
});
|
|
3530
3551
|
};
|
|
3531
3552
|
}
|
|
3532
|
-
}), Os = /* @__PURE__ */ le(dl, [["__scopeId", "data-v-
|
|
3553
|
+
}), Os = /* @__PURE__ */ le(dl, [["__scopeId", "data-v-1db7c290"]]), fl = ["data-truncate"], pl = /* @__PURE__ */ z({
|
|
3533
3554
|
__name: "EntityBaseTableCell",
|
|
3534
3555
|
props: {
|
|
3535
3556
|
keyName: {
|
|
@@ -3546,73 +3567,73 @@ ${l.value}
|
|
|
3546
3567
|
}
|
|
3547
3568
|
},
|
|
3548
3569
|
setup(e) {
|
|
3549
|
-
const t = e, n =
|
|
3550
|
-
var
|
|
3551
|
-
return ((
|
|
3552
|
-
}), i =
|
|
3553
|
-
var
|
|
3554
|
-
return ((
|
|
3555
|
-
}), r =
|
|
3556
|
-
var
|
|
3557
|
-
const
|
|
3558
|
-
return
|
|
3559
|
-
}), o =
|
|
3570
|
+
const t = e, n = S(() => {
|
|
3571
|
+
var b;
|
|
3572
|
+
return ((b = t.rowEl) == null ? void 0 : b.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3573
|
+
}), i = S(() => {
|
|
3574
|
+
var b;
|
|
3575
|
+
return ((b = n.value) == null ? void 0 : b.querySelector('[data-truncate="true"]')) || null;
|
|
3576
|
+
}), r = S(() => {
|
|
3577
|
+
var k, A;
|
|
3578
|
+
const b = (k = t.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3579
|
+
return b ? ((A = b[0]) == null ? void 0 : A.getAttribute("data-testid")) === t.keyName : !0;
|
|
3580
|
+
}), o = S(() => r.value || t.tooltip);
|
|
3560
3581
|
let a;
|
|
3561
3582
|
const l = () => {
|
|
3562
3583
|
a && (a.disconnect(), a = void 0);
|
|
3563
3584
|
}, s = () => {
|
|
3564
|
-
var
|
|
3565
|
-
let
|
|
3585
|
+
var k, A, B;
|
|
3586
|
+
let b = ((k = n.value) == null ? void 0 : k.clientWidth) || 0;
|
|
3566
3587
|
if (n.value && "getComputedStyle" in window) {
|
|
3567
|
-
const
|
|
3568
|
-
|
|
3588
|
+
const P = window.getComputedStyle(n.value);
|
|
3589
|
+
b -= (parseFloat(P.paddingLeft) || 0) + (parseFloat(P.paddingRight) || 0);
|
|
3569
3590
|
}
|
|
3570
|
-
d.value = ((
|
|
3571
|
-
}, c = N({}), d = N(0), u = N(0), p = N(""), m =
|
|
3591
|
+
d.value = ((A = i.value) == null ? void 0 : A.getBoundingClientRect().width) || 0, u.value = b, p.value = ((B = c.value) == null ? void 0 : B.innerText) || "";
|
|
3592
|
+
}, c = N({}), d = N(0), u = N(0), p = N(""), m = S(() => [i.value, n.value]), y = be(
|
|
3572
3593
|
m,
|
|
3573
|
-
(
|
|
3594
|
+
(b) => {
|
|
3574
3595
|
if (o.value && (l(), "ResizeObserver" in window && window)) {
|
|
3575
|
-
a = new ResizeObserver((
|
|
3596
|
+
a = new ResizeObserver((k) => {
|
|
3576
3597
|
window.requestAnimationFrame(() => {
|
|
3577
|
-
!Array.isArray(
|
|
3598
|
+
!Array.isArray(k) || !k.length || s();
|
|
3578
3599
|
});
|
|
3579
3600
|
});
|
|
3580
|
-
for (const
|
|
3581
|
-
|
|
3601
|
+
for (const k of b)
|
|
3602
|
+
k && a.observe(k);
|
|
3582
3603
|
}
|
|
3583
3604
|
},
|
|
3584
3605
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3585
|
-
),
|
|
3606
|
+
), h = S(() => o.value ? d.value > u.value : !1);
|
|
3586
3607
|
return it(() => {
|
|
3587
3608
|
s();
|
|
3588
3609
|
}), ei(() => {
|
|
3589
3610
|
y();
|
|
3590
|
-
}), (
|
|
3591
|
-
const
|
|
3592
|
-
return
|
|
3611
|
+
}), (b, k) => {
|
|
3612
|
+
const A = j("KTooltip");
|
|
3613
|
+
return g(), $("span", {
|
|
3593
3614
|
ref_key: "contentRef",
|
|
3594
3615
|
ref: c,
|
|
3595
3616
|
class: "content-wrapper"
|
|
3596
3617
|
}, [
|
|
3597
|
-
o.value ? (
|
|
3618
|
+
o.value ? (g(), $("span", {
|
|
3598
3619
|
key: 0,
|
|
3599
3620
|
"data-truncate": o.value || void 0
|
|
3600
3621
|
}, [
|
|
3601
|
-
|
|
3622
|
+
R(A, {
|
|
3602
3623
|
"max-width": "300",
|
|
3603
3624
|
placement: "bottom-start",
|
|
3604
|
-
text:
|
|
3625
|
+
text: h.value ? p.value : ""
|
|
3605
3626
|
}, {
|
|
3606
|
-
default:
|
|
3607
|
-
U(
|
|
3627
|
+
default: w(() => [
|
|
3628
|
+
U(b.$slots, "default", {}, void 0, !0)
|
|
3608
3629
|
]),
|
|
3609
3630
|
_: 3
|
|
3610
3631
|
}, 8, ["text"])
|
|
3611
|
-
], 8, fl)) : U(
|
|
3632
|
+
], 8, fl)) : U(b.$slots, "default", { key: 1 }, void 0, !0)
|
|
3612
3633
|
], 512);
|
|
3613
3634
|
};
|
|
3614
3635
|
}
|
|
3615
|
-
}), ml = /* @__PURE__ */ le(pl, [["__scopeId", "data-v-a3a65cac"]]),
|
|
3636
|
+
}), ml = /* @__PURE__ */ le(pl, [["__scopeId", "data-v-a3a65cac"]]), gl = { class: "toolbar-container" }, hl = {
|
|
3616
3637
|
key: 0,
|
|
3617
3638
|
class: "toolbar-button-container"
|
|
3618
3639
|
}, yl = {
|
|
@@ -3763,7 +3784,7 @@ ${l.value}
|
|
|
3763
3784
|
},
|
|
3764
3785
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked", "state"],
|
|
3765
3786
|
setup(e, { emit: t }) {
|
|
3766
|
-
const n = e, i = t, { i18n: { t: r } } =
|
|
3787
|
+
const n = e, i = t, { i18n: { t: r } } = J.useI18n(), o = S(() => {
|
|
3767
3788
|
var f, v;
|
|
3768
3789
|
return typeof n.errorMessage == "string" ? {
|
|
3769
3790
|
hasError: !!n.errorMessage,
|
|
@@ -3774,15 +3795,15 @@ ${l.value}
|
|
|
3774
3795
|
title: (f = n.errorMessage) == null ? void 0 : f.title,
|
|
3775
3796
|
message: (v = n.errorMessage) == null ? void 0 : v.message
|
|
3776
3797
|
};
|
|
3777
|
-
}), a =
|
|
3798
|
+
}), a = S(() => n.cacheIdentifier || n.preferencesStorageKey), l = S(() => {
|
|
3778
3799
|
const f = [];
|
|
3779
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3780
|
-
const
|
|
3800
|
+
return Object.keys(n.tableHeaders).forEach((C) => {
|
|
3801
|
+
const Y = n.tableHeaders[C];
|
|
3781
3802
|
f.push({
|
|
3782
|
-
label:
|
|
3783
|
-
key:
|
|
3784
|
-
sortable:
|
|
3785
|
-
hidable:
|
|
3803
|
+
label: Y.label ?? C,
|
|
3804
|
+
key: C,
|
|
3805
|
+
sortable: Y.sortable ?? !1,
|
|
3806
|
+
hidable: Y.hidable ?? !0
|
|
3786
3807
|
});
|
|
3787
3808
|
}), n.enableEntityActions && f.push({
|
|
3788
3809
|
key: "actions",
|
|
@@ -3806,49 +3827,49 @@ ${l.value}
|
|
|
3806
3827
|
textOverflow: "ellipsis"
|
|
3807
3828
|
}), v;
|
|
3808
3829
|
}, p = (f) => {
|
|
3809
|
-
|
|
3830
|
+
A(f), i("state", f);
|
|
3810
3831
|
}, m = () => {
|
|
3811
3832
|
i("empty-state-cta-clicked"), y();
|
|
3812
3833
|
}, y = () => {
|
|
3813
3834
|
i("clear-search-input");
|
|
3814
|
-
},
|
|
3835
|
+
}, h = S(() => n.disableRowClick ? void 0 : (f, v) => {
|
|
3815
3836
|
i("click:row", v);
|
|
3816
|
-
}),
|
|
3837
|
+
}), b = (f) => {
|
|
3817
3838
|
i("sort", f);
|
|
3818
|
-
}, { hideTableToolbar:
|
|
3819
|
-
const f =
|
|
3839
|
+
}, { hideTableToolbar: k, handleStateChange: A } = J.useTableState(() => n.query), { setTablePreferences: B, getTablePreferences: P } = _i(), ee = N(P(a.value, n.defaultTablePreferences)), M = S(() => {
|
|
3840
|
+
const f = P(a.value);
|
|
3820
3841
|
return {
|
|
3821
3842
|
...n.initialFetcherParams,
|
|
3822
3843
|
...f
|
|
3823
3844
|
};
|
|
3824
|
-
}),
|
|
3825
|
-
|
|
3826
|
-
!("hidable" in v) || !
|
|
3845
|
+
}), F = (f) => {
|
|
3846
|
+
ee.value = f, l.value.forEach((v) => {
|
|
3847
|
+
!("hidable" in v) || !ee.value.columnVisibility || v.hidable === !1 && (ee.value.columnVisibility[v.key] = !0);
|
|
3827
3848
|
}), a.value && B(a.value, f);
|
|
3828
|
-
},
|
|
3849
|
+
}, x = S(() => ({
|
|
3829
3850
|
disablePageJump: n.disablePaginationPageJump,
|
|
3830
3851
|
offset: n.paginationType === "offset",
|
|
3831
3852
|
...n.paginationAttributes
|
|
3832
3853
|
}));
|
|
3833
3854
|
return (f, v) => {
|
|
3834
|
-
const
|
|
3835
|
-
return
|
|
3855
|
+
const C = j("KTableData"), Y = j("KCard");
|
|
3856
|
+
return g(), K(Y, {
|
|
3836
3857
|
class: "kong-ui-entity-base-table",
|
|
3837
3858
|
title: e.title,
|
|
3838
3859
|
"title-tag": e.titleTag
|
|
3839
3860
|
}, {
|
|
3840
|
-
default:
|
|
3841
|
-
|
|
3861
|
+
default: w(() => [
|
|
3862
|
+
R(C, {
|
|
3842
3863
|
ref_key: "tableRefs",
|
|
3843
3864
|
ref: c,
|
|
3844
3865
|
"cache-identifier": a.value,
|
|
3845
3866
|
"cell-attrs": u,
|
|
3846
3867
|
"client-sort": e.enableClientSort,
|
|
3847
|
-
"empty-state-action-message": e.query ?
|
|
3868
|
+
"empty-state-action-message": e.query ? _(r)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3848
3869
|
"empty-state-action-route": e.query ? void 0 : e.emptyStateOptions.ctaPath,
|
|
3849
3870
|
"empty-state-icon-variant": e.query ? "search" : "kong",
|
|
3850
|
-
"empty-state-message": e.query ?
|
|
3851
|
-
"empty-state-title": e.query ?
|
|
3871
|
+
"empty-state-message": e.query ? _(r)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3872
|
+
"empty-state-title": e.query ? _(r)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3852
3873
|
error: o.value.hasError,
|
|
3853
3874
|
"error-state-message": o.value.message,
|
|
3854
3875
|
"error-state-title": o.value.title,
|
|
@@ -3857,58 +3878,58 @@ ${l.value}
|
|
|
3857
3878
|
headers: l.value,
|
|
3858
3879
|
"hide-pagination": e.hidePagination,
|
|
3859
3880
|
"hide-pagination-when-optional": e.hidePaginationWhenOptional,
|
|
3860
|
-
"hide-toolbar": e.hideToolbar ??
|
|
3861
|
-
"initial-fetcher-params":
|
|
3881
|
+
"hide-toolbar": e.hideToolbar ?? _(k),
|
|
3882
|
+
"initial-fetcher-params": M.value,
|
|
3862
3883
|
loading: e.isLoading,
|
|
3863
|
-
"pagination-attributes":
|
|
3884
|
+
"pagination-attributes": x.value,
|
|
3864
3885
|
"resize-columns": "",
|
|
3865
3886
|
"row-attrs": s,
|
|
3866
3887
|
"row-key": e.rowKey,
|
|
3867
3888
|
"search-input": e.query,
|
|
3868
3889
|
"sort-handler-function": e.enableClientSort ? e.sortHandlerFunction : void 0,
|
|
3869
3890
|
sortable: !e.disableSorting,
|
|
3870
|
-
"table-preferences":
|
|
3891
|
+
"table-preferences": ee.value,
|
|
3871
3892
|
onEmptyStateActionClick: m,
|
|
3872
|
-
"onRow:click":
|
|
3873
|
-
onSort: v[0] || (v[0] = (
|
|
3893
|
+
"onRow:click": h.value,
|
|
3894
|
+
onSort: v[0] || (v[0] = (G) => b(G)),
|
|
3874
3895
|
onState: p,
|
|
3875
|
-
"onUpdate:tablePreferences":
|
|
3876
|
-
},
|
|
3877
|
-
toolbar:
|
|
3878
|
-
L("div",
|
|
3896
|
+
"onUpdate:tablePreferences": F
|
|
3897
|
+
}, ke({
|
|
3898
|
+
toolbar: w(() => [
|
|
3899
|
+
L("div", gl, [
|
|
3879
3900
|
U(f.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3880
|
-
f.$slots["toolbar-button"] ? (
|
|
3901
|
+
f.$slots["toolbar-button"] ? (g(), $("div", hl, [
|
|
3881
3902
|
U(f.$slots, "toolbar-button", {}, void 0, !0)
|
|
3882
|
-
])) :
|
|
3903
|
+
])) : D("", !0)
|
|
3883
3904
|
])
|
|
3884
3905
|
]),
|
|
3885
|
-
"action-items":
|
|
3886
|
-
U(f.$slots, "actions", { row:
|
|
3906
|
+
"action-items": w(({ row: G }) => [
|
|
3907
|
+
U(f.$slots, "actions", { row: G }, void 0, !0)
|
|
3887
3908
|
]),
|
|
3888
3909
|
_: 2
|
|
3889
3910
|
}, [
|
|
3890
3911
|
f.$slots["empty-state"] ? {
|
|
3891
3912
|
name: "empty-state",
|
|
3892
|
-
fn:
|
|
3913
|
+
fn: w(() => [
|
|
3893
3914
|
U(f.$slots, "empty-state", {}, void 0, !0)
|
|
3894
3915
|
]),
|
|
3895
3916
|
key: "0"
|
|
3896
3917
|
} : void 0,
|
|
3897
|
-
ce(e.tableHeaders, (
|
|
3918
|
+
ce(e.tableHeaders, (G, E) => ({
|
|
3898
3919
|
name: E,
|
|
3899
|
-
fn:
|
|
3900
|
-
|
|
3920
|
+
fn: w(({ row: O, rowValue: V }) => [
|
|
3921
|
+
R(ml, {
|
|
3901
3922
|
"key-name": String(E),
|
|
3902
|
-
"row-el": d(
|
|
3903
|
-
tooltip:
|
|
3923
|
+
"row-el": d(O),
|
|
3924
|
+
tooltip: G.tooltip
|
|
3904
3925
|
}, {
|
|
3905
|
-
default:
|
|
3926
|
+
default: w(() => [
|
|
3906
3927
|
U(f.$slots, E, {
|
|
3907
|
-
row:
|
|
3928
|
+
row: O,
|
|
3908
3929
|
rowKey: e.rowKey,
|
|
3909
|
-
rowValue:
|
|
3930
|
+
rowValue: V
|
|
3910
3931
|
}, () => [
|
|
3911
|
-
q(
|
|
3932
|
+
q(I(V), 1)
|
|
3912
3933
|
], !0)
|
|
3913
3934
|
]),
|
|
3914
3935
|
_: 2
|
|
@@ -3917,15 +3938,15 @@ ${l.value}
|
|
|
3917
3938
|
})),
|
|
3918
3939
|
e.query ? void 0 : {
|
|
3919
3940
|
name: "empty-state-action-icon",
|
|
3920
|
-
fn:
|
|
3921
|
-
|
|
3941
|
+
fn: w(() => [
|
|
3942
|
+
R(_(Gt))
|
|
3922
3943
|
]),
|
|
3923
3944
|
key: "1"
|
|
3924
3945
|
}
|
|
3925
3946
|
]), 1032, ["cache-identifier", "client-sort", "empty-state-action-message", "empty-state-action-route", "empty-state-icon-variant", "empty-state-message", "empty-state-title", "error", "error-state-message", "error-state-title", "fetcher", "fetcher-cache-key", "headers", "hide-pagination", "hide-pagination-when-optional", "hide-toolbar", "initial-fetcher-params", "loading", "pagination-attributes", "row-key", "search-input", "sort-handler-function", "sortable", "table-preferences", "onRow:click"]),
|
|
3926
|
-
f.$slots["outside-actions"] &&
|
|
3947
|
+
f.$slots["outside-actions"] && _(k) ? (g(), $("div", yl, [
|
|
3927
3948
|
U(f.$slots, "outside-actions", {}, void 0, !0)
|
|
3928
|
-
])) :
|
|
3949
|
+
])) : D("", !0)
|
|
3929
3950
|
]),
|
|
3930
3951
|
_: 3
|
|
3931
3952
|
}, 8, ["title", "title-tag"]);
|
|
@@ -3976,14 +3997,14 @@ ${l.value}
|
|
|
3976
3997
|
},
|
|
3977
3998
|
emits: ["cancel", "proceed"],
|
|
3978
3999
|
setup(e, { emit: t }) {
|
|
3979
|
-
const { i18nT: n } =
|
|
4000
|
+
const { i18nT: n } = J.useI18n(), i = e, r = t, o = S(() => i.needConfirm ? i.entityName : ""), a = () => {
|
|
3980
4001
|
r("cancel");
|
|
3981
4002
|
}, l = () => {
|
|
3982
4003
|
r("proceed");
|
|
3983
4004
|
};
|
|
3984
4005
|
return (s, c) => {
|
|
3985
|
-
const d =
|
|
3986
|
-
return
|
|
4006
|
+
const d = j("KAlert"), u = j("KPrompt");
|
|
4007
|
+
return g(), K(u, {
|
|
3987
4008
|
"action-button-appearance": "danger",
|
|
3988
4009
|
"action-button-disabled": e.actionPending,
|
|
3989
4010
|
"action-button-text": "Yes, delete",
|
|
@@ -3994,38 +4015,38 @@ ${l.value}
|
|
|
3994
4015
|
onCancel: a,
|
|
3995
4016
|
onProceed: l
|
|
3996
4017
|
}, {
|
|
3997
|
-
default:
|
|
3998
|
-
e.error ? (
|
|
3999
|
-
|
|
4000
|
-
default:
|
|
4001
|
-
q(
|
|
4018
|
+
default: w(() => [
|
|
4019
|
+
e.error ? (g(), $("div", bl, [
|
|
4020
|
+
R(d, { appearance: "danger" }, {
|
|
4021
|
+
default: w(() => [
|
|
4022
|
+
q(I(e.error), 1)
|
|
4002
4023
|
]),
|
|
4003
4024
|
_: 1
|
|
4004
4025
|
})
|
|
4005
|
-
])) :
|
|
4006
|
-
|
|
4026
|
+
])) : D("", !0),
|
|
4027
|
+
R(_(n), {
|
|
4007
4028
|
class: "message",
|
|
4008
4029
|
keypath: i.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
4009
4030
|
tag: "p"
|
|
4010
|
-
},
|
|
4011
|
-
entityType:
|
|
4012
|
-
q(
|
|
4031
|
+
}, ke({
|
|
4032
|
+
entityType: w(() => [
|
|
4033
|
+
q(I(i.entityType), 1)
|
|
4013
4034
|
]),
|
|
4014
4035
|
_: 2
|
|
4015
4036
|
}, [
|
|
4016
4037
|
i.entityName ? {
|
|
4017
4038
|
name: "entityName",
|
|
4018
|
-
fn:
|
|
4019
|
-
L("strong", null,
|
|
4039
|
+
fn: w(() => [
|
|
4040
|
+
L("strong", null, I(i.entityName), 1)
|
|
4020
4041
|
]),
|
|
4021
4042
|
key: "0"
|
|
4022
4043
|
} : void 0
|
|
4023
4044
|
]), 1032, ["keypath"]),
|
|
4024
|
-
i.description || s.$slots.description ? (
|
|
4045
|
+
i.description || s.$slots.description ? (g(), $("div", kl, [
|
|
4025
4046
|
U(s.$slots, "description", {}, () => [
|
|
4026
|
-
L("p", null,
|
|
4047
|
+
L("p", null, I(i.description), 1)
|
|
4027
4048
|
], !0)
|
|
4028
|
-
])) :
|
|
4049
|
+
])) : D("", !0)
|
|
4029
4050
|
]),
|
|
4030
4051
|
_: 3
|
|
4031
4052
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
@@ -4045,7 +4066,7 @@ ${l.value}
|
|
|
4045
4066
|
width: "20",
|
|
4046
4067
|
x: "0",
|
|
4047
4068
|
y: "0"
|
|
4048
|
-
}, _l = ["fill"], wl = { mask: "url(#mask0_180_20349)" }, Sl = ["fill"],
|
|
4069
|
+
}, _l = ["fill"], wl = { mask: "url(#mask0_180_20349)" }, Sl = ["fill"], jt = /* @__PURE__ */ z({
|
|
4049
4070
|
__name: "IconFilter",
|
|
4050
4071
|
props: {
|
|
4051
4072
|
color: {
|
|
@@ -4054,7 +4075,7 @@ ${l.value}
|
|
|
4054
4075
|
}
|
|
4055
4076
|
},
|
|
4056
4077
|
setup(e) {
|
|
4057
|
-
return (t, n) => (
|
|
4078
|
+
return (t, n) => (g(), $("svg", xl, [
|
|
4058
4079
|
L("mask", Al, [
|
|
4059
4080
|
L("rect", {
|
|
4060
4081
|
fill: e.color,
|
|
@@ -4093,62 +4114,62 @@ ${l.value}
|
|
|
4093
4114
|
},
|
|
4094
4115
|
emits: ["update:modelValue"],
|
|
4095
4116
|
setup(e, { emit: t }) {
|
|
4096
|
-
const { i18n: { t: n } } =
|
|
4097
|
-
const
|
|
4098
|
-
return new URLSearchParams(i.modelValue).forEach((
|
|
4099
|
-
|
|
4100
|
-
}),
|
|
4101
|
-
}), c =
|
|
4102
|
-
const
|
|
4103
|
-
return Object.keys(
|
|
4104
|
-
var
|
|
4105
|
-
return (
|
|
4106
|
-
}).map((
|
|
4107
|
-
label:
|
|
4108
|
-
value:
|
|
4117
|
+
const { i18n: { t: n } } = J.useI18n(), i = e, r = t, o = N(!1), a = N({}), l = N(/* @__PURE__ */ new Set()), s = S(() => {
|
|
4118
|
+
const M = [];
|
|
4119
|
+
return new URLSearchParams(i.modelValue).forEach((F, x) => {
|
|
4120
|
+
F !== "" && M.push(x);
|
|
4121
|
+
}), M;
|
|
4122
|
+
}), c = S(() => {
|
|
4123
|
+
const M = i.config.fields;
|
|
4124
|
+
return Object.keys(M).filter((F) => {
|
|
4125
|
+
var x;
|
|
4126
|
+
return (x = M == null ? void 0 : M[F]) == null ? void 0 : x.searchable;
|
|
4127
|
+
}).map((F) => ({
|
|
4128
|
+
label: M[F].label || F,
|
|
4129
|
+
value: F,
|
|
4109
4130
|
expanded: !1
|
|
4110
4131
|
}));
|
|
4111
4132
|
});
|
|
4112
|
-
be(() => i.modelValue, (
|
|
4113
|
-
a.value = {}, new URLSearchParams(
|
|
4114
|
-
a.value[
|
|
4133
|
+
be(() => i.modelValue, (M) => {
|
|
4134
|
+
a.value = {}, new URLSearchParams(M).forEach((F, x) => {
|
|
4135
|
+
a.value[x] = F;
|
|
4115
4136
|
});
|
|
4116
4137
|
});
|
|
4117
4138
|
const d = () => {
|
|
4118
4139
|
o.value = !o.value;
|
|
4119
|
-
}, u = (
|
|
4120
|
-
l.value.has(
|
|
4121
|
-
}, p = (
|
|
4122
|
-
r("update:modelValue",
|
|
4140
|
+
}, u = (M) => {
|
|
4141
|
+
l.value.has(M) ? l.value.delete(M) : l.value.add(M);
|
|
4142
|
+
}, p = (M) => {
|
|
4143
|
+
r("update:modelValue", M);
|
|
4123
4144
|
}, m = () => {
|
|
4124
4145
|
p("");
|
|
4125
|
-
}, y = (
|
|
4126
|
-
var
|
|
4127
|
-
return (((
|
|
4128
|
-
},
|
|
4129
|
-
var
|
|
4130
|
-
return ((
|
|
4131
|
-
},
|
|
4146
|
+
}, y = (M) => `filter-${M}`, h = (M) => {
|
|
4147
|
+
var F, x;
|
|
4148
|
+
return (((x = (F = i.config.schema) == null ? void 0 : F[M]) == null ? void 0 : x.values) ?? []).map((f) => typeof f == "string" ? { value: f, label: f } : f);
|
|
4149
|
+
}, b = (M) => {
|
|
4150
|
+
var F, x;
|
|
4151
|
+
return ((x = (F = i.config.schema) == null ? void 0 : F[M]) == null ? void 0 : x.type) ?? "text";
|
|
4152
|
+
}, k = (M) => {
|
|
4132
4153
|
a.value = {
|
|
4133
4154
|
...a.value,
|
|
4134
|
-
[
|
|
4155
|
+
[M]: ""
|
|
4135
4156
|
}, B();
|
|
4136
|
-
},
|
|
4157
|
+
}, A = () => {
|
|
4137
4158
|
a.value = {}, B(!0);
|
|
4138
|
-
}, B = (
|
|
4139
|
-
const
|
|
4140
|
-
|
|
4141
|
-
},
|
|
4142
|
-
var
|
|
4143
|
-
return !!((
|
|
4144
|
-
},
|
|
4159
|
+
}, B = (M = !1) => {
|
|
4160
|
+
const F = Object.keys(a.value).reduce((x, f) => (a.value[f] && (x[f] = `${a.value[f]}`), x), {});
|
|
4161
|
+
M && (o.value = !1), r("update:modelValue", new URLSearchParams(F).toString());
|
|
4162
|
+
}, P = (M) => {
|
|
4163
|
+
var F, x;
|
|
4164
|
+
return !!((x = (F = i.config.schema) == null ? void 0 : F[M]) != null && x.filterFunction);
|
|
4165
|
+
}, ee = (M, F) => {
|
|
4145
4166
|
var f;
|
|
4146
|
-
const
|
|
4147
|
-
return (
|
|
4167
|
+
const x = (f = i.config.schema) == null ? void 0 : f[M];
|
|
4168
|
+
return (x == null ? void 0 : x.filterFunction) === void 0 ? !0 : x.filterFunction(F);
|
|
4148
4169
|
};
|
|
4149
|
-
return (
|
|
4150
|
-
const
|
|
4151
|
-
return e.config.isExactMatch ? (
|
|
4170
|
+
return (M, F) => {
|
|
4171
|
+
const x = j("KInput"), f = j("KButton"), v = j("KSelect");
|
|
4172
|
+
return e.config.isExactMatch ? (g(), K(x, {
|
|
4152
4173
|
key: 0,
|
|
4153
4174
|
autocomplete: "off",
|
|
4154
4175
|
class: "kong-ui-entity-filter-input",
|
|
@@ -4157,130 +4178,130 @@ ${l.value}
|
|
|
4157
4178
|
placeholder: e.config.placeholder,
|
|
4158
4179
|
"onUpdate:modelValue": p
|
|
4159
4180
|
}, {
|
|
4160
|
-
before:
|
|
4161
|
-
|
|
4181
|
+
before: w(() => [
|
|
4182
|
+
R(jt)
|
|
4162
4183
|
]),
|
|
4163
|
-
after:
|
|
4164
|
-
|
|
4184
|
+
after: w(() => [
|
|
4185
|
+
Ce(R(_(fi), {
|
|
4165
4186
|
class: "kong-ui-entity-filter-clear",
|
|
4166
4187
|
role: "button",
|
|
4167
4188
|
tabindex: "0",
|
|
4168
4189
|
onClick: m
|
|
4169
4190
|
}, null, 512), [
|
|
4170
|
-
[
|
|
4191
|
+
[xe, e.modelValue !== ""]
|
|
4171
4192
|
])
|
|
4172
4193
|
]),
|
|
4173
4194
|
_: 1
|
|
4174
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
4175
|
-
|
|
4195
|
+
}, 8, ["model-value", "placeholder"])) : (g(), $("div", $l, [
|
|
4196
|
+
R(f, {
|
|
4176
4197
|
appearance: "tertiary",
|
|
4177
4198
|
"data-testid": "filter-button",
|
|
4178
4199
|
onClick: d
|
|
4179
4200
|
}, {
|
|
4180
|
-
default:
|
|
4181
|
-
|
|
4182
|
-
q(" " +
|
|
4201
|
+
default: w(() => [
|
|
4202
|
+
R(jt),
|
|
4203
|
+
q(" " + I(_(n)("filter.filterButtonText")) + " " + I(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
4183
4204
|
]),
|
|
4184
4205
|
_: 1
|
|
4185
4206
|
}),
|
|
4186
|
-
|
|
4207
|
+
Ce(L("div", {
|
|
4187
4208
|
class: "kong-ui-entity-filter-backdrop",
|
|
4188
4209
|
onClick: d
|
|
4189
4210
|
}, null, 512), [
|
|
4190
|
-
[
|
|
4211
|
+
[xe, o.value]
|
|
4191
4212
|
]),
|
|
4192
|
-
|
|
4193
|
-
(
|
|
4194
|
-
var
|
|
4195
|
-
return
|
|
4196
|
-
key:
|
|
4213
|
+
Ce(L("div", Tl, [
|
|
4214
|
+
(g(!0), $(ue, null, ce(c.value, (C) => {
|
|
4215
|
+
var Y, G;
|
|
4216
|
+
return g(), $("div", {
|
|
4217
|
+
key: C.value,
|
|
4197
4218
|
class: "kong-ui-entity-filter-menu-item",
|
|
4198
|
-
"data-testid":
|
|
4219
|
+
"data-testid": C.value
|
|
4199
4220
|
}, [
|
|
4200
4221
|
L("span", {
|
|
4201
|
-
class: fe(["menu-item-title", { expanded: l.value.has(
|
|
4222
|
+
class: fe(["menu-item-title", { expanded: l.value.has(C.value) }]),
|
|
4202
4223
|
role: "button",
|
|
4203
4224
|
tabindex: "0",
|
|
4204
|
-
onClick: (E) => u(
|
|
4205
|
-
onKeydown: ti((E) => u(
|
|
4225
|
+
onClick: (E) => u(C.value),
|
|
4226
|
+
onKeydown: ti((E) => u(C.value), ["enter"])
|
|
4206
4227
|
}, [
|
|
4207
|
-
q(
|
|
4208
|
-
|
|
4209
|
-
[
|
|
4228
|
+
q(I(C.label) + " ", 1),
|
|
4229
|
+
Ce(L("span", Fl, null, 512), [
|
|
4230
|
+
[xe, s.value.includes(C.value)]
|
|
4210
4231
|
]),
|
|
4211
|
-
|
|
4212
|
-
class: fe(["menu-item-expand-icon", { expanded: l.value.has(
|
|
4213
|
-
color:
|
|
4232
|
+
R(_(pi), {
|
|
4233
|
+
class: fe(["menu-item-expand-icon", { expanded: l.value.has(C.value) }]),
|
|
4234
|
+
color: _(sr)
|
|
4214
4235
|
}, null, 8, ["class", "color"])
|
|
4215
4236
|
], 42, Il),
|
|
4216
|
-
|
|
4237
|
+
Ce(L("div", Ol, [
|
|
4217
4238
|
L("label", {
|
|
4218
4239
|
class: "menu-item-label",
|
|
4219
|
-
for: y(
|
|
4220
|
-
},
|
|
4221
|
-
((
|
|
4240
|
+
for: y(C.value)
|
|
4241
|
+
}, I(_(n)("filter.fieldLabel")), 9, Bl),
|
|
4242
|
+
((G = (Y = e.config.schema) == null ? void 0 : Y[C.value]) == null ? void 0 : G.type) === "select" ? (g(), K(v, {
|
|
4222
4243
|
key: 0,
|
|
4223
|
-
id: y(
|
|
4224
|
-
modelValue: a.value[
|
|
4225
|
-
"onUpdate:modelValue": (E) => a.value[
|
|
4226
|
-
"enable-filtering":
|
|
4227
|
-
"filter-function": (E) =>
|
|
4228
|
-
items:
|
|
4229
|
-
placeholder:
|
|
4230
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "enable-filtering", "filter-function", "items", "placeholder"])) : (
|
|
4244
|
+
id: y(C.value),
|
|
4245
|
+
modelValue: a.value[C.value],
|
|
4246
|
+
"onUpdate:modelValue": (E) => a.value[C.value] = E,
|
|
4247
|
+
"enable-filtering": P(C.value),
|
|
4248
|
+
"filter-function": (E) => ee(C.value, E),
|
|
4249
|
+
items: h(C.value),
|
|
4250
|
+
placeholder: _(n)("filter.selectPlaceholder")
|
|
4251
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "enable-filtering", "filter-function", "items", "placeholder"])) : (g(), K(x, {
|
|
4231
4252
|
key: 1,
|
|
4232
|
-
id: y(
|
|
4233
|
-
modelValue: a.value[
|
|
4234
|
-
"onUpdate:modelValue": (E) => a.value[
|
|
4253
|
+
id: y(C.value),
|
|
4254
|
+
modelValue: a.value[C.value],
|
|
4255
|
+
"onUpdate:modelValue": (E) => a.value[C.value] = E,
|
|
4235
4256
|
autocomplete: "off",
|
|
4236
|
-
placeholder:
|
|
4237
|
-
type:
|
|
4257
|
+
placeholder: _(n)("filter.inputPlaceholder"),
|
|
4258
|
+
type: b(C.value)
|
|
4238
4259
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4239
4260
|
], 512), [
|
|
4240
|
-
[
|
|
4261
|
+
[xe, l.value.has(C.value)]
|
|
4241
4262
|
]),
|
|
4242
|
-
|
|
4243
|
-
|
|
4263
|
+
Ce(L("div", Ll, [
|
|
4264
|
+
R(f, {
|
|
4244
4265
|
appearance: "tertiary",
|
|
4245
4266
|
"data-testid": "apply-filter",
|
|
4246
4267
|
size: "small",
|
|
4247
|
-
onClick:
|
|
4268
|
+
onClick: F[0] || (F[0] = (E) => B(!0))
|
|
4248
4269
|
}, {
|
|
4249
|
-
default:
|
|
4250
|
-
q(
|
|
4270
|
+
default: w(() => [
|
|
4271
|
+
q(I(_(n)("filter.applyButtonText")), 1)
|
|
4251
4272
|
]),
|
|
4252
4273
|
_: 1
|
|
4253
4274
|
}),
|
|
4254
|
-
|
|
4275
|
+
R(f, {
|
|
4255
4276
|
appearance: "tertiary",
|
|
4256
4277
|
"data-testid": "clear-filter",
|
|
4257
4278
|
size: "small",
|
|
4258
|
-
onClick: (E) => C
|
|
4279
|
+
onClick: (E) => k(C.value)
|
|
4259
4280
|
}, {
|
|
4260
|
-
default:
|
|
4261
|
-
q(
|
|
4281
|
+
default: w(() => [
|
|
4282
|
+
q(I(_(n)("filter.clearButtonText")), 1)
|
|
4262
4283
|
]),
|
|
4263
4284
|
_: 1
|
|
4264
4285
|
}, 8, ["onClick"])
|
|
4265
4286
|
], 512), [
|
|
4266
|
-
[
|
|
4287
|
+
[xe, l.value.has(C.value)]
|
|
4267
4288
|
])
|
|
4268
4289
|
], 8, El);
|
|
4269
4290
|
}), 128)),
|
|
4270
4291
|
L("div", Rl, [
|
|
4271
|
-
|
|
4292
|
+
R(f, {
|
|
4272
4293
|
appearance: "tertiary",
|
|
4273
4294
|
size: "small",
|
|
4274
|
-
onClick:
|
|
4295
|
+
onClick: A
|
|
4275
4296
|
}, {
|
|
4276
|
-
default:
|
|
4277
|
-
q(
|
|
4297
|
+
default: w(() => [
|
|
4298
|
+
q(I(_(n)("filter.clearAllButtonText")), 1)
|
|
4278
4299
|
]),
|
|
4279
4300
|
_: 1
|
|
4280
4301
|
})
|
|
4281
4302
|
])
|
|
4282
4303
|
], 512), [
|
|
4283
|
-
[
|
|
4304
|
+
[xe, o.value]
|
|
4284
4305
|
])
|
|
4285
4306
|
]));
|
|
4286
4307
|
};
|
|
@@ -4317,9 +4338,9 @@ ${l.value}
|
|
|
4317
4338
|
},
|
|
4318
4339
|
emits: ["cancel", "proceed"],
|
|
4319
4340
|
setup(e, { emit: t }) {
|
|
4320
|
-
const { i18n: { t: n }, i18nT: i } =
|
|
4341
|
+
const { i18n: { t: n }, i18nT: i } = J.useI18n(), r = e, o = t, a = N(!1), l = S(
|
|
4321
4342
|
() => r.action === "enable" ? n("toggleModal.enable.title", { entityType: r.entityType }) : n("toggleModal.disable.title", { entityType: r.entityType })
|
|
4322
|
-
), s =
|
|
4343
|
+
), s = S(
|
|
4323
4344
|
() => r.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
4324
4345
|
), c = () => o("cancel"), d = async () => {
|
|
4325
4346
|
if (r.onConfirm) {
|
|
@@ -4334,9 +4355,9 @@ ${l.value}
|
|
|
4334
4355
|
}
|
|
4335
4356
|
};
|
|
4336
4357
|
return (u, p) => {
|
|
4337
|
-
const m =
|
|
4338
|
-
return
|
|
4339
|
-
|
|
4358
|
+
const m = j("KPrompt");
|
|
4359
|
+
return g(), K(Wt, { to: "body" }, [
|
|
4360
|
+
R(m, {
|
|
4340
4361
|
"action-button-disabled": a.value,
|
|
4341
4362
|
"action-button-text": s.value,
|
|
4342
4363
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
@@ -4345,16 +4366,16 @@ ${l.value}
|
|
|
4345
4366
|
onCancel: c,
|
|
4346
4367
|
onProceed: d
|
|
4347
4368
|
}, {
|
|
4348
|
-
default:
|
|
4349
|
-
|
|
4369
|
+
default: w(() => [
|
|
4370
|
+
R(_(i), {
|
|
4350
4371
|
keypath: `toggleModal.${r.action}.message`,
|
|
4351
4372
|
scope: "global"
|
|
4352
4373
|
}, {
|
|
4353
|
-
entityType:
|
|
4354
|
-
q(
|
|
4374
|
+
entityType: w(() => [
|
|
4375
|
+
q(I(e.entityType), 1)
|
|
4355
4376
|
]),
|
|
4356
|
-
entityName:
|
|
4357
|
-
L("strong", null,
|
|
4377
|
+
entityName: w(() => [
|
|
4378
|
+
L("strong", null, I(e.entityName), 1)
|
|
4358
4379
|
]),
|
|
4359
4380
|
_: 1
|
|
4360
4381
|
}, 8, ["keypath"])
|
|
@@ -4386,13 +4407,13 @@ ${l.value}
|
|
|
4386
4407
|
}
|
|
4387
4408
|
},
|
|
4388
4409
|
setup(e) {
|
|
4389
|
-
const t = e, n = N(void 0), i =
|
|
4410
|
+
const t = e, n = N(void 0), i = S(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4390
4411
|
return be(() => t.authFunction, async () => {
|
|
4391
4412
|
n.value = await t.authFunction();
|
|
4392
4413
|
}, { immediate: !0 }), (r, o) => i.value ? U(r.$slots, "default", {
|
|
4393
4414
|
key: 0,
|
|
4394
4415
|
isAllowed: n.value
|
|
4395
|
-
}) :
|
|
4416
|
+
}) : D("", !0);
|
|
4396
4417
|
}
|
|
4397
4418
|
}), ne = [];
|
|
4398
4419
|
for (let e = 0; e < 256; ++e)
|
|
@@ -4402,7 +4423,7 @@ function Nl(e, t = 0) {
|
|
|
4402
4423
|
}
|
|
4403
4424
|
let ze;
|
|
4404
4425
|
const Ml = new Uint8Array(16);
|
|
4405
|
-
function
|
|
4426
|
+
function Dl() {
|
|
4406
4427
|
if (!ze) {
|
|
4407
4428
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
4408
4429
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
@@ -4410,13 +4431,13 @@ function jl() {
|
|
|
4410
4431
|
}
|
|
4411
4432
|
return ze(Ml);
|
|
4412
4433
|
}
|
|
4413
|
-
const
|
|
4414
|
-
function
|
|
4434
|
+
const Pl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ut = { randomUUID: Pl };
|
|
4435
|
+
function jl(e, t, n) {
|
|
4415
4436
|
var r;
|
|
4416
4437
|
if (Ut.randomUUID && !e)
|
|
4417
4438
|
return Ut.randomUUID();
|
|
4418
4439
|
e = e || {};
|
|
4419
|
-
const i = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ??
|
|
4440
|
+
const i = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? Dl();
|
|
4420
4441
|
if (i.length < 16)
|
|
4421
4442
|
throw new Error("Random bytes length must be >= 16");
|
|
4422
4443
|
return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, Nl(i);
|
|
@@ -4456,35 +4477,35 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4456
4477
|
}
|
|
4457
4478
|
},
|
|
4458
4479
|
setup(e) {
|
|
4459
|
-
const t = Ue(), n =
|
|
4460
|
-
return (i, r) => (
|
|
4461
|
-
"aria-labelledby": e.title ?
|
|
4480
|
+
const t = Ue(), n = jl();
|
|
4481
|
+
return (i, r) => (g(), $("div", {
|
|
4482
|
+
"aria-labelledby": e.title ? _(n) : void 0,
|
|
4462
4483
|
class: fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4463
4484
|
role: "group"
|
|
4464
4485
|
}, [
|
|
4465
4486
|
L("div", ql, [
|
|
4466
|
-
e.hideInfoHeader ?
|
|
4487
|
+
e.hideInfoHeader ? D("", !0) : (g(), $("div", {
|
|
4467
4488
|
key: 0,
|
|
4468
4489
|
class: fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4469
4490
|
}, [
|
|
4470
|
-
e.title ? (
|
|
4491
|
+
e.title ? (g(), K(je(e.titleTag), {
|
|
4471
4492
|
key: 0,
|
|
4472
|
-
id:
|
|
4493
|
+
id: _(n),
|
|
4473
4494
|
class: "form-section-title"
|
|
4474
4495
|
}, {
|
|
4475
|
-
default:
|
|
4476
|
-
q(
|
|
4496
|
+
default: w(() => [
|
|
4497
|
+
q(I(e.title), 1)
|
|
4477
4498
|
]),
|
|
4478
4499
|
_: 1
|
|
4479
|
-
}, 8, ["id"])) :
|
|
4480
|
-
e.description ||
|
|
4500
|
+
}, 8, ["id"])) : D("", !0),
|
|
4501
|
+
e.description || _(t).description ? (g(), $("div", Hl, [
|
|
4481
4502
|
U(i.$slots, "description", {}, () => [
|
|
4482
|
-
L("p", null,
|
|
4503
|
+
L("p", null, I(e.description), 1)
|
|
4483
4504
|
], !0)
|
|
4484
|
-
])) :
|
|
4485
|
-
|
|
4505
|
+
])) : D("", !0),
|
|
4506
|
+
_(t).footer ? (g(), $("div", Vl, [
|
|
4486
4507
|
U(i.$slots, "footer", {}, void 0, !0)
|
|
4487
|
-
])) :
|
|
4508
|
+
])) : D("", !0)
|
|
4488
4509
|
], 2)),
|
|
4489
4510
|
L("div", Yl, [
|
|
4490
4511
|
U(i.$slots, "default", {}, void 0, !0)
|
|
@@ -4510,31 +4531,31 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4510
4531
|
},
|
|
4511
4532
|
setup(e) {
|
|
4512
4533
|
const t = Ue();
|
|
4513
|
-
return (n, i) => (
|
|
4534
|
+
return (n, i) => (g(), $("div", Jl, [
|
|
4514
4535
|
L("header", Gl, [
|
|
4515
|
-
e.step != null ? (
|
|
4536
|
+
e.step != null ? (g(), $("div", zl, I(e.step), 1)) : D("", !0),
|
|
4516
4537
|
L("div", Ql, [
|
|
4517
4538
|
L("h2", Zl, [
|
|
4518
4539
|
U(n.$slots, "title", {}, () => [
|
|
4519
|
-
q(
|
|
4540
|
+
q(I(e.title), 1)
|
|
4520
4541
|
], !0)
|
|
4521
4542
|
]),
|
|
4522
|
-
e.description || t.description ? (
|
|
4543
|
+
e.description || t.description ? (g(), $("div", Xl, [
|
|
4523
4544
|
U(n.$slots, "description", {}, () => [
|
|
4524
|
-
q(
|
|
4545
|
+
q(I(e.description), 1)
|
|
4525
4546
|
], !0)
|
|
4526
|
-
])) :
|
|
4547
|
+
])) : D("", !0)
|
|
4527
4548
|
]),
|
|
4528
|
-
t.extra ? (
|
|
4549
|
+
t.extra ? (g(), $("div", es, [
|
|
4529
4550
|
U(n.$slots, "extra", {}, void 0, !0)
|
|
4530
|
-
])) :
|
|
4551
|
+
])) : D("", !0)
|
|
4531
4552
|
]),
|
|
4532
4553
|
L("div", ts, [
|
|
4533
4554
|
U(n.$slots, "default", {}, void 0, !0)
|
|
4534
4555
|
])
|
|
4535
4556
|
]));
|
|
4536
4557
|
}
|
|
4537
|
-
}),
|
|
4558
|
+
}), Ds = /* @__PURE__ */ le(ns, [["__scopeId", "data-v-cb6d2e95"]]), is = {
|
|
4538
4559
|
class: "kong-ui-public-entity-link",
|
|
4539
4560
|
"data-testid": "entity-link-parent"
|
|
4540
4561
|
}, rs = {
|
|
@@ -4564,10 +4585,10 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4564
4585
|
}
|
|
4565
4586
|
},
|
|
4566
4587
|
setup(e) {
|
|
4567
|
-
const t = e, n = N(), { isTruncated: i } =
|
|
4588
|
+
const t = e, n = N(), { isTruncated: i } = J.useTruncationDetector(n), { i18n: { t: r } } = J.useI18n(), o = r("global.actions.copyId"), a = N(o), l = S(() => t.entityLinkData.deleted ?? !1), s = S(() => {
|
|
4568
4589
|
var u;
|
|
4569
4590
|
return (u = t.entityLinkData.id) != null && u.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4570
|
-
}), c =
|
|
4591
|
+
}), c = S(() => {
|
|
4571
4592
|
var u;
|
|
4572
4593
|
return `${(u = s.value) == null ? void 0 : u.toString().slice(0, 5)} (deleted)`;
|
|
4573
4594
|
}), d = async (u) => {
|
|
@@ -4576,50 +4597,50 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4576
4597
|
}, 1800));
|
|
4577
4598
|
};
|
|
4578
4599
|
return (u, p) => {
|
|
4579
|
-
const m =
|
|
4580
|
-
return
|
|
4581
|
-
l.value ? (
|
|
4600
|
+
const m = j("KTooltip"), y = j("KExternalLink"), h = j("KClipboardProvider");
|
|
4601
|
+
return g(), $("div", is, [
|
|
4602
|
+
l.value ? (g(), $("div", rs, I(c.value), 1)) : s.value ? s.value ? (g(), K(y, {
|
|
4582
4603
|
key: 2,
|
|
4583
4604
|
class: "entity-link",
|
|
4584
4605
|
"hide-icon": !e.newWindow,
|
|
4585
4606
|
href: e.externalLink,
|
|
4586
4607
|
target: e.newWindow ? "_blank" : "_self"
|
|
4587
4608
|
}, {
|
|
4588
|
-
default:
|
|
4589
|
-
|
|
4590
|
-
text:
|
|
4609
|
+
default: w(() => [
|
|
4610
|
+
R(m, {
|
|
4611
|
+
text: _(i) && e.entityLinkData.label || ""
|
|
4591
4612
|
}, {
|
|
4592
|
-
default:
|
|
4613
|
+
default: w(() => [
|
|
4593
4614
|
L("span", {
|
|
4594
4615
|
ref_key: "textContent",
|
|
4595
4616
|
ref: n,
|
|
4596
4617
|
class: "entity-link-label"
|
|
4597
|
-
},
|
|
4618
|
+
}, I(e.entityLinkData.label), 513)
|
|
4598
4619
|
]),
|
|
4599
4620
|
_: 1
|
|
4600
4621
|
}, 8, ["text"])
|
|
4601
4622
|
]),
|
|
4602
4623
|
_: 1
|
|
4603
|
-
}, 8, ["hide-icon", "href", "target"])) :
|
|
4604
|
-
s.value && e.allowCopy ? (
|
|
4624
|
+
}, 8, ["hide-icon", "href", "target"])) : D("", !0) : (g(), $("div", as, I(" – "))),
|
|
4625
|
+
s.value && e.allowCopy ? (g(), K(m, {
|
|
4605
4626
|
key: a.value,
|
|
4606
4627
|
class: "copy-uuid-tooltip",
|
|
4607
4628
|
"max-width": "160",
|
|
4608
4629
|
placement: "bottom-end",
|
|
4609
4630
|
text: a.value
|
|
4610
4631
|
}, {
|
|
4611
|
-
default:
|
|
4612
|
-
|
|
4613
|
-
default:
|
|
4632
|
+
default: w(() => [
|
|
4633
|
+
R(h, null, {
|
|
4634
|
+
default: w(({ copyToClipboard: b }) => [
|
|
4614
4635
|
L("span", {
|
|
4615
4636
|
class: "entity-link-copy-id",
|
|
4616
|
-
onClick: Re((
|
|
4637
|
+
onClick: Re((k) => d(b), ["stop"])
|
|
4617
4638
|
}, [
|
|
4618
|
-
|
|
4639
|
+
R(_(mi), {
|
|
4619
4640
|
class: "copy-icon",
|
|
4620
|
-
color:
|
|
4641
|
+
color: _(cr),
|
|
4621
4642
|
"data-testid": "copy-id",
|
|
4622
|
-
size:
|
|
4643
|
+
size: _(dr)
|
|
4623
4644
|
}, null, 8, ["color", "size"])
|
|
4624
4645
|
], 8, os)
|
|
4625
4646
|
]),
|
|
@@ -4627,11 +4648,11 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4627
4648
|
})
|
|
4628
4649
|
]),
|
|
4629
4650
|
_: 1
|
|
4630
|
-
}, 8, ["text"])) :
|
|
4651
|
+
}, 8, ["text"])) : D("", !0)
|
|
4631
4652
|
]);
|
|
4632
4653
|
};
|
|
4633
4654
|
}
|
|
4634
|
-
}),
|
|
4655
|
+
}), Ps = /* @__PURE__ */ le(ls, [["__scopeId", "data-v-96efdfa5"]]), ss = { class: "kong-ui-public-entity-empty-state" }, cs = { class: "entity-empty-state-content" }, us = {
|
|
4635
4656
|
key: 0,
|
|
4636
4657
|
class: "empty-state-image"
|
|
4637
4658
|
}, ds = {
|
|
@@ -4646,10 +4667,10 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4646
4667
|
}, ms = {
|
|
4647
4668
|
key: 0,
|
|
4648
4669
|
class: "entity-empty-state-message"
|
|
4649
|
-
},
|
|
4670
|
+
}, gs = {
|
|
4650
4671
|
key: 1,
|
|
4651
4672
|
class: "entity-empty-state-action"
|
|
4652
|
-
},
|
|
4673
|
+
}, hs = {
|
|
4653
4674
|
key: 2,
|
|
4654
4675
|
class: "entity-empty-state-card-container"
|
|
4655
4676
|
}, ys = {
|
|
@@ -4699,100 +4720,100 @@ const Ul = ["aria-labelledby"], ql = { class: "form-section-wrapper" }, Hl = {
|
|
|
4699
4720
|
},
|
|
4700
4721
|
emits: ["click:create", "click:learn-more"],
|
|
4701
4722
|
setup(e) {
|
|
4702
|
-
const t = e, { i18n: { t: n } } =
|
|
4723
|
+
const t = e, { i18n: { t: n } } = J.useI18n(), i = N(!1), r = S(() => i.value && !!t.actionButtonText), o = S(() => vt.includes(t.appearance) ? t.appearance : ["primary", t.appearance]);
|
|
4703
4724
|
return rt(async () => {
|
|
4704
4725
|
i.value = await t.canCreate();
|
|
4705
4726
|
}), it(() => ni(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
|
|
4706
4727
|
Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, l) => {
|
|
4707
|
-
const s =
|
|
4708
|
-
return
|
|
4728
|
+
const s = j("KCard");
|
|
4729
|
+
return g(), $("div", ss, [
|
|
4709
4730
|
L("div", cs, [
|
|
4710
|
-
a.$slots.image ? (
|
|
4731
|
+
a.$slots.image ? (g(), $("div", us, [
|
|
4711
4732
|
U(a.$slots, "image", {}, void 0, !0)
|
|
4712
|
-
])) :
|
|
4713
|
-
e.title || a.$slots.title ? (
|
|
4733
|
+
])) : D("", !0),
|
|
4734
|
+
e.title || a.$slots.title ? (g(), $("div", ds, [
|
|
4714
4735
|
L("h1", {
|
|
4715
4736
|
class: fe(o.value)
|
|
4716
4737
|
}, [
|
|
4717
4738
|
U(a.$slots, "title", {}, () => [
|
|
4718
|
-
q(
|
|
4739
|
+
q(I(e.title), 1)
|
|
4719
4740
|
], !0)
|
|
4720
4741
|
], 2)
|
|
4721
|
-
])) :
|
|
4722
|
-
e.description || a.$slots.default ? (
|
|
4742
|
+
])) : D("", !0),
|
|
4743
|
+
e.description || a.$slots.default ? (g(), $("div", fs, [
|
|
4723
4744
|
U(a.$slots, "default", {}, () => [
|
|
4724
|
-
L("p", null,
|
|
4745
|
+
L("p", null, I(e.description), 1)
|
|
4725
4746
|
], !0)
|
|
4726
|
-
])) :
|
|
4727
|
-
e.pricing || a.$slots.pricing ? (
|
|
4747
|
+
])) : D("", !0),
|
|
4748
|
+
e.pricing || a.$slots.pricing ? (g(), $("div", ps, [
|
|
4728
4749
|
L("p", null, [
|
|
4729
|
-
L("b", null,
|
|
4750
|
+
L("b", null, I(_(n)("emptyState.pricingTitle")), 1),
|
|
4730
4751
|
l[2] || (l[2] = q()),
|
|
4731
4752
|
U(a.$slots, "pricing", {}, () => [
|
|
4732
|
-
q(
|
|
4753
|
+
q(I(e.pricing), 1)
|
|
4733
4754
|
], !0)
|
|
4734
4755
|
])
|
|
4735
|
-
])) :
|
|
4756
|
+
])) : D("", !0)
|
|
4736
4757
|
]),
|
|
4737
|
-
a.$slots.message ? (
|
|
4758
|
+
a.$slots.message ? (g(), $("div", ms, [
|
|
4738
4759
|
U(a.$slots, "message", {}, void 0, !0)
|
|
4739
|
-
])) :
|
|
4740
|
-
r.value || e.learnMore || a.$slots.actions ? (
|
|
4760
|
+
])) : D("", !0),
|
|
4761
|
+
r.value || e.learnMore || a.$slots.actions ? (g(), $("div", gs, [
|
|
4741
4762
|
U(a.$slots, "actions", {}, () => [
|
|
4742
|
-
r.value ? (
|
|
4763
|
+
r.value ? (g(), K(_(gt), {
|
|
4743
4764
|
key: 0,
|
|
4744
4765
|
appearance: "primary",
|
|
4745
4766
|
"data-testid": "entity-create-button",
|
|
4746
4767
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4747
4768
|
onClick: l[0] || (l[0] = (c) => a.$emit("click:create"))
|
|
4748
4769
|
}, {
|
|
4749
|
-
default:
|
|
4750
|
-
|
|
4751
|
-
q(" " +
|
|
4770
|
+
default: w(() => [
|
|
4771
|
+
R(_(Gt)),
|
|
4772
|
+
q(" " + I(e.actionButtonText), 1)
|
|
4752
4773
|
]),
|
|
4753
4774
|
_: 1
|
|
4754
|
-
}, 8, ["size"])) :
|
|
4755
|
-
e.learnMore ? (
|
|
4775
|
+
}, 8, ["size"])) : D("", !0),
|
|
4776
|
+
e.learnMore ? (g(), K(_(gt), {
|
|
4756
4777
|
key: 1,
|
|
4757
4778
|
appearance: "secondary",
|
|
4758
4779
|
"data-testid": "entity-learn-more-button",
|
|
4759
4780
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4760
4781
|
onClick: l[1] || (l[1] = (c) => a.$emit("click:learn-more"))
|
|
4761
4782
|
}, {
|
|
4762
|
-
default:
|
|
4763
|
-
|
|
4764
|
-
q(" " +
|
|
4783
|
+
default: w(() => [
|
|
4784
|
+
R(_(Jt), { decorative: "" }),
|
|
4785
|
+
q(" " + I(_(n)("emptyState.learnMore")), 1)
|
|
4765
4786
|
]),
|
|
4766
4787
|
_: 1
|
|
4767
|
-
}, 8, ["size"])) :
|
|
4788
|
+
}, 8, ["size"])) : D("", !0)
|
|
4768
4789
|
], !0)
|
|
4769
|
-
])) :
|
|
4770
|
-
e.features.length ? (
|
|
4771
|
-
(
|
|
4790
|
+
])) : D("", !0),
|
|
4791
|
+
e.features.length ? (g(), $("div", hs, [
|
|
4792
|
+
(g(!0), $(ue, null, ce(e.features, (c, d) => (g(), K(s, {
|
|
4772
4793
|
key: c,
|
|
4773
4794
|
class: "entity-empty-state-card"
|
|
4774
4795
|
}, {
|
|
4775
|
-
title:
|
|
4776
|
-
a.$slots[`feature-${d}-icon`] ? (
|
|
4796
|
+
title: w(() => [
|
|
4797
|
+
a.$slots[`feature-${d}-icon`] ? (g(), $("div", ys, [
|
|
4777
4798
|
U(a.$slots, `feature-${d}-icon`, {}, void 0, !0)
|
|
4778
|
-
])) :
|
|
4779
|
-
L("div", vs,
|
|
4799
|
+
])) : D("", !0),
|
|
4800
|
+
L("div", vs, I(c.title), 1)
|
|
4780
4801
|
]),
|
|
4781
|
-
default:
|
|
4802
|
+
default: w(() => [
|
|
4782
4803
|
L("div", {
|
|
4783
4804
|
title: c.description
|
|
4784
|
-
},
|
|
4805
|
+
}, I(c.description), 9, bs)
|
|
4785
4806
|
]),
|
|
4786
4807
|
_: 2
|
|
4787
4808
|
}, 1024))), 128))
|
|
4788
|
-
])) :
|
|
4789
|
-
a.$slots.bottom ? (
|
|
4809
|
+
])) : D("", !0),
|
|
4810
|
+
a.$slots.bottom ? (g(), $("div", ks, [
|
|
4790
4811
|
U(a.$slots, "bottom", {}, void 0, !0)
|
|
4791
|
-
])) :
|
|
4812
|
+
])) : D("", !0)
|
|
4792
4813
|
]);
|
|
4793
4814
|
};
|
|
4794
4815
|
}
|
|
4795
|
-
}),
|
|
4816
|
+
}), js = /* @__PURE__ */ le(Cs, [["__scopeId", "data-v-645aae54"]]), xs = { key: 1 }, Us = /* @__PURE__ */ z({
|
|
4796
4817
|
__name: "TableTags",
|
|
4797
4818
|
props: {
|
|
4798
4819
|
/** The tags to display in the table */
|
|
@@ -4806,7 +4827,7 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, l) =>
|
|
|
4806
4827
|
}
|
|
4807
4828
|
},
|
|
4808
4829
|
setup(e) {
|
|
4809
|
-
const t = e, n =
|
|
4830
|
+
const t = e, n = S(() => {
|
|
4810
4831
|
if (Array.isArray(t.tags))
|
|
4811
4832
|
return t.tags;
|
|
4812
4833
|
if (typeof t.tags == "string")
|
|
@@ -4820,44 +4841,44 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, l) =>
|
|
|
4820
4841
|
});
|
|
4821
4842
|
return (i, r) => {
|
|
4822
4843
|
var o;
|
|
4823
|
-
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (
|
|
4824
|
-
default:
|
|
4825
|
-
(
|
|
4844
|
+
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (g(), K(_(li), { key: 0 }, {
|
|
4845
|
+
default: w(() => [
|
|
4846
|
+
(g(!0), $(ue, null, ce(n.value, (a) => (g(), K(_(si), {
|
|
4826
4847
|
key: a,
|
|
4827
4848
|
"max-width": e.tagMaxWidth,
|
|
4828
4849
|
onClick: r[0] || (r[0] = Re(() => {
|
|
4829
4850
|
}, ["stop"]))
|
|
4830
4851
|
}, {
|
|
4831
|
-
default:
|
|
4832
|
-
q(
|
|
4852
|
+
default: w(() => [
|
|
4853
|
+
q(I(a), 1)
|
|
4833
4854
|
]),
|
|
4834
4855
|
_: 2
|
|
4835
4856
|
}, 1032, ["max-width"]))), 128))
|
|
4836
4857
|
]),
|
|
4837
4858
|
_: 1
|
|
4838
|
-
})) : (
|
|
4859
|
+
})) : (g(), $("span", xs, "-"));
|
|
4839
4860
|
};
|
|
4840
4861
|
}
|
|
4841
|
-
}), { useAxios: qs, useDeleteUrlBuilder: Hs, useErrors: Vs, useExternalLinkCreator: Ys, useFetchUrlBuilder: Ws, useFetcher: Js, useFetcherCacheKey: Gs, useDebouncedFilter: zs, useStringHelpers: Qs, useHelpers: Zs, useGatewayFeatureSupported: Xs, useTruncationDetector: ec, useValidators: tc, useSchemaProvider: nc, useTableState: ic } =
|
|
4862
|
+
}), { useAxios: qs, useDeleteUrlBuilder: Hs, useErrors: Vs, useExternalLinkCreator: Ys, useFetchUrlBuilder: Ws, useFetcher: Js, useFetcherCacheKey: Gs, useDebouncedFilter: zs, useStringHelpers: Qs, useHelpers: Zs, useGatewayFeatureSupported: Xs, useTruncationDetector: ec, useValidators: tc, useSchemaProvider: nc, useTableState: ic } = J;
|
|
4842
4863
|
export {
|
|
4843
4864
|
vt as Appearances,
|
|
4844
4865
|
tl as ConfigCardDisplay,
|
|
4845
4866
|
nn as ConfigCardItem,
|
|
4846
4867
|
ae as ConfigurationSchemaSection,
|
|
4847
|
-
|
|
4868
|
+
W as ConfigurationSchemaType,
|
|
4848
4869
|
cl as DeckCodeBlock,
|
|
4849
4870
|
Fs as EntityBaseConfigCard,
|
|
4850
4871
|
Os as EntityBaseForm,
|
|
4851
4872
|
yi as EntityBaseFormType,
|
|
4852
4873
|
Bs as EntityBaseTable,
|
|
4853
4874
|
Ls as EntityDeleteModal,
|
|
4854
|
-
|
|
4875
|
+
js as EntityEmptyState,
|
|
4855
4876
|
Rs as EntityFilter,
|
|
4856
|
-
|
|
4877
|
+
Ds as EntityFormBlock,
|
|
4857
4878
|
Ms as EntityFormSection,
|
|
4858
|
-
|
|
4879
|
+
Ps as EntityLink,
|
|
4859
4880
|
Ks as EntityToggleModal,
|
|
4860
|
-
|
|
4881
|
+
hi as EntityTypes,
|
|
4861
4882
|
bi as EventGatewayTypesArray,
|
|
4862
4883
|
me as FetcherStatus,
|
|
4863
4884
|
ki as IdentityTypesArray,
|
|
@@ -4865,7 +4886,7 @@ export {
|
|
|
4865
4886
|
rn as JsonCodeBlock,
|
|
4866
4887
|
Ns as PermissionsWrapper,
|
|
4867
4888
|
vi as SupportedEntityDeckArray,
|
|
4868
|
-
|
|
4889
|
+
$e as SupportedEntityType,
|
|
4869
4890
|
qe as SupportedEntityTypesArray,
|
|
4870
4891
|
Us as TableTags,
|
|
4871
4892
|
Gn as TerraformCodeBlock,
|