@kong-ui-public/entities-consumers 3.0.9 → 3.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-consumers.es.js +965 -952
- package/dist/entities-consumers.umd.js +21 -21
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { createI18n as
|
|
1
|
+
import { defineComponent as Y, ref as F, computed as S, watch as be, renderSlot as Q, createCommentVNode as z, unref as m, onBeforeMount as wt, resolveComponent as R, openBlock as y, createBlock as V, createSlots as je, withCtx as v, createElementVNode as q, createVNode as T, createTextVNode as J, toDisplayString as j, renderList as pe, createElementBlock as E, withModifiers as gt, withDirectives as Ce, vShow as we, Fragment as fe, normalizeClass as _e, withKeys as Ir, useSlots as It, resolveDynamicComponent as Ae, useCssVars as gn, inject as _r, onMounted as Sr, onUnmounted as xr, normalizeStyle as et, normalizeProps as Ar, guardReactiveProps as $r, mergeProps as Tr, pushScopeId as tt, popScopeId as nt, reactive as Vt } from "vue";
|
|
2
|
+
import { useRouter as _t } from "vue-router";
|
|
3
|
+
import { createI18n as hn, i18nTComponent as yn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Dt from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as jr } from "@kong/kongponents";
|
|
6
|
-
const
|
|
6
|
+
const Nr = {
|
|
7
7
|
list: {
|
|
8
8
|
table_headers: {
|
|
9
9
|
username: "Username",
|
|
@@ -99,50 +99,50 @@ const Mr = {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
}, Or = {
|
|
102
|
-
consumers:
|
|
102
|
+
consumers: Nr
|
|
103
103
|
};
|
|
104
|
-
function
|
|
105
|
-
const e =
|
|
104
|
+
function Mr() {
|
|
105
|
+
const e = hn("en-us", Or);
|
|
106
106
|
return {
|
|
107
107
|
i18n: e,
|
|
108
|
-
i18nT:
|
|
108
|
+
i18nT: yn(e)
|
|
109
109
|
// Translation component <i18n-t>
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
const rt = {
|
|
113
|
-
useI18n:
|
|
114
|
-
},
|
|
113
|
+
useI18n: Mr
|
|
114
|
+
}, Me = "/v2/control-planes/{controlPlaneId}/core-entities", Ee = "/{workspace}", Ne = {
|
|
115
115
|
list: {
|
|
116
116
|
konnect: {
|
|
117
|
+
all: `${Me}/consumers`,
|
|
118
|
+
forConsumerGroup: `${Me}/consumer_groups/{consumerGroupId}/consumers`,
|
|
119
|
+
oneForConsumerGroup: `${Me}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`
|
|
120
|
+
},
|
|
121
|
+
kongManager: {
|
|
117
122
|
all: `${Ee}/consumers`,
|
|
118
123
|
forConsumerGroup: `${Ee}/consumer_groups/{consumerGroupId}/consumers`,
|
|
119
124
|
oneForConsumerGroup: `${Ee}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`
|
|
120
|
-
},
|
|
121
|
-
kongManager: {
|
|
122
|
-
all: `${Ne}/consumers`,
|
|
123
|
-
forConsumerGroup: `${Ne}/consumer_groups/{consumerGroupId}/consumers`,
|
|
124
|
-
oneForConsumerGroup: `${Ne}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
127
|
form: {
|
|
128
128
|
konnect: {
|
|
129
|
-
validate: `${
|
|
130
|
-
create: `${
|
|
131
|
-
edit: `${
|
|
129
|
+
validate: `${Me}/v1/schemas/json/consumer/validate`,
|
|
130
|
+
create: `${Me}/consumers`,
|
|
131
|
+
edit: `${Me}/consumers/{id}`
|
|
132
132
|
},
|
|
133
133
|
kongManager: {
|
|
134
|
-
validate: `${
|
|
135
|
-
create: `${
|
|
136
|
-
edit: `${
|
|
134
|
+
validate: `${Ee}/schemas/consumers/validate`,
|
|
135
|
+
create: `${Ee}/consumers`,
|
|
136
|
+
edit: `${Ee}/consumers/{id}`
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
|
-
var vn = /* @__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))(vn || {}),
|
|
141
|
-
function
|
|
140
|
+
var vn = /* @__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))(vn || {}), ht = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ht || {}), $e = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))($e || {}), Z = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(Z || {}), ce = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ce || {});
|
|
141
|
+
function Er() {
|
|
142
142
|
return {
|
|
143
143
|
getAxiosInstance: (e = {}) => {
|
|
144
144
|
try {
|
|
145
|
-
const t =
|
|
145
|
+
const t = _r("get-axios-instance", void 0);
|
|
146
146
|
return typeof t == "function" ? t(e) : Dt.create({
|
|
147
147
|
withCredentials: !0,
|
|
148
148
|
timeout: 3e4,
|
|
@@ -211,7 +211,7 @@ function Kr() {
|
|
|
211
211
|
};
|
|
212
212
|
}
|
|
213
213
|
function St(e = {}) {
|
|
214
|
-
const { getAxiosInstance: t } =
|
|
214
|
+
const { getAxiosInstance: t } = Er();
|
|
215
215
|
return {
|
|
216
216
|
axiosInstance: t(e)
|
|
217
217
|
};
|
|
@@ -325,10 +325,10 @@ const Br = {
|
|
|
325
325
|
toggleModal: Jr
|
|
326
326
|
};
|
|
327
327
|
function at() {
|
|
328
|
-
const e =
|
|
328
|
+
const e = hn("en-us", Hr);
|
|
329
329
|
return {
|
|
330
330
|
i18n: e,
|
|
331
|
-
i18nT:
|
|
331
|
+
i18nT: yn(e)
|
|
332
332
|
// Translation component <i18n-t>
|
|
333
333
|
};
|
|
334
334
|
}
|
|
@@ -381,79 +381,79 @@ function Wr(e, t, n, r = {
|
|
|
381
381
|
searchKeys: ["id"]
|
|
382
382
|
}) {
|
|
383
383
|
n || (n = "1000");
|
|
384
|
-
const { axiosInstance: a } = St(e.axiosRequestConfig), { i18n: { t: o } } = at(), { debounce: i } = Fr(), l = i(async (
|
|
385
|
-
await
|
|
386
|
-
}, 200), s =
|
|
387
|
-
let
|
|
388
|
-
e.app === "konnect" ?
|
|
389
|
-
const { isValidUuid:
|
|
384
|
+
const { axiosInstance: a } = St(e.axiosRequestConfig), { i18n: { t: o } } = at(), { debounce: i } = Fr(), l = i(async (b) => {
|
|
385
|
+
await H(b);
|
|
386
|
+
}, 200), s = F(!1), u = F(""), d = F(""), c = F([]), k = F([]), g = F(void 0), I = m(t);
|
|
387
|
+
let N = `${e.apiBaseUrl}${I}`;
|
|
388
|
+
e.app === "konnect" ? N = N.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (N = N.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
389
|
+
const { isValidUuid: w } = bn(), U = async () => {
|
|
390
390
|
try {
|
|
391
391
|
s.value = !0;
|
|
392
|
-
const { data:
|
|
393
|
-
|
|
392
|
+
const { data: b } = await a.get(`${N}?size=${n}`);
|
|
393
|
+
b != null && b.next || (g.value = r.fetchedItemsKey in b ? b[r.fetchedItemsKey] : []), k.value = r.fetchedItemsKey in b ? b[r.fetchedItemsKey] : [], c.value = k.value;
|
|
394
394
|
} catch {
|
|
395
395
|
c.value = [], u.value = o("debouncedFilter.errors.fetch");
|
|
396
396
|
} finally {
|
|
397
397
|
s.value = !1;
|
|
398
398
|
}
|
|
399
|
-
},
|
|
400
|
-
var
|
|
401
|
-
if (
|
|
402
|
-
if (
|
|
399
|
+
}, A = F(""), H = async (b) => {
|
|
400
|
+
var h, p, L;
|
|
401
|
+
if (A.value !== b)
|
|
402
|
+
if (A.value = b || "", g.value === void 0)
|
|
403
403
|
try {
|
|
404
404
|
if (s.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
405
|
-
let
|
|
406
|
-
|
|
407
|
-
const { data:
|
|
408
|
-
r.fetchedItemsKey in
|
|
409
|
-
} else if (
|
|
410
|
-
const
|
|
411
|
-
|
|
412
|
-
const { data:
|
|
413
|
-
return [
|
|
414
|
-
})()) :
|
|
415
|
-
...r.searchKeys.filter((
|
|
416
|
-
const { data:
|
|
417
|
-
return
|
|
405
|
+
let C = N + "";
|
|
406
|
+
b && (C += `/${b}`);
|
|
407
|
+
const { data: f } = await a.get(`${C}?size=${n}`);
|
|
408
|
+
r.fetchedItemsKey in f ? c.value = f[r.fetchedItemsKey] : f != null && f.id ? c.value = [f] : c.value = [];
|
|
409
|
+
} else if (b) {
|
|
410
|
+
const C = [];
|
|
411
|
+
w(b) && r.searchKeys.includes("id") ? C.push((async () => {
|
|
412
|
+
const { data: O } = await a.get(`${N}/${b}`);
|
|
413
|
+
return [O[r.fetchedItemsKey] ?? O];
|
|
414
|
+
})()) : C.push(
|
|
415
|
+
...r.searchKeys.filter((O) => O !== "id").map(async (O) => {
|
|
416
|
+
const { data: _ } = await a.get(`${N}?${O}=${b}`);
|
|
417
|
+
return _[r.fetchedItemsKey];
|
|
418
418
|
})
|
|
419
419
|
);
|
|
420
|
-
const
|
|
421
|
-
c.value = [], (
|
|
422
|
-
var
|
|
423
|
-
(
|
|
420
|
+
const f = await Promise.all(C), K = /* @__PURE__ */ new Set();
|
|
421
|
+
c.value = [], (h = f == null ? void 0 : f.forEach) == null || h.call(f, (O) => {
|
|
422
|
+
var _;
|
|
423
|
+
(_ = O == null ? void 0 : O.forEach) == null || _.call(O, (x) => {
|
|
424
424
|
K.has(x.id) || (K.add(x.id), c.value.push(x));
|
|
425
425
|
});
|
|
426
426
|
});
|
|
427
427
|
} else
|
|
428
|
-
c.value =
|
|
429
|
-
} catch (
|
|
430
|
-
((
|
|
428
|
+
c.value = k.value;
|
|
429
|
+
} catch (C) {
|
|
430
|
+
((p = C == null ? void 0 : C.response) == null ? void 0 : p.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (c.value = [], u.value = o("debouncedFilter.errors.fetch"));
|
|
431
431
|
} finally {
|
|
432
432
|
s.value = !1;
|
|
433
433
|
}
|
|
434
434
|
else
|
|
435
|
-
s.value = !0, d.value = "",
|
|
436
|
-
var
|
|
435
|
+
s.value = !0, d.value = "", b ? (c.value = (L = g.value) == null ? void 0 : L.filter((C) => {
|
|
436
|
+
var f;
|
|
437
437
|
let K = !1;
|
|
438
|
-
for (const
|
|
439
|
-
const
|
|
440
|
-
|
|
438
|
+
for (const O of r.searchKeys) {
|
|
439
|
+
const _ = typeof C[O] == "string" ? (f = C[O]) == null ? void 0 : f.toLowerCase() : C[O];
|
|
440
|
+
_ != null && _.includes(b.toLowerCase()) && (K = !0);
|
|
441
441
|
}
|
|
442
442
|
return K;
|
|
443
|
-
}), (!c.value || !c.value.length) && (d.value = o("debouncedFilter.errors.invalid"))) : c.value =
|
|
443
|
+
}), (!c.value || !c.value.length) && (d.value = o("debouncedFilter.errors.invalid"))) : c.value = g.value, s.value = !1;
|
|
444
444
|
};
|
|
445
445
|
return {
|
|
446
446
|
loading: s,
|
|
447
447
|
error: u,
|
|
448
448
|
validationError: d,
|
|
449
449
|
results: c,
|
|
450
|
-
allRecords:
|
|
451
|
-
loadItems:
|
|
450
|
+
allRecords: g,
|
|
451
|
+
loadItems: U,
|
|
452
452
|
debouncedQueryChange: l
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
455
|
function Yr(e, t) {
|
|
456
|
-
const n =
|
|
456
|
+
const n = m(t), r = S(
|
|
457
457
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
458
458
|
);
|
|
459
459
|
return r.value.search = "", (a) => `${r.value.href}/${a}`;
|
|
@@ -500,25 +500,25 @@ function Qr(e) {
|
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
function kn(e, t) {
|
|
503
|
-
const n =
|
|
503
|
+
const n = F(m(e)), r = F(m(t)), a = S(
|
|
504
504
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
505
|
-
), o =
|
|
505
|
+
), o = S(
|
|
506
506
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
507
507
|
);
|
|
508
508
|
return (i) => {
|
|
509
|
-
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query:
|
|
509
|
+
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query: k } = i;
|
|
510
510
|
try {
|
|
511
|
-
let
|
|
512
|
-
return a.value &&
|
|
513
|
-
|
|
514
|
-
}), d &&
|
|
515
|
-
} catch (
|
|
516
|
-
return console.error("RouteList(fetcher)",
|
|
511
|
+
let g = new URL(o.value.href);
|
|
512
|
+
return a.value && k ? (g.search = "", g = n.value.isExactMatch ? new URL(`${g.href}/${k}/`) : new URL(`${g.href}?filter[name][contains]=${k}`)) : (a.value || new URLSearchParams(k).forEach((I, N) => {
|
|
513
|
+
g.searchParams.append(N, I);
|
|
514
|
+
}), d && g.searchParams.append("sort_by", d), c === "desc" && g.searchParams.append("sort_desc", "1"), g.searchParams.append("size", String(s))), u && l !== 1 && g.searchParams.append("offset", String(u)), g.href;
|
|
515
|
+
} catch (g) {
|
|
516
|
+
return console.error("RouteList(fetcher)", g), r.value;
|
|
517
517
|
}
|
|
518
518
|
};
|
|
519
519
|
}
|
|
520
520
|
function Xr(e, t, n = "data") {
|
|
521
|
-
const r =
|
|
521
|
+
const r = m(t), { axiosInstance: a } = St(e.axiosRequestConfig), o = kn(e, r), i = F({
|
|
522
522
|
status: $e.Idle
|
|
523
523
|
});
|
|
524
524
|
return { fetcher: async (l) => {
|
|
@@ -530,12 +530,12 @@ function Xr(e, t, n = "data") {
|
|
|
530
530
|
const d = await a.get(u);
|
|
531
531
|
if (d.status >= 400)
|
|
532
532
|
throw d;
|
|
533
|
-
const c = d.data,
|
|
534
|
-
let
|
|
535
|
-
c[
|
|
536
|
-
const
|
|
537
|
-
data:
|
|
538
|
-
total:
|
|
533
|
+
const c = d.data, k = n && n.replace(/[^\w-_]/gi, "");
|
|
534
|
+
let g;
|
|
535
|
+
c[k] && Array.isArray(c[k]) ? g = c[k] : Array.isArray(c) ? g = c : g = Object.keys(c).length ? [c] : [];
|
|
536
|
+
const I = {
|
|
537
|
+
data: g,
|
|
538
|
+
total: g.length,
|
|
539
539
|
...c.offset ? {
|
|
540
540
|
pagination: {
|
|
541
541
|
offset: c.offset
|
|
@@ -544,8 +544,8 @@ function Xr(e, t, n = "data") {
|
|
|
544
544
|
};
|
|
545
545
|
return i.value = {
|
|
546
546
|
status: $e.Idle,
|
|
547
|
-
response:
|
|
548
|
-
},
|
|
547
|
+
response: I
|
|
548
|
+
}, I;
|
|
549
549
|
} catch (u) {
|
|
550
550
|
const d = {
|
|
551
551
|
data: [],
|
|
@@ -626,11 +626,11 @@ function ia(e) {
|
|
|
626
626
|
return !(i && Ht(a, i, "<") || l && Ht(a, l, ">"));
|
|
627
627
|
}
|
|
628
628
|
function la(e) {
|
|
629
|
-
const t =
|
|
629
|
+
const t = F(0), n = F(0), r = F(!1);
|
|
630
630
|
return be(e, (a) => {
|
|
631
631
|
a && !r.value && (t.value = a.offsetWidth, n.value = a.scrollWidth, r.value = !0);
|
|
632
632
|
}), {
|
|
633
|
-
isTruncated:
|
|
633
|
+
isTruncated: S(() => t.value < n.value)
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
636
|
function sa() {
|
|
@@ -656,7 +656,7 @@ const ne = {
|
|
|
656
656
|
}, ua = {
|
|
657
657
|
key: 0,
|
|
658
658
|
class: "config-card-fieldset-title"
|
|
659
|
-
}, ca = /* @__PURE__ */
|
|
659
|
+
}, ca = /* @__PURE__ */ Y({
|
|
660
660
|
__name: "JsonCardItem",
|
|
661
661
|
props: {
|
|
662
662
|
item: {
|
|
@@ -673,25 +673,25 @@ const ne = {
|
|
|
673
673
|
}
|
|
674
674
|
},
|
|
675
675
|
setup(e) {
|
|
676
|
-
const t = e, { i18n: { t: n } } = ne.useI18n(), { convertKeyToTitle: r } = ne.useStringHelpers(), a =
|
|
676
|
+
const t = e, { i18n: { t: n } } = ne.useI18n(), { convertKeyToTitle: r } = ne.useStringHelpers(), a = S(() => t.item.key ?? "json-array-item"), o = S(() => t.item.value ?? t.item), i = S(() => {
|
|
677
677
|
const s = JSON.parse(JSON.stringify(o.value));
|
|
678
678
|
return t.isArrayItem && delete s.name, s;
|
|
679
|
-
}), l =
|
|
679
|
+
}), l = S(() => {
|
|
680
680
|
var s;
|
|
681
681
|
return t.isArrayItem ? (s = o.value) != null && s.name ? r(o.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
682
682
|
});
|
|
683
|
-
return (s, u) => (
|
|
684
|
-
class:
|
|
683
|
+
return (s, u) => (y(), V(Ae(e.isArrayItem ? "fieldset" : "div"), {
|
|
684
|
+
class: _e(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
685
685
|
}, {
|
|
686
686
|
default: v(() => [
|
|
687
|
-
e.isArrayItem ? (
|
|
688
|
-
|
|
687
|
+
e.isArrayItem ? (y(), E("legend", ua, [
|
|
688
|
+
q("b", null, j(l.value), 1)
|
|
689
689
|
])) : z("", !0),
|
|
690
|
-
(
|
|
690
|
+
(y(!0), E(fe, null, pe(Object.keys(i.value), (d, c) => (y(), V(_n, {
|
|
691
691
|
key: `${a.value}-property-${c}`,
|
|
692
692
|
item: {
|
|
693
693
|
key: d,
|
|
694
|
-
label:
|
|
694
|
+
label: m(r)(d),
|
|
695
695
|
value: i.value[d]
|
|
696
696
|
}
|
|
697
697
|
}, null, 8, ["item"]))), 128))
|
|
@@ -704,7 +704,7 @@ const ne = {
|
|
|
704
704
|
for (const [r, a] of t)
|
|
705
705
|
n[r] = a;
|
|
706
706
|
return n;
|
|
707
|
-
}, In = /* @__PURE__ */ me(ca, [["__scopeId", "data-v-68ca83ec"]]), da = /* @__PURE__ */
|
|
707
|
+
}, In = /* @__PURE__ */ me(ca, [["__scopeId", "data-v-68ca83ec"]]), da = /* @__PURE__ */ Y({
|
|
708
708
|
__name: "InternalLinkItem",
|
|
709
709
|
props: {
|
|
710
710
|
item: {
|
|
@@ -716,22 +716,22 @@ const ne = {
|
|
|
716
716
|
setup(e) {
|
|
717
717
|
const { i18n: { t } } = ne.useI18n();
|
|
718
718
|
return (n, r) => {
|
|
719
|
-
const a =
|
|
720
|
-
return
|
|
719
|
+
const a = R("KButton");
|
|
720
|
+
return y(), E("div", null, [
|
|
721
721
|
T(a, {
|
|
722
722
|
appearance: "tertiary",
|
|
723
723
|
class: "navigation-button",
|
|
724
724
|
onClick: r[0] || (r[0] = (o) => n.$emit("navigation-click", e.item))
|
|
725
725
|
}, {
|
|
726
726
|
default: v(() => [
|
|
727
|
-
J(j(e.item.value ||
|
|
727
|
+
J(j(e.item.value || m(t)("baseConfigCard.commonFields.link")), 1)
|
|
728
728
|
]),
|
|
729
729
|
_: 1
|
|
730
730
|
})
|
|
731
731
|
]);
|
|
732
732
|
};
|
|
733
733
|
}
|
|
734
|
-
}), pa = /* @__PURE__ */ me(da, [["__scopeId", "data-v-c96811e5"]]), fa = /* @__PURE__ */
|
|
734
|
+
}), pa = /* @__PURE__ */ me(da, [["__scopeId", "data-v-c96811e5"]]), fa = /* @__PURE__ */ Y({
|
|
735
735
|
__name: "StatusBadge",
|
|
736
736
|
props: {
|
|
737
737
|
status: {
|
|
@@ -742,21 +742,21 @@ const ne = {
|
|
|
742
742
|
setup(e) {
|
|
743
743
|
const { i18n: { t } } = ne.useI18n();
|
|
744
744
|
return (n, r) => {
|
|
745
|
-
const a =
|
|
746
|
-
return
|
|
745
|
+
const a = R("KBadge");
|
|
746
|
+
return y(), V(a, {
|
|
747
747
|
appearance: e.status ? "success" : "neutral"
|
|
748
748
|
}, {
|
|
749
749
|
default: v(() => [
|
|
750
|
-
J(j(e.status ?
|
|
750
|
+
J(j(e.status ? m(t)("baseConfigCard.statusBadge.enabledLabel") : m(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
751
751
|
]),
|
|
752
752
|
_: 1
|
|
753
753
|
}, 8, ["appearance"]);
|
|
754
754
|
};
|
|
755
755
|
}
|
|
756
|
-
}), ma = "#0044f4", ga = "#e0e4ea",
|
|
756
|
+
}), ma = "#0044f4", ga = "#e0e4ea", ha = "#3a3f51", ya = "#afb7c5", va = "1px", ba = "20px", ka = { class: "config-card-details-row" }, Ca = ["data-testid"], wa = ["data-testid"], Ia = ["data-testid"], _a = ["data-testid"], Sa = { key: 1 }, xa = ["data-testid"], Aa = ["data-testid"], $a = ["data-testid"], Ta = ["data-testid"], ja = {
|
|
757
757
|
name: "ConfigCardItem",
|
|
758
758
|
components: { JsonCardItem: In, StatusBadge: fa, InternalLinkItem: pa }
|
|
759
|
-
},
|
|
759
|
+
}, Na = /* @__PURE__ */ Y({
|
|
760
760
|
...ja,
|
|
761
761
|
props: {
|
|
762
762
|
item: {
|
|
@@ -776,15 +776,15 @@ const ne = {
|
|
|
776
776
|
},
|
|
777
777
|
emits: ["navigation-click"],
|
|
778
778
|
setup(e, { emit: t }) {
|
|
779
|
-
gn((
|
|
780
|
-
"07753575": d.value ? "none" : `solid ${
|
|
779
|
+
gn((I) => ({
|
|
780
|
+
"07753575": d.value ? "none" : `solid ${m(va)} ${m(ga)}`,
|
|
781
781
|
"32d44ea8": u.value && l.value ? "block" : "flex",
|
|
782
782
|
"5036b738": u.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
783
783
|
"5038fd13": u.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
784
784
|
}));
|
|
785
|
-
const n = e, r = t, a = It(), { i18n: { t: o, formatUnixTimeStamp: i } } = ne.useI18n(), l =
|
|
785
|
+
const n = e, r = t, a = It(), { i18n: { t: o, formatUnixTimeStamp: i } } = ne.useI18n(), l = S(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), s = S(() => !!(n.item.tooltip || a["label-tooltip"])), u = S(() => n.item.type === Z.Json || n.item.type === Z.JsonArray), d = S(() => n.item.type === Z.JsonArray), c = S(() => {
|
|
786
786
|
switch (n.item.type) {
|
|
787
|
-
case
|
|
787
|
+
case Z.ID:
|
|
788
788
|
return {
|
|
789
789
|
tag: "KCopy",
|
|
790
790
|
attrs: {
|
|
@@ -793,7 +793,7 @@ const ne = {
|
|
|
793
793
|
text: n.item.value
|
|
794
794
|
}
|
|
795
795
|
};
|
|
796
|
-
case
|
|
796
|
+
case Z.IdArray:
|
|
797
797
|
return {
|
|
798
798
|
tag: "div",
|
|
799
799
|
additionalComponent: "KCopy",
|
|
@@ -801,7 +801,7 @@ const ne = {
|
|
|
801
801
|
"copy-tooltip": o("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
802
802
|
}
|
|
803
803
|
};
|
|
804
|
-
case
|
|
804
|
+
case Z.Redacted:
|
|
805
805
|
return {
|
|
806
806
|
tag: "KCopy",
|
|
807
807
|
attrs: {
|
|
@@ -811,7 +811,7 @@ const ne = {
|
|
|
811
811
|
text: n.item.value
|
|
812
812
|
}
|
|
813
813
|
};
|
|
814
|
-
case
|
|
814
|
+
case Z.RedactedArray:
|
|
815
815
|
return {
|
|
816
816
|
tag: "div",
|
|
817
817
|
additionalComponent: "KCopy",
|
|
@@ -820,7 +820,7 @@ const ne = {
|
|
|
820
820
|
"copy-tooltip": o("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
821
821
|
}
|
|
822
822
|
};
|
|
823
|
-
case
|
|
823
|
+
case Z.Date:
|
|
824
824
|
return {
|
|
825
825
|
tag: "div",
|
|
826
826
|
attrs: {
|
|
@@ -828,7 +828,7 @@ const ne = {
|
|
|
828
828
|
},
|
|
829
829
|
text: i(n.item.value)
|
|
830
830
|
};
|
|
831
|
-
case
|
|
831
|
+
case Z.BadgeStatus:
|
|
832
832
|
return {
|
|
833
833
|
tag: "StatusBadge",
|
|
834
834
|
attrs: {
|
|
@@ -836,28 +836,28 @@ const ne = {
|
|
|
836
836
|
status: n.item.value
|
|
837
837
|
}
|
|
838
838
|
};
|
|
839
|
-
case
|
|
839
|
+
case Z.BadgeTag:
|
|
840
840
|
return {
|
|
841
841
|
tag: "div",
|
|
842
842
|
additionalComponent: "KBadge"
|
|
843
843
|
};
|
|
844
|
-
case
|
|
844
|
+
case Z.BadgeMethod:
|
|
845
845
|
return {
|
|
846
846
|
tag: "div",
|
|
847
847
|
additionalComponent: "KMethodBadge"
|
|
848
848
|
};
|
|
849
|
-
case
|
|
849
|
+
case Z.LinkInternal:
|
|
850
850
|
return {
|
|
851
851
|
tag: "InternalLinkItem",
|
|
852
852
|
attrs: {
|
|
853
853
|
"data-testid": `${n.item.key}-internal-link`,
|
|
854
854
|
item: n.item,
|
|
855
|
-
onNavigationClick: (
|
|
856
|
-
r("navigation-click",
|
|
855
|
+
onNavigationClick: (I) => {
|
|
856
|
+
r("navigation-click", I);
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
859
|
};
|
|
860
|
-
case
|
|
860
|
+
case Z.LinkExternal:
|
|
861
861
|
return {
|
|
862
862
|
tag: "KExternalLink",
|
|
863
863
|
attrs: {
|
|
@@ -866,7 +866,7 @@ const ne = {
|
|
|
866
866
|
},
|
|
867
867
|
text: n.item.value
|
|
868
868
|
};
|
|
869
|
-
case
|
|
869
|
+
case Z.Json:
|
|
870
870
|
return {
|
|
871
871
|
tag: "JsonCardItem",
|
|
872
872
|
attrs: {
|
|
@@ -874,7 +874,7 @@ const ne = {
|
|
|
874
874
|
item: n.item
|
|
875
875
|
}
|
|
876
876
|
};
|
|
877
|
-
case
|
|
877
|
+
case Z.JsonArray:
|
|
878
878
|
return {
|
|
879
879
|
tag: "div",
|
|
880
880
|
additionalComponent: "JsonCardItem",
|
|
@@ -892,16 +892,16 @@ const ne = {
|
|
|
892
892
|
text: n.item.value
|
|
893
893
|
};
|
|
894
894
|
}
|
|
895
|
-
}),
|
|
896
|
-
return (
|
|
897
|
-
const
|
|
898
|
-
return
|
|
899
|
-
|
|
895
|
+
}), k = F(), { isTruncated: g } = ne.useTruncationDetector(k);
|
|
896
|
+
return (I, N) => {
|
|
897
|
+
const w = R("KLabel"), U = R("KBadge"), A = R("KCopy"), H = R("KTooltip");
|
|
898
|
+
return y(), E("div", ka, [
|
|
899
|
+
q("div", {
|
|
900
900
|
class: "config-card-details-label",
|
|
901
901
|
"data-testid": `${e.item.key}-label`
|
|
902
902
|
}, [
|
|
903
|
-
Q(
|
|
904
|
-
T(
|
|
903
|
+
Q(I.$slots, "label", { item: e.item }, () => [
|
|
904
|
+
T(w, { "tooltip-attributes": { maxWidth: "500px" } }, je({
|
|
905
905
|
default: v(() => [
|
|
906
906
|
J(j(e.item.label) + " ", 1)
|
|
907
907
|
]),
|
|
@@ -910,10 +910,10 @@ const ne = {
|
|
|
910
910
|
s.value ? {
|
|
911
911
|
name: "tooltip",
|
|
912
912
|
fn: v(() => [
|
|
913
|
-
|
|
913
|
+
q("div", {
|
|
914
914
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
915
915
|
}, [
|
|
916
|
-
Q(
|
|
916
|
+
Q(I.$slots, "label-tooltip", {}, () => [
|
|
917
917
|
J(j(e.item.tooltip), 1)
|
|
918
918
|
], !0)
|
|
919
919
|
], 8, wa)
|
|
@@ -923,79 +923,79 @@ const ne = {
|
|
|
923
923
|
]), 1024)
|
|
924
924
|
], !0)
|
|
925
925
|
], 8, Ca),
|
|
926
|
-
|
|
926
|
+
q("div", {
|
|
927
927
|
class: "config-card-details-value",
|
|
928
928
|
"data-testid": `${e.item.key}-property-value`
|
|
929
929
|
}, [
|
|
930
|
-
Q(
|
|
930
|
+
Q(I.$slots, e.item.key, {
|
|
931
931
|
rowValue: e.item.value
|
|
932
932
|
}, () => [
|
|
933
|
-
l.value ? (
|
|
934
|
-
(
|
|
933
|
+
l.value ? (y(), E("div", Sa, [
|
|
934
|
+
(y(), V(Ae(c.value.tag), Ar($r(c.value.attrs)), {
|
|
935
935
|
default: v(() => [
|
|
936
|
-
c.value.additionalComponent === "KBadge" ? (
|
|
936
|
+
c.value.additionalComponent === "KBadge" ? (y(), E("div", {
|
|
937
937
|
key: 0,
|
|
938
938
|
"data-testid": `${e.item.key}-badge-tags`
|
|
939
939
|
}, [
|
|
940
|
-
(
|
|
941
|
-
key: `${e.item.key}-badge-tag-${
|
|
940
|
+
(y(!0), E(fe, null, pe(e.item.value, (b, h) => (y(), V(U, {
|
|
941
|
+
key: `${e.item.key}-badge-tag-${h}`,
|
|
942
942
|
class: "config-badge",
|
|
943
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
944
|
-
tooltip:
|
|
943
|
+
"data-testid": `${e.item.key}-badge-tag-${h}`,
|
|
944
|
+
tooltip: b,
|
|
945
945
|
"truncation-tooltip": ""
|
|
946
946
|
}, {
|
|
947
947
|
default: v(() => [
|
|
948
|
-
J(j(
|
|
948
|
+
J(j(b), 1)
|
|
949
949
|
]),
|
|
950
950
|
_: 2
|
|
951
951
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
952
952
|
], 8, xa)) : z("", !0),
|
|
953
|
-
c.value.additionalComponent === "KCopy" ? (
|
|
953
|
+
c.value.additionalComponent === "KCopy" ? (y(), E("div", {
|
|
954
954
|
key: 1,
|
|
955
955
|
class: "copy-uuid-array",
|
|
956
956
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
957
957
|
}, [
|
|
958
|
-
(
|
|
959
|
-
key: `${e.item.key}-copy-uuid-${
|
|
960
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
961
|
-
text:
|
|
958
|
+
(y(!0), E(fe, null, pe(e.item.value, (b, h) => (y(), V(A, Tr(c.value.childAttrs, {
|
|
959
|
+
key: `${e.item.key}-copy-uuid-${h}`,
|
|
960
|
+
"data-testid": `${e.item.key}-copy-uuid-${h}`,
|
|
961
|
+
text: b
|
|
962
962
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
963
|
-
], 8,
|
|
963
|
+
], 8, Aa)) : c.value.additionalComponent === "KMethodBadge" ? (y(), E("div", {
|
|
964
964
|
key: 2,
|
|
965
965
|
class: "method-badge-array",
|
|
966
966
|
"data-testid": `${e.item.key}-badge-methods`
|
|
967
967
|
}, [
|
|
968
|
-
(
|
|
969
|
-
key: `${e.item.key}-badge-method-${
|
|
970
|
-
appearance: Object.values(
|
|
968
|
+
(y(!0), E(fe, null, pe(e.item.value, (b, h) => (y(), V(U, {
|
|
969
|
+
key: `${e.item.key}-badge-method-${h}`,
|
|
970
|
+
appearance: Object.values(m(jr)).includes(b.toLowerCase()) ? b.toLowerCase() : "custom",
|
|
971
971
|
class: "config-badge",
|
|
972
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
972
|
+
"data-testid": `${e.item.key}-badge-method-${h}`
|
|
973
973
|
}, {
|
|
974
974
|
default: v(() => [
|
|
975
|
-
J(j(
|
|
975
|
+
J(j(b), 1)
|
|
976
976
|
]),
|
|
977
977
|
_: 2
|
|
978
978
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
979
979
|
], 8, $a)) : z("", !0),
|
|
980
|
-
c.value.additionalComponent === "JsonCardItem" ? (
|
|
980
|
+
c.value.additionalComponent === "JsonCardItem" ? (y(), E("div", {
|
|
981
981
|
key: 3,
|
|
982
982
|
"data-testid": `${n.item.key}-json-array-content`
|
|
983
983
|
}, [
|
|
984
|
-
(
|
|
985
|
-
key: `json-array-item-${
|
|
986
|
-
index:
|
|
984
|
+
(y(!0), E(fe, null, pe(e.item.value, (b, h) => (y(), V(In, {
|
|
985
|
+
key: `json-array-item-${h}`,
|
|
986
|
+
index: h,
|
|
987
987
|
"is-array-item": "",
|
|
988
|
-
item:
|
|
988
|
+
item: b
|
|
989
989
|
}, null, 8, ["index", "item"]))), 128))
|
|
990
|
-
], 8, Ta)) : (
|
|
990
|
+
], 8, Ta)) : (y(), V(H, {
|
|
991
991
|
key: 4,
|
|
992
|
-
text:
|
|
992
|
+
text: m(g) ? e.item.value : ""
|
|
993
993
|
}, {
|
|
994
994
|
default: v(() => [
|
|
995
|
-
|
|
995
|
+
q("span", {
|
|
996
996
|
ref_key: "textContent",
|
|
997
|
-
ref:
|
|
998
|
-
class:
|
|
997
|
+
ref: k,
|
|
998
|
+
class: _e(["attrs-data-text", { truncated: e.truncated }])
|
|
999
999
|
}, j(c.value.text), 3)
|
|
1000
1000
|
]),
|
|
1001
1001
|
_: 1
|
|
@@ -1003,19 +1003,19 @@ const ne = {
|
|
|
1003
1003
|
]),
|
|
1004
1004
|
_: 1
|
|
1005
1005
|
}, 16))
|
|
1006
|
-
])) : (
|
|
1006
|
+
])) : (y(), E("div", {
|
|
1007
1007
|
key: 0,
|
|
1008
1008
|
"data-testid": `${e.item.key}-no-value`
|
|
1009
|
-
}, " – ", 8,
|
|
1009
|
+
}, " – ", 8, _a))
|
|
1010
1010
|
], !0)
|
|
1011
1011
|
], 8, Ia)
|
|
1012
1012
|
]);
|
|
1013
1013
|
};
|
|
1014
1014
|
}
|
|
1015
|
-
}),
|
|
1015
|
+
}), _n = /* @__PURE__ */ me(Na, [["__scopeId", "data-v-d056663c"]]), Oa = { class: "json-config" }, Ma = {
|
|
1016
1016
|
key: 0,
|
|
1017
1017
|
class: "json-endpoint"
|
|
1018
|
-
}, Sn = /* @__PURE__ */
|
|
1018
|
+
}, Sn = /* @__PURE__ */ Y({
|
|
1019
1019
|
__name: "JsonCodeBlock",
|
|
1020
1020
|
props: {
|
|
1021
1021
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1046,7 +1046,7 @@ const ne = {
|
|
|
1046
1046
|
gn((a) => ({
|
|
1047
1047
|
"4520e3ec": `${r.value}ch`
|
|
1048
1048
|
}));
|
|
1049
|
-
const t = e, n =
|
|
1049
|
+
const t = e, n = S(() => t.jsonRecord), r = S(() => {
|
|
1050
1050
|
var a;
|
|
1051
1051
|
if (!t.fetcherUrl)
|
|
1052
1052
|
return 0;
|
|
@@ -1054,9 +1054,9 @@ const ne = {
|
|
|
1054
1054
|
return o.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? o[o.length - 1] : o[o.length - 2]).length;
|
|
1055
1055
|
});
|
|
1056
1056
|
return (a, o) => {
|
|
1057
|
-
const i =
|
|
1058
|
-
return
|
|
1059
|
-
t.fetcherUrl ? (
|
|
1057
|
+
const i = R("KBadge"), l = R("KCodeBlock");
|
|
1058
|
+
return y(), E("div", Oa, [
|
|
1059
|
+
t.fetcherUrl ? (y(), E("div", Ma, [
|
|
1060
1060
|
T(i, {
|
|
1061
1061
|
appearance: t.requestMethod
|
|
1062
1062
|
}, {
|
|
@@ -1073,10 +1073,10 @@ const ne = {
|
|
|
1073
1073
|
theme: "dark"
|
|
1074
1074
|
}, null, 8, ["code"])
|
|
1075
1075
|
])) : z("", !0),
|
|
1076
|
-
t.jsonRecord ? (
|
|
1076
|
+
t.jsonRecord ? (y(), V(l, {
|
|
1077
1077
|
key: 1,
|
|
1078
1078
|
id: "json-codeblock",
|
|
1079
|
-
class:
|
|
1079
|
+
class: _e({ "json-content": t.fetcherUrl }),
|
|
1080
1080
|
code: JSON.stringify(n.value, null, 2),
|
|
1081
1081
|
language: "json",
|
|
1082
1082
|
theme: "dark"
|
|
@@ -1089,7 +1089,7 @@ const ne = {
|
|
|
1089
1089
|
function xn(e) {
|
|
1090
1090
|
return typeof e > "u" || e === null;
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function Ea(e) {
|
|
1093
1093
|
return typeof e == "object" && e !== null;
|
|
1094
1094
|
}
|
|
1095
1095
|
function Fa(e) {
|
|
@@ -1111,7 +1111,7 @@ function Ka(e, t) {
|
|
|
1111
1111
|
function Ba(e) {
|
|
1112
1112
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1113
1113
|
}
|
|
1114
|
-
var La = xn, Ua =
|
|
1114
|
+
var La = xn, Ua = Ea, Ra = Fa, Va = Ka, Da = Ba, Pa = qa, te = {
|
|
1115
1115
|
isNothing: La,
|
|
1116
1116
|
isObject: Ua,
|
|
1117
1117
|
toArray: Ra,
|
|
@@ -1119,19 +1119,19 @@ var La = xn, Ua = Na, Ra = Fa, Va = Ka, Da = Ba, Pa = qa, te = {
|
|
|
1119
1119
|
isNegativeZero: Da,
|
|
1120
1120
|
extend: Pa
|
|
1121
1121
|
};
|
|
1122
|
-
function
|
|
1122
|
+
function An(e, t) {
|
|
1123
1123
|
var n = "", r = e.reason || "(unknown reason)";
|
|
1124
1124
|
return e.mark ? (e.mark.name && (n += 'in "' + e.mark.name + '" '), n += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !t && e.mark.snippet && (n += `
|
|
1125
1125
|
|
|
1126
1126
|
` + e.mark.snippet), r + " " + n) : r;
|
|
1127
1127
|
}
|
|
1128
1128
|
function Ve(e, t) {
|
|
1129
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message =
|
|
1129
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = An(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1130
1130
|
}
|
|
1131
1131
|
Ve.prototype = Object.create(Error.prototype);
|
|
1132
1132
|
Ve.prototype.constructor = Ve;
|
|
1133
1133
|
Ve.prototype.toString = function(e) {
|
|
1134
|
-
return this.name + ": " +
|
|
1134
|
+
return this.name + ": " + An(this, e);
|
|
1135
1135
|
};
|
|
1136
1136
|
var se = Ve;
|
|
1137
1137
|
function pt(e, t, n, r, a) {
|
|
@@ -1240,10 +1240,10 @@ function Za() {
|
|
|
1240
1240
|
arguments[t].forEach(r);
|
|
1241
1241
|
return e;
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function yt(e) {
|
|
1244
1244
|
return this.extend(e);
|
|
1245
1245
|
}
|
|
1246
|
-
|
|
1246
|
+
yt.prototype.extend = function(e) {
|
|
1247
1247
|
var t = [], n = [];
|
|
1248
1248
|
if (e instanceof oe)
|
|
1249
1249
|
n.push(e);
|
|
@@ -1264,10 +1264,10 @@ ht.prototype.extend = function(e) {
|
|
|
1264
1264
|
if (!(a instanceof oe))
|
|
1265
1265
|
throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1266
1266
|
});
|
|
1267
|
-
var r = Object.create(
|
|
1267
|
+
var r = Object.create(yt.prototype);
|
|
1268
1268
|
return r.implicit = (this.implicit || []).concat(t), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit = Yt(r, "implicit"), r.compiledExplicit = Yt(r, "explicit"), r.compiledTypeMap = Za(r.compiledImplicit, r.compiledExplicit), r;
|
|
1269
1269
|
};
|
|
1270
|
-
var $n =
|
|
1270
|
+
var $n = yt, Tn = new oe("tag:yaml.org,2002:str", {
|
|
1271
1271
|
kind: "scalar",
|
|
1272
1272
|
construct: function(e) {
|
|
1273
1273
|
return e !== null ? e : "";
|
|
@@ -1277,7 +1277,7 @@ var $n = ht, Tn = new oe("tag:yaml.org,2002:str", {
|
|
|
1277
1277
|
construct: function(e) {
|
|
1278
1278
|
return e !== null ? e : [];
|
|
1279
1279
|
}
|
|
1280
|
-
}),
|
|
1280
|
+
}), Nn = new oe("tag:yaml.org,2002:map", {
|
|
1281
1281
|
kind: "mapping",
|
|
1282
1282
|
construct: function(e) {
|
|
1283
1283
|
return e !== null ? e : {};
|
|
@@ -1286,7 +1286,7 @@ var $n = ht, Tn = new oe("tag:yaml.org,2002:str", {
|
|
|
1286
1286
|
explicit: [
|
|
1287
1287
|
Tn,
|
|
1288
1288
|
jn,
|
|
1289
|
-
|
|
1289
|
+
Nn
|
|
1290
1290
|
]
|
|
1291
1291
|
});
|
|
1292
1292
|
function Qa(e) {
|
|
@@ -1301,7 +1301,7 @@ function Xa() {
|
|
|
1301
1301
|
function eo(e) {
|
|
1302
1302
|
return e === null;
|
|
1303
1303
|
}
|
|
1304
|
-
var
|
|
1304
|
+
var Mn = new oe("tag:yaml.org,2002:null", {
|
|
1305
1305
|
kind: "scalar",
|
|
1306
1306
|
resolve: Qa,
|
|
1307
1307
|
construct: Xa,
|
|
@@ -1337,7 +1337,7 @@ function no(e) {
|
|
|
1337
1337
|
function ro(e) {
|
|
1338
1338
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1339
1339
|
}
|
|
1340
|
-
var
|
|
1340
|
+
var En = new oe("tag:yaml.org,2002:bool", {
|
|
1341
1341
|
kind: "scalar",
|
|
1342
1342
|
resolve: to,
|
|
1343
1343
|
construct: no,
|
|
@@ -1502,20 +1502,20 @@ function go(e, t) {
|
|
|
1502
1502
|
return "-0.0";
|
|
1503
1503
|
return n = e.toString(10), mo.test(n) ? n.replace("e", ".e") : n;
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1505
|
+
function ho(e) {
|
|
1506
1506
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || te.isNegativeZero(e));
|
|
1507
1507
|
}
|
|
1508
1508
|
var qn = new oe("tag:yaml.org,2002:float", {
|
|
1509
1509
|
kind: "scalar",
|
|
1510
1510
|
resolve: po,
|
|
1511
1511
|
construct: fo,
|
|
1512
|
-
predicate:
|
|
1512
|
+
predicate: ho,
|
|
1513
1513
|
represent: go,
|
|
1514
1514
|
defaultStyle: "lowercase"
|
|
1515
1515
|
}), Kn = On.extend({
|
|
1516
1516
|
implicit: [
|
|
1517
|
+
Mn,
|
|
1517
1518
|
En,
|
|
1518
|
-
Nn,
|
|
1519
1519
|
Fn,
|
|
1520
1520
|
qn
|
|
1521
1521
|
]
|
|
@@ -1524,11 +1524,11 @@ var qn = new oe("tag:yaml.org,2002:float", {
|
|
|
1524
1524
|
), Un = new RegExp(
|
|
1525
1525
|
"^([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]))?))?$"
|
|
1526
1526
|
);
|
|
1527
|
-
function
|
|
1527
|
+
function yo(e) {
|
|
1528
1528
|
return e === null ? !1 : Ln.exec(e) !== null || Un.exec(e) !== null;
|
|
1529
1529
|
}
|
|
1530
1530
|
function vo(e) {
|
|
1531
|
-
var t, n, r, a, o, i, l, s = 0, u = null, d, c,
|
|
1531
|
+
var t, n, r, a, o, i, l, s = 0, u = null, d, c, k;
|
|
1532
1532
|
if (t = Ln.exec(e), t === null && (t = Un.exec(e)), t === null)
|
|
1533
1533
|
throw new Error("Date resolve error");
|
|
1534
1534
|
if (n = +t[1], r = +t[2] - 1, a = +t[3], !t[4])
|
|
@@ -1538,14 +1538,14 @@ function vo(e) {
|
|
|
1538
1538
|
s += "0";
|
|
1539
1539
|
s = +s;
|
|
1540
1540
|
}
|
|
1541
|
-
return t[9] && (d = +t[10], c = +(t[11] || 0), u = (d * 60 + c) * 6e4, t[9] === "-" && (u = -u)),
|
|
1541
|
+
return t[9] && (d = +t[10], c = +(t[11] || 0), u = (d * 60 + c) * 6e4, t[9] === "-" && (u = -u)), k = new Date(Date.UTC(n, r, a, o, i, l, s)), u && k.setTime(k.getTime() - u), k;
|
|
1542
1542
|
}
|
|
1543
1543
|
function bo(e) {
|
|
1544
1544
|
return e.toISOString();
|
|
1545
1545
|
}
|
|
1546
1546
|
var Rn = new oe("tag:yaml.org,2002:timestamp", {
|
|
1547
1547
|
kind: "scalar",
|
|
1548
|
-
resolve:
|
|
1548
|
+
resolve: yo,
|
|
1549
1549
|
construct: vo,
|
|
1550
1550
|
instanceOf: Date,
|
|
1551
1551
|
represent: bo
|
|
@@ -1582,17 +1582,17 @@ function Io(e) {
|
|
|
1582
1582
|
r % 3 === 0 && r && (t += i[n >> 18 & 63], t += i[n >> 12 & 63], t += i[n >> 6 & 63], t += i[n & 63]), n = (n << 8) + e[r];
|
|
1583
1583
|
return a = o % 3, a === 0 ? (t += i[n >> 18 & 63], t += i[n >> 12 & 63], t += i[n >> 6 & 63], t += i[n & 63]) : a === 2 ? (t += i[n >> 10 & 63], t += i[n >> 4 & 63], t += i[n << 2 & 63], t += i[64]) : a === 1 && (t += i[n >> 2 & 63], t += i[n << 4 & 63], t += i[64], t += i[64]), t;
|
|
1584
1584
|
}
|
|
1585
|
-
function
|
|
1585
|
+
function _o(e) {
|
|
1586
1586
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1587
1587
|
}
|
|
1588
1588
|
var Dn = new oe("tag:yaml.org,2002:binary", {
|
|
1589
1589
|
kind: "scalar",
|
|
1590
1590
|
resolve: Co,
|
|
1591
1591
|
construct: wo,
|
|
1592
|
-
predicate:
|
|
1592
|
+
predicate: _o,
|
|
1593
1593
|
represent: Io
|
|
1594
1594
|
}), So = Object.prototype.hasOwnProperty, xo = Object.prototype.toString;
|
|
1595
|
-
function
|
|
1595
|
+
function Ao(e) {
|
|
1596
1596
|
if (e === null)
|
|
1597
1597
|
return !0;
|
|
1598
1598
|
var t = [], n, r, a, o, i, l = e;
|
|
@@ -1619,7 +1619,7 @@ function $o(e) {
|
|
|
1619
1619
|
}
|
|
1620
1620
|
var Pn = new oe("tag:yaml.org,2002:omap", {
|
|
1621
1621
|
kind: "sequence",
|
|
1622
|
-
resolve:
|
|
1622
|
+
resolve: Ao,
|
|
1623
1623
|
construct: $o
|
|
1624
1624
|
}), To = Object.prototype.toString;
|
|
1625
1625
|
function jo(e) {
|
|
@@ -1633,7 +1633,7 @@ function jo(e) {
|
|
|
1633
1633
|
}
|
|
1634
1634
|
return !0;
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1636
|
+
function No(e) {
|
|
1637
1637
|
if (e === null)
|
|
1638
1638
|
return [];
|
|
1639
1639
|
var t, n, r, a, o, i = e;
|
|
@@ -1644,9 +1644,9 @@ function Mo(e) {
|
|
|
1644
1644
|
var Gn = new oe("tag:yaml.org,2002:pairs", {
|
|
1645
1645
|
kind: "sequence",
|
|
1646
1646
|
resolve: jo,
|
|
1647
|
-
construct:
|
|
1647
|
+
construct: No
|
|
1648
1648
|
}), Oo = Object.prototype.hasOwnProperty;
|
|
1649
|
-
function
|
|
1649
|
+
function Mo(e) {
|
|
1650
1650
|
if (e === null)
|
|
1651
1651
|
return !0;
|
|
1652
1652
|
var t, n = e;
|
|
@@ -1655,14 +1655,14 @@ function Eo(e) {
|
|
|
1655
1655
|
return !1;
|
|
1656
1656
|
return !0;
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1658
|
+
function Eo(e) {
|
|
1659
1659
|
return e !== null ? e : {};
|
|
1660
1660
|
}
|
|
1661
1661
|
var zn = new oe("tag:yaml.org,2002:set", {
|
|
1662
1662
|
kind: "mapping",
|
|
1663
|
-
resolve:
|
|
1664
|
-
construct:
|
|
1665
|
-
}),
|
|
1663
|
+
resolve: Mo,
|
|
1664
|
+
construct: Eo
|
|
1665
|
+
}), At = Bn.extend({
|
|
1666
1666
|
implicit: [
|
|
1667
1667
|
Rn,
|
|
1668
1668
|
Vn
|
|
@@ -1677,7 +1677,7 @@ var zn = new oe("tag:yaml.org,2002:set", {
|
|
|
1677
1677
|
function Qt(e) {
|
|
1678
1678
|
return Object.prototype.toString.call(e);
|
|
1679
1679
|
}
|
|
1680
|
-
function
|
|
1680
|
+
function ye(e) {
|
|
1681
1681
|
return e === 10 || e === 13;
|
|
1682
1682
|
}
|
|
1683
1683
|
function Te(e) {
|
|
@@ -1713,7 +1713,7 @@ var Zn = new Array(256), Qn = new Array(256);
|
|
|
1713
1713
|
for (var Fe = 0; Fe < 256; Fe++)
|
|
1714
1714
|
Zn[Fe] = Xt(Fe) ? 1 : 0, Qn[Fe] = Xt(Fe);
|
|
1715
1715
|
function Do(e, t) {
|
|
1716
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema ||
|
|
1716
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || At, 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 = [];
|
|
1717
1717
|
}
|
|
1718
1718
|
function Xn(e, t) {
|
|
1719
1719
|
var n = {
|
|
@@ -1726,7 +1726,7 @@ function Xn(e, t) {
|
|
|
1726
1726
|
};
|
|
1727
1727
|
return n.snippet = za(n), new se(t, n);
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function M(e, t) {
|
|
1730
1730
|
throw Xn(e, t);
|
|
1731
1731
|
}
|
|
1732
1732
|
function Ze(e, t) {
|
|
@@ -1735,15 +1735,15 @@ function Ze(e, t) {
|
|
|
1735
1735
|
var en = {
|
|
1736
1736
|
YAML: function(e, t, n) {
|
|
1737
1737
|
var r, a, o;
|
|
1738
|
-
e.version !== null &&
|
|
1738
|
+
e.version !== null && M(e, "duplication of %YAML directive"), n.length !== 1 && M(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), r === null && M(e, "ill-formed argument of the YAML directive"), a = parseInt(r[1], 10), o = parseInt(r[2], 10), a !== 1 && M(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Ze(e, "unsupported YAML version of the document");
|
|
1739
1739
|
},
|
|
1740
1740
|
TAG: function(e, t, n) {
|
|
1741
1741
|
var r, a;
|
|
1742
|
-
n.length !== 2 &&
|
|
1742
|
+
n.length !== 2 && M(e, "TAG directive accepts exactly two arguments"), r = n[0], a = n[1], Wn.test(r) || M(e, "ill-formed tag handle (first argument) of the TAG directive"), Se.call(e.tagMap, r) && M(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Yn.test(a) || M(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1743
1743
|
try {
|
|
1744
1744
|
a = decodeURIComponent(a);
|
|
1745
1745
|
} catch {
|
|
1746
|
-
|
|
1746
|
+
M(e, "tag prefix is malformed: " + a);
|
|
1747
1747
|
}
|
|
1748
1748
|
e.tagMap[r] = a;
|
|
1749
1749
|
}
|
|
@@ -1753,22 +1753,22 @@ function Ie(e, t, n, r) {
|
|
|
1753
1753
|
if (t < n) {
|
|
1754
1754
|
if (l = e.input.slice(t, n), r)
|
|
1755
1755
|
for (a = 0, o = l.length; a < o; a += 1)
|
|
1756
|
-
i = l.charCodeAt(a), i === 9 || 32 <= i && i <= 1114111 ||
|
|
1756
|
+
i = l.charCodeAt(a), i === 9 || 32 <= i && i <= 1114111 || M(e, "expected valid JSON character");
|
|
1757
1757
|
else
|
|
1758
|
-
qo.test(l) &&
|
|
1758
|
+
qo.test(l) && M(e, "the stream contains non-printable characters");
|
|
1759
1759
|
e.result += l;
|
|
1760
1760
|
}
|
|
1761
1761
|
}
|
|
1762
1762
|
function tn(e, t, n, r) {
|
|
1763
1763
|
var a, o, i, l;
|
|
1764
|
-
for (te.isObject(n) ||
|
|
1764
|
+
for (te.isObject(n) || M(e, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(n), i = 0, l = a.length; i < l; i += 1)
|
|
1765
1765
|
o = a[i], Se.call(t, o) || (t[o] = n[o], r[o] = !0);
|
|
1766
1766
|
}
|
|
1767
1767
|
function Be(e, t, n, r, a, o, i, l, s) {
|
|
1768
1768
|
var u, d;
|
|
1769
1769
|
if (Array.isArray(a))
|
|
1770
1770
|
for (a = Array.prototype.slice.call(a), u = 0, d = a.length; u < d; u += 1)
|
|
1771
|
-
Array.isArray(a[u]) &&
|
|
1771
|
+
Array.isArray(a[u]) && M(e, "nested arrays are not supported inside keys"), typeof a == "object" && Qt(a[u]) === "[object Object]" && (a[u] = "[object Object]");
|
|
1772
1772
|
if (typeof a == "object" && Qt(a) === "[object Object]" && (a = "[object Object]"), a = String(a), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1773
1773
|
if (Array.isArray(o))
|
|
1774
1774
|
for (u = 0, d = o.length; u < d; u += 1)
|
|
@@ -1776,7 +1776,7 @@ function Be(e, t, n, r, a, o, i, l, s) {
|
|
|
1776
1776
|
else
|
|
1777
1777
|
tn(e, t, o, n);
|
|
1778
1778
|
else
|
|
1779
|
-
!e.json && !Se.call(n, a) && Se.call(t, a) && (e.line = i || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position,
|
|
1779
|
+
!e.json && !Se.call(n, a) && Se.call(t, a) && (e.line = i || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, M(e, "duplicated mapping key")), a === "__proto__" ? Object.defineProperty(t, a, {
|
|
1780
1780
|
configurable: !0,
|
|
1781
1781
|
enumerable: !0,
|
|
1782
1782
|
writable: !0,
|
|
@@ -1786,7 +1786,7 @@ function Be(e, t, n, r, a, o, i, l, s) {
|
|
|
1786
1786
|
}
|
|
1787
1787
|
function $t(e) {
|
|
1788
1788
|
var t;
|
|
1789
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1789
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : M(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1790
1790
|
}
|
|
1791
1791
|
function ee(e, t, n) {
|
|
1792
1792
|
for (var r = 0, a = e.input.charCodeAt(e.position); a !== 0; ) {
|
|
@@ -1796,7 +1796,7 @@ function ee(e, t, n) {
|
|
|
1796
1796
|
do
|
|
1797
1797
|
a = e.input.charCodeAt(++e.position);
|
|
1798
1798
|
while (a !== 10 && a !== 13 && a !== 0);
|
|
1799
|
-
if (
|
|
1799
|
+
if (ye(a))
|
|
1800
1800
|
for ($t(e), a = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; a === 32; )
|
|
1801
1801
|
e.lineIndent++, a = e.input.charCodeAt(++e.position);
|
|
1802
1802
|
else
|
|
@@ -1813,31 +1813,31 @@ function Tt(e, t) {
|
|
|
1813
1813
|
`, t - 1));
|
|
1814
1814
|
}
|
|
1815
1815
|
function Po(e, t, n) {
|
|
1816
|
-
var r, a, o, i, l, s, u, d, c = e.kind,
|
|
1817
|
-
if (
|
|
1816
|
+
var r, a, o, i, l, s, u, d, c = e.kind, k = e.result, g;
|
|
1817
|
+
if (g = e.input.charCodeAt(e.position), de(g) || Ke(g) || g === 35 || g === 38 || g === 42 || g === 33 || g === 124 || g === 62 || g === 39 || g === 34 || g === 37 || g === 64 || g === 96 || (g === 63 || g === 45) && (a = e.input.charCodeAt(e.position + 1), de(a) || n && Ke(a)))
|
|
1818
1818
|
return !1;
|
|
1819
|
-
for (e.kind = "scalar", e.result = "", o = i = e.position, l = !1;
|
|
1820
|
-
if (
|
|
1819
|
+
for (e.kind = "scalar", e.result = "", o = i = e.position, l = !1; g !== 0; ) {
|
|
1820
|
+
if (g === 58) {
|
|
1821
1821
|
if (a = e.input.charCodeAt(e.position + 1), de(a) || n && Ke(a))
|
|
1822
1822
|
break;
|
|
1823
|
-
} else if (
|
|
1823
|
+
} else if (g === 35) {
|
|
1824
1824
|
if (r = e.input.charCodeAt(e.position - 1), de(r))
|
|
1825
1825
|
break;
|
|
1826
1826
|
} else {
|
|
1827
|
-
if (e.position === e.lineStart && ot(e) || n && Ke(
|
|
1827
|
+
if (e.position === e.lineStart && ot(e) || n && Ke(g))
|
|
1828
1828
|
break;
|
|
1829
|
-
if (
|
|
1829
|
+
if (ye(g))
|
|
1830
1830
|
if (s = e.line, u = e.lineStart, d = e.lineIndent, ee(e, !1, -1), e.lineIndent >= t) {
|
|
1831
|
-
l = !0,
|
|
1831
|
+
l = !0, g = e.input.charCodeAt(e.position);
|
|
1832
1832
|
continue;
|
|
1833
1833
|
} else {
|
|
1834
1834
|
e.position = i, e.line = s, e.lineStart = u, e.lineIndent = d;
|
|
1835
1835
|
break;
|
|
1836
1836
|
}
|
|
1837
1837
|
}
|
|
1838
|
-
l && (Ie(e, o, i, !1), Tt(e, e.line - s), o = i = e.position, l = !1), Te(
|
|
1838
|
+
l && (Ie(e, o, i, !1), Tt(e, e.line - s), o = i = e.position, l = !1), Te(g) || (i = e.position + 1), g = e.input.charCodeAt(++e.position);
|
|
1839
1839
|
}
|
|
1840
|
-
return Ie(e, o, i, !1), e.result ? !0 : (e.kind = c, e.result =
|
|
1840
|
+
return Ie(e, o, i, !1), e.result ? !0 : (e.kind = c, e.result = k, !1);
|
|
1841
1841
|
}
|
|
1842
1842
|
function Go(e, t) {
|
|
1843
1843
|
var n, r, a;
|
|
@@ -1850,8 +1850,8 @@ function Go(e, t) {
|
|
|
1850
1850
|
else
|
|
1851
1851
|
return !0;
|
|
1852
1852
|
else
|
|
1853
|
-
|
|
1854
|
-
|
|
1853
|
+
ye(n) ? (Ie(e, r, a, !0), Tt(e, ee(e, !1, t)), r = a = e.position) : e.position === e.lineStart && ot(e) ? M(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
|
|
1854
|
+
M(e, "unexpected end of the stream within a single quoted scalar");
|
|
1855
1855
|
}
|
|
1856
1856
|
function zo(e, t) {
|
|
1857
1857
|
var n, r, a, o, i, l;
|
|
@@ -1861,36 +1861,36 @@ function zo(e, t) {
|
|
|
1861
1861
|
if (l === 34)
|
|
1862
1862
|
return Ie(e, n, e.position, !0), e.position++, !0;
|
|
1863
1863
|
if (l === 92) {
|
|
1864
|
-
if (Ie(e, n, e.position, !0), l = e.input.charCodeAt(++e.position),
|
|
1864
|
+
if (Ie(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), ye(l))
|
|
1865
1865
|
ee(e, !1, t);
|
|
1866
1866
|
else if (l < 256 && Zn[l])
|
|
1867
1867
|
e.result += Qn[l], e.position++;
|
|
1868
1868
|
else if ((i = Uo(l)) > 0) {
|
|
1869
1869
|
for (a = i, o = 0; a > 0; a--)
|
|
1870
|
-
l = e.input.charCodeAt(++e.position), (i = Lo(l)) >= 0 ? o = (o << 4) + i :
|
|
1870
|
+
l = e.input.charCodeAt(++e.position), (i = Lo(l)) >= 0 ? o = (o << 4) + i : M(e, "expected hexadecimal character");
|
|
1871
1871
|
e.result += Vo(o), e.position++;
|
|
1872
1872
|
} else
|
|
1873
|
-
|
|
1873
|
+
M(e, "unknown escape sequence");
|
|
1874
1874
|
n = r = e.position;
|
|
1875
1875
|
} else
|
|
1876
|
-
|
|
1876
|
+
ye(l) ? (Ie(e, n, r, !0), Tt(e, ee(e, !1, t)), n = r = e.position) : e.position === e.lineStart && ot(e) ? M(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1877
1877
|
}
|
|
1878
|
-
|
|
1878
|
+
M(e, "unexpected end of the stream within a double quoted scalar");
|
|
1879
1879
|
}
|
|
1880
1880
|
function Jo(e, t) {
|
|
1881
|
-
var n = !0, r, a, o, i = e.tag, l, s = e.anchor, u, d, c,
|
|
1882
|
-
if (
|
|
1883
|
-
d = 93,
|
|
1884
|
-
else if (
|
|
1885
|
-
d = 125,
|
|
1881
|
+
var n = !0, r, a, o, i = e.tag, l, s = e.anchor, u, d, c, k, g, I = /* @__PURE__ */ Object.create(null), N, w, U, A;
|
|
1882
|
+
if (A = e.input.charCodeAt(e.position), A === 91)
|
|
1883
|
+
d = 93, g = !1, l = [];
|
|
1884
|
+
else if (A === 123)
|
|
1885
|
+
d = 125, g = !0, l = {};
|
|
1886
1886
|
else
|
|
1887
1887
|
return !1;
|
|
1888
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1889
|
-
if (ee(e, !0, t),
|
|
1890
|
-
return e.position++, e.tag = i, e.anchor = s, e.kind =
|
|
1891
|
-
n ?
|
|
1888
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), A = e.input.charCodeAt(++e.position); A !== 0; ) {
|
|
1889
|
+
if (ee(e, !0, t), A = e.input.charCodeAt(e.position), A === d)
|
|
1890
|
+
return e.position++, e.tag = i, e.anchor = s, e.kind = g ? "mapping" : "sequence", e.result = l, !0;
|
|
1891
|
+
n ? A === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), w = N = U = null, c = k = !1, A === 63 && (u = e.input.charCodeAt(e.position + 1), de(u) && (c = k = !0, e.position++, ee(e, !0, t))), r = e.line, a = e.lineStart, o = e.position, Le(e, t, We, !1, !0), w = e.tag, N = e.result, ee(e, !0, t), A = e.input.charCodeAt(e.position), (k || e.line === r) && A === 58 && (c = !0, A = e.input.charCodeAt(++e.position), ee(e, !0, t), Le(e, t, We, !1, !0), U = e.result), g ? Be(e, l, I, w, N, U, r, a, o) : c ? l.push(Be(e, null, I, w, N, U, r, a, o)) : l.push(N), ee(e, !0, t), A = e.input.charCodeAt(e.position), A === 44 ? (n = !0, A = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1892
1892
|
}
|
|
1893
|
-
|
|
1893
|
+
M(e, "unexpected end of the stream within a flow collection");
|
|
1894
1894
|
}
|
|
1895
1895
|
function Ho(e, t) {
|
|
1896
1896
|
var n, r, a = mt, o = !1, i = !1, l = t, s = 0, u = !1, d, c;
|
|
@@ -1902,9 +1902,9 @@ function Ho(e, t) {
|
|
|
1902
1902
|
return !1;
|
|
1903
1903
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
1904
1904
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
1905
|
-
mt === a ? a = c === 43 ? Zt : Fo :
|
|
1905
|
+
mt === a ? a = c === 43 ? Zt : Fo : M(e, "repeat of a chomping mode identifier");
|
|
1906
1906
|
else if ((d = Ro(c)) >= 0)
|
|
1907
|
-
d === 0 ?
|
|
1907
|
+
d === 0 ? M(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? M(e, "repeat of an indentation width identifier") : (l = t + d - 1, i = !0);
|
|
1908
1908
|
else
|
|
1909
1909
|
break;
|
|
1910
1910
|
if (Te(c)) {
|
|
@@ -1914,12 +1914,12 @@ function Ho(e, t) {
|
|
|
1914
1914
|
if (c === 35)
|
|
1915
1915
|
do
|
|
1916
1916
|
c = e.input.charCodeAt(++e.position);
|
|
1917
|
-
while (!
|
|
1917
|
+
while (!ye(c) && c !== 0);
|
|
1918
1918
|
}
|
|
1919
1919
|
for (; c !== 0; ) {
|
|
1920
1920
|
for ($t(e), e.lineIndent = 0, c = e.input.charCodeAt(e.position); (!i || e.lineIndent < l) && c === 32; )
|
|
1921
1921
|
e.lineIndent++, c = e.input.charCodeAt(++e.position);
|
|
1922
|
-
if (!i && e.lineIndent > l && (l = e.lineIndent),
|
|
1922
|
+
if (!i && e.lineIndent > l && (l = e.lineIndent), ye(c)) {
|
|
1923
1923
|
s++;
|
|
1924
1924
|
continue;
|
|
1925
1925
|
}
|
|
@@ -1933,7 +1933,7 @@ function Ho(e, t) {
|
|
|
1933
1933
|
`, o ? 1 + s : s)) : u ? (u = !1, e.result += te.repeat(`
|
|
1934
1934
|
`, s + 1)) : s === 0 ? o && (e.result += " ") : e.result += te.repeat(`
|
|
1935
1935
|
`, s) : e.result += te.repeat(`
|
|
1936
|
-
`, o ? 1 + s : s), o = !0, i = !0, s = 0, n = e.position; !
|
|
1936
|
+
`, o ? 1 + s : s), o = !0, i = !0, s = 0, n = e.position; !ye(c) && c !== 0; )
|
|
1937
1937
|
c = e.input.charCodeAt(++e.position);
|
|
1938
1938
|
Ie(e, n, e.position, !1);
|
|
1939
1939
|
}
|
|
@@ -1943,78 +1943,78 @@ function nn(e, t) {
|
|
|
1943
1943
|
var n, r = e.tag, a = e.anchor, o = [], i, l = !1, s;
|
|
1944
1944
|
if (e.firstTabInLine !== -1)
|
|
1945
1945
|
return !1;
|
|
1946
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1946
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), !(s !== 45 || (i = e.input.charCodeAt(e.position + 1), !de(i)))); ) {
|
|
1947
1947
|
if (l = !0, e.position++, ee(e, !0, -1) && e.lineIndent <= t) {
|
|
1948
1948
|
o.push(null), s = e.input.charCodeAt(e.position);
|
|
1949
1949
|
continue;
|
|
1950
1950
|
}
|
|
1951
1951
|
if (n = e.line, Le(e, t, Hn, !1, !0), o.push(e.result), ee(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
1952
|
-
|
|
1952
|
+
M(e, "bad indentation of a sequence entry");
|
|
1953
1953
|
else if (e.lineIndent < t)
|
|
1954
1954
|
break;
|
|
1955
1955
|
}
|
|
1956
1956
|
return l ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1957
1957
|
}
|
|
1958
1958
|
function Wo(e, t, n) {
|
|
1959
|
-
var r, a, o, i, l, s, u = e.tag, d = e.anchor, c = {},
|
|
1959
|
+
var r, a, o, i, l, s, u = e.tag, d = e.anchor, c = {}, k = /* @__PURE__ */ Object.create(null), g = null, I = null, N = null, w = !1, U = !1, A;
|
|
1960
1960
|
if (e.firstTabInLine !== -1)
|
|
1961
1961
|
return !1;
|
|
1962
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = c),
|
|
1963
|
-
if (!
|
|
1964
|
-
|
|
1962
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), A = e.input.charCodeAt(e.position); A !== 0; ) {
|
|
1963
|
+
if (!w && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (A === 63 || A === 58) && de(r))
|
|
1964
|
+
A === 63 ? (w && (Be(e, c, k, g, I, null, i, l, s), g = I = N = null), U = !0, w = !0, a = !0) : w ? (w = !1, a = !0) : M(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, A = r;
|
|
1965
1965
|
else {
|
|
1966
1966
|
if (i = e.line, l = e.lineStart, s = e.position, !Le(e, n, Jn, !1, !0))
|
|
1967
1967
|
break;
|
|
1968
1968
|
if (e.line === o) {
|
|
1969
|
-
for (
|
|
1970
|
-
|
|
1971
|
-
if (
|
|
1972
|
-
|
|
1973
|
-
else if (
|
|
1974
|
-
|
|
1969
|
+
for (A = e.input.charCodeAt(e.position); Te(A); )
|
|
1970
|
+
A = e.input.charCodeAt(++e.position);
|
|
1971
|
+
if (A === 58)
|
|
1972
|
+
A = e.input.charCodeAt(++e.position), de(A) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), w && (Be(e, c, k, g, I, null, i, l, s), g = I = N = null), U = !0, w = !1, a = !1, g = e.tag, I = e.result;
|
|
1973
|
+
else if (U)
|
|
1974
|
+
M(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1975
1975
|
else
|
|
1976
1976
|
return e.tag = u, e.anchor = d, !0;
|
|
1977
|
-
} else if (
|
|
1978
|
-
|
|
1977
|
+
} else if (U)
|
|
1978
|
+
M(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1979
1979
|
else
|
|
1980
1980
|
return e.tag = u, e.anchor = d, !0;
|
|
1981
1981
|
}
|
|
1982
|
-
if ((e.line === o || e.lineIndent > t) && (
|
|
1983
|
-
|
|
1982
|
+
if ((e.line === o || e.lineIndent > t) && (w && (i = e.line, l = e.lineStart, s = e.position), Le(e, t, Ye, !0, a) && (w ? I = e.result : N = e.result), w || (Be(e, c, k, g, I, N, i, l, s), g = I = N = null), ee(e, !0, -1), A = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && A !== 0)
|
|
1983
|
+
M(e, "bad indentation of a mapping entry");
|
|
1984
1984
|
else if (e.lineIndent < t)
|
|
1985
1985
|
break;
|
|
1986
1986
|
}
|
|
1987
|
-
return
|
|
1987
|
+
return w && Be(e, c, k, g, I, null, i, l, s), U && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), U;
|
|
1988
1988
|
}
|
|
1989
1989
|
function Yo(e) {
|
|
1990
1990
|
var t, n = !1, r = !1, a, o, i;
|
|
1991
1991
|
if (i = e.input.charCodeAt(e.position), i !== 33)
|
|
1992
1992
|
return !1;
|
|
1993
|
-
if (e.tag !== null &&
|
|
1993
|
+
if (e.tag !== null && M(e, "duplication of a tag property"), i = e.input.charCodeAt(++e.position), i === 60 ? (n = !0, i = e.input.charCodeAt(++e.position)) : i === 33 ? (r = !0, a = "!!", i = e.input.charCodeAt(++e.position)) : a = "!", t = e.position, n) {
|
|
1994
1994
|
do
|
|
1995
1995
|
i = e.input.charCodeAt(++e.position);
|
|
1996
1996
|
while (i !== 0 && i !== 62);
|
|
1997
|
-
e.position < e.length ? (o = e.input.slice(t, e.position), i = e.input.charCodeAt(++e.position)) :
|
|
1997
|
+
e.position < e.length ? (o = e.input.slice(t, e.position), i = e.input.charCodeAt(++e.position)) : M(e, "unexpected end of the stream within a verbatim tag");
|
|
1998
1998
|
} else {
|
|
1999
1999
|
for (; i !== 0 && !de(i); )
|
|
2000
|
-
i === 33 && (r ?
|
|
2001
|
-
o = e.input.slice(t, e.position), Bo.test(o) &&
|
|
2000
|
+
i === 33 && (r ? M(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(t - 1, e.position + 1), Wn.test(a) || M(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), i = e.input.charCodeAt(++e.position);
|
|
2001
|
+
o = e.input.slice(t, e.position), Bo.test(o) && M(e, "tag suffix cannot contain flow indicator characters");
|
|
2002
2002
|
}
|
|
2003
|
-
o && !Yn.test(o) &&
|
|
2003
|
+
o && !Yn.test(o) && M(e, "tag name cannot contain such characters: " + o);
|
|
2004
2004
|
try {
|
|
2005
2005
|
o = decodeURIComponent(o);
|
|
2006
2006
|
} catch {
|
|
2007
|
-
|
|
2007
|
+
M(e, "tag name is malformed: " + o);
|
|
2008
2008
|
}
|
|
2009
|
-
return n ? e.tag = o : Se.call(e.tagMap, a) ? e.tag = e.tagMap[a] + o : a === "!" ? e.tag = "!" + o : a === "!!" ? e.tag = "tag:yaml.org,2002:" + o :
|
|
2009
|
+
return n ? e.tag = o : Se.call(e.tagMap, a) ? e.tag = e.tagMap[a] + o : a === "!" ? e.tag = "!" + o : a === "!!" ? e.tag = "tag:yaml.org,2002:" + o : M(e, 'undeclared tag handle "' + a + '"'), !0;
|
|
2010
2010
|
}
|
|
2011
2011
|
function Zo(e) {
|
|
2012
2012
|
var t, n;
|
|
2013
2013
|
if (n = e.input.charCodeAt(e.position), n !== 38)
|
|
2014
2014
|
return !1;
|
|
2015
|
-
for (e.anchor !== null &&
|
|
2015
|
+
for (e.anchor !== null && M(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !de(n) && !Ke(n); )
|
|
2016
2016
|
n = e.input.charCodeAt(++e.position);
|
|
2017
|
-
return e.position === t &&
|
|
2017
|
+
return e.position === t && M(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
2018
2018
|
}
|
|
2019
2019
|
function Qo(e) {
|
|
2020
2020
|
var t, n, r;
|
|
@@ -2022,31 +2022,31 @@ function Qo(e) {
|
|
|
2022
2022
|
return !1;
|
|
2023
2023
|
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !de(r) && !Ke(r); )
|
|
2024
2024
|
r = e.input.charCodeAt(++e.position);
|
|
2025
|
-
return e.position === t &&
|
|
2025
|
+
return e.position === t && M(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), Se.call(e.anchorMap, n) || M(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], ee(e, !0, -1), !0;
|
|
2026
2026
|
}
|
|
2027
2027
|
function Le(e, t, n, r, a) {
|
|
2028
|
-
var o, i, l, s = 1, u = !1, d = !1, c,
|
|
2028
|
+
var o, i, l, s = 1, u = !1, d = !1, c, k, g, I, N, w;
|
|
2029
2029
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = i = l = Ye === n || Hn === n, r && ee(e, !0, -1) && (u = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
2030
2030
|
for (; Yo(e) || Zo(e); )
|
|
2031
2031
|
ee(e, !0, -1) ? (u = !0, l = o, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
2032
|
-
if (l && (l = u || a), (s === 1 || Ye === n) && (We === n || Jn === n ?
|
|
2032
|
+
if (l && (l = u || a), (s === 1 || Ye === n) && (We === n || Jn === n ? N = t : N = t + 1, w = e.position - e.lineStart, s === 1 ? l && (nn(e, w) || Wo(e, w, N)) || Jo(e, N) ? d = !0 : (i && Ho(e, N) || Go(e, N) || zo(e, N) ? d = !0 : Qo(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && M(e, "alias node should not have any properties")) : Po(e, N, We === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && nn(e, w))), e.tag === null)
|
|
2033
2033
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2034
2034
|
else if (e.tag === "?") {
|
|
2035
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2036
|
-
if (
|
|
2037
|
-
e.result =
|
|
2035
|
+
for (e.result !== null && e.kind !== "scalar" && M(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, k = e.implicitTypes.length; c < k; c += 1)
|
|
2036
|
+
if (I = e.implicitTypes[c], I.resolve(e.result)) {
|
|
2037
|
+
e.result = I.construct(e.result), e.tag = I.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2038
2038
|
break;
|
|
2039
2039
|
}
|
|
2040
2040
|
} else if (e.tag !== "!") {
|
|
2041
2041
|
if (Se.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2042
|
-
|
|
2042
|
+
I = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2043
2043
|
else
|
|
2044
|
-
for (
|
|
2045
|
-
if (e.tag.slice(0,
|
|
2046
|
-
|
|
2044
|
+
for (I = null, g = e.typeMap.multi[e.kind || "fallback"], c = 0, k = g.length; c < k; c += 1)
|
|
2045
|
+
if (e.tag.slice(0, g[c].tag.length) === g[c].tag) {
|
|
2046
|
+
I = g[c];
|
|
2047
2047
|
break;
|
|
2048
2048
|
}
|
|
2049
|
-
|
|
2049
|
+
I || M(e, "unknown tag !<" + e.tag + ">"), e.result !== null && I.kind !== e.kind && M(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + I.kind + '", not "' + e.kind + '"'), I.resolve(e.result, e.tag) ? (e.result = I.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : M(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2050
2050
|
}
|
|
2051
2051
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2052
2052
|
}
|
|
@@ -2055,16 +2055,16 @@ function Xo(e) {
|
|
|
2055
2055
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (i = e.input.charCodeAt(e.position)) !== 0 && (ee(e, !0, -1), i = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || i !== 37)); ) {
|
|
2056
2056
|
for (o = !0, i = e.input.charCodeAt(++e.position), n = e.position; i !== 0 && !de(i); )
|
|
2057
2057
|
i = e.input.charCodeAt(++e.position);
|
|
2058
|
-
for (r = e.input.slice(n, e.position), a = [], r.length < 1 &&
|
|
2058
|
+
for (r = e.input.slice(n, e.position), a = [], r.length < 1 && M(e, "directive name must not be less than one character in length"); i !== 0; ) {
|
|
2059
2059
|
for (; Te(i); )
|
|
2060
2060
|
i = e.input.charCodeAt(++e.position);
|
|
2061
2061
|
if (i === 35) {
|
|
2062
2062
|
do
|
|
2063
2063
|
i = e.input.charCodeAt(++e.position);
|
|
2064
|
-
while (i !== 0 && !
|
|
2064
|
+
while (i !== 0 && !ye(i));
|
|
2065
2065
|
break;
|
|
2066
2066
|
}
|
|
2067
|
-
if (
|
|
2067
|
+
if (ye(i))
|
|
2068
2068
|
break;
|
|
2069
2069
|
for (n = e.position; i !== 0 && !de(i); )
|
|
2070
2070
|
i = e.input.charCodeAt(++e.position);
|
|
@@ -2072,12 +2072,12 @@ function Xo(e) {
|
|
|
2072
2072
|
}
|
|
2073
2073
|
i !== 0 && $t(e), Se.call(en, r) ? en[r](e, r, a) : Ze(e, 'unknown document directive "' + r + '"');
|
|
2074
2074
|
}
|
|
2075
|
-
if (ee(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, ee(e, !0, -1)) : o &&
|
|
2075
|
+
if (ee(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, ee(e, !0, -1)) : o && M(e, "directives end mark is expected"), Le(e, e.lineIndent - 1, Ye, !1, !0), ee(e, !0, -1), e.checkLineBreaks && Ko.test(e.input.slice(t, e.position)) && Ze(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && ot(e)) {
|
|
2076
2076
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ee(e, !0, -1));
|
|
2077
2077
|
return;
|
|
2078
2078
|
}
|
|
2079
2079
|
if (e.position < e.length - 1)
|
|
2080
|
-
|
|
2080
|
+
M(e, "end of the stream or a document separator is expected");
|
|
2081
2081
|
else
|
|
2082
2082
|
return;
|
|
2083
2083
|
}
|
|
@@ -2085,7 +2085,7 @@ function er(e, t) {
|
|
|
2085
2085
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2086
2086
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2087
2087
|
var n = new Do(e, t), r = e.indexOf("\0");
|
|
2088
|
-
for (r !== -1 && (n.position = r,
|
|
2088
|
+
for (r !== -1 && (n.position = r, M(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2089
2089
|
n.lineIndent += 1, n.position += 1;
|
|
2090
2090
|
for (; n.position < n.length - 1; )
|
|
2091
2091
|
Xo(n);
|
|
@@ -2110,7 +2110,7 @@ function ti(e, t) {
|
|
|
2110
2110
|
var ni = ei, ri = ti, tr = {
|
|
2111
2111
|
loadAll: ni,
|
|
2112
2112
|
load: ri
|
|
2113
|
-
}, nr = Object.prototype.toString, rr = Object.prototype.hasOwnProperty, jt = 65279, ai = 9, De = 10, oi = 13, ii = 32, li = 33, si = 34, vt = 35, ui = 37, ci = 38, di = 39, pi = 42, ar = 44, fi = 45, Qe = 58, mi = 61, gi = 62,
|
|
2113
|
+
}, nr = Object.prototype.toString, rr = Object.prototype.hasOwnProperty, jt = 65279, ai = 9, De = 10, oi = 13, ii = 32, li = 33, si = 34, vt = 35, ui = 37, ci = 38, di = 39, pi = 42, ar = 44, fi = 45, Qe = 58, mi = 61, gi = 62, hi = 63, yi = 64, or = 91, ir = 93, vi = 96, lr = 123, bi = 124, sr = 125, le = {};
|
|
2114
2114
|
le[0] = "\\0";
|
|
2115
2115
|
le[7] = "\\a";
|
|
2116
2116
|
le[8] = "\\b";
|
|
@@ -2164,9 +2164,9 @@ function Ii(e) {
|
|
|
2164
2164
|
throw new se("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2165
2165
|
return "\\" + n + te.repeat("0", r - t.length) + t;
|
|
2166
2166
|
}
|
|
2167
|
-
var
|
|
2167
|
+
var _i = 1, Pe = 2;
|
|
2168
2168
|
function Si(e) {
|
|
2169
|
-
this.schema = e.schema ||
|
|
2169
|
+
this.schema = e.schema || At, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = te.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = wi(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 === '"' ? Pe : _i, 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;
|
|
2170
2170
|
}
|
|
2171
2171
|
function rn(e, t) {
|
|
2172
2172
|
for (var n = te.repeat(" ", t), r = 0, a = -1, o = "", i, l = e.length; r < l; )
|
|
@@ -2205,8 +2205,8 @@ function on(e, t, n) {
|
|
|
2205
2205
|
) : r && e !== ar && e !== or && e !== ir && e !== lr && e !== sr) && e !== vt && !(t === Qe && !a) || an(t) && !Xe(t) && e === vt || t === Qe && a
|
|
2206
2206
|
);
|
|
2207
2207
|
}
|
|
2208
|
-
function
|
|
2209
|
-
return Ge(e) && e !== jt && !Xe(e) && e !== fi && e !==
|
|
2208
|
+
function Ai(e) {
|
|
2209
|
+
return Ge(e) && e !== jt && !Xe(e) && e !== fi && e !== hi && e !== Qe && e !== ar && e !== or && e !== ir && e !== lr && e !== sr && e !== vt && e !== ci && e !== pi && e !== li && e !== bi && e !== mi && e !== gi && e !== di && e !== si && e !== ui && e !== yi && e !== vi;
|
|
2210
2210
|
}
|
|
2211
2211
|
function $i(e) {
|
|
2212
2212
|
return !Xe(e) && e !== Qe;
|
|
@@ -2221,25 +2221,25 @@ function ur(e) {
|
|
|
2221
2221
|
}
|
|
2222
2222
|
var cr = 1, kt = 2, dr = 3, pr = 4, qe = 5;
|
|
2223
2223
|
function Ti(e, t, n, r, a, o, i, l) {
|
|
2224
|
-
var s, u = 0, d = null, c = !1,
|
|
2224
|
+
var s, u = 0, d = null, c = !1, k = !1, g = r !== -1, I = -1, N = Ai(Re(e, 0)) && $i(Re(e, e.length - 1));
|
|
2225
2225
|
if (t || i)
|
|
2226
2226
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2227
2227
|
if (u = Re(e, s), !Ge(u))
|
|
2228
2228
|
return qe;
|
|
2229
|
-
|
|
2229
|
+
N = N && on(u, d, l), d = u;
|
|
2230
2230
|
}
|
|
2231
2231
|
else {
|
|
2232
2232
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2233
2233
|
if (u = Re(e, s), u === De)
|
|
2234
|
-
c = !0,
|
|
2235
|
-
s -
|
|
2234
|
+
c = !0, g && (k = k || // Foldable line = too long, and not more-indented.
|
|
2235
|
+
s - I - 1 > r && e[I + 1] !== " ", I = s);
|
|
2236
2236
|
else if (!Ge(u))
|
|
2237
2237
|
return qe;
|
|
2238
|
-
|
|
2238
|
+
N = N && on(u, d, l), d = u;
|
|
2239
2239
|
}
|
|
2240
|
-
|
|
2240
|
+
k = k || g && s - I - 1 > r && e[I + 1] !== " ";
|
|
2241
2241
|
}
|
|
2242
|
-
return !c && !
|
|
2242
|
+
return !c && !k ? N && !i && !a(e) ? cr : o === Pe ? qe : kt : n > 9 && ur(e) ? qe : i ? o === Pe ? qe : kt : k ? pr : dr;
|
|
2243
2243
|
}
|
|
2244
2244
|
function ji(e, t, n, r, a) {
|
|
2245
2245
|
e.dump = function() {
|
|
@@ -2268,7 +2268,7 @@ function ji(e, t, n, r, a) {
|
|
|
2268
2268
|
case dr:
|
|
2269
2269
|
return "|" + ln(t, e.indent) + sn(rn(t, o));
|
|
2270
2270
|
case pr:
|
|
2271
|
-
return ">" + ln(t, e.indent) + sn(rn(
|
|
2271
|
+
return ">" + ln(t, e.indent) + sn(rn(Ni(t, i), o));
|
|
2272
2272
|
case qe:
|
|
2273
2273
|
return '"' + Oi(t) + '"';
|
|
2274
2274
|
default:
|
|
@@ -2288,7 +2288,7 @@ function sn(e) {
|
|
|
2288
2288
|
return e[e.length - 1] === `
|
|
2289
2289
|
` ? e.slice(0, -1) : e;
|
|
2290
2290
|
}
|
|
2291
|
-
function
|
|
2291
|
+
function Ni(e, t) {
|
|
2292
2292
|
for (var n = /(\n+)([^\n]*)/g, r = function() {
|
|
2293
2293
|
var u = e.indexOf(`
|
|
2294
2294
|
`);
|
|
@@ -2316,7 +2316,7 @@ function Oi(e) {
|
|
|
2316
2316
|
n = Re(e, a), r = le[n], !r && Ge(n) ? (t += e[a], n >= 65536 && (t += e[a + 1])) : t += r || Ii(n);
|
|
2317
2317
|
return t;
|
|
2318
2318
|
}
|
|
2319
|
-
function
|
|
2319
|
+
function Mi(e, t, n) {
|
|
2320
2320
|
var r = "", a = e.tag, o, i, l;
|
|
2321
2321
|
for (o = 0, i = n.length; o < i; o += 1)
|
|
2322
2322
|
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), (ke(e, t, l, !1, !1) || typeof l > "u" && ke(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
@@ -2328,14 +2328,14 @@ function cn(e, t, n, r) {
|
|
|
2328
2328
|
s = n[i], e.replacer && (s = e.replacer.call(n, String(i), s)), (ke(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && ke(e, t + 1, null, !0, !0, !1, !0)) && ((!r || a !== "") && (a += bt(e, t)), e.dump && De === e.dump.charCodeAt(0) ? a += "-" : a += "- ", a += e.dump);
|
|
2329
2329
|
e.tag = o, e.dump = a || "[]";
|
|
2330
2330
|
}
|
|
2331
|
-
function
|
|
2331
|
+
function Ei(e, t, n) {
|
|
2332
2332
|
var r = "", a = e.tag, o = Object.keys(n), i, l, s, u, d;
|
|
2333
2333
|
for (i = 0, l = o.length; i < l; i += 1)
|
|
2334
2334
|
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = o[i], u = n[s], e.replacer && (u = e.replacer.call(n, s, u)), ke(e, t, s, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ke(e, t, u, !1, !1) && (d += e.dump, r += d));
|
|
2335
2335
|
e.tag = a, e.dump = "{" + r + "}";
|
|
2336
2336
|
}
|
|
2337
2337
|
function Fi(e, t, n, r) {
|
|
2338
|
-
var a = "", o = e.tag, i = Object.keys(n), l, s, u, d, c,
|
|
2338
|
+
var a = "", o = e.tag, i = Object.keys(n), l, s, u, d, c, k;
|
|
2339
2339
|
if (e.sortKeys === !0)
|
|
2340
2340
|
i.sort();
|
|
2341
2341
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2343,7 +2343,7 @@ function Fi(e, t, n, r) {
|
|
|
2343
2343
|
else if (e.sortKeys)
|
|
2344
2344
|
throw new se("sortKeys must be a boolean or a function");
|
|
2345
2345
|
for (l = 0, s = i.length; l < s; l += 1)
|
|
2346
|
-
|
|
2346
|
+
k = "", (!r || a !== "") && (k += bt(e, t)), u = i[l], d = n[u], e.replacer && (d = e.replacer.call(n, u, d)), ke(e, t + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && De === e.dump.charCodeAt(0) ? k += "?" : k += "? "), k += e.dump, c && (k += bt(e, t)), ke(e, t + 1, d, !0, c) && (e.dump && De === e.dump.charCodeAt(0) ? k += ":" : k += ": ", k += e.dump, a += k));
|
|
2347
2347
|
e.tag = o, e.dump = a || "{}";
|
|
2348
2348
|
}
|
|
2349
2349
|
function dn(e, t, n) {
|
|
@@ -2367,14 +2367,14 @@ function ke(e, t, n, r, a, o, i) {
|
|
|
2367
2367
|
e.tag = null, e.dump = n, dn(e, n, !1) || dn(e, n, !0);
|
|
2368
2368
|
var l = nr.call(e.dump), s = r, u;
|
|
2369
2369
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
2370
|
-
var d = l === "[object Object]" || l === "[object Array]", c,
|
|
2371
|
-
if (d && (c = e.duplicates.indexOf(n),
|
|
2370
|
+
var d = l === "[object Object]" || l === "[object Array]", c, k;
|
|
2371
|
+
if (d && (c = e.duplicates.indexOf(n), k = c !== -1), (e.tag !== null && e.tag !== "?" || k || e.indent !== 2 && t > 0) && (a = !1), k && e.usedDuplicates[c])
|
|
2372
2372
|
e.dump = "*ref_" + c;
|
|
2373
2373
|
else {
|
|
2374
|
-
if (d &&
|
|
2375
|
-
r && Object.keys(e.dump).length !== 0 ? (Fi(e, t, e.dump, a),
|
|
2374
|
+
if (d && k && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), l === "[object Object]")
|
|
2375
|
+
r && Object.keys(e.dump).length !== 0 ? (Fi(e, t, e.dump, a), k && (e.dump = "&ref_" + c + e.dump)) : (Ei(e, t, e.dump), k && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2376
2376
|
else if (l === "[object Array]")
|
|
2377
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && t > 0 ? cn(e, t - 1, e.dump, a) : cn(e, t, e.dump, a),
|
|
2377
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && t > 0 ? cn(e, t - 1, e.dump, a) : cn(e, t, e.dump, a), k && (e.dump = "&ref_" + c + e.dump)) : (Mi(e, t, e.dump), k && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2378
2378
|
else if (l === "[object String]")
|
|
2379
2379
|
e.tag !== "?" && ji(e, e.dump, t, o, s);
|
|
2380
2380
|
else {
|
|
@@ -2417,26 +2417,26 @@ function Ki(e, t) {
|
|
|
2417
2417
|
var Bi = Ki, Li = {
|
|
2418
2418
|
dump: Bi
|
|
2419
2419
|
};
|
|
2420
|
-
function
|
|
2420
|
+
function Nt(e, t) {
|
|
2421
2421
|
return function() {
|
|
2422
2422
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2423
2423
|
};
|
|
2424
2424
|
}
|
|
2425
|
-
var Ui = oe, Ri = $n, Vi = On, Di = Kn, Pi = Bn, Gi =
|
|
2425
|
+
var Ui = oe, Ri = $n, Vi = On, Di = Kn, Pi = Bn, Gi = At, zi = tr.load, Ji = tr.loadAll, Hi = Li.dump, Wi = se, Yi = {
|
|
2426
2426
|
binary: Dn,
|
|
2427
2427
|
float: qn,
|
|
2428
|
-
map:
|
|
2429
|
-
null:
|
|
2428
|
+
map: Nn,
|
|
2429
|
+
null: Mn,
|
|
2430
2430
|
pairs: Gn,
|
|
2431
2431
|
set: zn,
|
|
2432
2432
|
timestamp: Rn,
|
|
2433
|
-
bool:
|
|
2433
|
+
bool: En,
|
|
2434
2434
|
int: Fn,
|
|
2435
2435
|
merge: Vn,
|
|
2436
2436
|
omap: Pn,
|
|
2437
2437
|
seq: jn,
|
|
2438
2438
|
str: Tn
|
|
2439
|
-
}, Zi =
|
|
2439
|
+
}, Zi = Nt("safeLoad", "load"), Qi = Nt("safeLoadAll", "loadAll"), Xi = Nt("safeDump", "dump"), el = {
|
|
2440
2440
|
Type: Ui,
|
|
2441
2441
|
Schema: Ri,
|
|
2442
2442
|
FAILSAFE_SCHEMA: Vi,
|
|
@@ -2452,7 +2452,7 @@ var Ui = oe, Ri = $n, Vi = On, Di = Kn, Pi = Bn, Gi = _t, zi = tr.load, Ji = tr.
|
|
|
2452
2452
|
safeLoadAll: Qi,
|
|
2453
2453
|
safeDump: Xi
|
|
2454
2454
|
};
|
|
2455
|
-
const tl = { class: "yaml-config" }, fr = /* @__PURE__ */
|
|
2455
|
+
const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ Y({
|
|
2456
2456
|
__name: "YamlCodeBlock",
|
|
2457
2457
|
props: {
|
|
2458
2458
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2462,14 +2462,14 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2462
2462
|
}
|
|
2463
2463
|
},
|
|
2464
2464
|
setup(e) {
|
|
2465
|
-
const t = e, n =
|
|
2465
|
+
const t = e, n = S(() => {
|
|
2466
2466
|
const r = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, a]) => a !== null && a !== "" && (Array.isArray(a) ? a.length !== 0 : !0)));
|
|
2467
2467
|
return Object.keys(r).length === 0 && r.constructor === Object ? "" : el.dump(r).trim();
|
|
2468
2468
|
});
|
|
2469
2469
|
return (r, a) => {
|
|
2470
|
-
const o =
|
|
2471
|
-
return
|
|
2472
|
-
t.yamlRecord ? (
|
|
2470
|
+
const o = R("KCodeBlock");
|
|
2471
|
+
return y(), E("div", tl, [
|
|
2472
|
+
t.yamlRecord ? (y(), V(o, {
|
|
2473
2473
|
key: 0,
|
|
2474
2474
|
id: "yaml-codeblock",
|
|
2475
2475
|
code: n.value,
|
|
@@ -2485,7 +2485,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2485
2485
|
}, rl = ["data-testid"], al = {
|
|
2486
2486
|
key: 0,
|
|
2487
2487
|
class: "config-card-prop-section-title"
|
|
2488
|
-
}, ol = /* @__PURE__ */
|
|
2488
|
+
}, ol = /* @__PURE__ */ Y({
|
|
2489
2489
|
__name: "ConfigCardDisplay",
|
|
2490
2490
|
props: {
|
|
2491
2491
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2524,21 +2524,21 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2524
2524
|
}
|
|
2525
2525
|
},
|
|
2526
2526
|
setup(e) {
|
|
2527
|
-
const t = e, n = It(), { i18n: { t: r } } = ne.useI18n(), a = (i) => !!(i.tooltip || n[`${i.key}-label-tooltip`]), o =
|
|
2527
|
+
const t = e, n = It(), { i18n: { t: r } } = ne.useI18n(), a = (i) => !!(i.tooltip || n[`${i.key}-label-tooltip`]), o = S(() => {
|
|
2528
2528
|
if (!t.record)
|
|
2529
2529
|
return t.record;
|
|
2530
2530
|
const i = JSON.parse(JSON.stringify(t.record));
|
|
2531
2531
|
return delete i.created_at, delete i.updated_at, i;
|
|
2532
2532
|
});
|
|
2533
|
-
return (i, l) => (
|
|
2534
|
-
e.format === "structured" ? (
|
|
2535
|
-
(
|
|
2533
|
+
return (i, l) => (y(), E(fe, null, [
|
|
2534
|
+
e.format === "structured" ? (y(), E("div", nl, [
|
|
2535
|
+
(y(!0), E(fe, null, pe(e.propListTypes, (s) => (y(), E("div", {
|
|
2536
2536
|
key: `config-card-details-${s}-props`,
|
|
2537
|
-
class:
|
|
2537
|
+
class: _e(`config-card-details-${s}-props`),
|
|
2538
2538
|
"data-testid": `config-card-details-${s}-props`
|
|
2539
2539
|
}, [
|
|
2540
|
-
s !== "basic" ? (
|
|
2541
|
-
(
|
|
2540
|
+
s !== "basic" ? (y(), E("div", al, j(s === "advanced" ? m(r)("baseConfigCard.sections.advanced") : m(r)("baseConfigCard.sections.plugin")), 1)) : z("", !0),
|
|
2541
|
+
(y(!0), E(fe, null, pe(e.propertyCollections[s], (u) => (y(), V(_n, {
|
|
2542
2542
|
key: u.key,
|
|
2543
2543
|
item: u
|
|
2544
2544
|
}, je({
|
|
@@ -2563,14 +2563,14 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2563
2563
|
]), 1032, ["item"]))), 128))
|
|
2564
2564
|
], 10, rl))), 128))
|
|
2565
2565
|
])) : z("", !0),
|
|
2566
|
-
e.format === "json" && t.record ? (
|
|
2566
|
+
e.format === "json" && t.record ? (y(), V(Sn, {
|
|
2567
2567
|
key: 1,
|
|
2568
2568
|
config: t.config,
|
|
2569
2569
|
"fetcher-url": t.fetcherUrl,
|
|
2570
2570
|
"json-record": o.value,
|
|
2571
2571
|
"request-method": "get"
|
|
2572
2572
|
}, null, 8, ["config", "fetcher-url", "json-record"])) : z("", !0),
|
|
2573
|
-
e.format === "yaml" && t.record ? (
|
|
2573
|
+
e.format === "yaml" && t.record ? (y(), V(fr, {
|
|
2574
2574
|
key: 2,
|
|
2575
2575
|
"yaml-record": o.value
|
|
2576
2576
|
}, null, 8, ["yaml-record"])) : z("", !0)
|
|
@@ -2584,10 +2584,10 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2584
2584
|
}, ll = (e) => (tt("data-v-20c17c32"), e = e(), nt(), e), sl = ["aria-hidden"], ul = {
|
|
2585
2585
|
key: 0,
|
|
2586
2586
|
"data-testid": "kui-icon-svg-title"
|
|
2587
|
-
}, cl = /* @__PURE__ */ ll(() => /* @__PURE__ */
|
|
2587
|
+
}, cl = /* @__PURE__ */ ll(() => /* @__PURE__ */ q("path", {
|
|
2588
2588
|
d: "M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",
|
|
2589
2589
|
fill: "currentColor"
|
|
2590
|
-
}, null, -1)), dl = /* @__PURE__ */
|
|
2590
|
+
}, null, -1)), dl = /* @__PURE__ */ Y({
|
|
2591
2591
|
__name: "AddIcon",
|
|
2592
2592
|
props: {
|
|
2593
2593
|
/** The accessibility text provided to screen readers */
|
|
@@ -2639,7 +2639,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2639
2639
|
}
|
|
2640
2640
|
},
|
|
2641
2641
|
setup(e) {
|
|
2642
|
-
const t = e, n =
|
|
2642
|
+
const t = e, n = S(() => {
|
|
2643
2643
|
if (typeof t.size == "number" && t.size > 0)
|
|
2644
2644
|
return `${t.size}px`;
|
|
2645
2645
|
if (typeof t.size == "string") {
|
|
@@ -2648,7 +2648,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2648
2648
|
return `${o}px`;
|
|
2649
2649
|
}
|
|
2650
2650
|
return xe;
|
|
2651
|
-
}), r =
|
|
2651
|
+
}), r = S(() => ({
|
|
2652
2652
|
boxSizing: "border-box",
|
|
2653
2653
|
color: t.color,
|
|
2654
2654
|
display: t.display,
|
|
@@ -2656,14 +2656,14 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2656
2656
|
lineHeight: "0",
|
|
2657
2657
|
width: n.value
|
|
2658
2658
|
}));
|
|
2659
|
-
return (a, o) => (
|
|
2659
|
+
return (a, o) => (y(), V(Ae(e.as), {
|
|
2660
2660
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2661
2661
|
class: "kui-icon add-icon",
|
|
2662
2662
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
2663
2663
|
style: et(r.value)
|
|
2664
2664
|
}, {
|
|
2665
2665
|
default: v(() => [
|
|
2666
|
-
(
|
|
2666
|
+
(y(), E("svg", {
|
|
2667
2667
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2668
2668
|
"data-testid": "kui-icon-svg-add-icon",
|
|
2669
2669
|
fill: "none",
|
|
@@ -2673,7 +2673,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2673
2673
|
width: "100%",
|
|
2674
2674
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2675
2675
|
}, [
|
|
2676
|
-
e.title ? (
|
|
2676
|
+
e.title ? (y(), E("title", ul, j(e.title), 1)) : z("", !0),
|
|
2677
2677
|
cl
|
|
2678
2678
|
], 8, sl))
|
|
2679
2679
|
]),
|
|
@@ -2683,10 +2683,10 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2683
2683
|
}), pl = /* @__PURE__ */ it(dl, [["__scopeId", "data-v-20c17c32"]]), fl = (e) => (tt("data-v-b939f1df"), e = e(), nt(), e), ml = ["aria-hidden"], gl = {
|
|
2684
2684
|
key: 0,
|
|
2685
2685
|
"data-testid": "kui-icon-svg-title"
|
|
2686
|
-
},
|
|
2686
|
+
}, hl = /* @__PURE__ */ fl(() => /* @__PURE__ */ q("path", {
|
|
2687
2687
|
d: "M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",
|
|
2688
2688
|
fill: "currentColor"
|
|
2689
|
-
}, null, -1)),
|
|
2689
|
+
}, null, -1)), yl = /* @__PURE__ */ Y({
|
|
2690
2690
|
__name: "BookIcon",
|
|
2691
2691
|
props: {
|
|
2692
2692
|
/** The accessibility text provided to screen readers */
|
|
@@ -2738,7 +2738,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2738
2738
|
}
|
|
2739
2739
|
},
|
|
2740
2740
|
setup(e) {
|
|
2741
|
-
const t = e, n =
|
|
2741
|
+
const t = e, n = S(() => {
|
|
2742
2742
|
if (typeof t.size == "number" && t.size > 0)
|
|
2743
2743
|
return `${t.size}px`;
|
|
2744
2744
|
if (typeof t.size == "string") {
|
|
@@ -2747,7 +2747,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2747
2747
|
return `${o}px`;
|
|
2748
2748
|
}
|
|
2749
2749
|
return xe;
|
|
2750
|
-
}), r =
|
|
2750
|
+
}), r = S(() => ({
|
|
2751
2751
|
boxSizing: "border-box",
|
|
2752
2752
|
color: t.color,
|
|
2753
2753
|
display: t.display,
|
|
@@ -2755,14 +2755,14 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2755
2755
|
lineHeight: "0",
|
|
2756
2756
|
width: n.value
|
|
2757
2757
|
}));
|
|
2758
|
-
return (a, o) => (
|
|
2758
|
+
return (a, o) => (y(), V(Ae(e.as), {
|
|
2759
2759
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2760
2760
|
class: "kui-icon book-icon",
|
|
2761
2761
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2762
2762
|
style: et(r.value)
|
|
2763
2763
|
}, {
|
|
2764
2764
|
default: v(() => [
|
|
2765
|
-
(
|
|
2765
|
+
(y(), E("svg", {
|
|
2766
2766
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2767
2767
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2768
2768
|
fill: "none",
|
|
@@ -2772,20 +2772,20 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2772
2772
|
width: "100%",
|
|
2773
2773
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2774
2774
|
}, [
|
|
2775
|
-
e.title ? (
|
|
2776
|
-
|
|
2775
|
+
e.title ? (y(), E("title", gl, j(e.title), 1)) : z("", !0),
|
|
2776
|
+
hl
|
|
2777
2777
|
], 8, ml))
|
|
2778
2778
|
]),
|
|
2779
2779
|
_: 1
|
|
2780
2780
|
}, 8, ["aria-hidden", "style"]));
|
|
2781
2781
|
}
|
|
2782
|
-
}), vl = /* @__PURE__ */ it(
|
|
2782
|
+
}), vl = /* @__PURE__ */ it(yl, [["__scopeId", "data-v-b939f1df"]]), bl = (e) => (tt("data-v-f1d0332e"), e = e(), nt(), e), kl = ["aria-hidden"], Cl = {
|
|
2783
2783
|
key: 0,
|
|
2784
2784
|
"data-testid": "kui-icon-svg-title"
|
|
2785
|
-
}, wl = /* @__PURE__ */ bl(() => /* @__PURE__ */
|
|
2785
|
+
}, wl = /* @__PURE__ */ bl(() => /* @__PURE__ */ q("path", {
|
|
2786
2786
|
d: "M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",
|
|
2787
2787
|
fill: "currentColor"
|
|
2788
|
-
}, null, -1)), Il = /* @__PURE__ */
|
|
2788
|
+
}, null, -1)), Il = /* @__PURE__ */ Y({
|
|
2789
2789
|
__name: "ChevronDownIcon",
|
|
2790
2790
|
props: {
|
|
2791
2791
|
/** The accessibility text provided to screen readers */
|
|
@@ -2837,7 +2837,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2837
2837
|
}
|
|
2838
2838
|
},
|
|
2839
2839
|
setup(e) {
|
|
2840
|
-
const t = e, n =
|
|
2840
|
+
const t = e, n = S(() => {
|
|
2841
2841
|
if (typeof t.size == "number" && t.size > 0)
|
|
2842
2842
|
return `${t.size}px`;
|
|
2843
2843
|
if (typeof t.size == "string") {
|
|
@@ -2846,7 +2846,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2846
2846
|
return `${o}px`;
|
|
2847
2847
|
}
|
|
2848
2848
|
return xe;
|
|
2849
|
-
}), r =
|
|
2849
|
+
}), r = S(() => ({
|
|
2850
2850
|
boxSizing: "border-box",
|
|
2851
2851
|
color: t.color,
|
|
2852
2852
|
display: t.display,
|
|
@@ -2854,14 +2854,14 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2854
2854
|
lineHeight: "0",
|
|
2855
2855
|
width: n.value
|
|
2856
2856
|
}));
|
|
2857
|
-
return (a, o) => (
|
|
2857
|
+
return (a, o) => (y(), V(Ae(e.as), {
|
|
2858
2858
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2859
2859
|
class: "kui-icon chevron-down-icon",
|
|
2860
2860
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
2861
2861
|
style: et(r.value)
|
|
2862
2862
|
}, {
|
|
2863
2863
|
default: v(() => [
|
|
2864
|
-
(
|
|
2864
|
+
(y(), E("svg", {
|
|
2865
2865
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2866
2866
|
"data-testid": "kui-icon-svg-chevron-down-icon",
|
|
2867
2867
|
fill: "none",
|
|
@@ -2871,20 +2871,20 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2871
2871
|
width: "100%",
|
|
2872
2872
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2873
2873
|
}, [
|
|
2874
|
-
e.title ? (
|
|
2874
|
+
e.title ? (y(), E("title", Cl, j(e.title), 1)) : z("", !0),
|
|
2875
2875
|
wl
|
|
2876
2876
|
], 8, kl))
|
|
2877
2877
|
]),
|
|
2878
2878
|
_: 1
|
|
2879
2879
|
}, 8, ["aria-hidden", "style"]));
|
|
2880
2880
|
}
|
|
2881
|
-
}),
|
|
2881
|
+
}), _l = /* @__PURE__ */ it(Il, [["__scopeId", "data-v-f1d0332e"]]), Sl = (e) => (tt("data-v-288b6455"), e = e(), nt(), e), xl = ["aria-hidden"], Al = {
|
|
2882
2882
|
key: 0,
|
|
2883
2883
|
"data-testid": "kui-icon-svg-title"
|
|
2884
|
-
}, $l = /* @__PURE__ */ Sl(() => /* @__PURE__ */
|
|
2884
|
+
}, $l = /* @__PURE__ */ Sl(() => /* @__PURE__ */ q("path", {
|
|
2885
2885
|
d: "M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",
|
|
2886
2886
|
fill: "currentColor"
|
|
2887
|
-
}, null, -1)), Tl = /* @__PURE__ */
|
|
2887
|
+
}, null, -1)), Tl = /* @__PURE__ */ Y({
|
|
2888
2888
|
__name: "CloseIcon",
|
|
2889
2889
|
props: {
|
|
2890
2890
|
/** The accessibility text provided to screen readers */
|
|
@@ -2936,7 +2936,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2936
2936
|
}
|
|
2937
2937
|
},
|
|
2938
2938
|
setup(e) {
|
|
2939
|
-
const t = e, n =
|
|
2939
|
+
const t = e, n = S(() => {
|
|
2940
2940
|
if (typeof t.size == "number" && t.size > 0)
|
|
2941
2941
|
return `${t.size}px`;
|
|
2942
2942
|
if (typeof t.size == "string") {
|
|
@@ -2945,7 +2945,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2945
2945
|
return `${o}px`;
|
|
2946
2946
|
}
|
|
2947
2947
|
return xe;
|
|
2948
|
-
}), r =
|
|
2948
|
+
}), r = S(() => ({
|
|
2949
2949
|
boxSizing: "border-box",
|
|
2950
2950
|
color: t.color,
|
|
2951
2951
|
display: t.display,
|
|
@@ -2953,14 +2953,14 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2953
2953
|
lineHeight: "0",
|
|
2954
2954
|
width: n.value
|
|
2955
2955
|
}));
|
|
2956
|
-
return (a, o) => (
|
|
2956
|
+
return (a, o) => (y(), V(Ae(e.as), {
|
|
2957
2957
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2958
2958
|
class: "kui-icon close-icon",
|
|
2959
2959
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
2960
2960
|
style: et(r.value)
|
|
2961
2961
|
}, {
|
|
2962
2962
|
default: v(() => [
|
|
2963
|
-
(
|
|
2963
|
+
(y(), E("svg", {
|
|
2964
2964
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2965
2965
|
"data-testid": "kui-icon-svg-close-icon",
|
|
2966
2966
|
fill: "none",
|
|
@@ -2970,17 +2970,17 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
2970
2970
|
width: "100%",
|
|
2971
2971
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2972
2972
|
}, [
|
|
2973
|
-
e.title ? (
|
|
2973
|
+
e.title ? (y(), E("title", Al, j(e.title), 1)) : z("", !0),
|
|
2974
2974
|
$l
|
|
2975
2975
|
], 8, xl))
|
|
2976
2976
|
]),
|
|
2977
2977
|
_: 1
|
|
2978
2978
|
}, 8, ["aria-hidden", "style"]));
|
|
2979
2979
|
}
|
|
2980
|
-
}), jl = /* @__PURE__ */ it(Tl, [["__scopeId", "data-v-288b6455"]]),
|
|
2980
|
+
}), jl = /* @__PURE__ */ it(Tl, [["__scopeId", "data-v-288b6455"]]), Nl = {
|
|
2981
2981
|
class: "config-card-title",
|
|
2982
2982
|
"data-testid": "config-card-title"
|
|
2983
|
-
}, Ol = { class: "config-card-actions" },
|
|
2983
|
+
}, Ol = { class: "config-card-actions" }, Ml = ["href"], El = { class: "config-card-details-section" }, Fl = /* @__PURE__ */ Y({
|
|
2984
2984
|
__name: "EntityBaseConfigCard",
|
|
2985
2985
|
props: {
|
|
2986
2986
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3073,11 +3073,11 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3073
3073
|
label: "YAML",
|
|
3074
3074
|
value: "yaml"
|
|
3075
3075
|
}
|
|
3076
|
-
], d =
|
|
3077
|
-
d.value =
|
|
3078
|
-
},
|
|
3076
|
+
], d = F("structured"), c = (p) => {
|
|
3077
|
+
d.value = p == null ? void 0 : p.value;
|
|
3078
|
+
}, k = {
|
|
3079
3079
|
id: {
|
|
3080
|
-
type:
|
|
3080
|
+
type: Z.ID,
|
|
3081
3081
|
label: o("baseConfigCard.commonFields.id_label"),
|
|
3082
3082
|
order: 0,
|
|
3083
3083
|
section: ce.Basic
|
|
@@ -3087,125 +3087,125 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3087
3087
|
section: ce.Basic
|
|
3088
3088
|
},
|
|
3089
3089
|
enabled: {
|
|
3090
|
-
type:
|
|
3090
|
+
type: Z.BadgeStatus,
|
|
3091
3091
|
order: 2,
|
|
3092
3092
|
section: ce.Basic
|
|
3093
3093
|
},
|
|
3094
3094
|
updated_at: {
|
|
3095
|
-
type:
|
|
3095
|
+
type: Z.Date,
|
|
3096
3096
|
label: o("baseConfigCard.commonFields.updated_at_label"),
|
|
3097
3097
|
order: 3,
|
|
3098
3098
|
section: ce.Basic
|
|
3099
3099
|
},
|
|
3100
3100
|
created_at: {
|
|
3101
|
-
type:
|
|
3101
|
+
type: Z.Date,
|
|
3102
3102
|
label: o("baseConfigCard.commonFields.created_at_label"),
|
|
3103
3103
|
order: 4,
|
|
3104
3104
|
section: ce.Basic
|
|
3105
3105
|
},
|
|
3106
3106
|
tags: {
|
|
3107
|
-
type:
|
|
3107
|
+
type: Z.BadgeTag,
|
|
3108
3108
|
order: -1,
|
|
3109
3109
|
// the last property displayed
|
|
3110
3110
|
section: ce.Basic
|
|
3111
3111
|
}
|
|
3112
|
-
},
|
|
3113
|
-
var
|
|
3114
|
-
if (!
|
|
3112
|
+
}, g = F(!1), I = F(!1), N = F(""), w = F({}), U = S(() => {
|
|
3113
|
+
var p, L, C;
|
|
3114
|
+
if (!w.value)
|
|
3115
3115
|
return [];
|
|
3116
|
-
const
|
|
3117
|
-
for (const
|
|
3118
|
-
const
|
|
3116
|
+
const f = [], K = Object.keys(w.value).length;
|
|
3117
|
+
for (const O in w.value) {
|
|
3118
|
+
const _ = (L = (p = a.configSchema) == null ? void 0 : p[O]) == null ? void 0 : L.order, x = (C = k[O]) == null ? void 0 : C.order;
|
|
3119
3119
|
let B = K;
|
|
3120
|
-
(x || x === 0) && (B = x === -1 ? K + 1 : x),
|
|
3120
|
+
(x || x === 0) && (B = x === -1 ? K + 1 : x), _ && (B = _ === -1 ? K + 1 : _), f.push([O, B]);
|
|
3121
3121
|
}
|
|
3122
|
-
return
|
|
3123
|
-
return
|
|
3124
|
-
}),
|
|
3125
|
-
var
|
|
3126
|
-
const B =
|
|
3122
|
+
return f.sort(function(O, _) {
|
|
3123
|
+
return O[1] - _[1];
|
|
3124
|
+
}), f.map((O) => {
|
|
3125
|
+
var _, x;
|
|
3126
|
+
const B = O[0], D = (_ = w.value) == null ? void 0 : _[B], P = ((x = a.configSchema) == null ? void 0 : x[B]) || {}, ie = k[B];
|
|
3127
3127
|
return {
|
|
3128
3128
|
key: B,
|
|
3129
3129
|
value: D,
|
|
3130
3130
|
hidden: P.hidden || !1,
|
|
3131
|
-
type: P.type ?? ((ie == null ? void 0 : ie.type) ||
|
|
3131
|
+
type: P.type ?? ((ie == null ? void 0 : ie.type) || Z.Text),
|
|
3132
3132
|
label: P.label ?? ((ie == null ? void 0 : ie.label) || l(B)),
|
|
3133
3133
|
tooltip: P.tooltip ?? ((ie == null ? void 0 : ie.tooltip) || void 0),
|
|
3134
3134
|
section: P.section ?? ((ie == null ? void 0 : ie.section) || ce.Advanced)
|
|
3135
3135
|
};
|
|
3136
|
-
}).filter((
|
|
3137
|
-
}),
|
|
3138
|
-
var
|
|
3139
|
-
if (!
|
|
3136
|
+
}).filter((O) => !O.hidden && O.key !== a.pluginConfigKey);
|
|
3137
|
+
}), A = S(() => {
|
|
3138
|
+
var p, L;
|
|
3139
|
+
if (!w.value || !a.pluginConfigKey)
|
|
3140
3140
|
return [];
|
|
3141
|
-
const
|
|
3142
|
-
for (const
|
|
3143
|
-
const
|
|
3144
|
-
let B = x != null && x !== "" ?
|
|
3145
|
-
|
|
3141
|
+
const C = w.value[a.pluginConfigKey] || {}, f = Object.keys(C).length, K = [];
|
|
3142
|
+
for (const O in C) {
|
|
3143
|
+
const _ = (L = (p = a.pluginConfigSchema) == null ? void 0 : p[O]) == null ? void 0 : L.order, x = C[O];
|
|
3144
|
+
let B = x != null && x !== "" ? f - 1 : f;
|
|
3145
|
+
_ && (B = _ === -1 ? f + 1 : _), K.push([O, B]);
|
|
3146
3146
|
}
|
|
3147
|
-
return K.sort(function(
|
|
3148
|
-
return
|
|
3149
|
-
}), K.map((
|
|
3150
|
-
var
|
|
3151
|
-
const x =
|
|
3147
|
+
return K.sort(function(O, _) {
|
|
3148
|
+
return O[1] - _[1];
|
|
3149
|
+
}), K.map((O) => {
|
|
3150
|
+
var _;
|
|
3151
|
+
const x = O[0], B = C[x], D = ((_ = a.pluginConfigSchema) == null ? void 0 : _[x]) || {};
|
|
3152
3152
|
return {
|
|
3153
3153
|
key: x,
|
|
3154
3154
|
value: B,
|
|
3155
3155
|
hidden: D.hidden || !1,
|
|
3156
|
-
type: D.type ??
|
|
3156
|
+
type: D.type ?? Z.Text,
|
|
3157
3157
|
label: D.label ?? l(x),
|
|
3158
3158
|
tooltip: D.tooltip ?? void 0,
|
|
3159
3159
|
section: ce.Plugin
|
|
3160
3160
|
};
|
|
3161
|
-
}).filter((
|
|
3162
|
-
}),
|
|
3163
|
-
var
|
|
3161
|
+
}).filter((O) => !O.hidden);
|
|
3162
|
+
}), H = S(() => {
|
|
3163
|
+
var p, L, C, f;
|
|
3164
3164
|
return {
|
|
3165
|
-
basic: (
|
|
3166
|
-
advanced: (L =
|
|
3167
|
-
plugin: (
|
|
3165
|
+
basic: (p = U.value) == null ? void 0 : p.filter((K) => K.section === ce.Basic),
|
|
3166
|
+
advanced: (L = U.value) == null ? void 0 : L.filter((K) => K.section === ce.Advanced),
|
|
3167
|
+
plugin: (f = A.value) == null ? void 0 : f.concat((C = U.value) == null ? void 0 : C.filter((K) => K.section === ce.Plugin))
|
|
3168
3168
|
};
|
|
3169
|
-
}),
|
|
3170
|
-
const
|
|
3171
|
-
return
|
|
3172
|
-
}),
|
|
3173
|
-
var
|
|
3174
|
-
let
|
|
3175
|
-
return a.config.app === "konnect" ?
|
|
3169
|
+
}), b = S(() => {
|
|
3170
|
+
const p = [];
|
|
3171
|
+
return H.value.basic.length && p.push("basic"), H.value.advanced.length && p.push("advanced"), H.value.plugin.length && p.push("plugin"), p;
|
|
3172
|
+
}), h = S(() => {
|
|
3173
|
+
var p, L;
|
|
3174
|
+
let C = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3175
|
+
return a.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((p = a.config) == null ? void 0 : p.controlPlaneId) || "") : a.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (L = a.config) != null && L.workspace ? `/${a.config.workspace}` : "")), C = C.replace(/{id}/gi, a.config.entityId), C;
|
|
3176
3176
|
});
|
|
3177
|
-
return be(
|
|
3178
|
-
r("loading",
|
|
3177
|
+
return be(g, (p) => {
|
|
3178
|
+
r("loading", p);
|
|
3179
3179
|
}, { immediate: !0 }), wt(async () => {
|
|
3180
|
-
|
|
3180
|
+
I.value = !1, g.value = !0;
|
|
3181
3181
|
try {
|
|
3182
|
-
const { data:
|
|
3182
|
+
const { data: p } = await s.get(h.value);
|
|
3183
3183
|
if (a.dataKey)
|
|
3184
|
-
if (typeof
|
|
3185
|
-
|
|
3184
|
+
if (typeof p[a.dataKey] < "u")
|
|
3185
|
+
w.value = { ...p[a.dataKey] };
|
|
3186
3186
|
else
|
|
3187
3187
|
throw new Error(o("errors.dataKeyUndefined", { dataKey: a.dataKey }));
|
|
3188
3188
|
else
|
|
3189
|
-
|
|
3189
|
+
w.value = { ...p };
|
|
3190
3190
|
Object.keys(a.configSchema).filter((L) => a.configSchema[L].forceShow).forEach((L) => {
|
|
3191
|
-
|
|
3192
|
-
}), r("fetch:success",
|
|
3193
|
-
} catch (
|
|
3194
|
-
const L = i(
|
|
3195
|
-
|
|
3191
|
+
w.value && typeof w.value[L] > "u" && (w.value[L] = null);
|
|
3192
|
+
}), r("fetch:success", p);
|
|
3193
|
+
} catch (p) {
|
|
3194
|
+
const L = i(p);
|
|
3195
|
+
N.value = L.startsWith("code") ? o("baseConfigCard.errors.load") : L, I.value = !0, r("fetch:error", p);
|
|
3196
3196
|
} finally {
|
|
3197
|
-
|
|
3197
|
+
g.value = !1;
|
|
3198
3198
|
}
|
|
3199
|
-
}), (
|
|
3200
|
-
const
|
|
3201
|
-
return
|
|
3199
|
+
}), (p, L) => {
|
|
3200
|
+
const C = R("KLabel"), f = R("KSelect"), K = R("KButton"), O = R("KSkeleton"), _ = R("KEmptyState"), x = R("KCard");
|
|
3201
|
+
return y(), V(x, {
|
|
3202
3202
|
class: "kong-ui-entity-base-config-card",
|
|
3203
3203
|
"title-tag": e.titleTag
|
|
3204
3204
|
}, je({
|
|
3205
3205
|
actions: v(() => [
|
|
3206
|
-
|
|
3207
|
-
Q(
|
|
3208
|
-
T(
|
|
3206
|
+
q("div", Ol, [
|
|
3207
|
+
Q(p.$slots, "actions", {}, void 0, !0),
|
|
3208
|
+
T(C, {
|
|
3209
3209
|
class: "config-format-select-label",
|
|
3210
3210
|
"data-testid": "config-format-select-label"
|
|
3211
3211
|
}, {
|
|
@@ -3214,59 +3214,59 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3214
3214
|
]),
|
|
3215
3215
|
_: 1
|
|
3216
3216
|
}),
|
|
3217
|
-
T(
|
|
3217
|
+
T(f, {
|
|
3218
3218
|
"data-testid": "select-config-format",
|
|
3219
3219
|
items: u,
|
|
3220
3220
|
onChange: c
|
|
3221
3221
|
}),
|
|
3222
|
-
e.configCardDoc ? (
|
|
3222
|
+
e.configCardDoc ? (y(), V(K, {
|
|
3223
3223
|
key: 0,
|
|
3224
3224
|
appearance: "tertiary",
|
|
3225
3225
|
class: "book-icon",
|
|
3226
3226
|
"data-testid": "book-icon"
|
|
3227
3227
|
}, {
|
|
3228
3228
|
default: v(() => [
|
|
3229
|
-
|
|
3229
|
+
q("a", {
|
|
3230
3230
|
href: e.configCardDoc,
|
|
3231
3231
|
rel: "noopener",
|
|
3232
3232
|
target: "_blank"
|
|
3233
3233
|
}, [
|
|
3234
|
-
T(
|
|
3235
|
-
], 8,
|
|
3234
|
+
T(m(vl), { size: m(ba) }, null, 8, ["size"])
|
|
3235
|
+
], 8, Ml)
|
|
3236
3236
|
]),
|
|
3237
3237
|
_: 1
|
|
3238
3238
|
})) : z("", !0)
|
|
3239
3239
|
])
|
|
3240
3240
|
]),
|
|
3241
3241
|
default: v(() => [
|
|
3242
|
-
|
|
3242
|
+
g.value ? (y(), V(O, {
|
|
3243
3243
|
key: 0,
|
|
3244
3244
|
"data-testid": "config-card-loader",
|
|
3245
3245
|
"table-columns": 2,
|
|
3246
3246
|
type: "table"
|
|
3247
|
-
})) :
|
|
3247
|
+
})) : I.value ? (y(), V(_, {
|
|
3248
3248
|
key: 1,
|
|
3249
3249
|
"data-testid": "config-card-fetch-error",
|
|
3250
3250
|
"icon-variant": "error"
|
|
3251
3251
|
}, {
|
|
3252
3252
|
default: v(() => [
|
|
3253
|
-
|
|
3253
|
+
q("h3", null, j(N.value), 1)
|
|
3254
3254
|
]),
|
|
3255
3255
|
_: 1
|
|
3256
3256
|
})) : z("", !0),
|
|
3257
|
-
|
|
3257
|
+
q("div", El, [
|
|
3258
3258
|
T(il, {
|
|
3259
3259
|
config: e.config,
|
|
3260
|
-
"fetcher-url":
|
|
3260
|
+
"fetcher-url": h.value,
|
|
3261
3261
|
format: d.value,
|
|
3262
|
-
"prop-list-types":
|
|
3263
|
-
"property-collections":
|
|
3264
|
-
record:
|
|
3262
|
+
"prop-list-types": b.value,
|
|
3263
|
+
"property-collections": H.value,
|
|
3264
|
+
record: w.value
|
|
3265
3265
|
}, je({ _: 2 }, [
|
|
3266
|
-
pe(Object.keys(
|
|
3266
|
+
pe(Object.keys(p.$slots), (B) => ({
|
|
3267
3267
|
name: B,
|
|
3268
3268
|
fn: v(({ row: D, rowValue: P }) => [
|
|
3269
|
-
Q(
|
|
3269
|
+
Q(p.$slots, B, {
|
|
3270
3270
|
row: D,
|
|
3271
3271
|
rowValue: P
|
|
3272
3272
|
}, void 0, !0)
|
|
@@ -3280,9 +3280,9 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3280
3280
|
e.hideTitle ? void 0 : {
|
|
3281
3281
|
name: "title",
|
|
3282
3282
|
fn: v(() => [
|
|
3283
|
-
|
|
3284
|
-
Q(
|
|
3285
|
-
J(j(
|
|
3283
|
+
q("span", Nl, [
|
|
3284
|
+
Q(p.$slots, "title", {}, () => [
|
|
3285
|
+
J(j(m(o)("baseConfigCard.title")), 1)
|
|
3286
3286
|
], !0)
|
|
3287
3287
|
])
|
|
3288
3288
|
]),
|
|
@@ -3294,7 +3294,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3294
3294
|
}), ql = /* @__PURE__ */ me(Fl, [["__scopeId", "data-v-f40a683b"]]), Kl = ["novalidate"], Bl = {
|
|
3295
3295
|
class: "form-actions",
|
|
3296
3296
|
"data-testid": "form-actions"
|
|
3297
|
-
}, Ll = /* @__PURE__ */
|
|
3297
|
+
}, Ll = /* @__PURE__ */ Y({
|
|
3298
3298
|
__name: "EntityBaseForm",
|
|
3299
3299
|
props: {
|
|
3300
3300
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3356,19 +3356,19 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3356
3356
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3357
3357
|
setup(e, { emit: t }) {
|
|
3358
3358
|
var n;
|
|
3359
|
-
const r = t, a = e, o =
|
|
3360
|
-
var
|
|
3361
|
-
let
|
|
3362
|
-
return a.config.app === "konnect" ?
|
|
3363
|
-
}),
|
|
3364
|
-
|
|
3365
|
-
},
|
|
3366
|
-
a.config.cancelRoute ? o.push(a.config.cancelRoute) :
|
|
3367
|
-
},
|
|
3359
|
+
const r = t, a = e, o = _t(), { i18n: { t: i } } = ne.useI18n(), { getMessageFromError: l } = ne.useErrors(), { axiosInstance: s } = ne.useAxios((n = a.config) == null ? void 0 : n.axiosRequestConfig), u = F(!1), d = F(!1), c = F(""), k = S(() => a.canSubmit === !1 || a.isReadonly), g = F(!1), I = S(() => {
|
|
3360
|
+
var b, h;
|
|
3361
|
+
let p = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3362
|
+
return a.config.app === "konnect" ? p = p.replace(/{controlPlaneId}/gi, ((b = a.config) == null ? void 0 : b.controlPlaneId) || "") : a.config.app === "kongManager" && (p = p.replace(/\/{workspace}/gi, (h = a.config) != null && h.workspace ? `/${a.config.workspace}` : "")), a.editId ? (p = p.replace(/{id}/gi, a.editId), p) : (p = p.replace(/\/{id}/gi, ""), p);
|
|
3363
|
+
}), N = () => {
|
|
3364
|
+
g.value = !g.value;
|
|
3365
|
+
}, w = () => {
|
|
3366
|
+
a.config.cancelRoute ? o.push(a.config.cancelRoute) : U();
|
|
3367
|
+
}, U = () => {
|
|
3368
3368
|
r("cancel");
|
|
3369
|
-
},
|
|
3370
|
-
|
|
3371
|
-
},
|
|
3369
|
+
}, A = () => {
|
|
3370
|
+
k.value || r("submit");
|
|
3371
|
+
}, H = F([
|
|
3372
3372
|
{
|
|
3373
3373
|
title: i("baseForm.configuration.yaml"),
|
|
3374
3374
|
hash: "#yaml"
|
|
@@ -3378,108 +3378,108 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3378
3378
|
hash: "#json"
|
|
3379
3379
|
}
|
|
3380
3380
|
]);
|
|
3381
|
-
return be(() => u.value, (
|
|
3382
|
-
r("loading",
|
|
3381
|
+
return be(() => u.value, (b) => {
|
|
3382
|
+
r("loading", b);
|
|
3383
3383
|
}, { immediate: !0 }), wt(async () => {
|
|
3384
3384
|
if (a.editId)
|
|
3385
3385
|
try {
|
|
3386
3386
|
d.value = !1, u.value = !0;
|
|
3387
|
-
const { data:
|
|
3388
|
-
r("fetch:success",
|
|
3389
|
-
} catch (
|
|
3390
|
-
const
|
|
3391
|
-
c.value =
|
|
3387
|
+
const { data: b } = await s.get(I.value);
|
|
3388
|
+
r("fetch:success", b);
|
|
3389
|
+
} catch (b) {
|
|
3390
|
+
const h = l(b);
|
|
3391
|
+
c.value = h.startsWith("code") ? i("baseForm.errors.edit") : h, d.value = !0, r("fetch:error", b);
|
|
3392
3392
|
} finally {
|
|
3393
3393
|
u.value = !1;
|
|
3394
3394
|
}
|
|
3395
|
-
}), (
|
|
3396
|
-
const
|
|
3397
|
-
return
|
|
3395
|
+
}), (b, h) => {
|
|
3396
|
+
const p = R("KSkeleton"), L = R("KEmptyState"), C = R("KAlert"), f = R("KButton"), K = R("KTabs"), O = R("KSlideout"), _ = R("KCard");
|
|
3397
|
+
return y(), V(_, { class: "kong-ui-entity-base-form" }, {
|
|
3398
3398
|
default: v(() => [
|
|
3399
|
-
u.value ? (
|
|
3399
|
+
u.value ? (y(), V(p, {
|
|
3400
3400
|
key: 0,
|
|
3401
3401
|
type: "form"
|
|
3402
|
-
})) : d.value ? (
|
|
3402
|
+
})) : d.value ? (y(), V(L, {
|
|
3403
3403
|
key: 1,
|
|
3404
|
-
"action-button-text":
|
|
3404
|
+
"action-button-text": m(i)("baseForm.actions.back"),
|
|
3405
3405
|
"data-testid": "form-fetch-error",
|
|
3406
3406
|
"icon-variant": "error",
|
|
3407
|
-
onClickAction:
|
|
3407
|
+
onClickAction: w
|
|
3408
3408
|
}, {
|
|
3409
3409
|
default: v(() => [
|
|
3410
|
-
|
|
3410
|
+
q("h3", null, j(c.value), 1)
|
|
3411
3411
|
]),
|
|
3412
3412
|
_: 1
|
|
3413
|
-
}, 8, ["action-button-text"])) : (
|
|
3413
|
+
}, 8, ["action-button-text"])) : (y(), E("form", {
|
|
3414
3414
|
key: 2,
|
|
3415
3415
|
"data-testid": "form-content",
|
|
3416
3416
|
novalidate: a.noValidate,
|
|
3417
|
-
onReset: gt(
|
|
3418
|
-
onSubmit: gt(
|
|
3417
|
+
onReset: gt(U, ["prevent"]),
|
|
3418
|
+
onSubmit: gt(A, ["prevent"])
|
|
3419
3419
|
}, [
|
|
3420
|
-
Q(
|
|
3421
|
-
e.errorMessage ? (
|
|
3420
|
+
Q(b.$slots, "default", {}, void 0, !0),
|
|
3421
|
+
e.errorMessage ? (y(), V(C, {
|
|
3422
3422
|
key: 0,
|
|
3423
3423
|
appearance: "danger",
|
|
3424
3424
|
"data-testid": "form-error",
|
|
3425
3425
|
message: e.errorMessage
|
|
3426
3426
|
}, null, 8, ["message"])) : z("", !0),
|
|
3427
|
-
|
|
3428
|
-
Q(
|
|
3429
|
-
T(
|
|
3427
|
+
q("div", Bl, [
|
|
3428
|
+
Q(b.$slots, "form-actions", {}, () => [
|
|
3429
|
+
T(f, {
|
|
3430
3430
|
appearance: "tertiary",
|
|
3431
3431
|
"data-testid": "form-view-configuration",
|
|
3432
|
-
onClick:
|
|
3432
|
+
onClick: h[0] || (h[0] = (x) => N())
|
|
3433
3433
|
}, {
|
|
3434
3434
|
default: v(() => [
|
|
3435
|
-
J(j(
|
|
3435
|
+
J(j(m(i)("baseForm.actions.viewConfiguration")), 1)
|
|
3436
3436
|
]),
|
|
3437
3437
|
_: 1
|
|
3438
3438
|
}),
|
|
3439
|
-
T(
|
|
3439
|
+
T(f, {
|
|
3440
3440
|
appearance: "secondary",
|
|
3441
3441
|
"data-testid": "form-cancel",
|
|
3442
3442
|
disabled: e.isReadonly,
|
|
3443
3443
|
type: "reset"
|
|
3444
3444
|
}, {
|
|
3445
3445
|
default: v(() => [
|
|
3446
|
-
J(j(
|
|
3446
|
+
J(j(m(i)("baseForm.actions.cancel")), 1)
|
|
3447
3447
|
]),
|
|
3448
3448
|
_: 1
|
|
3449
3449
|
}, 8, ["disabled"]),
|
|
3450
|
-
T(
|
|
3450
|
+
T(f, {
|
|
3451
3451
|
appearance: "primary",
|
|
3452
3452
|
"data-testid": "form-submit",
|
|
3453
|
-
disabled:
|
|
3453
|
+
disabled: k.value,
|
|
3454
3454
|
type: "submit"
|
|
3455
3455
|
}, {
|
|
3456
3456
|
default: v(() => [
|
|
3457
|
-
J(j(
|
|
3457
|
+
J(j(m(i)("baseForm.actions.save")), 1)
|
|
3458
3458
|
]),
|
|
3459
3459
|
_: 1
|
|
3460
3460
|
}, 8, ["disabled"])
|
|
3461
3461
|
], !0)
|
|
3462
3462
|
])
|
|
3463
3463
|
], 40, Kl)),
|
|
3464
|
-
T(
|
|
3464
|
+
T(O, {
|
|
3465
3465
|
"close-on-blur": !1,
|
|
3466
3466
|
"data-testid": "form-view-configuration-slideout",
|
|
3467
3467
|
"has-overlay": !1,
|
|
3468
3468
|
"offset-top": 60,
|
|
3469
|
-
title:
|
|
3470
|
-
visible:
|
|
3471
|
-
onClose:
|
|
3469
|
+
title: m(i)("baseForm.configuration.title"),
|
|
3470
|
+
visible: g.value,
|
|
3471
|
+
onClose: h[1] || (h[1] = (x) => N())
|
|
3472
3472
|
}, {
|
|
3473
3473
|
default: v(() => [
|
|
3474
|
-
|
|
3474
|
+
q("div", null, j(m(i)("baseForm.configuration.message")), 1),
|
|
3475
3475
|
T(K, {
|
|
3476
3476
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3477
|
-
tabs:
|
|
3477
|
+
tabs: H.value
|
|
3478
3478
|
}, {
|
|
3479
3479
|
json: v(() => [
|
|
3480
3480
|
T(Sn, {
|
|
3481
3481
|
config: e.config,
|
|
3482
|
-
"fetcher-url":
|
|
3482
|
+
"fetcher-url": I.value,
|
|
3483
3483
|
"json-record": a.formFields,
|
|
3484
3484
|
"request-method": a.editId ? "put" : "post"
|
|
3485
3485
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
@@ -3499,10 +3499,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3499
3499
|
});
|
|
3500
3500
|
};
|
|
3501
3501
|
}
|
|
3502
|
-
}), Ul = /* @__PURE__ */ me(Ll, [["__scopeId", "data-v-3def74fe"]]), Rl = {
|
|
3503
|
-
key: 0,
|
|
3504
|
-
"data-testid": "first-col"
|
|
3505
|
-
}, Vl = /* @__PURE__ */ W({
|
|
3502
|
+
}), Ul = /* @__PURE__ */ me(Ll, [["__scopeId", "data-v-3def74fe"]]), Rl = ["data-truncate"], Vl = /* @__PURE__ */ Y({
|
|
3506
3503
|
__name: "EntityBaseTableCell",
|
|
3507
3504
|
props: {
|
|
3508
3505
|
keyName: {
|
|
@@ -3512,71 +3509,83 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3512
3509
|
rowEl: {
|
|
3513
3510
|
type: [Object, null],
|
|
3514
3511
|
required: !0
|
|
3512
|
+
},
|
|
3513
|
+
tooltip: {
|
|
3514
|
+
type: Boolean,
|
|
3515
|
+
default: !1
|
|
3515
3516
|
}
|
|
3516
3517
|
},
|
|
3517
3518
|
setup(e) {
|
|
3518
|
-
const t = e, n =
|
|
3519
|
+
const t = e, n = S(() => {
|
|
3519
3520
|
var w;
|
|
3520
3521
|
return ((w = t.rowEl) == null ? void 0 : w.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3521
|
-
}), r =
|
|
3522
|
+
}), r = S(() => {
|
|
3522
3523
|
var w;
|
|
3523
|
-
return ((w = n.value) == null ? void 0 : w.querySelector('[data-
|
|
3524
|
-
}), a =
|
|
3525
|
-
var w,
|
|
3526
|
-
const
|
|
3527
|
-
return
|
|
3528
|
-
});
|
|
3529
|
-
let
|
|
3530
|
-
const
|
|
3531
|
-
|
|
3532
|
-
},
|
|
3533
|
-
var w,
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3524
|
+
return ((w = n.value) == null ? void 0 : w.querySelector('[data-truncate="true"]')) || null;
|
|
3525
|
+
}), a = S(() => {
|
|
3526
|
+
var w, U;
|
|
3527
|
+
const A = (w = t.rowEl) == null ? void 0 : w.querySelectorAll("td");
|
|
3528
|
+
return A ? ((U = A[0]) == null ? void 0 : U.getAttribute("data-testid")) === t.keyName : !1;
|
|
3529
|
+
}), o = S(() => a.value || t.tooltip);
|
|
3530
|
+
let i;
|
|
3531
|
+
const l = () => {
|
|
3532
|
+
i && (i.disconnect(), i = void 0);
|
|
3533
|
+
}, s = () => {
|
|
3534
|
+
var w, U, A;
|
|
3535
|
+
let H = ((w = n.value) == null ? void 0 : w.clientWidth) || 0;
|
|
3536
|
+
if (n.value && "getComputedStyle" in window) {
|
|
3537
|
+
const b = window.getComputedStyle(n.value);
|
|
3538
|
+
H -= (parseFloat(b.paddingLeft) || 0) + (parseFloat(b.paddingRight) || 0);
|
|
3539
|
+
}
|
|
3540
|
+
d.value = ((U = r.value) == null ? void 0 : U.getBoundingClientRect().width) || 0, c.value = H, k.value = ((A = u.value) == null ? void 0 : A.innerText) || "";
|
|
3541
|
+
}, u = F({}), d = F(0), c = F(0), k = F(""), g = S(() => [r.value, n.value]), I = be(
|
|
3542
|
+
g,
|
|
3537
3543
|
(w) => {
|
|
3538
|
-
if (
|
|
3539
|
-
|
|
3544
|
+
if (o.value && (l(), "ResizeObserver" in window && window)) {
|
|
3545
|
+
i = new ResizeObserver((U) => {
|
|
3540
3546
|
window.requestAnimationFrame(() => {
|
|
3541
|
-
!Array.isArray(
|
|
3547
|
+
!Array.isArray(U) || !U.length || s();
|
|
3542
3548
|
});
|
|
3543
3549
|
});
|
|
3544
|
-
for (const
|
|
3545
|
-
|
|
3550
|
+
for (const U of w)
|
|
3551
|
+
U && i.observe(U);
|
|
3546
3552
|
}
|
|
3547
3553
|
},
|
|
3548
3554
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3549
|
-
),
|
|
3555
|
+
), N = S(() => o.value ? d.value > c.value : !1);
|
|
3550
3556
|
return Sr(() => {
|
|
3551
|
-
|
|
3557
|
+
s();
|
|
3552
3558
|
}), xr(() => {
|
|
3553
|
-
|
|
3554
|
-
}), (w,
|
|
3555
|
-
const
|
|
3556
|
-
return
|
|
3559
|
+
I();
|
|
3560
|
+
}), (w, U) => {
|
|
3561
|
+
const A = R("KTooltip");
|
|
3562
|
+
return y(), E("span", {
|
|
3557
3563
|
ref_key: "contentRef",
|
|
3558
|
-
ref:
|
|
3564
|
+
ref: u,
|
|
3559
3565
|
class: "content-wrapper"
|
|
3560
3566
|
}, [
|
|
3561
|
-
|
|
3562
|
-
|
|
3567
|
+
o.value ? (y(), E("span", {
|
|
3568
|
+
key: 0,
|
|
3569
|
+
"data-truncate": o.value || void 0
|
|
3570
|
+
}, [
|
|
3571
|
+
T(A, {
|
|
3563
3572
|
"max-width": "300",
|
|
3564
3573
|
placement: "bottomStart",
|
|
3565
|
-
text:
|
|
3574
|
+
text: N.value ? k.value : ""
|
|
3566
3575
|
}, {
|
|
3567
3576
|
default: v(() => [
|
|
3568
3577
|
Q(w.$slots, "default", {}, void 0, !0)
|
|
3569
3578
|
]),
|
|
3570
3579
|
_: 3
|
|
3571
3580
|
}, 8, ["text"])
|
|
3572
|
-
])) : Q(w.$slots, "default", { key: 1 }, void 0, !0)
|
|
3581
|
+
], 8, Rl)) : Q(w.$slots, "default", { key: 1 }, void 0, !0)
|
|
3573
3582
|
], 512);
|
|
3574
3583
|
};
|
|
3575
3584
|
}
|
|
3576
|
-
}), Dl = /* @__PURE__ */ me(Vl, [["__scopeId", "data-v-
|
|
3585
|
+
}), Dl = /* @__PURE__ */ me(Vl, [["__scopeId", "data-v-6019026f"]]), Pl = { class: "toolbar-container" }, Gl = {
|
|
3577
3586
|
key: 0,
|
|
3578
3587
|
class: "toolbar-button-container"
|
|
3579
|
-
}, zl = ["data-testid"], Jl = /* @__PURE__ */
|
|
3588
|
+
}, zl = ["data-testid"], Jl = /* @__PURE__ */ Y({
|
|
3580
3589
|
__name: "EntityBaseTable",
|
|
3581
3590
|
props: {
|
|
3582
3591
|
// table header configuration
|
|
@@ -3690,67 +3699,67 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3690
3699
|
},
|
|
3691
3700
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3692
3701
|
setup(e, { emit: t }) {
|
|
3693
|
-
const n = e, r = t, { i18n: { t: a } } = ne.useI18n(), o =
|
|
3694
|
-
var
|
|
3702
|
+
const n = e, r = t, { i18n: { t: a } } = ne.useI18n(), o = S(() => {
|
|
3703
|
+
var h, p;
|
|
3695
3704
|
return typeof n.errorMessage == "string" ? {
|
|
3696
3705
|
hasError: !!n.errorMessage,
|
|
3697
3706
|
title: n.errorMessage,
|
|
3698
3707
|
message: void 0
|
|
3699
3708
|
} : {
|
|
3700
3709
|
hasError: !!n.errorMessage,
|
|
3701
|
-
title: (
|
|
3702
|
-
message: (
|
|
3710
|
+
title: (h = n.errorMessage) == null ? void 0 : h.title,
|
|
3711
|
+
message: (p = n.errorMessage) == null ? void 0 : p.message
|
|
3703
3712
|
};
|
|
3704
|
-
}), i =
|
|
3705
|
-
const
|
|
3706
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3707
|
-
const L = n.tableHeaders[
|
|
3708
|
-
|
|
3709
|
-
label: L.label ??
|
|
3710
|
-
key:
|
|
3713
|
+
}), i = S(() => n.cacheIdentifier || n.preferencesStorageKey), l = (h) => h.hasData || !!n.query, s = S(() => {
|
|
3714
|
+
const h = [];
|
|
3715
|
+
return Object.keys(n.tableHeaders).forEach((p) => {
|
|
3716
|
+
const L = n.tableHeaders[p];
|
|
3717
|
+
h.push({
|
|
3718
|
+
label: L.label ?? p,
|
|
3719
|
+
key: p,
|
|
3711
3720
|
sortable: L.sortable ?? !1
|
|
3712
3721
|
});
|
|
3713
|
-
}), n.enableEntityActions &&
|
|
3722
|
+
}), n.enableEntityActions && h.push({
|
|
3714
3723
|
key: "actions",
|
|
3715
3724
|
hideLabel: !0
|
|
3716
|
-
}),
|
|
3717
|
-
}), u = (
|
|
3718
|
-
"data-rowid":
|
|
3719
|
-
"data-testid":
|
|
3720
|
-
...n.rowAttributes(
|
|
3721
|
-
}), d =
|
|
3722
|
-
var
|
|
3723
|
-
return (
|
|
3724
|
-
},
|
|
3725
|
-
const
|
|
3726
|
-
"data-testid":
|
|
3727
|
-
...n.cellAttributes(
|
|
3725
|
+
}), h;
|
|
3726
|
+
}), u = (h) => ({
|
|
3727
|
+
"data-rowid": h.id,
|
|
3728
|
+
"data-testid": h.name,
|
|
3729
|
+
...n.rowAttributes(h)
|
|
3730
|
+
}), d = F({}), c = (h) => {
|
|
3731
|
+
var p;
|
|
3732
|
+
return (p = d.value) == null ? void 0 : p.$el.querySelector(`[data-rowid="${h.id}"]`);
|
|
3733
|
+
}, k = (h) => {
|
|
3734
|
+
const p = {
|
|
3735
|
+
"data-testid": h.headerKey,
|
|
3736
|
+
...n.cellAttributes(h)
|
|
3728
3737
|
};
|
|
3729
|
-
return
|
|
3738
|
+
return h.colIndex === 0 && (p.style = {
|
|
3730
3739
|
maxWidth: "250px",
|
|
3731
3740
|
overflowX: "hidden",
|
|
3732
3741
|
textOverflow: "ellipsis"
|
|
3733
|
-
}),
|
|
3734
|
-
},
|
|
3735
|
-
r("empty-state-cta-clicked"),
|
|
3736
|
-
},
|
|
3742
|
+
}), p;
|
|
3743
|
+
}, g = () => {
|
|
3744
|
+
r("empty-state-cta-clicked"), I();
|
|
3745
|
+
}, I = () => {
|
|
3737
3746
|
r("clear-search-input");
|
|
3738
|
-
},
|
|
3739
|
-
r("click:row",
|
|
3740
|
-
}),
|
|
3741
|
-
r("sort",
|
|
3742
|
-
}, { setTablePreferences:
|
|
3743
|
-
const
|
|
3747
|
+
}, N = S(() => n.disableRowClick ? void 0 : (h, p) => {
|
|
3748
|
+
r("click:row", p);
|
|
3749
|
+
}), w = (h) => {
|
|
3750
|
+
r("sort", h);
|
|
3751
|
+
}, { setTablePreferences: U, getTablePreferences: A } = Kr(), H = S(() => {
|
|
3752
|
+
const h = A(n.preferencesStorageKey);
|
|
3744
3753
|
return {
|
|
3745
3754
|
...n.initialFetcherParams,
|
|
3746
|
-
...
|
|
3755
|
+
...h
|
|
3747
3756
|
};
|
|
3748
|
-
}),
|
|
3749
|
-
n.preferencesStorageKey &&
|
|
3757
|
+
}), b = (h) => {
|
|
3758
|
+
n.preferencesStorageKey && U(n.preferencesStorageKey, h);
|
|
3750
3759
|
};
|
|
3751
|
-
return (
|
|
3752
|
-
const L =
|
|
3753
|
-
return
|
|
3760
|
+
return (h, p) => {
|
|
3761
|
+
const L = R("KIcon"), C = R("KButton"), f = R("KDropdown"), K = R("KTable"), O = R("KCard");
|
|
3762
|
+
return y(), V(O, {
|
|
3754
3763
|
class: "kong-ui-entity-base-table",
|
|
3755
3764
|
title: e.title,
|
|
3756
3765
|
"title-tag": e.titleTag
|
|
@@ -3760,14 +3769,14 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3760
3769
|
ref_key: "tableRefs",
|
|
3761
3770
|
ref: d,
|
|
3762
3771
|
"cache-identifier": i.value,
|
|
3763
|
-
"cell-attrs":
|
|
3772
|
+
"cell-attrs": k,
|
|
3764
3773
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3765
3774
|
"disable-sorting": e.disableSorting,
|
|
3766
|
-
"empty-state-action-message": e.query ?
|
|
3775
|
+
"empty-state-action-message": e.query ? m(a)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3767
3776
|
"empty-state-action-route": e.query ? void 0 : e.emptyStateOptions.ctaPath,
|
|
3768
3777
|
"empty-state-icon-variant": e.query ? "search" : "kong",
|
|
3769
|
-
"empty-state-message": e.query ?
|
|
3770
|
-
"empty-state-title": e.query ?
|
|
3778
|
+
"empty-state-message": e.query ? m(a)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3779
|
+
"empty-state-title": e.query ? m(a)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3771
3780
|
"enable-client-sort": e.enableClientSort,
|
|
3772
3781
|
"error-state-message": o.value.message,
|
|
3773
3782
|
"error-state-title": o.value.title,
|
|
@@ -3776,51 +3785,51 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3776
3785
|
"has-error": o.value.hasError,
|
|
3777
3786
|
headers: s.value,
|
|
3778
3787
|
"hide-pagination-when-optional": "",
|
|
3779
|
-
"initial-fetcher-params":
|
|
3788
|
+
"initial-fetcher-params": H.value,
|
|
3780
3789
|
"is-loading": e.isLoading,
|
|
3781
3790
|
"pagination-type": e.paginationType,
|
|
3782
3791
|
"row-attrs": u,
|
|
3783
3792
|
"search-input": e.query,
|
|
3784
|
-
onKtableEmptyStateCtaClicked:
|
|
3785
|
-
"onRow:click":
|
|
3786
|
-
onSort:
|
|
3787
|
-
"onUpdate:tablePreferences":
|
|
3793
|
+
onKtableEmptyStateCtaClicked: g,
|
|
3794
|
+
"onRow:click": N.value,
|
|
3795
|
+
onSort: p[0] || (p[0] = (_) => w(_)),
|
|
3796
|
+
"onUpdate:tablePreferences": b
|
|
3788
3797
|
}, je({
|
|
3789
|
-
toolbar: v(({ state:
|
|
3790
|
-
Ce(
|
|
3791
|
-
Q(
|
|
3792
|
-
|
|
3793
|
-
Q(
|
|
3798
|
+
toolbar: v(({ state: _ }) => [
|
|
3799
|
+
Ce(q("div", Pl, [
|
|
3800
|
+
Q(h.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3801
|
+
h.$slots["toolbar-button"] ? (y(), E("div", Gl, [
|
|
3802
|
+
Q(h.$slots, "toolbar-button", {}, void 0, !0)
|
|
3794
3803
|
])) : z("", !0)
|
|
3795
3804
|
], 512), [
|
|
3796
|
-
[we, l(
|
|
3805
|
+
[we, l(_)]
|
|
3797
3806
|
])
|
|
3798
3807
|
]),
|
|
3799
|
-
actions: v(({ row:
|
|
3800
|
-
|
|
3808
|
+
actions: v(({ row: _, rowKey: x, rowValue: B }) => [
|
|
3809
|
+
q("div", {
|
|
3801
3810
|
class: "actions-container",
|
|
3802
|
-
"data-testid":
|
|
3811
|
+
"data-testid": _.name
|
|
3803
3812
|
}, [
|
|
3804
|
-
T(
|
|
3813
|
+
T(f, {
|
|
3805
3814
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3806
3815
|
width: e.dropdownMenuWidth
|
|
3807
3816
|
}, {
|
|
3808
3817
|
items: v(() => [
|
|
3809
|
-
Q(
|
|
3810
|
-
row:
|
|
3818
|
+
Q(h.$slots, "actions", {
|
|
3819
|
+
row: _,
|
|
3811
3820
|
rowKey: x,
|
|
3812
3821
|
rowValue: B
|
|
3813
3822
|
}, void 0, !0)
|
|
3814
3823
|
]),
|
|
3815
3824
|
default: v(() => [
|
|
3816
|
-
T(
|
|
3825
|
+
T(C, {
|
|
3817
3826
|
class: "actions-trigger",
|
|
3818
3827
|
"data-testid": "overflow-actions-button",
|
|
3819
3828
|
size: "small"
|
|
3820
3829
|
}, {
|
|
3821
3830
|
icon: v(() => [
|
|
3822
3831
|
T(L, {
|
|
3823
|
-
color:
|
|
3832
|
+
color: m(ha),
|
|
3824
3833
|
icon: "more",
|
|
3825
3834
|
size: "16"
|
|
3826
3835
|
}, null, 8, ["color"])
|
|
@@ -3834,15 +3843,16 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3834
3843
|
]),
|
|
3835
3844
|
_: 2
|
|
3836
3845
|
}, [
|
|
3837
|
-
pe(e.tableHeaders, (
|
|
3846
|
+
pe(e.tableHeaders, (_, x) => ({
|
|
3838
3847
|
name: x,
|
|
3839
3848
|
fn: v(({ row: B, rowKey: D, rowValue: P }) => [
|
|
3840
3849
|
T(Dl, {
|
|
3841
3850
|
"key-name": String(x),
|
|
3842
|
-
"row-el": c(B)
|
|
3851
|
+
"row-el": c(B),
|
|
3852
|
+
tooltip: _.tooltip
|
|
3843
3853
|
}, {
|
|
3844
3854
|
default: v(() => [
|
|
3845
|
-
Q(
|
|
3855
|
+
Q(h.$slots, x, {
|
|
3846
3856
|
row: B,
|
|
3847
3857
|
rowKey: D,
|
|
3848
3858
|
rowValue: P
|
|
@@ -3851,13 +3861,13 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3851
3861
|
], !0)
|
|
3852
3862
|
]),
|
|
3853
3863
|
_: 2
|
|
3854
|
-
}, 1032, ["key-name", "row-el"])
|
|
3864
|
+
}, 1032, ["key-name", "row-el", "tooltip"])
|
|
3855
3865
|
])
|
|
3856
3866
|
})),
|
|
3857
3867
|
e.query ? void 0 : {
|
|
3858
3868
|
name: "empty-state-action-icon",
|
|
3859
3869
|
fn: v(() => [
|
|
3860
|
-
T(
|
|
3870
|
+
T(m(pl))
|
|
3861
3871
|
]),
|
|
3862
3872
|
key: "0"
|
|
3863
3873
|
}
|
|
@@ -3867,13 +3877,13 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3867
3877
|
}, 8, ["title", "title-tag"]);
|
|
3868
3878
|
};
|
|
3869
3879
|
}
|
|
3870
|
-
}), Hl = /* @__PURE__ */ me(Jl, [["__scopeId", "data-v-
|
|
3880
|
+
}), Hl = /* @__PURE__ */ me(Jl, [["__scopeId", "data-v-adb02213"]]), Wl = {
|
|
3871
3881
|
key: 0,
|
|
3872
3882
|
class: "kong-ui-entity-delete-error"
|
|
3873
3883
|
}, Yl = {
|
|
3874
3884
|
key: 1,
|
|
3875
3885
|
class: "description"
|
|
3876
|
-
}, Zl = /* @__PURE__ */
|
|
3886
|
+
}, Zl = /* @__PURE__ */ Y({
|
|
3877
3887
|
__name: "EntityDeleteModal",
|
|
3878
3888
|
props: {
|
|
3879
3889
|
visible: {
|
|
@@ -3912,14 +3922,14 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3912
3922
|
},
|
|
3913
3923
|
emits: ["cancel", "proceed"],
|
|
3914
3924
|
setup(e, { emit: t }) {
|
|
3915
|
-
const { i18nT: n } = ne.useI18n(), r = e, a = t, o =
|
|
3925
|
+
const { i18nT: n } = ne.useI18n(), r = e, a = t, o = S(() => r.needConfirm ? r.entityName : ""), i = () => {
|
|
3916
3926
|
a("cancel");
|
|
3917
3927
|
}, l = () => {
|
|
3918
3928
|
a("proceed");
|
|
3919
3929
|
};
|
|
3920
3930
|
return (s, u) => {
|
|
3921
|
-
const d =
|
|
3922
|
-
return
|
|
3931
|
+
const d = R("KAlert"), c = R("KPrompt");
|
|
3932
|
+
return y(), V(c, {
|
|
3923
3933
|
"action-button-appearance": "danger",
|
|
3924
3934
|
"action-button-disabled": e.actionPending,
|
|
3925
3935
|
"action-button-text": "Yes, delete",
|
|
@@ -3931,7 +3941,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3931
3941
|
onProceed: l
|
|
3932
3942
|
}, {
|
|
3933
3943
|
default: v(() => [
|
|
3934
|
-
e.error ? (
|
|
3944
|
+
e.error ? (y(), E("div", Wl, [
|
|
3935
3945
|
T(d, { appearance: "danger" }, {
|
|
3936
3946
|
default: v(() => [
|
|
3937
3947
|
J(j(e.error), 1)
|
|
@@ -3939,7 +3949,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3939
3949
|
_: 1
|
|
3940
3950
|
})
|
|
3941
3951
|
])) : z("", !0),
|
|
3942
|
-
T(
|
|
3952
|
+
T(m(n), {
|
|
3943
3953
|
class: "message",
|
|
3944
3954
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3945
3955
|
tag: "p"
|
|
@@ -3952,14 +3962,14 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3952
3962
|
r.entityName ? {
|
|
3953
3963
|
name: "entityName",
|
|
3954
3964
|
fn: v(() => [
|
|
3955
|
-
|
|
3965
|
+
q("strong", null, j(r.entityName), 1)
|
|
3956
3966
|
]),
|
|
3957
3967
|
key: "0"
|
|
3958
3968
|
} : void 0
|
|
3959
3969
|
]), 1032, ["keypath"]),
|
|
3960
|
-
r.description || s.$slots.description ? (
|
|
3970
|
+
r.description || s.$slots.description ? (y(), E("div", Yl, [
|
|
3961
3971
|
Q(s.$slots, "description", {}, () => [
|
|
3962
|
-
|
|
3972
|
+
q("p", null, j(r.description), 1)
|
|
3963
3973
|
], !0)
|
|
3964
3974
|
])) : z("", !0)
|
|
3965
3975
|
]),
|
|
@@ -3981,7 +3991,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3981
3991
|
width: "20",
|
|
3982
3992
|
x: "0",
|
|
3983
3993
|
y: "0"
|
|
3984
|
-
}, ts = ["fill"], ns = { mask: "url(#mask0_180_20349)" }, rs = ["fill"], pn = /* @__PURE__ */
|
|
3994
|
+
}, ts = ["fill"], ns = { mask: "url(#mask0_180_20349)" }, rs = ["fill"], pn = /* @__PURE__ */ Y({
|
|
3985
3995
|
__name: "IconFilter",
|
|
3986
3996
|
props: {
|
|
3987
3997
|
color: {
|
|
@@ -3990,16 +4000,16 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
3990
4000
|
}
|
|
3991
4001
|
},
|
|
3992
4002
|
setup(e) {
|
|
3993
|
-
return (t, n) => (
|
|
3994
|
-
|
|
3995
|
-
|
|
4003
|
+
return (t, n) => (y(), E("svg", Xl, [
|
|
4004
|
+
q("mask", es, [
|
|
4005
|
+
q("rect", {
|
|
3996
4006
|
fill: e.color,
|
|
3997
4007
|
height: "20",
|
|
3998
4008
|
width: "20"
|
|
3999
4009
|
}, null, 8, ts)
|
|
4000
4010
|
]),
|
|
4001
|
-
|
|
4002
|
-
|
|
4011
|
+
q("g", ns, [
|
|
4012
|
+
q("path", {
|
|
4003
4013
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
4004
4014
|
fill: e.color
|
|
4005
4015
|
}, null, 8, rs)
|
|
@@ -4009,7 +4019,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
4009
4019
|
}), as = {
|
|
4010
4020
|
key: 1,
|
|
4011
4021
|
class: "kong-ui-entity-filter"
|
|
4012
|
-
}, os = { class: "kong-ui-entity-filter-menu" }, is = ["data-testid"], ls = ["onClick", "onKeydown"], ss = { class: "menu-item-indicator" }, us = { class: "menu-item-body" }, cs = ["for"], ds = { class: "menu-item-buttons" }, ps = { class: "filter-clear-button-container" }, fs = /* @__PURE__ */
|
|
4022
|
+
}, os = { class: "kong-ui-entity-filter-menu" }, is = ["data-testid"], ls = ["onClick", "onKeydown"], ss = { class: "menu-item-indicator" }, us = { class: "menu-item-body" }, cs = ["for"], ds = { class: "menu-item-buttons" }, ps = { class: "filter-clear-button-container" }, fs = /* @__PURE__ */ Y({
|
|
4013
4023
|
__name: "EntityFilter",
|
|
4014
4024
|
props: {
|
|
4015
4025
|
// filter config, either exact match or fuzzy match
|
|
@@ -4029,76 +4039,79 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
4029
4039
|
},
|
|
4030
4040
|
emits: ["update:modelValue"],
|
|
4031
4041
|
setup(e, { emit: t }) {
|
|
4032
|
-
const { i18n: { t: n } } = ne.useI18n(), r = e, a = t, o =
|
|
4033
|
-
const
|
|
4034
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
4035
|
-
|
|
4036
|
-
}),
|
|
4037
|
-
}), u =
|
|
4038
|
-
const
|
|
4039
|
-
return Object.keys(
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
+
const { i18n: { t: n } } = ne.useI18n(), r = e, a = t, o = F(!1), i = F({}), l = F(/* @__PURE__ */ new Set()), s = S(() => {
|
|
4043
|
+
const b = [];
|
|
4044
|
+
return new URLSearchParams(r.modelValue).forEach((h, p) => {
|
|
4045
|
+
h !== "" && b.push(p);
|
|
4046
|
+
}), b;
|
|
4047
|
+
}), u = S(() => {
|
|
4048
|
+
const b = r.config.fields;
|
|
4049
|
+
return Object.keys(b).filter((h) => {
|
|
4050
|
+
var p;
|
|
4051
|
+
return (p = b == null ? void 0 : b[h]) == null ? void 0 : p.searchable;
|
|
4052
|
+
}).map((h) => ({
|
|
4053
|
+
label: b[h].label || h,
|
|
4054
|
+
value: h,
|
|
4042
4055
|
expanded: !1
|
|
4043
4056
|
}));
|
|
4044
4057
|
});
|
|
4045
|
-
be(() => r.modelValue, (
|
|
4046
|
-
i.value = {}, new URLSearchParams(
|
|
4047
|
-
i.value[
|
|
4058
|
+
be(() => r.modelValue, (b) => {
|
|
4059
|
+
i.value = {}, new URLSearchParams(b).forEach((h, p) => {
|
|
4060
|
+
i.value[p] = h;
|
|
4048
4061
|
});
|
|
4049
4062
|
});
|
|
4050
4063
|
const d = () => {
|
|
4051
4064
|
o.value = !o.value;
|
|
4052
|
-
}, c = (
|
|
4053
|
-
l.value.has(
|
|
4054
|
-
},
|
|
4055
|
-
a("update:modelValue",
|
|
4056
|
-
},
|
|
4057
|
-
|
|
4058
|
-
},
|
|
4059
|
-
var
|
|
4060
|
-
return (((
|
|
4065
|
+
}, c = (b) => {
|
|
4066
|
+
l.value.has(b) ? l.value.delete(b) : l.value.add(b);
|
|
4067
|
+
}, k = (b) => {
|
|
4068
|
+
a("update:modelValue", b);
|
|
4069
|
+
}, g = () => {
|
|
4070
|
+
k("");
|
|
4071
|
+
}, I = (b) => `filter-${b}`, N = (b) => {
|
|
4072
|
+
var h, p;
|
|
4073
|
+
return (((p = (h = r.config.schema) == null ? void 0 : h[b]) == null ? void 0 : p.values) ?? []).map((L) => ({
|
|
4061
4074
|
value: L,
|
|
4062
4075
|
label: L
|
|
4063
4076
|
}));
|
|
4064
|
-
},
|
|
4065
|
-
var
|
|
4066
|
-
return ((
|
|
4067
|
-
},
|
|
4077
|
+
}, w = (b) => {
|
|
4078
|
+
var h, p;
|
|
4079
|
+
return ((p = (h = r.config.schema) == null ? void 0 : h[b]) == null ? void 0 : p.type) ?? "text";
|
|
4080
|
+
}, U = (b) => {
|
|
4068
4081
|
i.value = {
|
|
4069
4082
|
...i.value,
|
|
4070
|
-
[
|
|
4071
|
-
},
|
|
4072
|
-
},
|
|
4073
|
-
i.value = {},
|
|
4074
|
-
},
|
|
4075
|
-
const
|
|
4076
|
-
|
|
4083
|
+
[b]: ""
|
|
4084
|
+
}, H();
|
|
4085
|
+
}, A = () => {
|
|
4086
|
+
i.value = {}, H(!0);
|
|
4087
|
+
}, H = (b = !1) => {
|
|
4088
|
+
const h = Object.keys(i.value).reduce((p, L) => (i.value[L] && (p[L] = `${i.value[L]}`), p), {});
|
|
4089
|
+
b && (o.value = !1), a("update:modelValue", new URLSearchParams(h).toString());
|
|
4077
4090
|
};
|
|
4078
|
-
return (
|
|
4079
|
-
const
|
|
4080
|
-
return e.config.isExactMatch ? (
|
|
4091
|
+
return (b, h) => {
|
|
4092
|
+
const p = R("KInput"), L = R("KButton"), C = R("KSelect");
|
|
4093
|
+
return e.config.isExactMatch ? (y(), V(p, {
|
|
4081
4094
|
key: 0,
|
|
4082
4095
|
autocomplete: "off",
|
|
4083
4096
|
class: "kong-ui-entity-filter-input",
|
|
4084
4097
|
"data-testid": "search-input",
|
|
4085
4098
|
"model-value": e.modelValue,
|
|
4086
4099
|
placeholder: e.config.placeholder,
|
|
4087
|
-
"onUpdate:modelValue":
|
|
4100
|
+
"onUpdate:modelValue": k
|
|
4088
4101
|
}, {
|
|
4089
4102
|
before: v(() => [
|
|
4090
4103
|
T(pn)
|
|
4091
4104
|
]),
|
|
4092
4105
|
after: v(() => [
|
|
4093
|
-
Ce(T(
|
|
4106
|
+
Ce(T(m(jl), {
|
|
4094
4107
|
class: "kong-ui-entity-filter-clear",
|
|
4095
|
-
onClick:
|
|
4108
|
+
onClick: g
|
|
4096
4109
|
}, null, 512), [
|
|
4097
4110
|
[we, e.modelValue !== ""]
|
|
4098
4111
|
])
|
|
4099
4112
|
]),
|
|
4100
4113
|
_: 1
|
|
4101
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
4114
|
+
}, 8, ["model-value", "placeholder"])) : (y(), E("div", as, [
|
|
4102
4115
|
T(L, {
|
|
4103
4116
|
appearance: "tertiary",
|
|
4104
4117
|
"data-testid": "filter-button",
|
|
@@ -4106,73 +4119,73 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
4106
4119
|
}, {
|
|
4107
4120
|
default: v(() => [
|
|
4108
4121
|
T(pn),
|
|
4109
|
-
J(" " + j(
|
|
4122
|
+
J(" " + j(m(n)("filter.filterButtonText")) + " " + j(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
4110
4123
|
]),
|
|
4111
4124
|
_: 1
|
|
4112
4125
|
}),
|
|
4113
|
-
Ce(
|
|
4126
|
+
Ce(q("div", {
|
|
4114
4127
|
class: "kong-ui-entity-filter-backdrop",
|
|
4115
4128
|
onClick: d
|
|
4116
4129
|
}, null, 512), [
|
|
4117
4130
|
[we, o.value]
|
|
4118
4131
|
]),
|
|
4119
|
-
Ce(
|
|
4120
|
-
(
|
|
4121
|
-
var K,
|
|
4122
|
-
return
|
|
4123
|
-
key:
|
|
4132
|
+
Ce(q("div", os, [
|
|
4133
|
+
(y(!0), E(fe, null, pe(u.value, (f) => {
|
|
4134
|
+
var K, O;
|
|
4135
|
+
return y(), E("div", {
|
|
4136
|
+
key: f.value,
|
|
4124
4137
|
class: "kong-ui-entity-filter-menu-item",
|
|
4125
|
-
"data-testid":
|
|
4138
|
+
"data-testid": f.value
|
|
4126
4139
|
}, [
|
|
4127
|
-
|
|
4128
|
-
class:
|
|
4140
|
+
q("span", {
|
|
4141
|
+
class: _e(["menu-item-title", { expanded: l.value.has(f.value) }]),
|
|
4129
4142
|
role: "button",
|
|
4130
4143
|
tabindex: "0",
|
|
4131
|
-
onClick: (
|
|
4132
|
-
onKeydown: Ir((
|
|
4144
|
+
onClick: (_) => c(f.value),
|
|
4145
|
+
onKeydown: Ir((_) => c(f.value), ["enter"])
|
|
4133
4146
|
}, [
|
|
4134
|
-
J(j(
|
|
4135
|
-
Ce(
|
|
4136
|
-
[we, s.value.includes(
|
|
4147
|
+
J(j(f.label) + " ", 1),
|
|
4148
|
+
Ce(q("span", ss, null, 512), [
|
|
4149
|
+
[we, s.value.includes(f.value)]
|
|
4137
4150
|
]),
|
|
4138
|
-
T(
|
|
4139
|
-
class:
|
|
4140
|
-
color:
|
|
4151
|
+
T(m(_l), {
|
|
4152
|
+
class: _e(["menu-item-expand-icon", { expanded: l.value.has(f.value) }]),
|
|
4153
|
+
color: m(ya)
|
|
4141
4154
|
}, null, 8, ["class", "color"])
|
|
4142
4155
|
], 42, ls),
|
|
4143
|
-
Ce(
|
|
4144
|
-
|
|
4156
|
+
Ce(q("div", us, [
|
|
4157
|
+
q("label", {
|
|
4145
4158
|
class: "menu-item-label",
|
|
4146
|
-
for:
|
|
4147
|
-
}, j(
|
|
4148
|
-
((
|
|
4159
|
+
for: I(f.value)
|
|
4160
|
+
}, j(m(n)("filter.fieldLabel")), 9, cs),
|
|
4161
|
+
((O = (K = e.config.schema) == null ? void 0 : K[f.value]) == null ? void 0 : O.type) === "select" ? (y(), V(C, {
|
|
4149
4162
|
key: 0,
|
|
4150
|
-
id:
|
|
4151
|
-
modelValue: i.value[
|
|
4152
|
-
"onUpdate:modelValue": (
|
|
4153
|
-
items:
|
|
4154
|
-
placeholder:
|
|
4155
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
4163
|
+
id: I(f.value),
|
|
4164
|
+
modelValue: i.value[f.value],
|
|
4165
|
+
"onUpdate:modelValue": (_) => i.value[f.value] = _,
|
|
4166
|
+
items: N(f.value),
|
|
4167
|
+
placeholder: m(n)("filter.selectPlaceholder")
|
|
4168
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (y(), V(p, {
|
|
4156
4169
|
key: 1,
|
|
4157
|
-
id:
|
|
4158
|
-
modelValue: i.value[
|
|
4159
|
-
"onUpdate:modelValue": (
|
|
4170
|
+
id: I(f.value),
|
|
4171
|
+
modelValue: i.value[f.value],
|
|
4172
|
+
"onUpdate:modelValue": (_) => i.value[f.value] = _,
|
|
4160
4173
|
autocomplete: "off",
|
|
4161
|
-
placeholder:
|
|
4162
|
-
type:
|
|
4174
|
+
placeholder: m(n)("filter.inputPlaceholder"),
|
|
4175
|
+
type: w(f.value)
|
|
4163
4176
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4164
4177
|
], 512), [
|
|
4165
|
-
[we, l.value.has(
|
|
4178
|
+
[we, l.value.has(f.value)]
|
|
4166
4179
|
]),
|
|
4167
|
-
Ce(
|
|
4180
|
+
Ce(q("div", ds, [
|
|
4168
4181
|
T(L, {
|
|
4169
4182
|
appearance: "tertiary",
|
|
4170
4183
|
"data-testid": "apply-filter",
|
|
4171
4184
|
size: "small",
|
|
4172
|
-
onClick:
|
|
4185
|
+
onClick: h[0] || (h[0] = (_) => H(!0))
|
|
4173
4186
|
}, {
|
|
4174
4187
|
default: v(() => [
|
|
4175
|
-
J(j(
|
|
4188
|
+
J(j(m(n)("filter.applyButtonText")), 1)
|
|
4176
4189
|
]),
|
|
4177
4190
|
_: 1
|
|
4178
4191
|
}),
|
|
@@ -4180,26 +4193,26 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
4180
4193
|
appearance: "tertiary",
|
|
4181
4194
|
"data-testid": "clear-filter",
|
|
4182
4195
|
size: "small",
|
|
4183
|
-
onClick: (
|
|
4196
|
+
onClick: (_) => U(f.value)
|
|
4184
4197
|
}, {
|
|
4185
4198
|
default: v(() => [
|
|
4186
|
-
J(j(
|
|
4199
|
+
J(j(m(n)("filter.clearButtonText")), 1)
|
|
4187
4200
|
]),
|
|
4188
4201
|
_: 2
|
|
4189
4202
|
}, 1032, ["onClick"])
|
|
4190
4203
|
], 512), [
|
|
4191
|
-
[we, l.value.has(
|
|
4204
|
+
[we, l.value.has(f.value)]
|
|
4192
4205
|
])
|
|
4193
4206
|
], 8, is);
|
|
4194
4207
|
}), 128)),
|
|
4195
|
-
|
|
4208
|
+
q("div", ps, [
|
|
4196
4209
|
T(L, {
|
|
4197
4210
|
appearance: "tertiary",
|
|
4198
4211
|
size: "small",
|
|
4199
|
-
onClick:
|
|
4212
|
+
onClick: A
|
|
4200
4213
|
}, {
|
|
4201
4214
|
default: v(() => [
|
|
4202
|
-
J(j(
|
|
4215
|
+
J(j(m(n)("filter.clearAllButtonText")), 1)
|
|
4203
4216
|
]),
|
|
4204
4217
|
_: 1
|
|
4205
4218
|
})
|
|
@@ -4210,7 +4223,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
4210
4223
|
]));
|
|
4211
4224
|
};
|
|
4212
4225
|
}
|
|
4213
|
-
}), ms = /* @__PURE__ */ me(fs, [["__scopeId", "data-v-
|
|
4226
|
+
}), ms = /* @__PURE__ */ me(fs, [["__scopeId", "data-v-9a370e3a"]]), ze = /* @__PURE__ */ Y({
|
|
4214
4227
|
__name: "PermissionsWrapper",
|
|
4215
4228
|
props: {
|
|
4216
4229
|
/**
|
|
@@ -4232,7 +4245,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
4232
4245
|
}
|
|
4233
4246
|
},
|
|
4234
4247
|
setup(e) {
|
|
4235
|
-
const t = e, n =
|
|
4248
|
+
const t = e, n = F(void 0), r = S(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4236
4249
|
return be(() => t.authFunction, async () => {
|
|
4237
4250
|
n.value = await t.authFunction();
|
|
4238
4251
|
}, { immediate: !0 }), (a, o) => r.value ? Q(a.$slots, "default", {
|
|
@@ -4243,7 +4256,7 @@ const tl = { class: "yaml-config" }, fr = /* @__PURE__ */ W({
|
|
|
4243
4256
|
});
|
|
4244
4257
|
let Je;
|
|
4245
4258
|
const gs = new Uint8Array(16);
|
|
4246
|
-
function
|
|
4259
|
+
function hs() {
|
|
4247
4260
|
if (!Je && (Je = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Je))
|
|
4248
4261
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
4249
4262
|
return Je(gs);
|
|
@@ -4251,7 +4264,7 @@ function ys() {
|
|
|
4251
4264
|
const re = [];
|
|
4252
4265
|
for (let e = 0; e < 256; ++e)
|
|
4253
4266
|
re.push((e + 256).toString(16).slice(1));
|
|
4254
|
-
function
|
|
4267
|
+
function ys(e, t = 0) {
|
|
4255
4268
|
return re[e[t + 0]] + re[e[t + 1]] + re[e[t + 2]] + re[e[t + 3]] + "-" + re[e[t + 4]] + re[e[t + 5]] + "-" + re[e[t + 6]] + re[e[t + 7]] + "-" + re[e[t + 8]] + re[e[t + 9]] + "-" + re[e[t + 10]] + re[e[t + 11]] + re[e[t + 12]] + re[e[t + 13]] + re[e[t + 14]] + re[e[t + 15]];
|
|
4256
4269
|
}
|
|
4257
4270
|
const vs = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), fn = {
|
|
@@ -4261,14 +4274,14 @@ function bs(e, t, n) {
|
|
|
4261
4274
|
if (fn.randomUUID && !t && !e)
|
|
4262
4275
|
return fn.randomUUID();
|
|
4263
4276
|
e = e || {};
|
|
4264
|
-
const r = e.random || (e.rng ||
|
|
4277
|
+
const r = e.random || (e.rng || hs)();
|
|
4265
4278
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
4266
4279
|
n = n || 0;
|
|
4267
4280
|
for (let a = 0; a < 16; ++a)
|
|
4268
4281
|
t[n + a] = r[a];
|
|
4269
4282
|
return t;
|
|
4270
4283
|
}
|
|
4271
|
-
return
|
|
4284
|
+
return ys(r);
|
|
4272
4285
|
}
|
|
4273
4286
|
const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
4274
4287
|
key: 1,
|
|
@@ -4276,7 +4289,7 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4276
4289
|
}, Is = {
|
|
4277
4290
|
key: 2,
|
|
4278
4291
|
class: "form-section-footer"
|
|
4279
|
-
},
|
|
4292
|
+
}, _s = { class: "form-section-content" }, Ss = /* @__PURE__ */ Y({
|
|
4280
4293
|
__name: "EntityFormSection",
|
|
4281
4294
|
props: {
|
|
4282
4295
|
title: {
|
|
@@ -4306,19 +4319,19 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4306
4319
|
},
|
|
4307
4320
|
setup(e) {
|
|
4308
4321
|
const t = It(), n = bs();
|
|
4309
|
-
return (r, a) => (
|
|
4310
|
-
"aria-labelledby": e.title ?
|
|
4311
|
-
class:
|
|
4322
|
+
return (r, a) => (y(), E("div", {
|
|
4323
|
+
"aria-labelledby": e.title ? m(n) : void 0,
|
|
4324
|
+
class: _e(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4312
4325
|
role: "group"
|
|
4313
4326
|
}, [
|
|
4314
|
-
|
|
4315
|
-
e.hideInfoHeader ? z("", !0) : (
|
|
4327
|
+
q("div", Cs, [
|
|
4328
|
+
e.hideInfoHeader ? z("", !0) : (y(), E("div", {
|
|
4316
4329
|
key: 0,
|
|
4317
|
-
class:
|
|
4330
|
+
class: _e(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4318
4331
|
}, [
|
|
4319
|
-
e.title ? (
|
|
4332
|
+
e.title ? (y(), V(Ae(e.titleTag), {
|
|
4320
4333
|
key: 0,
|
|
4321
|
-
id:
|
|
4334
|
+
id: m(n),
|
|
4322
4335
|
class: "form-section-title"
|
|
4323
4336
|
}, {
|
|
4324
4337
|
default: v(() => [
|
|
@@ -4326,28 +4339,28 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4326
4339
|
]),
|
|
4327
4340
|
_: 1
|
|
4328
4341
|
}, 8, ["id"])) : z("", !0),
|
|
4329
|
-
e.description ||
|
|
4342
|
+
e.description || m(t).description ? (y(), E("div", ws, [
|
|
4330
4343
|
Q(r.$slots, "description", {}, () => [
|
|
4331
|
-
|
|
4344
|
+
q("p", null, j(e.description), 1)
|
|
4332
4345
|
], !0)
|
|
4333
4346
|
])) : z("", !0),
|
|
4334
|
-
|
|
4347
|
+
m(t).footer ? (y(), E("div", Is, [
|
|
4335
4348
|
Q(r.$slots, "footer", {}, void 0, !0)
|
|
4336
4349
|
])) : z("", !0)
|
|
4337
4350
|
], 2)),
|
|
4338
|
-
|
|
4351
|
+
q("div", _s, [
|
|
4339
4352
|
Q(r.$slots, "default", {}, void 0, !0)
|
|
4340
4353
|
])
|
|
4341
4354
|
])
|
|
4342
4355
|
], 10, ks));
|
|
4343
4356
|
}
|
|
4344
|
-
}), xs = /* @__PURE__ */ me(Ss, [["__scopeId", "data-v-
|
|
4357
|
+
}), xs = /* @__PURE__ */ me(Ss, [["__scopeId", "data-v-b1f74200"]]), { useAxios: Ot, useDeleteUrlBuilder: As, useErrors: $s, useExternalLinkCreator: au, useFetchUrlBuilder: ou, useFetcher: Ts, useDebouncedFilter: js, useStringHelpers: iu, useHelpers: lu, useGatewayFeatureSupported: su, useTruncationDetector: uu, useValidators: cu } = ne, Ns = { class: "add-consumer-form-container" }, Os = { class: "add-consumer-form-cta" }, Ms = { class: "select-item-label" }, Es = {
|
|
4345
4358
|
key: 0,
|
|
4346
4359
|
class: "select-item-desc"
|
|
4347
4360
|
}, Fs = {
|
|
4348
4361
|
key: 0,
|
|
4349
4362
|
class: "kong-ui-entity-add-consumers-error"
|
|
4350
|
-
}, qs = { key: 0 }, Ks = /* @__PURE__ */
|
|
4363
|
+
}, qs = { key: 0 }, Ks = /* @__PURE__ */ Y({
|
|
4351
4364
|
__name: "AddConsumerModal",
|
|
4352
4365
|
props: {
|
|
4353
4366
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4364,119 +4377,119 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4364
4377
|
},
|
|
4365
4378
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4366
4379
|
setup(e, { emit: t }) {
|
|
4367
|
-
var
|
|
4368
|
-
const { i18n: { t: n } } = rt.useI18n(), r = e, a = t, { axiosInstance: o } = Ot((
|
|
4380
|
+
var _;
|
|
4381
|
+
const { i18n: { t: n } } = rt.useI18n(), r = e, a = t, { axiosInstance: o } = Ot((_ = r.config) == null ? void 0 : _.axiosRequestConfig), i = F([]), {
|
|
4369
4382
|
debouncedQueryChange: l,
|
|
4370
4383
|
loading: s,
|
|
4371
4384
|
allRecords: u,
|
|
4372
4385
|
error: d,
|
|
4373
4386
|
loadItems: c,
|
|
4374
|
-
results:
|
|
4387
|
+
results: k
|
|
4375
4388
|
} = js(
|
|
4376
4389
|
r.config,
|
|
4377
|
-
|
|
4390
|
+
Ne.list[r.config.app].all,
|
|
4378
4391
|
"",
|
|
4379
4392
|
{
|
|
4380
4393
|
fetchedItemsKey: "data",
|
|
4381
4394
|
searchKeys: ["username", "id"]
|
|
4382
4395
|
}
|
|
4383
|
-
),
|
|
4396
|
+
), g = (x) => x, I = S(() => d.value ? n("consumers.errors.general") : ""), N = F(0), w = S(() => u.value === void 0), U = S(() => k.value.map((x) => ({
|
|
4384
4397
|
label: x.username || x.customId,
|
|
4385
4398
|
value: x.id,
|
|
4386
4399
|
selected: i.value.includes(x.id),
|
|
4387
4400
|
data: x
|
|
4388
4401
|
// we need this to determine whether or not to show the description text
|
|
4389
|
-
}))),
|
|
4402
|
+
}))), A = (x) => {
|
|
4390
4403
|
var D;
|
|
4391
|
-
const B =
|
|
4404
|
+
const B = w.value ? k.value.find((P) => P.id === x) : (D = u.value) == null ? void 0 : D.find((P) => P.id === x);
|
|
4392
4405
|
return B ? B.username || B.custom_id : x;
|
|
4393
|
-
},
|
|
4394
|
-
|
|
4395
|
-
},
|
|
4406
|
+
}, H = () => {
|
|
4407
|
+
p.value = "", b.value = [], K.value = [], a("cancel");
|
|
4408
|
+
}, b = F([]), h = F(!1), p = F(""), L = async () => {
|
|
4396
4409
|
if (!i.value.length) {
|
|
4397
|
-
|
|
4410
|
+
p.value = "", K.value = [], a("cancel");
|
|
4398
4411
|
return;
|
|
4399
4412
|
}
|
|
4400
|
-
|
|
4413
|
+
h.value = !0, p.value = "", b.value = [], K.value = [];
|
|
4401
4414
|
try {
|
|
4402
|
-
const x = i.value.map((P) =>
|
|
4415
|
+
const x = i.value.map((P) => f(P)), B = await Promise.allSettled(x);
|
|
4403
4416
|
let D = !0;
|
|
4404
4417
|
B.forEach((P) => {
|
|
4405
4418
|
P.status !== "fulfilled" && (D = !1);
|
|
4406
|
-
}), D ? (
|
|
4419
|
+
}), D ? (b.value = [], K.value = [], a("add:success", i.value), i.value = []) : (b.value.length && a("add:partial-success", b.value), i.value = [], O(B));
|
|
4407
4420
|
} catch {
|
|
4408
|
-
|
|
4421
|
+
p.value = n("consumers.errors.add"), a("error", p.value);
|
|
4409
4422
|
} finally {
|
|
4410
|
-
|
|
4423
|
+
h.value = !1;
|
|
4411
4424
|
}
|
|
4412
|
-
},
|
|
4425
|
+
}, C = S(() => {
|
|
4413
4426
|
var B, D, P, ie;
|
|
4414
|
-
let x = `${r.config.apiBaseUrl}${
|
|
4427
|
+
let x = `${r.config.apiBaseUrl}${Ne.list[r.config.app].forConsumerGroup}`;
|
|
4415
4428
|
return r.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((B = r.config) == null ? void 0 : B.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((D = r.config) == null ? void 0 : D.consumerGroupId) || "") : r.config.app === "kongManager" && (x = x.replace(/\/{workspace}/gi, (P = r.config) != null && P.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ie = r.config) == null ? void 0 : ie.consumerGroupId) || "")), x;
|
|
4416
|
-
}),
|
|
4429
|
+
}), f = async (x) => {
|
|
4417
4430
|
const B = {
|
|
4418
4431
|
consumer: x
|
|
4419
4432
|
};
|
|
4420
4433
|
try {
|
|
4421
|
-
const D = await o.post(
|
|
4422
|
-
return
|
|
4434
|
+
const D = await o.post(C.value, B);
|
|
4435
|
+
return b.value.push(x), D;
|
|
4423
4436
|
} catch (D) {
|
|
4424
|
-
let P = `${
|
|
4425
|
-
return D.response.status === 409 && (P = `${
|
|
4437
|
+
let P = `${A(x)} - ${D.message}`;
|
|
4438
|
+
return D.response.status === 409 && (P = `${A(x)} - ${n("consumers.errors.already_added")}`), Promise.reject(Error(P));
|
|
4426
4439
|
}
|
|
4427
|
-
}, K =
|
|
4440
|
+
}, K = F([]), O = (x) => {
|
|
4428
4441
|
K.value = x.map((B) => {
|
|
4429
4442
|
var D;
|
|
4430
4443
|
return (D = B.reason) == null ? void 0 : D.message;
|
|
4431
4444
|
}).filter(Boolean);
|
|
4432
4445
|
};
|
|
4433
|
-
return be(
|
|
4434
|
-
|
|
4446
|
+
return be(U, () => {
|
|
4447
|
+
N.value++;
|
|
4435
4448
|
}, { immediate: !0, deep: !0 }), be(() => r.visible, () => {
|
|
4436
4449
|
r.visible && c();
|
|
4437
4450
|
}, { immediate: !0 }), (x, B) => {
|
|
4438
|
-
const D =
|
|
4439
|
-
return
|
|
4440
|
-
"action-button-disabled":
|
|
4451
|
+
const D = R("KMultiselect"), P = R("KAlert"), ie = R("KPrompt");
|
|
4452
|
+
return y(), V(ie, {
|
|
4453
|
+
"action-button-disabled": h.value,
|
|
4441
4454
|
class: "kong-ui-entities-add-consumers-modal",
|
|
4442
4455
|
"data-testid": "add-consumer-modal",
|
|
4443
|
-
title:
|
|
4456
|
+
title: m(n)("consumers.consumer_groups.add.title"),
|
|
4444
4457
|
visible: e.visible,
|
|
4445
|
-
onCancel:
|
|
4458
|
+
onCancel: H,
|
|
4446
4459
|
onProceed: L
|
|
4447
4460
|
}, {
|
|
4448
4461
|
default: v(() => [
|
|
4449
|
-
|
|
4450
|
-
|
|
4462
|
+
q("div", Ns, [
|
|
4463
|
+
q("p", Os, j(m(n)("consumers.consumer_groups.add.ctaText")), 1),
|
|
4451
4464
|
T(D, {
|
|
4452
4465
|
modelValue: i.value,
|
|
4453
4466
|
"onUpdate:modelValue": B[0] || (B[0] = (ge) => i.value = ge),
|
|
4454
4467
|
autosuggest: "",
|
|
4455
4468
|
"data-testid": "add-consumers-multiselect",
|
|
4456
|
-
"dropdown-footer-text":
|
|
4457
|
-
items:
|
|
4458
|
-
label:
|
|
4459
|
-
loading:
|
|
4460
|
-
placeholder:
|
|
4461
|
-
readonly:
|
|
4469
|
+
"dropdown-footer-text": w.value ? m(n)("consumers.consumer_groups.add.footer") : void 0,
|
|
4470
|
+
items: U.value,
|
|
4471
|
+
label: m(n)("consumers.consumer_groups.add.consumers_label"),
|
|
4472
|
+
loading: m(s),
|
|
4473
|
+
placeholder: m(n)("consumers.consumer_groups.add.consumer_placeholder"),
|
|
4474
|
+
readonly: h.value,
|
|
4462
4475
|
required: "",
|
|
4463
4476
|
width: "100%",
|
|
4464
|
-
onQueryChange:
|
|
4477
|
+
onQueryChange: m(l)
|
|
4465
4478
|
}, {
|
|
4466
4479
|
"item-template": v(({ item: ge }) => [
|
|
4467
|
-
|
|
4468
|
-
|
|
4480
|
+
q("div", Ms, j(ge.label), 1),
|
|
4481
|
+
g(ge).data.username && g(ge).data.custom_id ? (y(), E("div", Es, j(g(ge).data.custom_id), 1)) : z("", !0)
|
|
4469
4482
|
]),
|
|
4470
4483
|
_: 1
|
|
4471
4484
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4472
|
-
|
|
4485
|
+
p.value || I.value || K.value.length ? (y(), E("div", Fs, [
|
|
4473
4486
|
T(P, { appearance: "danger" }, {
|
|
4474
4487
|
default: v(() => [
|
|
4475
|
-
|
|
4476
|
-
K.value.length ? (
|
|
4477
|
-
(
|
|
4488
|
+
q("p", null, j(m(n)("consumers.errors.add")), 1),
|
|
4489
|
+
K.value.length ? (y(), E("ul", qs, [
|
|
4490
|
+
(y(!0), E(fe, null, pe(K.value, (ge, lt) => (y(), E("li", { key: lt }, j(ge), 1))), 128))
|
|
4478
4491
|
])) : z("", !0),
|
|
4479
|
-
|
|
4492
|
+
q("div", null, j(p.value || I.value), 1)
|
|
4480
4493
|
]),
|
|
4481
4494
|
_: 1
|
|
4482
4495
|
})
|
|
@@ -4487,12 +4500,12 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4487
4500
|
}, 8, ["action-button-disabled", "title", "visible"]);
|
|
4488
4501
|
};
|
|
4489
4502
|
}
|
|
4490
|
-
}),
|
|
4503
|
+
}), Mt = (e, t) => {
|
|
4491
4504
|
const n = e.__vccOpts || e;
|
|
4492
4505
|
for (const [r, a] of t)
|
|
4493
4506
|
n[r] = a;
|
|
4494
4507
|
return n;
|
|
4495
|
-
}, Bs = /* @__PURE__ */
|
|
4508
|
+
}, Bs = /* @__PURE__ */ Mt(Ks, [["__scopeId", "data-v-d54468ab"]]), Ls = { class: "kong-ui-entities-consumers-list" }, Us = { key: 1 }, Rs = /* @__PURE__ */ Y({
|
|
4496
4509
|
__name: "ConsumerList",
|
|
4497
4510
|
props: {
|
|
4498
4511
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4539,19 +4552,19 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4539
4552
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4540
4553
|
setup(e, { emit: t }) {
|
|
4541
4554
|
var Ut;
|
|
4542
|
-
const n = t, r = e, { i18nT: a, i18n: { t: o } } = rt.useI18n(), i =
|
|
4555
|
+
const n = t, r = e, { i18nT: a, i18n: { t: o } } = rt.useI18n(), i = _t(), { axiosInstance: l } = Ot((Ut = r.config) == null ? void 0 : Ut.axiosRequestConfig), s = F(1), u = S(() => !!r.config.consumerGroupId), d = S(
|
|
4543
4556
|
() => u.value ? "kong-ui-entities-consumers-list-in-group-page" : "kong-ui-entities-consumers-list"
|
|
4544
|
-
), c =
|
|
4557
|
+
), c = S(() => r.config.app !== "kongManager" || !!r.config.disableSorting), k = {
|
|
4545
4558
|
username: { label: o("consumers.list.table_headers.username"), searchable: !0, sortable: !0 },
|
|
4546
4559
|
custom_id: { label: o("consumers.list.table_headers.custom_id"), searchable: !0, sortable: !0 },
|
|
4547
4560
|
tags: { label: o("consumers.list.table_headers.tags"), sortable: !1 }
|
|
4548
|
-
},
|
|
4561
|
+
}, g = k, I = ($) => ({
|
|
4549
4562
|
"data-testid": $.username ?? $.custom_id ?? $.id
|
|
4550
|
-
}),
|
|
4551
|
-
var G, X, ue,
|
|
4552
|
-
let $ = `${r.config.apiBaseUrl}${
|
|
4553
|
-
return r.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((G = r.config) == null ? void 0 : G.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((X = r.config) == null ? void 0 : X.consumerGroupId) || "") : r.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (ue = r.config) != null && ue.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((
|
|
4554
|
-
}),
|
|
4563
|
+
}), N = S(() => {
|
|
4564
|
+
var G, X, ue, he;
|
|
4565
|
+
let $ = `${r.config.apiBaseUrl}${Ne.list[r.config.app][u.value ? "forConsumerGroup" : "all"]}`;
|
|
4566
|
+
return r.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((G = r.config) == null ? void 0 : G.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((X = r.config) == null ? void 0 : X.consumerGroupId) || "") : r.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (ue = r.config) != null && ue.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((he = r.config) == null ? void 0 : he.consumerGroupId) || "")), $;
|
|
4567
|
+
}), w = F(""), U = S(() => {
|
|
4555
4568
|
const $ = r.config.app === "konnect" || r.config.isExactMatch;
|
|
4556
4569
|
return $ ? {
|
|
4557
4570
|
isExactMatch: $,
|
|
@@ -4559,16 +4572,16 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4559
4572
|
} : {
|
|
4560
4573
|
isExactMatch: $,
|
|
4561
4574
|
fields: {
|
|
4562
|
-
username:
|
|
4563
|
-
custom_id:
|
|
4575
|
+
username: k.username,
|
|
4576
|
+
custom_id: k.custom_id
|
|
4564
4577
|
},
|
|
4565
4578
|
schema: r.config.filterSchema
|
|
4566
4579
|
};
|
|
4567
|
-
}),
|
|
4568
|
-
|
|
4569
|
-
},
|
|
4580
|
+
}), A = S(() => u.value && !r.config.paginatedEndpoint ? "consumers" : void 0), { fetcher: H, fetcherState: b } = Ts(r.config, N.value, A.value), h = () => {
|
|
4581
|
+
w.value = "";
|
|
4582
|
+
}, p = () => {
|
|
4570
4583
|
s.value++;
|
|
4571
|
-
}, L = ($) => $ ?? "-",
|
|
4584
|
+
}, L = ($) => $ ?? "-", C = F(null), f = ($, G) => {
|
|
4572
4585
|
const X = $.id;
|
|
4573
4586
|
if (!G(X)) {
|
|
4574
4587
|
n("copy:error", {
|
|
@@ -4596,16 +4609,16 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4596
4609
|
entity: $,
|
|
4597
4610
|
message: o("consumers.copy.success_brief")
|
|
4598
4611
|
});
|
|
4599
|
-
},
|
|
4612
|
+
}, O = async ($) => {
|
|
4600
4613
|
var X;
|
|
4601
4614
|
await ((X = r.canRetrieve) == null ? void 0 : X.call(r, $)) && i.push(r.config.getViewRoute($.id));
|
|
4602
|
-
},
|
|
4615
|
+
}, _ = ($) => ({
|
|
4603
4616
|
label: o("consumers.actions.view"),
|
|
4604
4617
|
to: r.config.getViewRoute($)
|
|
4605
4618
|
}), x = ($) => ({
|
|
4606
4619
|
label: o("consumers.actions.edit"),
|
|
4607
4620
|
to: r.config.getEditRoute($)
|
|
4608
|
-
}), B =
|
|
4621
|
+
}), B = F(void 0), D = F(!1), P = F(!1), ie = F(""), ge = As(r.config, N.value), lt = ($) => {
|
|
4609
4622
|
B.value = $, D.value = !0;
|
|
4610
4623
|
}, mr = () => {
|
|
4611
4624
|
D.value = !1;
|
|
@@ -4621,46 +4634,46 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4621
4634
|
P.value = !1;
|
|
4622
4635
|
}
|
|
4623
4636
|
}
|
|
4624
|
-
}, st =
|
|
4637
|
+
}, st = F(!1), Et = () => {
|
|
4625
4638
|
st.value = !0;
|
|
4626
4639
|
}, Ft = () => {
|
|
4627
4640
|
st.value = !1;
|
|
4628
4641
|
}, qt = ($, G) => {
|
|
4629
4642
|
G || Ft(), s.value++, n("add:success", $);
|
|
4630
|
-
},
|
|
4631
|
-
u.value &&
|
|
4632
|
-
}, ve =
|
|
4643
|
+
}, hr = () => {
|
|
4644
|
+
u.value && Et();
|
|
4645
|
+
}, ve = F(void 0), ut = F(!1), yr = F(""), vr = ($) => {
|
|
4633
4646
|
ve.value = $, ut.value = !0;
|
|
4634
4647
|
}, Kt = () => {
|
|
4635
4648
|
ut.value = !1, ve.value = void 0;
|
|
4636
|
-
}, br =
|
|
4637
|
-
var G, X, ue,
|
|
4638
|
-
let $ = `${r.config.apiBaseUrl}${
|
|
4639
|
-
return r.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((G = r.config) == null ? void 0 : G.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((X = r.config) == null ? void 0 : X.consumerGroupId) || "") : r.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (ue = r.config) != null && ue.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((
|
|
4640
|
-
}), Bt =
|
|
4649
|
+
}, br = S(() => {
|
|
4650
|
+
var G, X, ue, he;
|
|
4651
|
+
let $ = `${r.config.apiBaseUrl}${Ne.list[r.config.app].oneForConsumerGroup}`;
|
|
4652
|
+
return r.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((G = r.config) == null ? void 0 : G.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((X = r.config) == null ? void 0 : X.consumerGroupId) || "") : r.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (ue = r.config) != null && ue.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((he = r.config) == null ? void 0 : he.consumerGroupId) || "")), $;
|
|
4653
|
+
}), Bt = F(!1), kr = async () => {
|
|
4641
4654
|
if (ve.value) {
|
|
4642
4655
|
Bt.value = !0;
|
|
4643
4656
|
try {
|
|
4644
4657
|
const $ = br.value.replace(/{consumerId}/gi, ve.value.id);
|
|
4645
4658
|
await l.delete($), n("remove:success", ve.value), Kt(), s.value++;
|
|
4646
4659
|
} catch ($) {
|
|
4647
|
-
|
|
4660
|
+
yr.value = $.message || o("consumers.errors.delete"), n("error", $);
|
|
4648
4661
|
} finally {
|
|
4649
4662
|
Bt.value = !1;
|
|
4650
4663
|
}
|
|
4651
4664
|
}
|
|
4652
|
-
}, Lt =
|
|
4653
|
-
be(
|
|
4654
|
-
var G, X, ue,
|
|
4665
|
+
}, Lt = F(!0);
|
|
4666
|
+
be(b, ($) => {
|
|
4667
|
+
var G, X, ue, he;
|
|
4655
4668
|
if (Array.isArray((G = $ == null ? void 0 : $.response) == null ? void 0 : G.data) && (Lt.value = $.response.data.length > 0), $.status === $e.Error) {
|
|
4656
|
-
|
|
4669
|
+
C.value = {
|
|
4657
4670
|
title: o("consumers.errors.general")
|
|
4658
|
-
}, (
|
|
4671
|
+
}, (he = (ue = (X = $.error) == null ? void 0 : X.response) == null ? void 0 : ue.data) != null && he.message && (C.value.message = $.error.response.data.message), n("error", $.error);
|
|
4659
4672
|
return;
|
|
4660
4673
|
}
|
|
4661
|
-
|
|
4674
|
+
C.value = null;
|
|
4662
4675
|
});
|
|
4663
|
-
const ct =
|
|
4676
|
+
const ct = F({
|
|
4664
4677
|
ctaPath: u.value ? void 0 : r.config.createRoute,
|
|
4665
4678
|
ctaText: void 0,
|
|
4666
4679
|
message: `${o("consumers.list.empty_state.description")}${r.config.additionMessageForEmptyState ? ` ${r.config.additionMessageForEmptyState}` : ""}`,
|
|
@@ -4669,43 +4682,43 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4669
4682
|
return wt(async () => {
|
|
4670
4683
|
await r.canCreate() && (ct.value.title = u.value ? o("consumers.list.empty_state.title_for_consumer_group") : o("consumers.list.empty_state.title"), ct.value.ctaText = u.value ? o("consumers.actions.add_consumer") : o("consumers.actions.create"));
|
|
4671
4684
|
}), ($, G) => {
|
|
4672
|
-
const X =
|
|
4673
|
-
return
|
|
4674
|
-
T(
|
|
4685
|
+
const X = R("KButton"), ue = R("KBadge"), he = R("KTruncate"), Ue = R("KDropdownItem"), Rt = R("KClipboardProvider"), Cr = R("KPrompt");
|
|
4686
|
+
return y(), E("div", Ls, [
|
|
4687
|
+
T(m(Hl), {
|
|
4675
4688
|
"cache-identifier": e.cacheIdentifier,
|
|
4676
4689
|
"disable-pagination": u.value && !e.config.paginatedEndpoint,
|
|
4677
4690
|
"disable-pagination-page-jump": "",
|
|
4678
4691
|
"disable-sorting": c.value,
|
|
4679
4692
|
"empty-state-options": ct.value,
|
|
4680
4693
|
"enable-entity-actions": "",
|
|
4681
|
-
"error-message":
|
|
4682
|
-
fetcher:
|
|
4694
|
+
"error-message": C.value,
|
|
4695
|
+
fetcher: m(H),
|
|
4683
4696
|
"fetcher-cache-key": s.value,
|
|
4684
4697
|
"pagination-type": "offset",
|
|
4685
4698
|
"preferences-storage-key": d.value,
|
|
4686
|
-
query:
|
|
4687
|
-
"row-attributes":
|
|
4688
|
-
"table-headers":
|
|
4699
|
+
query: w.value,
|
|
4700
|
+
"row-attributes": I,
|
|
4701
|
+
"table-headers": m(g),
|
|
4689
4702
|
"use-action-outside": e.useActionOutside,
|
|
4690
|
-
onClearSearchInput:
|
|
4691
|
-
"onClick:row": G[3] || (G[3] = (
|
|
4692
|
-
onEmptyStateCtaClicked:
|
|
4693
|
-
onSort:
|
|
4703
|
+
onClearSearchInput: h,
|
|
4704
|
+
"onClick:row": G[3] || (G[3] = (W) => O(W)),
|
|
4705
|
+
onEmptyStateCtaClicked: hr,
|
|
4706
|
+
onSort: p
|
|
4694
4707
|
}, {
|
|
4695
4708
|
"toolbar-filter": v(() => [
|
|
4696
|
-
u.value ? z("", !0) : (
|
|
4709
|
+
u.value ? z("", !0) : (y(), V(m(ms), {
|
|
4697
4710
|
key: 0,
|
|
4698
|
-
modelValue:
|
|
4699
|
-
"onUpdate:modelValue": G[0] || (G[0] = (
|
|
4700
|
-
config:
|
|
4711
|
+
modelValue: w.value,
|
|
4712
|
+
"onUpdate:modelValue": G[0] || (G[0] = (W) => w.value = W),
|
|
4713
|
+
config: U.value
|
|
4701
4714
|
}, null, 8, ["modelValue", "config"]))
|
|
4702
4715
|
]),
|
|
4703
4716
|
"toolbar-button": v(() => [
|
|
4704
|
-
(
|
|
4717
|
+
(y(), V(Ae(e.useActionOutside ? "Teleport" : "div"), {
|
|
4705
4718
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
4706
4719
|
}, {
|
|
4707
4720
|
default: v(() => [
|
|
4708
|
-
T(
|
|
4721
|
+
T(m(ze), {
|
|
4709
4722
|
"auth-function": () => e.canCreate()
|
|
4710
4723
|
}, {
|
|
4711
4724
|
default: v(() => [
|
|
@@ -4715,10 +4728,10 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4715
4728
|
icon: "plus",
|
|
4716
4729
|
size: "large",
|
|
4717
4730
|
to: e.config.consumerGroupId ? void 0 : e.config.createRoute,
|
|
4718
|
-
onClick: G[1] || (G[1] = () => e.config.consumerGroupId ?
|
|
4731
|
+
onClick: G[1] || (G[1] = () => e.config.consumerGroupId ? Et() : void 0)
|
|
4719
4732
|
}, {
|
|
4720
4733
|
default: v(() => [
|
|
4721
|
-
J(j(e.config.consumerGroupId ?
|
|
4734
|
+
J(j(e.config.consumerGroupId ? m(o)("consumers.actions.add_consumer") : m(o)("consumers.list.toolbar_actions.new_consumer")), 1)
|
|
4722
4735
|
]),
|
|
4723
4736
|
_: 1
|
|
4724
4737
|
}, 8, ["to"]), [
|
|
@@ -4731,16 +4744,16 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4731
4744
|
_: 1
|
|
4732
4745
|
}, 8, ["to"]))
|
|
4733
4746
|
]),
|
|
4734
|
-
username: v(({ rowValue:
|
|
4735
|
-
|
|
4747
|
+
username: v(({ rowValue: W }) => [
|
|
4748
|
+
q("b", null, j(L(W)), 1)
|
|
4736
4749
|
]),
|
|
4737
|
-
custom_id: v(({ rowValue:
|
|
4738
|
-
J(j(L(
|
|
4750
|
+
custom_id: v(({ rowValue: W }) => [
|
|
4751
|
+
J(j(L(W)), 1)
|
|
4739
4752
|
]),
|
|
4740
|
-
tags: v(({ rowValue:
|
|
4741
|
-
|
|
4753
|
+
tags: v(({ rowValue: W }) => [
|
|
4754
|
+
W && W.length > 0 ? (y(), V(he, { key: 0 }, {
|
|
4742
4755
|
default: v(() => [
|
|
4743
|
-
(
|
|
4756
|
+
(y(!0), E(fe, null, pe(W, (Oe) => (y(), V(ue, {
|
|
4744
4757
|
key: Oe,
|
|
4745
4758
|
onClick: G[2] || (G[2] = gt(() => {
|
|
4746
4759
|
}, ["stop"]))
|
|
@@ -4752,17 +4765,17 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4752
4765
|
}, 1024))), 128))
|
|
4753
4766
|
]),
|
|
4754
4767
|
_: 2
|
|
4755
|
-
}, 1024)) : (
|
|
4768
|
+
}, 1024)) : (y(), E("span", Us, "-"))
|
|
4756
4769
|
]),
|
|
4757
|
-
actions: v(({ row:
|
|
4770
|
+
actions: v(({ row: W }) => [
|
|
4758
4771
|
T(Rt, null, {
|
|
4759
4772
|
default: v(({ copyToClipboard: Oe }) => [
|
|
4760
4773
|
T(Ue, {
|
|
4761
4774
|
"data-testid": "action-entity-copy-id",
|
|
4762
|
-
onClick: (wr) =>
|
|
4775
|
+
onClick: (wr) => f(W, Oe)
|
|
4763
4776
|
}, {
|
|
4764
4777
|
default: v(() => [
|
|
4765
|
-
J(j(
|
|
4778
|
+
J(j(m(o)("consumers.actions.copy_id")), 1)
|
|
4766
4779
|
]),
|
|
4767
4780
|
_: 2
|
|
4768
4781
|
}, 1032, ["onClick"])
|
|
@@ -4773,51 +4786,51 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4773
4786
|
default: v(({ copyToClipboard: Oe }) => [
|
|
4774
4787
|
T(Ue, {
|
|
4775
4788
|
"data-testid": "action-entity-copy-json",
|
|
4776
|
-
onClick: (wr) => K(
|
|
4789
|
+
onClick: (wr) => K(W, Oe)
|
|
4777
4790
|
}, {
|
|
4778
4791
|
default: v(() => [
|
|
4779
|
-
J(j(
|
|
4792
|
+
J(j(m(o)("consumers.actions.copy_json")), 1)
|
|
4780
4793
|
]),
|
|
4781
4794
|
_: 2
|
|
4782
4795
|
}, 1032, ["onClick"])
|
|
4783
4796
|
]),
|
|
4784
4797
|
_: 2
|
|
4785
4798
|
}, 1024),
|
|
4786
|
-
T(
|
|
4787
|
-
"auth-function": () => e.canRetrieve(
|
|
4799
|
+
T(m(ze), {
|
|
4800
|
+
"auth-function": () => e.canRetrieve(W)
|
|
4788
4801
|
}, {
|
|
4789
4802
|
default: v(() => [
|
|
4790
4803
|
T(Ue, {
|
|
4791
4804
|
"data-testid": "action-entity-view",
|
|
4792
4805
|
"has-divider": "",
|
|
4793
|
-
item:
|
|
4806
|
+
item: _(W.id)
|
|
4794
4807
|
}, null, 8, ["item"])
|
|
4795
4808
|
]),
|
|
4796
4809
|
_: 2
|
|
4797
4810
|
}, 1032, ["auth-function"]),
|
|
4798
|
-
T(
|
|
4799
|
-
"auth-function": () => e.canEdit(
|
|
4811
|
+
T(m(ze), {
|
|
4812
|
+
"auth-function": () => e.canEdit(W)
|
|
4800
4813
|
}, {
|
|
4801
4814
|
default: v(() => [
|
|
4802
4815
|
T(Ue, {
|
|
4803
4816
|
"data-testid": "action-entity-edit",
|
|
4804
|
-
item: x(
|
|
4817
|
+
item: x(W.id)
|
|
4805
4818
|
}, null, 8, ["item"])
|
|
4806
4819
|
]),
|
|
4807
4820
|
_: 2
|
|
4808
4821
|
}, 1032, ["auth-function"]),
|
|
4809
|
-
T(
|
|
4810
|
-
"auth-function": () => e.canDelete(
|
|
4822
|
+
T(m(ze), {
|
|
4823
|
+
"auth-function": () => e.canDelete(W)
|
|
4811
4824
|
}, {
|
|
4812
4825
|
default: v(() => [
|
|
4813
4826
|
T(Ue, {
|
|
4814
4827
|
danger: "",
|
|
4815
4828
|
"data-testid": "action-entity-delete",
|
|
4816
4829
|
"has-divider": "",
|
|
4817
|
-
onClick: () => e.config.consumerGroupId ? vr(
|
|
4830
|
+
onClick: () => e.config.consumerGroupId ? vr(W) : lt(W)
|
|
4818
4831
|
}, {
|
|
4819
4832
|
default: v(() => [
|
|
4820
|
-
J(j(e.config.consumerGroupId ?
|
|
4833
|
+
J(j(e.config.consumerGroupId ? m(o)("consumers.actions.remove") : m(o)("consumers.actions.delete")), 1)
|
|
4821
4834
|
]),
|
|
4822
4835
|
_: 2
|
|
4823
4836
|
}, 1032, ["onClick"])
|
|
@@ -4827,63 +4840,63 @@ const ks = ["aria-labelledby"], Cs = { class: "form-section-wrapper" }, ws = {
|
|
|
4827
4840
|
]),
|
|
4828
4841
|
_: 1
|
|
4829
4842
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "preferences-storage-key", "query", "table-headers", "use-action-outside"]),
|
|
4830
|
-
T(
|
|
4843
|
+
T(m(Ql), {
|
|
4831
4844
|
"action-button-disabled": P.value,
|
|
4832
4845
|
"data-testid": "delete-consumer-modal",
|
|
4833
|
-
description:
|
|
4846
|
+
description: m(o)("consumers.delete.description"),
|
|
4834
4847
|
"entity-name": B.value && (B.value.username || B.value.custom_id || B.value.id),
|
|
4835
|
-
"entity-type":
|
|
4848
|
+
"entity-type": m(vn).Consumer,
|
|
4836
4849
|
error: ie.value,
|
|
4837
|
-
title:
|
|
4850
|
+
title: m(o)("consumers.delete.title"),
|
|
4838
4851
|
visible: D.value,
|
|
4839
4852
|
onCancel: mr,
|
|
4840
4853
|
onProceed: gr
|
|
4841
4854
|
}, null, 8, ["action-button-disabled", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4842
|
-
e.config.consumerGroupId ? (
|
|
4855
|
+
e.config.consumerGroupId ? (y(), V(Bs, {
|
|
4843
4856
|
key: 0,
|
|
4844
4857
|
config: e.config,
|
|
4845
4858
|
"data-testid": "add-consumer-modal",
|
|
4846
4859
|
visible: st.value,
|
|
4847
|
-
"onAdd:partialSuccess": G[4] || (G[4] = (
|
|
4848
|
-
"onAdd:success": G[5] || (G[5] = (
|
|
4860
|
+
"onAdd:partialSuccess": G[4] || (G[4] = (W) => qt(W, !0)),
|
|
4861
|
+
"onAdd:success": G[5] || (G[5] = (W) => qt(W)),
|
|
4849
4862
|
onCancel: Ft
|
|
4850
4863
|
}, null, 8, ["config", "visible"])) : z("", !0),
|
|
4851
|
-
e.config.consumerGroupId && ve.value ? (
|
|
4864
|
+
e.config.consumerGroupId && ve.value ? (y(), V(Cr, {
|
|
4852
4865
|
key: 1,
|
|
4853
4866
|
"action-button-appearance": "danger",
|
|
4854
4867
|
"data-testid": "remove-consumer-modal",
|
|
4855
|
-
title:
|
|
4868
|
+
title: m(o)("consumers.consumer_groups.remove.title"),
|
|
4856
4869
|
visible: ut.value,
|
|
4857
4870
|
onCancel: Kt,
|
|
4858
4871
|
onProceed: kr
|
|
4859
4872
|
}, {
|
|
4860
4873
|
default: v(() => [
|
|
4861
|
-
T(
|
|
4874
|
+
T(m(a), {
|
|
4862
4875
|
class: "message",
|
|
4863
4876
|
keypath: e.config.consumerGroupName ? "consumers.consumer_groups.remove.confirmation" : "consumers.consumer_groups.remove.confirmationNoCG",
|
|
4864
4877
|
tag: "p"
|
|
4865
4878
|
}, je({
|
|
4866
4879
|
consumer: v(() => [
|
|
4867
|
-
|
|
4880
|
+
q("strong", null, j(ve.value.username || ve.value.custom_id || ve.value.id), 1)
|
|
4868
4881
|
]),
|
|
4869
4882
|
_: 2
|
|
4870
4883
|
}, [
|
|
4871
4884
|
e.config.consumerGroupName ? {
|
|
4872
4885
|
name: "consumerGroup",
|
|
4873
4886
|
fn: v(() => [
|
|
4874
|
-
|
|
4887
|
+
q("strong", null, j(e.config.consumerGroupName), 1)
|
|
4875
4888
|
]),
|
|
4876
4889
|
key: "0"
|
|
4877
4890
|
} : void 0
|
|
4878
4891
|
]), 1032, ["keypath"]),
|
|
4879
|
-
|
|
4892
|
+
q("p", null, j(m(o)("consumers.consumer_groups.remove.description")), 1)
|
|
4880
4893
|
]),
|
|
4881
4894
|
_: 1
|
|
4882
4895
|
}, 8, ["title", "visible"])) : z("", !0)
|
|
4883
4896
|
]);
|
|
4884
4897
|
};
|
|
4885
4898
|
}
|
|
4886
|
-
}), du = /* @__PURE__ */
|
|
4899
|
+
}), du = /* @__PURE__ */ Mt(Rs, [["__scopeId", "data-v-7bf00df6"]]);
|
|
4887
4900
|
let He;
|
|
4888
4901
|
const Vs = new Uint8Array(16);
|
|
4889
4902
|
function Ds() {
|
|
@@ -4913,7 +4926,7 @@ function zs(e, t, n) {
|
|
|
4913
4926
|
}
|
|
4914
4927
|
return Ps(r);
|
|
4915
4928
|
}
|
|
4916
|
-
const Js = { class: "kong-ui-entities-consumer-form" }, Hs = ["id"], Ws = { class: "fields-group-text" }, Ys = ["aria-labelledby"], Zs = /* @__PURE__ */
|
|
4929
|
+
const Js = { class: "kong-ui-entities-consumer-form" }, Hs = ["id"], Ws = { class: "fields-group-text" }, Ys = ["aria-labelledby"], Zs = /* @__PURE__ */ Y({
|
|
4917
4930
|
__name: "ConsumerForm",
|
|
4918
4931
|
props: {
|
|
4919
4932
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4932,7 +4945,7 @@ const Js = { class: "kong-ui-entities-consumer-form" }, Hs = ["id"], Ws = { clas
|
|
|
4932
4945
|
emits: ["update", "error", "loading"],
|
|
4933
4946
|
setup(e, { emit: t }) {
|
|
4934
4947
|
var L;
|
|
4935
|
-
const n = e, r = t, { i18nT: a, i18n: { t: o } } = rt.useI18n(), i =
|
|
4948
|
+
const n = e, r = t, { i18nT: a, i18n: { t: o } } = rt.useI18n(), i = _t(), { axiosInstance: l } = Ot((L = n.config) == null ? void 0 : L.axiosRequestConfig), { getMessageFromError: s } = $s(), u = zs(), d = Vt({
|
|
4936
4949
|
fields: {
|
|
4937
4950
|
username: "",
|
|
4938
4951
|
customId: "",
|
|
@@ -4944,103 +4957,103 @@ const Js = { class: "kong-ui-entities-consumer-form" }, Hs = ["id"], Ws = { clas
|
|
|
4944
4957
|
username: "",
|
|
4945
4958
|
customId: "",
|
|
4946
4959
|
tags: ""
|
|
4947
|
-
}),
|
|
4948
|
-
var
|
|
4949
|
-
return (
|
|
4950
|
-
}),
|
|
4951
|
-
var
|
|
4952
|
-
i.push(((
|
|
4953
|
-
},
|
|
4954
|
-
r("loading",
|
|
4955
|
-
},
|
|
4956
|
-
r("error",
|
|
4957
|
-
},
|
|
4958
|
-
var K,
|
|
4959
|
-
d.fields.username = ((K =
|
|
4960
|
-
const
|
|
4961
|
-
d.fields.tags = (
|
|
4962
|
-
},
|
|
4963
|
-
var K,
|
|
4964
|
-
let
|
|
4965
|
-
return ((
|
|
4966
|
-
},
|
|
4967
|
-
var
|
|
4960
|
+
}), k = S(() => {
|
|
4961
|
+
var C, f;
|
|
4962
|
+
return (f = Ne.form[(C = n.config) == null ? void 0 : C.app]) == null ? void 0 : f.edit;
|
|
4963
|
+
}), g = () => {
|
|
4964
|
+
var C;
|
|
4965
|
+
i.push(((C = n.config) == null ? void 0 : C.cancelRoute) || { name: "consumer-list" });
|
|
4966
|
+
}, I = (C) => {
|
|
4967
|
+
r("loading", C);
|
|
4968
|
+
}, N = (C) => {
|
|
4969
|
+
r("error", C);
|
|
4970
|
+
}, w = (C) => {
|
|
4971
|
+
var K, O, _;
|
|
4972
|
+
d.fields.username = ((K = C == null ? void 0 : C.item) == null ? void 0 : K.username) || (C == null ? void 0 : C.username) || "", d.fields.customId = ((O = C == null ? void 0 : C.item) == null ? void 0 : O.custom_id) || (C == null ? void 0 : C.custom_id) || "";
|
|
4973
|
+
const f = ((_ = C == null ? void 0 : C.item) == null ? void 0 : _.tags) || (C == null ? void 0 : C.tags) || [];
|
|
4974
|
+
d.fields.tags = (f == null ? void 0 : f.join(", ")) || "", Object.assign(c, d.fields);
|
|
4975
|
+
}, U = S(() => n.consumerId ? ht.Edit : ht.Create), A = (C) => {
|
|
4976
|
+
var K, O, _, x, B, D;
|
|
4977
|
+
let f = `${(K = n.config) == null ? void 0 : K.apiBaseUrl}${Ne.form[(O = n.config) == null ? void 0 : O.app][C]}`;
|
|
4978
|
+
return ((_ = n.config) == null ? void 0 : _.app) === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((x = n.config) == null ? void 0 : x.controlPlaneId) || "") : ((B = n.config) == null ? void 0 : B.app) === "kongManager" && (f = f.replace(/\/{workspace}/gi, (D = n.config) != null && D.workspace ? `/${n.config.workspace}` : "")), f = f.replace(/{id}/gi, n.consumerId), f;
|
|
4979
|
+
}, H = S(() => !!d.fields.username || !!d.fields.customId), b = S(() => JSON.stringify(d.fields) !== JSON.stringify(c)), h = S(() => {
|
|
4980
|
+
var C, f;
|
|
4968
4981
|
return {
|
|
4969
4982
|
username: d.fields.username || null,
|
|
4970
4983
|
custom_id: d.fields.customId || null,
|
|
4971
|
-
tags: (
|
|
4984
|
+
tags: (f = (C = d.fields.tags.split(",")) == null ? void 0 : C.map((K) => String(K || "").trim())) == null ? void 0 : f.filter((K) => K !== "")
|
|
4972
4985
|
};
|
|
4973
|
-
}),
|
|
4974
|
-
var
|
|
4986
|
+
}), p = async () => {
|
|
4987
|
+
var C;
|
|
4975
4988
|
try {
|
|
4976
4989
|
d.readonly = !0;
|
|
4977
|
-
let
|
|
4978
|
-
await l.post(
|
|
4979
|
-
} catch (
|
|
4980
|
-
d.errorMessage = s(
|
|
4990
|
+
let f;
|
|
4991
|
+
await l.post(A("validate"), h.value), U.value === "create" ? f = await l.post(A("create"), h.value) : U.value === "edit" && (f = ((C = n.config) == null ? void 0 : C.app) === "konnect" ? await l.put(A("edit"), h.value) : await l.patch(A("edit"), h.value)), w(f == null ? void 0 : f.data), r("update", f == null ? void 0 : f.data);
|
|
4992
|
+
} catch (f) {
|
|
4993
|
+
d.errorMessage = s(f), r("error", f);
|
|
4981
4994
|
} finally {
|
|
4982
4995
|
d.readonly = !1;
|
|
4983
4996
|
}
|
|
4984
4997
|
};
|
|
4985
|
-
return (
|
|
4986
|
-
const K =
|
|
4987
|
-
return
|
|
4988
|
-
T(
|
|
4989
|
-
"can-submit":
|
|
4998
|
+
return (C, f) => {
|
|
4999
|
+
const K = R("KInput"), O = R("KCard");
|
|
5000
|
+
return y(), E("div", Js, [
|
|
5001
|
+
T(m(Ul), {
|
|
5002
|
+
"can-submit": H.value && b.value,
|
|
4990
5003
|
config: e.config,
|
|
4991
5004
|
"edit-id": e.consumerId,
|
|
4992
5005
|
"error-message": d.errorMessage,
|
|
4993
|
-
"fetch-url":
|
|
4994
|
-
"form-fields":
|
|
5006
|
+
"fetch-url": k.value,
|
|
5007
|
+
"form-fields": h.value,
|
|
4995
5008
|
"is-readonly": d.readonly,
|
|
4996
|
-
onCancel:
|
|
4997
|
-
"onFetch:error":
|
|
4998
|
-
"onFetch:success":
|
|
4999
|
-
onLoading:
|
|
5000
|
-
onSubmit:
|
|
5009
|
+
onCancel: g,
|
|
5010
|
+
"onFetch:error": f[3] || (f[3] = (_) => N(_)),
|
|
5011
|
+
"onFetch:success": w,
|
|
5012
|
+
onLoading: f[4] || (f[4] = (_) => I(_)),
|
|
5013
|
+
onSubmit: p
|
|
5001
5014
|
}, {
|
|
5002
5015
|
default: v(() => [
|
|
5003
|
-
|
|
5004
|
-
T(
|
|
5005
|
-
description:
|
|
5016
|
+
q("div", null, [
|
|
5017
|
+
T(m(xs), {
|
|
5018
|
+
description: m(o)("consumers.form.info.description"),
|
|
5006
5019
|
"has-divider": "",
|
|
5007
|
-
title:
|
|
5020
|
+
title: m(o)("consumers.form.info.title")
|
|
5008
5021
|
}, {
|
|
5009
5022
|
default: v(() => [
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
id: `fields-group-title-${
|
|
5023
|
+
q("div", null, [
|
|
5024
|
+
q("h3", {
|
|
5025
|
+
id: `fields-group-title-${m(u)}`,
|
|
5013
5026
|
class: "fields-group-title"
|
|
5014
|
-
}, j(
|
|
5015
|
-
|
|
5027
|
+
}, j(m(o)("consumers.form.consumer_identification.title")) + "* ", 9, Hs),
|
|
5028
|
+
q("p", Ws, j(m(o)("consumers.form.consumer_identification.description")), 1)
|
|
5016
5029
|
]),
|
|
5017
|
-
T(
|
|
5030
|
+
T(O, null, {
|
|
5018
5031
|
default: v(() => [
|
|
5019
|
-
|
|
5020
|
-
"aria-labelledby": `fields-group-title-${
|
|
5032
|
+
q("fieldset", {
|
|
5033
|
+
"aria-labelledby": `fields-group-title-${m(u)}`
|
|
5021
5034
|
}, [
|
|
5022
5035
|
T(K, {
|
|
5023
5036
|
modelValue: d.fields.username,
|
|
5024
|
-
"onUpdate:modelValue":
|
|
5037
|
+
"onUpdate:modelValue": f[0] || (f[0] = (_) => d.fields.username = _),
|
|
5025
5038
|
modelModifiers: { trim: !0 },
|
|
5026
5039
|
autocomplete: "off",
|
|
5027
5040
|
class: "username-field",
|
|
5028
5041
|
"data-testid": "consumer-form-username",
|
|
5029
|
-
label:
|
|
5042
|
+
label: m(o)("consumers.fields.username.label"),
|
|
5030
5043
|
"label-attributes": {
|
|
5031
5044
|
tooltipAttributes: { maxWidth: "250" }
|
|
5032
5045
|
},
|
|
5033
|
-
placeholder:
|
|
5046
|
+
placeholder: m(o)("consumers.fields.username.placeholder"),
|
|
5034
5047
|
readonly: d.readonly,
|
|
5035
5048
|
type: "text"
|
|
5036
5049
|
}, {
|
|
5037
5050
|
"label-tooltip": v(() => [
|
|
5038
|
-
T(
|
|
5051
|
+
T(m(a), {
|
|
5039
5052
|
keypath: "consumers.fields.username.tooltip",
|
|
5040
5053
|
scope: "global"
|
|
5041
5054
|
}, {
|
|
5042
5055
|
custom_id: v(() => [
|
|
5043
|
-
|
|
5056
|
+
q("code", null, j(m(o)("consumers.fields.username.custom_id")), 1)
|
|
5044
5057
|
]),
|
|
5045
5058
|
_: 1
|
|
5046
5059
|
})
|
|
@@ -5049,25 +5062,25 @@ const Js = { class: "kong-ui-entities-consumer-form" }, Hs = ["id"], Ws = { clas
|
|
|
5049
5062
|
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
5050
5063
|
T(K, {
|
|
5051
5064
|
modelValue: d.fields.customId,
|
|
5052
|
-
"onUpdate:modelValue":
|
|
5065
|
+
"onUpdate:modelValue": f[1] || (f[1] = (_) => d.fields.customId = _),
|
|
5053
5066
|
modelModifiers: { trim: !0 },
|
|
5054
5067
|
autocomplete: "off",
|
|
5055
5068
|
"data-testid": "consumer-form-custom-id",
|
|
5056
|
-
label:
|
|
5069
|
+
label: m(o)("consumers.fields.custom_id.label"),
|
|
5057
5070
|
"label-attributes": {
|
|
5058
5071
|
tooltipAttributes: { maxWidth: "250" }
|
|
5059
5072
|
},
|
|
5060
|
-
placeholder:
|
|
5073
|
+
placeholder: m(o)("consumers.fields.custom_id.placeholder"),
|
|
5061
5074
|
readonly: d.readonly,
|
|
5062
5075
|
type: "text"
|
|
5063
5076
|
}, {
|
|
5064
5077
|
"label-tooltip": v(() => [
|
|
5065
|
-
T(
|
|
5078
|
+
T(m(a), {
|
|
5066
5079
|
keypath: "consumers.fields.custom_id.tooltip",
|
|
5067
5080
|
scope: "global"
|
|
5068
5081
|
}, {
|
|
5069
5082
|
username: v(() => [
|
|
5070
|
-
|
|
5083
|
+
q("code", null, j(m(o)("consumers.fields.custom_id.username")), 1)
|
|
5071
5084
|
]),
|
|
5072
5085
|
_: 1
|
|
5073
5086
|
})
|
|
@@ -5080,17 +5093,17 @@ const Js = { class: "kong-ui-entities-consumer-form" }, Hs = ["id"], Ws = { clas
|
|
|
5080
5093
|
}),
|
|
5081
5094
|
T(K, {
|
|
5082
5095
|
modelValue: d.fields.tags,
|
|
5083
|
-
"onUpdate:modelValue":
|
|
5096
|
+
"onUpdate:modelValue": f[2] || (f[2] = (_) => d.fields.tags = _),
|
|
5084
5097
|
modelModifiers: { trim: !0 },
|
|
5085
5098
|
autocomplete: "off",
|
|
5086
5099
|
"data-testid": "consumer-form-tags",
|
|
5087
|
-
help:
|
|
5088
|
-
label:
|
|
5100
|
+
help: m(o)("consumers.fields.tags.help"),
|
|
5101
|
+
label: m(o)("consumers.fields.tags.label"),
|
|
5089
5102
|
"label-attributes": {
|
|
5090
|
-
info:
|
|
5103
|
+
info: m(o)("consumers.fields.tags.tooltip"),
|
|
5091
5104
|
tooltipAttributes: { maxWidth: "250" }
|
|
5092
5105
|
},
|
|
5093
|
-
placeholder:
|
|
5106
|
+
placeholder: m(o)("consumers.fields.tags.placeholder"),
|
|
5094
5107
|
readonly: d.readonly,
|
|
5095
5108
|
type: "text"
|
|
5096
5109
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
@@ -5104,7 +5117,7 @@ const Js = { class: "kong-ui-entities-consumer-form" }, Hs = ["id"], Ws = { clas
|
|
|
5104
5117
|
]);
|
|
5105
5118
|
};
|
|
5106
5119
|
}
|
|
5107
|
-
}), pu = /* @__PURE__ */
|
|
5120
|
+
}), pu = /* @__PURE__ */ Mt(Zs, [["__scopeId", "data-v-d3813a74"]]), Qs = { class: "kong-ui-consumer-entity-config-card" }, fu = /* @__PURE__ */ Y({
|
|
5108
5121
|
__name: "ConsumerConfigCard",
|
|
5109
5122
|
props: {
|
|
5110
5123
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5131,7 +5144,7 @@ const Js = { class: "kong-ui-entities-consumer-form" }, Hs = ["id"], Ws = { clas
|
|
|
5131
5144
|
},
|
|
5132
5145
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
5133
5146
|
setup(e) {
|
|
5134
|
-
const t = e, { i18n: { t: n }, i18nT: r } = rt.useI18n(), a =
|
|
5147
|
+
const t = e, { i18n: { t: n }, i18nT: r } = rt.useI18n(), a = S(() => Ne.form[t.config.app].edit), o = F({
|
|
5135
5148
|
id: {},
|
|
5136
5149
|
username: {
|
|
5137
5150
|
section: ce.Basic,
|
|
@@ -5156,8 +5169,8 @@ const Js = { class: "kong-ui-entities-consumer-form" }, Hs = ["id"], Ws = { clas
|
|
|
5156
5169
|
hidden: !0
|
|
5157
5170
|
}
|
|
5158
5171
|
});
|
|
5159
|
-
return (i, l) => (
|
|
5160
|
-
T(
|
|
5172
|
+
return (i, l) => (y(), E("div", Qs, [
|
|
5173
|
+
T(m(ql), {
|
|
5161
5174
|
config: e.config,
|
|
5162
5175
|
"config-card-doc": e.configCardDoc,
|
|
5163
5176
|
"config-schema": o.value,
|
|
@@ -5168,23 +5181,23 @@ const Js = { class: "kong-ui-entities-consumer-form" }, Hs = ["id"], Ws = { clas
|
|
|
5168
5181
|
onLoading: l[2] || (l[2] = (s) => i.$emit("loading", s))
|
|
5169
5182
|
}, {
|
|
5170
5183
|
"username-label-tooltip": v(() => [
|
|
5171
|
-
T(
|
|
5184
|
+
T(m(r), {
|
|
5172
5185
|
keypath: "consumers.fields.username.tooltip",
|
|
5173
5186
|
scope: "global"
|
|
5174
5187
|
}, {
|
|
5175
5188
|
custom_id: v(() => [
|
|
5176
|
-
|
|
5189
|
+
q("code", null, j(m(n)("consumers.fields.username.custom_id")), 1)
|
|
5177
5190
|
]),
|
|
5178
5191
|
_: 1
|
|
5179
5192
|
})
|
|
5180
5193
|
]),
|
|
5181
5194
|
"custom_id-label-tooltip": v(() => [
|
|
5182
|
-
T(
|
|
5195
|
+
T(m(r), {
|
|
5183
5196
|
keypath: "consumers.fields.custom_id.tooltip",
|
|
5184
5197
|
scope: "global"
|
|
5185
5198
|
}, {
|
|
5186
5199
|
username: v(() => [
|
|
5187
|
-
|
|
5200
|
+
q("code", null, j(m(n)("consumers.fields.custom_id.username")), 1)
|
|
5188
5201
|
]),
|
|
5189
5202
|
_: 1
|
|
5190
5203
|
})
|