@kong-ui-public/entities-consumer-groups 1.3.6-pr.928.9a9deeba.0 → 1.3.6
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ae, ref as
|
|
1
|
+
import { defineComponent as ae, ref as E, computed as j, watch as xe, renderSlot as Y, createCommentVNode as G, unref as y, useSlots as ut, onBeforeMount as Qe, resolveComponent as q, openBlock as g, createBlock as V, createSlots as Te, withCtx as h, createElementVNode as R, createTextVNode as Z, toDisplayString as K, createVNode as F, createElementBlock as M, renderList as ye, Fragment as ve, normalizeClass as Fe, withModifiers as rt, withDirectives as et, vShow as tt, useCssVars as ur, resolveDynamicComponent as He, normalizeProps as cr, guardReactiveProps as dr, mergeProps as ht, onMounted as pr, onUnmounted as fr, normalizeStyle as mr, inject as gr, pushScopeId as yr, popScopeId as hr, reactive as Pt } from "vue";
|
|
2
2
|
import { useRouter as wt } from "vue-router";
|
|
3
3
|
import { createI18n as It, i18nTComponent as cn } from "@kong-ui-public/i18n";
|
|
4
4
|
import vr from "axios";
|
|
@@ -108,7 +108,7 @@ function wr() {
|
|
|
108
108
|
}
|
|
109
109
|
const ct = {
|
|
110
110
|
useI18n: wr
|
|
111
|
-
}, Ie = "/api/runtime_groups/{controlPlaneId}",
|
|
111
|
+
}, Ie = "/api/runtime_groups/{controlPlaneId}", Ae = "/{workspace}", $e = {
|
|
112
112
|
list: {
|
|
113
113
|
konnect: {
|
|
114
114
|
all: `${Ie}/consumer_groups`,
|
|
@@ -116,9 +116,9 @@ const ct = {
|
|
|
116
116
|
oneForConsumer: `${Ie}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
117
117
|
},
|
|
118
118
|
kongManager: {
|
|
119
|
-
all: `${
|
|
120
|
-
forConsumer: `${
|
|
121
|
-
oneForConsumer: `${
|
|
119
|
+
all: `${Ae}/consumer_groups?counter=true`,
|
|
120
|
+
forConsumer: `${Ae}/consumers/{consumerId}/consumer_groups`,
|
|
121
|
+
oneForConsumer: `${Ae}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
124
|
form: {
|
|
@@ -131,17 +131,17 @@ const ct = {
|
|
|
131
131
|
getConsumers: `${Ie}/consumer_groups/{id}/consumers`
|
|
132
132
|
},
|
|
133
133
|
kongManager: {
|
|
134
|
-
consumersList: `${
|
|
135
|
-
create: `${
|
|
136
|
-
edit: `${
|
|
137
|
-
addConsumer: `${
|
|
138
|
-
removeConsumer: `${
|
|
139
|
-
getConsumers: `${
|
|
134
|
+
consumersList: `${Ae}/consumers`,
|
|
135
|
+
create: `${Ae}/consumer_groups`,
|
|
136
|
+
edit: `${Ae}/consumer_groups/{id}`,
|
|
137
|
+
addConsumer: `${Ae}/consumer_groups/{id}/consumers`,
|
|
138
|
+
removeConsumer: `${Ae}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
139
|
+
getConsumers: `${Ae}/consumer_groups/{id}/consumers`
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
|
-
var dn = /* @__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))(dn || {}), nt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(nt || {}),
|
|
144
|
-
function
|
|
143
|
+
var dn = /* @__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))(dn || {}), nt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(nt || {}), Ee = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Ee || {}), te = /* @__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))(te || {}), be = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(be || {});
|
|
144
|
+
function At(e = {}) {
|
|
145
145
|
return {
|
|
146
146
|
axiosInstance: vr.create({
|
|
147
147
|
withCredentials: !0,
|
|
@@ -162,12 +162,12 @@ function Ir() {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
const ft = "khcp-user-table-preferences",
|
|
165
|
+
const ft = "khcp-user-table-preferences", Ar = {
|
|
166
166
|
pageSize: 30,
|
|
167
167
|
sortColumnKey: void 0,
|
|
168
168
|
sortColumnOrder: void 0
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function Sr() {
|
|
171
171
|
const e = (t) => {
|
|
172
172
|
if (typeof t == "string")
|
|
173
173
|
try {
|
|
@@ -191,14 +191,14 @@ function Ar() {
|
|
|
191
191
|
},
|
|
192
192
|
getTablePreferences: (t) => {
|
|
193
193
|
const r = n();
|
|
194
|
-
return (r == null ? void 0 : r.get(t)) || void 0 ||
|
|
194
|
+
return (r == null ? void 0 : r.get(t)) || void 0 || Ar;
|
|
195
195
|
},
|
|
196
196
|
deleteAllTablePreferences: () => {
|
|
197
197
|
localStorage.removeItem(ft);
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const xr = {
|
|
202
202
|
actions: {
|
|
203
203
|
copyId: "Copy ID",
|
|
204
204
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
@@ -217,13 +217,13 @@ const Sr = {
|
|
|
217
217
|
errors: {
|
|
218
218
|
edit: "The entity could not be edited at this time."
|
|
219
219
|
}
|
|
220
|
-
},
|
|
220
|
+
}, jr = {
|
|
221
221
|
emptyState: {
|
|
222
222
|
noSearchResultsTitle: "No results found",
|
|
223
223
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
224
224
|
noSearchResultsCtaText: "Clear"
|
|
225
225
|
}
|
|
226
|
-
},
|
|
226
|
+
}, Mr = {
|
|
227
227
|
title: "Configuration",
|
|
228
228
|
actions: {
|
|
229
229
|
copy: "Copy JSON"
|
|
@@ -258,7 +258,7 @@ const Sr = {
|
|
|
258
258
|
entryTitle: "Entry {index}",
|
|
259
259
|
structuredFormat: "Structured"
|
|
260
260
|
}
|
|
261
|
-
},
|
|
261
|
+
}, Or = {
|
|
262
262
|
filterButtonText: "Filter",
|
|
263
263
|
fieldLabel: "Filter by:",
|
|
264
264
|
inputPlaceholder: "Enter a value",
|
|
@@ -266,7 +266,7 @@ const Sr = {
|
|
|
266
266
|
applyButtonText: "Apply",
|
|
267
267
|
clearButtonText: "Clear",
|
|
268
268
|
clearAllButtonText: "Clear all filters"
|
|
269
|
-
},
|
|
269
|
+
}, Er = {
|
|
270
270
|
errors: {
|
|
271
271
|
fetch: "Could not fetch available items",
|
|
272
272
|
invalid: "Please select a valid value"
|
|
@@ -286,17 +286,17 @@ const Sr = {
|
|
|
286
286
|
confirmText: "Yes, disable"
|
|
287
287
|
}
|
|
288
288
|
}, Nr = {
|
|
289
|
-
global:
|
|
289
|
+
global: xr,
|
|
290
290
|
deleteModal: Tr,
|
|
291
291
|
baseForm: $r,
|
|
292
|
-
baseTable:
|
|
293
|
-
baseConfigCard:
|
|
294
|
-
filter:
|
|
295
|
-
debouncedFilter:
|
|
292
|
+
baseTable: jr,
|
|
293
|
+
baseConfigCard: Mr,
|
|
294
|
+
filter: Or,
|
|
295
|
+
debouncedFilter: Er,
|
|
296
296
|
errors: Kr,
|
|
297
297
|
toggleModal: Fr
|
|
298
298
|
};
|
|
299
|
-
function
|
|
299
|
+
function St() {
|
|
300
300
|
const e = It("en-us", Nr);
|
|
301
301
|
return {
|
|
302
302
|
i18n: e,
|
|
@@ -305,20 +305,47 @@ function At() {
|
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
307
|
function pn() {
|
|
308
|
+
const e = (t, r) => (r == null ? void 0 : r[t]) ?? void 0, n = (t, r) => {
|
|
309
|
+
if (t.length !== r.length)
|
|
310
|
+
return !1;
|
|
311
|
+
const o = /* @__PURE__ */ new Set([...t, ...r]);
|
|
312
|
+
for (const a of o) {
|
|
313
|
+
const i = t.filter((l) => l === a).length, s = r.filter((l) => l === a).length;
|
|
314
|
+
if (i !== s)
|
|
315
|
+
return !1;
|
|
316
|
+
}
|
|
317
|
+
return !0;
|
|
318
|
+
};
|
|
308
319
|
return {
|
|
309
|
-
getPropValue:
|
|
310
|
-
objectsAreEqual: (
|
|
320
|
+
getPropValue: e,
|
|
321
|
+
objectsAreEqual: (t, r, o) => {
|
|
322
|
+
if (o) {
|
|
323
|
+
if (Object.keys(t).length === Object.keys(r).length)
|
|
324
|
+
for (const a in t)
|
|
325
|
+
if (Array.isArray(t[a]) && Array.isArray(r[a])) {
|
|
326
|
+
if (n(t[a], r[a]))
|
|
327
|
+
continue;
|
|
328
|
+
return !1;
|
|
329
|
+
} else {
|
|
330
|
+
if (t[a] === r[a])
|
|
331
|
+
continue;
|
|
332
|
+
return !1;
|
|
333
|
+
}
|
|
334
|
+
else
|
|
335
|
+
return !1;
|
|
336
|
+
return !0;
|
|
337
|
+
}
|
|
311
338
|
try {
|
|
312
|
-
return JSON.stringify(
|
|
339
|
+
return JSON.stringify(t) === JSON.stringify(r);
|
|
313
340
|
} catch {
|
|
314
341
|
return !1;
|
|
315
342
|
}
|
|
316
343
|
},
|
|
317
|
-
sortAlpha: (
|
|
318
|
-
let
|
|
319
|
-
return Array.isArray(
|
|
344
|
+
sortAlpha: (t) => (r, o) => {
|
|
345
|
+
let a = r[t] === void 0 || r[t] === null ? "" : r[t], i = o[t] === void 0 || o[t] === null ? "" : o[t];
|
|
346
|
+
return Array.isArray(r[t]) && (a = r[t][0]), Array.isArray(o[t]) && (i = o[t][0]), a.localeCompare(i);
|
|
320
347
|
},
|
|
321
|
-
isValidUuid: (
|
|
348
|
+
isValidUuid: (t) => t ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(t) : !1
|
|
322
349
|
};
|
|
323
350
|
}
|
|
324
351
|
function Br(e, n, t, r = {
|
|
@@ -326,48 +353,48 @@ function Br(e, n, t, r = {
|
|
|
326
353
|
searchKeys: ["id"]
|
|
327
354
|
}) {
|
|
328
355
|
t || (t = "100");
|
|
329
|
-
const { axiosInstance: o } =
|
|
356
|
+
const { axiosInstance: o } = At({
|
|
330
357
|
headers: e.requestHeaders
|
|
331
|
-
}), { i18n: { t: a } } =
|
|
332
|
-
await k(
|
|
333
|
-
}, 200), l =
|
|
358
|
+
}), { i18n: { t: a } } = St(), { debounce: i } = Ir(), s = i(async (A) => {
|
|
359
|
+
await k(A);
|
|
360
|
+
}, 200), l = E(!1), c = E(""), d = E(""), u = E([]), m = E([]), f = E(void 0), I = y(n);
|
|
334
361
|
let v = `${e.apiBaseUrl}${I}`;
|
|
335
362
|
e.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
336
|
-
const { isValidUuid: p } = pn(),
|
|
363
|
+
const { isValidUuid: p } = pn(), S = async () => {
|
|
337
364
|
try {
|
|
338
365
|
l.value = !0;
|
|
339
|
-
const { data:
|
|
340
|
-
|
|
366
|
+
const { data: A } = await o.get(`${v}?size=${t}`);
|
|
367
|
+
A != null && A.next || (f.value = r.fetchedItemsKey in A ? A[r.fetchedItemsKey] : []), m.value = r.fetchedItemsKey in A ? A[r.fetchedItemsKey] : [], u.value = m.value;
|
|
341
368
|
} catch {
|
|
342
369
|
u.value = [], c.value = a("debouncedFilter.errors.fetch");
|
|
343
370
|
} finally {
|
|
344
371
|
l.value = !1;
|
|
345
372
|
}
|
|
346
|
-
}, b =
|
|
373
|
+
}, b = E(""), k = async (A) => {
|
|
347
374
|
var ne, pe, z;
|
|
348
|
-
if (b.value !==
|
|
349
|
-
if (b.value =
|
|
375
|
+
if (b.value !== A)
|
|
376
|
+
if (b.value = A || "", f.value === void 0)
|
|
350
377
|
try {
|
|
351
378
|
if (l.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
352
379
|
let w = v + "";
|
|
353
|
-
|
|
380
|
+
A && (w += `/${A}`);
|
|
354
381
|
const { data: N } = await o.get(`${w}?size=${t}`);
|
|
355
382
|
r.fetchedItemsKey in N ? u.value = N[r.fetchedItemsKey] : N != null && N.id ? u.value = [N] : u.value = [];
|
|
356
|
-
} else if (
|
|
383
|
+
} else if (A) {
|
|
357
384
|
const w = [];
|
|
358
|
-
p(
|
|
359
|
-
const { data: C } = await o.get(`${v}/${
|
|
385
|
+
p(A) && r.searchKeys.includes("id") ? w.push((async () => {
|
|
386
|
+
const { data: C } = await o.get(`${v}/${A}`);
|
|
360
387
|
return [C[r.fetchedItemsKey] ?? C];
|
|
361
388
|
})()) : w.push(
|
|
362
389
|
...r.searchKeys.filter((C) => C !== "id").map(async (C) => {
|
|
363
|
-
const { data:
|
|
364
|
-
return
|
|
390
|
+
const { data: x } = await o.get(`${v}?${C}=${A}`);
|
|
391
|
+
return x[r.fetchedItemsKey];
|
|
365
392
|
})
|
|
366
393
|
);
|
|
367
394
|
const N = await Promise.all(w), B = /* @__PURE__ */ new Set();
|
|
368
395
|
u.value = [], (ne = N == null ? void 0 : N.forEach) == null || ne.call(N, (C) => {
|
|
369
|
-
var
|
|
370
|
-
(
|
|
396
|
+
var x;
|
|
397
|
+
(x = C == null ? void 0 : C.forEach) == null || x.call(C, (T) => {
|
|
371
398
|
B.has(T.id) || (B.add(T.id), u.value.push(T));
|
|
372
399
|
});
|
|
373
400
|
});
|
|
@@ -379,12 +406,12 @@ function Br(e, n, t, r = {
|
|
|
379
406
|
l.value = !1;
|
|
380
407
|
}
|
|
381
408
|
else
|
|
382
|
-
l.value = !0, d.value = "",
|
|
409
|
+
l.value = !0, d.value = "", A ? (u.value = (z = f.value) == null ? void 0 : z.filter((w) => {
|
|
383
410
|
var N;
|
|
384
411
|
let B = !1;
|
|
385
412
|
for (const C of r.searchKeys) {
|
|
386
|
-
const
|
|
387
|
-
|
|
413
|
+
const x = typeof w[C] == "string" ? (N = w[C]) == null ? void 0 : N.toLowerCase() : w[C];
|
|
414
|
+
x != null && x.includes(A.toLowerCase()) && (B = !0);
|
|
388
415
|
}
|
|
389
416
|
return B;
|
|
390
417
|
}), (!u.value || !u.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : u.value = f.value, l.value = !1;
|
|
@@ -395,18 +422,18 @@ function Br(e, n, t, r = {
|
|
|
395
422
|
validationError: d,
|
|
396
423
|
results: u,
|
|
397
424
|
allRecords: f,
|
|
398
|
-
loadItems:
|
|
425
|
+
loadItems: S,
|
|
399
426
|
debouncedQueryChange: s
|
|
400
427
|
};
|
|
401
428
|
}
|
|
402
429
|
function Pr(e, n) {
|
|
403
|
-
const t = y(n), r =
|
|
430
|
+
const t = y(n), r = j(
|
|
404
431
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
405
432
|
);
|
|
406
433
|
return r.value.search = "", (o) => `${r.value.href}/${o}`;
|
|
407
434
|
}
|
|
408
435
|
function Lr() {
|
|
409
|
-
const { i18n: { t: e } } =
|
|
436
|
+
const { i18n: { t: e } } = St();
|
|
410
437
|
return {
|
|
411
438
|
getMessageFromError: (n) => {
|
|
412
439
|
var t, r, o;
|
|
@@ -445,9 +472,9 @@ function qr(e) {
|
|
|
445
472
|
}
|
|
446
473
|
}
|
|
447
474
|
function fn(e, n) {
|
|
448
|
-
const t =
|
|
475
|
+
const t = E(y(e)), r = E(y(n)), o = j(
|
|
449
476
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
450
|
-
), a =
|
|
477
|
+
), a = j(
|
|
451
478
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
452
479
|
);
|
|
453
480
|
return (i) => {
|
|
@@ -463,14 +490,14 @@ function fn(e, n) {
|
|
|
463
490
|
};
|
|
464
491
|
}
|
|
465
492
|
function Ur(e, n, t = "data") {
|
|
466
|
-
const r = y(n), { axiosInstance: o } =
|
|
493
|
+
const r = y(n), { axiosInstance: o } = At({
|
|
467
494
|
headers: e.requestHeaders
|
|
468
|
-
}), a = fn(e, r), i =
|
|
469
|
-
status:
|
|
495
|
+
}), a = fn(e, r), i = E({
|
|
496
|
+
status: Ee.Idle
|
|
470
497
|
});
|
|
471
498
|
return { fetcher: async (s) => {
|
|
472
499
|
try {
|
|
473
|
-
i.value = { status:
|
|
500
|
+
i.value = { status: Ee.Loading };
|
|
474
501
|
const l = a(s), { data: c } = await o.get(l), d = t && t.replace(/[^\w-_]/gi, "");
|
|
475
502
|
let u;
|
|
476
503
|
c[d] && Array.isArray(c[d]) ? u = c[d] : u = Object.keys(c).length ? [c] : [];
|
|
@@ -484,7 +511,7 @@ function Ur(e, n, t = "data") {
|
|
|
484
511
|
} : null
|
|
485
512
|
};
|
|
486
513
|
return i.value = {
|
|
487
|
-
status:
|
|
514
|
+
status: Ee.Idle,
|
|
488
515
|
response: m
|
|
489
516
|
}, m;
|
|
490
517
|
} catch (l) {
|
|
@@ -493,11 +520,11 @@ function Ur(e, n, t = "data") {
|
|
|
493
520
|
total: 0
|
|
494
521
|
};
|
|
495
522
|
return s.query && l.response.status === 404 ? (i.value = {
|
|
496
|
-
status:
|
|
523
|
+
status: Ee.NoResults,
|
|
497
524
|
response: c,
|
|
498
525
|
error: l
|
|
499
526
|
}, c) : (i.value = {
|
|
500
|
-
status:
|
|
527
|
+
status: Ee.Error,
|
|
501
528
|
response: c,
|
|
502
529
|
error: l
|
|
503
530
|
}, c);
|
|
@@ -505,8 +532,10 @@ function Ur(e, n, t = "data") {
|
|
|
505
532
|
}, fetcherState: i };
|
|
506
533
|
}
|
|
507
534
|
function Rr() {
|
|
535
|
+
const e = (t, r = "_") => t ? t.split(r).map((o) => o.toLowerCase() === "id" ? o.toUpperCase() : o.charAt(0).toUpperCase() + o.substring(1)).join(" ") : "", n = /(?:^|[\s-:'"])\w/g;
|
|
508
536
|
return {
|
|
509
|
-
|
|
537
|
+
capitalize: (t) => t ? t.replace(n, (r) => r.toUpperCase()) : "",
|
|
538
|
+
convertKeyToTitle: e
|
|
510
539
|
};
|
|
511
540
|
}
|
|
512
541
|
const mn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Lt = (e) => {
|
|
@@ -565,11 +594,11 @@ function Jr(e) {
|
|
|
565
594
|
return !(i && Vt(o, i, "<") || s && Vt(o, s, ">"));
|
|
566
595
|
}
|
|
567
596
|
function Wr(e) {
|
|
568
|
-
const n =
|
|
569
|
-
return
|
|
597
|
+
const n = E(0), t = E(0), r = E(!1);
|
|
598
|
+
return xe(e, (o) => {
|
|
570
599
|
o && !r.value && (n.value = o.offsetWidth, t.value = o.scrollWidth, r.value = !0);
|
|
571
600
|
}), {
|
|
572
|
-
isTruncated:
|
|
601
|
+
isTruncated: j(() => n.value < t.value)
|
|
573
602
|
};
|
|
574
603
|
}
|
|
575
604
|
const Yr = new br();
|
|
@@ -589,7 +618,7 @@ function Zr() {
|
|
|
589
618
|
};
|
|
590
619
|
}
|
|
591
620
|
const ue = {
|
|
592
|
-
useAxios:
|
|
621
|
+
useAxios: At,
|
|
593
622
|
useDebouncedFilter: Br,
|
|
594
623
|
useDeleteUrlBuilder: Pr,
|
|
595
624
|
useErrors: Lr,
|
|
@@ -598,7 +627,7 @@ const ue = {
|
|
|
598
627
|
useFetchUrlBuilder: fn,
|
|
599
628
|
useHelpers: pn,
|
|
600
629
|
useStringHelpers: Rr,
|
|
601
|
-
useI18n:
|
|
630
|
+
useI18n: St,
|
|
602
631
|
useGatewayFeatureSupported: Jr,
|
|
603
632
|
useTruncationDetector: Wr,
|
|
604
633
|
useToaster: Zr
|
|
@@ -656,18 +685,18 @@ const ue = {
|
|
|
656
685
|
emits: ["success", "error"],
|
|
657
686
|
setup(e, { emit: n }) {
|
|
658
687
|
const t = e, { t: r } = It("en-us", eo), o = t.notify || gr(to, () => {
|
|
659
|
-
}), a =
|
|
688
|
+
}), a = j(() => t.idTooltip ? {
|
|
660
689
|
label: t.idTooltip,
|
|
661
690
|
positionFixed: !0,
|
|
662
691
|
placement: "bottomStart"
|
|
663
692
|
} : {
|
|
664
693
|
title: t.uuid
|
|
665
|
-
}), i =
|
|
694
|
+
}), i = j(() => !!(t.tooltip && t.successTooltip)), s = E(t.tooltip), l = j(() => t.tooltip ? {
|
|
666
695
|
label: s.value,
|
|
667
696
|
positionFixed: !0,
|
|
668
697
|
maxWidth: "500px",
|
|
669
698
|
placement: "bottomStart"
|
|
670
|
-
} : {}), c =
|
|
699
|
+
} : {}), c = j(() => {
|
|
671
700
|
var m;
|
|
672
701
|
return t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${(m = t.uuid) == null ? void 0 : m.substring(0, 5)}` : t.uuid;
|
|
673
702
|
}), d = (m) => {
|
|
@@ -691,7 +720,7 @@ const ue = {
|
|
|
691
720
|
};
|
|
692
721
|
return (m, f) => {
|
|
693
722
|
const I = q("KIcon"), v = q("KClipboardProvider");
|
|
694
|
-
return g(),
|
|
723
|
+
return g(), M("div", no, [
|
|
695
724
|
e.format !== "hidden" ? (g(), V(He(e.idTooltip ? "KTooltip" : "div"), ht({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
696
725
|
default: h(() => [
|
|
697
726
|
R("div", {
|
|
@@ -712,7 +741,7 @@ const ue = {
|
|
|
712
741
|
"data-testid": "copy-to-clipboard",
|
|
713
742
|
role: "button",
|
|
714
743
|
tabindex: "0",
|
|
715
|
-
onClick: rt((
|
|
744
|
+
onClick: rt((S) => u(p), ["stop"])
|
|
716
745
|
}, [
|
|
717
746
|
F(I, {
|
|
718
747
|
class: "uuid-icon",
|
|
@@ -757,10 +786,10 @@ const ue = {
|
|
|
757
786
|
}
|
|
758
787
|
},
|
|
759
788
|
setup(e) {
|
|
760
|
-
const n = e, { i18n: { t } } = ue.useI18n(), { convertKeyToTitle: r } = ue.useStringHelpers(), o =
|
|
789
|
+
const n = e, { i18n: { t } } = ue.useI18n(), { convertKeyToTitle: r } = ue.useStringHelpers(), o = j(() => n.item.key ?? "json-array-item"), a = j(() => n.item.value ?? n.item), i = j(() => {
|
|
761
790
|
const l = JSON.parse(JSON.stringify(a.value));
|
|
762
791
|
return n.isArrayItem && delete l.name, l;
|
|
763
|
-
}), s =
|
|
792
|
+
}), s = j(() => {
|
|
764
793
|
var l;
|
|
765
794
|
return n.isArrayItem ? (l = a.value) != null && l.name ? r(a.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
766
795
|
});
|
|
@@ -768,10 +797,10 @@ const ue = {
|
|
|
768
797
|
class: Fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
769
798
|
}, {
|
|
770
799
|
default: h(() => [
|
|
771
|
-
e.isArrayItem ? (g(),
|
|
800
|
+
e.isArrayItem ? (g(), M("legend", io, [
|
|
772
801
|
R("b", null, K(s.value), 1)
|
|
773
802
|
])) : G("", !0),
|
|
774
|
-
(g(!0),
|
|
803
|
+
(g(!0), M(ve, null, ye(Object.keys(i.value), (d, u) => (g(), V(xt, {
|
|
775
804
|
key: `${o.value}-property-${u}`,
|
|
776
805
|
item: {
|
|
777
806
|
key: d,
|
|
@@ -801,7 +830,7 @@ const ue = {
|
|
|
801
830
|
const { i18n: { t: n } } = ue.useI18n();
|
|
802
831
|
return (t, r) => {
|
|
803
832
|
const o = q("KButton");
|
|
804
|
-
return g(),
|
|
833
|
+
return g(), M("div", null, [
|
|
805
834
|
F(o, {
|
|
806
835
|
appearance: "btn-link",
|
|
807
836
|
class: "navigation-button",
|
|
@@ -837,11 +866,11 @@ const ue = {
|
|
|
837
866
|
}, 8, ["appearance"]);
|
|
838
867
|
};
|
|
839
868
|
}
|
|
840
|
-
}), po = "#0044f4", fo = "#e0e4ea", mo = "#3a3f51", go = "1px", yo = "20px", ho = { class: "config-card-details-row" }, vo = ["data-testid"], bo = ["data-testid"], ko = ["data-testid"], Co = ["data-testid"], _o = { key: 1 }, wo = ["data-testid"], Io = ["data-testid"],
|
|
869
|
+
}), po = "#0044f4", fo = "#e0e4ea", mo = "#3a3f51", go = "1px", yo = "20px", ho = { class: "config-card-details-row" }, vo = ["data-testid"], bo = ["data-testid"], ko = ["data-testid"], Co = ["data-testid"], _o = { key: 1 }, wo = ["data-testid"], Io = ["data-testid"], Ao = ["data-testid"], So = ["data-testid"], xo = {
|
|
841
870
|
name: "ConfigCardItem",
|
|
842
871
|
components: { CopyUuid: yn, JsonCardItem: hn, StatusBadge: co, InternalLinkItem: uo }
|
|
843
872
|
}, To = /* @__PURE__ */ ae({
|
|
844
|
-
...
|
|
873
|
+
...xo,
|
|
845
874
|
props: {
|
|
846
875
|
item: {
|
|
847
876
|
type: Object,
|
|
@@ -867,7 +896,7 @@ const ue = {
|
|
|
867
896
|
"4d3dc7e7": l.value && i.value ? "100%" : t.slim ? "50%" : "25%",
|
|
868
897
|
"4d400dc2": l.value && i.value ? "100%" : t.slim ? "50%" : "75%"
|
|
869
898
|
}));
|
|
870
|
-
const r = ut(), { i18n: { t: o, formatUnixTimeStamp: a } } = ue.useI18n(), i =
|
|
899
|
+
const r = ut(), { i18n: { t: o, formatUnixTimeStamp: a } } = ue.useI18n(), i = j(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = j(() => !!(t.item.tooltip || r["label-tooltip"])), l = j(() => t.item.type === te.Json || t.item.type === te.JsonArray), c = j(() => t.item.type === te.JsonArray), d = j(() => {
|
|
871
900
|
switch (t.item.type) {
|
|
872
901
|
case te.ID:
|
|
873
902
|
return {
|
|
@@ -993,10 +1022,10 @@ const ue = {
|
|
|
993
1022
|
text: t.item.value
|
|
994
1023
|
};
|
|
995
1024
|
}
|
|
996
|
-
}), u =
|
|
1025
|
+
}), u = E(), { isTruncated: m } = ue.useTruncationDetector(u);
|
|
997
1026
|
return (f, I) => {
|
|
998
|
-
const v = q("KLabel"), p = q("KBadge"),
|
|
999
|
-
return g(),
|
|
1027
|
+
const v = q("KLabel"), p = q("KBadge"), S = q("KMethodBadge"), b = q("KTooltip");
|
|
1028
|
+
return g(), M("div", ho, [
|
|
1000
1029
|
R("div", {
|
|
1001
1030
|
class: "config-card-details-label",
|
|
1002
1031
|
"data-testid": `${e.item.key}-label`
|
|
@@ -1031,17 +1060,17 @@ const ue = {
|
|
|
1031
1060
|
Y(f.$slots, e.item.key, {
|
|
1032
1061
|
rowValue: e.item.value
|
|
1033
1062
|
}, () => [
|
|
1034
|
-
i.value ? (g(),
|
|
1063
|
+
i.value ? (g(), M("div", _o, [
|
|
1035
1064
|
(g(), V(He(d.value.tag), cr(dr(d.value.attrs)), {
|
|
1036
1065
|
default: h(() => [
|
|
1037
|
-
d.value.additionalComponent === "KBadge" ? (g(),
|
|
1066
|
+
d.value.additionalComponent === "KBadge" ? (g(), M("div", {
|
|
1038
1067
|
key: 0,
|
|
1039
1068
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1040
1069
|
}, [
|
|
1041
|
-
(g(!0),
|
|
1042
|
-
key: `${e.item.key}-badge-tag-${
|
|
1070
|
+
(g(!0), M(ve, null, ye(e.item.value, (k, A) => (g(), V(p, {
|
|
1071
|
+
key: `${e.item.key}-badge-tag-${A}`,
|
|
1043
1072
|
class: "config-badge",
|
|
1044
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1073
|
+
"data-testid": `${e.item.key}-badge-tag-${A}`,
|
|
1045
1074
|
"truncation-tooltip": k
|
|
1046
1075
|
}, {
|
|
1047
1076
|
default: h(() => [
|
|
@@ -1050,25 +1079,25 @@ const ue = {
|
|
|
1050
1079
|
_: 2
|
|
1051
1080
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
1052
1081
|
], 8, wo)) : G("", !0),
|
|
1053
|
-
d.value.additionalComponent === "CopyUuid" ? (g(),
|
|
1082
|
+
d.value.additionalComponent === "CopyUuid" ? (g(), M("div", {
|
|
1054
1083
|
key: 1,
|
|
1055
1084
|
class: "copy-uuid-array",
|
|
1056
1085
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1057
1086
|
}, [
|
|
1058
|
-
(g(!0),
|
|
1059
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1060
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1087
|
+
(g(!0), M(ve, null, ye(e.item.value, (k, A) => (g(), V(y(yn), ht(d.value.childAttrs, {
|
|
1088
|
+
key: `${e.item.key}-copy-uuid-${A}`,
|
|
1089
|
+
"data-testid": `${e.item.key}-copy-uuid-${A}`,
|
|
1061
1090
|
uuid: k
|
|
1062
1091
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1063
|
-
], 8, Io)) : d.value.additionalComponent === "KMethodBadge" ? (g(),
|
|
1092
|
+
], 8, Io)) : d.value.additionalComponent === "KMethodBadge" ? (g(), M("div", {
|
|
1064
1093
|
key: 2,
|
|
1065
1094
|
class: "method-badge-array",
|
|
1066
1095
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1067
1096
|
}, [
|
|
1068
|
-
(g(!0),
|
|
1069
|
-
key: `${e.item.key}-badge-method-${
|
|
1097
|
+
(g(!0), M(ve, null, ye(e.item.value, (k, A) => (g(), V(S, {
|
|
1098
|
+
key: `${e.item.key}-badge-method-${A}`,
|
|
1070
1099
|
class: "config-badge",
|
|
1071
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1100
|
+
"data-testid": `${e.item.key}-badge-method-${A}`,
|
|
1072
1101
|
"is-rounded": "",
|
|
1073
1102
|
label: k,
|
|
1074
1103
|
method: y(kr).includes(k.toLowerCase()) ? k.toLowerCase() : "custom"
|
|
@@ -1078,18 +1107,18 @@ const ue = {
|
|
|
1078
1107
|
]),
|
|
1079
1108
|
_: 2
|
|
1080
1109
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
1081
|
-
], 8,
|
|
1082
|
-
d.value.additionalComponent === "JsonCardItem" ? (g(),
|
|
1110
|
+
], 8, Ao)) : G("", !0),
|
|
1111
|
+
d.value.additionalComponent === "JsonCardItem" ? (g(), M("div", {
|
|
1083
1112
|
key: 3,
|
|
1084
1113
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1085
1114
|
}, [
|
|
1086
|
-
(g(!0),
|
|
1087
|
-
key: `json-array-item-${
|
|
1088
|
-
index:
|
|
1115
|
+
(g(!0), M(ve, null, ye(e.item.value, (k, A) => (g(), V(hn, {
|
|
1116
|
+
key: `json-array-item-${A}`,
|
|
1117
|
+
index: A,
|
|
1089
1118
|
"is-array-item": "",
|
|
1090
1119
|
item: k
|
|
1091
1120
|
}, null, 8, ["index", "item"]))), 128))
|
|
1092
|
-
], 8,
|
|
1121
|
+
], 8, So)) : (g(), V(b, {
|
|
1093
1122
|
key: 4,
|
|
1094
1123
|
label: y(m) ? e.item.value : ""
|
|
1095
1124
|
}, {
|
|
@@ -1105,7 +1134,7 @@ const ue = {
|
|
|
1105
1134
|
]),
|
|
1106
1135
|
_: 1
|
|
1107
1136
|
}, 16))
|
|
1108
|
-
])) : (g(),
|
|
1137
|
+
])) : (g(), M("div", {
|
|
1109
1138
|
key: 0,
|
|
1110
1139
|
"data-testid": `${e.item.key}-no-value`
|
|
1111
1140
|
}, " – ", 8, Co))
|
|
@@ -1114,7 +1143,7 @@ const ue = {
|
|
|
1114
1143
|
]);
|
|
1115
1144
|
};
|
|
1116
1145
|
}
|
|
1117
|
-
}),
|
|
1146
|
+
}), xt = /* @__PURE__ */ Ce(To, [["__scopeId", "data-v-307ab96d"]]);
|
|
1118
1147
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1119
1148
|
function vn(e) {
|
|
1120
1149
|
return typeof e > "u" || e === null;
|
|
@@ -1122,26 +1151,26 @@ function vn(e) {
|
|
|
1122
1151
|
function $o(e) {
|
|
1123
1152
|
return typeof e == "object" && e !== null;
|
|
1124
1153
|
}
|
|
1125
|
-
function
|
|
1154
|
+
function jo(e) {
|
|
1126
1155
|
return Array.isArray(e) ? e : vn(e) ? [] : [e];
|
|
1127
1156
|
}
|
|
1128
|
-
function
|
|
1157
|
+
function Mo(e, n) {
|
|
1129
1158
|
var t, r, o, a;
|
|
1130
1159
|
if (n)
|
|
1131
1160
|
for (a = Object.keys(n), t = 0, r = a.length; t < r; t += 1)
|
|
1132
1161
|
o = a[t], e[o] = n[o];
|
|
1133
1162
|
return e;
|
|
1134
1163
|
}
|
|
1135
|
-
function
|
|
1164
|
+
function Oo(e, n) {
|
|
1136
1165
|
var t = "", r;
|
|
1137
1166
|
for (r = 0; r < n; r += 1)
|
|
1138
1167
|
t += e;
|
|
1139
1168
|
return t;
|
|
1140
1169
|
}
|
|
1141
|
-
function
|
|
1170
|
+
function Eo(e) {
|
|
1142
1171
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1143
1172
|
}
|
|
1144
|
-
var Ko = vn, Fo = $o, No =
|
|
1173
|
+
var Ko = vn, Fo = $o, No = jo, Bo = Oo, Po = Eo, Lo = Mo, se = {
|
|
1145
1174
|
isNothing: Ko,
|
|
1146
1175
|
isObject: Fo,
|
|
1147
1176
|
toArray: No,
|
|
@@ -1331,7 +1360,7 @@ function Jo() {
|
|
|
1331
1360
|
function Wo(e) {
|
|
1332
1361
|
return e === null;
|
|
1333
1362
|
}
|
|
1334
|
-
var
|
|
1363
|
+
var An = new de("tag:yaml.org,2002:null", {
|
|
1335
1364
|
kind: "scalar",
|
|
1336
1365
|
resolve: Ho,
|
|
1337
1366
|
construct: Jo,
|
|
@@ -1367,7 +1396,7 @@ function Zo(e) {
|
|
|
1367
1396
|
function Qo(e) {
|
|
1368
1397
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1369
1398
|
}
|
|
1370
|
-
var
|
|
1399
|
+
var Sn = new de("tag:yaml.org,2002:bool", {
|
|
1371
1400
|
kind: "scalar",
|
|
1372
1401
|
resolve: Yo,
|
|
1373
1402
|
construct: Zo,
|
|
@@ -1458,7 +1487,7 @@ function ra(e) {
|
|
|
1458
1487
|
function oa(e) {
|
|
1459
1488
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !se.isNegativeZero(e);
|
|
1460
1489
|
}
|
|
1461
|
-
var
|
|
1490
|
+
var xn = new de("tag:yaml.org,2002:int", {
|
|
1462
1491
|
kind: "scalar",
|
|
1463
1492
|
resolve: na,
|
|
1464
1493
|
construct: ra,
|
|
@@ -1544,22 +1573,22 @@ var Tn = new de("tag:yaml.org,2002:float", {
|
|
|
1544
1573
|
defaultStyle: "lowercase"
|
|
1545
1574
|
}), $n = In.extend({
|
|
1546
1575
|
implicit: [
|
|
1547
|
-
xn,
|
|
1548
1576
|
An,
|
|
1549
1577
|
Sn,
|
|
1578
|
+
xn,
|
|
1550
1579
|
Tn
|
|
1551
1580
|
]
|
|
1552
|
-
}),
|
|
1581
|
+
}), jn = $n, Mn = new RegExp(
|
|
1553
1582
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1554
|
-
),
|
|
1583
|
+
), On = new RegExp(
|
|
1555
1584
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
1556
1585
|
);
|
|
1557
1586
|
function da(e) {
|
|
1558
|
-
return e === null ? !1 :
|
|
1587
|
+
return e === null ? !1 : Mn.exec(e) !== null || On.exec(e) !== null;
|
|
1559
1588
|
}
|
|
1560
1589
|
function pa(e) {
|
|
1561
1590
|
var n, t, r, o, a, i, s, l = 0, c = null, d, u, m;
|
|
1562
|
-
if (n =
|
|
1591
|
+
if (n = Mn.exec(e), n === null && (n = On.exec(e)), n === null)
|
|
1563
1592
|
throw new Error("Date resolve error");
|
|
1564
1593
|
if (t = +n[1], r = +n[2] - 1, o = +n[3], !n[4])
|
|
1565
1594
|
return new Date(Date.UTC(t, r, o));
|
|
@@ -1573,7 +1602,7 @@ function pa(e) {
|
|
|
1573
1602
|
function fa(e) {
|
|
1574
1603
|
return e.toISOString();
|
|
1575
1604
|
}
|
|
1576
|
-
var
|
|
1605
|
+
var En = new de("tag:yaml.org,2002:timestamp", {
|
|
1577
1606
|
kind: "scalar",
|
|
1578
1607
|
resolve: da,
|
|
1579
1608
|
construct: pa,
|
|
@@ -1663,7 +1692,7 @@ function Ia(e) {
|
|
|
1663
1692
|
}
|
|
1664
1693
|
return !0;
|
|
1665
1694
|
}
|
|
1666
|
-
function
|
|
1695
|
+
function Aa(e) {
|
|
1667
1696
|
if (e === null)
|
|
1668
1697
|
return [];
|
|
1669
1698
|
var n, t, r, o, a, i = e;
|
|
@@ -1674,14 +1703,14 @@ function xa(e) {
|
|
|
1674
1703
|
var Bn = new de("tag:yaml.org,2002:pairs", {
|
|
1675
1704
|
kind: "sequence",
|
|
1676
1705
|
resolve: Ia,
|
|
1677
|
-
construct:
|
|
1678
|
-
}),
|
|
1679
|
-
function
|
|
1706
|
+
construct: Aa
|
|
1707
|
+
}), Sa = Object.prototype.hasOwnProperty;
|
|
1708
|
+
function xa(e) {
|
|
1680
1709
|
if (e === null)
|
|
1681
1710
|
return !0;
|
|
1682
1711
|
var n, t = e;
|
|
1683
1712
|
for (n in t)
|
|
1684
|
-
if (
|
|
1713
|
+
if (Sa.call(t, n) && t[n] !== null)
|
|
1685
1714
|
return !1;
|
|
1686
1715
|
return !0;
|
|
1687
1716
|
}
|
|
@@ -1690,11 +1719,11 @@ function Ta(e) {
|
|
|
1690
1719
|
}
|
|
1691
1720
|
var Pn = new de("tag:yaml.org,2002:set", {
|
|
1692
1721
|
kind: "mapping",
|
|
1693
|
-
resolve:
|
|
1722
|
+
resolve: xa,
|
|
1694
1723
|
construct: Ta
|
|
1695
|
-
}), $t =
|
|
1724
|
+
}), $t = jn.extend({
|
|
1696
1725
|
implicit: [
|
|
1697
|
-
|
|
1726
|
+
En,
|
|
1698
1727
|
Kn
|
|
1699
1728
|
],
|
|
1700
1729
|
explicit: [
|
|
@@ -1703,7 +1732,7 @@ var Pn = new de("tag:yaml.org,2002:set", {
|
|
|
1703
1732
|
Bn,
|
|
1704
1733
|
Pn
|
|
1705
1734
|
]
|
|
1706
|
-
}),
|
|
1735
|
+
}), Me = Object.prototype.hasOwnProperty, ot = 1, Ln = 2, qn = 3, at = 4, yt = 1, $a = 2, Ht = 3, ja = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Ma = /[\x85\u2028\u2029]/, Oa = /[,\[\]\{\}]/, Un = /^(?:!|!!|![a-z\-]+!)$/i, Rn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1707
1736
|
function Jt(e) {
|
|
1708
1737
|
return Object.prototype.toString.call(e);
|
|
1709
1738
|
}
|
|
@@ -1719,7 +1748,7 @@ function he(e) {
|
|
|
1719
1748
|
function qe(e) {
|
|
1720
1749
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1721
1750
|
}
|
|
1722
|
-
function
|
|
1751
|
+
function Ea(e) {
|
|
1723
1752
|
var n;
|
|
1724
1753
|
return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
1725
1754
|
}
|
|
@@ -1769,7 +1798,7 @@ var Yt = {
|
|
|
1769
1798
|
},
|
|
1770
1799
|
TAG: function(e, n, t) {
|
|
1771
1800
|
var r, o;
|
|
1772
|
-
t.length !== 2 && $(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1], Un.test(r) || $(e, "ill-formed tag handle (first argument) of the TAG directive"),
|
|
1801
|
+
t.length !== 2 && $(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1], Un.test(r) || $(e, "ill-formed tag handle (first argument) of the TAG directive"), Me.call(e.tagMap, r) && $(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Rn.test(o) || $(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1773
1802
|
try {
|
|
1774
1803
|
o = decodeURIComponent(o);
|
|
1775
1804
|
} catch {
|
|
@@ -1778,21 +1807,21 @@ var Yt = {
|
|
|
1778
1807
|
e.tagMap[r] = o;
|
|
1779
1808
|
}
|
|
1780
1809
|
};
|
|
1781
|
-
function
|
|
1810
|
+
function je(e, n, t, r) {
|
|
1782
1811
|
var o, a, i, s;
|
|
1783
1812
|
if (n < t) {
|
|
1784
1813
|
if (s = e.input.slice(n, t), r)
|
|
1785
1814
|
for (o = 0, a = s.length; o < a; o += 1)
|
|
1786
1815
|
i = s.charCodeAt(o), i === 9 || 32 <= i && i <= 1114111 || $(e, "expected valid JSON character");
|
|
1787
1816
|
else
|
|
1788
|
-
|
|
1817
|
+
ja.test(s) && $(e, "the stream contains non-printable characters");
|
|
1789
1818
|
e.result += s;
|
|
1790
1819
|
}
|
|
1791
1820
|
}
|
|
1792
1821
|
function Zt(e, n, t, r) {
|
|
1793
1822
|
var o, a, i, s;
|
|
1794
1823
|
for (se.isObject(t) || $(e, "cannot merge mappings; the provided source object is unacceptable"), o = Object.keys(t), i = 0, s = o.length; i < s; i += 1)
|
|
1795
|
-
a = o[i],
|
|
1824
|
+
a = o[i], Me.call(n, a) || (n[a] = t[a], r[a] = !0);
|
|
1796
1825
|
}
|
|
1797
1826
|
function Ue(e, n, t, r, o, a, i, s, l) {
|
|
1798
1827
|
var c, d;
|
|
@@ -1806,7 +1835,7 @@ function Ue(e, n, t, r, o, a, i, s, l) {
|
|
|
1806
1835
|
else
|
|
1807
1836
|
Zt(e, n, a, t);
|
|
1808
1837
|
else
|
|
1809
|
-
!e.json && !
|
|
1838
|
+
!e.json && !Me.call(t, o) && Me.call(n, o) && (e.line = i || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, $(e, "duplicated mapping key")), o === "__proto__" ? Object.defineProperty(n, o, {
|
|
1810
1839
|
configurable: !0,
|
|
1811
1840
|
enumerable: !0,
|
|
1812
1841
|
writable: !0,
|
|
@@ -1814,7 +1843,7 @@ function Ue(e, n, t, r, o, a, i, s, l) {
|
|
|
1814
1843
|
}) : n[o] = a, delete t[o];
|
|
1815
1844
|
return n;
|
|
1816
1845
|
}
|
|
1817
|
-
function
|
|
1846
|
+
function jt(e) {
|
|
1818
1847
|
var n;
|
|
1819
1848
|
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : $(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1820
1849
|
}
|
|
@@ -1827,7 +1856,7 @@ function oe(e, n, t) {
|
|
|
1827
1856
|
o = e.input.charCodeAt(++e.position);
|
|
1828
1857
|
while (o !== 10 && o !== 13 && o !== 0);
|
|
1829
1858
|
if (we(o))
|
|
1830
|
-
for (
|
|
1859
|
+
for (jt(e), o = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; o === 32; )
|
|
1831
1860
|
e.lineIndent++, o = e.input.charCodeAt(++e.position);
|
|
1832
1861
|
else
|
|
1833
1862
|
break;
|
|
@@ -1838,7 +1867,7 @@ function dt(e) {
|
|
|
1838
1867
|
var n = e.position, t;
|
|
1839
1868
|
return t = e.input.charCodeAt(n), !!((t === 45 || t === 46) && t === e.input.charCodeAt(n + 1) && t === e.input.charCodeAt(n + 2) && (n += 3, t = e.input.charCodeAt(n), t === 0 || he(t)));
|
|
1840
1869
|
}
|
|
1841
|
-
function
|
|
1870
|
+
function Mt(e, n) {
|
|
1842
1871
|
n === 1 ? e.result += " " : n > 1 && (e.result += se.repeat(`
|
|
1843
1872
|
`, n - 1));
|
|
1844
1873
|
}
|
|
@@ -1865,9 +1894,9 @@ function Pa(e, n, t) {
|
|
|
1865
1894
|
break;
|
|
1866
1895
|
}
|
|
1867
1896
|
}
|
|
1868
|
-
s && (
|
|
1897
|
+
s && (je(e, a, i, !1), Mt(e, e.line - l), a = i = e.position, s = !1), Ke(f) || (i = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1869
1898
|
}
|
|
1870
|
-
return
|
|
1899
|
+
return je(e, a, i, !1), e.result ? !0 : (e.kind = u, e.result = m, !1);
|
|
1871
1900
|
}
|
|
1872
1901
|
function La(e, n) {
|
|
1873
1902
|
var t, r, o;
|
|
@@ -1875,12 +1904,12 @@ function La(e, n) {
|
|
|
1875
1904
|
return !1;
|
|
1876
1905
|
for (e.kind = "scalar", e.result = "", e.position++, r = o = e.position; (t = e.input.charCodeAt(e.position)) !== 0; )
|
|
1877
1906
|
if (t === 39)
|
|
1878
|
-
if (
|
|
1907
|
+
if (je(e, r, e.position, !0), t = e.input.charCodeAt(++e.position), t === 39)
|
|
1879
1908
|
r = e.position, e.position++, o = e.position;
|
|
1880
1909
|
else
|
|
1881
1910
|
return !0;
|
|
1882
1911
|
else
|
|
1883
|
-
we(t) ? (
|
|
1912
|
+
we(t) ? (je(e, r, o, !0), Mt(e, oe(e, !1, n)), r = o = e.position) : e.position === e.lineStart && dt(e) ? $(e, "unexpected end of the document within a single quoted scalar") : (e.position++, o = e.position);
|
|
1884
1913
|
$(e, "unexpected end of the stream within a single quoted scalar");
|
|
1885
1914
|
}
|
|
1886
1915
|
function qa(e, n) {
|
|
@@ -1889,26 +1918,26 @@ function qa(e, n) {
|
|
|
1889
1918
|
return !1;
|
|
1890
1919
|
for (e.kind = "scalar", e.result = "", e.position++, t = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1891
1920
|
if (s === 34)
|
|
1892
|
-
return
|
|
1921
|
+
return je(e, t, e.position, !0), e.position++, !0;
|
|
1893
1922
|
if (s === 92) {
|
|
1894
|
-
if (
|
|
1923
|
+
if (je(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), we(s))
|
|
1895
1924
|
oe(e, !1, n);
|
|
1896
1925
|
else if (s < 256 && Vn[s])
|
|
1897
1926
|
e.result += Dn[s], e.position++;
|
|
1898
1927
|
else if ((i = Ka(s)) > 0) {
|
|
1899
1928
|
for (o = i, a = 0; o > 0; o--)
|
|
1900
|
-
s = e.input.charCodeAt(++e.position), (i =
|
|
1929
|
+
s = e.input.charCodeAt(++e.position), (i = Ea(s)) >= 0 ? a = (a << 4) + i : $(e, "expected hexadecimal character");
|
|
1901
1930
|
e.result += Na(a), e.position++;
|
|
1902
1931
|
} else
|
|
1903
1932
|
$(e, "unknown escape sequence");
|
|
1904
1933
|
t = r = e.position;
|
|
1905
1934
|
} else
|
|
1906
|
-
we(s) ? (
|
|
1935
|
+
we(s) ? (je(e, t, r, !0), Mt(e, oe(e, !1, n)), t = r = e.position) : e.position === e.lineStart && dt(e) ? $(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1907
1936
|
}
|
|
1908
1937
|
$(e, "unexpected end of the stream within a double quoted scalar");
|
|
1909
1938
|
}
|
|
1910
1939
|
function Ua(e, n) {
|
|
1911
|
-
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, c, d, u, m, f, I = /* @__PURE__ */ Object.create(null), v, p,
|
|
1940
|
+
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, c, d, u, m, f, I = /* @__PURE__ */ Object.create(null), v, p, S, b;
|
|
1912
1941
|
if (b = e.input.charCodeAt(e.position), b === 91)
|
|
1913
1942
|
d = 93, f = !1, s = [];
|
|
1914
1943
|
else if (b === 123)
|
|
@@ -1918,7 +1947,7 @@ function Ua(e, n) {
|
|
|
1918
1947
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), b = e.input.charCodeAt(++e.position); b !== 0; ) {
|
|
1919
1948
|
if (oe(e, !0, n), b = e.input.charCodeAt(e.position), b === d)
|
|
1920
1949
|
return e.position++, e.tag = i, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
1921
|
-
t ? b === 44 && $(e, "expected the node content, but found ','") : $(e, "missed comma between flow collection entries"), p = v =
|
|
1950
|
+
t ? b === 44 && $(e, "expected the node content, but found ','") : $(e, "missed comma between flow collection entries"), p = v = S = null, u = m = !1, b === 63 && (c = e.input.charCodeAt(e.position + 1), he(c) && (u = m = !0, e.position++, oe(e, !0, n))), r = e.line, o = e.lineStart, a = e.position, Re(e, n, ot, !1, !0), p = e.tag, v = e.result, oe(e, !0, n), b = e.input.charCodeAt(e.position), (m || e.line === r) && b === 58 && (u = !0, b = e.input.charCodeAt(++e.position), oe(e, !0, n), Re(e, n, ot, !1, !0), S = e.result), f ? Ue(e, s, I, p, v, S, r, o, a) : u ? s.push(Ue(e, null, I, p, v, S, r, o, a)) : s.push(v), oe(e, !0, n), b = e.input.charCodeAt(e.position), b === 44 ? (t = !0, b = e.input.charCodeAt(++e.position)) : t = !1;
|
|
1922
1951
|
}
|
|
1923
1952
|
$(e, "unexpected end of the stream within a flow collection");
|
|
1924
1953
|
}
|
|
@@ -1947,7 +1976,7 @@ function Ra(e, n) {
|
|
|
1947
1976
|
while (!we(u) && u !== 0);
|
|
1948
1977
|
}
|
|
1949
1978
|
for (; u !== 0; ) {
|
|
1950
|
-
for (
|
|
1979
|
+
for (jt(e), e.lineIndent = 0, u = e.input.charCodeAt(e.position); (!i || e.lineIndent < s) && u === 32; )
|
|
1951
1980
|
e.lineIndent++, u = e.input.charCodeAt(++e.position);
|
|
1952
1981
|
if (!i && e.lineIndent > s && (s = e.lineIndent), we(u)) {
|
|
1953
1982
|
l++;
|
|
@@ -1965,7 +1994,7 @@ function Ra(e, n) {
|
|
|
1965
1994
|
`, l) : e.result += se.repeat(`
|
|
1966
1995
|
`, a ? 1 + l : l), a = !0, i = !0, l = 0, t = e.position; !we(u) && u !== 0; )
|
|
1967
1996
|
u = e.input.charCodeAt(++e.position);
|
|
1968
|
-
|
|
1997
|
+
je(e, t, e.position, !1);
|
|
1969
1998
|
}
|
|
1970
1999
|
return !0;
|
|
1971
2000
|
}
|
|
@@ -1986,12 +2015,12 @@ function Qt(e, n) {
|
|
|
1986
2015
|
return s ? (e.tag = r, e.anchor = o, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1987
2016
|
}
|
|
1988
2017
|
function Va(e, n, t) {
|
|
1989
|
-
var r, o, a, i, s, l, c = e.tag, d = e.anchor, u = {}, m = /* @__PURE__ */ Object.create(null), f = null, I = null, v = null, p = !1,
|
|
2018
|
+
var r, o, a, i, s, l, c = e.tag, d = e.anchor, u = {}, m = /* @__PURE__ */ Object.create(null), f = null, I = null, v = null, p = !1, S = !1, b;
|
|
1990
2019
|
if (e.firstTabInLine !== -1)
|
|
1991
2020
|
return !1;
|
|
1992
2021
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), b = e.input.charCodeAt(e.position); b !== 0; ) {
|
|
1993
2022
|
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, $(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (b === 63 || b === 58) && he(r))
|
|
1994
|
-
b === 63 ? (p && (Ue(e, u, m, f, I, null, i, s, l), f = I = v = null),
|
|
2023
|
+
b === 63 ? (p && (Ue(e, u, m, f, I, null, i, s, l), f = I = v = null), S = !0, p = !0, o = !0) : p ? (p = !1, o = !0) : $(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, b = r;
|
|
1995
2024
|
else {
|
|
1996
2025
|
if (i = e.line, s = e.lineStart, l = e.position, !Re(e, t, Ln, !1, !0))
|
|
1997
2026
|
break;
|
|
@@ -1999,12 +2028,12 @@ function Va(e, n, t) {
|
|
|
1999
2028
|
for (b = e.input.charCodeAt(e.position); Ke(b); )
|
|
2000
2029
|
b = e.input.charCodeAt(++e.position);
|
|
2001
2030
|
if (b === 58)
|
|
2002
|
-
b = e.input.charCodeAt(++e.position), he(b) || $(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ue(e, u, m, f, I, null, i, s, l), f = I = v = null),
|
|
2003
|
-
else if (
|
|
2031
|
+
b = e.input.charCodeAt(++e.position), he(b) || $(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ue(e, u, m, f, I, null, i, s, l), f = I = v = null), S = !0, p = !1, o = !1, f = e.tag, I = e.result;
|
|
2032
|
+
else if (S)
|
|
2004
2033
|
$(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2005
2034
|
else
|
|
2006
2035
|
return e.tag = c, e.anchor = d, !0;
|
|
2007
|
-
} else if (
|
|
2036
|
+
} else if (S)
|
|
2008
2037
|
$(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2009
2038
|
else
|
|
2010
2039
|
return e.tag = c, e.anchor = d, !0;
|
|
@@ -2014,7 +2043,7 @@ function Va(e, n, t) {
|
|
|
2014
2043
|
else if (e.lineIndent < n)
|
|
2015
2044
|
break;
|
|
2016
2045
|
}
|
|
2017
|
-
return p && Ue(e, u, m, f, I, null, i, s, l),
|
|
2046
|
+
return p && Ue(e, u, m, f, I, null, i, s, l), S && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), S;
|
|
2018
2047
|
}
|
|
2019
2048
|
function Da(e) {
|
|
2020
2049
|
var n, t = !1, r = !1, o, a, i;
|
|
@@ -2028,7 +2057,7 @@ function Da(e) {
|
|
|
2028
2057
|
} else {
|
|
2029
2058
|
for (; i !== 0 && !he(i); )
|
|
2030
2059
|
i === 33 && (r ? $(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(n - 1, e.position + 1), Un.test(o) || $(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), i = e.input.charCodeAt(++e.position);
|
|
2031
|
-
a = e.input.slice(n, e.position),
|
|
2060
|
+
a = e.input.slice(n, e.position), Oa.test(a) && $(e, "tag suffix cannot contain flow indicator characters");
|
|
2032
2061
|
}
|
|
2033
2062
|
a && !Rn.test(a) && $(e, "tag name cannot contain such characters: " + a);
|
|
2034
2063
|
try {
|
|
@@ -2036,7 +2065,7 @@ function Da(e) {
|
|
|
2036
2065
|
} catch {
|
|
2037
2066
|
$(e, "tag name is malformed: " + a);
|
|
2038
2067
|
}
|
|
2039
|
-
return t ? e.tag = a :
|
|
2068
|
+
return t ? e.tag = a : Me.call(e.tagMap, o) ? e.tag = e.tagMap[o] + a : o === "!" ? e.tag = "!" + a : o === "!!" ? e.tag = "tag:yaml.org,2002:" + a : $(e, 'undeclared tag handle "' + o + '"'), !0;
|
|
2040
2069
|
}
|
|
2041
2070
|
function Ga(e) {
|
|
2042
2071
|
var n, t;
|
|
@@ -2052,7 +2081,7 @@ function za(e) {
|
|
|
2052
2081
|
return !1;
|
|
2053
2082
|
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !he(r) && !qe(r); )
|
|
2054
2083
|
r = e.input.charCodeAt(++e.position);
|
|
2055
|
-
return e.position === n && $(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position),
|
|
2084
|
+
return e.position === n && $(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), Me.call(e.anchorMap, t) || $(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], oe(e, !0, -1), !0;
|
|
2056
2085
|
}
|
|
2057
2086
|
function Re(e, n, t, r, o) {
|
|
2058
2087
|
var a, i, s, l = 1, c = !1, d = !1, u, m, f, I, v, p;
|
|
@@ -2068,7 +2097,7 @@ function Re(e, n, t, r, o) {
|
|
|
2068
2097
|
break;
|
|
2069
2098
|
}
|
|
2070
2099
|
} else if (e.tag !== "!") {
|
|
2071
|
-
if (
|
|
2100
|
+
if (Me.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2072
2101
|
I = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2073
2102
|
else
|
|
2074
2103
|
for (I = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, m = f.length; u < m; u += 1)
|
|
@@ -2100,9 +2129,9 @@ function Ha(e) {
|
|
|
2100
2129
|
i = e.input.charCodeAt(++e.position);
|
|
2101
2130
|
o.push(e.input.slice(t, e.position));
|
|
2102
2131
|
}
|
|
2103
|
-
i !== 0 &&
|
|
2132
|
+
i !== 0 && jt(e), Me.call(Yt, r) ? Yt[r](e, r, o) : it(e, 'unknown document directive "' + r + '"');
|
|
2104
2133
|
}
|
|
2105
|
-
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)) : a && $(e, "directives end mark is expected"), Re(e, e.lineIndent - 1, at, !1, !0), oe(e, !0, -1), e.checkLineBreaks &&
|
|
2134
|
+
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)) : a && $(e, "directives end mark is expected"), Re(e, e.lineIndent - 1, at, !1, !0), oe(e, !0, -1), e.checkLineBreaks && Ma.test(e.input.slice(n, e.position)) && it(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && dt(e)) {
|
|
2106
2135
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, oe(e, !0, -1));
|
|
2107
2136
|
return;
|
|
2108
2137
|
}
|
|
@@ -2140,7 +2169,7 @@ function Wa(e, n) {
|
|
|
2140
2169
|
var Ya = Ja, Za = Wa, Hn = {
|
|
2141
2170
|
loadAll: Ya,
|
|
2142
2171
|
load: Za
|
|
2143
|
-
}, Jn = Object.prototype.toString, Wn = Object.prototype.hasOwnProperty,
|
|
2172
|
+
}, Jn = Object.prototype.toString, Wn = Object.prototype.hasOwnProperty, Ot = 65279, Qa = 9, We = 10, Xa = 13, ei = 32, ti = 33, ni = 34, bt = 35, ri = 37, oi = 38, ai = 39, ii = 42, Yn = 44, si = 45, st = 58, li = 61, ui = 62, ci = 63, di = 64, Zn = 91, Qn = 93, pi = 96, Xn = 123, fi = 124, er = 125, fe = {};
|
|
2144
2173
|
fe[0] = "\\0";
|
|
2145
2174
|
fe[7] = "\\a";
|
|
2146
2175
|
fe[8] = "\\b";
|
|
@@ -2220,10 +2249,10 @@ function lt(e) {
|
|
|
2220
2249
|
return e === ei || e === Qa;
|
|
2221
2250
|
}
|
|
2222
2251
|
function Ze(e) {
|
|
2223
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2252
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Ot || 65536 <= e && e <= 1114111;
|
|
2224
2253
|
}
|
|
2225
2254
|
function en(e) {
|
|
2226
|
-
return Ze(e) && e !==
|
|
2255
|
+
return Ze(e) && e !== Ot && e !== Xa && e !== We;
|
|
2227
2256
|
}
|
|
2228
2257
|
function tn(e, n, t) {
|
|
2229
2258
|
var r = en(e), o = r && !lt(e);
|
|
@@ -2236,7 +2265,7 @@ function tn(e, n, t) {
|
|
|
2236
2265
|
);
|
|
2237
2266
|
}
|
|
2238
2267
|
function Ci(e) {
|
|
2239
|
-
return Ze(e) && e !==
|
|
2268
|
+
return Ze(e) && e !== Ot && !lt(e) && e !== si && e !== ci && e !== st && e !== Yn && e !== Zn && e !== Qn && e !== Xn && e !== er && e !== bt && e !== oi && e !== ii && e !== ti && e !== fi && e !== li && e !== ui && e !== ai && e !== ni && e !== ri && e !== di && e !== pi;
|
|
2240
2269
|
}
|
|
2241
2270
|
function _i(e) {
|
|
2242
2271
|
return !lt(e) && e !== st;
|
|
@@ -2298,9 +2327,9 @@ function Ii(e, n, t, r, o) {
|
|
|
2298
2327
|
case rr:
|
|
2299
2328
|
return "|" + nn(n, e.indent) + rn(Xt(n, a));
|
|
2300
2329
|
case or:
|
|
2301
|
-
return ">" + nn(n, e.indent) + rn(Xt(
|
|
2330
|
+
return ">" + nn(n, e.indent) + rn(Xt(Ai(n, i), a));
|
|
2302
2331
|
case Le:
|
|
2303
|
-
return '"' +
|
|
2332
|
+
return '"' + Si(n) + '"';
|
|
2304
2333
|
default:
|
|
2305
2334
|
throw new me("impossible error: invalid scalar style");
|
|
2306
2335
|
}
|
|
@@ -2318,7 +2347,7 @@ function rn(e) {
|
|
|
2318
2347
|
return e[e.length - 1] === `
|
|
2319
2348
|
` ? e.slice(0, -1) : e;
|
|
2320
2349
|
}
|
|
2321
|
-
function
|
|
2350
|
+
function Ai(e, n) {
|
|
2322
2351
|
for (var t = /(\n+)([^\n]*)/g, r = function() {
|
|
2323
2352
|
var c = e.indexOf(`
|
|
2324
2353
|
`);
|
|
@@ -2341,27 +2370,27 @@ function on(e, n) {
|
|
|
2341
2370
|
`, e.length - o > n && i > o ? l += e.slice(o, i) + `
|
|
2342
2371
|
` + e.slice(i + 1) : l += e.slice(o), l.slice(1);
|
|
2343
2372
|
}
|
|
2344
|
-
function
|
|
2373
|
+
function Si(e) {
|
|
2345
2374
|
for (var n = "", t = 0, r, o = 0; o < e.length; t >= 65536 ? o += 2 : o++)
|
|
2346
2375
|
t = ze(e, o), r = fe[t], !r && Ze(t) ? (n += e[o], t >= 65536 && (n += e[o + 1])) : n += r || hi(t);
|
|
2347
2376
|
return n;
|
|
2348
2377
|
}
|
|
2349
|
-
function
|
|
2378
|
+
function xi(e, n, t) {
|
|
2350
2379
|
var r = "", o = e.tag, a, i, s;
|
|
2351
2380
|
for (a = 0, i = t.length; a < i; a += 1)
|
|
2352
|
-
s = t[a], e.replacer && (s = e.replacer.call(t, String(a), s)), (
|
|
2381
|
+
s = t[a], e.replacer && (s = e.replacer.call(t, String(a), s)), (Se(e, n, s, !1, !1) || typeof s > "u" && Se(e, n, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2353
2382
|
e.tag = o, e.dump = "[" + r + "]";
|
|
2354
2383
|
}
|
|
2355
2384
|
function an(e, n, t, r) {
|
|
2356
2385
|
var o = "", a = e.tag, i, s, l;
|
|
2357
2386
|
for (i = 0, s = t.length; i < s; i += 1)
|
|
2358
|
-
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (
|
|
2387
|
+
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (Se(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && Se(e, n + 1, null, !0, !0, !1, !0)) && ((!r || o !== "") && (o += kt(e, n)), e.dump && We === e.dump.charCodeAt(0) ? o += "-" : o += "- ", o += e.dump);
|
|
2359
2388
|
e.tag = a, e.dump = o || "[]";
|
|
2360
2389
|
}
|
|
2361
2390
|
function Ti(e, n, t) {
|
|
2362
2391
|
var r = "", o = e.tag, a = Object.keys(t), i, s, l, c, d;
|
|
2363
2392
|
for (i = 0, s = a.length; i < s; i += 1)
|
|
2364
|
-
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = a[i], c = t[l], e.replacer && (c = e.replacer.call(t, l, c)),
|
|
2393
|
+
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = a[i], c = t[l], e.replacer && (c = e.replacer.call(t, l, c)), Se(e, n, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), Se(e, n, c, !1, !1) && (d += e.dump, r += d));
|
|
2365
2394
|
e.tag = o, e.dump = "{" + r + "}";
|
|
2366
2395
|
}
|
|
2367
2396
|
function $i(e, n, t, r) {
|
|
@@ -2373,7 +2402,7 @@ function $i(e, n, t, r) {
|
|
|
2373
2402
|
else if (e.sortKeys)
|
|
2374
2403
|
throw new me("sortKeys must be a boolean or a function");
|
|
2375
2404
|
for (s = 0, l = i.length; s < l; s += 1)
|
|
2376
|
-
m = "", (!r || o !== "") && (m += kt(e, n)), c = i[s], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)),
|
|
2405
|
+
m = "", (!r || o !== "") && (m += kt(e, n)), c = i[s], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)), Se(e, n + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && We === e.dump.charCodeAt(0) ? m += "?" : m += "? "), m += e.dump, u && (m += kt(e, n)), Se(e, n + 1, d, !0, u) && (e.dump && We === e.dump.charCodeAt(0) ? m += ":" : m += ": ", m += e.dump, o += m));
|
|
2377
2406
|
e.tag = a, e.dump = o || "{}";
|
|
2378
2407
|
}
|
|
2379
2408
|
function sn(e, n, t) {
|
|
@@ -2393,7 +2422,7 @@ function sn(e, n, t) {
|
|
|
2393
2422
|
}
|
|
2394
2423
|
return !1;
|
|
2395
2424
|
}
|
|
2396
|
-
function
|
|
2425
|
+
function Se(e, n, t, r, o, a, i) {
|
|
2397
2426
|
e.tag = null, e.dump = t, sn(e, t, !1) || sn(e, t, !0);
|
|
2398
2427
|
var s = Jn.call(e.dump), l = r, c;
|
|
2399
2428
|
r && (r = e.flowLevel < 0 || e.flowLevel > n);
|
|
@@ -2404,7 +2433,7 @@ function Ae(e, n, t, r, o, a, i) {
|
|
|
2404
2433
|
if (d && m && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), s === "[object Object]")
|
|
2405
2434
|
r && Object.keys(e.dump).length !== 0 ? ($i(e, n, e.dump, o), m && (e.dump = "&ref_" + u + e.dump)) : (Ti(e, n, e.dump), m && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2406
2435
|
else if (s === "[object Array]")
|
|
2407
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? an(e, n - 1, e.dump, o) : an(e, n, e.dump, o), m && (e.dump = "&ref_" + u + e.dump)) : (
|
|
2436
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? an(e, n - 1, e.dump, o) : an(e, n, e.dump, o), m && (e.dump = "&ref_" + u + e.dump)) : (xi(e, n, e.dump), m && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2408
2437
|
else if (s === "[object String]")
|
|
2409
2438
|
e.tag !== "?" && Ii(e, e.dump, n, a, l);
|
|
2410
2439
|
else {
|
|
@@ -2418,7 +2447,7 @@ function Ae(e, n, t, r, o, a, i) {
|
|
|
2418
2447
|
}
|
|
2419
2448
|
return !0;
|
|
2420
2449
|
}
|
|
2421
|
-
function
|
|
2450
|
+
function ji(e, n) {
|
|
2422
2451
|
var t = [], r = [], o, a;
|
|
2423
2452
|
for (_t(e, t, r), o = 0, a = r.length; o < a; o += 1)
|
|
2424
2453
|
n.duplicates.push(t[r[o]]);
|
|
@@ -2436,37 +2465,37 @@ function _t(e, n, t) {
|
|
|
2436
2465
|
for (r = Object.keys(e), o = 0, a = r.length; o < a; o += 1)
|
|
2437
2466
|
_t(e[r[o]], n, t);
|
|
2438
2467
|
}
|
|
2439
|
-
function
|
|
2468
|
+
function Mi(e, n) {
|
|
2440
2469
|
n = n || {};
|
|
2441
2470
|
var t = new bi(n);
|
|
2442
|
-
t.noRefs ||
|
|
2471
|
+
t.noRefs || ji(e, t);
|
|
2443
2472
|
var r = e;
|
|
2444
|
-
return t.replacer && (r = t.replacer.call({ "": r }, "", r)),
|
|
2473
|
+
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), Se(t, 0, r, !0, !0) ? t.dump + `
|
|
2445
2474
|
` : "";
|
|
2446
2475
|
}
|
|
2447
|
-
var
|
|
2448
|
-
dump:
|
|
2476
|
+
var Oi = Mi, Ei = {
|
|
2477
|
+
dump: Oi
|
|
2449
2478
|
};
|
|
2450
|
-
function
|
|
2479
|
+
function Et(e, n) {
|
|
2451
2480
|
return function() {
|
|
2452
2481
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2453
2482
|
};
|
|
2454
2483
|
}
|
|
2455
|
-
var Ki = de, Fi = kn, Ni = In, Bi = $n, Pi =
|
|
2484
|
+
var Ki = de, Fi = kn, Ni = In, Bi = $n, Pi = jn, Li = $t, qi = Hn.load, Ui = Hn.loadAll, Ri = Ei.dump, Vi = me, Di = {
|
|
2456
2485
|
binary: Fn,
|
|
2457
2486
|
float: Tn,
|
|
2458
2487
|
map: wn,
|
|
2459
|
-
null:
|
|
2488
|
+
null: An,
|
|
2460
2489
|
pairs: Bn,
|
|
2461
2490
|
set: Pn,
|
|
2462
|
-
timestamp:
|
|
2463
|
-
bool:
|
|
2464
|
-
int:
|
|
2491
|
+
timestamp: En,
|
|
2492
|
+
bool: Sn,
|
|
2493
|
+
int: xn,
|
|
2465
2494
|
merge: Kn,
|
|
2466
2495
|
omap: Nn,
|
|
2467
2496
|
seq: _n,
|
|
2468
2497
|
str: Cn
|
|
2469
|
-
}, Gi =
|
|
2498
|
+
}, Gi = Et("safeLoad", "load"), zi = Et("safeLoadAll", "loadAll"), Hi = Et("safeDump", "dump"), Ji = {
|
|
2470
2499
|
Type: Ki,
|
|
2471
2500
|
Schema: Fi,
|
|
2472
2501
|
FAILSAFE_SCHEMA: Ni,
|
|
@@ -2520,20 +2549,20 @@ const Wi = {
|
|
|
2520
2549
|
}
|
|
2521
2550
|
},
|
|
2522
2551
|
setup(e) {
|
|
2523
|
-
const n = e, t = ut(), { i18n: { t: r } } = ue.useI18n(), o = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), a =
|
|
2524
|
-
return
|
|
2552
|
+
const n = e, t = ut(), { i18n: { t: r } } = ue.useI18n(), o = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), a = E(""), i = E("");
|
|
2553
|
+
return xe(() => n.format, (s) => {
|
|
2525
2554
|
s === "json" ? a.value = JSON.stringify(n.record, null, 2) : s === "yaml" && (i.value = Ji.dump(n.record));
|
|
2526
2555
|
}, { immediate: !0 }), (s, l) => {
|
|
2527
2556
|
const c = q("KCodeBlock");
|
|
2528
|
-
return g(),
|
|
2529
|
-
e.format === "structured" ? (g(),
|
|
2530
|
-
(g(!0),
|
|
2557
|
+
return g(), M(ve, null, [
|
|
2558
|
+
e.format === "structured" ? (g(), M("div", Wi, [
|
|
2559
|
+
(g(!0), M(ve, null, ye(e.propListTypes, (d) => (g(), M("div", {
|
|
2531
2560
|
key: `config-card-details-${d}-props`,
|
|
2532
2561
|
class: Fe(`config-card-details-${d}-props`),
|
|
2533
2562
|
"data-testid": `config-card-details-${d}-props`
|
|
2534
2563
|
}, [
|
|
2535
|
-
d !== "basic" ? (g(),
|
|
2536
|
-
(g(!0),
|
|
2564
|
+
d !== "basic" ? (g(), M("div", Zi, K(d === "advanced" ? y(r)("baseConfigCard.sections.advanced") : y(r)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
2565
|
+
(g(!0), M(ve, null, ye(e.propertyCollections[d], (u) => (g(), V(xt, {
|
|
2537
2566
|
key: u.key,
|
|
2538
2567
|
item: u
|
|
2539
2568
|
}, Te({
|
|
@@ -2558,7 +2587,7 @@ const Wi = {
|
|
|
2558
2587
|
]), 1032, ["item"]))), 128))
|
|
2559
2588
|
], 10, Yi))), 128))
|
|
2560
2589
|
])) : G("", !0),
|
|
2561
|
-
e.format === "json" ? (g(),
|
|
2590
|
+
e.format === "json" ? (g(), M("div", Qi, [
|
|
2562
2591
|
F(c, {
|
|
2563
2592
|
id: "config-card-codeblock",
|
|
2564
2593
|
code: a.value,
|
|
@@ -2566,7 +2595,7 @@ const Wi = {
|
|
|
2566
2595
|
theme: "dark"
|
|
2567
2596
|
}, null, 8, ["code"])
|
|
2568
2597
|
])) : G("", !0),
|
|
2569
|
-
e.format === "yaml" ? (g(),
|
|
2598
|
+
e.format === "yaml" ? (g(), M("div", Xi, [
|
|
2570
2599
|
F(c, {
|
|
2571
2600
|
id: "config-card-codeblock",
|
|
2572
2601
|
code: i.value,
|
|
@@ -2640,7 +2669,7 @@ const Wi = {
|
|
|
2640
2669
|
}
|
|
2641
2670
|
},
|
|
2642
2671
|
setup(e) {
|
|
2643
|
-
const n = e, t =
|
|
2672
|
+
const n = e, t = j(() => {
|
|
2644
2673
|
if (typeof n.size == "number" && n.size > 0)
|
|
2645
2674
|
return `${n.size}px`;
|
|
2646
2675
|
if (typeof n.size == "string") {
|
|
@@ -2649,7 +2678,7 @@ const Wi = {
|
|
|
2649
2678
|
return `${a}px`;
|
|
2650
2679
|
}
|
|
2651
2680
|
return ln;
|
|
2652
|
-
}), r =
|
|
2681
|
+
}), r = j(() => ({
|
|
2653
2682
|
boxSizing: "border-box",
|
|
2654
2683
|
color: n.color,
|
|
2655
2684
|
display: n.display,
|
|
@@ -2664,7 +2693,7 @@ const Wi = {
|
|
|
2664
2693
|
style: mr(r.value)
|
|
2665
2694
|
}, {
|
|
2666
2695
|
default: h(() => [
|
|
2667
|
-
(g(),
|
|
2696
|
+
(g(), M("svg", {
|
|
2668
2697
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2669
2698
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2670
2699
|
fill: "none",
|
|
@@ -2674,7 +2703,7 @@ const Wi = {
|
|
|
2674
2703
|
width: "100%",
|
|
2675
2704
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2676
2705
|
}, [
|
|
2677
|
-
e.title ? (g(),
|
|
2706
|
+
e.title ? (g(), M("title", as, K(e.title), 1)) : G("", !0),
|
|
2678
2707
|
is
|
|
2679
2708
|
], 8, os))
|
|
2680
2709
|
]),
|
|
@@ -2781,7 +2810,7 @@ const Wi = {
|
|
|
2781
2810
|
label: "YAML",
|
|
2782
2811
|
value: "yaml"
|
|
2783
2812
|
}
|
|
2784
|
-
], d =
|
|
2813
|
+
], d = E("structured"), u = (w) => {
|
|
2785
2814
|
d.value = w == null ? void 0 : w.value;
|
|
2786
2815
|
}, m = {
|
|
2787
2816
|
id: {
|
|
@@ -2817,15 +2846,15 @@ const Wi = {
|
|
|
2817
2846
|
// the last property displayed
|
|
2818
2847
|
section: be.Basic
|
|
2819
2848
|
}
|
|
2820
|
-
}, f =
|
|
2849
|
+
}, f = E(!1), I = E(!1), v = E(""), p = E(), S = j(() => {
|
|
2821
2850
|
var w, N, B;
|
|
2822
2851
|
if (!p.value)
|
|
2823
2852
|
return [];
|
|
2824
|
-
const C = [],
|
|
2853
|
+
const C = [], x = Object.keys(p.value).length;
|
|
2825
2854
|
for (const T in p.value) {
|
|
2826
2855
|
const P = (N = (w = r.configSchema) == null ? void 0 : w[T]) == null ? void 0 : N.order, J = (B = m[T]) == null ? void 0 : B.order;
|
|
2827
|
-
let Q =
|
|
2828
|
-
(J || J === 0) && (Q = J === -1 ?
|
|
2856
|
+
let Q = x;
|
|
2857
|
+
(J || J === 0) && (Q = J === -1 ? x + 1 : J), P && (Q = P === -1 ? x + 1 : P), C.push([T, Q]);
|
|
2829
2858
|
}
|
|
2830
2859
|
return C.sort(function(T, P) {
|
|
2831
2860
|
return T[1] - P[1];
|
|
@@ -2842,19 +2871,19 @@ const Wi = {
|
|
|
2842
2871
|
section: ee.section ?? ((ie == null ? void 0 : ie.section) || be.Advanced)
|
|
2843
2872
|
};
|
|
2844
2873
|
}).filter((T) => !T.hidden && T.key !== r.pluginConfigKey);
|
|
2845
|
-
}), b =
|
|
2874
|
+
}), b = j(() => {
|
|
2846
2875
|
var w, N;
|
|
2847
2876
|
if (!p.value || !r.pluginConfigKey)
|
|
2848
2877
|
return [];
|
|
2849
|
-
const B = p.value[r.pluginConfigKey] || {}, C = Object.keys(B).length,
|
|
2878
|
+
const B = p.value[r.pluginConfigKey] || {}, C = Object.keys(B).length, x = [];
|
|
2850
2879
|
for (const T in B) {
|
|
2851
2880
|
const P = (N = (w = r.pluginConfigSchema) == null ? void 0 : w[T]) == null ? void 0 : N.order, J = B[T];
|
|
2852
2881
|
let Q = J != null && J !== "" ? C - 1 : C;
|
|
2853
|
-
P && (Q = P === -1 ? C + 1 : P),
|
|
2882
|
+
P && (Q = P === -1 ? C + 1 : P), x.push([T, Q]);
|
|
2854
2883
|
}
|
|
2855
|
-
return
|
|
2884
|
+
return x.sort(function(T, P) {
|
|
2856
2885
|
return T[1] - P[1];
|
|
2857
|
-
}),
|
|
2886
|
+
}), x.map((T) => {
|
|
2858
2887
|
var P;
|
|
2859
2888
|
const J = T[0], Q = B[J], X = ((P = r.pluginConfigSchema) == null ? void 0 : P[J]) || {};
|
|
2860
2889
|
return {
|
|
@@ -2867,24 +2896,24 @@ const Wi = {
|
|
|
2867
2896
|
section: be.Plugin
|
|
2868
2897
|
};
|
|
2869
2898
|
}).filter((T) => !T.hidden);
|
|
2870
|
-
}), k =
|
|
2899
|
+
}), k = j(() => {
|
|
2871
2900
|
var w, N, B, C;
|
|
2872
2901
|
return {
|
|
2873
|
-
basic: (w =
|
|
2874
|
-
advanced: (N =
|
|
2875
|
-
plugin: (C = b.value) == null ? void 0 : C.concat((B =
|
|
2902
|
+
basic: (w = S.value) == null ? void 0 : w.filter((x) => x.section === be.Basic),
|
|
2903
|
+
advanced: (N = S.value) == null ? void 0 : N.filter((x) => x.section === be.Advanced),
|
|
2904
|
+
plugin: (C = b.value) == null ? void 0 : C.concat((B = S.value) == null ? void 0 : B.filter((x) => x.section === be.Plugin))
|
|
2876
2905
|
};
|
|
2877
|
-
}),
|
|
2906
|
+
}), A = j(() => {
|
|
2878
2907
|
const w = [];
|
|
2879
2908
|
return k.value.basic.length && w.push("basic"), k.value.advanced.length && w.push("advanced"), k.value.plugin.length && w.push("plugin"), w;
|
|
2880
|
-
}), ne = (w) => !!(w.tooltip || o[`${w.key}-label-tooltip`]), pe =
|
|
2909
|
+
}), ne = (w) => !!(w.tooltip || o[`${w.key}-label-tooltip`]), pe = j(() => {
|
|
2881
2910
|
var w, N;
|
|
2882
2911
|
let B = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2883
2912
|
return r.config.app === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((w = r.config) == null ? void 0 : w.controlPlaneId) || "") : r.config.app === "kongManager" && (B = B.replace(/\/{workspace}/gi, (N = r.config) != null && N.workspace ? `/${r.config.workspace}` : "")), B = B.replace(/{id}/gi, r.config.entityId), B;
|
|
2884
2913
|
}), z = (w) => {
|
|
2885
2914
|
p.value && w(JSON.stringify(p.value)) ? n("copy:success", p.value) : n("copy:error");
|
|
2886
2915
|
};
|
|
2887
|
-
return
|
|
2916
|
+
return xe(f, (w) => {
|
|
2888
2917
|
n("loading", w);
|
|
2889
2918
|
}, { immediate: !0 }), Qe(async () => {
|
|
2890
2919
|
I.value = !1, f.value = !0;
|
|
@@ -2907,7 +2936,7 @@ const Wi = {
|
|
|
2907
2936
|
f.value = !1;
|
|
2908
2937
|
}
|
|
2909
2938
|
}), (w, N) => {
|
|
2910
|
-
const B = q("KLabel"), C = q("KSelect"),
|
|
2939
|
+
const B = q("KLabel"), C = q("KSelect"), x = q("KButton"), T = q("KClipboardProvider"), P = q("KSkeleton"), J = q("KEmptyState"), Q = q("KCard");
|
|
2911
2940
|
return g(), V(Q, { class: "kong-ui-entity-base-config-card" }, Te({
|
|
2912
2941
|
actions: h(() => [
|
|
2913
2942
|
R("div", cs, [
|
|
@@ -2929,7 +2958,7 @@ const Wi = {
|
|
|
2929
2958
|
items: c,
|
|
2930
2959
|
onChange: u
|
|
2931
2960
|
})) : G("", !0),
|
|
2932
|
-
r.config.jsonYamlEnabled && e.configCardDoc ? (g(), V(
|
|
2961
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (g(), V(x, {
|
|
2933
2962
|
key: 2,
|
|
2934
2963
|
appearance: "btn-link",
|
|
2935
2964
|
class: "book-icon",
|
|
@@ -2948,7 +2977,7 @@ const Wi = {
|
|
|
2948
2977
|
})) : G("", !0),
|
|
2949
2978
|
e.config.jsonYamlEnabled ? G("", !0) : (g(), V(T, { key: 3 }, {
|
|
2950
2979
|
default: h(({ copyToClipboard: X }) => [
|
|
2951
|
-
!f.value && !I.value ? (g(), V(
|
|
2980
|
+
!f.value && !I.value ? (g(), V(x, {
|
|
2952
2981
|
key: 0,
|
|
2953
2982
|
appearance: "btn-link",
|
|
2954
2983
|
"data-testid": "json-copy-button",
|
|
@@ -2980,10 +3009,10 @@ const Wi = {
|
|
|
2980
3009
|
]),
|
|
2981
3010
|
_: 1
|
|
2982
3011
|
})) : G("", !0),
|
|
2983
|
-
e.config.jsonYamlEnabled ? (g(),
|
|
3012
|
+
e.config.jsonYamlEnabled ? (g(), M("div", ps, [
|
|
2984
3013
|
F(ts, {
|
|
2985
3014
|
format: d.value,
|
|
2986
|
-
"prop-list-types":
|
|
3015
|
+
"prop-list-types": A.value,
|
|
2987
3016
|
"property-collections": k.value,
|
|
2988
3017
|
record: p.value
|
|
2989
3018
|
}, Te({ _: 2 }, [
|
|
@@ -2997,14 +3026,14 @@ const Wi = {
|
|
|
2997
3026
|
])
|
|
2998
3027
|
}))
|
|
2999
3028
|
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
3000
|
-
])) : (g(),
|
|
3001
|
-
(g(!0),
|
|
3029
|
+
])) : (g(), M("div", fs, [
|
|
3030
|
+
(g(!0), M(ve, null, ye(A.value, (X) => (g(), M("div", {
|
|
3002
3031
|
key: `config-card-details-${X}-props`,
|
|
3003
3032
|
class: Fe(`config-card-details-${X}-props`),
|
|
3004
3033
|
"data-testid": `config-card-details-${X}-props`
|
|
3005
3034
|
}, [
|
|
3006
|
-
X !== "basic" ? (g(),
|
|
3007
|
-
(g(!0),
|
|
3035
|
+
X !== "basic" ? (g(), M("div", gs, K(X === "advanced" ? y(a)("baseConfigCard.sections.advanced") : y(a)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
3036
|
+
(g(!0), M(ve, null, ye(k.value[X], (ee) => (g(), V(xt, {
|
|
3008
3037
|
key: ee.key,
|
|
3009
3038
|
item: ee
|
|
3010
3039
|
}, Te({
|
|
@@ -3101,12 +3130,12 @@ const Wi = {
|
|
|
3101
3130
|
var t;
|
|
3102
3131
|
const r = e, o = wt(), { i18n: { t: a } } = ue.useI18n(), { getMessageFromError: i } = ue.useErrors(), { axiosInstance: s } = ue.useAxios({
|
|
3103
3132
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3104
|
-
}), l =
|
|
3105
|
-
var p,
|
|
3133
|
+
}), l = E(!1), c = E(!1), d = E(""), u = j(() => r.canSubmit === !1 || r.isReadonly), m = j(() => {
|
|
3134
|
+
var p, S;
|
|
3106
3135
|
if (!r.editId)
|
|
3107
3136
|
return "";
|
|
3108
3137
|
let b = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3109
|
-
return r.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (
|
|
3138
|
+
return r.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (S = r.config) != null && S.workspace ? `/${r.config.workspace}` : "")), b = b.replace(/{id}/gi, r.editId), b;
|
|
3110
3139
|
}), f = () => {
|
|
3111
3140
|
r.config.cancelRoute ? o.push(r.config.cancelRoute) : I();
|
|
3112
3141
|
}, I = () => {
|
|
@@ -3114,7 +3143,7 @@ const Wi = {
|
|
|
3114
3143
|
}, v = () => {
|
|
3115
3144
|
u.value || n("submit");
|
|
3116
3145
|
};
|
|
3117
|
-
return
|
|
3146
|
+
return xe(() => l.value, (p) => {
|
|
3118
3147
|
n("loading", p);
|
|
3119
3148
|
}, { immediate: !0 }), Qe(async () => {
|
|
3120
3149
|
if (r.editId)
|
|
@@ -3123,13 +3152,13 @@ const Wi = {
|
|
|
3123
3152
|
const { data: p } = await s.get(m.value);
|
|
3124
3153
|
n("fetch:success", p);
|
|
3125
3154
|
} catch (p) {
|
|
3126
|
-
const
|
|
3127
|
-
d.value =
|
|
3155
|
+
const S = i(p);
|
|
3156
|
+
d.value = S.startsWith("code") ? a("baseForm.errors.edit") : S, c.value = !0, n("fetch:error", p);
|
|
3128
3157
|
} finally {
|
|
3129
3158
|
l.value = !1;
|
|
3130
3159
|
}
|
|
3131
|
-
}), (p,
|
|
3132
|
-
const b = q("KSkeleton"), k = q("KEmptyState"),
|
|
3160
|
+
}), (p, S) => {
|
|
3161
|
+
const b = q("KSkeleton"), k = q("KEmptyState"), A = q("KAlert"), ne = q("KButton"), pe = q("KCard");
|
|
3133
3162
|
return g(), V(pe, { class: "kong-ui-entity-base-form" }, {
|
|
3134
3163
|
body: h(() => [
|
|
3135
3164
|
l.value ? (g(), V(b, {
|
|
@@ -3146,14 +3175,14 @@ const Wi = {
|
|
|
3146
3175
|
R("h3", null, K(d.value), 1)
|
|
3147
3176
|
]),
|
|
3148
3177
|
_: 1
|
|
3149
|
-
}, 8, ["cta-text"])) : (g(),
|
|
3178
|
+
}, 8, ["cta-text"])) : (g(), M("form", {
|
|
3150
3179
|
key: 2,
|
|
3151
3180
|
"data-testid": "form-content",
|
|
3152
3181
|
onReset: rt(I, ["prevent"]),
|
|
3153
3182
|
onSubmit: rt(v, ["prevent"])
|
|
3154
3183
|
}, [
|
|
3155
3184
|
Y(p.$slots, "default", {}, void 0, !0),
|
|
3156
|
-
e.errorMessage ? (g(), V(
|
|
3185
|
+
e.errorMessage ? (g(), V(A, {
|
|
3157
3186
|
key: 0,
|
|
3158
3187
|
"alert-message": e.errorMessage,
|
|
3159
3188
|
appearance: "danger",
|
|
@@ -3207,24 +3236,24 @@ const Wi = {
|
|
|
3207
3236
|
}
|
|
3208
3237
|
},
|
|
3209
3238
|
setup(e) {
|
|
3210
|
-
const n = e, t =
|
|
3239
|
+
const n = e, t = j(() => {
|
|
3211
3240
|
var v;
|
|
3212
3241
|
return ((v = n.rowEl) == null ? void 0 : v.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3213
|
-
}), r =
|
|
3242
|
+
}), r = j(() => {
|
|
3214
3243
|
var v;
|
|
3215
3244
|
return ((v = t.value) == null ? void 0 : v.querySelector('[data-testid="first-col"]')) || null;
|
|
3216
|
-
}), o =
|
|
3245
|
+
}), o = j(() => {
|
|
3217
3246
|
var v, p;
|
|
3218
|
-
const
|
|
3219
|
-
return
|
|
3247
|
+
const S = (v = n.rowEl) == null ? void 0 : v.querySelectorAll("td");
|
|
3248
|
+
return S ? ((p = S[0]) == null ? void 0 : p.getAttribute("data-testid")) === n.keyName : !1;
|
|
3220
3249
|
});
|
|
3221
3250
|
let a;
|
|
3222
3251
|
const i = () => {
|
|
3223
3252
|
a && (a.disconnect(), a = void 0);
|
|
3224
3253
|
}, s = () => {
|
|
3225
|
-
var v, p,
|
|
3226
|
-
c.value = ((v = r.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((
|
|
3227
|
-
}, l =
|
|
3254
|
+
var v, p, S;
|
|
3255
|
+
c.value = ((v = r.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((S = l.value) == null ? void 0 : S.innerText) || "";
|
|
3256
|
+
}, l = E({}), c = E(0), d = E(0), u = E(""), m = j(() => [r.value, t.value]), f = xe(
|
|
3228
3257
|
m,
|
|
3229
3258
|
(v) => {
|
|
3230
3259
|
if (o.value && (i(), "ResizeObserver" in window && window)) {
|
|
@@ -3238,20 +3267,20 @@ const Wi = {
|
|
|
3238
3267
|
}
|
|
3239
3268
|
},
|
|
3240
3269
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3241
|
-
), I =
|
|
3270
|
+
), I = j(() => o.value ? c.value > d.value : !1);
|
|
3242
3271
|
return pr(() => {
|
|
3243
3272
|
s();
|
|
3244
3273
|
}), fr(() => {
|
|
3245
3274
|
f();
|
|
3246
3275
|
}), (v, p) => {
|
|
3247
|
-
const
|
|
3248
|
-
return g(),
|
|
3276
|
+
const S = q("KTooltip");
|
|
3277
|
+
return g(), M("span", {
|
|
3249
3278
|
ref_key: "contentRef",
|
|
3250
3279
|
ref: l,
|
|
3251
3280
|
class: "content-wrapper"
|
|
3252
3281
|
}, [
|
|
3253
|
-
o.value ? (g(),
|
|
3254
|
-
F(
|
|
3282
|
+
o.value ? (g(), M("span", _s, [
|
|
3283
|
+
F(S, {
|
|
3255
3284
|
label: I.value ? u.value : "",
|
|
3256
3285
|
"max-width": "300",
|
|
3257
3286
|
placement: "bottomStart"
|
|
@@ -3265,10 +3294,10 @@ const Wi = {
|
|
|
3265
3294
|
], 512);
|
|
3266
3295
|
};
|
|
3267
3296
|
}
|
|
3268
|
-
}), Is = /* @__PURE__ */ Ce(ws, [["__scopeId", "data-v-e42a20c9"]]),
|
|
3297
|
+
}), Is = /* @__PURE__ */ Ce(ws, [["__scopeId", "data-v-e42a20c9"]]), As = { class: "toolbar-container" }, Ss = {
|
|
3269
3298
|
key: 0,
|
|
3270
3299
|
class: "toolbar-button-container"
|
|
3271
|
-
},
|
|
3300
|
+
}, xs = ["data-testid"], Ts = /* @__PURE__ */ ae({
|
|
3272
3301
|
__name: "EntityBaseTable",
|
|
3273
3302
|
props: {
|
|
3274
3303
|
// table header configuration
|
|
@@ -3377,13 +3406,13 @@ const Wi = {
|
|
|
3377
3406
|
},
|
|
3378
3407
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3379
3408
|
setup(e, { emit: n }) {
|
|
3380
|
-
const t = e, { i18n: { t: r } } = ue.useI18n(), o =
|
|
3409
|
+
const t = e, { i18n: { t: r } } = ue.useI18n(), o = j(() => t.cacheIdentifier || t.preferencesStorageKey), a = (k) => k.hasData || !!t.query, i = j(() => {
|
|
3381
3410
|
const k = [];
|
|
3382
|
-
return Object.keys(t.tableHeaders).forEach((
|
|
3383
|
-
const ne = t.tableHeaders[
|
|
3411
|
+
return Object.keys(t.tableHeaders).forEach((A) => {
|
|
3412
|
+
const ne = t.tableHeaders[A];
|
|
3384
3413
|
k.push({
|
|
3385
|
-
label: ne.label ??
|
|
3386
|
-
key:
|
|
3414
|
+
label: ne.label ?? A,
|
|
3415
|
+
key: A,
|
|
3387
3416
|
sortable: ne.sortable ?? !1
|
|
3388
3417
|
});
|
|
3389
3418
|
}), t.enableEntityActions && k.push({
|
|
@@ -3394,28 +3423,28 @@ const Wi = {
|
|
|
3394
3423
|
"data-rowid": k.id,
|
|
3395
3424
|
"data-testid": k.name,
|
|
3396
3425
|
...t.rowAttributes(k)
|
|
3397
|
-
}), l =
|
|
3398
|
-
var
|
|
3399
|
-
return (
|
|
3426
|
+
}), l = E({}), c = (k) => {
|
|
3427
|
+
var A;
|
|
3428
|
+
return (A = l.value) == null ? void 0 : A.$el.querySelector(`[data-rowid="${k.id}"]`);
|
|
3400
3429
|
}, d = (k) => {
|
|
3401
|
-
const
|
|
3430
|
+
const A = {
|
|
3402
3431
|
"data-testid": k.headerKey,
|
|
3403
3432
|
...t.cellAttributes(k)
|
|
3404
3433
|
};
|
|
3405
|
-
return k.colIndex === 0 && (
|
|
3434
|
+
return k.colIndex === 0 && (A.style = {
|
|
3406
3435
|
maxWidth: "250px",
|
|
3407
3436
|
overflowX: "hidden",
|
|
3408
3437
|
textOverflow: "ellipsis"
|
|
3409
|
-
}),
|
|
3438
|
+
}), A;
|
|
3410
3439
|
}, u = () => {
|
|
3411
3440
|
n("empty-state-cta-clicked"), m();
|
|
3412
3441
|
}, m = () => {
|
|
3413
3442
|
n("clear-search-input");
|
|
3414
|
-
}, f =
|
|
3415
|
-
n("click:row",
|
|
3443
|
+
}, f = j(() => t.disableRowClick ? void 0 : (k, A) => {
|
|
3444
|
+
n("click:row", A);
|
|
3416
3445
|
}), I = (k) => {
|
|
3417
3446
|
n("sort", k);
|
|
3418
|
-
}, { setTablePreferences: v, getTablePreferences: p } =
|
|
3447
|
+
}, { setTablePreferences: v, getTablePreferences: p } = Sr(), S = j(() => {
|
|
3419
3448
|
const k = p(t.preferencesStorageKey);
|
|
3420
3449
|
return {
|
|
3421
3450
|
...t.initialFetcherParams,
|
|
@@ -3424,7 +3453,7 @@ const Wi = {
|
|
|
3424
3453
|
}), b = (k) => {
|
|
3425
3454
|
t.preferencesStorageKey && v(t.preferencesStorageKey, k);
|
|
3426
3455
|
};
|
|
3427
|
-
return (k,
|
|
3456
|
+
return (k, A) => {
|
|
3428
3457
|
const ne = q("KIcon"), pe = q("KButton"), z = q("KDropdownMenu"), w = q("KTable"), N = q("KCard");
|
|
3429
3458
|
return g(), V(N, {
|
|
3430
3459
|
class: "kong-ui-entity-base-table",
|
|
@@ -3452,27 +3481,27 @@ const Wi = {
|
|
|
3452
3481
|
"has-error": !!e.errorMessage,
|
|
3453
3482
|
headers: i.value,
|
|
3454
3483
|
"hide-pagination-when-optional": "",
|
|
3455
|
-
"initial-fetcher-params":
|
|
3484
|
+
"initial-fetcher-params": S.value,
|
|
3456
3485
|
"is-loading": e.isLoading,
|
|
3457
3486
|
"pagination-type": e.paginationType,
|
|
3458
3487
|
"row-attrs": s,
|
|
3459
3488
|
"search-input": e.query,
|
|
3460
3489
|
onKtableEmptyStateCtaClicked: u,
|
|
3461
3490
|
"onRow:click": f.value,
|
|
3462
|
-
onSort:
|
|
3491
|
+
onSort: A[0] || (A[0] = (B) => I(B)),
|
|
3463
3492
|
"onUpdate:tablePreferences": b
|
|
3464
3493
|
}, Te({
|
|
3465
3494
|
toolbar: h(({ state: B }) => [
|
|
3466
|
-
et(R("div",
|
|
3495
|
+
et(R("div", As, [
|
|
3467
3496
|
Y(k.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3468
|
-
k.$slots["toolbar-button"] ? (g(),
|
|
3497
|
+
k.$slots["toolbar-button"] ? (g(), M("div", Ss, [
|
|
3469
3498
|
Y(k.$slots, "toolbar-button", {}, void 0, !0)
|
|
3470
3499
|
])) : G("", !0)
|
|
3471
3500
|
], 512), [
|
|
3472
3501
|
[tt, a(B)]
|
|
3473
3502
|
])
|
|
3474
3503
|
]),
|
|
3475
|
-
actions: h(({ row: B, rowKey: C, rowValue:
|
|
3504
|
+
actions: h(({ row: B, rowKey: C, rowValue: x }) => [
|
|
3476
3505
|
R("div", {
|
|
3477
3506
|
class: "actions-container",
|
|
3478
3507
|
"data-testid": B.name
|
|
@@ -3485,7 +3514,7 @@ const Wi = {
|
|
|
3485
3514
|
Y(k.$slots, "actions", {
|
|
3486
3515
|
row: B,
|
|
3487
3516
|
rowKey: C,
|
|
3488
|
-
rowValue:
|
|
3517
|
+
rowValue: x
|
|
3489
3518
|
}, void 0, !0)
|
|
3490
3519
|
]),
|
|
3491
3520
|
default: h(() => [
|
|
@@ -3506,20 +3535,20 @@ const Wi = {
|
|
|
3506
3535
|
]),
|
|
3507
3536
|
_: 2
|
|
3508
3537
|
}, 1032, ["width"])
|
|
3509
|
-
], 8,
|
|
3538
|
+
], 8, xs)
|
|
3510
3539
|
]),
|
|
3511
3540
|
_: 2
|
|
3512
3541
|
}, [
|
|
3513
3542
|
ye(e.tableHeaders, (B, C) => ({
|
|
3514
3543
|
name: C,
|
|
3515
|
-
fn: h(({ row:
|
|
3544
|
+
fn: h(({ row: x, rowKey: T, rowValue: P }) => [
|
|
3516
3545
|
F(Is, {
|
|
3517
3546
|
"key-name": String(C),
|
|
3518
|
-
"row-el": c(
|
|
3547
|
+
"row-el": c(x)
|
|
3519
3548
|
}, {
|
|
3520
3549
|
default: h(() => [
|
|
3521
3550
|
Y(k.$slots, C, {
|
|
3522
|
-
row:
|
|
3551
|
+
row: x,
|
|
3523
3552
|
rowKey: T,
|
|
3524
3553
|
rowValue: P
|
|
3525
3554
|
}, () => [
|
|
@@ -3536,13 +3565,13 @@ const Wi = {
|
|
|
3536
3565
|
}, 8, ["title"]);
|
|
3537
3566
|
};
|
|
3538
3567
|
}
|
|
3539
|
-
}), $s = /* @__PURE__ */ Ce(Ts, [["__scopeId", "data-v-6bf92df6"]]),
|
|
3568
|
+
}), $s = /* @__PURE__ */ Ce(Ts, [["__scopeId", "data-v-6bf92df6"]]), js = {
|
|
3540
3569
|
key: 0,
|
|
3541
3570
|
class: "kong-ui-entity-delete-error"
|
|
3542
|
-
},
|
|
3571
|
+
}, Ms = {
|
|
3543
3572
|
key: 1,
|
|
3544
3573
|
class: "description"
|
|
3545
|
-
},
|
|
3574
|
+
}, Os = /* @__PURE__ */ ae({
|
|
3546
3575
|
__name: "EntityDeleteModal",
|
|
3547
3576
|
props: {
|
|
3548
3577
|
visible: {
|
|
@@ -3581,7 +3610,7 @@ const Wi = {
|
|
|
3581
3610
|
},
|
|
3582
3611
|
emits: ["cancel", "proceed"],
|
|
3583
3612
|
setup(e, { emit: n }) {
|
|
3584
|
-
const t = e, { i18nT: r } = ue.useI18n(), o =
|
|
3613
|
+
const t = e, { i18nT: r } = ue.useI18n(), o = j(() => t.needConfirm ? t.entityName : ""), a = () => {
|
|
3585
3614
|
n("cancel");
|
|
3586
3615
|
}, i = () => {
|
|
3587
3616
|
n("proceed");
|
|
@@ -3600,7 +3629,7 @@ const Wi = {
|
|
|
3600
3629
|
onProceed: i
|
|
3601
3630
|
}, {
|
|
3602
3631
|
"body-content": h(() => [
|
|
3603
|
-
e.error ? (g(),
|
|
3632
|
+
e.error ? (g(), M("div", js, [
|
|
3604
3633
|
F(c, { appearance: "danger" }, {
|
|
3605
3634
|
alertMessage: h(() => [
|
|
3606
3635
|
Z(K(e.error), 1)
|
|
@@ -3626,7 +3655,7 @@ const Wi = {
|
|
|
3626
3655
|
key: "0"
|
|
3627
3656
|
} : void 0
|
|
3628
3657
|
]), 1032, ["keypath"]),
|
|
3629
|
-
t.description || s.$slots.description ? (g(),
|
|
3658
|
+
t.description || s.$slots.description ? (g(), M("div", Ms, [
|
|
3630
3659
|
Y(s.$slots, "description", {}, () => [
|
|
3631
3660
|
R("p", null, K(t.description), 1)
|
|
3632
3661
|
], !0)
|
|
@@ -3636,7 +3665,7 @@ const Wi = {
|
|
|
3636
3665
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3637
3666
|
};
|
|
3638
3667
|
}
|
|
3639
|
-
}),
|
|
3668
|
+
}), Es = /* @__PURE__ */ Ce(Os, [["__scopeId", "data-v-1c9a2a07"]]), Ks = {
|
|
3640
3669
|
fill: "none",
|
|
3641
3670
|
height: "20",
|
|
3642
3671
|
viewBox: "0 0 20 20",
|
|
@@ -3659,7 +3688,7 @@ const Wi = {
|
|
|
3659
3688
|
}
|
|
3660
3689
|
},
|
|
3661
3690
|
setup(e) {
|
|
3662
|
-
return (n, t) => (g(),
|
|
3691
|
+
return (n, t) => (g(), M("svg", Ks, [
|
|
3663
3692
|
R("mask", Fs, [
|
|
3664
3693
|
R("rect", {
|
|
3665
3694
|
fill: e.color,
|
|
@@ -3698,21 +3727,21 @@ const Wi = {
|
|
|
3698
3727
|
},
|
|
3699
3728
|
emits: ["update:modelValue"],
|
|
3700
3729
|
setup(e, { emit: n }) {
|
|
3701
|
-
const t = e, { i18n: { t: r } } = ue.useI18n(), o =
|
|
3730
|
+
const t = e, { i18n: { t: r } } = ue.useI18n(), o = E(!1), a = E({}), i = j(() => {
|
|
3702
3731
|
const p = [];
|
|
3703
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
3704
|
-
|
|
3732
|
+
return new URLSearchParams(t.modelValue).forEach((S, b) => {
|
|
3733
|
+
S !== "" && p.push(b);
|
|
3705
3734
|
}), p;
|
|
3706
|
-
}), s =
|
|
3735
|
+
}), s = j(() => {
|
|
3707
3736
|
const p = t.config.fields;
|
|
3708
|
-
return Object.keys(p).filter((
|
|
3709
|
-
label: p[
|
|
3710
|
-
value:
|
|
3737
|
+
return Object.keys(p).filter((S) => p[S].searchable).map((S) => ({
|
|
3738
|
+
label: p[S].label || S,
|
|
3739
|
+
value: S
|
|
3711
3740
|
}));
|
|
3712
3741
|
});
|
|
3713
|
-
|
|
3714
|
-
a.value = {}, new URLSearchParams(p).forEach((
|
|
3715
|
-
a.value[b] =
|
|
3742
|
+
xe(() => t.modelValue, (p) => {
|
|
3743
|
+
a.value = {}, new URLSearchParams(p).forEach((S, b) => {
|
|
3744
|
+
a.value[b] = S;
|
|
3716
3745
|
});
|
|
3717
3746
|
});
|
|
3718
3747
|
const l = () => {
|
|
@@ -3720,14 +3749,14 @@ const Wi = {
|
|
|
3720
3749
|
}, c = (p) => {
|
|
3721
3750
|
n("update:modelValue", p);
|
|
3722
3751
|
}, d = (p) => `filter-${p}`, u = (p) => {
|
|
3723
|
-
var
|
|
3724
|
-
return (((b = (
|
|
3752
|
+
var S, b;
|
|
3753
|
+
return (((b = (S = t.config.schema) == null ? void 0 : S[p]) == null ? void 0 : b.values) ?? []).map((k) => ({
|
|
3725
3754
|
value: k,
|
|
3726
3755
|
label: k
|
|
3727
3756
|
}));
|
|
3728
3757
|
}, m = (p) => {
|
|
3729
|
-
var
|
|
3730
|
-
return ((b = (
|
|
3758
|
+
var S, b;
|
|
3759
|
+
return ((b = (S = t.config.schema) == null ? void 0 : S[p]) == null ? void 0 : b.type) ?? "text";
|
|
3731
3760
|
}, f = (p) => {
|
|
3732
3761
|
a.value = {
|
|
3733
3762
|
...a.value,
|
|
@@ -3736,11 +3765,11 @@ const Wi = {
|
|
|
3736
3765
|
}, I = () => {
|
|
3737
3766
|
a.value = {}, v(!0);
|
|
3738
3767
|
}, v = (p = !1) => {
|
|
3739
|
-
const
|
|
3740
|
-
p && (o.value = !1), n("update:modelValue", new URLSearchParams(
|
|
3768
|
+
const S = Object.keys(a.value).reduce((b, k) => (a.value[k] && (b[k] = `${a.value[k]}`), b), {});
|
|
3769
|
+
p && (o.value = !1), n("update:modelValue", new URLSearchParams(S).toString());
|
|
3741
3770
|
};
|
|
3742
|
-
return (p,
|
|
3743
|
-
const b = q("KInput"), k = q("KButton"),
|
|
3771
|
+
return (p, S) => {
|
|
3772
|
+
const b = q("KInput"), k = q("KButton"), A = q("KSelect"), ne = q("KMenuItem"), pe = q("KMenu");
|
|
3744
3773
|
return e.config.isExactMatch ? (g(), V(b, {
|
|
3745
3774
|
key: 0,
|
|
3746
3775
|
autocomplete: "off",
|
|
@@ -3754,7 +3783,7 @@ const Wi = {
|
|
|
3754
3783
|
F(Ls)
|
|
3755
3784
|
]),
|
|
3756
3785
|
_: 1
|
|
3757
|
-
}, 8, ["model-value", "placeholder"])) : (g(),
|
|
3786
|
+
}, 8, ["model-value", "placeholder"])) : (g(), M("div", qs, [
|
|
3758
3787
|
F(k, {
|
|
3759
3788
|
appearance: "btn-link",
|
|
3760
3789
|
"data-testid": "filter-button",
|
|
@@ -3774,7 +3803,7 @@ const Wi = {
|
|
|
3774
3803
|
]),
|
|
3775
3804
|
et(F(pe, { class: "kong-ui-entity-filter-menu" }, {
|
|
3776
3805
|
body: h(() => [
|
|
3777
|
-
(g(!0),
|
|
3806
|
+
(g(!0), M(ve, null, ye(s.value, (z, w) => (g(), V(ne, {
|
|
3778
3807
|
key: z.value,
|
|
3779
3808
|
"data-testid": z.value,
|
|
3780
3809
|
expandable: "",
|
|
@@ -3796,7 +3825,7 @@ const Wi = {
|
|
|
3796
3825
|
class: "menu-item-label",
|
|
3797
3826
|
for: d(z.value)
|
|
3798
3827
|
}, K(y(r)("filter.fieldLabel")), 9, Ds),
|
|
3799
|
-
((B = (N = e.config.schema) == null ? void 0 : N[z.value]) == null ? void 0 : B.type) === "select" ? (g(), V(
|
|
3828
|
+
((B = (N = e.config.schema) == null ? void 0 : N[z.value]) == null ? void 0 : B.type) === "select" ? (g(), V(A, {
|
|
3800
3829
|
key: 0,
|
|
3801
3830
|
id: d(z.value),
|
|
3802
3831
|
modelValue: a.value[z.value],
|
|
@@ -3820,7 +3849,7 @@ const Wi = {
|
|
|
3820
3849
|
appearance: "btn-link",
|
|
3821
3850
|
"data-testid": "apply-filter",
|
|
3822
3851
|
size: "small",
|
|
3823
|
-
onClick:
|
|
3852
|
+
onClick: S[0] || (S[0] = (C) => v(!0))
|
|
3824
3853
|
}, {
|
|
3825
3854
|
default: h(() => [
|
|
3826
3855
|
Z(K(y(r)("filter.applyButtonText")), 1)
|
|
@@ -3881,8 +3910,8 @@ const Wi = {
|
|
|
3881
3910
|
}
|
|
3882
3911
|
},
|
|
3883
3912
|
setup(e) {
|
|
3884
|
-
const n = e, t =
|
|
3885
|
-
return
|
|
3913
|
+
const n = e, t = E(void 0), r = j(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
3914
|
+
return xe(() => n.authFunction, async () => {
|
|
3886
3915
|
t.value = await n.authFunction();
|
|
3887
3916
|
}, { immediate: !0 }), (o, a) => r.value ? Y(o.$slots, "default", {
|
|
3888
3917
|
key: 0,
|
|
@@ -3924,21 +3953,21 @@ const Wi = {
|
|
|
3924
3953
|
},
|
|
3925
3954
|
setup(e) {
|
|
3926
3955
|
const n = ut();
|
|
3927
|
-
return (t, r) => (g(),
|
|
3956
|
+
return (t, r) => (g(), M("fieldset", {
|
|
3928
3957
|
class: Fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
3929
3958
|
}, [
|
|
3930
3959
|
R("div", Js, [
|
|
3931
|
-
e.hideInfoHeader ? G("", !0) : (g(),
|
|
3960
|
+
e.hideInfoHeader ? G("", !0) : (g(), M("div", {
|
|
3932
3961
|
key: 0,
|
|
3933
3962
|
class: Fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
3934
3963
|
}, [
|
|
3935
|
-
e.title ? (g(),
|
|
3936
|
-
e.description || y(n).description ? (g(),
|
|
3964
|
+
e.title ? (g(), M("h4", Ws, K(e.title), 1)) : G("", !0),
|
|
3965
|
+
e.description || y(n).description ? (g(), M("div", Ys, [
|
|
3937
3966
|
Y(t.$slots, "description", {}, () => [
|
|
3938
3967
|
R("p", null, K(e.description), 1)
|
|
3939
3968
|
], !0)
|
|
3940
3969
|
])) : G("", !0),
|
|
3941
|
-
y(n).footer ? (g(),
|
|
3970
|
+
y(n).footer ? (g(), M("div", Zs, [
|
|
3942
3971
|
Y(t.$slots, "footer", {}, void 0, !0)
|
|
3943
3972
|
])) : G("", !0)
|
|
3944
3973
|
], 2)),
|
|
@@ -3948,7 +3977,7 @@ const Wi = {
|
|
|
3948
3977
|
])
|
|
3949
3978
|
], 2));
|
|
3950
3979
|
}
|
|
3951
|
-
}), un = /* @__PURE__ */ Ce(Xs, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Kt, useDeleteUrlBuilder: el, useErrors: tl, useExternalLinkCreator: _l, useFetchUrlBuilder: wl, useFetcher: nl, useDebouncedFilter: ar, useStringHelpers: Il, useHelpers:
|
|
3980
|
+
}), un = /* @__PURE__ */ Ce(Xs, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Kt, useDeleteUrlBuilder: el, useErrors: tl, useExternalLinkCreator: _l, useFetchUrlBuilder: wl, useFetcher: nl, useDebouncedFilter: ar, useStringHelpers: Il, useHelpers: Al, useGatewayFeatureSupported: Sl, useTruncationDetector: xl } = ue;
|
|
3952
3981
|
const rl = { class: "add-to-group-form-container" }, ol = { class: "add-to-group-cta-text" }, al = {
|
|
3953
3982
|
key: 0,
|
|
3954
3983
|
class: "kong-ui-entity-add-to-groups-error"
|
|
@@ -3972,7 +4001,7 @@ const rl = { class: "add-to-group-form-container" }, ol = { class: "add-to-group
|
|
|
3972
4001
|
var B;
|
|
3973
4002
|
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } = Kt({
|
|
3974
4003
|
headers: (B = t.config) == null ? void 0 : B.requestHeaders
|
|
3975
|
-
}), a =
|
|
4004
|
+
}), a = E([]), {
|
|
3976
4005
|
debouncedQueryChange: i,
|
|
3977
4006
|
loading: s,
|
|
3978
4007
|
allRecords: l,
|
|
@@ -3987,7 +4016,7 @@ const rl = { class: "add-to-group-form-container" }, ol = { class: "add-to-group
|
|
|
3987
4016
|
fetchedItemsKey: "data",
|
|
3988
4017
|
searchKeys: ["name", "id"]
|
|
3989
4018
|
}
|
|
3990
|
-
), m =
|
|
4019
|
+
), m = j(() => c.value ? r("consumer_groups.errors.general") : ""), f = E(0), I = j(() => l.value === void 0), v = j(() => u.value.map((C) => ({
|
|
3991
4020
|
label: C.name,
|
|
3992
4021
|
value: C.id,
|
|
3993
4022
|
selected: a.value.includes(C.id),
|
|
@@ -3995,53 +4024,53 @@ const rl = { class: "add-to-group-form-container" }, ol = { class: "add-to-group
|
|
|
3995
4024
|
// we need this to determine whether or not to show the description text
|
|
3996
4025
|
}))), p = (C) => {
|
|
3997
4026
|
var T;
|
|
3998
|
-
const
|
|
3999
|
-
return
|
|
4000
|
-
},
|
|
4001
|
-
|
|
4002
|
-
}, b =
|
|
4027
|
+
const x = I.value ? u.value.find((P) => P.id === C) : (T = l.value) == null ? void 0 : T.find((P) => P.id === C);
|
|
4028
|
+
return x ? x.name : C;
|
|
4029
|
+
}, S = () => {
|
|
4030
|
+
A.value = "", b.value = [], w.value = [], n("cancel");
|
|
4031
|
+
}, b = E([]), k = E(!1), A = E(""), ne = async () => {
|
|
4003
4032
|
if (!a.value.length) {
|
|
4004
|
-
|
|
4033
|
+
A.value = "", w.value = [], n("cancel");
|
|
4005
4034
|
return;
|
|
4006
4035
|
}
|
|
4007
|
-
k.value = !0,
|
|
4036
|
+
k.value = !0, A.value = "", b.value = [], w.value = [];
|
|
4008
4037
|
try {
|
|
4009
|
-
const C = a.value.map((P) => z(P)),
|
|
4038
|
+
const C = a.value.map((P) => z(P)), x = await Promise.allSettled(C);
|
|
4010
4039
|
let T = !0;
|
|
4011
|
-
|
|
4040
|
+
x.forEach((P) => {
|
|
4012
4041
|
P.status !== "fulfilled" && (T = !1);
|
|
4013
|
-
}), T ? (b.value = [], w.value = [], n("add:success", a.value), a.value = []) : (b.value.length && n("add:partial-success", b.value), a.value = [], N(
|
|
4042
|
+
}), T ? (b.value = [], w.value = [], n("add:success", a.value), a.value = []) : (b.value.length && n("add:partial-success", b.value), a.value = [], N(x));
|
|
4014
4043
|
} catch {
|
|
4015
|
-
|
|
4044
|
+
A.value = r("consumer_groups.errors.add"), n("error", A.value);
|
|
4016
4045
|
} finally {
|
|
4017
4046
|
k.value = !1;
|
|
4018
4047
|
}
|
|
4019
|
-
}, pe =
|
|
4020
|
-
var
|
|
4048
|
+
}, pe = j(() => {
|
|
4049
|
+
var x, T, P, J;
|
|
4021
4050
|
let C = `${t.config.apiBaseUrl}${$e.list[t.config.app].forConsumer}`;
|
|
4022
|
-
return t.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((
|
|
4051
|
+
return t.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((x = t.config) == null ? void 0 : x.controlPlaneId) || "").replace(/{consumerId}/gi, ((T = t.config) == null ? void 0 : T.consumerId) || "") : t.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (P = t.config) != null && P.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((J = t.config) == null ? void 0 : J.consumerId) || "")), C;
|
|
4023
4052
|
}), z = async (C) => {
|
|
4024
|
-
const
|
|
4053
|
+
const x = {
|
|
4025
4054
|
group: C
|
|
4026
4055
|
};
|
|
4027
4056
|
try {
|
|
4028
|
-
const T = await o.post(pe.value,
|
|
4057
|
+
const T = await o.post(pe.value, x);
|
|
4029
4058
|
return b.value.push(C), T;
|
|
4030
4059
|
} catch (T) {
|
|
4031
4060
|
let P = `${p(C)} - ${T.message}`;
|
|
4032
4061
|
return T.response.status === 409 && (P = `${p(C)} - ${r("consumer_groups.errors.already_added")}`), Promise.reject(Error(P));
|
|
4033
4062
|
}
|
|
4034
|
-
}, w =
|
|
4035
|
-
w.value = C.map((
|
|
4063
|
+
}, w = E([]), N = (C) => {
|
|
4064
|
+
w.value = C.map((x) => {
|
|
4036
4065
|
var T;
|
|
4037
|
-
return (T =
|
|
4066
|
+
return (T = x.reason) == null ? void 0 : T.message;
|
|
4038
4067
|
}).filter(Boolean);
|
|
4039
4068
|
};
|
|
4040
|
-
return
|
|
4069
|
+
return xe(v, () => {
|
|
4041
4070
|
f.value++;
|
|
4042
4071
|
}, { immediate: !0, deep: !0 }), Qe(async () => {
|
|
4043
4072
|
await d();
|
|
4044
|
-
}), (C,
|
|
4073
|
+
}), (C, x) => {
|
|
4045
4074
|
const T = q("KMultiselect"), P = q("KAlert"), J = q("KPrompt");
|
|
4046
4075
|
return g(), V(J, {
|
|
4047
4076
|
"action-pending": k.value,
|
|
@@ -4049,7 +4078,7 @@ const rl = { class: "add-to-group-form-container" }, ol = { class: "add-to-group
|
|
|
4049
4078
|
"data-testid": "add-to-group-modal",
|
|
4050
4079
|
"is-visible": e.visible,
|
|
4051
4080
|
title: y(r)("consumer_groups.consumers.add.title"),
|
|
4052
|
-
onCanceled:
|
|
4081
|
+
onCanceled: S,
|
|
4053
4082
|
onProceed: ne
|
|
4054
4083
|
}, {
|
|
4055
4084
|
"body-content": h(() => [
|
|
@@ -4057,7 +4086,7 @@ const rl = { class: "add-to-group-form-container" }, ol = { class: "add-to-group
|
|
|
4057
4086
|
R("p", ol, K(y(r)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4058
4087
|
F(T, {
|
|
4059
4088
|
modelValue: a.value,
|
|
4060
|
-
"onUpdate:modelValue":
|
|
4089
|
+
"onUpdate:modelValue": x[0] || (x[0] = (Q) => a.value = Q),
|
|
4061
4090
|
autosuggest: "",
|
|
4062
4091
|
"data-testid": "add-to-groups-multiselect",
|
|
4063
4092
|
"dropdown-footer-text": I.value ? y(r)("consumer_groups.consumers.add.footer") : void 0,
|
|
@@ -4070,14 +4099,14 @@ const rl = { class: "add-to-group-form-container" }, ol = { class: "add-to-group
|
|
|
4070
4099
|
width: "100%",
|
|
4071
4100
|
onQueryChange: y(i)
|
|
4072
4101
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4073
|
-
|
|
4102
|
+
A.value || m.value || w.value.length ? (g(), M("div", al, [
|
|
4074
4103
|
F(P, { appearance: "danger" }, {
|
|
4075
4104
|
alertMessage: h(() => [
|
|
4076
4105
|
R("p", null, K(y(r)("consumer_groups.errors.add")), 1),
|
|
4077
|
-
w.value.length ? (g(),
|
|
4078
|
-
(g(!0),
|
|
4106
|
+
w.value.length ? (g(), M("ul", il, [
|
|
4107
|
+
(g(!0), M(ve, null, ye(w.value, (Q, X) => (g(), M("li", { key: X }, K(Q), 1))), 128))
|
|
4079
4108
|
])) : G("", !0),
|
|
4080
|
-
R("div", null, K(
|
|
4109
|
+
R("div", null, K(A.value || m.value), 1)
|
|
4081
4110
|
]),
|
|
4082
4111
|
_: 1
|
|
4083
4112
|
})
|
|
@@ -4138,126 +4167,126 @@ const Ft = (e, n) => {
|
|
|
4138
4167
|
var Nt;
|
|
4139
4168
|
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } = Kt({
|
|
4140
4169
|
headers: (Nt = t.config) == null ? void 0 : Nt.requestHeaders
|
|
4141
|
-
}), s =
|
|
4170
|
+
}), s = E(1), l = j(() => !!t.config.consumerId), c = j(() => t.config.app !== "kongManager" || !!t.config.disableSorting), d = {
|
|
4142
4171
|
name: { label: o("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4143
4172
|
};
|
|
4144
4173
|
t.config.app === "kongManager" && (d.consumers_count = { label: o("consumer_groups.list.table_headers.consumers_count"), searchable: !1, sortable: !1 }), d.tags = { label: o("consumer_groups.list.table_headers.tags"), sortable: !1 };
|
|
4145
|
-
const u = d, m = (
|
|
4146
|
-
"data-testid":
|
|
4147
|
-
}), f =
|
|
4148
|
-
var H, le, ke,
|
|
4149
|
-
let
|
|
4150
|
-
return t.config.app === "konnect" ?
|
|
4151
|
-
}), I =
|
|
4152
|
-
const
|
|
4153
|
-
return
|
|
4154
|
-
isExactMatch:
|
|
4174
|
+
const u = d, m = (O) => ({
|
|
4175
|
+
"data-testid": O.username ?? O.custom_id ?? O.id
|
|
4176
|
+
}), f = j(() => {
|
|
4177
|
+
var H, le, ke, Oe;
|
|
4178
|
+
let O = `${t.config.apiBaseUrl}${$e.list[t.config.app][l.value ? "forConsumer" : "all"]}`;
|
|
4179
|
+
return t.config.app === "konnect" ? O = O.replace(/{controlPlaneId}/gi, ((H = t.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerId}/gi, ((le = t.config) == null ? void 0 : le.consumerId) || "") : t.config.app === "kongManager" && (O = O.replace(/\/{workspace}/gi, (ke = t.config) != null && ke.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Oe = t.config) == null ? void 0 : Oe.consumerId) || "")), O;
|
|
4180
|
+
}), I = E(""), v = j(() => {
|
|
4181
|
+
const O = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4182
|
+
return O ? {
|
|
4183
|
+
isExactMatch: O,
|
|
4155
4184
|
fields: {
|
|
4156
4185
|
username: d.name,
|
|
4157
4186
|
id: { label: o("consumer_groups.list.table_headers.id") }
|
|
4158
4187
|
},
|
|
4159
4188
|
placeholder: o("consumer_groups.search.placeholder")
|
|
4160
4189
|
} : {
|
|
4161
|
-
isExactMatch:
|
|
4190
|
+
isExactMatch: O,
|
|
4162
4191
|
fields: {
|
|
4163
4192
|
name: d.name
|
|
4164
4193
|
},
|
|
4165
4194
|
schema: t.config.filterSchema
|
|
4166
4195
|
};
|
|
4167
|
-
}), p =
|
|
4196
|
+
}), p = j(() => l.value ? "consumer_groups" : void 0), { fetcher: S, fetcherState: b } = nl(t.config, f.value, p.value), k = () => {
|
|
4168
4197
|
I.value = "";
|
|
4169
|
-
},
|
|
4198
|
+
}, A = () => {
|
|
4170
4199
|
s.value++;
|
|
4171
|
-
}, ne =
|
|
4172
|
-
const le =
|
|
4200
|
+
}, ne = E(""), pe = (O, H) => {
|
|
4201
|
+
const le = O.id;
|
|
4173
4202
|
if (!H(le)) {
|
|
4174
4203
|
n("copy:error", {
|
|
4175
|
-
entity:
|
|
4204
|
+
entity: O,
|
|
4176
4205
|
field: "id",
|
|
4177
4206
|
message: o("consumer_groups.errors.copy")
|
|
4178
4207
|
});
|
|
4179
4208
|
return;
|
|
4180
4209
|
}
|
|
4181
4210
|
n("copy:success", {
|
|
4182
|
-
entity:
|
|
4211
|
+
entity: O,
|
|
4183
4212
|
field: "id",
|
|
4184
4213
|
message: o("consumer_groups.copy.success", { val: le })
|
|
4185
4214
|
});
|
|
4186
|
-
}, z = (
|
|
4187
|
-
const le = JSON.stringify(
|
|
4215
|
+
}, z = (O, H) => {
|
|
4216
|
+
const le = JSON.stringify(O);
|
|
4188
4217
|
if (!H(le)) {
|
|
4189
4218
|
n("copy:error", {
|
|
4190
|
-
entity:
|
|
4219
|
+
entity: O,
|
|
4191
4220
|
message: o("consumer_groups.errors.copy")
|
|
4192
4221
|
});
|
|
4193
4222
|
return;
|
|
4194
4223
|
}
|
|
4195
4224
|
n("copy:success", {
|
|
4196
|
-
entity:
|
|
4225
|
+
entity: O,
|
|
4197
4226
|
message: o("consumer_groups.copy.success_brief")
|
|
4198
4227
|
});
|
|
4199
|
-
}, w = async (
|
|
4228
|
+
}, w = async (O) => {
|
|
4200
4229
|
var le;
|
|
4201
|
-
await ((le = t.canRetrieve) == null ? void 0 : le.call(t,
|
|
4202
|
-
}, N = (
|
|
4230
|
+
await ((le = t.canRetrieve) == null ? void 0 : le.call(t, O)) && a.push(t.config.getViewRoute(O.id));
|
|
4231
|
+
}, N = (O) => ({
|
|
4203
4232
|
label: o("consumer_groups.actions.view"),
|
|
4204
|
-
to: t.config.getViewRoute(
|
|
4205
|
-
}), B = (
|
|
4233
|
+
to: t.config.getViewRoute(O)
|
|
4234
|
+
}), B = (O) => ({
|
|
4206
4235
|
label: o("consumer_groups.actions.edit"),
|
|
4207
|
-
to: t.config.getEditRoute(
|
|
4208
|
-
}), C =
|
|
4209
|
-
C.value =
|
|
4236
|
+
to: t.config.getEditRoute(O)
|
|
4237
|
+
}), C = E(void 0), x = E(!1), T = E(!1), P = E(""), J = el(t.config, f.value), Q = (O) => {
|
|
4238
|
+
C.value = O, x.value = !0;
|
|
4210
4239
|
}, X = () => {
|
|
4211
|
-
|
|
4240
|
+
x.value = !1;
|
|
4212
4241
|
}, ee = async () => {
|
|
4213
|
-
var
|
|
4214
|
-
if ((
|
|
4242
|
+
var O, H, le;
|
|
4243
|
+
if ((O = C.value) != null && O.id) {
|
|
4215
4244
|
T.value = !0;
|
|
4216
4245
|
try {
|
|
4217
|
-
await i.delete(J(C.value.id)), T.value = !1,
|
|
4246
|
+
await i.delete(J(C.value.id)), T.value = !1, x.value = !1, s.value++, n("delete:success", C.value);
|
|
4218
4247
|
} catch (ke) {
|
|
4219
4248
|
P.value = ((le = (H = ke.response) == null ? void 0 : H.data) == null ? void 0 : le.message) || ke.message || o("consumer_groups.errors.delete"), n("error", ke);
|
|
4220
4249
|
} finally {
|
|
4221
4250
|
T.value = !1;
|
|
4222
4251
|
}
|
|
4223
4252
|
}
|
|
4224
|
-
}, ie =
|
|
4253
|
+
}, ie = E(!1), Ve = () => {
|
|
4225
4254
|
ie.value = !0;
|
|
4226
4255
|
}, _ = () => {
|
|
4227
4256
|
ie.value = !1;
|
|
4228
|
-
}, L = (
|
|
4229
|
-
H || _(), s.value++, n("add:success",
|
|
4257
|
+
}, L = (O, H) => {
|
|
4258
|
+
H || _(), s.value++, n("add:success", O);
|
|
4230
4259
|
}, re = () => {
|
|
4231
4260
|
l.value && Ve();
|
|
4232
|
-
}, U =
|
|
4233
|
-
U.value =
|
|
4261
|
+
}, U = E(void 0), D = E(!1), ge = E(""), _e = (O) => {
|
|
4262
|
+
U.value = O, D.value = !0;
|
|
4234
4263
|
}, ce = () => {
|
|
4235
4264
|
D.value = !1, U.value = void 0;
|
|
4236
|
-
}, Ne =
|
|
4237
|
-
var H, le, ke,
|
|
4238
|
-
let
|
|
4239
|
-
return t.config.app === "konnect" ?
|
|
4240
|
-
}), De =
|
|
4265
|
+
}, Ne = j(() => {
|
|
4266
|
+
var H, le, ke, Oe;
|
|
4267
|
+
let O = `${t.config.apiBaseUrl}${$e.list[t.config.app].oneForConsumer}`;
|
|
4268
|
+
return t.config.app === "konnect" ? O = O.replace(/{controlPlaneId}/gi, ((H = t.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerId}/gi, ((le = t.config) == null ? void 0 : le.consumerId) || "") : t.config.app === "kongManager" && (O = O.replace(/\/{workspace}/gi, (ke = t.config) != null && ke.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Oe = t.config) == null ? void 0 : Oe.consumerId) || "")), O;
|
|
4269
|
+
}), De = E(!1), ir = async () => {
|
|
4241
4270
|
if (U.value) {
|
|
4242
4271
|
De.value = !0;
|
|
4243
4272
|
try {
|
|
4244
|
-
const
|
|
4245
|
-
await i.delete(
|
|
4246
|
-
} catch (
|
|
4247
|
-
ge.value =
|
|
4273
|
+
const O = Ne.value.replace(/{consumerGroupId}/gi, U.value.id);
|
|
4274
|
+
await i.delete(O), n("remove:success", U.value), ce(), s.value++;
|
|
4275
|
+
} catch (O) {
|
|
4276
|
+
ge.value = O.message || o("consumer_groups.errors.delete"), n("error", O);
|
|
4248
4277
|
} finally {
|
|
4249
4278
|
De.value = !1;
|
|
4250
4279
|
}
|
|
4251
4280
|
}
|
|
4252
4281
|
};
|
|
4253
|
-
|
|
4254
|
-
if (
|
|
4255
|
-
ne.value = o("consumer_groups.errors.general"), n("error",
|
|
4282
|
+
xe(b, (O) => {
|
|
4283
|
+
if (O.status === Ee.Error) {
|
|
4284
|
+
ne.value = o("consumer_groups.errors.general"), n("error", O.error);
|
|
4256
4285
|
return;
|
|
4257
4286
|
}
|
|
4258
4287
|
ne.value = "";
|
|
4259
4288
|
});
|
|
4260
|
-
const pt =
|
|
4289
|
+
const pt = E({
|
|
4261
4290
|
ctaPath: l.value ? void 0 : t.config.createRoute,
|
|
4262
4291
|
ctaText: void 0,
|
|
4263
4292
|
message: o("consumer_groups.list.empty_state.description"),
|
|
@@ -4265,9 +4294,9 @@ const Ft = (e, n) => {
|
|
|
4265
4294
|
});
|
|
4266
4295
|
return Qe(async () => {
|
|
4267
4296
|
await t.canCreate() && (pt.value.title = l.value ? o("consumer_groups.list.empty_state.title_for_consumer") : o("consumer_groups.list.empty_state.title"), pt.value.ctaText = l.value ? o("consumer_groups.actions.add_to_group") : o("consumer_groups.actions.create"));
|
|
4268
|
-
}), (
|
|
4269
|
-
const le = q("KButton"), ke = q("KBadge"),
|
|
4270
|
-
return g(),
|
|
4297
|
+
}), (O, H) => {
|
|
4298
|
+
const le = q("KButton"), ke = q("KBadge"), Oe = q("KTruncate"), Ge = q("KDropdownItem"), Bt = q("KClipboardProvider"), sr = q("KPrompt");
|
|
4299
|
+
return g(), M("div", ul, [
|
|
4271
4300
|
F(y($s), {
|
|
4272
4301
|
"cache-identifier": e.cacheIdentifier,
|
|
4273
4302
|
"disable-pagination": l.value,
|
|
@@ -4276,7 +4305,7 @@ const Ft = (e, n) => {
|
|
|
4276
4305
|
"empty-state-options": pt.value,
|
|
4277
4306
|
"enable-entity-actions": "",
|
|
4278
4307
|
"error-message": ne.value,
|
|
4279
|
-
fetcher: y(
|
|
4308
|
+
fetcher: y(S),
|
|
4280
4309
|
"fetcher-cache-key": s.value,
|
|
4281
4310
|
"pagination-type": "offset",
|
|
4282
4311
|
"preferences-storage-key": "kong-ui-entities-consumer-groups-list",
|
|
@@ -4286,7 +4315,7 @@ const Ft = (e, n) => {
|
|
|
4286
4315
|
onClearSearchInput: k,
|
|
4287
4316
|
"onClick:row": H[3] || (H[3] = (W) => w(W)),
|
|
4288
4317
|
onEmptyStateCtaClicked: re,
|
|
4289
|
-
onSort:
|
|
4318
|
+
onSort: A
|
|
4290
4319
|
}, {
|
|
4291
4320
|
"toolbar-filter": h(() => [
|
|
4292
4321
|
l.value ? G("", !0) : (g(), V(y(Hs), {
|
|
@@ -4324,9 +4353,9 @@ const Ft = (e, n) => {
|
|
|
4324
4353
|
Z(K(W ?? "-"), 1)
|
|
4325
4354
|
]),
|
|
4326
4355
|
tags: h(({ rowValue: W }) => [
|
|
4327
|
-
(W == null ? void 0 : W.length) > 0 ? (g(), V(
|
|
4356
|
+
(W == null ? void 0 : W.length) > 0 ? (g(), V(Oe, { key: 0 }, {
|
|
4328
4357
|
default: h(() => [
|
|
4329
|
-
(g(!0),
|
|
4358
|
+
(g(!0), M(ve, null, ye(W, (Be) => (g(), V(ke, {
|
|
4330
4359
|
key: Be,
|
|
4331
4360
|
onClick: H[2] || (H[2] = rt(() => {
|
|
4332
4361
|
}, ["stop"]))
|
|
@@ -4338,7 +4367,7 @@ const Ft = (e, n) => {
|
|
|
4338
4367
|
}, 1024))), 128))
|
|
4339
4368
|
]),
|
|
4340
4369
|
_: 2
|
|
4341
|
-
}, 1024)) : (g(),
|
|
4370
|
+
}, 1024)) : (g(), M("span", cl, "-"))
|
|
4342
4371
|
]),
|
|
4343
4372
|
actions: h(({ row: W }) => [
|
|
4344
4373
|
F(Bt, null, {
|
|
@@ -4413,7 +4442,7 @@ const Ft = (e, n) => {
|
|
|
4413
4442
|
]),
|
|
4414
4443
|
_: 1
|
|
4415
4444
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4416
|
-
F(y(
|
|
4445
|
+
F(y(Es), {
|
|
4417
4446
|
"action-pending": T.value,
|
|
4418
4447
|
"data-testid": "delete-consumer-group-modal",
|
|
4419
4448
|
description: y(o)("consumer_groups.delete.description"),
|
|
@@ -4421,7 +4450,7 @@ const Ft = (e, n) => {
|
|
|
4421
4450
|
"entity-type": y(dn).ConsumerGroup,
|
|
4422
4451
|
error: P.value,
|
|
4423
4452
|
title: y(o)("consumer_groups.delete.title"),
|
|
4424
|
-
visible:
|
|
4453
|
+
visible: x.value,
|
|
4425
4454
|
onCancel: X,
|
|
4426
4455
|
onProceed: ee
|
|
4427
4456
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
@@ -4515,20 +4544,20 @@ const Tl = /* @__PURE__ */ Ft(dl, [["__scopeId", "data-v-80c4522c"]]), pl = { cl
|
|
|
4515
4544
|
searchKeys: ["username", "custom_id", "id"]
|
|
4516
4545
|
}), { axiosInstance: m } = Kt({
|
|
4517
4546
|
headers: (Ve = t.config) == null ? void 0 : Ve.requestHeaders
|
|
4518
|
-
}), { getMessageFromError: f } = tl(), I =
|
|
4547
|
+
}), { getMessageFromError: f } = tl(), I = j(() => u.value.map((_) => ({
|
|
4519
4548
|
label: _.username || _.custom_id,
|
|
4520
4549
|
value: _.id,
|
|
4521
4550
|
selected: a.fields.consumers.includes(_.id),
|
|
4522
4551
|
data: _
|
|
4523
4552
|
// we need this to determine whether or not to show the description text
|
|
4524
|
-
}))), v =
|
|
4553
|
+
}))), v = j(() => {
|
|
4525
4554
|
var _, L;
|
|
4526
4555
|
return (L = $e.form[(_ = t.config) == null ? void 0 : _.app]) == null ? void 0 : L.edit;
|
|
4527
|
-
}), p =
|
|
4556
|
+
}), p = j(() => t.consumerGroupId ? nt.Edit : nt.Create), S = j(() => !!a.fields.name && !w.value), b = j(() => JSON.stringify(a.fields) !== JSON.stringify(i)), k = (_, L = "", re = "") => {
|
|
4528
4557
|
var D, ge, _e, ce, Ne, De;
|
|
4529
4558
|
let U = `${(D = t.config) == null ? void 0 : D.apiBaseUrl}${$e.form[(ge = t.config) == null ? void 0 : ge.app][_]}`;
|
|
4530
4559
|
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? U = U.replace(/{controlPlaneId}/gi, ((ce = t.config) == null ? void 0 : ce.controlPlaneId) || "") : ((Ne = t.config) == null ? void 0 : Ne.app) === "kongManager" && (U = U.replace(/\/{workspace}/gi, (De = t.config) != null && De.workspace ? `/${t.config.workspace}` : "")), U = U.replace(/{id}/gi, L || t.consumerGroupId), (_ === "addConsumer" || _ === "removeConsumer") && (U = U.replace(/{consumerId}/gi, re)), U;
|
|
4531
|
-
},
|
|
4560
|
+
}, A = () => {
|
|
4532
4561
|
var _;
|
|
4533
4562
|
o.push(((_ = t.config) == null ? void 0 : _.cancelRoute) || { name: "consumer-group-list" });
|
|
4534
4563
|
}, ne = (_) => {
|
|
@@ -4546,22 +4575,22 @@ const Tl = /* @__PURE__ */ Ft(dl, [["__scopeId", "data-v-80c4522c"]]), pl = { cl
|
|
|
4546
4575
|
const { data: ce } = await m.get(k("getConsumers"));
|
|
4547
4576
|
a.fields.consumers = "consumers" in ce ? (_e = ce == null ? void 0 : ce.consumers) == null ? void 0 : _e.map((Ne) => Ne.id) : [];
|
|
4548
4577
|
} catch (ce) {
|
|
4549
|
-
|
|
4578
|
+
x(ce);
|
|
4550
4579
|
}
|
|
4551
4580
|
Object.assign(i, a.fields);
|
|
4552
|
-
}, w =
|
|
4581
|
+
}, w = j(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")), N = () => {
|
|
4553
4582
|
var _, L;
|
|
4554
4583
|
return {
|
|
4555
4584
|
name: a.fields.name,
|
|
4556
4585
|
tags: (L = (_ = a.fields.tags.split(",")) == null ? void 0 : _.map((re) => String(re || "").trim())) == null ? void 0 : L.filter((re) => re !== "")
|
|
4557
4586
|
};
|
|
4558
|
-
}, B = async (_, L = "") => await m.post(k("addConsumer", L, _), { consumer: _ }), C = async (_, L = "") => await m.delete(k("removeConsumer", L, _)),
|
|
4587
|
+
}, B = async (_, L = "") => await m.post(k("addConsumer", L, _), { consumer: _ }), C = async (_, L = "") => await m.delete(k("removeConsumer", L, _)), x = (_) => {
|
|
4559
4588
|
a.errorMessage = f(_), n("error", _);
|
|
4560
4589
|
}, T = (_ = t.consumerGroupId) => {
|
|
4561
4590
|
Object.assign(i, a.fields), n("update", { ...a.fields, id: _ });
|
|
4562
4591
|
}, P = (_, L, re = t.consumerGroupId) => {
|
|
4563
4592
|
const U = _ == null ? void 0 : _.find((D) => D.status !== "fulfilled");
|
|
4564
|
-
U ?
|
|
4593
|
+
U ? x({
|
|
4565
4594
|
code: U.status,
|
|
4566
4595
|
message: L
|
|
4567
4596
|
}) : T(re);
|
|
@@ -4571,14 +4600,14 @@ const Tl = /* @__PURE__ */ Ft(dl, [["__scopeId", "data-v-80c4522c"]]), pl = { cl
|
|
|
4571
4600
|
const { data: L } = await m.post(k("create"), N());
|
|
4572
4601
|
_ = "item" in L ? L.item.id : L.id;
|
|
4573
4602
|
} catch (L) {
|
|
4574
|
-
|
|
4603
|
+
x(L);
|
|
4575
4604
|
}
|
|
4576
4605
|
if (a.fields.consumers.length > 0 && _)
|
|
4577
4606
|
try {
|
|
4578
4607
|
const L = a.fields.consumers.map((U) => B(U, _)), re = await Promise.allSettled(L);
|
|
4579
4608
|
P(re, r("consumer_groups.errors.add_consumer"), _);
|
|
4580
4609
|
} catch (L) {
|
|
4581
|
-
|
|
4610
|
+
x(L);
|
|
4582
4611
|
}
|
|
4583
4612
|
else
|
|
4584
4613
|
a.fields.consumers.length === 0 && _ && T(_);
|
|
@@ -4587,7 +4616,7 @@ const Tl = /* @__PURE__ */ Ft(dl, [["__scopeId", "data-v-80c4522c"]]), pl = { cl
|
|
|
4587
4616
|
try {
|
|
4588
4617
|
((re = t.config) == null ? void 0 : re.app) === "konnect" ? await m.put(k("edit"), N()) : await m.patch(k("edit"), N());
|
|
4589
4618
|
} catch (U) {
|
|
4590
|
-
|
|
4619
|
+
x(U);
|
|
4591
4620
|
}
|
|
4592
4621
|
const _ = a.fields.consumers.filter((U) => !i.consumers.includes(U)), L = i.consumers.filter((U) => !a.fields.consumers.includes(U));
|
|
4593
4622
|
if (L.length === 0 && _.length === 0)
|
|
@@ -4598,14 +4627,14 @@ const Tl = /* @__PURE__ */ Ft(dl, [["__scopeId", "data-v-80c4522c"]]), pl = { cl
|
|
|
4598
4627
|
const U = L.map((ge) => C(ge)), D = await Promise.allSettled(U);
|
|
4599
4628
|
P(D, r("consumer_groups.errors.remove_consumer"));
|
|
4600
4629
|
} catch (U) {
|
|
4601
|
-
|
|
4630
|
+
x(U);
|
|
4602
4631
|
}
|
|
4603
4632
|
if (_.length > 0)
|
|
4604
4633
|
try {
|
|
4605
4634
|
const U = _.map((ge) => B(ge)), D = await Promise.allSettled(U);
|
|
4606
4635
|
P(D, r("consumer_groups.errors.add_consumer"));
|
|
4607
4636
|
} catch (U) {
|
|
4608
|
-
|
|
4637
|
+
x(U);
|
|
4609
4638
|
}
|
|
4610
4639
|
}
|
|
4611
4640
|
}, X = async () => {
|
|
@@ -4619,15 +4648,15 @@ const Tl = /* @__PURE__ */ Ft(dl, [["__scopeId", "data-v-80c4522c"]]), pl = { cl
|
|
|
4619
4648
|
await d();
|
|
4620
4649
|
}), (_, L) => {
|
|
4621
4650
|
const re = q("KInput"), U = q("KMultiselect");
|
|
4622
|
-
return g(),
|
|
4651
|
+
return g(), M("div", pl, [
|
|
4623
4652
|
F(y(Cs), {
|
|
4624
|
-
"can-submit":
|
|
4653
|
+
"can-submit": S.value && b.value,
|
|
4625
4654
|
config: e.config,
|
|
4626
4655
|
"edit-id": e.consumerGroupId,
|
|
4627
4656
|
"error-message": a.errorMessage || y(c) || w.value,
|
|
4628
4657
|
"fetch-url": v.value,
|
|
4629
4658
|
"is-readonly": a.readonly,
|
|
4630
|
-
onCancel:
|
|
4659
|
+
onCancel: A,
|
|
4631
4660
|
"onFetch:error": L[3] || (L[3] = (D) => ne(D)),
|
|
4632
4661
|
"onFetch:success": z,
|
|
4633
4662
|
onLoading: L[4] || (L[4] = (D) => pe(D)),
|
|
@@ -4691,7 +4720,7 @@ const Tl = /* @__PURE__ */ Ft(dl, [["__scopeId", "data-v-80c4522c"]]), pl = { cl
|
|
|
4691
4720
|
var ge, _e, ce;
|
|
4692
4721
|
return [
|
|
4693
4722
|
R("div", fl, K(D.label), 1),
|
|
4694
|
-
(ge = D == null ? void 0 : D.data) != null && ge.username && ((_e = D == null ? void 0 : D.data) != null && _e.custom_id) ? (g(),
|
|
4723
|
+
(ge = D == null ? void 0 : D.data) != null && ge.username && ((_e = D == null ? void 0 : D.data) != null && _e.custom_id) ? (g(), M("div", ml, K((ce = D == null ? void 0 : D.data) == null ? void 0 : ce.custom_id), 1)) : G("", !0)
|
|
4695
4724
|
];
|
|
4696
4725
|
}),
|
|
4697
4726
|
_: 1
|
|
@@ -4706,7 +4735,7 @@ const Tl = /* @__PURE__ */ Ft(dl, [["__scopeId", "data-v-80c4522c"]]), pl = { cl
|
|
|
4706
4735
|
};
|
|
4707
4736
|
}
|
|
4708
4737
|
});
|
|
4709
|
-
const $l = /* @__PURE__ */ Ft(gl, [["__scopeId", "data-v-102d40d2"]]), yl = { class: "kong-ui-consumer-group-entity-config-card" },
|
|
4738
|
+
const $l = /* @__PURE__ */ Ft(gl, [["__scopeId", "data-v-102d40d2"]]), yl = { class: "kong-ui-consumer-group-entity-config-card" }, jl = /* @__PURE__ */ ae({
|
|
4710
4739
|
__name: "ConsumerGroupConfigCard",
|
|
4711
4740
|
props: {
|
|
4712
4741
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4733,7 +4762,7 @@ const $l = /* @__PURE__ */ Ft(gl, [["__scopeId", "data-v-102d40d2"]]), yl = { cl
|
|
|
4733
4762
|
},
|
|
4734
4763
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
4735
4764
|
setup(e) {
|
|
4736
|
-
const n = e, { i18n: { t } } = ct.useI18n(), r =
|
|
4765
|
+
const n = e, { i18n: { t } } = ct.useI18n(), r = j(() => $e.form[n.config.app].edit), o = E({
|
|
4737
4766
|
id: {},
|
|
4738
4767
|
name: {},
|
|
4739
4768
|
created_at: {},
|
|
@@ -4742,7 +4771,7 @@ const $l = /* @__PURE__ */ Ft(gl, [["__scopeId", "data-v-102d40d2"]]), yl = { cl
|
|
|
4742
4771
|
tooltip: t("consumer_groups.form.fields.tags.tooltip")
|
|
4743
4772
|
}
|
|
4744
4773
|
});
|
|
4745
|
-
return (a, i) => (g(),
|
|
4774
|
+
return (a, i) => (g(), M("div", yl, [
|
|
4746
4775
|
F(y(hs), {
|
|
4747
4776
|
config: e.config,
|
|
4748
4777
|
"config-card-doc": e.configCardDoc,
|
|
@@ -4759,7 +4788,7 @@ const $l = /* @__PURE__ */ Ft(gl, [["__scopeId", "data-v-102d40d2"]]), yl = { cl
|
|
|
4759
4788
|
}
|
|
4760
4789
|
});
|
|
4761
4790
|
export {
|
|
4762
|
-
|
|
4791
|
+
jl as ConsumerGroupConfigCard,
|
|
4763
4792
|
$l as ConsumerGroupForm,
|
|
4764
4793
|
Tl as ConsumerGroupList
|
|
4765
4794
|
};
|