@kong-ui-public/entities-consumers 2.3.2-pr.1006.fc54b330.0 → 2.4.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-consumers.es.js +1141 -1145
- package/dist/entities-consumers.umd.js +23 -23
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as te, ref as
|
|
1
|
+
import { defineComponent as te, ref as N, computed as j, watch as be, renderSlot as Z, createCommentVNode as H, unref as f, useSlots as Qe, onBeforeMount as yt, resolveComponent as U, openBlock as d, createBlock as R, createSlots as ke, withCtx as g, createElementVNode as B, createTextVNode as Y, toDisplayString as M, createVNode as O, createElementBlock as $, renderList as pe, Fragment as me, normalizeClass as _e, withModifiers as Ge, withDirectives as Be, vShow as Le, useCssVars as cn, reactive as He, resolveDynamicComponent as xe, normalizeProps as br, guardReactiveProps as Cr, mergeProps as ut, onMounted as kr, onUnmounted as wr, normalizeStyle as dn, inject as _r, pushScopeId as pn, popScopeId as fn } from "vue";
|
|
2
2
|
import { useRouter as ht } from "vue-router";
|
|
3
3
|
import { createI18n as vt, i18nTComponent as mn } from "@kong-ui-public/i18n";
|
|
4
|
-
import
|
|
4
|
+
import Ir from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as Ar } from "@kong/kongponents";
|
|
6
6
|
const Sr = {
|
|
7
7
|
list: {
|
|
@@ -111,7 +111,7 @@ function Tr() {
|
|
|
111
111
|
}
|
|
112
112
|
const Xe = {
|
|
113
113
|
useI18n: Tr
|
|
114
|
-
}, at = "/api/runtime_groups/{controlPlaneId}",
|
|
114
|
+
}, at = "/api/runtime_groups/{controlPlaneId}", $e = "/{workspace}", Te = {
|
|
115
115
|
list: {
|
|
116
116
|
konnect: {
|
|
117
117
|
all: "/v2/control-planes/{controlPlaneId}/core-entities/consumers",
|
|
@@ -119,9 +119,9 @@ const Xe = {
|
|
|
119
119
|
oneForConsumerGroup: "/v2/control-planes/{controlPlaneId}/core-entities/consumer_groups/{consumerGroupId}/consumers/{consumerId}"
|
|
120
120
|
},
|
|
121
121
|
kongManager: {
|
|
122
|
-
all: `${
|
|
123
|
-
forConsumerGroup: `${
|
|
124
|
-
oneForConsumerGroup: `${
|
|
122
|
+
all: `${$e}/consumers`,
|
|
123
|
+
forConsumerGroup: `${$e}/consumer_groups/{consumerGroupId}/consumers`,
|
|
124
|
+
oneForConsumerGroup: `${$e}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
127
|
form: {
|
|
@@ -131,23 +131,23 @@ const Xe = {
|
|
|
131
131
|
edit: `${at}/consumers/{id}`
|
|
132
132
|
},
|
|
133
133
|
kongManager: {
|
|
134
|
-
validate: `${
|
|
135
|
-
create: `${
|
|
136
|
-
edit: `${
|
|
134
|
+
validate: `${$e}/schemas/consumers/validate`,
|
|
135
|
+
create: `${$e}/consumers`,
|
|
136
|
+
edit: `${$e}/consumers/{id}`
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
140
|
var gn = /* @__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))(gn || {}), ct = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ct || {}), Ae = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Ae || {}), ee = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(ee || {}), de = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(de || {});
|
|
141
141
|
function bt(e = {}) {
|
|
142
142
|
return {
|
|
143
|
-
axiosInstance:
|
|
143
|
+
axiosInstance: Ir.create({
|
|
144
144
|
withCredentials: !0,
|
|
145
145
|
timeout: 3e4,
|
|
146
146
|
...e
|
|
147
147
|
})
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function jr() {
|
|
151
151
|
return {
|
|
152
152
|
debounce: (e, n) => {
|
|
153
153
|
let t;
|
|
@@ -159,12 +159,12 @@ function $r() {
|
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
const ot = "khcp-user-table-preferences",
|
|
162
|
+
const ot = "khcp-user-table-preferences", $r = {
|
|
163
163
|
pageSize: 30,
|
|
164
164
|
sortColumnKey: void 0,
|
|
165
165
|
sortColumnOrder: void 0
|
|
166
166
|
};
|
|
167
|
-
function
|
|
167
|
+
function Mr() {
|
|
168
168
|
const e = (t) => {
|
|
169
169
|
if (typeof t == "string")
|
|
170
170
|
try {
|
|
@@ -188,14 +188,14 @@ function Or() {
|
|
|
188
188
|
},
|
|
189
189
|
getTablePreferences: (t) => {
|
|
190
190
|
const r = n();
|
|
191
|
-
return (r == null ? void 0 : r.get(t)) || void 0 ||
|
|
191
|
+
return (r == null ? void 0 : r.get(t)) || void 0 || $r;
|
|
192
192
|
},
|
|
193
193
|
deleteAllTablePreferences: () => {
|
|
194
194
|
localStorage.removeItem(ot);
|
|
195
195
|
}
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
|
-
const
|
|
198
|
+
const Or = {
|
|
199
199
|
actions: {
|
|
200
200
|
copyId: "Copy ID",
|
|
201
201
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
@@ -221,7 +221,7 @@ const Mr = {
|
|
|
221
221
|
errors: {
|
|
222
222
|
edit: "The entity could not be edited at this time."
|
|
223
223
|
}
|
|
224
|
-
},
|
|
224
|
+
}, Nr = {
|
|
225
225
|
emptyState: {
|
|
226
226
|
noSearchResultsTitle: "No results found",
|
|
227
227
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
@@ -262,7 +262,7 @@ const Mr = {
|
|
|
262
262
|
entryTitle: "Entry {index}",
|
|
263
263
|
structuredFormat: "Structured"
|
|
264
264
|
}
|
|
265
|
-
},
|
|
265
|
+
}, Kr = {
|
|
266
266
|
filterButtonText: "Filter",
|
|
267
267
|
fieldLabel: "Filter by:",
|
|
268
268
|
inputPlaceholder: "Enter a value",
|
|
@@ -270,15 +270,15 @@ const Mr = {
|
|
|
270
270
|
applyButtonText: "Apply",
|
|
271
271
|
clearButtonText: "Clear",
|
|
272
272
|
clearAllButtonText: "Clear all filters"
|
|
273
|
-
},
|
|
273
|
+
}, Br = {
|
|
274
274
|
errors: {
|
|
275
275
|
fetch: "Could not fetch available items",
|
|
276
276
|
invalid: "Please select a valid value"
|
|
277
277
|
}
|
|
278
|
-
},
|
|
278
|
+
}, Lr = {
|
|
279
279
|
unexpected: "An unexpected error has occurred",
|
|
280
280
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
281
|
-
},
|
|
281
|
+
}, Ur = {
|
|
282
282
|
enable: {
|
|
283
283
|
title: "Enable {entityType}",
|
|
284
284
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -290,15 +290,15 @@ const Mr = {
|
|
|
290
290
|
confirmText: "Yes, disable"
|
|
291
291
|
}
|
|
292
292
|
}, Pr = {
|
|
293
|
-
global:
|
|
293
|
+
global: Or,
|
|
294
294
|
deleteModal: Er,
|
|
295
295
|
baseForm: Fr,
|
|
296
|
-
baseTable:
|
|
296
|
+
baseTable: Nr,
|
|
297
297
|
baseConfigCard: qr,
|
|
298
|
-
filter:
|
|
299
|
-
debouncedFilter:
|
|
300
|
-
errors:
|
|
301
|
-
toggleModal:
|
|
298
|
+
filter: Kr,
|
|
299
|
+
debouncedFilter: Br,
|
|
300
|
+
errors: Lr,
|
|
301
|
+
toggleModal: Ur
|
|
302
302
|
};
|
|
303
303
|
function Ct() {
|
|
304
304
|
const e = vt("en-us", Pr);
|
|
@@ -359,84 +359,84 @@ function Dr(e, n, t, r = {
|
|
|
359
359
|
t || (t = "100");
|
|
360
360
|
const { axiosInstance: a } = bt({
|
|
361
361
|
headers: e.requestHeaders
|
|
362
|
-
}), { i18n: { t: o } } = Ct(), { debounce: i } =
|
|
363
|
-
await
|
|
364
|
-
}, 200), s =
|
|
365
|
-
let b = `${e.apiBaseUrl}${
|
|
362
|
+
}), { i18n: { t: o } } = Ct(), { debounce: i } = jr(), l = i(async (k) => {
|
|
363
|
+
await G(k);
|
|
364
|
+
}, 200), s = N(!1), u = N(""), p = N(""), c = N([]), y = N([]), m = N(void 0), I = f(n);
|
|
365
|
+
let b = `${e.apiBaseUrl}${I}`;
|
|
366
366
|
e.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
367
367
|
const { isValidUuid: A } = yn(), C = async () => {
|
|
368
368
|
try {
|
|
369
369
|
s.value = !0;
|
|
370
370
|
const { data: k } = await a.get(`${b}?size=${t}`);
|
|
371
|
-
k != null && k.next || (
|
|
371
|
+
k != null && k.next || (m.value = r.fetchedItemsKey in k ? k[r.fetchedItemsKey] : []), y.value = r.fetchedItemsKey in k ? k[r.fetchedItemsKey] : [], c.value = y.value;
|
|
372
372
|
} catch {
|
|
373
373
|
c.value = [], u.value = o("debouncedFilter.errors.fetch");
|
|
374
374
|
} finally {
|
|
375
375
|
s.value = !1;
|
|
376
376
|
}
|
|
377
|
-
},
|
|
378
|
-
var
|
|
379
|
-
if (
|
|
380
|
-
if (
|
|
377
|
+
}, w = N(""), G = async (k) => {
|
|
378
|
+
var T, v, L;
|
|
379
|
+
if (w.value !== k)
|
|
380
|
+
if (w.value = k || "", m.value === void 0)
|
|
381
381
|
try {
|
|
382
382
|
if (s.value = !0, u.value = "", p.value = "", e.app === "konnect") {
|
|
383
|
-
let
|
|
384
|
-
k && (
|
|
385
|
-
const { data:
|
|
386
|
-
r.fetchedItemsKey in
|
|
383
|
+
let F = b + "";
|
|
384
|
+
k && (F += `/${k}`);
|
|
385
|
+
const { data: h } = await a.get(`${F}?size=${t}`);
|
|
386
|
+
r.fetchedItemsKey in h ? c.value = h[r.fetchedItemsKey] : h != null && h.id ? c.value = [h] : c.value = [];
|
|
387
387
|
} else if (k) {
|
|
388
|
-
const
|
|
389
|
-
A(k) && r.searchKeys.includes("id") ?
|
|
390
|
-
const { data:
|
|
391
|
-
return [
|
|
392
|
-
})()) :
|
|
393
|
-
...r.searchKeys.filter((
|
|
394
|
-
const { data:
|
|
395
|
-
return
|
|
388
|
+
const F = [];
|
|
389
|
+
A(k) && r.searchKeys.includes("id") ? F.push((async () => {
|
|
390
|
+
const { data: q } = await a.get(`${b}/${k}`);
|
|
391
|
+
return [q[r.fetchedItemsKey] ?? q];
|
|
392
|
+
})()) : F.push(
|
|
393
|
+
...r.searchKeys.filter((q) => q !== "id").map(async (q) => {
|
|
394
|
+
const { data: D } = await a.get(`${b}?${q}=${k}`);
|
|
395
|
+
return D[r.fetchedItemsKey];
|
|
396
396
|
})
|
|
397
397
|
);
|
|
398
|
-
const
|
|
399
|
-
c.value = [], (
|
|
400
|
-
var
|
|
401
|
-
(
|
|
402
|
-
|
|
398
|
+
const h = await Promise.all(F), _ = /* @__PURE__ */ new Set();
|
|
399
|
+
c.value = [], (T = h == null ? void 0 : h.forEach) == null || T.call(h, (q) => {
|
|
400
|
+
var D;
|
|
401
|
+
(D = q == null ? void 0 : q.forEach) == null || D.call(q, (S) => {
|
|
402
|
+
_.has(S.id) || (_.add(S.id), c.value.push(S));
|
|
403
403
|
});
|
|
404
404
|
});
|
|
405
405
|
} else
|
|
406
406
|
c.value = y.value;
|
|
407
|
-
} catch (
|
|
408
|
-
((
|
|
407
|
+
} catch (F) {
|
|
408
|
+
((v = F == null ? void 0 : F.response) == null ? void 0 : v.status) === 404 ? p.value = o("debouncedFilter.errors.invalid") : (c.value = [], u.value = o("debouncedFilter.errors.fetch"));
|
|
409
409
|
} finally {
|
|
410
410
|
s.value = !1;
|
|
411
411
|
}
|
|
412
412
|
else
|
|
413
|
-
s.value = !0, p.value = "", k ? (c.value = (
|
|
414
|
-
var
|
|
415
|
-
let
|
|
416
|
-
for (const
|
|
417
|
-
const
|
|
418
|
-
|
|
413
|
+
s.value = !0, p.value = "", k ? (c.value = (L = m.value) == null ? void 0 : L.filter((F) => {
|
|
414
|
+
var h;
|
|
415
|
+
let _ = !1;
|
|
416
|
+
for (const q of r.searchKeys) {
|
|
417
|
+
const D = typeof F[q] == "string" ? (h = F[q]) == null ? void 0 : h.toLowerCase() : F[q];
|
|
418
|
+
D != null && D.includes(k.toLowerCase()) && (_ = !0);
|
|
419
419
|
}
|
|
420
|
-
return
|
|
421
|
-
}), (!c.value || !c.value.length) && (p.value = o("debouncedFilter.errors.invalid"))) : c.value =
|
|
420
|
+
return _;
|
|
421
|
+
}), (!c.value || !c.value.length) && (p.value = o("debouncedFilter.errors.invalid"))) : c.value = m.value, s.value = !1;
|
|
422
422
|
};
|
|
423
423
|
return {
|
|
424
424
|
loading: s,
|
|
425
425
|
error: u,
|
|
426
426
|
validationError: p,
|
|
427
427
|
results: c,
|
|
428
|
-
allRecords:
|
|
428
|
+
allRecords: m,
|
|
429
429
|
loadItems: C,
|
|
430
430
|
debouncedQueryChange: l
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
|
-
function
|
|
434
|
-
const t = f(n), r =
|
|
433
|
+
function Rr(e, n) {
|
|
434
|
+
const t = f(n), r = j(
|
|
435
435
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
436
436
|
);
|
|
437
437
|
return r.value.search = "", (a) => `${r.value.href}/${a}`;
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function Vr() {
|
|
440
440
|
const { i18n: { t: e } } = Ct();
|
|
441
441
|
return {
|
|
442
442
|
getMessageFromError: (n) => {
|
|
@@ -476,27 +476,27 @@ function Gr(e) {
|
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
478
|
function hn(e, n) {
|
|
479
|
-
const t =
|
|
479
|
+
const t = N(f(e)), r = N(f(n)), a = j(
|
|
480
480
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
481
|
-
), o =
|
|
481
|
+
), o = j(
|
|
482
482
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
483
483
|
);
|
|
484
484
|
return (i) => {
|
|
485
485
|
const { page: l, pageSize: s, offset: u, sortColumnKey: p, sortColumnOrder: c, query: y } = i;
|
|
486
486
|
try {
|
|
487
|
-
let
|
|
488
|
-
return a.value && y ? (
|
|
489
|
-
|
|
490
|
-
}), p &&
|
|
491
|
-
} catch (
|
|
492
|
-
return console.error("RouteList(fetcher)",
|
|
487
|
+
let m = new URL(o.value.href);
|
|
488
|
+
return a.value && y ? (m.search = "", m = t.value.app === "konnect" ? new URL(`${m.href}?filter[name][contains]=${y}`) : new URL(`${m.href}/${y}/`)) : (a.value || new URLSearchParams(y).forEach((I, b) => {
|
|
489
|
+
m.searchParams.append(b, I);
|
|
490
|
+
}), p && m.searchParams.append("sort_by", p), c === "desc" && m.searchParams.append("sort_desc", "1"), m.searchParams.append("size", String(s))), u && l !== 1 && m.searchParams.append("offset", String(u)), m.href;
|
|
491
|
+
} catch (m) {
|
|
492
|
+
return console.error("RouteList(fetcher)", m), r.value;
|
|
493
493
|
}
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function Hr(e, n, t = "data") {
|
|
497
497
|
const r = f(n), { axiosInstance: a } = bt({
|
|
498
498
|
headers: e.requestHeaders
|
|
499
|
-
}), o = hn(e, r), i =
|
|
499
|
+
}), o = hn(e, r), i = N({
|
|
500
500
|
status: Ae.Idle
|
|
501
501
|
});
|
|
502
502
|
return { fetcher: async (l) => {
|
|
@@ -537,37 +537,37 @@ function zr(e, n, t = "data") {
|
|
|
537
537
|
}
|
|
538
538
|
}, fetcherState: i };
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function zr() {
|
|
541
541
|
const e = (t, r = "_") => t ? t.split(r).map((a) => a.toLowerCase() === "id" ? a.toUpperCase() : a.charAt(0).toUpperCase() + a.substring(1)).join(" ") : "", n = /(?:^|[\s-:'"])\w/g;
|
|
542
542
|
return {
|
|
543
543
|
capitalize: (t) => t ? t.replace(n, (r) => r.toUpperCase()) : "",
|
|
544
544
|
convertKeyToTitle: e
|
|
545
545
|
};
|
|
546
546
|
}
|
|
547
|
-
const vn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,
|
|
547
|
+
const vn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Bt = (e) => {
|
|
548
548
|
if (typeof e != "string")
|
|
549
549
|
throw new TypeError("Invalid argument expected string");
|
|
550
550
|
const n = e.match(vn);
|
|
551
551
|
if (!n)
|
|
552
552
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
553
553
|
return n.shift(), n;
|
|
554
|
-
},
|
|
554
|
+
}, Lt = (e) => e === "*" || e === "x" || e === "X", Ut = (e) => {
|
|
555
555
|
const n = parseInt(e, 10);
|
|
556
556
|
return isNaN(n) ? e : n;
|
|
557
|
-
},
|
|
558
|
-
if (
|
|
557
|
+
}, Jr = (e, n) => typeof e != typeof n ? [String(e), String(n)] : [e, n], Yr = (e, n) => {
|
|
558
|
+
if (Lt(e) || Lt(n))
|
|
559
559
|
return 0;
|
|
560
|
-
const [t, r] =
|
|
560
|
+
const [t, r] = Jr(Ut(e), Ut(n));
|
|
561
561
|
return t > r ? 1 : t < r ? -1 : 0;
|
|
562
562
|
}, Pt = (e, n) => {
|
|
563
563
|
for (let t = 0; t < Math.max(e.length, n.length); t++) {
|
|
564
|
-
const r =
|
|
564
|
+
const r = Yr(e[t] || "0", n[t] || "0");
|
|
565
565
|
if (r !== 0)
|
|
566
566
|
return r;
|
|
567
567
|
}
|
|
568
568
|
return 0;
|
|
569
569
|
}, Wr = (e, n) => {
|
|
570
|
-
const t =
|
|
570
|
+
const t = Bt(e), r = Bt(n), a = t.pop(), o = r.pop(), i = Pt(t, r);
|
|
571
571
|
return i !== 0 ? i : a && o ? Pt(a.split("."), o.split(".")) : a || o ? a ? -1 : 1 : 0;
|
|
572
572
|
}, Dt = (e, n, t) => {
|
|
573
573
|
Zr(t);
|
|
@@ -580,11 +580,11 @@ const vn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
580
580
|
"<=": [-1, 0],
|
|
581
581
|
"<": [-1],
|
|
582
582
|
"!=": [-1, 1]
|
|
583
|
-
},
|
|
583
|
+
}, Rt = Object.keys(bn), Zr = (e) => {
|
|
584
584
|
if (typeof e != "string")
|
|
585
585
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
586
|
-
if (
|
|
587
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
586
|
+
if (Rt.indexOf(e) === -1)
|
|
587
|
+
throw new Error(`Invalid operator, expected one of ${Rt.join("|")}`);
|
|
588
588
|
}, Qr = (e) => typeof e == "string" && /^[v\d]/.test(e) && vn.test(e);
|
|
589
589
|
function Xr(e) {
|
|
590
590
|
const { gatewayInfo: n, supportedRange: t } = e;
|
|
@@ -600,23 +600,23 @@ function Xr(e) {
|
|
|
600
600
|
return !(i && Dt(a, i, "<") || l && Dt(a, l, ">"));
|
|
601
601
|
}
|
|
602
602
|
function ea(e) {
|
|
603
|
-
const n =
|
|
603
|
+
const n = N(0), t = N(0), r = N(!1);
|
|
604
604
|
return be(e, (a) => {
|
|
605
605
|
a && !r.value && (n.value = a.offsetWidth, t.value = a.scrollWidth, r.value = !0);
|
|
606
606
|
}), {
|
|
607
|
-
isTruncated:
|
|
607
|
+
isTruncated: j(() => n.value < t.value)
|
|
608
608
|
};
|
|
609
609
|
}
|
|
610
610
|
const oe = {
|
|
611
611
|
useAxios: bt,
|
|
612
612
|
useDebouncedFilter: Dr,
|
|
613
|
-
useDeleteUrlBuilder:
|
|
614
|
-
useErrors:
|
|
613
|
+
useDeleteUrlBuilder: Rr,
|
|
614
|
+
useErrors: Vr,
|
|
615
615
|
useExternalLinkCreator: Gr,
|
|
616
|
-
useFetcher:
|
|
616
|
+
useFetcher: Hr,
|
|
617
617
|
useFetchUrlBuilder: hn,
|
|
618
618
|
useHelpers: yn,
|
|
619
|
-
useStringHelpers:
|
|
619
|
+
useStringHelpers: zr,
|
|
620
620
|
useI18n: Ct,
|
|
621
621
|
useGatewayFeatureSupported: Xr,
|
|
622
622
|
useTruncationDetector: ea
|
|
@@ -629,7 +629,7 @@ const oe = {
|
|
|
629
629
|
}, na = "Copy to clipboard", ra = {
|
|
630
630
|
message: ta,
|
|
631
631
|
iconTitle: na
|
|
632
|
-
}, aa = "kong-ui-copy-uuid-notify",
|
|
632
|
+
}, aa = "kong-ui-copy-uuid-notify", Vt = "24px", oa = (e, n) => {
|
|
633
633
|
const t = e.__vccOpts || e;
|
|
634
634
|
for (const [r, a] of n)
|
|
635
635
|
t[r] = a;
|
|
@@ -637,7 +637,7 @@ const oe = {
|
|
|
637
637
|
}, ia = (e) => (pn("data-v-ac7fcfb4"), e = e(), fn(), e), la = ["aria-hidden"], sa = {
|
|
638
638
|
key: 0,
|
|
639
639
|
"data-testid": "kui-icon-svg-title"
|
|
640
|
-
}, ua = /* @__PURE__ */ ia(() => /* @__PURE__ */
|
|
640
|
+
}, ua = /* @__PURE__ */ ia(() => /* @__PURE__ */ B("path", {
|
|
641
641
|
d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
|
|
642
642
|
fill: "currentColor"
|
|
643
643
|
}, null, -1)), ca = /* @__PURE__ */ te({
|
|
@@ -671,7 +671,7 @@ const oe = {
|
|
|
671
671
|
size: {
|
|
672
672
|
type: [Number, String],
|
|
673
673
|
required: !1,
|
|
674
|
-
default:
|
|
674
|
+
default: Vt,
|
|
675
675
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
676
676
|
validator: (e) => {
|
|
677
677
|
if (typeof e == "number" && e > 0)
|
|
@@ -692,7 +692,7 @@ const oe = {
|
|
|
692
692
|
}
|
|
693
693
|
},
|
|
694
694
|
setup(e) {
|
|
695
|
-
const n = e, t =
|
|
695
|
+
const n = e, t = j(() => {
|
|
696
696
|
if (typeof n.size == "number" && n.size > 0)
|
|
697
697
|
return `${n.size}px`;
|
|
698
698
|
if (typeof n.size == "string") {
|
|
@@ -700,8 +700,8 @@ const oe = {
|
|
|
700
700
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
701
701
|
return `${o}px`;
|
|
702
702
|
}
|
|
703
|
-
return
|
|
704
|
-
}), r =
|
|
703
|
+
return Vt;
|
|
704
|
+
}), r = j(() => ({
|
|
705
705
|
boxSizing: "border-box",
|
|
706
706
|
color: n.color,
|
|
707
707
|
display: n.display,
|
|
@@ -709,14 +709,14 @@ const oe = {
|
|
|
709
709
|
lineHeight: "0",
|
|
710
710
|
width: t.value
|
|
711
711
|
}));
|
|
712
|
-
return (a, o) => (d(),
|
|
712
|
+
return (a, o) => (d(), R(xe(e.as), {
|
|
713
713
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
714
714
|
class: "kui-icon copy-icon",
|
|
715
715
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
716
716
|
style: dn(r.value)
|
|
717
717
|
}, {
|
|
718
|
-
default:
|
|
719
|
-
(d(),
|
|
718
|
+
default: g(() => [
|
|
719
|
+
(d(), $("svg", {
|
|
720
720
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
721
721
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
722
722
|
fill: "none",
|
|
@@ -726,7 +726,7 @@ const oe = {
|
|
|
726
726
|
width: "100%",
|
|
727
727
|
xmlns: "http://www.w3.org/2000/svg"
|
|
728
728
|
}, [
|
|
729
|
-
e.title ? (d(),
|
|
729
|
+
e.title ? (d(), $("title", sa, M(e.title), 1)) : H("", !0),
|
|
730
730
|
ua
|
|
731
731
|
], 8, la))
|
|
732
732
|
]),
|
|
@@ -777,66 +777,66 @@ const oe = {
|
|
|
777
777
|
},
|
|
778
778
|
emits: ["success", "error"],
|
|
779
779
|
setup(e, { emit: n }) {
|
|
780
|
-
const { t } = vt("en-us", ra), r = e, a = n, o = r.notify ||
|
|
781
|
-
}), i =
|
|
780
|
+
const { t } = vt("en-us", ra), r = e, a = n, o = r.notify || _r(aa, () => {
|
|
781
|
+
}), i = j(() => r.idTooltip ? {
|
|
782
782
|
label: r.idTooltip,
|
|
783
783
|
positionFixed: !0,
|
|
784
784
|
placement: "bottomStart"
|
|
785
785
|
} : {
|
|
786
786
|
title: r.uuid
|
|
787
|
-
}), l =
|
|
787
|
+
}), l = j(() => !!(r.tooltip && r.successTooltip)), s = N(r.tooltip), u = j(() => r.tooltip ? {
|
|
788
788
|
label: s.value,
|
|
789
789
|
positionFixed: !0,
|
|
790
790
|
maxWidth: "500px",
|
|
791
791
|
placement: "bottomStart"
|
|
792
|
-
} : {}), p =
|
|
793
|
-
var
|
|
794
|
-
return r.format === "redacted" ? "*****" : r.format === "deleted" ? `*${(
|
|
795
|
-
}), c = (
|
|
796
|
-
s.value =
|
|
792
|
+
} : {}), p = j(() => {
|
|
793
|
+
var m;
|
|
794
|
+
return r.format === "redacted" ? "*****" : r.format === "deleted" ? `*${(m = r.uuid) == null ? void 0 : m.substring(0, 5)}` : r.uuid;
|
|
795
|
+
}), c = (m) => {
|
|
796
|
+
s.value = m, setTimeout(() => {
|
|
797
797
|
s.value = r.tooltip;
|
|
798
798
|
}, 1800);
|
|
799
|
-
}, y = (
|
|
800
|
-
var
|
|
801
|
-
if (!
|
|
799
|
+
}, y = (m) => {
|
|
800
|
+
var I, b;
|
|
801
|
+
if (!m(r.uuid)) {
|
|
802
802
|
typeof o == "function" && o({
|
|
803
803
|
type: "error",
|
|
804
804
|
message: t("message.fail")
|
|
805
805
|
}), l.value ? c(t("message.fail")) : a("error", r.uuid);
|
|
806
806
|
return;
|
|
807
807
|
}
|
|
808
|
-
const A = ((
|
|
808
|
+
const A = ((I = r.uuid) == null ? void 0 : I.length) > Gt, C = r.format === "hidden" || r.format === "redacted" ? t("message.success.prefix") : `"${((b = r.uuid) == null ? void 0 : b.substring(0, Gt)) + (A ? "..." : "")}"`;
|
|
809
809
|
typeof o == "function" && o({
|
|
810
810
|
type: "success",
|
|
811
811
|
message: `${C}${t("message.success.content")}`
|
|
812
812
|
}), l.value ? c(r.successTooltip) : a("success", r.uuid);
|
|
813
813
|
};
|
|
814
|
-
return (
|
|
815
|
-
const b =
|
|
816
|
-
return d(),
|
|
817
|
-
e.format !== "hidden" ? (d(),
|
|
818
|
-
default:
|
|
819
|
-
|
|
820
|
-
class:
|
|
814
|
+
return (m, I) => {
|
|
815
|
+
const b = U("KClipboardProvider");
|
|
816
|
+
return d(), $("div", fa, [
|
|
817
|
+
e.format !== "hidden" ? (d(), R(xe(e.idTooltip ? "KTooltip" : "div"), ut({ key: 0 }, i.value, { "data-testid": "copy-id" }), {
|
|
818
|
+
default: g(() => [
|
|
819
|
+
B("div", {
|
|
820
|
+
class: _e([
|
|
821
821
|
"uuid-container",
|
|
822
822
|
e.truncated ? "truncated-uuid" : null,
|
|
823
823
|
e.useMono ? "mono" : null
|
|
824
824
|
])
|
|
825
|
-
},
|
|
825
|
+
}, M(p.value), 3)
|
|
826
826
|
]),
|
|
827
827
|
_: 1
|
|
828
|
-
}, 16)) :
|
|
829
|
-
(d(),
|
|
830
|
-
default:
|
|
831
|
-
|
|
832
|
-
default:
|
|
833
|
-
|
|
828
|
+
}, 16)) : H("", !0),
|
|
829
|
+
(d(), R(xe(e.tooltip ? "KTooltip" : "div"), ut(u.value, { class: "uuid-icon-wrapper" }), {
|
|
830
|
+
default: g(() => [
|
|
831
|
+
O(b, null, {
|
|
832
|
+
default: g(({ copyToClipboard: A }) => [
|
|
833
|
+
B("span", {
|
|
834
834
|
"data-testid": "copy-to-clipboard",
|
|
835
835
|
role: "button",
|
|
836
836
|
tabindex: "0",
|
|
837
|
-
onClick:
|
|
837
|
+
onClick: Ge((C) => y(A), ["stop"])
|
|
838
838
|
}, [
|
|
839
|
-
|
|
839
|
+
O(f(da), {
|
|
840
840
|
class: "uuid-icon",
|
|
841
841
|
color: e.iconColor,
|
|
842
842
|
decorative: !!e.tooltip,
|
|
@@ -878,21 +878,21 @@ const oe = {
|
|
|
878
878
|
}
|
|
879
879
|
},
|
|
880
880
|
setup(e) {
|
|
881
|
-
const n = e, { i18n: { t } } = oe.useI18n(), { convertKeyToTitle: r } = oe.useStringHelpers(), a =
|
|
881
|
+
const n = e, { i18n: { t } } = oe.useI18n(), { convertKeyToTitle: r } = oe.useStringHelpers(), a = j(() => n.item.key ?? "json-array-item"), o = j(() => n.item.value ?? n.item), i = j(() => {
|
|
882
882
|
const s = JSON.parse(JSON.stringify(o.value));
|
|
883
883
|
return n.isArrayItem && delete s.name, s;
|
|
884
|
-
}), l =
|
|
884
|
+
}), l = j(() => {
|
|
885
885
|
var s;
|
|
886
886
|
return n.isArrayItem ? (s = o.value) != null && s.name ? r(o.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
887
887
|
});
|
|
888
|
-
return (s, u) => (d(),
|
|
889
|
-
class:
|
|
888
|
+
return (s, u) => (d(), R(xe(e.isArrayItem ? "fieldset" : "div"), {
|
|
889
|
+
class: _e(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
890
890
|
}, {
|
|
891
|
-
default:
|
|
892
|
-
e.isArrayItem ? (d(),
|
|
893
|
-
|
|
894
|
-
])) :
|
|
895
|
-
(d(!0),
|
|
891
|
+
default: g(() => [
|
|
892
|
+
e.isArrayItem ? (d(), $("legend", ha, [
|
|
893
|
+
B("b", null, M(l.value), 1)
|
|
894
|
+
])) : H("", !0),
|
|
895
|
+
(d(!0), $(me, null, pe(Object.keys(i.value), (p, c) => (d(), R(kt, {
|
|
896
896
|
key: `${a.value}-property-${c}`,
|
|
897
897
|
item: {
|
|
898
898
|
key: p,
|
|
@@ -921,15 +921,15 @@ const oe = {
|
|
|
921
921
|
setup(e) {
|
|
922
922
|
const { i18n: { t: n } } = oe.useI18n();
|
|
923
923
|
return (t, r) => {
|
|
924
|
-
const a =
|
|
925
|
-
return d(),
|
|
926
|
-
|
|
924
|
+
const a = U("KButton");
|
|
925
|
+
return d(), $("div", null, [
|
|
926
|
+
O(a, {
|
|
927
927
|
appearance: "tertiary",
|
|
928
928
|
class: "navigation-button",
|
|
929
929
|
onClick: r[0] || (r[0] = (o) => t.$emit("navigation-click", e.item))
|
|
930
930
|
}, {
|
|
931
|
-
default:
|
|
932
|
-
|
|
931
|
+
default: g(() => [
|
|
932
|
+
Y(M(e.item.value || f(n)("baseConfigCard.commonFields.link")), 1)
|
|
933
933
|
]),
|
|
934
934
|
_: 1
|
|
935
935
|
})
|
|
@@ -947,22 +947,22 @@ const oe = {
|
|
|
947
947
|
setup(e) {
|
|
948
948
|
const { i18n: { t: n } } = oe.useI18n();
|
|
949
949
|
return (t, r) => {
|
|
950
|
-
const a =
|
|
951
|
-
return d(),
|
|
950
|
+
const a = U("KBadge");
|
|
951
|
+
return d(), R(a, {
|
|
952
952
|
appearance: e.status ? "success" : "neutral"
|
|
953
953
|
}, {
|
|
954
|
-
default:
|
|
955
|
-
|
|
954
|
+
default: g(() => [
|
|
955
|
+
Y(M(e.status ? f(n)("baseConfigCard.statusBadge.enabledLabel") : f(n)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
956
956
|
]),
|
|
957
957
|
_: 1
|
|
958
958
|
}, 8, ["appearance"]);
|
|
959
959
|
};
|
|
960
960
|
}
|
|
961
|
-
}), wa = "#0044f4",
|
|
961
|
+
}), wa = "#0044f4", _a = "#e0e4ea", Ia = "#3a3f51", Aa = "1px", Sa = "20px", xa = { class: "config-card-details-row" }, Ta = ["data-testid"], ja = ["data-testid"], $a = ["data-testid"], Ma = ["data-testid"], Oa = { key: 1 }, Ea = ["data-testid"], Fa = ["data-testid"], Na = ["data-testid"], qa = ["data-testid"], Ka = {
|
|
962
962
|
name: "ConfigCardItem",
|
|
963
963
|
components: { CopyUuid: Cn, JsonCardItem: kn, StatusBadge: ka, InternalLinkItem: Ca }
|
|
964
|
-
},
|
|
965
|
-
...
|
|
964
|
+
}, Ba = /* @__PURE__ */ te({
|
|
965
|
+
...Ka,
|
|
966
966
|
props: {
|
|
967
967
|
item: {
|
|
968
968
|
type: Object,
|
|
@@ -981,13 +981,13 @@ const oe = {
|
|
|
981
981
|
},
|
|
982
982
|
emits: ["navigation-click"],
|
|
983
983
|
setup(e, { emit: n }) {
|
|
984
|
-
cn((
|
|
985
|
-
"0da74440": p.value ? "none" : `solid ${f(Aa)} ${f(
|
|
984
|
+
cn((I) => ({
|
|
985
|
+
"0da74440": p.value ? "none" : `solid ${f(Aa)} ${f(_a)}`,
|
|
986
986
|
"02a039da": u.value && l.value ? "block" : "flex",
|
|
987
987
|
"690f3ced": u.value && l.value ? "100%" : t.slim ? "50%" : "25%",
|
|
988
988
|
"691182c8": u.value && l.value ? "100%" : t.slim ? "50%" : "75%"
|
|
989
989
|
}));
|
|
990
|
-
const t = e, r = n, a = Qe(), { i18n: { t: o, formatUnixTimeStamp: i } } = oe.useI18n(), l =
|
|
990
|
+
const t = e, r = n, a = Qe(), { i18n: { t: o, formatUnixTimeStamp: i } } = oe.useI18n(), l = j(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = j(() => !!(t.item.tooltip || a["label-tooltip"])), u = j(() => t.item.type === ee.Json || t.item.type === ee.JsonArray), p = j(() => t.item.type === ee.JsonArray), c = j(() => {
|
|
991
991
|
switch (t.item.type) {
|
|
992
992
|
case ee.ID:
|
|
993
993
|
return {
|
|
@@ -1073,8 +1073,8 @@ const oe = {
|
|
|
1073
1073
|
attrs: {
|
|
1074
1074
|
"data-testid": `${t.item.key}-internal-link`,
|
|
1075
1075
|
item: t.item,
|
|
1076
|
-
onNavigationClick: (
|
|
1077
|
-
r("navigation-click",
|
|
1076
|
+
onNavigationClick: (I) => {
|
|
1077
|
+
r("navigation-click", I);
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
1080
|
};
|
|
@@ -1113,127 +1113,127 @@ const oe = {
|
|
|
1113
1113
|
text: t.item.value
|
|
1114
1114
|
};
|
|
1115
1115
|
}
|
|
1116
|
-
}), y =
|
|
1117
|
-
return (
|
|
1118
|
-
const A =
|
|
1119
|
-
return d(),
|
|
1120
|
-
|
|
1116
|
+
}), y = N(), { isTruncated: m } = oe.useTruncationDetector(y);
|
|
1117
|
+
return (I, b) => {
|
|
1118
|
+
const A = U("KLabel"), C = U("KBadge"), w = U("KTooltip");
|
|
1119
|
+
return d(), $("div", xa, [
|
|
1120
|
+
B("div", {
|
|
1121
1121
|
class: "config-card-details-label",
|
|
1122
1122
|
"data-testid": `${e.item.key}-label`
|
|
1123
1123
|
}, [
|
|
1124
|
-
Z(
|
|
1125
|
-
|
|
1126
|
-
default:
|
|
1127
|
-
|
|
1124
|
+
Z(I.$slots, "label", { item: e.item }, () => [
|
|
1125
|
+
O(A, { "tooltip-attributes": { maxWidth: "500px" } }, ke({
|
|
1126
|
+
default: g(() => [
|
|
1127
|
+
Y(M(e.item.label) + " ", 1)
|
|
1128
1128
|
]),
|
|
1129
1129
|
_: 2
|
|
1130
1130
|
}, [
|
|
1131
1131
|
s.value ? {
|
|
1132
1132
|
name: "tooltip",
|
|
1133
|
-
fn:
|
|
1134
|
-
|
|
1133
|
+
fn: g(() => [
|
|
1134
|
+
B("div", {
|
|
1135
1135
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1136
1136
|
}, [
|
|
1137
|
-
Z(
|
|
1138
|
-
|
|
1137
|
+
Z(I.$slots, "label-tooltip", {}, () => [
|
|
1138
|
+
Y(M(e.item.tooltip), 1)
|
|
1139
1139
|
], !0)
|
|
1140
|
-
], 8,
|
|
1140
|
+
], 8, ja)
|
|
1141
1141
|
]),
|
|
1142
1142
|
key: "0"
|
|
1143
1143
|
} : void 0
|
|
1144
1144
|
]), 1024)
|
|
1145
1145
|
], !0)
|
|
1146
1146
|
], 8, Ta),
|
|
1147
|
-
|
|
1147
|
+
B("div", {
|
|
1148
1148
|
class: "config-card-details-value",
|
|
1149
1149
|
"data-testid": `${e.item.key}-property-value`
|
|
1150
1150
|
}, [
|
|
1151
|
-
Z(
|
|
1151
|
+
Z(I.$slots, e.item.key, {
|
|
1152
1152
|
rowValue: e.item.value
|
|
1153
1153
|
}, () => [
|
|
1154
|
-
l.value ? (d(),
|
|
1155
|
-
(d(),
|
|
1156
|
-
default:
|
|
1157
|
-
c.value.additionalComponent === "KBadge" ? (d(),
|
|
1154
|
+
l.value ? (d(), $("div", Oa, [
|
|
1155
|
+
(d(), R(xe(c.value.tag), br(Cr(c.value.attrs)), {
|
|
1156
|
+
default: g(() => [
|
|
1157
|
+
c.value.additionalComponent === "KBadge" ? (d(), $("div", {
|
|
1158
1158
|
key: 0,
|
|
1159
1159
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1160
1160
|
}, [
|
|
1161
|
-
(d(!0),
|
|
1161
|
+
(d(!0), $(me, null, pe(e.item.value, (G, k) => (d(), R(C, {
|
|
1162
1162
|
key: `${e.item.key}-badge-tag-${k}`,
|
|
1163
1163
|
class: "config-badge",
|
|
1164
1164
|
"data-testid": `${e.item.key}-badge-tag-${k}`,
|
|
1165
|
-
tooltip:
|
|
1165
|
+
tooltip: G,
|
|
1166
1166
|
"truncation-tooltip": ""
|
|
1167
1167
|
}, {
|
|
1168
|
-
default:
|
|
1169
|
-
|
|
1168
|
+
default: g(() => [
|
|
1169
|
+
Y(M(G), 1)
|
|
1170
1170
|
]),
|
|
1171
1171
|
_: 2
|
|
1172
1172
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
1173
|
-
], 8, Ea)) :
|
|
1174
|
-
c.value.additionalComponent === "CopyUuid" ? (d(),
|
|
1173
|
+
], 8, Ea)) : H("", !0),
|
|
1174
|
+
c.value.additionalComponent === "CopyUuid" ? (d(), $("div", {
|
|
1175
1175
|
key: 1,
|
|
1176
1176
|
class: "copy-uuid-array",
|
|
1177
1177
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1178
1178
|
}, [
|
|
1179
|
-
(d(!0),
|
|
1179
|
+
(d(!0), $(me, null, pe(e.item.value, (G, k) => (d(), R(f(Cn), ut(c.value.childAttrs, {
|
|
1180
1180
|
key: `${e.item.key}-copy-uuid-${k}`,
|
|
1181
1181
|
"data-testid": `${e.item.key}-copy-uuid-${k}`,
|
|
1182
|
-
uuid:
|
|
1182
|
+
uuid: G
|
|
1183
1183
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1184
|
-
], 8, Fa)) : c.value.additionalComponent === "KMethodBadge" ? (d(),
|
|
1184
|
+
], 8, Fa)) : c.value.additionalComponent === "KMethodBadge" ? (d(), $("div", {
|
|
1185
1185
|
key: 2,
|
|
1186
1186
|
class: "method-badge-array",
|
|
1187
1187
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1188
1188
|
}, [
|
|
1189
|
-
(d(!0),
|
|
1189
|
+
(d(!0), $(me, null, pe(e.item.value, (G, k) => (d(), R(C, {
|
|
1190
1190
|
key: `${e.item.key}-badge-method-${k}`,
|
|
1191
|
-
appearance: Object.values(f(Ar)).includes(
|
|
1191
|
+
appearance: Object.values(f(Ar)).includes(G.toLowerCase()) ? G.toLowerCase() : "custom",
|
|
1192
1192
|
class: "config-badge",
|
|
1193
1193
|
"data-testid": `${e.item.key}-badge-method-${k}`
|
|
1194
1194
|
}, {
|
|
1195
|
-
default:
|
|
1196
|
-
|
|
1195
|
+
default: g(() => [
|
|
1196
|
+
Y(M(G), 1)
|
|
1197
1197
|
]),
|
|
1198
1198
|
_: 2
|
|
1199
1199
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1200
|
-
], 8,
|
|
1201
|
-
c.value.additionalComponent === "JsonCardItem" ? (d(),
|
|
1200
|
+
], 8, Na)) : H("", !0),
|
|
1201
|
+
c.value.additionalComponent === "JsonCardItem" ? (d(), $("div", {
|
|
1202
1202
|
key: 3,
|
|
1203
1203
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1204
1204
|
}, [
|
|
1205
|
-
(d(!0),
|
|
1205
|
+
(d(!0), $(me, null, pe(e.item.value, (G, k) => (d(), R(kn, {
|
|
1206
1206
|
key: `json-array-item-${k}`,
|
|
1207
1207
|
index: k,
|
|
1208
1208
|
"is-array-item": "",
|
|
1209
|
-
item:
|
|
1209
|
+
item: G
|
|
1210
1210
|
}, null, 8, ["index", "item"]))), 128))
|
|
1211
|
-
], 8, qa)) : (d(),
|
|
1211
|
+
], 8, qa)) : (d(), R(w, {
|
|
1212
1212
|
key: 4,
|
|
1213
|
-
label: f(
|
|
1213
|
+
label: f(m) ? e.item.value : ""
|
|
1214
1214
|
}, {
|
|
1215
|
-
default:
|
|
1216
|
-
|
|
1215
|
+
default: g(() => [
|
|
1216
|
+
B("span", {
|
|
1217
1217
|
ref_key: "textContent",
|
|
1218
1218
|
ref: y,
|
|
1219
|
-
class:
|
|
1220
|
-
},
|
|
1219
|
+
class: _e(["attrs-data-text", { truncated: e.truncated }])
|
|
1220
|
+
}, M(c.value.text), 3)
|
|
1221
1221
|
]),
|
|
1222
1222
|
_: 1
|
|
1223
1223
|
}, 8, ["label"]))
|
|
1224
1224
|
]),
|
|
1225
1225
|
_: 1
|
|
1226
1226
|
}, 16))
|
|
1227
|
-
])) : (d(),
|
|
1227
|
+
])) : (d(), $("div", {
|
|
1228
1228
|
key: 0,
|
|
1229
1229
|
"data-testid": `${e.item.key}-no-value`
|
|
1230
|
-
}, " – ", 8,
|
|
1230
|
+
}, " – ", 8, Ma))
|
|
1231
1231
|
], !0)
|
|
1232
|
-
], 8,
|
|
1232
|
+
], 8, $a)
|
|
1233
1233
|
]);
|
|
1234
1234
|
};
|
|
1235
1235
|
}
|
|
1236
|
-
}), kt = /* @__PURE__ */ ge(
|
|
1236
|
+
}), kt = /* @__PURE__ */ ge(Ba, [["__scopeId", "data-v-9c87856b"]]), La = { class: "json-config" }, Ua = {
|
|
1237
1237
|
key: 0,
|
|
1238
1238
|
class: "json-endpoint"
|
|
1239
1239
|
}, wn = /* @__PURE__ */ te({
|
|
@@ -1267,7 +1267,7 @@ const oe = {
|
|
|
1267
1267
|
cn((a) => ({
|
|
1268
1268
|
cd7a6ba0: `${r.value}ch`
|
|
1269
1269
|
}));
|
|
1270
|
-
const n = e, t =
|
|
1270
|
+
const n = e, t = He(n.jsonRecord), r = j(() => {
|
|
1271
1271
|
var a;
|
|
1272
1272
|
if (!n.fetcherUrl)
|
|
1273
1273
|
return 0;
|
|
@@ -1276,55 +1276,55 @@ const oe = {
|
|
|
1276
1276
|
});
|
|
1277
1277
|
return (a, o) => {
|
|
1278
1278
|
var i;
|
|
1279
|
-
const l =
|
|
1280
|
-
return d(),
|
|
1281
|
-
n.fetcherUrl && (i = n.config) != null && i.jsonYamlMilestone2Enabled ? (d(),
|
|
1282
|
-
|
|
1279
|
+
const l = U("KBadge"), s = U("KCodeBlock");
|
|
1280
|
+
return d(), $("div", La, [
|
|
1281
|
+
n.fetcherUrl && (i = n.config) != null && i.jsonYamlMilestone2Enabled ? (d(), $("div", Ua, [
|
|
1282
|
+
O(l, {
|
|
1283
1283
|
appearance: n.requestMethod
|
|
1284
1284
|
}, {
|
|
1285
|
-
default:
|
|
1286
|
-
|
|
1285
|
+
default: g(() => [
|
|
1286
|
+
Y(M(n.requestMethod), 1)
|
|
1287
1287
|
]),
|
|
1288
1288
|
_: 1
|
|
1289
1289
|
}, 8, ["appearance"]),
|
|
1290
|
-
|
|
1290
|
+
O(s, {
|
|
1291
1291
|
id: "json-endpoint-codeblock",
|
|
1292
1292
|
code: n.fetcherUrl,
|
|
1293
1293
|
"is-single-line": "",
|
|
1294
1294
|
language: "json",
|
|
1295
1295
|
theme: "dark"
|
|
1296
1296
|
}, null, 8, ["code"])
|
|
1297
|
-
])) :
|
|
1298
|
-
n.jsonRecord ? (d(),
|
|
1297
|
+
])) : H("", !0),
|
|
1298
|
+
n.jsonRecord ? (d(), R(s, {
|
|
1299
1299
|
key: 1,
|
|
1300
1300
|
id: "json-codeblock",
|
|
1301
|
-
class:
|
|
1301
|
+
class: _e({ "json-content": n.fetcherUrl }),
|
|
1302
1302
|
code: JSON.stringify(t, null, 2),
|
|
1303
1303
|
language: "json",
|
|
1304
1304
|
theme: "dark"
|
|
1305
|
-
}, null, 8, ["class", "code"])) :
|
|
1305
|
+
}, null, 8, ["class", "code"])) : H("", !0)
|
|
1306
1306
|
]);
|
|
1307
1307
|
};
|
|
1308
1308
|
}
|
|
1309
1309
|
});
|
|
1310
1310
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1311
|
-
function
|
|
1311
|
+
function _n(e) {
|
|
1312
1312
|
return typeof e > "u" || e === null;
|
|
1313
1313
|
}
|
|
1314
1314
|
function Pa(e) {
|
|
1315
1315
|
return typeof e == "object" && e !== null;
|
|
1316
1316
|
}
|
|
1317
1317
|
function Da(e) {
|
|
1318
|
-
return Array.isArray(e) ? e :
|
|
1318
|
+
return Array.isArray(e) ? e : _n(e) ? [] : [e];
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1320
|
+
function Ra(e, n) {
|
|
1321
1321
|
var t, r, a, o;
|
|
1322
1322
|
if (n)
|
|
1323
1323
|
for (o = Object.keys(n), t = 0, r = o.length; t < r; t += 1)
|
|
1324
1324
|
a = o[t], e[a] = n[a];
|
|
1325
1325
|
return e;
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function Va(e, n) {
|
|
1328
1328
|
var t = "", r;
|
|
1329
1329
|
for (r = 0; r < n; r += 1)
|
|
1330
1330
|
t += e;
|
|
@@ -1333,29 +1333,29 @@ function Ra(e, n) {
|
|
|
1333
1333
|
function Ga(e) {
|
|
1334
1334
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1335
1335
|
}
|
|
1336
|
-
var
|
|
1337
|
-
isNothing:
|
|
1338
|
-
isObject:
|
|
1339
|
-
toArray:
|
|
1340
|
-
repeat:
|
|
1336
|
+
var Ha = _n, za = Pa, Ja = Da, Ya = Va, Wa = Ga, Za = Ra, ae = {
|
|
1337
|
+
isNothing: Ha,
|
|
1338
|
+
isObject: za,
|
|
1339
|
+
toArray: Ja,
|
|
1340
|
+
repeat: Ya,
|
|
1341
1341
|
isNegativeZero: Wa,
|
|
1342
1342
|
extend: Za
|
|
1343
1343
|
};
|
|
1344
|
-
function
|
|
1344
|
+
function In(e, n) {
|
|
1345
1345
|
var t = "", r = e.reason || "(unknown reason)";
|
|
1346
1346
|
return e.mark ? (e.mark.name && (t += 'in "' + e.mark.name + '" '), t += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !n && e.mark.snippet && (t += `
|
|
1347
1347
|
|
|
1348
1348
|
` + e.mark.snippet), r + " " + t) : r;
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1351
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message =
|
|
1350
|
+
function Ue(e, n) {
|
|
1351
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = In(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1352
1352
|
}
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
return this.name + ": " +
|
|
1353
|
+
Ue.prototype = Object.create(Error.prototype);
|
|
1354
|
+
Ue.prototype.constructor = Ue;
|
|
1355
|
+
Ue.prototype.toString = function(e) {
|
|
1356
|
+
return this.name + ": " + In(this, e);
|
|
1357
1357
|
};
|
|
1358
|
-
var se =
|
|
1358
|
+
var se = Ue;
|
|
1359
1359
|
function it(e, n, t, r, a) {
|
|
1360
1360
|
var o = "", i = "", l = Math.floor(a / 2) - 1;
|
|
1361
1361
|
return r - n > l && (o = " ... ", n = r - l + o.length), t - r > l && (i = " ...", t = r + l - i.length), {
|
|
@@ -1433,7 +1433,7 @@ function ro(e, n) {
|
|
|
1433
1433
|
throw new se('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1434
1434
|
}
|
|
1435
1435
|
var ie = ro;
|
|
1436
|
-
function
|
|
1436
|
+
function Ht(e, n) {
|
|
1437
1437
|
var t = [];
|
|
1438
1438
|
return e[n].forEach(function(r) {
|
|
1439
1439
|
var a = t.length;
|
|
@@ -1487,7 +1487,7 @@ dt.prototype.extend = function(e) {
|
|
|
1487
1487
|
throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1488
1488
|
});
|
|
1489
1489
|
var r = Object.create(dt.prototype);
|
|
1490
|
-
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit =
|
|
1490
|
+
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = Ht(r, "implicit"), r.compiledExplicit = Ht(r, "explicit"), r.compiledTypeMap = ao(r.compiledImplicit, r.compiledExplicit), r;
|
|
1491
1491
|
};
|
|
1492
1492
|
var An = dt, Sn = new ie("tag:yaml.org,2002:str", {
|
|
1493
1493
|
kind: "scalar",
|
|
@@ -1504,7 +1504,7 @@ var An = dt, Sn = new ie("tag:yaml.org,2002:str", {
|
|
|
1504
1504
|
construct: function(e) {
|
|
1505
1505
|
return e !== null ? e : {};
|
|
1506
1506
|
}
|
|
1507
|
-
}),
|
|
1507
|
+
}), jn = new An({
|
|
1508
1508
|
explicit: [
|
|
1509
1509
|
Sn,
|
|
1510
1510
|
xn,
|
|
@@ -1523,7 +1523,7 @@ function io() {
|
|
|
1523
1523
|
function lo(e) {
|
|
1524
1524
|
return e === null;
|
|
1525
1525
|
}
|
|
1526
|
-
var
|
|
1526
|
+
var $n = new ie("tag:yaml.org,2002:null", {
|
|
1527
1527
|
kind: "scalar",
|
|
1528
1528
|
resolve: oo,
|
|
1529
1529
|
construct: io,
|
|
@@ -1559,7 +1559,7 @@ function uo(e) {
|
|
|
1559
1559
|
function co(e) {
|
|
1560
1560
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1561
1561
|
}
|
|
1562
|
-
var
|
|
1562
|
+
var Mn = new ie("tag:yaml.org,2002:bool", {
|
|
1563
1563
|
kind: "scalar",
|
|
1564
1564
|
resolve: so,
|
|
1565
1565
|
construct: uo,
|
|
@@ -1650,7 +1650,7 @@ function yo(e) {
|
|
|
1650
1650
|
function ho(e) {
|
|
1651
1651
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ae.isNegativeZero(e);
|
|
1652
1652
|
}
|
|
1653
|
-
var
|
|
1653
|
+
var On = new ie("tag:yaml.org,2002:int", {
|
|
1654
1654
|
kind: "scalar",
|
|
1655
1655
|
resolve: go,
|
|
1656
1656
|
construct: yo,
|
|
@@ -1724,34 +1724,34 @@ function wo(e, n) {
|
|
|
1724
1724
|
return "-0.0";
|
|
1725
1725
|
return t = e.toString(10), ko.test(t) ? t.replace("e", ".e") : t;
|
|
1726
1726
|
}
|
|
1727
|
-
function
|
|
1727
|
+
function _o(e) {
|
|
1728
1728
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ae.isNegativeZero(e));
|
|
1729
1729
|
}
|
|
1730
1730
|
var En = new ie("tag:yaml.org,2002:float", {
|
|
1731
1731
|
kind: "scalar",
|
|
1732
1732
|
resolve: bo,
|
|
1733
1733
|
construct: Co,
|
|
1734
|
-
predicate:
|
|
1734
|
+
predicate: _o,
|
|
1735
1735
|
represent: wo,
|
|
1736
1736
|
defaultStyle: "lowercase"
|
|
1737
|
-
}), Fn =
|
|
1737
|
+
}), Fn = jn.extend({
|
|
1738
1738
|
implicit: [
|
|
1739
|
-
|
|
1740
|
-
On,
|
|
1739
|
+
$n,
|
|
1741
1740
|
Mn,
|
|
1741
|
+
On,
|
|
1742
1742
|
En
|
|
1743
1743
|
]
|
|
1744
|
-
}),
|
|
1744
|
+
}), Nn = Fn, qn = new RegExp(
|
|
1745
1745
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1746
|
-
),
|
|
1746
|
+
), Kn = new RegExp(
|
|
1747
1747
|
"^([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]))?))?$"
|
|
1748
1748
|
);
|
|
1749
|
-
function
|
|
1750
|
-
return e === null ? !1 : qn.exec(e) !== null ||
|
|
1749
|
+
function Io(e) {
|
|
1750
|
+
return e === null ? !1 : qn.exec(e) !== null || Kn.exec(e) !== null;
|
|
1751
1751
|
}
|
|
1752
1752
|
function Ao(e) {
|
|
1753
1753
|
var n, t, r, a, o, i, l, s = 0, u = null, p, c, y;
|
|
1754
|
-
if (n = qn.exec(e), n === null && (n =
|
|
1754
|
+
if (n = qn.exec(e), n === null && (n = Kn.exec(e)), n === null)
|
|
1755
1755
|
throw new Error("Date resolve error");
|
|
1756
1756
|
if (t = +n[1], r = +n[2] - 1, a = +n[3], !n[4])
|
|
1757
1757
|
return new Date(Date.UTC(t, r, a));
|
|
@@ -1765,9 +1765,9 @@ function Ao(e) {
|
|
|
1765
1765
|
function So(e) {
|
|
1766
1766
|
return e.toISOString();
|
|
1767
1767
|
}
|
|
1768
|
-
var
|
|
1768
|
+
var Bn = new ie("tag:yaml.org,2002:timestamp", {
|
|
1769
1769
|
kind: "scalar",
|
|
1770
|
-
resolve:
|
|
1770
|
+
resolve: Io,
|
|
1771
1771
|
construct: Ao,
|
|
1772
1772
|
instanceOf: Date,
|
|
1773
1773
|
represent: So
|
|
@@ -1775,7 +1775,7 @@ var Kn = new ie("tag:yaml.org,2002:timestamp", {
|
|
|
1775
1775
|
function xo(e) {
|
|
1776
1776
|
return e === "<<" || e === null;
|
|
1777
1777
|
}
|
|
1778
|
-
var
|
|
1778
|
+
var Ln = new ie("tag:yaml.org,2002:merge", {
|
|
1779
1779
|
kind: "scalar",
|
|
1780
1780
|
resolve: xo
|
|
1781
1781
|
}), wt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
@@ -1792,28 +1792,28 @@ function To(e) {
|
|
|
1792
1792
|
}
|
|
1793
1793
|
return r % 8 === 0;
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1795
|
+
function jo(e) {
|
|
1796
1796
|
var n, t, r = e.replace(/[\r\n=]/g, ""), a = r.length, o = wt, i = 0, l = [];
|
|
1797
1797
|
for (n = 0; n < a; n++)
|
|
1798
1798
|
n % 4 === 0 && n && (l.push(i >> 16 & 255), l.push(i >> 8 & 255), l.push(i & 255)), i = i << 6 | o.indexOf(r.charAt(n));
|
|
1799
1799
|
return t = a % 4 * 6, t === 0 ? (l.push(i >> 16 & 255), l.push(i >> 8 & 255), l.push(i & 255)) : t === 18 ? (l.push(i >> 10 & 255), l.push(i >> 2 & 255)) : t === 12 && l.push(i >> 4 & 255), new Uint8Array(l);
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1801
|
+
function $o(e) {
|
|
1802
1802
|
var n = "", t = 0, r, a, o = e.length, i = wt;
|
|
1803
1803
|
for (r = 0; r < o; r++)
|
|
1804
1804
|
r % 3 === 0 && r && (n += i[t >> 18 & 63], n += i[t >> 12 & 63], n += i[t >> 6 & 63], n += i[t & 63]), t = (t << 8) + e[r];
|
|
1805
1805
|
return a = o % 3, a === 0 ? (n += i[t >> 18 & 63], n += i[t >> 12 & 63], n += i[t >> 6 & 63], n += i[t & 63]) : a === 2 ? (n += i[t >> 10 & 63], n += i[t >> 4 & 63], n += i[t << 2 & 63], n += i[64]) : a === 1 && (n += i[t >> 2 & 63], n += i[t << 4 & 63], n += i[64], n += i[64]), n;
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function Mo(e) {
|
|
1808
1808
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1809
1809
|
}
|
|
1810
|
-
var
|
|
1810
|
+
var Un = new ie("tag:yaml.org,2002:binary", {
|
|
1811
1811
|
kind: "scalar",
|
|
1812
1812
|
resolve: To,
|
|
1813
|
-
construct:
|
|
1814
|
-
predicate:
|
|
1815
|
-
represent:
|
|
1816
|
-
}),
|
|
1813
|
+
construct: jo,
|
|
1814
|
+
predicate: Mo,
|
|
1815
|
+
represent: $o
|
|
1816
|
+
}), Oo = Object.prototype.hasOwnProperty, Eo = Object.prototype.toString;
|
|
1817
1817
|
function Fo(e) {
|
|
1818
1818
|
if (e === null)
|
|
1819
1819
|
return !0;
|
|
@@ -1822,7 +1822,7 @@ function Fo(e) {
|
|
|
1822
1822
|
if (a = l[t], i = !1, Eo.call(a) !== "[object Object]")
|
|
1823
1823
|
return !1;
|
|
1824
1824
|
for (o in a)
|
|
1825
|
-
if (
|
|
1825
|
+
if (Oo.call(a, o))
|
|
1826
1826
|
if (!i)
|
|
1827
1827
|
i = !0;
|
|
1828
1828
|
else
|
|
@@ -1836,15 +1836,15 @@ function Fo(e) {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
return !0;
|
|
1838
1838
|
}
|
|
1839
|
-
function
|
|
1839
|
+
function No(e) {
|
|
1840
1840
|
return e !== null ? e : [];
|
|
1841
1841
|
}
|
|
1842
1842
|
var Pn = new ie("tag:yaml.org,2002:omap", {
|
|
1843
1843
|
kind: "sequence",
|
|
1844
1844
|
resolve: Fo,
|
|
1845
|
-
construct:
|
|
1845
|
+
construct: No
|
|
1846
1846
|
}), qo = Object.prototype.toString;
|
|
1847
|
-
function
|
|
1847
|
+
function Ko(e) {
|
|
1848
1848
|
if (e === null)
|
|
1849
1849
|
return !0;
|
|
1850
1850
|
var n, t, r, a, o, i = e;
|
|
@@ -1855,7 +1855,7 @@ function No(e) {
|
|
|
1855
1855
|
}
|
|
1856
1856
|
return !0;
|
|
1857
1857
|
}
|
|
1858
|
-
function
|
|
1858
|
+
function Bo(e) {
|
|
1859
1859
|
if (e === null)
|
|
1860
1860
|
return [];
|
|
1861
1861
|
var n, t, r, a, o, i = e;
|
|
@@ -1865,38 +1865,38 @@ function Ko(e) {
|
|
|
1865
1865
|
}
|
|
1866
1866
|
var Dn = new ie("tag:yaml.org,2002:pairs", {
|
|
1867
1867
|
kind: "sequence",
|
|
1868
|
-
resolve:
|
|
1869
|
-
construct:
|
|
1870
|
-
}),
|
|
1871
|
-
function
|
|
1868
|
+
resolve: Ko,
|
|
1869
|
+
construct: Bo
|
|
1870
|
+
}), Lo = Object.prototype.hasOwnProperty;
|
|
1871
|
+
function Uo(e) {
|
|
1872
1872
|
if (e === null)
|
|
1873
1873
|
return !0;
|
|
1874
1874
|
var n, t = e;
|
|
1875
1875
|
for (n in t)
|
|
1876
|
-
if (
|
|
1876
|
+
if (Lo.call(t, n) && t[n] !== null)
|
|
1877
1877
|
return !1;
|
|
1878
1878
|
return !0;
|
|
1879
1879
|
}
|
|
1880
1880
|
function Po(e) {
|
|
1881
1881
|
return e !== null ? e : {};
|
|
1882
1882
|
}
|
|
1883
|
-
var
|
|
1883
|
+
var Rn = new ie("tag:yaml.org,2002:set", {
|
|
1884
1884
|
kind: "mapping",
|
|
1885
|
-
resolve:
|
|
1885
|
+
resolve: Uo,
|
|
1886
1886
|
construct: Po
|
|
1887
|
-
}),
|
|
1887
|
+
}), _t = Nn.extend({
|
|
1888
1888
|
implicit: [
|
|
1889
|
-
|
|
1890
|
-
|
|
1889
|
+
Bn,
|
|
1890
|
+
Ln
|
|
1891
1891
|
],
|
|
1892
1892
|
explicit: [
|
|
1893
|
-
|
|
1893
|
+
Un,
|
|
1894
1894
|
Pn,
|
|
1895
1895
|
Dn,
|
|
1896
|
-
|
|
1896
|
+
Rn
|
|
1897
1897
|
]
|
|
1898
|
-
}),
|
|
1899
|
-
function
|
|
1898
|
+
}), Ie = Object.prototype.hasOwnProperty, ze = 1, Vn = 2, Gn = 3, Je = 4, st = 1, Do = 2, zt = 3, Ro = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Vo = /[\x85\u2028\u2029]/, Go = /[,\[\]\{\}]/, Hn = /^(?:!|!!|![a-z\-]+!)$/i, zn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1899
|
+
function Jt(e) {
|
|
1900
1900
|
return Object.prototype.toString.call(e);
|
|
1901
1901
|
}
|
|
1902
1902
|
function he(e) {
|
|
@@ -1911,31 +1911,31 @@ function fe(e) {
|
|
|
1911
1911
|
function Ee(e) {
|
|
1912
1912
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function Ho(e) {
|
|
1915
1915
|
var n;
|
|
1916
1916
|
return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1918
|
+
function zo(e) {
|
|
1919
1919
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1920
1920
|
}
|
|
1921
|
-
function
|
|
1921
|
+
function Jo(e) {
|
|
1922
1922
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1923
1923
|
}
|
|
1924
|
-
function
|
|
1924
|
+
function Yt(e) {
|
|
1925
1925
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1926
1926
|
` : 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" : "";
|
|
1927
1927
|
}
|
|
1928
|
-
function
|
|
1928
|
+
function Yo(e) {
|
|
1929
1929
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1930
1930
|
(e - 65536 >> 10) + 55296,
|
|
1931
1931
|
(e - 65536 & 1023) + 56320
|
|
1932
1932
|
);
|
|
1933
1933
|
}
|
|
1934
|
-
var
|
|
1935
|
-
for (var
|
|
1936
|
-
|
|
1934
|
+
var Jn = new Array(256), Yn = new Array(256);
|
|
1935
|
+
for (var Me = 0; Me < 256; Me++)
|
|
1936
|
+
Jn[Me] = Yt(Me) ? 1 : 0, Yn[Me] = Yt(Me);
|
|
1937
1937
|
function Wo(e, n) {
|
|
1938
|
-
this.input = e, this.filename = n.filename || null, this.schema = n.schema ||
|
|
1938
|
+
this.input = e, this.filename = n.filename || null, this.schema = n.schema || _t, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1939
1939
|
}
|
|
1940
1940
|
function Wn(e, n) {
|
|
1941
1941
|
var t = {
|
|
@@ -1948,24 +1948,24 @@ function Wn(e, n) {
|
|
|
1948
1948
|
};
|
|
1949
1949
|
return t.snippet = Xa(t), new se(n, t);
|
|
1950
1950
|
}
|
|
1951
|
-
function
|
|
1951
|
+
function E(e, n) {
|
|
1952
1952
|
throw Wn(e, n);
|
|
1953
1953
|
}
|
|
1954
|
-
function
|
|
1954
|
+
function Ye(e, n) {
|
|
1955
1955
|
e.onWarning && e.onWarning.call(null, Wn(e, n));
|
|
1956
1956
|
}
|
|
1957
1957
|
var Wt = {
|
|
1958
1958
|
YAML: function(e, n, t) {
|
|
1959
1959
|
var r, a, o;
|
|
1960
|
-
e.version !== null &&
|
|
1960
|
+
e.version !== null && E(e, "duplication of %YAML directive"), t.length !== 1 && E(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), r === null && E(e, "ill-formed argument of the YAML directive"), a = parseInt(r[1], 10), o = parseInt(r[2], 10), a !== 1 && E(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Ye(e, "unsupported YAML version of the document");
|
|
1961
1961
|
},
|
|
1962
1962
|
TAG: function(e, n, t) {
|
|
1963
1963
|
var r, a;
|
|
1964
|
-
t.length !== 2 &&
|
|
1964
|
+
t.length !== 2 && E(e, "TAG directive accepts exactly two arguments"), r = t[0], a = t[1], Hn.test(r) || E(e, "ill-formed tag handle (first argument) of the TAG directive"), Ie.call(e.tagMap, r) && E(e, 'there is a previously declared suffix for "' + r + '" tag handle'), zn.test(a) || E(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1965
1965
|
try {
|
|
1966
1966
|
a = decodeURIComponent(a);
|
|
1967
1967
|
} catch {
|
|
1968
|
-
|
|
1968
|
+
E(e, "tag prefix is malformed: " + a);
|
|
1969
1969
|
}
|
|
1970
1970
|
e.tagMap[r] = a;
|
|
1971
1971
|
}
|
|
@@ -1975,30 +1975,30 @@ function we(e, n, t, r) {
|
|
|
1975
1975
|
if (n < t) {
|
|
1976
1976
|
if (l = e.input.slice(n, t), r)
|
|
1977
1977
|
for (a = 0, o = l.length; a < o; a += 1)
|
|
1978
|
-
i = l.charCodeAt(a), i === 9 || 32 <= i && i <= 1114111 ||
|
|
1978
|
+
i = l.charCodeAt(a), i === 9 || 32 <= i && i <= 1114111 || E(e, "expected valid JSON character");
|
|
1979
1979
|
else
|
|
1980
|
-
|
|
1980
|
+
Ro.test(l) && E(e, "the stream contains non-printable characters");
|
|
1981
1981
|
e.result += l;
|
|
1982
1982
|
}
|
|
1983
1983
|
}
|
|
1984
1984
|
function Zt(e, n, t, r) {
|
|
1985
1985
|
var a, o, i, l;
|
|
1986
|
-
for (ae.isObject(t) ||
|
|
1987
|
-
o = a[i],
|
|
1986
|
+
for (ae.isObject(t) || E(e, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(t), i = 0, l = a.length; i < l; i += 1)
|
|
1987
|
+
o = a[i], Ie.call(n, o) || (n[o] = t[o], r[o] = !0);
|
|
1988
1988
|
}
|
|
1989
1989
|
function Fe(e, n, t, r, a, o, i, l, s) {
|
|
1990
1990
|
var u, p;
|
|
1991
1991
|
if (Array.isArray(a))
|
|
1992
1992
|
for (a = Array.prototype.slice.call(a), u = 0, p = a.length; u < p; u += 1)
|
|
1993
|
-
Array.isArray(a[u]) &&
|
|
1994
|
-
if (typeof a == "object" &&
|
|
1993
|
+
Array.isArray(a[u]) && E(e, "nested arrays are not supported inside keys"), typeof a == "object" && Jt(a[u]) === "[object Object]" && (a[u] = "[object Object]");
|
|
1994
|
+
if (typeof a == "object" && Jt(a) === "[object Object]" && (a = "[object Object]"), a = String(a), n === null && (n = {}), r === "tag:yaml.org,2002:merge")
|
|
1995
1995
|
if (Array.isArray(o))
|
|
1996
1996
|
for (u = 0, p = o.length; u < p; u += 1)
|
|
1997
1997
|
Zt(e, n, o[u], t);
|
|
1998
1998
|
else
|
|
1999
1999
|
Zt(e, n, o, t);
|
|
2000
2000
|
else
|
|
2001
|
-
!e.json && !
|
|
2001
|
+
!e.json && !Ie.call(t, a) && Ie.call(n, a) && (e.line = i || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, E(e, "duplicated mapping key")), a === "__proto__" ? Object.defineProperty(n, a, {
|
|
2002
2002
|
configurable: !0,
|
|
2003
2003
|
enumerable: !0,
|
|
2004
2004
|
writable: !0,
|
|
@@ -2006,9 +2006,9 @@ function Fe(e, n, t, r, a, o, i, l, s) {
|
|
|
2006
2006
|
}) : n[a] = o, delete t[a];
|
|
2007
2007
|
return n;
|
|
2008
2008
|
}
|
|
2009
|
-
function
|
|
2009
|
+
function It(e) {
|
|
2010
2010
|
var n;
|
|
2011
|
-
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
2011
|
+
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : E(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
2012
2012
|
}
|
|
2013
2013
|
function re(e, n, t) {
|
|
2014
2014
|
for (var r = 0, a = e.input.charCodeAt(e.position); a !== 0; ) {
|
|
@@ -2019,12 +2019,12 @@ function re(e, n, t) {
|
|
|
2019
2019
|
a = e.input.charCodeAt(++e.position);
|
|
2020
2020
|
while (a !== 10 && a !== 13 && a !== 0);
|
|
2021
2021
|
if (he(a))
|
|
2022
|
-
for (
|
|
2022
|
+
for (It(e), a = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; a === 32; )
|
|
2023
2023
|
e.lineIndent++, a = e.input.charCodeAt(++e.position);
|
|
2024
2024
|
else
|
|
2025
2025
|
break;
|
|
2026
2026
|
}
|
|
2027
|
-
return t !== -1 && r !== 0 && e.lineIndent < t &&
|
|
2027
|
+
return t !== -1 && r !== 0 && e.lineIndent < t && Ye(e, "deficient indentation"), r;
|
|
2028
2028
|
}
|
|
2029
2029
|
function et(e) {
|
|
2030
2030
|
var n = e.position, t;
|
|
@@ -2035,29 +2035,29 @@ function At(e, n) {
|
|
|
2035
2035
|
`, n - 1));
|
|
2036
2036
|
}
|
|
2037
2037
|
function Zo(e, n, t) {
|
|
2038
|
-
var r, a, o, i, l, s, u, p, c = e.kind, y = e.result,
|
|
2039
|
-
if (
|
|
2038
|
+
var r, a, o, i, l, s, u, p, c = e.kind, y = e.result, m;
|
|
2039
|
+
if (m = e.input.charCodeAt(e.position), fe(m) || Ee(m) || m === 35 || m === 38 || m === 42 || m === 33 || m === 124 || m === 62 || m === 39 || m === 34 || m === 37 || m === 64 || m === 96 || (m === 63 || m === 45) && (a = e.input.charCodeAt(e.position + 1), fe(a) || t && Ee(a)))
|
|
2040
2040
|
return !1;
|
|
2041
|
-
for (e.kind = "scalar", e.result = "", o = i = e.position, l = !1;
|
|
2042
|
-
if (
|
|
2041
|
+
for (e.kind = "scalar", e.result = "", o = i = e.position, l = !1; m !== 0; ) {
|
|
2042
|
+
if (m === 58) {
|
|
2043
2043
|
if (a = e.input.charCodeAt(e.position + 1), fe(a) || t && Ee(a))
|
|
2044
2044
|
break;
|
|
2045
|
-
} else if (
|
|
2045
|
+
} else if (m === 35) {
|
|
2046
2046
|
if (r = e.input.charCodeAt(e.position - 1), fe(r))
|
|
2047
2047
|
break;
|
|
2048
2048
|
} else {
|
|
2049
|
-
if (e.position === e.lineStart && et(e) || t && Ee(
|
|
2049
|
+
if (e.position === e.lineStart && et(e) || t && Ee(m))
|
|
2050
2050
|
break;
|
|
2051
|
-
if (he(
|
|
2051
|
+
if (he(m))
|
|
2052
2052
|
if (s = e.line, u = e.lineStart, p = e.lineIndent, re(e, !1, -1), e.lineIndent >= n) {
|
|
2053
|
-
l = !0,
|
|
2053
|
+
l = !0, m = e.input.charCodeAt(e.position);
|
|
2054
2054
|
continue;
|
|
2055
2055
|
} else {
|
|
2056
2056
|
e.position = i, e.line = s, e.lineStart = u, e.lineIndent = p;
|
|
2057
2057
|
break;
|
|
2058
2058
|
}
|
|
2059
2059
|
}
|
|
2060
|
-
l && (we(e, o, i, !1), At(e, e.line - s), o = i = e.position, l = !1), Se(
|
|
2060
|
+
l && (we(e, o, i, !1), At(e, e.line - s), o = i = e.position, l = !1), Se(m) || (i = e.position + 1), m = e.input.charCodeAt(++e.position);
|
|
2061
2061
|
}
|
|
2062
2062
|
return we(e, o, i, !1), e.result ? !0 : (e.kind = c, e.result = y, !1);
|
|
2063
2063
|
}
|
|
@@ -2072,8 +2072,8 @@ function Qo(e, n) {
|
|
|
2072
2072
|
else
|
|
2073
2073
|
return !0;
|
|
2074
2074
|
else
|
|
2075
|
-
he(t) ? (we(e, r, a, !0), At(e, re(e, !1, n)), r = a = e.position) : e.position === e.lineStart && et(e) ?
|
|
2076
|
-
|
|
2075
|
+
he(t) ? (we(e, r, a, !0), At(e, re(e, !1, n)), r = a = e.position) : e.position === e.lineStart && et(e) ? E(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
|
|
2076
|
+
E(e, "unexpected end of the stream within a single quoted scalar");
|
|
2077
2077
|
}
|
|
2078
2078
|
function Xo(e, n) {
|
|
2079
2079
|
var t, r, a, o, i, l;
|
|
@@ -2085,34 +2085,34 @@ function Xo(e, n) {
|
|
|
2085
2085
|
if (l === 92) {
|
|
2086
2086
|
if (we(e, t, e.position, !0), l = e.input.charCodeAt(++e.position), he(l))
|
|
2087
2087
|
re(e, !1, n);
|
|
2088
|
-
else if (l < 256 &&
|
|
2089
|
-
e.result +=
|
|
2090
|
-
else if ((i =
|
|
2088
|
+
else if (l < 256 && Jn[l])
|
|
2089
|
+
e.result += Yn[l], e.position++;
|
|
2090
|
+
else if ((i = zo(l)) > 0) {
|
|
2091
2091
|
for (a = i, o = 0; a > 0; a--)
|
|
2092
|
-
l = e.input.charCodeAt(++e.position), (i =
|
|
2093
|
-
e.result +=
|
|
2092
|
+
l = e.input.charCodeAt(++e.position), (i = Ho(l)) >= 0 ? o = (o << 4) + i : E(e, "expected hexadecimal character");
|
|
2093
|
+
e.result += Yo(o), e.position++;
|
|
2094
2094
|
} else
|
|
2095
|
-
|
|
2095
|
+
E(e, "unknown escape sequence");
|
|
2096
2096
|
t = r = e.position;
|
|
2097
2097
|
} else
|
|
2098
|
-
he(l) ? (we(e, t, r, !0), At(e, re(e, !1, n)), t = r = e.position) : e.position === e.lineStart && et(e) ?
|
|
2098
|
+
he(l) ? (we(e, t, r, !0), At(e, re(e, !1, n)), t = r = e.position) : e.position === e.lineStart && et(e) ? E(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
2099
2099
|
}
|
|
2100
|
-
|
|
2100
|
+
E(e, "unexpected end of the stream within a double quoted scalar");
|
|
2101
2101
|
}
|
|
2102
2102
|
function ei(e, n) {
|
|
2103
|
-
var t = !0, r, a, o, i = e.tag, l, s = e.anchor, u, p, c, y,
|
|
2104
|
-
if (
|
|
2105
|
-
p = 93,
|
|
2106
|
-
else if (
|
|
2107
|
-
p = 125,
|
|
2103
|
+
var t = !0, r, a, o, i = e.tag, l, s = e.anchor, u, p, c, y, m, I = /* @__PURE__ */ Object.create(null), b, A, C, w;
|
|
2104
|
+
if (w = e.input.charCodeAt(e.position), w === 91)
|
|
2105
|
+
p = 93, m = !1, l = [];
|
|
2106
|
+
else if (w === 123)
|
|
2107
|
+
p = 125, m = !0, l = {};
|
|
2108
2108
|
else
|
|
2109
2109
|
return !1;
|
|
2110
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
2111
|
-
if (re(e, !0, n),
|
|
2112
|
-
return e.position++, e.tag = i, e.anchor = s, e.kind =
|
|
2113
|
-
t ?
|
|
2110
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), w = e.input.charCodeAt(++e.position); w !== 0; ) {
|
|
2111
|
+
if (re(e, !0, n), w = e.input.charCodeAt(e.position), w === p)
|
|
2112
|
+
return e.position++, e.tag = i, e.anchor = s, e.kind = m ? "mapping" : "sequence", e.result = l, !0;
|
|
2113
|
+
t ? w === 44 && E(e, "expected the node content, but found ','") : E(e, "missed comma between flow collection entries"), A = b = C = null, c = y = !1, w === 63 && (u = e.input.charCodeAt(e.position + 1), fe(u) && (c = y = !0, e.position++, re(e, !0, n))), r = e.line, a = e.lineStart, o = e.position, Ne(e, n, ze, !1, !0), A = e.tag, b = e.result, re(e, !0, n), w = e.input.charCodeAt(e.position), (y || e.line === r) && w === 58 && (c = !0, w = e.input.charCodeAt(++e.position), re(e, !0, n), Ne(e, n, ze, !1, !0), C = e.result), m ? Fe(e, l, I, A, b, C, r, a, o) : c ? l.push(Fe(e, null, I, A, b, C, r, a, o)) : l.push(b), re(e, !0, n), w = e.input.charCodeAt(e.position), w === 44 ? (t = !0, w = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2114
2114
|
}
|
|
2115
|
-
|
|
2115
|
+
E(e, "unexpected end of the stream within a flow collection");
|
|
2116
2116
|
}
|
|
2117
2117
|
function ti(e, n) {
|
|
2118
2118
|
var t, r, a = st, o = !1, i = !1, l = n, s = 0, u = !1, p, c;
|
|
@@ -2124,9 +2124,9 @@ function ti(e, n) {
|
|
|
2124
2124
|
return !1;
|
|
2125
2125
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
2126
2126
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
2127
|
-
st === a ? a = c === 43 ?
|
|
2128
|
-
else if ((p =
|
|
2129
|
-
p === 0 ?
|
|
2127
|
+
st === a ? a = c === 43 ? zt : Do : E(e, "repeat of a chomping mode identifier");
|
|
2128
|
+
else if ((p = Jo(c)) >= 0)
|
|
2129
|
+
p === 0 ? E(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? E(e, "repeat of an indentation width identifier") : (l = n + p - 1, i = !0);
|
|
2130
2130
|
else
|
|
2131
2131
|
break;
|
|
2132
2132
|
if (Se(c)) {
|
|
@@ -2139,14 +2139,14 @@ function ti(e, n) {
|
|
|
2139
2139
|
while (!he(c) && c !== 0);
|
|
2140
2140
|
}
|
|
2141
2141
|
for (; c !== 0; ) {
|
|
2142
|
-
for (
|
|
2142
|
+
for (It(e), e.lineIndent = 0, c = e.input.charCodeAt(e.position); (!i || e.lineIndent < l) && c === 32; )
|
|
2143
2143
|
e.lineIndent++, c = e.input.charCodeAt(++e.position);
|
|
2144
2144
|
if (!i && e.lineIndent > l && (l = e.lineIndent), he(c)) {
|
|
2145
2145
|
s++;
|
|
2146
2146
|
continue;
|
|
2147
2147
|
}
|
|
2148
2148
|
if (e.lineIndent < l) {
|
|
2149
|
-
a ===
|
|
2149
|
+
a === zt ? e.result += ae.repeat(`
|
|
2150
2150
|
`, o ? 1 + s : s) : a === st && o && (e.result += `
|
|
2151
2151
|
`);
|
|
2152
2152
|
break;
|
|
@@ -2165,78 +2165,78 @@ function Qt(e, n) {
|
|
|
2165
2165
|
var t, r = e.tag, a = e.anchor, o = [], i, l = !1, s;
|
|
2166
2166
|
if (e.firstTabInLine !== -1)
|
|
2167
2167
|
return !1;
|
|
2168
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2168
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, E(e, "tab characters must not be used in indentation")), !(s !== 45 || (i = e.input.charCodeAt(e.position + 1), !fe(i)))); ) {
|
|
2169
2169
|
if (l = !0, e.position++, re(e, !0, -1) && e.lineIndent <= n) {
|
|
2170
2170
|
o.push(null), s = e.input.charCodeAt(e.position);
|
|
2171
2171
|
continue;
|
|
2172
2172
|
}
|
|
2173
|
-
if (t = e.line,
|
|
2174
|
-
|
|
2173
|
+
if (t = e.line, Ne(e, n, Gn, !1, !0), o.push(e.result), re(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && s !== 0)
|
|
2174
|
+
E(e, "bad indentation of a sequence entry");
|
|
2175
2175
|
else if (e.lineIndent < n)
|
|
2176
2176
|
break;
|
|
2177
2177
|
}
|
|
2178
2178
|
return l ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = o, !0) : !1;
|
|
2179
2179
|
}
|
|
2180
2180
|
function ni(e, n, t) {
|
|
2181
|
-
var r, a, o, i, l, s, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null),
|
|
2181
|
+
var r, a, o, i, l, s, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), m = null, I = null, b = null, A = !1, C = !1, w;
|
|
2182
2182
|
if (e.firstTabInLine !== -1)
|
|
2183
2183
|
return !1;
|
|
2184
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = c),
|
|
2185
|
-
if (!A && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2186
|
-
|
|
2184
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), w = e.input.charCodeAt(e.position); w !== 0; ) {
|
|
2185
|
+
if (!A && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, E(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (w === 63 || w === 58) && fe(r))
|
|
2186
|
+
w === 63 ? (A && (Fe(e, c, y, m, I, null, i, l, s), m = I = b = null), C = !0, A = !0, a = !0) : A ? (A = !1, a = !0) : E(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, w = r;
|
|
2187
2187
|
else {
|
|
2188
|
-
if (i = e.line, l = e.lineStart, s = e.position, !
|
|
2188
|
+
if (i = e.line, l = e.lineStart, s = e.position, !Ne(e, t, Vn, !1, !0))
|
|
2189
2189
|
break;
|
|
2190
2190
|
if (e.line === o) {
|
|
2191
|
-
for (
|
|
2192
|
-
|
|
2193
|
-
if (
|
|
2194
|
-
|
|
2191
|
+
for (w = e.input.charCodeAt(e.position); Se(w); )
|
|
2192
|
+
w = e.input.charCodeAt(++e.position);
|
|
2193
|
+
if (w === 58)
|
|
2194
|
+
w = e.input.charCodeAt(++e.position), fe(w) || E(e, "a whitespace character is expected after the key-value separator within a block mapping"), A && (Fe(e, c, y, m, I, null, i, l, s), m = I = b = null), C = !0, A = !1, a = !1, m = e.tag, I = e.result;
|
|
2195
2195
|
else if (C)
|
|
2196
|
-
|
|
2196
|
+
E(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2197
2197
|
else
|
|
2198
2198
|
return e.tag = u, e.anchor = p, !0;
|
|
2199
2199
|
} else if (C)
|
|
2200
|
-
|
|
2200
|
+
E(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2201
2201
|
else
|
|
2202
2202
|
return e.tag = u, e.anchor = p, !0;
|
|
2203
2203
|
}
|
|
2204
|
-
if ((e.line === o || e.lineIndent > n) && (A && (i = e.line, l = e.lineStart, s = e.position),
|
|
2205
|
-
|
|
2204
|
+
if ((e.line === o || e.lineIndent > n) && (A && (i = e.line, l = e.lineStart, s = e.position), Ne(e, n, Je, !0, a) && (A ? I = e.result : b = e.result), A || (Fe(e, c, y, m, I, b, i, l, s), m = I = b = null), re(e, !0, -1), w = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && w !== 0)
|
|
2205
|
+
E(e, "bad indentation of a mapping entry");
|
|
2206
2206
|
else if (e.lineIndent < n)
|
|
2207
2207
|
break;
|
|
2208
2208
|
}
|
|
2209
|
-
return A && Fe(e, c, y,
|
|
2209
|
+
return A && Fe(e, c, y, m, I, null, i, l, s), C && (e.tag = u, e.anchor = p, e.kind = "mapping", e.result = c), C;
|
|
2210
2210
|
}
|
|
2211
2211
|
function ri(e) {
|
|
2212
2212
|
var n, t = !1, r = !1, a, o, i;
|
|
2213
2213
|
if (i = e.input.charCodeAt(e.position), i !== 33)
|
|
2214
2214
|
return !1;
|
|
2215
|
-
if (e.tag !== null &&
|
|
2215
|
+
if (e.tag !== null && E(e, "duplication of a tag property"), i = e.input.charCodeAt(++e.position), i === 60 ? (t = !0, i = e.input.charCodeAt(++e.position)) : i === 33 ? (r = !0, a = "!!", i = e.input.charCodeAt(++e.position)) : a = "!", n = e.position, t) {
|
|
2216
2216
|
do
|
|
2217
2217
|
i = e.input.charCodeAt(++e.position);
|
|
2218
2218
|
while (i !== 0 && i !== 62);
|
|
2219
|
-
e.position < e.length ? (o = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) :
|
|
2219
|
+
e.position < e.length ? (o = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) : E(e, "unexpected end of the stream within a verbatim tag");
|
|
2220
2220
|
} else {
|
|
2221
2221
|
for (; i !== 0 && !fe(i); )
|
|
2222
|
-
i === 33 && (r ?
|
|
2223
|
-
o = e.input.slice(n, e.position), Go.test(o) &&
|
|
2222
|
+
i === 33 && (r ? E(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(n - 1, e.position + 1), Hn.test(a) || E(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), i = e.input.charCodeAt(++e.position);
|
|
2223
|
+
o = e.input.slice(n, e.position), Go.test(o) && E(e, "tag suffix cannot contain flow indicator characters");
|
|
2224
2224
|
}
|
|
2225
|
-
o && !
|
|
2225
|
+
o && !zn.test(o) && E(e, "tag name cannot contain such characters: " + o);
|
|
2226
2226
|
try {
|
|
2227
2227
|
o = decodeURIComponent(o);
|
|
2228
2228
|
} catch {
|
|
2229
|
-
|
|
2229
|
+
E(e, "tag name is malformed: " + o);
|
|
2230
2230
|
}
|
|
2231
|
-
return t ? e.tag = o :
|
|
2231
|
+
return t ? e.tag = o : Ie.call(e.tagMap, a) ? e.tag = e.tagMap[a] + o : a === "!" ? e.tag = "!" + o : a === "!!" ? e.tag = "tag:yaml.org,2002:" + o : E(e, 'undeclared tag handle "' + a + '"'), !0;
|
|
2232
2232
|
}
|
|
2233
2233
|
function ai(e) {
|
|
2234
2234
|
var n, t;
|
|
2235
2235
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2236
2236
|
return !1;
|
|
2237
|
-
for (e.anchor !== null &&
|
|
2237
|
+
for (e.anchor !== null && E(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !fe(t) && !Ee(t); )
|
|
2238
2238
|
t = e.input.charCodeAt(++e.position);
|
|
2239
|
-
return e.position === n &&
|
|
2239
|
+
return e.position === n && E(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2240
2240
|
}
|
|
2241
2241
|
function oi(e) {
|
|
2242
2242
|
var n, t, r;
|
|
@@ -2244,31 +2244,31 @@ function oi(e) {
|
|
|
2244
2244
|
return !1;
|
|
2245
2245
|
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !fe(r) && !Ee(r); )
|
|
2246
2246
|
r = e.input.charCodeAt(++e.position);
|
|
2247
|
-
return e.position === n &&
|
|
2247
|
+
return e.position === n && E(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), Ie.call(e.anchorMap, t) || E(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], re(e, !0, -1), !0;
|
|
2248
2248
|
}
|
|
2249
|
-
function
|
|
2250
|
-
var o, i, l, s = 1, u = !1, p = !1, c, y,
|
|
2251
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = i = l =
|
|
2249
|
+
function Ne(e, n, t, r, a) {
|
|
2250
|
+
var o, i, l, s = 1, u = !1, p = !1, c, y, m, I, b, A;
|
|
2251
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = i = l = Je === t || Gn === t, r && re(e, !0, -1) && (u = !0, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)), s === 1)
|
|
2252
2252
|
for (; ri(e) || ai(e); )
|
|
2253
2253
|
re(e, !0, -1) ? (u = !0, l = o, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)) : l = !1;
|
|
2254
|
-
if (l && (l = u || a), (s === 1 ||
|
|
2254
|
+
if (l && (l = u || a), (s === 1 || Je === t) && (ze === t || Vn === t ? b = n : b = n + 1, A = e.position - e.lineStart, s === 1 ? l && (Qt(e, A) || ni(e, A, b)) || ei(e, b) ? p = !0 : (i && ti(e, b) || Qo(e, b) || Xo(e, b) ? p = !0 : oi(e) ? (p = !0, (e.tag !== null || e.anchor !== null) && E(e, "alias node should not have any properties")) : Zo(e, b, ze === t) && (p = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (p = l && Qt(e, A))), e.tag === null)
|
|
2255
2255
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2256
2256
|
else if (e.tag === "?") {
|
|
2257
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2258
|
-
if (
|
|
2259
|
-
e.result =
|
|
2257
|
+
for (e.result !== null && e.kind !== "scalar" && E(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, y = e.implicitTypes.length; c < y; c += 1)
|
|
2258
|
+
if (I = e.implicitTypes[c], I.resolve(e.result)) {
|
|
2259
|
+
e.result = I.construct(e.result), e.tag = I.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2260
2260
|
break;
|
|
2261
2261
|
}
|
|
2262
2262
|
} else if (e.tag !== "!") {
|
|
2263
|
-
if (
|
|
2264
|
-
|
|
2263
|
+
if (Ie.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2264
|
+
I = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2265
2265
|
else
|
|
2266
|
-
for (
|
|
2267
|
-
if (e.tag.slice(0,
|
|
2268
|
-
|
|
2266
|
+
for (I = null, m = e.typeMap.multi[e.kind || "fallback"], c = 0, y = m.length; c < y; c += 1)
|
|
2267
|
+
if (e.tag.slice(0, m[c].tag.length) === m[c].tag) {
|
|
2268
|
+
I = m[c];
|
|
2269
2269
|
break;
|
|
2270
2270
|
}
|
|
2271
|
-
|
|
2271
|
+
I || E(e, "unknown tag !<" + e.tag + ">"), e.result !== null && I.kind !== e.kind && E(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + I.kind + '", not "' + e.kind + '"'), I.resolve(e.result, e.tag) ? (e.result = I.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : E(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2272
2272
|
}
|
|
2273
2273
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || p;
|
|
2274
2274
|
}
|
|
@@ -2277,7 +2277,7 @@ function ii(e) {
|
|
|
2277
2277
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (i = e.input.charCodeAt(e.position)) !== 0 && (re(e, !0, -1), i = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || i !== 37)); ) {
|
|
2278
2278
|
for (o = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !fe(i); )
|
|
2279
2279
|
i = e.input.charCodeAt(++e.position);
|
|
2280
|
-
for (r = e.input.slice(t, e.position), a = [], r.length < 1 &&
|
|
2280
|
+
for (r = e.input.slice(t, e.position), a = [], r.length < 1 && E(e, "directive name must not be less than one character in length"); i !== 0; ) {
|
|
2281
2281
|
for (; Se(i); )
|
|
2282
2282
|
i = e.input.charCodeAt(++e.position);
|
|
2283
2283
|
if (i === 35) {
|
|
@@ -2292,14 +2292,14 @@ function ii(e) {
|
|
|
2292
2292
|
i = e.input.charCodeAt(++e.position);
|
|
2293
2293
|
a.push(e.input.slice(t, e.position));
|
|
2294
2294
|
}
|
|
2295
|
-
i !== 0 &&
|
|
2295
|
+
i !== 0 && It(e), Ie.call(Wt, r) ? Wt[r](e, r, a) : Ye(e, 'unknown document directive "' + r + '"');
|
|
2296
2296
|
}
|
|
2297
|
-
if (re(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, re(e, !0, -1)) : o &&
|
|
2297
|
+
if (re(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, re(e, !0, -1)) : o && E(e, "directives end mark is expected"), Ne(e, e.lineIndent - 1, Je, !1, !0), re(e, !0, -1), e.checkLineBreaks && Vo.test(e.input.slice(n, e.position)) && Ye(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && et(e)) {
|
|
2298
2298
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, re(e, !0, -1));
|
|
2299
2299
|
return;
|
|
2300
2300
|
}
|
|
2301
2301
|
if (e.position < e.length - 1)
|
|
2302
|
-
|
|
2302
|
+
E(e, "end of the stream or a document separator is expected");
|
|
2303
2303
|
else
|
|
2304
2304
|
return;
|
|
2305
2305
|
}
|
|
@@ -2307,7 +2307,7 @@ function Zn(e, n) {
|
|
|
2307
2307
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2308
2308
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2309
2309
|
var t = new Wo(e, n), r = e.indexOf("\0");
|
|
2310
|
-
for (r !== -1 && (t.position = r,
|
|
2310
|
+
for (r !== -1 && (t.position = r, E(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2311
2311
|
t.lineIndent += 1, t.position += 1;
|
|
2312
2312
|
for (; t.position < t.length - 1; )
|
|
2313
2313
|
ii(t);
|
|
@@ -2332,7 +2332,7 @@ function si(e, n) {
|
|
|
2332
2332
|
var ui = li, ci = si, Qn = {
|
|
2333
2333
|
loadAll: ui,
|
|
2334
2334
|
load: ci
|
|
2335
|
-
}, Xn = Object.prototype.toString, er = Object.prototype.hasOwnProperty, St = 65279, di = 9,
|
|
2335
|
+
}, Xn = Object.prototype.toString, er = Object.prototype.hasOwnProperty, St = 65279, di = 9, Pe = 10, pi = 13, fi = 32, mi = 33, gi = 34, pt = 35, yi = 37, hi = 38, vi = 39, bi = 42, tr = 44, Ci = 45, We = 58, ki = 61, wi = 62, _i = 63, Ii = 64, nr = 91, rr = 93, Ai = 96, ar = 123, Si = 124, or = 125, le = {};
|
|
2336
2336
|
le[0] = "\\0";
|
|
2337
2337
|
le[7] = "\\a";
|
|
2338
2338
|
le[8] = "\\b";
|
|
@@ -2366,7 +2366,7 @@ var xi = [
|
|
|
2366
2366
|
"Off",
|
|
2367
2367
|
"OFF"
|
|
2368
2368
|
], Ti = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2369
|
-
function
|
|
2369
|
+
function ji(e, n) {
|
|
2370
2370
|
var t, r, a, o, i, l, s;
|
|
2371
2371
|
if (n === null)
|
|
2372
2372
|
return {};
|
|
@@ -2374,7 +2374,7 @@ function $i(e, n) {
|
|
|
2374
2374
|
i = r[a], l = String(n[i]), i.slice(0, 2) === "!!" && (i = "tag:yaml.org,2002:" + i.slice(2)), s = e.compiledTypeMap.fallback[i], s && er.call(s.styleAliases, l) && (l = s.styleAliases[l]), t[i] = l;
|
|
2375
2375
|
return t;
|
|
2376
2376
|
}
|
|
2377
|
-
function
|
|
2377
|
+
function $i(e) {
|
|
2378
2378
|
var n, t, r;
|
|
2379
2379
|
if (n = e.toString(16).toUpperCase(), e <= 255)
|
|
2380
2380
|
t = "x", r = 2;
|
|
@@ -2386,9 +2386,9 @@ function ji(e) {
|
|
|
2386
2386
|
throw new se("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2387
2387
|
return "\\" + t + ae.repeat("0", r - n.length) + n;
|
|
2388
2388
|
}
|
|
2389
|
-
var
|
|
2390
|
-
function
|
|
2391
|
-
this.schema = e.schema ||
|
|
2389
|
+
var Mi = 1, De = 2;
|
|
2390
|
+
function Oi(e) {
|
|
2391
|
+
this.schema = e.schema || _t, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ae.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = ji(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? De : Mi, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
2392
2392
|
}
|
|
2393
2393
|
function Xt(e, n) {
|
|
2394
2394
|
for (var t = ae.repeat(" ", n), r = 0, a = -1, o = "", i, l = e.length; r < l; )
|
|
@@ -2415,7 +2415,7 @@ function Re(e) {
|
|
|
2415
2415
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== St || 65536 <= e && e <= 1114111;
|
|
2416
2416
|
}
|
|
2417
2417
|
function en(e) {
|
|
2418
|
-
return Re(e) && e !== St && e !== pi && e !==
|
|
2418
|
+
return Re(e) && e !== St && e !== pi && e !== Pe;
|
|
2419
2419
|
}
|
|
2420
2420
|
function tn(e, n, t) {
|
|
2421
2421
|
var r = en(e), a = r && !Ze(e);
|
|
@@ -2428,12 +2428,12 @@ function tn(e, n, t) {
|
|
|
2428
2428
|
);
|
|
2429
2429
|
}
|
|
2430
2430
|
function Fi(e) {
|
|
2431
|
-
return Re(e) && e !== St && !Ze(e) && e !== Ci && e !==
|
|
2431
|
+
return Re(e) && e !== St && !Ze(e) && e !== Ci && e !== _i && e !== We && e !== tr && e !== nr && e !== rr && e !== ar && e !== or && e !== pt && e !== hi && e !== bi && e !== mi && e !== Si && e !== ki && e !== wi && e !== vi && e !== gi && e !== yi && e !== Ii && e !== Ai;
|
|
2432
2432
|
}
|
|
2433
|
-
function
|
|
2433
|
+
function Ni(e) {
|
|
2434
2434
|
return !Ze(e) && e !== We;
|
|
2435
2435
|
}
|
|
2436
|
-
function
|
|
2436
|
+
function Ke(e, n) {
|
|
2437
2437
|
var t = e.charCodeAt(n), r;
|
|
2438
2438
|
return t >= 55296 && t <= 56319 && n + 1 < e.length && (r = e.charCodeAt(n + 1), r >= 56320 && r <= 57343) ? (t - 55296) * 1024 + r - 56320 + 65536 : t;
|
|
2439
2439
|
}
|
|
@@ -2441,34 +2441,34 @@ function ir(e) {
|
|
|
2441
2441
|
var n = /^\n* /;
|
|
2442
2442
|
return n.test(e);
|
|
2443
2443
|
}
|
|
2444
|
-
var lr = 1, mt = 2, sr = 3, ur = 4,
|
|
2444
|
+
var lr = 1, mt = 2, sr = 3, ur = 4, Oe = 5;
|
|
2445
2445
|
function qi(e, n, t, r, a, o, i, l) {
|
|
2446
|
-
var s, u = 0, p = null, c = !1, y = !1,
|
|
2446
|
+
var s, u = 0, p = null, c = !1, y = !1, m = r !== -1, I = -1, b = Fi(Ke(e, 0)) && Ni(Ke(e, e.length - 1));
|
|
2447
2447
|
if (n || i)
|
|
2448
2448
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2449
|
-
if (u =
|
|
2450
|
-
return
|
|
2449
|
+
if (u = Ke(e, s), !Re(u))
|
|
2450
|
+
return Oe;
|
|
2451
2451
|
b = b && tn(u, p, l), p = u;
|
|
2452
2452
|
}
|
|
2453
2453
|
else {
|
|
2454
2454
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2455
|
-
if (u =
|
|
2456
|
-
c = !0,
|
|
2457
|
-
s -
|
|
2455
|
+
if (u = Ke(e, s), u === Pe)
|
|
2456
|
+
c = !0, m && (y = y || // Foldable line = too long, and not more-indented.
|
|
2457
|
+
s - I - 1 > r && e[I + 1] !== " ", I = s);
|
|
2458
2458
|
else if (!Re(u))
|
|
2459
|
-
return
|
|
2459
|
+
return Oe;
|
|
2460
2460
|
b = b && tn(u, p, l), p = u;
|
|
2461
2461
|
}
|
|
2462
|
-
y = y ||
|
|
2462
|
+
y = y || m && s - I - 1 > r && e[I + 1] !== " ";
|
|
2463
2463
|
}
|
|
2464
|
-
return !c && !y ? b && !i && !a(e) ? lr : o ===
|
|
2464
|
+
return !c && !y ? b && !i && !a(e) ? lr : o === De ? Oe : mt : t > 9 && ir(e) ? Oe : i ? o === De ? Oe : mt : y ? ur : sr;
|
|
2465
2465
|
}
|
|
2466
|
-
function
|
|
2466
|
+
function Ki(e, n, t, r, a) {
|
|
2467
2467
|
e.dump = function() {
|
|
2468
2468
|
if (n.length === 0)
|
|
2469
|
-
return e.quotingType ===
|
|
2469
|
+
return e.quotingType === De ? '""' : "''";
|
|
2470
2470
|
if (!e.noCompatMode && (xi.indexOf(n) !== -1 || Ti.test(n)))
|
|
2471
|
-
return e.quotingType ===
|
|
2471
|
+
return e.quotingType === De ? '"' + n + '"' : "'" + n + "'";
|
|
2472
2472
|
var o = e.indent * Math.max(1, t), i = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = r || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2473
2473
|
function s(u) {
|
|
2474
2474
|
return Ei(e, u);
|
|
@@ -2490,9 +2490,9 @@ function Ni(e, n, t, r, a) {
|
|
|
2490
2490
|
case sr:
|
|
2491
2491
|
return "|" + nn(n, e.indent) + rn(Xt(n, o));
|
|
2492
2492
|
case ur:
|
|
2493
|
-
return ">" + nn(n, e.indent) + rn(Xt(
|
|
2494
|
-
case
|
|
2495
|
-
return '"' +
|
|
2493
|
+
return ">" + nn(n, e.indent) + rn(Xt(Bi(n, i), o));
|
|
2494
|
+
case Oe:
|
|
2495
|
+
return '"' + Li(n) + '"';
|
|
2496
2496
|
default:
|
|
2497
2497
|
throw new se("impossible error: invalid scalar style");
|
|
2498
2498
|
}
|
|
@@ -2510,7 +2510,7 @@ function rn(e) {
|
|
|
2510
2510
|
return e[e.length - 1] === `
|
|
2511
2511
|
` ? e.slice(0, -1) : e;
|
|
2512
2512
|
}
|
|
2513
|
-
function
|
|
2513
|
+
function Bi(e, n) {
|
|
2514
2514
|
for (var t = /(\n+)([^\n]*)/g, r = function() {
|
|
2515
2515
|
var u = e.indexOf(`
|
|
2516
2516
|
`);
|
|
@@ -2533,12 +2533,12 @@ function an(e, n) {
|
|
|
2533
2533
|
`, e.length - a > n && i > a ? s += e.slice(a, i) + `
|
|
2534
2534
|
` + e.slice(i + 1) : s += e.slice(a), s.slice(1);
|
|
2535
2535
|
}
|
|
2536
|
-
function
|
|
2536
|
+
function Li(e) {
|
|
2537
2537
|
for (var n = "", t = 0, r, a = 0; a < e.length; t >= 65536 ? a += 2 : a++)
|
|
2538
|
-
t =
|
|
2538
|
+
t = Ke(e, a), r = le[t], !r && Re(t) ? (n += e[a], t >= 65536 && (n += e[a + 1])) : n += r || $i(t);
|
|
2539
2539
|
return n;
|
|
2540
2540
|
}
|
|
2541
|
-
function
|
|
2541
|
+
function Ui(e, n, t) {
|
|
2542
2542
|
var r = "", a = e.tag, o, i, l;
|
|
2543
2543
|
for (o = 0, i = t.length; o < i; o += 1)
|
|
2544
2544
|
l = t[o], e.replacer && (l = e.replacer.call(t, String(o), l)), (Ce(e, n, l, !1, !1) || typeof l > "u" && Ce(e, n, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
@@ -2547,7 +2547,7 @@ function Li(e, n, t) {
|
|
|
2547
2547
|
function on(e, n, t, r) {
|
|
2548
2548
|
var a = "", o = e.tag, i, l, s;
|
|
2549
2549
|
for (i = 0, l = t.length; i < l; i += 1)
|
|
2550
|
-
s = t[i], e.replacer && (s = e.replacer.call(t, String(i), s)), (Ce(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && Ce(e, n + 1, null, !0, !0, !1, !0)) && ((!r || a !== "") && (a += ft(e, n)), e.dump &&
|
|
2550
|
+
s = t[i], e.replacer && (s = e.replacer.call(t, String(i), s)), (Ce(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && Ce(e, n + 1, null, !0, !0, !1, !0)) && ((!r || a !== "") && (a += ft(e, n)), e.dump && Pe === e.dump.charCodeAt(0) ? a += "-" : a += "- ", a += e.dump);
|
|
2551
2551
|
e.tag = o, e.dump = a || "[]";
|
|
2552
2552
|
}
|
|
2553
2553
|
function Pi(e, n, t) {
|
|
@@ -2565,7 +2565,7 @@ function Di(e, n, t, r) {
|
|
|
2565
2565
|
else if (e.sortKeys)
|
|
2566
2566
|
throw new se("sortKeys must be a boolean or a function");
|
|
2567
2567
|
for (l = 0, s = i.length; l < s; l += 1)
|
|
2568
|
-
y = "", (!r || a !== "") && (y += ft(e, n)), u = i[l], p = t[u], e.replacer && (p = e.replacer.call(t, u, p)), Ce(e, n + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump &&
|
|
2568
|
+
y = "", (!r || a !== "") && (y += ft(e, n)), u = i[l], p = t[u], e.replacer && (p = e.replacer.call(t, u, p)), Ce(e, n + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Pe === e.dump.charCodeAt(0) ? y += "?" : y += "? "), y += e.dump, c && (y += ft(e, n)), Ce(e, n + 1, p, !0, c) && (e.dump && Pe === e.dump.charCodeAt(0) ? y += ":" : y += ": ", y += e.dump, a += y));
|
|
2569
2569
|
e.tag = o, e.dump = a || "{}";
|
|
2570
2570
|
}
|
|
2571
2571
|
function ln(e, n, t) {
|
|
@@ -2596,9 +2596,9 @@ function Ce(e, n, t, r, a, o, i) {
|
|
|
2596
2596
|
if (p && y && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), l === "[object Object]")
|
|
2597
2597
|
r && Object.keys(e.dump).length !== 0 ? (Di(e, n, e.dump, a), y && (e.dump = "&ref_" + c + e.dump)) : (Pi(e, n, e.dump), y && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2598
2598
|
else if (l === "[object Array]")
|
|
2599
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? on(e, n - 1, e.dump, a) : on(e, n, e.dump, a), y && (e.dump = "&ref_" + c + e.dump)) : (
|
|
2599
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? on(e, n - 1, e.dump, a) : on(e, n, e.dump, a), y && (e.dump = "&ref_" + c + e.dump)) : (Ui(e, n, e.dump), y && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2600
2600
|
else if (l === "[object String]")
|
|
2601
|
-
e.tag !== "?" &&
|
|
2601
|
+
e.tag !== "?" && Ki(e, e.dump, n, o, s);
|
|
2602
2602
|
else {
|
|
2603
2603
|
if (l === "[object Undefined]" || e.skipInvalid)
|
|
2604
2604
|
return !1;
|
|
@@ -2610,7 +2610,7 @@ function Ce(e, n, t, r, a, o, i) {
|
|
|
2610
2610
|
}
|
|
2611
2611
|
return !0;
|
|
2612
2612
|
}
|
|
2613
|
-
function
|
|
2613
|
+
function Ri(e, n) {
|
|
2614
2614
|
var t = [], r = [], a, o;
|
|
2615
2615
|
for (gt(e, t, r), a = 0, o = r.length; a < o; a += 1)
|
|
2616
2616
|
n.duplicates.push(t[r[a]]);
|
|
@@ -2628,15 +2628,15 @@ function gt(e, n, t) {
|
|
|
2628
2628
|
for (r = Object.keys(e), a = 0, o = r.length; a < o; a += 1)
|
|
2629
2629
|
gt(e[r[a]], n, t);
|
|
2630
2630
|
}
|
|
2631
|
-
function
|
|
2631
|
+
function Vi(e, n) {
|
|
2632
2632
|
n = n || {};
|
|
2633
|
-
var t = new
|
|
2634
|
-
t.noRefs ||
|
|
2633
|
+
var t = new Oi(n);
|
|
2634
|
+
t.noRefs || Ri(e, t);
|
|
2635
2635
|
var r = e;
|
|
2636
2636
|
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), Ce(t, 0, r, !0, !0) ? t.dump + `
|
|
2637
2637
|
` : "";
|
|
2638
2638
|
}
|
|
2639
|
-
var Gi =
|
|
2639
|
+
var Gi = Vi, Hi = {
|
|
2640
2640
|
dump: Gi
|
|
2641
2641
|
};
|
|
2642
2642
|
function xt(e, n) {
|
|
@@ -2644,24 +2644,24 @@ function xt(e, n) {
|
|
|
2644
2644
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2645
2645
|
};
|
|
2646
2646
|
}
|
|
2647
|
-
var
|
|
2648
|
-
binary:
|
|
2647
|
+
var zi = ie, Ji = An, Yi = jn, Wi = Fn, Zi = Nn, Qi = _t, Xi = Qn.load, el = Qn.loadAll, tl = Hi.dump, nl = se, rl = {
|
|
2648
|
+
binary: Un,
|
|
2649
2649
|
float: En,
|
|
2650
2650
|
map: Tn,
|
|
2651
|
-
null:
|
|
2651
|
+
null: $n,
|
|
2652
2652
|
pairs: Dn,
|
|
2653
|
-
set:
|
|
2654
|
-
timestamp:
|
|
2655
|
-
bool:
|
|
2656
|
-
int:
|
|
2657
|
-
merge:
|
|
2653
|
+
set: Rn,
|
|
2654
|
+
timestamp: Bn,
|
|
2655
|
+
bool: Mn,
|
|
2656
|
+
int: On,
|
|
2657
|
+
merge: Ln,
|
|
2658
2658
|
omap: Pn,
|
|
2659
2659
|
seq: xn,
|
|
2660
2660
|
str: Sn
|
|
2661
2661
|
}, al = xt("safeLoad", "load"), ol = xt("safeLoadAll", "loadAll"), il = xt("safeDump", "dump"), ll = {
|
|
2662
|
-
Type:
|
|
2663
|
-
Schema:
|
|
2664
|
-
FAILSAFE_SCHEMA:
|
|
2662
|
+
Type: zi,
|
|
2663
|
+
Schema: Ji,
|
|
2664
|
+
FAILSAFE_SCHEMA: Yi,
|
|
2665
2665
|
JSON_SCHEMA: Wi,
|
|
2666
2666
|
CORE_SCHEMA: Zi,
|
|
2667
2667
|
DEFAULT_SCHEMA: Qi,
|
|
@@ -2684,17 +2684,17 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2684
2684
|
}
|
|
2685
2685
|
},
|
|
2686
2686
|
setup(e) {
|
|
2687
|
-
const n = e, t =
|
|
2687
|
+
const n = e, t = He(n.yamlRecord);
|
|
2688
2688
|
return (r, a) => {
|
|
2689
|
-
const o =
|
|
2690
|
-
return d(),
|
|
2691
|
-
n.yamlRecord ? (d(),
|
|
2689
|
+
const o = U("KCodeBlock");
|
|
2690
|
+
return d(), $("div", sl, [
|
|
2691
|
+
n.yamlRecord ? (d(), R(o, {
|
|
2692
2692
|
key: 0,
|
|
2693
2693
|
id: "yaml-codeblock",
|
|
2694
2694
|
code: f(ll).dump(t),
|
|
2695
2695
|
language: "yaml",
|
|
2696
2696
|
theme: "dark"
|
|
2697
|
-
}, null, 8, ["code"])) :
|
|
2697
|
+
}, null, 8, ["code"])) : H("", !0)
|
|
2698
2698
|
]);
|
|
2699
2699
|
};
|
|
2700
2700
|
}
|
|
@@ -2743,28 +2743,28 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2743
2743
|
}
|
|
2744
2744
|
},
|
|
2745
2745
|
setup(e) {
|
|
2746
|
-
const n = e, t = Qe(), { i18n: { t: r } } = oe.useI18n(), a = (i) => !!(i.tooltip || t[`${i.key}-label-tooltip`]), o =
|
|
2746
|
+
const n = e, t = Qe(), { i18n: { t: r } } = oe.useI18n(), a = (i) => !!(i.tooltip || t[`${i.key}-label-tooltip`]), o = j(() => {
|
|
2747
2747
|
if (!n.record)
|
|
2748
2748
|
return n.record;
|
|
2749
2749
|
const i = JSON.parse(JSON.stringify(n.record));
|
|
2750
2750
|
return delete i.created_at, delete i.updated_at, i;
|
|
2751
2751
|
});
|
|
2752
|
-
return (i, l) => (d(),
|
|
2753
|
-
e.format === "structured" ? (d(),
|
|
2754
|
-
(d(!0),
|
|
2752
|
+
return (i, l) => (d(), $(me, null, [
|
|
2753
|
+
e.format === "structured" ? (d(), $("div", ul, [
|
|
2754
|
+
(d(!0), $(me, null, pe(e.propListTypes, (s) => (d(), $("div", {
|
|
2755
2755
|
key: `config-card-details-${s}-props`,
|
|
2756
|
-
class:
|
|
2756
|
+
class: _e(`config-card-details-${s}-props`),
|
|
2757
2757
|
"data-testid": `config-card-details-${s}-props`
|
|
2758
2758
|
}, [
|
|
2759
|
-
s !== "basic" ? (d(),
|
|
2760
|
-
(d(!0),
|
|
2759
|
+
s !== "basic" ? (d(), $("div", dl, M(s === "advanced" ? f(r)("baseConfigCard.sections.advanced") : f(r)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
2760
|
+
(d(!0), $(me, null, pe(e.propertyCollections[s], (u) => (d(), R(kt, {
|
|
2761
2761
|
key: u.key,
|
|
2762
2762
|
item: u
|
|
2763
2763
|
}, ke({
|
|
2764
|
-
label:
|
|
2764
|
+
label: g(() => [
|
|
2765
2765
|
Z(i.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2766
2766
|
]),
|
|
2767
|
-
[u.key]:
|
|
2767
|
+
[u.key]: g(({ rowValue: p }) => [
|
|
2768
2768
|
Z(i.$slots, u.key, {
|
|
2769
2769
|
row: u,
|
|
2770
2770
|
rowValue: p
|
|
@@ -2774,25 +2774,25 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2774
2774
|
}, [
|
|
2775
2775
|
a(u) ? {
|
|
2776
2776
|
name: "label-tooltip",
|
|
2777
|
-
fn:
|
|
2777
|
+
fn: g(() => [
|
|
2778
2778
|
Z(i.$slots, `${u.key}-label-tooltip`, { row: u }, void 0, !0)
|
|
2779
2779
|
]),
|
|
2780
2780
|
key: "0"
|
|
2781
2781
|
} : void 0
|
|
2782
2782
|
]), 1032, ["item"]))), 128))
|
|
2783
2783
|
], 10, cl))), 128))
|
|
2784
|
-
])) :
|
|
2785
|
-
e.format === "json" && n.record ? (d(),
|
|
2784
|
+
])) : H("", !0),
|
|
2785
|
+
e.format === "json" && n.record ? (d(), R(wn, {
|
|
2786
2786
|
key: 1,
|
|
2787
2787
|
config: n.config,
|
|
2788
2788
|
"fetcher-url": n.fetcherUrl,
|
|
2789
2789
|
"json-record": o.value,
|
|
2790
2790
|
"request-method": "get"
|
|
2791
|
-
}, null, 8, ["config", "fetcher-url", "json-record"])) :
|
|
2792
|
-
e.format === "yaml" && n.record ? (d(),
|
|
2791
|
+
}, null, 8, ["config", "fetcher-url", "json-record"])) : H("", !0),
|
|
2792
|
+
e.format === "yaml" && n.record ? (d(), R(cr, {
|
|
2793
2793
|
key: 2,
|
|
2794
2794
|
"yaml-record": o.value
|
|
2795
|
-
}, null, 8, ["yaml-record"])) :
|
|
2795
|
+
}, null, 8, ["yaml-record"])) : H("", !0)
|
|
2796
2796
|
], 64));
|
|
2797
2797
|
}
|
|
2798
2798
|
}), fl = /* @__PURE__ */ ge(pl, [["__scopeId", "data-v-2b74ac63"]]), sn = "24px", ml = (e, n) => {
|
|
@@ -2803,7 +2803,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2803
2803
|
}, gl = (e) => (pn("data-v-84d5ee61"), e = e(), fn(), e), yl = ["aria-hidden"], hl = {
|
|
2804
2804
|
key: 0,
|
|
2805
2805
|
"data-testid": "kui-icon-svg-title"
|
|
2806
|
-
}, vl = /* @__PURE__ */ gl(() => /* @__PURE__ */
|
|
2806
|
+
}, vl = /* @__PURE__ */ gl(() => /* @__PURE__ */ B("path", {
|
|
2807
2807
|
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",
|
|
2808
2808
|
fill: "currentColor"
|
|
2809
2809
|
}, null, -1)), bl = /* @__PURE__ */ te({
|
|
@@ -2858,7 +2858,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2858
2858
|
}
|
|
2859
2859
|
},
|
|
2860
2860
|
setup(e) {
|
|
2861
|
-
const n = e, t =
|
|
2861
|
+
const n = e, t = j(() => {
|
|
2862
2862
|
if (typeof n.size == "number" && n.size > 0)
|
|
2863
2863
|
return `${n.size}px`;
|
|
2864
2864
|
if (typeof n.size == "string") {
|
|
@@ -2867,7 +2867,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2867
2867
|
return `${o}px`;
|
|
2868
2868
|
}
|
|
2869
2869
|
return sn;
|
|
2870
|
-
}), r =
|
|
2870
|
+
}), r = j(() => ({
|
|
2871
2871
|
boxSizing: "border-box",
|
|
2872
2872
|
color: n.color,
|
|
2873
2873
|
display: n.display,
|
|
@@ -2875,14 +2875,14 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2875
2875
|
lineHeight: "0",
|
|
2876
2876
|
width: t.value
|
|
2877
2877
|
}));
|
|
2878
|
-
return (a, o) => (d(),
|
|
2878
|
+
return (a, o) => (d(), R(xe(e.as), {
|
|
2879
2879
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2880
2880
|
class: "kui-icon book-icon",
|
|
2881
2881
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2882
2882
|
style: dn(r.value)
|
|
2883
2883
|
}, {
|
|
2884
|
-
default:
|
|
2885
|
-
(d(),
|
|
2884
|
+
default: g(() => [
|
|
2885
|
+
(d(), $("svg", {
|
|
2886
2886
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2887
2887
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2888
2888
|
fill: "none",
|
|
@@ -2892,14 +2892,14 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2892
2892
|
width: "100%",
|
|
2893
2893
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2894
2894
|
}, [
|
|
2895
|
-
e.title ? (d(),
|
|
2895
|
+
e.title ? (d(), $("title", hl, M(e.title), 1)) : H("", !0),
|
|
2896
2896
|
vl
|
|
2897
2897
|
], 8, yl))
|
|
2898
2898
|
]),
|
|
2899
2899
|
_: 1
|
|
2900
2900
|
}, 8, ["aria-hidden", "style"]));
|
|
2901
2901
|
}
|
|
2902
|
-
}), Cl = /* @__PURE__ */ ml(bl, [["__scopeId", "data-v-84d5ee61"]]), kl = { "data-testid": "config-card-title" }, wl = { class: "config-card-actions" },
|
|
2902
|
+
}), Cl = /* @__PURE__ */ ml(bl, [["__scopeId", "data-v-84d5ee61"]]), kl = { "data-testid": "config-card-title" }, wl = { class: "config-card-actions" }, _l = ["href"], Il = {
|
|
2903
2903
|
key: 2,
|
|
2904
2904
|
class: "config-card-details-section"
|
|
2905
2905
|
}, Al = {
|
|
@@ -2999,9 +2999,9 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
2999
2999
|
label: "YAML",
|
|
3000
3000
|
value: "yaml"
|
|
3001
3001
|
}
|
|
3002
|
-
], c =
|
|
3003
|
-
c.value =
|
|
3004
|
-
},
|
|
3002
|
+
], c = N("structured"), y = (h) => {
|
|
3003
|
+
c.value = h == null ? void 0 : h.value;
|
|
3004
|
+
}, m = {
|
|
3005
3005
|
id: {
|
|
3006
3006
|
type: ee.ID,
|
|
3007
3007
|
label: i("baseConfigCard.commonFields.id_label"),
|
|
@@ -3035,214 +3035,214 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3035
3035
|
// the last property displayed
|
|
3036
3036
|
section: de.Basic
|
|
3037
3037
|
}
|
|
3038
|
-
},
|
|
3039
|
-
var
|
|
3038
|
+
}, I = N(!1), b = N(!1), A = N(""), C = N({}), w = j(() => {
|
|
3039
|
+
var h, _, q;
|
|
3040
3040
|
if (!C.value)
|
|
3041
3041
|
return [];
|
|
3042
|
-
const
|
|
3043
|
-
for (const
|
|
3044
|
-
const
|
|
3042
|
+
const D = [], S = Object.keys(C.value).length;
|
|
3043
|
+
for (const K in C.value) {
|
|
3044
|
+
const P = (_ = (h = a.configSchema) == null ? void 0 : h[K]) == null ? void 0 : _.order, V = (q = m[K]) == null ? void 0 : q.order;
|
|
3045
3045
|
let Q = S;
|
|
3046
|
-
(
|
|
3046
|
+
(V || V === 0) && (Q = V === -1 ? S + 1 : V), P && (Q = P === -1 ? S + 1 : P), D.push([K, Q]);
|
|
3047
3047
|
}
|
|
3048
|
-
return
|
|
3049
|
-
return
|
|
3050
|
-
}),
|
|
3051
|
-
var
|
|
3052
|
-
const Q =
|
|
3048
|
+
return D.sort(function(K, P) {
|
|
3049
|
+
return K[1] - P[1];
|
|
3050
|
+
}), D.map((K) => {
|
|
3051
|
+
var P, V;
|
|
3052
|
+
const Q = K[0], J = (P = C.value) == null ? void 0 : P[Q], X = ((V = a.configSchema) == null ? void 0 : V[Q]) || {}, ue = m[Q];
|
|
3053
3053
|
return {
|
|
3054
3054
|
key: Q,
|
|
3055
|
-
value:
|
|
3055
|
+
value: J,
|
|
3056
3056
|
hidden: X.hidden || !1,
|
|
3057
3057
|
type: X.type ?? ((ue == null ? void 0 : ue.type) || ee.Text),
|
|
3058
3058
|
label: X.label ?? ((ue == null ? void 0 : ue.label) || s(Q)),
|
|
3059
3059
|
tooltip: X.tooltip ?? ((ue == null ? void 0 : ue.tooltip) || void 0),
|
|
3060
3060
|
section: X.section ?? ((ue == null ? void 0 : ue.section) || de.Advanced)
|
|
3061
3061
|
};
|
|
3062
|
-
}).filter((
|
|
3063
|
-
}),
|
|
3064
|
-
var
|
|
3062
|
+
}).filter((K) => !K.hidden && K.key !== a.pluginConfigKey);
|
|
3063
|
+
}), G = j(() => {
|
|
3064
|
+
var h, _;
|
|
3065
3065
|
if (!C.value || !a.pluginConfigKey)
|
|
3066
3066
|
return [];
|
|
3067
|
-
const
|
|
3068
|
-
for (const
|
|
3069
|
-
const
|
|
3070
|
-
let Q =
|
|
3071
|
-
|
|
3067
|
+
const q = C.value[a.pluginConfigKey] || {}, D = Object.keys(q).length, S = [];
|
|
3068
|
+
for (const K in q) {
|
|
3069
|
+
const P = (_ = (h = a.pluginConfigSchema) == null ? void 0 : h[K]) == null ? void 0 : _.order, V = q[K];
|
|
3070
|
+
let Q = V != null && V !== "" ? D - 1 : D;
|
|
3071
|
+
P && (Q = P === -1 ? D + 1 : P), S.push([K, Q]);
|
|
3072
3072
|
}
|
|
3073
|
-
return S.sort(function(
|
|
3074
|
-
return
|
|
3075
|
-
}), S.map((
|
|
3076
|
-
var
|
|
3077
|
-
const
|
|
3073
|
+
return S.sort(function(K, P) {
|
|
3074
|
+
return K[1] - P[1];
|
|
3075
|
+
}), S.map((K) => {
|
|
3076
|
+
var P;
|
|
3077
|
+
const V = K[0], Q = q[V], J = ((P = a.pluginConfigSchema) == null ? void 0 : P[V]) || {};
|
|
3078
3078
|
return {
|
|
3079
|
-
key:
|
|
3079
|
+
key: V,
|
|
3080
3080
|
value: Q,
|
|
3081
|
-
hidden:
|
|
3082
|
-
type:
|
|
3083
|
-
label:
|
|
3084
|
-
tooltip:
|
|
3081
|
+
hidden: J.hidden || !1,
|
|
3082
|
+
type: J.type ?? ee.Text,
|
|
3083
|
+
label: J.label ?? s(V),
|
|
3084
|
+
tooltip: J.tooltip ?? void 0,
|
|
3085
3085
|
section: de.Plugin
|
|
3086
3086
|
};
|
|
3087
|
-
}).filter((
|
|
3088
|
-
}), k =
|
|
3089
|
-
var
|
|
3087
|
+
}).filter((K) => !K.hidden);
|
|
3088
|
+
}), k = j(() => {
|
|
3089
|
+
var h, _, q, D;
|
|
3090
3090
|
return {
|
|
3091
|
-
basic: (
|
|
3092
|
-
advanced: (
|
|
3093
|
-
plugin: (
|
|
3091
|
+
basic: (h = w.value) == null ? void 0 : h.filter((S) => S.section === de.Basic),
|
|
3092
|
+
advanced: (_ = w.value) == null ? void 0 : _.filter((S) => S.section === de.Advanced),
|
|
3093
|
+
plugin: (D = G.value) == null ? void 0 : D.concat((q = w.value) == null ? void 0 : q.filter((S) => S.section === de.Plugin))
|
|
3094
3094
|
};
|
|
3095
|
-
}),
|
|
3096
|
-
const
|
|
3097
|
-
return k.value.basic.length &&
|
|
3098
|
-
}),
|
|
3099
|
-
var
|
|
3100
|
-
let
|
|
3101
|
-
return a.config.app === "konnect" ?
|
|
3102
|
-
}),
|
|
3103
|
-
C.value &&
|
|
3095
|
+
}), T = j(() => {
|
|
3096
|
+
const h = [];
|
|
3097
|
+
return k.value.basic.length && h.push("basic"), k.value.advanced.length && h.push("advanced"), k.value.plugin.length && h.push("plugin"), h;
|
|
3098
|
+
}), v = (h) => !!(h.tooltip || o[`${h.key}-label-tooltip`]), L = j(() => {
|
|
3099
|
+
var h, _;
|
|
3100
|
+
let q = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3101
|
+
return a.config.app === "konnect" ? q = q.replace(/{controlPlaneId}/gi, ((h = a.config) == null ? void 0 : h.controlPlaneId) || "") : a.config.app === "kongManager" && (q = q.replace(/\/{workspace}/gi, (_ = a.config) != null && _.workspace ? `/${a.config.workspace}` : "")), q = q.replace(/{id}/gi, a.config.entityId), q;
|
|
3102
|
+
}), F = (h) => {
|
|
3103
|
+
C.value && h(JSON.stringify(C.value)) ? r("copy:success", C.value) : r("copy:error");
|
|
3104
3104
|
};
|
|
3105
|
-
return be(
|
|
3106
|
-
r("loading",
|
|
3105
|
+
return be(I, (h) => {
|
|
3106
|
+
r("loading", h);
|
|
3107
3107
|
}, { immediate: !0 }), yt(async () => {
|
|
3108
|
-
b.value = !1,
|
|
3108
|
+
b.value = !1, I.value = !0;
|
|
3109
3109
|
try {
|
|
3110
|
-
const { data:
|
|
3110
|
+
const { data: h } = await u.get(L.value);
|
|
3111
3111
|
if (a.dataKey)
|
|
3112
|
-
if (typeof
|
|
3113
|
-
C.value = { ...
|
|
3112
|
+
if (typeof h[a.dataKey] < "u")
|
|
3113
|
+
C.value = { ...h[a.dataKey] };
|
|
3114
3114
|
else
|
|
3115
3115
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: a.dataKey }));
|
|
3116
3116
|
else
|
|
3117
|
-
C.value = { ...
|
|
3118
|
-
Object.keys(a.configSchema).filter((
|
|
3119
|
-
C.value && typeof C.value[
|
|
3120
|
-
}), r("fetch:success",
|
|
3121
|
-
} catch (
|
|
3122
|
-
const
|
|
3123
|
-
A.value =
|
|
3117
|
+
C.value = { ...h };
|
|
3118
|
+
Object.keys(a.configSchema).filter((_) => a.configSchema[_].forceShow).forEach((_) => {
|
|
3119
|
+
C.value && typeof C.value[_] > "u" && (C.value[_] = null);
|
|
3120
|
+
}), r("fetch:success", h);
|
|
3121
|
+
} catch (h) {
|
|
3122
|
+
const _ = l(h);
|
|
3123
|
+
A.value = _.startsWith("code") ? i("baseConfigCard.errors.load") : _, b.value = !0, r("fetch:error", h);
|
|
3124
3124
|
} finally {
|
|
3125
|
-
|
|
3125
|
+
I.value = !1;
|
|
3126
3126
|
}
|
|
3127
|
-
}), (
|
|
3128
|
-
const
|
|
3129
|
-
return d(),
|
|
3130
|
-
actions:
|
|
3131
|
-
|
|
3132
|
-
Z(
|
|
3133
|
-
e.config.jsonYamlEnabled ? (d(),
|
|
3127
|
+
}), (h, _) => {
|
|
3128
|
+
const q = U("KLabel"), D = U("KSelect"), S = U("KButton"), K = U("KClipboardProvider"), P = U("KSkeleton"), V = U("KEmptyState"), Q = U("KCard");
|
|
3129
|
+
return d(), R(Q, { class: "kong-ui-entity-base-config-card" }, ke({
|
|
3130
|
+
actions: g(() => [
|
|
3131
|
+
B("div", wl, [
|
|
3132
|
+
Z(h.$slots, "actions", {}, void 0, !0),
|
|
3133
|
+
e.config.jsonYamlEnabled ? (d(), R(q, {
|
|
3134
3134
|
key: 0,
|
|
3135
3135
|
class: "config-format-select-label",
|
|
3136
3136
|
"data-testid": "config-format-select-label"
|
|
3137
3137
|
}, {
|
|
3138
|
-
default:
|
|
3139
|
-
|
|
3138
|
+
default: g(() => [
|
|
3139
|
+
Y(M(e.label), 1)
|
|
3140
3140
|
]),
|
|
3141
3141
|
_: 1
|
|
3142
|
-
})) :
|
|
3143
|
-
e.config.jsonYamlEnabled ? (d(),
|
|
3142
|
+
})) : H("", !0),
|
|
3143
|
+
e.config.jsonYamlEnabled ? (d(), R(D, {
|
|
3144
3144
|
key: 1,
|
|
3145
3145
|
appearance: "select",
|
|
3146
3146
|
"data-testid": "select-config-format",
|
|
3147
3147
|
items: p,
|
|
3148
3148
|
onChange: y
|
|
3149
|
-
})) :
|
|
3150
|
-
a.config.jsonYamlEnabled && e.configCardDoc ? (d(),
|
|
3149
|
+
})) : H("", !0),
|
|
3150
|
+
a.config.jsonYamlEnabled && e.configCardDoc ? (d(), R(S, {
|
|
3151
3151
|
key: 2,
|
|
3152
3152
|
appearance: "tertiary",
|
|
3153
3153
|
class: "book-icon",
|
|
3154
3154
|
"data-testid": "book-icon"
|
|
3155
3155
|
}, {
|
|
3156
|
-
default:
|
|
3157
|
-
|
|
3156
|
+
default: g(() => [
|
|
3157
|
+
B("a", {
|
|
3158
3158
|
href: e.configCardDoc,
|
|
3159
3159
|
rel: "noopener",
|
|
3160
3160
|
target: "_blank"
|
|
3161
3161
|
}, [
|
|
3162
|
-
|
|
3163
|
-
], 8,
|
|
3162
|
+
O(f(Cl), { size: f(Sa) }, null, 8, ["size"])
|
|
3163
|
+
], 8, _l)
|
|
3164
3164
|
]),
|
|
3165
3165
|
_: 1
|
|
3166
|
-
})) :
|
|
3167
|
-
e.config.jsonYamlEnabled ?
|
|
3168
|
-
default:
|
|
3169
|
-
!
|
|
3166
|
+
})) : H("", !0),
|
|
3167
|
+
e.config.jsonYamlEnabled ? H("", !0) : (d(), R(K, { key: 3 }, {
|
|
3168
|
+
default: g(({ copyToClipboard: J }) => [
|
|
3169
|
+
!I.value && !b.value ? (d(), R(S, {
|
|
3170
3170
|
key: 0,
|
|
3171
3171
|
appearance: "tertiary",
|
|
3172
3172
|
"data-testid": "json-copy-button",
|
|
3173
|
-
onClick: (X) =>
|
|
3173
|
+
onClick: (X) => F(J)
|
|
3174
3174
|
}, {
|
|
3175
|
-
default:
|
|
3176
|
-
|
|
3175
|
+
default: g(() => [
|
|
3176
|
+
Y(M(f(i)("baseConfigCard.actions.copy")), 1)
|
|
3177
3177
|
]),
|
|
3178
3178
|
_: 2
|
|
3179
|
-
}, 1032, ["onClick"])) :
|
|
3179
|
+
}, 1032, ["onClick"])) : H("", !0)
|
|
3180
3180
|
]),
|
|
3181
3181
|
_: 1
|
|
3182
3182
|
}))
|
|
3183
3183
|
])
|
|
3184
3184
|
]),
|
|
3185
|
-
default:
|
|
3186
|
-
|
|
3185
|
+
default: g(() => [
|
|
3186
|
+
I.value ? (d(), R(P, {
|
|
3187
3187
|
key: 0,
|
|
3188
3188
|
"data-testid": "config-card-loader",
|
|
3189
3189
|
"table-columns": 2,
|
|
3190
3190
|
type: "table"
|
|
3191
|
-
})) : b.value ? (d(), V
|
|
3191
|
+
})) : b.value ? (d(), R(V, {
|
|
3192
3192
|
key: 1,
|
|
3193
3193
|
"data-testid": "config-card-fetch-error",
|
|
3194
3194
|
"is-error": ""
|
|
3195
3195
|
}, {
|
|
3196
|
-
message:
|
|
3197
|
-
|
|
3196
|
+
message: g(() => [
|
|
3197
|
+
B("h3", null, M(A.value), 1)
|
|
3198
3198
|
]),
|
|
3199
3199
|
_: 1
|
|
3200
|
-
})) :
|
|
3201
|
-
e.config.jsonYamlEnabled ? (d(),
|
|
3202
|
-
|
|
3200
|
+
})) : H("", !0),
|
|
3201
|
+
e.config.jsonYamlEnabled ? (d(), $("div", Il, [
|
|
3202
|
+
O(fl, {
|
|
3203
3203
|
config: e.config,
|
|
3204
|
-
"fetcher-url":
|
|
3204
|
+
"fetcher-url": L.value,
|
|
3205
3205
|
format: c.value,
|
|
3206
|
-
"prop-list-types":
|
|
3206
|
+
"prop-list-types": T.value,
|
|
3207
3207
|
"property-collections": k.value,
|
|
3208
3208
|
record: C.value
|
|
3209
3209
|
}, ke({ _: 2 }, [
|
|
3210
|
-
pe(Object.keys(
|
|
3211
|
-
name:
|
|
3212
|
-
fn:
|
|
3213
|
-
Z(
|
|
3210
|
+
pe(Object.keys(h.$slots), (J) => ({
|
|
3211
|
+
name: J,
|
|
3212
|
+
fn: g(({ row: X, rowValue: ue }) => [
|
|
3213
|
+
Z(h.$slots, J, {
|
|
3214
3214
|
row: X,
|
|
3215
3215
|
rowValue: ue
|
|
3216
3216
|
}, void 0, !0)
|
|
3217
3217
|
])
|
|
3218
3218
|
}))
|
|
3219
3219
|
]), 1032, ["config", "fetcher-url", "format", "prop-list-types", "property-collections", "record"])
|
|
3220
|
-
])) : (d(),
|
|
3221
|
-
(d(!0),
|
|
3222
|
-
key: `config-card-details-${
|
|
3223
|
-
class:
|
|
3224
|
-
"data-testid": `config-card-details-${
|
|
3220
|
+
])) : (d(), $("div", Al, [
|
|
3221
|
+
(d(!0), $(me, null, pe(T.value, (J) => (d(), $("div", {
|
|
3222
|
+
key: `config-card-details-${J}-props`,
|
|
3223
|
+
class: _e(`config-card-details-${J}-props`),
|
|
3224
|
+
"data-testid": `config-card-details-${J}-props`
|
|
3225
3225
|
}, [
|
|
3226
|
-
|
|
3227
|
-
(d(!0),
|
|
3226
|
+
J !== "basic" ? (d(), $("div", xl, M(J === "advanced" ? f(i)("baseConfigCard.sections.advanced") : f(i)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
3227
|
+
(d(!0), $(me, null, pe(k.value[J], (X) => (d(), R(kt, {
|
|
3228
3228
|
key: X.key,
|
|
3229
3229
|
item: X
|
|
3230
3230
|
}, ke({
|
|
3231
|
-
label:
|
|
3232
|
-
Z(
|
|
3231
|
+
label: g(() => [
|
|
3232
|
+
Z(h.$slots, `${X.key}-label`, { row: X }, void 0, !0)
|
|
3233
3233
|
]),
|
|
3234
|
-
[X.key]:
|
|
3235
|
-
Z(
|
|
3234
|
+
[X.key]: g(({ rowValue: ue }) => [
|
|
3235
|
+
Z(h.$slots, X.key, {
|
|
3236
3236
|
row: X,
|
|
3237
3237
|
rowValue: ue
|
|
3238
3238
|
}, void 0, !0)
|
|
3239
3239
|
]),
|
|
3240
3240
|
_: 2
|
|
3241
3241
|
}, [
|
|
3242
|
-
|
|
3242
|
+
v(X) ? {
|
|
3243
3243
|
name: "label-tooltip",
|
|
3244
|
-
fn:
|
|
3245
|
-
Z(
|
|
3244
|
+
fn: g(() => [
|
|
3245
|
+
Z(h.$slots, `${X.key}-label-tooltip`, { row: X }, void 0, !0)
|
|
3246
3246
|
]),
|
|
3247
3247
|
key: "0"
|
|
3248
3248
|
} : void 0
|
|
@@ -3254,10 +3254,10 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3254
3254
|
}, [
|
|
3255
3255
|
e.hideTitle ? void 0 : {
|
|
3256
3256
|
name: "title",
|
|
3257
|
-
fn:
|
|
3258
|
-
|
|
3259
|
-
Z(
|
|
3260
|
-
|
|
3257
|
+
fn: g(() => [
|
|
3258
|
+
B("div", kl, [
|
|
3259
|
+
Z(h.$slots, "title", {}, () => [
|
|
3260
|
+
Y(M(f(i)("baseConfigCard.title")), 1)
|
|
3261
3261
|
], !0)
|
|
3262
3262
|
])
|
|
3263
3263
|
]),
|
|
@@ -3266,10 +3266,10 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3266
3266
|
]), 1024);
|
|
3267
3267
|
};
|
|
3268
3268
|
}
|
|
3269
|
-
}),
|
|
3269
|
+
}), jl = /* @__PURE__ */ ge(Tl, [["__scopeId", "data-v-068b819b"]]), $l = {
|
|
3270
3270
|
class: "form-actions",
|
|
3271
3271
|
"data-testid": "form-actions"
|
|
3272
|
-
}, Ol = /* @__PURE__ */ te({
|
|
3272
|
+
}, Ml = { key: 0 }, Ol = /* @__PURE__ */ te({
|
|
3273
3273
|
__name: "EntityBaseForm",
|
|
3274
3274
|
props: {
|
|
3275
3275
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3326,17 +3326,19 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3326
3326
|
var t;
|
|
3327
3327
|
const r = n, a = e, o = ht(), { i18n: { t: i } } = oe.useI18n(), { getMessageFromError: l } = oe.useErrors(), { axiosInstance: s } = oe.useAxios({
|
|
3328
3328
|
headers: (t = a.config) == null ? void 0 : t.requestHeaders
|
|
3329
|
-
}), u =
|
|
3330
|
-
var
|
|
3331
|
-
let
|
|
3332
|
-
return a.config.app === "konnect" ?
|
|
3333
|
-
}),
|
|
3334
|
-
|
|
3335
|
-
}, b = () => {
|
|
3336
|
-
r("cancel");
|
|
3329
|
+
}), u = N(!1), p = N(!1), c = N(""), y = j(() => a.canSubmit === !1 || a.isReadonly), m = N(!1), I = j(() => {
|
|
3330
|
+
var k, T;
|
|
3331
|
+
let v = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3332
|
+
return a.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((k = a.config) == null ? void 0 : k.controlPlaneId) || "") : a.config.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, (T = a.config) != null && T.workspace ? `/${a.config.workspace}` : "")), a.editId ? (v = v.replace(/{id}/gi, a.editId), v) : (v = v.replace(/\/{id}/gi, ""), v);
|
|
3333
|
+
}), b = () => {
|
|
3334
|
+
m.value = !m.value;
|
|
3337
3335
|
}, A = () => {
|
|
3336
|
+
a.config.cancelRoute ? o.push(a.config.cancelRoute) : C();
|
|
3337
|
+
}, C = () => {
|
|
3338
|
+
r("cancel");
|
|
3339
|
+
}, w = () => {
|
|
3338
3340
|
y.value || r("submit");
|
|
3339
|
-
},
|
|
3341
|
+
}, G = N([
|
|
3340
3342
|
{
|
|
3341
3343
|
title: i("baseForm.configuration.yaml"),
|
|
3342
3344
|
hash: "#yaml"
|
|
@@ -3346,138 +3348,132 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3346
3348
|
hash: "#json"
|
|
3347
3349
|
}
|
|
3348
3350
|
]);
|
|
3349
|
-
return be(() => u.value, (
|
|
3350
|
-
r("loading",
|
|
3351
|
+
return be(() => u.value, (k) => {
|
|
3352
|
+
r("loading", k);
|
|
3351
3353
|
}, { immediate: !0 }), yt(async () => {
|
|
3352
3354
|
if (a.editId)
|
|
3353
3355
|
try {
|
|
3354
3356
|
p.value = !1, u.value = !0;
|
|
3355
|
-
const { data:
|
|
3356
|
-
r("fetch:success",
|
|
3357
|
-
} catch (
|
|
3358
|
-
const
|
|
3359
|
-
c.value =
|
|
3357
|
+
const { data: k } = await s.get(I.value);
|
|
3358
|
+
r("fetch:success", k);
|
|
3359
|
+
} catch (k) {
|
|
3360
|
+
const T = l(k);
|
|
3361
|
+
c.value = T.startsWith("code") ? i("baseForm.errors.edit") : T, p.value = !0, r("fetch:error", k);
|
|
3360
3362
|
} finally {
|
|
3361
3363
|
u.value = !1;
|
|
3362
3364
|
}
|
|
3363
|
-
}), (
|
|
3364
|
-
const
|
|
3365
|
-
return d(),
|
|
3366
|
-
default:
|
|
3367
|
-
u.value ? (d(),
|
|
3365
|
+
}), (k, T) => {
|
|
3366
|
+
const v = U("KSkeleton"), L = U("KEmptyState"), F = U("KAlert"), h = U("KButton"), _ = U("KTabs"), q = U("KSlideout"), D = U("KCard");
|
|
3367
|
+
return d(), R(D, { class: "kong-ui-entity-base-form" }, {
|
|
3368
|
+
default: g(() => [
|
|
3369
|
+
u.value ? (d(), R(v, {
|
|
3368
3370
|
key: 0,
|
|
3369
3371
|
type: "form"
|
|
3370
|
-
})) : p.value ? (d(),
|
|
3372
|
+
})) : p.value ? (d(), R(L, {
|
|
3371
3373
|
key: 1,
|
|
3372
3374
|
"cta-text": f(i)("baseForm.actions.back"),
|
|
3373
3375
|
"data-testid": "form-fetch-error",
|
|
3374
|
-
"handle-click":
|
|
3376
|
+
"handle-click": A,
|
|
3375
3377
|
"is-error": !0
|
|
3376
3378
|
}, {
|
|
3377
|
-
message:
|
|
3378
|
-
|
|
3379
|
+
message: g(() => [
|
|
3380
|
+
B("h3", null, M(c.value), 1)
|
|
3379
3381
|
]),
|
|
3380
3382
|
_: 1
|
|
3381
|
-
}, 8, ["cta-text"])) : (d(),
|
|
3383
|
+
}, 8, ["cta-text"])) : (d(), $("form", {
|
|
3382
3384
|
key: 2,
|
|
3383
3385
|
"data-testid": "form-content",
|
|
3384
|
-
onReset:
|
|
3385
|
-
onSubmit:
|
|
3386
|
+
onReset: Ge(C, ["prevent"]),
|
|
3387
|
+
onSubmit: Ge(w, ["prevent"])
|
|
3386
3388
|
}, [
|
|
3387
|
-
Z(
|
|
3388
|
-
e.errorMessage ? (d(),
|
|
3389
|
+
Z(k.$slots, "default", {}, void 0, !0),
|
|
3390
|
+
e.errorMessage ? (d(), R(F, {
|
|
3389
3391
|
key: 0,
|
|
3390
3392
|
"alert-message": e.errorMessage,
|
|
3391
3393
|
appearance: "danger",
|
|
3392
3394
|
"data-testid": "form-error"
|
|
3393
|
-
}, null, 8, ["alert-message"])) :
|
|
3394
|
-
|
|
3395
|
-
Z(
|
|
3396
|
-
e.config.jsonYamlMilestone2Enabled ? (d(),
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
j(v, {
|
|
3410
|
-
"close-button-alignment": "end",
|
|
3411
|
-
"data-testid": "form-view-configuration-slideout",
|
|
3412
|
-
"has-overlay": !1,
|
|
3413
|
-
"is-visible": R.value,
|
|
3414
|
-
"prevent-close-on-blur": "",
|
|
3415
|
-
title: f(i)("baseForm.configuration.title"),
|
|
3416
|
-
type: "button",
|
|
3417
|
-
onClose: S
|
|
3418
|
-
}, {
|
|
3419
|
-
default: m(() => [
|
|
3420
|
-
N("div", null, $(f(i)("baseForm.configuration.message")), 1),
|
|
3421
|
-
j(E, {
|
|
3422
|
-
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3423
|
-
tabs: C.value
|
|
3424
|
-
}, {
|
|
3425
|
-
json: m(() => [
|
|
3426
|
-
j(wn, {
|
|
3427
|
-
config: e.config,
|
|
3428
|
-
"fetcher-url": g.value,
|
|
3429
|
-
"json-record": a.formFields,
|
|
3430
|
-
"request-method": a.editId ? "put" : "post"
|
|
3431
|
-
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3432
|
-
]),
|
|
3433
|
-
yaml: m(() => [
|
|
3434
|
-
j(cr, {
|
|
3435
|
-
"yaml-record": a.formFields
|
|
3436
|
-
}, null, 8, ["yaml-record"])
|
|
3437
|
-
]),
|
|
3438
|
-
_: 1
|
|
3439
|
-
}, 8, ["tabs"])
|
|
3440
|
-
]),
|
|
3441
|
-
_: 2
|
|
3442
|
-
}, 1032, ["is-visible", "title", "onClose"])
|
|
3443
|
-
])
|
|
3444
|
-
]),
|
|
3445
|
-
_: 1
|
|
3446
|
-
})) : z("", !0),
|
|
3447
|
-
j(U, {
|
|
3395
|
+
}, null, 8, ["alert-message"])) : H("", !0),
|
|
3396
|
+
B("div", $l, [
|
|
3397
|
+
Z(k.$slots, "form-actions", {}, () => [
|
|
3398
|
+
e.config.jsonYamlMilestone2Enabled ? (d(), $("div", Ml, [
|
|
3399
|
+
O(h, {
|
|
3400
|
+
appearance: "tertiary",
|
|
3401
|
+
"data-testid": "form-view-configuration",
|
|
3402
|
+
onClick: T[0] || (T[0] = (S) => b())
|
|
3403
|
+
}, {
|
|
3404
|
+
default: g(() => [
|
|
3405
|
+
Y(M(f(i)("baseForm.actions.viewConfiguration")), 1)
|
|
3406
|
+
]),
|
|
3407
|
+
_: 1
|
|
3408
|
+
})
|
|
3409
|
+
])) : H("", !0),
|
|
3410
|
+
O(h, {
|
|
3448
3411
|
appearance: "secondary",
|
|
3449
3412
|
"data-testid": "form-cancel",
|
|
3450
3413
|
disabled: e.isReadonly,
|
|
3451
3414
|
type: "reset"
|
|
3452
3415
|
}, {
|
|
3453
|
-
default:
|
|
3454
|
-
|
|
3416
|
+
default: g(() => [
|
|
3417
|
+
Y(M(f(i)("baseForm.actions.cancel")), 1)
|
|
3455
3418
|
]),
|
|
3456
3419
|
_: 1
|
|
3457
3420
|
}, 8, ["disabled"]),
|
|
3458
|
-
|
|
3421
|
+
O(h, {
|
|
3459
3422
|
appearance: "primary",
|
|
3460
3423
|
"data-testid": "form-submit",
|
|
3461
3424
|
disabled: y.value,
|
|
3462
3425
|
type: "submit"
|
|
3463
3426
|
}, {
|
|
3464
|
-
default:
|
|
3465
|
-
|
|
3427
|
+
default: g(() => [
|
|
3428
|
+
Y(M(f(i)("baseForm.actions.save")), 1)
|
|
3466
3429
|
]),
|
|
3467
3430
|
_: 1
|
|
3468
3431
|
}, 8, ["disabled"])
|
|
3469
3432
|
], !0)
|
|
3470
3433
|
])
|
|
3471
|
-
], 32))
|
|
3434
|
+
], 32)),
|
|
3435
|
+
O(q, {
|
|
3436
|
+
"close-button-alignment": "end",
|
|
3437
|
+
"data-testid": "form-view-configuration-slideout",
|
|
3438
|
+
"has-overlay": !1,
|
|
3439
|
+
"is-visible": m.value,
|
|
3440
|
+
"prevent-close-on-blur": "",
|
|
3441
|
+
title: f(i)("baseForm.configuration.title"),
|
|
3442
|
+
onClose: T[1] || (T[1] = (S) => b())
|
|
3443
|
+
}, {
|
|
3444
|
+
default: g(() => [
|
|
3445
|
+
B("div", null, M(f(i)("baseForm.configuration.message")), 1),
|
|
3446
|
+
O(_, {
|
|
3447
|
+
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3448
|
+
tabs: G.value
|
|
3449
|
+
}, {
|
|
3450
|
+
json: g(() => [
|
|
3451
|
+
O(wn, {
|
|
3452
|
+
config: e.config,
|
|
3453
|
+
"fetcher-url": I.value,
|
|
3454
|
+
"json-record": a.formFields,
|
|
3455
|
+
"request-method": a.editId ? "put" : "post"
|
|
3456
|
+
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3457
|
+
]),
|
|
3458
|
+
yaml: g(() => [
|
|
3459
|
+
O(cr, {
|
|
3460
|
+
"yaml-record": a.formFields
|
|
3461
|
+
}, null, 8, ["yaml-record"])
|
|
3462
|
+
]),
|
|
3463
|
+
_: 1
|
|
3464
|
+
}, 8, ["tabs"])
|
|
3465
|
+
]),
|
|
3466
|
+
_: 1
|
|
3467
|
+
}, 8, ["is-visible", "title"])
|
|
3472
3468
|
]),
|
|
3473
3469
|
_: 3
|
|
3474
3470
|
});
|
|
3475
3471
|
};
|
|
3476
3472
|
}
|
|
3477
|
-
}),
|
|
3473
|
+
}), El = /* @__PURE__ */ ge(Ol, [["__scopeId", "data-v-41712e71"]]), Fl = {
|
|
3478
3474
|
key: 0,
|
|
3479
3475
|
"data-testid": "first-col"
|
|
3480
|
-
},
|
|
3476
|
+
}, Nl = /* @__PURE__ */ te({
|
|
3481
3477
|
__name: "EntityBaseTableCell",
|
|
3482
3478
|
props: {
|
|
3483
3479
|
keyName: {
|
|
@@ -3490,13 +3486,13 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3490
3486
|
}
|
|
3491
3487
|
},
|
|
3492
3488
|
setup(e) {
|
|
3493
|
-
const n = e, t =
|
|
3489
|
+
const n = e, t = j(() => {
|
|
3494
3490
|
var b;
|
|
3495
3491
|
return ((b = n.rowEl) == null ? void 0 : b.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3496
|
-
}), r =
|
|
3492
|
+
}), r = j(() => {
|
|
3497
3493
|
var b;
|
|
3498
3494
|
return ((b = t.value) == null ? void 0 : b.querySelector('[data-testid="first-col"]')) || null;
|
|
3499
|
-
}), a =
|
|
3495
|
+
}), a = j(() => {
|
|
3500
3496
|
var b, A;
|
|
3501
3497
|
const C = (b = n.rowEl) == null ? void 0 : b.querySelectorAll("td");
|
|
3502
3498
|
return C ? ((A = C[0]) == null ? void 0 : A.getAttribute("data-testid")) === n.keyName : !1;
|
|
@@ -3507,7 +3503,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3507
3503
|
}, l = () => {
|
|
3508
3504
|
var b, A, C;
|
|
3509
3505
|
u.value = ((b = r.value) == null ? void 0 : b.getBoundingClientRect().width) || 0, p.value = ((A = t.value) == null ? void 0 : A.clientWidth) || 0, c.value = ((C = s.value) == null ? void 0 : C.innerText) || "";
|
|
3510
|
-
}, s =
|
|
3506
|
+
}, s = N({}), u = N(0), p = N(0), c = N(""), y = j(() => [r.value, t.value]), m = be(
|
|
3511
3507
|
y,
|
|
3512
3508
|
(b) => {
|
|
3513
3509
|
if (a.value && (i(), "ResizeObserver" in window && window)) {
|
|
@@ -3521,25 +3517,25 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3521
3517
|
}
|
|
3522
3518
|
},
|
|
3523
3519
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3524
|
-
),
|
|
3520
|
+
), I = j(() => a.value ? u.value > p.value : !1);
|
|
3525
3521
|
return kr(() => {
|
|
3526
3522
|
l();
|
|
3527
3523
|
}), wr(() => {
|
|
3528
|
-
|
|
3524
|
+
m();
|
|
3529
3525
|
}), (b, A) => {
|
|
3530
|
-
const C =
|
|
3531
|
-
return d(),
|
|
3526
|
+
const C = U("KTooltip");
|
|
3527
|
+
return d(), $("span", {
|
|
3532
3528
|
ref_key: "contentRef",
|
|
3533
3529
|
ref: s,
|
|
3534
3530
|
class: "content-wrapper"
|
|
3535
3531
|
}, [
|
|
3536
|
-
a.value ? (d(),
|
|
3537
|
-
|
|
3538
|
-
label:
|
|
3532
|
+
a.value ? (d(), $("span", Fl, [
|
|
3533
|
+
O(C, {
|
|
3534
|
+
label: I.value ? c.value : "",
|
|
3539
3535
|
"max-width": "300",
|
|
3540
3536
|
placement: "bottomStart"
|
|
3541
3537
|
}, {
|
|
3542
|
-
default:
|
|
3538
|
+
default: g(() => [
|
|
3543
3539
|
Z(b.$slots, "default", {}, void 0, !0)
|
|
3544
3540
|
]),
|
|
3545
3541
|
_: 3
|
|
@@ -3548,10 +3544,10 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3548
3544
|
], 512);
|
|
3549
3545
|
};
|
|
3550
3546
|
}
|
|
3551
|
-
}),
|
|
3547
|
+
}), ql = /* @__PURE__ */ ge(Nl, [["__scopeId", "data-v-e42a20c9"]]), Kl = { class: "toolbar-container" }, Bl = {
|
|
3552
3548
|
key: 0,
|
|
3553
3549
|
class: "toolbar-button-container"
|
|
3554
|
-
},
|
|
3550
|
+
}, Ll = ["data-testid"], Ul = /* @__PURE__ */ te({
|
|
3555
3551
|
__name: "EntityBaseTable",
|
|
3556
3552
|
props: {
|
|
3557
3553
|
// table header configuration
|
|
@@ -3661,72 +3657,72 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3661
3657
|
},
|
|
3662
3658
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3663
3659
|
setup(e, { emit: n }) {
|
|
3664
|
-
const t = e, r = n, { i18n: { t: a } } = oe.useI18n(), o =
|
|
3665
|
-
var
|
|
3660
|
+
const t = e, r = n, { i18n: { t: a } } = oe.useI18n(), o = j(() => {
|
|
3661
|
+
var T, v;
|
|
3666
3662
|
return typeof t.errorMessage == "string" ? {
|
|
3667
3663
|
hasError: !!t.errorMessage,
|
|
3668
3664
|
title: t.errorMessage,
|
|
3669
3665
|
message: void 0
|
|
3670
3666
|
} : {
|
|
3671
3667
|
hasError: !!t.errorMessage,
|
|
3672
|
-
title: (
|
|
3673
|
-
message: (
|
|
3668
|
+
title: (T = t.errorMessage) == null ? void 0 : T.title,
|
|
3669
|
+
message: (v = t.errorMessage) == null ? void 0 : v.message
|
|
3674
3670
|
};
|
|
3675
|
-
}), i =
|
|
3676
|
-
const
|
|
3677
|
-
return Object.keys(t.tableHeaders).forEach((
|
|
3678
|
-
const
|
|
3679
|
-
|
|
3680
|
-
label:
|
|
3681
|
-
key:
|
|
3682
|
-
sortable:
|
|
3671
|
+
}), i = j(() => t.cacheIdentifier || t.preferencesStorageKey), l = (T) => T.hasData || !!t.query, s = j(() => {
|
|
3672
|
+
const T = [];
|
|
3673
|
+
return Object.keys(t.tableHeaders).forEach((v) => {
|
|
3674
|
+
const L = t.tableHeaders[v];
|
|
3675
|
+
T.push({
|
|
3676
|
+
label: L.label ?? v,
|
|
3677
|
+
key: v,
|
|
3678
|
+
sortable: L.sortable ?? !1
|
|
3683
3679
|
});
|
|
3684
|
-
}), t.enableEntityActions &&
|
|
3680
|
+
}), t.enableEntityActions && T.push({
|
|
3685
3681
|
key: "actions",
|
|
3686
3682
|
hideLabel: !0
|
|
3687
|
-
}),
|
|
3688
|
-
}), u = (
|
|
3689
|
-
"data-rowid":
|
|
3690
|
-
"data-testid":
|
|
3691
|
-
...t.rowAttributes(
|
|
3692
|
-
}), p =
|
|
3693
|
-
var
|
|
3694
|
-
return (
|
|
3695
|
-
}, y = (
|
|
3696
|
-
const
|
|
3697
|
-
"data-testid":
|
|
3698
|
-
...t.cellAttributes(
|
|
3683
|
+
}), T;
|
|
3684
|
+
}), u = (T) => ({
|
|
3685
|
+
"data-rowid": T.id,
|
|
3686
|
+
"data-testid": T.name,
|
|
3687
|
+
...t.rowAttributes(T)
|
|
3688
|
+
}), p = N({}), c = (T) => {
|
|
3689
|
+
var v;
|
|
3690
|
+
return (v = p.value) == null ? void 0 : v.$el.querySelector(`[data-rowid="${T.id}"]`);
|
|
3691
|
+
}, y = (T) => {
|
|
3692
|
+
const v = {
|
|
3693
|
+
"data-testid": T.headerKey,
|
|
3694
|
+
...t.cellAttributes(T)
|
|
3699
3695
|
};
|
|
3700
|
-
return
|
|
3696
|
+
return T.colIndex === 0 && (v.style = {
|
|
3701
3697
|
maxWidth: "250px",
|
|
3702
3698
|
overflowX: "hidden",
|
|
3703
3699
|
textOverflow: "ellipsis"
|
|
3704
|
-
}),
|
|
3705
|
-
},
|
|
3706
|
-
r("empty-state-cta-clicked"),
|
|
3707
|
-
},
|
|
3700
|
+
}), v;
|
|
3701
|
+
}, m = () => {
|
|
3702
|
+
r("empty-state-cta-clicked"), I();
|
|
3703
|
+
}, I = () => {
|
|
3708
3704
|
r("clear-search-input");
|
|
3709
|
-
}, b =
|
|
3710
|
-
r("click:row",
|
|
3711
|
-
}), A = (
|
|
3712
|
-
r("sort",
|
|
3713
|
-
}, { setTablePreferences: C, getTablePreferences:
|
|
3714
|
-
const
|
|
3705
|
+
}, b = j(() => t.disableRowClick ? void 0 : (T, v) => {
|
|
3706
|
+
r("click:row", v);
|
|
3707
|
+
}), A = (T) => {
|
|
3708
|
+
r("sort", T);
|
|
3709
|
+
}, { setTablePreferences: C, getTablePreferences: w } = Mr(), G = j(() => {
|
|
3710
|
+
const T = w(t.preferencesStorageKey);
|
|
3715
3711
|
return {
|
|
3716
3712
|
...t.initialFetcherParams,
|
|
3717
|
-
...
|
|
3713
|
+
...T
|
|
3718
3714
|
};
|
|
3719
|
-
}), k = (
|
|
3720
|
-
t.preferencesStorageKey && C(t.preferencesStorageKey,
|
|
3715
|
+
}), k = (T) => {
|
|
3716
|
+
t.preferencesStorageKey && C(t.preferencesStorageKey, T);
|
|
3721
3717
|
};
|
|
3722
|
-
return (
|
|
3723
|
-
const
|
|
3724
|
-
return d(),
|
|
3718
|
+
return (T, v) => {
|
|
3719
|
+
const L = U("KIcon"), F = U("KButton"), h = U("KDropdown"), _ = U("KTable"), q = U("KCard");
|
|
3720
|
+
return d(), R(q, {
|
|
3725
3721
|
class: "kong-ui-entity-base-table",
|
|
3726
3722
|
title: e.title
|
|
3727
3723
|
}, {
|
|
3728
|
-
default:
|
|
3729
|
-
|
|
3724
|
+
default: g(() => [
|
|
3725
|
+
O(_, {
|
|
3730
3726
|
ref_key: "tableRefs",
|
|
3731
3727
|
ref: p,
|
|
3732
3728
|
"cache-identifier": i.value,
|
|
@@ -3748,51 +3744,51 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3748
3744
|
"has-error": o.value.hasError,
|
|
3749
3745
|
headers: s.value,
|
|
3750
3746
|
"hide-pagination-when-optional": "",
|
|
3751
|
-
"initial-fetcher-params":
|
|
3747
|
+
"initial-fetcher-params": G.value,
|
|
3752
3748
|
"is-loading": e.isLoading,
|
|
3753
3749
|
"pagination-type": e.paginationType,
|
|
3754
3750
|
"row-attrs": u,
|
|
3755
3751
|
"search-input": e.query,
|
|
3756
|
-
onKtableEmptyStateCtaClicked:
|
|
3752
|
+
onKtableEmptyStateCtaClicked: m,
|
|
3757
3753
|
"onRow:click": b.value,
|
|
3758
|
-
onSort:
|
|
3754
|
+
onSort: v[0] || (v[0] = (D) => A(D)),
|
|
3759
3755
|
"onUpdate:tablePreferences": k
|
|
3760
3756
|
}, ke({
|
|
3761
|
-
toolbar:
|
|
3762
|
-
|
|
3763
|
-
Z(
|
|
3764
|
-
|
|
3765
|
-
Z(
|
|
3766
|
-
])) :
|
|
3757
|
+
toolbar: g(({ state: D }) => [
|
|
3758
|
+
Be(B("div", Kl, [
|
|
3759
|
+
Z(T.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3760
|
+
T.$slots["toolbar-button"] ? (d(), $("div", Bl, [
|
|
3761
|
+
Z(T.$slots, "toolbar-button", {}, void 0, !0)
|
|
3762
|
+
])) : H("", !0)
|
|
3767
3763
|
], 512), [
|
|
3768
|
-
[Le, l(
|
|
3764
|
+
[Le, l(D)]
|
|
3769
3765
|
])
|
|
3770
3766
|
]),
|
|
3771
|
-
actions:
|
|
3772
|
-
|
|
3767
|
+
actions: g(({ row: D, rowKey: S, rowValue: K }) => [
|
|
3768
|
+
B("div", {
|
|
3773
3769
|
class: "actions-container",
|
|
3774
|
-
"data-testid":
|
|
3770
|
+
"data-testid": D.name
|
|
3775
3771
|
}, [
|
|
3776
|
-
|
|
3772
|
+
O(h, {
|
|
3777
3773
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3778
3774
|
width: e.dropdownMenuWidth
|
|
3779
3775
|
}, {
|
|
3780
|
-
items:
|
|
3781
|
-
Z(
|
|
3782
|
-
row:
|
|
3776
|
+
items: g(() => [
|
|
3777
|
+
Z(T.$slots, "actions", {
|
|
3778
|
+
row: D,
|
|
3783
3779
|
rowKey: S,
|
|
3784
|
-
rowValue:
|
|
3780
|
+
rowValue: K
|
|
3785
3781
|
}, void 0, !0)
|
|
3786
3782
|
]),
|
|
3787
|
-
default:
|
|
3788
|
-
|
|
3783
|
+
default: g(() => [
|
|
3784
|
+
O(F, {
|
|
3789
3785
|
class: "actions-trigger",
|
|
3790
3786
|
"data-testid": "overflow-actions-button",
|
|
3791
3787
|
size: "small"
|
|
3792
3788
|
}, {
|
|
3793
|
-
icon:
|
|
3794
|
-
|
|
3795
|
-
color: f(
|
|
3789
|
+
icon: g(() => [
|
|
3790
|
+
O(L, {
|
|
3791
|
+
color: f(Ia),
|
|
3796
3792
|
icon: "more",
|
|
3797
3793
|
size: "16"
|
|
3798
3794
|
}, null, 8, ["color"])
|
|
@@ -3802,24 +3798,24 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3802
3798
|
]),
|
|
3803
3799
|
_: 2
|
|
3804
3800
|
}, 1032, ["width"])
|
|
3805
|
-
], 8,
|
|
3801
|
+
], 8, Ll)
|
|
3806
3802
|
]),
|
|
3807
3803
|
_: 2
|
|
3808
3804
|
}, [
|
|
3809
|
-
pe(e.tableHeaders, (
|
|
3805
|
+
pe(e.tableHeaders, (D, S) => ({
|
|
3810
3806
|
name: S,
|
|
3811
|
-
fn:
|
|
3812
|
-
|
|
3807
|
+
fn: g(({ row: K, rowKey: P, rowValue: V }) => [
|
|
3808
|
+
O(ql, {
|
|
3813
3809
|
"key-name": String(S),
|
|
3814
|
-
"row-el": c(
|
|
3810
|
+
"row-el": c(K)
|
|
3815
3811
|
}, {
|
|
3816
|
-
default:
|
|
3817
|
-
Z(
|
|
3818
|
-
row:
|
|
3819
|
-
rowKey:
|
|
3820
|
-
rowValue:
|
|
3812
|
+
default: g(() => [
|
|
3813
|
+
Z(T.$slots, S, {
|
|
3814
|
+
row: K,
|
|
3815
|
+
rowKey: P,
|
|
3816
|
+
rowValue: V
|
|
3821
3817
|
}, () => [
|
|
3822
|
-
|
|
3818
|
+
Y(M(V), 1)
|
|
3823
3819
|
], !0)
|
|
3824
3820
|
]),
|
|
3825
3821
|
_: 2
|
|
@@ -3832,10 +3828,10 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3832
3828
|
}, 8, ["title"]);
|
|
3833
3829
|
};
|
|
3834
3830
|
}
|
|
3835
|
-
}),
|
|
3831
|
+
}), Pl = /* @__PURE__ */ ge(Ul, [["__scopeId", "data-v-57b5a97b"]]), Dl = {
|
|
3836
3832
|
key: 0,
|
|
3837
3833
|
class: "kong-ui-entity-delete-error"
|
|
3838
|
-
},
|
|
3834
|
+
}, Rl = {
|
|
3839
3835
|
key: 1,
|
|
3840
3836
|
class: "description"
|
|
3841
3837
|
}, Vl = /* @__PURE__ */ te({
|
|
@@ -3877,14 +3873,14 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3877
3873
|
},
|
|
3878
3874
|
emits: ["cancel", "proceed"],
|
|
3879
3875
|
setup(e, { emit: n }) {
|
|
3880
|
-
const { i18nT: t } = oe.useI18n(), r = e, a = n, o =
|
|
3876
|
+
const { i18nT: t } = oe.useI18n(), r = e, a = n, o = j(() => r.needConfirm ? r.entityName : ""), i = () => {
|
|
3881
3877
|
a("cancel");
|
|
3882
3878
|
}, l = () => {
|
|
3883
3879
|
a("proceed");
|
|
3884
3880
|
};
|
|
3885
3881
|
return (s, u) => {
|
|
3886
|
-
const p =
|
|
3887
|
-
return d(),
|
|
3882
|
+
const p = U("KAlert"), c = U("KPrompt");
|
|
3883
|
+
return d(), R(c, {
|
|
3888
3884
|
"action-button-text": "Yes, delete",
|
|
3889
3885
|
"action-pending": e.actionPending,
|
|
3890
3886
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3895,44 +3891,44 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3895
3891
|
onCanceled: i,
|
|
3896
3892
|
onProceed: l
|
|
3897
3893
|
}, {
|
|
3898
|
-
"body-content":
|
|
3899
|
-
e.error ? (d(),
|
|
3900
|
-
|
|
3901
|
-
alertMessage:
|
|
3902
|
-
|
|
3894
|
+
"body-content": g(() => [
|
|
3895
|
+
e.error ? (d(), $("div", Dl, [
|
|
3896
|
+
O(p, { appearance: "danger" }, {
|
|
3897
|
+
alertMessage: g(() => [
|
|
3898
|
+
Y(M(e.error), 1)
|
|
3903
3899
|
]),
|
|
3904
3900
|
_: 1
|
|
3905
3901
|
})
|
|
3906
|
-
])) :
|
|
3907
|
-
|
|
3902
|
+
])) : H("", !0),
|
|
3903
|
+
O(f(t), {
|
|
3908
3904
|
class: "message",
|
|
3909
3905
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3910
3906
|
tag: "p"
|
|
3911
3907
|
}, ke({
|
|
3912
|
-
entityType:
|
|
3913
|
-
|
|
3908
|
+
entityType: g(() => [
|
|
3909
|
+
Y(M(r.entityType), 1)
|
|
3914
3910
|
]),
|
|
3915
3911
|
_: 2
|
|
3916
3912
|
}, [
|
|
3917
3913
|
r.entityName ? {
|
|
3918
3914
|
name: "entityName",
|
|
3919
|
-
fn:
|
|
3920
|
-
|
|
3915
|
+
fn: g(() => [
|
|
3916
|
+
B("strong", null, M(r.entityName), 1)
|
|
3921
3917
|
]),
|
|
3922
3918
|
key: "0"
|
|
3923
3919
|
} : void 0
|
|
3924
3920
|
]), 1032, ["keypath"]),
|
|
3925
|
-
r.description || s.$slots.description ? (d(),
|
|
3921
|
+
r.description || s.$slots.description ? (d(), $("div", Rl, [
|
|
3926
3922
|
Z(s.$slots, "description", {}, () => [
|
|
3927
|
-
|
|
3923
|
+
B("p", null, M(r.description), 1)
|
|
3928
3924
|
], !0)
|
|
3929
|
-
])) :
|
|
3925
|
+
])) : H("", !0)
|
|
3930
3926
|
]),
|
|
3931
3927
|
_: 3
|
|
3932
3928
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3933
3929
|
};
|
|
3934
3930
|
}
|
|
3935
|
-
}),
|
|
3931
|
+
}), Gl = /* @__PURE__ */ ge(Vl, [["__scopeId", "data-v-1c9a2a07"]]), Hl = {
|
|
3936
3932
|
fill: "none",
|
|
3937
3933
|
height: "20",
|
|
3938
3934
|
viewBox: "0 0 20 20",
|
|
@@ -3946,7 +3942,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3946
3942
|
width: "20",
|
|
3947
3943
|
x: "0",
|
|
3948
3944
|
y: "0"
|
|
3949
|
-
},
|
|
3945
|
+
}, Jl = ["fill"], Yl = { mask: "url(#mask0_180_20349)" }, Wl = ["fill"], un = /* @__PURE__ */ te({
|
|
3950
3946
|
__name: "IconFilter",
|
|
3951
3947
|
props: {
|
|
3952
3948
|
color: {
|
|
@@ -3955,26 +3951,26 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3955
3951
|
}
|
|
3956
3952
|
},
|
|
3957
3953
|
setup(e) {
|
|
3958
|
-
return (n, t) => (d(),
|
|
3959
|
-
|
|
3960
|
-
|
|
3954
|
+
return (n, t) => (d(), $("svg", Hl, [
|
|
3955
|
+
B("mask", zl, [
|
|
3956
|
+
B("rect", {
|
|
3961
3957
|
fill: e.color,
|
|
3962
3958
|
height: "20",
|
|
3963
3959
|
width: "20"
|
|
3964
|
-
}, null, 8,
|
|
3960
|
+
}, null, 8, Jl)
|
|
3965
3961
|
]),
|
|
3966
|
-
|
|
3967
|
-
|
|
3962
|
+
B("g", Yl, [
|
|
3963
|
+
B("path", {
|
|
3968
3964
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3969
3965
|
fill: e.color
|
|
3970
|
-
}, null, 8,
|
|
3966
|
+
}, null, 8, Wl)
|
|
3971
3967
|
])
|
|
3972
3968
|
]));
|
|
3973
3969
|
}
|
|
3974
|
-
}),
|
|
3970
|
+
}), Zl = {
|
|
3975
3971
|
key: 1,
|
|
3976
3972
|
class: "kong-ui-entity-filter"
|
|
3977
|
-
},
|
|
3973
|
+
}, Ql = { class: "menu-item-title" }, Xl = { class: "menu-item-indicator" }, es = { class: "menu-item-body" }, ts = ["for"], ns = { class: "menu-item-buttons" }, rs = { class: "filter-clear-button-container" }, as = /* @__PURE__ */ te({
|
|
3978
3974
|
__name: "EntityFilter",
|
|
3979
3975
|
props: {
|
|
3980
3976
|
// filter config, either exact match or fuzzy match
|
|
@@ -3994,21 +3990,21 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
3994
3990
|
},
|
|
3995
3991
|
emits: ["update:modelValue"],
|
|
3996
3992
|
setup(e, { emit: n }) {
|
|
3997
|
-
const { i18n: { t } } = oe.useI18n(), r = e, a = n, o =
|
|
3993
|
+
const { i18n: { t } } = oe.useI18n(), r = e, a = n, o = N(!1), i = N({}), l = j(() => {
|
|
3998
3994
|
const C = [];
|
|
3999
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
4000
|
-
|
|
3995
|
+
return new URLSearchParams(r.modelValue).forEach((w, G) => {
|
|
3996
|
+
w !== "" && C.push(G);
|
|
4001
3997
|
}), C;
|
|
4002
|
-
}), s =
|
|
3998
|
+
}), s = j(() => {
|
|
4003
3999
|
const C = r.config.fields;
|
|
4004
|
-
return Object.keys(C).filter((
|
|
4005
|
-
label: C[
|
|
4006
|
-
value:
|
|
4000
|
+
return Object.keys(C).filter((w) => C[w].searchable).map((w) => ({
|
|
4001
|
+
label: C[w].label || w,
|
|
4002
|
+
value: w
|
|
4007
4003
|
}));
|
|
4008
4004
|
});
|
|
4009
4005
|
be(() => r.modelValue, (C) => {
|
|
4010
|
-
i.value = {}, new URLSearchParams(C).forEach((
|
|
4011
|
-
i.value[
|
|
4006
|
+
i.value = {}, new URLSearchParams(C).forEach((w, G) => {
|
|
4007
|
+
i.value[G] = w;
|
|
4012
4008
|
});
|
|
4013
4009
|
});
|
|
4014
4010
|
const u = () => {
|
|
@@ -4016,15 +4012,15 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4016
4012
|
}, p = (C) => {
|
|
4017
4013
|
a("update:modelValue", C);
|
|
4018
4014
|
}, c = (C) => `filter-${C}`, y = (C) => {
|
|
4019
|
-
var
|
|
4020
|
-
return (((
|
|
4015
|
+
var w, G;
|
|
4016
|
+
return (((G = (w = r.config.schema) == null ? void 0 : w[C]) == null ? void 0 : G.values) ?? []).map((k) => ({
|
|
4021
4017
|
value: k,
|
|
4022
4018
|
label: k
|
|
4023
4019
|
}));
|
|
4024
|
-
},
|
|
4025
|
-
var
|
|
4026
|
-
return ((
|
|
4027
|
-
},
|
|
4020
|
+
}, m = (C) => {
|
|
4021
|
+
var w, G;
|
|
4022
|
+
return ((G = (w = r.config.schema) == null ? void 0 : w[C]) == null ? void 0 : G.type) ?? "text";
|
|
4023
|
+
}, I = (C) => {
|
|
4028
4024
|
i.value = {
|
|
4029
4025
|
...i.value,
|
|
4030
4026
|
[C]: ""
|
|
@@ -4032,12 +4028,12 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4032
4028
|
}, b = () => {
|
|
4033
4029
|
i.value = {}, A(!0);
|
|
4034
4030
|
}, A = (C = !1) => {
|
|
4035
|
-
const
|
|
4036
|
-
C && (o.value = !1), a("update:modelValue", new URLSearchParams(
|
|
4031
|
+
const w = Object.keys(i.value).reduce((G, k) => (i.value[k] && (G[k] = `${i.value[k]}`), G), {});
|
|
4032
|
+
C && (o.value = !1), a("update:modelValue", new URLSearchParams(w).toString());
|
|
4037
4033
|
};
|
|
4038
|
-
return (C,
|
|
4039
|
-
const
|
|
4040
|
-
return e.config.isExactMatch ? (d(),
|
|
4034
|
+
return (C, w) => {
|
|
4035
|
+
const G = U("KInput"), k = U("KButton"), T = U("KSelect"), v = U("KMenuItem"), L = U("KMenu");
|
|
4036
|
+
return e.config.isExactMatch ? (d(), R(G, {
|
|
4041
4037
|
key: 0,
|
|
4042
4038
|
autocomplete: "off",
|
|
4043
4039
|
class: "kong-ui-entity-filter-input",
|
|
@@ -4046,90 +4042,90 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4046
4042
|
placeholder: e.config.placeholder,
|
|
4047
4043
|
"onUpdate:modelValue": p
|
|
4048
4044
|
}, {
|
|
4049
|
-
before:
|
|
4050
|
-
|
|
4045
|
+
before: g(() => [
|
|
4046
|
+
O(un)
|
|
4051
4047
|
]),
|
|
4052
4048
|
_: 1
|
|
4053
|
-
}, 8, ["model-value", "placeholder"])) : (d(),
|
|
4054
|
-
|
|
4049
|
+
}, 8, ["model-value", "placeholder"])) : (d(), $("div", Zl, [
|
|
4050
|
+
O(k, {
|
|
4055
4051
|
appearance: "tertiary",
|
|
4056
4052
|
"data-testid": "filter-button",
|
|
4057
4053
|
onClick: u
|
|
4058
4054
|
}, {
|
|
4059
|
-
default:
|
|
4060
|
-
|
|
4061
|
-
|
|
4055
|
+
default: g(() => [
|
|
4056
|
+
O(un),
|
|
4057
|
+
Y(" " + M(f(t)("filter.filterButtonText")) + " " + M(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
4062
4058
|
]),
|
|
4063
4059
|
_: 1
|
|
4064
4060
|
}),
|
|
4065
|
-
|
|
4061
|
+
Be(B("div", {
|
|
4066
4062
|
class: "kong-ui-entity-filter-backdrop",
|
|
4067
4063
|
onClick: u
|
|
4068
4064
|
}, null, 512), [
|
|
4069
4065
|
[Le, o.value]
|
|
4070
4066
|
]),
|
|
4071
|
-
|
|
4072
|
-
body:
|
|
4073
|
-
(d(!0),
|
|
4074
|
-
key:
|
|
4075
|
-
"data-testid":
|
|
4067
|
+
Be(O(L, { class: "kong-ui-entity-filter-menu" }, {
|
|
4068
|
+
body: g(() => [
|
|
4069
|
+
(d(!0), $(me, null, pe(s.value, (F, h) => (d(), R(v, {
|
|
4070
|
+
key: F.value,
|
|
4071
|
+
"data-testid": F.value,
|
|
4076
4072
|
expandable: "",
|
|
4077
|
-
"last-menu-item":
|
|
4073
|
+
"last-menu-item": h === s.value.length - 1
|
|
4078
4074
|
}, {
|
|
4079
|
-
itemTitle:
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
[Le, l.value.includes(
|
|
4075
|
+
itemTitle: g(() => [
|
|
4076
|
+
B("span", Ql, [
|
|
4077
|
+
Y(M(F.label) + " ", 1),
|
|
4078
|
+
Be(B("span", Xl, null, 512), [
|
|
4079
|
+
[Le, l.value.includes(F.value)]
|
|
4084
4080
|
])
|
|
4085
4081
|
])
|
|
4086
4082
|
]),
|
|
4087
|
-
itemBody:
|
|
4088
|
-
var
|
|
4083
|
+
itemBody: g(() => {
|
|
4084
|
+
var _, q;
|
|
4089
4085
|
return [
|
|
4090
|
-
|
|
4091
|
-
|
|
4086
|
+
B("div", es, [
|
|
4087
|
+
B("label", {
|
|
4092
4088
|
class: "menu-item-label",
|
|
4093
|
-
for: c(
|
|
4094
|
-
},
|
|
4095
|
-
((
|
|
4089
|
+
for: c(F.value)
|
|
4090
|
+
}, M(f(t)("filter.fieldLabel")), 9, ts),
|
|
4091
|
+
((q = (_ = e.config.schema) == null ? void 0 : _[F.value]) == null ? void 0 : q.type) === "select" ? (d(), R(T, {
|
|
4096
4092
|
key: 0,
|
|
4097
|
-
id: c(
|
|
4098
|
-
modelValue: i.value[
|
|
4099
|
-
"onUpdate:modelValue": (
|
|
4093
|
+
id: c(F.value),
|
|
4094
|
+
modelValue: i.value[F.value],
|
|
4095
|
+
"onUpdate:modelValue": (D) => i.value[F.value] = D,
|
|
4100
4096
|
appearance: "select",
|
|
4101
|
-
items: y(
|
|
4097
|
+
items: y(F.value),
|
|
4102
4098
|
placeholder: f(t)("filter.selectPlaceholder")
|
|
4103
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (d(),
|
|
4099
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (d(), R(G, {
|
|
4104
4100
|
key: 1,
|
|
4105
|
-
id: c(
|
|
4106
|
-
modelValue: i.value[
|
|
4107
|
-
"onUpdate:modelValue": (
|
|
4101
|
+
id: c(F.value),
|
|
4102
|
+
modelValue: i.value[F.value],
|
|
4103
|
+
"onUpdate:modelValue": (D) => i.value[F.value] = D,
|
|
4108
4104
|
autocomplete: "off",
|
|
4109
4105
|
placeholder: f(t)("filter.inputPlaceholder"),
|
|
4110
|
-
type:
|
|
4106
|
+
type: m(F.value)
|
|
4111
4107
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4112
4108
|
]),
|
|
4113
|
-
|
|
4114
|
-
|
|
4109
|
+
B("div", ns, [
|
|
4110
|
+
O(k, {
|
|
4115
4111
|
appearance: "tertiary",
|
|
4116
4112
|
"data-testid": "apply-filter",
|
|
4117
4113
|
size: "small",
|
|
4118
|
-
onClick:
|
|
4114
|
+
onClick: w[0] || (w[0] = (D) => A(!0))
|
|
4119
4115
|
}, {
|
|
4120
|
-
default:
|
|
4121
|
-
|
|
4116
|
+
default: g(() => [
|
|
4117
|
+
Y(M(f(t)("filter.applyButtonText")), 1)
|
|
4122
4118
|
]),
|
|
4123
4119
|
_: 1
|
|
4124
4120
|
}),
|
|
4125
|
-
|
|
4121
|
+
O(k, {
|
|
4126
4122
|
appearance: "tertiary",
|
|
4127
4123
|
"data-testid": "clear-filter",
|
|
4128
4124
|
size: "small",
|
|
4129
|
-
onClick: (
|
|
4125
|
+
onClick: (D) => I(F.value)
|
|
4130
4126
|
}, {
|
|
4131
|
-
default:
|
|
4132
|
-
|
|
4127
|
+
default: g(() => [
|
|
4128
|
+
Y(M(f(t)("filter.clearButtonText")), 1)
|
|
4133
4129
|
]),
|
|
4134
4130
|
_: 2
|
|
4135
4131
|
}, 1032, ["onClick"])
|
|
@@ -4139,15 +4135,15 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4139
4135
|
_: 2
|
|
4140
4136
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
4141
4137
|
]),
|
|
4142
|
-
actionButton:
|
|
4143
|
-
|
|
4144
|
-
|
|
4138
|
+
actionButton: g(() => [
|
|
4139
|
+
B("div", rs, [
|
|
4140
|
+
O(k, {
|
|
4145
4141
|
appearance: "tertiary",
|
|
4146
4142
|
size: "small",
|
|
4147
4143
|
onClick: b
|
|
4148
4144
|
}, {
|
|
4149
|
-
default:
|
|
4150
|
-
|
|
4145
|
+
default: g(() => [
|
|
4146
|
+
Y(M(f(t)("filter.clearAllButtonText")), 1)
|
|
4151
4147
|
]),
|
|
4152
4148
|
_: 1
|
|
4153
4149
|
})
|
|
@@ -4160,7 +4156,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4160
4156
|
]));
|
|
4161
4157
|
};
|
|
4162
4158
|
}
|
|
4163
|
-
}),
|
|
4159
|
+
}), os = /* @__PURE__ */ ge(as, [["__scopeId", "data-v-15962ee2"]]), Ve = /* @__PURE__ */ te({
|
|
4164
4160
|
__name: "PermissionsWrapper",
|
|
4165
4161
|
props: {
|
|
4166
4162
|
/**
|
|
@@ -4182,24 +4178,24 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4182
4178
|
}
|
|
4183
4179
|
},
|
|
4184
4180
|
setup(e) {
|
|
4185
|
-
const n = e, t =
|
|
4181
|
+
const n = e, t = N(void 0), r = j(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
4186
4182
|
return be(() => n.authFunction, async () => {
|
|
4187
4183
|
t.value = await n.authFunction();
|
|
4188
4184
|
}, { immediate: !0 }), (a, o) => r.value ? Z(a.$slots, "default", {
|
|
4189
4185
|
key: 0,
|
|
4190
4186
|
isAllowed: t.value
|
|
4191
|
-
}) :
|
|
4187
|
+
}) : H("", !0);
|
|
4192
4188
|
}
|
|
4193
|
-
}),
|
|
4189
|
+
}), is = { class: "form-section-wrapper" }, ls = {
|
|
4194
4190
|
key: 0,
|
|
4195
4191
|
class: "form-section-title"
|
|
4196
|
-
},
|
|
4192
|
+
}, ss = {
|
|
4197
4193
|
key: 1,
|
|
4198
4194
|
class: "form-section-description"
|
|
4199
|
-
},
|
|
4195
|
+
}, us = {
|
|
4200
4196
|
key: 2,
|
|
4201
4197
|
class: "form-section-footer"
|
|
4202
|
-
},
|
|
4198
|
+
}, cs = { class: "form-section-content" }, ds = /* @__PURE__ */ te({
|
|
4203
4199
|
__name: "EntityFormSection",
|
|
4204
4200
|
props: {
|
|
4205
4201
|
title: {
|
|
@@ -4225,37 +4221,37 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4225
4221
|
},
|
|
4226
4222
|
setup(e) {
|
|
4227
4223
|
const n = Qe();
|
|
4228
|
-
return (t, r) => (d(),
|
|
4229
|
-
class:
|
|
4224
|
+
return (t, r) => (d(), $("fieldset", {
|
|
4225
|
+
class: _e(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4230
4226
|
}, [
|
|
4231
|
-
|
|
4232
|
-
e.hideInfoHeader ?
|
|
4227
|
+
B("div", is, [
|
|
4228
|
+
e.hideInfoHeader ? H("", !0) : (d(), $("div", {
|
|
4233
4229
|
key: 0,
|
|
4234
|
-
class:
|
|
4230
|
+
class: _e(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4235
4231
|
}, [
|
|
4236
|
-
e.title ? (d(),
|
|
4237
|
-
e.description || f(n).description ? (d(),
|
|
4232
|
+
e.title ? (d(), $("h4", ls, M(e.title), 1)) : H("", !0),
|
|
4233
|
+
e.description || f(n).description ? (d(), $("div", ss, [
|
|
4238
4234
|
Z(t.$slots, "description", {}, () => [
|
|
4239
|
-
|
|
4235
|
+
B("p", null, M(e.description), 1)
|
|
4240
4236
|
], !0)
|
|
4241
|
-
])) :
|
|
4242
|
-
f(n).footer ? (d(),
|
|
4237
|
+
])) : H("", !0),
|
|
4238
|
+
f(n).footer ? (d(), $("div", us, [
|
|
4243
4239
|
Z(t.$slots, "footer", {}, void 0, !0)
|
|
4244
|
-
])) :
|
|
4240
|
+
])) : H("", !0)
|
|
4245
4241
|
], 2)),
|
|
4246
|
-
|
|
4242
|
+
B("div", cs, [
|
|
4247
4243
|
Z(t.$slots, "default", {}, void 0, !0)
|
|
4248
4244
|
])
|
|
4249
4245
|
])
|
|
4250
4246
|
], 2));
|
|
4251
4247
|
}
|
|
4252
|
-
}),
|
|
4248
|
+
}), ps = /* @__PURE__ */ ge(ds, [["__scopeId", "data-v-3565daa7"]]), { useAxios: Tt, useDeleteUrlBuilder: fs, useErrors: ms, useExternalLinkCreator: Bs, useFetchUrlBuilder: Ls, useFetcher: gs, useDebouncedFilter: ys, useStringHelpers: Us, useHelpers: Ps, useGatewayFeatureSupported: Ds, useTruncationDetector: Rs } = oe, hs = { class: "add-consumer-form-container" }, vs = { class: "add-consumer-form-cta" }, bs = { class: "select-item-label" }, Cs = {
|
|
4253
4249
|
key: 0,
|
|
4254
4250
|
class: "select-item-desc"
|
|
4255
|
-
},
|
|
4251
|
+
}, ks = {
|
|
4256
4252
|
key: 0,
|
|
4257
4253
|
class: "kong-ui-entity-add-consumers-error"
|
|
4258
|
-
},
|
|
4254
|
+
}, ws = { key: 0 }, _s = /* @__PURE__ */ te({
|
|
4259
4255
|
__name: "AddConsumerModal",
|
|
4260
4256
|
props: {
|
|
4261
4257
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4272,17 +4268,17 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4272
4268
|
},
|
|
4273
4269
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4274
4270
|
setup(e, { emit: n }) {
|
|
4275
|
-
var
|
|
4271
|
+
var D;
|
|
4276
4272
|
const { i18n: { t } } = Xe.useI18n(), r = e, a = n, { axiosInstance: o } = Tt({
|
|
4277
|
-
headers: (
|
|
4278
|
-
}), i =
|
|
4273
|
+
headers: (D = r.config) == null ? void 0 : D.requestHeaders
|
|
4274
|
+
}), i = N([]), {
|
|
4279
4275
|
debouncedQueryChange: l,
|
|
4280
4276
|
loading: s,
|
|
4281
4277
|
allRecords: u,
|
|
4282
4278
|
error: p,
|
|
4283
4279
|
loadItems: c,
|
|
4284
4280
|
results: y
|
|
4285
|
-
} =
|
|
4281
|
+
} = ys(
|
|
4286
4282
|
r.config,
|
|
4287
4283
|
Te.list[r.config.app].all,
|
|
4288
4284
|
"",
|
|
@@ -4290,77 +4286,77 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4290
4286
|
fetchedItemsKey: "data",
|
|
4291
4287
|
searchKeys: ["username", "id"]
|
|
4292
4288
|
}
|
|
4293
|
-
),
|
|
4289
|
+
), m = (S) => S, I = j(() => p.value ? t("consumers.errors.general") : ""), b = N(0), A = j(() => u.value === void 0), C = j(() => y.value.map((S) => ({
|
|
4294
4290
|
label: S.username || S.customId,
|
|
4295
4291
|
value: S.id,
|
|
4296
4292
|
selected: i.value.includes(S.id),
|
|
4297
4293
|
data: S
|
|
4298
4294
|
// we need this to determine whether or not to show the description text
|
|
4299
|
-
}))),
|
|
4300
|
-
var
|
|
4301
|
-
const
|
|
4302
|
-
return
|
|
4303
|
-
},
|
|
4304
|
-
|
|
4305
|
-
}, k =
|
|
4295
|
+
}))), w = (S) => {
|
|
4296
|
+
var P;
|
|
4297
|
+
const K = A.value ? y.value.find((V) => V.id === S) : (P = u.value) == null ? void 0 : P.find((V) => V.id === S);
|
|
4298
|
+
return K ? K.username || K.custom_id : S;
|
|
4299
|
+
}, G = () => {
|
|
4300
|
+
v.value = "", k.value = [], _.value = [], a("cancel");
|
|
4301
|
+
}, k = N([]), T = N(!1), v = N(""), L = async () => {
|
|
4306
4302
|
if (!i.value.length) {
|
|
4307
|
-
|
|
4303
|
+
v.value = "", _.value = [], a("cancel");
|
|
4308
4304
|
return;
|
|
4309
4305
|
}
|
|
4310
|
-
|
|
4306
|
+
T.value = !0, v.value = "", k.value = [], _.value = [];
|
|
4311
4307
|
try {
|
|
4312
|
-
const S = i.value.map((
|
|
4313
|
-
let
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
}),
|
|
4308
|
+
const S = i.value.map((V) => h(V)), K = await Promise.allSettled(S);
|
|
4309
|
+
let P = !0;
|
|
4310
|
+
K.forEach((V) => {
|
|
4311
|
+
V.status !== "fulfilled" && (P = !1);
|
|
4312
|
+
}), P ? (k.value = [], _.value = [], a("add:success", i.value), i.value = []) : (k.value.length && a("add:partial-success", k.value), i.value = [], q(K));
|
|
4317
4313
|
} catch {
|
|
4318
|
-
|
|
4314
|
+
v.value = t("consumers.errors.add"), a("error", v.value);
|
|
4319
4315
|
} finally {
|
|
4320
|
-
|
|
4316
|
+
T.value = !1;
|
|
4321
4317
|
}
|
|
4322
|
-
},
|
|
4323
|
-
var
|
|
4318
|
+
}, F = j(() => {
|
|
4319
|
+
var K, P, V, Q;
|
|
4324
4320
|
let S = `${r.config.apiBaseUrl}${Te.list[r.config.app].forConsumerGroup}`;
|
|
4325
|
-
return r.config.app === "konnect" ? S = S.replace(/{controlPlaneId}/gi, ((
|
|
4326
|
-
}),
|
|
4327
|
-
const
|
|
4321
|
+
return r.config.app === "konnect" ? S = S.replace(/{controlPlaneId}/gi, ((K = r.config) == null ? void 0 : K.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((P = r.config) == null ? void 0 : P.consumerGroupId) || "") : r.config.app === "kongManager" && (S = S.replace(/\/{workspace}/gi, (V = r.config) != null && V.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((Q = r.config) == null ? void 0 : Q.consumerGroupId) || "")), S;
|
|
4322
|
+
}), h = async (S) => {
|
|
4323
|
+
const K = {
|
|
4328
4324
|
consumer: S
|
|
4329
4325
|
};
|
|
4330
4326
|
try {
|
|
4331
|
-
const
|
|
4332
|
-
return k.value.push(S),
|
|
4333
|
-
} catch (
|
|
4334
|
-
let
|
|
4335
|
-
return
|
|
4327
|
+
const P = await o.post(F.value, K);
|
|
4328
|
+
return k.value.push(S), P;
|
|
4329
|
+
} catch (P) {
|
|
4330
|
+
let V = `${w(S)} - ${P.message}`;
|
|
4331
|
+
return P.response.status === 409 && (V = `${w(S)} - ${t("consumers.errors.already_added")}`), Promise.reject(Error(V));
|
|
4336
4332
|
}
|
|
4337
|
-
},
|
|
4338
|
-
|
|
4339
|
-
var
|
|
4340
|
-
return (
|
|
4333
|
+
}, _ = N([]), q = (S) => {
|
|
4334
|
+
_.value = S.map((K) => {
|
|
4335
|
+
var P;
|
|
4336
|
+
return (P = K.reason) == null ? void 0 : P.message;
|
|
4341
4337
|
}).filter(Boolean);
|
|
4342
4338
|
};
|
|
4343
4339
|
return be(C, () => {
|
|
4344
4340
|
b.value++;
|
|
4345
4341
|
}, { immediate: !0, deep: !0 }), be(() => r.visible, () => {
|
|
4346
4342
|
r.visible && c();
|
|
4347
|
-
}, { immediate: !0 }), (S,
|
|
4348
|
-
const
|
|
4349
|
-
return d(),
|
|
4350
|
-
"action-pending":
|
|
4343
|
+
}, { immediate: !0 }), (S, K) => {
|
|
4344
|
+
const P = U("KMultiselect"), V = U("KAlert"), Q = U("KPrompt");
|
|
4345
|
+
return d(), R(Q, {
|
|
4346
|
+
"action-pending": T.value,
|
|
4351
4347
|
class: "kong-ui-entities-add-consumers-modal",
|
|
4352
4348
|
"data-testid": "add-consumer-modal",
|
|
4353
4349
|
"is-visible": e.visible,
|
|
4354
4350
|
title: f(t)("consumers.consumer_groups.add.title"),
|
|
4355
|
-
onCanceled:
|
|
4356
|
-
onProceed:
|
|
4351
|
+
onCanceled: G,
|
|
4352
|
+
onProceed: L
|
|
4357
4353
|
}, {
|
|
4358
|
-
"body-content":
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4354
|
+
"body-content": g(() => [
|
|
4355
|
+
B("div", hs, [
|
|
4356
|
+
B("p", vs, M(f(t)("consumers.consumer_groups.add.ctaText")), 1),
|
|
4357
|
+
O(P, {
|
|
4362
4358
|
modelValue: i.value,
|
|
4363
|
-
"onUpdate:modelValue":
|
|
4359
|
+
"onUpdate:modelValue": K[0] || (K[0] = (J) => i.value = J),
|
|
4364
4360
|
autosuggest: "",
|
|
4365
4361
|
"data-testid": "add-consumers-multiselect",
|
|
4366
4362
|
"dropdown-footer-text": A.value ? f(t)("consumers.consumer_groups.add.footer") : void 0,
|
|
@@ -4368,41 +4364,41 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4368
4364
|
label: f(t)("consumers.consumer_groups.add.consumers_label"),
|
|
4369
4365
|
loading: f(s),
|
|
4370
4366
|
placeholder: f(t)("consumers.consumer_groups.add.consumer_placeholder"),
|
|
4371
|
-
readonly:
|
|
4367
|
+
readonly: T.value,
|
|
4372
4368
|
required: "",
|
|
4373
4369
|
width: "100%",
|
|
4374
4370
|
onQueryChange: f(l)
|
|
4375
4371
|
}, {
|
|
4376
|
-
"item-template":
|
|
4377
|
-
|
|
4378
|
-
|
|
4372
|
+
"item-template": g(({ item: J }) => [
|
|
4373
|
+
B("div", bs, M(J.label), 1),
|
|
4374
|
+
m(J).data.username && m(J).data.custom_id ? (d(), $("div", Cs, M(m(J).data.custom_id), 1)) : H("", !0)
|
|
4379
4375
|
]),
|
|
4380
4376
|
_: 1
|
|
4381
4377
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
alertMessage:
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
(d(!0),
|
|
4388
|
-
])) :
|
|
4389
|
-
|
|
4378
|
+
v.value || I.value || _.value.length ? (d(), $("div", ks, [
|
|
4379
|
+
O(V, { appearance: "danger" }, {
|
|
4380
|
+
alertMessage: g(() => [
|
|
4381
|
+
B("p", null, M(f(t)("consumers.errors.add")), 1),
|
|
4382
|
+
_.value.length ? (d(), $("ul", ws, [
|
|
4383
|
+
(d(!0), $(me, null, pe(_.value, (J, X) => (d(), $("li", { key: X }, M(J), 1))), 128))
|
|
4384
|
+
])) : H("", !0),
|
|
4385
|
+
B("div", null, M(v.value || I.value), 1)
|
|
4390
4386
|
]),
|
|
4391
4387
|
_: 1
|
|
4392
4388
|
})
|
|
4393
|
-
])) :
|
|
4389
|
+
])) : H("", !0)
|
|
4394
4390
|
])
|
|
4395
4391
|
]),
|
|
4396
4392
|
_: 1
|
|
4397
4393
|
}, 8, ["action-pending", "is-visible", "title"]);
|
|
4398
4394
|
};
|
|
4399
4395
|
}
|
|
4400
|
-
}),
|
|
4396
|
+
}), jt = (e, n) => {
|
|
4401
4397
|
const t = e.__vccOpts || e;
|
|
4402
4398
|
for (const [r, a] of n)
|
|
4403
4399
|
t[r] = a;
|
|
4404
4400
|
return t;
|
|
4405
|
-
}, Is = /* @__PURE__ */
|
|
4401
|
+
}, Is = /* @__PURE__ */ jt(_s, [["__scopeId", "data-v-68cc6403"]]), As = { class: "kong-ui-entities-consumers-list" }, Ss = { key: 1 }, xs = /* @__PURE__ */ te({
|
|
4406
4402
|
__name: "ConsumerList",
|
|
4407
4403
|
props: {
|
|
4408
4404
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4451,19 +4447,19 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4451
4447
|
var qt;
|
|
4452
4448
|
const t = n, r = e, { i18nT: a, i18n: { t: o } } = Xe.useI18n(), i = ht(), { axiosInstance: l } = Tt({
|
|
4453
4449
|
headers: (qt = r.config) == null ? void 0 : qt.requestHeaders
|
|
4454
|
-
}), s =
|
|
4450
|
+
}), s = N(1), u = j(() => !!r.config.consumerGroupId), p = j(
|
|
4455
4451
|
() => u.value ? "kong-ui-entities-consumers-list-in-group-page" : "kong-ui-entities-consumers-list"
|
|
4456
|
-
), c =
|
|
4452
|
+
), c = j(() => r.config.app !== "kongManager" || !!r.config.disableSorting), y = {
|
|
4457
4453
|
username: { label: o("consumers.list.table_headers.username"), searchable: !0, sortable: !0 },
|
|
4458
4454
|
custom_id: { label: o("consumers.list.table_headers.custom_id"), searchable: !0, sortable: !0 },
|
|
4459
4455
|
tags: { label: o("consumers.list.table_headers.tags"), sortable: !1 }
|
|
4460
|
-
},
|
|
4456
|
+
}, m = y, I = (x) => ({
|
|
4461
4457
|
"data-testid": x.username ?? x.custom_id ?? x.id
|
|
4462
|
-
}), b =
|
|
4463
|
-
var
|
|
4458
|
+
}), b = j(() => {
|
|
4459
|
+
var z, ne, ce, ye;
|
|
4464
4460
|
let x = `${r.config.apiBaseUrl}${Te.list[r.config.app][u.value ? "forConsumerGroup" : "all"]}`;
|
|
4465
|
-
return r.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((
|
|
4466
|
-
}), A =
|
|
4461
|
+
return r.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((z = r.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((ne = r.config) == null ? void 0 : ne.consumerGroupId) || "") : r.config.app === "kongManager" && (x = x.replace(/\/{workspace}/gi, (ce = r.config) != null && ce.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ye = r.config) == null ? void 0 : ye.consumerGroupId) || "")), x;
|
|
4462
|
+
}), A = N(""), C = j(() => {
|
|
4467
4463
|
const x = r.config.app === "konnect" || r.config.isExactMatch;
|
|
4468
4464
|
return x ? {
|
|
4469
4465
|
isExactMatch: x,
|
|
@@ -4476,13 +4472,13 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4476
4472
|
},
|
|
4477
4473
|
schema: r.config.filterSchema
|
|
4478
4474
|
};
|
|
4479
|
-
}),
|
|
4475
|
+
}), w = j(() => u.value && !r.config.paginatedEndpoint ? "consumers" : void 0), { fetcher: G, fetcherState: k } = gs(r.config, b.value, w.value), T = () => {
|
|
4480
4476
|
A.value = "";
|
|
4481
|
-
},
|
|
4477
|
+
}, v = () => {
|
|
4482
4478
|
s.value++;
|
|
4483
|
-
},
|
|
4479
|
+
}, L = (x) => x ?? "-", F = N(null), h = (x, z) => {
|
|
4484
4480
|
const ne = x.id;
|
|
4485
|
-
if (!
|
|
4481
|
+
if (!z(ne)) {
|
|
4486
4482
|
t("copy:error", {
|
|
4487
4483
|
entity: x,
|
|
4488
4484
|
field: "id",
|
|
@@ -4495,9 +4491,9 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4495
4491
|
field: "id",
|
|
4496
4492
|
message: o("consumers.copy.success", { val: ne })
|
|
4497
4493
|
});
|
|
4498
|
-
},
|
|
4494
|
+
}, _ = (x, z) => {
|
|
4499
4495
|
const ne = JSON.stringify(x);
|
|
4500
|
-
if (!
|
|
4496
|
+
if (!z(ne)) {
|
|
4501
4497
|
t("copy:error", {
|
|
4502
4498
|
entity: x,
|
|
4503
4499
|
message: o("consumers.errors.copy")
|
|
@@ -4508,48 +4504,48 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4508
4504
|
entity: x,
|
|
4509
4505
|
message: o("consumers.copy.success_brief")
|
|
4510
4506
|
});
|
|
4511
|
-
},
|
|
4507
|
+
}, q = async (x) => {
|
|
4512
4508
|
var ne;
|
|
4513
4509
|
await ((ne = r.canRetrieve) == null ? void 0 : ne.call(r, x)) && i.push(r.config.getViewRoute(x.id));
|
|
4514
|
-
},
|
|
4510
|
+
}, D = (x) => ({
|
|
4515
4511
|
label: o("consumers.actions.view"),
|
|
4516
4512
|
to: r.config.getViewRoute(x)
|
|
4517
4513
|
}), S = (x) => ({
|
|
4518
4514
|
label: o("consumers.actions.edit"),
|
|
4519
4515
|
to: r.config.getEditRoute(x)
|
|
4520
|
-
}),
|
|
4521
|
-
|
|
4516
|
+
}), K = N(void 0), P = N(!1), V = N(!1), Q = N(""), J = fs(r.config, b.value), X = (x) => {
|
|
4517
|
+
K.value = x, P.value = !0;
|
|
4522
4518
|
}, ue = () => {
|
|
4523
|
-
|
|
4519
|
+
P.value = !1;
|
|
4524
4520
|
}, dr = async () => {
|
|
4525
|
-
var x,
|
|
4526
|
-
if ((x =
|
|
4527
|
-
|
|
4521
|
+
var x, z, ne;
|
|
4522
|
+
if ((x = K.value) != null && x.id) {
|
|
4523
|
+
V.value = !0;
|
|
4528
4524
|
try {
|
|
4529
|
-
await l.delete(
|
|
4525
|
+
await l.delete(J(K.value.id)), V.value = !1, P.value = !1, s.value++, t("delete:success", K.value);
|
|
4530
4526
|
} catch (ce) {
|
|
4531
|
-
Q.value = ((ne = (
|
|
4527
|
+
Q.value = ((ne = (z = ce.response) == null ? void 0 : z.data) == null ? void 0 : ne.message) || ce.message || o("consumers.errors.delete"), t("error", ce);
|
|
4532
4528
|
} finally {
|
|
4533
|
-
|
|
4529
|
+
V.value = !1;
|
|
4534
4530
|
}
|
|
4535
4531
|
}
|
|
4536
|
-
}, tt =
|
|
4532
|
+
}, tt = N(!1), $t = () => {
|
|
4537
4533
|
tt.value = !0;
|
|
4538
|
-
},
|
|
4534
|
+
}, Mt = () => {
|
|
4539
4535
|
tt.value = !1;
|
|
4540
|
-
},
|
|
4541
|
-
|
|
4536
|
+
}, Ot = (x, z) => {
|
|
4537
|
+
z || Mt(), s.value++, t("add:success", x);
|
|
4542
4538
|
}, pr = () => {
|
|
4543
|
-
u.value &&
|
|
4544
|
-
}, ve =
|
|
4539
|
+
u.value && $t();
|
|
4540
|
+
}, ve = N(void 0), nt = N(!1), fr = N(""), mr = (x) => {
|
|
4545
4541
|
ve.value = x, nt.value = !0;
|
|
4546
4542
|
}, Et = () => {
|
|
4547
4543
|
nt.value = !1, ve.value = void 0;
|
|
4548
|
-
}, gr =
|
|
4549
|
-
var
|
|
4544
|
+
}, gr = j(() => {
|
|
4545
|
+
var z, ne, ce, ye;
|
|
4550
4546
|
let x = `${r.config.apiBaseUrl}${Te.list[r.config.app].oneForConsumerGroup}`;
|
|
4551
|
-
return r.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((
|
|
4552
|
-
}), Ft =
|
|
4547
|
+
return r.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((z = r.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((ne = r.config) == null ? void 0 : ne.consumerGroupId) || "") : r.config.app === "kongManager" && (x = x.replace(/\/{workspace}/gi, (ce = r.config) != null && ce.workspace ? `/${r.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ye = r.config) == null ? void 0 : ye.consumerGroupId) || "")), x;
|
|
4548
|
+
}), Ft = N(!1), yr = async () => {
|
|
4553
4549
|
if (ve.value) {
|
|
4554
4550
|
Ft.value = !0;
|
|
4555
4551
|
try {
|
|
@@ -4561,18 +4557,18 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4561
4557
|
Ft.value = !1;
|
|
4562
4558
|
}
|
|
4563
4559
|
}
|
|
4564
|
-
},
|
|
4560
|
+
}, Nt = N(!0);
|
|
4565
4561
|
be(k, (x) => {
|
|
4566
|
-
var
|
|
4567
|
-
if (Array.isArray((
|
|
4568
|
-
|
|
4562
|
+
var z, ne, ce, ye;
|
|
4563
|
+
if (Array.isArray((z = x == null ? void 0 : x.response) == null ? void 0 : z.data) && (Nt.value = x.response.data.length > 0), x.status === Ae.Error) {
|
|
4564
|
+
F.value = {
|
|
4569
4565
|
title: o("consumers.errors.general")
|
|
4570
|
-
}, (ye = (ce = (ne = x.error) == null ? void 0 : ne.response) == null ? void 0 : ce.data) != null && ye.message && (
|
|
4566
|
+
}, (ye = (ce = (ne = x.error) == null ? void 0 : ne.response) == null ? void 0 : ce.data) != null && ye.message && (F.value.message = x.error.response.data.message), t("error", x.error);
|
|
4571
4567
|
return;
|
|
4572
4568
|
}
|
|
4573
|
-
|
|
4569
|
+
F.value = null;
|
|
4574
4570
|
});
|
|
4575
|
-
const rt =
|
|
4571
|
+
const rt = N({
|
|
4576
4572
|
ctaPath: u.value ? void 0 : r.config.createRoute,
|
|
4577
4573
|
ctaText: void 0,
|
|
4578
4574
|
message: o("consumers.list.empty_state.description"),
|
|
@@ -4580,60 +4576,60 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4580
4576
|
});
|
|
4581
4577
|
return yt(async () => {
|
|
4582
4578
|
await r.canCreate() && (rt.value.title = u.value ? o("consumers.list.empty_state.title_for_consumer_group") : o("consumers.list.empty_state.title"), rt.value.ctaText = u.value ? o("consumers.actions.add_consumer") : o("consumers.actions.create"));
|
|
4583
|
-
}), (x,
|
|
4584
|
-
const ne =
|
|
4585
|
-
return d(),
|
|
4586
|
-
|
|
4579
|
+
}), (x, z) => {
|
|
4580
|
+
const ne = U("KButton"), ce = U("KBadge"), ye = U("KTruncate"), qe = U("KDropdownItem"), Kt = U("KClipboardProvider"), hr = U("KPrompt");
|
|
4581
|
+
return d(), $("div", As, [
|
|
4582
|
+
O(f(Pl), {
|
|
4587
4583
|
"cache-identifier": e.cacheIdentifier,
|
|
4588
4584
|
"disable-pagination": u.value && !e.config.paginatedEndpoint,
|
|
4589
4585
|
"disable-pagination-page-jump": "",
|
|
4590
4586
|
"disable-sorting": c.value,
|
|
4591
4587
|
"empty-state-options": rt.value,
|
|
4592
4588
|
"enable-entity-actions": "",
|
|
4593
|
-
"error-message":
|
|
4594
|
-
fetcher: f(
|
|
4589
|
+
"error-message": F.value,
|
|
4590
|
+
fetcher: f(G),
|
|
4595
4591
|
"fetcher-cache-key": s.value,
|
|
4596
4592
|
"pagination-type": "offset",
|
|
4597
4593
|
"preferences-storage-key": p.value,
|
|
4598
4594
|
query: A.value,
|
|
4599
|
-
"row-attributes":
|
|
4600
|
-
"table-headers": f(
|
|
4595
|
+
"row-attributes": I,
|
|
4596
|
+
"table-headers": f(m),
|
|
4601
4597
|
"use-action-outside": e.useActionOutside,
|
|
4602
|
-
onClearSearchInput:
|
|
4603
|
-
"onClick:row":
|
|
4598
|
+
onClearSearchInput: T,
|
|
4599
|
+
"onClick:row": z[3] || (z[3] = (W) => q(W)),
|
|
4604
4600
|
onEmptyStateCtaClicked: pr,
|
|
4605
|
-
onSort:
|
|
4601
|
+
onSort: v
|
|
4606
4602
|
}, {
|
|
4607
|
-
"toolbar-filter":
|
|
4608
|
-
u.value ?
|
|
4603
|
+
"toolbar-filter": g(() => [
|
|
4604
|
+
u.value ? H("", !0) : (d(), R(f(os), {
|
|
4609
4605
|
key: 0,
|
|
4610
4606
|
modelValue: A.value,
|
|
4611
|
-
"onUpdate:modelValue":
|
|
4607
|
+
"onUpdate:modelValue": z[0] || (z[0] = (W) => A.value = W),
|
|
4612
4608
|
config: C.value
|
|
4613
4609
|
}, null, 8, ["modelValue", "config"]))
|
|
4614
4610
|
]),
|
|
4615
|
-
"toolbar-button":
|
|
4616
|
-
(d(),
|
|
4611
|
+
"toolbar-button": g(() => [
|
|
4612
|
+
(d(), R(xe(e.useActionOutside ? "Teleport" : "div"), {
|
|
4617
4613
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
4618
4614
|
}, {
|
|
4619
|
-
default:
|
|
4620
|
-
|
|
4615
|
+
default: g(() => [
|
|
4616
|
+
O(f(Ve), {
|
|
4621
4617
|
"auth-function": () => e.canCreate()
|
|
4622
4618
|
}, {
|
|
4623
|
-
default:
|
|
4624
|
-
|
|
4619
|
+
default: g(() => [
|
|
4620
|
+
Be(O(ne, {
|
|
4625
4621
|
appearance: "primary",
|
|
4626
4622
|
"data-testid": "toolbar-add-consumer",
|
|
4627
4623
|
icon: "plus",
|
|
4628
4624
|
to: e.config.consumerGroupId ? void 0 : e.config.createRoute,
|
|
4629
|
-
onClick:
|
|
4625
|
+
onClick: z[1] || (z[1] = () => e.config.consumerGroupId ? $t() : void 0)
|
|
4630
4626
|
}, {
|
|
4631
|
-
default:
|
|
4632
|
-
|
|
4627
|
+
default: g(() => [
|
|
4628
|
+
Y(M(e.config.consumerGroupId ? f(o)("consumers.actions.add_consumer") : f(o)("consumers.list.toolbar_actions.new_consumer")), 1)
|
|
4633
4629
|
]),
|
|
4634
4630
|
_: 1
|
|
4635
4631
|
}, 8, ["to"]), [
|
|
4636
|
-
[Le,
|
|
4632
|
+
[Le, Nt.value]
|
|
4637
4633
|
])
|
|
4638
4634
|
]),
|
|
4639
4635
|
_: 1
|
|
@@ -4642,93 +4638,93 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4642
4638
|
_: 1
|
|
4643
4639
|
}, 8, ["to"]))
|
|
4644
4640
|
]),
|
|
4645
|
-
username:
|
|
4646
|
-
|
|
4641
|
+
username: g(({ rowValue: W }) => [
|
|
4642
|
+
B("b", null, M(L(W)), 1)
|
|
4647
4643
|
]),
|
|
4648
|
-
custom_id:
|
|
4649
|
-
|
|
4644
|
+
custom_id: g(({ rowValue: W }) => [
|
|
4645
|
+
Y(M(L(W)), 1)
|
|
4650
4646
|
]),
|
|
4651
|
-
tags:
|
|
4652
|
-
W && W.length > 0 ? (d(),
|
|
4653
|
-
default:
|
|
4654
|
-
(d(!0),
|
|
4655
|
-
key:
|
|
4656
|
-
onClick:
|
|
4647
|
+
tags: g(({ rowValue: W }) => [
|
|
4648
|
+
W && W.length > 0 ? (d(), R(ye, { key: 0 }, {
|
|
4649
|
+
default: g(() => [
|
|
4650
|
+
(d(!0), $(me, null, pe(W, (je) => (d(), R(ce, {
|
|
4651
|
+
key: je,
|
|
4652
|
+
onClick: z[2] || (z[2] = Ge(() => {
|
|
4657
4653
|
}, ["stop"]))
|
|
4658
4654
|
}, {
|
|
4659
|
-
default:
|
|
4660
|
-
|
|
4655
|
+
default: g(() => [
|
|
4656
|
+
Y(M(je), 1)
|
|
4661
4657
|
]),
|
|
4662
4658
|
_: 2
|
|
4663
4659
|
}, 1024))), 128))
|
|
4664
4660
|
]),
|
|
4665
4661
|
_: 2
|
|
4666
|
-
}, 1024)) : (d(),
|
|
4662
|
+
}, 1024)) : (d(), $("span", Ss, "-"))
|
|
4667
4663
|
]),
|
|
4668
|
-
actions:
|
|
4669
|
-
|
|
4670
|
-
default:
|
|
4671
|
-
|
|
4664
|
+
actions: g(({ row: W }) => [
|
|
4665
|
+
O(Kt, null, {
|
|
4666
|
+
default: g(({ copyToClipboard: je }) => [
|
|
4667
|
+
O(qe, {
|
|
4672
4668
|
"data-testid": "action-entity-copy-id",
|
|
4673
|
-
onClick: (vr) =>
|
|
4669
|
+
onClick: (vr) => h(W, je)
|
|
4674
4670
|
}, {
|
|
4675
|
-
default:
|
|
4676
|
-
|
|
4671
|
+
default: g(() => [
|
|
4672
|
+
Y(M(f(o)("consumers.actions.copy_id")), 1)
|
|
4677
4673
|
]),
|
|
4678
4674
|
_: 2
|
|
4679
4675
|
}, 1032, ["onClick"])
|
|
4680
4676
|
]),
|
|
4681
4677
|
_: 2
|
|
4682
4678
|
}, 1024),
|
|
4683
|
-
|
|
4684
|
-
default:
|
|
4685
|
-
|
|
4679
|
+
O(Kt, null, {
|
|
4680
|
+
default: g(({ copyToClipboard: je }) => [
|
|
4681
|
+
O(qe, {
|
|
4686
4682
|
"data-testid": "action-entity-copy-json",
|
|
4687
|
-
onClick: (vr) =>
|
|
4683
|
+
onClick: (vr) => _(W, je)
|
|
4688
4684
|
}, {
|
|
4689
|
-
default:
|
|
4690
|
-
|
|
4685
|
+
default: g(() => [
|
|
4686
|
+
Y(M(f(o)("consumers.actions.copy_json")), 1)
|
|
4691
4687
|
]),
|
|
4692
4688
|
_: 2
|
|
4693
4689
|
}, 1032, ["onClick"])
|
|
4694
4690
|
]),
|
|
4695
4691
|
_: 2
|
|
4696
4692
|
}, 1024),
|
|
4697
|
-
|
|
4693
|
+
O(f(Ve), {
|
|
4698
4694
|
"auth-function": () => e.canRetrieve(W)
|
|
4699
4695
|
}, {
|
|
4700
|
-
default:
|
|
4701
|
-
|
|
4696
|
+
default: g(() => [
|
|
4697
|
+
O(qe, {
|
|
4702
4698
|
"data-testid": "action-entity-view",
|
|
4703
4699
|
"has-divider": "",
|
|
4704
|
-
item:
|
|
4700
|
+
item: D(W.id)
|
|
4705
4701
|
}, null, 8, ["item"])
|
|
4706
4702
|
]),
|
|
4707
4703
|
_: 2
|
|
4708
4704
|
}, 1032, ["auth-function"]),
|
|
4709
|
-
|
|
4705
|
+
O(f(Ve), {
|
|
4710
4706
|
"auth-function": () => e.canEdit(W)
|
|
4711
4707
|
}, {
|
|
4712
|
-
default:
|
|
4713
|
-
|
|
4708
|
+
default: g(() => [
|
|
4709
|
+
O(qe, {
|
|
4714
4710
|
"data-testid": "action-entity-edit",
|
|
4715
4711
|
item: S(W.id)
|
|
4716
4712
|
}, null, 8, ["item"])
|
|
4717
4713
|
]),
|
|
4718
4714
|
_: 2
|
|
4719
4715
|
}, 1032, ["auth-function"]),
|
|
4720
|
-
|
|
4716
|
+
O(f(Ve), {
|
|
4721
4717
|
"auth-function": () => e.canDelete(W)
|
|
4722
4718
|
}, {
|
|
4723
|
-
default:
|
|
4724
|
-
|
|
4719
|
+
default: g(() => [
|
|
4720
|
+
O(qe, {
|
|
4725
4721
|
danger: "",
|
|
4726
4722
|
"data-testid": "action-entity-delete",
|
|
4727
4723
|
"has-divider": "",
|
|
4728
4724
|
onClick: () => e.config.consumerGroupId ? mr(W) : X(W)
|
|
4729
4725
|
}, {
|
|
4730
|
-
default:
|
|
4731
|
-
|
|
4726
|
+
default: g(() => [
|
|
4727
|
+
Y(M(e.config.consumerGroupId ? f(o)("consumers.actions.remove") : f(o)("consumers.actions.delete")), 1)
|
|
4732
4728
|
]),
|
|
4733
4729
|
_: 2
|
|
4734
4730
|
}, 1032, ["onClick"])
|
|
@@ -4738,28 +4734,28 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4738
4734
|
]),
|
|
4739
4735
|
_: 1
|
|
4740
4736
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "preferences-storage-key", "query", "table-headers", "use-action-outside"]),
|
|
4741
|
-
|
|
4742
|
-
"action-pending":
|
|
4737
|
+
O(f(Gl), {
|
|
4738
|
+
"action-pending": V.value,
|
|
4743
4739
|
"data-testid": "delete-consumer-modal",
|
|
4744
4740
|
description: f(o)("consumers.delete.description"),
|
|
4745
|
-
"entity-name":
|
|
4741
|
+
"entity-name": K.value && (K.value.username || K.value.custom_id || K.value.id),
|
|
4746
4742
|
"entity-type": f(gn).Consumer,
|
|
4747
4743
|
error: Q.value,
|
|
4748
4744
|
title: f(o)("consumers.delete.title"),
|
|
4749
|
-
visible:
|
|
4745
|
+
visible: P.value,
|
|
4750
4746
|
onCancel: ue,
|
|
4751
4747
|
onProceed: dr
|
|
4752
4748
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4753
|
-
e.config.consumerGroupId ? (d(),
|
|
4749
|
+
e.config.consumerGroupId ? (d(), R(Is, {
|
|
4754
4750
|
key: 0,
|
|
4755
4751
|
config: e.config,
|
|
4756
4752
|
"data-testid": "add-consumer-modal",
|
|
4757
4753
|
visible: tt.value,
|
|
4758
|
-
"onAdd:partialSuccess":
|
|
4759
|
-
"onAdd:success":
|
|
4760
|
-
onCancel:
|
|
4761
|
-
}, null, 8, ["config", "visible"])) :
|
|
4762
|
-
e.config.consumerGroupId && ve.value ? (d(),
|
|
4754
|
+
"onAdd:partialSuccess": z[4] || (z[4] = (W) => Ot(W, !0)),
|
|
4755
|
+
"onAdd:success": z[5] || (z[5] = (W) => Ot(W)),
|
|
4756
|
+
onCancel: Mt
|
|
4757
|
+
}, null, 8, ["config", "visible"])) : H("", !0),
|
|
4758
|
+
e.config.consumerGroupId && ve.value ? (d(), R(hr, {
|
|
4763
4759
|
key: 1,
|
|
4764
4760
|
"data-testid": "remove-consumer-modal",
|
|
4765
4761
|
"is-visible": nt.value,
|
|
@@ -4768,33 +4764,33 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4768
4764
|
onCanceled: Et,
|
|
4769
4765
|
onProceed: yr
|
|
4770
4766
|
}, {
|
|
4771
|
-
"body-content":
|
|
4772
|
-
|
|
4767
|
+
"body-content": g(() => [
|
|
4768
|
+
O(f(a), {
|
|
4773
4769
|
class: "message",
|
|
4774
4770
|
keypath: e.config.consumerGroupName ? "consumers.consumer_groups.remove.confirmation" : "consumers.consumer_groups.remove.confirmationNoCG",
|
|
4775
4771
|
tag: "p"
|
|
4776
4772
|
}, ke({
|
|
4777
|
-
consumer:
|
|
4778
|
-
|
|
4773
|
+
consumer: g(() => [
|
|
4774
|
+
B("strong", null, M(ve.value.username || ve.value.custom_id || ve.value.id), 1)
|
|
4779
4775
|
]),
|
|
4780
4776
|
_: 2
|
|
4781
4777
|
}, [
|
|
4782
4778
|
e.config.consumerGroupName ? {
|
|
4783
4779
|
name: "consumerGroup",
|
|
4784
|
-
fn:
|
|
4785
|
-
|
|
4780
|
+
fn: g(() => [
|
|
4781
|
+
B("strong", null, M(e.config.consumerGroupName), 1)
|
|
4786
4782
|
]),
|
|
4787
4783
|
key: "0"
|
|
4788
4784
|
} : void 0
|
|
4789
4785
|
]), 1032, ["keypath"]),
|
|
4790
|
-
|
|
4786
|
+
B("p", null, M(f(o)("consumers.consumer_groups.remove.description")), 1)
|
|
4791
4787
|
]),
|
|
4792
4788
|
_: 1
|
|
4793
|
-
}, 8, ["is-visible", "title"])) :
|
|
4789
|
+
}, 8, ["is-visible", "title"])) : H("", !0)
|
|
4794
4790
|
]);
|
|
4795
4791
|
};
|
|
4796
4792
|
}
|
|
4797
|
-
}), Vs = /* @__PURE__ */
|
|
4793
|
+
}), Vs = /* @__PURE__ */ jt(xs, [["__scopeId", "data-v-4ec34e52"]]), Ts = { class: "kong-ui-entities-consumer-form" }, js = { class: "fields-group-title" }, $s = { class: "fields-group-text" }, Ms = /* @__PURE__ */ te({
|
|
4798
4794
|
__name: "ConsumerForm",
|
|
4799
4795
|
props: {
|
|
4800
4796
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4812,10 +4808,10 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4812
4808
|
},
|
|
4813
4809
|
emits: ["update", "error", "loading"],
|
|
4814
4810
|
setup(e, { emit: n }) {
|
|
4815
|
-
var
|
|
4811
|
+
var T;
|
|
4816
4812
|
const t = e, r = n, { i18nT: a, i18n: { t: o } } = Xe.useI18n(), i = ht(), { axiosInstance: l } = Tt({
|
|
4817
|
-
headers: (
|
|
4818
|
-
}), { getMessageFromError: s } =
|
|
4813
|
+
headers: (T = t.config) == null ? void 0 : T.requestHeaders
|
|
4814
|
+
}), { getMessageFromError: s } = ms(), u = He({
|
|
4819
4815
|
fields: {
|
|
4820
4816
|
username: "",
|
|
4821
4817
|
customId: "",
|
|
@@ -4823,51 +4819,51 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4823
4819
|
},
|
|
4824
4820
|
readonly: !1,
|
|
4825
4821
|
errorMessage: ""
|
|
4826
|
-
}), p =
|
|
4822
|
+
}), p = He({
|
|
4827
4823
|
username: "",
|
|
4828
4824
|
customId: "",
|
|
4829
4825
|
tags: ""
|
|
4830
|
-
}), c =
|
|
4831
|
-
var
|
|
4832
|
-
return (
|
|
4826
|
+
}), c = j(() => {
|
|
4827
|
+
var v, L;
|
|
4828
|
+
return (L = Te.form[(v = t.config) == null ? void 0 : v.app]) == null ? void 0 : L.edit;
|
|
4833
4829
|
}), y = () => {
|
|
4834
|
-
var
|
|
4835
|
-
i.push(((
|
|
4836
|
-
},
|
|
4837
|
-
r("loading",
|
|
4838
|
-
},
|
|
4839
|
-
r("error",
|
|
4840
|
-
}, b = (
|
|
4841
|
-
var
|
|
4842
|
-
u.fields.username = ((
|
|
4843
|
-
const
|
|
4844
|
-
u.fields.tags = (
|
|
4845
|
-
}, A =
|
|
4846
|
-
var
|
|
4847
|
-
let
|
|
4848
|
-
return ((
|
|
4849
|
-
},
|
|
4850
|
-
var
|
|
4830
|
+
var v;
|
|
4831
|
+
i.push(((v = t.config) == null ? void 0 : v.cancelRoute) || { name: "consumer-list" });
|
|
4832
|
+
}, m = (v) => {
|
|
4833
|
+
r("loading", v);
|
|
4834
|
+
}, I = (v) => {
|
|
4835
|
+
r("error", v);
|
|
4836
|
+
}, b = (v) => {
|
|
4837
|
+
var F, h, _;
|
|
4838
|
+
u.fields.username = ((F = v == null ? void 0 : v.item) == null ? void 0 : F.username) || (v == null ? void 0 : v.username) || "", u.fields.customId = ((h = v == null ? void 0 : v.item) == null ? void 0 : h.custom_id) || (v == null ? void 0 : v.custom_id) || "";
|
|
4839
|
+
const L = ((_ = v == null ? void 0 : v.item) == null ? void 0 : _.tags) || (v == null ? void 0 : v.tags) || [];
|
|
4840
|
+
u.fields.tags = (L == null ? void 0 : L.join(", ")) || "", Object.assign(p, u.fields);
|
|
4841
|
+
}, A = j(() => t.consumerId ? ct.Edit : ct.Create), C = (v) => {
|
|
4842
|
+
var F, h, _, q, D, S;
|
|
4843
|
+
let L = `${(F = t.config) == null ? void 0 : F.apiBaseUrl}${Te.form[(h = t.config) == null ? void 0 : h.app][v]}`;
|
|
4844
|
+
return ((_ = t.config) == null ? void 0 : _.app) === "konnect" ? L = L.replace(/{controlPlaneId}/gi, ((q = t.config) == null ? void 0 : q.controlPlaneId) || "") : ((D = t.config) == null ? void 0 : D.app) === "kongManager" && (L = L.replace(/\/{workspace}/gi, (S = t.config) != null && S.workspace ? `/${t.config.workspace}` : "")), L = L.replace(/{id}/gi, t.consumerId), L;
|
|
4845
|
+
}, w = j(() => !!u.fields.username || !!u.fields.customId), G = j(() => JSON.stringify(u.fields) !== JSON.stringify(p)), k = async () => {
|
|
4846
|
+
var v, L, F;
|
|
4851
4847
|
try {
|
|
4852
4848
|
u.readonly = !0;
|
|
4853
|
-
const
|
|
4849
|
+
const h = {
|
|
4854
4850
|
username: u.fields.username || null,
|
|
4855
4851
|
custom_id: u.fields.customId || null,
|
|
4856
|
-
tags: (
|
|
4852
|
+
tags: (L = (v = u.fields.tags.split(",")) == null ? void 0 : v.map((q) => String(q || "").trim())) == null ? void 0 : L.filter((q) => q !== "")
|
|
4857
4853
|
};
|
|
4858
|
-
let
|
|
4859
|
-
await l.post(C("validate"),
|
|
4860
|
-
} catch (
|
|
4861
|
-
u.errorMessage = s(
|
|
4854
|
+
let _;
|
|
4855
|
+
await l.post(C("validate"), h), A.value === "create" ? _ = await l.post(C("create"), h) : A.value === "edit" && (_ = ((F = t.config) == null ? void 0 : F.app) === "konnect" ? await l.put(C("edit"), h) : await l.patch(C("edit"), h)), b(_ == null ? void 0 : _.data), r("update", _ == null ? void 0 : _.data);
|
|
4856
|
+
} catch (h) {
|
|
4857
|
+
u.errorMessage = s(h), r("error", h);
|
|
4862
4858
|
} finally {
|
|
4863
4859
|
u.readonly = !1;
|
|
4864
4860
|
}
|
|
4865
4861
|
};
|
|
4866
|
-
return (
|
|
4867
|
-
const
|
|
4868
|
-
return d(),
|
|
4869
|
-
|
|
4870
|
-
"can-submit":
|
|
4862
|
+
return (v, L) => {
|
|
4863
|
+
const F = U("KInput"), h = U("KCard");
|
|
4864
|
+
return d(), $("div", Ts, [
|
|
4865
|
+
O(f(El), {
|
|
4866
|
+
"can-submit": w.value && G.value,
|
|
4871
4867
|
config: e.config,
|
|
4872
4868
|
"edit-id": e.consumerId,
|
|
4873
4869
|
"error-message": u.errorMessage,
|
|
@@ -4875,28 +4871,28 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4875
4871
|
"form-fields": u.fields,
|
|
4876
4872
|
"is-readonly": u.readonly,
|
|
4877
4873
|
onCancel: y,
|
|
4878
|
-
"onFetch:error":
|
|
4874
|
+
"onFetch:error": L[3] || (L[3] = (_) => I(_)),
|
|
4879
4875
|
"onFetch:success": b,
|
|
4880
|
-
onLoading:
|
|
4876
|
+
onLoading: L[4] || (L[4] = (_) => m(_)),
|
|
4881
4877
|
onSubmit: k
|
|
4882
4878
|
}, {
|
|
4883
|
-
default:
|
|
4884
|
-
|
|
4885
|
-
|
|
4879
|
+
default: g(() => [
|
|
4880
|
+
B("div", null, [
|
|
4881
|
+
O(f(ps), {
|
|
4886
4882
|
description: f(o)("consumers.form.info.description"),
|
|
4887
4883
|
"has-divider": "",
|
|
4888
4884
|
title: f(o)("consumers.form.info.title")
|
|
4889
4885
|
}, {
|
|
4890
|
-
default:
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4886
|
+
default: g(() => [
|
|
4887
|
+
B("div", null, [
|
|
4888
|
+
B("h5", js, M(f(o)("consumers.form.consumer_identification.title")) + "* ", 1),
|
|
4889
|
+
B("p", $s, M(f(o)("consumers.form.consumer_identification.description")), 1)
|
|
4894
4890
|
]),
|
|
4895
|
-
|
|
4896
|
-
default:
|
|
4897
|
-
|
|
4891
|
+
O(h, null, {
|
|
4892
|
+
default: g(() => [
|
|
4893
|
+
O(F, {
|
|
4898
4894
|
modelValue: u.fields.username,
|
|
4899
|
-
"onUpdate:modelValue":
|
|
4895
|
+
"onUpdate:modelValue": L[0] || (L[0] = (_) => u.fields.username = _),
|
|
4900
4896
|
modelModifiers: { trim: !0 },
|
|
4901
4897
|
autocomplete: "off",
|
|
4902
4898
|
class: "username-field",
|
|
@@ -4909,22 +4905,22 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4909
4905
|
readonly: u.readonly,
|
|
4910
4906
|
type: "text"
|
|
4911
4907
|
}, {
|
|
4912
|
-
"label-tooltip":
|
|
4913
|
-
|
|
4908
|
+
"label-tooltip": g(() => [
|
|
4909
|
+
O(f(a), {
|
|
4914
4910
|
keypath: "consumers.fields.username.tooltip",
|
|
4915
4911
|
scope: "global"
|
|
4916
4912
|
}, {
|
|
4917
|
-
custom_id:
|
|
4918
|
-
|
|
4913
|
+
custom_id: g(() => [
|
|
4914
|
+
B("code", null, M(f(o)("consumers.fields.username.custom_id")), 1)
|
|
4919
4915
|
]),
|
|
4920
4916
|
_: 1
|
|
4921
4917
|
})
|
|
4922
4918
|
]),
|
|
4923
4919
|
_: 1
|
|
4924
4920
|
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
4925
|
-
|
|
4921
|
+
O(F, {
|
|
4926
4922
|
modelValue: u.fields.customId,
|
|
4927
|
-
"onUpdate:modelValue":
|
|
4923
|
+
"onUpdate:modelValue": L[1] || (L[1] = (_) => u.fields.customId = _),
|
|
4928
4924
|
modelModifiers: { trim: !0 },
|
|
4929
4925
|
autocomplete: "off",
|
|
4930
4926
|
"data-testid": "consumer-form-custom-id",
|
|
@@ -4936,13 +4932,13 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4936
4932
|
readonly: u.readonly,
|
|
4937
4933
|
type: "text"
|
|
4938
4934
|
}, {
|
|
4939
|
-
"label-tooltip":
|
|
4940
|
-
|
|
4935
|
+
"label-tooltip": g(() => [
|
|
4936
|
+
O(f(a), {
|
|
4941
4937
|
keypath: "consumers.fields.custom_id.tooltip",
|
|
4942
4938
|
scope: "global"
|
|
4943
4939
|
}, {
|
|
4944
|
-
username:
|
|
4945
|
-
|
|
4940
|
+
username: g(() => [
|
|
4941
|
+
B("code", null, M(f(o)("consumers.fields.custom_id.username")), 1)
|
|
4946
4942
|
]),
|
|
4947
4943
|
_: 1
|
|
4948
4944
|
})
|
|
@@ -4952,9 +4948,9 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4952
4948
|
]),
|
|
4953
4949
|
_: 1
|
|
4954
4950
|
}),
|
|
4955
|
-
|
|
4951
|
+
O(F, {
|
|
4956
4952
|
modelValue: u.fields.tags,
|
|
4957
|
-
"onUpdate:modelValue":
|
|
4953
|
+
"onUpdate:modelValue": L[2] || (L[2] = (_) => u.fields.tags = _),
|
|
4958
4954
|
modelModifiers: { trim: !0 },
|
|
4959
4955
|
autocomplete: "off",
|
|
4960
4956
|
"data-testid": "consumer-form-tags",
|
|
@@ -4978,7 +4974,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
4978
4974
|
]);
|
|
4979
4975
|
};
|
|
4980
4976
|
}
|
|
4981
|
-
}),
|
|
4977
|
+
}), Gs = /* @__PURE__ */ jt(Ms, [["__scopeId", "data-v-c402497d"]]), Os = { class: "kong-ui-consumer-entity-config-card" }, Hs = /* @__PURE__ */ te({
|
|
4982
4978
|
__name: "ConsumerConfigCard",
|
|
4983
4979
|
props: {
|
|
4984
4980
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5005,7 +5001,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
5005
5001
|
},
|
|
5006
5002
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
5007
5003
|
setup(e) {
|
|
5008
|
-
const n = e, { i18n: { t }, i18nT: r } = Xe.useI18n(), a =
|
|
5004
|
+
const n = e, { i18n: { t }, i18nT: r } = Xe.useI18n(), a = j(() => Te.form[n.config.app].edit), o = N({
|
|
5009
5005
|
id: {},
|
|
5010
5006
|
username: {
|
|
5011
5007
|
section: de.Basic,
|
|
@@ -5030,8 +5026,8 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
5030
5026
|
hidden: !0
|
|
5031
5027
|
}
|
|
5032
5028
|
});
|
|
5033
|
-
return (i, l) => (d(),
|
|
5034
|
-
|
|
5029
|
+
return (i, l) => (d(), $("div", Os, [
|
|
5030
|
+
O(f(jl), {
|
|
5035
5031
|
config: e.config,
|
|
5036
5032
|
"config-card-doc": e.configCardDoc,
|
|
5037
5033
|
"config-schema": o.value,
|
|
@@ -5042,24 +5038,24 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
5042
5038
|
"onFetch:success": l[2] || (l[2] = (s) => i.$emit("fetch:success", s)),
|
|
5043
5039
|
onLoading: l[3] || (l[3] = (s) => i.$emit("loading", s))
|
|
5044
5040
|
}, {
|
|
5045
|
-
"username-label-tooltip":
|
|
5046
|
-
|
|
5041
|
+
"username-label-tooltip": g(() => [
|
|
5042
|
+
O(f(r), {
|
|
5047
5043
|
keypath: "consumers.fields.username.tooltip",
|
|
5048
5044
|
scope: "global"
|
|
5049
5045
|
}, {
|
|
5050
|
-
custom_id:
|
|
5051
|
-
|
|
5046
|
+
custom_id: g(() => [
|
|
5047
|
+
B("code", null, M(f(t)("consumers.fields.username.custom_id")), 1)
|
|
5052
5048
|
]),
|
|
5053
5049
|
_: 1
|
|
5054
5050
|
})
|
|
5055
5051
|
]),
|
|
5056
|
-
"custom_id-label-tooltip":
|
|
5057
|
-
|
|
5052
|
+
"custom_id-label-tooltip": g(() => [
|
|
5053
|
+
O(f(r), {
|
|
5058
5054
|
keypath: "consumers.fields.custom_id.tooltip",
|
|
5059
5055
|
scope: "global"
|
|
5060
5056
|
}, {
|
|
5061
|
-
username:
|
|
5062
|
-
|
|
5057
|
+
username: g(() => [
|
|
5058
|
+
B("code", null, M(f(t)("consumers.fields.custom_id.username")), 1)
|
|
5063
5059
|
]),
|
|
5064
5060
|
_: 1
|
|
5065
5061
|
})
|
|
@@ -5070,7 +5066,7 @@ const sl = { class: "yaml-config" }, cr = /* @__PURE__ */ te({
|
|
|
5070
5066
|
}
|
|
5071
5067
|
});
|
|
5072
5068
|
export {
|
|
5073
|
-
|
|
5074
|
-
|
|
5069
|
+
Hs as ConsumerConfigCard,
|
|
5070
|
+
Gs as ConsumerForm,
|
|
5075
5071
|
Vs as ConsumerList
|
|
5076
5072
|
};
|