@kong-ui-public/entities-consumers 2.2.16 → 2.2.17-pr.759.f3bd188d.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 +886 -884
- package/dist/entities-consumers.umd.js +7 -7
- package/dist/style.css +1 -1
- package/dist/types/components/ConsumerList.vue.d.ts.map +1 -1
- package/dist/types/types/consumer-list.d.ts +2 -0
- package/dist/types/types/consumer-list.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as ne, ref as E, computed as
|
|
1
|
+
import { defineComponent as ne, ref as E, computed as T, watch as ve, renderSlot as Z, createCommentVNode as z, unref as m, useSlots as Ze, onBeforeMount as gt, resolveComponent as D, openBlock as f, createBlock as G, createSlots as ke, withCtx as g, createElementVNode as F, createTextVNode as W, toDisplayString as j, createVNode as O, createElementBlock as $, renderList as pe, Fragment as me, normalizeClass as Ie, withModifiers as Ge, withDirectives as Fe, vShow as Le, useCssVars as cn, resolveDynamicComponent as xe, normalizeProps as ha, guardReactiveProps as va, mergeProps as st, onMounted as ba, onUnmounted as Ca, normalizeStyle as dn, inject as ka, pushScopeId as pn, popScopeId as fn, reactive as Bt } from "vue";
|
|
2
2
|
import { useRouter as yt } from "vue-router";
|
|
3
3
|
import { createI18n as ht, i18nTComponent as mn } from "@kong-ui-public/i18n";
|
|
4
|
-
import
|
|
5
|
-
import { BadgeMethodAppearances as
|
|
6
|
-
const
|
|
4
|
+
import wa from "axios";
|
|
5
|
+
import { BadgeMethodAppearances as Ia } from "@kong/kongponents";
|
|
6
|
+
const _a = {
|
|
7
7
|
list: {
|
|
8
8
|
table_headers: {
|
|
9
9
|
username: "Username",
|
|
@@ -98,11 +98,11 @@ const Ia = {
|
|
|
98
98
|
tooltip: "An optional set of strings associated with the Consumer for grouping and filtering."
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
},
|
|
102
|
-
consumers:
|
|
101
|
+
}, Sa = {
|
|
102
|
+
consumers: _a
|
|
103
103
|
};
|
|
104
|
-
function
|
|
105
|
-
const e = ht("en-us",
|
|
104
|
+
function Aa() {
|
|
105
|
+
const e = ht("en-us", Sa);
|
|
106
106
|
return {
|
|
107
107
|
i18n: e,
|
|
108
108
|
i18nT: mn(e)
|
|
@@ -110,7 +110,7 @@ function Sa() {
|
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
const Qe = {
|
|
113
|
-
useI18n:
|
|
113
|
+
useI18n: Aa
|
|
114
114
|
}, at = "/api/runtime_groups/{controlPlaneId}", je = "/{workspace}", Te = {
|
|
115
115
|
list: {
|
|
116
116
|
konnect: {
|
|
@@ -140,14 +140,14 @@ const Qe = {
|
|
|
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 || {}), ut = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ut || {}), Se = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Se || {}), 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 vt(e = {}) {
|
|
142
142
|
return {
|
|
143
|
-
axiosInstance:
|
|
143
|
+
axiosInstance: wa.create({
|
|
144
144
|
withCredentials: !0,
|
|
145
145
|
timeout: 3e4,
|
|
146
146
|
...e
|
|
147
147
|
})
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function xa() {
|
|
151
151
|
return {
|
|
152
152
|
debounce: (e, n) => {
|
|
153
153
|
let t;
|
|
@@ -159,12 +159,12 @@ function Aa() {
|
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
const rt = "khcp-user-table-preferences",
|
|
162
|
+
const rt = "khcp-user-table-preferences", Ta = {
|
|
163
163
|
pageSize: 30,
|
|
164
164
|
sortColumnKey: void 0,
|
|
165
165
|
sortColumnOrder: void 0
|
|
166
166
|
};
|
|
167
|
-
function
|
|
167
|
+
function $a() {
|
|
168
168
|
const e = (t) => {
|
|
169
169
|
if (typeof t == "string")
|
|
170
170
|
try {
|
|
@@ -188,24 +188,24 @@ function Ta() {
|
|
|
188
188
|
},
|
|
189
189
|
getTablePreferences: (t) => {
|
|
190
190
|
const a = n();
|
|
191
|
-
return (a == null ? void 0 : a.get(t)) || void 0 ||
|
|
191
|
+
return (a == null ? void 0 : a.get(t)) || void 0 || Ta;
|
|
192
192
|
},
|
|
193
193
|
deleteAllTablePreferences: () => {
|
|
194
194
|
localStorage.removeItem(rt);
|
|
195
195
|
}
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
|
-
const
|
|
198
|
+
const ja = {
|
|
199
199
|
actions: {
|
|
200
200
|
copyId: "Copy ID",
|
|
201
201
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
202
202
|
copyToClipboard: "Copied successfully!",
|
|
203
203
|
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
204
204
|
}
|
|
205
|
-
},
|
|
205
|
+
}, Ma = {
|
|
206
206
|
message: "Are you sure you want to delete this {entityType}?",
|
|
207
207
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
208
|
-
},
|
|
208
|
+
}, Oa = {
|
|
209
209
|
actions: {
|
|
210
210
|
save: "Save",
|
|
211
211
|
cancel: "Cancel",
|
|
@@ -214,13 +214,13 @@ const $a = {
|
|
|
214
214
|
errors: {
|
|
215
215
|
edit: "The entity could not be edited at this time."
|
|
216
216
|
}
|
|
217
|
-
},
|
|
217
|
+
}, Ea = {
|
|
218
218
|
emptyState: {
|
|
219
219
|
noSearchResultsTitle: "No results found",
|
|
220
220
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
221
221
|
noSearchResultsCtaText: "Clear"
|
|
222
222
|
}
|
|
223
|
-
},
|
|
223
|
+
}, Na = {
|
|
224
224
|
title: "Configuration",
|
|
225
225
|
actions: {
|
|
226
226
|
copy: "Copy JSON"
|
|
@@ -258,7 +258,7 @@ const $a = {
|
|
|
258
258
|
entryTitle: "Entry {index}",
|
|
259
259
|
structuredFormat: "Structured"
|
|
260
260
|
}
|
|
261
|
-
},
|
|
261
|
+
}, Ka = {
|
|
262
262
|
filterButtonText: "Filter",
|
|
263
263
|
fieldLabel: "Filter by:",
|
|
264
264
|
inputPlaceholder: "Enter a value",
|
|
@@ -266,15 +266,15 @@ const $a = {
|
|
|
266
266
|
applyButtonText: "Apply",
|
|
267
267
|
clearButtonText: "Clear",
|
|
268
268
|
clearAllButtonText: "Clear all filters"
|
|
269
|
-
},
|
|
269
|
+
}, qa = {
|
|
270
270
|
errors: {
|
|
271
271
|
fetch: "Could not fetch available items",
|
|
272
272
|
invalid: "Please select a valid value"
|
|
273
273
|
}
|
|
274
|
-
},
|
|
274
|
+
}, Ba = {
|
|
275
275
|
unexpected: "An unexpected error has occurred",
|
|
276
276
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
277
|
-
},
|
|
277
|
+
}, Fa = {
|
|
278
278
|
enable: {
|
|
279
279
|
title: "Enable {entityType}",
|
|
280
280
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -285,19 +285,19 @@ const $a = {
|
|
|
285
285
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
286
286
|
confirmText: "Yes, disable"
|
|
287
287
|
}
|
|
288
|
-
},
|
|
289
|
-
global:
|
|
290
|
-
deleteModal:
|
|
291
|
-
baseForm:
|
|
292
|
-
baseTable:
|
|
293
|
-
baseConfigCard:
|
|
294
|
-
filter:
|
|
295
|
-
debouncedFilter:
|
|
296
|
-
errors:
|
|
297
|
-
toggleModal:
|
|
288
|
+
}, La = {
|
|
289
|
+
global: ja,
|
|
290
|
+
deleteModal: Ma,
|
|
291
|
+
baseForm: Oa,
|
|
292
|
+
baseTable: Ea,
|
|
293
|
+
baseConfigCard: Na,
|
|
294
|
+
filter: Ka,
|
|
295
|
+
debouncedFilter: qa,
|
|
296
|
+
errors: Ba,
|
|
297
|
+
toggleModal: Fa
|
|
298
298
|
};
|
|
299
299
|
function bt() {
|
|
300
|
-
const e = ht("en-us",
|
|
300
|
+
const e = ht("en-us", La);
|
|
301
301
|
return {
|
|
302
302
|
i18n: e,
|
|
303
303
|
i18nT: mn(e)
|
|
@@ -348,69 +348,69 @@ function yn() {
|
|
|
348
348
|
isValidUuid: (t) => t ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(t) : !1
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function Ua(e, n, t, a = {
|
|
352
352
|
fetchedItemsKey: "data",
|
|
353
353
|
searchKeys: ["id"]
|
|
354
354
|
}) {
|
|
355
355
|
t || (t = "100");
|
|
356
356
|
const { axiosInstance: r } = vt({
|
|
357
357
|
headers: e.requestHeaders
|
|
358
|
-
}), { i18n: { t: o } } = bt(), { debounce: i } =
|
|
359
|
-
await
|
|
360
|
-
}, 200), s = E(!1), u = E(""), p = E(""), c = E([]),
|
|
358
|
+
}), { i18n: { t: o } } = bt(), { debounce: i } = xa(), l = i(async (S) => {
|
|
359
|
+
await L(S);
|
|
360
|
+
}, 200), s = E(!1), u = E(""), p = E(""), c = E([]), y = E([]), d = E(void 0), w = m(n);
|
|
361
361
|
let v = `${e.apiBaseUrl}${w}`;
|
|
362
362
|
e.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
363
|
-
const { isValidUuid:
|
|
363
|
+
const { isValidUuid: _ } = yn(), h = async () => {
|
|
364
364
|
try {
|
|
365
365
|
s.value = !0;
|
|
366
366
|
const { data: S } = await r.get(`${v}?size=${t}`);
|
|
367
|
-
S != null && S.next || (d.value = a.fetchedItemsKey in S ? S[a.fetchedItemsKey] : []),
|
|
367
|
+
S != null && S.next || (d.value = a.fetchedItemsKey in S ? S[a.fetchedItemsKey] : []), y.value = a.fetchedItemsKey in S ? S[a.fetchedItemsKey] : [], c.value = y.value;
|
|
368
368
|
} catch {
|
|
369
369
|
c.value = [], u.value = o("debouncedFilter.errors.fetch");
|
|
370
370
|
} finally {
|
|
371
371
|
s.value = !1;
|
|
372
372
|
}
|
|
373
|
-
}, C = E(""),
|
|
374
|
-
var
|
|
373
|
+
}, C = E(""), L = async (S) => {
|
|
374
|
+
var q, k, U;
|
|
375
375
|
if (C.value !== S)
|
|
376
376
|
if (C.value = S || "", d.value === void 0)
|
|
377
377
|
try {
|
|
378
378
|
if (s.value = !0, u.value = "", p.value = "", e.app === "konnect") {
|
|
379
|
-
let
|
|
380
|
-
S && (
|
|
381
|
-
const { data: b } = await r.get(`${
|
|
379
|
+
let N = v + "";
|
|
380
|
+
S && (N += `/${S}`);
|
|
381
|
+
const { data: b } = await r.get(`${N}?size=${t}`);
|
|
382
382
|
a.fetchedItemsKey in b ? c.value = b[a.fetchedItemsKey] : b != null && b.id ? c.value = [b] : c.value = [];
|
|
383
383
|
} else if (S) {
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
const { data:
|
|
387
|
-
return [
|
|
388
|
-
})()) :
|
|
389
|
-
...a.searchKeys.filter((
|
|
390
|
-
const { data: V } = await r.get(`${v}?${
|
|
384
|
+
const N = [];
|
|
385
|
+
_(S) && a.searchKeys.includes("id") ? N.push((async () => {
|
|
386
|
+
const { data: B } = await r.get(`${v}/${S}`);
|
|
387
|
+
return [B[a.fetchedItemsKey] ?? B];
|
|
388
|
+
})()) : N.push(
|
|
389
|
+
...a.searchKeys.filter((B) => B !== "id").map(async (B) => {
|
|
390
|
+
const { data: V } = await r.get(`${v}?${B}=${S}`);
|
|
391
391
|
return V[a.fetchedItemsKey];
|
|
392
392
|
})
|
|
393
393
|
);
|
|
394
|
-
const b = await Promise.all(
|
|
395
|
-
c.value = [], (
|
|
394
|
+
const b = await Promise.all(N), I = /* @__PURE__ */ new Set();
|
|
395
|
+
c.value = [], (q = b == null ? void 0 : b.forEach) == null || q.call(b, (B) => {
|
|
396
396
|
var V;
|
|
397
|
-
(V =
|
|
398
|
-
I.has(
|
|
397
|
+
(V = B == null ? void 0 : B.forEach) == null || V.call(B, (x) => {
|
|
398
|
+
I.has(x.id) || (I.add(x.id), c.value.push(x));
|
|
399
399
|
});
|
|
400
400
|
});
|
|
401
401
|
} else
|
|
402
|
-
c.value =
|
|
403
|
-
} catch (
|
|
404
|
-
((k =
|
|
402
|
+
c.value = y.value;
|
|
403
|
+
} catch (N) {
|
|
404
|
+
((k = N == null ? void 0 : N.response) == null ? void 0 : k.status) === 404 ? p.value = o("debouncedFilter.errors.invalid") : (c.value = [], u.value = o("debouncedFilter.errors.fetch"));
|
|
405
405
|
} finally {
|
|
406
406
|
s.value = !1;
|
|
407
407
|
}
|
|
408
408
|
else
|
|
409
|
-
s.value = !0, p.value = "", S ? (c.value = (
|
|
409
|
+
s.value = !0, p.value = "", S ? (c.value = (U = d.value) == null ? void 0 : U.filter((N) => {
|
|
410
410
|
var b;
|
|
411
411
|
let I = !1;
|
|
412
|
-
for (const
|
|
413
|
-
const V = typeof B
|
|
412
|
+
for (const B of a.searchKeys) {
|
|
413
|
+
const V = typeof N[B] == "string" ? (b = N[B]) == null ? void 0 : b.toLowerCase() : N[B];
|
|
414
414
|
V != null && V.includes(S.toLowerCase()) && (I = !0);
|
|
415
415
|
}
|
|
416
416
|
return I;
|
|
@@ -422,17 +422,17 @@ function La(e, n, t, a = {
|
|
|
422
422
|
validationError: p,
|
|
423
423
|
results: c,
|
|
424
424
|
allRecords: d,
|
|
425
|
-
loadItems:
|
|
425
|
+
loadItems: h,
|
|
426
426
|
debouncedQueryChange: l
|
|
427
427
|
};
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
const t = m(n), a =
|
|
429
|
+
function Pa(e, n) {
|
|
430
|
+
const t = m(n), a = T(
|
|
431
431
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
432
432
|
);
|
|
433
433
|
return a.value.search = "", (r) => `${a.value.href}/${r}`;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function Da() {
|
|
436
436
|
const { i18n: { t: e } } = bt();
|
|
437
437
|
return {
|
|
438
438
|
getMessageFromError: (n) => {
|
|
@@ -460,7 +460,7 @@ function Pa() {
|
|
|
460
460
|
}
|
|
461
461
|
};
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function Va(e) {
|
|
464
464
|
const n = window.location.origin, t = n.endsWith("/") ? n : `${n}/`;
|
|
465
465
|
try {
|
|
466
466
|
const a = e.join("/"), r = `${t}${a}`, o = e.some((i) => i.trim() === "");
|
|
@@ -472,16 +472,16 @@ function Da(e) {
|
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
function hn(e, n) {
|
|
475
|
-
const t = E(m(e)), a = E(m(n)), r =
|
|
475
|
+
const t = E(m(e)), a = E(m(n)), r = T(
|
|
476
476
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
477
|
-
), o =
|
|
477
|
+
), o = T(
|
|
478
478
|
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
479
479
|
);
|
|
480
480
|
return (i) => {
|
|
481
|
-
const { page: l, pageSize: s, offset: u, sortColumnKey: p, sortColumnOrder: c, query:
|
|
481
|
+
const { page: l, pageSize: s, offset: u, sortColumnKey: p, sortColumnOrder: c, query: y } = i;
|
|
482
482
|
try {
|
|
483
483
|
let d = new URL(o.value.href);
|
|
484
|
-
return r.value &&
|
|
484
|
+
return r.value && y ? (d.search = "", d = t.value.app === "konnect" ? new URL(`${d.href}?filter[name][contains]=${y}`) : new URL(`${d.href}/${y}/`)) : (r.value || new URLSearchParams(y).forEach((w, v) => {
|
|
485
485
|
d.searchParams.append(v, w);
|
|
486
486
|
}), p && d.searchParams.append("sort_by", p), c === "desc" && d.searchParams.append("sort_desc", "1"), d.searchParams.append("size", String(s))), u && l !== 1 && d.searchParams.append("offset", String(u)), d.href;
|
|
487
487
|
} catch (d) {
|
|
@@ -489,7 +489,7 @@ function hn(e, n) {
|
|
|
489
489
|
}
|
|
490
490
|
};
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function Ra(e, n, t = "data") {
|
|
493
493
|
const a = m(n), { axiosInstance: r } = vt({
|
|
494
494
|
headers: e.requestHeaders
|
|
495
495
|
}), o = hn(e, a), i = E({
|
|
@@ -503,7 +503,7 @@ function Va(e, n, t = "data") {
|
|
|
503
503
|
const { data: u } = await r.get(s), p = t && t.replace(/[^\w-_]/gi, "");
|
|
504
504
|
let c;
|
|
505
505
|
u[p] && Array.isArray(u[p]) ? c = u[p] : Array.isArray(u) ? c = u : c = Object.keys(u).length ? [u] : [];
|
|
506
|
-
const
|
|
506
|
+
const y = {
|
|
507
507
|
data: c,
|
|
508
508
|
total: c.length,
|
|
509
509
|
...u.offset ? {
|
|
@@ -514,8 +514,8 @@ function Va(e, n, t = "data") {
|
|
|
514
514
|
};
|
|
515
515
|
return i.value = {
|
|
516
516
|
status: Se.Idle,
|
|
517
|
-
response:
|
|
518
|
-
},
|
|
517
|
+
response: y
|
|
518
|
+
}, y;
|
|
519
519
|
} catch (s) {
|
|
520
520
|
const u = {
|
|
521
521
|
data: [],
|
|
@@ -533,7 +533,7 @@ function Va(e, n, t = "data") {
|
|
|
533
533
|
}
|
|
534
534
|
}, fetcherState: i };
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function Ga() {
|
|
537
537
|
const e = (t, a = "_") => t ? t.split(a).map((r) => r.toLowerCase() === "id" ? r.toUpperCase() : r.charAt(0).toUpperCase() + r.substring(1)).join(" ") : "", n = /(?:^|[\s-:'"])\w/g;
|
|
538
538
|
return {
|
|
539
539
|
capitalize: (t) => t ? t.replace(n, (a) => a.toUpperCase()) : "",
|
|
@@ -550,24 +550,24 @@ const vn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
550
550
|
}, Lt = (e) => e === "*" || e === "x" || e === "X", Ut = (e) => {
|
|
551
551
|
const n = parseInt(e, 10);
|
|
552
552
|
return isNaN(n) ? e : n;
|
|
553
|
-
},
|
|
553
|
+
}, za = (e, n) => typeof e != typeof n ? [String(e), String(n)] : [e, n], Ha = (e, n) => {
|
|
554
554
|
if (Lt(e) || Lt(n))
|
|
555
555
|
return 0;
|
|
556
|
-
const [t, a] =
|
|
556
|
+
const [t, a] = za(Ut(e), Ut(n));
|
|
557
557
|
return t > a ? 1 : t < a ? -1 : 0;
|
|
558
558
|
}, Pt = (e, n) => {
|
|
559
559
|
for (let t = 0; t < Math.max(e.length, n.length); t++) {
|
|
560
|
-
const a =
|
|
560
|
+
const a = Ha(e[t] || "0", n[t] || "0");
|
|
561
561
|
if (a !== 0)
|
|
562
562
|
return a;
|
|
563
563
|
}
|
|
564
564
|
return 0;
|
|
565
|
-
},
|
|
565
|
+
}, Ja = (e, n) => {
|
|
566
566
|
const t = Ft(e), a = Ft(n), r = t.pop(), o = a.pop(), i = Pt(t, a);
|
|
567
567
|
return i !== 0 ? i : r && o ? Pt(r.split("."), o.split(".")) : r || o ? r ? -1 : 1 : 0;
|
|
568
568
|
}, Dt = (e, n, t) => {
|
|
569
|
-
|
|
570
|
-
const a =
|
|
569
|
+
Wa(t);
|
|
570
|
+
const a = Ja(e, n);
|
|
571
571
|
return bn[t].includes(a);
|
|
572
572
|
}, bn = {
|
|
573
573
|
">": [1],
|
|
@@ -576,18 +576,18 @@ const vn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
576
576
|
"<=": [-1, 0],
|
|
577
577
|
"<": [-1],
|
|
578
578
|
"!=": [-1, 1]
|
|
579
|
-
}, Vt = Object.keys(bn),
|
|
579
|
+
}, Vt = Object.keys(bn), Wa = (e) => {
|
|
580
580
|
if (typeof e != "string")
|
|
581
581
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
582
582
|
if (Vt.indexOf(e) === -1)
|
|
583
583
|
throw new Error(`Invalid operator, expected one of ${Vt.join("|")}`);
|
|
584
|
-
},
|
|
585
|
-
function
|
|
584
|
+
}, Ya = (e) => typeof e == "string" && /^[v\d]/.test(e) && vn.test(e);
|
|
585
|
+
function Za(e) {
|
|
586
586
|
const { gatewayInfo: n, supportedRange: t } = e;
|
|
587
587
|
if (!n)
|
|
588
588
|
return !0;
|
|
589
589
|
const { edition: a, version: r } = n;
|
|
590
|
-
if (!
|
|
590
|
+
if (!Ya(r))
|
|
591
591
|
return console.error("Invalid version"), !1;
|
|
592
592
|
const o = t[a];
|
|
593
593
|
if (!o)
|
|
@@ -595,48 +595,48 @@ function Ya(e) {
|
|
|
595
595
|
const [i, l] = o;
|
|
596
596
|
return !(i && Dt(r, i, "<") || l && Dt(r, l, ">"));
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function Qa(e) {
|
|
599
599
|
const n = E(0), t = E(0), a = E(!1);
|
|
600
600
|
return ve(e, (r) => {
|
|
601
601
|
r && !a.value && (n.value = r.offsetWidth, t.value = r.scrollWidth, a.value = !0);
|
|
602
602
|
}), {
|
|
603
|
-
isTruncated:
|
|
603
|
+
isTruncated: T(() => n.value < t.value)
|
|
604
604
|
};
|
|
605
605
|
}
|
|
606
606
|
const oe = {
|
|
607
607
|
useAxios: vt,
|
|
608
|
-
useDebouncedFilter:
|
|
609
|
-
useDeleteUrlBuilder:
|
|
610
|
-
useErrors:
|
|
611
|
-
useExternalLinkCreator:
|
|
612
|
-
useFetcher:
|
|
608
|
+
useDebouncedFilter: Ua,
|
|
609
|
+
useDeleteUrlBuilder: Pa,
|
|
610
|
+
useErrors: Da,
|
|
611
|
+
useExternalLinkCreator: Va,
|
|
612
|
+
useFetcher: Ra,
|
|
613
613
|
useFetchUrlBuilder: hn,
|
|
614
614
|
useHelpers: yn,
|
|
615
|
-
useStringHelpers:
|
|
615
|
+
useStringHelpers: Ga,
|
|
616
616
|
useI18n: bt,
|
|
617
|
-
useGatewayFeatureSupported:
|
|
618
|
-
useTruncationDetector:
|
|
619
|
-
},
|
|
617
|
+
useGatewayFeatureSupported: Za,
|
|
618
|
+
useTruncationDetector: Qa
|
|
619
|
+
}, Xa = {
|
|
620
620
|
fail: "Failed to copy id to clipboard",
|
|
621
621
|
success: {
|
|
622
622
|
prefix: "Successfully",
|
|
623
623
|
content: " copied to clipboard"
|
|
624
624
|
}
|
|
625
|
-
},
|
|
626
|
-
message:
|
|
627
|
-
iconTitle:
|
|
628
|
-
},
|
|
625
|
+
}, er = "Copy to clipboard", tr = {
|
|
626
|
+
message: Xa,
|
|
627
|
+
iconTitle: er
|
|
628
|
+
}, nr = "kong-ui-copy-uuid-notify", Rt = "24px", ar = (e, n) => {
|
|
629
629
|
const t = e.__vccOpts || e;
|
|
630
630
|
for (const [a, r] of n)
|
|
631
631
|
t[a] = r;
|
|
632
632
|
return t;
|
|
633
|
-
},
|
|
633
|
+
}, rr = (e) => (pn("data-v-ac7fcfb4"), e = e(), fn(), e), or = ["aria-hidden"], ir = {
|
|
634
634
|
key: 0,
|
|
635
635
|
"data-testid": "kui-icon-svg-title"
|
|
636
|
-
},
|
|
636
|
+
}, lr = /* @__PURE__ */ rr(() => /* @__PURE__ */ F("path", {
|
|
637
637
|
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",
|
|
638
638
|
fill: "currentColor"
|
|
639
|
-
}, null, -1)),
|
|
639
|
+
}, null, -1)), sr = /* @__PURE__ */ ne({
|
|
640
640
|
__name: "CopyIcon",
|
|
641
641
|
props: {
|
|
642
642
|
/** The accessibility text provided to screen readers */
|
|
@@ -688,7 +688,7 @@ const oe = {
|
|
|
688
688
|
}
|
|
689
689
|
},
|
|
690
690
|
setup(e) {
|
|
691
|
-
const n = e, t =
|
|
691
|
+
const n = e, t = T(() => {
|
|
692
692
|
if (typeof n.size == "number" && n.size > 0)
|
|
693
693
|
return `${n.size}px`;
|
|
694
694
|
if (typeof n.size == "string") {
|
|
@@ -697,7 +697,7 @@ const oe = {
|
|
|
697
697
|
return `${o}px`;
|
|
698
698
|
}
|
|
699
699
|
return Rt;
|
|
700
|
-
}), a =
|
|
700
|
+
}), a = T(() => ({
|
|
701
701
|
boxSizing: "border-box",
|
|
702
702
|
color: n.color,
|
|
703
703
|
display: n.display,
|
|
@@ -705,14 +705,14 @@ const oe = {
|
|
|
705
705
|
lineHeight: "0",
|
|
706
706
|
width: t.value
|
|
707
707
|
}));
|
|
708
|
-
return (r, o) => (f(),
|
|
708
|
+
return (r, o) => (f(), G(xe(e.as), {
|
|
709
709
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
710
710
|
class: "kui-icon copy-icon",
|
|
711
711
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
712
712
|
style: dn(a.value)
|
|
713
713
|
}, {
|
|
714
714
|
default: g(() => [
|
|
715
|
-
(f(),
|
|
715
|
+
(f(), $("svg", {
|
|
716
716
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
717
717
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
718
718
|
fill: "none",
|
|
@@ -722,14 +722,14 @@ const oe = {
|
|
|
722
722
|
width: "100%",
|
|
723
723
|
xmlns: "http://www.w3.org/2000/svg"
|
|
724
724
|
}, [
|
|
725
|
-
e.title ? (f(),
|
|
726
|
-
|
|
727
|
-
], 8,
|
|
725
|
+
e.title ? (f(), $("title", ir, j(e.title), 1)) : z("", !0),
|
|
726
|
+
lr
|
|
727
|
+
], 8, or))
|
|
728
728
|
]),
|
|
729
729
|
_: 1
|
|
730
730
|
}, 8, ["aria-hidden", "style"]));
|
|
731
731
|
}
|
|
732
|
-
}),
|
|
732
|
+
}), ur = /* @__PURE__ */ ar(sr, [["__scopeId", "data-v-ac7fcfb4"]]), cr = "16px", dr = { class: "kong-ui-copy-uuid" }, pr = ["onClick"], Gt = 15, fr = /* @__PURE__ */ ne({
|
|
733
733
|
__name: "CopyUuid",
|
|
734
734
|
props: {
|
|
735
735
|
uuid: {
|
|
@@ -773,26 +773,26 @@ const oe = {
|
|
|
773
773
|
},
|
|
774
774
|
emits: ["success", "error"],
|
|
775
775
|
setup(e, { emit: n }) {
|
|
776
|
-
const { t } = ht("en-us",
|
|
777
|
-
}), i =
|
|
776
|
+
const { t } = ht("en-us", tr), a = e, r = n, o = a.notify || ka(nr, () => {
|
|
777
|
+
}), i = T(() => a.idTooltip ? {
|
|
778
778
|
label: a.idTooltip,
|
|
779
779
|
positionFixed: !0,
|
|
780
780
|
placement: "bottomStart"
|
|
781
781
|
} : {
|
|
782
782
|
title: a.uuid
|
|
783
|
-
}), l =
|
|
783
|
+
}), l = T(() => !!(a.tooltip && a.successTooltip)), s = E(a.tooltip), u = T(() => a.tooltip ? {
|
|
784
784
|
label: s.value,
|
|
785
785
|
positionFixed: !0,
|
|
786
786
|
maxWidth: "500px",
|
|
787
787
|
placement: "bottomStart"
|
|
788
|
-
} : {}), p =
|
|
788
|
+
} : {}), p = T(() => {
|
|
789
789
|
var d;
|
|
790
790
|
return a.format === "redacted" ? "*****" : a.format === "deleted" ? `*${(d = a.uuid) == null ? void 0 : d.substring(0, 5)}` : a.uuid;
|
|
791
791
|
}), c = (d) => {
|
|
792
792
|
s.value = d, setTimeout(() => {
|
|
793
793
|
s.value = a.tooltip;
|
|
794
794
|
}, 1800);
|
|
795
|
-
},
|
|
795
|
+
}, y = (d) => {
|
|
796
796
|
var w, v;
|
|
797
797
|
if (!d(a.uuid)) {
|
|
798
798
|
typeof o == "function" && o({
|
|
@@ -801,16 +801,16 @@ const oe = {
|
|
|
801
801
|
}), l.value ? c(t("message.fail")) : r("error", a.uuid);
|
|
802
802
|
return;
|
|
803
803
|
}
|
|
804
|
-
const
|
|
804
|
+
const _ = ((w = a.uuid) == null ? void 0 : w.length) > Gt, h = a.format === "hidden" || a.format === "redacted" ? t("message.success.prefix") : `"${((v = a.uuid) == null ? void 0 : v.substring(0, Gt)) + (_ ? "..." : "")}"`;
|
|
805
805
|
typeof o == "function" && o({
|
|
806
806
|
type: "success",
|
|
807
|
-
message: `${
|
|
807
|
+
message: `${h}${t("message.success.content")}`
|
|
808
808
|
}), l.value ? c(a.successTooltip) : r("success", a.uuid);
|
|
809
809
|
};
|
|
810
810
|
return (d, w) => {
|
|
811
811
|
const v = D("KClipboardProvider");
|
|
812
|
-
return f(),
|
|
813
|
-
e.format !== "hidden" ? (f(),
|
|
812
|
+
return f(), $("div", dr, [
|
|
813
|
+
e.format !== "hidden" ? (f(), G(xe(e.idTooltip ? "KTooltip" : "div"), st({ key: 0 }, i.value, { "data-testid": "copy-id" }), {
|
|
814
814
|
default: g(() => [
|
|
815
815
|
F("div", {
|
|
816
816
|
class: Ie([
|
|
@@ -822,24 +822,24 @@ const oe = {
|
|
|
822
822
|
]),
|
|
823
823
|
_: 1
|
|
824
824
|
}, 16)) : z("", !0),
|
|
825
|
-
(f(),
|
|
825
|
+
(f(), G(xe(e.tooltip ? "KTooltip" : "div"), st(u.value, { class: "uuid-icon-wrapper" }), {
|
|
826
826
|
default: g(() => [
|
|
827
827
|
O(v, null, {
|
|
828
|
-
default: g(({ copyToClipboard:
|
|
828
|
+
default: g(({ copyToClipboard: _ }) => [
|
|
829
829
|
F("span", {
|
|
830
830
|
"data-testid": "copy-to-clipboard",
|
|
831
831
|
role: "button",
|
|
832
832
|
tabindex: "0",
|
|
833
|
-
onClick: Ge((
|
|
833
|
+
onClick: Ge((h) => y(_), ["stop"])
|
|
834
834
|
}, [
|
|
835
|
-
O(m(
|
|
835
|
+
O(m(ur), {
|
|
836
836
|
class: "uuid-icon",
|
|
837
837
|
color: e.iconColor,
|
|
838
838
|
decorative: !!e.tooltip,
|
|
839
|
-
size: m(
|
|
839
|
+
size: m(cr),
|
|
840
840
|
title: m(t)("iconTitle")
|
|
841
841
|
}, null, 8, ["color", "decorative", "size", "title"])
|
|
842
|
-
], 8,
|
|
842
|
+
], 8, pr)
|
|
843
843
|
]),
|
|
844
844
|
_: 1
|
|
845
845
|
})
|
|
@@ -849,15 +849,15 @@ const oe = {
|
|
|
849
849
|
]);
|
|
850
850
|
};
|
|
851
851
|
}
|
|
852
|
-
}),
|
|
852
|
+
}), mr = (e, n) => {
|
|
853
853
|
const t = e.__vccOpts || e;
|
|
854
854
|
for (const [a, r] of n)
|
|
855
855
|
t[a] = r;
|
|
856
856
|
return t;
|
|
857
|
-
}, Cn = /* @__PURE__ */ fr
|
|
857
|
+
}, Cn = /* @__PURE__ */ mr(fr, [["__scopeId", "data-v-0c07874b"]]), gr = {
|
|
858
858
|
key: 0,
|
|
859
859
|
class: "config-card-fieldset-title"
|
|
860
|
-
},
|
|
860
|
+
}, yr = /* @__PURE__ */ ne({
|
|
861
861
|
__name: "JsonCardItem",
|
|
862
862
|
props: {
|
|
863
863
|
item: {
|
|
@@ -874,21 +874,21 @@ const oe = {
|
|
|
874
874
|
}
|
|
875
875
|
},
|
|
876
876
|
setup(e) {
|
|
877
|
-
const n = e, { i18n: { t } } = oe.useI18n(), { convertKeyToTitle: a } = oe.useStringHelpers(), r =
|
|
877
|
+
const n = e, { i18n: { t } } = oe.useI18n(), { convertKeyToTitle: a } = oe.useStringHelpers(), r = T(() => n.item.key ?? "json-array-item"), o = T(() => n.item.value ?? n.item), i = T(() => {
|
|
878
878
|
const s = JSON.parse(JSON.stringify(o.value));
|
|
879
879
|
return n.isArrayItem && delete s.name, s;
|
|
880
|
-
}), l =
|
|
880
|
+
}), l = T(() => {
|
|
881
881
|
var s;
|
|
882
882
|
return n.isArrayItem ? (s = o.value) != null && s.name ? a(o.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
883
883
|
});
|
|
884
|
-
return (s, u) => (f(),
|
|
884
|
+
return (s, u) => (f(), G(xe(e.isArrayItem ? "fieldset" : "div"), {
|
|
885
885
|
class: Ie(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
886
886
|
}, {
|
|
887
887
|
default: g(() => [
|
|
888
|
-
e.isArrayItem ? (f(),
|
|
888
|
+
e.isArrayItem ? (f(), $("legend", gr, [
|
|
889
889
|
F("b", null, j(l.value), 1)
|
|
890
890
|
])) : z("", !0),
|
|
891
|
-
(f(!0),
|
|
891
|
+
(f(!0), $(me, null, pe(Object.keys(i.value), (p, c) => (f(), G(Ct, {
|
|
892
892
|
key: `${r.value}-property-${c}`,
|
|
893
893
|
item: {
|
|
894
894
|
key: p,
|
|
@@ -905,7 +905,7 @@ const oe = {
|
|
|
905
905
|
for (const [a, r] of n)
|
|
906
906
|
t[a] = r;
|
|
907
907
|
return t;
|
|
908
|
-
}, kn = /* @__PURE__ */ ge(
|
|
908
|
+
}, kn = /* @__PURE__ */ ge(yr, [["__scopeId", "data-v-68ca83ec"]]), hr = /* @__PURE__ */ ne({
|
|
909
909
|
__name: "InternalLinkItem",
|
|
910
910
|
props: {
|
|
911
911
|
item: {
|
|
@@ -918,7 +918,7 @@ const oe = {
|
|
|
918
918
|
const { i18n: { t: n } } = oe.useI18n();
|
|
919
919
|
return (t, a) => {
|
|
920
920
|
const r = D("KButton");
|
|
921
|
-
return f(),
|
|
921
|
+
return f(), $("div", null, [
|
|
922
922
|
O(r, {
|
|
923
923
|
appearance: "tertiary",
|
|
924
924
|
class: "navigation-button",
|
|
@@ -932,7 +932,7 @@ const oe = {
|
|
|
932
932
|
]);
|
|
933
933
|
};
|
|
934
934
|
}
|
|
935
|
-
}),
|
|
935
|
+
}), vr = /* @__PURE__ */ ge(hr, [["__scopeId", "data-v-c96811e5"]]), br = /* @__PURE__ */ ne({
|
|
936
936
|
__name: "StatusBadge",
|
|
937
937
|
props: {
|
|
938
938
|
status: {
|
|
@@ -944,7 +944,7 @@ const oe = {
|
|
|
944
944
|
const { i18n: { t: n } } = oe.useI18n();
|
|
945
945
|
return (t, a) => {
|
|
946
946
|
const r = D("KBadge");
|
|
947
|
-
return f(),
|
|
947
|
+
return f(), G(r, {
|
|
948
948
|
appearance: e.status ? "success" : "neutral"
|
|
949
949
|
}, {
|
|
950
950
|
default: g(() => [
|
|
@@ -954,11 +954,11 @@ const oe = {
|
|
|
954
954
|
}, 8, ["appearance"]);
|
|
955
955
|
};
|
|
956
956
|
}
|
|
957
|
-
}),
|
|
957
|
+
}), Cr = "#0044f4", kr = "#e0e4ea", wr = "#3a3f51", Ir = "1px", _r = "20px", Sr = { class: "config-card-details-row" }, Ar = ["data-testid"], xr = ["data-testid"], Tr = ["data-testid"], $r = ["data-testid"], jr = { key: 1 }, Mr = ["data-testid"], Or = ["data-testid"], Er = ["data-testid"], Nr = ["data-testid"], Kr = {
|
|
958
958
|
name: "ConfigCardItem",
|
|
959
|
-
components: { CopyUuid: Cn, JsonCardItem: kn, StatusBadge:
|
|
960
|
-
},
|
|
961
|
-
...
|
|
959
|
+
components: { CopyUuid: Cn, JsonCardItem: kn, StatusBadge: br, InternalLinkItem: vr }
|
|
960
|
+
}, qr = /* @__PURE__ */ ne({
|
|
961
|
+
...Kr,
|
|
962
962
|
props: {
|
|
963
963
|
item: {
|
|
964
964
|
type: Object,
|
|
@@ -978,12 +978,12 @@ const oe = {
|
|
|
978
978
|
emits: ["navigation-click"],
|
|
979
979
|
setup(e, { emit: n }) {
|
|
980
980
|
cn((w) => ({
|
|
981
|
-
"0da74440": p.value ? "none" : `solid ${m(
|
|
981
|
+
"0da74440": p.value ? "none" : `solid ${m(Ir)} ${m(kr)}`,
|
|
982
982
|
"02a039da": u.value && l.value ? "block" : "flex",
|
|
983
983
|
"690f3ced": u.value && l.value ? "100%" : t.slim ? "50%" : "25%",
|
|
984
984
|
"691182c8": u.value && l.value ? "100%" : t.slim ? "50%" : "75%"
|
|
985
985
|
}));
|
|
986
|
-
const t = e, a = n, r = Ze(), { i18n: { t: o, formatUnixTimeStamp: i } } = oe.useI18n(), l =
|
|
986
|
+
const t = e, a = n, r = Ze(), { i18n: { t: o, formatUnixTimeStamp: i } } = oe.useI18n(), l = T(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), s = T(() => !!(t.item.tooltip || r["label-tooltip"])), u = T(() => t.item.type === ee.Json || t.item.type === ee.JsonArray), p = T(() => t.item.type === ee.JsonArray), c = T(() => {
|
|
987
987
|
switch (t.item.type) {
|
|
988
988
|
case ee.ID:
|
|
989
989
|
return {
|
|
@@ -1109,16 +1109,16 @@ const oe = {
|
|
|
1109
1109
|
text: t.item.value
|
|
1110
1110
|
};
|
|
1111
1111
|
}
|
|
1112
|
-
}),
|
|
1112
|
+
}), y = E(), { isTruncated: d } = oe.useTruncationDetector(y);
|
|
1113
1113
|
return (w, v) => {
|
|
1114
|
-
const
|
|
1115
|
-
return f(),
|
|
1114
|
+
const _ = D("KLabel"), h = D("KBadge"), C = D("KTooltip");
|
|
1115
|
+
return f(), $("div", Sr, [
|
|
1116
1116
|
F("div", {
|
|
1117
1117
|
class: "config-card-details-label",
|
|
1118
1118
|
"data-testid": `${e.item.key}-label`
|
|
1119
1119
|
}, [
|
|
1120
1120
|
Z(w.$slots, "label", { item: e.item }, () => [
|
|
1121
|
-
O(
|
|
1121
|
+
O(_, { "tooltip-attributes": { maxWidth: "500px" } }, ke({
|
|
1122
1122
|
default: g(() => [
|
|
1123
1123
|
W(j(e.item.label) + " ", 1)
|
|
1124
1124
|
]),
|
|
@@ -1133,13 +1133,13 @@ const oe = {
|
|
|
1133
1133
|
Z(w.$slots, "label-tooltip", {}, () => [
|
|
1134
1134
|
W(j(e.item.tooltip), 1)
|
|
1135
1135
|
], !0)
|
|
1136
|
-
], 8,
|
|
1136
|
+
], 8, xr)
|
|
1137
1137
|
]),
|
|
1138
1138
|
key: "0"
|
|
1139
1139
|
} : void 0
|
|
1140
1140
|
]), 1024)
|
|
1141
1141
|
], !0)
|
|
1142
|
-
], 8,
|
|
1142
|
+
], 8, Ar),
|
|
1143
1143
|
F("div", {
|
|
1144
1144
|
class: "config-card-details-value",
|
|
1145
1145
|
"data-testid": `${e.item.key}-property-value`
|
|
@@ -1147,71 +1147,71 @@ const oe = {
|
|
|
1147
1147
|
Z(w.$slots, e.item.key, {
|
|
1148
1148
|
rowValue: e.item.value
|
|
1149
1149
|
}, () => [
|
|
1150
|
-
l.value ? (f(),
|
|
1151
|
-
(f(),
|
|
1150
|
+
l.value ? (f(), $("div", jr, [
|
|
1151
|
+
(f(), G(xe(c.value.tag), ha(va(c.value.attrs)), {
|
|
1152
1152
|
default: g(() => [
|
|
1153
|
-
c.value.additionalComponent === "KBadge" ? (f(),
|
|
1153
|
+
c.value.additionalComponent === "KBadge" ? (f(), $("div", {
|
|
1154
1154
|
key: 0,
|
|
1155
1155
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1156
1156
|
}, [
|
|
1157
|
-
(f(!0),
|
|
1157
|
+
(f(!0), $(me, null, pe(e.item.value, (L, S) => (f(), G(h, {
|
|
1158
1158
|
key: `${e.item.key}-badge-tag-${S}`,
|
|
1159
1159
|
class: "config-badge",
|
|
1160
1160
|
"data-testid": `${e.item.key}-badge-tag-${S}`,
|
|
1161
|
-
tooltip:
|
|
1161
|
+
tooltip: L,
|
|
1162
1162
|
"truncation-tooltip": ""
|
|
1163
1163
|
}, {
|
|
1164
1164
|
default: g(() => [
|
|
1165
|
-
W(j(
|
|
1165
|
+
W(j(L), 1)
|
|
1166
1166
|
]),
|
|
1167
1167
|
_: 2
|
|
1168
1168
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
1169
|
-
], 8,
|
|
1170
|
-
c.value.additionalComponent === "CopyUuid" ? (f(),
|
|
1169
|
+
], 8, Mr)) : z("", !0),
|
|
1170
|
+
c.value.additionalComponent === "CopyUuid" ? (f(), $("div", {
|
|
1171
1171
|
key: 1,
|
|
1172
1172
|
class: "copy-uuid-array",
|
|
1173
1173
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1174
1174
|
}, [
|
|
1175
|
-
(f(!0),
|
|
1175
|
+
(f(!0), $(me, null, pe(e.item.value, (L, S) => (f(), G(m(Cn), st(c.value.childAttrs, {
|
|
1176
1176
|
key: `${e.item.key}-copy-uuid-${S}`,
|
|
1177
1177
|
"data-testid": `${e.item.key}-copy-uuid-${S}`,
|
|
1178
|
-
uuid:
|
|
1178
|
+
uuid: L
|
|
1179
1179
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1180
|
-
], 8,
|
|
1180
|
+
], 8, Or)) : c.value.additionalComponent === "KMethodBadge" ? (f(), $("div", {
|
|
1181
1181
|
key: 2,
|
|
1182
1182
|
class: "method-badge-array",
|
|
1183
1183
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1184
1184
|
}, [
|
|
1185
|
-
(f(!0),
|
|
1185
|
+
(f(!0), $(me, null, pe(e.item.value, (L, S) => (f(), G(h, {
|
|
1186
1186
|
key: `${e.item.key}-badge-method-${S}`,
|
|
1187
|
-
appearance: Object.values(m(
|
|
1187
|
+
appearance: Object.values(m(Ia)).includes(L.toLowerCase()) ? L.toLowerCase() : "custom",
|
|
1188
1188
|
class: "config-badge",
|
|
1189
1189
|
"data-testid": `${e.item.key}-badge-method-${S}`
|
|
1190
1190
|
}, {
|
|
1191
1191
|
default: g(() => [
|
|
1192
|
-
W(j(
|
|
1192
|
+
W(j(L), 1)
|
|
1193
1193
|
]),
|
|
1194
1194
|
_: 2
|
|
1195
1195
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1196
|
-
], 8,
|
|
1197
|
-
c.value.additionalComponent === "JsonCardItem" ? (f(),
|
|
1196
|
+
], 8, Er)) : z("", !0),
|
|
1197
|
+
c.value.additionalComponent === "JsonCardItem" ? (f(), $("div", {
|
|
1198
1198
|
key: 3,
|
|
1199
1199
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1200
1200
|
}, [
|
|
1201
|
-
(f(!0),
|
|
1201
|
+
(f(!0), $(me, null, pe(e.item.value, (L, S) => (f(), G(kn, {
|
|
1202
1202
|
key: `json-array-item-${S}`,
|
|
1203
1203
|
index: S,
|
|
1204
1204
|
"is-array-item": "",
|
|
1205
|
-
item:
|
|
1205
|
+
item: L
|
|
1206
1206
|
}, null, 8, ["index", "item"]))), 128))
|
|
1207
|
-
], 8,
|
|
1207
|
+
], 8, Nr)) : (f(), G(C, {
|
|
1208
1208
|
key: 4,
|
|
1209
1209
|
label: m(d) ? e.item.value : ""
|
|
1210
1210
|
}, {
|
|
1211
1211
|
default: g(() => [
|
|
1212
1212
|
F("span", {
|
|
1213
1213
|
ref_key: "textContent",
|
|
1214
|
-
ref:
|
|
1214
|
+
ref: y,
|
|
1215
1215
|
class: Ie(["attrs-data-text", { truncated: e.truncated }])
|
|
1216
1216
|
}, j(c.value.text), 3)
|
|
1217
1217
|
]),
|
|
@@ -1220,49 +1220,49 @@ const oe = {
|
|
|
1220
1220
|
]),
|
|
1221
1221
|
_: 1
|
|
1222
1222
|
}, 16))
|
|
1223
|
-
])) : (f(),
|
|
1223
|
+
])) : (f(), $("div", {
|
|
1224
1224
|
key: 0,
|
|
1225
1225
|
"data-testid": `${e.item.key}-no-value`
|
|
1226
|
-
}, " – ", 8,
|
|
1226
|
+
}, " – ", 8, $r))
|
|
1227
1227
|
], !0)
|
|
1228
|
-
], 8,
|
|
1228
|
+
], 8, Tr)
|
|
1229
1229
|
]);
|
|
1230
1230
|
};
|
|
1231
1231
|
}
|
|
1232
|
-
}), Ct = /* @__PURE__ */ ge(
|
|
1232
|
+
}), Ct = /* @__PURE__ */ ge(qr, [["__scopeId", "data-v-9c87856b"]]);
|
|
1233
1233
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1234
1234
|
function wn(e) {
|
|
1235
1235
|
return typeof e > "u" || e === null;
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1237
|
+
function Br(e) {
|
|
1238
1238
|
return typeof e == "object" && e !== null;
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1240
|
+
function Fr(e) {
|
|
1241
1241
|
return Array.isArray(e) ? e : wn(e) ? [] : [e];
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function Lr(e, n) {
|
|
1244
1244
|
var t, a, r, o;
|
|
1245
1245
|
if (n)
|
|
1246
1246
|
for (o = Object.keys(n), t = 0, a = o.length; t < a; t += 1)
|
|
1247
1247
|
r = o[t], e[r] = n[r];
|
|
1248
1248
|
return e;
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function Ur(e, n) {
|
|
1251
1251
|
var t = "", a;
|
|
1252
1252
|
for (a = 0; a < n; a += 1)
|
|
1253
1253
|
t += e;
|
|
1254
1254
|
return t;
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function Pr(e) {
|
|
1257
1257
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1258
1258
|
}
|
|
1259
|
-
var
|
|
1260
|
-
isNothing:
|
|
1261
|
-
isObject:
|
|
1262
|
-
toArray:
|
|
1263
|
-
repeat:
|
|
1264
|
-
isNegativeZero:
|
|
1265
|
-
extend:
|
|
1259
|
+
var Dr = wn, Vr = Br, Rr = Fr, Gr = Ur, zr = Pr, Hr = Lr, re = {
|
|
1260
|
+
isNothing: Dr,
|
|
1261
|
+
isObject: Vr,
|
|
1262
|
+
toArray: Rr,
|
|
1263
|
+
repeat: Gr,
|
|
1264
|
+
isNegativeZero: zr,
|
|
1265
|
+
extend: Hr
|
|
1266
1266
|
};
|
|
1267
1267
|
function In(e, n) {
|
|
1268
1268
|
var t = "", a = e.reason || "(unknown reason)";
|
|
@@ -1290,7 +1290,7 @@ function ot(e, n, t, a, r) {
|
|
|
1290
1290
|
function it(e, n) {
|
|
1291
1291
|
return re.repeat(" ", n - e.length) + e;
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function Jr(e, n) {
|
|
1294
1294
|
if (n = Object.create(n || null), !e.buffer)
|
|
1295
1295
|
return null;
|
|
1296
1296
|
n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2);
|
|
@@ -1320,7 +1320,7 @@ function Hr(e, n) {
|
|
|
1320
1320
|
`;
|
|
1321
1321
|
return l.replace(/\n$/, "");
|
|
1322
1322
|
}
|
|
1323
|
-
var
|
|
1323
|
+
var Wr = Jr, Yr = [
|
|
1324
1324
|
"kind",
|
|
1325
1325
|
"multi",
|
|
1326
1326
|
"resolve",
|
|
@@ -1331,12 +1331,12 @@ var Jr = Hr, Wr = [
|
|
|
1331
1331
|
"representName",
|
|
1332
1332
|
"defaultStyle",
|
|
1333
1333
|
"styleAliases"
|
|
1334
|
-
],
|
|
1334
|
+
], Zr = [
|
|
1335
1335
|
"scalar",
|
|
1336
1336
|
"sequence",
|
|
1337
1337
|
"mapping"
|
|
1338
1338
|
];
|
|
1339
|
-
function
|
|
1339
|
+
function Qr(e) {
|
|
1340
1340
|
var n = {};
|
|
1341
1341
|
return e !== null && Object.keys(e).forEach(function(t) {
|
|
1342
1342
|
e[t].forEach(function(a) {
|
|
@@ -1344,18 +1344,18 @@ function Zr(e) {
|
|
|
1344
1344
|
});
|
|
1345
1345
|
}), n;
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function Xr(e, n) {
|
|
1348
1348
|
if (n = n || {}, Object.keys(n).forEach(function(t) {
|
|
1349
|
-
if (
|
|
1349
|
+
if (Yr.indexOf(t) === -1)
|
|
1350
1350
|
throw new se('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1351
1351
|
}), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
|
|
1352
1352
|
return !0;
|
|
1353
1353
|
}, this.construct = n.construct || function(t) {
|
|
1354
1354
|
return t;
|
|
1355
|
-
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases =
|
|
1355
|
+
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = Qr(n.styleAliases || null), Zr.indexOf(this.kind) === -1)
|
|
1356
1356
|
throw new se('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1357
1357
|
}
|
|
1358
|
-
var ie =
|
|
1358
|
+
var ie = Xr;
|
|
1359
1359
|
function zt(e, n) {
|
|
1360
1360
|
var t = [];
|
|
1361
1361
|
return e[n].forEach(function(a) {
|
|
@@ -1365,7 +1365,7 @@ function zt(e, n) {
|
|
|
1365
1365
|
}), t[r] = a;
|
|
1366
1366
|
}), t;
|
|
1367
1367
|
}
|
|
1368
|
-
function
|
|
1368
|
+
function eo() {
|
|
1369
1369
|
var e = {
|
|
1370
1370
|
scalar: {},
|
|
1371
1371
|
sequence: {},
|
|
@@ -1410,7 +1410,7 @@ ct.prototype.extend = function(e) {
|
|
|
1410
1410
|
throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1411
1411
|
});
|
|
1412
1412
|
var a = Object.create(ct.prototype);
|
|
1413
|
-
return a.implicit = (this.implicit || []).concat(n), a.explicit = (this.explicit || []).concat(t), a.compiledImplicit = zt(a, "implicit"), a.compiledExplicit = zt(a, "explicit"), a.compiledTypeMap =
|
|
1413
|
+
return a.implicit = (this.implicit || []).concat(n), a.explicit = (this.explicit || []).concat(t), a.compiledImplicit = zt(a, "implicit"), a.compiledExplicit = zt(a, "explicit"), a.compiledTypeMap = eo(a.compiledImplicit, a.compiledExplicit), a;
|
|
1414
1414
|
};
|
|
1415
1415
|
var _n = ct, Sn = new ie("tag:yaml.org,2002:str", {
|
|
1416
1416
|
kind: "scalar",
|
|
@@ -1434,23 +1434,23 @@ var _n = ct, Sn = new ie("tag:yaml.org,2002:str", {
|
|
|
1434
1434
|
xn
|
|
1435
1435
|
]
|
|
1436
1436
|
});
|
|
1437
|
-
function
|
|
1437
|
+
function to(e) {
|
|
1438
1438
|
if (e === null)
|
|
1439
1439
|
return !0;
|
|
1440
1440
|
var n = e.length;
|
|
1441
1441
|
return n === 1 && e === "~" || n === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1442
1442
|
}
|
|
1443
|
-
function
|
|
1443
|
+
function no() {
|
|
1444
1444
|
return null;
|
|
1445
1445
|
}
|
|
1446
|
-
function
|
|
1446
|
+
function ao(e) {
|
|
1447
1447
|
return e === null;
|
|
1448
1448
|
}
|
|
1449
1449
|
var $n = new ie("tag:yaml.org,2002:null", {
|
|
1450
1450
|
kind: "scalar",
|
|
1451
|
-
resolve:
|
|
1452
|
-
construct:
|
|
1453
|
-
predicate:
|
|
1451
|
+
resolve: to,
|
|
1452
|
+
construct: no,
|
|
1453
|
+
predicate: ao,
|
|
1454
1454
|
represent: {
|
|
1455
1455
|
canonical: function() {
|
|
1456
1456
|
return "~";
|
|
@@ -1470,23 +1470,23 @@ var $n = new ie("tag:yaml.org,2002:null", {
|
|
|
1470
1470
|
},
|
|
1471
1471
|
defaultStyle: "lowercase"
|
|
1472
1472
|
});
|
|
1473
|
-
function
|
|
1473
|
+
function ro(e) {
|
|
1474
1474
|
if (e === null)
|
|
1475
1475
|
return !1;
|
|
1476
1476
|
var n = e.length;
|
|
1477
1477
|
return n === 4 && (e === "true" || e === "True" || e === "TRUE") || n === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1478
1478
|
}
|
|
1479
|
-
function
|
|
1479
|
+
function oo(e) {
|
|
1480
1480
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1481
1481
|
}
|
|
1482
|
-
function
|
|
1482
|
+
function io(e) {
|
|
1483
1483
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1484
1484
|
}
|
|
1485
1485
|
var jn = new ie("tag:yaml.org,2002:bool", {
|
|
1486
1486
|
kind: "scalar",
|
|
1487
|
-
resolve:
|
|
1488
|
-
construct:
|
|
1489
|
-
predicate:
|
|
1487
|
+
resolve: ro,
|
|
1488
|
+
construct: oo,
|
|
1489
|
+
predicate: io,
|
|
1490
1490
|
represent: {
|
|
1491
1491
|
lowercase: function(e) {
|
|
1492
1492
|
return e ? "true" : "false";
|
|
@@ -1500,16 +1500,16 @@ var jn = new ie("tag:yaml.org,2002:bool", {
|
|
|
1500
1500
|
},
|
|
1501
1501
|
defaultStyle: "lowercase"
|
|
1502
1502
|
});
|
|
1503
|
-
function
|
|
1503
|
+
function lo(e) {
|
|
1504
1504
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1505
1505
|
}
|
|
1506
|
-
function
|
|
1506
|
+
function so(e) {
|
|
1507
1507
|
return 48 <= e && e <= 55;
|
|
1508
1508
|
}
|
|
1509
|
-
function
|
|
1509
|
+
function uo(e) {
|
|
1510
1510
|
return 48 <= e && e <= 57;
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1512
|
+
function co(e) {
|
|
1513
1513
|
if (e === null)
|
|
1514
1514
|
return !1;
|
|
1515
1515
|
var n = e.length, t = 0, a = !1, r;
|
|
@@ -1530,7 +1530,7 @@ function uo(e) {
|
|
|
1530
1530
|
if (r === "x") {
|
|
1531
1531
|
for (t++; t < n; t++)
|
|
1532
1532
|
if (r = e[t], r !== "_") {
|
|
1533
|
-
if (!
|
|
1533
|
+
if (!lo(e.charCodeAt(t)))
|
|
1534
1534
|
return !1;
|
|
1535
1535
|
a = !0;
|
|
1536
1536
|
}
|
|
@@ -1539,7 +1539,7 @@ function uo(e) {
|
|
|
1539
1539
|
if (r === "o") {
|
|
1540
1540
|
for (t++; t < n; t++)
|
|
1541
1541
|
if (r = e[t], r !== "_") {
|
|
1542
|
-
if (!
|
|
1542
|
+
if (!so(e.charCodeAt(t)))
|
|
1543
1543
|
return !1;
|
|
1544
1544
|
a = !0;
|
|
1545
1545
|
}
|
|
@@ -1550,13 +1550,13 @@ function uo(e) {
|
|
|
1550
1550
|
return !1;
|
|
1551
1551
|
for (; t < n; t++)
|
|
1552
1552
|
if (r = e[t], r !== "_") {
|
|
1553
|
-
if (!
|
|
1553
|
+
if (!uo(e.charCodeAt(t)))
|
|
1554
1554
|
return !1;
|
|
1555
1555
|
a = !0;
|
|
1556
1556
|
}
|
|
1557
1557
|
return !(!a || r === "_");
|
|
1558
1558
|
}
|
|
1559
|
-
function
|
|
1559
|
+
function po(e) {
|
|
1560
1560
|
var n = e, t = 1, a;
|
|
1561
1561
|
if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")), a = n[0], (a === "-" || a === "+") && (a === "-" && (t = -1), n = n.slice(1), a = n[0]), n === "0")
|
|
1562
1562
|
return 0;
|
|
@@ -1570,14 +1570,14 @@ function co(e) {
|
|
|
1570
1570
|
}
|
|
1571
1571
|
return t * parseInt(n, 10);
|
|
1572
1572
|
}
|
|
1573
|
-
function
|
|
1573
|
+
function fo(e) {
|
|
1574
1574
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !re.isNegativeZero(e);
|
|
1575
1575
|
}
|
|
1576
1576
|
var Mn = new ie("tag:yaml.org,2002:int", {
|
|
1577
1577
|
kind: "scalar",
|
|
1578
|
-
resolve:
|
|
1579
|
-
construct:
|
|
1580
|
-
predicate:
|
|
1578
|
+
resolve: co,
|
|
1579
|
+
construct: po,
|
|
1580
|
+
predicate: fo,
|
|
1581
1581
|
represent: {
|
|
1582
1582
|
binary: function(e) {
|
|
1583
1583
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1600,21 +1600,21 @@ var Mn = new ie("tag:yaml.org,2002:int", {
|
|
|
1600
1600
|
decimal: [10, "dec"],
|
|
1601
1601
|
hexadecimal: [16, "hex"]
|
|
1602
1602
|
}
|
|
1603
|
-
}),
|
|
1603
|
+
}), mo = new RegExp(
|
|
1604
1604
|
// 2.5e4, 2.5 and integers
|
|
1605
1605
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1606
1606
|
);
|
|
1607
|
-
function
|
|
1608
|
-
return !(e === null || !
|
|
1607
|
+
function go(e) {
|
|
1608
|
+
return !(e === null || !mo.test(e) || // Quick hack to not allow integers end with `_`
|
|
1609
1609
|
// Probably should update regexp & check speed
|
|
1610
1610
|
e[e.length - 1] === "_");
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1612
|
+
function yo(e) {
|
|
1613
1613
|
var n, t;
|
|
1614
1614
|
return n = e.replace(/_/g, "").toLowerCase(), t = n[0] === "-" ? -1 : 1, "+-".indexOf(n[0]) >= 0 && (n = n.slice(1)), n === ".inf" ? t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : n === ".nan" ? NaN : t * parseFloat(n, 10);
|
|
1615
1615
|
}
|
|
1616
|
-
var
|
|
1617
|
-
function
|
|
1616
|
+
var ho = /^[-+]?[0-9]+e/;
|
|
1617
|
+
function vo(e, n) {
|
|
1618
1618
|
var t;
|
|
1619
1619
|
if (isNaN(e))
|
|
1620
1620
|
switch (n) {
|
|
@@ -1645,17 +1645,17 @@ function ho(e, n) {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
else if (re.isNegativeZero(e))
|
|
1647
1647
|
return "-0.0";
|
|
1648
|
-
return t = e.toString(10),
|
|
1648
|
+
return t = e.toString(10), ho.test(t) ? t.replace("e", ".e") : t;
|
|
1649
1649
|
}
|
|
1650
|
-
function
|
|
1650
|
+
function bo(e) {
|
|
1651
1651
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || re.isNegativeZero(e));
|
|
1652
1652
|
}
|
|
1653
1653
|
var On = new ie("tag:yaml.org,2002:float", {
|
|
1654
1654
|
kind: "scalar",
|
|
1655
|
-
resolve:
|
|
1656
|
-
construct:
|
|
1657
|
-
predicate:
|
|
1658
|
-
represent:
|
|
1655
|
+
resolve: go,
|
|
1656
|
+
construct: yo,
|
|
1657
|
+
predicate: bo,
|
|
1658
|
+
represent: vo,
|
|
1659
1659
|
defaultStyle: "lowercase"
|
|
1660
1660
|
}), En = Tn.extend({
|
|
1661
1661
|
implicit: [
|
|
@@ -1669,11 +1669,11 @@ var On = new ie("tag:yaml.org,2002:float", {
|
|
|
1669
1669
|
), qn = new RegExp(
|
|
1670
1670
|
"^([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]))?))?$"
|
|
1671
1671
|
);
|
|
1672
|
-
function
|
|
1672
|
+
function Co(e) {
|
|
1673
1673
|
return e === null ? !1 : Kn.exec(e) !== null || qn.exec(e) !== null;
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1676
|
-
var n, t, a, r, o, i, l, s = 0, u = null, p, c,
|
|
1675
|
+
function ko(e) {
|
|
1676
|
+
var n, t, a, r, o, i, l, s = 0, u = null, p, c, y;
|
|
1677
1677
|
if (n = Kn.exec(e), n === null && (n = qn.exec(e)), n === null)
|
|
1678
1678
|
throw new Error("Date resolve error");
|
|
1679
1679
|
if (t = +n[1], a = +n[2] - 1, r = +n[3], !n[4])
|
|
@@ -1683,27 +1683,27 @@ function Co(e) {
|
|
|
1683
1683
|
s += "0";
|
|
1684
1684
|
s = +s;
|
|
1685
1685
|
}
|
|
1686
|
-
return n[9] && (p = +n[10], c = +(n[11] || 0), u = (p * 60 + c) * 6e4, n[9] === "-" && (u = -u)),
|
|
1686
|
+
return n[9] && (p = +n[10], c = +(n[11] || 0), u = (p * 60 + c) * 6e4, n[9] === "-" && (u = -u)), y = new Date(Date.UTC(t, a, r, o, i, l, s)), u && y.setTime(y.getTime() - u), y;
|
|
1687
1687
|
}
|
|
1688
|
-
function
|
|
1688
|
+
function wo(e) {
|
|
1689
1689
|
return e.toISOString();
|
|
1690
1690
|
}
|
|
1691
1691
|
var Bn = new ie("tag:yaml.org,2002:timestamp", {
|
|
1692
1692
|
kind: "scalar",
|
|
1693
|
-
resolve:
|
|
1694
|
-
construct:
|
|
1693
|
+
resolve: Co,
|
|
1694
|
+
construct: ko,
|
|
1695
1695
|
instanceOf: Date,
|
|
1696
|
-
represent:
|
|
1696
|
+
represent: wo
|
|
1697
1697
|
});
|
|
1698
|
-
function
|
|
1698
|
+
function Io(e) {
|
|
1699
1699
|
return e === "<<" || e === null;
|
|
1700
1700
|
}
|
|
1701
1701
|
var Fn = new ie("tag:yaml.org,2002:merge", {
|
|
1702
1702
|
kind: "scalar",
|
|
1703
|
-
resolve:
|
|
1703
|
+
resolve: Io
|
|
1704
1704
|
}), kt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1705
1705
|
\r`;
|
|
1706
|
-
function
|
|
1706
|
+
function _o(e) {
|
|
1707
1707
|
if (e === null)
|
|
1708
1708
|
return !1;
|
|
1709
1709
|
var n, t, a = 0, r = e.length, o = kt;
|
|
@@ -1715,37 +1715,37 @@ function Io(e) {
|
|
|
1715
1715
|
}
|
|
1716
1716
|
return a % 8 === 0;
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1718
|
+
function So(e) {
|
|
1719
1719
|
var n, t, a = e.replace(/[\r\n=]/g, ""), r = a.length, o = kt, i = 0, l = [];
|
|
1720
1720
|
for (n = 0; n < r; n++)
|
|
1721
1721
|
n % 4 === 0 && n && (l.push(i >> 16 & 255), l.push(i >> 8 & 255), l.push(i & 255)), i = i << 6 | o.indexOf(a.charAt(n));
|
|
1722
1722
|
return t = r % 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);
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1724
|
+
function Ao(e) {
|
|
1725
1725
|
var n = "", t = 0, a, r, o = e.length, i = kt;
|
|
1726
1726
|
for (a = 0; a < o; a++)
|
|
1727
1727
|
a % 3 === 0 && a && (n += i[t >> 18 & 63], n += i[t >> 12 & 63], n += i[t >> 6 & 63], n += i[t & 63]), t = (t << 8) + e[a];
|
|
1728
1728
|
return r = o % 3, r === 0 ? (n += i[t >> 18 & 63], n += i[t >> 12 & 63], n += i[t >> 6 & 63], n += i[t & 63]) : r === 2 ? (n += i[t >> 10 & 63], n += i[t >> 4 & 63], n += i[t << 2 & 63], n += i[64]) : r === 1 && (n += i[t >> 2 & 63], n += i[t << 4 & 63], n += i[64], n += i[64]), n;
|
|
1729
1729
|
}
|
|
1730
|
-
function
|
|
1730
|
+
function xo(e) {
|
|
1731
1731
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1732
1732
|
}
|
|
1733
1733
|
var Ln = new ie("tag:yaml.org,2002:binary", {
|
|
1734
1734
|
kind: "scalar",
|
|
1735
|
-
resolve:
|
|
1736
|
-
construct:
|
|
1737
|
-
predicate:
|
|
1738
|
-
represent:
|
|
1739
|
-
}),
|
|
1740
|
-
function
|
|
1735
|
+
resolve: _o,
|
|
1736
|
+
construct: So,
|
|
1737
|
+
predicate: xo,
|
|
1738
|
+
represent: Ao
|
|
1739
|
+
}), To = Object.prototype.hasOwnProperty, $o = Object.prototype.toString;
|
|
1740
|
+
function jo(e) {
|
|
1741
1741
|
if (e === null)
|
|
1742
1742
|
return !0;
|
|
1743
1743
|
var n = [], t, a, r, o, i, l = e;
|
|
1744
1744
|
for (t = 0, a = l.length; t < a; t += 1) {
|
|
1745
|
-
if (r = l[t], i = !1,
|
|
1745
|
+
if (r = l[t], i = !1, $o.call(r) !== "[object Object]")
|
|
1746
1746
|
return !1;
|
|
1747
1747
|
for (o in r)
|
|
1748
|
-
if (
|
|
1748
|
+
if (To.call(r, o))
|
|
1749
1749
|
if (!i)
|
|
1750
1750
|
i = !0;
|
|
1751
1751
|
else
|
|
@@ -1759,26 +1759,26 @@ function $o(e) {
|
|
|
1759
1759
|
}
|
|
1760
1760
|
return !0;
|
|
1761
1761
|
}
|
|
1762
|
-
function
|
|
1762
|
+
function Mo(e) {
|
|
1763
1763
|
return e !== null ? e : [];
|
|
1764
1764
|
}
|
|
1765
1765
|
var Un = new ie("tag:yaml.org,2002:omap", {
|
|
1766
1766
|
kind: "sequence",
|
|
1767
|
-
resolve:
|
|
1768
|
-
construct:
|
|
1769
|
-
}),
|
|
1770
|
-
function
|
|
1767
|
+
resolve: jo,
|
|
1768
|
+
construct: Mo
|
|
1769
|
+
}), Oo = Object.prototype.toString;
|
|
1770
|
+
function Eo(e) {
|
|
1771
1771
|
if (e === null)
|
|
1772
1772
|
return !0;
|
|
1773
1773
|
var n, t, a, r, o, i = e;
|
|
1774
1774
|
for (o = new Array(i.length), n = 0, t = i.length; n < t; n += 1) {
|
|
1775
|
-
if (a = i[n],
|
|
1775
|
+
if (a = i[n], Oo.call(a) !== "[object Object]" || (r = Object.keys(a), r.length !== 1))
|
|
1776
1776
|
return !1;
|
|
1777
1777
|
o[n] = [r[0], a[r[0]]];
|
|
1778
1778
|
}
|
|
1779
1779
|
return !0;
|
|
1780
1780
|
}
|
|
1781
|
-
function
|
|
1781
|
+
function No(e) {
|
|
1782
1782
|
if (e === null)
|
|
1783
1783
|
return [];
|
|
1784
1784
|
var n, t, a, r, o, i = e;
|
|
@@ -1788,25 +1788,25 @@ function Eo(e) {
|
|
|
1788
1788
|
}
|
|
1789
1789
|
var Pn = new ie("tag:yaml.org,2002:pairs", {
|
|
1790
1790
|
kind: "sequence",
|
|
1791
|
-
resolve:
|
|
1792
|
-
construct:
|
|
1793
|
-
}),
|
|
1794
|
-
function
|
|
1791
|
+
resolve: Eo,
|
|
1792
|
+
construct: No
|
|
1793
|
+
}), Ko = Object.prototype.hasOwnProperty;
|
|
1794
|
+
function qo(e) {
|
|
1795
1795
|
if (e === null)
|
|
1796
1796
|
return !0;
|
|
1797
1797
|
var n, t = e;
|
|
1798
1798
|
for (n in t)
|
|
1799
|
-
if (
|
|
1799
|
+
if (Ko.call(t, n) && t[n] !== null)
|
|
1800
1800
|
return !1;
|
|
1801
1801
|
return !0;
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1803
|
+
function Bo(e) {
|
|
1804
1804
|
return e !== null ? e : {};
|
|
1805
1805
|
}
|
|
1806
1806
|
var Dn = new ie("tag:yaml.org,2002:set", {
|
|
1807
1807
|
kind: "mapping",
|
|
1808
|
-
resolve:
|
|
1809
|
-
construct:
|
|
1808
|
+
resolve: qo,
|
|
1809
|
+
construct: Bo
|
|
1810
1810
|
}), wt = Nn.extend({
|
|
1811
1811
|
implicit: [
|
|
1812
1812
|
Bn,
|
|
@@ -1818,7 +1818,7 @@ var Dn = new ie("tag:yaml.org,2002:set", {
|
|
|
1818
1818
|
Pn,
|
|
1819
1819
|
Dn
|
|
1820
1820
|
]
|
|
1821
|
-
}), _e = Object.prototype.hasOwnProperty, ze = 1, Vn = 2, Rn = 3, He = 4, lt = 1,
|
|
1821
|
+
}), _e = Object.prototype.hasOwnProperty, ze = 1, Vn = 2, Rn = 3, He = 4, lt = 1, Fo = 2, Ht = 3, Lo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Uo = /[\x85\u2028\u2029]/, Po = /[,\[\]\{\}]/, Gn = /^(?:!|!!|![a-z\-]+!)$/i, zn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1822
1822
|
function Jt(e) {
|
|
1823
1823
|
return Object.prototype.toString.call(e);
|
|
1824
1824
|
}
|
|
@@ -1834,21 +1834,21 @@ function fe(e) {
|
|
|
1834
1834
|
function Ee(e) {
|
|
1835
1835
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1836
1836
|
}
|
|
1837
|
-
function
|
|
1837
|
+
function Do(e) {
|
|
1838
1838
|
var n;
|
|
1839
1839
|
return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
1840
1840
|
}
|
|
1841
|
-
function
|
|
1841
|
+
function Vo(e) {
|
|
1842
1842
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1844
|
+
function Ro(e) {
|
|
1845
1845
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1846
1846
|
}
|
|
1847
1847
|
function Wt(e) {
|
|
1848
1848
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1849
1849
|
` : 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" : "";
|
|
1850
1850
|
}
|
|
1851
|
-
function
|
|
1851
|
+
function Go(e) {
|
|
1852
1852
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1853
1853
|
(e - 65536 >> 10) + 55296,
|
|
1854
1854
|
(e - 65536 & 1023) + 56320
|
|
@@ -1857,7 +1857,7 @@ function Ro(e) {
|
|
|
1857
1857
|
var Hn = new Array(256), Jn = new Array(256);
|
|
1858
1858
|
for (var Me = 0; Me < 256; Me++)
|
|
1859
1859
|
Hn[Me] = Wt(Me) ? 1 : 0, Jn[Me] = Wt(Me);
|
|
1860
|
-
function
|
|
1860
|
+
function zo(e, n) {
|
|
1861
1861
|
this.input = e, this.filename = n.filename || null, this.schema = n.schema || wt, 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 = [];
|
|
1862
1862
|
}
|
|
1863
1863
|
function Wn(e, n) {
|
|
@@ -1869,7 +1869,7 @@ function Wn(e, n) {
|
|
|
1869
1869
|
line: e.line,
|
|
1870
1870
|
column: e.position - e.lineStart
|
|
1871
1871
|
};
|
|
1872
|
-
return t.snippet =
|
|
1872
|
+
return t.snippet = Wr(t), new se(n, t);
|
|
1873
1873
|
}
|
|
1874
1874
|
function M(e, n) {
|
|
1875
1875
|
throw Wn(e, n);
|
|
@@ -1900,7 +1900,7 @@ function we(e, n, t, a) {
|
|
|
1900
1900
|
for (r = 0, o = l.length; r < o; r += 1)
|
|
1901
1901
|
i = l.charCodeAt(r), i === 9 || 32 <= i && i <= 1114111 || M(e, "expected valid JSON character");
|
|
1902
1902
|
else
|
|
1903
|
-
|
|
1903
|
+
Lo.test(l) && M(e, "the stream contains non-printable characters");
|
|
1904
1904
|
e.result += l;
|
|
1905
1905
|
}
|
|
1906
1906
|
}
|
|
@@ -1957,8 +1957,8 @@ function _t(e, n) {
|
|
|
1957
1957
|
n === 1 ? e.result += " " : n > 1 && (e.result += re.repeat(`
|
|
1958
1958
|
`, n - 1));
|
|
1959
1959
|
}
|
|
1960
|
-
function
|
|
1961
|
-
var a, r, o, i, l, s, u, p, c = e.kind,
|
|
1960
|
+
function Ho(e, n, t) {
|
|
1961
|
+
var a, r, o, i, l, s, u, p, c = e.kind, y = e.result, d;
|
|
1962
1962
|
if (d = e.input.charCodeAt(e.position), fe(d) || Ee(d) || d === 35 || d === 38 || d === 42 || d === 33 || d === 124 || d === 62 || d === 39 || d === 34 || d === 37 || d === 64 || d === 96 || (d === 63 || d === 45) && (r = e.input.charCodeAt(e.position + 1), fe(r) || t && Ee(r)))
|
|
1963
1963
|
return !1;
|
|
1964
1964
|
for (e.kind = "scalar", e.result = "", o = i = e.position, l = !1; d !== 0; ) {
|
|
@@ -1982,9 +1982,9 @@ function zo(e, n, t) {
|
|
|
1982
1982
|
}
|
|
1983
1983
|
l && (we(e, o, i, !1), _t(e, e.line - s), o = i = e.position, l = !1), Ae(d) || (i = e.position + 1), d = e.input.charCodeAt(++e.position);
|
|
1984
1984
|
}
|
|
1985
|
-
return we(e, o, i, !1), e.result ? !0 : (e.kind = c, e.result =
|
|
1985
|
+
return we(e, o, i, !1), e.result ? !0 : (e.kind = c, e.result = y, !1);
|
|
1986
1986
|
}
|
|
1987
|
-
function
|
|
1987
|
+
function Jo(e, n) {
|
|
1988
1988
|
var t, a, r;
|
|
1989
1989
|
if (t = e.input.charCodeAt(e.position), t !== 39)
|
|
1990
1990
|
return !1;
|
|
@@ -1998,7 +1998,7 @@ function Ho(e, n) {
|
|
|
1998
1998
|
he(t) ? (we(e, a, r, !0), _t(e, ae(e, !1, n)), a = r = e.position) : e.position === e.lineStart && Xe(e) ? M(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
1999
1999
|
M(e, "unexpected end of the stream within a single quoted scalar");
|
|
2000
2000
|
}
|
|
2001
|
-
function
|
|
2001
|
+
function Wo(e, n) {
|
|
2002
2002
|
var t, a, r, o, i, l;
|
|
2003
2003
|
if (l = e.input.charCodeAt(e.position), l !== 34)
|
|
2004
2004
|
return !1;
|
|
@@ -2010,10 +2010,10 @@ function Jo(e, n) {
|
|
|
2010
2010
|
ae(e, !1, n);
|
|
2011
2011
|
else if (l < 256 && Hn[l])
|
|
2012
2012
|
e.result += Jn[l], e.position++;
|
|
2013
|
-
else if ((i =
|
|
2013
|
+
else if ((i = Vo(l)) > 0) {
|
|
2014
2014
|
for (r = i, o = 0; r > 0; r--)
|
|
2015
|
-
l = e.input.charCodeAt(++e.position), (i =
|
|
2016
|
-
e.result +=
|
|
2015
|
+
l = e.input.charCodeAt(++e.position), (i = Do(l)) >= 0 ? o = (o << 4) + i : M(e, "expected hexadecimal character");
|
|
2016
|
+
e.result += Go(o), e.position++;
|
|
2017
2017
|
} else
|
|
2018
2018
|
M(e, "unknown escape sequence");
|
|
2019
2019
|
t = a = e.position;
|
|
@@ -2022,8 +2022,8 @@ function Jo(e, n) {
|
|
|
2022
2022
|
}
|
|
2023
2023
|
M(e, "unexpected end of the stream within a double quoted scalar");
|
|
2024
2024
|
}
|
|
2025
|
-
function
|
|
2026
|
-
var t = !0, a, r, o, i = e.tag, l, s = e.anchor, u, p, c,
|
|
2025
|
+
function Yo(e, n) {
|
|
2026
|
+
var t = !0, a, r, o, i = e.tag, l, s = e.anchor, u, p, c, y, d, w = /* @__PURE__ */ Object.create(null), v, _, h, C;
|
|
2027
2027
|
if (C = e.input.charCodeAt(e.position), C === 91)
|
|
2028
2028
|
p = 93, d = !1, l = [];
|
|
2029
2029
|
else if (C === 123)
|
|
@@ -2033,11 +2033,11 @@ function Wo(e, n) {
|
|
|
2033
2033
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), C = e.input.charCodeAt(++e.position); C !== 0; ) {
|
|
2034
2034
|
if (ae(e, !0, n), C = e.input.charCodeAt(e.position), C === p)
|
|
2035
2035
|
return e.position++, e.tag = i, e.anchor = s, e.kind = d ? "mapping" : "sequence", e.result = l, !0;
|
|
2036
|
-
t ? C === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"),
|
|
2036
|
+
t ? C === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), _ = v = h = null, c = y = !1, C === 63 && (u = e.input.charCodeAt(e.position + 1), fe(u) && (c = y = !0, e.position++, ae(e, !0, n))), a = e.line, r = e.lineStart, o = e.position, Ke(e, n, ze, !1, !0), _ = e.tag, v = e.result, ae(e, !0, n), C = e.input.charCodeAt(e.position), (y || e.line === a) && C === 58 && (c = !0, C = e.input.charCodeAt(++e.position), ae(e, !0, n), Ke(e, n, ze, !1, !0), h = e.result), d ? Ne(e, l, w, _, v, h, a, r, o) : c ? l.push(Ne(e, null, w, _, v, h, a, r, o)) : l.push(v), ae(e, !0, n), C = e.input.charCodeAt(e.position), C === 44 ? (t = !0, C = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2037
2037
|
}
|
|
2038
2038
|
M(e, "unexpected end of the stream within a flow collection");
|
|
2039
2039
|
}
|
|
2040
|
-
function
|
|
2040
|
+
function Zo(e, n) {
|
|
2041
2041
|
var t, a, r = lt, o = !1, i = !1, l = n, s = 0, u = !1, p, c;
|
|
2042
2042
|
if (c = e.input.charCodeAt(e.position), c === 124)
|
|
2043
2043
|
a = !1;
|
|
@@ -2047,8 +2047,8 @@ function Yo(e, n) {
|
|
|
2047
2047
|
return !1;
|
|
2048
2048
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
2049
2049
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
2050
|
-
lt === r ? r = c === 43 ? Ht :
|
|
2051
|
-
else if ((p =
|
|
2050
|
+
lt === r ? r = c === 43 ? Ht : Fo : M(e, "repeat of a chomping mode identifier");
|
|
2051
|
+
else if ((p = Ro(c)) >= 0)
|
|
2052
2052
|
p === 0 ? M(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? M(e, "repeat of an indentation width identifier") : (l = n + p - 1, i = !0);
|
|
2053
2053
|
else
|
|
2054
2054
|
break;
|
|
@@ -2100,13 +2100,13 @@ function Qt(e, n) {
|
|
|
2100
2100
|
}
|
|
2101
2101
|
return l ? (e.tag = a, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
2102
2102
|
}
|
|
2103
|
-
function
|
|
2104
|
-
var a, r, o, i, l, s, u = e.tag, p = e.anchor, c = {},
|
|
2103
|
+
function Qo(e, n, t) {
|
|
2104
|
+
var a, r, o, i, l, s, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), d = null, w = null, v = null, _ = !1, h = !1, C;
|
|
2105
2105
|
if (e.firstTabInLine !== -1)
|
|
2106
2106
|
return !1;
|
|
2107
2107
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), C = e.input.charCodeAt(e.position); C !== 0; ) {
|
|
2108
|
-
if (!
|
|
2109
|
-
C === 63 ? (
|
|
2108
|
+
if (!_ && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), a = e.input.charCodeAt(e.position + 1), o = e.line, (C === 63 || C === 58) && fe(a))
|
|
2109
|
+
C === 63 ? (_ && (Ne(e, c, y, d, w, null, i, l, s), d = w = v = null), h = !0, _ = !0, r = !0) : _ ? (_ = !1, r = !0) : M(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, C = a;
|
|
2110
2110
|
else {
|
|
2111
2111
|
if (i = e.line, l = e.lineStart, s = e.position, !Ke(e, t, Vn, !1, !0))
|
|
2112
2112
|
break;
|
|
@@ -2114,24 +2114,24 @@ function Zo(e, n, t) {
|
|
|
2114
2114
|
for (C = e.input.charCodeAt(e.position); Ae(C); )
|
|
2115
2115
|
C = e.input.charCodeAt(++e.position);
|
|
2116
2116
|
if (C === 58)
|
|
2117
|
-
C = e.input.charCodeAt(++e.position), fe(C) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"),
|
|
2118
|
-
else if (
|
|
2117
|
+
C = e.input.charCodeAt(++e.position), fe(C) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), _ && (Ne(e, c, y, d, w, null, i, l, s), d = w = v = null), h = !0, _ = !1, r = !1, d = e.tag, w = e.result;
|
|
2118
|
+
else if (h)
|
|
2119
2119
|
M(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2120
2120
|
else
|
|
2121
2121
|
return e.tag = u, e.anchor = p, !0;
|
|
2122
|
-
} else if (
|
|
2122
|
+
} else if (h)
|
|
2123
2123
|
M(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2124
2124
|
else
|
|
2125
2125
|
return e.tag = u, e.anchor = p, !0;
|
|
2126
2126
|
}
|
|
2127
|
-
if ((e.line === o || e.lineIndent > n) && (
|
|
2127
|
+
if ((e.line === o || e.lineIndent > n) && (_ && (i = e.line, l = e.lineStart, s = e.position), Ke(e, n, He, !0, r) && (_ ? w = e.result : v = e.result), _ || (Ne(e, c, y, d, w, v, i, l, s), d = w = v = null), ae(e, !0, -1), C = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && C !== 0)
|
|
2128
2128
|
M(e, "bad indentation of a mapping entry");
|
|
2129
2129
|
else if (e.lineIndent < n)
|
|
2130
2130
|
break;
|
|
2131
2131
|
}
|
|
2132
|
-
return
|
|
2132
|
+
return _ && Ne(e, c, y, d, w, null, i, l, s), h && (e.tag = u, e.anchor = p, e.kind = "mapping", e.result = c), h;
|
|
2133
2133
|
}
|
|
2134
|
-
function
|
|
2134
|
+
function Xo(e) {
|
|
2135
2135
|
var n, t = !1, a = !1, r, o, i;
|
|
2136
2136
|
if (i = e.input.charCodeAt(e.position), i !== 33)
|
|
2137
2137
|
return !1;
|
|
@@ -2143,7 +2143,7 @@ function Qo(e) {
|
|
|
2143
2143
|
} else {
|
|
2144
2144
|
for (; i !== 0 && !fe(i); )
|
|
2145
2145
|
i === 33 && (a ? M(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(n - 1, e.position + 1), Gn.test(r) || M(e, "named tag handle cannot contain such characters"), a = !0, n = e.position + 1)), i = e.input.charCodeAt(++e.position);
|
|
2146
|
-
o = e.input.slice(n, e.position),
|
|
2146
|
+
o = e.input.slice(n, e.position), Po.test(o) && M(e, "tag suffix cannot contain flow indicator characters");
|
|
2147
2147
|
}
|
|
2148
2148
|
o && !zn.test(o) && M(e, "tag name cannot contain such characters: " + o);
|
|
2149
2149
|
try {
|
|
@@ -2153,7 +2153,7 @@ function Qo(e) {
|
|
|
2153
2153
|
}
|
|
2154
2154
|
return t ? e.tag = o : _e.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o : M(e, 'undeclared tag handle "' + r + '"'), !0;
|
|
2155
2155
|
}
|
|
2156
|
-
function
|
|
2156
|
+
function ei(e) {
|
|
2157
2157
|
var n, t;
|
|
2158
2158
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2159
2159
|
return !1;
|
|
@@ -2161,7 +2161,7 @@ function Xo(e) {
|
|
|
2161
2161
|
t = e.input.charCodeAt(++e.position);
|
|
2162
2162
|
return e.position === n && M(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2163
2163
|
}
|
|
2164
|
-
function
|
|
2164
|
+
function ti(e) {
|
|
2165
2165
|
var n, t, a;
|
|
2166
2166
|
if (a = e.input.charCodeAt(e.position), a !== 42)
|
|
2167
2167
|
return !1;
|
|
@@ -2170,14 +2170,14 @@ function ei(e) {
|
|
|
2170
2170
|
return e.position === n && M(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), _e.call(e.anchorMap, t) || M(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], ae(e, !0, -1), !0;
|
|
2171
2171
|
}
|
|
2172
2172
|
function Ke(e, n, t, a, r) {
|
|
2173
|
-
var o, i, l, s = 1, u = !1, p = !1, c,
|
|
2173
|
+
var o, i, l, s = 1, u = !1, p = !1, c, y, d, w, v, _;
|
|
2174
2174
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = i = l = He === t || Rn === t, a && ae(e, !0, -1) && (u = !0, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)), s === 1)
|
|
2175
|
-
for (;
|
|
2175
|
+
for (; Xo(e) || ei(e); )
|
|
2176
2176
|
ae(e, !0, -1) ? (u = !0, l = o, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)) : l = !1;
|
|
2177
|
-
if (l && (l = u || r), (s === 1 || He === t) && (ze === t || Vn === t ? v = n : v = n + 1,
|
|
2177
|
+
if (l && (l = u || r), (s === 1 || He === t) && (ze === t || Vn === t ? v = n : v = n + 1, _ = e.position - e.lineStart, s === 1 ? l && (Qt(e, _) || Qo(e, _, v)) || Yo(e, v) ? p = !0 : (i && Zo(e, v) || Jo(e, v) || Wo(e, v) ? p = !0 : ti(e) ? (p = !0, (e.tag !== null || e.anchor !== null) && M(e, "alias node should not have any properties")) : Ho(e, v, ze === t) && (p = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (p = l && Qt(e, _))), e.tag === null)
|
|
2178
2178
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2179
2179
|
else if (e.tag === "?") {
|
|
2180
|
-
for (e.result !== null && e.kind !== "scalar" && M(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0,
|
|
2180
|
+
for (e.result !== null && e.kind !== "scalar" && M(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, y = e.implicitTypes.length; c < y; c += 1)
|
|
2181
2181
|
if (w = e.implicitTypes[c], w.resolve(e.result)) {
|
|
2182
2182
|
e.result = w.construct(e.result), e.tag = w.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2183
2183
|
break;
|
|
@@ -2186,7 +2186,7 @@ function Ke(e, n, t, a, r) {
|
|
|
2186
2186
|
if (_e.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2187
2187
|
w = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2188
2188
|
else
|
|
2189
|
-
for (w = null, d = e.typeMap.multi[e.kind || "fallback"], c = 0,
|
|
2189
|
+
for (w = null, d = e.typeMap.multi[e.kind || "fallback"], c = 0, y = d.length; c < y; c += 1)
|
|
2190
2190
|
if (e.tag.slice(0, d[c].tag.length) === d[c].tag) {
|
|
2191
2191
|
w = d[c];
|
|
2192
2192
|
break;
|
|
@@ -2195,7 +2195,7 @@ function Ke(e, n, t, a, r) {
|
|
|
2195
2195
|
}
|
|
2196
2196
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || p;
|
|
2197
2197
|
}
|
|
2198
|
-
function
|
|
2198
|
+
function ni(e) {
|
|
2199
2199
|
var n = e.position, t, a, r, o = !1, i;
|
|
2200
2200
|
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 && (ae(e, !0, -1), i = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || i !== 37)); ) {
|
|
2201
2201
|
for (o = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !fe(i); )
|
|
@@ -2217,7 +2217,7 @@ function ti(e) {
|
|
|
2217
2217
|
}
|
|
2218
2218
|
i !== 0 && It(e), _e.call(Yt, a) ? Yt[a](e, a, r) : Je(e, 'unknown document directive "' + a + '"');
|
|
2219
2219
|
}
|
|
2220
|
-
if (ae(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, ae(e, !0, -1)) : o && M(e, "directives end mark is expected"), Ke(e, e.lineIndent - 1, He, !1, !0), ae(e, !0, -1), e.checkLineBreaks &&
|
|
2220
|
+
if (ae(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, ae(e, !0, -1)) : o && M(e, "directives end mark is expected"), Ke(e, e.lineIndent - 1, He, !1, !0), ae(e, !0, -1), e.checkLineBreaks && Uo.test(e.input.slice(n, e.position)) && Je(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Xe(e)) {
|
|
2221
2221
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ae(e, !0, -1));
|
|
2222
2222
|
return;
|
|
2223
2223
|
}
|
|
@@ -2229,14 +2229,14 @@ function ti(e) {
|
|
|
2229
2229
|
function Yn(e, n) {
|
|
2230
2230
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2231
2231
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2232
|
-
var t = new
|
|
2232
|
+
var t = new zo(e, n), a = e.indexOf("\0");
|
|
2233
2233
|
for (a !== -1 && (t.position = a, M(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2234
2234
|
t.lineIndent += 1, t.position += 1;
|
|
2235
2235
|
for (; t.position < t.length - 1; )
|
|
2236
|
-
|
|
2236
|
+
ni(t);
|
|
2237
2237
|
return t.documents;
|
|
2238
2238
|
}
|
|
2239
|
-
function
|
|
2239
|
+
function ai(e, n, t) {
|
|
2240
2240
|
n !== null && typeof n == "object" && typeof t > "u" && (t = n, n = null);
|
|
2241
2241
|
var a = Yn(e, t);
|
|
2242
2242
|
if (typeof n != "function")
|
|
@@ -2244,7 +2244,7 @@ function ni(e, n, t) {
|
|
|
2244
2244
|
for (var r = 0, o = a.length; r < o; r += 1)
|
|
2245
2245
|
n(a[r]);
|
|
2246
2246
|
}
|
|
2247
|
-
function
|
|
2247
|
+
function ri(e, n) {
|
|
2248
2248
|
var t = Yn(e, n);
|
|
2249
2249
|
if (t.length !== 0) {
|
|
2250
2250
|
if (t.length === 1)
|
|
@@ -2252,10 +2252,10 @@ function ai(e, n) {
|
|
|
2252
2252
|
throw new se("expected a single document in the stream, but found more");
|
|
2253
2253
|
}
|
|
2254
2254
|
}
|
|
2255
|
-
var
|
|
2256
|
-
loadAll:
|
|
2257
|
-
load:
|
|
2258
|
-
}, Qn = Object.prototype.toString, Xn = Object.prototype.hasOwnProperty, St = 65279,
|
|
2255
|
+
var oi = ai, ii = ri, Zn = {
|
|
2256
|
+
loadAll: oi,
|
|
2257
|
+
load: ii
|
|
2258
|
+
}, Qn = Object.prototype.toString, Xn = Object.prototype.hasOwnProperty, St = 65279, li = 9, Pe = 10, si = 13, ui = 32, ci = 33, di = 34, dt = 35, pi = 37, fi = 38, mi = 39, gi = 42, ea = 44, yi = 45, We = 58, hi = 61, vi = 62, bi = 63, Ci = 64, ta = 91, na = 93, ki = 96, aa = 123, wi = 124, ra = 125, le = {};
|
|
2259
2259
|
le[0] = "\\0";
|
|
2260
2260
|
le[7] = "\\a";
|
|
2261
2261
|
le[8] = "\\b";
|
|
@@ -2271,7 +2271,7 @@ le[133] = "\\N";
|
|
|
2271
2271
|
le[160] = "\\_";
|
|
2272
2272
|
le[8232] = "\\L";
|
|
2273
2273
|
le[8233] = "\\P";
|
|
2274
|
-
var
|
|
2274
|
+
var Ii = [
|
|
2275
2275
|
"y",
|
|
2276
2276
|
"Y",
|
|
2277
2277
|
"yes",
|
|
@@ -2288,8 +2288,8 @@ var wi = [
|
|
|
2288
2288
|
"off",
|
|
2289
2289
|
"Off",
|
|
2290
2290
|
"OFF"
|
|
2291
|
-
],
|
|
2292
|
-
function
|
|
2291
|
+
], _i = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2292
|
+
function Si(e, n) {
|
|
2293
2293
|
var t, a, r, o, i, l, s;
|
|
2294
2294
|
if (n === null)
|
|
2295
2295
|
return {};
|
|
@@ -2297,7 +2297,7 @@ function _i(e, n) {
|
|
|
2297
2297
|
i = a[r], l = String(n[i]), i.slice(0, 2) === "!!" && (i = "tag:yaml.org,2002:" + i.slice(2)), s = e.compiledTypeMap.fallback[i], s && Xn.call(s.styleAliases, l) && (l = s.styleAliases[l]), t[i] = l;
|
|
2298
2298
|
return t;
|
|
2299
2299
|
}
|
|
2300
|
-
function
|
|
2300
|
+
function Ai(e) {
|
|
2301
2301
|
var n, t, a;
|
|
2302
2302
|
if (n = e.toString(16).toUpperCase(), e <= 255)
|
|
2303
2303
|
t = "x", a = 2;
|
|
@@ -2309,9 +2309,9 @@ function Si(e) {
|
|
|
2309
2309
|
throw new se("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2310
2310
|
return "\\" + t + re.repeat("0", a - n.length) + n;
|
|
2311
2311
|
}
|
|
2312
|
-
var
|
|
2313
|
-
function
|
|
2314
|
-
this.schema = e.schema || wt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = re.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap =
|
|
2312
|
+
var xi = 1, De = 2;
|
|
2313
|
+
function Ti(e) {
|
|
2314
|
+
this.schema = e.schema || wt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = re.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Si(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 : xi, 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;
|
|
2315
2315
|
}
|
|
2316
2316
|
function Xt(e, n) {
|
|
2317
2317
|
for (var t = re.repeat(" ", n), a = 0, r = -1, o = "", i, l = e.length; a < l; )
|
|
@@ -2324,7 +2324,7 @@ function pt(e, n) {
|
|
|
2324
2324
|
return `
|
|
2325
2325
|
` + re.repeat(" ", e.indent * n);
|
|
2326
2326
|
}
|
|
2327
|
-
function
|
|
2327
|
+
function $i(e, n) {
|
|
2328
2328
|
var t, a, r;
|
|
2329
2329
|
for (t = 0, a = e.implicitTypes.length; t < a; t += 1)
|
|
2330
2330
|
if (r = e.implicitTypes[t], r.resolve(n))
|
|
@@ -2332,13 +2332,13 @@ function Ti(e, n) {
|
|
|
2332
2332
|
return !1;
|
|
2333
2333
|
}
|
|
2334
2334
|
function Ye(e) {
|
|
2335
|
-
return e ===
|
|
2335
|
+
return e === ui || e === li;
|
|
2336
2336
|
}
|
|
2337
2337
|
function Ve(e) {
|
|
2338
2338
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== St || 65536 <= e && e <= 1114111;
|
|
2339
2339
|
}
|
|
2340
2340
|
function en(e) {
|
|
2341
|
-
return Ve(e) && e !== St && e !==
|
|
2341
|
+
return Ve(e) && e !== St && e !== si && e !== Pe;
|
|
2342
2342
|
}
|
|
2343
2343
|
function tn(e, n, t) {
|
|
2344
2344
|
var a = en(e), r = a && !Ye(e);
|
|
@@ -2350,10 +2350,10 @@ function tn(e, n, t) {
|
|
|
2350
2350
|
) : a && e !== ea && e !== ta && e !== na && e !== aa && e !== ra) && e !== dt && !(n === We && !r) || en(n) && !Ye(n) && e === dt || n === We && r
|
|
2351
2351
|
);
|
|
2352
2352
|
}
|
|
2353
|
-
function $i(e) {
|
|
2354
|
-
return Ve(e) && e !== St && !Ye(e) && e !== gi && e !== vi && e !== We && e !== ea && e !== ta && e !== na && e !== aa && e !== ra && e !== dt && e !== pi && e !== mi && e !== ui && e !== ki && e !== yi && e !== hi && e !== fi && e !== ci && e !== di && e !== bi && e !== Ci;
|
|
2355
|
-
}
|
|
2356
2353
|
function ji(e) {
|
|
2354
|
+
return Ve(e) && e !== St && !Ye(e) && e !== yi && e !== bi && e !== We && e !== ea && e !== ta && e !== na && e !== aa && e !== ra && e !== dt && e !== fi && e !== gi && e !== ci && e !== wi && e !== hi && e !== vi && e !== mi && e !== di && e !== pi && e !== Ci && e !== ki;
|
|
2355
|
+
}
|
|
2356
|
+
function Mi(e) {
|
|
2357
2357
|
return !Ye(e) && e !== We;
|
|
2358
2358
|
}
|
|
2359
2359
|
function Be(e, n) {
|
|
@@ -2365,8 +2365,8 @@ function oa(e) {
|
|
|
2365
2365
|
return n.test(e);
|
|
2366
2366
|
}
|
|
2367
2367
|
var ia = 1, ft = 2, la = 3, sa = 4, Oe = 5;
|
|
2368
|
-
function
|
|
2369
|
-
var s, u = 0, p = null, c = !1,
|
|
2368
|
+
function Oi(e, n, t, a, r, o, i, l) {
|
|
2369
|
+
var s, u = 0, p = null, c = !1, y = !1, d = a !== -1, w = -1, v = ji(Be(e, 0)) && Mi(Be(e, e.length - 1));
|
|
2370
2370
|
if (n || i)
|
|
2371
2371
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2372
2372
|
if (u = Be(e, s), !Ve(u))
|
|
@@ -2376,27 +2376,27 @@ function Mi(e, n, t, a, r, o, i, l) {
|
|
|
2376
2376
|
else {
|
|
2377
2377
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2378
2378
|
if (u = Be(e, s), u === Pe)
|
|
2379
|
-
c = !0, d && (
|
|
2379
|
+
c = !0, d && (y = y || // Foldable line = too long, and not more-indented.
|
|
2380
2380
|
s - w - 1 > a && e[w + 1] !== " ", w = s);
|
|
2381
2381
|
else if (!Ve(u))
|
|
2382
2382
|
return Oe;
|
|
2383
2383
|
v = v && tn(u, p, l), p = u;
|
|
2384
2384
|
}
|
|
2385
|
-
|
|
2385
|
+
y = y || d && s - w - 1 > a && e[w + 1] !== " ";
|
|
2386
2386
|
}
|
|
2387
|
-
return !c && !
|
|
2387
|
+
return !c && !y ? v && !i && !r(e) ? ia : o === De ? Oe : ft : t > 9 && oa(e) ? Oe : i ? o === De ? Oe : ft : y ? sa : la;
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2389
|
+
function Ei(e, n, t, a, r) {
|
|
2390
2390
|
e.dump = function() {
|
|
2391
2391
|
if (n.length === 0)
|
|
2392
2392
|
return e.quotingType === De ? '""' : "''";
|
|
2393
|
-
if (!e.noCompatMode && (
|
|
2393
|
+
if (!e.noCompatMode && (Ii.indexOf(n) !== -1 || _i.test(n)))
|
|
2394
2394
|
return e.quotingType === De ? '"' + n + '"' : "'" + n + "'";
|
|
2395
2395
|
var o = e.indent * Math.max(1, t), i = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = a || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2396
2396
|
function s(u) {
|
|
2397
|
-
return
|
|
2397
|
+
return $i(e, u);
|
|
2398
2398
|
}
|
|
2399
|
-
switch (
|
|
2399
|
+
switch (Oi(
|
|
2400
2400
|
n,
|
|
2401
2401
|
l,
|
|
2402
2402
|
e.indent,
|
|
@@ -2413,9 +2413,9 @@ function Oi(e, n, t, a, r) {
|
|
|
2413
2413
|
case la:
|
|
2414
2414
|
return "|" + nn(n, e.indent) + an(Xt(n, o));
|
|
2415
2415
|
case sa:
|
|
2416
|
-
return ">" + nn(n, e.indent) + an(Xt(
|
|
2416
|
+
return ">" + nn(n, e.indent) + an(Xt(Ni(n, i), o));
|
|
2417
2417
|
case Oe:
|
|
2418
|
-
return '"' +
|
|
2418
|
+
return '"' + Ki(n) + '"';
|
|
2419
2419
|
default:
|
|
2420
2420
|
throw new se("impossible error: invalid scalar style");
|
|
2421
2421
|
}
|
|
@@ -2433,7 +2433,7 @@ function an(e) {
|
|
|
2433
2433
|
return e[e.length - 1] === `
|
|
2434
2434
|
` ? e.slice(0, -1) : e;
|
|
2435
2435
|
}
|
|
2436
|
-
function
|
|
2436
|
+
function Ni(e, n) {
|
|
2437
2437
|
for (var t = /(\n+)([^\n]*)/g, a = function() {
|
|
2438
2438
|
var u = e.indexOf(`
|
|
2439
2439
|
`);
|
|
@@ -2456,12 +2456,12 @@ function rn(e, n) {
|
|
|
2456
2456
|
`, e.length - r > n && i > r ? s += e.slice(r, i) + `
|
|
2457
2457
|
` + e.slice(i + 1) : s += e.slice(r), s.slice(1);
|
|
2458
2458
|
}
|
|
2459
|
-
function
|
|
2459
|
+
function Ki(e) {
|
|
2460
2460
|
for (var n = "", t = 0, a, r = 0; r < e.length; t >= 65536 ? r += 2 : r++)
|
|
2461
|
-
t = Be(e, r), a = le[t], !a && Ve(t) ? (n += e[r], t >= 65536 && (n += e[r + 1])) : n += a ||
|
|
2461
|
+
t = Be(e, r), a = le[t], !a && Ve(t) ? (n += e[r], t >= 65536 && (n += e[r + 1])) : n += a || Ai(t);
|
|
2462
2462
|
return n;
|
|
2463
2463
|
}
|
|
2464
|
-
function
|
|
2464
|
+
function qi(e, n, t) {
|
|
2465
2465
|
var a = "", r = e.tag, o, i, l;
|
|
2466
2466
|
for (o = 0, i = t.length; o < i; o += 1)
|
|
2467
2467
|
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)) && (a !== "" && (a += "," + (e.condenseFlow ? "" : " ")), a += e.dump);
|
|
@@ -2473,14 +2473,14 @@ function on(e, n, t, a) {
|
|
|
2473
2473
|
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)) && ((!a || r !== "") && (r += pt(e, n)), e.dump && Pe === e.dump.charCodeAt(0) ? r += "-" : r += "- ", r += e.dump);
|
|
2474
2474
|
e.tag = o, e.dump = r || "[]";
|
|
2475
2475
|
}
|
|
2476
|
-
function
|
|
2476
|
+
function Bi(e, n, t) {
|
|
2477
2477
|
var a = "", r = e.tag, o = Object.keys(t), i, l, s, u, p;
|
|
2478
2478
|
for (i = 0, l = o.length; i < l; i += 1)
|
|
2479
2479
|
p = "", a !== "" && (p += ", "), e.condenseFlow && (p += '"'), s = o[i], u = t[s], e.replacer && (u = e.replacer.call(t, s, u)), Ce(e, n, s, !1, !1) && (e.dump.length > 1024 && (p += "? "), p += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), Ce(e, n, u, !1, !1) && (p += e.dump, a += p));
|
|
2480
2480
|
e.tag = r, e.dump = "{" + a + "}";
|
|
2481
2481
|
}
|
|
2482
|
-
function
|
|
2483
|
-
var r = "", o = e.tag, i = Object.keys(t), l, s, u, p, c,
|
|
2482
|
+
function Fi(e, n, t, a) {
|
|
2483
|
+
var r = "", o = e.tag, i = Object.keys(t), l, s, u, p, c, y;
|
|
2484
2484
|
if (e.sortKeys === !0)
|
|
2485
2485
|
i.sort();
|
|
2486
2486
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2488,7 +2488,7 @@ function Bi(e, n, t, a) {
|
|
|
2488
2488
|
else if (e.sortKeys)
|
|
2489
2489
|
throw new se("sortKeys must be a boolean or a function");
|
|
2490
2490
|
for (l = 0, s = i.length; l < s; l += 1)
|
|
2491
|
-
|
|
2491
|
+
y = "", (!a || r !== "") && (y += pt(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 += pt(e, n)), Ce(e, n + 1, p, !0, c) && (e.dump && Pe === e.dump.charCodeAt(0) ? y += ":" : y += ": ", y += e.dump, r += y));
|
|
2492
2492
|
e.tag = o, e.dump = r || "{}";
|
|
2493
2493
|
}
|
|
2494
2494
|
function ln(e, n, t) {
|
|
@@ -2512,16 +2512,16 @@ function Ce(e, n, t, a, r, o, i) {
|
|
|
2512
2512
|
e.tag = null, e.dump = t, ln(e, t, !1) || ln(e, t, !0);
|
|
2513
2513
|
var l = Qn.call(e.dump), s = a, u;
|
|
2514
2514
|
a && (a = e.flowLevel < 0 || e.flowLevel > n);
|
|
2515
|
-
var p = l === "[object Object]" || l === "[object Array]", c,
|
|
2516
|
-
if (p && (c = e.duplicates.indexOf(t),
|
|
2515
|
+
var p = l === "[object Object]" || l === "[object Array]", c, y;
|
|
2516
|
+
if (p && (c = e.duplicates.indexOf(t), y = c !== -1), (e.tag !== null && e.tag !== "?" || y || e.indent !== 2 && n > 0) && (r = !1), y && e.usedDuplicates[c])
|
|
2517
2517
|
e.dump = "*ref_" + c;
|
|
2518
2518
|
else {
|
|
2519
|
-
if (p &&
|
|
2520
|
-
a && Object.keys(e.dump).length !== 0 ? (
|
|
2519
|
+
if (p && y && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), l === "[object Object]")
|
|
2520
|
+
a && Object.keys(e.dump).length !== 0 ? (Fi(e, n, e.dump, r), y && (e.dump = "&ref_" + c + e.dump)) : (Bi(e, n, e.dump), y && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2521
2521
|
else if (l === "[object Array]")
|
|
2522
|
-
a && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? on(e, n - 1, e.dump, r) : on(e, n, e.dump, r),
|
|
2522
|
+
a && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? on(e, n - 1, e.dump, r) : on(e, n, e.dump, r), y && (e.dump = "&ref_" + c + e.dump)) : (qi(e, n, e.dump), y && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2523
2523
|
else if (l === "[object String]")
|
|
2524
|
-
e.tag !== "?" &&
|
|
2524
|
+
e.tag !== "?" && Ei(e, e.dump, n, o, s);
|
|
2525
2525
|
else {
|
|
2526
2526
|
if (l === "[object Undefined]" || e.skipInvalid)
|
|
2527
2527
|
return !1;
|
|
@@ -2533,7 +2533,7 @@ function Ce(e, n, t, a, r, o, i) {
|
|
|
2533
2533
|
}
|
|
2534
2534
|
return !0;
|
|
2535
2535
|
}
|
|
2536
|
-
function
|
|
2536
|
+
function Li(e, n) {
|
|
2537
2537
|
var t = [], a = [], r, o;
|
|
2538
2538
|
for (mt(e, t, a), r = 0, o = a.length; r < o; r += 1)
|
|
2539
2539
|
n.duplicates.push(t[a[r]]);
|
|
@@ -2551,23 +2551,23 @@ function mt(e, n, t) {
|
|
|
2551
2551
|
for (a = Object.keys(e), r = 0, o = a.length; r < o; r += 1)
|
|
2552
2552
|
mt(e[a[r]], n, t);
|
|
2553
2553
|
}
|
|
2554
|
-
function
|
|
2554
|
+
function Ui(e, n) {
|
|
2555
2555
|
n = n || {};
|
|
2556
|
-
var t = new
|
|
2557
|
-
t.noRefs ||
|
|
2556
|
+
var t = new Ti(n);
|
|
2557
|
+
t.noRefs || Li(e, t);
|
|
2558
2558
|
var a = e;
|
|
2559
2559
|
return t.replacer && (a = t.replacer.call({ "": a }, "", a)), Ce(t, 0, a, !0, !0) ? t.dump + `
|
|
2560
2560
|
` : "";
|
|
2561
2561
|
}
|
|
2562
|
-
var
|
|
2563
|
-
dump:
|
|
2562
|
+
var Pi = Ui, Di = {
|
|
2563
|
+
dump: Pi
|
|
2564
2564
|
};
|
|
2565
2565
|
function At(e, n) {
|
|
2566
2566
|
return function() {
|
|
2567
2567
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2568
2568
|
};
|
|
2569
2569
|
}
|
|
2570
|
-
var
|
|
2570
|
+
var Vi = ie, Ri = _n, Gi = Tn, zi = En, Hi = Nn, Ji = wt, Wi = Zn.load, Yi = Zn.loadAll, Zi = Di.dump, Qi = se, Xi = {
|
|
2571
2571
|
binary: Ln,
|
|
2572
2572
|
float: On,
|
|
2573
2573
|
map: xn,
|
|
@@ -2581,38 +2581,38 @@ var Di = ie, Vi = _n, Ri = Tn, Gi = En, zi = Nn, Hi = wt, Ji = Zn.load, Wi = Zn.
|
|
|
2581
2581
|
omap: Un,
|
|
2582
2582
|
seq: An,
|
|
2583
2583
|
str: Sn
|
|
2584
|
-
},
|
|
2585
|
-
Type:
|
|
2586
|
-
Schema:
|
|
2587
|
-
FAILSAFE_SCHEMA:
|
|
2588
|
-
JSON_SCHEMA:
|
|
2589
|
-
CORE_SCHEMA:
|
|
2590
|
-
DEFAULT_SCHEMA:
|
|
2591
|
-
load:
|
|
2592
|
-
loadAll:
|
|
2593
|
-
dump:
|
|
2594
|
-
YAMLException:
|
|
2595
|
-
types:
|
|
2596
|
-
safeLoad:
|
|
2597
|
-
safeLoadAll:
|
|
2598
|
-
safeDump:
|
|
2584
|
+
}, el = At("safeLoad", "load"), tl = At("safeLoadAll", "loadAll"), nl = At("safeDump", "dump"), al = {
|
|
2585
|
+
Type: Vi,
|
|
2586
|
+
Schema: Ri,
|
|
2587
|
+
FAILSAFE_SCHEMA: Gi,
|
|
2588
|
+
JSON_SCHEMA: zi,
|
|
2589
|
+
CORE_SCHEMA: Hi,
|
|
2590
|
+
DEFAULT_SCHEMA: Ji,
|
|
2591
|
+
load: Wi,
|
|
2592
|
+
loadAll: Yi,
|
|
2593
|
+
dump: Zi,
|
|
2594
|
+
YAMLException: Qi,
|
|
2595
|
+
types: Xi,
|
|
2596
|
+
safeLoad: el,
|
|
2597
|
+
safeLoadAll: tl,
|
|
2598
|
+
safeDump: nl
|
|
2599
2599
|
};
|
|
2600
|
-
const
|
|
2600
|
+
const rl = {
|
|
2601
2601
|
key: 0,
|
|
2602
2602
|
class: "config-card-display-form"
|
|
2603
|
-
},
|
|
2603
|
+
}, ol = ["data-testid"], il = {
|
|
2604
2604
|
key: 0,
|
|
2605
2605
|
class: "config-card-prop-section-title"
|
|
2606
|
-
},
|
|
2606
|
+
}, ll = {
|
|
2607
2607
|
key: 1,
|
|
2608
2608
|
class: "config-card-display-json"
|
|
2609
|
-
},
|
|
2609
|
+
}, sl = {
|
|
2610
2610
|
key: 0,
|
|
2611
2611
|
class: "config-card-display-json-endpoint"
|
|
2612
|
-
},
|
|
2612
|
+
}, ul = {
|
|
2613
2613
|
key: 2,
|
|
2614
2614
|
class: "config-card-display-yaml"
|
|
2615
|
-
},
|
|
2615
|
+
}, cl = /* @__PURE__ */ ne({
|
|
2616
2616
|
__name: "ConfigCardDisplay",
|
|
2617
2617
|
props: {
|
|
2618
2618
|
propertyCollections: {
|
|
@@ -2645,7 +2645,7 @@ const al = {
|
|
|
2645
2645
|
cn((s) => ({
|
|
2646
2646
|
"7b486894": `${l.value}ch`
|
|
2647
2647
|
}));
|
|
2648
|
-
const n = e, t = Ze(), { i18n: { t: a } } = oe.useI18n(), r = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), o = E(""), i = E(""), l =
|
|
2648
|
+
const n = e, t = Ze(), { i18n: { t: a } } = oe.useI18n(), r = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), o = E(""), i = E(""), l = T(() => {
|
|
2649
2649
|
var s;
|
|
2650
2650
|
if (!n.fetcherUrl)
|
|
2651
2651
|
return 0;
|
|
@@ -2655,19 +2655,19 @@ const al = {
|
|
|
2655
2655
|
return ve(() => n.format, (s) => {
|
|
2656
2656
|
if (s !== "structured") {
|
|
2657
2657
|
const u = JSON.parse(JSON.stringify(n.record));
|
|
2658
|
-
delete u.created_at, delete u.updated_at, s === "json" ? o.value = JSON.stringify(u, null, 2) : s === "yaml" && (i.value =
|
|
2658
|
+
delete u.created_at, delete u.updated_at, s === "json" ? o.value = JSON.stringify(u, null, 2) : s === "yaml" && (i.value = al.dump(u));
|
|
2659
2659
|
}
|
|
2660
2660
|
}, { immediate: !0 }), (s, u) => {
|
|
2661
2661
|
const p = D("KBadge"), c = D("KCodeBlock");
|
|
2662
|
-
return f(),
|
|
2663
|
-
e.format === "structured" ? (f(),
|
|
2664
|
-
(f(!0),
|
|
2665
|
-
key: `config-card-details-${
|
|
2666
|
-
class: Ie(`config-card-details-${
|
|
2667
|
-
"data-testid": `config-card-details-${
|
|
2662
|
+
return f(), $(me, null, [
|
|
2663
|
+
e.format === "structured" ? (f(), $("div", rl, [
|
|
2664
|
+
(f(!0), $(me, null, pe(e.propListTypes, (y) => (f(), $("div", {
|
|
2665
|
+
key: `config-card-details-${y}-props`,
|
|
2666
|
+
class: Ie(`config-card-details-${y}-props`),
|
|
2667
|
+
"data-testid": `config-card-details-${y}-props`
|
|
2668
2668
|
}, [
|
|
2669
|
-
|
|
2670
|
-
(f(!0),
|
|
2669
|
+
y !== "basic" ? (f(), $("div", il, j(y === "advanced" ? m(a)("baseConfigCard.sections.advanced") : m(a)("baseConfigCard.sections.plugin")), 1)) : z("", !0),
|
|
2670
|
+
(f(!0), $(me, null, pe(e.propertyCollections[y], (d) => (f(), G(Ct, {
|
|
2671
2671
|
key: d.key,
|
|
2672
2672
|
item: d
|
|
2673
2673
|
}, ke({
|
|
@@ -2690,10 +2690,10 @@ const al = {
|
|
|
2690
2690
|
key: "0"
|
|
2691
2691
|
} : void 0
|
|
2692
2692
|
]), 1032, ["item"]))), 128))
|
|
2693
|
-
], 10,
|
|
2693
|
+
], 10, ol))), 128))
|
|
2694
2694
|
])) : z("", !0),
|
|
2695
|
-
e.format === "json" ? (f(),
|
|
2696
|
-
n.fetcherUrl ? (f(),
|
|
2695
|
+
e.format === "json" ? (f(), $("div", ll, [
|
|
2696
|
+
n.fetcherUrl ? (f(), $("div", sl, [
|
|
2697
2697
|
O(p, { appearance: "get" }, {
|
|
2698
2698
|
default: g(() => [
|
|
2699
2699
|
W(j(m(a)("baseConfigCard.endpoints.get")), 1)
|
|
@@ -2716,7 +2716,7 @@ const al = {
|
|
|
2716
2716
|
theme: "dark"
|
|
2717
2717
|
}, null, 8, ["class", "code"])
|
|
2718
2718
|
])) : z("", !0),
|
|
2719
|
-
e.format === "yaml" ? (f(),
|
|
2719
|
+
e.format === "yaml" ? (f(), $("div", ul, [
|
|
2720
2720
|
O(c, {
|
|
2721
2721
|
id: "config-card-codeblock",
|
|
2722
2722
|
code: i.value,
|
|
@@ -2727,18 +2727,18 @@ const al = {
|
|
|
2727
2727
|
], 64);
|
|
2728
2728
|
};
|
|
2729
2729
|
}
|
|
2730
|
-
}),
|
|
2730
|
+
}), dl = /* @__PURE__ */ ge(cl, [["__scopeId", "data-v-27f85338"]]), sn = "24px", pl = (e, n) => {
|
|
2731
2731
|
const t = e.__vccOpts || e;
|
|
2732
2732
|
for (const [a, r] of n)
|
|
2733
2733
|
t[a] = r;
|
|
2734
2734
|
return t;
|
|
2735
|
-
},
|
|
2735
|
+
}, fl = (e) => (pn("data-v-84d5ee61"), e = e(), fn(), e), ml = ["aria-hidden"], gl = {
|
|
2736
2736
|
key: 0,
|
|
2737
2737
|
"data-testid": "kui-icon-svg-title"
|
|
2738
|
-
},
|
|
2738
|
+
}, yl = /* @__PURE__ */ fl(() => /* @__PURE__ */ F("path", {
|
|
2739
2739
|
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",
|
|
2740
2740
|
fill: "currentColor"
|
|
2741
|
-
}, null, -1)),
|
|
2741
|
+
}, null, -1)), hl = /* @__PURE__ */ ne({
|
|
2742
2742
|
__name: "BookIcon",
|
|
2743
2743
|
props: {
|
|
2744
2744
|
/** The accessibility text provided to screen readers */
|
|
@@ -2790,7 +2790,7 @@ const al = {
|
|
|
2790
2790
|
}
|
|
2791
2791
|
},
|
|
2792
2792
|
setup(e) {
|
|
2793
|
-
const n = e, t =
|
|
2793
|
+
const n = e, t = T(() => {
|
|
2794
2794
|
if (typeof n.size == "number" && n.size > 0)
|
|
2795
2795
|
return `${n.size}px`;
|
|
2796
2796
|
if (typeof n.size == "string") {
|
|
@@ -2799,7 +2799,7 @@ const al = {
|
|
|
2799
2799
|
return `${o}px`;
|
|
2800
2800
|
}
|
|
2801
2801
|
return sn;
|
|
2802
|
-
}), a =
|
|
2802
|
+
}), a = T(() => ({
|
|
2803
2803
|
boxSizing: "border-box",
|
|
2804
2804
|
color: n.color,
|
|
2805
2805
|
display: n.display,
|
|
@@ -2807,14 +2807,14 @@ const al = {
|
|
|
2807
2807
|
lineHeight: "0",
|
|
2808
2808
|
width: t.value
|
|
2809
2809
|
}));
|
|
2810
|
-
return (r, o) => (f(),
|
|
2810
|
+
return (r, o) => (f(), G(xe(e.as), {
|
|
2811
2811
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2812
2812
|
class: "kui-icon book-icon",
|
|
2813
2813
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2814
2814
|
style: dn(a.value)
|
|
2815
2815
|
}, {
|
|
2816
2816
|
default: g(() => [
|
|
2817
|
-
(f(),
|
|
2817
|
+
(f(), $("svg", {
|
|
2818
2818
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2819
2819
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2820
2820
|
fill: "none",
|
|
@@ -2824,23 +2824,23 @@ const al = {
|
|
|
2824
2824
|
width: "100%",
|
|
2825
2825
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2826
2826
|
}, [
|
|
2827
|
-
e.title ? (f(),
|
|
2828
|
-
|
|
2829
|
-
], 8,
|
|
2827
|
+
e.title ? (f(), $("title", gl, j(e.title), 1)) : z("", !0),
|
|
2828
|
+
yl
|
|
2829
|
+
], 8, ml))
|
|
2830
2830
|
]),
|
|
2831
2831
|
_: 1
|
|
2832
2832
|
}, 8, ["aria-hidden", "style"]));
|
|
2833
2833
|
}
|
|
2834
|
-
}),
|
|
2834
|
+
}), vl = /* @__PURE__ */ pl(hl, [["__scopeId", "data-v-84d5ee61"]]), bl = { "data-testid": "config-card-title" }, Cl = { class: "config-card-actions" }, kl = ["href"], wl = {
|
|
2835
2835
|
key: 2,
|
|
2836
2836
|
class: "config-card-details-section"
|
|
2837
|
-
},
|
|
2837
|
+
}, Il = {
|
|
2838
2838
|
key: 3,
|
|
2839
2839
|
class: "config-card-details-section"
|
|
2840
|
-
},
|
|
2840
|
+
}, _l = ["data-testid"], Sl = {
|
|
2841
2841
|
key: 0,
|
|
2842
2842
|
class: "config-card-prop-section-title"
|
|
2843
|
-
},
|
|
2843
|
+
}, Al = /* @__PURE__ */ ne({
|
|
2844
2844
|
__name: "EntityBaseConfigCard",
|
|
2845
2845
|
props: {
|
|
2846
2846
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2931,7 +2931,7 @@ const al = {
|
|
|
2931
2931
|
label: "YAML",
|
|
2932
2932
|
value: "yaml"
|
|
2933
2933
|
}
|
|
2934
|
-
], c = E("structured"),
|
|
2934
|
+
], c = E("structured"), y = (b) => {
|
|
2935
2935
|
c.value = b == null ? void 0 : b.value;
|
|
2936
2936
|
}, d = {
|
|
2937
2937
|
id: {
|
|
@@ -2967,21 +2967,21 @@ const al = {
|
|
|
2967
2967
|
// the last property displayed
|
|
2968
2968
|
section: de.Basic
|
|
2969
2969
|
}
|
|
2970
|
-
}, w = E(!1), v = E(!1),
|
|
2971
|
-
var b, I,
|
|
2972
|
-
if (!
|
|
2970
|
+
}, w = E(!1), v = E(!1), _ = E(""), h = E(), C = T(() => {
|
|
2971
|
+
var b, I, B;
|
|
2972
|
+
if (!h.value)
|
|
2973
2973
|
return [];
|
|
2974
|
-
const V = [],
|
|
2975
|
-
for (const
|
|
2976
|
-
const P = (I = (b = r.configSchema) == null ? void 0 : b[
|
|
2977
|
-
let Q =
|
|
2978
|
-
(
|
|
2974
|
+
const V = [], x = Object.keys(h.value).length;
|
|
2975
|
+
for (const K in h.value) {
|
|
2976
|
+
const P = (I = (b = r.configSchema) == null ? void 0 : b[K]) == null ? void 0 : I.order, R = (B = d[K]) == null ? void 0 : B.order;
|
|
2977
|
+
let Q = x;
|
|
2978
|
+
(R || R === 0) && (Q = R === -1 ? x + 1 : R), P && (Q = P === -1 ? x + 1 : P), V.push([K, Q]);
|
|
2979
2979
|
}
|
|
2980
|
-
return V.sort(function(
|
|
2981
|
-
return
|
|
2982
|
-
}), V.map((
|
|
2983
|
-
var P,
|
|
2984
|
-
const Q =
|
|
2980
|
+
return V.sort(function(K, P) {
|
|
2981
|
+
return K[1] - P[1];
|
|
2982
|
+
}), V.map((K) => {
|
|
2983
|
+
var P, R;
|
|
2984
|
+
const Q = K[0], J = (P = h.value) == null ? void 0 : P[Q], X = ((R = r.configSchema) == null ? void 0 : R[Q]) || {}, ue = d[Q];
|
|
2985
2985
|
return {
|
|
2986
2986
|
key: Q,
|
|
2987
2987
|
value: J,
|
|
@@ -2991,78 +2991,78 @@ const al = {
|
|
|
2991
2991
|
tooltip: X.tooltip ?? ((ue == null ? void 0 : ue.tooltip) || void 0),
|
|
2992
2992
|
section: X.section ?? ((ue == null ? void 0 : ue.section) || de.Advanced)
|
|
2993
2993
|
};
|
|
2994
|
-
}).filter((
|
|
2995
|
-
}),
|
|
2994
|
+
}).filter((K) => !K.hidden && K.key !== r.pluginConfigKey);
|
|
2995
|
+
}), L = T(() => {
|
|
2996
2996
|
var b, I;
|
|
2997
|
-
if (!
|
|
2997
|
+
if (!h.value || !r.pluginConfigKey)
|
|
2998
2998
|
return [];
|
|
2999
|
-
const
|
|
3000
|
-
for (const
|
|
3001
|
-
const P = (I = (b = r.pluginConfigSchema) == null ? void 0 : b[
|
|
3002
|
-
let Q =
|
|
3003
|
-
P && (Q = P === -1 ? V + 1 : P),
|
|
2999
|
+
const B = h.value[r.pluginConfigKey] || {}, V = Object.keys(B).length, x = [];
|
|
3000
|
+
for (const K in B) {
|
|
3001
|
+
const P = (I = (b = r.pluginConfigSchema) == null ? void 0 : b[K]) == null ? void 0 : I.order, R = B[K];
|
|
3002
|
+
let Q = R != null && R !== "" ? V - 1 : V;
|
|
3003
|
+
P && (Q = P === -1 ? V + 1 : P), x.push([K, Q]);
|
|
3004
3004
|
}
|
|
3005
|
-
return
|
|
3006
|
-
return
|
|
3007
|
-
}),
|
|
3005
|
+
return x.sort(function(K, P) {
|
|
3006
|
+
return K[1] - P[1];
|
|
3007
|
+
}), x.map((K) => {
|
|
3008
3008
|
var P;
|
|
3009
|
-
const
|
|
3009
|
+
const R = K[0], Q = B[R], J = ((P = r.pluginConfigSchema) == null ? void 0 : P[R]) || {};
|
|
3010
3010
|
return {
|
|
3011
|
-
key:
|
|
3011
|
+
key: R,
|
|
3012
3012
|
value: Q,
|
|
3013
3013
|
hidden: J.hidden || !1,
|
|
3014
3014
|
type: J.type ?? ee.Text,
|
|
3015
|
-
label: J.label ?? s(
|
|
3015
|
+
label: J.label ?? s(R),
|
|
3016
3016
|
tooltip: J.tooltip ?? void 0,
|
|
3017
3017
|
section: de.Plugin
|
|
3018
3018
|
};
|
|
3019
|
-
}).filter((
|
|
3020
|
-
}), S =
|
|
3021
|
-
var b, I,
|
|
3019
|
+
}).filter((K) => !K.hidden);
|
|
3020
|
+
}), S = T(() => {
|
|
3021
|
+
var b, I, B, V;
|
|
3022
3022
|
return {
|
|
3023
|
-
basic: (b = C.value) == null ? void 0 : b.filter((
|
|
3024
|
-
advanced: (I = C.value) == null ? void 0 : I.filter((
|
|
3025
|
-
plugin: (V =
|
|
3023
|
+
basic: (b = C.value) == null ? void 0 : b.filter((x) => x.section === de.Basic),
|
|
3024
|
+
advanced: (I = C.value) == null ? void 0 : I.filter((x) => x.section === de.Advanced),
|
|
3025
|
+
plugin: (V = L.value) == null ? void 0 : V.concat((B = C.value) == null ? void 0 : B.filter((x) => x.section === de.Plugin))
|
|
3026
3026
|
};
|
|
3027
|
-
}),
|
|
3027
|
+
}), q = T(() => {
|
|
3028
3028
|
const b = [];
|
|
3029
3029
|
return S.value.basic.length && b.push("basic"), S.value.advanced.length && b.push("advanced"), S.value.plugin.length && b.push("plugin"), b;
|
|
3030
|
-
}), k = (b) => !!(b.tooltip || o[`${b.key}-label-tooltip`]),
|
|
3030
|
+
}), k = (b) => !!(b.tooltip || o[`${b.key}-label-tooltip`]), U = T(() => {
|
|
3031
3031
|
var b, I;
|
|
3032
|
-
let
|
|
3033
|
-
return r.config.app === "konnect" ?
|
|
3034
|
-
}),
|
|
3035
|
-
|
|
3032
|
+
let B = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3033
|
+
return r.config.app === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((b = r.config) == null ? void 0 : b.controlPlaneId) || "") : r.config.app === "kongManager" && (B = B.replace(/\/{workspace}/gi, (I = r.config) != null && I.workspace ? `/${r.config.workspace}` : "")), B = B.replace(/{id}/gi, r.config.entityId), B;
|
|
3034
|
+
}), N = (b) => {
|
|
3035
|
+
h.value && b(JSON.stringify(h.value)) ? a("copy:success", h.value) : a("copy:error");
|
|
3036
3036
|
};
|
|
3037
3037
|
return ve(w, (b) => {
|
|
3038
3038
|
a("loading", b);
|
|
3039
3039
|
}, { immediate: !0 }), gt(async () => {
|
|
3040
3040
|
v.value = !1, w.value = !0;
|
|
3041
3041
|
try {
|
|
3042
|
-
const { data: b } = await u.get(
|
|
3042
|
+
const { data: b } = await u.get(U.value);
|
|
3043
3043
|
if (r.dataKey)
|
|
3044
3044
|
if (typeof b[r.dataKey] < "u")
|
|
3045
|
-
|
|
3045
|
+
h.value = { ...b[r.dataKey] };
|
|
3046
3046
|
else
|
|
3047
3047
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3048
3048
|
else
|
|
3049
|
-
|
|
3049
|
+
h.value = { ...b };
|
|
3050
3050
|
Object.keys(r.configSchema).filter((I) => r.configSchema[I].forceShow).forEach((I) => {
|
|
3051
|
-
|
|
3051
|
+
h.value && typeof h.value[I] > "u" && (h.value[I] = null);
|
|
3052
3052
|
}), a("fetch:success", b);
|
|
3053
3053
|
} catch (b) {
|
|
3054
3054
|
const I = l(b);
|
|
3055
|
-
|
|
3055
|
+
_.value = I.startsWith("code") ? i("baseConfigCard.errors.load") : I, v.value = !0, a("fetch:error", b);
|
|
3056
3056
|
} finally {
|
|
3057
3057
|
w.value = !1;
|
|
3058
3058
|
}
|
|
3059
3059
|
}), (b, I) => {
|
|
3060
|
-
const
|
|
3061
|
-
return f(),
|
|
3060
|
+
const B = D("KLabel"), V = D("KSelect"), x = D("KButton"), K = D("KClipboardProvider"), P = D("KSkeleton"), R = D("KEmptyState"), Q = D("KCard");
|
|
3061
|
+
return f(), G(Q, { class: "kong-ui-entity-base-config-card" }, ke({
|
|
3062
3062
|
actions: g(() => [
|
|
3063
|
-
F("div",
|
|
3063
|
+
F("div", Cl, [
|
|
3064
3064
|
Z(b.$slots, "actions", {}, void 0, !0),
|
|
3065
|
-
e.config.jsonYamlEnabled ? (f(),
|
|
3065
|
+
e.config.jsonYamlEnabled ? (f(), G(B, {
|
|
3066
3066
|
key: 0,
|
|
3067
3067
|
class: "config-format-select-label",
|
|
3068
3068
|
"data-testid": "config-format-select-label"
|
|
@@ -3072,14 +3072,14 @@ const al = {
|
|
|
3072
3072
|
]),
|
|
3073
3073
|
_: 1
|
|
3074
3074
|
})) : z("", !0),
|
|
3075
|
-
e.config.jsonYamlEnabled ? (f(),
|
|
3075
|
+
e.config.jsonYamlEnabled ? (f(), G(V, {
|
|
3076
3076
|
key: 1,
|
|
3077
3077
|
appearance: "select",
|
|
3078
3078
|
"data-testid": "select-config-format",
|
|
3079
3079
|
items: p,
|
|
3080
|
-
onChange:
|
|
3080
|
+
onChange: y
|
|
3081
3081
|
})) : z("", !0),
|
|
3082
|
-
r.config.jsonYamlEnabled && e.configCardDoc ? (f(),
|
|
3082
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (f(), G(x, {
|
|
3083
3083
|
key: 2,
|
|
3084
3084
|
appearance: "tertiary",
|
|
3085
3085
|
class: "book-icon",
|
|
@@ -3091,18 +3091,18 @@ const al = {
|
|
|
3091
3091
|
rel: "noopener",
|
|
3092
3092
|
target: "_blank"
|
|
3093
3093
|
}, [
|
|
3094
|
-
O(m(
|
|
3095
|
-
], 8,
|
|
3094
|
+
O(m(vl), { size: m(_r) }, null, 8, ["size"])
|
|
3095
|
+
], 8, kl)
|
|
3096
3096
|
]),
|
|
3097
3097
|
_: 1
|
|
3098
3098
|
})) : z("", !0),
|
|
3099
|
-
e.config.jsonYamlEnabled ? z("", !0) : (f(),
|
|
3099
|
+
e.config.jsonYamlEnabled ? z("", !0) : (f(), G(K, { key: 3 }, {
|
|
3100
3100
|
default: g(({ copyToClipboard: J }) => [
|
|
3101
|
-
!w.value && !v.value ? (f(),
|
|
3101
|
+
!w.value && !v.value ? (f(), G(x, {
|
|
3102
3102
|
key: 0,
|
|
3103
3103
|
appearance: "tertiary",
|
|
3104
3104
|
"data-testid": "json-copy-button",
|
|
3105
|
-
onClick: (X) =>
|
|
3105
|
+
onClick: (X) => N(J)
|
|
3106
3106
|
}, {
|
|
3107
3107
|
default: g(() => [
|
|
3108
3108
|
W(j(m(i)("baseConfigCard.actions.copy")), 1)
|
|
@@ -3115,28 +3115,28 @@ const al = {
|
|
|
3115
3115
|
])
|
|
3116
3116
|
]),
|
|
3117
3117
|
default: g(() => [
|
|
3118
|
-
w.value ? (f(),
|
|
3118
|
+
w.value ? (f(), G(P, {
|
|
3119
3119
|
key: 0,
|
|
3120
3120
|
"data-testid": "config-card-loader",
|
|
3121
3121
|
"table-columns": 2,
|
|
3122
3122
|
type: "table"
|
|
3123
|
-
})) : v.value ? (f(), R
|
|
3123
|
+
})) : v.value ? (f(), G(R, {
|
|
3124
3124
|
key: 1,
|
|
3125
3125
|
"data-testid": "config-card-fetch-error",
|
|
3126
3126
|
"is-error": ""
|
|
3127
3127
|
}, {
|
|
3128
3128
|
message: g(() => [
|
|
3129
|
-
F("h3", null, j(
|
|
3129
|
+
F("h3", null, j(_.value), 1)
|
|
3130
3130
|
]),
|
|
3131
3131
|
_: 1
|
|
3132
3132
|
})) : z("", !0),
|
|
3133
|
-
e.config.jsonYamlEnabled ? (f(),
|
|
3134
|
-
O(
|
|
3135
|
-
"fetcher-url":
|
|
3133
|
+
e.config.jsonYamlEnabled ? (f(), $("div", wl, [
|
|
3134
|
+
O(dl, {
|
|
3135
|
+
"fetcher-url": U.value,
|
|
3136
3136
|
format: c.value,
|
|
3137
|
-
"prop-list-types":
|
|
3137
|
+
"prop-list-types": q.value,
|
|
3138
3138
|
"property-collections": S.value,
|
|
3139
|
-
record:
|
|
3139
|
+
record: h.value
|
|
3140
3140
|
}, ke({ _: 2 }, [
|
|
3141
3141
|
pe(Object.keys(b.$slots), (J) => ({
|
|
3142
3142
|
name: J,
|
|
@@ -3148,14 +3148,14 @@ const al = {
|
|
|
3148
3148
|
])
|
|
3149
3149
|
}))
|
|
3150
3150
|
]), 1032, ["fetcher-url", "format", "prop-list-types", "property-collections", "record"])
|
|
3151
|
-
])) : (f(),
|
|
3152
|
-
(f(!0),
|
|
3151
|
+
])) : (f(), $("div", Il, [
|
|
3152
|
+
(f(!0), $(me, null, pe(q.value, (J) => (f(), $("div", {
|
|
3153
3153
|
key: `config-card-details-${J}-props`,
|
|
3154
3154
|
class: Ie(`config-card-details-${J}-props`),
|
|
3155
3155
|
"data-testid": `config-card-details-${J}-props`
|
|
3156
3156
|
}, [
|
|
3157
|
-
J !== "basic" ? (f(),
|
|
3158
|
-
(f(!0),
|
|
3157
|
+
J !== "basic" ? (f(), $("div", Sl, j(J === "advanced" ? m(i)("baseConfigCard.sections.advanced") : m(i)("baseConfigCard.sections.plugin")), 1)) : z("", !0),
|
|
3158
|
+
(f(!0), $(me, null, pe(S.value[J], (X) => (f(), G(Ct, {
|
|
3159
3159
|
key: X.key,
|
|
3160
3160
|
item: X
|
|
3161
3161
|
}, ke({
|
|
@@ -3178,7 +3178,7 @@ const al = {
|
|
|
3178
3178
|
key: "0"
|
|
3179
3179
|
} : void 0
|
|
3180
3180
|
]), 1032, ["item"]))), 128))
|
|
3181
|
-
], 10,
|
|
3181
|
+
], 10, _l))), 128))
|
|
3182
3182
|
]))
|
|
3183
3183
|
]),
|
|
3184
3184
|
_: 2
|
|
@@ -3186,7 +3186,7 @@ const al = {
|
|
|
3186
3186
|
e.hideTitle ? void 0 : {
|
|
3187
3187
|
name: "title",
|
|
3188
3188
|
fn: g(() => [
|
|
3189
|
-
F("div",
|
|
3189
|
+
F("div", bl, [
|
|
3190
3190
|
Z(b.$slots, "title", {}, () => [
|
|
3191
3191
|
W(j(m(i)("baseConfigCard.title")), 1)
|
|
3192
3192
|
], !0)
|
|
@@ -3197,10 +3197,10 @@ const al = {
|
|
|
3197
3197
|
]), 1024);
|
|
3198
3198
|
};
|
|
3199
3199
|
}
|
|
3200
|
-
}),
|
|
3200
|
+
}), xl = /* @__PURE__ */ ge(Al, [["__scopeId", "data-v-4f47d6ad"]]), Tl = {
|
|
3201
3201
|
class: "form-actions",
|
|
3202
3202
|
"data-testid": "form-actions"
|
|
3203
|
-
},
|
|
3203
|
+
}, $l = /* @__PURE__ */ ne({
|
|
3204
3204
|
__name: "EntityBaseForm",
|
|
3205
3205
|
props: {
|
|
3206
3206
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3252,41 +3252,41 @@ const al = {
|
|
|
3252
3252
|
var t;
|
|
3253
3253
|
const a = n, r = e, o = yt(), { i18n: { t: i } } = oe.useI18n(), { getMessageFromError: l } = oe.useErrors(), { axiosInstance: s } = oe.useAxios({
|
|
3254
3254
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3255
|
-
}), u = E(!1), p = E(!1), c = E(""),
|
|
3256
|
-
var
|
|
3255
|
+
}), u = E(!1), p = E(!1), c = E(""), y = T(() => r.canSubmit === !1 || r.isReadonly), d = T(() => {
|
|
3256
|
+
var h, C;
|
|
3257
3257
|
if (!r.editId)
|
|
3258
3258
|
return "";
|
|
3259
|
-
let
|
|
3260
|
-
return r.config.app === "konnect" ?
|
|
3259
|
+
let L = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3260
|
+
return r.config.app === "konnect" ? L = L.replace(/{controlPlaneId}/gi, ((h = r.config) == null ? void 0 : h.controlPlaneId) || "") : r.config.app === "kongManager" && (L = L.replace(/\/{workspace}/gi, (C = r.config) != null && C.workspace ? `/${r.config.workspace}` : "")), L = L.replace(/{id}/gi, r.editId), L;
|
|
3261
3261
|
}), w = () => {
|
|
3262
3262
|
r.config.cancelRoute ? o.push(r.config.cancelRoute) : v();
|
|
3263
3263
|
}, v = () => {
|
|
3264
3264
|
a("cancel");
|
|
3265
|
-
},
|
|
3266
|
-
|
|
3265
|
+
}, _ = () => {
|
|
3266
|
+
y.value || a("submit");
|
|
3267
3267
|
};
|
|
3268
|
-
return ve(() => u.value, (
|
|
3269
|
-
a("loading",
|
|
3268
|
+
return ve(() => u.value, (h) => {
|
|
3269
|
+
a("loading", h);
|
|
3270
3270
|
}, { immediate: !0 }), gt(async () => {
|
|
3271
3271
|
if (r.editId)
|
|
3272
3272
|
try {
|
|
3273
3273
|
p.value = !1, u.value = !0;
|
|
3274
|
-
const { data:
|
|
3275
|
-
a("fetch:success",
|
|
3276
|
-
} catch (
|
|
3277
|
-
const C = l(
|
|
3278
|
-
c.value = C.startsWith("code") ? i("baseForm.errors.edit") : C, p.value = !0, a("fetch:error",
|
|
3274
|
+
const { data: h } = await s.get(d.value);
|
|
3275
|
+
a("fetch:success", h);
|
|
3276
|
+
} catch (h) {
|
|
3277
|
+
const C = l(h);
|
|
3278
|
+
c.value = C.startsWith("code") ? i("baseForm.errors.edit") : C, p.value = !0, a("fetch:error", h);
|
|
3279
3279
|
} finally {
|
|
3280
3280
|
u.value = !1;
|
|
3281
3281
|
}
|
|
3282
|
-
}), (
|
|
3283
|
-
const
|
|
3284
|
-
return f(),
|
|
3282
|
+
}), (h, C) => {
|
|
3283
|
+
const L = D("KSkeleton"), S = D("KEmptyState"), q = D("KAlert"), k = D("KButton"), U = D("KCard");
|
|
3284
|
+
return f(), G(U, { class: "kong-ui-entity-base-form" }, {
|
|
3285
3285
|
default: g(() => [
|
|
3286
|
-
u.value ? (f(),
|
|
3286
|
+
u.value ? (f(), G(L, {
|
|
3287
3287
|
key: 0,
|
|
3288
3288
|
type: "form"
|
|
3289
|
-
})) : p.value ? (f(),
|
|
3289
|
+
})) : p.value ? (f(), G(S, {
|
|
3290
3290
|
key: 1,
|
|
3291
3291
|
"cta-text": m(i)("baseForm.actions.back"),
|
|
3292
3292
|
"data-testid": "form-fetch-error",
|
|
@@ -3297,21 +3297,21 @@ const al = {
|
|
|
3297
3297
|
F("h3", null, j(c.value), 1)
|
|
3298
3298
|
]),
|
|
3299
3299
|
_: 1
|
|
3300
|
-
}, 8, ["cta-text"])) : (f(),
|
|
3300
|
+
}, 8, ["cta-text"])) : (f(), $("form", {
|
|
3301
3301
|
key: 2,
|
|
3302
3302
|
"data-testid": "form-content",
|
|
3303
3303
|
onReset: Ge(v, ["prevent"]),
|
|
3304
|
-
onSubmit: Ge(
|
|
3304
|
+
onSubmit: Ge(_, ["prevent"])
|
|
3305
3305
|
}, [
|
|
3306
|
-
Z(
|
|
3307
|
-
e.errorMessage ? (f(),
|
|
3306
|
+
Z(h.$slots, "default", {}, void 0, !0),
|
|
3307
|
+
e.errorMessage ? (f(), G(q, {
|
|
3308
3308
|
key: 0,
|
|
3309
3309
|
"alert-message": e.errorMessage,
|
|
3310
3310
|
appearance: "danger",
|
|
3311
3311
|
"data-testid": "form-error"
|
|
3312
3312
|
}, null, 8, ["alert-message"])) : z("", !0),
|
|
3313
|
-
F("div",
|
|
3314
|
-
Z(
|
|
3313
|
+
F("div", Tl, [
|
|
3314
|
+
Z(h.$slots, "form-actions", {}, () => [
|
|
3315
3315
|
O(k, {
|
|
3316
3316
|
appearance: "secondary",
|
|
3317
3317
|
"data-testid": "form-cancel",
|
|
@@ -3326,7 +3326,7 @@ const al = {
|
|
|
3326
3326
|
O(k, {
|
|
3327
3327
|
appearance: "primary",
|
|
3328
3328
|
"data-testid": "form-submit",
|
|
3329
|
-
disabled:
|
|
3329
|
+
disabled: y.value,
|
|
3330
3330
|
type: "submit"
|
|
3331
3331
|
}, {
|
|
3332
3332
|
default: g(() => [
|
|
@@ -3342,10 +3342,10 @@ const al = {
|
|
|
3342
3342
|
});
|
|
3343
3343
|
};
|
|
3344
3344
|
}
|
|
3345
|
-
}),
|
|
3345
|
+
}), jl = /* @__PURE__ */ ge($l, [["__scopeId", "data-v-448d8512"]]), Ml = {
|
|
3346
3346
|
key: 0,
|
|
3347
3347
|
"data-testid": "first-col"
|
|
3348
|
-
},
|
|
3348
|
+
}, Ol = /* @__PURE__ */ ne({
|
|
3349
3349
|
__name: "EntityBaseTableCell",
|
|
3350
3350
|
props: {
|
|
3351
3351
|
keyName: {
|
|
@@ -3358,51 +3358,51 @@ const al = {
|
|
|
3358
3358
|
}
|
|
3359
3359
|
},
|
|
3360
3360
|
setup(e) {
|
|
3361
|
-
const n = e, t =
|
|
3361
|
+
const n = e, t = T(() => {
|
|
3362
3362
|
var v;
|
|
3363
3363
|
return ((v = n.rowEl) == null ? void 0 : v.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3364
|
-
}), a =
|
|
3364
|
+
}), a = T(() => {
|
|
3365
3365
|
var v;
|
|
3366
3366
|
return ((v = t.value) == null ? void 0 : v.querySelector('[data-testid="first-col"]')) || null;
|
|
3367
|
-
}), r =
|
|
3368
|
-
var v,
|
|
3369
|
-
const
|
|
3370
|
-
return
|
|
3367
|
+
}), r = T(() => {
|
|
3368
|
+
var v, _;
|
|
3369
|
+
const h = (v = n.rowEl) == null ? void 0 : v.querySelectorAll("td");
|
|
3370
|
+
return h ? ((_ = h[0]) == null ? void 0 : _.getAttribute("data-testid")) === n.keyName : !1;
|
|
3371
3371
|
});
|
|
3372
3372
|
let o;
|
|
3373
3373
|
const i = () => {
|
|
3374
3374
|
o && (o.disconnect(), o = void 0);
|
|
3375
3375
|
}, l = () => {
|
|
3376
|
-
var v,
|
|
3377
|
-
u.value = ((v = a.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, p.value = ((
|
|
3378
|
-
}, s = E({}), u = E(0), p = E(0), c = E(""),
|
|
3379
|
-
|
|
3376
|
+
var v, _, h;
|
|
3377
|
+
u.value = ((v = a.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, p.value = ((_ = t.value) == null ? void 0 : _.clientWidth) || 0, c.value = ((h = s.value) == null ? void 0 : h.innerText) || "";
|
|
3378
|
+
}, s = E({}), u = E(0), p = E(0), c = E(""), y = T(() => [a.value, t.value]), d = ve(
|
|
3379
|
+
y,
|
|
3380
3380
|
(v) => {
|
|
3381
3381
|
if (r.value && (i(), "ResizeObserver" in window && window)) {
|
|
3382
|
-
o = new ResizeObserver((
|
|
3382
|
+
o = new ResizeObserver((_) => {
|
|
3383
3383
|
window.requestAnimationFrame(() => {
|
|
3384
|
-
!Array.isArray(
|
|
3384
|
+
!Array.isArray(_) || !_.length || l();
|
|
3385
3385
|
});
|
|
3386
3386
|
});
|
|
3387
|
-
for (const
|
|
3388
|
-
|
|
3387
|
+
for (const _ of v)
|
|
3388
|
+
_ && o.observe(_);
|
|
3389
3389
|
}
|
|
3390
3390
|
},
|
|
3391
3391
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3392
|
-
), w =
|
|
3393
|
-
return
|
|
3392
|
+
), w = T(() => r.value ? u.value > p.value : !1);
|
|
3393
|
+
return ba(() => {
|
|
3394
3394
|
l();
|
|
3395
|
-
}),
|
|
3395
|
+
}), Ca(() => {
|
|
3396
3396
|
d();
|
|
3397
|
-
}), (v,
|
|
3398
|
-
const
|
|
3399
|
-
return f(),
|
|
3397
|
+
}), (v, _) => {
|
|
3398
|
+
const h = D("KTooltip");
|
|
3399
|
+
return f(), $("span", {
|
|
3400
3400
|
ref_key: "contentRef",
|
|
3401
3401
|
ref: s,
|
|
3402
3402
|
class: "content-wrapper"
|
|
3403
3403
|
}, [
|
|
3404
|
-
r.value ? (f(),
|
|
3405
|
-
O(
|
|
3404
|
+
r.value ? (f(), $("span", Ml, [
|
|
3405
|
+
O(h, {
|
|
3406
3406
|
label: w.value ? c.value : "",
|
|
3407
3407
|
"max-width": "300",
|
|
3408
3408
|
placement: "bottomStart"
|
|
@@ -3416,10 +3416,10 @@ const al = {
|
|
|
3416
3416
|
], 512);
|
|
3417
3417
|
};
|
|
3418
3418
|
}
|
|
3419
|
-
}),
|
|
3419
|
+
}), El = /* @__PURE__ */ ge(Ol, [["__scopeId", "data-v-e42a20c9"]]), Nl = { class: "toolbar-container" }, Kl = {
|
|
3420
3420
|
key: 0,
|
|
3421
3421
|
class: "toolbar-button-container"
|
|
3422
|
-
},
|
|
3422
|
+
}, ql = ["data-testid"], Bl = /* @__PURE__ */ ne({
|
|
3423
3423
|
__name: "EntityBaseTable",
|
|
3424
3424
|
props: {
|
|
3425
3425
|
// table header configuration
|
|
@@ -3529,43 +3529,43 @@ const al = {
|
|
|
3529
3529
|
},
|
|
3530
3530
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3531
3531
|
setup(e, { emit: n }) {
|
|
3532
|
-
const t = e, a = n, { i18n: { t: r } } = oe.useI18n(), o =
|
|
3533
|
-
var
|
|
3532
|
+
const t = e, a = n, { i18n: { t: r } } = oe.useI18n(), o = T(() => {
|
|
3533
|
+
var q, k;
|
|
3534
3534
|
return typeof t.errorMessage == "string" ? {
|
|
3535
3535
|
hasError: !!t.errorMessage,
|
|
3536
3536
|
title: t.errorMessage,
|
|
3537
3537
|
message: void 0
|
|
3538
3538
|
} : {
|
|
3539
3539
|
hasError: !!t.errorMessage,
|
|
3540
|
-
title: (
|
|
3540
|
+
title: (q = t.errorMessage) == null ? void 0 : q.title,
|
|
3541
3541
|
message: (k = t.errorMessage) == null ? void 0 : k.message
|
|
3542
3542
|
};
|
|
3543
|
-
}), i =
|
|
3544
|
-
const
|
|
3543
|
+
}), i = T(() => t.cacheIdentifier || t.preferencesStorageKey), l = (q) => q.hasData || !!t.query, s = T(() => {
|
|
3544
|
+
const q = [];
|
|
3545
3545
|
return Object.keys(t.tableHeaders).forEach((k) => {
|
|
3546
|
-
const
|
|
3547
|
-
|
|
3548
|
-
label:
|
|
3546
|
+
const U = t.tableHeaders[k];
|
|
3547
|
+
q.push({
|
|
3548
|
+
label: U.label ?? k,
|
|
3549
3549
|
key: k,
|
|
3550
|
-
sortable:
|
|
3550
|
+
sortable: U.sortable ?? !1
|
|
3551
3551
|
});
|
|
3552
|
-
}), t.enableEntityActions &&
|
|
3552
|
+
}), t.enableEntityActions && q.push({
|
|
3553
3553
|
key: "actions",
|
|
3554
3554
|
hideLabel: !0
|
|
3555
|
-
}),
|
|
3556
|
-
}), u = (
|
|
3557
|
-
"data-rowid":
|
|
3558
|
-
"data-testid":
|
|
3559
|
-
...t.rowAttributes(
|
|
3560
|
-
}), p = E({}), c = (
|
|
3555
|
+
}), q;
|
|
3556
|
+
}), u = (q) => ({
|
|
3557
|
+
"data-rowid": q.id,
|
|
3558
|
+
"data-testid": q.name,
|
|
3559
|
+
...t.rowAttributes(q)
|
|
3560
|
+
}), p = E({}), c = (q) => {
|
|
3561
3561
|
var k;
|
|
3562
|
-
return (k = p.value) == null ? void 0 : k.$el.querySelector(`[data-rowid="${
|
|
3563
|
-
},
|
|
3562
|
+
return (k = p.value) == null ? void 0 : k.$el.querySelector(`[data-rowid="${q.id}"]`);
|
|
3563
|
+
}, y = (q) => {
|
|
3564
3564
|
const k = {
|
|
3565
|
-
"data-testid":
|
|
3566
|
-
...t.cellAttributes(
|
|
3565
|
+
"data-testid": q.headerKey,
|
|
3566
|
+
...t.cellAttributes(q)
|
|
3567
3567
|
};
|
|
3568
|
-
return
|
|
3568
|
+
return q.colIndex === 0 && (k.style = {
|
|
3569
3569
|
maxWidth: "250px",
|
|
3570
3570
|
overflowX: "hidden",
|
|
3571
3571
|
textOverflow: "ellipsis"
|
|
@@ -3574,22 +3574,22 @@ const al = {
|
|
|
3574
3574
|
a("empty-state-cta-clicked"), w();
|
|
3575
3575
|
}, w = () => {
|
|
3576
3576
|
a("clear-search-input");
|
|
3577
|
-
}, v =
|
|
3577
|
+
}, v = T(() => t.disableRowClick ? void 0 : (q, k) => {
|
|
3578
3578
|
a("click:row", k);
|
|
3579
|
-
}),
|
|
3580
|
-
a("sort",
|
|
3581
|
-
}, { setTablePreferences:
|
|
3582
|
-
const
|
|
3579
|
+
}), _ = (q) => {
|
|
3580
|
+
a("sort", q);
|
|
3581
|
+
}, { setTablePreferences: h, getTablePreferences: C } = $a(), L = T(() => {
|
|
3582
|
+
const q = C(t.preferencesStorageKey);
|
|
3583
3583
|
return {
|
|
3584
3584
|
...t.initialFetcherParams,
|
|
3585
|
-
...
|
|
3585
|
+
...q
|
|
3586
3586
|
};
|
|
3587
|
-
}), S = (
|
|
3588
|
-
t.preferencesStorageKey &&
|
|
3587
|
+
}), S = (q) => {
|
|
3588
|
+
t.preferencesStorageKey && h(t.preferencesStorageKey, q);
|
|
3589
3589
|
};
|
|
3590
|
-
return (
|
|
3591
|
-
const
|
|
3592
|
-
return f(),
|
|
3590
|
+
return (q, k) => {
|
|
3591
|
+
const U = D("KIcon"), N = D("KButton"), b = D("KDropdown"), I = D("KTable"), B = D("KCard");
|
|
3592
|
+
return f(), G(B, {
|
|
3593
3593
|
class: "kong-ui-entity-base-table",
|
|
3594
3594
|
title: e.title
|
|
3595
3595
|
}, {
|
|
@@ -3598,7 +3598,7 @@ const al = {
|
|
|
3598
3598
|
ref_key: "tableRefs",
|
|
3599
3599
|
ref: p,
|
|
3600
3600
|
"cache-identifier": i.value,
|
|
3601
|
-
"cell-attrs":
|
|
3601
|
+
"cell-attrs": y,
|
|
3602
3602
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3603
3603
|
"disable-sorting": e.disableSorting,
|
|
3604
3604
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
@@ -3616,27 +3616,27 @@ const al = {
|
|
|
3616
3616
|
"has-error": o.value.hasError,
|
|
3617
3617
|
headers: s.value,
|
|
3618
3618
|
"hide-pagination-when-optional": "",
|
|
3619
|
-
"initial-fetcher-params":
|
|
3619
|
+
"initial-fetcher-params": L.value,
|
|
3620
3620
|
"is-loading": e.isLoading,
|
|
3621
3621
|
"pagination-type": e.paginationType,
|
|
3622
3622
|
"row-attrs": u,
|
|
3623
3623
|
"search-input": e.query,
|
|
3624
3624
|
onKtableEmptyStateCtaClicked: d,
|
|
3625
3625
|
"onRow:click": v.value,
|
|
3626
|
-
onSort: k[0] || (k[0] = (V) =>
|
|
3626
|
+
onSort: k[0] || (k[0] = (V) => _(V)),
|
|
3627
3627
|
"onUpdate:tablePreferences": S
|
|
3628
3628
|
}, ke({
|
|
3629
3629
|
toolbar: g(({ state: V }) => [
|
|
3630
|
-
Fe(F("div",
|
|
3631
|
-
Z(
|
|
3632
|
-
|
|
3633
|
-
Z(
|
|
3630
|
+
Fe(F("div", Nl, [
|
|
3631
|
+
Z(q.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3632
|
+
q.$slots["toolbar-button"] ? (f(), $("div", Kl, [
|
|
3633
|
+
Z(q.$slots, "toolbar-button", {}, void 0, !0)
|
|
3634
3634
|
])) : z("", !0)
|
|
3635
3635
|
], 512), [
|
|
3636
3636
|
[Le, l(V)]
|
|
3637
3637
|
])
|
|
3638
3638
|
]),
|
|
3639
|
-
actions: g(({ row: V, rowKey:
|
|
3639
|
+
actions: g(({ row: V, rowKey: x, rowValue: K }) => [
|
|
3640
3640
|
F("div", {
|
|
3641
3641
|
class: "actions-container",
|
|
3642
3642
|
"data-testid": V.name
|
|
@@ -3646,21 +3646,21 @@ const al = {
|
|
|
3646
3646
|
width: e.dropdownMenuWidth
|
|
3647
3647
|
}, {
|
|
3648
3648
|
items: g(() => [
|
|
3649
|
-
Z(
|
|
3649
|
+
Z(q.$slots, "actions", {
|
|
3650
3650
|
row: V,
|
|
3651
|
-
rowKey:
|
|
3652
|
-
rowValue:
|
|
3651
|
+
rowKey: x,
|
|
3652
|
+
rowValue: K
|
|
3653
3653
|
}, void 0, !0)
|
|
3654
3654
|
]),
|
|
3655
3655
|
default: g(() => [
|
|
3656
|
-
O(
|
|
3656
|
+
O(N, {
|
|
3657
3657
|
class: "actions-trigger",
|
|
3658
3658
|
"data-testid": "overflow-actions-button",
|
|
3659
3659
|
size: "small"
|
|
3660
3660
|
}, {
|
|
3661
3661
|
icon: g(() => [
|
|
3662
|
-
O(
|
|
3663
|
-
color: m(
|
|
3662
|
+
O(U, {
|
|
3663
|
+
color: m(wr),
|
|
3664
3664
|
icon: "more",
|
|
3665
3665
|
size: "16"
|
|
3666
3666
|
}, null, 8, ["color"])
|
|
@@ -3670,24 +3670,24 @@ const al = {
|
|
|
3670
3670
|
]),
|
|
3671
3671
|
_: 2
|
|
3672
3672
|
}, 1032, ["width"])
|
|
3673
|
-
], 8,
|
|
3673
|
+
], 8, ql)
|
|
3674
3674
|
]),
|
|
3675
3675
|
_: 2
|
|
3676
3676
|
}, [
|
|
3677
|
-
pe(e.tableHeaders, (V,
|
|
3678
|
-
name:
|
|
3679
|
-
fn: g(({ row:
|
|
3680
|
-
O(
|
|
3681
|
-
"key-name": String(
|
|
3682
|
-
"row-el": c(
|
|
3677
|
+
pe(e.tableHeaders, (V, x) => ({
|
|
3678
|
+
name: x,
|
|
3679
|
+
fn: g(({ row: K, rowKey: P, rowValue: R }) => [
|
|
3680
|
+
O(El, {
|
|
3681
|
+
"key-name": String(x),
|
|
3682
|
+
"row-el": c(K)
|
|
3683
3683
|
}, {
|
|
3684
3684
|
default: g(() => [
|
|
3685
|
-
Z(
|
|
3686
|
-
row:
|
|
3685
|
+
Z(q.$slots, x, {
|
|
3686
|
+
row: K,
|
|
3687
3687
|
rowKey: P,
|
|
3688
|
-
rowValue:
|
|
3688
|
+
rowValue: R
|
|
3689
3689
|
}, () => [
|
|
3690
|
-
W(j(
|
|
3690
|
+
W(j(R), 1)
|
|
3691
3691
|
], !0)
|
|
3692
3692
|
]),
|
|
3693
3693
|
_: 2
|
|
@@ -3700,13 +3700,13 @@ const al = {
|
|
|
3700
3700
|
}, 8, ["title"]);
|
|
3701
3701
|
};
|
|
3702
3702
|
}
|
|
3703
|
-
}),
|
|
3703
|
+
}), Fl = /* @__PURE__ */ ge(Bl, [["__scopeId", "data-v-57b5a97b"]]), Ll = {
|
|
3704
3704
|
key: 0,
|
|
3705
3705
|
class: "kong-ui-entity-delete-error"
|
|
3706
|
-
},
|
|
3706
|
+
}, Ul = {
|
|
3707
3707
|
key: 1,
|
|
3708
3708
|
class: "description"
|
|
3709
|
-
},
|
|
3709
|
+
}, Pl = /* @__PURE__ */ ne({
|
|
3710
3710
|
__name: "EntityDeleteModal",
|
|
3711
3711
|
props: {
|
|
3712
3712
|
visible: {
|
|
@@ -3745,14 +3745,14 @@ const al = {
|
|
|
3745
3745
|
},
|
|
3746
3746
|
emits: ["cancel", "proceed"],
|
|
3747
3747
|
setup(e, { emit: n }) {
|
|
3748
|
-
const { i18nT: t } = oe.useI18n(), a = e, r = n, o =
|
|
3748
|
+
const { i18nT: t } = oe.useI18n(), a = e, r = n, o = T(() => a.needConfirm ? a.entityName : ""), i = () => {
|
|
3749
3749
|
r("cancel");
|
|
3750
3750
|
}, l = () => {
|
|
3751
3751
|
r("proceed");
|
|
3752
3752
|
};
|
|
3753
3753
|
return (s, u) => {
|
|
3754
3754
|
const p = D("KAlert"), c = D("KPrompt");
|
|
3755
|
-
return f(),
|
|
3755
|
+
return f(), G(c, {
|
|
3756
3756
|
"action-button-text": "Yes, delete",
|
|
3757
3757
|
"action-pending": e.actionPending,
|
|
3758
3758
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3764,7 +3764,7 @@ const al = {
|
|
|
3764
3764
|
onProceed: l
|
|
3765
3765
|
}, {
|
|
3766
3766
|
"body-content": g(() => [
|
|
3767
|
-
e.error ? (f(),
|
|
3767
|
+
e.error ? (f(), $("div", Ll, [
|
|
3768
3768
|
O(p, { appearance: "danger" }, {
|
|
3769
3769
|
alertMessage: g(() => [
|
|
3770
3770
|
W(j(e.error), 1)
|
|
@@ -3790,7 +3790,7 @@ const al = {
|
|
|
3790
3790
|
key: "0"
|
|
3791
3791
|
} : void 0
|
|
3792
3792
|
]), 1032, ["keypath"]),
|
|
3793
|
-
a.description || s.$slots.description ? (f(),
|
|
3793
|
+
a.description || s.$slots.description ? (f(), $("div", Ul, [
|
|
3794
3794
|
Z(s.$slots, "description", {}, () => [
|
|
3795
3795
|
F("p", null, j(a.description), 1)
|
|
3796
3796
|
], !0)
|
|
@@ -3800,13 +3800,13 @@ const al = {
|
|
|
3800
3800
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3801
3801
|
};
|
|
3802
3802
|
}
|
|
3803
|
-
}),
|
|
3803
|
+
}), Dl = /* @__PURE__ */ ge(Pl, [["__scopeId", "data-v-1c9a2a07"]]), Vl = {
|
|
3804
3804
|
fill: "none",
|
|
3805
3805
|
height: "20",
|
|
3806
3806
|
viewBox: "0 0 20 20",
|
|
3807
3807
|
width: "20",
|
|
3808
3808
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3809
|
-
},
|
|
3809
|
+
}, Rl = {
|
|
3810
3810
|
id: "mask0_180_20349",
|
|
3811
3811
|
height: "20",
|
|
3812
3812
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3814,35 +3814,35 @@ const al = {
|
|
|
3814
3814
|
width: "20",
|
|
3815
3815
|
x: "0",
|
|
3816
3816
|
y: "0"
|
|
3817
|
-
},
|
|
3817
|
+
}, Gl = ["fill"], zl = { mask: "url(#mask0_180_20349)" }, Hl = ["fill"], un = /* @__PURE__ */ ne({
|
|
3818
3818
|
__name: "IconFilter",
|
|
3819
3819
|
props: {
|
|
3820
3820
|
color: {
|
|
3821
3821
|
type: String,
|
|
3822
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3822
|
+
default: `var(--kong-ui-entity-filter-color, ${Cr})`
|
|
3823
3823
|
}
|
|
3824
3824
|
},
|
|
3825
3825
|
setup(e) {
|
|
3826
|
-
return (n, t) => (f(),
|
|
3827
|
-
F("mask",
|
|
3826
|
+
return (n, t) => (f(), $("svg", Vl, [
|
|
3827
|
+
F("mask", Rl, [
|
|
3828
3828
|
F("rect", {
|
|
3829
3829
|
fill: e.color,
|
|
3830
3830
|
height: "20",
|
|
3831
3831
|
width: "20"
|
|
3832
|
-
}, null, 8,
|
|
3832
|
+
}, null, 8, Gl)
|
|
3833
3833
|
]),
|
|
3834
|
-
F("g",
|
|
3834
|
+
F("g", zl, [
|
|
3835
3835
|
F("path", {
|
|
3836
3836
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3837
3837
|
fill: e.color
|
|
3838
|
-
}, null, 8,
|
|
3838
|
+
}, null, 8, Hl)
|
|
3839
3839
|
])
|
|
3840
3840
|
]));
|
|
3841
3841
|
}
|
|
3842
|
-
}),
|
|
3842
|
+
}), Jl = {
|
|
3843
3843
|
key: 1,
|
|
3844
3844
|
class: "kong-ui-entity-filter"
|
|
3845
|
-
},
|
|
3845
|
+
}, Wl = { class: "menu-item-title" }, Yl = { class: "menu-item-indicator" }, Zl = { class: "menu-item-body" }, Ql = ["for"], Xl = { class: "menu-item-buttons" }, es = { class: "filter-clear-button-container" }, ts = /* @__PURE__ */ ne({
|
|
3846
3846
|
__name: "EntityFilter",
|
|
3847
3847
|
props: {
|
|
3848
3848
|
// filter config, either exact match or fuzzy match
|
|
@@ -3862,50 +3862,50 @@ const al = {
|
|
|
3862
3862
|
},
|
|
3863
3863
|
emits: ["update:modelValue"],
|
|
3864
3864
|
setup(e, { emit: n }) {
|
|
3865
|
-
const { i18n: { t } } = oe.useI18n(), a = e, r = n, o = E(!1), i = E({}), l =
|
|
3866
|
-
const
|
|
3867
|
-
return new URLSearchParams(a.modelValue).forEach((C,
|
|
3868
|
-
C !== "" &&
|
|
3869
|
-
}),
|
|
3870
|
-
}), s =
|
|
3871
|
-
const
|
|
3872
|
-
return Object.keys(
|
|
3873
|
-
label:
|
|
3865
|
+
const { i18n: { t } } = oe.useI18n(), a = e, r = n, o = E(!1), i = E({}), l = T(() => {
|
|
3866
|
+
const h = [];
|
|
3867
|
+
return new URLSearchParams(a.modelValue).forEach((C, L) => {
|
|
3868
|
+
C !== "" && h.push(L);
|
|
3869
|
+
}), h;
|
|
3870
|
+
}), s = T(() => {
|
|
3871
|
+
const h = a.config.fields;
|
|
3872
|
+
return Object.keys(h).filter((C) => h[C].searchable).map((C) => ({
|
|
3873
|
+
label: h[C].label || C,
|
|
3874
3874
|
value: C
|
|
3875
3875
|
}));
|
|
3876
3876
|
});
|
|
3877
|
-
ve(() => a.modelValue, (
|
|
3878
|
-
i.value = {}, new URLSearchParams(
|
|
3879
|
-
i.value[
|
|
3877
|
+
ve(() => a.modelValue, (h) => {
|
|
3878
|
+
i.value = {}, new URLSearchParams(h).forEach((C, L) => {
|
|
3879
|
+
i.value[L] = C;
|
|
3880
3880
|
});
|
|
3881
3881
|
});
|
|
3882
3882
|
const u = () => {
|
|
3883
3883
|
o.value = !o.value;
|
|
3884
|
-
}, p = (
|
|
3885
|
-
r("update:modelValue",
|
|
3886
|
-
}, c = (
|
|
3887
|
-
var C,
|
|
3888
|
-
return (((
|
|
3884
|
+
}, p = (h) => {
|
|
3885
|
+
r("update:modelValue", h);
|
|
3886
|
+
}, c = (h) => `filter-${h}`, y = (h) => {
|
|
3887
|
+
var C, L;
|
|
3888
|
+
return (((L = (C = a.config.schema) == null ? void 0 : C[h]) == null ? void 0 : L.values) ?? []).map((S) => ({
|
|
3889
3889
|
value: S,
|
|
3890
3890
|
label: S
|
|
3891
3891
|
}));
|
|
3892
|
-
}, d = (
|
|
3893
|
-
var C,
|
|
3894
|
-
return ((
|
|
3895
|
-
}, w = (
|
|
3892
|
+
}, d = (h) => {
|
|
3893
|
+
var C, L;
|
|
3894
|
+
return ((L = (C = a.config.schema) == null ? void 0 : C[h]) == null ? void 0 : L.type) ?? "text";
|
|
3895
|
+
}, w = (h) => {
|
|
3896
3896
|
i.value = {
|
|
3897
3897
|
...i.value,
|
|
3898
|
-
[
|
|
3899
|
-
},
|
|
3898
|
+
[h]: ""
|
|
3899
|
+
}, _();
|
|
3900
3900
|
}, v = () => {
|
|
3901
|
-
i.value = {},
|
|
3902
|
-
},
|
|
3903
|
-
const C = Object.keys(i.value).reduce((
|
|
3904
|
-
|
|
3901
|
+
i.value = {}, _(!0);
|
|
3902
|
+
}, _ = (h = !1) => {
|
|
3903
|
+
const C = Object.keys(i.value).reduce((L, S) => (i.value[S] && (L[S] = `${i.value[S]}`), L), {});
|
|
3904
|
+
h && (o.value = !1), r("update:modelValue", new URLSearchParams(C).toString());
|
|
3905
3905
|
};
|
|
3906
|
-
return (
|
|
3907
|
-
const
|
|
3908
|
-
return e.config.isExactMatch ? (f(),
|
|
3906
|
+
return (h, C) => {
|
|
3907
|
+
const L = D("KInput"), S = D("KButton"), q = D("KSelect"), k = D("KMenuItem"), U = D("KMenu");
|
|
3908
|
+
return e.config.isExactMatch ? (f(), G(L, {
|
|
3909
3909
|
key: 0,
|
|
3910
3910
|
autocomplete: "off",
|
|
3911
3911
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3918,7 +3918,7 @@ const al = {
|
|
|
3918
3918
|
O(un)
|
|
3919
3919
|
]),
|
|
3920
3920
|
_: 1
|
|
3921
|
-
}, 8, ["model-value", "placeholder"])) : (f(),
|
|
3921
|
+
}, 8, ["model-value", "placeholder"])) : (f(), $("div", Jl, [
|
|
3922
3922
|
O(S, {
|
|
3923
3923
|
appearance: "tertiary",
|
|
3924
3924
|
"data-testid": "filter-button",
|
|
@@ -3936,54 +3936,54 @@ const al = {
|
|
|
3936
3936
|
}, null, 512), [
|
|
3937
3937
|
[Le, o.value]
|
|
3938
3938
|
]),
|
|
3939
|
-
Fe(O(
|
|
3939
|
+
Fe(O(U, { class: "kong-ui-entity-filter-menu" }, {
|
|
3940
3940
|
body: g(() => [
|
|
3941
|
-
(f(!0),
|
|
3942
|
-
key:
|
|
3943
|
-
"data-testid":
|
|
3941
|
+
(f(!0), $(me, null, pe(s.value, (N, b) => (f(), G(k, {
|
|
3942
|
+
key: N.value,
|
|
3943
|
+
"data-testid": N.value,
|
|
3944
3944
|
expandable: "",
|
|
3945
3945
|
"last-menu-item": b === s.value.length - 1
|
|
3946
3946
|
}, {
|
|
3947
3947
|
itemTitle: g(() => [
|
|
3948
|
-
F("span",
|
|
3949
|
-
W(j(
|
|
3950
|
-
Fe(F("span",
|
|
3951
|
-
[Le, l.value.includes(
|
|
3948
|
+
F("span", Wl, [
|
|
3949
|
+
W(j(N.label) + " ", 1),
|
|
3950
|
+
Fe(F("span", Yl, null, 512), [
|
|
3951
|
+
[Le, l.value.includes(N.value)]
|
|
3952
3952
|
])
|
|
3953
3953
|
])
|
|
3954
3954
|
]),
|
|
3955
3955
|
itemBody: g(() => {
|
|
3956
|
-
var I,
|
|
3956
|
+
var I, B;
|
|
3957
3957
|
return [
|
|
3958
|
-
F("div",
|
|
3958
|
+
F("div", Zl, [
|
|
3959
3959
|
F("label", {
|
|
3960
3960
|
class: "menu-item-label",
|
|
3961
|
-
for: c(
|
|
3962
|
-
}, j(m(t)("filter.fieldLabel")), 9,
|
|
3963
|
-
((
|
|
3961
|
+
for: c(N.value)
|
|
3962
|
+
}, j(m(t)("filter.fieldLabel")), 9, Ql),
|
|
3963
|
+
((B = (I = e.config.schema) == null ? void 0 : I[N.value]) == null ? void 0 : B.type) === "select" ? (f(), G(q, {
|
|
3964
3964
|
key: 0,
|
|
3965
|
-
id: c(
|
|
3966
|
-
modelValue: i.value[
|
|
3967
|
-
"onUpdate:modelValue": (V) => i.value[
|
|
3965
|
+
id: c(N.value),
|
|
3966
|
+
modelValue: i.value[N.value],
|
|
3967
|
+
"onUpdate:modelValue": (V) => i.value[N.value] = V,
|
|
3968
3968
|
appearance: "select",
|
|
3969
|
-
items:
|
|
3969
|
+
items: y(N.value),
|
|
3970
3970
|
placeholder: m(t)("filter.selectPlaceholder")
|
|
3971
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (f(),
|
|
3971
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (f(), G(L, {
|
|
3972
3972
|
key: 1,
|
|
3973
|
-
id: c(
|
|
3974
|
-
modelValue: i.value[
|
|
3975
|
-
"onUpdate:modelValue": (V) => i.value[
|
|
3973
|
+
id: c(N.value),
|
|
3974
|
+
modelValue: i.value[N.value],
|
|
3975
|
+
"onUpdate:modelValue": (V) => i.value[N.value] = V,
|
|
3976
3976
|
autocomplete: "off",
|
|
3977
3977
|
placeholder: m(t)("filter.inputPlaceholder"),
|
|
3978
|
-
type: d(
|
|
3978
|
+
type: d(N.value)
|
|
3979
3979
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3980
3980
|
]),
|
|
3981
|
-
F("div",
|
|
3981
|
+
F("div", Xl, [
|
|
3982
3982
|
O(S, {
|
|
3983
3983
|
appearance: "tertiary",
|
|
3984
3984
|
"data-testid": "apply-filter",
|
|
3985
3985
|
size: "small",
|
|
3986
|
-
onClick: C[0] || (C[0] = (V) =>
|
|
3986
|
+
onClick: C[0] || (C[0] = (V) => _(!0))
|
|
3987
3987
|
}, {
|
|
3988
3988
|
default: g(() => [
|
|
3989
3989
|
W(j(m(t)("filter.applyButtonText")), 1)
|
|
@@ -3994,7 +3994,7 @@ const al = {
|
|
|
3994
3994
|
appearance: "tertiary",
|
|
3995
3995
|
"data-testid": "clear-filter",
|
|
3996
3996
|
size: "small",
|
|
3997
|
-
onClick: (V) => w(
|
|
3997
|
+
onClick: (V) => w(N.value)
|
|
3998
3998
|
}, {
|
|
3999
3999
|
default: g(() => [
|
|
4000
4000
|
W(j(m(t)("filter.clearButtonText")), 1)
|
|
@@ -4008,7 +4008,7 @@ const al = {
|
|
|
4008
4008
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
4009
4009
|
]),
|
|
4010
4010
|
actionButton: g(() => [
|
|
4011
|
-
F("div",
|
|
4011
|
+
F("div", es, [
|
|
4012
4012
|
O(S, {
|
|
4013
4013
|
appearance: "tertiary",
|
|
4014
4014
|
size: "small",
|
|
@@ -4028,7 +4028,7 @@ const al = {
|
|
|
4028
4028
|
]));
|
|
4029
4029
|
};
|
|
4030
4030
|
}
|
|
4031
|
-
}),
|
|
4031
|
+
}), ns = /* @__PURE__ */ ge(ts, [["__scopeId", "data-v-15962ee2"]]), Re = /* @__PURE__ */ ne({
|
|
4032
4032
|
__name: "PermissionsWrapper",
|
|
4033
4033
|
props: {
|
|
4034
4034
|
/**
|
|
@@ -4050,7 +4050,7 @@ const al = {
|
|
|
4050
4050
|
}
|
|
4051
4051
|
},
|
|
4052
4052
|
setup(e) {
|
|
4053
|
-
const n = e, t = E(void 0), a =
|
|
4053
|
+
const n = e, t = E(void 0), a = T(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
4054
4054
|
return ve(() => n.authFunction, async () => {
|
|
4055
4055
|
t.value = await n.authFunction();
|
|
4056
4056
|
}, { immediate: !0 }), (r, o) => a.value ? Z(r.$slots, "default", {
|
|
@@ -4058,16 +4058,16 @@ const al = {
|
|
|
4058
4058
|
isAllowed: t.value
|
|
4059
4059
|
}) : z("", !0);
|
|
4060
4060
|
}
|
|
4061
|
-
}),
|
|
4061
|
+
}), as = { class: "form-section-wrapper" }, rs = {
|
|
4062
4062
|
key: 0,
|
|
4063
4063
|
class: "form-section-title"
|
|
4064
|
-
},
|
|
4064
|
+
}, os = {
|
|
4065
4065
|
key: 1,
|
|
4066
4066
|
class: "form-section-description"
|
|
4067
|
-
},
|
|
4067
|
+
}, is = {
|
|
4068
4068
|
key: 2,
|
|
4069
4069
|
class: "form-section-footer"
|
|
4070
|
-
},
|
|
4070
|
+
}, ls = { class: "form-section-content" }, ss = /* @__PURE__ */ ne({
|
|
4071
4071
|
__name: "EntityFormSection",
|
|
4072
4072
|
props: {
|
|
4073
4073
|
title: {
|
|
@@ -4093,37 +4093,37 @@ const al = {
|
|
|
4093
4093
|
},
|
|
4094
4094
|
setup(e) {
|
|
4095
4095
|
const n = Ze();
|
|
4096
|
-
return (t, a) => (f(),
|
|
4096
|
+
return (t, a) => (f(), $("fieldset", {
|
|
4097
4097
|
class: Ie(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4098
4098
|
}, [
|
|
4099
|
-
F("div",
|
|
4100
|
-
e.hideInfoHeader ? z("", !0) : (f(),
|
|
4099
|
+
F("div", as, [
|
|
4100
|
+
e.hideInfoHeader ? z("", !0) : (f(), $("div", {
|
|
4101
4101
|
key: 0,
|
|
4102
4102
|
class: Ie(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4103
4103
|
}, [
|
|
4104
|
-
e.title ? (f(),
|
|
4105
|
-
e.description || m(n).description ? (f(),
|
|
4104
|
+
e.title ? (f(), $("h4", rs, j(e.title), 1)) : z("", !0),
|
|
4105
|
+
e.description || m(n).description ? (f(), $("div", os, [
|
|
4106
4106
|
Z(t.$slots, "description", {}, () => [
|
|
4107
4107
|
F("p", null, j(e.description), 1)
|
|
4108
4108
|
], !0)
|
|
4109
4109
|
])) : z("", !0),
|
|
4110
|
-
m(n).footer ? (f(),
|
|
4110
|
+
m(n).footer ? (f(), $("div", is, [
|
|
4111
4111
|
Z(t.$slots, "footer", {}, void 0, !0)
|
|
4112
4112
|
])) : z("", !0)
|
|
4113
4113
|
], 2)),
|
|
4114
|
-
F("div",
|
|
4114
|
+
F("div", ls, [
|
|
4115
4115
|
Z(t.$slots, "default", {}, void 0, !0)
|
|
4116
4116
|
])
|
|
4117
4117
|
])
|
|
4118
4118
|
], 2));
|
|
4119
4119
|
}
|
|
4120
|
-
}),
|
|
4120
|
+
}), us = /* @__PURE__ */ ge(ss, [["__scopeId", "data-v-3565daa7"]]), { useAxios: xt, useDeleteUrlBuilder: cs, useErrors: ds, useExternalLinkCreator: Ks, useFetchUrlBuilder: qs, useFetcher: ps, useDebouncedFilter: fs, useStringHelpers: Bs, useHelpers: Fs, useGatewayFeatureSupported: Ls, useTruncationDetector: Us } = oe, ms = { class: "add-consumer-form-container" }, gs = { class: "add-consumer-form-cta" }, ys = { class: "select-item-label" }, hs = {
|
|
4121
4121
|
key: 0,
|
|
4122
4122
|
class: "select-item-desc"
|
|
4123
|
-
},
|
|
4123
|
+
}, vs = {
|
|
4124
4124
|
key: 0,
|
|
4125
4125
|
class: "kong-ui-entity-add-consumers-error"
|
|
4126
|
-
},
|
|
4126
|
+
}, bs = { key: 0 }, Cs = /* @__PURE__ */ ne({
|
|
4127
4127
|
__name: "AddConsumerModal",
|
|
4128
4128
|
props: {
|
|
4129
4129
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4149,8 +4149,8 @@ const al = {
|
|
|
4149
4149
|
allRecords: u,
|
|
4150
4150
|
error: p,
|
|
4151
4151
|
loadItems: c,
|
|
4152
|
-
results:
|
|
4153
|
-
} =
|
|
4152
|
+
results: y
|
|
4153
|
+
} = fs(
|
|
4154
4154
|
a.config,
|
|
4155
4155
|
Te.list[a.config.app].all,
|
|
4156
4156
|
"",
|
|
@@ -4158,101 +4158,101 @@ const al = {
|
|
|
4158
4158
|
fetchedItemsKey: "data",
|
|
4159
4159
|
searchKeys: ["username", "id"]
|
|
4160
4160
|
}
|
|
4161
|
-
), d = (
|
|
4162
|
-
label:
|
|
4163
|
-
value:
|
|
4164
|
-
selected: i.value.includes(
|
|
4165
|
-
data:
|
|
4161
|
+
), d = (x) => x, w = T(() => p.value ? t("consumers.errors.general") : ""), v = E(0), _ = T(() => u.value === void 0), h = T(() => y.value.map((x) => ({
|
|
4162
|
+
label: x.username || x.customId,
|
|
4163
|
+
value: x.id,
|
|
4164
|
+
selected: i.value.includes(x.id),
|
|
4165
|
+
data: x
|
|
4166
4166
|
// we need this to determine whether or not to show the description text
|
|
4167
|
-
}))), C = (
|
|
4167
|
+
}))), C = (x) => {
|
|
4168
4168
|
var P;
|
|
4169
|
-
const
|
|
4170
|
-
return
|
|
4171
|
-
},
|
|
4169
|
+
const K = _.value ? y.value.find((R) => R.id === x) : (P = u.value) == null ? void 0 : P.find((R) => R.id === x);
|
|
4170
|
+
return K ? K.username || K.custom_id : x;
|
|
4171
|
+
}, L = () => {
|
|
4172
4172
|
k.value = "", S.value = [], I.value = [], r("cancel");
|
|
4173
|
-
}, S = E([]),
|
|
4173
|
+
}, S = E([]), q = E(!1), k = E(""), U = async () => {
|
|
4174
4174
|
if (!i.value.length) {
|
|
4175
4175
|
k.value = "", I.value = [], r("cancel");
|
|
4176
4176
|
return;
|
|
4177
4177
|
}
|
|
4178
|
-
|
|
4178
|
+
q.value = !0, k.value = "", S.value = [], I.value = [];
|
|
4179
4179
|
try {
|
|
4180
|
-
const
|
|
4180
|
+
const x = i.value.map((R) => b(R)), K = await Promise.allSettled(x);
|
|
4181
4181
|
let P = !0;
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
}), P ? (S.value = [], I.value = [], r("add:success", i.value), i.value = []) : (S.value.length && r("add:partial-success", S.value), i.value = [], K
|
|
4182
|
+
K.forEach((R) => {
|
|
4183
|
+
R.status !== "fulfilled" && (P = !1);
|
|
4184
|
+
}), P ? (S.value = [], I.value = [], r("add:success", i.value), i.value = []) : (S.value.length && r("add:partial-success", S.value), i.value = [], B(K));
|
|
4185
4185
|
} catch {
|
|
4186
4186
|
k.value = t("consumers.errors.add"), r("error", k.value);
|
|
4187
4187
|
} finally {
|
|
4188
|
-
|
|
4188
|
+
q.value = !1;
|
|
4189
4189
|
}
|
|
4190
|
-
},
|
|
4191
|
-
var
|
|
4192
|
-
let
|
|
4193
|
-
return a.config.app === "konnect" ?
|
|
4194
|
-
}), b = async (
|
|
4195
|
-
const
|
|
4196
|
-
consumer:
|
|
4190
|
+
}, N = T(() => {
|
|
4191
|
+
var K, P, R, Q;
|
|
4192
|
+
let x = `${a.config.apiBaseUrl}${Te.list[a.config.app].forConsumerGroup}`;
|
|
4193
|
+
return a.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((K = a.config) == null ? void 0 : K.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((P = a.config) == null ? void 0 : P.consumerGroupId) || "") : a.config.app === "kongManager" && (x = x.replace(/\/{workspace}/gi, (R = a.config) != null && R.workspace ? `/${a.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((Q = a.config) == null ? void 0 : Q.consumerGroupId) || "")), x;
|
|
4194
|
+
}), b = async (x) => {
|
|
4195
|
+
const K = {
|
|
4196
|
+
consumer: x
|
|
4197
4197
|
};
|
|
4198
4198
|
try {
|
|
4199
|
-
const P = await o.post(
|
|
4200
|
-
return S.value.push(
|
|
4199
|
+
const P = await o.post(N.value, K);
|
|
4200
|
+
return S.value.push(x), P;
|
|
4201
4201
|
} catch (P) {
|
|
4202
|
-
let
|
|
4203
|
-
return P.response.status === 409 && (
|
|
4202
|
+
let R = `${C(x)} - ${P.message}`;
|
|
4203
|
+
return P.response.status === 409 && (R = `${C(x)} - ${t("consumers.errors.already_added")}`), Promise.reject(Error(R));
|
|
4204
4204
|
}
|
|
4205
|
-
}, I = E([]),
|
|
4206
|
-
I.value =
|
|
4205
|
+
}, I = E([]), B = (x) => {
|
|
4206
|
+
I.value = x.map((K) => {
|
|
4207
4207
|
var P;
|
|
4208
|
-
return (P =
|
|
4208
|
+
return (P = K.reason) == null ? void 0 : P.message;
|
|
4209
4209
|
}).filter(Boolean);
|
|
4210
4210
|
};
|
|
4211
|
-
return ve(
|
|
4211
|
+
return ve(h, () => {
|
|
4212
4212
|
v.value++;
|
|
4213
4213
|
}, { immediate: !0, deep: !0 }), ve(() => a.visible, () => {
|
|
4214
4214
|
a.visible && c();
|
|
4215
|
-
}, { immediate: !0 }), (
|
|
4216
|
-
const P = D("KMultiselect"),
|
|
4217
|
-
return f(),
|
|
4218
|
-
"action-pending":
|
|
4215
|
+
}, { immediate: !0 }), (x, K) => {
|
|
4216
|
+
const P = D("KMultiselect"), R = D("KAlert"), Q = D("KPrompt");
|
|
4217
|
+
return f(), G(Q, {
|
|
4218
|
+
"action-pending": q.value,
|
|
4219
4219
|
class: "kong-ui-entities-add-consumers-modal",
|
|
4220
4220
|
"data-testid": "add-consumer-modal",
|
|
4221
4221
|
"is-visible": e.visible,
|
|
4222
4222
|
title: m(t)("consumers.consumer_groups.add.title"),
|
|
4223
|
-
onCanceled:
|
|
4224
|
-
onProceed:
|
|
4223
|
+
onCanceled: L,
|
|
4224
|
+
onProceed: U
|
|
4225
4225
|
}, {
|
|
4226
4226
|
"body-content": g(() => [
|
|
4227
|
-
F("div",
|
|
4228
|
-
F("p",
|
|
4227
|
+
F("div", ms, [
|
|
4228
|
+
F("p", gs, j(m(t)("consumers.consumer_groups.add.ctaText")), 1),
|
|
4229
4229
|
O(P, {
|
|
4230
4230
|
modelValue: i.value,
|
|
4231
|
-
"onUpdate:modelValue":
|
|
4231
|
+
"onUpdate:modelValue": K[0] || (K[0] = (J) => i.value = J),
|
|
4232
4232
|
autosuggest: "",
|
|
4233
4233
|
"data-testid": "add-consumers-multiselect",
|
|
4234
|
-
"dropdown-footer-text":
|
|
4235
|
-
items:
|
|
4234
|
+
"dropdown-footer-text": _.value ? m(t)("consumers.consumer_groups.add.footer") : void 0,
|
|
4235
|
+
items: h.value,
|
|
4236
4236
|
label: m(t)("consumers.consumer_groups.add.consumers_label"),
|
|
4237
4237
|
loading: m(s),
|
|
4238
4238
|
placeholder: m(t)("consumers.consumer_groups.add.consumer_placeholder"),
|
|
4239
|
-
readonly:
|
|
4239
|
+
readonly: q.value,
|
|
4240
4240
|
required: "",
|
|
4241
4241
|
width: "100%",
|
|
4242
4242
|
onQueryChange: m(l)
|
|
4243
4243
|
}, {
|
|
4244
4244
|
"item-template": g(({ item: J }) => [
|
|
4245
|
-
F("div",
|
|
4246
|
-
d(J).data.username && d(J).data.custom_id ? (f(),
|
|
4245
|
+
F("div", ys, j(J.label), 1),
|
|
4246
|
+
d(J).data.username && d(J).data.custom_id ? (f(), $("div", hs, j(d(J).data.custom_id), 1)) : z("", !0)
|
|
4247
4247
|
]),
|
|
4248
4248
|
_: 1
|
|
4249
4249
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4250
|
-
k.value || w.value || I.value.length ? (f(),
|
|
4251
|
-
O(
|
|
4250
|
+
k.value || w.value || I.value.length ? (f(), $("div", vs, [
|
|
4251
|
+
O(R, { appearance: "danger" }, {
|
|
4252
4252
|
alertMessage: g(() => [
|
|
4253
4253
|
F("p", null, j(m(t)("consumers.errors.add")), 1),
|
|
4254
|
-
I.value.length ? (f(),
|
|
4255
|
-
(f(!0),
|
|
4254
|
+
I.value.length ? (f(), $("ul", bs, [
|
|
4255
|
+
(f(!0), $(me, null, pe(I.value, (J, X) => (f(), $("li", { key: X }, j(J), 1))), 128))
|
|
4256
4256
|
])) : z("", !0),
|
|
4257
4257
|
F("div", null, j(k.value || w.value), 1)
|
|
4258
4258
|
]),
|
|
@@ -4270,7 +4270,7 @@ const al = {
|
|
|
4270
4270
|
for (const [a, r] of n)
|
|
4271
4271
|
t[a] = r;
|
|
4272
4272
|
return t;
|
|
4273
|
-
},
|
|
4273
|
+
}, ks = /* @__PURE__ */ Tt(Cs, [["__scopeId", "data-v-68cc6403"]]), ws = { class: "kong-ui-entities-consumers-list" }, Is = { key: 1 }, _s = /* @__PURE__ */ ne({
|
|
4274
4274
|
__name: "ConsumerList",
|
|
4275
4275
|
props: {
|
|
4276
4276
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4319,124 +4319,126 @@ const al = {
|
|
|
4319
4319
|
var Kt;
|
|
4320
4320
|
const t = n, a = e, { i18nT: r, i18n: { t: o } } = Qe.useI18n(), i = yt(), { axiosInstance: l } = xt({
|
|
4321
4321
|
headers: (Kt = a.config) == null ? void 0 : Kt.requestHeaders
|
|
4322
|
-
}), s = E(1), u =
|
|
4322
|
+
}), s = E(1), u = T(() => !!a.config.consumerGroupId), p = T(
|
|
4323
|
+
() => u.value ? "kong-ui-entities-consumers-list-in-group-page" : "kong-ui-entities-consumers-list"
|
|
4324
|
+
), c = T(() => a.config.app !== "kongManager" || !!a.config.disableSorting), y = {
|
|
4323
4325
|
username: { label: o("consumers.list.table_headers.username"), searchable: !0, sortable: !0 },
|
|
4324
4326
|
custom_id: { label: o("consumers.list.table_headers.custom_id"), searchable: !0, sortable: !0 },
|
|
4325
4327
|
tags: { label: o("consumers.list.table_headers.tags"), sortable: !1 }
|
|
4326
|
-
},
|
|
4327
|
-
"data-testid":
|
|
4328
|
-
}),
|
|
4328
|
+
}, d = y, w = (A) => ({
|
|
4329
|
+
"data-testid": A.username ?? A.custom_id ?? A.id
|
|
4330
|
+
}), v = T(() => {
|
|
4329
4331
|
var H, te, ce, ye;
|
|
4330
|
-
let
|
|
4331
|
-
return a.config.app === "konnect" ?
|
|
4332
|
-
}),
|
|
4333
|
-
const
|
|
4334
|
-
return
|
|
4335
|
-
isExactMatch:
|
|
4332
|
+
let A = `${a.config.apiBaseUrl}${Te.list[a.config.app][u.value ? "forConsumerGroup" : "all"]}`;
|
|
4333
|
+
return a.config.app === "konnect" ? A = A.replace(/{controlPlaneId}/gi, ((H = a.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((te = a.config) == null ? void 0 : te.consumerGroupId) || "") : a.config.app === "kongManager" && (A = A.replace(/\/{workspace}/gi, (ce = a.config) != null && ce.workspace ? `/${a.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ye = a.config) == null ? void 0 : ye.consumerGroupId) || "")), A;
|
|
4334
|
+
}), _ = E(""), h = T(() => {
|
|
4335
|
+
const A = a.config.app === "konnect" || a.config.isExactMatch;
|
|
4336
|
+
return A ? {
|
|
4337
|
+
isExactMatch: A,
|
|
4336
4338
|
placeholder: o(`consumers.search.placeholder.${a.config.app}`)
|
|
4337
4339
|
} : {
|
|
4338
|
-
isExactMatch:
|
|
4340
|
+
isExactMatch: A,
|
|
4339
4341
|
fields: {
|
|
4340
|
-
username:
|
|
4341
|
-
custom_id:
|
|
4342
|
+
username: y.username,
|
|
4343
|
+
custom_id: y.custom_id
|
|
4342
4344
|
},
|
|
4343
4345
|
schema: a.config.filterSchema
|
|
4344
4346
|
};
|
|
4345
|
-
}),
|
|
4346
|
-
|
|
4347
|
-
},
|
|
4347
|
+
}), C = T(() => u.value && !a.config.paginatedEndpoint ? "consumers" : void 0), { fetcher: L, fetcherState: S } = ps(a.config, v.value, C.value), q = () => {
|
|
4348
|
+
_.value = "";
|
|
4349
|
+
}, k = () => {
|
|
4348
4350
|
s.value++;
|
|
4349
|
-
},
|
|
4350
|
-
const te =
|
|
4351
|
+
}, U = (A) => A ?? "-", N = E(null), b = (A, H) => {
|
|
4352
|
+
const te = A.id;
|
|
4351
4353
|
if (!H(te)) {
|
|
4352
4354
|
t("copy:error", {
|
|
4353
|
-
entity:
|
|
4355
|
+
entity: A,
|
|
4354
4356
|
field: "id",
|
|
4355
4357
|
message: o("consumers.errors.copy")
|
|
4356
4358
|
});
|
|
4357
4359
|
return;
|
|
4358
4360
|
}
|
|
4359
4361
|
t("copy:success", {
|
|
4360
|
-
entity:
|
|
4362
|
+
entity: A,
|
|
4361
4363
|
field: "id",
|
|
4362
4364
|
message: o("consumers.copy.success", { val: te })
|
|
4363
4365
|
});
|
|
4364
|
-
},
|
|
4365
|
-
const te = JSON.stringify(
|
|
4366
|
+
}, I = (A, H) => {
|
|
4367
|
+
const te = JSON.stringify(A);
|
|
4366
4368
|
if (!H(te)) {
|
|
4367
4369
|
t("copy:error", {
|
|
4368
|
-
entity:
|
|
4370
|
+
entity: A,
|
|
4369
4371
|
message: o("consumers.errors.copy")
|
|
4370
4372
|
});
|
|
4371
4373
|
return;
|
|
4372
4374
|
}
|
|
4373
4375
|
t("copy:success", {
|
|
4374
|
-
entity:
|
|
4376
|
+
entity: A,
|
|
4375
4377
|
message: o("consumers.copy.success_brief")
|
|
4376
4378
|
});
|
|
4377
|
-
},
|
|
4379
|
+
}, B = async (A) => {
|
|
4378
4380
|
var te;
|
|
4379
|
-
await ((te = a.canRetrieve) == null ? void 0 : te.call(a,
|
|
4380
|
-
},
|
|
4381
|
+
await ((te = a.canRetrieve) == null ? void 0 : te.call(a, A)) && i.push(a.config.getViewRoute(A.id));
|
|
4382
|
+
}, V = (A) => ({
|
|
4381
4383
|
label: o("consumers.actions.view"),
|
|
4382
|
-
to: a.config.getViewRoute(
|
|
4383
|
-
}),
|
|
4384
|
+
to: a.config.getViewRoute(A)
|
|
4385
|
+
}), x = (A) => ({
|
|
4384
4386
|
label: o("consumers.actions.edit"),
|
|
4385
|
-
to: a.config.getEditRoute(
|
|
4386
|
-
}),
|
|
4387
|
-
|
|
4388
|
-
},
|
|
4389
|
-
|
|
4390
|
-
},
|
|
4391
|
-
var
|
|
4392
|
-
if ((
|
|
4393
|
-
|
|
4387
|
+
to: a.config.getEditRoute(A)
|
|
4388
|
+
}), K = E(void 0), P = E(!1), R = E(!1), Q = E(""), J = cs(a.config, v.value), X = (A) => {
|
|
4389
|
+
K.value = A, P.value = !0;
|
|
4390
|
+
}, ue = () => {
|
|
4391
|
+
P.value = !1;
|
|
4392
|
+
}, ua = async () => {
|
|
4393
|
+
var A, H, te;
|
|
4394
|
+
if ((A = K.value) != null && A.id) {
|
|
4395
|
+
R.value = !0;
|
|
4394
4396
|
try {
|
|
4395
|
-
await l.delete(
|
|
4397
|
+
await l.delete(J(K.value.id)), R.value = !1, P.value = !1, s.value++, t("delete:success", K.value);
|
|
4396
4398
|
} catch (ce) {
|
|
4397
|
-
|
|
4399
|
+
Q.value = ((te = (H = ce.response) == null ? void 0 : H.data) == null ? void 0 : te.message) || ce.message || o("consumers.errors.delete"), t("error", ce);
|
|
4398
4400
|
} finally {
|
|
4399
|
-
|
|
4401
|
+
R.value = !1;
|
|
4400
4402
|
}
|
|
4401
4403
|
}
|
|
4402
4404
|
}, et = E(!1), $t = () => {
|
|
4403
4405
|
et.value = !0;
|
|
4404
4406
|
}, jt = () => {
|
|
4405
4407
|
et.value = !1;
|
|
4406
|
-
}, Mt = (
|
|
4407
|
-
H || jt(), s.value++, t("add:success",
|
|
4408
|
-
},
|
|
4408
|
+
}, Mt = (A, H) => {
|
|
4409
|
+
H || jt(), s.value++, t("add:success", A);
|
|
4410
|
+
}, ca = () => {
|
|
4409
4411
|
u.value && $t();
|
|
4410
|
-
}, be = E(void 0), tt = E(!1),
|
|
4411
|
-
be.value =
|
|
4412
|
+
}, be = E(void 0), tt = E(!1), da = E(""), pa = (A) => {
|
|
4413
|
+
be.value = A, tt.value = !0;
|
|
4412
4414
|
}, Ot = () => {
|
|
4413
4415
|
tt.value = !1, be.value = void 0;
|
|
4414
|
-
},
|
|
4416
|
+
}, fa = T(() => {
|
|
4415
4417
|
var H, te, ce, ye;
|
|
4416
|
-
let
|
|
4417
|
-
return a.config.app === "konnect" ?
|
|
4418
|
-
}), Et = E(!1),
|
|
4418
|
+
let A = `${a.config.apiBaseUrl}${Te.list[a.config.app].oneForConsumerGroup}`;
|
|
4419
|
+
return a.config.app === "konnect" ? A = A.replace(/{controlPlaneId}/gi, ((H = a.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((te = a.config) == null ? void 0 : te.consumerGroupId) || "") : a.config.app === "kongManager" && (A = A.replace(/\/{workspace}/gi, (ce = a.config) != null && ce.workspace ? `/${a.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ye = a.config) == null ? void 0 : ye.consumerGroupId) || "")), A;
|
|
4420
|
+
}), Et = E(!1), ma = async () => {
|
|
4419
4421
|
if (be.value) {
|
|
4420
4422
|
Et.value = !0;
|
|
4421
4423
|
try {
|
|
4422
|
-
const
|
|
4423
|
-
await l.delete(
|
|
4424
|
-
} catch (
|
|
4425
|
-
|
|
4424
|
+
const A = fa.value.replace(/{consumerId}/gi, be.value.id);
|
|
4425
|
+
await l.delete(A), t("remove:success", be.value), Ot(), s.value++;
|
|
4426
|
+
} catch (A) {
|
|
4427
|
+
da.value = A.message || o("consumers.errors.delete"), t("error", A);
|
|
4426
4428
|
} finally {
|
|
4427
4429
|
Et.value = !1;
|
|
4428
4430
|
}
|
|
4429
4431
|
}
|
|
4430
4432
|
}, Nt = E(!0);
|
|
4431
|
-
ve(
|
|
4433
|
+
ve(S, (A) => {
|
|
4432
4434
|
var H, te, ce, ye;
|
|
4433
|
-
if (Array.isArray((H =
|
|
4434
|
-
|
|
4435
|
+
if (Array.isArray((H = A == null ? void 0 : A.response) == null ? void 0 : H.data) && (Nt.value = A.response.data.length > 0), A.status === Se.Error) {
|
|
4436
|
+
N.value = {
|
|
4435
4437
|
title: o("consumers.errors.general")
|
|
4436
|
-
}, (ye = (ce = (te =
|
|
4438
|
+
}, (ye = (ce = (te = A.error) == null ? void 0 : te.response) == null ? void 0 : ce.data) != null && ye.message && (N.value.message = A.error.response.data.message), t("error", A.error);
|
|
4437
4439
|
return;
|
|
4438
4440
|
}
|
|
4439
|
-
|
|
4441
|
+
N.value = null;
|
|
4440
4442
|
});
|
|
4441
4443
|
const nt = E({
|
|
4442
4444
|
ctaPath: u.value ? void 0 : a.config.createRoute,
|
|
@@ -4446,40 +4448,40 @@ const al = {
|
|
|
4446
4448
|
});
|
|
4447
4449
|
return gt(async () => {
|
|
4448
4450
|
await a.canCreate() && (nt.value.title = u.value ? o("consumers.list.empty_state.title_for_consumer_group") : o("consumers.list.empty_state.title"), nt.value.ctaText = u.value ? o("consumers.actions.add_consumer") : o("consumers.actions.create"));
|
|
4449
|
-
}), (
|
|
4450
|
-
const te = D("KButton"), ce = D("KBadge"), ye = D("KTruncate"), qe = D("KDropdownItem"), qt = D("KClipboardProvider"),
|
|
4451
|
-
return f(),
|
|
4452
|
-
O(m(
|
|
4451
|
+
}), (A, H) => {
|
|
4452
|
+
const te = D("KButton"), ce = D("KBadge"), ye = D("KTruncate"), qe = D("KDropdownItem"), qt = D("KClipboardProvider"), ga = D("KPrompt");
|
|
4453
|
+
return f(), $("div", ws, [
|
|
4454
|
+
O(m(Fl), {
|
|
4453
4455
|
"cache-identifier": e.cacheIdentifier,
|
|
4454
|
-
"disable-pagination": u.value,
|
|
4456
|
+
"disable-pagination": u.value && !e.config.paginatedEndpoint,
|
|
4455
4457
|
"disable-pagination-page-jump": "",
|
|
4456
|
-
"disable-sorting":
|
|
4458
|
+
"disable-sorting": c.value,
|
|
4457
4459
|
"empty-state-options": nt.value,
|
|
4458
4460
|
"enable-entity-actions": "",
|
|
4459
|
-
"error-message":
|
|
4460
|
-
fetcher: m(
|
|
4461
|
+
"error-message": N.value,
|
|
4462
|
+
fetcher: m(L),
|
|
4461
4463
|
"fetcher-cache-key": s.value,
|
|
4462
4464
|
"pagination-type": "offset",
|
|
4463
|
-
"preferences-storage-key":
|
|
4464
|
-
query:
|
|
4465
|
-
"row-attributes":
|
|
4466
|
-
"table-headers": m(
|
|
4465
|
+
"preferences-storage-key": p.value,
|
|
4466
|
+
query: _.value,
|
|
4467
|
+
"row-attributes": w,
|
|
4468
|
+
"table-headers": m(d),
|
|
4467
4469
|
"use-action-outside": e.useActionOutside,
|
|
4468
|
-
onClearSearchInput:
|
|
4469
|
-
"onClick:row": H[3] || (H[3] = (Y) =>
|
|
4470
|
-
onEmptyStateCtaClicked:
|
|
4471
|
-
onSort:
|
|
4470
|
+
onClearSearchInput: q,
|
|
4471
|
+
"onClick:row": H[3] || (H[3] = (Y) => B(Y)),
|
|
4472
|
+
onEmptyStateCtaClicked: ca,
|
|
4473
|
+
onSort: k
|
|
4472
4474
|
}, {
|
|
4473
4475
|
"toolbar-filter": g(() => [
|
|
4474
|
-
u.value ? z("", !0) : (f(),
|
|
4476
|
+
u.value ? z("", !0) : (f(), G(m(ns), {
|
|
4475
4477
|
key: 0,
|
|
4476
|
-
modelValue:
|
|
4477
|
-
"onUpdate:modelValue": H[0] || (H[0] = (Y) =>
|
|
4478
|
-
config:
|
|
4478
|
+
modelValue: _.value,
|
|
4479
|
+
"onUpdate:modelValue": H[0] || (H[0] = (Y) => _.value = Y),
|
|
4480
|
+
config: h.value
|
|
4479
4481
|
}, null, 8, ["modelValue", "config"]))
|
|
4480
4482
|
]),
|
|
4481
4483
|
"toolbar-button": g(() => [
|
|
4482
|
-
(f(),
|
|
4484
|
+
(f(), G(xe(e.useActionOutside ? "Teleport" : "div"), {
|
|
4483
4485
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
4484
4486
|
}, {
|
|
4485
4487
|
default: g(() => [
|
|
@@ -4509,15 +4511,15 @@ const al = {
|
|
|
4509
4511
|
}, 8, ["to"]))
|
|
4510
4512
|
]),
|
|
4511
4513
|
username: g(({ rowValue: Y }) => [
|
|
4512
|
-
F("b", null, j(
|
|
4514
|
+
F("b", null, j(U(Y)), 1)
|
|
4513
4515
|
]),
|
|
4514
4516
|
custom_id: g(({ rowValue: Y }) => [
|
|
4515
|
-
W(j(
|
|
4517
|
+
W(j(U(Y)), 1)
|
|
4516
4518
|
]),
|
|
4517
4519
|
tags: g(({ rowValue: Y }) => [
|
|
4518
|
-
Y && Y.length > 0 ? (f(),
|
|
4520
|
+
Y && Y.length > 0 ? (f(), G(ye, { key: 0 }, {
|
|
4519
4521
|
default: g(() => [
|
|
4520
|
-
(f(!0),
|
|
4522
|
+
(f(!0), $(me, null, pe(Y, ($e) => (f(), G(ce, {
|
|
4521
4523
|
key: $e,
|
|
4522
4524
|
onClick: H[2] || (H[2] = Ge(() => {
|
|
4523
4525
|
}, ["stop"]))
|
|
@@ -4529,14 +4531,14 @@ const al = {
|
|
|
4529
4531
|
}, 1024))), 128))
|
|
4530
4532
|
]),
|
|
4531
4533
|
_: 2
|
|
4532
|
-
}, 1024)) : (f(),
|
|
4534
|
+
}, 1024)) : (f(), $("span", Is, "-"))
|
|
4533
4535
|
]),
|
|
4534
4536
|
actions: g(({ row: Y }) => [
|
|
4535
4537
|
O(qt, null, {
|
|
4536
4538
|
default: g(({ copyToClipboard: $e }) => [
|
|
4537
4539
|
O(qe, {
|
|
4538
4540
|
"data-testid": "action-entity-copy-id",
|
|
4539
|
-
onClick: (
|
|
4541
|
+
onClick: (ya) => b(Y, $e)
|
|
4540
4542
|
}, {
|
|
4541
4543
|
default: g(() => [
|
|
4542
4544
|
W(j(m(o)("consumers.actions.copy_id")), 1)
|
|
@@ -4550,7 +4552,7 @@ const al = {
|
|
|
4550
4552
|
default: g(({ copyToClipboard: $e }) => [
|
|
4551
4553
|
O(qe, {
|
|
4552
4554
|
"data-testid": "action-entity-copy-json",
|
|
4553
|
-
onClick: (
|
|
4555
|
+
onClick: (ya) => I(Y, $e)
|
|
4554
4556
|
}, {
|
|
4555
4557
|
default: g(() => [
|
|
4556
4558
|
W(j(m(o)("consumers.actions.copy_json")), 1)
|
|
@@ -4567,7 +4569,7 @@ const al = {
|
|
|
4567
4569
|
O(qe, {
|
|
4568
4570
|
"data-testid": "action-entity-view",
|
|
4569
4571
|
"has-divider": "",
|
|
4570
|
-
item:
|
|
4572
|
+
item: V(Y.id)
|
|
4571
4573
|
}, null, 8, ["item"])
|
|
4572
4574
|
]),
|
|
4573
4575
|
_: 2
|
|
@@ -4578,7 +4580,7 @@ const al = {
|
|
|
4578
4580
|
default: g(() => [
|
|
4579
4581
|
O(qe, {
|
|
4580
4582
|
"data-testid": "action-entity-edit",
|
|
4581
|
-
item:
|
|
4583
|
+
item: x(Y.id)
|
|
4582
4584
|
}, null, 8, ["item"])
|
|
4583
4585
|
]),
|
|
4584
4586
|
_: 2
|
|
@@ -4591,7 +4593,7 @@ const al = {
|
|
|
4591
4593
|
danger: "",
|
|
4592
4594
|
"data-testid": "action-entity-delete",
|
|
4593
4595
|
"has-divider": "",
|
|
4594
|
-
onClick: () => e.config.consumerGroupId ?
|
|
4596
|
+
onClick: () => e.config.consumerGroupId ? pa(Y) : X(Y)
|
|
4595
4597
|
}, {
|
|
4596
4598
|
default: g(() => [
|
|
4597
4599
|
W(j(e.config.consumerGroupId ? m(o)("consumers.actions.remove") : m(o)("consumers.actions.delete")), 1)
|
|
@@ -4603,20 +4605,20 @@ const al = {
|
|
|
4603
4605
|
}, 1032, ["auth-function"])
|
|
4604
4606
|
]),
|
|
4605
4607
|
_: 1
|
|
4606
|
-
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "use-action-outside"]),
|
|
4607
|
-
O(m(
|
|
4608
|
-
"action-pending":
|
|
4608
|
+
}, 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"]),
|
|
4609
|
+
O(m(Dl), {
|
|
4610
|
+
"action-pending": R.value,
|
|
4609
4611
|
"data-testid": "delete-consumer-modal",
|
|
4610
4612
|
description: m(o)("consumers.delete.description"),
|
|
4611
|
-
"entity-name":
|
|
4613
|
+
"entity-name": K.value && (K.value.username || K.value.custom_id || K.value.id),
|
|
4612
4614
|
"entity-type": m(gn).Consumer,
|
|
4613
|
-
error:
|
|
4615
|
+
error: Q.value,
|
|
4614
4616
|
title: m(o)("consumers.delete.title"),
|
|
4615
|
-
visible:
|
|
4616
|
-
onCancel:
|
|
4617
|
-
onProceed:
|
|
4617
|
+
visible: P.value,
|
|
4618
|
+
onCancel: ue,
|
|
4619
|
+
onProceed: ua
|
|
4618
4620
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4619
|
-
e.config.consumerGroupId ? (f(),
|
|
4621
|
+
e.config.consumerGroupId ? (f(), G(ks, {
|
|
4620
4622
|
key: 0,
|
|
4621
4623
|
config: e.config,
|
|
4622
4624
|
"data-testid": "add-consumer-modal",
|
|
@@ -4625,14 +4627,14 @@ const al = {
|
|
|
4625
4627
|
"onAdd:success": H[5] || (H[5] = (Y) => Mt(Y)),
|
|
4626
4628
|
onCancel: jt
|
|
4627
4629
|
}, null, 8, ["config", "visible"])) : z("", !0),
|
|
4628
|
-
e.config.consumerGroupId && be.value ? (f(),
|
|
4630
|
+
e.config.consumerGroupId && be.value ? (f(), G(ga, {
|
|
4629
4631
|
key: 1,
|
|
4630
4632
|
"data-testid": "remove-consumer-modal",
|
|
4631
4633
|
"is-visible": tt.value,
|
|
4632
4634
|
title: m(o)("consumers.consumer_groups.remove.title"),
|
|
4633
4635
|
type: "danger",
|
|
4634
4636
|
onCanceled: Ot,
|
|
4635
|
-
onProceed:
|
|
4637
|
+
onProceed: ma
|
|
4636
4638
|
}, {
|
|
4637
4639
|
"body-content": g(() => [
|
|
4638
4640
|
O(m(r), {
|
|
@@ -4660,7 +4662,7 @@ const al = {
|
|
|
4660
4662
|
]);
|
|
4661
4663
|
};
|
|
4662
4664
|
}
|
|
4663
|
-
}),
|
|
4665
|
+
}), Ps = /* @__PURE__ */ Tt(_s, [["__scopeId", "data-v-4ec34e52"]]), Ss = { class: "kong-ui-entities-consumer-form" }, As = { class: "fields-group-title" }, xs = { class: "fields-group-text" }, Ts = /* @__PURE__ */ ne({
|
|
4664
4666
|
__name: "ConsumerForm",
|
|
4665
4667
|
props: {
|
|
4666
4668
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4678,10 +4680,10 @@ const al = {
|
|
|
4678
4680
|
},
|
|
4679
4681
|
emits: ["update", "error", "loading"],
|
|
4680
4682
|
setup(e, { emit: n }) {
|
|
4681
|
-
var
|
|
4683
|
+
var q;
|
|
4682
4684
|
const t = e, a = n, { i18nT: r, i18n: { t: o } } = Qe.useI18n(), i = yt(), { axiosInstance: l } = xt({
|
|
4683
|
-
headers: (
|
|
4684
|
-
}), { getMessageFromError: s } =
|
|
4685
|
+
headers: (q = t.config) == null ? void 0 : q.requestHeaders
|
|
4686
|
+
}), { getMessageFromError: s } = ds(), u = Bt({
|
|
4685
4687
|
fields: {
|
|
4686
4688
|
username: "",
|
|
4687
4689
|
customId: "",
|
|
@@ -4693,10 +4695,10 @@ const al = {
|
|
|
4693
4695
|
username: "",
|
|
4694
4696
|
customId: "",
|
|
4695
4697
|
tags: ""
|
|
4696
|
-
}), c =
|
|
4697
|
-
var k,
|
|
4698
|
-
return (
|
|
4699
|
-
}),
|
|
4698
|
+
}), c = T(() => {
|
|
4699
|
+
var k, U;
|
|
4700
|
+
return (U = Te.form[(k = t.config) == null ? void 0 : k.app]) == null ? void 0 : U.edit;
|
|
4701
|
+
}), y = () => {
|
|
4700
4702
|
var k;
|
|
4701
4703
|
i.push(((k = t.config) == null ? void 0 : k.cancelRoute) || { name: "consumer-list" });
|
|
4702
4704
|
}, d = (k) => {
|
|
@@ -4704,64 +4706,64 @@ const al = {
|
|
|
4704
4706
|
}, w = (k) => {
|
|
4705
4707
|
a("error", k);
|
|
4706
4708
|
}, v = (k) => {
|
|
4707
|
-
var
|
|
4708
|
-
u.fields.username = ((
|
|
4709
|
-
const
|
|
4710
|
-
u.fields.tags = (
|
|
4711
|
-
},
|
|
4712
|
-
var
|
|
4713
|
-
let
|
|
4714
|
-
return ((I = t.config) == null ? void 0 : I.app) === "konnect" ?
|
|
4715
|
-
}, C =
|
|
4716
|
-
var k,
|
|
4709
|
+
var N, b, I;
|
|
4710
|
+
u.fields.username = ((N = k == null ? void 0 : k.item) == null ? void 0 : N.username) || (k == null ? void 0 : k.username) || "", u.fields.customId = ((b = k == null ? void 0 : k.item) == null ? void 0 : b.custom_id) || (k == null ? void 0 : k.custom_id) || "";
|
|
4711
|
+
const U = ((I = k == null ? void 0 : k.item) == null ? void 0 : I.tags) || (k == null ? void 0 : k.tags) || [];
|
|
4712
|
+
u.fields.tags = (U == null ? void 0 : U.join(", ")) || "", Object.assign(p, u.fields);
|
|
4713
|
+
}, _ = T(() => t.consumerId ? ut.Edit : ut.Create), h = (k) => {
|
|
4714
|
+
var N, b, I, B, V, x;
|
|
4715
|
+
let U = `${(N = t.config) == null ? void 0 : N.apiBaseUrl}${Te.form[(b = t.config) == null ? void 0 : b.app][k]}`;
|
|
4716
|
+
return ((I = t.config) == null ? void 0 : I.app) === "konnect" ? U = U.replace(/{controlPlaneId}/gi, ((B = t.config) == null ? void 0 : B.controlPlaneId) || "") : ((V = t.config) == null ? void 0 : V.app) === "kongManager" && (U = U.replace(/\/{workspace}/gi, (x = t.config) != null && x.workspace ? `/${t.config.workspace}` : "")), U = U.replace(/{id}/gi, t.consumerId), U;
|
|
4717
|
+
}, C = T(() => !!u.fields.username || !!u.fields.customId), L = T(() => JSON.stringify(u.fields) !== JSON.stringify(p)), S = async () => {
|
|
4718
|
+
var k, U, N;
|
|
4717
4719
|
try {
|
|
4718
4720
|
u.readonly = !0;
|
|
4719
4721
|
const b = {
|
|
4720
4722
|
username: u.fields.username || null,
|
|
4721
4723
|
custom_id: u.fields.customId || null,
|
|
4722
|
-
tags: (
|
|
4724
|
+
tags: (U = (k = u.fields.tags.split(",")) == null ? void 0 : k.map((B) => String(B || "").trim())) == null ? void 0 : U.filter((B) => B !== "")
|
|
4723
4725
|
};
|
|
4724
4726
|
let I;
|
|
4725
|
-
await l.post(
|
|
4727
|
+
await l.post(h("validate"), b), _.value === "create" ? I = await l.post(h("create"), b) : _.value === "edit" && (I = ((N = t.config) == null ? void 0 : N.app) === "konnect" ? await l.put(h("edit"), b) : await l.patch(h("edit"), b)), v(I == null ? void 0 : I.data), a("update", I == null ? void 0 : I.data);
|
|
4726
4728
|
} catch (b) {
|
|
4727
4729
|
u.errorMessage = s(b), a("error", b);
|
|
4728
4730
|
} finally {
|
|
4729
4731
|
u.readonly = !1;
|
|
4730
4732
|
}
|
|
4731
4733
|
};
|
|
4732
|
-
return (k,
|
|
4733
|
-
const
|
|
4734
|
-
return f(),
|
|
4735
|
-
O(m(
|
|
4736
|
-
"can-submit": C.value &&
|
|
4734
|
+
return (k, U) => {
|
|
4735
|
+
const N = D("KInput"), b = D("KCard");
|
|
4736
|
+
return f(), $("div", Ss, [
|
|
4737
|
+
O(m(jl), {
|
|
4738
|
+
"can-submit": C.value && L.value,
|
|
4737
4739
|
config: e.config,
|
|
4738
4740
|
"edit-id": e.consumerId,
|
|
4739
4741
|
"error-message": u.errorMessage,
|
|
4740
4742
|
"fetch-url": c.value,
|
|
4741
4743
|
"is-readonly": u.readonly,
|
|
4742
|
-
onCancel:
|
|
4743
|
-
"onFetch:error":
|
|
4744
|
+
onCancel: y,
|
|
4745
|
+
"onFetch:error": U[3] || (U[3] = (I) => w(I)),
|
|
4744
4746
|
"onFetch:success": v,
|
|
4745
|
-
onLoading:
|
|
4747
|
+
onLoading: U[4] || (U[4] = (I) => d(I)),
|
|
4746
4748
|
onSubmit: S
|
|
4747
4749
|
}, {
|
|
4748
4750
|
default: g(() => [
|
|
4749
4751
|
F("div", null, [
|
|
4750
|
-
O(m(
|
|
4752
|
+
O(m(us), {
|
|
4751
4753
|
description: m(o)("consumers.form.info.description"),
|
|
4752
4754
|
"has-divider": "",
|
|
4753
4755
|
title: m(o)("consumers.form.info.title")
|
|
4754
4756
|
}, {
|
|
4755
4757
|
default: g(() => [
|
|
4756
4758
|
F("div", null, [
|
|
4757
|
-
F("h5",
|
|
4758
|
-
F("p",
|
|
4759
|
+
F("h5", As, j(m(o)("consumers.form.consumer_identification.title")) + "* ", 1),
|
|
4760
|
+
F("p", xs, j(m(o)("consumers.form.consumer_identification.description")), 1)
|
|
4759
4761
|
]),
|
|
4760
4762
|
O(b, null, {
|
|
4761
4763
|
default: g(() => [
|
|
4762
|
-
O(
|
|
4764
|
+
O(N, {
|
|
4763
4765
|
modelValue: u.fields.username,
|
|
4764
|
-
"onUpdate:modelValue":
|
|
4766
|
+
"onUpdate:modelValue": U[0] || (U[0] = (I) => u.fields.username = I),
|
|
4765
4767
|
modelModifiers: { trim: !0 },
|
|
4766
4768
|
autocomplete: "off",
|
|
4767
4769
|
class: "username-field",
|
|
@@ -4787,9 +4789,9 @@ const al = {
|
|
|
4787
4789
|
]),
|
|
4788
4790
|
_: 1
|
|
4789
4791
|
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
4790
|
-
O(
|
|
4792
|
+
O(N, {
|
|
4791
4793
|
modelValue: u.fields.customId,
|
|
4792
|
-
"onUpdate:modelValue":
|
|
4794
|
+
"onUpdate:modelValue": U[1] || (U[1] = (I) => u.fields.customId = I),
|
|
4793
4795
|
modelModifiers: { trim: !0 },
|
|
4794
4796
|
autocomplete: "off",
|
|
4795
4797
|
"data-testid": "consumer-form-custom-id",
|
|
@@ -4817,9 +4819,9 @@ const al = {
|
|
|
4817
4819
|
]),
|
|
4818
4820
|
_: 1
|
|
4819
4821
|
}),
|
|
4820
|
-
O(
|
|
4822
|
+
O(N, {
|
|
4821
4823
|
modelValue: u.fields.tags,
|
|
4822
|
-
"onUpdate:modelValue":
|
|
4824
|
+
"onUpdate:modelValue": U[2] || (U[2] = (I) => u.fields.tags = I),
|
|
4823
4825
|
modelModifiers: { trim: !0 },
|
|
4824
4826
|
autocomplete: "off",
|
|
4825
4827
|
"data-testid": "consumer-form-tags",
|
|
@@ -4843,7 +4845,7 @@ const al = {
|
|
|
4843
4845
|
]);
|
|
4844
4846
|
};
|
|
4845
4847
|
}
|
|
4846
|
-
}),
|
|
4848
|
+
}), Ds = /* @__PURE__ */ Tt(Ts, [["__scopeId", "data-v-99612940"]]), $s = { class: "kong-ui-consumer-entity-config-card" }, Vs = /* @__PURE__ */ ne({
|
|
4847
4849
|
__name: "ConsumerConfigCard",
|
|
4848
4850
|
props: {
|
|
4849
4851
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4870,7 +4872,7 @@ const al = {
|
|
|
4870
4872
|
},
|
|
4871
4873
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
4872
4874
|
setup(e) {
|
|
4873
|
-
const n = e, { i18n: { t }, i18nT: a } = Qe.useI18n(), r =
|
|
4875
|
+
const n = e, { i18n: { t }, i18nT: a } = Qe.useI18n(), r = T(() => Te.form[n.config.app].edit), o = E({
|
|
4874
4876
|
id: {},
|
|
4875
4877
|
username: {
|
|
4876
4878
|
section: de.Basic,
|
|
@@ -4895,8 +4897,8 @@ const al = {
|
|
|
4895
4897
|
hidden: !0
|
|
4896
4898
|
}
|
|
4897
4899
|
});
|
|
4898
|
-
return (i, l) => (f(),
|
|
4899
|
-
O(m(
|
|
4900
|
+
return (i, l) => (f(), $("div", $s, [
|
|
4901
|
+
O(m(xl), {
|
|
4900
4902
|
config: e.config,
|
|
4901
4903
|
"config-card-doc": e.configCardDoc,
|
|
4902
4904
|
"config-schema": o.value,
|
|
@@ -4935,7 +4937,7 @@ const al = {
|
|
|
4935
4937
|
}
|
|
4936
4938
|
});
|
|
4937
4939
|
export {
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4940
|
+
Vs as ConsumerConfigCard,
|
|
4941
|
+
Ds as ConsumerForm,
|
|
4942
|
+
Ps as ConsumerList
|
|
4941
4943
|
};
|