@kong-ui-public/entities-consumer-groups 1.2.7 → 1.2.9-pr.848.05c4cc5a.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-consumer-groups.es.js +931 -914
- package/dist/entities-consumer-groups.umd.js +19 -19
- package/dist/style.css +1 -1
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ie, ref as
|
|
1
|
+
import { defineComponent as ie, ref as M, computed as x, watch as xe, renderSlot as Z, createCommentVNode as G, unref as h, useSlots as ut, onBeforeMount as Qe, resolveComponent as L, openBlock as f, createBlock as R, createSlots as Te, withCtx as v, createElementVNode as q, createTextVNode as Q, toDisplayString as O, createVNode as F, createElementBlock as T, renderList as ye, Fragment as ve, normalizeClass as Fe, withModifiers as rt, withDirectives as et, vShow as tt, useCssVars as lr, resolveDynamicComponent as ze, normalizeProps as ur, guardReactiveProps as cr, mergeProps as ht, onMounted as dr, onUnmounted as pr, normalizeStyle as fr, inject as mr, pushScopeId as gr, popScopeId as yr, reactive as Lt } 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 hr from "axios";
|
|
@@ -108,7 +108,7 @@ function kr() {
|
|
|
108
108
|
}
|
|
109
109
|
const ct = {
|
|
110
110
|
useI18n: kr
|
|
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 || {}), Oe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Oe || {}), ne = /* @__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))(ne || {}), be = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(be || {});
|
|
144
|
+
function At(e = {}) {
|
|
145
145
|
return {
|
|
146
146
|
axiosInstance: hr.create({
|
|
147
147
|
withCredentials: !0,
|
|
@@ -198,10 +198,10 @@ function Ir() {
|
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const Ar = {
|
|
202
202
|
message: "Are you sure you want to delete this {entityType}?",
|
|
203
203
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
204
|
-
},
|
|
204
|
+
}, Sr = {
|
|
205
205
|
actions: {
|
|
206
206
|
save: "Save",
|
|
207
207
|
cancel: "Cancel",
|
|
@@ -210,7 +210,7 @@ const xr = {
|
|
|
210
210
|
errors: {
|
|
211
211
|
edit: "The entity could not be edited at this time."
|
|
212
212
|
}
|
|
213
|
-
},
|
|
213
|
+
}, xr = {
|
|
214
214
|
emptyState: {
|
|
215
215
|
noSearchResultsTitle: "No results found",
|
|
216
216
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
@@ -259,12 +259,12 @@ const xr = {
|
|
|
259
259
|
applyButtonText: "Apply",
|
|
260
260
|
clearButtonText: "Clear",
|
|
261
261
|
clearAllButtonText: "Clear all filters"
|
|
262
|
-
},
|
|
262
|
+
}, jr = {
|
|
263
263
|
errors: {
|
|
264
264
|
fetch: "Could not fetch available items",
|
|
265
265
|
invalid: "Please select a valid value"
|
|
266
266
|
}
|
|
267
|
-
},
|
|
267
|
+
}, Mr = {
|
|
268
268
|
unexpected: "An unexpected error has occurred",
|
|
269
269
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
270
270
|
}, Er = {
|
|
@@ -278,63 +278,63 @@ const xr = {
|
|
|
278
278
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
279
279
|
confirmText: "Yes, disable"
|
|
280
280
|
}
|
|
281
|
-
},
|
|
282
|
-
deleteModal:
|
|
283
|
-
baseForm:
|
|
284
|
-
baseTable:
|
|
281
|
+
}, Or = {
|
|
282
|
+
deleteModal: Ar,
|
|
283
|
+
baseForm: Sr,
|
|
284
|
+
baseTable: xr,
|
|
285
285
|
baseConfigCard: Tr,
|
|
286
286
|
filter: $r,
|
|
287
|
-
debouncedFilter:
|
|
288
|
-
errors:
|
|
287
|
+
debouncedFilter: jr,
|
|
288
|
+
errors: Mr,
|
|
289
289
|
toggleModal: Er
|
|
290
290
|
};
|
|
291
|
-
function
|
|
292
|
-
const e = It("en-us",
|
|
291
|
+
function St() {
|
|
292
|
+
const e = It("en-us", Or);
|
|
293
293
|
return {
|
|
294
294
|
i18n: e,
|
|
295
295
|
i18nT: cn(e)
|
|
296
296
|
// Translation component <i18n-t>
|
|
297
297
|
};
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Br(e, n, t, r = {
|
|
300
300
|
fetchedItemsKey: "data",
|
|
301
301
|
searchKeys: ["id"]
|
|
302
302
|
}) {
|
|
303
303
|
t || (t = "100");
|
|
304
|
-
const { axiosInstance: o } =
|
|
304
|
+
const { axiosInstance: o } = At({
|
|
305
305
|
headers: e.requestHeaders
|
|
306
|
-
}), { i18n: { t: a } } =
|
|
307
|
-
await
|
|
308
|
-
}, 200), l =
|
|
306
|
+
}), { i18n: { t: a } } = St(), { debounce: i } = _r(), s = i(async (y) => {
|
|
307
|
+
await w(y);
|
|
308
|
+
}, 200), l = M(!1), u = M(""), d = M(""), c = M([]), m = M(void 0), g = h(n);
|
|
309
309
|
let k = `${e.apiBaseUrl}${g}`;
|
|
310
310
|
e.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
311
311
|
const _ = async () => {
|
|
312
312
|
try {
|
|
313
313
|
l.value = !0;
|
|
314
314
|
const { data: y } = await o.get(`${k}?size=${t}`);
|
|
315
|
-
y != null && y.next || (m.value = r.fetchedItemsKey in y ? y[r.fetchedItemsKey] : []),
|
|
315
|
+
y != null && y.next || (m.value = r.fetchedItemsKey in y ? y[r.fetchedItemsKey] : []), c.value = r.fetchedItemsKey in y ? y[r.fetchedItemsKey] : [];
|
|
316
316
|
} catch {
|
|
317
|
-
|
|
317
|
+
c.value = [], u.value = a("debouncedFilter.errors.fetch");
|
|
318
318
|
} finally {
|
|
319
319
|
l.value = !1;
|
|
320
320
|
}
|
|
321
|
-
}, p =
|
|
322
|
-
var
|
|
321
|
+
}, p = M(""), w = async (y) => {
|
|
322
|
+
var b, B;
|
|
323
323
|
if (p.value !== y)
|
|
324
324
|
if (p.value = y || "", m.value === void 0)
|
|
325
325
|
try {
|
|
326
|
-
l.value = !0,
|
|
326
|
+
l.value = !0, u.value = "", d.value = "";
|
|
327
327
|
let H = k + "";
|
|
328
328
|
y && (H += `/${y}`);
|
|
329
329
|
const { data: re } = await o.get(`${H}?size=${t}`);
|
|
330
|
-
r.fetchedItemsKey in re ?
|
|
330
|
+
r.fetchedItemsKey in re ? c.value = re[r.fetchedItemsKey] : re != null && re.id ? c.value = [re] : c.value = [];
|
|
331
331
|
} catch (H) {
|
|
332
|
-
((
|
|
332
|
+
((b = H == null ? void 0 : H.response) == null ? void 0 : b.status) === 404 ? d.value = a("debouncedFilter.errors.invalid") : (c.value = [], u.value = a("debouncedFilter.errors.fetch"));
|
|
333
333
|
} finally {
|
|
334
334
|
l.value = !1;
|
|
335
335
|
}
|
|
336
336
|
else
|
|
337
|
-
l.value = !0, d.value = "", y ? (
|
|
337
|
+
l.value = !0, d.value = "", y ? (c.value = (B = m.value) == null ? void 0 : B.filter((H) => {
|
|
338
338
|
var re;
|
|
339
339
|
let z = !1;
|
|
340
340
|
for (const I of r.searchKeys) {
|
|
@@ -342,26 +342,26 @@ function Fr(e, n, t, r = {
|
|
|
342
342
|
V != null && V.includes(y.toLowerCase()) && (z = !0);
|
|
343
343
|
}
|
|
344
344
|
return z;
|
|
345
|
-
}), (!
|
|
345
|
+
}), (!c.value || !c.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : c.value = m.value, l.value = !1;
|
|
346
346
|
};
|
|
347
347
|
return {
|
|
348
348
|
loading: l,
|
|
349
|
-
error:
|
|
349
|
+
error: u,
|
|
350
350
|
validationError: d,
|
|
351
|
-
results:
|
|
351
|
+
results: c,
|
|
352
352
|
allRecords: m,
|
|
353
353
|
loadItems: _,
|
|
354
354
|
debouncedQueryChange: s
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
|
-
function
|
|
358
|
-
const t = h(n), r =
|
|
357
|
+
function Fr(e, n) {
|
|
358
|
+
const t = h(n), r = x(
|
|
359
359
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
360
360
|
);
|
|
361
361
|
return r.value.search = "", (o) => `${r.value.href}/${o}`;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
const { i18n: { t: e } } =
|
|
363
|
+
function Kr() {
|
|
364
|
+
const { i18n: { t: e } } = St();
|
|
365
365
|
return {
|
|
366
366
|
getMessageFromError: (n) => {
|
|
367
367
|
var t, r, o;
|
|
@@ -389,62 +389,62 @@ function Br() {
|
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
391
|
function pn(e, n) {
|
|
392
|
-
const t =
|
|
392
|
+
const t = M(h(e)), r = M(h(n)), o = x(
|
|
393
393
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
394
|
-
), a =
|
|
394
|
+
), a = x(
|
|
395
395
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
396
396
|
);
|
|
397
397
|
return (i) => {
|
|
398
|
-
const { page: s, pageSize: l, offset:
|
|
398
|
+
const { page: s, pageSize: l, offset: u, sortColumnKey: d, sortColumnOrder: c, query: m } = i;
|
|
399
399
|
try {
|
|
400
400
|
let g = new URL(a.value.href);
|
|
401
401
|
return o.value && m ? (g.search = "", g = new URL(`${g.href}/${m}/`)) : (o.value || new URLSearchParams(m).forEach((k, _) => {
|
|
402
402
|
g.searchParams.append(_, k);
|
|
403
|
-
}), d && g.searchParams.append("sort_by", d),
|
|
403
|
+
}), d && g.searchParams.append("sort_by", d), c === "desc" && g.searchParams.append("sort_desc", "1"), g.searchParams.append("size", String(l))), u && s !== 1 && g.searchParams.append("offset", String(u)), g.href;
|
|
404
404
|
} catch (g) {
|
|
405
405
|
return console.error("RouteList(fetcher)", g), r.value;
|
|
406
406
|
}
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
409
|
function Nr(e, n, t = "data") {
|
|
410
|
-
const r = h(n), { axiosInstance: o } =
|
|
410
|
+
const r = h(n), { axiosInstance: o } = At({
|
|
411
411
|
headers: e.requestHeaders
|
|
412
|
-
}), a = pn(e, r), i =
|
|
413
|
-
status:
|
|
412
|
+
}), a = pn(e, r), i = M({
|
|
413
|
+
status: Oe.Idle
|
|
414
414
|
});
|
|
415
415
|
return { fetcher: async (s) => {
|
|
416
416
|
try {
|
|
417
|
-
i.value = { status:
|
|
418
|
-
const l = a(s), { data:
|
|
419
|
-
let
|
|
420
|
-
|
|
417
|
+
i.value = { status: Oe.Loading };
|
|
418
|
+
const l = a(s), { data: u } = await o.get(l), d = t && t.replace(/[^\w-_]/gi, "");
|
|
419
|
+
let c;
|
|
420
|
+
u[d] && Array.isArray(u[d]) ? c = u[d] : c = Object.keys(u).length ? [u] : [];
|
|
421
421
|
const m = {
|
|
422
|
-
data:
|
|
423
|
-
total:
|
|
424
|
-
...
|
|
422
|
+
data: c,
|
|
423
|
+
total: c.length,
|
|
424
|
+
...u.offset ? {
|
|
425
425
|
pagination: {
|
|
426
|
-
offset:
|
|
426
|
+
offset: u.offset
|
|
427
427
|
}
|
|
428
428
|
} : null
|
|
429
429
|
};
|
|
430
430
|
return i.value = {
|
|
431
|
-
status:
|
|
431
|
+
status: Oe.Idle,
|
|
432
432
|
response: m
|
|
433
433
|
}, m;
|
|
434
434
|
} catch (l) {
|
|
435
|
-
const
|
|
435
|
+
const u = {
|
|
436
436
|
data: [],
|
|
437
437
|
total: 0
|
|
438
438
|
};
|
|
439
439
|
return s.query && l.response.status === 404 ? (i.value = {
|
|
440
|
-
status:
|
|
441
|
-
response:
|
|
440
|
+
status: Oe.NoResults,
|
|
441
|
+
response: u,
|
|
442
442
|
error: l
|
|
443
|
-
},
|
|
444
|
-
status:
|
|
445
|
-
response:
|
|
443
|
+
}, u) : (i.value = {
|
|
444
|
+
status: Oe.Error,
|
|
445
|
+
response: u,
|
|
446
446
|
error: l
|
|
447
|
-
},
|
|
447
|
+
}, u);
|
|
448
448
|
}
|
|
449
449
|
}, fetcherState: i };
|
|
450
450
|
}
|
|
@@ -453,25 +453,25 @@ function Lr() {
|
|
|
453
453
|
getPropValue: (e, n) => (n == null ? void 0 : n[e]) ?? void 0
|
|
454
454
|
};
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function Pr() {
|
|
457
457
|
return {
|
|
458
458
|
convertKeyToTitle: (e, n = "_") => e ? e.split(n).map((t) => t.toLowerCase() === "id" ? t.toUpperCase() : t.charAt(0).toUpperCase() + t.substring(1)).join(" ") : ""
|
|
459
459
|
};
|
|
460
460
|
}
|
|
461
|
-
const fn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,
|
|
461
|
+
const fn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Pt = (e) => {
|
|
462
462
|
if (typeof e != "string")
|
|
463
463
|
throw new TypeError("Invalid argument expected string");
|
|
464
464
|
const n = e.match(fn);
|
|
465
465
|
if (!n)
|
|
466
466
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
467
467
|
return n.shift(), n;
|
|
468
|
-
},
|
|
468
|
+
}, qt = (e) => e === "*" || e === "x" || e === "X", Ut = (e) => {
|
|
469
469
|
const n = parseInt(e, 10);
|
|
470
470
|
return isNaN(n) ? e : n;
|
|
471
|
-
},
|
|
472
|
-
if (
|
|
471
|
+
}, qr = (e, n) => typeof e != typeof n ? [String(e), String(n)] : [e, n], Ur = (e, n) => {
|
|
472
|
+
if (qt(e) || qt(n))
|
|
473
473
|
return 0;
|
|
474
|
-
const [t, r] =
|
|
474
|
+
const [t, r] = qr(Ut(e), Ut(n));
|
|
475
475
|
return t > r ? 1 : t < r ? -1 : 0;
|
|
476
476
|
}, Rt = (e, n) => {
|
|
477
477
|
for (let t = 0; t < Math.max(e.length, n.length); t++) {
|
|
@@ -481,7 +481,7 @@ const fn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
481
481
|
}
|
|
482
482
|
return 0;
|
|
483
483
|
}, Rr = (e, n) => {
|
|
484
|
-
const t =
|
|
484
|
+
const t = Pt(e), r = Pt(n), o = t.pop(), a = r.pop(), i = Rt(t, r);
|
|
485
485
|
return i !== 0 ? i : o && a ? Rt(o.split("."), a.split(".")) : o || a ? o ? -1 : 1 : 0;
|
|
486
486
|
}, Vt = (e, n, t) => {
|
|
487
487
|
Vr(t);
|
|
@@ -513,27 +513,36 @@ function Gr(e) {
|
|
|
513
513
|
const [i, s] = a;
|
|
514
514
|
return !(i && Vt(o, i, "<") || s && Vt(o, s, ">"));
|
|
515
515
|
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
516
|
+
function Hr(e) {
|
|
517
|
+
const n = M(0), t = M(0), r = M(!1);
|
|
518
|
+
return xe(e, (o) => {
|
|
519
|
+
o && !r.value && (n.value = o.offsetWidth, t.value = o.scrollWidth, r.value = !0);
|
|
520
|
+
}), {
|
|
521
|
+
isTruncated: x(() => n.value < t.value)
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
const ce = {
|
|
525
|
+
useAxios: At,
|
|
526
|
+
useDebouncedFilter: Br,
|
|
527
|
+
useDeleteUrlBuilder: Fr,
|
|
528
|
+
useErrors: Kr,
|
|
521
529
|
useFetcher: Nr,
|
|
522
530
|
useFetchUrlBuilder: pn,
|
|
523
531
|
useHelpers: Lr,
|
|
524
|
-
useStringHelpers:
|
|
525
|
-
useI18n:
|
|
526
|
-
useGatewayFeatureSupported: Gr
|
|
527
|
-
|
|
532
|
+
useStringHelpers: Pr,
|
|
533
|
+
useI18n: St,
|
|
534
|
+
useGatewayFeatureSupported: Gr,
|
|
535
|
+
useTruncationDetector: Hr
|
|
536
|
+
}, zr = {
|
|
528
537
|
fail: "Failed to copy id to clipboard",
|
|
529
538
|
success: {
|
|
530
539
|
prefix: "Successfully",
|
|
531
540
|
content: " copied to clipboard"
|
|
532
541
|
}
|
|
533
|
-
},
|
|
534
|
-
message:
|
|
535
|
-
iconTitle:
|
|
536
|
-
},
|
|
542
|
+
}, Yr = "Copy to clipboard", Jr = {
|
|
543
|
+
message: zr,
|
|
544
|
+
iconTitle: Yr
|
|
545
|
+
}, Wr = "kong-ui-copy-uuid-notify", Zr = { class: "kong-ui-copy-uuid" }, Qr = ["onClick"], Gt = 15, Xr = /* @__PURE__ */ ie({
|
|
537
546
|
__name: "CopyUuid",
|
|
538
547
|
props: {
|
|
539
548
|
uuid: {
|
|
@@ -577,23 +586,23 @@ const de = {
|
|
|
577
586
|
},
|
|
578
587
|
emits: ["success", "error"],
|
|
579
588
|
setup(e, { emit: n }) {
|
|
580
|
-
const t = e, { t: r } = It("en-us",
|
|
581
|
-
}), a =
|
|
589
|
+
const t = e, { t: r } = It("en-us", Jr), o = t.notify || mr(Wr, () => {
|
|
590
|
+
}), a = x(() => t.idTooltip ? {
|
|
582
591
|
label: t.idTooltip,
|
|
583
592
|
positionFixed: !0,
|
|
584
593
|
placement: "bottomStart"
|
|
585
594
|
} : {
|
|
586
595
|
title: t.uuid
|
|
587
|
-
}), i =
|
|
596
|
+
}), i = x(() => !!(t.tooltip && t.successTooltip)), s = M(t.tooltip), l = x(() => t.tooltip ? {
|
|
588
597
|
label: s.value,
|
|
589
598
|
positionFixed: !0,
|
|
590
599
|
maxWidth: "500px",
|
|
591
600
|
placement: "bottomStart"
|
|
592
|
-
} : {}),
|
|
601
|
+
} : {}), u = x(() => t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${t.uuid.substring(0, 5)}` : t.uuid), d = (m) => {
|
|
593
602
|
s.value = m, setTimeout(() => {
|
|
594
603
|
s.value = t.tooltip;
|
|
595
604
|
}, 1800);
|
|
596
|
-
},
|
|
605
|
+
}, c = (m) => {
|
|
597
606
|
if (!m(t.uuid)) {
|
|
598
607
|
typeof o == "function" && o({
|
|
599
608
|
type: "error",
|
|
@@ -608,31 +617,31 @@ const de = {
|
|
|
608
617
|
}), i.value ? d(t.successTooltip) : n("success", t.uuid);
|
|
609
618
|
};
|
|
610
619
|
return (m, g) => {
|
|
611
|
-
const k =
|
|
612
|
-
return f(),
|
|
613
|
-
e.format !== "hidden" ? (f(),
|
|
620
|
+
const k = L("KIcon"), _ = L("KClipboardProvider");
|
|
621
|
+
return f(), T("div", Zr, [
|
|
622
|
+
e.format !== "hidden" ? (f(), R(ze(e.idTooltip ? "KTooltip" : "div"), ht({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
614
623
|
default: v(() => [
|
|
615
|
-
|
|
616
|
-
class:
|
|
624
|
+
q("div", {
|
|
625
|
+
class: Fe([
|
|
617
626
|
"uuid-container",
|
|
618
627
|
e.truncated ? "truncated-uuid" : null,
|
|
619
628
|
e.useMono ? "mono" : null
|
|
620
629
|
])
|
|
621
|
-
},
|
|
630
|
+
}, O(u.value), 3)
|
|
622
631
|
]),
|
|
623
632
|
_: 1
|
|
624
633
|
}, 16)) : G("", !0),
|
|
625
|
-
(f(),
|
|
634
|
+
(f(), R(ze(e.tooltip ? "KTooltip" : "div"), ht(l.value, { class: "uuid-icon-wrapper" }), {
|
|
626
635
|
default: v(() => [
|
|
627
|
-
|
|
636
|
+
F(_, null, {
|
|
628
637
|
default: v(({ copyToClipboard: p }) => [
|
|
629
|
-
|
|
638
|
+
q("span", {
|
|
630
639
|
"data-testid": "copy-to-clipboard",
|
|
631
640
|
role: "button",
|
|
632
641
|
tabindex: "0",
|
|
633
|
-
onClick: rt((
|
|
642
|
+
onClick: rt((w) => c(p), ["stop"])
|
|
634
643
|
}, [
|
|
635
|
-
|
|
644
|
+
F(k, {
|
|
636
645
|
class: "uuid-icon",
|
|
637
646
|
color: e.iconColor,
|
|
638
647
|
"hide-title": !!e.tooltip || void 0,
|
|
@@ -640,7 +649,7 @@ const de = {
|
|
|
640
649
|
size: "16",
|
|
641
650
|
title: h(r)("iconTitle")
|
|
642
651
|
}, null, 8, ["color", "hide-title", "title"])
|
|
643
|
-
], 8,
|
|
652
|
+
], 8, Qr)
|
|
644
653
|
]),
|
|
645
654
|
_: 1
|
|
646
655
|
})
|
|
@@ -650,15 +659,15 @@ const de = {
|
|
|
650
659
|
]);
|
|
651
660
|
};
|
|
652
661
|
}
|
|
653
|
-
}),
|
|
662
|
+
}), eo = (e, n) => {
|
|
654
663
|
const t = e.__vccOpts || e;
|
|
655
664
|
for (const [r, o] of n)
|
|
656
665
|
t[r] = o;
|
|
657
666
|
return t;
|
|
658
|
-
}, gn = /* @__PURE__ */ Xr
|
|
667
|
+
}, gn = /* @__PURE__ */ eo(Xr, [["__scopeId", "data-v-bfdaf6f7"]]), to = {
|
|
659
668
|
key: 0,
|
|
660
669
|
class: "config-card-fieldset-title"
|
|
661
|
-
},
|
|
670
|
+
}, no = /* @__PURE__ */ ie({
|
|
662
671
|
__name: "JsonCardItem",
|
|
663
672
|
props: {
|
|
664
673
|
item: {
|
|
@@ -675,22 +684,22 @@ const de = {
|
|
|
675
684
|
}
|
|
676
685
|
},
|
|
677
686
|
setup(e) {
|
|
678
|
-
const n = e, { i18n: { t } } =
|
|
687
|
+
const n = e, { i18n: { t } } = ce.useI18n(), { convertKeyToTitle: r } = ce.useStringHelpers(), o = x(() => n.item.key ?? "json-array-item"), a = x(() => n.item.value ?? n.item), i = x(() => {
|
|
679
688
|
const l = JSON.parse(JSON.stringify(a.value));
|
|
680
689
|
return n.isArrayItem && delete l.name, l;
|
|
681
|
-
}), s =
|
|
690
|
+
}), s = x(() => {
|
|
682
691
|
var l;
|
|
683
692
|
return n.isArrayItem ? (l = a.value) != null && l.name ? r(a.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
684
693
|
});
|
|
685
|
-
return (l,
|
|
686
|
-
class:
|
|
694
|
+
return (l, u) => (f(), R(ze(e.isArrayItem ? "fieldset" : "div"), {
|
|
695
|
+
class: Fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
687
696
|
}, {
|
|
688
697
|
default: v(() => [
|
|
689
|
-
e.isArrayItem ? (f(),
|
|
690
|
-
|
|
698
|
+
e.isArrayItem ? (f(), T("legend", to, [
|
|
699
|
+
q("b", null, O(s.value), 1)
|
|
691
700
|
])) : G("", !0),
|
|
692
|
-
(f(!0),
|
|
693
|
-
key: `${o.value}-property-${
|
|
701
|
+
(f(!0), T(ve, null, ye(Object.keys(i.value), (d, c) => (f(), R(xt, {
|
|
702
|
+
key: `${o.value}-property-${c}`,
|
|
694
703
|
item: {
|
|
695
704
|
key: d,
|
|
696
705
|
label: h(r)(d),
|
|
@@ -706,7 +715,7 @@ const de = {
|
|
|
706
715
|
for (const [r, o] of n)
|
|
707
716
|
t[r] = o;
|
|
708
717
|
return t;
|
|
709
|
-
}, yn = /* @__PURE__ */ ke(
|
|
718
|
+
}, yn = /* @__PURE__ */ ke(no, [["__scopeId", "data-v-68ca83ec"]]), ro = /* @__PURE__ */ ie({
|
|
710
719
|
__name: "InternalLinkItem",
|
|
711
720
|
props: {
|
|
712
721
|
item: {
|
|
@@ -716,24 +725,24 @@ const de = {
|
|
|
716
725
|
},
|
|
717
726
|
emits: ["navigation-click"],
|
|
718
727
|
setup(e) {
|
|
719
|
-
const { i18n: { t: n } } =
|
|
728
|
+
const { i18n: { t: n } } = ce.useI18n();
|
|
720
729
|
return (t, r) => {
|
|
721
|
-
const o =
|
|
722
|
-
return f(),
|
|
723
|
-
|
|
730
|
+
const o = L("KButton");
|
|
731
|
+
return f(), T("div", null, [
|
|
732
|
+
F(o, {
|
|
724
733
|
appearance: "btn-link",
|
|
725
734
|
class: "navigation-button",
|
|
726
735
|
onClick: r[0] || (r[0] = (a) => t.$emit("navigation-click", e.item))
|
|
727
736
|
}, {
|
|
728
737
|
default: v(() => [
|
|
729
|
-
Q(
|
|
738
|
+
Q(O(e.item.value || h(n)("baseConfigCard.commonFields.link")), 1)
|
|
730
739
|
]),
|
|
731
740
|
_: 1
|
|
732
741
|
})
|
|
733
742
|
]);
|
|
734
743
|
};
|
|
735
744
|
}
|
|
736
|
-
}),
|
|
745
|
+
}), oo = /* @__PURE__ */ ke(ro, [["__scopeId", "data-v-7410504d"]]), ao = /* @__PURE__ */ ie({
|
|
737
746
|
__name: "StatusBadge",
|
|
738
747
|
props: {
|
|
739
748
|
status: {
|
|
@@ -742,22 +751,22 @@ const de = {
|
|
|
742
751
|
}
|
|
743
752
|
},
|
|
744
753
|
setup(e) {
|
|
745
|
-
const { i18n: { t: n } } =
|
|
754
|
+
const { i18n: { t: n } } = ce.useI18n();
|
|
746
755
|
return (t, r) => {
|
|
747
|
-
const o =
|
|
748
|
-
return f(),
|
|
756
|
+
const o = L("KBadge");
|
|
757
|
+
return f(), R(o, {
|
|
749
758
|
appearance: e.status ? "success" : "neutral"
|
|
750
759
|
}, {
|
|
751
760
|
default: v(() => [
|
|
752
|
-
Q(
|
|
761
|
+
Q(O(e.status ? h(n)("baseConfigCard.statusBadge.enabledLabel") : h(n)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
753
762
|
]),
|
|
754
763
|
_: 1
|
|
755
764
|
}, 8, ["appearance"]);
|
|
756
765
|
};
|
|
757
766
|
}
|
|
758
|
-
}),
|
|
767
|
+
}), io = "#0044f4", so = "#e0e4ea", lo = "#3a3f51", uo = "1px", co = "20px", po = { class: "config-card-details-row" }, fo = ["data-testid"], mo = ["data-testid"], go = ["data-testid"], yo = ["data-testid"], ho = { key: 1 }, vo = ["data-testid"], bo = ["data-testid"], Co = ["data-testid"], ko = ["data-testid"], _o = {
|
|
759
768
|
name: "ConfigCardItem",
|
|
760
|
-
components: { CopyUuid: gn, JsonCardItem: yn, StatusBadge:
|
|
769
|
+
components: { CopyUuid: gn, JsonCardItem: yn, StatusBadge: ao, InternalLinkItem: oo }
|
|
761
770
|
}, wo = /* @__PURE__ */ ie({
|
|
762
771
|
..._o,
|
|
763
772
|
props: {
|
|
@@ -779,13 +788,13 @@ const de = {
|
|
|
779
788
|
emits: ["navigation-click"],
|
|
780
789
|
setup(e, { emit: n }) {
|
|
781
790
|
const t = e;
|
|
782
|
-
lr((
|
|
783
|
-
"
|
|
784
|
-
|
|
785
|
-
"
|
|
786
|
-
"
|
|
791
|
+
lr((g) => ({
|
|
792
|
+
"11ca2174": u.value ? "none" : `solid ${h(uo)} ${h(so)}`,
|
|
793
|
+
"57a0f6a7": l.value && i.value ? "block" : "flex",
|
|
794
|
+
"66118e4e": l.value && i.value ? "100%" : t.slim ? "50%" : "25%",
|
|
795
|
+
"660d0298": l.value && i.value ? "100%" : t.slim ? "50%" : "75%"
|
|
787
796
|
}));
|
|
788
|
-
const r = ut(), { i18n: { t: o, formatUnixTimeStamp: a } } =
|
|
797
|
+
const r = ut(), { i18n: { t: o, formatUnixTimeStamp: a } } = ce.useI18n(), i = x(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = x(() => !!(t.item.tooltip || r["label-tooltip"])), l = x(() => t.item.type === ne.Json || t.item.type === ne.JsonArray), u = x(() => t.item.type === ne.JsonArray), d = x(() => {
|
|
789
798
|
switch (t.item.type) {
|
|
790
799
|
case ne.ID:
|
|
791
800
|
return {
|
|
@@ -871,8 +880,8 @@ const de = {
|
|
|
871
880
|
attrs: {
|
|
872
881
|
"data-testid": `${t.item.key}-internal-link`,
|
|
873
882
|
item: t.item,
|
|
874
|
-
onNavigationClick: (
|
|
875
|
-
n("navigation-click",
|
|
883
|
+
onNavigationClick: (g) => {
|
|
884
|
+
n("navigation-click", g);
|
|
876
885
|
}
|
|
877
886
|
}
|
|
878
887
|
};
|
|
@@ -911,120 +920,128 @@ const de = {
|
|
|
911
920
|
text: t.item.value
|
|
912
921
|
};
|
|
913
922
|
}
|
|
914
|
-
});
|
|
915
|
-
return (
|
|
916
|
-
const
|
|
917
|
-
return f(),
|
|
918
|
-
|
|
923
|
+
}), c = M(), { isTruncated: m } = ce.useTruncationDetector(c);
|
|
924
|
+
return (g, k) => {
|
|
925
|
+
const _ = L("KLabel"), p = L("KBadge"), w = L("KMethodBadge"), y = L("KTooltip");
|
|
926
|
+
return f(), T("div", po, [
|
|
927
|
+
q("div", {
|
|
919
928
|
class: "config-card-details-label",
|
|
920
929
|
"data-testid": `${e.item.key}-label`
|
|
921
930
|
}, [
|
|
922
|
-
Z(
|
|
923
|
-
|
|
931
|
+
Z(g.$slots, "label", { item: e.item }, () => [
|
|
932
|
+
F(_, { "tooltip-attributes": { maxWidth: "500px" } }, Te({
|
|
924
933
|
default: v(() => [
|
|
925
|
-
Q(
|
|
934
|
+
Q(O(e.item.label) + " ", 1)
|
|
926
935
|
]),
|
|
927
936
|
_: 2
|
|
928
937
|
}, [
|
|
929
938
|
s.value ? {
|
|
930
939
|
name: "tooltip",
|
|
931
940
|
fn: v(() => [
|
|
932
|
-
|
|
941
|
+
q("div", {
|
|
933
942
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
934
943
|
}, [
|
|
935
|
-
Z(
|
|
936
|
-
Q(
|
|
944
|
+
Z(g.$slots, "label-tooltip", {}, () => [
|
|
945
|
+
Q(O(e.item.tooltip), 1)
|
|
937
946
|
], !0)
|
|
938
|
-
], 8,
|
|
947
|
+
], 8, mo)
|
|
939
948
|
]),
|
|
940
949
|
key: "0"
|
|
941
950
|
} : void 0
|
|
942
951
|
]), 1024)
|
|
943
952
|
], !0)
|
|
944
|
-
], 8,
|
|
945
|
-
|
|
953
|
+
], 8, fo),
|
|
954
|
+
q("div", {
|
|
946
955
|
class: "config-card-details-value",
|
|
947
956
|
"data-testid": `${e.item.key}-property-value`
|
|
948
957
|
}, [
|
|
949
|
-
Z(
|
|
958
|
+
Z(g.$slots, e.item.key, {
|
|
950
959
|
rowValue: e.item.value
|
|
951
960
|
}, () => [
|
|
952
|
-
i.value ? (f(),
|
|
953
|
-
(f(),
|
|
961
|
+
i.value ? (f(), T("div", ho, [
|
|
962
|
+
(f(), R(ze(d.value.tag), ur(cr(d.value.attrs)), {
|
|
954
963
|
default: v(() => [
|
|
955
|
-
d.value.additionalComponent === "KBadge" ? (f(),
|
|
964
|
+
d.value.additionalComponent === "KBadge" ? (f(), T("div", {
|
|
956
965
|
key: 0,
|
|
957
966
|
"data-testid": `${e.item.key}-badge-tags`
|
|
958
967
|
}, [
|
|
959
|
-
(f(!0),
|
|
960
|
-
key: `${e.item.key}-badge-tag-${
|
|
968
|
+
(f(!0), T(ve, null, ye(e.item.value, (b, B) => (f(), R(p, {
|
|
969
|
+
key: `${e.item.key}-badge-tag-${B}`,
|
|
961
970
|
class: "config-badge",
|
|
962
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
963
|
-
"truncation-tooltip":
|
|
971
|
+
"data-testid": `${e.item.key}-badge-tag-${B}`,
|
|
972
|
+
"truncation-tooltip": b
|
|
964
973
|
}, {
|
|
965
974
|
default: v(() => [
|
|
966
|
-
Q(
|
|
975
|
+
Q(O(b), 1)
|
|
967
976
|
]),
|
|
968
977
|
_: 2
|
|
969
978
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
970
|
-
], 8,
|
|
971
|
-
d.value.additionalComponent === "CopyUuid" ? (f(),
|
|
979
|
+
], 8, vo)) : G("", !0),
|
|
980
|
+
d.value.additionalComponent === "CopyUuid" ? (f(), T("div", {
|
|
972
981
|
key: 1,
|
|
973
982
|
class: "copy-uuid-array",
|
|
974
983
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
975
984
|
}, [
|
|
976
|
-
(f(!0),
|
|
977
|
-
key: `${e.item.key}-copy-uuid-${
|
|
978
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
979
|
-
uuid:
|
|
985
|
+
(f(!0), T(ve, null, ye(e.item.value, (b, B) => (f(), R(h(gn), ht(d.value.childAttrs, {
|
|
986
|
+
key: `${e.item.key}-copy-uuid-${B}`,
|
|
987
|
+
"data-testid": `${e.item.key}-copy-uuid-${B}`,
|
|
988
|
+
uuid: b
|
|
980
989
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
981
|
-
], 8,
|
|
990
|
+
], 8, bo)) : d.value.additionalComponent === "KMethodBadge" ? (f(), T("div", {
|
|
982
991
|
key: 2,
|
|
983
992
|
class: "method-badge-array",
|
|
984
993
|
"data-testid": `${e.item.key}-badge-methods`
|
|
985
994
|
}, [
|
|
986
|
-
(f(!0),
|
|
987
|
-
key: `${e.item.key}-badge-method-${
|
|
995
|
+
(f(!0), T(ve, null, ye(e.item.value, (b, B) => (f(), R(w, {
|
|
996
|
+
key: `${e.item.key}-badge-method-${B}`,
|
|
988
997
|
class: "config-badge",
|
|
989
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
998
|
+
"data-testid": `${e.item.key}-badge-method-${B}`,
|
|
990
999
|
"is-rounded": "",
|
|
991
|
-
label:
|
|
992
|
-
method: h(vr).includes(
|
|
1000
|
+
label: b,
|
|
1001
|
+
method: h(vr).includes(b.toLowerCase()) ? b.toLowerCase() : "custom"
|
|
993
1002
|
}, {
|
|
994
1003
|
default: v(() => [
|
|
995
|
-
Q(
|
|
1004
|
+
Q(O(b), 1)
|
|
996
1005
|
]),
|
|
997
1006
|
_: 2
|
|
998
1007
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
999
|
-
], 8,
|
|
1000
|
-
d.value.additionalComponent === "JsonCardItem" ? (f(),
|
|
1008
|
+
], 8, Co)) : G("", !0),
|
|
1009
|
+
d.value.additionalComponent === "JsonCardItem" ? (f(), T("div", {
|
|
1001
1010
|
key: 3,
|
|
1002
1011
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1003
1012
|
}, [
|
|
1004
|
-
(f(!0),
|
|
1005
|
-
key: `json-array-item-${
|
|
1006
|
-
index:
|
|
1013
|
+
(f(!0), T(ve, null, ye(e.item.value, (b, B) => (f(), R(yn, {
|
|
1014
|
+
key: `json-array-item-${B}`,
|
|
1015
|
+
index: B,
|
|
1007
1016
|
"is-array-item": "",
|
|
1008
|
-
item:
|
|
1017
|
+
item: b
|
|
1009
1018
|
}, null, 8, ["index", "item"]))), 128))
|
|
1010
|
-
], 8,
|
|
1019
|
+
], 8, ko)) : (f(), R(y, {
|
|
1011
1020
|
key: 4,
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1021
|
+
label: h(m) && e.item.value
|
|
1022
|
+
}, {
|
|
1023
|
+
default: v(() => [
|
|
1024
|
+
q("span", {
|
|
1025
|
+
ref_key: "textContent",
|
|
1026
|
+
ref: c,
|
|
1027
|
+
class: Fe(["attrs-data-text", { truncated: e.truncated }])
|
|
1028
|
+
}, O(d.value.text), 3)
|
|
1029
|
+
]),
|
|
1030
|
+
_: 1
|
|
1031
|
+
}, 8, ["label"]))
|
|
1015
1032
|
]),
|
|
1016
1033
|
_: 1
|
|
1017
1034
|
}, 16))
|
|
1018
|
-
])) : (f(),
|
|
1035
|
+
])) : (f(), T("div", {
|
|
1019
1036
|
key: 0,
|
|
1020
1037
|
"data-testid": `${e.item.key}-no-value`
|
|
1021
|
-
}, " – ", 8,
|
|
1038
|
+
}, " – ", 8, yo))
|
|
1022
1039
|
], !0)
|
|
1023
|
-
], 8,
|
|
1040
|
+
], 8, go)
|
|
1024
1041
|
]);
|
|
1025
1042
|
};
|
|
1026
1043
|
}
|
|
1027
|
-
}),
|
|
1044
|
+
}), xt = /* @__PURE__ */ ke(wo, [["__scopeId", "data-v-f68d4fa1"]]);
|
|
1028
1045
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1029
1046
|
function hn(e) {
|
|
1030
1047
|
return typeof e > "u" || e === null;
|
|
@@ -1032,17 +1049,17 @@ function hn(e) {
|
|
|
1032
1049
|
function Io(e) {
|
|
1033
1050
|
return typeof e == "object" && e !== null;
|
|
1034
1051
|
}
|
|
1035
|
-
function
|
|
1052
|
+
function Ao(e) {
|
|
1036
1053
|
return Array.isArray(e) ? e : hn(e) ? [] : [e];
|
|
1037
1054
|
}
|
|
1038
|
-
function
|
|
1055
|
+
function So(e, n) {
|
|
1039
1056
|
var t, r, o, a;
|
|
1040
1057
|
if (n)
|
|
1041
1058
|
for (a = Object.keys(n), t = 0, r = a.length; t < r; t += 1)
|
|
1042
1059
|
o = a[t], e[o] = n[o];
|
|
1043
1060
|
return e;
|
|
1044
1061
|
}
|
|
1045
|
-
function
|
|
1062
|
+
function xo(e, n) {
|
|
1046
1063
|
var t = "", r;
|
|
1047
1064
|
for (r = 0; r < n; r += 1)
|
|
1048
1065
|
t += e;
|
|
@@ -1051,13 +1068,13 @@ function So(e, n) {
|
|
|
1051
1068
|
function To(e) {
|
|
1052
1069
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1053
1070
|
}
|
|
1054
|
-
var $o = hn,
|
|
1071
|
+
var $o = hn, jo = Io, Mo = Ao, Eo = xo, Oo = To, Bo = So, le = {
|
|
1055
1072
|
isNothing: $o,
|
|
1056
|
-
isObject:
|
|
1057
|
-
toArray:
|
|
1073
|
+
isObject: jo,
|
|
1074
|
+
toArray: Mo,
|
|
1058
1075
|
repeat: Eo,
|
|
1059
|
-
isNegativeZero:
|
|
1060
|
-
extend:
|
|
1076
|
+
isNegativeZero: Oo,
|
|
1077
|
+
extend: Bo
|
|
1061
1078
|
};
|
|
1062
1079
|
function vn(e, n) {
|
|
1063
1080
|
var t = "", r = e.reason || "(unknown reason)";
|
|
@@ -1085,37 +1102,37 @@ function mt(e, n, t, r, o) {
|
|
|
1085
1102
|
function gt(e, n) {
|
|
1086
1103
|
return le.repeat(" ", n - e.length) + e;
|
|
1087
1104
|
}
|
|
1088
|
-
function
|
|
1105
|
+
function Fo(e, n) {
|
|
1089
1106
|
if (n = Object.create(n || null), !e.buffer)
|
|
1090
1107
|
return null;
|
|
1091
1108
|
n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2);
|
|
1092
1109
|
for (var t = /\r?\n|\r|\0/g, r = [0], o = [], a, i = -1; a = t.exec(e.buffer); )
|
|
1093
1110
|
o.push(a.index), r.push(a.index + a[0].length), e.position <= a.index && i < 0 && (i = r.length - 2);
|
|
1094
1111
|
i < 0 && (i = r.length - 1);
|
|
1095
|
-
var s = "", l,
|
|
1112
|
+
var s = "", l, u, d = Math.min(e.line + n.linesAfter, o.length).toString().length, c = n.maxLength - (n.indent + d + 3);
|
|
1096
1113
|
for (l = 1; l <= n.linesBefore && !(i - l < 0); l++)
|
|
1097
|
-
|
|
1114
|
+
u = mt(
|
|
1098
1115
|
e.buffer,
|
|
1099
1116
|
r[i - l],
|
|
1100
1117
|
o[i - l],
|
|
1101
1118
|
e.position - (r[i] - r[i - l]),
|
|
1102
|
-
|
|
1103
|
-
), s = le.repeat(" ", n.indent) + gt((e.line - l + 1).toString(), d) + " | " +
|
|
1119
|
+
c
|
|
1120
|
+
), s = le.repeat(" ", n.indent) + gt((e.line - l + 1).toString(), d) + " | " + u.str + `
|
|
1104
1121
|
` + s;
|
|
1105
|
-
for (
|
|
1106
|
-
`, s += le.repeat("-", n.indent + d + 3 +
|
|
1122
|
+
for (u = mt(e.buffer, r[i], o[i], e.position, c), s += le.repeat(" ", n.indent) + gt((e.line + 1).toString(), d) + " | " + u.str + `
|
|
1123
|
+
`, s += le.repeat("-", n.indent + d + 3 + u.pos) + `^
|
|
1107
1124
|
`, l = 1; l <= n.linesAfter && !(i + l >= o.length); l++)
|
|
1108
|
-
|
|
1125
|
+
u = mt(
|
|
1109
1126
|
e.buffer,
|
|
1110
1127
|
r[i + l],
|
|
1111
1128
|
o[i + l],
|
|
1112
1129
|
e.position - (r[i] - r[i + l]),
|
|
1113
|
-
|
|
1114
|
-
), s += le.repeat(" ", n.indent) + gt((e.line + l + 1).toString(), d) + " | " +
|
|
1130
|
+
c
|
|
1131
|
+
), s += le.repeat(" ", n.indent) + gt((e.line + l + 1).toString(), d) + " | " + u.str + `
|
|
1115
1132
|
`;
|
|
1116
1133
|
return s.replace(/\n$/, "");
|
|
1117
1134
|
}
|
|
1118
|
-
var
|
|
1135
|
+
var Ko = Fo, No = [
|
|
1119
1136
|
"kind",
|
|
1120
1137
|
"multi",
|
|
1121
1138
|
"resolve",
|
|
@@ -1131,7 +1148,7 @@ var Bo = Ko, No = [
|
|
|
1131
1148
|
"sequence",
|
|
1132
1149
|
"mapping"
|
|
1133
1150
|
];
|
|
1134
|
-
function
|
|
1151
|
+
function Po(e) {
|
|
1135
1152
|
var n = {};
|
|
1136
1153
|
return e !== null && Object.keys(e).forEach(function(t) {
|
|
1137
1154
|
e[t].forEach(function(r) {
|
|
@@ -1139,7 +1156,7 @@ function qo(e) {
|
|
|
1139
1156
|
});
|
|
1140
1157
|
}), n;
|
|
1141
1158
|
}
|
|
1142
|
-
function
|
|
1159
|
+
function qo(e, n) {
|
|
1143
1160
|
if (n = n || {}, Object.keys(n).forEach(function(t) {
|
|
1144
1161
|
if (No.indexOf(t) === -1)
|
|
1145
1162
|
throw new me('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
@@ -1147,10 +1164,10 @@ function Po(e, n) {
|
|
|
1147
1164
|
return !0;
|
|
1148
1165
|
}, this.construct = n.construct || function(t) {
|
|
1149
1166
|
return t;
|
|
1150
|
-
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases =
|
|
1167
|
+
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = Po(n.styleAliases || null), Lo.indexOf(this.kind) === -1)
|
|
1151
1168
|
throw new me('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1152
1169
|
}
|
|
1153
|
-
var pe =
|
|
1170
|
+
var pe = qo;
|
|
1154
1171
|
function Ht(e, n) {
|
|
1155
1172
|
var t = [];
|
|
1156
1173
|
return e[n].forEach(function(r) {
|
|
@@ -1277,7 +1294,7 @@ function Ho(e) {
|
|
|
1277
1294
|
function zo(e) {
|
|
1278
1295
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1279
1296
|
}
|
|
1280
|
-
var
|
|
1297
|
+
var An = new pe("tag:yaml.org,2002:bool", {
|
|
1281
1298
|
kind: "scalar",
|
|
1282
1299
|
resolve: Go,
|
|
1283
1300
|
construct: Ho,
|
|
@@ -1368,7 +1385,7 @@ function Qo(e) {
|
|
|
1368
1385
|
function Xo(e) {
|
|
1369
1386
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !le.isNegativeZero(e);
|
|
1370
1387
|
}
|
|
1371
|
-
var
|
|
1388
|
+
var Sn = new pe("tag:yaml.org,2002:int", {
|
|
1372
1389
|
kind: "scalar",
|
|
1373
1390
|
resolve: Zo,
|
|
1374
1391
|
construct: Qo,
|
|
@@ -1445,7 +1462,7 @@ function oa(e, n) {
|
|
|
1445
1462
|
function aa(e) {
|
|
1446
1463
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || le.isNegativeZero(e));
|
|
1447
1464
|
}
|
|
1448
|
-
var
|
|
1465
|
+
var xn = new pe("tag:yaml.org,2002:float", {
|
|
1449
1466
|
kind: "scalar",
|
|
1450
1467
|
resolve: ta,
|
|
1451
1468
|
construct: na,
|
|
@@ -1455,21 +1472,21 @@ var Sn = new pe("tag:yaml.org,2002:float", {
|
|
|
1455
1472
|
}), Tn = wn.extend({
|
|
1456
1473
|
implicit: [
|
|
1457
1474
|
In,
|
|
1458
|
-
xn,
|
|
1459
1475
|
An,
|
|
1460
|
-
Sn
|
|
1476
|
+
Sn,
|
|
1477
|
+
xn
|
|
1461
1478
|
]
|
|
1462
|
-
}), $n = Tn,
|
|
1479
|
+
}), $n = Tn, jn = new RegExp(
|
|
1463
1480
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1464
|
-
),
|
|
1481
|
+
), Mn = new RegExp(
|
|
1465
1482
|
"^([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]))?))?$"
|
|
1466
1483
|
);
|
|
1467
1484
|
function ia(e) {
|
|
1468
|
-
return e === null ? !1 :
|
|
1485
|
+
return e === null ? !1 : jn.exec(e) !== null || Mn.exec(e) !== null;
|
|
1469
1486
|
}
|
|
1470
1487
|
function sa(e) {
|
|
1471
|
-
var n, t, r, o, a, i, s, l = 0,
|
|
1472
|
-
if (n =
|
|
1488
|
+
var n, t, r, o, a, i, s, l = 0, u = null, d, c, m;
|
|
1489
|
+
if (n = jn.exec(e), n === null && (n = Mn.exec(e)), n === null)
|
|
1473
1490
|
throw new Error("Date resolve error");
|
|
1474
1491
|
if (t = +n[1], r = +n[2] - 1, o = +n[3], !n[4])
|
|
1475
1492
|
return new Date(Date.UTC(t, r, o));
|
|
@@ -1478,7 +1495,7 @@ function sa(e) {
|
|
|
1478
1495
|
l += "0";
|
|
1479
1496
|
l = +l;
|
|
1480
1497
|
}
|
|
1481
|
-
return n[9] && (d = +n[10],
|
|
1498
|
+
return n[9] && (d = +n[10], c = +(n[11] || 0), u = (d * 60 + c) * 6e4, n[9] === "-" && (u = -u)), m = new Date(Date.UTC(t, r, o, a, i, s, l)), u && m.setTime(m.getTime() - u), m;
|
|
1482
1499
|
}
|
|
1483
1500
|
function la(e) {
|
|
1484
1501
|
return e.toISOString();
|
|
@@ -1493,7 +1510,7 @@ var En = new pe("tag:yaml.org,2002:timestamp", {
|
|
|
1493
1510
|
function ua(e) {
|
|
1494
1511
|
return e === "<<" || e === null;
|
|
1495
1512
|
}
|
|
1496
|
-
var
|
|
1513
|
+
var On = new pe("tag:yaml.org,2002:merge", {
|
|
1497
1514
|
kind: "scalar",
|
|
1498
1515
|
resolve: ua
|
|
1499
1516
|
}), Tt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
@@ -1525,7 +1542,7 @@ function pa(e) {
|
|
|
1525
1542
|
function fa(e) {
|
|
1526
1543
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1527
1544
|
}
|
|
1528
|
-
var
|
|
1545
|
+
var Bn = new pe("tag:yaml.org,2002:binary", {
|
|
1529
1546
|
kind: "scalar",
|
|
1530
1547
|
resolve: ca,
|
|
1531
1548
|
construct: da,
|
|
@@ -1557,7 +1574,7 @@ function ya(e) {
|
|
|
1557
1574
|
function ha(e) {
|
|
1558
1575
|
return e !== null ? e : [];
|
|
1559
1576
|
}
|
|
1560
|
-
var
|
|
1577
|
+
var Fn = new pe("tag:yaml.org,2002:omap", {
|
|
1561
1578
|
kind: "sequence",
|
|
1562
1579
|
resolve: ya,
|
|
1563
1580
|
construct: ha
|
|
@@ -1581,7 +1598,7 @@ function Ca(e) {
|
|
|
1581
1598
|
r = i[n], o = Object.keys(r), a[n] = [o[0], r[o[0]]];
|
|
1582
1599
|
return a;
|
|
1583
1600
|
}
|
|
1584
|
-
var
|
|
1601
|
+
var Kn = new pe("tag:yaml.org,2002:pairs", {
|
|
1585
1602
|
kind: "sequence",
|
|
1586
1603
|
resolve: ba,
|
|
1587
1604
|
construct: Ca
|
|
@@ -1605,28 +1622,28 @@ var Nn = new pe("tag:yaml.org,2002:set", {
|
|
|
1605
1622
|
}), $t = $n.extend({
|
|
1606
1623
|
implicit: [
|
|
1607
1624
|
En,
|
|
1608
|
-
|
|
1625
|
+
On
|
|
1609
1626
|
],
|
|
1610
1627
|
explicit: [
|
|
1628
|
+
Bn,
|
|
1611
1629
|
Fn,
|
|
1612
1630
|
Kn,
|
|
1613
|
-
Bn,
|
|
1614
1631
|
Nn
|
|
1615
1632
|
]
|
|
1616
|
-
}), Me = Object.prototype.hasOwnProperty, ot = 1, Ln = 2,
|
|
1633
|
+
}), Me = Object.prototype.hasOwnProperty, ot = 1, Ln = 2, Pn = 3, at = 4, yt = 1, Ia = 2, zt = 3, Aa = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Sa = /[\x85\u2028\u2029]/, xa = /[,\[\]\{\}]/, qn = /^(?:!|!!|![a-z\-]+!)$/i, Un = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1617
1634
|
function Yt(e) {
|
|
1618
1635
|
return Object.prototype.toString.call(e);
|
|
1619
1636
|
}
|
|
1620
1637
|
function we(e) {
|
|
1621
1638
|
return e === 10 || e === 13;
|
|
1622
1639
|
}
|
|
1623
|
-
function
|
|
1640
|
+
function Be(e) {
|
|
1624
1641
|
return e === 9 || e === 32;
|
|
1625
1642
|
}
|
|
1626
1643
|
function he(e) {
|
|
1627
1644
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1628
1645
|
}
|
|
1629
|
-
function
|
|
1646
|
+
function qe(e) {
|
|
1630
1647
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1631
1648
|
}
|
|
1632
1649
|
function Ta(e) {
|
|
@@ -1636,14 +1653,14 @@ function Ta(e) {
|
|
|
1636
1653
|
function $a(e) {
|
|
1637
1654
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1638
1655
|
}
|
|
1639
|
-
function
|
|
1656
|
+
function ja(e) {
|
|
1640
1657
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1641
1658
|
}
|
|
1642
1659
|
function Jt(e) {
|
|
1643
1660
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1644
1661
|
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1645
1662
|
}
|
|
1646
|
-
function
|
|
1663
|
+
function Ma(e) {
|
|
1647
1664
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1648
1665
|
(e - 65536 >> 10) + 55296,
|
|
1649
1666
|
(e - 65536 & 1023) + 56320
|
|
@@ -1664,7 +1681,7 @@ function Dn(e, n) {
|
|
|
1664
1681
|
line: e.line,
|
|
1665
1682
|
column: e.position - e.lineStart
|
|
1666
1683
|
};
|
|
1667
|
-
return t.snippet =
|
|
1684
|
+
return t.snippet = Ko(t), new me(n, t);
|
|
1668
1685
|
}
|
|
1669
1686
|
function S(e, n) {
|
|
1670
1687
|
throw Dn(e, n);
|
|
@@ -1679,7 +1696,7 @@ var Wt = {
|
|
|
1679
1696
|
},
|
|
1680
1697
|
TAG: function(e, n, t) {
|
|
1681
1698
|
var r, o;
|
|
1682
|
-
t.length !== 2 && S(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1],
|
|
1699
|
+
t.length !== 2 && S(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1], qn.test(r) || S(e, "ill-formed tag handle (first argument) of the TAG directive"), Me.call(e.tagMap, r) && S(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Un.test(o) || S(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1683
1700
|
try {
|
|
1684
1701
|
o = decodeURIComponent(o);
|
|
1685
1702
|
} catch {
|
|
@@ -1688,14 +1705,14 @@ var Wt = {
|
|
|
1688
1705
|
e.tagMap[r] = o;
|
|
1689
1706
|
}
|
|
1690
1707
|
};
|
|
1691
|
-
function
|
|
1708
|
+
function je(e, n, t, r) {
|
|
1692
1709
|
var o, a, i, s;
|
|
1693
1710
|
if (n < t) {
|
|
1694
1711
|
if (s = e.input.slice(n, t), r)
|
|
1695
1712
|
for (o = 0, a = s.length; o < a; o += 1)
|
|
1696
1713
|
i = s.charCodeAt(o), i === 9 || 32 <= i && i <= 1114111 || S(e, "expected valid JSON character");
|
|
1697
1714
|
else
|
|
1698
|
-
|
|
1715
|
+
Aa.test(s) && S(e, "the stream contains non-printable characters");
|
|
1699
1716
|
e.result += s;
|
|
1700
1717
|
}
|
|
1701
1718
|
}
|
|
@@ -1705,14 +1722,14 @@ function Zt(e, n, t, r) {
|
|
|
1705
1722
|
a = o[i], Me.call(n, a) || (n[a] = t[a], r[a] = !0);
|
|
1706
1723
|
}
|
|
1707
1724
|
function Ue(e, n, t, r, o, a, i, s, l) {
|
|
1708
|
-
var
|
|
1725
|
+
var u, d;
|
|
1709
1726
|
if (Array.isArray(o))
|
|
1710
|
-
for (o = Array.prototype.slice.call(o),
|
|
1711
|
-
Array.isArray(o[
|
|
1727
|
+
for (o = Array.prototype.slice.call(o), u = 0, d = o.length; u < d; u += 1)
|
|
1728
|
+
Array.isArray(o[u]) && S(e, "nested arrays are not supported inside keys"), typeof o == "object" && Yt(o[u]) === "[object Object]" && (o[u] = "[object Object]");
|
|
1712
1729
|
if (typeof o == "object" && Yt(o) === "[object Object]" && (o = "[object Object]"), o = String(o), n === null && (n = {}), r === "tag:yaml.org,2002:merge")
|
|
1713
1730
|
if (Array.isArray(a))
|
|
1714
|
-
for (
|
|
1715
|
-
Zt(e, n, a[
|
|
1731
|
+
for (u = 0, d = a.length; u < d; u += 1)
|
|
1732
|
+
Zt(e, n, a[u], t);
|
|
1716
1733
|
else
|
|
1717
1734
|
Zt(e, n, a, t);
|
|
1718
1735
|
else
|
|
@@ -1724,20 +1741,20 @@ function Ue(e, n, t, r, o, a, i, s, l) {
|
|
|
1724
1741
|
}) : n[o] = a, delete t[o];
|
|
1725
1742
|
return n;
|
|
1726
1743
|
}
|
|
1727
|
-
function
|
|
1744
|
+
function jt(e) {
|
|
1728
1745
|
var n;
|
|
1729
1746
|
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : S(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1730
1747
|
}
|
|
1731
1748
|
function ae(e, n, t) {
|
|
1732
1749
|
for (var r = 0, o = e.input.charCodeAt(e.position); o !== 0; ) {
|
|
1733
|
-
for (;
|
|
1750
|
+
for (; Be(o); )
|
|
1734
1751
|
o === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), o = e.input.charCodeAt(++e.position);
|
|
1735
1752
|
if (n && o === 35)
|
|
1736
1753
|
do
|
|
1737
1754
|
o = e.input.charCodeAt(++e.position);
|
|
1738
1755
|
while (o !== 10 && o !== 13 && o !== 0);
|
|
1739
1756
|
if (we(o))
|
|
1740
|
-
for (
|
|
1757
|
+
for (jt(e), o = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; o === 32; )
|
|
1741
1758
|
e.lineIndent++, o = e.input.charCodeAt(++e.position);
|
|
1742
1759
|
else
|
|
1743
1760
|
break;
|
|
@@ -1748,77 +1765,77 @@ function dt(e) {
|
|
|
1748
1765
|
var n = e.position, t;
|
|
1749
1766
|
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)));
|
|
1750
1767
|
}
|
|
1751
|
-
function
|
|
1768
|
+
function Mt(e, n) {
|
|
1752
1769
|
n === 1 ? e.result += " " : n > 1 && (e.result += le.repeat(`
|
|
1753
1770
|
`, n - 1));
|
|
1754
1771
|
}
|
|
1755
|
-
function
|
|
1756
|
-
var r, o, a, i, s, l,
|
|
1757
|
-
if (g = e.input.charCodeAt(e.position), he(g) ||
|
|
1772
|
+
function Oa(e, n, t) {
|
|
1773
|
+
var r, o, a, i, s, l, u, d, c = e.kind, m = e.result, g;
|
|
1774
|
+
if (g = e.input.charCodeAt(e.position), he(g) || qe(g) || g === 35 || g === 38 || g === 42 || g === 33 || g === 124 || g === 62 || g === 39 || g === 34 || g === 37 || g === 64 || g === 96 || (g === 63 || g === 45) && (o = e.input.charCodeAt(e.position + 1), he(o) || t && qe(o)))
|
|
1758
1775
|
return !1;
|
|
1759
1776
|
for (e.kind = "scalar", e.result = "", a = i = e.position, s = !1; g !== 0; ) {
|
|
1760
1777
|
if (g === 58) {
|
|
1761
|
-
if (o = e.input.charCodeAt(e.position + 1), he(o) || t &&
|
|
1778
|
+
if (o = e.input.charCodeAt(e.position + 1), he(o) || t && qe(o))
|
|
1762
1779
|
break;
|
|
1763
1780
|
} else if (g === 35) {
|
|
1764
1781
|
if (r = e.input.charCodeAt(e.position - 1), he(r))
|
|
1765
1782
|
break;
|
|
1766
1783
|
} else {
|
|
1767
|
-
if (e.position === e.lineStart && dt(e) || t &&
|
|
1784
|
+
if (e.position === e.lineStart && dt(e) || t && qe(g))
|
|
1768
1785
|
break;
|
|
1769
1786
|
if (we(g))
|
|
1770
|
-
if (l = e.line,
|
|
1787
|
+
if (l = e.line, u = e.lineStart, d = e.lineIndent, ae(e, !1, -1), e.lineIndent >= n) {
|
|
1771
1788
|
s = !0, g = e.input.charCodeAt(e.position);
|
|
1772
1789
|
continue;
|
|
1773
1790
|
} else {
|
|
1774
|
-
e.position = i, e.line = l, e.lineStart =
|
|
1791
|
+
e.position = i, e.line = l, e.lineStart = u, e.lineIndent = d;
|
|
1775
1792
|
break;
|
|
1776
1793
|
}
|
|
1777
1794
|
}
|
|
1778
|
-
s && (
|
|
1795
|
+
s && (je(e, a, i, !1), Mt(e, e.line - l), a = i = e.position, s = !1), Be(g) || (i = e.position + 1), g = e.input.charCodeAt(++e.position);
|
|
1779
1796
|
}
|
|
1780
|
-
return
|
|
1797
|
+
return je(e, a, i, !1), e.result ? !0 : (e.kind = c, e.result = m, !1);
|
|
1781
1798
|
}
|
|
1782
|
-
function
|
|
1799
|
+
function Ba(e, n) {
|
|
1783
1800
|
var t, r, o;
|
|
1784
1801
|
if (t = e.input.charCodeAt(e.position), t !== 39)
|
|
1785
1802
|
return !1;
|
|
1786
1803
|
for (e.kind = "scalar", e.result = "", e.position++, r = o = e.position; (t = e.input.charCodeAt(e.position)) !== 0; )
|
|
1787
1804
|
if (t === 39)
|
|
1788
|
-
if (
|
|
1805
|
+
if (je(e, r, e.position, !0), t = e.input.charCodeAt(++e.position), t === 39)
|
|
1789
1806
|
r = e.position, e.position++, o = e.position;
|
|
1790
1807
|
else
|
|
1791
1808
|
return !0;
|
|
1792
1809
|
else
|
|
1793
|
-
we(t) ? (
|
|
1810
|
+
we(t) ? (je(e, r, o, !0), Mt(e, ae(e, !1, n)), r = o = e.position) : e.position === e.lineStart && dt(e) ? S(e, "unexpected end of the document within a single quoted scalar") : (e.position++, o = e.position);
|
|
1794
1811
|
S(e, "unexpected end of the stream within a single quoted scalar");
|
|
1795
1812
|
}
|
|
1796
|
-
function
|
|
1813
|
+
function Fa(e, n) {
|
|
1797
1814
|
var t, r, o, a, i, s;
|
|
1798
1815
|
if (s = e.input.charCodeAt(e.position), s !== 34)
|
|
1799
1816
|
return !1;
|
|
1800
1817
|
for (e.kind = "scalar", e.result = "", e.position++, t = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1801
1818
|
if (s === 34)
|
|
1802
|
-
return
|
|
1819
|
+
return je(e, t, e.position, !0), e.position++, !0;
|
|
1803
1820
|
if (s === 92) {
|
|
1804
|
-
if (
|
|
1821
|
+
if (je(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), we(s))
|
|
1805
1822
|
ae(e, !1, n);
|
|
1806
1823
|
else if (s < 256 && Rn[s])
|
|
1807
1824
|
e.result += Vn[s], e.position++;
|
|
1808
1825
|
else if ((i = $a(s)) > 0) {
|
|
1809
1826
|
for (o = i, a = 0; o > 0; o--)
|
|
1810
1827
|
s = e.input.charCodeAt(++e.position), (i = Ta(s)) >= 0 ? a = (a << 4) + i : S(e, "expected hexadecimal character");
|
|
1811
|
-
e.result +=
|
|
1828
|
+
e.result += Ma(a), e.position++;
|
|
1812
1829
|
} else
|
|
1813
1830
|
S(e, "unknown escape sequence");
|
|
1814
1831
|
t = r = e.position;
|
|
1815
1832
|
} else
|
|
1816
|
-
we(s) ? (
|
|
1833
|
+
we(s) ? (je(e, t, r, !0), Mt(e, ae(e, !1, n)), t = r = e.position) : e.position === e.lineStart && dt(e) ? S(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1817
1834
|
}
|
|
1818
1835
|
S(e, "unexpected end of the stream within a double quoted scalar");
|
|
1819
1836
|
}
|
|
1820
|
-
function
|
|
1821
|
-
var t = !0, r, o, a, i = e.tag, s, l = e.anchor,
|
|
1837
|
+
function Ka(e, n) {
|
|
1838
|
+
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, u, d, c, m, g, k = /* @__PURE__ */ Object.create(null), _, p, w, y;
|
|
1822
1839
|
if (y = e.input.charCodeAt(e.position), y === 91)
|
|
1823
1840
|
d = 93, g = !1, s = [];
|
|
1824
1841
|
else if (y === 123)
|
|
@@ -1828,38 +1845,38 @@ function Ba(e, n) {
|
|
|
1828
1845
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), y = e.input.charCodeAt(++e.position); y !== 0; ) {
|
|
1829
1846
|
if (ae(e, !0, n), y = e.input.charCodeAt(e.position), y === d)
|
|
1830
1847
|
return e.position++, e.tag = i, e.anchor = l, e.kind = g ? "mapping" : "sequence", e.result = s, !0;
|
|
1831
|
-
t ? y === 44 && S(e, "expected the node content, but found ','") : S(e, "missed comma between flow collection entries"), p = _ =
|
|
1848
|
+
t ? y === 44 && S(e, "expected the node content, but found ','") : S(e, "missed comma between flow collection entries"), p = _ = w = null, c = m = !1, y === 63 && (u = e.input.charCodeAt(e.position + 1), he(u) && (c = m = !0, e.position++, ae(e, !0, n))), r = e.line, o = e.lineStart, a = e.position, Re(e, n, ot, !1, !0), p = e.tag, _ = e.result, ae(e, !0, n), y = e.input.charCodeAt(e.position), (m || e.line === r) && y === 58 && (c = !0, y = e.input.charCodeAt(++e.position), ae(e, !0, n), Re(e, n, ot, !1, !0), w = e.result), g ? Ue(e, s, k, p, _, w, r, o, a) : c ? s.push(Ue(e, null, k, p, _, w, r, o, a)) : s.push(_), ae(e, !0, n), y = e.input.charCodeAt(e.position), y === 44 ? (t = !0, y = e.input.charCodeAt(++e.position)) : t = !1;
|
|
1832
1849
|
}
|
|
1833
1850
|
S(e, "unexpected end of the stream within a flow collection");
|
|
1834
1851
|
}
|
|
1835
1852
|
function Na(e, n) {
|
|
1836
|
-
var t, r, o = yt, a = !1, i = !1, s = n, l = 0,
|
|
1837
|
-
if (
|
|
1853
|
+
var t, r, o = yt, a = !1, i = !1, s = n, l = 0, u = !1, d, c;
|
|
1854
|
+
if (c = e.input.charCodeAt(e.position), c === 124)
|
|
1838
1855
|
r = !1;
|
|
1839
|
-
else if (
|
|
1856
|
+
else if (c === 62)
|
|
1840
1857
|
r = !0;
|
|
1841
1858
|
else
|
|
1842
1859
|
return !1;
|
|
1843
|
-
for (e.kind = "scalar", e.result = "";
|
|
1844
|
-
if (
|
|
1845
|
-
yt === o ? o =
|
|
1846
|
-
else if ((d =
|
|
1860
|
+
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
1861
|
+
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
1862
|
+
yt === o ? o = c === 43 ? zt : Ia : S(e, "repeat of a chomping mode identifier");
|
|
1863
|
+
else if ((d = ja(c)) >= 0)
|
|
1847
1864
|
d === 0 ? S(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? S(e, "repeat of an indentation width identifier") : (s = n + d - 1, i = !0);
|
|
1848
1865
|
else
|
|
1849
1866
|
break;
|
|
1850
|
-
if (
|
|
1867
|
+
if (Be(c)) {
|
|
1851
1868
|
do
|
|
1852
|
-
|
|
1853
|
-
while (
|
|
1854
|
-
if (
|
|
1869
|
+
c = e.input.charCodeAt(++e.position);
|
|
1870
|
+
while (Be(c));
|
|
1871
|
+
if (c === 35)
|
|
1855
1872
|
do
|
|
1856
|
-
|
|
1857
|
-
while (!we(
|
|
1873
|
+
c = e.input.charCodeAt(++e.position);
|
|
1874
|
+
while (!we(c) && c !== 0);
|
|
1858
1875
|
}
|
|
1859
|
-
for (;
|
|
1860
|
-
for (
|
|
1861
|
-
e.lineIndent++,
|
|
1862
|
-
if (!i && e.lineIndent > s && (s = e.lineIndent), we(
|
|
1876
|
+
for (; c !== 0; ) {
|
|
1877
|
+
for (jt(e), e.lineIndent = 0, c = e.input.charCodeAt(e.position); (!i || e.lineIndent < s) && c === 32; )
|
|
1878
|
+
e.lineIndent++, c = e.input.charCodeAt(++e.position);
|
|
1879
|
+
if (!i && e.lineIndent > s && (s = e.lineIndent), we(c)) {
|
|
1863
1880
|
l++;
|
|
1864
1881
|
continue;
|
|
1865
1882
|
}
|
|
@@ -1869,13 +1886,13 @@ function Na(e, n) {
|
|
|
1869
1886
|
`);
|
|
1870
1887
|
break;
|
|
1871
1888
|
}
|
|
1872
|
-
for (r ?
|
|
1873
|
-
`, a ? 1 + l : l)) :
|
|
1889
|
+
for (r ? Be(c) ? (u = !0, e.result += le.repeat(`
|
|
1890
|
+
`, a ? 1 + l : l)) : u ? (u = !1, e.result += le.repeat(`
|
|
1874
1891
|
`, l + 1)) : l === 0 ? a && (e.result += " ") : e.result += le.repeat(`
|
|
1875
1892
|
`, l) : e.result += le.repeat(`
|
|
1876
|
-
`, a ? 1 + l : l), a = !0, i = !0, l = 0, t = e.position; !we(
|
|
1877
|
-
|
|
1878
|
-
|
|
1893
|
+
`, a ? 1 + l : l), a = !0, i = !0, l = 0, t = e.position; !we(c) && c !== 0; )
|
|
1894
|
+
c = e.input.charCodeAt(++e.position);
|
|
1895
|
+
je(e, t, e.position, !1);
|
|
1879
1896
|
}
|
|
1880
1897
|
return !0;
|
|
1881
1898
|
}
|
|
@@ -1888,7 +1905,7 @@ function Qt(e, n) {
|
|
|
1888
1905
|
a.push(null), l = e.input.charCodeAt(e.position);
|
|
1889
1906
|
continue;
|
|
1890
1907
|
}
|
|
1891
|
-
if (t = e.line, Re(e, n,
|
|
1908
|
+
if (t = e.line, Re(e, n, Pn, !1, !0), a.push(e.result), ae(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && l !== 0)
|
|
1892
1909
|
S(e, "bad indentation of a sequence entry");
|
|
1893
1910
|
else if (e.lineIndent < n)
|
|
1894
1911
|
break;
|
|
@@ -1896,37 +1913,37 @@ function Qt(e, n) {
|
|
|
1896
1913
|
return s ? (e.tag = r, e.anchor = o, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1897
1914
|
}
|
|
1898
1915
|
function La(e, n, t) {
|
|
1899
|
-
var r, o, a, i, s, l,
|
|
1916
|
+
var r, o, a, i, s, l, u = e.tag, d = e.anchor, c = {}, m = /* @__PURE__ */ Object.create(null), g = null, k = null, _ = null, p = !1, w = !1, y;
|
|
1900
1917
|
if (e.firstTabInLine !== -1)
|
|
1901
1918
|
return !1;
|
|
1902
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] =
|
|
1919
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), y = e.input.charCodeAt(e.position); y !== 0; ) {
|
|
1903
1920
|
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, S(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (y === 63 || y === 58) && he(r))
|
|
1904
|
-
y === 63 ? (p && (Ue(e,
|
|
1921
|
+
y === 63 ? (p && (Ue(e, c, m, g, k, null, i, s, l), g = k = _ = null), w = !0, p = !0, o = !0) : p ? (p = !1, o = !0) : S(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, y = r;
|
|
1905
1922
|
else {
|
|
1906
1923
|
if (i = e.line, s = e.lineStart, l = e.position, !Re(e, t, Ln, !1, !0))
|
|
1907
1924
|
break;
|
|
1908
1925
|
if (e.line === a) {
|
|
1909
|
-
for (y = e.input.charCodeAt(e.position);
|
|
1926
|
+
for (y = e.input.charCodeAt(e.position); Be(y); )
|
|
1910
1927
|
y = e.input.charCodeAt(++e.position);
|
|
1911
1928
|
if (y === 58)
|
|
1912
|
-
y = e.input.charCodeAt(++e.position), he(y) || S(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ue(e,
|
|
1913
|
-
else if (
|
|
1929
|
+
y = e.input.charCodeAt(++e.position), he(y) || S(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ue(e, c, m, g, k, null, i, s, l), g = k = _ = null), w = !0, p = !1, o = !1, g = e.tag, k = e.result;
|
|
1930
|
+
else if (w)
|
|
1914
1931
|
S(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1915
1932
|
else
|
|
1916
|
-
return e.tag =
|
|
1917
|
-
} else if (
|
|
1933
|
+
return e.tag = u, e.anchor = d, !0;
|
|
1934
|
+
} else if (w)
|
|
1918
1935
|
S(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1919
1936
|
else
|
|
1920
|
-
return e.tag =
|
|
1937
|
+
return e.tag = u, e.anchor = d, !0;
|
|
1921
1938
|
}
|
|
1922
|
-
if ((e.line === a || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Re(e, n, at, !0, o) && (p ? k = e.result : _ = e.result), p || (Ue(e,
|
|
1939
|
+
if ((e.line === a || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Re(e, n, at, !0, o) && (p ? k = e.result : _ = e.result), p || (Ue(e, c, m, g, k, _, i, s, l), g = k = _ = null), ae(e, !0, -1), y = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > n) && y !== 0)
|
|
1923
1940
|
S(e, "bad indentation of a mapping entry");
|
|
1924
1941
|
else if (e.lineIndent < n)
|
|
1925
1942
|
break;
|
|
1926
1943
|
}
|
|
1927
|
-
return p && Ue(e,
|
|
1944
|
+
return p && Ue(e, c, m, g, k, null, i, s, l), w && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), w;
|
|
1928
1945
|
}
|
|
1929
|
-
function
|
|
1946
|
+
function Pa(e) {
|
|
1930
1947
|
var n, t = !1, r = !1, o, a, i;
|
|
1931
1948
|
if (i = e.input.charCodeAt(e.position), i !== 33)
|
|
1932
1949
|
return !1;
|
|
@@ -1937,8 +1954,8 @@ function qa(e) {
|
|
|
1937
1954
|
e.position < e.length ? (a = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) : S(e, "unexpected end of the stream within a verbatim tag");
|
|
1938
1955
|
} else {
|
|
1939
1956
|
for (; i !== 0 && !he(i); )
|
|
1940
|
-
i === 33 && (r ? S(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(n - 1, e.position + 1),
|
|
1941
|
-
a = e.input.slice(n, e.position),
|
|
1957
|
+
i === 33 && (r ? S(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(n - 1, e.position + 1), qn.test(o) || S(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), i = e.input.charCodeAt(++e.position);
|
|
1958
|
+
a = e.input.slice(n, e.position), xa.test(a) && S(e, "tag suffix cannot contain flow indicator characters");
|
|
1942
1959
|
}
|
|
1943
1960
|
a && !Un.test(a) && S(e, "tag name cannot contain such characters: " + a);
|
|
1944
1961
|
try {
|
|
@@ -1948,11 +1965,11 @@ function qa(e) {
|
|
|
1948
1965
|
}
|
|
1949
1966
|
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 : S(e, 'undeclared tag handle "' + o + '"'), !0;
|
|
1950
1967
|
}
|
|
1951
|
-
function
|
|
1968
|
+
function qa(e) {
|
|
1952
1969
|
var n, t;
|
|
1953
1970
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
1954
1971
|
return !1;
|
|
1955
|
-
for (e.anchor !== null && S(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !he(t) && !
|
|
1972
|
+
for (e.anchor !== null && S(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !he(t) && !qe(t); )
|
|
1956
1973
|
t = e.input.charCodeAt(++e.position);
|
|
1957
1974
|
return e.position === n && S(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
1958
1975
|
}
|
|
@@ -1960,20 +1977,20 @@ function Ua(e) {
|
|
|
1960
1977
|
var n, t, r;
|
|
1961
1978
|
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
1962
1979
|
return !1;
|
|
1963
|
-
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !he(r) && !
|
|
1980
|
+
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !he(r) && !qe(r); )
|
|
1964
1981
|
r = e.input.charCodeAt(++e.position);
|
|
1965
1982
|
return e.position === n && S(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), Me.call(e.anchorMap, t) || S(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], ae(e, !0, -1), !0;
|
|
1966
1983
|
}
|
|
1967
1984
|
function Re(e, n, t, r, o) {
|
|
1968
|
-
var a, i, s, l = 1,
|
|
1969
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = i = s = at === t ||
|
|
1970
|
-
for (;
|
|
1971
|
-
ae(e, !0, -1) ? (
|
|
1972
|
-
if (s && (s =
|
|
1985
|
+
var a, i, s, l = 1, u = !1, d = !1, c, m, g, k, _, p;
|
|
1986
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = i = s = at === t || Pn === t, r && ae(e, !0, -1) && (u = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
1987
|
+
for (; Pa(e) || qa(e); )
|
|
1988
|
+
ae(e, !0, -1) ? (u = !0, s = a, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
1989
|
+
if (s && (s = u || o), (l === 1 || at === t) && (ot === t || Ln === t ? _ = n : _ = n + 1, p = e.position - e.lineStart, l === 1 ? s && (Qt(e, p) || La(e, p, _)) || Ka(e, _) ? d = !0 : (i && Na(e, _) || Ba(e, _) || Fa(e, _) ? d = !0 : Ua(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && S(e, "alias node should not have any properties")) : Oa(e, _, ot === t) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && Qt(e, p))), e.tag === null)
|
|
1973
1990
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1974
1991
|
else if (e.tag === "?") {
|
|
1975
|
-
for (e.result !== null && e.kind !== "scalar" && S(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'),
|
|
1976
|
-
if (k = e.implicitTypes[
|
|
1992
|
+
for (e.result !== null && e.kind !== "scalar" && S(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, m = e.implicitTypes.length; c < m; c += 1)
|
|
1993
|
+
if (k = e.implicitTypes[c], k.resolve(e.result)) {
|
|
1977
1994
|
e.result = k.construct(e.result), e.tag = k.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1978
1995
|
break;
|
|
1979
1996
|
}
|
|
@@ -1981,9 +1998,9 @@ function Re(e, n, t, r, o) {
|
|
|
1981
1998
|
if (Me.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1982
1999
|
k = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1983
2000
|
else
|
|
1984
|
-
for (k = null, g = e.typeMap.multi[e.kind || "fallback"],
|
|
1985
|
-
if (e.tag.slice(0, g[
|
|
1986
|
-
k = g[
|
|
2001
|
+
for (k = null, g = e.typeMap.multi[e.kind || "fallback"], c = 0, m = g.length; c < m; c += 1)
|
|
2002
|
+
if (e.tag.slice(0, g[c].tag.length) === g[c].tag) {
|
|
2003
|
+
k = g[c];
|
|
1987
2004
|
break;
|
|
1988
2005
|
}
|
|
1989
2006
|
k || S(e, "unknown tag !<" + e.tag + ">"), e.result !== null && k.kind !== e.kind && S(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + k.kind + '", not "' + e.kind + '"'), k.resolve(e.result, e.tag) ? (e.result = k.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : S(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
@@ -1996,7 +2013,7 @@ function Ra(e) {
|
|
|
1996
2013
|
for (a = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !he(i); )
|
|
1997
2014
|
i = e.input.charCodeAt(++e.position);
|
|
1998
2015
|
for (r = e.input.slice(t, e.position), o = [], r.length < 1 && S(e, "directive name must not be less than one character in length"); i !== 0; ) {
|
|
1999
|
-
for (;
|
|
2016
|
+
for (; Be(i); )
|
|
2000
2017
|
i = e.input.charCodeAt(++e.position);
|
|
2001
2018
|
if (i === 35) {
|
|
2002
2019
|
do
|
|
@@ -2010,9 +2027,9 @@ function Ra(e) {
|
|
|
2010
2027
|
i = e.input.charCodeAt(++e.position);
|
|
2011
2028
|
o.push(e.input.slice(t, e.position));
|
|
2012
2029
|
}
|
|
2013
|
-
i !== 0 &&
|
|
2030
|
+
i !== 0 && jt(e), Me.call(Wt, r) ? Wt[r](e, r, o) : it(e, 'unknown document directive "' + r + '"');
|
|
2014
2031
|
}
|
|
2015
|
-
if (ae(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, ae(e, !0, -1)) : a && S(e, "directives end mark is expected"), Re(e, e.lineIndent - 1, at, !1, !0), ae(e, !0, -1), e.checkLineBreaks &&
|
|
2032
|
+
if (ae(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, ae(e, !0, -1)) : a && S(e, "directives end mark is expected"), Re(e, e.lineIndent - 1, at, !1, !0), ae(e, !0, -1), e.checkLineBreaks && Sa.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)) {
|
|
2016
2033
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ae(e, !0, -1));
|
|
2017
2034
|
return;
|
|
2018
2035
|
}
|
|
@@ -2159,27 +2176,27 @@ function er(e) {
|
|
|
2159
2176
|
var n = /^\n* /;
|
|
2160
2177
|
return n.test(e);
|
|
2161
2178
|
}
|
|
2162
|
-
var tr = 1, kt = 2, nr = 3, rr = 4,
|
|
2179
|
+
var tr = 1, kt = 2, nr = 3, rr = 4, Pe = 5;
|
|
2163
2180
|
function vi(e, n, t, r, o, a, i, s) {
|
|
2164
|
-
var l,
|
|
2181
|
+
var l, u = 0, d = null, c = !1, m = !1, g = r !== -1, k = -1, _ = yi(He(e, 0)) && hi(He(e, e.length - 1));
|
|
2165
2182
|
if (n || i)
|
|
2166
|
-
for (l = 0; l < e.length;
|
|
2167
|
-
if (
|
|
2168
|
-
return
|
|
2169
|
-
_ = _ && tn(
|
|
2183
|
+
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2184
|
+
if (u = He(e, l), !Ze(u))
|
|
2185
|
+
return Pe;
|
|
2186
|
+
_ = _ && tn(u, d, s), d = u;
|
|
2170
2187
|
}
|
|
2171
2188
|
else {
|
|
2172
|
-
for (l = 0; l < e.length;
|
|
2173
|
-
if (
|
|
2174
|
-
|
|
2189
|
+
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2190
|
+
if (u = He(e, l), u === Je)
|
|
2191
|
+
c = !0, g && (m = m || // Foldable line = too long, and not more-indented.
|
|
2175
2192
|
l - k - 1 > r && e[k + 1] !== " ", k = l);
|
|
2176
|
-
else if (!Ze(
|
|
2177
|
-
return
|
|
2178
|
-
_ = _ && tn(
|
|
2193
|
+
else if (!Ze(u))
|
|
2194
|
+
return Pe;
|
|
2195
|
+
_ = _ && tn(u, d, s), d = u;
|
|
2179
2196
|
}
|
|
2180
2197
|
m = m || g && l - k - 1 > r && e[k + 1] !== " ";
|
|
2181
2198
|
}
|
|
2182
|
-
return !
|
|
2199
|
+
return !c && !m ? _ && !i && !o(e) ? tr : a === We ? Pe : kt : t > 9 && er(e) ? Pe : i ? a === We ? Pe : kt : m ? rr : nr;
|
|
2183
2200
|
}
|
|
2184
2201
|
function bi(e, n, t, r, o) {
|
|
2185
2202
|
e.dump = function() {
|
|
@@ -2188,8 +2205,8 @@ function bi(e, n, t, r, o) {
|
|
|
2188
2205
|
if (!e.noCompatMode && (ui.indexOf(n) !== -1 || ci.test(n)))
|
|
2189
2206
|
return e.quotingType === We ? '"' + n + '"' : "'" + n + "'";
|
|
2190
2207
|
var a = e.indent * Math.max(1, t), i = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), s = r || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2191
|
-
function l(
|
|
2192
|
-
return gi(e,
|
|
2208
|
+
function l(u) {
|
|
2209
|
+
return gi(e, u);
|
|
2193
2210
|
}
|
|
2194
2211
|
switch (vi(
|
|
2195
2212
|
n,
|
|
@@ -2209,7 +2226,7 @@ function bi(e, n, t, r, o) {
|
|
|
2209
2226
|
return "|" + nn(n, e.indent) + rn(Xt(n, a));
|
|
2210
2227
|
case rr:
|
|
2211
2228
|
return ">" + nn(n, e.indent) + rn(Xt(Ci(n, i), a));
|
|
2212
|
-
case
|
|
2229
|
+
case Pe:
|
|
2213
2230
|
return '"' + ki(n) + '"';
|
|
2214
2231
|
default:
|
|
2215
2232
|
throw new me("impossible error: invalid scalar style");
|
|
@@ -2230,9 +2247,9 @@ function rn(e) {
|
|
|
2230
2247
|
}
|
|
2231
2248
|
function Ci(e, n) {
|
|
2232
2249
|
for (var t = /(\n+)([^\n]*)/g, r = function() {
|
|
2233
|
-
var
|
|
2250
|
+
var u = e.indexOf(`
|
|
2234
2251
|
`);
|
|
2235
|
-
return
|
|
2252
|
+
return u = u !== -1 ? u : e.length, t.lastIndex = u, on(e.slice(0, u), n);
|
|
2236
2253
|
}(), o = e[0] === `
|
|
2237
2254
|
` || e[0] === " ", a, i; i = t.exec(e); ) {
|
|
2238
2255
|
var s = i[1], l = i[2];
|
|
@@ -2259,23 +2276,23 @@ function ki(e) {
|
|
|
2259
2276
|
function _i(e, n, t) {
|
|
2260
2277
|
var r = "", o = e.tag, a, i, s;
|
|
2261
2278
|
for (a = 0, i = t.length; a < i; a += 1)
|
|
2262
|
-
s = t[a], e.replacer && (s = e.replacer.call(t, String(a), s)), (
|
|
2279
|
+
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);
|
|
2263
2280
|
e.tag = o, e.dump = "[" + r + "]";
|
|
2264
2281
|
}
|
|
2265
2282
|
function an(e, n, t, r) {
|
|
2266
2283
|
var o = "", a = e.tag, i, s, l;
|
|
2267
2284
|
for (i = 0, s = t.length; i < s; i += 1)
|
|
2268
|
-
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (
|
|
2285
|
+
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 += Ct(e, n)), e.dump && Je === e.dump.charCodeAt(0) ? o += "-" : o += "- ", o += e.dump);
|
|
2269
2286
|
e.tag = a, e.dump = o || "[]";
|
|
2270
2287
|
}
|
|
2271
2288
|
function wi(e, n, t) {
|
|
2272
|
-
var r = "", o = e.tag, a = Object.keys(t), i, s, l,
|
|
2289
|
+
var r = "", o = e.tag, a = Object.keys(t), i, s, l, u, d;
|
|
2273
2290
|
for (i = 0, s = a.length; i < s; i += 1)
|
|
2274
|
-
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = a[i],
|
|
2291
|
+
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = a[i], u = t[l], e.replacer && (u = e.replacer.call(t, l, u)), Se(e, n, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), Se(e, n, u, !1, !1) && (d += e.dump, r += d));
|
|
2275
2292
|
e.tag = o, e.dump = "{" + r + "}";
|
|
2276
2293
|
}
|
|
2277
2294
|
function Ii(e, n, t, r) {
|
|
2278
|
-
var o = "", a = e.tag, i = Object.keys(t), s, l,
|
|
2295
|
+
var o = "", a = e.tag, i = Object.keys(t), s, l, u, d, c, m;
|
|
2279
2296
|
if (e.sortKeys === !0)
|
|
2280
2297
|
i.sort();
|
|
2281
2298
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2283,7 +2300,7 @@ function Ii(e, n, t, r) {
|
|
|
2283
2300
|
else if (e.sortKeys)
|
|
2284
2301
|
throw new me("sortKeys must be a boolean or a function");
|
|
2285
2302
|
for (s = 0, l = i.length; s < l; s += 1)
|
|
2286
|
-
m = "", (!r || o !== "") && (m += Ct(e, n)),
|
|
2303
|
+
m = "", (!r || o !== "") && (m += Ct(e, n)), u = i[s], d = t[u], e.replacer && (d = e.replacer.call(t, u, d)), Se(e, n + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Je === e.dump.charCodeAt(0) ? m += "?" : m += "? "), m += e.dump, c && (m += Ct(e, n)), Se(e, n + 1, d, !0, c) && (e.dump && Je === e.dump.charCodeAt(0) ? m += ":" : m += ": ", m += e.dump, o += m));
|
|
2287
2304
|
e.tag = a, e.dump = o || "{}";
|
|
2288
2305
|
}
|
|
2289
2306
|
function sn(e, n, t) {
|
|
@@ -2303,18 +2320,18 @@ function sn(e, n, t) {
|
|
|
2303
2320
|
}
|
|
2304
2321
|
return !1;
|
|
2305
2322
|
}
|
|
2306
|
-
function
|
|
2323
|
+
function Se(e, n, t, r, o, a, i) {
|
|
2307
2324
|
e.tag = null, e.dump = t, sn(e, t, !1) || sn(e, t, !0);
|
|
2308
|
-
var s = zn.call(e.dump), l = r,
|
|
2325
|
+
var s = zn.call(e.dump), l = r, u;
|
|
2309
2326
|
r && (r = e.flowLevel < 0 || e.flowLevel > n);
|
|
2310
|
-
var d = s === "[object Object]" || s === "[object Array]",
|
|
2311
|
-
if (d && (
|
|
2312
|
-
e.dump = "*ref_" +
|
|
2327
|
+
var d = s === "[object Object]" || s === "[object Array]", c, m;
|
|
2328
|
+
if (d && (c = e.duplicates.indexOf(t), m = c !== -1), (e.tag !== null && e.tag !== "?" || m || e.indent !== 2 && n > 0) && (o = !1), m && e.usedDuplicates[c])
|
|
2329
|
+
e.dump = "*ref_" + c;
|
|
2313
2330
|
else {
|
|
2314
|
-
if (d && m && !e.usedDuplicates[
|
|
2315
|
-
r && Object.keys(e.dump).length !== 0 ? (Ii(e, n, e.dump, o), m && (e.dump = "&ref_" +
|
|
2331
|
+
if (d && m && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), s === "[object Object]")
|
|
2332
|
+
r && Object.keys(e.dump).length !== 0 ? (Ii(e, n, e.dump, o), m && (e.dump = "&ref_" + c + e.dump)) : (wi(e, n, e.dump), m && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2316
2333
|
else if (s === "[object Array]")
|
|
2317
|
-
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_" +
|
|
2334
|
+
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_" + c + e.dump)) : (_i(e, n, e.dump), m && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2318
2335
|
else if (s === "[object String]")
|
|
2319
2336
|
e.tag !== "?" && bi(e, e.dump, n, a, l);
|
|
2320
2337
|
else {
|
|
@@ -2322,13 +2339,13 @@ function Ae(e, n, t, r, o, a, i) {
|
|
|
2322
2339
|
return !1;
|
|
2323
2340
|
throw new me("unacceptable kind of an object to dump " + s);
|
|
2324
2341
|
}
|
|
2325
|
-
e.tag !== null && e.tag !== "?" && (
|
|
2342
|
+
e.tag !== null && e.tag !== "?" && (u = encodeURI(
|
|
2326
2343
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
2327
|
-
).replace(/!/g, "%21"), e.tag[0] === "!" ?
|
|
2344
|
+
).replace(/!/g, "%21"), e.tag[0] === "!" ? u = "!" + u : u.slice(0, 18) === "tag:yaml.org,2002:" ? u = "!!" + u.slice(18) : u = "!<" + u + ">", e.dump = u + " " + e.dump);
|
|
2328
2345
|
}
|
|
2329
2346
|
return !0;
|
|
2330
2347
|
}
|
|
2331
|
-
function
|
|
2348
|
+
function Ai(e, n) {
|
|
2332
2349
|
var t = [], r = [], o, a;
|
|
2333
2350
|
for (_t(e, t, r), o = 0, a = r.length; o < a; o += 1)
|
|
2334
2351
|
n.duplicates.push(t[r[o]]);
|
|
@@ -2346,49 +2363,49 @@ function _t(e, n, t) {
|
|
|
2346
2363
|
for (r = Object.keys(e), o = 0, a = r.length; o < a; o += 1)
|
|
2347
2364
|
_t(e[r[o]], n, t);
|
|
2348
2365
|
}
|
|
2349
|
-
function
|
|
2366
|
+
function Si(e, n) {
|
|
2350
2367
|
n = n || {};
|
|
2351
2368
|
var t = new mi(n);
|
|
2352
|
-
t.noRefs ||
|
|
2369
|
+
t.noRefs || Ai(e, t);
|
|
2353
2370
|
var r = e;
|
|
2354
|
-
return t.replacer && (r = t.replacer.call({ "": r }, "", r)),
|
|
2371
|
+
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), Se(t, 0, r, !0, !0) ? t.dump + `
|
|
2355
2372
|
` : "";
|
|
2356
2373
|
}
|
|
2357
|
-
var
|
|
2358
|
-
dump:
|
|
2374
|
+
var xi = Si, Ti = {
|
|
2375
|
+
dump: xi
|
|
2359
2376
|
};
|
|
2360
|
-
function
|
|
2377
|
+
function Ot(e, n) {
|
|
2361
2378
|
return function() {
|
|
2362
2379
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2363
2380
|
};
|
|
2364
2381
|
}
|
|
2365
|
-
var $i = pe,
|
|
2366
|
-
binary:
|
|
2367
|
-
float:
|
|
2382
|
+
var $i = pe, ji = bn, Mi = wn, Ei = Tn, Oi = $n, Bi = $t, Fi = Hn.load, Ki = Hn.loadAll, Ni = Ti.dump, Li = me, Pi = {
|
|
2383
|
+
binary: Bn,
|
|
2384
|
+
float: xn,
|
|
2368
2385
|
map: _n,
|
|
2369
2386
|
null: In,
|
|
2370
|
-
pairs:
|
|
2387
|
+
pairs: Kn,
|
|
2371
2388
|
set: Nn,
|
|
2372
2389
|
timestamp: En,
|
|
2373
|
-
bool:
|
|
2374
|
-
int:
|
|
2375
|
-
merge:
|
|
2376
|
-
omap:
|
|
2390
|
+
bool: An,
|
|
2391
|
+
int: Sn,
|
|
2392
|
+
merge: On,
|
|
2393
|
+
omap: Fn,
|
|
2377
2394
|
seq: kn,
|
|
2378
2395
|
str: Cn
|
|
2379
|
-
},
|
|
2396
|
+
}, qi = Ot("safeLoad", "load"), Ui = Ot("safeLoadAll", "loadAll"), Ri = Ot("safeDump", "dump"), Vi = {
|
|
2380
2397
|
Type: $i,
|
|
2381
|
-
Schema:
|
|
2382
|
-
FAILSAFE_SCHEMA:
|
|
2398
|
+
Schema: ji,
|
|
2399
|
+
FAILSAFE_SCHEMA: Mi,
|
|
2383
2400
|
JSON_SCHEMA: Ei,
|
|
2384
|
-
CORE_SCHEMA:
|
|
2385
|
-
DEFAULT_SCHEMA:
|
|
2386
|
-
load:
|
|
2387
|
-
loadAll:
|
|
2401
|
+
CORE_SCHEMA: Oi,
|
|
2402
|
+
DEFAULT_SCHEMA: Bi,
|
|
2403
|
+
load: Fi,
|
|
2404
|
+
loadAll: Ki,
|
|
2388
2405
|
dump: Ni,
|
|
2389
2406
|
YAMLException: Li,
|
|
2390
|
-
types:
|
|
2391
|
-
safeLoad:
|
|
2407
|
+
types: Pi,
|
|
2408
|
+
safeLoad: qi,
|
|
2392
2409
|
safeLoadAll: Ui,
|
|
2393
2410
|
safeDump: Ri
|
|
2394
2411
|
};
|
|
@@ -2430,54 +2447,54 @@ const Di = {
|
|
|
2430
2447
|
}
|
|
2431
2448
|
},
|
|
2432
2449
|
setup(e) {
|
|
2433
|
-
const n = e, t = ut(), { i18n: { t: r } } =
|
|
2434
|
-
return
|
|
2450
|
+
const n = e, t = ut(), { i18n: { t: r } } = ce.useI18n(), o = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), a = M(""), i = M("");
|
|
2451
|
+
return xe(() => n.format, (s) => {
|
|
2435
2452
|
s === "json" ? a.value = JSON.stringify(n.record, null, 2) : s === "yaml" && (i.value = Vi.dump(n.record));
|
|
2436
2453
|
}, { immediate: !0 }), (s, l) => {
|
|
2437
|
-
const
|
|
2438
|
-
return f(),
|
|
2439
|
-
e.format === "structured" ? (f(),
|
|
2440
|
-
(f(!0),
|
|
2454
|
+
const u = L("KCodeBlock");
|
|
2455
|
+
return f(), T(ve, null, [
|
|
2456
|
+
e.format === "structured" ? (f(), T("div", Di, [
|
|
2457
|
+
(f(!0), T(ve, null, ye(e.propListTypes, (d) => (f(), T("div", {
|
|
2441
2458
|
key: `config-card-details-${d}-props`,
|
|
2442
|
-
class:
|
|
2459
|
+
class: Fe(`config-card-details-${d}-props`),
|
|
2443
2460
|
"data-testid": `config-card-details-${d}-props`
|
|
2444
2461
|
}, [
|
|
2445
|
-
d !== "basic" ? (f(),
|
|
2446
|
-
(f(!0),
|
|
2447
|
-
key:
|
|
2448
|
-
item:
|
|
2449
|
-
},
|
|
2462
|
+
d !== "basic" ? (f(), T("div", Hi, O(d === "advanced" ? h(r)("baseConfigCard.sections.advanced") : h(r)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
2463
|
+
(f(!0), T(ve, null, ye(e.propertyCollections[d], (c) => (f(), R(xt, {
|
|
2464
|
+
key: c.key,
|
|
2465
|
+
item: c
|
|
2466
|
+
}, Te({
|
|
2450
2467
|
label: v(() => [
|
|
2451
|
-
Z(s.$slots, `${
|
|
2468
|
+
Z(s.$slots, `${c.key}-label`, { row: c }, void 0, !0)
|
|
2452
2469
|
]),
|
|
2453
|
-
[
|
|
2454
|
-
Z(s.$slots,
|
|
2455
|
-
row:
|
|
2470
|
+
[c.key]: v(({ rowValue: m }) => [
|
|
2471
|
+
Z(s.$slots, c.key, {
|
|
2472
|
+
row: c,
|
|
2456
2473
|
rowValue: m
|
|
2457
2474
|
}, void 0, !0)
|
|
2458
2475
|
]),
|
|
2459
2476
|
_: 2
|
|
2460
2477
|
}, [
|
|
2461
|
-
o(
|
|
2478
|
+
o(c) ? {
|
|
2462
2479
|
name: "label-tooltip",
|
|
2463
2480
|
fn: v(() => [
|
|
2464
|
-
Z(s.$slots, `${
|
|
2481
|
+
Z(s.$slots, `${c.key}-label-tooltip`, { row: c }, void 0, !0)
|
|
2465
2482
|
]),
|
|
2466
2483
|
key: "0"
|
|
2467
2484
|
} : void 0
|
|
2468
2485
|
]), 1032, ["item"]))), 128))
|
|
2469
2486
|
], 10, Gi))), 128))
|
|
2470
2487
|
])) : G("", !0),
|
|
2471
|
-
e.format === "json" ? (f(),
|
|
2472
|
-
|
|
2488
|
+
e.format === "json" ? (f(), T("div", zi, [
|
|
2489
|
+
F(u, {
|
|
2473
2490
|
id: "config-card-codeblock",
|
|
2474
2491
|
code: a.value,
|
|
2475
2492
|
language: "json",
|
|
2476
2493
|
theme: "dark"
|
|
2477
2494
|
}, null, 8, ["code"])
|
|
2478
2495
|
])) : G("", !0),
|
|
2479
|
-
e.format === "yaml" ? (f(),
|
|
2480
|
-
|
|
2496
|
+
e.format === "yaml" ? (f(), T("div", Yi, [
|
|
2497
|
+
F(u, {
|
|
2481
2498
|
id: "config-card-codeblock",
|
|
2482
2499
|
code: i.value,
|
|
2483
2500
|
language: "yaml",
|
|
@@ -2495,7 +2512,7 @@ const Di = {
|
|
|
2495
2512
|
}, Qi = (e) => (gr("data-v-877a88b1"), e = e(), yr(), e), Xi = ["aria-hidden"], es = {
|
|
2496
2513
|
key: 0,
|
|
2497
2514
|
"data-testid": "kui-icon-svg-title"
|
|
2498
|
-
}, ts = /* @__PURE__ */ Qi(() => /* @__PURE__ */
|
|
2515
|
+
}, ts = /* @__PURE__ */ Qi(() => /* @__PURE__ */ q("path", {
|
|
2499
2516
|
d: "M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",
|
|
2500
2517
|
fill: "currentColor"
|
|
2501
2518
|
}, null, -1)), ns = /* @__PURE__ */ ie({
|
|
@@ -2550,7 +2567,7 @@ const Di = {
|
|
|
2550
2567
|
}
|
|
2551
2568
|
},
|
|
2552
2569
|
setup(e) {
|
|
2553
|
-
const n = e, t =
|
|
2570
|
+
const n = e, t = x(() => {
|
|
2554
2571
|
if (typeof n.size == "number" && n.size > 0)
|
|
2555
2572
|
return `${n.size}px`;
|
|
2556
2573
|
if (typeof n.size == "string") {
|
|
@@ -2559,7 +2576,7 @@ const Di = {
|
|
|
2559
2576
|
return `${a}px`;
|
|
2560
2577
|
}
|
|
2561
2578
|
return ln;
|
|
2562
|
-
}), r =
|
|
2579
|
+
}), r = x(() => ({
|
|
2563
2580
|
boxSizing: "border-box",
|
|
2564
2581
|
color: n.color,
|
|
2565
2582
|
display: n.display,
|
|
@@ -2567,14 +2584,14 @@ const Di = {
|
|
|
2567
2584
|
lineHeight: "0",
|
|
2568
2585
|
width: t.value
|
|
2569
2586
|
}));
|
|
2570
|
-
return (o, a) => (f(),
|
|
2587
|
+
return (o, a) => (f(), R(ze(e.as), {
|
|
2571
2588
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2572
2589
|
class: "kui-icon book-icon",
|
|
2573
2590
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2574
2591
|
style: fr(r.value)
|
|
2575
2592
|
}, {
|
|
2576
2593
|
default: v(() => [
|
|
2577
|
-
(f(),
|
|
2594
|
+
(f(), T("svg", {
|
|
2578
2595
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2579
2596
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2580
2597
|
fill: "none",
|
|
@@ -2584,7 +2601,7 @@ const Di = {
|
|
|
2584
2601
|
width: "100%",
|
|
2585
2602
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2586
2603
|
}, [
|
|
2587
|
-
e.title ? (f(),
|
|
2604
|
+
e.title ? (f(), T("title", es, O(e.title), 1)) : G("", !0),
|
|
2588
2605
|
ts
|
|
2589
2606
|
], 8, Xi))
|
|
2590
2607
|
]),
|
|
@@ -2675,9 +2692,9 @@ const Di = {
|
|
|
2675
2692
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
2676
2693
|
setup(e, { emit: n }) {
|
|
2677
2694
|
var t;
|
|
2678
|
-
const r = e, o = ut(), { i18n: { t: a } } =
|
|
2695
|
+
const r = e, o = ut(), { i18n: { t: a } } = ce.useI18n(), { getMessageFromError: i } = ce.useErrors(), { convertKeyToTitle: s } = ce.useStringHelpers(), { axiosInstance: l } = ce.useAxios({
|
|
2679
2696
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
2680
|
-
}),
|
|
2697
|
+
}), u = [
|
|
2681
2698
|
{
|
|
2682
2699
|
label: a("baseConfigCard.general.structuredFormat"),
|
|
2683
2700
|
value: "structured",
|
|
@@ -2691,7 +2708,7 @@ const Di = {
|
|
|
2691
2708
|
label: "YAML",
|
|
2692
2709
|
value: "yaml"
|
|
2693
2710
|
}
|
|
2694
|
-
], d =
|
|
2711
|
+
], d = M("structured"), c = (I) => {
|
|
2695
2712
|
d.value = I == null ? void 0 : I.value;
|
|
2696
2713
|
}, m = {
|
|
2697
2714
|
id: {
|
|
@@ -2727,21 +2744,21 @@ const Di = {
|
|
|
2727
2744
|
// the last property displayed
|
|
2728
2745
|
section: be.Basic
|
|
2729
2746
|
}
|
|
2730
|
-
}, g =
|
|
2731
|
-
var I, V,
|
|
2747
|
+
}, g = M(!1), k = M(!1), _ = M(""), p = M(), w = x(() => {
|
|
2748
|
+
var I, V, U;
|
|
2732
2749
|
if (!p.value)
|
|
2733
2750
|
return [];
|
|
2734
|
-
const
|
|
2735
|
-
for (const
|
|
2736
|
-
const K = (V = (I = r.configSchema) == null ? void 0 : I[
|
|
2737
|
-
let X =
|
|
2738
|
-
(J || J === 0) && (X = J === -1 ?
|
|
2751
|
+
const A = [], E = Object.keys(p.value).length;
|
|
2752
|
+
for (const j in p.value) {
|
|
2753
|
+
const K = (V = (I = r.configSchema) == null ? void 0 : I[j]) == null ? void 0 : V.order, J = (U = m[j]) == null ? void 0 : U.order;
|
|
2754
|
+
let X = E;
|
|
2755
|
+
(J || J === 0) && (X = J === -1 ? E + 1 : J), K && (X = K === -1 ? E + 1 : K), A.push([j, X]);
|
|
2739
2756
|
}
|
|
2740
|
-
return
|
|
2741
|
-
return
|
|
2742
|
-
}),
|
|
2757
|
+
return A.sort(function(j, K) {
|
|
2758
|
+
return j[1] - K[1];
|
|
2759
|
+
}), A.map((j) => {
|
|
2743
2760
|
var K, J;
|
|
2744
|
-
const X =
|
|
2761
|
+
const X = j[0], ee = (K = p.value) == null ? void 0 : K[X], te = ((J = r.configSchema) == null ? void 0 : J[X]) || {}, se = m[X];
|
|
2745
2762
|
return {
|
|
2746
2763
|
key: X,
|
|
2747
2764
|
value: ee,
|
|
@@ -2751,22 +2768,22 @@ const Di = {
|
|
|
2751
2768
|
tooltip: te.tooltip ?? ((se == null ? void 0 : se.tooltip) || void 0),
|
|
2752
2769
|
section: te.section ?? ((se == null ? void 0 : se.section) || be.Advanced)
|
|
2753
2770
|
};
|
|
2754
|
-
}).filter((
|
|
2755
|
-
}), y =
|
|
2771
|
+
}).filter((j) => !j.hidden && j.key !== r.pluginConfigKey);
|
|
2772
|
+
}), y = x(() => {
|
|
2756
2773
|
var I, V;
|
|
2757
2774
|
if (!p.value || !r.pluginConfigKey)
|
|
2758
2775
|
return [];
|
|
2759
|
-
const
|
|
2760
|
-
for (const
|
|
2761
|
-
const K = (V = (I = r.pluginConfigSchema) == null ? void 0 : I[
|
|
2762
|
-
let X = J != null && J !== "" ?
|
|
2763
|
-
K && (X = K === -1 ?
|
|
2776
|
+
const U = p.value[r.pluginConfigKey] || {}, A = Object.keys(U).length, E = [];
|
|
2777
|
+
for (const j in U) {
|
|
2778
|
+
const K = (V = (I = r.pluginConfigSchema) == null ? void 0 : I[j]) == null ? void 0 : V.order, J = U[j];
|
|
2779
|
+
let X = J != null && J !== "" ? A - 1 : A;
|
|
2780
|
+
K && (X = K === -1 ? A + 1 : K), E.push([j, X]);
|
|
2764
2781
|
}
|
|
2765
|
-
return
|
|
2766
|
-
return
|
|
2767
|
-
}),
|
|
2782
|
+
return E.sort(function(j, K) {
|
|
2783
|
+
return j[1] - K[1];
|
|
2784
|
+
}), E.map((j) => {
|
|
2768
2785
|
var K;
|
|
2769
|
-
const J =
|
|
2786
|
+
const J = j[0], X = U[J], ee = ((K = r.pluginConfigSchema) == null ? void 0 : K[J]) || {};
|
|
2770
2787
|
return {
|
|
2771
2788
|
key: J,
|
|
2772
2789
|
value: X,
|
|
@@ -2776,25 +2793,25 @@ const Di = {
|
|
|
2776
2793
|
tooltip: ee.tooltip ?? void 0,
|
|
2777
2794
|
section: be.Plugin
|
|
2778
2795
|
};
|
|
2779
|
-
}).filter((
|
|
2780
|
-
}),
|
|
2781
|
-
var I, V,
|
|
2796
|
+
}).filter((j) => !j.hidden);
|
|
2797
|
+
}), b = x(() => {
|
|
2798
|
+
var I, V, U, A;
|
|
2782
2799
|
return {
|
|
2783
|
-
basic: (I =
|
|
2784
|
-
advanced: (V =
|
|
2785
|
-
plugin: (
|
|
2800
|
+
basic: (I = w.value) == null ? void 0 : I.filter((E) => E.section === be.Basic),
|
|
2801
|
+
advanced: (V = w.value) == null ? void 0 : V.filter((E) => E.section === be.Advanced),
|
|
2802
|
+
plugin: (A = y.value) == null ? void 0 : A.concat((U = w.value) == null ? void 0 : U.filter((E) => E.section === be.Plugin))
|
|
2786
2803
|
};
|
|
2787
|
-
}),
|
|
2804
|
+
}), B = x(() => {
|
|
2788
2805
|
const I = [];
|
|
2789
|
-
return
|
|
2790
|
-
}), H = (I) => !!(I.tooltip || o[`${I.key}-label-tooltip`]), re =
|
|
2806
|
+
return b.value.basic.length && I.push("basic"), b.value.advanced.length && I.push("advanced"), b.value.plugin.length && I.push("plugin"), I;
|
|
2807
|
+
}), H = (I) => !!(I.tooltip || o[`${I.key}-label-tooltip`]), re = x(() => {
|
|
2791
2808
|
var I, V;
|
|
2792
|
-
let
|
|
2793
|
-
return r.config.app === "konnect" ?
|
|
2809
|
+
let U = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2810
|
+
return r.config.app === "konnect" ? U = U.replace(/{controlPlaneId}/gi, ((I = r.config) == null ? void 0 : I.controlPlaneId) || "") : r.config.app === "kongManager" && (U = U.replace(/\/{workspace}/gi, (V = r.config) != null && V.workspace ? `/${r.config.workspace}` : "")), U = U.replace(/{id}/gi, r.config.entityId), U;
|
|
2794
2811
|
}), z = (I) => {
|
|
2795
2812
|
p.value && I(JSON.stringify(p.value)) ? n("copy:success", p.value) : n("copy:error");
|
|
2796
2813
|
};
|
|
2797
|
-
return
|
|
2814
|
+
return xe(g, (I) => {
|
|
2798
2815
|
n("loading", I);
|
|
2799
2816
|
}, { immediate: !0 }), Qe(async () => {
|
|
2800
2817
|
k.value = !1, g.value = !0;
|
|
@@ -2817,55 +2834,55 @@ const Di = {
|
|
|
2817
2834
|
g.value = !1;
|
|
2818
2835
|
}
|
|
2819
2836
|
}), (I, V) => {
|
|
2820
|
-
const
|
|
2821
|
-
return f(),
|
|
2837
|
+
const U = L("KLabel"), A = L("KSelect"), E = L("KButton"), j = L("KClipboardProvider"), K = L("KSkeleton"), J = L("KEmptyState"), X = L("KCard");
|
|
2838
|
+
return f(), R(X, { class: "kong-ui-entity-base-config-card" }, Te({
|
|
2822
2839
|
actions: v(() => [
|
|
2823
|
-
|
|
2840
|
+
q("div", as, [
|
|
2824
2841
|
Z(I.$slots, "actions", {}, void 0, !0),
|
|
2825
|
-
e.config.jsonYamlEnabled ? (f(), U
|
|
2842
|
+
e.config.jsonYamlEnabled ? (f(), R(U, {
|
|
2826
2843
|
key: 0,
|
|
2827
2844
|
class: "config-format-select-label",
|
|
2828
2845
|
"data-testid": "config-format-select-label"
|
|
2829
2846
|
}, {
|
|
2830
2847
|
default: v(() => [
|
|
2831
|
-
Q(
|
|
2848
|
+
Q(O(e.label), 1)
|
|
2832
2849
|
]),
|
|
2833
2850
|
_: 1
|
|
2834
2851
|
})) : G("", !0),
|
|
2835
|
-
e.config.jsonYamlEnabled ? (f(),
|
|
2852
|
+
e.config.jsonYamlEnabled ? (f(), R(A, {
|
|
2836
2853
|
key: 1,
|
|
2837
2854
|
appearance: "select",
|
|
2838
2855
|
"data-testid": "select-config-format",
|
|
2839
|
-
items:
|
|
2840
|
-
onChange:
|
|
2856
|
+
items: u,
|
|
2857
|
+
onChange: c
|
|
2841
2858
|
})) : G("", !0),
|
|
2842
|
-
r.config.jsonYamlEnabled && e.configCardDoc ? (f(),
|
|
2859
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (f(), R(E, {
|
|
2843
2860
|
key: 2,
|
|
2844
2861
|
appearance: "btn-link",
|
|
2845
2862
|
class: "book-icon",
|
|
2846
2863
|
"data-testid": "book-icon"
|
|
2847
2864
|
}, {
|
|
2848
2865
|
default: v(() => [
|
|
2849
|
-
|
|
2866
|
+
q("a", {
|
|
2850
2867
|
href: e.configCardDoc,
|
|
2851
2868
|
rel: "noopener",
|
|
2852
2869
|
target: "_blank"
|
|
2853
2870
|
}, [
|
|
2854
|
-
|
|
2871
|
+
F(h(rs), { size: h(co) }, null, 8, ["size"])
|
|
2855
2872
|
], 8, is)
|
|
2856
2873
|
]),
|
|
2857
2874
|
_: 1
|
|
2858
2875
|
})) : G("", !0),
|
|
2859
|
-
e.config.jsonYamlEnabled ? G("", !0) : (f(),
|
|
2876
|
+
e.config.jsonYamlEnabled ? G("", !0) : (f(), R(j, { key: 3 }, {
|
|
2860
2877
|
default: v(({ copyToClipboard: ee }) => [
|
|
2861
|
-
!g.value && !k.value ? (f(),
|
|
2878
|
+
!g.value && !k.value ? (f(), R(E, {
|
|
2862
2879
|
key: 0,
|
|
2863
2880
|
appearance: "btn-link",
|
|
2864
2881
|
"data-testid": "json-copy-button",
|
|
2865
2882
|
onClick: (te) => z(ee)
|
|
2866
2883
|
}, {
|
|
2867
2884
|
default: v(() => [
|
|
2868
|
-
Q(
|
|
2885
|
+
Q(O(h(a)("baseConfigCard.actions.copy")), 1)
|
|
2869
2886
|
]),
|
|
2870
2887
|
_: 2
|
|
2871
2888
|
}, 1032, ["onClick"])) : G("", !0)
|
|
@@ -2875,28 +2892,28 @@ const Di = {
|
|
|
2875
2892
|
])
|
|
2876
2893
|
]),
|
|
2877
2894
|
body: v(() => [
|
|
2878
|
-
g.value ? (f(),
|
|
2895
|
+
g.value ? (f(), R(K, {
|
|
2879
2896
|
key: 0,
|
|
2880
2897
|
"data-testid": "config-card-loader",
|
|
2881
2898
|
"table-columns": 2,
|
|
2882
2899
|
type: "table"
|
|
2883
|
-
})) : k.value ? (f(),
|
|
2900
|
+
})) : k.value ? (f(), R(J, {
|
|
2884
2901
|
key: 1,
|
|
2885
2902
|
"data-testid": "config-card-fetch-error",
|
|
2886
2903
|
"is-error": ""
|
|
2887
2904
|
}, {
|
|
2888
2905
|
message: v(() => [
|
|
2889
|
-
|
|
2906
|
+
q("h3", null, O(_.value), 1)
|
|
2890
2907
|
]),
|
|
2891
2908
|
_: 1
|
|
2892
2909
|
})) : G("", !0),
|
|
2893
|
-
e.config.jsonYamlEnabled ? (f(),
|
|
2894
|
-
|
|
2910
|
+
e.config.jsonYamlEnabled ? (f(), T("div", ss, [
|
|
2911
|
+
F(Wi, {
|
|
2895
2912
|
format: d.value,
|
|
2896
|
-
"prop-list-types":
|
|
2897
|
-
"property-collections":
|
|
2913
|
+
"prop-list-types": B.value,
|
|
2914
|
+
"property-collections": b.value,
|
|
2898
2915
|
record: p.value
|
|
2899
|
-
},
|
|
2916
|
+
}, Te({ _: 2 }, [
|
|
2900
2917
|
ye(Object.keys(I.$slots), (ee) => ({
|
|
2901
2918
|
name: ee,
|
|
2902
2919
|
fn: v(({ row: te, rowValue: se }) => [
|
|
@@ -2907,17 +2924,17 @@ const Di = {
|
|
|
2907
2924
|
])
|
|
2908
2925
|
}))
|
|
2909
2926
|
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
2910
|
-
])) : (f(),
|
|
2911
|
-
(f(!0),
|
|
2927
|
+
])) : (f(), T("div", ls, [
|
|
2928
|
+
(f(!0), T(ve, null, ye(B.value, (ee) => (f(), T("div", {
|
|
2912
2929
|
key: `config-card-details-${ee}-props`,
|
|
2913
|
-
class:
|
|
2930
|
+
class: Fe(`config-card-details-${ee}-props`),
|
|
2914
2931
|
"data-testid": `config-card-details-${ee}-props`
|
|
2915
2932
|
}, [
|
|
2916
|
-
ee !== "basic" ? (f(),
|
|
2917
|
-
(f(!0),
|
|
2933
|
+
ee !== "basic" ? (f(), T("div", cs, O(ee === "advanced" ? h(a)("baseConfigCard.sections.advanced") : h(a)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
2934
|
+
(f(!0), T(ve, null, ye(b.value[ee], (te) => (f(), R(xt, {
|
|
2918
2935
|
key: te.key,
|
|
2919
2936
|
item: te
|
|
2920
|
-
},
|
|
2937
|
+
}, Te({
|
|
2921
2938
|
label: v(() => [
|
|
2922
2939
|
Z(I.$slots, `${te.key}-label`, { row: te }, void 0, !0)
|
|
2923
2940
|
]),
|
|
@@ -2945,9 +2962,9 @@ const Di = {
|
|
|
2945
2962
|
e.hideTitle ? void 0 : {
|
|
2946
2963
|
name: "title",
|
|
2947
2964
|
fn: v(() => [
|
|
2948
|
-
|
|
2965
|
+
q("div", os, [
|
|
2949
2966
|
Z(I.$slots, "title", {}, () => [
|
|
2950
|
-
Q(
|
|
2967
|
+
Q(O(h(a)("baseConfigCard.title")), 1)
|
|
2951
2968
|
], !0)
|
|
2952
2969
|
])
|
|
2953
2970
|
]),
|
|
@@ -3009,43 +3026,43 @@ const Di = {
|
|
|
3009
3026
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3010
3027
|
setup(e, { emit: n }) {
|
|
3011
3028
|
var t;
|
|
3012
|
-
const r = e, o = wt(), { i18n: { t: a } } =
|
|
3029
|
+
const r = e, o = wt(), { i18n: { t: a } } = ce.useI18n(), { getMessageFromError: i } = ce.useErrors(), { axiosInstance: s } = ce.useAxios({
|
|
3013
3030
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3014
|
-
}), l =
|
|
3015
|
-
var p,
|
|
3031
|
+
}), l = M(!1), u = M(!1), d = M(""), c = x(() => r.canSubmit === !1 || r.isReadonly), m = x(() => {
|
|
3032
|
+
var p, w;
|
|
3016
3033
|
if (!r.editId)
|
|
3017
3034
|
return "";
|
|
3018
3035
|
let y = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3019
|
-
return r.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (y = y.replace(/\/{workspace}/gi, (
|
|
3036
|
+
return r.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (y = y.replace(/\/{workspace}/gi, (w = r.config) != null && w.workspace ? `/${r.config.workspace}` : "")), y = y.replace(/{id}/gi, r.editId), y;
|
|
3020
3037
|
}), g = () => {
|
|
3021
3038
|
r.config.cancelRoute ? o.push(r.config.cancelRoute) : k();
|
|
3022
3039
|
}, k = () => {
|
|
3023
3040
|
n("cancel");
|
|
3024
3041
|
}, _ = () => {
|
|
3025
|
-
|
|
3042
|
+
c.value || n("submit");
|
|
3026
3043
|
};
|
|
3027
|
-
return
|
|
3044
|
+
return xe(() => l.value, (p) => {
|
|
3028
3045
|
n("loading", p);
|
|
3029
3046
|
}, { immediate: !0 }), Qe(async () => {
|
|
3030
3047
|
if (r.editId)
|
|
3031
3048
|
try {
|
|
3032
|
-
|
|
3049
|
+
u.value = !1, l.value = !0;
|
|
3033
3050
|
const { data: p } = await s.get(m.value);
|
|
3034
3051
|
n("fetch:success", p);
|
|
3035
3052
|
} catch (p) {
|
|
3036
|
-
const
|
|
3037
|
-
d.value =
|
|
3053
|
+
const w = i(p);
|
|
3054
|
+
d.value = w.startsWith("code") ? a("baseForm.errors.edit") : w, u.value = !0, n("fetch:error", p);
|
|
3038
3055
|
} finally {
|
|
3039
3056
|
l.value = !1;
|
|
3040
3057
|
}
|
|
3041
|
-
}), (p,
|
|
3042
|
-
const y =
|
|
3043
|
-
return f(),
|
|
3058
|
+
}), (p, w) => {
|
|
3059
|
+
const y = L("KSkeleton"), b = L("KEmptyState"), B = L("KAlert"), H = L("KButton"), re = L("KCard");
|
|
3060
|
+
return f(), R(re, { class: "kong-ui-entity-base-form" }, {
|
|
3044
3061
|
body: v(() => [
|
|
3045
|
-
l.value ? (f(),
|
|
3062
|
+
l.value ? (f(), R(y, {
|
|
3046
3063
|
key: 0,
|
|
3047
3064
|
type: "form"
|
|
3048
|
-
})) :
|
|
3065
|
+
})) : u.value ? (f(), R(b, {
|
|
3049
3066
|
key: 1,
|
|
3050
3067
|
"cta-text": h(a)("baseForm.actions.back"),
|
|
3051
3068
|
"data-testid": "form-fetch-error",
|
|
@@ -3053,43 +3070,43 @@ const Di = {
|
|
|
3053
3070
|
"is-error": !0
|
|
3054
3071
|
}, {
|
|
3055
3072
|
message: v(() => [
|
|
3056
|
-
|
|
3073
|
+
q("h3", null, O(d.value), 1)
|
|
3057
3074
|
]),
|
|
3058
3075
|
_: 1
|
|
3059
|
-
}, 8, ["cta-text"])) : (f(),
|
|
3076
|
+
}, 8, ["cta-text"])) : (f(), T("form", {
|
|
3060
3077
|
key: 2,
|
|
3061
3078
|
"data-testid": "form-content",
|
|
3062
3079
|
onReset: rt(k, ["prevent"]),
|
|
3063
3080
|
onSubmit: rt(_, ["prevent"])
|
|
3064
3081
|
}, [
|
|
3065
3082
|
Z(p.$slots, "default", {}, void 0, !0),
|
|
3066
|
-
e.errorMessage ? (f(),
|
|
3083
|
+
e.errorMessage ? (f(), R(B, {
|
|
3067
3084
|
key: 0,
|
|
3068
3085
|
"alert-message": e.errorMessage,
|
|
3069
3086
|
appearance: "danger",
|
|
3070
3087
|
"data-testid": "form-error"
|
|
3071
3088
|
}, null, 8, ["alert-message"])) : G("", !0),
|
|
3072
|
-
|
|
3089
|
+
q("div", ms, [
|
|
3073
3090
|
Z(p.$slots, "form-actions", {}, () => [
|
|
3074
|
-
|
|
3091
|
+
F(H, {
|
|
3075
3092
|
appearance: "outline",
|
|
3076
3093
|
"data-testid": "form-cancel",
|
|
3077
3094
|
disabled: e.isReadonly,
|
|
3078
3095
|
type: "reset"
|
|
3079
3096
|
}, {
|
|
3080
3097
|
default: v(() => [
|
|
3081
|
-
Q(
|
|
3098
|
+
Q(O(h(a)("baseForm.actions.cancel")), 1)
|
|
3082
3099
|
]),
|
|
3083
3100
|
_: 1
|
|
3084
3101
|
}, 8, ["disabled"]),
|
|
3085
|
-
|
|
3102
|
+
F(H, {
|
|
3086
3103
|
appearance: "primary",
|
|
3087
3104
|
"data-testid": "form-submit",
|
|
3088
|
-
disabled:
|
|
3105
|
+
disabled: c.value,
|
|
3089
3106
|
type: "submit"
|
|
3090
3107
|
}, {
|
|
3091
3108
|
default: v(() => [
|
|
3092
|
-
Q(
|
|
3109
|
+
Q(O(h(a)("baseForm.actions.save")), 1)
|
|
3093
3110
|
]),
|
|
3094
3111
|
_: 1
|
|
3095
3112
|
}, 8, ["disabled"])
|
|
@@ -3114,24 +3131,24 @@ const Di = {
|
|
|
3114
3131
|
}
|
|
3115
3132
|
},
|
|
3116
3133
|
setup(e) {
|
|
3117
|
-
const n = e, t =
|
|
3134
|
+
const n = e, t = x(() => {
|
|
3118
3135
|
var _;
|
|
3119
3136
|
return ((_ = n.rowEl) == null ? void 0 : _.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3120
|
-
}), r =
|
|
3137
|
+
}), r = x(() => {
|
|
3121
3138
|
var _;
|
|
3122
3139
|
return ((_ = t.value) == null ? void 0 : _.querySelector('[role="button"]')) || null;
|
|
3123
|
-
}), o =
|
|
3140
|
+
}), o = x(() => {
|
|
3124
3141
|
var _, p;
|
|
3125
|
-
const
|
|
3126
|
-
return
|
|
3142
|
+
const w = (_ = n.rowEl) == null ? void 0 : _.querySelectorAll("td");
|
|
3143
|
+
return w ? ((p = w[0]) == null ? void 0 : p.getAttribute("data-testid")) === n.keyName : !1;
|
|
3127
3144
|
});
|
|
3128
3145
|
let a;
|
|
3129
3146
|
const i = () => {
|
|
3130
3147
|
a && (a.disconnect(), a = void 0);
|
|
3131
3148
|
}, s = () => {
|
|
3132
|
-
var _, p,
|
|
3133
|
-
|
|
3134
|
-
}, l =
|
|
3149
|
+
var _, p, w;
|
|
3150
|
+
u.value = ((_ = r.value) == null ? void 0 : _.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, c.value = ((w = l.value) == null ? void 0 : w.innerText) || "";
|
|
3151
|
+
}, l = M({}), u = M(0), d = M(0), c = M(""), m = x(() => [r.value, t.value]), g = xe(
|
|
3135
3152
|
m,
|
|
3136
3153
|
(_) => {
|
|
3137
3154
|
if (o.value && (i(), "ResizeObserver" in window && window)) {
|
|
@@ -3145,22 +3162,22 @@ const Di = {
|
|
|
3145
3162
|
}
|
|
3146
3163
|
},
|
|
3147
3164
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3148
|
-
), k =
|
|
3165
|
+
), k = x(() => o.value ? u.value > d.value : !1);
|
|
3149
3166
|
return dr(() => {
|
|
3150
3167
|
s();
|
|
3151
3168
|
}), pr(() => {
|
|
3152
3169
|
g();
|
|
3153
3170
|
}), (_, p) => {
|
|
3154
|
-
const
|
|
3155
|
-
return f(),
|
|
3171
|
+
const w = L("KTooltip");
|
|
3172
|
+
return f(), T("span", {
|
|
3156
3173
|
ref_key: "contentRef",
|
|
3157
3174
|
ref: l,
|
|
3158
3175
|
class: "content-wrapper"
|
|
3159
3176
|
}, [
|
|
3160
|
-
o.value ? (f(),
|
|
3161
|
-
|
|
3177
|
+
o.value ? (f(), T("span", hs, [
|
|
3178
|
+
F(w, {
|
|
3162
3179
|
disabled: !k.value,
|
|
3163
|
-
label:
|
|
3180
|
+
label: c.value,
|
|
3164
3181
|
"max-width": "300",
|
|
3165
3182
|
placement: "bottomStart"
|
|
3166
3183
|
}, {
|
|
@@ -3285,61 +3302,61 @@ const Di = {
|
|
|
3285
3302
|
},
|
|
3286
3303
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3287
3304
|
setup(e, { emit: n }) {
|
|
3288
|
-
const t = e, { i18n: { t: r } } =
|
|
3289
|
-
const
|
|
3290
|
-
return Object.keys(t.tableHeaders).forEach((
|
|
3291
|
-
const H = t.tableHeaders[
|
|
3292
|
-
|
|
3293
|
-
label: H.label ??
|
|
3294
|
-
key:
|
|
3305
|
+
const t = e, { i18n: { t: r } } = ce.useI18n(), o = x(() => t.cacheIdentifier || t.preferencesStorageKey), a = (b) => b.hasData || !!t.query, i = x(() => {
|
|
3306
|
+
const b = [];
|
|
3307
|
+
return Object.keys(t.tableHeaders).forEach((B) => {
|
|
3308
|
+
const H = t.tableHeaders[B];
|
|
3309
|
+
b.push({
|
|
3310
|
+
label: H.label ?? B,
|
|
3311
|
+
key: B,
|
|
3295
3312
|
sortable: H.sortable ?? !1
|
|
3296
3313
|
});
|
|
3297
|
-
}), t.enableEntityActions &&
|
|
3314
|
+
}), t.enableEntityActions && b.push({
|
|
3298
3315
|
key: "actions",
|
|
3299
3316
|
hideLabel: !0
|
|
3300
|
-
}),
|
|
3301
|
-
}), s = (
|
|
3302
|
-
"data-rowid":
|
|
3303
|
-
"data-testid":
|
|
3304
|
-
...t.rowAttributes(
|
|
3305
|
-
}), l =
|
|
3306
|
-
var
|
|
3307
|
-
return (
|
|
3308
|
-
}, d = (
|
|
3309
|
-
const
|
|
3310
|
-
"data-testid":
|
|
3311
|
-
...t.cellAttributes(
|
|
3317
|
+
}), b;
|
|
3318
|
+
}), s = (b) => ({
|
|
3319
|
+
"data-rowid": b.id,
|
|
3320
|
+
"data-testid": b.name,
|
|
3321
|
+
...t.rowAttributes(b)
|
|
3322
|
+
}), l = M({}), u = (b) => {
|
|
3323
|
+
var B;
|
|
3324
|
+
return (B = l.value) == null ? void 0 : B.$el.querySelector(`[data-rowid="${b.id}"]`);
|
|
3325
|
+
}, d = (b) => {
|
|
3326
|
+
const B = {
|
|
3327
|
+
"data-testid": b.headerKey,
|
|
3328
|
+
...t.cellAttributes(b)
|
|
3312
3329
|
};
|
|
3313
|
-
return
|
|
3330
|
+
return b.colIndex === 0 && (B.style = {
|
|
3314
3331
|
maxWidth: "250px",
|
|
3315
3332
|
overflowX: "hidden",
|
|
3316
3333
|
textOverflow: "ellipsis"
|
|
3317
|
-
}),
|
|
3318
|
-
},
|
|
3334
|
+
}), B;
|
|
3335
|
+
}, c = () => {
|
|
3319
3336
|
n("empty-state-cta-clicked"), m();
|
|
3320
3337
|
}, m = () => {
|
|
3321
3338
|
n("clear-search-input");
|
|
3322
|
-
}, g =
|
|
3323
|
-
n("click:row",
|
|
3324
|
-
}), k = (
|
|
3325
|
-
n("sort",
|
|
3326
|
-
}, { setTablePreferences: _, getTablePreferences: p } = Ir(),
|
|
3327
|
-
const
|
|
3339
|
+
}, g = x(() => t.disableRowClick ? void 0 : (b, B) => {
|
|
3340
|
+
n("click:row", B);
|
|
3341
|
+
}), k = (b) => {
|
|
3342
|
+
n("sort", b);
|
|
3343
|
+
}, { setTablePreferences: _, getTablePreferences: p } = Ir(), w = x(() => {
|
|
3344
|
+
const b = p(t.preferencesStorageKey);
|
|
3328
3345
|
return {
|
|
3329
3346
|
...t.initialFetcherParams,
|
|
3330
|
-
...
|
|
3347
|
+
...b
|
|
3331
3348
|
};
|
|
3332
|
-
}), y = (
|
|
3333
|
-
t.preferencesStorageKey && _(t.preferencesStorageKey,
|
|
3349
|
+
}), y = (b) => {
|
|
3350
|
+
t.preferencesStorageKey && _(t.preferencesStorageKey, b);
|
|
3334
3351
|
};
|
|
3335
|
-
return (
|
|
3336
|
-
const H =
|
|
3337
|
-
return f(),
|
|
3352
|
+
return (b, B) => {
|
|
3353
|
+
const H = L("KIcon"), re = L("KButton"), z = L("KDropdownMenu"), I = L("KTable"), V = L("KCard");
|
|
3354
|
+
return f(), R(V, {
|
|
3338
3355
|
class: "kong-ui-entity-base-table",
|
|
3339
3356
|
title: e.title
|
|
3340
3357
|
}, {
|
|
3341
3358
|
body: v(() => [
|
|
3342
|
-
|
|
3359
|
+
F(I, {
|
|
3343
3360
|
ref_key: "tableRefs",
|
|
3344
3361
|
ref: l,
|
|
3345
3362
|
"cache-identifier": o.value,
|
|
@@ -3360,51 +3377,51 @@ const Di = {
|
|
|
3360
3377
|
"has-error": !!e.errorMessage,
|
|
3361
3378
|
headers: i.value,
|
|
3362
3379
|
"hide-pagination-when-optional": "",
|
|
3363
|
-
"initial-fetcher-params":
|
|
3380
|
+
"initial-fetcher-params": w.value,
|
|
3364
3381
|
"is-loading": e.isLoading,
|
|
3365
3382
|
"pagination-type": e.paginationType,
|
|
3366
3383
|
"row-attrs": s,
|
|
3367
3384
|
"search-input": e.query,
|
|
3368
|
-
onKtableEmptyStateCtaClicked:
|
|
3385
|
+
onKtableEmptyStateCtaClicked: c,
|
|
3369
3386
|
"onRow:click": g.value,
|
|
3370
|
-
onSort:
|
|
3387
|
+
onSort: B[0] || (B[0] = (U) => k(U)),
|
|
3371
3388
|
"onUpdate:tablePreferences": y
|
|
3372
|
-
},
|
|
3373
|
-
toolbar: v(({ state:
|
|
3374
|
-
et(
|
|
3375
|
-
Z(
|
|
3376
|
-
|
|
3377
|
-
Z(
|
|
3389
|
+
}, Te({
|
|
3390
|
+
toolbar: v(({ state: U }) => [
|
|
3391
|
+
et(q("div", Cs, [
|
|
3392
|
+
Z(b.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3393
|
+
b.$slots["toolbar-button"] ? (f(), T("div", ks, [
|
|
3394
|
+
Z(b.$slots, "toolbar-button", {}, void 0, !0)
|
|
3378
3395
|
])) : G("", !0)
|
|
3379
3396
|
], 512), [
|
|
3380
|
-
[tt, a(
|
|
3397
|
+
[tt, a(U)]
|
|
3381
3398
|
])
|
|
3382
3399
|
]),
|
|
3383
|
-
actions: v(({ row:
|
|
3384
|
-
|
|
3400
|
+
actions: v(({ row: U, rowKey: A, rowValue: E }) => [
|
|
3401
|
+
q("div", {
|
|
3385
3402
|
class: "actions-container",
|
|
3386
|
-
"data-testid":
|
|
3403
|
+
"data-testid": U.name
|
|
3387
3404
|
}, [
|
|
3388
|
-
|
|
3405
|
+
F(z, {
|
|
3389
3406
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3390
3407
|
width: e.dropdownMenuWidth
|
|
3391
3408
|
}, {
|
|
3392
3409
|
items: v(() => [
|
|
3393
|
-
Z(
|
|
3394
|
-
row:
|
|
3395
|
-
rowKey:
|
|
3396
|
-
rowValue:
|
|
3410
|
+
Z(b.$slots, "actions", {
|
|
3411
|
+
row: U,
|
|
3412
|
+
rowKey: A,
|
|
3413
|
+
rowValue: E
|
|
3397
3414
|
}, void 0, !0)
|
|
3398
3415
|
]),
|
|
3399
3416
|
default: v(() => [
|
|
3400
|
-
|
|
3417
|
+
F(re, {
|
|
3401
3418
|
class: "actions-trigger",
|
|
3402
3419
|
"data-testid": "overflow-actions-button",
|
|
3403
3420
|
size: "small"
|
|
3404
3421
|
}, {
|
|
3405
3422
|
icon: v(() => [
|
|
3406
|
-
|
|
3407
|
-
color: h(
|
|
3423
|
+
F(H, {
|
|
3424
|
+
color: h(lo),
|
|
3408
3425
|
icon: "more",
|
|
3409
3426
|
size: "16"
|
|
3410
3427
|
}, null, 8, ["color"])
|
|
@@ -3418,20 +3435,20 @@ const Di = {
|
|
|
3418
3435
|
]),
|
|
3419
3436
|
_: 2
|
|
3420
3437
|
}, [
|
|
3421
|
-
ye(e.tableHeaders, (
|
|
3422
|
-
name:
|
|
3423
|
-
fn: v(({ row:
|
|
3424
|
-
|
|
3425
|
-
"key-name": String(
|
|
3426
|
-
"row-el":
|
|
3438
|
+
ye(e.tableHeaders, (U, A) => ({
|
|
3439
|
+
name: A,
|
|
3440
|
+
fn: v(({ row: E, rowKey: j, rowValue: K }) => [
|
|
3441
|
+
F(bs, {
|
|
3442
|
+
"key-name": String(A),
|
|
3443
|
+
"row-el": u(E)
|
|
3427
3444
|
}, {
|
|
3428
3445
|
default: v(() => [
|
|
3429
|
-
Z(
|
|
3430
|
-
row:
|
|
3431
|
-
rowKey:
|
|
3446
|
+
Z(b.$slots, A, {
|
|
3447
|
+
row: E,
|
|
3448
|
+
rowKey: j,
|
|
3432
3449
|
rowValue: K
|
|
3433
3450
|
}, () => [
|
|
3434
|
-
Q(
|
|
3451
|
+
Q(O(K), 1)
|
|
3435
3452
|
], !0)
|
|
3436
3453
|
]),
|
|
3437
3454
|
_: 2
|
|
@@ -3444,13 +3461,13 @@ const Di = {
|
|
|
3444
3461
|
}, 8, ["title"]);
|
|
3445
3462
|
};
|
|
3446
3463
|
}
|
|
3447
|
-
}), Is = /* @__PURE__ */ ke(ws, [["__scopeId", "data-v-6bf92df6"]]),
|
|
3464
|
+
}), Is = /* @__PURE__ */ ke(ws, [["__scopeId", "data-v-6bf92df6"]]), As = {
|
|
3448
3465
|
key: 0,
|
|
3449
3466
|
class: "kong-ui-entity-delete-error"
|
|
3450
|
-
},
|
|
3467
|
+
}, Ss = {
|
|
3451
3468
|
key: 1,
|
|
3452
3469
|
class: "description"
|
|
3453
|
-
},
|
|
3470
|
+
}, xs = /* @__PURE__ */ ie({
|
|
3454
3471
|
__name: "EntityDeleteModal",
|
|
3455
3472
|
props: {
|
|
3456
3473
|
visible: {
|
|
@@ -3489,14 +3506,14 @@ const Di = {
|
|
|
3489
3506
|
},
|
|
3490
3507
|
emits: ["cancel", "proceed"],
|
|
3491
3508
|
setup(e, { emit: n }) {
|
|
3492
|
-
const t = e, { i18nT: r } =
|
|
3509
|
+
const t = e, { i18nT: r } = ce.useI18n(), o = x(() => t.needConfirm ? t.entityName : ""), a = () => {
|
|
3493
3510
|
n("cancel");
|
|
3494
3511
|
}, i = () => {
|
|
3495
3512
|
n("proceed");
|
|
3496
3513
|
};
|
|
3497
3514
|
return (s, l) => {
|
|
3498
|
-
const
|
|
3499
|
-
return f(),
|
|
3515
|
+
const u = L("KAlert"), d = L("KPrompt");
|
|
3516
|
+
return f(), R(d, {
|
|
3500
3517
|
"action-button-text": "Yes, delete",
|
|
3501
3518
|
"action-pending": e.actionPending,
|
|
3502
3519
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3508,35 +3525,35 @@ const Di = {
|
|
|
3508
3525
|
onProceed: i
|
|
3509
3526
|
}, {
|
|
3510
3527
|
"body-content": v(() => [
|
|
3511
|
-
e.error ? (f(),
|
|
3512
|
-
|
|
3528
|
+
e.error ? (f(), T("div", As, [
|
|
3529
|
+
F(u, { appearance: "danger" }, {
|
|
3513
3530
|
alertMessage: v(() => [
|
|
3514
|
-
Q(
|
|
3531
|
+
Q(O(e.error), 1)
|
|
3515
3532
|
]),
|
|
3516
3533
|
_: 1
|
|
3517
3534
|
})
|
|
3518
3535
|
])) : G("", !0),
|
|
3519
|
-
|
|
3536
|
+
F(h(r), {
|
|
3520
3537
|
class: "message",
|
|
3521
3538
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3522
3539
|
tag: "p"
|
|
3523
|
-
},
|
|
3540
|
+
}, Te({
|
|
3524
3541
|
entityType: v(() => [
|
|
3525
|
-
Q(
|
|
3542
|
+
Q(O(t.entityType), 1)
|
|
3526
3543
|
]),
|
|
3527
3544
|
_: 2
|
|
3528
3545
|
}, [
|
|
3529
3546
|
t.entityName ? {
|
|
3530
3547
|
name: "entityName",
|
|
3531
3548
|
fn: v(() => [
|
|
3532
|
-
|
|
3549
|
+
q("strong", null, O(t.entityName), 1)
|
|
3533
3550
|
]),
|
|
3534
3551
|
key: "0"
|
|
3535
3552
|
} : void 0
|
|
3536
3553
|
]), 1032, ["keypath"]),
|
|
3537
|
-
t.description || s.$slots.description ? (f(),
|
|
3554
|
+
t.description || s.$slots.description ? (f(), T("div", Ss, [
|
|
3538
3555
|
Z(s.$slots, "description", {}, () => [
|
|
3539
|
-
|
|
3556
|
+
q("p", null, O(t.description), 1)
|
|
3540
3557
|
], !0)
|
|
3541
3558
|
])) : G("", !0)
|
|
3542
3559
|
]),
|
|
@@ -3544,13 +3561,13 @@ const Di = {
|
|
|
3544
3561
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3545
3562
|
};
|
|
3546
3563
|
}
|
|
3547
|
-
}), Ts = /* @__PURE__ */ ke(
|
|
3564
|
+
}), Ts = /* @__PURE__ */ ke(xs, [["__scopeId", "data-v-1c9a2a07"]]), $s = {
|
|
3548
3565
|
fill: "none",
|
|
3549
3566
|
height: "20",
|
|
3550
3567
|
viewBox: "0 0 20 20",
|
|
3551
3568
|
width: "20",
|
|
3552
3569
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3553
|
-
},
|
|
3570
|
+
}, js = {
|
|
3554
3571
|
id: "mask0_180_20349",
|
|
3555
3572
|
height: "20",
|
|
3556
3573
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3558,35 +3575,35 @@ const Di = {
|
|
|
3558
3575
|
width: "20",
|
|
3559
3576
|
x: "0",
|
|
3560
3577
|
y: "0"
|
|
3561
|
-
},
|
|
3578
|
+
}, Ms = ["fill"], Es = { mask: "url(#mask0_180_20349)" }, Os = ["fill"], Bs = /* @__PURE__ */ ie({
|
|
3562
3579
|
__name: "IconFilter",
|
|
3563
3580
|
props: {
|
|
3564
3581
|
color: {
|
|
3565
3582
|
type: String,
|
|
3566
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3583
|
+
default: `var(--kong-ui-entity-filter-color, ${io})`
|
|
3567
3584
|
}
|
|
3568
3585
|
},
|
|
3569
3586
|
setup(e) {
|
|
3570
|
-
return (n, t) => (f(),
|
|
3571
|
-
|
|
3572
|
-
|
|
3587
|
+
return (n, t) => (f(), T("svg", $s, [
|
|
3588
|
+
q("mask", js, [
|
|
3589
|
+
q("rect", {
|
|
3573
3590
|
fill: e.color,
|
|
3574
3591
|
height: "20",
|
|
3575
3592
|
width: "20"
|
|
3576
|
-
}, null, 8,
|
|
3593
|
+
}, null, 8, Ms)
|
|
3577
3594
|
]),
|
|
3578
|
-
|
|
3579
|
-
|
|
3595
|
+
q("g", Es, [
|
|
3596
|
+
q("path", {
|
|
3580
3597
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3581
3598
|
fill: e.color
|
|
3582
|
-
}, null, 8,
|
|
3599
|
+
}, null, 8, Os)
|
|
3583
3600
|
])
|
|
3584
3601
|
]));
|
|
3585
3602
|
}
|
|
3586
|
-
}),
|
|
3603
|
+
}), Fs = {
|
|
3587
3604
|
key: 1,
|
|
3588
3605
|
class: "kong-ui-entity-filter"
|
|
3589
|
-
},
|
|
3606
|
+
}, Ks = { class: "menu-item-title" }, Ns = { class: "menu-item-indicator" }, Ls = { class: "menu-item-body" }, Ps = ["for"], qs = { class: "menu-item-buttons" }, Us = /* @__PURE__ */ ie({
|
|
3590
3607
|
__name: "EntityFilter",
|
|
3591
3608
|
props: {
|
|
3592
3609
|
// filter config, either exact match or fuzzy match
|
|
@@ -3606,36 +3623,36 @@ const Di = {
|
|
|
3606
3623
|
},
|
|
3607
3624
|
emits: ["update:modelValue"],
|
|
3608
3625
|
setup(e, { emit: n }) {
|
|
3609
|
-
const t = e, { i18n: { t: r } } =
|
|
3626
|
+
const t = e, { i18n: { t: r } } = ce.useI18n(), o = M(!1), a = M({}), i = x(() => {
|
|
3610
3627
|
const p = [];
|
|
3611
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
3612
|
-
|
|
3628
|
+
return new URLSearchParams(t.modelValue).forEach((w, y) => {
|
|
3629
|
+
w !== "" && p.push(y);
|
|
3613
3630
|
}), p;
|
|
3614
|
-
}), s =
|
|
3631
|
+
}), s = x(() => {
|
|
3615
3632
|
const p = t.config.fields;
|
|
3616
|
-
return Object.keys(p).filter((
|
|
3617
|
-
label: p[
|
|
3618
|
-
value:
|
|
3633
|
+
return Object.keys(p).filter((w) => p[w].searchable).map((w) => ({
|
|
3634
|
+
label: p[w].label || w,
|
|
3635
|
+
value: w
|
|
3619
3636
|
}));
|
|
3620
3637
|
});
|
|
3621
|
-
|
|
3622
|
-
a.value = {}, new URLSearchParams(p).forEach((
|
|
3623
|
-
a.value[y] =
|
|
3638
|
+
xe(() => t.modelValue, (p) => {
|
|
3639
|
+
a.value = {}, new URLSearchParams(p).forEach((w, y) => {
|
|
3640
|
+
a.value[y] = w;
|
|
3624
3641
|
});
|
|
3625
3642
|
});
|
|
3626
3643
|
const l = () => {
|
|
3627
3644
|
o.value = !o.value;
|
|
3628
|
-
},
|
|
3645
|
+
}, u = (p) => {
|
|
3629
3646
|
n("update:modelValue", p);
|
|
3630
|
-
}, d = (p) => `filter-${p}`,
|
|
3631
|
-
var
|
|
3632
|
-
return (((y = (
|
|
3633
|
-
value:
|
|
3634
|
-
label:
|
|
3647
|
+
}, d = (p) => `filter-${p}`, c = (p) => {
|
|
3648
|
+
var w, y;
|
|
3649
|
+
return (((y = (w = t.config.schema) == null ? void 0 : w[p]) == null ? void 0 : y.values) ?? []).map((b) => ({
|
|
3650
|
+
value: b,
|
|
3651
|
+
label: b
|
|
3635
3652
|
}));
|
|
3636
3653
|
}, m = (p) => {
|
|
3637
|
-
var
|
|
3638
|
-
return ((y = (
|
|
3654
|
+
var w, y;
|
|
3655
|
+
return ((y = (w = t.config.schema) == null ? void 0 : w[p]) == null ? void 0 : y.type) ?? "text";
|
|
3639
3656
|
}, g = (p) => {
|
|
3640
3657
|
a.value = {
|
|
3641
3658
|
...a.value,
|
|
@@ -3644,105 +3661,105 @@ const Di = {
|
|
|
3644
3661
|
}, k = () => {
|
|
3645
3662
|
a.value = {}, _(!0);
|
|
3646
3663
|
}, _ = (p = !1) => {
|
|
3647
|
-
const
|
|
3648
|
-
p && (o.value = !1), n("update:modelValue", new URLSearchParams(
|
|
3664
|
+
const w = Object.keys(a.value).reduce((y, b) => (a.value[b] && (y[b] = `${a.value[b]}`), y), {});
|
|
3665
|
+
p && (o.value = !1), n("update:modelValue", new URLSearchParams(w).toString());
|
|
3649
3666
|
};
|
|
3650
|
-
return (p,
|
|
3651
|
-
const y =
|
|
3652
|
-
return e.config.isExactMatch ? (f(),
|
|
3667
|
+
return (p, w) => {
|
|
3668
|
+
const y = L("KInput"), b = L("KButton"), B = L("KSelect"), H = L("KMenuItem"), re = L("KMenu");
|
|
3669
|
+
return e.config.isExactMatch ? (f(), R(y, {
|
|
3653
3670
|
key: 0,
|
|
3654
3671
|
autocomplete: "off",
|
|
3655
3672
|
class: "kong-ui-entity-filter-input",
|
|
3656
3673
|
"data-testid": "search-input",
|
|
3657
3674
|
"model-value": e.modelValue,
|
|
3658
3675
|
placeholder: e.config.placeholder,
|
|
3659
|
-
"onUpdate:modelValue":
|
|
3676
|
+
"onUpdate:modelValue": u
|
|
3660
3677
|
}, {
|
|
3661
3678
|
icon: v(() => [
|
|
3662
|
-
|
|
3679
|
+
F(Bs)
|
|
3663
3680
|
]),
|
|
3664
3681
|
_: 1
|
|
3665
|
-
}, 8, ["model-value", "placeholder"])) : (f(),
|
|
3666
|
-
|
|
3682
|
+
}, 8, ["model-value", "placeholder"])) : (f(), T("div", Fs, [
|
|
3683
|
+
F(b, {
|
|
3667
3684
|
appearance: "btn-link",
|
|
3668
3685
|
"data-testid": "filter-button",
|
|
3669
3686
|
icon: "filter",
|
|
3670
3687
|
onClick: l
|
|
3671
3688
|
}, {
|
|
3672
3689
|
default: v(() => [
|
|
3673
|
-
Q(
|
|
3690
|
+
Q(O(h(r)("filter.filterButtonText")) + " " + O(i.value.length > 0 ? `(${i.value.length})` : ""), 1)
|
|
3674
3691
|
]),
|
|
3675
3692
|
_: 1
|
|
3676
3693
|
}),
|
|
3677
|
-
et(
|
|
3694
|
+
et(q("div", {
|
|
3678
3695
|
class: "kong-ui-entity-filter-backdrop",
|
|
3679
3696
|
onClick: l
|
|
3680
3697
|
}, null, 512), [
|
|
3681
3698
|
[tt, o.value]
|
|
3682
3699
|
]),
|
|
3683
|
-
et(
|
|
3700
|
+
et(F(re, { class: "kong-ui-entity-filter-menu" }, {
|
|
3684
3701
|
body: v(() => [
|
|
3685
|
-
(f(!0),
|
|
3702
|
+
(f(!0), T(ve, null, ye(s.value, (z, I) => (f(), R(H, {
|
|
3686
3703
|
key: z.value,
|
|
3687
3704
|
"data-testid": z.value,
|
|
3688
3705
|
expandable: "",
|
|
3689
3706
|
"last-menu-item": I === s.value.length - 1
|
|
3690
3707
|
}, {
|
|
3691
3708
|
itemTitle: v(() => [
|
|
3692
|
-
|
|
3693
|
-
Q(
|
|
3694
|
-
et(
|
|
3709
|
+
q("span", Ks, [
|
|
3710
|
+
Q(O(z.label) + " ", 1),
|
|
3711
|
+
et(q("span", Ns, null, 512), [
|
|
3695
3712
|
[tt, i.value.includes(z.value)]
|
|
3696
3713
|
])
|
|
3697
3714
|
])
|
|
3698
3715
|
]),
|
|
3699
3716
|
itemBody: v(() => {
|
|
3700
|
-
var V,
|
|
3717
|
+
var V, U;
|
|
3701
3718
|
return [
|
|
3702
|
-
|
|
3703
|
-
|
|
3719
|
+
q("div", Ls, [
|
|
3720
|
+
q("label", {
|
|
3704
3721
|
class: "menu-item-label",
|
|
3705
3722
|
for: d(z.value)
|
|
3706
|
-
},
|
|
3707
|
-
((
|
|
3723
|
+
}, O(h(r)("filter.fieldLabel")), 9, Ps),
|
|
3724
|
+
((U = (V = e.config.schema) == null ? void 0 : V[z.value]) == null ? void 0 : U.type) === "select" ? (f(), R(B, {
|
|
3708
3725
|
key: 0,
|
|
3709
3726
|
id: d(z.value),
|
|
3710
3727
|
modelValue: a.value[z.value],
|
|
3711
|
-
"onUpdate:modelValue": (
|
|
3728
|
+
"onUpdate:modelValue": (A) => a.value[z.value] = A,
|
|
3712
3729
|
appearance: "select",
|
|
3713
|
-
items:
|
|
3730
|
+
items: c(z.value),
|
|
3714
3731
|
placeholder: h(r)("filter.selectPlaceholder")
|
|
3715
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (f(),
|
|
3732
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (f(), R(y, {
|
|
3716
3733
|
key: 1,
|
|
3717
3734
|
id: d(z.value),
|
|
3718
3735
|
modelValue: a.value[z.value],
|
|
3719
|
-
"onUpdate:modelValue": (
|
|
3736
|
+
"onUpdate:modelValue": (A) => a.value[z.value] = A,
|
|
3720
3737
|
autocomplete: "off",
|
|
3721
3738
|
placeholder: h(r)("filter.inputPlaceholder"),
|
|
3722
3739
|
size: "small",
|
|
3723
3740
|
type: m(z.value)
|
|
3724
3741
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3725
3742
|
]),
|
|
3726
|
-
|
|
3727
|
-
|
|
3743
|
+
q("div", qs, [
|
|
3744
|
+
F(b, {
|
|
3728
3745
|
appearance: "btn-link",
|
|
3729
3746
|
"data-testid": "apply-filter",
|
|
3730
3747
|
size: "small",
|
|
3731
|
-
onClick:
|
|
3748
|
+
onClick: w[0] || (w[0] = (A) => _(!0))
|
|
3732
3749
|
}, {
|
|
3733
3750
|
default: v(() => [
|
|
3734
|
-
Q(
|
|
3751
|
+
Q(O(h(r)("filter.applyButtonText")), 1)
|
|
3735
3752
|
]),
|
|
3736
3753
|
_: 1
|
|
3737
3754
|
}),
|
|
3738
|
-
|
|
3755
|
+
F(b, {
|
|
3739
3756
|
appearance: "btn-link",
|
|
3740
3757
|
"data-testid": "clear-filter",
|
|
3741
3758
|
size: "small",
|
|
3742
|
-
onClick: (
|
|
3759
|
+
onClick: (A) => g(z.value)
|
|
3743
3760
|
}, {
|
|
3744
3761
|
default: v(() => [
|
|
3745
|
-
Q(
|
|
3762
|
+
Q(O(h(r)("filter.clearButtonText")), 1)
|
|
3746
3763
|
]),
|
|
3747
3764
|
_: 2
|
|
3748
3765
|
}, 1032, ["onClick"])
|
|
@@ -3753,9 +3770,9 @@ const Di = {
|
|
|
3753
3770
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
3754
3771
|
]),
|
|
3755
3772
|
actionButton: v(() => [
|
|
3756
|
-
|
|
3773
|
+
F(b, { onClick: k }, {
|
|
3757
3774
|
default: v(() => [
|
|
3758
|
-
Q(
|
|
3775
|
+
Q(O(h(r)("filter.clearAllButtonText")), 1)
|
|
3759
3776
|
]),
|
|
3760
3777
|
_: 1
|
|
3761
3778
|
})
|
|
@@ -3789,8 +3806,8 @@ const Di = {
|
|
|
3789
3806
|
}
|
|
3790
3807
|
},
|
|
3791
3808
|
setup(e) {
|
|
3792
|
-
const n = e, t =
|
|
3793
|
-
return
|
|
3809
|
+
const n = e, t = M(void 0), r = x(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
3810
|
+
return xe(() => n.authFunction, async () => {
|
|
3794
3811
|
t.value = await n.authFunction();
|
|
3795
3812
|
}, { immediate: !0 }), (o, a) => r.value ? Z(o.$slots, "default", {
|
|
3796
3813
|
key: 0,
|
|
@@ -3832,31 +3849,31 @@ const Di = {
|
|
|
3832
3849
|
},
|
|
3833
3850
|
setup(e) {
|
|
3834
3851
|
const n = ut();
|
|
3835
|
-
return (t, r) => (f(),
|
|
3836
|
-
class:
|
|
3852
|
+
return (t, r) => (f(), T("fieldset", {
|
|
3853
|
+
class: Fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
3837
3854
|
}, [
|
|
3838
|
-
|
|
3839
|
-
e.hideInfoHeader ? G("", !0) : (f(),
|
|
3855
|
+
q("div", Vs, [
|
|
3856
|
+
e.hideInfoHeader ? G("", !0) : (f(), T("div", {
|
|
3840
3857
|
key: 0,
|
|
3841
|
-
class:
|
|
3858
|
+
class: Fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
3842
3859
|
}, [
|
|
3843
|
-
e.title ? (f(),
|
|
3844
|
-
e.description || h(n).description ? (f(),
|
|
3860
|
+
e.title ? (f(), T("h4", Ds, O(e.title), 1)) : G("", !0),
|
|
3861
|
+
e.description || h(n).description ? (f(), T("div", Gs, [
|
|
3845
3862
|
Z(t.$slots, "description", {}, () => [
|
|
3846
|
-
|
|
3863
|
+
q("p", null, O(e.description), 1)
|
|
3847
3864
|
], !0)
|
|
3848
3865
|
])) : G("", !0),
|
|
3849
|
-
h(n).footer ? (f(),
|
|
3866
|
+
h(n).footer ? (f(), T("div", Hs, [
|
|
3850
3867
|
Z(t.$slots, "footer", {}, void 0, !0)
|
|
3851
3868
|
])) : G("", !0)
|
|
3852
3869
|
], 2)),
|
|
3853
|
-
|
|
3870
|
+
q("div", zs, [
|
|
3854
3871
|
Z(t.$slots, "default", {}, void 0, !0)
|
|
3855
3872
|
])
|
|
3856
3873
|
])
|
|
3857
3874
|
], 2));
|
|
3858
3875
|
}
|
|
3859
|
-
}), un = /* @__PURE__ */ ke(Ys, [["__scopeId", "data-v-8b6dc312"]]), { useAxios:
|
|
3876
|
+
}), un = /* @__PURE__ */ ke(Ys, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Bt, useDeleteUrlBuilder: Js, useErrors: Ws, useFetchUrlBuilder: hl, useFetcher: Zs, useDebouncedFilter: or, useStringHelpers: vl, useHelpers: bl, useGatewayFeatureSupported: Cl, useTruncationDetector: kl } = ce;
|
|
3860
3877
|
const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group-cta-text" }, el = {
|
|
3861
3878
|
key: 0,
|
|
3862
3879
|
class: "kong-ui-entity-add-to-groups-error"
|
|
@@ -3877,95 +3894,95 @@ const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group
|
|
|
3877
3894
|
},
|
|
3878
3895
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
3879
3896
|
setup(e, { emit: n }) {
|
|
3880
|
-
var
|
|
3881
|
-
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } =
|
|
3882
|
-
headers: (
|
|
3883
|
-
}), a =
|
|
3897
|
+
var U;
|
|
3898
|
+
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } = Bt({
|
|
3899
|
+
headers: (U = t.config) == null ? void 0 : U.requestHeaders
|
|
3900
|
+
}), a = M([]), {
|
|
3884
3901
|
debouncedQueryChange: i,
|
|
3885
3902
|
loading: s,
|
|
3886
3903
|
allRecords: l,
|
|
3887
|
-
error:
|
|
3904
|
+
error: u,
|
|
3888
3905
|
loadItems: d,
|
|
3889
|
-
results:
|
|
3906
|
+
results: c
|
|
3890
3907
|
} = or(
|
|
3891
3908
|
t.config,
|
|
3892
|
-
|
|
3909
|
+
$e.list[t.config.app].all,
|
|
3893
3910
|
"",
|
|
3894
3911
|
{
|
|
3895
3912
|
fetchedItemsKey: "data",
|
|
3896
3913
|
searchKeys: ["name", "id"]
|
|
3897
3914
|
}
|
|
3898
|
-
), m =
|
|
3899
|
-
label:
|
|
3900
|
-
value:
|
|
3901
|
-
selected: a.value.includes(
|
|
3902
|
-
data:
|
|
3915
|
+
), m = x(() => u.value ? r("consumer_groups.errors.general") : ""), g = M(0), k = x(() => l.value === void 0), _ = x(() => c.value.map((A) => ({
|
|
3916
|
+
label: A.name,
|
|
3917
|
+
value: A.id,
|
|
3918
|
+
selected: a.value.includes(A.id),
|
|
3919
|
+
data: A
|
|
3903
3920
|
// we need this to determine whether or not to show the description text
|
|
3904
|
-
}))), p = (
|
|
3905
|
-
var
|
|
3906
|
-
const
|
|
3907
|
-
return
|
|
3908
|
-
},
|
|
3909
|
-
|
|
3910
|
-
}, y =
|
|
3921
|
+
}))), p = (A) => {
|
|
3922
|
+
var j;
|
|
3923
|
+
const E = k.value ? c.value.find((K) => K.id === A) : (j = l.value) == null ? void 0 : j.find((K) => K.id === A);
|
|
3924
|
+
return E ? E.name : A;
|
|
3925
|
+
}, w = () => {
|
|
3926
|
+
B.value = "", y.value = [], I.value = [], n("cancel");
|
|
3927
|
+
}, y = M([]), b = M(!1), B = M(""), H = async () => {
|
|
3911
3928
|
if (!a.value.length) {
|
|
3912
|
-
|
|
3929
|
+
B.value = "", I.value = [], n("cancel");
|
|
3913
3930
|
return;
|
|
3914
3931
|
}
|
|
3915
|
-
|
|
3932
|
+
b.value = !0, B.value = "", y.value = [], I.value = [];
|
|
3916
3933
|
try {
|
|
3917
|
-
const
|
|
3918
|
-
let
|
|
3919
|
-
|
|
3920
|
-
K.status !== "fulfilled" && (
|
|
3921
|
-
}),
|
|
3934
|
+
const A = a.value.map((K) => z(K)), E = await Promise.allSettled(A);
|
|
3935
|
+
let j = !0;
|
|
3936
|
+
E.forEach((K) => {
|
|
3937
|
+
K.status !== "fulfilled" && (j = !1);
|
|
3938
|
+
}), j ? (y.value = [], I.value = [], n("add:success", a.value), a.value = []) : (y.value.length && n("add:partial-success", y.value), a.value = [], V(E));
|
|
3922
3939
|
} catch {
|
|
3923
|
-
|
|
3940
|
+
B.value = r("consumer_groups.errors.add"), n("error", B.value);
|
|
3924
3941
|
} finally {
|
|
3925
|
-
|
|
3942
|
+
b.value = !1;
|
|
3926
3943
|
}
|
|
3927
|
-
}, re =
|
|
3928
|
-
var
|
|
3929
|
-
let
|
|
3930
|
-
return t.config.app === "konnect" ?
|
|
3931
|
-
}), z = async (
|
|
3932
|
-
const
|
|
3933
|
-
group:
|
|
3944
|
+
}, re = x(() => {
|
|
3945
|
+
var E, j, K, J;
|
|
3946
|
+
let A = `${t.config.apiBaseUrl}${$e.list[t.config.app].forConsumer}`;
|
|
3947
|
+
return t.config.app === "konnect" ? A = A.replace(/{controlPlaneId}/gi, ((E = t.config) == null ? void 0 : E.controlPlaneId) || "").replace(/{consumerId}/gi, ((j = t.config) == null ? void 0 : j.consumerId) || "") : t.config.app === "kongManager" && (A = A.replace(/\/{workspace}/gi, (K = t.config) != null && K.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((J = t.config) == null ? void 0 : J.consumerId) || "")), A;
|
|
3948
|
+
}), z = async (A) => {
|
|
3949
|
+
const E = {
|
|
3950
|
+
group: A
|
|
3934
3951
|
};
|
|
3935
3952
|
try {
|
|
3936
|
-
const
|
|
3937
|
-
return y.value.push(
|
|
3938
|
-
} catch (
|
|
3939
|
-
let K = `${p(
|
|
3940
|
-
return
|
|
3953
|
+
const j = await o.post(re.value, E);
|
|
3954
|
+
return y.value.push(A), j;
|
|
3955
|
+
} catch (j) {
|
|
3956
|
+
let K = `${p(A)} - ${j.message}`;
|
|
3957
|
+
return j.response.status === 409 && (K = `${p(A)} - ${r("consumer_groups.errors.already_added")}`), Promise.reject(Error(K));
|
|
3941
3958
|
}
|
|
3942
|
-
}, I =
|
|
3943
|
-
I.value =
|
|
3944
|
-
var
|
|
3945
|
-
return (
|
|
3959
|
+
}, I = M([]), V = (A) => {
|
|
3960
|
+
I.value = A.map((E) => {
|
|
3961
|
+
var j;
|
|
3962
|
+
return (j = E.reason) == null ? void 0 : j.message;
|
|
3946
3963
|
}).filter(Boolean);
|
|
3947
3964
|
};
|
|
3948
|
-
return
|
|
3965
|
+
return xe(_, () => {
|
|
3949
3966
|
g.value++;
|
|
3950
3967
|
}, { immediate: !0, deep: !0 }), Qe(async () => {
|
|
3951
3968
|
await d();
|
|
3952
|
-
}), (
|
|
3953
|
-
const
|
|
3954
|
-
return f(),
|
|
3955
|
-
"action-pending":
|
|
3969
|
+
}), (A, E) => {
|
|
3970
|
+
const j = L("KMultiselect"), K = L("KAlert"), J = L("KPrompt");
|
|
3971
|
+
return f(), R(J, {
|
|
3972
|
+
"action-pending": b.value,
|
|
3956
3973
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
3957
3974
|
"data-testid": "add-to-group-modal",
|
|
3958
3975
|
"is-visible": e.visible,
|
|
3959
3976
|
title: h(r)("consumer_groups.consumers.add.title"),
|
|
3960
|
-
onCanceled:
|
|
3977
|
+
onCanceled: w,
|
|
3961
3978
|
onProceed: H
|
|
3962
3979
|
}, {
|
|
3963
3980
|
"body-content": v(() => [
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
j
|
|
3981
|
+
q("div", Qs, [
|
|
3982
|
+
q("p", Xs, O(h(r)("consumer_groups.consumers.add.ctaText")), 1),
|
|
3983
|
+
F(j, {
|
|
3967
3984
|
modelValue: a.value,
|
|
3968
|
-
"onUpdate:modelValue":
|
|
3985
|
+
"onUpdate:modelValue": E[0] || (E[0] = (X) => a.value = X),
|
|
3969
3986
|
autosuggest: "",
|
|
3970
3987
|
"data-testid": "add-to-groups-multiselect",
|
|
3971
3988
|
"dropdown-footer-text": k.value ? h(r)("consumer_groups.consumers.add.footer") : void 0,
|
|
@@ -3973,19 +3990,19 @@ const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group
|
|
|
3973
3990
|
label: h(r)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
3974
3991
|
loading: h(s),
|
|
3975
3992
|
placeholder: h(r)("consumer_groups.consumers.add.consumer_group_placeholder"),
|
|
3976
|
-
readonly:
|
|
3993
|
+
readonly: b.value,
|
|
3977
3994
|
required: "",
|
|
3978
3995
|
width: "100%",
|
|
3979
3996
|
onQueryChange: h(i)
|
|
3980
3997
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
3981
|
-
|
|
3982
|
-
|
|
3998
|
+
B.value || m.value || I.value.length ? (f(), T("div", el, [
|
|
3999
|
+
F(K, { appearance: "danger" }, {
|
|
3983
4000
|
alertMessage: v(() => [
|
|
3984
|
-
|
|
3985
|
-
I.value.length ? (f(),
|
|
3986
|
-
(f(!0),
|
|
4001
|
+
q("p", null, O(h(r)("consumer_groups.errors.add")), 1),
|
|
4002
|
+
I.value.length ? (f(), T("ul", tl, [
|
|
4003
|
+
(f(!0), T(ve, null, ye(I.value, (X, ee) => (f(), T("li", { key: ee }, O(X), 1))), 128))
|
|
3987
4004
|
])) : G("", !0),
|
|
3988
|
-
|
|
4005
|
+
q("div", null, O(B.value || m.value), 1)
|
|
3989
4006
|
]),
|
|
3990
4007
|
_: 1
|
|
3991
4008
|
})
|
|
@@ -3997,12 +4014,12 @@ const Qs = { class: "add-to-group-form-container" }, Xs = { class: "add-to-group
|
|
|
3997
4014
|
};
|
|
3998
4015
|
}
|
|
3999
4016
|
});
|
|
4000
|
-
const
|
|
4017
|
+
const Ft = (e, n) => {
|
|
4001
4018
|
const t = e.__vccOpts || e;
|
|
4002
4019
|
for (const [r, o] of n)
|
|
4003
4020
|
t[r] = o;
|
|
4004
4021
|
return t;
|
|
4005
|
-
}, rl = /* @__PURE__ */
|
|
4022
|
+
}, rl = /* @__PURE__ */ Ft(nl, [["__scopeId", "data-v-4d30f3c5"]]), ol = { class: "kong-ui-entities-consumer-groups-list" }, al = { key: 1 }, il = /* @__PURE__ */ ie({
|
|
4006
4023
|
__name: "ConsumerGroupList",
|
|
4007
4024
|
props: {
|
|
4008
4025
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4043,20 +4060,20 @@ const Kt = (e, n) => {
|
|
|
4043
4060
|
},
|
|
4044
4061
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4045
4062
|
setup(e, { emit: n }) {
|
|
4046
|
-
var
|
|
4047
|
-
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } =
|
|
4048
|
-
headers: (
|
|
4049
|
-
}), s =
|
|
4063
|
+
var Kt;
|
|
4064
|
+
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } = Bt({
|
|
4065
|
+
headers: (Kt = t.config) == null ? void 0 : Kt.requestHeaders
|
|
4066
|
+
}), s = M(1), l = x(() => !!t.config.consumerId), u = x(() => t.config.app !== "kongManager" || !!t.config.disableSorting), d = {
|
|
4050
4067
|
name: { label: o("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4051
4068
|
};
|
|
4052
4069
|
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 };
|
|
4053
|
-
const
|
|
4070
|
+
const c = d, m = ($) => ({
|
|
4054
4071
|
"data-testid": $.username ?? $.custom_id ?? $.id
|
|
4055
|
-
}), g =
|
|
4072
|
+
}), g = x(() => {
|
|
4056
4073
|
var Y, ue, Ce, Ee;
|
|
4057
|
-
let $ = `${t.config.apiBaseUrl}${
|
|
4074
|
+
let $ = `${t.config.apiBaseUrl}${$e.list[t.config.app][l.value ? "forConsumer" : "all"]}`;
|
|
4058
4075
|
return t.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((Y = t.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((ue = t.config) == null ? void 0 : ue.consumerId) || "") : t.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (Ce = t.config) != null && Ce.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), $;
|
|
4059
|
-
}), k =
|
|
4076
|
+
}), k = M(""), _ = x(() => {
|
|
4060
4077
|
const $ = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4061
4078
|
return $ ? {
|
|
4062
4079
|
isExactMatch: $,
|
|
@@ -4072,11 +4089,11 @@ const Kt = (e, n) => {
|
|
|
4072
4089
|
},
|
|
4073
4090
|
schema: t.config.filterSchema
|
|
4074
4091
|
};
|
|
4075
|
-
}), p =
|
|
4092
|
+
}), p = x(() => l.value ? "consumer_groups" : void 0), { fetcher: w, fetcherState: y } = Zs(t.config, g.value, p.value), b = () => {
|
|
4076
4093
|
k.value = "";
|
|
4077
|
-
},
|
|
4094
|
+
}, B = () => {
|
|
4078
4095
|
s.value++;
|
|
4079
|
-
}, H =
|
|
4096
|
+
}, H = M(""), re = ($, Y) => {
|
|
4080
4097
|
const ue = $.id;
|
|
4081
4098
|
if (!Y(ue)) {
|
|
4082
4099
|
n("copy:error", {
|
|
@@ -4110,47 +4127,47 @@ const Kt = (e, n) => {
|
|
|
4110
4127
|
}, V = ($) => ({
|
|
4111
4128
|
label: o("consumer_groups.actions.view"),
|
|
4112
4129
|
to: t.config.getViewRoute($)
|
|
4113
|
-
}),
|
|
4130
|
+
}), U = ($) => ({
|
|
4114
4131
|
label: o("consumer_groups.actions.edit"),
|
|
4115
4132
|
to: t.config.getEditRoute($)
|
|
4116
|
-
}),
|
|
4117
|
-
|
|
4133
|
+
}), A = M(void 0), E = M(!1), j = M(!1), K = M(""), J = Js(t.config, g.value), X = ($) => {
|
|
4134
|
+
A.value = $, E.value = !0;
|
|
4118
4135
|
}, ee = () => {
|
|
4119
|
-
|
|
4136
|
+
E.value = !1;
|
|
4120
4137
|
}, te = async () => {
|
|
4121
4138
|
var $, Y, ue;
|
|
4122
|
-
if (($ =
|
|
4123
|
-
|
|
4139
|
+
if (($ = A.value) != null && $.id) {
|
|
4140
|
+
j.value = !0;
|
|
4124
4141
|
try {
|
|
4125
|
-
await i.delete(J(
|
|
4142
|
+
await i.delete(J(A.value.id)), j.value = !1, E.value = !1, s.value++, n("delete:success", A.value);
|
|
4126
4143
|
} catch (Ce) {
|
|
4127
4144
|
K.value = ((ue = (Y = Ce.response) == null ? void 0 : Y.data) == null ? void 0 : ue.message) || Ce.message || o("consumer_groups.errors.delete"), n("error", Ce);
|
|
4128
4145
|
} finally {
|
|
4129
|
-
|
|
4146
|
+
j.value = !1;
|
|
4130
4147
|
}
|
|
4131
4148
|
}
|
|
4132
|
-
}, se =
|
|
4149
|
+
}, se = M(!1), Ve = () => {
|
|
4133
4150
|
se.value = !0;
|
|
4134
|
-
},
|
|
4151
|
+
}, C = () => {
|
|
4135
4152
|
se.value = !1;
|
|
4136
|
-
},
|
|
4137
|
-
Y ||
|
|
4153
|
+
}, N = ($, Y) => {
|
|
4154
|
+
Y || C(), s.value++, n("add:success", $);
|
|
4138
4155
|
}, oe = () => {
|
|
4139
4156
|
l.value && Ve();
|
|
4140
|
-
},
|
|
4141
|
-
|
|
4142
|
-
},
|
|
4143
|
-
D.value = !1,
|
|
4144
|
-
},
|
|
4157
|
+
}, P = M(void 0), D = M(!1), ge = M(""), _e = ($) => {
|
|
4158
|
+
P.value = $, D.value = !0;
|
|
4159
|
+
}, de = () => {
|
|
4160
|
+
D.value = !1, P.value = void 0;
|
|
4161
|
+
}, Ke = x(() => {
|
|
4145
4162
|
var Y, ue, Ce, Ee;
|
|
4146
|
-
let $ = `${t.config.apiBaseUrl}${
|
|
4163
|
+
let $ = `${t.config.apiBaseUrl}${$e.list[t.config.app].oneForConsumer}`;
|
|
4147
4164
|
return t.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((Y = t.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((ue = t.config) == null ? void 0 : ue.consumerId) || "") : t.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (Ce = t.config) != null && Ce.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), $;
|
|
4148
|
-
}), De =
|
|
4149
|
-
if (
|
|
4165
|
+
}), De = M(!1), ar = async () => {
|
|
4166
|
+
if (P.value) {
|
|
4150
4167
|
De.value = !0;
|
|
4151
4168
|
try {
|
|
4152
|
-
const $ =
|
|
4153
|
-
await i.delete($), n("remove:success",
|
|
4169
|
+
const $ = Ke.value.replace(/{consumerGroupId}/gi, P.value.id);
|
|
4170
|
+
await i.delete($), n("remove:success", P.value), de(), s.value++;
|
|
4154
4171
|
} catch ($) {
|
|
4155
4172
|
ge.value = $.message || o("consumer_groups.errors.delete"), n("error", $);
|
|
4156
4173
|
} finally {
|
|
@@ -4158,14 +4175,14 @@ const Kt = (e, n) => {
|
|
|
4158
4175
|
}
|
|
4159
4176
|
}
|
|
4160
4177
|
};
|
|
4161
|
-
|
|
4162
|
-
if ($.status ===
|
|
4178
|
+
xe(y, ($) => {
|
|
4179
|
+
if ($.status === Oe.Error) {
|
|
4163
4180
|
H.value = o("consumer_groups.errors.general"), n("error", $.error);
|
|
4164
4181
|
return;
|
|
4165
4182
|
}
|
|
4166
4183
|
H.value = "";
|
|
4167
4184
|
});
|
|
4168
|
-
const pt =
|
|
4185
|
+
const pt = M({
|
|
4169
4186
|
ctaPath: l.value ? void 0 : t.config.createRoute,
|
|
4170
4187
|
ctaText: void 0,
|
|
4171
4188
|
message: o("consumer_groups.list.empty_state.description"),
|
|
@@ -4174,30 +4191,30 @@ const Kt = (e, n) => {
|
|
|
4174
4191
|
return Qe(async () => {
|
|
4175
4192
|
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"));
|
|
4176
4193
|
}), ($, Y) => {
|
|
4177
|
-
const ue =
|
|
4178
|
-
return f(),
|
|
4179
|
-
|
|
4194
|
+
const ue = L("KButton"), Ce = L("KBadge"), Ee = L("KTruncate"), Ge = L("KDropdownItem"), Nt = L("KClipboardProvider"), ir = L("KPrompt");
|
|
4195
|
+
return f(), T("div", ol, [
|
|
4196
|
+
F(h(Is), {
|
|
4180
4197
|
"cache-identifier": e.cacheIdentifier,
|
|
4181
4198
|
"disable-pagination": l.value,
|
|
4182
4199
|
"disable-pagination-page-jump": "",
|
|
4183
|
-
"disable-sorting":
|
|
4200
|
+
"disable-sorting": u.value,
|
|
4184
4201
|
"empty-state-options": pt.value,
|
|
4185
4202
|
"enable-entity-actions": "",
|
|
4186
4203
|
"error-message": H.value,
|
|
4187
|
-
fetcher: h(
|
|
4204
|
+
fetcher: h(w),
|
|
4188
4205
|
"fetcher-cache-key": s.value,
|
|
4189
4206
|
"pagination-type": "offset",
|
|
4190
4207
|
"preferences-storage-key": "kong-ui-entities-consumer-groups-list",
|
|
4191
4208
|
query: k.value,
|
|
4192
4209
|
"row-attributes": m,
|
|
4193
|
-
"table-headers": h(
|
|
4194
|
-
onClearSearchInput:
|
|
4210
|
+
"table-headers": h(c),
|
|
4211
|
+
onClearSearchInput: b,
|
|
4195
4212
|
"onClick:row": Y[3] || (Y[3] = (W) => I(W)),
|
|
4196
4213
|
onEmptyStateCtaClicked: oe,
|
|
4197
|
-
onSort:
|
|
4214
|
+
onSort: B
|
|
4198
4215
|
}, {
|
|
4199
4216
|
"toolbar-filter": v(() => [
|
|
4200
|
-
l.value ? G("", !0) : (f(),
|
|
4217
|
+
l.value ? G("", !0) : (f(), R(h(Rs), {
|
|
4201
4218
|
key: 0,
|
|
4202
4219
|
modelValue: k.value,
|
|
4203
4220
|
"onUpdate:modelValue": Y[0] || (Y[0] = (W) => k.value = W),
|
|
@@ -4205,11 +4222,11 @@ const Kt = (e, n) => {
|
|
|
4205
4222
|
}, null, 8, ["modelValue", "config"]))
|
|
4206
4223
|
]),
|
|
4207
4224
|
"toolbar-button": v(() => [
|
|
4208
|
-
|
|
4225
|
+
F(h(Xe), {
|
|
4209
4226
|
"auth-function": () => e.canCreate()
|
|
4210
4227
|
}, {
|
|
4211
4228
|
default: v(() => [
|
|
4212
|
-
|
|
4229
|
+
F(ue, {
|
|
4213
4230
|
appearance: "primary",
|
|
4214
4231
|
"data-testid": "toolbar-add-consumer-group",
|
|
4215
4232
|
icon: "plus",
|
|
@@ -4217,7 +4234,7 @@ const Kt = (e, n) => {
|
|
|
4217
4234
|
onClick: Y[1] || (Y[1] = () => e.config.consumerId ? Ve() : void 0)
|
|
4218
4235
|
}, {
|
|
4219
4236
|
default: v(() => [
|
|
4220
|
-
Q(
|
|
4237
|
+
Q(O(e.config.consumerId ? h(o)("consumer_groups.actions.add_to_group") : h(o)("consumer_groups.list.toolbar_actions.new_consumer_group")), 1)
|
|
4221
4238
|
]),
|
|
4222
4239
|
_: 1
|
|
4223
4240
|
}, 8, ["to"])
|
|
@@ -4226,62 +4243,62 @@ const Kt = (e, n) => {
|
|
|
4226
4243
|
}, 8, ["auth-function"])
|
|
4227
4244
|
]),
|
|
4228
4245
|
name: v(({ rowValue: W }) => [
|
|
4229
|
-
|
|
4246
|
+
q("b", null, O(W ?? "-"), 1)
|
|
4230
4247
|
]),
|
|
4231
4248
|
consumers_count: v(({ rowValue: W }) => [
|
|
4232
|
-
Q(
|
|
4249
|
+
Q(O(W ?? "-"), 1)
|
|
4233
4250
|
]),
|
|
4234
4251
|
tags: v(({ rowValue: W }) => [
|
|
4235
|
-
(W == null ? void 0 : W.length) > 0 ? (f(),
|
|
4252
|
+
(W == null ? void 0 : W.length) > 0 ? (f(), R(Ee, { key: 0 }, {
|
|
4236
4253
|
default: v(() => [
|
|
4237
|
-
(f(!0),
|
|
4254
|
+
(f(!0), T(ve, null, ye(W, (Ne) => (f(), R(Ce, {
|
|
4238
4255
|
key: Ne,
|
|
4239
4256
|
onClick: Y[2] || (Y[2] = rt(() => {
|
|
4240
4257
|
}, ["stop"]))
|
|
4241
4258
|
}, {
|
|
4242
4259
|
default: v(() => [
|
|
4243
|
-
Q(
|
|
4260
|
+
Q(O(Ne), 1)
|
|
4244
4261
|
]),
|
|
4245
4262
|
_: 2
|
|
4246
4263
|
}, 1024))), 128))
|
|
4247
4264
|
]),
|
|
4248
4265
|
_: 2
|
|
4249
|
-
}, 1024)) : (f(),
|
|
4266
|
+
}, 1024)) : (f(), T("span", al, "-"))
|
|
4250
4267
|
]),
|
|
4251
4268
|
actions: v(({ row: W }) => [
|
|
4252
|
-
|
|
4269
|
+
F(Nt, null, {
|
|
4253
4270
|
default: v(({ copyToClipboard: Ne }) => [
|
|
4254
|
-
|
|
4271
|
+
F(Ge, {
|
|
4255
4272
|
"data-testid": "action-entity-copy-id",
|
|
4256
4273
|
onClick: (sr) => re(W, Ne)
|
|
4257
4274
|
}, {
|
|
4258
4275
|
default: v(() => [
|
|
4259
|
-
Q(
|
|
4276
|
+
Q(O(h(o)("consumer_groups.actions.copy_id")), 1)
|
|
4260
4277
|
]),
|
|
4261
4278
|
_: 2
|
|
4262
4279
|
}, 1032, ["onClick"])
|
|
4263
4280
|
]),
|
|
4264
4281
|
_: 2
|
|
4265
4282
|
}, 1024),
|
|
4266
|
-
|
|
4283
|
+
F(Nt, null, {
|
|
4267
4284
|
default: v(({ copyToClipboard: Ne }) => [
|
|
4268
|
-
|
|
4285
|
+
F(Ge, {
|
|
4269
4286
|
"data-testid": "action-entity-copy-json",
|
|
4270
4287
|
onClick: (sr) => z(W, Ne)
|
|
4271
4288
|
}, {
|
|
4272
4289
|
default: v(() => [
|
|
4273
|
-
Q(
|
|
4290
|
+
Q(O(h(o)("consumer_groups.actions.copy_json")), 1)
|
|
4274
4291
|
]),
|
|
4275
4292
|
_: 2
|
|
4276
4293
|
}, 1032, ["onClick"])
|
|
4277
4294
|
]),
|
|
4278
4295
|
_: 2
|
|
4279
4296
|
}, 1024),
|
|
4280
|
-
|
|
4297
|
+
F(h(Xe), {
|
|
4281
4298
|
"auth-function": () => e.canRetrieve(W)
|
|
4282
4299
|
}, {
|
|
4283
4300
|
default: v(() => [
|
|
4284
|
-
|
|
4301
|
+
F(Ge, {
|
|
4285
4302
|
"data-testid": "action-entity-view",
|
|
4286
4303
|
"has-divider": "",
|
|
4287
4304
|
item: V(W.id)
|
|
@@ -4289,29 +4306,29 @@ const Kt = (e, n) => {
|
|
|
4289
4306
|
]),
|
|
4290
4307
|
_: 2
|
|
4291
4308
|
}, 1032, ["auth-function"]),
|
|
4292
|
-
|
|
4309
|
+
F(h(Xe), {
|
|
4293
4310
|
"auth-function": () => e.canEdit(W)
|
|
4294
4311
|
}, {
|
|
4295
4312
|
default: v(() => [
|
|
4296
|
-
|
|
4313
|
+
F(Ge, {
|
|
4297
4314
|
"data-testid": "action-entity-edit",
|
|
4298
|
-
item:
|
|
4315
|
+
item: U(W.id)
|
|
4299
4316
|
}, null, 8, ["item"])
|
|
4300
4317
|
]),
|
|
4301
4318
|
_: 2
|
|
4302
4319
|
}, 1032, ["auth-function"]),
|
|
4303
|
-
|
|
4320
|
+
F(h(Xe), {
|
|
4304
4321
|
"auth-function": () => e.canDelete(W)
|
|
4305
4322
|
}, {
|
|
4306
4323
|
default: v(() => [
|
|
4307
|
-
|
|
4324
|
+
F(Ge, {
|
|
4308
4325
|
"data-testid": "action-entity-delete",
|
|
4309
4326
|
"has-divider": "",
|
|
4310
4327
|
"is-dangerous": "",
|
|
4311
4328
|
onClick: () => e.config.consumerId ? _e(W) : X(W)
|
|
4312
4329
|
}, {
|
|
4313
4330
|
default: v(() => [
|
|
4314
|
-
Q(
|
|
4331
|
+
Q(O(e.config.consumerId ? h(o)("consumer_groups.actions.exit") : h(o)("consumer_groups.actions.delete")), 1)
|
|
4315
4332
|
]),
|
|
4316
4333
|
_: 2
|
|
4317
4334
|
}, 1032, ["onClick"])
|
|
@@ -4321,56 +4338,56 @@ const Kt = (e, n) => {
|
|
|
4321
4338
|
]),
|
|
4322
4339
|
_: 1
|
|
4323
4340
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4324
|
-
|
|
4325
|
-
"action-pending":
|
|
4341
|
+
F(h(Ts), {
|
|
4342
|
+
"action-pending": j.value,
|
|
4326
4343
|
"data-testid": "delete-consumer-group-modal",
|
|
4327
4344
|
description: h(o)("consumer_groups.delete.description"),
|
|
4328
|
-
"entity-name":
|
|
4345
|
+
"entity-name": A.value && (A.value.name || A.value.id),
|
|
4329
4346
|
"entity-type": h(dn).ConsumerGroup,
|
|
4330
4347
|
error: K.value,
|
|
4331
4348
|
title: h(o)("consumer_groups.delete.title"),
|
|
4332
|
-
visible:
|
|
4349
|
+
visible: E.value,
|
|
4333
4350
|
onCancel: ee,
|
|
4334
4351
|
onProceed: te
|
|
4335
4352
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4336
|
-
e.config.consumerId ? (f(),
|
|
4353
|
+
e.config.consumerId ? (f(), R(rl, {
|
|
4337
4354
|
key: 0,
|
|
4338
4355
|
config: e.config,
|
|
4339
4356
|
"data-testid": "add-to-group-modal",
|
|
4340
4357
|
visible: se.value,
|
|
4341
|
-
"onAdd:partialSuccess": Y[4] || (Y[4] = (W) =>
|
|
4342
|
-
"onAdd:success": Y[5] || (Y[5] = (W) =>
|
|
4343
|
-
onCancel:
|
|
4358
|
+
"onAdd:partialSuccess": Y[4] || (Y[4] = (W) => N(W, !0)),
|
|
4359
|
+
"onAdd:success": Y[5] || (Y[5] = (W) => N(W)),
|
|
4360
|
+
onCancel: C
|
|
4344
4361
|
}, null, 8, ["config", "visible"])) : G("", !0),
|
|
4345
|
-
e.config.consumerId &&
|
|
4362
|
+
e.config.consumerId && P.value ? (f(), R(ir, {
|
|
4346
4363
|
key: 1,
|
|
4347
4364
|
"data-testid": "exit-group-modal",
|
|
4348
4365
|
"is-visible": D.value,
|
|
4349
4366
|
title: h(o)("consumer_groups.consumers.exit.title"),
|
|
4350
4367
|
type: "danger",
|
|
4351
|
-
onCanceled:
|
|
4368
|
+
onCanceled: de,
|
|
4352
4369
|
onProceed: ar
|
|
4353
4370
|
}, {
|
|
4354
4371
|
"body-content": v(() => [
|
|
4355
|
-
|
|
4372
|
+
F(h(r), {
|
|
4356
4373
|
class: "exit-modal-message",
|
|
4357
4374
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
4358
4375
|
tag: "p"
|
|
4359
|
-
},
|
|
4376
|
+
}, Te({
|
|
4360
4377
|
consumerGroup: v(() => [
|
|
4361
|
-
|
|
4378
|
+
q("strong", null, O(P.value.name || P.value.id), 1)
|
|
4362
4379
|
]),
|
|
4363
4380
|
_: 2
|
|
4364
4381
|
}, [
|
|
4365
4382
|
e.config.consumerUsername ? {
|
|
4366
4383
|
name: "consumer",
|
|
4367
4384
|
fn: v(() => [
|
|
4368
|
-
|
|
4385
|
+
q("strong", null, O(e.config.consumerUsername), 1)
|
|
4369
4386
|
]),
|
|
4370
4387
|
key: "0"
|
|
4371
4388
|
} : void 0
|
|
4372
4389
|
]), 1032, ["keypath"]),
|
|
4373
|
-
|
|
4390
|
+
q("p", null, O(h(o)("consumer_groups.consumers.exit.description")), 1)
|
|
4374
4391
|
]),
|
|
4375
4392
|
_: 1
|
|
4376
4393
|
}, 8, ["is-visible", "title"])) : G("", !0)
|
|
@@ -4378,7 +4395,7 @@ const Kt = (e, n) => {
|
|
|
4378
4395
|
};
|
|
4379
4396
|
}
|
|
4380
4397
|
});
|
|
4381
|
-
const
|
|
4398
|
+
const _l = /* @__PURE__ */ Ft(il, [["__scopeId", "data-v-80c4522c"]]), sl = { class: "kong-ui-entities-consumer-group-form" }, ll = { class: "select-item-label" }, ul = {
|
|
4382
4399
|
key: 0,
|
|
4383
4400
|
class: "select-item-desc"
|
|
4384
4401
|
}, cl = /* @__PURE__ */ ie({
|
|
@@ -4415,105 +4432,105 @@ const kl = /* @__PURE__ */ Kt(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4415
4432
|
}), {
|
|
4416
4433
|
debouncedQueryChange: s,
|
|
4417
4434
|
loading: l,
|
|
4418
|
-
error:
|
|
4435
|
+
error: u,
|
|
4419
4436
|
loadItems: d,
|
|
4420
|
-
results:
|
|
4421
|
-
} = or(t.config, (se =
|
|
4437
|
+
results: c
|
|
4438
|
+
} = or(t.config, (se = $e.form[(te = t.config) == null ? void 0 : te.app]) == null ? void 0 : se.consumersList, "", {
|
|
4422
4439
|
fetchedItemsKey: "data",
|
|
4423
4440
|
searchKeys: ["username", "custom_id"]
|
|
4424
|
-
}), { axiosInstance: m } =
|
|
4441
|
+
}), { axiosInstance: m } = Bt({
|
|
4425
4442
|
headers: (Ve = t.config) == null ? void 0 : Ve.requestHeaders
|
|
4426
|
-
}), { getMessageFromError: g } = Ws(), k =
|
|
4427
|
-
label:
|
|
4428
|
-
value:
|
|
4429
|
-
selected: a.fields.consumers.includes(
|
|
4430
|
-
data:
|
|
4443
|
+
}), { getMessageFromError: g } = Ws(), k = x(() => c.value.map((C) => ({
|
|
4444
|
+
label: C.username || C.custom_id,
|
|
4445
|
+
value: C.id,
|
|
4446
|
+
selected: a.fields.consumers.includes(C.id),
|
|
4447
|
+
data: C
|
|
4431
4448
|
// we need this to determine whether or not to show the description text
|
|
4432
|
-
}))), _ =
|
|
4433
|
-
var
|
|
4434
|
-
return (
|
|
4435
|
-
}), p =
|
|
4436
|
-
var D, ge, _e,
|
|
4437
|
-
let
|
|
4438
|
-
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ?
|
|
4439
|
-
},
|
|
4440
|
-
var
|
|
4441
|
-
o.push(((
|
|
4442
|
-
}, H = (
|
|
4443
|
-
n("error",
|
|
4444
|
-
}, re = (
|
|
4445
|
-
n("loading",
|
|
4446
|
-
}, z = async (
|
|
4447
|
-
var oe,
|
|
4448
|
-
a.fields.name = ((oe =
|
|
4449
|
-
const
|
|
4450
|
-
if (a.fields.tags = (
|
|
4451
|
-
a.fields.consumers = ((ge =
|
|
4449
|
+
}))), _ = x(() => {
|
|
4450
|
+
var C, N;
|
|
4451
|
+
return (N = $e.form[(C = t.config) == null ? void 0 : C.app]) == null ? void 0 : N.edit;
|
|
4452
|
+
}), p = x(() => t.consumerGroupId ? nt.Edit : nt.Create), w = x(() => !!a.fields.name && !I.value), y = x(() => JSON.stringify(a.fields) !== JSON.stringify(i)), b = (C, N = "", oe = "") => {
|
|
4453
|
+
var D, ge, _e, de, Ke, De;
|
|
4454
|
+
let P = `${(D = t.config) == null ? void 0 : D.apiBaseUrl}${$e.form[(ge = t.config) == null ? void 0 : ge.app][C]}`;
|
|
4455
|
+
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? P = P.replace(/{controlPlaneId}/gi, ((de = t.config) == null ? void 0 : de.controlPlaneId) || "") : ((Ke = t.config) == null ? void 0 : Ke.app) === "kongManager" && (P = P.replace(/\/{workspace}/gi, (De = t.config) != null && De.workspace ? `/${t.config.workspace}` : "")), P = P.replace(/{id}/gi, N || t.consumerGroupId), (C === "addConsumer" || C === "removeConsumer") && (P = P.replace(/{consumerId}/gi, oe)), P;
|
|
4456
|
+
}, B = () => {
|
|
4457
|
+
var C;
|
|
4458
|
+
o.push(((C = t.config) == null ? void 0 : C.cancelRoute) || { name: "consumer-group-list" });
|
|
4459
|
+
}, H = (C) => {
|
|
4460
|
+
n("error", C);
|
|
4461
|
+
}, re = (C) => {
|
|
4462
|
+
n("loading", C);
|
|
4463
|
+
}, z = async (C) => {
|
|
4464
|
+
var oe, P, D, ge, _e;
|
|
4465
|
+
a.fields.name = ((oe = C == null ? void 0 : C.item) == null ? void 0 : oe.name) || ((P = C == null ? void 0 : C.consumer_group) == null ? void 0 : P.name) || (C == null ? void 0 : C.name) || "";
|
|
4466
|
+
const N = ((D = C == null ? void 0 : C.item) == null ? void 0 : D.tags) || (C == null ? void 0 : C.consumer_group.tags) || (C == null ? void 0 : C.tags) || [];
|
|
4467
|
+
if (a.fields.tags = (N == null ? void 0 : N.join(", ")) || "", "consumers" in C)
|
|
4468
|
+
a.fields.consumers = ((ge = C == null ? void 0 : C.consumers) == null ? void 0 : ge.map((de) => de.id)) || [];
|
|
4452
4469
|
else
|
|
4453
4470
|
try {
|
|
4454
|
-
const { data:
|
|
4455
|
-
a.fields.consumers = "consumers" in
|
|
4456
|
-
} catch (
|
|
4457
|
-
|
|
4471
|
+
const { data: de } = await m.get(b("getConsumers"));
|
|
4472
|
+
a.fields.consumers = "consumers" in de ? (_e = de == null ? void 0 : de.consumers) == null ? void 0 : _e.map((Ke) => Ke.id) : [];
|
|
4473
|
+
} catch (de) {
|
|
4474
|
+
E(de);
|
|
4458
4475
|
}
|
|
4459
4476
|
Object.assign(i, a.fields);
|
|
4460
|
-
}, I =
|
|
4461
|
-
var
|
|
4477
|
+
}, I = x(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")), V = () => {
|
|
4478
|
+
var C, N;
|
|
4462
4479
|
return {
|
|
4463
4480
|
name: a.fields.name,
|
|
4464
|
-
tags: (
|
|
4481
|
+
tags: (N = (C = a.fields.tags.split(",")) == null ? void 0 : C.map((oe) => String(oe || "").trim())) == null ? void 0 : N.filter((oe) => oe !== "")
|
|
4465
4482
|
};
|
|
4466
|
-
},
|
|
4467
|
-
a.errorMessage = g(
|
|
4468
|
-
},
|
|
4469
|
-
Object.assign(i, a.fields), n("update", { ...a.fields, id:
|
|
4470
|
-
}, K = (
|
|
4471
|
-
const
|
|
4472
|
-
|
|
4473
|
-
code:
|
|
4474
|
-
message:
|
|
4475
|
-
}) :
|
|
4483
|
+
}, U = async (C, N = "") => await m.post(b("addConsumer", N, C), { consumer: C }), A = async (C, N = "") => await m.delete(b("removeConsumer", N, C)), E = (C) => {
|
|
4484
|
+
a.errorMessage = g(C), n("error", C);
|
|
4485
|
+
}, j = (C = t.consumerGroupId) => {
|
|
4486
|
+
Object.assign(i, a.fields), n("update", { ...a.fields, id: C });
|
|
4487
|
+
}, K = (C, N, oe = t.consumerGroupId) => {
|
|
4488
|
+
const P = C == null ? void 0 : C.find((D) => D.status !== "fulfilled");
|
|
4489
|
+
P ? E({
|
|
4490
|
+
code: P.status,
|
|
4491
|
+
message: N
|
|
4492
|
+
}) : j(oe);
|
|
4476
4493
|
}, J = async () => {
|
|
4477
|
-
let
|
|
4494
|
+
let C = "";
|
|
4478
4495
|
try {
|
|
4479
|
-
const { data:
|
|
4480
|
-
|
|
4481
|
-
} catch (
|
|
4482
|
-
|
|
4496
|
+
const { data: N } = await m.post(b("create"), V());
|
|
4497
|
+
C = "item" in N ? N.item.id : N.id;
|
|
4498
|
+
} catch (N) {
|
|
4499
|
+
E(N);
|
|
4483
4500
|
}
|
|
4484
|
-
if (a.fields.consumers.length > 0 &&
|
|
4501
|
+
if (a.fields.consumers.length > 0 && C)
|
|
4485
4502
|
try {
|
|
4486
|
-
const
|
|
4487
|
-
K(oe, r("consumer_groups.errors.add_consumer"),
|
|
4488
|
-
} catch (
|
|
4489
|
-
|
|
4503
|
+
const N = a.fields.consumers.map((P) => U(P, C)), oe = await Promise.allSettled(N);
|
|
4504
|
+
K(oe, r("consumer_groups.errors.add_consumer"), C);
|
|
4505
|
+
} catch (N) {
|
|
4506
|
+
E(N);
|
|
4490
4507
|
}
|
|
4491
4508
|
else
|
|
4492
|
-
a.fields.consumers.length === 0 &&
|
|
4509
|
+
a.fields.consumers.length === 0 && C && j(C);
|
|
4493
4510
|
}, X = async () => {
|
|
4494
4511
|
var oe;
|
|
4495
4512
|
try {
|
|
4496
|
-
((oe = t.config) == null ? void 0 : oe.app) === "konnect" ? await m.put(
|
|
4497
|
-
} catch (
|
|
4498
|
-
|
|
4513
|
+
((oe = t.config) == null ? void 0 : oe.app) === "konnect" ? await m.put(b("edit"), V()) : await m.patch(b("edit"), V());
|
|
4514
|
+
} catch (P) {
|
|
4515
|
+
E(P);
|
|
4499
4516
|
}
|
|
4500
|
-
const
|
|
4501
|
-
if (
|
|
4502
|
-
|
|
4517
|
+
const C = a.fields.consumers.filter((P) => !i.consumers.includes(P)), N = i.consumers.filter((P) => !a.fields.consumers.includes(P));
|
|
4518
|
+
if (N.length === 0 && C.length === 0)
|
|
4519
|
+
j();
|
|
4503
4520
|
else {
|
|
4504
|
-
if (
|
|
4521
|
+
if (N.length > 0)
|
|
4505
4522
|
try {
|
|
4506
|
-
const
|
|
4523
|
+
const P = N.map((ge) => A(ge)), D = await Promise.allSettled(P);
|
|
4507
4524
|
K(D, r("consumer_groups.errors.remove_consumer"));
|
|
4508
|
-
} catch (
|
|
4509
|
-
|
|
4525
|
+
} catch (P) {
|
|
4526
|
+
E(P);
|
|
4510
4527
|
}
|
|
4511
|
-
if (
|
|
4528
|
+
if (C.length > 0)
|
|
4512
4529
|
try {
|
|
4513
|
-
const
|
|
4530
|
+
const P = C.map((ge) => U(ge)), D = await Promise.allSettled(P);
|
|
4514
4531
|
K(D, r("consumer_groups.errors.add_consumer"));
|
|
4515
|
-
} catch (
|
|
4516
|
-
|
|
4532
|
+
} catch (P) {
|
|
4533
|
+
E(P);
|
|
4517
4534
|
}
|
|
4518
4535
|
}
|
|
4519
4536
|
}, ee = async () => {
|
|
@@ -4525,31 +4542,31 @@ const kl = /* @__PURE__ */ Kt(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4525
4542
|
};
|
|
4526
4543
|
return Qe(async () => {
|
|
4527
4544
|
await d();
|
|
4528
|
-
}), (
|
|
4529
|
-
const oe =
|
|
4530
|
-
return f(),
|
|
4531
|
-
|
|
4532
|
-
"can-submit":
|
|
4545
|
+
}), (C, N) => {
|
|
4546
|
+
const oe = L("KInput"), P = L("KMultiselect");
|
|
4547
|
+
return f(), T("div", sl, [
|
|
4548
|
+
F(h(ys), {
|
|
4549
|
+
"can-submit": w.value && y.value,
|
|
4533
4550
|
config: e.config,
|
|
4534
4551
|
"edit-id": e.consumerGroupId,
|
|
4535
|
-
"error-message": a.errorMessage || h(
|
|
4552
|
+
"error-message": a.errorMessage || h(u) || I.value,
|
|
4536
4553
|
"fetch-url": _.value,
|
|
4537
4554
|
"is-readonly": a.readonly,
|
|
4538
|
-
onCancel:
|
|
4539
|
-
"onFetch:error":
|
|
4555
|
+
onCancel: B,
|
|
4556
|
+
"onFetch:error": N[3] || (N[3] = (D) => H(D)),
|
|
4540
4557
|
"onFetch:success": z,
|
|
4541
|
-
onLoading:
|
|
4558
|
+
onLoading: N[4] || (N[4] = (D) => re(D)),
|
|
4542
4559
|
onSubmit: ee
|
|
4543
4560
|
}, {
|
|
4544
4561
|
default: v(() => [
|
|
4545
|
-
|
|
4562
|
+
F(h(un), {
|
|
4546
4563
|
description: h(r)("consumer_groups.form.general_info.description"),
|
|
4547
4564
|
title: h(r)("consumer_groups.form.general_info.title")
|
|
4548
4565
|
}, {
|
|
4549
4566
|
default: v(() => [
|
|
4550
|
-
|
|
4567
|
+
F(oe, {
|
|
4551
4568
|
modelValue: a.fields.name,
|
|
4552
|
-
"onUpdate:modelValue":
|
|
4569
|
+
"onUpdate:modelValue": N[0] || (N[0] = (D) => a.fields.name = D),
|
|
4553
4570
|
modelModifiers: { trim: !0 },
|
|
4554
4571
|
autocomplete: "off",
|
|
4555
4572
|
"data-testid": "consumer-group-form-name",
|
|
@@ -4558,9 +4575,9 @@ const kl = /* @__PURE__ */ Kt(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4558
4575
|
required: "",
|
|
4559
4576
|
type: "text"
|
|
4560
4577
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
4561
|
-
|
|
4578
|
+
F(oe, {
|
|
4562
4579
|
modelValue: a.fields.tags,
|
|
4563
|
-
"onUpdate:modelValue":
|
|
4580
|
+
"onUpdate:modelValue": N[1] || (N[1] = (D) => a.fields.tags = D),
|
|
4564
4581
|
modelModifiers: { trim: !0 },
|
|
4565
4582
|
autocomplete: "off",
|
|
4566
4583
|
"data-testid": "consumer-group-form-tags",
|
|
@@ -4576,15 +4593,15 @@ const kl = /* @__PURE__ */ Kt(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4576
4593
|
]),
|
|
4577
4594
|
_: 1
|
|
4578
4595
|
}, 8, ["description", "title"]),
|
|
4579
|
-
|
|
4596
|
+
F(h(un), {
|
|
4580
4597
|
description: h(r)("consumer_groups.form.consumers.description"),
|
|
4581
4598
|
"has-divider": "",
|
|
4582
4599
|
title: h(r)("consumer_groups.form.consumers.title")
|
|
4583
4600
|
}, {
|
|
4584
4601
|
default: v(() => [
|
|
4585
|
-
|
|
4602
|
+
F(P, {
|
|
4586
4603
|
modelValue: a.fields.consumers,
|
|
4587
|
-
"onUpdate:modelValue":
|
|
4604
|
+
"onUpdate:modelValue": N[2] || (N[2] = (D) => a.fields.consumers = D),
|
|
4588
4605
|
appearance: "select",
|
|
4589
4606
|
autosuggest: "",
|
|
4590
4607
|
"expand-selected": "",
|
|
@@ -4596,10 +4613,10 @@ const kl = /* @__PURE__ */ Kt(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4596
4613
|
onQueryChange: h(s)
|
|
4597
4614
|
}, {
|
|
4598
4615
|
"item-template": v(({ item: D }) => {
|
|
4599
|
-
var ge, _e,
|
|
4616
|
+
var ge, _e, de;
|
|
4600
4617
|
return [
|
|
4601
|
-
|
|
4602
|
-
(ge = D == null ? void 0 : D.data) != null && ge.username && ((_e = D == null ? void 0 : D.data) != null && _e.custom_id) ? (f(),
|
|
4618
|
+
q("div", ll, O(D.label), 1),
|
|
4619
|
+
(ge = D == null ? void 0 : D.data) != null && ge.username && ((_e = D == null ? void 0 : D.data) != null && _e.custom_id) ? (f(), T("div", ul, O((de = D == null ? void 0 : D.data) == null ? void 0 : de.custom_id), 1)) : G("", !0)
|
|
4603
4620
|
];
|
|
4604
4621
|
}),
|
|
4605
4622
|
_: 1
|
|
@@ -4614,7 +4631,7 @@ const kl = /* @__PURE__ */ Kt(il, [["__scopeId", "data-v-80c4522c"]]), sl = { cl
|
|
|
4614
4631
|
};
|
|
4615
4632
|
}
|
|
4616
4633
|
});
|
|
4617
|
-
const
|
|
4634
|
+
const wl = /* @__PURE__ */ Ft(cl, [["__scopeId", "data-v-2da12897"]]), dl = { class: "kong-ui-consumer-group-entity-config-card" }, Il = /* @__PURE__ */ ie({
|
|
4618
4635
|
__name: "ConsumerGroupConfigCard",
|
|
4619
4636
|
props: {
|
|
4620
4637
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4641,7 +4658,7 @@ const _l = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-2da12897"]]), dl = { cl
|
|
|
4641
4658
|
},
|
|
4642
4659
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
4643
4660
|
setup(e) {
|
|
4644
|
-
const n = e, { i18n: { t } } = ct.useI18n(), r =
|
|
4661
|
+
const n = e, { i18n: { t } } = ct.useI18n(), r = x(() => $e.form[n.config.app].edit), o = M({
|
|
4645
4662
|
id: {},
|
|
4646
4663
|
name: {},
|
|
4647
4664
|
created_at: {},
|
|
@@ -4650,8 +4667,8 @@ const _l = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-2da12897"]]), dl = { cl
|
|
|
4650
4667
|
tooltip: t("consumer_groups.form.fields.tags.tooltip")
|
|
4651
4668
|
}
|
|
4652
4669
|
});
|
|
4653
|
-
return (a, i) => (f(),
|
|
4654
|
-
|
|
4670
|
+
return (a, i) => (f(), T("div", dl, [
|
|
4671
|
+
F(h(ps), {
|
|
4655
4672
|
config: e.config,
|
|
4656
4673
|
"config-card-doc": e.configCardDoc,
|
|
4657
4674
|
"config-schema": o.value,
|
|
@@ -4667,7 +4684,7 @@ const _l = /* @__PURE__ */ Kt(cl, [["__scopeId", "data-v-2da12897"]]), dl = { cl
|
|
|
4667
4684
|
}
|
|
4668
4685
|
});
|
|
4669
4686
|
export {
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4687
|
+
Il as ConsumerGroupConfigCard,
|
|
4688
|
+
wl as ConsumerGroupForm,
|
|
4689
|
+
_l as ConsumerGroupList
|
|
4673
4690
|
};
|