@kong-ui-public/entities-consumer-groups 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-consumer-groups.es.js +917 -904
- package/dist/entities-consumer-groups.umd.js +23 -23
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as X, ref as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as X, ref as F, computed as I, watch as xe, renderSlot as ne, createCommentVNode as W, unref as h, onBeforeMount as dt, resolveComponent as R, openBlock as m, createBlock as D, createSlots as Le, withCtx as b, createElementVNode as U, createVNode as $, createTextVNode as Z, toDisplayString as q, renderList as ve, createElementBlock as O, withModifiers as It, withDirectives as Te, vShow as $e, Fragment as be, normalizeClass as Oe, withKeys as Cr, useSlots as Nt, resolveDynamicComponent as Fe, useCssVars as vn, inject as wr, onMounted as _r, onUnmounted as Sr, normalizeStyle as pt, normalizeProps as Ir, guardReactiveProps as xr, mergeProps as Ar, pushScopeId as ft, popScopeId as mt, reactive as Gt } from "vue";
|
|
2
|
+
import { useRouter as Ot } from "vue-router";
|
|
3
3
|
import { createI18n as bn, i18nTComponent as kn } from "@kong-ui-public/i18n";
|
|
4
4
|
import zt from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as Tr } from "@kong/kongponents";
|
|
@@ -95,7 +95,7 @@ const $r = {
|
|
|
95
95
|
}, jr = {
|
|
96
96
|
consumer_groups: $r
|
|
97
97
|
};
|
|
98
|
-
function
|
|
98
|
+
function Nr() {
|
|
99
99
|
const e = bn("en-us", jr);
|
|
100
100
|
return {
|
|
101
101
|
i18n: e,
|
|
@@ -104,13 +104,13 @@ function Mr() {
|
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
const gt = {
|
|
107
|
-
useI18n:
|
|
108
|
-
},
|
|
107
|
+
useI18n: Nr
|
|
108
|
+
}, Se = "/v2/control-planes/{controlPlaneId}/core-entities", Ie = "/{workspace}", je = {
|
|
109
109
|
list: {
|
|
110
110
|
konnect: {
|
|
111
|
-
all: `${
|
|
112
|
-
forConsumer: `${
|
|
113
|
-
oneForConsumer: `${
|
|
111
|
+
all: `${Se}/consumer_groups`,
|
|
112
|
+
forConsumer: `${Se}/consumers/{consumerId}/consumer_groups`,
|
|
113
|
+
oneForConsumer: `${Se}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
114
114
|
},
|
|
115
115
|
kongManager: {
|
|
116
116
|
all: `${Ie}/consumer_groups?counter=true`,
|
|
@@ -120,12 +120,12 @@ const gt = {
|
|
|
120
120
|
},
|
|
121
121
|
form: {
|
|
122
122
|
konnect: {
|
|
123
|
-
consumersList: `${
|
|
124
|
-
create: `${
|
|
125
|
-
edit: `${
|
|
126
|
-
addConsumer: `${
|
|
127
|
-
removeConsumer: `${
|
|
128
|
-
getConsumers: `${
|
|
123
|
+
consumersList: `${Se}/consumers`,
|
|
124
|
+
create: `${Se}/consumer_groups`,
|
|
125
|
+
edit: `${Se}/consumer_groups/{id}`,
|
|
126
|
+
addConsumer: `${Se}/consumer_groups/{id}/consumers`,
|
|
127
|
+
removeConsumer: `${Se}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
128
|
+
getConsumers: `${Se}/consumer_groups/{id}/consumers`
|
|
129
129
|
},
|
|
130
130
|
kongManager: {
|
|
131
131
|
consumersList: `${Ie}/consumers`,
|
|
@@ -137,8 +137,8 @@ const gt = {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
|
-
var Cn = /* @__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))(Cn || {}), ot = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ot || {}), qe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(qe || {}), ee = /* @__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))(ee || {}),
|
|
141
|
-
function
|
|
140
|
+
var Cn = /* @__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))(Cn || {}), ot = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ot || {}), qe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(qe || {}), ee = /* @__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))(ee || {}), ye = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ye || {});
|
|
141
|
+
function Or() {
|
|
142
142
|
return {
|
|
143
143
|
getAxiosInstance: (e = {}) => {
|
|
144
144
|
try {
|
|
@@ -162,7 +162,7 @@ function Er() {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function Er() {
|
|
166
166
|
return {
|
|
167
167
|
debounce: (e, t) => {
|
|
168
168
|
let n;
|
|
@@ -174,7 +174,7 @@ function Or() {
|
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
const Ct = "khcp-user-table-preferences",
|
|
177
|
+
const Ct = "khcp-user-table-preferences", Mr = {
|
|
178
178
|
pageSize: 30,
|
|
179
179
|
sortColumnKey: void 0,
|
|
180
180
|
sortColumnOrder: void 0
|
|
@@ -203,15 +203,15 @@ function Fr() {
|
|
|
203
203
|
},
|
|
204
204
|
getTablePreferences: (n) => {
|
|
205
205
|
const r = t();
|
|
206
|
-
return (r == null ? void 0 : r.get(n)) || void 0 ||
|
|
206
|
+
return (r == null ? void 0 : r.get(n)) || void 0 || Mr;
|
|
207
207
|
},
|
|
208
208
|
deleteAllTablePreferences: () => {
|
|
209
209
|
localStorage.removeItem(Ct);
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
212
|
}
|
|
213
|
-
function
|
|
214
|
-
const { getAxiosInstance: t } =
|
|
213
|
+
function Et(e = {}) {
|
|
214
|
+
const { getAxiosInstance: t } = Or();
|
|
215
215
|
return {
|
|
216
216
|
axiosInstance: t(e)
|
|
217
217
|
};
|
|
@@ -324,7 +324,7 @@ const qr = {
|
|
|
324
324
|
validationErrors: Dr,
|
|
325
325
|
toggleModal: Gr
|
|
326
326
|
};
|
|
327
|
-
function
|
|
327
|
+
function ht() {
|
|
328
328
|
const e = bn("en-us", zr);
|
|
329
329
|
return {
|
|
330
330
|
i18n: e,
|
|
@@ -381,62 +381,62 @@ function Jr(e, t, n, r = {
|
|
|
381
381
|
searchKeys: ["id"]
|
|
382
382
|
}) {
|
|
383
383
|
n || (n = "1000");
|
|
384
|
-
const { axiosInstance: a } =
|
|
384
|
+
const { axiosInstance: a } = Et(e.axiosRequestConfig), { i18n: { t: i } } = ht(), { debounce: o } = Er(), s = o(async (v) => {
|
|
385
385
|
await Y(v);
|
|
386
|
-
}, 200), l =
|
|
387
|
-
let
|
|
388
|
-
e.app === "konnect" ?
|
|
389
|
-
const { isValidUuid:
|
|
386
|
+
}, 200), l = F(!1), u = F(""), d = F(""), c = F([]), y = F([]), p = F(void 0), _ = h(t);
|
|
387
|
+
let A = `${e.apiBaseUrl}${_}`;
|
|
388
|
+
e.app === "konnect" ? A = A.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (A = A.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
389
|
+
const { isValidUuid: w } = wn(), L = async () => {
|
|
390
390
|
try {
|
|
391
391
|
l.value = !0;
|
|
392
|
-
const { data: v } = await a.get(`${
|
|
393
|
-
v != null && v.next || (p.value = r.fetchedItemsKey in v ? v[r.fetchedItemsKey] : []),
|
|
392
|
+
const { data: v } = await a.get(`${A}?size=${n}`);
|
|
393
|
+
v != null && v.next || (p.value = r.fetchedItemsKey in v ? v[r.fetchedItemsKey] : []), y.value = r.fetchedItemsKey in v ? v[r.fetchedItemsKey] : [], c.value = y.value;
|
|
394
394
|
} catch {
|
|
395
395
|
c.value = [], u.value = i("debouncedFilter.errors.fetch");
|
|
396
396
|
} finally {
|
|
397
397
|
l.value = !1;
|
|
398
398
|
}
|
|
399
|
-
},
|
|
400
|
-
var f,
|
|
401
|
-
if (
|
|
402
|
-
if (
|
|
399
|
+
}, T = F(""), Y = async (v) => {
|
|
400
|
+
var f, g, K;
|
|
401
|
+
if (T.value !== v)
|
|
402
|
+
if (T.value = v || "", p.value === void 0)
|
|
403
403
|
try {
|
|
404
404
|
if (l.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
405
|
-
let
|
|
406
|
-
v && (
|
|
407
|
-
const { data:
|
|
408
|
-
r.fetchedItemsKey in
|
|
405
|
+
let B = A + "";
|
|
406
|
+
v && (B += `/${v}`);
|
|
407
|
+
const { data: S } = await a.get(`${B}?size=${n}`);
|
|
408
|
+
r.fetchedItemsKey in S ? c.value = S[r.fetchedItemsKey] : S != null && S.id ? c.value = [S] : c.value = [];
|
|
409
409
|
} else if (v) {
|
|
410
|
-
const
|
|
411
|
-
|
|
412
|
-
const { data: E } = await a.get(`${
|
|
410
|
+
const B = [];
|
|
411
|
+
w(v) && r.searchKeys.includes("id") ? B.push((async () => {
|
|
412
|
+
const { data: E } = await a.get(`${A}/${v}`);
|
|
413
413
|
return [E[r.fetchedItemsKey] ?? E];
|
|
414
|
-
})()) :
|
|
414
|
+
})()) : B.push(
|
|
415
415
|
...r.searchKeys.filter((E) => E !== "id").map(async (E) => {
|
|
416
|
-
const { data: k } = await a.get(`${
|
|
416
|
+
const { data: k } = await a.get(`${A}?${E}=${v}`);
|
|
417
417
|
return k[r.fetchedItemsKey];
|
|
418
418
|
})
|
|
419
419
|
);
|
|
420
|
-
const
|
|
421
|
-
c.value = [], (f =
|
|
420
|
+
const S = await Promise.all(B), z = /* @__PURE__ */ new Set();
|
|
421
|
+
c.value = [], (f = S == null ? void 0 : S.forEach) == null || f.call(S, (E) => {
|
|
422
422
|
var k;
|
|
423
|
-
(k = E == null ? void 0 : E.forEach) == null || k.call(E, (
|
|
424
|
-
z.has(
|
|
423
|
+
(k = E == null ? void 0 : E.forEach) == null || k.call(E, (N) => {
|
|
424
|
+
z.has(N.id) || (z.add(N.id), c.value.push(N));
|
|
425
425
|
});
|
|
426
426
|
});
|
|
427
427
|
} else
|
|
428
|
-
c.value =
|
|
429
|
-
} catch (
|
|
430
|
-
((
|
|
428
|
+
c.value = y.value;
|
|
429
|
+
} catch (B) {
|
|
430
|
+
((g = B == null ? void 0 : B.response) == null ? void 0 : g.status) === 404 ? d.value = i("debouncedFilter.errors.invalid") : (c.value = [], u.value = i("debouncedFilter.errors.fetch"));
|
|
431
431
|
} finally {
|
|
432
432
|
l.value = !1;
|
|
433
433
|
}
|
|
434
434
|
else
|
|
435
|
-
l.value = !0, d.value = "", v ? (c.value = (
|
|
436
|
-
var
|
|
435
|
+
l.value = !0, d.value = "", v ? (c.value = (K = p.value) == null ? void 0 : K.filter((B) => {
|
|
436
|
+
var S;
|
|
437
437
|
let z = !1;
|
|
438
438
|
for (const E of r.searchKeys) {
|
|
439
|
-
const k = typeof
|
|
439
|
+
const k = typeof B[E] == "string" ? (S = B[E]) == null ? void 0 : S.toLowerCase() : B[E];
|
|
440
440
|
k != null && k.includes(v.toLowerCase()) && (z = !0);
|
|
441
441
|
}
|
|
442
442
|
return z;
|
|
@@ -448,18 +448,18 @@ function Jr(e, t, n, r = {
|
|
|
448
448
|
validationError: d,
|
|
449
449
|
results: c,
|
|
450
450
|
allRecords: p,
|
|
451
|
-
loadItems:
|
|
451
|
+
loadItems: L,
|
|
452
452
|
debouncedQueryChange: s
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
455
|
function Hr(e, t) {
|
|
456
|
-
const n =
|
|
456
|
+
const n = h(t), r = I(
|
|
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}`;
|
|
460
460
|
}
|
|
461
461
|
function Wr() {
|
|
462
|
-
const { i18n: { t: e } } =
|
|
462
|
+
const { i18n: { t: e } } = ht();
|
|
463
463
|
return {
|
|
464
464
|
getMessageFromError: (t) => {
|
|
465
465
|
var n, r, a, i;
|
|
@@ -500,17 +500,17 @@ function Yr(e) {
|
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
function _n(e, t) {
|
|
503
|
-
const n =
|
|
503
|
+
const n = F(h(e)), r = F(h(t)), a = I(
|
|
504
504
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
505
|
-
), i =
|
|
505
|
+
), i = I(
|
|
506
506
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
507
507
|
);
|
|
508
508
|
return (o) => {
|
|
509
|
-
const { page: s, pageSize: l, offset: u, sortColumnKey: d, sortColumnOrder: c, query:
|
|
509
|
+
const { page: s, pageSize: l, offset: u, sortColumnKey: d, sortColumnOrder: c, query: y } = o;
|
|
510
510
|
try {
|
|
511
511
|
let p = new URL(i.value.href);
|
|
512
|
-
return a.value &&
|
|
513
|
-
p.searchParams.append(
|
|
512
|
+
return a.value && y ? (p.search = "", p = n.value.isExactMatch ? new URL(`${p.href}/${y}/`) : new URL(`${p.href}?filter[name][contains]=${y}`)) : (a.value || new URLSearchParams(y).forEach((_, A) => {
|
|
513
|
+
p.searchParams.append(A, _);
|
|
514
514
|
}), d && p.searchParams.append("sort_by", d), c === "desc" && p.searchParams.append("sort_desc", "1"), p.searchParams.append("size", String(l))), u && s !== 1 && p.searchParams.append("offset", String(u)), p.href;
|
|
515
515
|
} catch (p) {
|
|
516
516
|
return console.error("RouteList(fetcher)", p), r.value;
|
|
@@ -518,7 +518,7 @@ function _n(e, t) {
|
|
|
518
518
|
};
|
|
519
519
|
}
|
|
520
520
|
function Zr(e, t, n = "data") {
|
|
521
|
-
const r =
|
|
521
|
+
const r = h(t), { axiosInstance: a } = Et(e.axiosRequestConfig), i = _n(e, r), o = F({
|
|
522
522
|
status: qe.Idle
|
|
523
523
|
});
|
|
524
524
|
return { fetcher: async (s) => {
|
|
@@ -530,10 +530,10 @@ function Zr(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,
|
|
533
|
+
const c = d.data, y = n && n.replace(/[^\w-_]/gi, "");
|
|
534
534
|
let p;
|
|
535
|
-
c[
|
|
536
|
-
const
|
|
535
|
+
c[y] && Array.isArray(c[y]) ? p = c[y] : Array.isArray(c) ? p = c : p = Object.keys(c).length ? [c] : [];
|
|
536
|
+
const _ = {
|
|
537
537
|
data: p,
|
|
538
538
|
total: p.length,
|
|
539
539
|
...c.offset ? {
|
|
@@ -544,8 +544,8 @@ function Zr(e, t, n = "data") {
|
|
|
544
544
|
};
|
|
545
545
|
return o.value = {
|
|
546
546
|
status: qe.Idle,
|
|
547
|
-
response:
|
|
548
|
-
},
|
|
547
|
+
response: _
|
|
548
|
+
}, _;
|
|
549
549
|
} catch (u) {
|
|
550
550
|
const d = {
|
|
551
551
|
data: [],
|
|
@@ -570,10 +570,10 @@ function Qr() {
|
|
|
570
570
|
convertKeyToTitle: e
|
|
571
571
|
};
|
|
572
572
|
}
|
|
573
|
-
const
|
|
573
|
+
const Sn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Jt = (e) => {
|
|
574
574
|
if (typeof e != "string")
|
|
575
575
|
throw new TypeError("Invalid argument expected string");
|
|
576
|
-
const t = e.match(
|
|
576
|
+
const t = e.match(Sn);
|
|
577
577
|
if (!t)
|
|
578
578
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
579
579
|
return t.shift(), t;
|
|
@@ -611,7 +611,7 @@ const An = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
611
611
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
612
612
|
if (Qt.indexOf(e) === -1)
|
|
613
613
|
throw new Error(`Invalid operator, expected one of ${Qt.join("|")}`);
|
|
614
|
-
}, ra = (e) => typeof e == "string" && /^[v\d]/.test(e) &&
|
|
614
|
+
}, ra = (e) => typeof e == "string" && /^[v\d]/.test(e) && Sn.test(e);
|
|
615
615
|
function aa(e) {
|
|
616
616
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
617
617
|
if (!t)
|
|
@@ -626,21 +626,21 @@ function aa(e) {
|
|
|
626
626
|
return !(o && Zt(a, o, "<") || s && Zt(a, s, ">"));
|
|
627
627
|
}
|
|
628
628
|
function oa(e) {
|
|
629
|
-
const t =
|
|
629
|
+
const t = F(0), n = F(0), r = F(!1);
|
|
630
630
|
return xe(e, (a) => {
|
|
631
631
|
a && !r.value && (t.value = a.offsetWidth, n.value = a.scrollWidth, r.value = !0);
|
|
632
632
|
}), {
|
|
633
|
-
isTruncated:
|
|
633
|
+
isTruncated: I(() => t.value < n.value)
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
636
|
function ia() {
|
|
637
|
-
const { i18n: { t: e } } =
|
|
637
|
+
const { i18n: { t: e } } = ht();
|
|
638
638
|
return {
|
|
639
639
|
utf8Name: (t) => /^[\p{N}\p{L}.\-_~]*$/u.test(t) ? "" : e("validationErrors.utf8Name")
|
|
640
640
|
};
|
|
641
641
|
}
|
|
642
642
|
const se = {
|
|
643
|
-
useAxios:
|
|
643
|
+
useAxios: Et,
|
|
644
644
|
useDebouncedFilter: Jr,
|
|
645
645
|
useDeleteUrlBuilder: Hr,
|
|
646
646
|
useErrors: Wr,
|
|
@@ -649,7 +649,7 @@ const se = {
|
|
|
649
649
|
useFetchUrlBuilder: _n,
|
|
650
650
|
useHelpers: wn,
|
|
651
651
|
useStringHelpers: Qr,
|
|
652
|
-
useI18n:
|
|
652
|
+
useI18n: ht,
|
|
653
653
|
useGatewayFeatureSupported: aa,
|
|
654
654
|
useTruncationDetector: oa,
|
|
655
655
|
useValidators: ia
|
|
@@ -673,25 +673,25 @@ const se = {
|
|
|
673
673
|
}
|
|
674
674
|
},
|
|
675
675
|
setup(e) {
|
|
676
|
-
const t = e, { i18n: { t: n } } = se.useI18n(), { convertKeyToTitle: r } = se.useStringHelpers(), a =
|
|
676
|
+
const t = e, { i18n: { t: n } } = se.useI18n(), { convertKeyToTitle: r } = se.useStringHelpers(), a = I(() => t.item.key ?? "json-array-item"), i = I(() => t.item.value ?? t.item), o = I(() => {
|
|
677
677
|
const l = JSON.parse(JSON.stringify(i.value));
|
|
678
678
|
return t.isArrayItem && delete l.name, l;
|
|
679
|
-
}), s =
|
|
679
|
+
}), s = I(() => {
|
|
680
680
|
var l;
|
|
681
681
|
return t.isArrayItem ? (l = i.value) != null && l.name ? r(i.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
682
682
|
});
|
|
683
683
|
return (l, u) => (m(), D(Fe(e.isArrayItem ? "fieldset" : "div"), {
|
|
684
|
-
class:
|
|
684
|
+
class: Oe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
685
685
|
}, {
|
|
686
686
|
default: b(() => [
|
|
687
|
-
e.isArrayItem ? (m(),
|
|
688
|
-
|
|
687
|
+
e.isArrayItem ? (m(), O("legend", sa, [
|
|
688
|
+
U("b", null, q(s.value), 1)
|
|
689
689
|
])) : W("", !0),
|
|
690
|
-
(m(!0),
|
|
690
|
+
(m(!0), O(be, null, ve(Object.keys(o.value), (d, c) => (m(), D(An, {
|
|
691
691
|
key: `${a.value}-property-${c}`,
|
|
692
692
|
item: {
|
|
693
693
|
key: d,
|
|
694
|
-
label:
|
|
694
|
+
label: h(r)(d),
|
|
695
695
|
value: o.value[d]
|
|
696
696
|
}
|
|
697
697
|
}, null, 8, ["item"]))), 128))
|
|
@@ -716,15 +716,15 @@ const se = {
|
|
|
716
716
|
setup(e) {
|
|
717
717
|
const { i18n: { t } } = se.useI18n();
|
|
718
718
|
return (n, r) => {
|
|
719
|
-
const a =
|
|
720
|
-
return m(),
|
|
721
|
-
|
|
719
|
+
const a = R("KButton");
|
|
720
|
+
return m(), O("div", null, [
|
|
721
|
+
$(a, {
|
|
722
722
|
appearance: "tertiary",
|
|
723
723
|
class: "navigation-button",
|
|
724
724
|
onClick: r[0] || (r[0] = (i) => n.$emit("navigation-click", e.item))
|
|
725
725
|
}, {
|
|
726
726
|
default: b(() => [
|
|
727
|
-
Z(
|
|
727
|
+
Z(q(e.item.value || h(t)("baseConfigCard.commonFields.link")), 1)
|
|
728
728
|
]),
|
|
729
729
|
_: 1
|
|
730
730
|
})
|
|
@@ -742,18 +742,18 @@ const se = {
|
|
|
742
742
|
setup(e) {
|
|
743
743
|
const { i18n: { t } } = se.useI18n();
|
|
744
744
|
return (n, r) => {
|
|
745
|
-
const a =
|
|
745
|
+
const a = R("KBadge");
|
|
746
746
|
return m(), D(a, {
|
|
747
747
|
appearance: e.status ? "success" : "neutral"
|
|
748
748
|
}, {
|
|
749
749
|
default: b(() => [
|
|
750
|
-
Z(
|
|
750
|
+
Z(q(e.status ? h(t)("baseConfigCard.statusBadge.enabledLabel") : h(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
751
751
|
]),
|
|
752
752
|
_: 1
|
|
753
753
|
}, 8, ["appearance"]);
|
|
754
754
|
};
|
|
755
755
|
}
|
|
756
|
-
}), pa = "#0044f4", fa = "#e0e4ea", ma = "#3a3f51", ga = "#afb7c5",
|
|
756
|
+
}), pa = "#0044f4", fa = "#e0e4ea", ma = "#3a3f51", ga = "#afb7c5", ha = "1px", ya = "20px", va = { class: "config-card-details-row" }, ba = ["data-testid"], ka = ["data-testid"], Ca = ["data-testid"], wa = ["data-testid"], _a = { key: 1 }, Sa = ["data-testid"], Ia = ["data-testid"], xa = ["data-testid"], Aa = ["data-testid"], Ta = {
|
|
757
757
|
name: "ConfigCardItem",
|
|
758
758
|
components: { JsonCardItem: xn, StatusBadge: da, InternalLinkItem: ca }
|
|
759
759
|
}, $a = /* @__PURE__ */ X({
|
|
@@ -776,13 +776,13 @@ const se = {
|
|
|
776
776
|
},
|
|
777
777
|
emits: ["navigation-click"],
|
|
778
778
|
setup(e, { emit: t }) {
|
|
779
|
-
vn((
|
|
780
|
-
"07753575": d.value ? "none" : `solid ${
|
|
779
|
+
vn((_) => ({
|
|
780
|
+
"07753575": d.value ? "none" : `solid ${h(ha)} ${h(fa)}`,
|
|
781
781
|
"32d44ea8": u.value && s.value ? "block" : "flex",
|
|
782
782
|
"5036b738": u.value && s.value ? "100%" : n.slim ? "50%" : "25%",
|
|
783
783
|
"5038fd13": u.value && s.value ? "100%" : n.slim ? "50%" : "75%"
|
|
784
784
|
}));
|
|
785
|
-
const n = e, r = t, a =
|
|
785
|
+
const n = e, r = t, a = Nt(), { i18n: { t: i, formatUnixTimeStamp: o } } = se.useI18n(), s = I(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), l = I(() => !!(n.item.tooltip || a["label-tooltip"])), u = I(() => n.item.type === ee.Json || n.item.type === ee.JsonArray), d = I(() => n.item.type === ee.JsonArray), c = I(() => {
|
|
786
786
|
switch (n.item.type) {
|
|
787
787
|
case ee.ID:
|
|
788
788
|
return {
|
|
@@ -852,8 +852,8 @@ const se = {
|
|
|
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: (_) => {
|
|
856
|
+
r("navigation-click", _);
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
859
|
};
|
|
@@ -892,29 +892,29 @@ const se = {
|
|
|
892
892
|
text: n.item.value
|
|
893
893
|
};
|
|
894
894
|
}
|
|
895
|
-
}),
|
|
896
|
-
return (
|
|
897
|
-
const
|
|
898
|
-
return m(),
|
|
899
|
-
|
|
895
|
+
}), y = F(), { isTruncated: p } = se.useTruncationDetector(y);
|
|
896
|
+
return (_, A) => {
|
|
897
|
+
const w = R("KLabel"), L = R("KBadge"), T = R("KCopy"), Y = R("KTooltip");
|
|
898
|
+
return m(), O("div", va, [
|
|
899
|
+
U("div", {
|
|
900
900
|
class: "config-card-details-label",
|
|
901
901
|
"data-testid": `${e.item.key}-label`
|
|
902
902
|
}, [
|
|
903
|
-
ne(
|
|
904
|
-
|
|
903
|
+
ne(_.$slots, "label", { item: e.item }, () => [
|
|
904
|
+
$(w, { "tooltip-attributes": { maxWidth: "500px" } }, Le({
|
|
905
905
|
default: b(() => [
|
|
906
|
-
Z(
|
|
906
|
+
Z(q(e.item.label) + " ", 1)
|
|
907
907
|
]),
|
|
908
908
|
_: 2
|
|
909
909
|
}, [
|
|
910
910
|
l.value ? {
|
|
911
911
|
name: "tooltip",
|
|
912
912
|
fn: b(() => [
|
|
913
|
-
|
|
913
|
+
U("div", {
|
|
914
914
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
915
915
|
}, [
|
|
916
|
-
ne(
|
|
917
|
-
Z(
|
|
916
|
+
ne(_.$slots, "label-tooltip", {}, () => [
|
|
917
|
+
Z(q(e.item.tooltip), 1)
|
|
918
918
|
], !0)
|
|
919
919
|
], 8, ka)
|
|
920
920
|
]),
|
|
@@ -923,21 +923,21 @@ const se = {
|
|
|
923
923
|
]), 1024)
|
|
924
924
|
], !0)
|
|
925
925
|
], 8, ba),
|
|
926
|
-
|
|
926
|
+
U("div", {
|
|
927
927
|
class: "config-card-details-value",
|
|
928
928
|
"data-testid": `${e.item.key}-property-value`
|
|
929
929
|
}, [
|
|
930
|
-
ne(
|
|
930
|
+
ne(_.$slots, e.item.key, {
|
|
931
931
|
rowValue: e.item.value
|
|
932
932
|
}, () => [
|
|
933
|
-
s.value ? (m(),
|
|
933
|
+
s.value ? (m(), O("div", _a, [
|
|
934
934
|
(m(), D(Fe(c.value.tag), Ir(xr(c.value.attrs)), {
|
|
935
935
|
default: b(() => [
|
|
936
|
-
c.value.additionalComponent === "KBadge" ? (m(),
|
|
936
|
+
c.value.additionalComponent === "KBadge" ? (m(), O("div", {
|
|
937
937
|
key: 0,
|
|
938
938
|
"data-testid": `${e.item.key}-badge-tags`
|
|
939
939
|
}, [
|
|
940
|
-
(m(!0),
|
|
940
|
+
(m(!0), O(be, null, ve(e.item.value, (v, f) => (m(), D(L, {
|
|
941
941
|
key: `${e.item.key}-badge-tag-${f}`,
|
|
942
942
|
class: "config-badge",
|
|
943
943
|
"data-testid": `${e.item.key}-badge-tag-${f}`,
|
|
@@ -945,65 +945,65 @@ const se = {
|
|
|
945
945
|
"truncation-tooltip": ""
|
|
946
946
|
}, {
|
|
947
947
|
default: b(() => [
|
|
948
|
-
Z(
|
|
948
|
+
Z(q(v), 1)
|
|
949
949
|
]),
|
|
950
950
|
_: 2
|
|
951
951
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
952
|
-
], 8,
|
|
953
|
-
c.value.additionalComponent === "KCopy" ? (m(),
|
|
952
|
+
], 8, Sa)) : W("", !0),
|
|
953
|
+
c.value.additionalComponent === "KCopy" ? (m(), O("div", {
|
|
954
954
|
key: 1,
|
|
955
955
|
class: "copy-uuid-array",
|
|
956
956
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
957
957
|
}, [
|
|
958
|
-
(m(!0),
|
|
958
|
+
(m(!0), O(be, null, ve(e.item.value, (v, f) => (m(), D(T, Ar(c.value.childAttrs, {
|
|
959
959
|
key: `${e.item.key}-copy-uuid-${f}`,
|
|
960
960
|
"data-testid": `${e.item.key}-copy-uuid-${f}`,
|
|
961
961
|
text: v
|
|
962
962
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
963
|
-
], 8, Ia)) : c.value.additionalComponent === "KMethodBadge" ? (m(),
|
|
963
|
+
], 8, Ia)) : c.value.additionalComponent === "KMethodBadge" ? (m(), O("div", {
|
|
964
964
|
key: 2,
|
|
965
965
|
class: "method-badge-array",
|
|
966
966
|
"data-testid": `${e.item.key}-badge-methods`
|
|
967
967
|
}, [
|
|
968
|
-
(m(!0),
|
|
968
|
+
(m(!0), O(be, null, ve(e.item.value, (v, f) => (m(), D(L, {
|
|
969
969
|
key: `${e.item.key}-badge-method-${f}`,
|
|
970
|
-
appearance: Object.values(
|
|
970
|
+
appearance: Object.values(h(Tr)).includes(v.toLowerCase()) ? v.toLowerCase() : "custom",
|
|
971
971
|
class: "config-badge",
|
|
972
972
|
"data-testid": `${e.item.key}-badge-method-${f}`
|
|
973
973
|
}, {
|
|
974
974
|
default: b(() => [
|
|
975
|
-
Z(
|
|
975
|
+
Z(q(v), 1)
|
|
976
976
|
]),
|
|
977
977
|
_: 2
|
|
978
978
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
979
979
|
], 8, xa)) : W("", !0),
|
|
980
|
-
c.value.additionalComponent === "JsonCardItem" ? (m(),
|
|
980
|
+
c.value.additionalComponent === "JsonCardItem" ? (m(), O("div", {
|
|
981
981
|
key: 3,
|
|
982
982
|
"data-testid": `${n.item.key}-json-array-content`
|
|
983
983
|
}, [
|
|
984
|
-
(m(!0),
|
|
984
|
+
(m(!0), O(be, null, ve(e.item.value, (v, f) => (m(), D(xn, {
|
|
985
985
|
key: `json-array-item-${f}`,
|
|
986
986
|
index: f,
|
|
987
987
|
"is-array-item": "",
|
|
988
988
|
item: v
|
|
989
989
|
}, null, 8, ["index", "item"]))), 128))
|
|
990
|
-
], 8,
|
|
990
|
+
], 8, Aa)) : (m(), D(Y, {
|
|
991
991
|
key: 4,
|
|
992
|
-
text:
|
|
992
|
+
text: h(p) ? e.item.value : ""
|
|
993
993
|
}, {
|
|
994
994
|
default: b(() => [
|
|
995
|
-
|
|
995
|
+
U("span", {
|
|
996
996
|
ref_key: "textContent",
|
|
997
|
-
ref:
|
|
998
|
-
class:
|
|
999
|
-
},
|
|
997
|
+
ref: y,
|
|
998
|
+
class: Oe(["attrs-data-text", { truncated: e.truncated }])
|
|
999
|
+
}, q(c.value.text), 3)
|
|
1000
1000
|
]),
|
|
1001
1001
|
_: 1
|
|
1002
1002
|
}, 8, ["text"]))
|
|
1003
1003
|
]),
|
|
1004
1004
|
_: 1
|
|
1005
1005
|
}, 16))
|
|
1006
|
-
])) : (m(),
|
|
1006
|
+
])) : (m(), O("div", {
|
|
1007
1007
|
key: 0,
|
|
1008
1008
|
"data-testid": `${e.item.key}-no-value`
|
|
1009
1009
|
}, " – ", 8, wa))
|
|
@@ -1012,7 +1012,7 @@ const se = {
|
|
|
1012
1012
|
]);
|
|
1013
1013
|
};
|
|
1014
1014
|
}
|
|
1015
|
-
}),
|
|
1015
|
+
}), An = /* @__PURE__ */ ke($a, [["__scopeId", "data-v-d056663c"]]), ja = { class: "json-config" }, Na = {
|
|
1016
1016
|
key: 0,
|
|
1017
1017
|
class: "json-endpoint"
|
|
1018
1018
|
}, Tn = /* @__PURE__ */ X({
|
|
@@ -1046,7 +1046,7 @@ const se = {
|
|
|
1046
1046
|
vn((a) => ({
|
|
1047
1047
|
"4520e3ec": `${r.value}ch`
|
|
1048
1048
|
}));
|
|
1049
|
-
const t = e, n =
|
|
1049
|
+
const t = e, n = I(() => t.jsonRecord), r = I(() => {
|
|
1050
1050
|
var a;
|
|
1051
1051
|
if (!t.fetcherUrl)
|
|
1052
1052
|
return 0;
|
|
@@ -1054,18 +1054,18 @@ const se = {
|
|
|
1054
1054
|
return i.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? i[i.length - 1] : i[i.length - 2]).length;
|
|
1055
1055
|
});
|
|
1056
1056
|
return (a, i) => {
|
|
1057
|
-
const o =
|
|
1058
|
-
return m(),
|
|
1059
|
-
t.fetcherUrl ? (m(),
|
|
1060
|
-
|
|
1057
|
+
const o = R("KBadge"), s = R("KCodeBlock");
|
|
1058
|
+
return m(), O("div", ja, [
|
|
1059
|
+
t.fetcherUrl ? (m(), O("div", Na, [
|
|
1060
|
+
$(o, {
|
|
1061
1061
|
appearance: t.requestMethod
|
|
1062
1062
|
}, {
|
|
1063
1063
|
default: b(() => [
|
|
1064
|
-
Z(
|
|
1064
|
+
Z(q(t.requestMethod), 1)
|
|
1065
1065
|
]),
|
|
1066
1066
|
_: 1
|
|
1067
1067
|
}, 8, ["appearance"]),
|
|
1068
|
-
|
|
1068
|
+
$(s, {
|
|
1069
1069
|
id: "json-endpoint-codeblock",
|
|
1070
1070
|
code: t.fetcherUrl,
|
|
1071
1071
|
language: "json",
|
|
@@ -1076,7 +1076,7 @@ const se = {
|
|
|
1076
1076
|
t.jsonRecord ? (m(), D(s, {
|
|
1077
1077
|
key: 1,
|
|
1078
1078
|
id: "json-codeblock",
|
|
1079
|
-
class:
|
|
1079
|
+
class: Oe({ "json-content": t.fetcherUrl }),
|
|
1080
1080
|
code: JSON.stringify(n.value, null, 2),
|
|
1081
1081
|
language: "json",
|
|
1082
1082
|
theme: "dark"
|
|
@@ -1089,13 +1089,13 @@ const se = {
|
|
|
1089
1089
|
function $n(e) {
|
|
1090
1090
|
return typeof e > "u" || e === null;
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function Oa(e) {
|
|
1093
1093
|
return typeof e == "object" && e !== null;
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1095
|
+
function Ea(e) {
|
|
1096
1096
|
return Array.isArray(e) ? e : $n(e) ? [] : [e];
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function Ma(e, t) {
|
|
1099
1099
|
var n, r, a, i;
|
|
1100
1100
|
if (t)
|
|
1101
1101
|
for (i = Object.keys(t), n = 0, r = i.length; n < r; n += 1)
|
|
@@ -1111,7 +1111,7 @@ function Fa(e, t) {
|
|
|
1111
1111
|
function qa(e) {
|
|
1112
1112
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1113
1113
|
}
|
|
1114
|
-
var Ka = $n, La =
|
|
1114
|
+
var Ka = $n, La = Oa, Ba = Ea, Ua = Fa, Pa = qa, Ra = Ma, ie = {
|
|
1115
1115
|
isNothing: Ka,
|
|
1116
1116
|
isObject: La,
|
|
1117
1117
|
toArray: Ba,
|
|
@@ -1267,26 +1267,26 @@ xt.prototype.extend = function(e) {
|
|
|
1267
1267
|
var r = Object.create(xt.prototype);
|
|
1268
1268
|
return r.implicit = (this.implicit || []).concat(t), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit = Xt(r, "implicit"), r.compiledExplicit = Xt(r, "explicit"), r.compiledTypeMap = Wa(r.compiledImplicit, r.compiledExplicit), r;
|
|
1269
1269
|
};
|
|
1270
|
-
var
|
|
1270
|
+
var Nn = xt, On = new ce("tag:yaml.org,2002:str", {
|
|
1271
1271
|
kind: "scalar",
|
|
1272
1272
|
construct: function(e) {
|
|
1273
1273
|
return e !== null ? e : "";
|
|
1274
1274
|
}
|
|
1275
|
-
}),
|
|
1275
|
+
}), En = new ce("tag:yaml.org,2002:seq", {
|
|
1276
1276
|
kind: "sequence",
|
|
1277
1277
|
construct: function(e) {
|
|
1278
1278
|
return e !== null ? e : [];
|
|
1279
1279
|
}
|
|
1280
|
-
}),
|
|
1280
|
+
}), Mn = new ce("tag:yaml.org,2002:map", {
|
|
1281
1281
|
kind: "mapping",
|
|
1282
1282
|
construct: function(e) {
|
|
1283
1283
|
return e !== null ? e : {};
|
|
1284
1284
|
}
|
|
1285
|
-
}), Fn = new
|
|
1285
|
+
}), Fn = new Nn({
|
|
1286
1286
|
explicit: [
|
|
1287
|
-
En,
|
|
1288
1287
|
On,
|
|
1289
|
-
|
|
1288
|
+
En,
|
|
1289
|
+
Mn
|
|
1290
1290
|
]
|
|
1291
1291
|
});
|
|
1292
1292
|
function Ya(e) {
|
|
@@ -1527,8 +1527,8 @@ var Bn = new ce("tag:yaml.org,2002:float", {
|
|
|
1527
1527
|
function go(e) {
|
|
1528
1528
|
return e === null ? !1 : Rn.exec(e) !== null || Vn.exec(e) !== null;
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1531
|
-
var t, n, r, a, i, o, s, l = 0, u = null, d, c,
|
|
1530
|
+
function ho(e) {
|
|
1531
|
+
var t, n, r, a, i, o, s, l = 0, u = null, d, c, y;
|
|
1532
1532
|
if (t = Rn.exec(e), t === null && (t = Vn.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,17 +1538,17 @@ function yo(e) {
|
|
|
1538
1538
|
l += "0";
|
|
1539
1539
|
l = +l;
|
|
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)), y = new Date(Date.UTC(n, r, a, i, o, s, l)), u && y.setTime(y.getTime() - u), y;
|
|
1542
1542
|
}
|
|
1543
|
-
function
|
|
1543
|
+
function yo(e) {
|
|
1544
1544
|
return e.toISOString();
|
|
1545
1545
|
}
|
|
1546
1546
|
var Dn = new ce("tag:yaml.org,2002:timestamp", {
|
|
1547
1547
|
kind: "scalar",
|
|
1548
1548
|
resolve: go,
|
|
1549
|
-
construct:
|
|
1549
|
+
construct: ho,
|
|
1550
1550
|
instanceOf: Date,
|
|
1551
|
-
represent:
|
|
1551
|
+
represent: yo
|
|
1552
1552
|
});
|
|
1553
1553
|
function vo(e) {
|
|
1554
1554
|
return e === "<<" || e === null;
|
|
@@ -1556,12 +1556,12 @@ function vo(e) {
|
|
|
1556
1556
|
var Gn = new ce("tag:yaml.org,2002:merge", {
|
|
1557
1557
|
kind: "scalar",
|
|
1558
1558
|
resolve: vo
|
|
1559
|
-
}),
|
|
1559
|
+
}), Mt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1560
1560
|
\r`;
|
|
1561
1561
|
function bo(e) {
|
|
1562
1562
|
if (e === null)
|
|
1563
1563
|
return !1;
|
|
1564
|
-
var t, n, r = 0, a = e.length, i =
|
|
1564
|
+
var t, n, r = 0, a = e.length, i = Mt;
|
|
1565
1565
|
for (n = 0; n < a; n++)
|
|
1566
1566
|
if (t = i.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1567
1567
|
if (t < 0)
|
|
@@ -1571,13 +1571,13 @@ function bo(e) {
|
|
|
1571
1571
|
return r % 8 === 0;
|
|
1572
1572
|
}
|
|
1573
1573
|
function ko(e) {
|
|
1574
|
-
var t, n, r = e.replace(/[\r\n=]/g, ""), a = r.length, i =
|
|
1574
|
+
var t, n, r = e.replace(/[\r\n=]/g, ""), a = r.length, i = Mt, o = 0, s = [];
|
|
1575
1575
|
for (t = 0; t < a; t++)
|
|
1576
1576
|
t % 4 === 0 && t && (s.push(o >> 16 & 255), s.push(o >> 8 & 255), s.push(o & 255)), o = o << 6 | i.indexOf(r.charAt(t));
|
|
1577
1577
|
return n = a % 4 * 6, n === 0 ? (s.push(o >> 16 & 255), s.push(o >> 8 & 255), s.push(o & 255)) : n === 18 ? (s.push(o >> 10 & 255), s.push(o >> 2 & 255)) : n === 12 && s.push(o >> 4 & 255), new Uint8Array(s);
|
|
1578
1578
|
}
|
|
1579
1579
|
function Co(e) {
|
|
1580
|
-
var t = "", n = 0, r, a, i = e.length, o =
|
|
1580
|
+
var t = "", n = 0, r, a, i = e.length, o = Mt;
|
|
1581
1581
|
for (r = 0; r < i; r++)
|
|
1582
1582
|
r % 3 === 0 && r && (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]), n = (n << 8) + e[r];
|
|
1583
1583
|
return a = i % 3, a === 0 ? (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]) : a === 2 ? (t += o[n >> 10 & 63], t += o[n >> 4 & 63], t += o[n << 2 & 63], t += o[64]) : a === 1 && (t += o[n >> 2 & 63], t += o[n << 4 & 63], t += o[64], t += o[64]), t;
|
|
@@ -1591,13 +1591,13 @@ var zn = new ce("tag:yaml.org,2002:binary", {
|
|
|
1591
1591
|
construct: ko,
|
|
1592
1592
|
predicate: wo,
|
|
1593
1593
|
represent: Co
|
|
1594
|
-
}), _o = Object.prototype.hasOwnProperty,
|
|
1594
|
+
}), _o = Object.prototype.hasOwnProperty, So = Object.prototype.toString;
|
|
1595
1595
|
function Io(e) {
|
|
1596
1596
|
if (e === null)
|
|
1597
1597
|
return !0;
|
|
1598
1598
|
var t = [], n, r, a, i, o, s = e;
|
|
1599
1599
|
for (n = 0, r = s.length; n < r; n += 1) {
|
|
1600
|
-
if (a = s[n], o = !1,
|
|
1600
|
+
if (a = s[n], o = !1, So.call(a) !== "[object Object]")
|
|
1601
1601
|
return !1;
|
|
1602
1602
|
for (i in a)
|
|
1603
1603
|
if (_o.call(a, i))
|
|
@@ -1621,13 +1621,13 @@ var Jn = new ce("tag:yaml.org,2002:omap", {
|
|
|
1621
1621
|
kind: "sequence",
|
|
1622
1622
|
resolve: Io,
|
|
1623
1623
|
construct: xo
|
|
1624
|
-
}),
|
|
1624
|
+
}), Ao = Object.prototype.toString;
|
|
1625
1625
|
function To(e) {
|
|
1626
1626
|
if (e === null)
|
|
1627
1627
|
return !0;
|
|
1628
1628
|
var t, n, r, a, i, o = e;
|
|
1629
1629
|
for (i = new Array(o.length), t = 0, n = o.length; t < n; t += 1) {
|
|
1630
|
-
if (r = o[t],
|
|
1630
|
+
if (r = o[t], Ao.call(r) !== "[object Object]" || (a = Object.keys(r), a.length !== 1))
|
|
1631
1631
|
return !1;
|
|
1632
1632
|
i[t] = [a[0], r[a[0]]];
|
|
1633
1633
|
}
|
|
@@ -1646,7 +1646,7 @@ var Hn = new ce("tag:yaml.org,2002:pairs", {
|
|
|
1646
1646
|
resolve: To,
|
|
1647
1647
|
construct: $o
|
|
1648
1648
|
}), jo = Object.prototype.hasOwnProperty;
|
|
1649
|
-
function
|
|
1649
|
+
function No(e) {
|
|
1650
1650
|
if (e === null)
|
|
1651
1651
|
return !0;
|
|
1652
1652
|
var t, n = e;
|
|
@@ -1655,13 +1655,13 @@ function Mo(e) {
|
|
|
1655
1655
|
return !1;
|
|
1656
1656
|
return !0;
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1658
|
+
function Oo(e) {
|
|
1659
1659
|
return e !== null ? e : {};
|
|
1660
1660
|
}
|
|
1661
1661
|
var Wn = new ce("tag:yaml.org,2002:set", {
|
|
1662
1662
|
kind: "mapping",
|
|
1663
|
-
resolve:
|
|
1664
|
-
construct:
|
|
1663
|
+
resolve: No,
|
|
1664
|
+
construct: Oo
|
|
1665
1665
|
}), Ft = Pn.extend({
|
|
1666
1666
|
implicit: [
|
|
1667
1667
|
Dn,
|
|
@@ -1673,7 +1673,7 @@ var Wn = new ce("tag:yaml.org,2002:set", {
|
|
|
1673
1673
|
Hn,
|
|
1674
1674
|
Wn
|
|
1675
1675
|
]
|
|
1676
|
-
}),
|
|
1676
|
+
}), Ee = Object.prototype.hasOwnProperty, it = 1, Yn = 2, Zn = 3, st = 4, St = 1, Eo = 2, en = 3, Mo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Fo = /[\x85\u2028\u2029]/, qo = /[,\[\]\{\}]/, Qn = /^(?:!|!!|![a-z\-]+!)$/i, Xn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1677
1677
|
function tn(e) {
|
|
1678
1678
|
return Object.prototype.toString.call(e);
|
|
1679
1679
|
}
|
|
@@ -1683,7 +1683,7 @@ function _e(e) {
|
|
|
1683
1683
|
function Ke(e) {
|
|
1684
1684
|
return e === 9 || e === 32;
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1686
|
+
function he(e) {
|
|
1687
1687
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1688
1688
|
}
|
|
1689
1689
|
function De(e) {
|
|
@@ -1726,7 +1726,7 @@ function nr(e, t) {
|
|
|
1726
1726
|
};
|
|
1727
1727
|
return n.snippet = Da(n), new fe(t, n);
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function j(e, t) {
|
|
1730
1730
|
throw nr(e, t);
|
|
1731
1731
|
}
|
|
1732
1732
|
function lt(e, t) {
|
|
@@ -1735,40 +1735,40 @@ function lt(e, t) {
|
|
|
1735
1735
|
var rn = {
|
|
1736
1736
|
YAML: function(e, t, n) {
|
|
1737
1737
|
var r, a, i;
|
|
1738
|
-
e.version !== null &&
|
|
1738
|
+
e.version !== null && j(e, "duplication of %YAML directive"), n.length !== 1 && j(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), r === null && j(e, "ill-formed argument of the YAML directive"), a = parseInt(r[1], 10), i = parseInt(r[2], 10), a !== 1 && j(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = i < 2, i !== 1 && i !== 2 && lt(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 && j(e, "TAG directive accepts exactly two arguments"), r = n[0], a = n[1], Qn.test(r) || j(e, "ill-formed tag handle (first argument) of the TAG directive"), Ee.call(e.tagMap, r) && j(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Xn.test(a) || j(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1743
1743
|
try {
|
|
1744
1744
|
a = decodeURIComponent(a);
|
|
1745
1745
|
} catch {
|
|
1746
|
-
|
|
1746
|
+
j(e, "tag prefix is malformed: " + a);
|
|
1747
1747
|
}
|
|
1748
1748
|
e.tagMap[r] = a;
|
|
1749
1749
|
}
|
|
1750
1750
|
};
|
|
1751
|
-
function
|
|
1751
|
+
function Ne(e, t, n, r) {
|
|
1752
1752
|
var a, i, o, s;
|
|
1753
1753
|
if (t < n) {
|
|
1754
1754
|
if (s = e.input.slice(t, n), r)
|
|
1755
1755
|
for (a = 0, i = s.length; a < i; a += 1)
|
|
1756
|
-
o = s.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 ||
|
|
1756
|
+
o = s.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 || j(e, "expected valid JSON character");
|
|
1757
1757
|
else
|
|
1758
|
-
|
|
1758
|
+
Mo.test(s) && j(e, "the stream contains non-printable characters");
|
|
1759
1759
|
e.result += s;
|
|
1760
1760
|
}
|
|
1761
1761
|
}
|
|
1762
1762
|
function an(e, t, n, r) {
|
|
1763
1763
|
var a, i, o, s;
|
|
1764
|
-
for (ie.isObject(n) ||
|
|
1765
|
-
i = a[o],
|
|
1764
|
+
for (ie.isObject(n) || j(e, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(n), o = 0, s = a.length; o < s; o += 1)
|
|
1765
|
+
i = a[o], Ee.call(t, i) || (t[i] = n[i], r[i] = !0);
|
|
1766
1766
|
}
|
|
1767
1767
|
function Ge(e, t, n, r, a, i, o, s, l) {
|
|
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]) && j(e, "nested arrays are not supported inside keys"), typeof a == "object" && tn(a[u]) === "[object Object]" && (a[u] = "[object Object]");
|
|
1772
1772
|
if (typeof a == "object" && tn(a) === "[object Object]" && (a = "[object Object]"), a = String(a), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1773
1773
|
if (Array.isArray(i))
|
|
1774
1774
|
for (u = 0, d = i.length; u < d; u += 1)
|
|
@@ -1776,7 +1776,7 @@ function Ge(e, t, n, r, a, i, o, s, l) {
|
|
|
1776
1776
|
else
|
|
1777
1777
|
an(e, t, i, n);
|
|
1778
1778
|
else
|
|
1779
|
-
!e.json && !
|
|
1779
|
+
!e.json && !Ee.call(n, a) && Ee.call(t, a) && (e.line = o || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, j(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 Ge(e, t, n, r, a, i, o, s, l) {
|
|
|
1786
1786
|
}
|
|
1787
1787
|
function qt(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++) : j(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1790
1790
|
}
|
|
1791
1791
|
function oe(e, t, n) {
|
|
1792
1792
|
for (var r = 0, a = e.input.charCodeAt(e.position); a !== 0; ) {
|
|
@@ -1804,27 +1804,27 @@ function oe(e, t, n) {
|
|
|
1804
1804
|
}
|
|
1805
1805
|
return n !== -1 && r !== 0 && e.lineIndent < n && lt(e, "deficient indentation"), r;
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function yt(e) {
|
|
1808
1808
|
var t = e.position, n;
|
|
1809
|
-
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 ||
|
|
1809
|
+
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || he(n)));
|
|
1810
1810
|
}
|
|
1811
1811
|
function Kt(e, t) {
|
|
1812
1812
|
t === 1 ? e.result += " " : t > 1 && (e.result += ie.repeat(`
|
|
1813
1813
|
`, t - 1));
|
|
1814
1814
|
}
|
|
1815
1815
|
function Ro(e, t, n) {
|
|
1816
|
-
var r, a, i, o, s, l, u, d, c = e.kind,
|
|
1817
|
-
if (p = e.input.charCodeAt(e.position),
|
|
1816
|
+
var r, a, i, o, s, l, u, d, c = e.kind, y = e.result, p;
|
|
1817
|
+
if (p = e.input.charCodeAt(e.position), he(p) || De(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (a = e.input.charCodeAt(e.position + 1), he(a) || n && De(a)))
|
|
1818
1818
|
return !1;
|
|
1819
1819
|
for (e.kind = "scalar", e.result = "", i = o = e.position, s = !1; p !== 0; ) {
|
|
1820
1820
|
if (p === 58) {
|
|
1821
|
-
if (a = e.input.charCodeAt(e.position + 1),
|
|
1821
|
+
if (a = e.input.charCodeAt(e.position + 1), he(a) || n && De(a))
|
|
1822
1822
|
break;
|
|
1823
1823
|
} else if (p === 35) {
|
|
1824
|
-
if (r = e.input.charCodeAt(e.position - 1),
|
|
1824
|
+
if (r = e.input.charCodeAt(e.position - 1), he(r))
|
|
1825
1825
|
break;
|
|
1826
1826
|
} else {
|
|
1827
|
-
if (e.position === e.lineStart &&
|
|
1827
|
+
if (e.position === e.lineStart && yt(e) || n && De(p))
|
|
1828
1828
|
break;
|
|
1829
1829
|
if (_e(p))
|
|
1830
1830
|
if (l = e.line, u = e.lineStart, d = e.lineIndent, oe(e, !1, -1), e.lineIndent >= t) {
|
|
@@ -1835,9 +1835,9 @@ function Ro(e, t, n) {
|
|
|
1835
1835
|
break;
|
|
1836
1836
|
}
|
|
1837
1837
|
}
|
|
1838
|
-
s && (
|
|
1838
|
+
s && (Ne(e, i, o, !1), Kt(e, e.line - l), i = o = e.position, s = !1), Ke(p) || (o = e.position + 1), p = e.input.charCodeAt(++e.position);
|
|
1839
1839
|
}
|
|
1840
|
-
return
|
|
1840
|
+
return Ne(e, i, o, !1), e.result ? !0 : (e.kind = c, e.result = y, !1);
|
|
1841
1841
|
}
|
|
1842
1842
|
function Vo(e, t) {
|
|
1843
1843
|
var n, r, a;
|
|
@@ -1845,13 +1845,13 @@ function Vo(e, t) {
|
|
|
1845
1845
|
return !1;
|
|
1846
1846
|
for (e.kind = "scalar", e.result = "", e.position++, r = a = e.position; (n = e.input.charCodeAt(e.position)) !== 0; )
|
|
1847
1847
|
if (n === 39)
|
|
1848
|
-
if (
|
|
1848
|
+
if (Ne(e, r, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39)
|
|
1849
1849
|
r = e.position, e.position++, a = e.position;
|
|
1850
1850
|
else
|
|
1851
1851
|
return !0;
|
|
1852
1852
|
else
|
|
1853
|
-
_e(n) ? (
|
|
1854
|
-
|
|
1853
|
+
_e(n) ? (Ne(e, r, a, !0), Kt(e, oe(e, !1, t)), r = a = e.position) : e.position === e.lineStart && yt(e) ? j(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
|
|
1854
|
+
j(e, "unexpected end of the stream within a single quoted scalar");
|
|
1855
1855
|
}
|
|
1856
1856
|
function Do(e, t) {
|
|
1857
1857
|
var n, r, a, i, o, s;
|
|
@@ -1859,41 +1859,41 @@ function Do(e, t) {
|
|
|
1859
1859
|
return !1;
|
|
1860
1860
|
for (e.kind = "scalar", e.result = "", e.position++, n = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1861
1861
|
if (s === 34)
|
|
1862
|
-
return
|
|
1862
|
+
return Ne(e, n, e.position, !0), e.position++, !0;
|
|
1863
1863
|
if (s === 92) {
|
|
1864
|
-
if (
|
|
1864
|
+
if (Ne(e, n, e.position, !0), s = e.input.charCodeAt(++e.position), _e(s))
|
|
1865
1865
|
oe(e, !1, t);
|
|
1866
1866
|
else if (s < 256 && er[s])
|
|
1867
1867
|
e.result += tr[s], e.position++;
|
|
1868
1868
|
else if ((o = Lo(s)) > 0) {
|
|
1869
1869
|
for (a = o, i = 0; a > 0; a--)
|
|
1870
|
-
s = e.input.charCodeAt(++e.position), (o = Ko(s)) >= 0 ? i = (i << 4) + o :
|
|
1870
|
+
s = e.input.charCodeAt(++e.position), (o = Ko(s)) >= 0 ? i = (i << 4) + o : j(e, "expected hexadecimal character");
|
|
1871
1871
|
e.result += Uo(i), e.position++;
|
|
1872
1872
|
} else
|
|
1873
|
-
|
|
1873
|
+
j(e, "unknown escape sequence");
|
|
1874
1874
|
n = r = e.position;
|
|
1875
1875
|
} else
|
|
1876
|
-
_e(s) ? (
|
|
1876
|
+
_e(s) ? (Ne(e, n, r, !0), Kt(e, oe(e, !1, t)), n = r = e.position) : e.position === e.lineStart && yt(e) ? j(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1877
1877
|
}
|
|
1878
|
-
|
|
1878
|
+
j(e, "unexpected end of the stream within a double quoted scalar");
|
|
1879
1879
|
}
|
|
1880
1880
|
function Go(e, t) {
|
|
1881
|
-
var n = !0, r, a, i, o = e.tag, s, l = e.anchor, u, d, c,
|
|
1882
|
-
if (
|
|
1881
|
+
var n = !0, r, a, i, o = e.tag, s, l = e.anchor, u, d, c, y, p, _ = /* @__PURE__ */ Object.create(null), A, w, L, T;
|
|
1882
|
+
if (T = e.input.charCodeAt(e.position), T === 91)
|
|
1883
1883
|
d = 93, p = !1, s = [];
|
|
1884
|
-
else if (
|
|
1884
|
+
else if (T === 123)
|
|
1885
1885
|
d = 125, p = !0, s = {};
|
|
1886
1886
|
else
|
|
1887
1887
|
return !1;
|
|
1888
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = s),
|
|
1889
|
-
if (oe(e, !0, t),
|
|
1888
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), T = e.input.charCodeAt(++e.position); T !== 0; ) {
|
|
1889
|
+
if (oe(e, !0, t), T = e.input.charCodeAt(e.position), T === d)
|
|
1890
1890
|
return e.position++, e.tag = o, e.anchor = l, e.kind = p ? "mapping" : "sequence", e.result = s, !0;
|
|
1891
|
-
n ?
|
|
1891
|
+
n ? T === 44 && j(e, "expected the node content, but found ','") : j(e, "missed comma between flow collection entries"), w = A = L = null, c = y = !1, T === 63 && (u = e.input.charCodeAt(e.position + 1), he(u) && (c = y = !0, e.position++, oe(e, !0, t))), r = e.line, a = e.lineStart, i = e.position, ze(e, t, it, !1, !0), w = e.tag, A = e.result, oe(e, !0, t), T = e.input.charCodeAt(e.position), (y || e.line === r) && T === 58 && (c = !0, T = e.input.charCodeAt(++e.position), oe(e, !0, t), ze(e, t, it, !1, !0), L = e.result), p ? Ge(e, s, _, w, A, L, r, a, i) : c ? s.push(Ge(e, null, _, w, A, L, r, a, i)) : s.push(A), oe(e, !0, t), T = e.input.charCodeAt(e.position), T === 44 ? (n = !0, T = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1892
1892
|
}
|
|
1893
|
-
|
|
1893
|
+
j(e, "unexpected end of the stream within a flow collection");
|
|
1894
1894
|
}
|
|
1895
1895
|
function zo(e, t) {
|
|
1896
|
-
var n, r, a =
|
|
1896
|
+
var n, r, a = St, i = !1, o = !1, s = t, l = 0, u = !1, d, c;
|
|
1897
1897
|
if (c = e.input.charCodeAt(e.position), c === 124)
|
|
1898
1898
|
r = !1;
|
|
1899
1899
|
else if (c === 62)
|
|
@@ -1902,9 +1902,9 @@ function zo(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
|
-
|
|
1905
|
+
St === a ? a = c === 43 ? en : Eo : j(e, "repeat of a chomping mode identifier");
|
|
1906
1906
|
else if ((d = Bo(c)) >= 0)
|
|
1907
|
-
d === 0 ?
|
|
1907
|
+
d === 0 ? j(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? j(e, "repeat of an indentation width identifier") : (s = t + d - 1, o = !0);
|
|
1908
1908
|
else
|
|
1909
1909
|
break;
|
|
1910
1910
|
if (Ke(c)) {
|
|
@@ -1925,7 +1925,7 @@ function zo(e, t) {
|
|
|
1925
1925
|
}
|
|
1926
1926
|
if (e.lineIndent < s) {
|
|
1927
1927
|
a === en ? e.result += ie.repeat(`
|
|
1928
|
-
`, i ? 1 + l : l) : a ===
|
|
1928
|
+
`, i ? 1 + l : l) : a === St && i && (e.result += `
|
|
1929
1929
|
`);
|
|
1930
1930
|
break;
|
|
1931
1931
|
}
|
|
@@ -1935,7 +1935,7 @@ function zo(e, t) {
|
|
|
1935
1935
|
`, l) : e.result += ie.repeat(`
|
|
1936
1936
|
`, i ? 1 + l : l), i = !0, o = !0, l = 0, n = e.position; !_e(c) && c !== 0; )
|
|
1937
1937
|
c = e.input.charCodeAt(++e.position);
|
|
1938
|
-
|
|
1938
|
+
Ne(e, n, e.position, !1);
|
|
1939
1939
|
}
|
|
1940
1940
|
return !0;
|
|
1941
1941
|
}
|
|
@@ -1943,119 +1943,119 @@ function on(e, t) {
|
|
|
1943
1943
|
var n, r = e.tag, a = e.anchor, i = [], o, s = !1, l;
|
|
1944
1944
|
if (e.firstTabInLine !== -1)
|
|
1945
1945
|
return !1;
|
|
1946
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1946
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, j(e, "tab characters must not be used in indentation")), !(l !== 45 || (o = e.input.charCodeAt(e.position + 1), !he(o)))); ) {
|
|
1947
1947
|
if (s = !0, e.position++, oe(e, !0, -1) && e.lineIndent <= t) {
|
|
1948
1948
|
i.push(null), l = e.input.charCodeAt(e.position);
|
|
1949
1949
|
continue;
|
|
1950
1950
|
}
|
|
1951
1951
|
if (n = e.line, ze(e, t, Zn, !1, !0), i.push(e.result), oe(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && l !== 0)
|
|
1952
|
-
|
|
1952
|
+
j(e, "bad indentation of a sequence entry");
|
|
1953
1953
|
else if (e.lineIndent < t)
|
|
1954
1954
|
break;
|
|
1955
1955
|
}
|
|
1956
1956
|
return s ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = i, !0) : !1;
|
|
1957
1957
|
}
|
|
1958
1958
|
function Jo(e, t, n) {
|
|
1959
|
-
var r, a, i, o, s, l, u = e.tag, d = e.anchor, c = {},
|
|
1959
|
+
var r, a, i, o, s, l, u = e.tag, d = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), p = null, _ = null, A = null, w = !1, L = !1, T;
|
|
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), T = e.input.charCodeAt(e.position); T !== 0; ) {
|
|
1963
|
+
if (!w && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, j(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), i = e.line, (T === 63 || T === 58) && he(r))
|
|
1964
|
+
T === 63 ? (w && (Ge(e, c, y, p, _, null, o, s, l), p = _ = A = null), L = !0, w = !0, a = !0) : w ? (w = !1, a = !0) : j(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, T = r;
|
|
1965
1965
|
else {
|
|
1966
1966
|
if (o = e.line, s = e.lineStart, l = e.position, !ze(e, n, Yn, !1, !0))
|
|
1967
1967
|
break;
|
|
1968
1968
|
if (e.line === i) {
|
|
1969
|
-
for (
|
|
1970
|
-
|
|
1971
|
-
if (
|
|
1972
|
-
|
|
1973
|
-
else if (
|
|
1974
|
-
|
|
1969
|
+
for (T = e.input.charCodeAt(e.position); Ke(T); )
|
|
1970
|
+
T = e.input.charCodeAt(++e.position);
|
|
1971
|
+
if (T === 58)
|
|
1972
|
+
T = e.input.charCodeAt(++e.position), he(T) || j(e, "a whitespace character is expected after the key-value separator within a block mapping"), w && (Ge(e, c, y, p, _, null, o, s, l), p = _ = A = null), L = !0, w = !1, a = !1, p = e.tag, _ = e.result;
|
|
1973
|
+
else if (L)
|
|
1974
|
+
j(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 (L)
|
|
1978
|
+
j(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 === i || e.lineIndent > t) && (
|
|
1983
|
-
|
|
1982
|
+
if ((e.line === i || e.lineIndent > t) && (w && (o = e.line, s = e.lineStart, l = e.position), ze(e, t, st, !0, a) && (w ? _ = e.result : A = e.result), w || (Ge(e, c, y, p, _, A, o, s, l), p = _ = A = null), oe(e, !0, -1), T = e.input.charCodeAt(e.position)), (e.line === i || e.lineIndent > t) && T !== 0)
|
|
1983
|
+
j(e, "bad indentation of a mapping entry");
|
|
1984
1984
|
else if (e.lineIndent < t)
|
|
1985
1985
|
break;
|
|
1986
1986
|
}
|
|
1987
|
-
return
|
|
1987
|
+
return w && Ge(e, c, y, p, _, null, o, s, l), L && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), L;
|
|
1988
1988
|
}
|
|
1989
1989
|
function Ho(e) {
|
|
1990
1990
|
var t, n = !1, r = !1, a, i, o;
|
|
1991
1991
|
if (o = e.input.charCodeAt(e.position), o !== 33)
|
|
1992
1992
|
return !1;
|
|
1993
|
-
if (e.tag !== null &&
|
|
1993
|
+
if (e.tag !== null && j(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (n = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (r = !0, a = "!!", o = e.input.charCodeAt(++e.position)) : a = "!", t = e.position, n) {
|
|
1994
1994
|
do
|
|
1995
1995
|
o = e.input.charCodeAt(++e.position);
|
|
1996
1996
|
while (o !== 0 && o !== 62);
|
|
1997
|
-
e.position < e.length ? (i = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) :
|
|
1997
|
+
e.position < e.length ? (i = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) : j(e, "unexpected end of the stream within a verbatim tag");
|
|
1998
1998
|
} else {
|
|
1999
|
-
for (; o !== 0 && !
|
|
2000
|
-
o === 33 && (r ?
|
|
2001
|
-
i = e.input.slice(t, e.position), qo.test(i) &&
|
|
1999
|
+
for (; o !== 0 && !he(o); )
|
|
2000
|
+
o === 33 && (r ? j(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(t - 1, e.position + 1), Qn.test(a) || j(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
2001
|
+
i = e.input.slice(t, e.position), qo.test(i) && j(e, "tag suffix cannot contain flow indicator characters");
|
|
2002
2002
|
}
|
|
2003
|
-
i && !Xn.test(i) &&
|
|
2003
|
+
i && !Xn.test(i) && j(e, "tag name cannot contain such characters: " + i);
|
|
2004
2004
|
try {
|
|
2005
2005
|
i = decodeURIComponent(i);
|
|
2006
2006
|
} catch {
|
|
2007
|
-
|
|
2007
|
+
j(e, "tag name is malformed: " + i);
|
|
2008
2008
|
}
|
|
2009
|
-
return n ? e.tag = i :
|
|
2009
|
+
return n ? e.tag = i : Ee.call(e.tagMap, a) ? e.tag = e.tagMap[a] + i : a === "!" ? e.tag = "!" + i : a === "!!" ? e.tag = "tag:yaml.org,2002:" + i : j(e, 'undeclared tag handle "' + a + '"'), !0;
|
|
2010
2010
|
}
|
|
2011
2011
|
function Wo(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 && j(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !he(n) && !De(n); )
|
|
2016
2016
|
n = e.input.charCodeAt(++e.position);
|
|
2017
|
-
return e.position === t &&
|
|
2017
|
+
return e.position === t && j(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 Yo(e) {
|
|
2020
2020
|
var t, n, r;
|
|
2021
2021
|
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
2022
2022
|
return !1;
|
|
2023
|
-
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !
|
|
2023
|
+
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !he(r) && !De(r); )
|
|
2024
2024
|
r = e.input.charCodeAt(++e.position);
|
|
2025
|
-
return e.position === t &&
|
|
2025
|
+
return e.position === t && j(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), Ee.call(e.anchorMap, n) || j(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], oe(e, !0, -1), !0;
|
|
2026
2026
|
}
|
|
2027
2027
|
function ze(e, t, n, r, a) {
|
|
2028
|
-
var i, o, s, l = 1, u = !1, d = !1, c,
|
|
2028
|
+
var i, o, s, l = 1, u = !1, d = !1, c, y, p, _, A, w;
|
|
2029
2029
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = o = s = st === n || Zn === n, r && oe(e, !0, -1) && (u = !0, e.lineIndent > t ? l = 1 : e.lineIndent === t ? l = 0 : e.lineIndent < t && (l = -1)), l === 1)
|
|
2030
2030
|
for (; Ho(e) || Wo(e); )
|
|
2031
2031
|
oe(e, !0, -1) ? (u = !0, s = i, e.lineIndent > t ? l = 1 : e.lineIndent === t ? l = 0 : e.lineIndent < t && (l = -1)) : s = !1;
|
|
2032
|
-
if (s && (s = u || a), (l === 1 || st === n) && (it === n || Yn === n ?
|
|
2032
|
+
if (s && (s = u || a), (l === 1 || st === n) && (it === n || Yn === n ? A = t : A = t + 1, w = e.position - e.lineStart, l === 1 ? s && (on(e, w) || Jo(e, w, A)) || Go(e, A) ? d = !0 : (o && zo(e, A) || Vo(e, A) || Do(e, A) ? d = !0 : Yo(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && j(e, "alias node should not have any properties")) : Ro(e, A, it === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && on(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" && j(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, y = e.implicitTypes.length; c < y; c += 1)
|
|
2036
|
+
if (_ = e.implicitTypes[c], _.resolve(e.result)) {
|
|
2037
|
+
e.result = _.construct(e.result), e.tag = _.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2038
2038
|
break;
|
|
2039
2039
|
}
|
|
2040
2040
|
} else if (e.tag !== "!") {
|
|
2041
|
-
if (
|
|
2042
|
-
|
|
2041
|
+
if (Ee.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2042
|
+
_ = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2043
2043
|
else
|
|
2044
|
-
for (
|
|
2044
|
+
for (_ = null, p = e.typeMap.multi[e.kind || "fallback"], c = 0, y = p.length; c < y; c += 1)
|
|
2045
2045
|
if (e.tag.slice(0, p[c].tag.length) === p[c].tag) {
|
|
2046
|
-
|
|
2046
|
+
_ = p[c];
|
|
2047
2047
|
break;
|
|
2048
2048
|
}
|
|
2049
|
-
|
|
2049
|
+
_ || j(e, "unknown tag !<" + e.tag + ">"), e.result !== null && _.kind !== e.kind && j(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + _.kind + '", not "' + e.kind + '"'), _.resolve(e.result, e.tag) ? (e.result = _.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : j(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2050
2050
|
}
|
|
2051
2051
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2052
2052
|
}
|
|
2053
2053
|
function Zo(e) {
|
|
2054
2054
|
var t = e.position, n, r, a, i = !1, o;
|
|
2055
2055
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (oe(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
2056
|
-
for (i = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !
|
|
2056
|
+
for (i = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !he(o); )
|
|
2057
2057
|
o = 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 && j(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
2059
2059
|
for (; Ke(o); )
|
|
2060
2060
|
o = e.input.charCodeAt(++e.position);
|
|
2061
2061
|
if (o === 35) {
|
|
@@ -2066,18 +2066,18 @@ function Zo(e) {
|
|
|
2066
2066
|
}
|
|
2067
2067
|
if (_e(o))
|
|
2068
2068
|
break;
|
|
2069
|
-
for (n = e.position; o !== 0 && !
|
|
2069
|
+
for (n = e.position; o !== 0 && !he(o); )
|
|
2070
2070
|
o = e.input.charCodeAt(++e.position);
|
|
2071
2071
|
a.push(e.input.slice(n, e.position));
|
|
2072
2072
|
}
|
|
2073
|
-
o !== 0 && qt(e),
|
|
2073
|
+
o !== 0 && qt(e), Ee.call(rn, r) ? rn[r](e, r, a) : lt(e, 'unknown document directive "' + r + '"');
|
|
2074
2074
|
}
|
|
2075
|
-
if (oe(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, oe(e, !0, -1)) : i &&
|
|
2075
|
+
if (oe(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, oe(e, !0, -1)) : i && j(e, "directives end mark is expected"), ze(e, e.lineIndent - 1, st, !1, !0), oe(e, !0, -1), e.checkLineBreaks && Fo.test(e.input.slice(t, e.position)) && lt(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && yt(e)) {
|
|
2076
2076
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, oe(e, !0, -1));
|
|
2077
2077
|
return;
|
|
2078
2078
|
}
|
|
2079
2079
|
if (e.position < e.length - 1)
|
|
2080
|
-
|
|
2080
|
+
j(e, "end of the stream or a document separator is expected");
|
|
2081
2081
|
else
|
|
2082
2082
|
return;
|
|
2083
2083
|
}
|
|
@@ -2085,7 +2085,7 @@ function rr(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 Po(e, t), r = e.indexOf("\0");
|
|
2088
|
-
for (r !== -1 && (n.position = r,
|
|
2088
|
+
for (r !== -1 && (n.position = r, j(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
|
Zo(n);
|
|
@@ -2110,7 +2110,7 @@ function Xo(e, t) {
|
|
|
2110
2110
|
var ei = Qo, ti = Xo, ar = {
|
|
2111
2111
|
loadAll: ei,
|
|
2112
2112
|
load: ti
|
|
2113
|
-
}, or = Object.prototype.toString, ir = Object.prototype.hasOwnProperty, Lt = 65279, ni = 9, Xe = 10, ri = 13, ai = 32, oi = 33, ii = 34,
|
|
2113
|
+
}, or = Object.prototype.toString, ir = Object.prototype.hasOwnProperty, Lt = 65279, ni = 9, Xe = 10, ri = 13, ai = 32, oi = 33, ii = 34, At = 35, si = 37, li = 38, ui = 39, ci = 42, sr = 44, di = 45, ut = 58, pi = 61, fi = 62, mi = 63, gi = 64, lr = 91, ur = 93, hi = 96, cr = 123, yi = 124, dr = 125, pe = {};
|
|
2114
2114
|
pe[0] = "\\0";
|
|
2115
2115
|
pe[7] = "\\a";
|
|
2116
2116
|
pe[8] = "\\b";
|
|
@@ -2179,7 +2179,7 @@ function Tt(e, t) {
|
|
|
2179
2179
|
return `
|
|
2180
2180
|
` + ie.repeat(" ", e.indent * t);
|
|
2181
2181
|
}
|
|
2182
|
-
function
|
|
2182
|
+
function Si(e, t) {
|
|
2183
2183
|
var n, r, a;
|
|
2184
2184
|
for (n = 0, r = e.implicitTypes.length; n < r; n += 1)
|
|
2185
2185
|
if (a = e.implicitTypes[n], a.resolve(t))
|
|
@@ -2202,11 +2202,11 @@ function un(e, t, n) {
|
|
|
2202
2202
|
(n ? (
|
|
2203
2203
|
// c = flow-in
|
|
2204
2204
|
r
|
|
2205
|
-
) : r && e !== sr && e !== lr && e !== ur && e !== cr && e !== dr) && e !==
|
|
2205
|
+
) : r && e !== sr && e !== lr && e !== ur && e !== cr && e !== dr) && e !== At && !(t === ut && !a) || ln(t) && !ct(t) && e === At || t === ut && a
|
|
2206
2206
|
);
|
|
2207
2207
|
}
|
|
2208
2208
|
function Ii(e) {
|
|
2209
|
-
return tt(e) && e !== Lt && !ct(e) && e !== di && e !== mi && e !== ut && e !== sr && e !== lr && e !== ur && e !== cr && e !== dr && e !==
|
|
2209
|
+
return tt(e) && e !== Lt && !ct(e) && e !== di && e !== mi && e !== ut && e !== sr && e !== lr && e !== ur && e !== cr && e !== dr && e !== At && e !== li && e !== ci && e !== oi && e !== yi && e !== pi && e !== fi && e !== ui && e !== ii && e !== si && e !== gi && e !== hi;
|
|
2210
2210
|
}
|
|
2211
2211
|
function xi(e) {
|
|
2212
2212
|
return !ct(e) && e !== ut;
|
|
@@ -2220,26 +2220,26 @@ function pr(e) {
|
|
|
2220
2220
|
return t.test(e);
|
|
2221
2221
|
}
|
|
2222
2222
|
var fr = 1, $t = 2, mr = 3, gr = 4, Ve = 5;
|
|
2223
|
-
function
|
|
2224
|
-
var l, u = 0, d = null, c = !1,
|
|
2223
|
+
function Ai(e, t, n, r, a, i, o, s) {
|
|
2224
|
+
var l, u = 0, d = null, c = !1, y = !1, p = r !== -1, _ = -1, A = Ii(Ze(e, 0)) && xi(Ze(e, e.length - 1));
|
|
2225
2225
|
if (t || o)
|
|
2226
2226
|
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2227
2227
|
if (u = Ze(e, l), !tt(u))
|
|
2228
2228
|
return Ve;
|
|
2229
|
-
|
|
2229
|
+
A = A && un(u, d, s), d = u;
|
|
2230
2230
|
}
|
|
2231
2231
|
else {
|
|
2232
2232
|
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2233
2233
|
if (u = Ze(e, l), u === Xe)
|
|
2234
|
-
c = !0, p && (
|
|
2235
|
-
l -
|
|
2234
|
+
c = !0, p && (y = y || // Foldable line = too long, and not more-indented.
|
|
2235
|
+
l - _ - 1 > r && e[_ + 1] !== " ", _ = l);
|
|
2236
2236
|
else if (!tt(u))
|
|
2237
2237
|
return Ve;
|
|
2238
|
-
|
|
2238
|
+
A = A && un(u, d, s), d = u;
|
|
2239
2239
|
}
|
|
2240
|
-
|
|
2240
|
+
y = y || p && l - _ - 1 > r && e[_ + 1] !== " ";
|
|
2241
2241
|
}
|
|
2242
|
-
return !c && !
|
|
2242
|
+
return !c && !y ? A && !o && !a(e) ? fr : i === et ? Ve : $t : n > 9 && pr(e) ? Ve : o ? i === et ? Ve : $t : y ? gr : mr;
|
|
2243
2243
|
}
|
|
2244
2244
|
function Ti(e, t, n, r, a) {
|
|
2245
2245
|
e.dump = function() {
|
|
@@ -2249,9 +2249,9 @@ function Ti(e, t, n, r, a) {
|
|
|
2249
2249
|
return e.quotingType === et ? '"' + t + '"' : "'" + t + "'";
|
|
2250
2250
|
var i = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - i), s = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2251
2251
|
function l(u) {
|
|
2252
|
-
return
|
|
2252
|
+
return Si(e, u);
|
|
2253
2253
|
}
|
|
2254
|
-
switch (
|
|
2254
|
+
switch (Ai(
|
|
2255
2255
|
t,
|
|
2256
2256
|
s,
|
|
2257
2257
|
e.indent,
|
|
@@ -2316,26 +2316,26 @@ function ji(e) {
|
|
|
2316
2316
|
n = Ze(e, a), r = pe[n], !r && tt(n) ? (t += e[a], n >= 65536 && (t += e[a + 1])) : t += r || Ci(n);
|
|
2317
2317
|
return t;
|
|
2318
2318
|
}
|
|
2319
|
-
function
|
|
2319
|
+
function Ni(e, t, n) {
|
|
2320
2320
|
var r = "", a = e.tag, i, o, s;
|
|
2321
2321
|
for (i = 0, o = n.length; i < o; i += 1)
|
|
2322
|
-
s = n[i], e.replacer && (s = e.replacer.call(n, String(i), s)), (
|
|
2322
|
+
s = n[i], e.replacer && (s = e.replacer.call(n, String(i), s)), (Ae(e, t, s, !1, !1) || typeof s > "u" && Ae(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2323
2323
|
e.tag = a, e.dump = "[" + r + "]";
|
|
2324
2324
|
}
|
|
2325
2325
|
function fn(e, t, n, r) {
|
|
2326
2326
|
var a = "", i = e.tag, o, s, l;
|
|
2327
2327
|
for (o = 0, s = n.length; o < s; o += 1)
|
|
2328
|
-
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), (
|
|
2328
|
+
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), (Ae(e, t + 1, l, !0, !0, !1, !0) || typeof l > "u" && Ae(e, t + 1, null, !0, !0, !1, !0)) && ((!r || a !== "") && (a += Tt(e, t)), e.dump && Xe === e.dump.charCodeAt(0) ? a += "-" : a += "- ", a += e.dump);
|
|
2329
2329
|
e.tag = i, e.dump = a || "[]";
|
|
2330
2330
|
}
|
|
2331
|
-
function
|
|
2331
|
+
function Oi(e, t, n) {
|
|
2332
2332
|
var r = "", a = e.tag, i = Object.keys(n), o, s, l, u, d;
|
|
2333
2333
|
for (o = 0, s = i.length; o < s; o += 1)
|
|
2334
|
-
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = i[o], u = n[l], e.replacer && (u = e.replacer.call(n, l, u)),
|
|
2334
|
+
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = i[o], u = n[l], e.replacer && (u = e.replacer.call(n, l, u)), Ae(e, t, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), Ae(e, t, u, !1, !1) && (d += e.dump, r += d));
|
|
2335
2335
|
e.tag = a, e.dump = "{" + r + "}";
|
|
2336
2336
|
}
|
|
2337
|
-
function
|
|
2338
|
-
var a = "", i = e.tag, o = Object.keys(n), s, l, u, d, c,
|
|
2337
|
+
function Ei(e, t, n, r) {
|
|
2338
|
+
var a = "", i = e.tag, o = Object.keys(n), s, l, u, d, c, y;
|
|
2339
2339
|
if (e.sortKeys === !0)
|
|
2340
2340
|
o.sort();
|
|
2341
2341
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2343,7 +2343,7 @@ function Oi(e, t, n, r) {
|
|
|
2343
2343
|
else if (e.sortKeys)
|
|
2344
2344
|
throw new fe("sortKeys must be a boolean or a function");
|
|
2345
2345
|
for (s = 0, l = o.length; s < l; s += 1)
|
|
2346
|
-
|
|
2346
|
+
y = "", (!r || a !== "") && (y += Tt(e, t)), u = o[s], d = n[u], e.replacer && (d = e.replacer.call(n, u, d)), Ae(e, t + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Xe === e.dump.charCodeAt(0) ? y += "?" : y += "? "), y += e.dump, c && (y += Tt(e, t)), Ae(e, t + 1, d, !0, c) && (e.dump && Xe === e.dump.charCodeAt(0) ? y += ":" : y += ": ", y += e.dump, a += y));
|
|
2347
2347
|
e.tag = i, e.dump = a || "{}";
|
|
2348
2348
|
}
|
|
2349
2349
|
function mn(e, t, n) {
|
|
@@ -2363,18 +2363,18 @@ function mn(e, t, n) {
|
|
|
2363
2363
|
}
|
|
2364
2364
|
return !1;
|
|
2365
2365
|
}
|
|
2366
|
-
function
|
|
2366
|
+
function Ae(e, t, n, r, a, i, o) {
|
|
2367
2367
|
e.tag = null, e.dump = n, mn(e, n, !1) || mn(e, n, !0);
|
|
2368
2368
|
var s = or.call(e.dump), l = r, u;
|
|
2369
2369
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
2370
|
-
var d = s === "[object Object]" || s === "[object Array]", c,
|
|
2371
|
-
if (d && (c = e.duplicates.indexOf(n),
|
|
2370
|
+
var d = s === "[object Object]" || s === "[object Array]", c, y;
|
|
2371
|
+
if (d && (c = e.duplicates.indexOf(n), y = c !== -1), (e.tag !== null && e.tag !== "?" || y || e.indent !== 2 && t > 0) && (a = !1), y && e.usedDuplicates[c])
|
|
2372
2372
|
e.dump = "*ref_" + c;
|
|
2373
2373
|
else {
|
|
2374
|
-
if (d &&
|
|
2375
|
-
r && Object.keys(e.dump).length !== 0 ? (
|
|
2374
|
+
if (d && y && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), s === "[object Object]")
|
|
2375
|
+
r && Object.keys(e.dump).length !== 0 ? (Ei(e, t, e.dump, a), y && (e.dump = "&ref_" + c + e.dump)) : (Oi(e, t, e.dump), y && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2376
2376
|
else if (s === "[object Array]")
|
|
2377
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? fn(e, t - 1, e.dump, a) : fn(e, t, e.dump, a),
|
|
2377
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? fn(e, t - 1, e.dump, a) : fn(e, t, e.dump, a), y && (e.dump = "&ref_" + c + e.dump)) : (Ni(e, t, e.dump), y && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2378
2378
|
else if (s === "[object String]")
|
|
2379
2379
|
e.tag !== "?" && Ti(e, e.dump, t, i, l);
|
|
2380
2380
|
else {
|
|
@@ -2388,7 +2388,7 @@ function Se(e, t, n, r, a, i, o) {
|
|
|
2388
2388
|
}
|
|
2389
2389
|
return !0;
|
|
2390
2390
|
}
|
|
2391
|
-
function
|
|
2391
|
+
function Mi(e, t) {
|
|
2392
2392
|
var n = [], r = [], a, i;
|
|
2393
2393
|
for (jt(e, n, r), a = 0, i = r.length; a < i; a += 1)
|
|
2394
2394
|
t.duplicates.push(n[r[a]]);
|
|
@@ -2409,9 +2409,9 @@ function jt(e, t, n) {
|
|
|
2409
2409
|
function Fi(e, t) {
|
|
2410
2410
|
t = t || {};
|
|
2411
2411
|
var n = new _i(t);
|
|
2412
|
-
n.noRefs ||
|
|
2412
|
+
n.noRefs || Mi(e, n);
|
|
2413
2413
|
var r = e;
|
|
2414
|
-
return n.replacer && (r = n.replacer.call({ "": r }, "", r)),
|
|
2414
|
+
return n.replacer && (r = n.replacer.call({ "": r }, "", r)), Ae(n, 0, r, !0, !0) ? n.dump + `
|
|
2415
2415
|
` : "";
|
|
2416
2416
|
}
|
|
2417
2417
|
var qi = Fi, Ki = {
|
|
@@ -2422,10 +2422,10 @@ function Bt(e, t) {
|
|
|
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 Li = ce, Bi =
|
|
2425
|
+
var Li = ce, Bi = Nn, Ui = Fn, Pi = Un, Ri = Pn, Vi = Ft, Di = ar.load, Gi = ar.loadAll, zi = Ki.dump, Ji = fe, Hi = {
|
|
2426
2426
|
binary: zn,
|
|
2427
2427
|
float: Bn,
|
|
2428
|
-
map:
|
|
2428
|
+
map: Mn,
|
|
2429
2429
|
null: qn,
|
|
2430
2430
|
pairs: Hn,
|
|
2431
2431
|
set: Wn,
|
|
@@ -2434,8 +2434,8 @@ var Li = ce, Bi = Mn, Ui = Fn, Pi = Un, Ri = Pn, Vi = Ft, Di = ar.load, Gi = ar.
|
|
|
2434
2434
|
int: Ln,
|
|
2435
2435
|
merge: Gn,
|
|
2436
2436
|
omap: Jn,
|
|
2437
|
-
seq:
|
|
2438
|
-
str:
|
|
2437
|
+
seq: En,
|
|
2438
|
+
str: On
|
|
2439
2439
|
}, Wi = Bt("safeLoad", "load"), Yi = Bt("safeLoadAll", "loadAll"), Zi = Bt("safeDump", "dump"), Qi = {
|
|
2440
2440
|
Type: Li,
|
|
2441
2441
|
Schema: Bi,
|
|
@@ -2452,7 +2452,7 @@ var Li = ce, Bi = Mn, Ui = Fn, Pi = Un, Ri = Pn, Vi = Ft, Di = ar.load, Gi = ar.
|
|
|
2452
2452
|
safeLoadAll: Yi,
|
|
2453
2453
|
safeDump: Zi
|
|
2454
2454
|
};
|
|
2455
|
-
const Xi = { class: "yaml-config" },
|
|
2455
|
+
const Xi = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
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,13 +2462,13 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2462
2462
|
}
|
|
2463
2463
|
},
|
|
2464
2464
|
setup(e) {
|
|
2465
|
-
const t = e, n =
|
|
2465
|
+
const t = e, n = I(() => {
|
|
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 ? "" : Qi.dump(r).trim();
|
|
2468
2468
|
});
|
|
2469
2469
|
return (r, a) => {
|
|
2470
|
-
const i =
|
|
2471
|
-
return m(),
|
|
2470
|
+
const i = R("KCodeBlock");
|
|
2471
|
+
return m(), O("div", Xi, [
|
|
2472
2472
|
t.yamlRecord ? (m(), D(i, {
|
|
2473
2473
|
key: 0,
|
|
2474
2474
|
id: "yaml-codeblock",
|
|
@@ -2524,21 +2524,21 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2524
2524
|
}
|
|
2525
2525
|
},
|
|
2526
2526
|
setup(e) {
|
|
2527
|
-
const t = e, n =
|
|
2527
|
+
const t = e, n = Nt(), { i18n: { t: r } } = se.useI18n(), a = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), i = I(() => {
|
|
2528
2528
|
if (!t.record)
|
|
2529
2529
|
return t.record;
|
|
2530
2530
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
2531
2531
|
return delete o.created_at, delete o.updated_at, o;
|
|
2532
2532
|
});
|
|
2533
|
-
return (o, s) => (m(),
|
|
2534
|
-
e.format === "structured" ? (m(),
|
|
2535
|
-
(m(!0),
|
|
2533
|
+
return (o, s) => (m(), O(be, null, [
|
|
2534
|
+
e.format === "structured" ? (m(), O("div", es, [
|
|
2535
|
+
(m(!0), O(be, null, ve(e.propListTypes, (l) => (m(), O("div", {
|
|
2536
2536
|
key: `config-card-details-${l}-props`,
|
|
2537
|
-
class:
|
|
2537
|
+
class: Oe(`config-card-details-${l}-props`),
|
|
2538
2538
|
"data-testid": `config-card-details-${l}-props`
|
|
2539
2539
|
}, [
|
|
2540
|
-
l !== "basic" ? (m(),
|
|
2541
|
-
(m(!0),
|
|
2540
|
+
l !== "basic" ? (m(), O("div", ns, q(l === "advanced" ? h(r)("baseConfigCard.sections.advanced") : h(r)("baseConfigCard.sections.plugin")), 1)) : W("", !0),
|
|
2541
|
+
(m(!0), O(be, null, ve(e.propertyCollections[l], (u) => (m(), D(An, {
|
|
2542
2542
|
key: u.key,
|
|
2543
2543
|
item: u
|
|
2544
2544
|
}, Le({
|
|
@@ -2570,13 +2570,13 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2570
2570
|
"json-record": i.value,
|
|
2571
2571
|
"request-method": "get"
|
|
2572
2572
|
}, null, 8, ["config", "fetcher-url", "json-record"])) : W("", !0),
|
|
2573
|
-
e.format === "yaml" && t.record ? (m(), D(
|
|
2573
|
+
e.format === "yaml" && t.record ? (m(), D(hr, {
|
|
2574
2574
|
key: 2,
|
|
2575
2575
|
"yaml-record": i.value
|
|
2576
2576
|
}, null, 8, ["yaml-record"])) : W("", !0)
|
|
2577
2577
|
], 64));
|
|
2578
2578
|
}
|
|
2579
|
-
}), as = /* @__PURE__ */ ke(rs, [["__scopeId", "data-v-147a2f70"]]),
|
|
2579
|
+
}), as = /* @__PURE__ */ ke(rs, [["__scopeId", "data-v-147a2f70"]]), Me = "24px", vt = (e, t) => {
|
|
2580
2580
|
const n = e.__vccOpts || e;
|
|
2581
2581
|
for (const [r, a] of t)
|
|
2582
2582
|
n[r] = a;
|
|
@@ -2584,7 +2584,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2584
2584
|
}, os = (e) => (ft("data-v-20c17c32"), e = e(), mt(), e), is = ["aria-hidden"], ss = {
|
|
2585
2585
|
key: 0,
|
|
2586
2586
|
"data-testid": "kui-icon-svg-title"
|
|
2587
|
-
}, ls = /* @__PURE__ */ os(() => /* @__PURE__ */
|
|
2587
|
+
}, ls = /* @__PURE__ */ os(() => /* @__PURE__ */ U("path", {
|
|
2588
2588
|
d: "M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",
|
|
2589
2589
|
fill: "currentColor"
|
|
2590
2590
|
}, null, -1)), us = /* @__PURE__ */ X({
|
|
@@ -2618,7 +2618,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2618
2618
|
size: {
|
|
2619
2619
|
type: [Number, String],
|
|
2620
2620
|
required: !1,
|
|
2621
|
-
default:
|
|
2621
|
+
default: Me,
|
|
2622
2622
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2623
2623
|
validator: (e) => {
|
|
2624
2624
|
if (typeof e == "number" && e > 0)
|
|
@@ -2639,7 +2639,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2639
2639
|
}
|
|
2640
2640
|
},
|
|
2641
2641
|
setup(e) {
|
|
2642
|
-
const t = e, n =
|
|
2642
|
+
const t = e, n = I(() => {
|
|
2643
2643
|
if (typeof t.size == "number" && t.size > 0)
|
|
2644
2644
|
return `${t.size}px`;
|
|
2645
2645
|
if (typeof t.size == "string") {
|
|
@@ -2647,8 +2647,8 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2647
2647
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2648
2648
|
return `${i}px`;
|
|
2649
2649
|
}
|
|
2650
|
-
return
|
|
2651
|
-
}), r =
|
|
2650
|
+
return Me;
|
|
2651
|
+
}), r = I(() => ({
|
|
2652
2652
|
boxSizing: "border-box",
|
|
2653
2653
|
color: t.color,
|
|
2654
2654
|
display: t.display,
|
|
@@ -2663,7 +2663,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2663
2663
|
style: pt(r.value)
|
|
2664
2664
|
}, {
|
|
2665
2665
|
default: b(() => [
|
|
2666
|
-
(m(),
|
|
2666
|
+
(m(), O("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 Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2673
2673
|
width: "100%",
|
|
2674
2674
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2675
2675
|
}, [
|
|
2676
|
-
e.title ? (m(),
|
|
2676
|
+
e.title ? (m(), O("title", ss, q(e.title), 1)) : W("", !0),
|
|
2677
2677
|
ls
|
|
2678
2678
|
], 8, is))
|
|
2679
2679
|
]),
|
|
@@ -2683,7 +2683,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2683
2683
|
}), cs = /* @__PURE__ */ vt(us, [["__scopeId", "data-v-20c17c32"]]), ds = (e) => (ft("data-v-b939f1df"), e = e(), mt(), e), ps = ["aria-hidden"], fs = {
|
|
2684
2684
|
key: 0,
|
|
2685
2685
|
"data-testid": "kui-icon-svg-title"
|
|
2686
|
-
}, ms = /* @__PURE__ */ ds(() => /* @__PURE__ */
|
|
2686
|
+
}, ms = /* @__PURE__ */ ds(() => /* @__PURE__ */ U("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
2689
|
}, null, -1)), gs = /* @__PURE__ */ X({
|
|
@@ -2717,7 +2717,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2717
2717
|
size: {
|
|
2718
2718
|
type: [Number, String],
|
|
2719
2719
|
required: !1,
|
|
2720
|
-
default:
|
|
2720
|
+
default: Me,
|
|
2721
2721
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2722
2722
|
validator: (e) => {
|
|
2723
2723
|
if (typeof e == "number" && e > 0)
|
|
@@ -2738,7 +2738,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2738
2738
|
}
|
|
2739
2739
|
},
|
|
2740
2740
|
setup(e) {
|
|
2741
|
-
const t = e, n =
|
|
2741
|
+
const t = e, n = I(() => {
|
|
2742
2742
|
if (typeof t.size == "number" && t.size > 0)
|
|
2743
2743
|
return `${t.size}px`;
|
|
2744
2744
|
if (typeof t.size == "string") {
|
|
@@ -2746,8 +2746,8 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2746
2746
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2747
2747
|
return `${i}px`;
|
|
2748
2748
|
}
|
|
2749
|
-
return
|
|
2750
|
-
}), r =
|
|
2749
|
+
return Me;
|
|
2750
|
+
}), r = I(() => ({
|
|
2751
2751
|
boxSizing: "border-box",
|
|
2752
2752
|
color: t.color,
|
|
2753
2753
|
display: t.display,
|
|
@@ -2762,7 +2762,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2762
2762
|
style: pt(r.value)
|
|
2763
2763
|
}, {
|
|
2764
2764
|
default: b(() => [
|
|
2765
|
-
(m(),
|
|
2765
|
+
(m(), O("svg", {
|
|
2766
2766
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2767
2767
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2768
2768
|
fill: "none",
|
|
@@ -2772,17 +2772,17 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2772
2772
|
width: "100%",
|
|
2773
2773
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2774
2774
|
}, [
|
|
2775
|
-
e.title ? (m(),
|
|
2775
|
+
e.title ? (m(), O("title", fs, q(e.title), 1)) : W("", !0),
|
|
2776
2776
|
ms
|
|
2777
2777
|
], 8, ps))
|
|
2778
2778
|
]),
|
|
2779
2779
|
_: 1
|
|
2780
2780
|
}, 8, ["aria-hidden", "style"]));
|
|
2781
2781
|
}
|
|
2782
|
-
}),
|
|
2782
|
+
}), hs = /* @__PURE__ */ vt(gs, [["__scopeId", "data-v-b939f1df"]]), ys = (e) => (ft("data-v-f1d0332e"), e = e(), mt(), e), vs = ["aria-hidden"], bs = {
|
|
2783
2783
|
key: 0,
|
|
2784
2784
|
"data-testid": "kui-icon-svg-title"
|
|
2785
|
-
}, ks = /* @__PURE__ */
|
|
2785
|
+
}, ks = /* @__PURE__ */ ys(() => /* @__PURE__ */ U("path", {
|
|
2786
2786
|
d: "M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",
|
|
2787
2787
|
fill: "currentColor"
|
|
2788
2788
|
}, null, -1)), Cs = /* @__PURE__ */ X({
|
|
@@ -2816,7 +2816,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2816
2816
|
size: {
|
|
2817
2817
|
type: [Number, String],
|
|
2818
2818
|
required: !1,
|
|
2819
|
-
default:
|
|
2819
|
+
default: Me,
|
|
2820
2820
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2821
2821
|
validator: (e) => {
|
|
2822
2822
|
if (typeof e == "number" && e > 0)
|
|
@@ -2837,7 +2837,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2837
2837
|
}
|
|
2838
2838
|
},
|
|
2839
2839
|
setup(e) {
|
|
2840
|
-
const t = e, n =
|
|
2840
|
+
const t = e, n = I(() => {
|
|
2841
2841
|
if (typeof t.size == "number" && t.size > 0)
|
|
2842
2842
|
return `${t.size}px`;
|
|
2843
2843
|
if (typeof t.size == "string") {
|
|
@@ -2845,8 +2845,8 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2845
2845
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2846
2846
|
return `${i}px`;
|
|
2847
2847
|
}
|
|
2848
|
-
return
|
|
2849
|
-
}), r =
|
|
2848
|
+
return Me;
|
|
2849
|
+
}), r = I(() => ({
|
|
2850
2850
|
boxSizing: "border-box",
|
|
2851
2851
|
color: t.color,
|
|
2852
2852
|
display: t.display,
|
|
@@ -2861,7 +2861,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2861
2861
|
style: pt(r.value)
|
|
2862
2862
|
}, {
|
|
2863
2863
|
default: b(() => [
|
|
2864
|
-
(m(),
|
|
2864
|
+
(m(), O("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 Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2871
2871
|
width: "100%",
|
|
2872
2872
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2873
2873
|
}, [
|
|
2874
|
-
e.title ? (m(),
|
|
2874
|
+
e.title ? (m(), O("title", bs, q(e.title), 1)) : W("", !0),
|
|
2875
2875
|
ks
|
|
2876
2876
|
], 8, vs))
|
|
2877
2877
|
]),
|
|
2878
2878
|
_: 1
|
|
2879
2879
|
}, 8, ["aria-hidden", "style"]));
|
|
2880
2880
|
}
|
|
2881
|
-
}), ws = /* @__PURE__ */ vt(Cs, [["__scopeId", "data-v-f1d0332e"]]), _s = (e) => (ft("data-v-288b6455"), e = e(), mt(), e),
|
|
2881
|
+
}), ws = /* @__PURE__ */ vt(Cs, [["__scopeId", "data-v-f1d0332e"]]), _s = (e) => (ft("data-v-288b6455"), e = e(), mt(), e), Ss = ["aria-hidden"], Is = {
|
|
2882
2882
|
key: 0,
|
|
2883
2883
|
"data-testid": "kui-icon-svg-title"
|
|
2884
|
-
}, xs = /* @__PURE__ */ _s(() => /* @__PURE__ */
|
|
2884
|
+
}, xs = /* @__PURE__ */ _s(() => /* @__PURE__ */ U("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)),
|
|
2887
|
+
}, null, -1)), As = /* @__PURE__ */ X({
|
|
2888
2888
|
__name: "CloseIcon",
|
|
2889
2889
|
props: {
|
|
2890
2890
|
/** The accessibility text provided to screen readers */
|
|
@@ -2915,7 +2915,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2915
2915
|
size: {
|
|
2916
2916
|
type: [Number, String],
|
|
2917
2917
|
required: !1,
|
|
2918
|
-
default:
|
|
2918
|
+
default: Me,
|
|
2919
2919
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2920
2920
|
validator: (e) => {
|
|
2921
2921
|
if (typeof e == "number" && e > 0)
|
|
@@ -2936,7 +2936,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2936
2936
|
}
|
|
2937
2937
|
},
|
|
2938
2938
|
setup(e) {
|
|
2939
|
-
const t = e, n =
|
|
2939
|
+
const t = e, n = I(() => {
|
|
2940
2940
|
if (typeof t.size == "number" && t.size > 0)
|
|
2941
2941
|
return `${t.size}px`;
|
|
2942
2942
|
if (typeof t.size == "string") {
|
|
@@ -2944,8 +2944,8 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2944
2944
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2945
2945
|
return `${i}px`;
|
|
2946
2946
|
}
|
|
2947
|
-
return
|
|
2948
|
-
}), r =
|
|
2947
|
+
return Me;
|
|
2948
|
+
}), r = I(() => ({
|
|
2949
2949
|
boxSizing: "border-box",
|
|
2950
2950
|
color: t.color,
|
|
2951
2951
|
display: t.display,
|
|
@@ -2960,7 +2960,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2960
2960
|
style: pt(r.value)
|
|
2961
2961
|
}, {
|
|
2962
2962
|
default: b(() => [
|
|
2963
|
-
(m(),
|
|
2963
|
+
(m(), O("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 Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
2970
2970
|
width: "100%",
|
|
2971
2971
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2972
2972
|
}, [
|
|
2973
|
-
e.title ? (m(),
|
|
2973
|
+
e.title ? (m(), O("title", Is, q(e.title), 1)) : W("", !0),
|
|
2974
2974
|
xs
|
|
2975
|
-
], 8,
|
|
2975
|
+
], 8, Ss))
|
|
2976
2976
|
]),
|
|
2977
2977
|
_: 1
|
|
2978
2978
|
}, 8, ["aria-hidden", "style"]));
|
|
2979
2979
|
}
|
|
2980
|
-
}), Ts = /* @__PURE__ */ vt(
|
|
2980
|
+
}), Ts = /* @__PURE__ */ vt(As, [["__scopeId", "data-v-288b6455"]]), $s = {
|
|
2981
2981
|
class: "config-card-title",
|
|
2982
2982
|
"data-testid": "config-card-title"
|
|
2983
|
-
}, js = { class: "config-card-actions" },
|
|
2983
|
+
}, js = { class: "config-card-actions" }, Ns = ["href"], Os = { class: "config-card-details-section" }, Es = /* @__PURE__ */ X({
|
|
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,148 +3073,148 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3073
3073
|
label: "YAML",
|
|
3074
3074
|
value: "yaml"
|
|
3075
3075
|
}
|
|
3076
|
-
], d =
|
|
3077
|
-
d.value =
|
|
3078
|
-
},
|
|
3076
|
+
], d = F("structured"), c = (g) => {
|
|
3077
|
+
d.value = g == null ? void 0 : g.value;
|
|
3078
|
+
}, y = {
|
|
3079
3079
|
id: {
|
|
3080
3080
|
type: ee.ID,
|
|
3081
3081
|
label: i("baseConfigCard.commonFields.id_label"),
|
|
3082
3082
|
order: 0,
|
|
3083
|
-
section:
|
|
3083
|
+
section: ye.Basic
|
|
3084
3084
|
},
|
|
3085
3085
|
name: {
|
|
3086
3086
|
order: 1,
|
|
3087
|
-
section:
|
|
3087
|
+
section: ye.Basic
|
|
3088
3088
|
},
|
|
3089
3089
|
enabled: {
|
|
3090
3090
|
type: ee.BadgeStatus,
|
|
3091
3091
|
order: 2,
|
|
3092
|
-
section:
|
|
3092
|
+
section: ye.Basic
|
|
3093
3093
|
},
|
|
3094
3094
|
updated_at: {
|
|
3095
3095
|
type: ee.Date,
|
|
3096
3096
|
label: i("baseConfigCard.commonFields.updated_at_label"),
|
|
3097
3097
|
order: 3,
|
|
3098
|
-
section:
|
|
3098
|
+
section: ye.Basic
|
|
3099
3099
|
},
|
|
3100
3100
|
created_at: {
|
|
3101
3101
|
type: ee.Date,
|
|
3102
3102
|
label: i("baseConfigCard.commonFields.created_at_label"),
|
|
3103
3103
|
order: 4,
|
|
3104
|
-
section:
|
|
3104
|
+
section: ye.Basic
|
|
3105
3105
|
},
|
|
3106
3106
|
tags: {
|
|
3107
3107
|
type: ee.BadgeTag,
|
|
3108
3108
|
order: -1,
|
|
3109
3109
|
// the last property displayed
|
|
3110
|
-
section:
|
|
3110
|
+
section: ye.Basic
|
|
3111
3111
|
}
|
|
3112
|
-
}, p =
|
|
3113
|
-
var
|
|
3114
|
-
if (!
|
|
3112
|
+
}, p = F(!1), _ = F(!1), A = F(""), w = F({}), L = I(() => {
|
|
3113
|
+
var g, K, B;
|
|
3114
|
+
if (!w.value)
|
|
3115
3115
|
return [];
|
|
3116
|
-
const
|
|
3117
|
-
for (const E in
|
|
3118
|
-
const k = (
|
|
3119
|
-
let
|
|
3120
|
-
(
|
|
3116
|
+
const S = [], z = Object.keys(w.value).length;
|
|
3117
|
+
for (const E in w.value) {
|
|
3118
|
+
const k = (K = (g = a.configSchema) == null ? void 0 : g[E]) == null ? void 0 : K.order, N = (B = y[E]) == null ? void 0 : B.order;
|
|
3119
|
+
let M = z;
|
|
3120
|
+
(N || N === 0) && (M = N === -1 ? z + 1 : N), k && (M = k === -1 ? z + 1 : k), S.push([E, M]);
|
|
3121
3121
|
}
|
|
3122
|
-
return
|
|
3122
|
+
return S.sort(function(E, k) {
|
|
3123
3123
|
return E[1] - k[1];
|
|
3124
|
-
}),
|
|
3125
|
-
var k,
|
|
3126
|
-
const
|
|
3124
|
+
}), S.map((E) => {
|
|
3125
|
+
var k, N;
|
|
3126
|
+
const M = E[0], J = (k = w.value) == null ? void 0 : k[M], te = ((N = a.configSchema) == null ? void 0 : N[M]) || {}, de = y[M];
|
|
3127
3127
|
return {
|
|
3128
|
-
key:
|
|
3128
|
+
key: M,
|
|
3129
3129
|
value: J,
|
|
3130
3130
|
hidden: te.hidden || !1,
|
|
3131
3131
|
type: te.type ?? ((de == null ? void 0 : de.type) || ee.Text),
|
|
3132
|
-
label: te.label ?? ((de == null ? void 0 : de.label) || s(
|
|
3132
|
+
label: te.label ?? ((de == null ? void 0 : de.label) || s(M)),
|
|
3133
3133
|
tooltip: te.tooltip ?? ((de == null ? void 0 : de.tooltip) || void 0),
|
|
3134
|
-
section: te.section ?? ((de == null ? void 0 : de.section) ||
|
|
3134
|
+
section: te.section ?? ((de == null ? void 0 : de.section) || ye.Advanced)
|
|
3135
3135
|
};
|
|
3136
3136
|
}).filter((E) => !E.hidden && E.key !== a.pluginConfigKey);
|
|
3137
|
-
}),
|
|
3138
|
-
var
|
|
3139
|
-
if (!
|
|
3137
|
+
}), T = I(() => {
|
|
3138
|
+
var g, K;
|
|
3139
|
+
if (!w.value || !a.pluginConfigKey)
|
|
3140
3140
|
return [];
|
|
3141
|
-
const
|
|
3142
|
-
for (const E in
|
|
3143
|
-
const k = (
|
|
3144
|
-
let
|
|
3145
|
-
k && (
|
|
3141
|
+
const B = w.value[a.pluginConfigKey] || {}, S = Object.keys(B).length, z = [];
|
|
3142
|
+
for (const E in B) {
|
|
3143
|
+
const k = (K = (g = a.pluginConfigSchema) == null ? void 0 : g[E]) == null ? void 0 : K.order, N = B[E];
|
|
3144
|
+
let M = N != null && N !== "" ? S - 1 : S;
|
|
3145
|
+
k && (M = k === -1 ? S + 1 : k), z.push([E, M]);
|
|
3146
3146
|
}
|
|
3147
3147
|
return z.sort(function(E, k) {
|
|
3148
3148
|
return E[1] - k[1];
|
|
3149
3149
|
}), z.map((E) => {
|
|
3150
3150
|
var k;
|
|
3151
|
-
const
|
|
3151
|
+
const N = E[0], M = B[N], J = ((k = a.pluginConfigSchema) == null ? void 0 : k[N]) || {};
|
|
3152
3152
|
return {
|
|
3153
|
-
key:
|
|
3154
|
-
value:
|
|
3153
|
+
key: N,
|
|
3154
|
+
value: M,
|
|
3155
3155
|
hidden: J.hidden || !1,
|
|
3156
3156
|
type: J.type ?? ee.Text,
|
|
3157
|
-
label: J.label ?? s(
|
|
3157
|
+
label: J.label ?? s(N),
|
|
3158
3158
|
tooltip: J.tooltip ?? void 0,
|
|
3159
|
-
section:
|
|
3159
|
+
section: ye.Plugin
|
|
3160
3160
|
};
|
|
3161
3161
|
}).filter((E) => !E.hidden);
|
|
3162
|
-
}), Y =
|
|
3163
|
-
var
|
|
3162
|
+
}), Y = I(() => {
|
|
3163
|
+
var g, K, B, S;
|
|
3164
3164
|
return {
|
|
3165
|
-
basic: (
|
|
3166
|
-
advanced: (
|
|
3167
|
-
plugin: (
|
|
3165
|
+
basic: (g = L.value) == null ? void 0 : g.filter((z) => z.section === ye.Basic),
|
|
3166
|
+
advanced: (K = L.value) == null ? void 0 : K.filter((z) => z.section === ye.Advanced),
|
|
3167
|
+
plugin: (S = T.value) == null ? void 0 : S.concat((B = L.value) == null ? void 0 : B.filter((z) => z.section === ye.Plugin))
|
|
3168
3168
|
};
|
|
3169
|
-
}), v =
|
|
3170
|
-
const
|
|
3171
|
-
return Y.value.basic.length &&
|
|
3172
|
-
}), f =
|
|
3173
|
-
var
|
|
3174
|
-
let
|
|
3175
|
-
return a.config.app === "konnect" ?
|
|
3169
|
+
}), v = I(() => {
|
|
3170
|
+
const g = [];
|
|
3171
|
+
return Y.value.basic.length && g.push("basic"), Y.value.advanced.length && g.push("advanced"), Y.value.plugin.length && g.push("plugin"), g;
|
|
3172
|
+
}), f = I(() => {
|
|
3173
|
+
var g, K;
|
|
3174
|
+
let B = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3175
|
+
return a.config.app === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((g = a.config) == null ? void 0 : g.controlPlaneId) || "") : a.config.app === "kongManager" && (B = B.replace(/\/{workspace}/gi, (K = a.config) != null && K.workspace ? `/${a.config.workspace}` : "")), B = B.replace(/{id}/gi, a.config.entityId), B;
|
|
3176
3176
|
});
|
|
3177
|
-
return xe(p, (
|
|
3178
|
-
r("loading",
|
|
3177
|
+
return xe(p, (g) => {
|
|
3178
|
+
r("loading", g);
|
|
3179
3179
|
}, { immediate: !0 }), dt(async () => {
|
|
3180
|
-
|
|
3180
|
+
_.value = !1, p.value = !0;
|
|
3181
3181
|
try {
|
|
3182
|
-
const { data:
|
|
3182
|
+
const { data: g } = await l.get(f.value);
|
|
3183
3183
|
if (a.dataKey)
|
|
3184
|
-
if (typeof
|
|
3185
|
-
|
|
3184
|
+
if (typeof g[a.dataKey] < "u")
|
|
3185
|
+
w.value = { ...g[a.dataKey] };
|
|
3186
3186
|
else
|
|
3187
3187
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: a.dataKey }));
|
|
3188
3188
|
else
|
|
3189
|
-
|
|
3190
|
-
Object.keys(a.configSchema).filter((
|
|
3191
|
-
|
|
3192
|
-
}), r("fetch:success",
|
|
3193
|
-
} catch (
|
|
3194
|
-
const
|
|
3195
|
-
|
|
3189
|
+
w.value = { ...g };
|
|
3190
|
+
Object.keys(a.configSchema).filter((K) => a.configSchema[K].forceShow).forEach((K) => {
|
|
3191
|
+
w.value && typeof w.value[K] > "u" && (w.value[K] = null);
|
|
3192
|
+
}), r("fetch:success", g);
|
|
3193
|
+
} catch (g) {
|
|
3194
|
+
const K = o(g);
|
|
3195
|
+
A.value = K.startsWith("code") ? i("baseConfigCard.errors.load") : K, _.value = !0, r("fetch:error", g);
|
|
3196
3196
|
} finally {
|
|
3197
3197
|
p.value = !1;
|
|
3198
3198
|
}
|
|
3199
|
-
}), (
|
|
3200
|
-
const
|
|
3201
|
-
return m(), D(
|
|
3199
|
+
}), (g, K) => {
|
|
3200
|
+
const B = R("KLabel"), S = R("KSelect"), z = R("KButton"), E = R("KSkeleton"), k = R("KEmptyState"), N = R("KCard");
|
|
3201
|
+
return m(), D(N, {
|
|
3202
3202
|
class: "kong-ui-entity-base-config-card",
|
|
3203
3203
|
"title-tag": e.titleTag
|
|
3204
3204
|
}, Le({
|
|
3205
3205
|
actions: b(() => [
|
|
3206
|
-
|
|
3207
|
-
ne(
|
|
3208
|
-
|
|
3206
|
+
U("div", js, [
|
|
3207
|
+
ne(g.$slots, "actions", {}, void 0, !0),
|
|
3208
|
+
$(B, {
|
|
3209
3209
|
class: "config-format-select-label",
|
|
3210
3210
|
"data-testid": "config-format-select-label"
|
|
3211
3211
|
}, {
|
|
3212
3212
|
default: b(() => [
|
|
3213
|
-
Z(
|
|
3213
|
+
Z(q(e.label), 1)
|
|
3214
3214
|
]),
|
|
3215
3215
|
_: 1
|
|
3216
3216
|
}),
|
|
3217
|
-
|
|
3217
|
+
$(S, {
|
|
3218
3218
|
"data-testid": "select-config-format",
|
|
3219
3219
|
items: u,
|
|
3220
3220
|
onChange: c
|
|
@@ -3226,13 +3226,13 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3226
3226
|
"data-testid": "book-icon"
|
|
3227
3227
|
}, {
|
|
3228
3228
|
default: b(() => [
|
|
3229
|
-
|
|
3229
|
+
U("a", {
|
|
3230
3230
|
href: e.configCardDoc,
|
|
3231
3231
|
rel: "noopener",
|
|
3232
3232
|
target: "_blank"
|
|
3233
3233
|
}, [
|
|
3234
|
-
|
|
3235
|
-
], 8,
|
|
3234
|
+
$(h(hs), { size: h(ya) }, null, 8, ["size"])
|
|
3235
|
+
], 8, Ns)
|
|
3236
3236
|
]),
|
|
3237
3237
|
_: 1
|
|
3238
3238
|
})) : W("", !0)
|
|
@@ -3244,29 +3244,29 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3244
3244
|
"data-testid": "config-card-loader",
|
|
3245
3245
|
"table-columns": 2,
|
|
3246
3246
|
type: "table"
|
|
3247
|
-
})) :
|
|
3247
|
+
})) : _.value ? (m(), D(k, {
|
|
3248
3248
|
key: 1,
|
|
3249
3249
|
"data-testid": "config-card-fetch-error",
|
|
3250
3250
|
"icon-variant": "error"
|
|
3251
3251
|
}, {
|
|
3252
3252
|
default: b(() => [
|
|
3253
|
-
|
|
3253
|
+
U("h3", null, q(A.value), 1)
|
|
3254
3254
|
]),
|
|
3255
3255
|
_: 1
|
|
3256
3256
|
})) : W("", !0),
|
|
3257
|
-
|
|
3258
|
-
|
|
3257
|
+
U("div", Os, [
|
|
3258
|
+
$(as, {
|
|
3259
3259
|
config: e.config,
|
|
3260
3260
|
"fetcher-url": f.value,
|
|
3261
3261
|
format: d.value,
|
|
3262
3262
|
"prop-list-types": v.value,
|
|
3263
3263
|
"property-collections": Y.value,
|
|
3264
|
-
record:
|
|
3264
|
+
record: w.value
|
|
3265
3265
|
}, Le({ _: 2 }, [
|
|
3266
|
-
ve(Object.keys(
|
|
3267
|
-
name:
|
|
3266
|
+
ve(Object.keys(g.$slots), (M) => ({
|
|
3267
|
+
name: M,
|
|
3268
3268
|
fn: b(({ row: J, rowValue: te }) => [
|
|
3269
|
-
ne(
|
|
3269
|
+
ne(g.$slots, M, {
|
|
3270
3270
|
row: J,
|
|
3271
3271
|
rowValue: te
|
|
3272
3272
|
}, void 0, !0)
|
|
@@ -3280,9 +3280,9 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3280
3280
|
e.hideTitle ? void 0 : {
|
|
3281
3281
|
name: "title",
|
|
3282
3282
|
fn: b(() => [
|
|
3283
|
-
|
|
3284
|
-
ne(
|
|
3285
|
-
Z(
|
|
3283
|
+
U("span", $s, [
|
|
3284
|
+
ne(g.$slots, "title", {}, () => [
|
|
3285
|
+
Z(q(h(i)("baseConfigCard.title")), 1)
|
|
3286
3286
|
], !0)
|
|
3287
3287
|
])
|
|
3288
3288
|
]),
|
|
@@ -3291,7 +3291,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3291
3291
|
]), 1032, ["title-tag"]);
|
|
3292
3292
|
};
|
|
3293
3293
|
}
|
|
3294
|
-
}),
|
|
3294
|
+
}), Ms = /* @__PURE__ */ ke(Es, [["__scopeId", "data-v-f40a683b"]]), Fs = ["novalidate"], qs = {
|
|
3295
3295
|
class: "form-actions",
|
|
3296
3296
|
"data-testid": "form-actions"
|
|
3297
3297
|
}, Ks = /* @__PURE__ */ X({
|
|
@@ -3356,19 +3356,19 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
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, i =
|
|
3359
|
+
const r = t, a = e, i = Ot(), { i18n: { t: o } } = se.useI18n(), { getMessageFromError: s } = se.useErrors(), { axiosInstance: l } = se.useAxios((n = a.config) == null ? void 0 : n.axiosRequestConfig), u = F(!1), d = F(!1), c = F(""), y = I(() => a.canSubmit === !1 || a.isReadonly), p = F(!1), _ = I(() => {
|
|
3360
3360
|
var v, f;
|
|
3361
|
-
let
|
|
3362
|
-
return a.config.app === "konnect" ?
|
|
3363
|
-
}),
|
|
3361
|
+
let g = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3362
|
+
return a.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((v = a.config) == null ? void 0 : v.controlPlaneId) || "") : a.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (f = a.config) != null && f.workspace ? `/${a.config.workspace}` : "")), a.editId ? (g = g.replace(/{id}/gi, a.editId), g) : (g = g.replace(/\/{id}/gi, ""), g);
|
|
3363
|
+
}), A = () => {
|
|
3364
3364
|
p.value = !p.value;
|
|
3365
|
-
},
|
|
3366
|
-
a.config.cancelRoute ? i.push(a.config.cancelRoute) :
|
|
3367
|
-
},
|
|
3365
|
+
}, w = () => {
|
|
3366
|
+
a.config.cancelRoute ? i.push(a.config.cancelRoute) : L();
|
|
3367
|
+
}, L = () => {
|
|
3368
3368
|
r("cancel");
|
|
3369
|
-
},
|
|
3370
|
-
|
|
3371
|
-
}, Y =
|
|
3369
|
+
}, T = () => {
|
|
3370
|
+
y.value || r("submit");
|
|
3371
|
+
}, Y = F([
|
|
3372
3372
|
{
|
|
3373
3373
|
title: o("baseForm.configuration.yaml"),
|
|
3374
3374
|
hash: "#yaml"
|
|
@@ -3384,7 +3384,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3384
3384
|
if (a.editId)
|
|
3385
3385
|
try {
|
|
3386
3386
|
d.value = !1, u.value = !0;
|
|
3387
|
-
const { data: v } = await l.get(
|
|
3387
|
+
const { data: v } = await l.get(_.value);
|
|
3388
3388
|
r("fetch:success", v);
|
|
3389
3389
|
} catch (v) {
|
|
3390
3390
|
const f = s(v);
|
|
@@ -3393,99 +3393,99 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3393
3393
|
u.value = !1;
|
|
3394
3394
|
}
|
|
3395
3395
|
}), (v, f) => {
|
|
3396
|
-
const
|
|
3396
|
+
const g = R("KSkeleton"), K = R("KEmptyState"), B = R("KAlert"), S = R("KButton"), z = R("KTabs"), E = R("KSlideout"), k = R("KCard");
|
|
3397
3397
|
return m(), D(k, { class: "kong-ui-entity-base-form" }, {
|
|
3398
3398
|
default: b(() => [
|
|
3399
|
-
u.value ? (m(), D(
|
|
3399
|
+
u.value ? (m(), D(g, {
|
|
3400
3400
|
key: 0,
|
|
3401
3401
|
type: "form"
|
|
3402
|
-
})) : d.value ? (m(), D(
|
|
3402
|
+
})) : d.value ? (m(), D(K, {
|
|
3403
3403
|
key: 1,
|
|
3404
|
-
"action-button-text":
|
|
3404
|
+
"action-button-text": h(o)("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: b(() => [
|
|
3410
|
-
|
|
3410
|
+
U("h3", null, q(c.value), 1)
|
|
3411
3411
|
]),
|
|
3412
3412
|
_: 1
|
|
3413
|
-
}, 8, ["action-button-text"])) : (m(),
|
|
3413
|
+
}, 8, ["action-button-text"])) : (m(), O("form", {
|
|
3414
3414
|
key: 2,
|
|
3415
3415
|
"data-testid": "form-content",
|
|
3416
3416
|
novalidate: a.noValidate,
|
|
3417
|
-
onReset: It(
|
|
3418
|
-
onSubmit: It(
|
|
3417
|
+
onReset: It(L, ["prevent"]),
|
|
3418
|
+
onSubmit: It(T, ["prevent"])
|
|
3419
3419
|
}, [
|
|
3420
3420
|
ne(v.$slots, "default", {}, void 0, !0),
|
|
3421
|
-
e.errorMessage ? (m(), D(
|
|
3421
|
+
e.errorMessage ? (m(), D(B, {
|
|
3422
3422
|
key: 0,
|
|
3423
3423
|
appearance: "danger",
|
|
3424
3424
|
"data-testid": "form-error",
|
|
3425
3425
|
message: e.errorMessage
|
|
3426
3426
|
}, null, 8, ["message"])) : W("", !0),
|
|
3427
|
-
|
|
3427
|
+
U("div", qs, [
|
|
3428
3428
|
ne(v.$slots, "form-actions", {}, () => [
|
|
3429
|
-
|
|
3429
|
+
$(S, {
|
|
3430
3430
|
appearance: "tertiary",
|
|
3431
3431
|
"data-testid": "form-view-configuration",
|
|
3432
|
-
onClick: f[0] || (f[0] = (
|
|
3432
|
+
onClick: f[0] || (f[0] = (N) => A())
|
|
3433
3433
|
}, {
|
|
3434
3434
|
default: b(() => [
|
|
3435
|
-
Z(
|
|
3435
|
+
Z(q(h(o)("baseForm.actions.viewConfiguration")), 1)
|
|
3436
3436
|
]),
|
|
3437
3437
|
_: 1
|
|
3438
3438
|
}),
|
|
3439
|
-
|
|
3439
|
+
$(S, {
|
|
3440
3440
|
appearance: "secondary",
|
|
3441
3441
|
"data-testid": "form-cancel",
|
|
3442
3442
|
disabled: e.isReadonly,
|
|
3443
3443
|
type: "reset"
|
|
3444
3444
|
}, {
|
|
3445
3445
|
default: b(() => [
|
|
3446
|
-
Z(
|
|
3446
|
+
Z(q(h(o)("baseForm.actions.cancel")), 1)
|
|
3447
3447
|
]),
|
|
3448
3448
|
_: 1
|
|
3449
3449
|
}, 8, ["disabled"]),
|
|
3450
|
-
|
|
3450
|
+
$(S, {
|
|
3451
3451
|
appearance: "primary",
|
|
3452
3452
|
"data-testid": "form-submit",
|
|
3453
|
-
disabled:
|
|
3453
|
+
disabled: y.value,
|
|
3454
3454
|
type: "submit"
|
|
3455
3455
|
}, {
|
|
3456
3456
|
default: b(() => [
|
|
3457
|
-
Z(
|
|
3457
|
+
Z(q(h(o)("baseForm.actions.save")), 1)
|
|
3458
3458
|
]),
|
|
3459
3459
|
_: 1
|
|
3460
3460
|
}, 8, ["disabled"])
|
|
3461
3461
|
], !0)
|
|
3462
3462
|
])
|
|
3463
3463
|
], 40, Fs)),
|
|
3464
|
-
|
|
3464
|
+
$(E, {
|
|
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:
|
|
3469
|
+
title: h(o)("baseForm.configuration.title"),
|
|
3470
3470
|
visible: p.value,
|
|
3471
|
-
onClose: f[1] || (f[1] = (
|
|
3471
|
+
onClose: f[1] || (f[1] = (N) => A())
|
|
3472
3472
|
}, {
|
|
3473
3473
|
default: b(() => [
|
|
3474
|
-
|
|
3475
|
-
|
|
3474
|
+
U("div", null, q(h(o)("baseForm.configuration.message")), 1),
|
|
3475
|
+
$(z, {
|
|
3476
3476
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3477
3477
|
tabs: Y.value
|
|
3478
3478
|
}, {
|
|
3479
3479
|
json: b(() => [
|
|
3480
|
-
|
|
3480
|
+
$(Tn, {
|
|
3481
3481
|
config: e.config,
|
|
3482
|
-
"fetcher-url":
|
|
3482
|
+
"fetcher-url": _.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"])
|
|
3486
3486
|
]),
|
|
3487
3487
|
yaml: b(() => [
|
|
3488
|
-
|
|
3488
|
+
$(hr, {
|
|
3489
3489
|
"yaml-record": a.formFields
|
|
3490
3490
|
}, null, 8, ["yaml-record"])
|
|
3491
3491
|
]),
|
|
@@ -3499,10 +3499,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3499
3499
|
});
|
|
3500
3500
|
};
|
|
3501
3501
|
}
|
|
3502
|
-
}), Ls = /* @__PURE__ */ ke(Ks, [["__scopeId", "data-v-3def74fe"]]), Bs = {
|
|
3503
|
-
key: 0,
|
|
3504
|
-
"data-testid": "first-col"
|
|
3505
|
-
}, Us = /* @__PURE__ */ X({
|
|
3502
|
+
}), Ls = /* @__PURE__ */ ke(Ks, [["__scopeId", "data-v-3def74fe"]]), Bs = ["data-truncate"], Us = /* @__PURE__ */ X({
|
|
3506
3503
|
__name: "EntityBaseTableCell",
|
|
3507
3504
|
props: {
|
|
3508
3505
|
keyName: {
|
|
@@ -3512,68 +3509,80 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
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 = I(() => {
|
|
3519
3520
|
var w;
|
|
3520
3521
|
return ((w = t.rowEl) == null ? void 0 : w.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3521
|
-
}), r =
|
|
3522
|
+
}), r = I(() => {
|
|
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 = I(() => {
|
|
3526
|
+
var w, L;
|
|
3527
|
+
const T = (w = t.rowEl) == null ? void 0 : w.querySelectorAll("td");
|
|
3528
|
+
return T ? ((L = T[0]) == null ? void 0 : L.getAttribute("data-testid")) === t.keyName : !1;
|
|
3529
|
+
}), i = I(() => a.value || t.tooltip);
|
|
3530
|
+
let o;
|
|
3531
|
+
const s = () => {
|
|
3532
|
+
o && (o.disconnect(), o = void 0);
|
|
3533
|
+
}, l = () => {
|
|
3534
|
+
var w, L, T;
|
|
3535
|
+
let Y = ((w = n.value) == null ? void 0 : w.clientWidth) || 0;
|
|
3536
|
+
if (n.value && "getComputedStyle" in window) {
|
|
3537
|
+
const v = window.getComputedStyle(n.value);
|
|
3538
|
+
Y -= (parseFloat(v.paddingLeft) || 0) + (parseFloat(v.paddingRight) || 0);
|
|
3539
|
+
}
|
|
3540
|
+
d.value = ((L = r.value) == null ? void 0 : L.getBoundingClientRect().width) || 0, c.value = Y, y.value = ((T = u.value) == null ? void 0 : T.innerText) || "";
|
|
3541
|
+
}, u = F({}), d = F(0), c = F(0), y = F(""), p = I(() => [r.value, n.value]), _ = xe(
|
|
3542
|
+
p,
|
|
3537
3543
|
(w) => {
|
|
3538
|
-
if (
|
|
3539
|
-
|
|
3544
|
+
if (i.value && (s(), "ResizeObserver" in window && window)) {
|
|
3545
|
+
o = new ResizeObserver((L) => {
|
|
3540
3546
|
window.requestAnimationFrame(() => {
|
|
3541
|
-
!Array.isArray(
|
|
3547
|
+
!Array.isArray(L) || !L.length || l();
|
|
3542
3548
|
});
|
|
3543
3549
|
});
|
|
3544
|
-
for (const
|
|
3545
|
-
|
|
3550
|
+
for (const L of w)
|
|
3551
|
+
L && o.observe(L);
|
|
3546
3552
|
}
|
|
3547
3553
|
},
|
|
3548
3554
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3549
|
-
), A =
|
|
3555
|
+
), A = I(() => i.value ? d.value > c.value : !1);
|
|
3550
3556
|
return _r(() => {
|
|
3551
|
-
|
|
3552
|
-
}),
|
|
3553
|
-
|
|
3554
|
-
}), (w,
|
|
3555
|
-
const
|
|
3556
|
-
return m(),
|
|
3557
|
+
l();
|
|
3558
|
+
}), Sr(() => {
|
|
3559
|
+
_();
|
|
3560
|
+
}), (w, L) => {
|
|
3561
|
+
const T = R("KTooltip");
|
|
3562
|
+
return m(), O("span", {
|
|
3557
3563
|
ref_key: "contentRef",
|
|
3558
|
-
ref:
|
|
3564
|
+
ref: u,
|
|
3559
3565
|
class: "content-wrapper"
|
|
3560
3566
|
}, [
|
|
3561
|
-
|
|
3562
|
-
|
|
3567
|
+
i.value ? (m(), O("span", {
|
|
3568
|
+
key: 0,
|
|
3569
|
+
"data-truncate": i.value || void 0
|
|
3570
|
+
}, [
|
|
3571
|
+
$(T, {
|
|
3563
3572
|
"max-width": "300",
|
|
3564
3573
|
placement: "bottomStart",
|
|
3565
|
-
text: A.value ?
|
|
3574
|
+
text: A.value ? y.value : ""
|
|
3566
3575
|
}, {
|
|
3567
3576
|
default: b(() => [
|
|
3568
3577
|
ne(w.$slots, "default", {}, void 0, !0)
|
|
3569
3578
|
]),
|
|
3570
3579
|
_: 3
|
|
3571
3580
|
}, 8, ["text"])
|
|
3572
|
-
])) : ne(w.$slots, "default", { key: 1 }, void 0, !0)
|
|
3581
|
+
], 8, Bs)) : ne(w.$slots, "default", { key: 1 }, void 0, !0)
|
|
3573
3582
|
], 512);
|
|
3574
3583
|
};
|
|
3575
3584
|
}
|
|
3576
|
-
}), Ps = /* @__PURE__ */ ke(Us, [["__scopeId", "data-v-
|
|
3585
|
+
}), Ps = /* @__PURE__ */ ke(Us, [["__scopeId", "data-v-6019026f"]]), Rs = { class: "toolbar-container" }, Vs = {
|
|
3577
3586
|
key: 0,
|
|
3578
3587
|
class: "toolbar-button-container"
|
|
3579
3588
|
}, Ds = ["data-testid"], Gs = /* @__PURE__ */ X({
|
|
@@ -3690,8 +3699,8 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
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 } } = se.useI18n(), i =
|
|
3694
|
-
var f,
|
|
3702
|
+
const n = e, r = t, { i18n: { t: a } } = se.useI18n(), i = I(() => {
|
|
3703
|
+
var f, g;
|
|
3695
3704
|
return typeof n.errorMessage == "string" ? {
|
|
3696
3705
|
hasError: !!n.errorMessage,
|
|
3697
3706
|
title: n.errorMessage,
|
|
@@ -3699,16 +3708,16 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3699
3708
|
} : {
|
|
3700
3709
|
hasError: !!n.errorMessage,
|
|
3701
3710
|
title: (f = n.errorMessage) == null ? void 0 : f.title,
|
|
3702
|
-
message: (
|
|
3711
|
+
message: (g = n.errorMessage) == null ? void 0 : g.message
|
|
3703
3712
|
};
|
|
3704
|
-
}), o =
|
|
3713
|
+
}), o = I(() => n.cacheIdentifier || n.preferencesStorageKey), s = (f) => f.hasData || !!n.query, l = I(() => {
|
|
3705
3714
|
const f = [];
|
|
3706
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3707
|
-
const
|
|
3715
|
+
return Object.keys(n.tableHeaders).forEach((g) => {
|
|
3716
|
+
const K = n.tableHeaders[g];
|
|
3708
3717
|
f.push({
|
|
3709
|
-
label:
|
|
3710
|
-
key:
|
|
3711
|
-
sortable:
|
|
3718
|
+
label: K.label ?? g,
|
|
3719
|
+
key: g,
|
|
3720
|
+
sortable: K.sortable ?? !1
|
|
3712
3721
|
});
|
|
3713
3722
|
}), n.enableEntityActions && f.push({
|
|
3714
3723
|
key: "actions",
|
|
@@ -3718,56 +3727,56 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3718
3727
|
"data-rowid": f.id,
|
|
3719
3728
|
"data-testid": f.name,
|
|
3720
3729
|
...n.rowAttributes(f)
|
|
3721
|
-
}), d =
|
|
3722
|
-
var
|
|
3723
|
-
return (
|
|
3724
|
-
},
|
|
3725
|
-
const
|
|
3730
|
+
}), d = F({}), c = (f) => {
|
|
3731
|
+
var g;
|
|
3732
|
+
return (g = d.value) == null ? void 0 : g.$el.querySelector(`[data-rowid="${f.id}"]`);
|
|
3733
|
+
}, y = (f) => {
|
|
3734
|
+
const g = {
|
|
3726
3735
|
"data-testid": f.headerKey,
|
|
3727
3736
|
...n.cellAttributes(f)
|
|
3728
3737
|
};
|
|
3729
|
-
return f.colIndex === 0 && (
|
|
3738
|
+
return f.colIndex === 0 && (g.style = {
|
|
3730
3739
|
maxWidth: "250px",
|
|
3731
3740
|
overflowX: "hidden",
|
|
3732
3741
|
textOverflow: "ellipsis"
|
|
3733
|
-
}),
|
|
3742
|
+
}), g;
|
|
3734
3743
|
}, p = () => {
|
|
3735
|
-
r("empty-state-cta-clicked"),
|
|
3736
|
-
},
|
|
3744
|
+
r("empty-state-cta-clicked"), _();
|
|
3745
|
+
}, _ = () => {
|
|
3737
3746
|
r("clear-search-input");
|
|
3738
|
-
},
|
|
3739
|
-
r("click:row",
|
|
3740
|
-
}),
|
|
3747
|
+
}, A = I(() => n.disableRowClick ? void 0 : (f, g) => {
|
|
3748
|
+
r("click:row", g);
|
|
3749
|
+
}), w = (f) => {
|
|
3741
3750
|
r("sort", f);
|
|
3742
|
-
}, { setTablePreferences:
|
|
3743
|
-
const f =
|
|
3751
|
+
}, { setTablePreferences: L, getTablePreferences: T } = Fr(), Y = I(() => {
|
|
3752
|
+
const f = T(n.preferencesStorageKey);
|
|
3744
3753
|
return {
|
|
3745
3754
|
...n.initialFetcherParams,
|
|
3746
3755
|
...f
|
|
3747
3756
|
};
|
|
3748
3757
|
}), v = (f) => {
|
|
3749
|
-
n.preferencesStorageKey &&
|
|
3758
|
+
n.preferencesStorageKey && L(n.preferencesStorageKey, f);
|
|
3750
3759
|
};
|
|
3751
|
-
return (f,
|
|
3752
|
-
const
|
|
3760
|
+
return (f, g) => {
|
|
3761
|
+
const K = R("KIcon"), B = R("KButton"), S = R("KDropdown"), z = R("KTable"), E = R("KCard");
|
|
3753
3762
|
return m(), D(E, {
|
|
3754
3763
|
class: "kong-ui-entity-base-table",
|
|
3755
3764
|
title: e.title,
|
|
3756
3765
|
"title-tag": e.titleTag
|
|
3757
3766
|
}, {
|
|
3758
3767
|
default: b(() => [
|
|
3759
|
-
|
|
3768
|
+
$(z, {
|
|
3760
3769
|
ref_key: "tableRefs",
|
|
3761
3770
|
ref: d,
|
|
3762
3771
|
"cache-identifier": o.value,
|
|
3763
|
-
"cell-attrs":
|
|
3772
|
+
"cell-attrs": y,
|
|
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 ? h(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 ? h(a)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3779
|
+
"empty-state-title": e.query ? h(a)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3771
3780
|
"enable-client-sort": e.enableClientSort,
|
|
3772
3781
|
"error-state-message": i.value.message,
|
|
3773
3782
|
"error-state-title": i.value.title,
|
|
@@ -3782,45 +3791,45 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3782
3791
|
"row-attrs": u,
|
|
3783
3792
|
"search-input": e.query,
|
|
3784
3793
|
onKtableEmptyStateCtaClicked: p,
|
|
3785
|
-
"onRow:click":
|
|
3786
|
-
onSort:
|
|
3794
|
+
"onRow:click": A.value,
|
|
3795
|
+
onSort: g[0] || (g[0] = (k) => w(k)),
|
|
3787
3796
|
"onUpdate:tablePreferences": v
|
|
3788
3797
|
}, Le({
|
|
3789
3798
|
toolbar: b(({ state: k }) => [
|
|
3790
|
-
Te(
|
|
3799
|
+
Te(U("div", Rs, [
|
|
3791
3800
|
ne(f.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3792
|
-
f.$slots["toolbar-button"] ? (m(),
|
|
3801
|
+
f.$slots["toolbar-button"] ? (m(), O("div", Vs, [
|
|
3793
3802
|
ne(f.$slots, "toolbar-button", {}, void 0, !0)
|
|
3794
3803
|
])) : W("", !0)
|
|
3795
3804
|
], 512), [
|
|
3796
3805
|
[$e, s(k)]
|
|
3797
3806
|
])
|
|
3798
3807
|
]),
|
|
3799
|
-
actions: b(({ row: k, rowKey:
|
|
3800
|
-
|
|
3808
|
+
actions: b(({ row: k, rowKey: N, rowValue: M }) => [
|
|
3809
|
+
U("div", {
|
|
3801
3810
|
class: "actions-container",
|
|
3802
3811
|
"data-testid": k.name
|
|
3803
3812
|
}, [
|
|
3804
|
-
|
|
3813
|
+
$(S, {
|
|
3805
3814
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3806
3815
|
width: e.dropdownMenuWidth
|
|
3807
3816
|
}, {
|
|
3808
3817
|
items: b(() => [
|
|
3809
3818
|
ne(f.$slots, "actions", {
|
|
3810
3819
|
row: k,
|
|
3811
|
-
rowKey:
|
|
3812
|
-
rowValue:
|
|
3820
|
+
rowKey: N,
|
|
3821
|
+
rowValue: M
|
|
3813
3822
|
}, void 0, !0)
|
|
3814
3823
|
]),
|
|
3815
3824
|
default: b(() => [
|
|
3816
|
-
|
|
3825
|
+
$(B, {
|
|
3817
3826
|
class: "actions-trigger",
|
|
3818
3827
|
"data-testid": "overflow-actions-button",
|
|
3819
3828
|
size: "small"
|
|
3820
3829
|
}, {
|
|
3821
3830
|
icon: b(() => [
|
|
3822
|
-
|
|
3823
|
-
color:
|
|
3831
|
+
$(K, {
|
|
3832
|
+
color: h(ma),
|
|
3824
3833
|
icon: "more",
|
|
3825
3834
|
size: "16"
|
|
3826
3835
|
}, null, 8, ["color"])
|
|
@@ -3834,30 +3843,31 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3834
3843
|
]),
|
|
3835
3844
|
_: 2
|
|
3836
3845
|
}, [
|
|
3837
|
-
ve(e.tableHeaders, (k,
|
|
3838
|
-
name:
|
|
3839
|
-
fn: b(({ row:
|
|
3840
|
-
|
|
3841
|
-
"key-name": String(
|
|
3842
|
-
"row-el": c(
|
|
3846
|
+
ve(e.tableHeaders, (k, N) => ({
|
|
3847
|
+
name: N,
|
|
3848
|
+
fn: b(({ row: M, rowKey: J, rowValue: te }) => [
|
|
3849
|
+
$(Ps, {
|
|
3850
|
+
"key-name": String(N),
|
|
3851
|
+
"row-el": c(M),
|
|
3852
|
+
tooltip: k.tooltip
|
|
3843
3853
|
}, {
|
|
3844
3854
|
default: b(() => [
|
|
3845
|
-
ne(f.$slots,
|
|
3846
|
-
row:
|
|
3855
|
+
ne(f.$slots, N, {
|
|
3856
|
+
row: M,
|
|
3847
3857
|
rowKey: J,
|
|
3848
3858
|
rowValue: te
|
|
3849
3859
|
}, () => [
|
|
3850
|
-
Z(
|
|
3860
|
+
Z(q(te), 1)
|
|
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: b(() => [
|
|
3860
|
-
|
|
3870
|
+
$(h(cs))
|
|
3861
3871
|
]),
|
|
3862
3872
|
key: "0"
|
|
3863
3873
|
}
|
|
@@ -3867,7 +3877,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3867
3877
|
}, 8, ["title", "title-tag"]);
|
|
3868
3878
|
};
|
|
3869
3879
|
}
|
|
3870
|
-
}), zs = /* @__PURE__ */ ke(Gs, [["__scopeId", "data-v-
|
|
3880
|
+
}), zs = /* @__PURE__ */ ke(Gs, [["__scopeId", "data-v-adb02213"]]), Js = {
|
|
3871
3881
|
key: 0,
|
|
3872
3882
|
class: "kong-ui-entity-delete-error"
|
|
3873
3883
|
}, Hs = {
|
|
@@ -3912,13 +3922,13 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3912
3922
|
},
|
|
3913
3923
|
emits: ["cancel", "proceed"],
|
|
3914
3924
|
setup(e, { emit: t }) {
|
|
3915
|
-
const { i18nT: n } = se.useI18n(), r = e, a = t, i =
|
|
3925
|
+
const { i18nT: n } = se.useI18n(), r = e, a = t, i = I(() => r.needConfirm ? r.entityName : ""), o = () => {
|
|
3916
3926
|
a("cancel");
|
|
3917
3927
|
}, s = () => {
|
|
3918
3928
|
a("proceed");
|
|
3919
3929
|
};
|
|
3920
3930
|
return (l, u) => {
|
|
3921
|
-
const d =
|
|
3931
|
+
const d = R("KAlert"), c = R("KPrompt");
|
|
3922
3932
|
return m(), D(c, {
|
|
3923
3933
|
"action-button-appearance": "danger",
|
|
3924
3934
|
"action-button-disabled": e.actionPending,
|
|
@@ -3931,35 +3941,35 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3931
3941
|
onProceed: s
|
|
3932
3942
|
}, {
|
|
3933
3943
|
default: b(() => [
|
|
3934
|
-
e.error ? (m(),
|
|
3935
|
-
|
|
3944
|
+
e.error ? (m(), O("div", Js, [
|
|
3945
|
+
$(d, { appearance: "danger" }, {
|
|
3936
3946
|
default: b(() => [
|
|
3937
|
-
Z(
|
|
3947
|
+
Z(q(e.error), 1)
|
|
3938
3948
|
]),
|
|
3939
3949
|
_: 1
|
|
3940
3950
|
})
|
|
3941
3951
|
])) : W("", !0),
|
|
3942
|
-
|
|
3952
|
+
$(h(n), {
|
|
3943
3953
|
class: "message",
|
|
3944
3954
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3945
3955
|
tag: "p"
|
|
3946
3956
|
}, Le({
|
|
3947
3957
|
entityType: b(() => [
|
|
3948
|
-
Z(
|
|
3958
|
+
Z(q(r.entityType), 1)
|
|
3949
3959
|
]),
|
|
3950
3960
|
_: 2
|
|
3951
3961
|
}, [
|
|
3952
3962
|
r.entityName ? {
|
|
3953
3963
|
name: "entityName",
|
|
3954
3964
|
fn: b(() => [
|
|
3955
|
-
|
|
3965
|
+
U("strong", null, q(r.entityName), 1)
|
|
3956
3966
|
]),
|
|
3957
3967
|
key: "0"
|
|
3958
3968
|
} : void 0
|
|
3959
3969
|
]), 1032, ["keypath"]),
|
|
3960
|
-
r.description || l.$slots.description ? (m(),
|
|
3970
|
+
r.description || l.$slots.description ? (m(), O("div", Hs, [
|
|
3961
3971
|
ne(l.$slots, "description", {}, () => [
|
|
3962
|
-
|
|
3972
|
+
U("p", null, q(r.description), 1)
|
|
3963
3973
|
], !0)
|
|
3964
3974
|
])) : W("", !0)
|
|
3965
3975
|
]),
|
|
@@ -3990,16 +4000,16 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
3990
4000
|
}
|
|
3991
4001
|
},
|
|
3992
4002
|
setup(e) {
|
|
3993
|
-
return (t, n) => (m(),
|
|
3994
|
-
|
|
3995
|
-
|
|
4003
|
+
return (t, n) => (m(), O("svg", Zs, [
|
|
4004
|
+
U("mask", Qs, [
|
|
4005
|
+
U("rect", {
|
|
3996
4006
|
fill: e.color,
|
|
3997
4007
|
height: "20",
|
|
3998
4008
|
width: "20"
|
|
3999
4009
|
}, null, 8, Xs)
|
|
4000
4010
|
]),
|
|
4001
|
-
|
|
4002
|
-
|
|
4011
|
+
U("g", el, [
|
|
4012
|
+
U("path", {
|
|
4003
4013
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
4004
4014
|
fill: e.color
|
|
4005
4015
|
}, null, 8, tl)
|
|
@@ -4029,68 +4039,71 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
4029
4039
|
},
|
|
4030
4040
|
emits: ["update:modelValue"],
|
|
4031
4041
|
setup(e, { emit: t }) {
|
|
4032
|
-
const { i18n: { t: n } } = se.useI18n(), r = e, a = t, i =
|
|
4042
|
+
const { i18n: { t: n } } = se.useI18n(), r = e, a = t, i = F(!1), o = F({}), s = F(/* @__PURE__ */ new Set()), l = I(() => {
|
|
4033
4043
|
const v = [];
|
|
4034
|
-
return new URLSearchParams(r.modelValue).forEach((f,
|
|
4035
|
-
f !== "" && v.push(
|
|
4044
|
+
return new URLSearchParams(r.modelValue).forEach((f, g) => {
|
|
4045
|
+
f !== "" && v.push(g);
|
|
4036
4046
|
}), v;
|
|
4037
|
-
}), u =
|
|
4047
|
+
}), u = I(() => {
|
|
4038
4048
|
const v = r.config.fields;
|
|
4039
|
-
return Object.keys(v).filter((f) =>
|
|
4049
|
+
return Object.keys(v).filter((f) => {
|
|
4050
|
+
var g;
|
|
4051
|
+
return (g = v == null ? void 0 : v[f]) == null ? void 0 : g.searchable;
|
|
4052
|
+
}).map((f) => ({
|
|
4040
4053
|
label: v[f].label || f,
|
|
4041
4054
|
value: f,
|
|
4042
4055
|
expanded: !1
|
|
4043
4056
|
}));
|
|
4044
4057
|
});
|
|
4045
4058
|
xe(() => r.modelValue, (v) => {
|
|
4046
|
-
o.value = {}, new URLSearchParams(v).forEach((f,
|
|
4047
|
-
o.value[
|
|
4059
|
+
o.value = {}, new URLSearchParams(v).forEach((f, g) => {
|
|
4060
|
+
o.value[g] = f;
|
|
4048
4061
|
});
|
|
4049
4062
|
});
|
|
4050
4063
|
const d = () => {
|
|
4051
4064
|
i.value = !i.value;
|
|
4052
4065
|
}, c = (v) => {
|
|
4053
4066
|
s.value.has(v) ? s.value.delete(v) : s.value.add(v);
|
|
4054
|
-
},
|
|
4067
|
+
}, y = (v) => {
|
|
4055
4068
|
a("update:modelValue", v);
|
|
4056
4069
|
}, p = () => {
|
|
4057
|
-
|
|
4058
|
-
},
|
|
4059
|
-
var f,
|
|
4060
|
-
return (((
|
|
4061
|
-
value:
|
|
4062
|
-
label:
|
|
4070
|
+
y("");
|
|
4071
|
+
}, _ = (v) => `filter-${v}`, A = (v) => {
|
|
4072
|
+
var f, g;
|
|
4073
|
+
return (((g = (f = r.config.schema) == null ? void 0 : f[v]) == null ? void 0 : g.values) ?? []).map((K) => ({
|
|
4074
|
+
value: K,
|
|
4075
|
+
label: K
|
|
4063
4076
|
}));
|
|
4064
|
-
},
|
|
4065
|
-
var f,
|
|
4066
|
-
return ((
|
|
4067
|
-
},
|
|
4077
|
+
}, w = (v) => {
|
|
4078
|
+
var f, g;
|
|
4079
|
+
return ((g = (f = r.config.schema) == null ? void 0 : f[v]) == null ? void 0 : g.type) ?? "text";
|
|
4080
|
+
}, L = (v) => {
|
|
4068
4081
|
o.value = {
|
|
4069
4082
|
...o.value,
|
|
4070
4083
|
[v]: ""
|
|
4071
4084
|
}, Y();
|
|
4072
|
-
},
|
|
4085
|
+
}, T = () => {
|
|
4073
4086
|
o.value = {}, Y(!0);
|
|
4074
4087
|
}, Y = (v = !1) => {
|
|
4075
|
-
const f = Object.keys(o.value).reduce((
|
|
4088
|
+
const f = Object.keys(o.value).reduce((g, K) => (o.value[K] && (g[K] = `${o.value[K]}`), g), {});
|
|
4076
4089
|
v && (i.value = !1), a("update:modelValue", new URLSearchParams(f).toString());
|
|
4077
4090
|
};
|
|
4078
4091
|
return (v, f) => {
|
|
4079
|
-
const
|
|
4080
|
-
return e.config.isExactMatch ? (m(), D(
|
|
4092
|
+
const g = R("KInput"), K = R("KButton"), B = R("KSelect");
|
|
4093
|
+
return e.config.isExactMatch ? (m(), D(g, {
|
|
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": y
|
|
4088
4101
|
}, {
|
|
4089
4102
|
before: b(() => [
|
|
4090
|
-
|
|
4103
|
+
$(gn)
|
|
4091
4104
|
]),
|
|
4092
4105
|
after: b(() => [
|
|
4093
|
-
Te(
|
|
4106
|
+
Te($(h(Ts), {
|
|
4094
4107
|
class: "kong-ui-entity-filter-clear",
|
|
4095
4108
|
onClick: p
|
|
4096
4109
|
}, null, 512), [
|
|
@@ -4098,108 +4111,108 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
4098
4111
|
])
|
|
4099
4112
|
]),
|
|
4100
4113
|
_: 1
|
|
4101
|
-
}, 8, ["model-value", "placeholder"])) : (m(),
|
|
4102
|
-
|
|
4114
|
+
}, 8, ["model-value", "placeholder"])) : (m(), O("div", nl, [
|
|
4115
|
+
$(K, {
|
|
4103
4116
|
appearance: "tertiary",
|
|
4104
4117
|
"data-testid": "filter-button",
|
|
4105
4118
|
onClick: d
|
|
4106
4119
|
}, {
|
|
4107
4120
|
default: b(() => [
|
|
4108
|
-
|
|
4109
|
-
Z(" " +
|
|
4121
|
+
$(gn),
|
|
4122
|
+
Z(" " + q(h(n)("filter.filterButtonText")) + " " + q(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
4110
4123
|
]),
|
|
4111
4124
|
_: 1
|
|
4112
4125
|
}),
|
|
4113
|
-
Te(
|
|
4126
|
+
Te(U("div", {
|
|
4114
4127
|
class: "kong-ui-entity-filter-backdrop",
|
|
4115
4128
|
onClick: d
|
|
4116
4129
|
}, null, 512), [
|
|
4117
4130
|
[$e, i.value]
|
|
4118
4131
|
]),
|
|
4119
|
-
Te(
|
|
4120
|
-
(m(!0),
|
|
4132
|
+
Te(U("div", rl, [
|
|
4133
|
+
(m(!0), O(be, null, ve(u.value, (S) => {
|
|
4121
4134
|
var z, E;
|
|
4122
|
-
return m(),
|
|
4123
|
-
key:
|
|
4135
|
+
return m(), O("div", {
|
|
4136
|
+
key: S.value,
|
|
4124
4137
|
class: "kong-ui-entity-filter-menu-item",
|
|
4125
|
-
"data-testid":
|
|
4138
|
+
"data-testid": S.value
|
|
4126
4139
|
}, [
|
|
4127
|
-
|
|
4128
|
-
class:
|
|
4140
|
+
U("span", {
|
|
4141
|
+
class: Oe(["menu-item-title", { expanded: s.value.has(S.value) }]),
|
|
4129
4142
|
role: "button",
|
|
4130
4143
|
tabindex: "0",
|
|
4131
|
-
onClick: (k) => c(
|
|
4132
|
-
onKeydown: Cr((k) => c(
|
|
4144
|
+
onClick: (k) => c(S.value),
|
|
4145
|
+
onKeydown: Cr((k) => c(S.value), ["enter"])
|
|
4133
4146
|
}, [
|
|
4134
|
-
Z(
|
|
4135
|
-
Te(
|
|
4136
|
-
[$e, l.value.includes(
|
|
4147
|
+
Z(q(S.label) + " ", 1),
|
|
4148
|
+
Te(U("span", il, null, 512), [
|
|
4149
|
+
[$e, l.value.includes(S.value)]
|
|
4137
4150
|
]),
|
|
4138
|
-
|
|
4139
|
-
class:
|
|
4140
|
-
color:
|
|
4151
|
+
$(h(ws), {
|
|
4152
|
+
class: Oe(["menu-item-expand-icon", { expanded: s.value.has(S.value) }]),
|
|
4153
|
+
color: h(ga)
|
|
4141
4154
|
}, null, 8, ["class", "color"])
|
|
4142
4155
|
], 42, ol),
|
|
4143
|
-
Te(
|
|
4144
|
-
|
|
4156
|
+
Te(U("div", sl, [
|
|
4157
|
+
U("label", {
|
|
4145
4158
|
class: "menu-item-label",
|
|
4146
|
-
for:
|
|
4147
|
-
},
|
|
4148
|
-
((E = (z = e.config.schema) == null ? void 0 : z[
|
|
4159
|
+
for: _(S.value)
|
|
4160
|
+
}, q(h(n)("filter.fieldLabel")), 9, ll),
|
|
4161
|
+
((E = (z = e.config.schema) == null ? void 0 : z[S.value]) == null ? void 0 : E.type) === "select" ? (m(), D(B, {
|
|
4149
4162
|
key: 0,
|
|
4150
|
-
id:
|
|
4151
|
-
modelValue: o.value[
|
|
4152
|
-
"onUpdate:modelValue": (k) => o.value[
|
|
4153
|
-
items:
|
|
4154
|
-
placeholder:
|
|
4155
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), D(
|
|
4163
|
+
id: _(S.value),
|
|
4164
|
+
modelValue: o.value[S.value],
|
|
4165
|
+
"onUpdate:modelValue": (k) => o.value[S.value] = k,
|
|
4166
|
+
items: A(S.value),
|
|
4167
|
+
placeholder: h(n)("filter.selectPlaceholder")
|
|
4168
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), D(g, {
|
|
4156
4169
|
key: 1,
|
|
4157
|
-
id:
|
|
4158
|
-
modelValue: o.value[
|
|
4159
|
-
"onUpdate:modelValue": (k) => o.value[
|
|
4170
|
+
id: _(S.value),
|
|
4171
|
+
modelValue: o.value[S.value],
|
|
4172
|
+
"onUpdate:modelValue": (k) => o.value[S.value] = k,
|
|
4160
4173
|
autocomplete: "off",
|
|
4161
|
-
placeholder:
|
|
4162
|
-
type:
|
|
4174
|
+
placeholder: h(n)("filter.inputPlaceholder"),
|
|
4175
|
+
type: w(S.value)
|
|
4163
4176
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4164
4177
|
], 512), [
|
|
4165
|
-
[$e, s.value.has(
|
|
4178
|
+
[$e, s.value.has(S.value)]
|
|
4166
4179
|
]),
|
|
4167
|
-
Te(
|
|
4168
|
-
|
|
4180
|
+
Te(U("div", ul, [
|
|
4181
|
+
$(K, {
|
|
4169
4182
|
appearance: "tertiary",
|
|
4170
4183
|
"data-testid": "apply-filter",
|
|
4171
4184
|
size: "small",
|
|
4172
4185
|
onClick: f[0] || (f[0] = (k) => Y(!0))
|
|
4173
4186
|
}, {
|
|
4174
4187
|
default: b(() => [
|
|
4175
|
-
Z(
|
|
4188
|
+
Z(q(h(n)("filter.applyButtonText")), 1)
|
|
4176
4189
|
]),
|
|
4177
4190
|
_: 1
|
|
4178
4191
|
}),
|
|
4179
|
-
|
|
4192
|
+
$(K, {
|
|
4180
4193
|
appearance: "tertiary",
|
|
4181
4194
|
"data-testid": "clear-filter",
|
|
4182
4195
|
size: "small",
|
|
4183
|
-
onClick: (k) =>
|
|
4196
|
+
onClick: (k) => L(S.value)
|
|
4184
4197
|
}, {
|
|
4185
4198
|
default: b(() => [
|
|
4186
|
-
Z(
|
|
4199
|
+
Z(q(h(n)("filter.clearButtonText")), 1)
|
|
4187
4200
|
]),
|
|
4188
4201
|
_: 2
|
|
4189
4202
|
}, 1032, ["onClick"])
|
|
4190
4203
|
], 512), [
|
|
4191
|
-
[$e, s.value.has(
|
|
4204
|
+
[$e, s.value.has(S.value)]
|
|
4192
4205
|
])
|
|
4193
4206
|
], 8, al);
|
|
4194
4207
|
}), 128)),
|
|
4195
|
-
|
|
4196
|
-
|
|
4208
|
+
U("div", cl, [
|
|
4209
|
+
$(K, {
|
|
4197
4210
|
appearance: "tertiary",
|
|
4198
4211
|
size: "small",
|
|
4199
|
-
onClick:
|
|
4212
|
+
onClick: T
|
|
4200
4213
|
}, {
|
|
4201
4214
|
default: b(() => [
|
|
4202
|
-
Z(
|
|
4215
|
+
Z(q(h(n)("filter.clearAllButtonText")), 1)
|
|
4203
4216
|
]),
|
|
4204
4217
|
_: 1
|
|
4205
4218
|
})
|
|
@@ -4210,7 +4223,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
4210
4223
|
]));
|
|
4211
4224
|
};
|
|
4212
4225
|
}
|
|
4213
|
-
}), pl = /* @__PURE__ */ ke(dl, [["__scopeId", "data-v-
|
|
4226
|
+
}), pl = /* @__PURE__ */ ke(dl, [["__scopeId", "data-v-9a370e3a"]]), rt = /* @__PURE__ */ X({
|
|
4214
4227
|
__name: "PermissionsWrapper",
|
|
4215
4228
|
props: {
|
|
4216
4229
|
/**
|
|
@@ -4232,7 +4245,7 @@ const Xi = { class: "yaml-config" }, yr = /* @__PURE__ */ X({
|
|
|
4232
4245
|
}
|
|
4233
4246
|
},
|
|
4234
4247
|
setup(e) {
|
|
4235
|
-
const t = e, n =
|
|
4248
|
+
const t = e, n = F(void 0), r = I(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4236
4249
|
return xe(() => t.authFunction, async () => {
|
|
4237
4250
|
n.value = await t.authFunction();
|
|
4238
4251
|
}, { immediate: !0 }), (a, i) => r.value ? ne(a.$slots, "default", {
|
|
@@ -4254,12 +4267,12 @@ for (let e = 0; e < 256; ++e)
|
|
|
4254
4267
|
function gl(e, t = 0) {
|
|
4255
4268
|
return ue[e[t + 0]] + ue[e[t + 1]] + ue[e[t + 2]] + ue[e[t + 3]] + "-" + ue[e[t + 4]] + ue[e[t + 5]] + "-" + ue[e[t + 6]] + ue[e[t + 7]] + "-" + ue[e[t + 8]] + ue[e[t + 9]] + "-" + ue[e[t + 10]] + ue[e[t + 11]] + ue[e[t + 12]] + ue[e[t + 13]] + ue[e[t + 14]] + ue[e[t + 15]];
|
|
4256
4269
|
}
|
|
4257
|
-
const
|
|
4258
|
-
randomUUID:
|
|
4270
|
+
const hl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), hn = {
|
|
4271
|
+
randomUUID: hl
|
|
4259
4272
|
};
|
|
4260
|
-
function
|
|
4261
|
-
if (
|
|
4262
|
-
return
|
|
4273
|
+
function yl(e, t, n) {
|
|
4274
|
+
if (hn.randomUUID && !t && !e)
|
|
4275
|
+
return hn.randomUUID();
|
|
4263
4276
|
e = e || {};
|
|
4264
4277
|
const r = e.random || (e.rng || ml)();
|
|
4265
4278
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
@@ -4305,46 +4318,46 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
4305
4318
|
}
|
|
4306
4319
|
},
|
|
4307
4320
|
setup(e) {
|
|
4308
|
-
const t =
|
|
4309
|
-
return (r, a) => (m(),
|
|
4310
|
-
"aria-labelledby": e.title ?
|
|
4311
|
-
class:
|
|
4321
|
+
const t = Nt(), n = yl();
|
|
4322
|
+
return (r, a) => (m(), O("div", {
|
|
4323
|
+
"aria-labelledby": e.title ? h(n) : void 0,
|
|
4324
|
+
class: Oe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4312
4325
|
role: "group"
|
|
4313
4326
|
}, [
|
|
4314
|
-
|
|
4315
|
-
e.hideInfoHeader ? W("", !0) : (m(),
|
|
4327
|
+
U("div", bl, [
|
|
4328
|
+
e.hideInfoHeader ? W("", !0) : (m(), O("div", {
|
|
4316
4329
|
key: 0,
|
|
4317
|
-
class:
|
|
4330
|
+
class: Oe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4318
4331
|
}, [
|
|
4319
4332
|
e.title ? (m(), D(Fe(e.titleTag), {
|
|
4320
4333
|
key: 0,
|
|
4321
|
-
id:
|
|
4334
|
+
id: h(n),
|
|
4322
4335
|
class: "form-section-title"
|
|
4323
4336
|
}, {
|
|
4324
4337
|
default: b(() => [
|
|
4325
|
-
Z(
|
|
4338
|
+
Z(q(e.title), 1)
|
|
4326
4339
|
]),
|
|
4327
4340
|
_: 1
|
|
4328
4341
|
}, 8, ["id"])) : W("", !0),
|
|
4329
|
-
e.description ||
|
|
4342
|
+
e.description || h(t).description ? (m(), O("div", kl, [
|
|
4330
4343
|
ne(r.$slots, "description", {}, () => [
|
|
4331
|
-
|
|
4344
|
+
U("p", null, q(e.description), 1)
|
|
4332
4345
|
], !0)
|
|
4333
4346
|
])) : W("", !0),
|
|
4334
|
-
|
|
4347
|
+
h(t).footer ? (m(), O("div", Cl, [
|
|
4335
4348
|
ne(r.$slots, "footer", {}, void 0, !0)
|
|
4336
4349
|
])) : W("", !0)
|
|
4337
4350
|
], 2)),
|
|
4338
|
-
|
|
4351
|
+
U("div", wl, [
|
|
4339
4352
|
ne(r.$slots, "default", {}, void 0, !0)
|
|
4340
4353
|
])
|
|
4341
4354
|
])
|
|
4342
4355
|
], 10, vl));
|
|
4343
4356
|
}
|
|
4344
|
-
}),
|
|
4357
|
+
}), yn = /* @__PURE__ */ ke(_l, [["__scopeId", "data-v-b1f74200"]]), { useAxios: Ut, useDeleteUrlBuilder: Sl, useErrors: Il, useExternalLinkCreator: Hl, useFetchUrlBuilder: Wl, useFetcher: xl, useDebouncedFilter: yr, useStringHelpers: Yl, useHelpers: Zl, useGatewayFeatureSupported: Ql, useTruncationDetector: Xl, useValidators: Al } = se, Tl = { class: "add-to-group-form-container" }, $l = { class: "add-to-group-cta-text" }, jl = {
|
|
4345
4358
|
key: 0,
|
|
4346
4359
|
class: "kong-ui-entity-add-to-groups-error"
|
|
4347
|
-
},
|
|
4360
|
+
}, Nl = { key: 0 }, Ol = /* @__PURE__ */ X({
|
|
4348
4361
|
__name: "AddToGroupModal",
|
|
4349
4362
|
props: {
|
|
4350
4363
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4362,14 +4375,14 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
4362
4375
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4363
4376
|
setup(e, { emit: t }) {
|
|
4364
4377
|
var E;
|
|
4365
|
-
const { i18n: { t: n } } = gt.useI18n(), r = e, a = t, { axiosInstance: i } = Ut((E = r.config) == null ? void 0 : E.axiosRequestConfig), o =
|
|
4378
|
+
const { i18n: { t: n } } = gt.useI18n(), r = e, a = t, { axiosInstance: i } = Ut((E = r.config) == null ? void 0 : E.axiosRequestConfig), o = F([]), {
|
|
4366
4379
|
debouncedQueryChange: s,
|
|
4367
4380
|
loading: l,
|
|
4368
4381
|
allRecords: u,
|
|
4369
4382
|
error: d,
|
|
4370
4383
|
loadItems: c,
|
|
4371
|
-
results:
|
|
4372
|
-
} =
|
|
4384
|
+
results: y
|
|
4385
|
+
} = yr(
|
|
4373
4386
|
r.config,
|
|
4374
4387
|
je.list[r.config.app].all,
|
|
4375
4388
|
"",
|
|
@@ -4377,97 +4390,97 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
4377
4390
|
fetchedItemsKey: "data",
|
|
4378
4391
|
searchKeys: ["name", "id"]
|
|
4379
4392
|
}
|
|
4380
|
-
), p =
|
|
4393
|
+
), p = I(() => d.value ? n("consumer_groups.errors.general") : ""), _ = F(0), A = I(() => u.value === void 0), w = I(() => y.value.map((k) => ({
|
|
4381
4394
|
label: k.name,
|
|
4382
4395
|
value: k.id,
|
|
4383
4396
|
selected: o.value.includes(k.id),
|
|
4384
4397
|
data: k
|
|
4385
4398
|
// we need this to determine whether or not to show the description text
|
|
4386
|
-
}))),
|
|
4387
|
-
var
|
|
4388
|
-
const
|
|
4389
|
-
return
|
|
4390
|
-
},
|
|
4391
|
-
f.value = "", Y.value = [],
|
|
4392
|
-
}, Y =
|
|
4399
|
+
}))), L = (k) => {
|
|
4400
|
+
var M;
|
|
4401
|
+
const N = A.value ? y.value.find((J) => J.id === k) : (M = u.value) == null ? void 0 : M.find((J) => J.id === k);
|
|
4402
|
+
return N ? N.name : k;
|
|
4403
|
+
}, T = () => {
|
|
4404
|
+
f.value = "", Y.value = [], S.value = [], a("cancel");
|
|
4405
|
+
}, Y = F([]), v = F(!1), f = F(""), g = async () => {
|
|
4393
4406
|
if (!o.value.length) {
|
|
4394
|
-
f.value = "",
|
|
4407
|
+
f.value = "", S.value = [], a("cancel");
|
|
4395
4408
|
return;
|
|
4396
4409
|
}
|
|
4397
|
-
v.value = !0, f.value = "", Y.value = [],
|
|
4410
|
+
v.value = !0, f.value = "", Y.value = [], S.value = [];
|
|
4398
4411
|
try {
|
|
4399
|
-
const k = o.value.map((J) =>
|
|
4400
|
-
let
|
|
4401
|
-
|
|
4402
|
-
J.status !== "fulfilled" && (
|
|
4403
|
-
}),
|
|
4412
|
+
const k = o.value.map((J) => B(J)), N = await Promise.allSettled(k);
|
|
4413
|
+
let M = !0;
|
|
4414
|
+
N.forEach((J) => {
|
|
4415
|
+
J.status !== "fulfilled" && (M = !1);
|
|
4416
|
+
}), M ? (Y.value = [], S.value = [], a("add:success", o.value), o.value = []) : (Y.value.length && a("add:partial-success", Y.value), o.value = [], z(N));
|
|
4404
4417
|
} catch {
|
|
4405
4418
|
f.value = n("consumer_groups.errors.add"), a("error", f.value);
|
|
4406
4419
|
} finally {
|
|
4407
4420
|
v.value = !1;
|
|
4408
4421
|
}
|
|
4409
|
-
},
|
|
4410
|
-
var
|
|
4422
|
+
}, K = I(() => {
|
|
4423
|
+
var N, M, J, te;
|
|
4411
4424
|
let k = `${r.config.apiBaseUrl}${je.list[r.config.app].forConsumer}`;
|
|
4412
|
-
return r.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((
|
|
4413
|
-
}),
|
|
4414
|
-
const
|
|
4425
|
+
return r.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((N = r.config) == null ? void 0 : N.controlPlaneId) || "").replace(/{consumerId}/gi, ((M = r.config) == null ? void 0 : M.consumerId) || "") : r.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (J = r.config) != null && J.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((te = r.config) == null ? void 0 : te.consumerId) || "")), k;
|
|
4426
|
+
}), B = async (k) => {
|
|
4427
|
+
const N = {
|
|
4415
4428
|
group: k
|
|
4416
4429
|
};
|
|
4417
4430
|
try {
|
|
4418
|
-
const
|
|
4419
|
-
return Y.value.push(k),
|
|
4420
|
-
} catch (
|
|
4421
|
-
let J = `${
|
|
4422
|
-
return
|
|
4431
|
+
const M = await i.post(K.value, N);
|
|
4432
|
+
return Y.value.push(k), M;
|
|
4433
|
+
} catch (M) {
|
|
4434
|
+
let J = `${L(k)} - ${M.message}`;
|
|
4435
|
+
return M.response.status === 409 && (J = `${L(k)} - ${n("consumer_groups.errors.already_added")}`), Promise.reject(Error(J));
|
|
4423
4436
|
}
|
|
4424
|
-
},
|
|
4425
|
-
|
|
4426
|
-
var
|
|
4427
|
-
return (
|
|
4437
|
+
}, S = F([]), z = (k) => {
|
|
4438
|
+
S.value = k.map((N) => {
|
|
4439
|
+
var M;
|
|
4440
|
+
return (M = N.reason) == null ? void 0 : M.message;
|
|
4428
4441
|
}).filter(Boolean);
|
|
4429
4442
|
};
|
|
4430
|
-
return xe(
|
|
4431
|
-
|
|
4443
|
+
return xe(w, () => {
|
|
4444
|
+
_.value++;
|
|
4432
4445
|
}, { immediate: !0, deep: !0 }), xe(() => r.visible, () => {
|
|
4433
4446
|
r.visible && c();
|
|
4434
|
-
}, { immediate: !0 }), (k,
|
|
4435
|
-
const
|
|
4447
|
+
}, { immediate: !0 }), (k, N) => {
|
|
4448
|
+
const M = R("KMultiselect"), J = R("KAlert"), te = R("KPrompt");
|
|
4436
4449
|
return m(), D(te, {
|
|
4437
4450
|
"action-button-disabled": v.value,
|
|
4438
4451
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
4439
4452
|
"data-testid": "add-to-group-modal",
|
|
4440
|
-
title:
|
|
4453
|
+
title: h(n)("consumer_groups.consumers.add.title"),
|
|
4441
4454
|
visible: e.visible,
|
|
4442
|
-
onCancel:
|
|
4443
|
-
onProceed:
|
|
4455
|
+
onCancel: T,
|
|
4456
|
+
onProceed: g
|
|
4444
4457
|
}, {
|
|
4445
4458
|
default: b(() => [
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4459
|
+
U("div", Tl, [
|
|
4460
|
+
U("p", $l, q(h(n)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4461
|
+
$(M, {
|
|
4449
4462
|
modelValue: o.value,
|
|
4450
|
-
"onUpdate:modelValue":
|
|
4463
|
+
"onUpdate:modelValue": N[0] || (N[0] = (de) => o.value = de),
|
|
4451
4464
|
autosuggest: "",
|
|
4452
4465
|
"data-testid": "add-to-groups-multiselect",
|
|
4453
|
-
"dropdown-footer-text":
|
|
4454
|
-
items:
|
|
4455
|
-
label:
|
|
4456
|
-
loading:
|
|
4457
|
-
placeholder:
|
|
4466
|
+
"dropdown-footer-text": A.value ? h(n)("consumer_groups.consumers.add.footer") : void 0,
|
|
4467
|
+
items: w.value,
|
|
4468
|
+
label: h(n)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
4469
|
+
loading: h(l),
|
|
4470
|
+
placeholder: h(n)("consumer_groups.consumers.add.consumer_group_placeholder"),
|
|
4458
4471
|
readonly: v.value,
|
|
4459
4472
|
required: "",
|
|
4460
4473
|
width: "100%",
|
|
4461
|
-
onQueryChange:
|
|
4474
|
+
onQueryChange: h(s)
|
|
4462
4475
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4463
|
-
f.value || p.value ||
|
|
4464
|
-
|
|
4476
|
+
f.value || p.value || S.value.length ? (m(), O("div", jl, [
|
|
4477
|
+
$(J, { appearance: "danger" }, {
|
|
4465
4478
|
default: b(() => [
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
(m(!0),
|
|
4479
|
+
U("p", null, q(h(n)("consumer_groups.errors.add")), 1),
|
|
4480
|
+
S.value.length ? (m(), O("ul", Nl, [
|
|
4481
|
+
(m(!0), O(be, null, ve(S.value, (de, Je) => (m(), O("li", { key: Je }, q(de), 1))), 128))
|
|
4469
4482
|
])) : W("", !0),
|
|
4470
|
-
|
|
4483
|
+
U("div", null, q(f.value || p.value), 1)
|
|
4471
4484
|
]),
|
|
4472
4485
|
_: 1
|
|
4473
4486
|
})
|
|
@@ -4483,7 +4496,7 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
4483
4496
|
for (const [r, a] of t)
|
|
4484
4497
|
n[r] = a;
|
|
4485
4498
|
return n;
|
|
4486
|
-
},
|
|
4499
|
+
}, El = /* @__PURE__ */ Pt(Ol, [["__scopeId", "data-v-bb0a8037"]]), Ml = { class: "kong-ui-entities-consumer-groups-list" }, Fl = { key: 1 }, ql = /* @__PURE__ */ X({
|
|
4487
4500
|
__name: "ConsumerGroupList",
|
|
4488
4501
|
props: {
|
|
4489
4502
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4530,131 +4543,131 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
4530
4543
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4531
4544
|
setup(e, { emit: t }) {
|
|
4532
4545
|
var Vt;
|
|
4533
|
-
const n = t, r = e, { i18nT: a, i18n: { t: i } } = gt.useI18n(), o =
|
|
4546
|
+
const n = t, r = e, { i18nT: a, i18n: { t: i } } = gt.useI18n(), o = Ot(), { axiosInstance: s } = Ut((Vt = r.config) == null ? void 0 : Vt.axiosRequestConfig), l = F(1), u = I(() => !!r.config.consumerId), d = I(
|
|
4534
4547
|
() => u.value ? "kong-ui-entities-consumer-groups-list-in-consumer-page" : "kong-ui-entities-consumer-groups-list"
|
|
4535
|
-
), c =
|
|
4548
|
+
), c = I(() => r.config.app !== "kongManager" || !!r.config.disableSorting), y = {
|
|
4536
4549
|
name: { label: i("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4537
4550
|
};
|
|
4538
|
-
r.config.app === "kongManager" && (
|
|
4539
|
-
const p =
|
|
4540
|
-
"data-testid":
|
|
4541
|
-
}),
|
|
4551
|
+
r.config.app === "kongManager" && (y.consumers_count = { label: i("consumer_groups.list.table_headers.consumers_count"), searchable: !1, sortable: !1 }), y.tags = { label: i("consumer_groups.list.table_headers.tags"), sortable: !1 };
|
|
4552
|
+
const p = y, _ = (x) => ({
|
|
4553
|
+
"data-testid": x.username ?? x.custom_id ?? x.id
|
|
4554
|
+
}), A = I(() => {
|
|
4542
4555
|
var H, re, ge, we;
|
|
4543
|
-
let
|
|
4544
|
-
return r.config.app === "konnect" ?
|
|
4545
|
-
}),
|
|
4546
|
-
const
|
|
4547
|
-
return
|
|
4548
|
-
isExactMatch:
|
|
4556
|
+
let x = `${r.config.apiBaseUrl}${je.list[r.config.app][u.value ? "forConsumer" : "all"]}`;
|
|
4557
|
+
return r.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((H = r.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = r.config) == null ? void 0 : re.consumerId) || "") : r.config.app === "kongManager" && (x = x.replace(/\/{workspace}/gi, (ge = r.config) != null && ge.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((we = r.config) == null ? void 0 : we.consumerId) || "")), x;
|
|
4558
|
+
}), w = F(""), L = I(() => {
|
|
4559
|
+
const x = r.config.app === "konnect" || r.config.isExactMatch;
|
|
4560
|
+
return x ? {
|
|
4561
|
+
isExactMatch: x,
|
|
4549
4562
|
fields: {
|
|
4550
|
-
username:
|
|
4563
|
+
username: y.name,
|
|
4551
4564
|
id: { label: i("consumer_groups.list.table_headers.id") }
|
|
4552
4565
|
},
|
|
4553
4566
|
placeholder: i("consumer_groups.search.placeholder")
|
|
4554
4567
|
} : {
|
|
4555
|
-
isExactMatch:
|
|
4568
|
+
isExactMatch: x,
|
|
4556
4569
|
fields: {
|
|
4557
|
-
name:
|
|
4570
|
+
name: y.name
|
|
4558
4571
|
},
|
|
4559
4572
|
schema: r.config.filterSchema
|
|
4560
4573
|
};
|
|
4561
|
-
}),
|
|
4562
|
-
|
|
4563
|
-
},
|
|
4574
|
+
}), T = I(() => u.value && !r.config.paginatedEndpoint ? "consumer_groups" : void 0), { fetcher: Y, fetcherState: v } = xl(r.config, A.value, T.value), f = () => {
|
|
4575
|
+
w.value = "";
|
|
4576
|
+
}, g = () => {
|
|
4564
4577
|
l.value++;
|
|
4565
|
-
},
|
|
4566
|
-
const re =
|
|
4578
|
+
}, K = F(null), B = (x, H) => {
|
|
4579
|
+
const re = x.id;
|
|
4567
4580
|
if (!H(re)) {
|
|
4568
4581
|
n("copy:error", {
|
|
4569
|
-
entity:
|
|
4582
|
+
entity: x,
|
|
4570
4583
|
field: "id",
|
|
4571
4584
|
message: i("consumer_groups.errors.copy")
|
|
4572
4585
|
});
|
|
4573
4586
|
return;
|
|
4574
4587
|
}
|
|
4575
4588
|
n("copy:success", {
|
|
4576
|
-
entity:
|
|
4589
|
+
entity: x,
|
|
4577
4590
|
field: "id",
|
|
4578
4591
|
message: i("consumer_groups.copy.success", { val: re })
|
|
4579
4592
|
});
|
|
4580
|
-
},
|
|
4581
|
-
const re = JSON.stringify(
|
|
4593
|
+
}, S = (x, H) => {
|
|
4594
|
+
const re = JSON.stringify(x);
|
|
4582
4595
|
if (!H(re)) {
|
|
4583
4596
|
n("copy:error", {
|
|
4584
|
-
entity:
|
|
4597
|
+
entity: x,
|
|
4585
4598
|
message: i("consumer_groups.errors.copy")
|
|
4586
4599
|
});
|
|
4587
4600
|
return;
|
|
4588
4601
|
}
|
|
4589
4602
|
n("copy:success", {
|
|
4590
|
-
entity:
|
|
4603
|
+
entity: x,
|
|
4591
4604
|
message: i("consumer_groups.copy.success_brief")
|
|
4592
4605
|
});
|
|
4593
|
-
}, z = async (
|
|
4606
|
+
}, z = async (x) => {
|
|
4594
4607
|
var re;
|
|
4595
|
-
await ((re = r.canRetrieve) == null ? void 0 : re.call(r,
|
|
4596
|
-
}, E = (
|
|
4608
|
+
await ((re = r.canRetrieve) == null ? void 0 : re.call(r, x)) && o.push(r.config.getViewRoute(x.id));
|
|
4609
|
+
}, E = (x) => ({
|
|
4597
4610
|
label: i("consumer_groups.actions.view"),
|
|
4598
|
-
to: r.config.getViewRoute(
|
|
4599
|
-
}), k = (
|
|
4611
|
+
to: r.config.getViewRoute(x)
|
|
4612
|
+
}), k = (x) => ({
|
|
4600
4613
|
label: i("consumer_groups.actions.edit"),
|
|
4601
|
-
to: r.config.getEditRoute(
|
|
4602
|
-
}),
|
|
4603
|
-
|
|
4614
|
+
to: r.config.getEditRoute(x)
|
|
4615
|
+
}), N = F(void 0), M = F(!1), J = F(!1), te = F(""), de = Sl(r.config, A.value), Je = (x) => {
|
|
4616
|
+
N.value = x, M.value = !0;
|
|
4604
4617
|
}, bt = () => {
|
|
4605
|
-
|
|
4618
|
+
M.value = !1;
|
|
4606
4619
|
}, nt = async () => {
|
|
4607
|
-
var
|
|
4608
|
-
if ((
|
|
4620
|
+
var x, H, re;
|
|
4621
|
+
if ((x = N.value) != null && x.id) {
|
|
4609
4622
|
J.value = !0;
|
|
4610
4623
|
try {
|
|
4611
|
-
await s.delete(de(
|
|
4624
|
+
await s.delete(de(N.value.id)), J.value = !1, M.value = !1, l.value++, n("delete:success", N.value);
|
|
4612
4625
|
} catch (ge) {
|
|
4613
4626
|
te.value = ((re = (H = ge.response) == null ? void 0 : H.data) == null ? void 0 : re.message) || ge.message || i("consumer_groups.errors.delete"), n("error", ge);
|
|
4614
4627
|
} finally {
|
|
4615
4628
|
J.value = !1;
|
|
4616
4629
|
}
|
|
4617
4630
|
}
|
|
4618
|
-
}, Be =
|
|
4631
|
+
}, Be = F(!1), He = () => {
|
|
4619
4632
|
Be.value = !0;
|
|
4620
4633
|
}, C = () => {
|
|
4621
4634
|
Be.value = !1;
|
|
4622
|
-
},
|
|
4623
|
-
H || C(), l.value++, n("add:success",
|
|
4635
|
+
}, P = (x, H) => {
|
|
4636
|
+
H || C(), l.value++, n("add:success", x);
|
|
4624
4637
|
}, ae = () => {
|
|
4625
4638
|
u.value && He();
|
|
4626
|
-
}, V =
|
|
4627
|
-
V.value =
|
|
4639
|
+
}, V = F(void 0), G = F(!1), me = F(""), Ce = (x) => {
|
|
4640
|
+
V.value = x, G.value = !0;
|
|
4628
4641
|
}, le = () => {
|
|
4629
4642
|
G.value = !1, V.value = void 0;
|
|
4630
|
-
}, Ue =
|
|
4643
|
+
}, Ue = I(() => {
|
|
4631
4644
|
var H, re, ge, we;
|
|
4632
|
-
let
|
|
4633
|
-
return r.config.app === "konnect" ?
|
|
4634
|
-
}), We =
|
|
4645
|
+
let x = `${r.config.apiBaseUrl}${je.list[r.config.app].oneForConsumer}`;
|
|
4646
|
+
return r.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((H = r.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = r.config) == null ? void 0 : re.consumerId) || "") : r.config.app === "kongManager" && (x = x.replace(/\/{workspace}/gi, (ge = r.config) != null && ge.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((we = r.config) == null ? void 0 : we.consumerId) || "")), x;
|
|
4647
|
+
}), We = F(!1), vr = async () => {
|
|
4635
4648
|
if (V.value) {
|
|
4636
4649
|
We.value = !0;
|
|
4637
4650
|
try {
|
|
4638
|
-
const
|
|
4639
|
-
await s.delete(
|
|
4640
|
-
} catch (
|
|
4641
|
-
me.value =
|
|
4651
|
+
const x = Ue.value.replace(/{consumerGroupId}/gi, V.value.id);
|
|
4652
|
+
await s.delete(x), n("remove:success", V.value), le(), l.value++;
|
|
4653
|
+
} catch (x) {
|
|
4654
|
+
me.value = x.message || i("consumer_groups.errors.delete"), n("error", x);
|
|
4642
4655
|
} finally {
|
|
4643
4656
|
We.value = !1;
|
|
4644
4657
|
}
|
|
4645
4658
|
}
|
|
4646
|
-
}, Rt =
|
|
4647
|
-
xe(v, (
|
|
4659
|
+
}, Rt = F(!0);
|
|
4660
|
+
xe(v, (x) => {
|
|
4648
4661
|
var H, re, ge, we;
|
|
4649
|
-
if (Array.isArray((H =
|
|
4650
|
-
|
|
4662
|
+
if (Array.isArray((H = x == null ? void 0 : x.response) == null ? void 0 : H.data) && (Rt.value = x.response.data.length > 0), x.status === qe.Error) {
|
|
4663
|
+
K.value = {
|
|
4651
4664
|
title: i("consumer_groups.errors.general")
|
|
4652
|
-
}, (we = (ge = (re =
|
|
4665
|
+
}, (we = (ge = (re = x.error) == null ? void 0 : re.response) == null ? void 0 : ge.data) != null && we.message && (K.value.message = x.error.response.data.message), n("error", x.error);
|
|
4653
4666
|
return;
|
|
4654
4667
|
}
|
|
4655
|
-
|
|
4668
|
+
K.value = null;
|
|
4656
4669
|
});
|
|
4657
|
-
const kt =
|
|
4670
|
+
const kt = F({
|
|
4658
4671
|
ctaPath: u.value ? void 0 : r.config.createRoute,
|
|
4659
4672
|
ctaText: void 0,
|
|
4660
4673
|
message: `${i("consumer_groups.list.empty_state.description")}${r.config.additionMessageForEmptyState ? ` ${r.config.additionMessageForEmptyState}` : ""}`,
|
|
@@ -4662,36 +4675,36 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
4662
4675
|
});
|
|
4663
4676
|
return dt(async () => {
|
|
4664
4677
|
await r.canCreate() && (kt.value.title = u.value ? i("consumer_groups.list.empty_state.title_for_consumer") : i("consumer_groups.list.empty_state.title"), kt.value.ctaText = u.value ? i("consumer_groups.actions.add_to_group") : i("consumer_groups.actions.create"));
|
|
4665
|
-
}), (
|
|
4666
|
-
const re =
|
|
4667
|
-
return m(),
|
|
4668
|
-
|
|
4678
|
+
}), (x, H) => {
|
|
4679
|
+
const re = R("KButton"), ge = R("KBadge"), we = R("KTruncate"), Ye = R("KDropdownItem"), Dt = R("KClipboardProvider"), br = R("KPrompt");
|
|
4680
|
+
return m(), O("div", Ml, [
|
|
4681
|
+
$(h(zs), {
|
|
4669
4682
|
"cache-identifier": e.cacheIdentifier,
|
|
4670
4683
|
"disable-pagination": u.value && !e.config.paginatedEndpoint,
|
|
4671
4684
|
"disable-pagination-page-jump": "",
|
|
4672
4685
|
"disable-sorting": c.value,
|
|
4673
4686
|
"empty-state-options": kt.value,
|
|
4674
4687
|
"enable-entity-actions": "",
|
|
4675
|
-
"error-message":
|
|
4676
|
-
fetcher:
|
|
4688
|
+
"error-message": K.value,
|
|
4689
|
+
fetcher: h(Y),
|
|
4677
4690
|
"fetcher-cache-key": l.value,
|
|
4678
4691
|
"pagination-type": "offset",
|
|
4679
4692
|
"preferences-storage-key": d.value,
|
|
4680
|
-
query:
|
|
4681
|
-
"row-attributes":
|
|
4682
|
-
"table-headers":
|
|
4693
|
+
query: w.value,
|
|
4694
|
+
"row-attributes": _,
|
|
4695
|
+
"table-headers": h(p),
|
|
4683
4696
|
"use-action-outside": e.useActionOutside,
|
|
4684
4697
|
onClearSearchInput: f,
|
|
4685
4698
|
"onClick:row": H[3] || (H[3] = (Q) => z(Q)),
|
|
4686
4699
|
onEmptyStateCtaClicked: ae,
|
|
4687
|
-
onSort:
|
|
4700
|
+
onSort: g
|
|
4688
4701
|
}, {
|
|
4689
4702
|
"toolbar-filter": b(() => [
|
|
4690
|
-
u.value ? W("", !0) : (m(), D(
|
|
4703
|
+
u.value ? W("", !0) : (m(), D(h(pl), {
|
|
4691
4704
|
key: 0,
|
|
4692
|
-
modelValue:
|
|
4693
|
-
"onUpdate:modelValue": H[0] || (H[0] = (Q) =>
|
|
4694
|
-
config:
|
|
4705
|
+
modelValue: w.value,
|
|
4706
|
+
"onUpdate:modelValue": H[0] || (H[0] = (Q) => w.value = Q),
|
|
4707
|
+
config: L.value
|
|
4695
4708
|
}, null, 8, ["modelValue", "config"]))
|
|
4696
4709
|
]),
|
|
4697
4710
|
"toolbar-button": b(() => [
|
|
@@ -4699,11 +4712,11 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
4699
4712
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
4700
4713
|
}, {
|
|
4701
4714
|
default: b(() => [
|
|
4702
|
-
|
|
4715
|
+
$(h(rt), {
|
|
4703
4716
|
"auth-function": () => e.canCreate()
|
|
4704
4717
|
}, {
|
|
4705
4718
|
default: b(() => [
|
|
4706
|
-
Te(
|
|
4719
|
+
Te($(re, {
|
|
4707
4720
|
appearance: "primary",
|
|
4708
4721
|
"data-testid": "toolbar-add-consumer-group",
|
|
4709
4722
|
icon: "plus",
|
|
@@ -4712,7 +4725,7 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
4712
4725
|
onClick: H[1] || (H[1] = () => e.config.consumerId ? He() : void 0)
|
|
4713
4726
|
}, {
|
|
4714
4727
|
default: b(() => [
|
|
4715
|
-
Z(
|
|
4728
|
+
Z(q(e.config.consumerId ? h(i)("consumer_groups.actions.add_to_group") : h(i)("consumer_groups.list.toolbar_actions.new_consumer_group")), 1)
|
|
4716
4729
|
]),
|
|
4717
4730
|
_: 1
|
|
4718
4731
|
}, 8, ["to"]), [
|
|
@@ -4726,62 +4739,62 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
4726
4739
|
}, 8, ["to"]))
|
|
4727
4740
|
]),
|
|
4728
4741
|
name: b(({ rowValue: Q }) => [
|
|
4729
|
-
|
|
4742
|
+
U("b", null, q(Q ?? "-"), 1)
|
|
4730
4743
|
]),
|
|
4731
4744
|
consumers_count: b(({ rowValue: Q }) => [
|
|
4732
|
-
Z(
|
|
4745
|
+
Z(q(Q ?? "-"), 1)
|
|
4733
4746
|
]),
|
|
4734
4747
|
tags: b(({ rowValue: Q }) => [
|
|
4735
4748
|
(Q == null ? void 0 : Q.length) > 0 ? (m(), D(we, { key: 0 }, {
|
|
4736
4749
|
default: b(() => [
|
|
4737
|
-
(m(!0),
|
|
4750
|
+
(m(!0), O(be, null, ve(Q, (Pe) => (m(), D(ge, {
|
|
4738
4751
|
key: Pe,
|
|
4739
4752
|
onClick: H[2] || (H[2] = It(() => {
|
|
4740
4753
|
}, ["stop"]))
|
|
4741
4754
|
}, {
|
|
4742
4755
|
default: b(() => [
|
|
4743
|
-
Z(
|
|
4756
|
+
Z(q(Pe), 1)
|
|
4744
4757
|
]),
|
|
4745
4758
|
_: 2
|
|
4746
4759
|
}, 1024))), 128))
|
|
4747
4760
|
]),
|
|
4748
4761
|
_: 2
|
|
4749
|
-
}, 1024)) : (m(),
|
|
4762
|
+
}, 1024)) : (m(), O("span", Fl, "-"))
|
|
4750
4763
|
]),
|
|
4751
4764
|
actions: b(({ row: Q }) => [
|
|
4752
|
-
|
|
4765
|
+
$(Dt, null, {
|
|
4753
4766
|
default: b(({ copyToClipboard: Pe }) => [
|
|
4754
|
-
|
|
4767
|
+
$(Ye, {
|
|
4755
4768
|
"data-testid": "action-entity-copy-id",
|
|
4756
|
-
onClick: (kr) =>
|
|
4769
|
+
onClick: (kr) => B(Q, Pe)
|
|
4757
4770
|
}, {
|
|
4758
4771
|
default: b(() => [
|
|
4759
|
-
Z(
|
|
4772
|
+
Z(q(h(i)("consumer_groups.actions.copy_id")), 1)
|
|
4760
4773
|
]),
|
|
4761
4774
|
_: 2
|
|
4762
4775
|
}, 1032, ["onClick"])
|
|
4763
4776
|
]),
|
|
4764
4777
|
_: 2
|
|
4765
4778
|
}, 1024),
|
|
4766
|
-
|
|
4779
|
+
$(Dt, null, {
|
|
4767
4780
|
default: b(({ copyToClipboard: Pe }) => [
|
|
4768
|
-
|
|
4781
|
+
$(Ye, {
|
|
4769
4782
|
"data-testid": "action-entity-copy-json",
|
|
4770
|
-
onClick: (kr) =>
|
|
4783
|
+
onClick: (kr) => S(Q, Pe)
|
|
4771
4784
|
}, {
|
|
4772
4785
|
default: b(() => [
|
|
4773
|
-
Z(
|
|
4786
|
+
Z(q(h(i)("consumer_groups.actions.copy_json")), 1)
|
|
4774
4787
|
]),
|
|
4775
4788
|
_: 2
|
|
4776
4789
|
}, 1032, ["onClick"])
|
|
4777
4790
|
]),
|
|
4778
4791
|
_: 2
|
|
4779
4792
|
}, 1024),
|
|
4780
|
-
|
|
4793
|
+
$(h(rt), {
|
|
4781
4794
|
"auth-function": () => e.canRetrieve(Q)
|
|
4782
4795
|
}, {
|
|
4783
4796
|
default: b(() => [
|
|
4784
|
-
|
|
4797
|
+
$(Ye, {
|
|
4785
4798
|
"data-testid": "action-entity-view",
|
|
4786
4799
|
"has-divider": "",
|
|
4787
4800
|
item: E(Q.id)
|
|
@@ -4789,29 +4802,29 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
4789
4802
|
]),
|
|
4790
4803
|
_: 2
|
|
4791
4804
|
}, 1032, ["auth-function"]),
|
|
4792
|
-
|
|
4805
|
+
$(h(rt), {
|
|
4793
4806
|
"auth-function": () => e.canEdit(Q)
|
|
4794
4807
|
}, {
|
|
4795
4808
|
default: b(() => [
|
|
4796
|
-
|
|
4809
|
+
$(Ye, {
|
|
4797
4810
|
"data-testid": "action-entity-edit",
|
|
4798
4811
|
item: k(Q.id)
|
|
4799
4812
|
}, null, 8, ["item"])
|
|
4800
4813
|
]),
|
|
4801
4814
|
_: 2
|
|
4802
4815
|
}, 1032, ["auth-function"]),
|
|
4803
|
-
|
|
4816
|
+
$(h(rt), {
|
|
4804
4817
|
"auth-function": () => e.canDelete(Q)
|
|
4805
4818
|
}, {
|
|
4806
4819
|
default: b(() => [
|
|
4807
|
-
|
|
4820
|
+
$(Ye, {
|
|
4808
4821
|
danger: "",
|
|
4809
4822
|
"data-testid": "action-entity-delete",
|
|
4810
4823
|
"has-divider": "",
|
|
4811
4824
|
onClick: () => e.config.consumerId ? Ce(Q) : Je(Q)
|
|
4812
4825
|
}, {
|
|
4813
4826
|
default: b(() => [
|
|
4814
|
-
Z(
|
|
4827
|
+
Z(q(e.config.consumerId ? h(i)("consumer_groups.actions.exit") : h(i)("consumer_groups.actions.delete")), 1)
|
|
4815
4828
|
]),
|
|
4816
4829
|
_: 2
|
|
4817
4830
|
}, 1032, ["onClick"])
|
|
@@ -4821,56 +4834,56 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
4821
4834
|
]),
|
|
4822
4835
|
_: 1
|
|
4823
4836
|
}, 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"]),
|
|
4824
|
-
|
|
4837
|
+
$(h(Ys), {
|
|
4825
4838
|
"action-pending": J.value,
|
|
4826
4839
|
"data-testid": "delete-consumer-group-modal",
|
|
4827
|
-
description:
|
|
4828
|
-
"entity-name":
|
|
4829
|
-
"entity-type":
|
|
4840
|
+
description: h(i)("consumer_groups.delete.description"),
|
|
4841
|
+
"entity-name": N.value && (N.value.name || N.value.id),
|
|
4842
|
+
"entity-type": h(Cn).ConsumerGroup,
|
|
4830
4843
|
error: te.value,
|
|
4831
|
-
title:
|
|
4832
|
-
visible:
|
|
4844
|
+
title: h(i)("consumer_groups.delete.title"),
|
|
4845
|
+
visible: M.value,
|
|
4833
4846
|
onCancel: bt,
|
|
4834
4847
|
onProceed: nt
|
|
4835
4848
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4836
|
-
e.config.consumerId ? (m(), D(
|
|
4849
|
+
e.config.consumerId ? (m(), D(El, {
|
|
4837
4850
|
key: 0,
|
|
4838
4851
|
config: e.config,
|
|
4839
4852
|
"data-testid": "add-to-group-modal",
|
|
4840
4853
|
visible: Be.value,
|
|
4841
|
-
"onAdd:partialSuccess": H[4] || (H[4] = (Q) =>
|
|
4842
|
-
"onAdd:success": H[5] || (H[5] = (Q) =>
|
|
4854
|
+
"onAdd:partialSuccess": H[4] || (H[4] = (Q) => P(Q, !0)),
|
|
4855
|
+
"onAdd:success": H[5] || (H[5] = (Q) => P(Q)),
|
|
4843
4856
|
onCancel: C
|
|
4844
4857
|
}, null, 8, ["config", "visible"])) : W("", !0),
|
|
4845
4858
|
e.config.consumerId && V.value ? (m(), D(br, {
|
|
4846
4859
|
key: 1,
|
|
4847
4860
|
"action-button-appearance": "danger",
|
|
4848
4861
|
"data-testid": "exit-group-modal",
|
|
4849
|
-
title:
|
|
4862
|
+
title: h(i)("consumer_groups.consumers.exit.title"),
|
|
4850
4863
|
visible: G.value,
|
|
4851
4864
|
onCancel: le,
|
|
4852
4865
|
onProceed: vr
|
|
4853
4866
|
}, {
|
|
4854
4867
|
default: b(() => [
|
|
4855
|
-
|
|
4868
|
+
$(h(a), {
|
|
4856
4869
|
class: "exit-modal-message",
|
|
4857
4870
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
4858
4871
|
tag: "p"
|
|
4859
4872
|
}, Le({
|
|
4860
4873
|
consumerGroup: b(() => [
|
|
4861
|
-
|
|
4874
|
+
U("strong", null, q(V.value.name || V.value.id), 1)
|
|
4862
4875
|
]),
|
|
4863
4876
|
_: 2
|
|
4864
4877
|
}, [
|
|
4865
4878
|
e.config.consumerUsername ? {
|
|
4866
4879
|
name: "consumer",
|
|
4867
4880
|
fn: b(() => [
|
|
4868
|
-
|
|
4881
|
+
U("strong", null, q(e.config.consumerUsername), 1)
|
|
4869
4882
|
]),
|
|
4870
4883
|
key: "0"
|
|
4871
4884
|
} : void 0
|
|
4872
4885
|
]), 1032, ["keypath"]),
|
|
4873
|
-
|
|
4886
|
+
U("p", null, q(h(i)("consumer_groups.consumers.exit.description")), 1)
|
|
4874
4887
|
]),
|
|
4875
4888
|
_: 1
|
|
4876
4889
|
}, 8, ["title", "visible"])) : W("", !0)
|
|
@@ -4899,7 +4912,7 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
4899
4912
|
emits: ["update", "error", "loading"],
|
|
4900
4913
|
setup(e, { emit: t }) {
|
|
4901
4914
|
var nt, Be, He;
|
|
4902
|
-
const n = e, r = t, { i18n: { t: a } } = gt.useI18n(), i =
|
|
4915
|
+
const n = e, r = t, { i18n: { t: a } } = gt.useI18n(), i = Ot(), o = Gt({
|
|
4903
4916
|
fields: {
|
|
4904
4917
|
name: "",
|
|
4905
4918
|
tags: "",
|
|
@@ -4916,74 +4929,74 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
4916
4929
|
loading: u,
|
|
4917
4930
|
error: d,
|
|
4918
4931
|
loadItems: c,
|
|
4919
|
-
results:
|
|
4920
|
-
} =
|
|
4932
|
+
results: y
|
|
4933
|
+
} = yr(n.config, (Be = je.form[(nt = n.config) == null ? void 0 : nt.app]) == null ? void 0 : Be.consumersList, "", {
|
|
4921
4934
|
fetchedItemsKey: "data",
|
|
4922
4935
|
searchKeys: ["username", "custom_id", "id"]
|
|
4923
|
-
}), { axiosInstance: p } = Ut((He = n.config) == null ? void 0 : He.axiosRequestConfig), { getMessageFromError:
|
|
4936
|
+
}), { axiosInstance: p } = Ut((He = n.config) == null ? void 0 : He.axiosRequestConfig), { getMessageFromError: _ } = Il(), A = Al(), w = I(() => y.value.map((C) => ({
|
|
4924
4937
|
label: C.username || C.custom_id,
|
|
4925
4938
|
value: C.id,
|
|
4926
4939
|
selected: o.fields.consumers.includes(C.id),
|
|
4927
4940
|
data: C
|
|
4928
4941
|
// we need this to determine whether or not to show the description text
|
|
4929
|
-
}))),
|
|
4930
|
-
var C,
|
|
4931
|
-
return (
|
|
4932
|
-
}),
|
|
4942
|
+
}))), L = I(() => {
|
|
4943
|
+
var C, P;
|
|
4944
|
+
return (P = je.form[(C = n.config) == null ? void 0 : C.app]) == null ? void 0 : P.edit;
|
|
4945
|
+
}), T = I(() => n.consumerGroupId ? ot.Edit : ot.Create), Y = I(() => !!o.fields.name && !z.value), v = I(() => JSON.stringify(o.fields) !== JSON.stringify(s)), f = (C, P = "", ae = "") => {
|
|
4933
4946
|
var G, me, Ce, le, Ue, We;
|
|
4934
4947
|
let V = `${(G = n.config) == null ? void 0 : G.apiBaseUrl}${je.form[(me = n.config) == null ? void 0 : me.app][C]}`;
|
|
4935
|
-
return ((Ce = n.config) == null ? void 0 : Ce.app) === "konnect" ? V = V.replace(/{controlPlaneId}/gi, ((le = n.config) == null ? void 0 : le.controlPlaneId) || "") : ((Ue = n.config) == null ? void 0 : Ue.app) === "kongManager" && (V = V.replace(/\/{workspace}/gi, (We = n.config) != null && We.workspace ? `/${n.config.workspace}` : "")), V = V.replace(/{id}/gi,
|
|
4936
|
-
},
|
|
4948
|
+
return ((Ce = n.config) == null ? void 0 : Ce.app) === "konnect" ? V = V.replace(/{controlPlaneId}/gi, ((le = n.config) == null ? void 0 : le.controlPlaneId) || "") : ((Ue = n.config) == null ? void 0 : Ue.app) === "kongManager" && (V = V.replace(/\/{workspace}/gi, (We = n.config) != null && We.workspace ? `/${n.config.workspace}` : "")), V = V.replace(/{id}/gi, P || n.consumerGroupId), (C === "addConsumer" || C === "removeConsumer") && (V = V.replace(/{consumerId}/gi, ae)), V;
|
|
4949
|
+
}, g = () => {
|
|
4937
4950
|
var C;
|
|
4938
4951
|
i.push(((C = n.config) == null ? void 0 : C.cancelRoute) || { name: "consumer-group-list" });
|
|
4939
|
-
},
|
|
4952
|
+
}, K = (C) => {
|
|
4940
4953
|
r("error", C);
|
|
4941
|
-
},
|
|
4954
|
+
}, B = (C) => {
|
|
4942
4955
|
r("loading", C);
|
|
4943
|
-
},
|
|
4956
|
+
}, S = async (C) => {
|
|
4944
4957
|
var ae, V, G, me, Ce;
|
|
4945
4958
|
o.fields.name = ((ae = C == null ? void 0 : C.item) == null ? void 0 : ae.name) || ((V = C == null ? void 0 : C.consumer_group) == null ? void 0 : V.name) || (C == null ? void 0 : C.name) || "";
|
|
4946
|
-
const
|
|
4947
|
-
if (o.fields.tags = (
|
|
4959
|
+
const P = ((G = C == null ? void 0 : C.item) == null ? void 0 : G.tags) || (C == null ? void 0 : C.consumer_group.tags) || (C == null ? void 0 : C.tags) || [];
|
|
4960
|
+
if (o.fields.tags = (P == null ? void 0 : P.join(", ")) || "", "consumers" in C)
|
|
4948
4961
|
o.fields.consumers = ((me = C == null ? void 0 : C.consumers) == null ? void 0 : me.map((le) => le.id)) || [];
|
|
4949
4962
|
else
|
|
4950
4963
|
try {
|
|
4951
4964
|
const { data: le } = await p.get(f("getConsumers"));
|
|
4952
4965
|
o.fields.consumers = "consumers" in le ? (Ce = le == null ? void 0 : le.consumers) == null ? void 0 : Ce.map((Ue) => Ue.id) : [];
|
|
4953
4966
|
} catch (le) {
|
|
4954
|
-
|
|
4967
|
+
M(le);
|
|
4955
4968
|
}
|
|
4956
4969
|
Object.assign(s, o.fields);
|
|
4957
|
-
}, z =
|
|
4958
|
-
var C,
|
|
4970
|
+
}, z = I(() => A.utf8Name(o.fields.name)), E = I(() => {
|
|
4971
|
+
var C, P;
|
|
4959
4972
|
return {
|
|
4960
4973
|
name: o.fields.name,
|
|
4961
|
-
tags: (
|
|
4974
|
+
tags: (P = (C = o.fields.tags.split(",")) == null ? void 0 : C.map((ae) => String(ae || "").trim())) == null ? void 0 : P.filter((ae) => ae !== "")
|
|
4962
4975
|
};
|
|
4963
|
-
}), k = async (C,
|
|
4964
|
-
o.errorMessage =
|
|
4976
|
+
}), k = async (C, P = "") => await p.post(f("addConsumer", P, C), { consumer: C }), N = async (C, P = "") => await p.delete(f("removeConsumer", P, C)), M = (C) => {
|
|
4977
|
+
o.errorMessage = _(C), r("error", C);
|
|
4965
4978
|
}, J = (C = n.consumerGroupId) => {
|
|
4966
4979
|
Object.assign(s, o.fields), r("update", { ...o.fields, id: C });
|
|
4967
|
-
}, te = (C,
|
|
4980
|
+
}, te = (C, P, ae = n.consumerGroupId) => {
|
|
4968
4981
|
const V = C == null ? void 0 : C.find((G) => G.status !== "fulfilled");
|
|
4969
|
-
V ?
|
|
4982
|
+
V ? M({
|
|
4970
4983
|
code: V.status,
|
|
4971
|
-
message:
|
|
4984
|
+
message: P
|
|
4972
4985
|
}) : J(ae);
|
|
4973
4986
|
}, de = async () => {
|
|
4974
4987
|
let C = "";
|
|
4975
4988
|
try {
|
|
4976
|
-
const { data:
|
|
4977
|
-
C = "item" in
|
|
4978
|
-
} catch (
|
|
4979
|
-
|
|
4989
|
+
const { data: P } = await p.post(f("create"), E.value);
|
|
4990
|
+
C = "item" in P ? P.item.id : P.id;
|
|
4991
|
+
} catch (P) {
|
|
4992
|
+
M(P);
|
|
4980
4993
|
}
|
|
4981
4994
|
if (o.fields.consumers.length > 0 && C)
|
|
4982
4995
|
try {
|
|
4983
|
-
const
|
|
4996
|
+
const P = o.fields.consumers.map((V) => k(V, C)), ae = await Promise.allSettled(P);
|
|
4984
4997
|
te(ae, a("consumer_groups.errors.add_consumer"), C);
|
|
4985
|
-
} catch (
|
|
4986
|
-
|
|
4998
|
+
} catch (P) {
|
|
4999
|
+
M(P);
|
|
4987
5000
|
}
|
|
4988
5001
|
else
|
|
4989
5002
|
o.fields.consumers.length === 0 && C && J(C);
|
|
@@ -4992,112 +5005,112 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
4992
5005
|
try {
|
|
4993
5006
|
((ae = n.config) == null ? void 0 : ae.app) === "konnect" ? await p.put(f("edit"), E.value) : await p.patch(f("edit"), E.value);
|
|
4994
5007
|
} catch (V) {
|
|
4995
|
-
|
|
5008
|
+
M(V);
|
|
4996
5009
|
}
|
|
4997
|
-
const C = o.fields.consumers.filter((V) => !s.consumers.includes(V)),
|
|
4998
|
-
if (
|
|
5010
|
+
const C = o.fields.consumers.filter((V) => !s.consumers.includes(V)), P = s.consumers.filter((V) => !o.fields.consumers.includes(V));
|
|
5011
|
+
if (P.length === 0 && C.length === 0)
|
|
4999
5012
|
J();
|
|
5000
5013
|
else {
|
|
5001
|
-
if (
|
|
5014
|
+
if (P.length > 0)
|
|
5002
5015
|
try {
|
|
5003
|
-
const V =
|
|
5016
|
+
const V = P.map((me) => N(me)), G = await Promise.allSettled(V);
|
|
5004
5017
|
te(G, a("consumer_groups.errors.remove_consumer"));
|
|
5005
5018
|
} catch (V) {
|
|
5006
|
-
|
|
5019
|
+
M(V);
|
|
5007
5020
|
}
|
|
5008
5021
|
if (C.length > 0)
|
|
5009
5022
|
try {
|
|
5010
5023
|
const V = C.map((me) => k(me)), G = await Promise.allSettled(V);
|
|
5011
5024
|
te(G, a("consumer_groups.errors.add_consumer"));
|
|
5012
5025
|
} catch (V) {
|
|
5013
|
-
|
|
5026
|
+
M(V);
|
|
5014
5027
|
}
|
|
5015
5028
|
}
|
|
5016
5029
|
}, bt = async () => {
|
|
5017
5030
|
try {
|
|
5018
|
-
o.readonly = !0,
|
|
5031
|
+
o.readonly = !0, T.value === ot.Create ? await de() : await Je();
|
|
5019
5032
|
} finally {
|
|
5020
5033
|
o.readonly = !1;
|
|
5021
5034
|
}
|
|
5022
5035
|
};
|
|
5023
5036
|
return dt(async () => {
|
|
5024
5037
|
await c();
|
|
5025
|
-
}), (C,
|
|
5026
|
-
const ae =
|
|
5027
|
-
return m(),
|
|
5028
|
-
|
|
5038
|
+
}), (C, P) => {
|
|
5039
|
+
const ae = R("KInput"), V = R("KMultiselect");
|
|
5040
|
+
return m(), O("div", Kl, [
|
|
5041
|
+
$(h(Ls), {
|
|
5029
5042
|
"can-submit": Y.value && v.value,
|
|
5030
5043
|
config: e.config,
|
|
5031
5044
|
"edit-id": e.consumerGroupId,
|
|
5032
|
-
"error-message": o.errorMessage ||
|
|
5033
|
-
"fetch-url":
|
|
5045
|
+
"error-message": o.errorMessage || h(d) || z.value,
|
|
5046
|
+
"fetch-url": L.value,
|
|
5034
5047
|
"form-fields": E.value,
|
|
5035
5048
|
"is-readonly": o.readonly,
|
|
5036
|
-
onCancel:
|
|
5037
|
-
"onFetch:error":
|
|
5038
|
-
"onFetch:success":
|
|
5039
|
-
onLoading:
|
|
5049
|
+
onCancel: g,
|
|
5050
|
+
"onFetch:error": P[3] || (P[3] = (G) => K(G)),
|
|
5051
|
+
"onFetch:success": S,
|
|
5052
|
+
onLoading: P[4] || (P[4] = (G) => B(G)),
|
|
5040
5053
|
onSubmit: bt
|
|
5041
5054
|
}, {
|
|
5042
5055
|
default: b(() => [
|
|
5043
|
-
|
|
5044
|
-
description:
|
|
5045
|
-
title:
|
|
5056
|
+
$(h(yn), {
|
|
5057
|
+
description: h(a)("consumer_groups.form.general_info.description"),
|
|
5058
|
+
title: h(a)("consumer_groups.form.general_info.title")
|
|
5046
5059
|
}, {
|
|
5047
5060
|
default: b(() => [
|
|
5048
|
-
|
|
5061
|
+
$(ae, {
|
|
5049
5062
|
modelValue: o.fields.name,
|
|
5050
|
-
"onUpdate:modelValue":
|
|
5063
|
+
"onUpdate:modelValue": P[0] || (P[0] = (G) => o.fields.name = G),
|
|
5051
5064
|
modelModifiers: { trim: !0 },
|
|
5052
5065
|
autocomplete: "off",
|
|
5053
5066
|
"data-testid": "consumer-group-form-name",
|
|
5054
|
-
label:
|
|
5055
|
-
placeholder:
|
|
5067
|
+
label: h(a)("consumer_groups.form.fields.name.label"),
|
|
5068
|
+
placeholder: h(a)("consumer_groups.form.fields.name.placeholder"),
|
|
5056
5069
|
required: "",
|
|
5057
5070
|
type: "text"
|
|
5058
5071
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
5059
|
-
|
|
5072
|
+
$(ae, {
|
|
5060
5073
|
modelValue: o.fields.tags,
|
|
5061
|
-
"onUpdate:modelValue":
|
|
5074
|
+
"onUpdate:modelValue": P[1] || (P[1] = (G) => o.fields.tags = G),
|
|
5062
5075
|
modelModifiers: { trim: !0 },
|
|
5063
5076
|
autocomplete: "off",
|
|
5064
5077
|
"data-testid": "consumer-group-form-tags",
|
|
5065
|
-
help:
|
|
5066
|
-
label:
|
|
5078
|
+
help: h(a)("consumer_groups.form.fields.tags.help"),
|
|
5079
|
+
label: h(a)("consumer_groups.form.fields.tags.label"),
|
|
5067
5080
|
"label-attributes": {
|
|
5068
|
-
info:
|
|
5081
|
+
info: h(a)("consumer_groups.form.fields.tags.tooltip"),
|
|
5069
5082
|
tooltipAttributes: { maxWidth: "300" }
|
|
5070
5083
|
},
|
|
5071
|
-
placeholder:
|
|
5084
|
+
placeholder: h(a)("consumer_groups.form.fields.tags.placeholder"),
|
|
5072
5085
|
type: "text"
|
|
5073
5086
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder"])
|
|
5074
5087
|
]),
|
|
5075
5088
|
_: 1
|
|
5076
5089
|
}, 8, ["description", "title"]),
|
|
5077
|
-
|
|
5078
|
-
description:
|
|
5090
|
+
$(h(yn), {
|
|
5091
|
+
description: h(a)("consumer_groups.form.consumers.description"),
|
|
5079
5092
|
"has-divider": "",
|
|
5080
|
-
title:
|
|
5093
|
+
title: h(a)("consumer_groups.form.consumers.title")
|
|
5081
5094
|
}, {
|
|
5082
5095
|
default: b(() => [
|
|
5083
|
-
|
|
5096
|
+
$(V, {
|
|
5084
5097
|
modelValue: o.fields.consumers,
|
|
5085
|
-
"onUpdate:modelValue":
|
|
5098
|
+
"onUpdate:modelValue": P[2] || (P[2] = (G) => o.fields.consumers = G),
|
|
5086
5099
|
appearance: "select",
|
|
5087
5100
|
autosuggest: "",
|
|
5088
|
-
items:
|
|
5089
|
-
label:
|
|
5090
|
-
loading:
|
|
5091
|
-
placeholder:
|
|
5101
|
+
items: w.value,
|
|
5102
|
+
label: h(a)("consumer_groups.form.fields.consumers.label"),
|
|
5103
|
+
loading: h(u),
|
|
5104
|
+
placeholder: h(a)("consumer_groups.form.fields.consumers.placeholder"),
|
|
5092
5105
|
width: "auto",
|
|
5093
|
-
onQueryChange:
|
|
5106
|
+
onQueryChange: h(l)
|
|
5094
5107
|
}, {
|
|
5095
5108
|
"item-template": b(({ item: G }) => {
|
|
5096
5109
|
var me, Ce, le;
|
|
5097
5110
|
return [
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
(me = G == null ? void 0 : G.data) != null && me.username && ((Ce = G == null ? void 0 : G.data) != null && Ce.custom_id) ? (m(),
|
|
5111
|
+
U("div", Ll, [
|
|
5112
|
+
U("div", Bl, q(G.label), 1),
|
|
5113
|
+
(me = G == null ? void 0 : G.data) != null && me.username && ((Ce = G == null ? void 0 : G.data) != null && Ce.custom_id) ? (m(), O("div", Ul, q((le = G == null ? void 0 : G.data) == null ? void 0 : le.custom_id), 1)) : W("", !0)
|
|
5101
5114
|
])
|
|
5102
5115
|
];
|
|
5103
5116
|
}),
|
|
@@ -5139,7 +5152,7 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
5139
5152
|
},
|
|
5140
5153
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
5141
5154
|
setup(e) {
|
|
5142
|
-
const t = e, { i18n: { t: n } } = gt.useI18n(), r =
|
|
5155
|
+
const t = e, { i18n: { t: n } } = gt.useI18n(), r = I(() => je.form[t.config.app].edit), a = F({
|
|
5143
5156
|
id: {},
|
|
5144
5157
|
name: {},
|
|
5145
5158
|
created_at: {},
|
|
@@ -5148,8 +5161,8 @@ const vl = ["aria-labelledby"], bl = { class: "form-section-wrapper" }, kl = {
|
|
|
5148
5161
|
tooltip: n("consumer_groups.form.fields.tags.tooltip")
|
|
5149
5162
|
}
|
|
5150
5163
|
});
|
|
5151
|
-
return (i, o) => (m(),
|
|
5152
|
-
|
|
5164
|
+
return (i, o) => (m(), O("div", Rl, [
|
|
5165
|
+
$(h(Ms), {
|
|
5153
5166
|
config: e.config,
|
|
5154
5167
|
"config-card-doc": e.configCardDoc,
|
|
5155
5168
|
"config-schema": a.value,
|