@kong-ui-public/entities-consumer-groups 2.2.2-pr.1006.fc54b330.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-consumer-groups.es.js +1089 -1093
- package/dist/entities-consumer-groups.umd.js +13 -13
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as ae, ref as F, computed as x, watch as Te, renderSlot as
|
|
1
|
+
import { defineComponent as ae, ref as F, computed as x, watch as Te, renderSlot as X, createCommentVNode as z, unref as m, useSlots as ct, onBeforeMount as dt, resolveComponent as q, openBlock as d, createBlock as P, createSlots as je, withCtx as g, createElementVNode as V, createTextVNode as Z, toDisplayString as N, createVNode as E, createElementBlock as j, renderList as ve, Fragment as Ce, normalizeClass as Ee, withModifiers as rt, withDirectives as Je, vShow as Ye, useCssVars as gn, reactive as ot, resolveDynamicComponent as Be, normalizeProps as Cr, guardReactiveProps as kr, mergeProps as bt, onMounted as _r, onUnmounted as wr, normalizeStyle as yn, inject as Ir, pushScopeId as hn, popScopeId as vn } from "vue";
|
|
2
2
|
import { useRouter as At } from "vue-router";
|
|
3
|
-
import { createI18n as
|
|
3
|
+
import { createI18n as St, i18nTComponent as bn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Ar from "axios";
|
|
5
|
-
import { BadgeMethodAppearances as
|
|
6
|
-
const
|
|
5
|
+
import { BadgeMethodAppearances as Sr } from "@kong/kongponents";
|
|
6
|
+
const xr = {
|
|
7
7
|
list: {
|
|
8
8
|
table_headers: {
|
|
9
9
|
name: "Name",
|
|
@@ -96,10 +96,10 @@ const Sr = {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}, Tr = {
|
|
99
|
-
consumer_groups:
|
|
99
|
+
consumer_groups: xr
|
|
100
100
|
};
|
|
101
101
|
function $r() {
|
|
102
|
-
const e =
|
|
102
|
+
const e = St("en-us", Tr);
|
|
103
103
|
return {
|
|
104
104
|
i18n: e,
|
|
105
105
|
i18nT: bn(e)
|
|
@@ -108,40 +108,40 @@ function $r() {
|
|
|
108
108
|
}
|
|
109
109
|
const pt = {
|
|
110
110
|
useI18n: $r
|
|
111
|
-
},
|
|
111
|
+
}, Se = "/api/runtime_groups/{controlPlaneId}", xe = "/{workspace}", Me = {
|
|
112
112
|
list: {
|
|
113
113
|
konnect: {
|
|
114
|
-
all: `${
|
|
115
|
-
forConsumer: `${xe}/consumers/{consumerId}/consumer_groups`,
|
|
116
|
-
oneForConsumer: `${xe}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
117
|
-
},
|
|
118
|
-
kongManager: {
|
|
119
|
-
all: `${Se}/consumer_groups?counter=true`,
|
|
114
|
+
all: `${Se}/consumer_groups`,
|
|
120
115
|
forConsumer: `${Se}/consumers/{consumerId}/consumer_groups`,
|
|
121
116
|
oneForConsumer: `${Se}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
117
|
+
},
|
|
118
|
+
kongManager: {
|
|
119
|
+
all: `${xe}/consumer_groups?counter=true`,
|
|
120
|
+
forConsumer: `${xe}/consumers/{consumerId}/consumer_groups`,
|
|
121
|
+
oneForConsumer: `${xe}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
124
|
form: {
|
|
125
125
|
konnect: {
|
|
126
|
-
consumersList: `${xe}/consumers`,
|
|
127
|
-
create: `${xe}/consumer_groups`,
|
|
128
|
-
edit: `${xe}/consumer_groups/{id}`,
|
|
129
|
-
addConsumer: `${xe}/consumer_groups/{id}/consumers`,
|
|
130
|
-
removeConsumer: `${xe}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
131
|
-
getConsumers: `${xe}/consumer_groups/{id}/consumers`
|
|
132
|
-
},
|
|
133
|
-
kongManager: {
|
|
134
126
|
consumersList: `${Se}/consumers`,
|
|
135
127
|
create: `${Se}/consumer_groups`,
|
|
136
128
|
edit: `${Se}/consumer_groups/{id}`,
|
|
137
129
|
addConsumer: `${Se}/consumer_groups/{id}/consumers`,
|
|
138
130
|
removeConsumer: `${Se}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
139
131
|
getConsumers: `${Se}/consumer_groups/{id}/consumers`
|
|
132
|
+
},
|
|
133
|
+
kongManager: {
|
|
134
|
+
consumersList: `${xe}/consumers`,
|
|
135
|
+
create: `${xe}/consumer_groups`,
|
|
136
|
+
edit: `${xe}/consumer_groups/{id}`,
|
|
137
|
+
addConsumer: `${xe}/consumer_groups/{id}/consumers`,
|
|
138
|
+
removeConsumer: `${xe}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
139
|
+
getConsumers: `${xe}/consumer_groups/{id}/consumers`
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
|
-
var Cn = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e))(Cn || {}),
|
|
144
|
-
function
|
|
143
|
+
var Cn = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e))(Cn || {}), nt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(nt || {}), Ke = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Ke || {}), oe = /* @__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))(oe || {}), ke = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ke || {});
|
|
144
|
+
function xt(e = {}) {
|
|
145
145
|
return {
|
|
146
146
|
axiosInstance: Ar.create({
|
|
147
147
|
withCredentials: !0,
|
|
@@ -162,12 +162,12 @@ function jr() {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
const gt = "khcp-user-table-preferences",
|
|
165
|
+
const gt = "khcp-user-table-preferences", Mr = {
|
|
166
166
|
pageSize: 30,
|
|
167
167
|
sortColumnKey: void 0,
|
|
168
168
|
sortColumnOrder: void 0
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function Or() {
|
|
171
171
|
const e = (t) => {
|
|
172
172
|
if (typeof t == "string")
|
|
173
173
|
try {
|
|
@@ -191,14 +191,14 @@ function Er() {
|
|
|
191
191
|
},
|
|
192
192
|
getTablePreferences: (t) => {
|
|
193
193
|
const r = n();
|
|
194
|
-
return (r == null ? void 0 : r.get(t)) || void 0 ||
|
|
194
|
+
return (r == null ? void 0 : r.get(t)) || void 0 || Mr;
|
|
195
195
|
},
|
|
196
196
|
deleteAllTablePreferences: () => {
|
|
197
197
|
localStorage.removeItem(gt);
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const Er = {
|
|
202
202
|
actions: {
|
|
203
203
|
copyId: "Copy ID",
|
|
204
204
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
@@ -208,7 +208,7 @@ const Mr = {
|
|
|
208
208
|
}, Fr = {
|
|
209
209
|
message: "Are you sure you want to delete this {entityType}?",
|
|
210
210
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
211
|
-
},
|
|
211
|
+
}, Nr = {
|
|
212
212
|
actions: {
|
|
213
213
|
viewConfiguration: "View Configuration",
|
|
214
214
|
save: "Save",
|
|
@@ -230,7 +230,7 @@ const Mr = {
|
|
|
230
230
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
231
231
|
noSearchResultsCtaText: "Clear"
|
|
232
232
|
}
|
|
233
|
-
},
|
|
233
|
+
}, qr = {
|
|
234
234
|
title: "Configuration",
|
|
235
235
|
actions: {
|
|
236
236
|
copy: "Copy JSON"
|
|
@@ -265,7 +265,7 @@ const Mr = {
|
|
|
265
265
|
entryTitle: "Entry {index}",
|
|
266
266
|
structuredFormat: "Structured"
|
|
267
267
|
}
|
|
268
|
-
},
|
|
268
|
+
}, Br = {
|
|
269
269
|
filterButtonText: "Filter",
|
|
270
270
|
fieldLabel: "Filter by:",
|
|
271
271
|
inputPlaceholder: "Enter a value",
|
|
@@ -273,15 +273,15 @@ const Mr = {
|
|
|
273
273
|
applyButtonText: "Apply",
|
|
274
274
|
clearButtonText: "Clear",
|
|
275
275
|
clearAllButtonText: "Clear all filters"
|
|
276
|
-
},
|
|
276
|
+
}, Lr = {
|
|
277
277
|
errors: {
|
|
278
278
|
fetch: "Could not fetch available items",
|
|
279
279
|
invalid: "Please select a valid value"
|
|
280
280
|
}
|
|
281
|
-
},
|
|
281
|
+
}, Ur = {
|
|
282
282
|
unexpected: "An unexpected error has occurred",
|
|
283
283
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
284
|
-
},
|
|
284
|
+
}, Pr = {
|
|
285
285
|
enable: {
|
|
286
286
|
title: "Enable {entityType}",
|
|
287
287
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -292,19 +292,19 @@ const Mr = {
|
|
|
292
292
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
293
293
|
confirmText: "Yes, disable"
|
|
294
294
|
}
|
|
295
|
-
},
|
|
296
|
-
global:
|
|
295
|
+
}, Dr = {
|
|
296
|
+
global: Er,
|
|
297
297
|
deleteModal: Fr,
|
|
298
|
-
baseForm:
|
|
298
|
+
baseForm: Nr,
|
|
299
299
|
baseTable: Kr,
|
|
300
|
-
baseConfigCard:
|
|
301
|
-
filter:
|
|
302
|
-
debouncedFilter:
|
|
303
|
-
errors:
|
|
304
|
-
toggleModal:
|
|
300
|
+
baseConfigCard: qr,
|
|
301
|
+
filter: Br,
|
|
302
|
+
debouncedFilter: Lr,
|
|
303
|
+
errors: Ur,
|
|
304
|
+
toggleModal: Pr
|
|
305
305
|
};
|
|
306
306
|
function Tt() {
|
|
307
|
-
const e =
|
|
307
|
+
const e = St("en-us", Dr);
|
|
308
308
|
return {
|
|
309
309
|
i18n: e,
|
|
310
310
|
i18nT: bn(e)
|
|
@@ -355,72 +355,72 @@ function kn() {
|
|
|
355
355
|
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
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function Vr(e, n, t, r = {
|
|
359
359
|
fetchedItemsKey: "data",
|
|
360
360
|
searchKeys: ["id"]
|
|
361
361
|
}) {
|
|
362
362
|
t || (t = "100");
|
|
363
|
-
const { axiosInstance: o } =
|
|
363
|
+
const { axiosInstance: o } = xt({
|
|
364
364
|
headers: e.requestHeaders
|
|
365
|
-
}), { i18n: { t: i } } = Tt(), { debounce: a } = jr(), s = a(async (
|
|
366
|
-
await
|
|
367
|
-
}, 200), l = F(!1), u = F(""), p = F(""), c = F([]), y = F([]), f = F(void 0),
|
|
368
|
-
let
|
|
369
|
-
e.app === "konnect" ?
|
|
370
|
-
const { isValidUuid: A } = kn(),
|
|
365
|
+
}), { i18n: { t: i } } = Tt(), { debounce: a } = jr(), s = a(async (v) => {
|
|
366
|
+
await L(v);
|
|
367
|
+
}, 200), l = F(!1), u = F(""), p = F(""), c = F([]), y = F([]), f = F(void 0), w = m(n);
|
|
368
|
+
let h = `${e.apiBaseUrl}${w}`;
|
|
369
|
+
e.app === "konnect" ? h = h.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (h = h.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
370
|
+
const { isValidUuid: A } = kn(), b = async () => {
|
|
371
371
|
try {
|
|
372
372
|
l.value = !0;
|
|
373
|
-
const { data:
|
|
374
|
-
|
|
373
|
+
const { data: v } = await o.get(`${h}?size=${t}`);
|
|
374
|
+
v != null && v.next || (f.value = r.fetchedItemsKey in v ? v[r.fetchedItemsKey] : []), y.value = r.fetchedItemsKey in v ? v[r.fetchedItemsKey] : [], c.value = y.value;
|
|
375
375
|
} catch {
|
|
376
376
|
c.value = [], u.value = i("debouncedFilter.errors.fetch");
|
|
377
377
|
} finally {
|
|
378
378
|
l.value = !1;
|
|
379
379
|
}
|
|
380
|
-
},
|
|
381
|
-
var
|
|
382
|
-
if (
|
|
383
|
-
if (
|
|
380
|
+
}, _ = F(""), L = async (v) => {
|
|
381
|
+
var S, D, re;
|
|
382
|
+
if (_.value !== v)
|
|
383
|
+
if (_.value = v || "", f.value === void 0)
|
|
384
384
|
try {
|
|
385
385
|
if (l.value = !0, u.value = "", p.value = "", e.app === "konnect") {
|
|
386
|
-
let
|
|
387
|
-
|
|
388
|
-
const { data:
|
|
389
|
-
r.fetchedItemsKey in
|
|
390
|
-
} else if (
|
|
391
|
-
const
|
|
392
|
-
A(
|
|
393
|
-
const { data:
|
|
394
|
-
return [
|
|
395
|
-
})()) :
|
|
396
|
-
...r.searchKeys.filter((
|
|
397
|
-
const { data: I } = await o.get(`${
|
|
386
|
+
let R = h + "";
|
|
387
|
+
v && (R += `/${v}`);
|
|
388
|
+
const { data: C } = await o.get(`${R}?size=${t}`);
|
|
389
|
+
r.fetchedItemsKey in C ? c.value = C[r.fetchedItemsKey] : C != null && C.id ? c.value = [C] : c.value = [];
|
|
390
|
+
} else if (v) {
|
|
391
|
+
const R = [];
|
|
392
|
+
A(v) && r.searchKeys.includes("id") ? R.push((async () => {
|
|
393
|
+
const { data: K } = await o.get(`${h}/${v}`);
|
|
394
|
+
return [K[r.fetchedItemsKey] ?? K];
|
|
395
|
+
})()) : R.push(
|
|
396
|
+
...r.searchKeys.filter((K) => K !== "id").map(async (K) => {
|
|
397
|
+
const { data: I } = await o.get(`${h}?${K}=${v}`);
|
|
398
398
|
return I[r.fetchedItemsKey];
|
|
399
399
|
})
|
|
400
400
|
);
|
|
401
|
-
const
|
|
402
|
-
c.value = [], (
|
|
401
|
+
const C = await Promise.all(R), G = /* @__PURE__ */ new Set();
|
|
402
|
+
c.value = [], (S = C == null ? void 0 : C.forEach) == null || S.call(C, (K) => {
|
|
403
403
|
var I;
|
|
404
|
-
(I =
|
|
405
|
-
|
|
404
|
+
(I = K == null ? void 0 : K.forEach) == null || I.call(K, (T) => {
|
|
405
|
+
G.has(T.id) || (G.add(T.id), c.value.push(T));
|
|
406
406
|
});
|
|
407
407
|
});
|
|
408
408
|
} else
|
|
409
409
|
c.value = y.value;
|
|
410
|
-
} catch (
|
|
411
|
-
((
|
|
410
|
+
} catch (R) {
|
|
411
|
+
((D = R == null ? void 0 : R.response) == null ? void 0 : D.status) === 404 ? p.value = i("debouncedFilter.errors.invalid") : (c.value = [], u.value = i("debouncedFilter.errors.fetch"));
|
|
412
412
|
} finally {
|
|
413
413
|
l.value = !1;
|
|
414
414
|
}
|
|
415
415
|
else
|
|
416
|
-
l.value = !0, p.value = "",
|
|
417
|
-
var
|
|
418
|
-
let
|
|
419
|
-
for (const
|
|
420
|
-
const I = typeof
|
|
421
|
-
I != null && I.includes(
|
|
416
|
+
l.value = !0, p.value = "", v ? (c.value = (re = f.value) == null ? void 0 : re.filter((R) => {
|
|
417
|
+
var C;
|
|
418
|
+
let G = !1;
|
|
419
|
+
for (const K of r.searchKeys) {
|
|
420
|
+
const I = typeof R[K] == "string" ? (C = R[K]) == null ? void 0 : C.toLowerCase() : R[K];
|
|
421
|
+
I != null && I.includes(v.toLowerCase()) && (G = !0);
|
|
422
422
|
}
|
|
423
|
-
return
|
|
423
|
+
return G;
|
|
424
424
|
}), (!c.value || !c.value.length) && (p.value = i("debouncedFilter.errors.invalid"))) : c.value = f.value, l.value = !1;
|
|
425
425
|
};
|
|
426
426
|
return {
|
|
@@ -429,7 +429,7 @@ function Dr(e, n, t, r = {
|
|
|
429
429
|
validationError: p,
|
|
430
430
|
results: c,
|
|
431
431
|
allRecords: f,
|
|
432
|
-
loadItems:
|
|
432
|
+
loadItems: b,
|
|
433
433
|
debouncedQueryChange: s
|
|
434
434
|
};
|
|
435
435
|
}
|
|
@@ -467,7 +467,7 @@ function Gr() {
|
|
|
467
467
|
}
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Hr(e) {
|
|
471
471
|
const n = window.location.origin, t = n.endsWith("/") ? n : `${n}/`;
|
|
472
472
|
try {
|
|
473
473
|
const r = e.join("/"), o = `${t}${r}`, i = e.some((a) => a.trim() === "");
|
|
@@ -478,7 +478,7 @@ function zr(e) {
|
|
|
478
478
|
return console.warn("Failed to build valid URL:", r), "";
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function _n(e, n) {
|
|
482
482
|
const t = F(m(e)), r = F(m(n)), o = x(
|
|
483
483
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
484
484
|
), i = x(
|
|
@@ -488,18 +488,18 @@ function wn(e, n) {
|
|
|
488
488
|
const { page: s, pageSize: l, offset: u, sortColumnKey: p, sortColumnOrder: c, query: y } = a;
|
|
489
489
|
try {
|
|
490
490
|
let f = new URL(i.value.href);
|
|
491
|
-
return o.value && y ? (f.search = "", f = t.value.app === "konnect" ? new URL(`${f.href}?filter[name][contains]=${y}`) : new URL(`${f.href}/${y}/`)) : (o.value || new URLSearchParams(y).forEach((
|
|
492
|
-
f.searchParams.append(
|
|
491
|
+
return o.value && y ? (f.search = "", f = t.value.app === "konnect" ? new URL(`${f.href}?filter[name][contains]=${y}`) : new URL(`${f.href}/${y}/`)) : (o.value || new URLSearchParams(y).forEach((w, h) => {
|
|
492
|
+
f.searchParams.append(h, w);
|
|
493
493
|
}), p && f.searchParams.append("sort_by", p), c === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(l))), u && s !== 1 && f.searchParams.append("offset", String(u)), f.href;
|
|
494
494
|
} catch (f) {
|
|
495
495
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
498
|
}
|
|
499
|
-
function
|
|
500
|
-
const r = m(n), { axiosInstance: o } =
|
|
499
|
+
function zr(e, n, t = "data") {
|
|
500
|
+
const r = m(n), { axiosInstance: o } = xt({
|
|
501
501
|
headers: e.requestHeaders
|
|
502
|
-
}), i =
|
|
502
|
+
}), i = _n(e, r), a = F({
|
|
503
503
|
status: Ke.Idle
|
|
504
504
|
});
|
|
505
505
|
return { fetcher: async (s) => {
|
|
@@ -547,18 +547,18 @@ function Jr() {
|
|
|
547
547
|
convertKeyToTitle: e
|
|
548
548
|
};
|
|
549
549
|
}
|
|
550
|
-
const
|
|
550
|
+
const wn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Dt = (e) => {
|
|
551
551
|
if (typeof e != "string")
|
|
552
552
|
throw new TypeError("Invalid argument expected string");
|
|
553
|
-
const n = e.match(
|
|
553
|
+
const n = e.match(wn);
|
|
554
554
|
if (!n)
|
|
555
555
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
556
556
|
return n.shift(), n;
|
|
557
|
-
},
|
|
557
|
+
}, Vt = (e) => e === "*" || e === "x" || e === "X", Rt = (e) => {
|
|
558
558
|
const n = parseInt(e, 10);
|
|
559
559
|
return isNaN(n) ? e : n;
|
|
560
560
|
}, Yr = (e, n) => typeof e != typeof n ? [String(e), String(n)] : [e, n], Wr = (e, n) => {
|
|
561
|
-
if (
|
|
561
|
+
if (Vt(e) || Vt(n))
|
|
562
562
|
return 0;
|
|
563
563
|
const [t, r] = Yr(Rt(e), Rt(n));
|
|
564
564
|
return t > r ? 1 : t < r ? -1 : 0;
|
|
@@ -570,9 +570,9 @@ const _n = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
570
570
|
}
|
|
571
571
|
return 0;
|
|
572
572
|
}, Zr = (e, n) => {
|
|
573
|
-
const t =
|
|
573
|
+
const t = Dt(e), r = Dt(n), o = t.pop(), i = r.pop(), a = Gt(t, r);
|
|
574
574
|
return a !== 0 ? a : o && i ? Gt(o.split("."), i.split(".")) : o || i ? o ? -1 : 1 : 0;
|
|
575
|
-
},
|
|
575
|
+
}, Ht = (e, n, t) => {
|
|
576
576
|
Qr(t);
|
|
577
577
|
const r = Zr(e, n);
|
|
578
578
|
return In[t].includes(r);
|
|
@@ -583,12 +583,12 @@ const _n = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
583
583
|
"<=": [-1, 0],
|
|
584
584
|
"<": [-1],
|
|
585
585
|
"!=": [-1, 1]
|
|
586
|
-
},
|
|
586
|
+
}, zt = Object.keys(In), Qr = (e) => {
|
|
587
587
|
if (typeof e != "string")
|
|
588
588
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
589
|
-
if (
|
|
590
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
591
|
-
}, Xr = (e) => typeof e == "string" && /^[v\d]/.test(e) &&
|
|
589
|
+
if (zt.indexOf(e) === -1)
|
|
590
|
+
throw new Error(`Invalid operator, expected one of ${zt.join("|")}`);
|
|
591
|
+
}, Xr = (e) => typeof e == "string" && /^[v\d]/.test(e) && wn.test(e);
|
|
592
592
|
function eo(e) {
|
|
593
593
|
const { gatewayInfo: n, supportedRange: t } = e;
|
|
594
594
|
if (!n)
|
|
@@ -600,7 +600,7 @@ function eo(e) {
|
|
|
600
600
|
if (!i)
|
|
601
601
|
return !1;
|
|
602
602
|
const [a, s] = i;
|
|
603
|
-
return !(a &&
|
|
603
|
+
return !(a && Ht(o, a, "<") || s && Ht(o, s, ">"));
|
|
604
604
|
}
|
|
605
605
|
function to(e) {
|
|
606
606
|
const n = F(0), t = F(0), r = F(!1);
|
|
@@ -611,13 +611,13 @@ function to(e) {
|
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
613
|
const ce = {
|
|
614
|
-
useAxios:
|
|
615
|
-
useDebouncedFilter:
|
|
614
|
+
useAxios: xt,
|
|
615
|
+
useDebouncedFilter: Vr,
|
|
616
616
|
useDeleteUrlBuilder: Rr,
|
|
617
617
|
useErrors: Gr,
|
|
618
|
-
useExternalLinkCreator:
|
|
619
|
-
useFetcher:
|
|
620
|
-
useFetchUrlBuilder:
|
|
618
|
+
useExternalLinkCreator: Hr,
|
|
619
|
+
useFetcher: zr,
|
|
620
|
+
useFetchUrlBuilder: _n,
|
|
621
621
|
useHelpers: kn,
|
|
622
622
|
useStringHelpers: Jr,
|
|
623
623
|
useI18n: Tt,
|
|
@@ -712,14 +712,14 @@ const ce = {
|
|
|
712
712
|
lineHeight: "0",
|
|
713
713
|
width: t.value
|
|
714
714
|
}));
|
|
715
|
-
return (o, i) => (d(),
|
|
715
|
+
return (o, i) => (d(), P(Be(e.as), {
|
|
716
716
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
717
717
|
class: "kui-icon copy-icon",
|
|
718
718
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
719
719
|
style: yn(r.value)
|
|
720
720
|
}, {
|
|
721
721
|
default: g(() => [
|
|
722
|
-
(d(),
|
|
722
|
+
(d(), j("svg", {
|
|
723
723
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
724
724
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
725
725
|
fill: "none",
|
|
@@ -729,7 +729,7 @@ const ce = {
|
|
|
729
729
|
width: "100%",
|
|
730
730
|
xmlns: "http://www.w3.org/2000/svg"
|
|
731
731
|
}, [
|
|
732
|
-
e.title ? (d(),
|
|
732
|
+
e.title ? (d(), j("title", uo, N(e.title), 1)) : z("", !0),
|
|
733
733
|
co
|
|
734
734
|
], 8, lo))
|
|
735
735
|
]),
|
|
@@ -780,7 +780,7 @@ const ce = {
|
|
|
780
780
|
},
|
|
781
781
|
emits: ["success", "error"],
|
|
782
782
|
setup(e, { emit: n }) {
|
|
783
|
-
const { t } =
|
|
783
|
+
const { t } = St("en-us", oo), r = e, o = n, i = r.notify || Ir(ao, () => {
|
|
784
784
|
}), a = x(() => r.idTooltip ? {
|
|
785
785
|
label: r.idTooltip,
|
|
786
786
|
positionFixed: !0,
|
|
@@ -800,7 +800,7 @@ const ce = {
|
|
|
800
800
|
l.value = r.tooltip;
|
|
801
801
|
}, 1800);
|
|
802
802
|
}, y = (f) => {
|
|
803
|
-
var
|
|
803
|
+
var w, h;
|
|
804
804
|
if (!f(r.uuid)) {
|
|
805
805
|
typeof i == "function" && i({
|
|
806
806
|
type: "error",
|
|
@@ -808,36 +808,36 @@ const ce = {
|
|
|
808
808
|
}), s.value ? c(t("message.fail")) : o("error", r.uuid);
|
|
809
809
|
return;
|
|
810
810
|
}
|
|
811
|
-
const A = ((
|
|
811
|
+
const A = ((w = r.uuid) == null ? void 0 : w.length) > Yt, b = r.format === "hidden" || r.format === "redacted" ? t("message.success.prefix") : `"${((h = r.uuid) == null ? void 0 : h.substring(0, Yt)) + (A ? "..." : "")}"`;
|
|
812
812
|
typeof i == "function" && i({
|
|
813
813
|
type: "success",
|
|
814
|
-
message: `${
|
|
814
|
+
message: `${b}${t("message.success.content")}`
|
|
815
815
|
}), s.value ? c(r.successTooltip) : o("success", r.uuid);
|
|
816
816
|
};
|
|
817
|
-
return (f,
|
|
818
|
-
const
|
|
819
|
-
return d(),
|
|
820
|
-
e.format !== "hidden" ? (d(),
|
|
817
|
+
return (f, w) => {
|
|
818
|
+
const h = q("KClipboardProvider");
|
|
819
|
+
return d(), j("div", go, [
|
|
820
|
+
e.format !== "hidden" ? (d(), P(Be(e.idTooltip ? "KTooltip" : "div"), bt({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
821
821
|
default: g(() => [
|
|
822
822
|
V("div", {
|
|
823
|
-
class:
|
|
823
|
+
class: Ee([
|
|
824
824
|
"uuid-container",
|
|
825
825
|
e.truncated ? "truncated-uuid" : null,
|
|
826
826
|
e.useMono ? "mono" : null
|
|
827
827
|
])
|
|
828
|
-
},
|
|
828
|
+
}, N(p.value), 3)
|
|
829
829
|
]),
|
|
830
830
|
_: 1
|
|
831
831
|
}, 16)) : z("", !0),
|
|
832
|
-
(d(),
|
|
832
|
+
(d(), P(Be(e.tooltip ? "KTooltip" : "div"), bt(u.value, { class: "uuid-icon-wrapper" }), {
|
|
833
833
|
default: g(() => [
|
|
834
|
-
E(
|
|
834
|
+
E(h, null, {
|
|
835
835
|
default: g(({ copyToClipboard: A }) => [
|
|
836
836
|
V("span", {
|
|
837
837
|
"data-testid": "copy-to-clipboard",
|
|
838
838
|
role: "button",
|
|
839
839
|
tabindex: "0",
|
|
840
|
-
onClick:
|
|
840
|
+
onClick: rt((b) => y(A), ["stop"])
|
|
841
841
|
}, [
|
|
842
842
|
E(m(fo), {
|
|
843
843
|
class: "uuid-icon",
|
|
@@ -888,14 +888,14 @@ const ce = {
|
|
|
888
888
|
var l;
|
|
889
889
|
return n.isArrayItem ? (l = i.value) != null && l.name ? r(i.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
890
890
|
});
|
|
891
|
-
return (l, u) => (d(),
|
|
892
|
-
class:
|
|
891
|
+
return (l, u) => (d(), P(Be(e.isArrayItem ? "fieldset" : "div"), {
|
|
892
|
+
class: Ee(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
893
893
|
}, {
|
|
894
894
|
default: g(() => [
|
|
895
|
-
e.isArrayItem ? (d(),
|
|
896
|
-
V("b", null,
|
|
895
|
+
e.isArrayItem ? (d(), j("legend", bo, [
|
|
896
|
+
V("b", null, N(s.value), 1)
|
|
897
897
|
])) : z("", !0),
|
|
898
|
-
(d(!0),
|
|
898
|
+
(d(!0), j(Ce, null, ve(Object.keys(a.value), (p, c) => (d(), P($t, {
|
|
899
899
|
key: `${o.value}-property-${c}`,
|
|
900
900
|
item: {
|
|
901
901
|
key: p,
|
|
@@ -907,12 +907,12 @@ const ce = {
|
|
|
907
907
|
_: 1
|
|
908
908
|
}, 8, ["class"]));
|
|
909
909
|
}
|
|
910
|
-
}),
|
|
910
|
+
}), _e = (e, n) => {
|
|
911
911
|
const t = e.__vccOpts || e;
|
|
912
912
|
for (const [r, o] of n)
|
|
913
913
|
t[r] = o;
|
|
914
914
|
return t;
|
|
915
|
-
},
|
|
915
|
+
}, Sn = /* @__PURE__ */ _e(Co, [["__scopeId", "data-v-68ca83ec"]]), ko = /* @__PURE__ */ ae({
|
|
916
916
|
__name: "InternalLinkItem",
|
|
917
917
|
props: {
|
|
918
918
|
item: {
|
|
@@ -925,21 +925,21 @@ const ce = {
|
|
|
925
925
|
const { i18n: { t: n } } = ce.useI18n();
|
|
926
926
|
return (t, r) => {
|
|
927
927
|
const o = q("KButton");
|
|
928
|
-
return d(),
|
|
928
|
+
return d(), j("div", null, [
|
|
929
929
|
E(o, {
|
|
930
930
|
appearance: "tertiary",
|
|
931
931
|
class: "navigation-button",
|
|
932
932
|
onClick: r[0] || (r[0] = (i) => t.$emit("navigation-click", e.item))
|
|
933
933
|
}, {
|
|
934
934
|
default: g(() => [
|
|
935
|
-
Z(
|
|
935
|
+
Z(N(e.item.value || m(n)("baseConfigCard.commonFields.link")), 1)
|
|
936
936
|
]),
|
|
937
937
|
_: 1
|
|
938
938
|
})
|
|
939
939
|
]);
|
|
940
940
|
};
|
|
941
941
|
}
|
|
942
|
-
}),
|
|
942
|
+
}), _o = /* @__PURE__ */ _e(ko, [["__scopeId", "data-v-c96811e5"]]), wo = /* @__PURE__ */ ae({
|
|
943
943
|
__name: "StatusBadge",
|
|
944
944
|
props: {
|
|
945
945
|
status: {
|
|
@@ -951,21 +951,21 @@ const ce = {
|
|
|
951
951
|
const { i18n: { t: n } } = ce.useI18n();
|
|
952
952
|
return (t, r) => {
|
|
953
953
|
const o = q("KBadge");
|
|
954
|
-
return d(),
|
|
954
|
+
return d(), P(o, {
|
|
955
955
|
appearance: e.status ? "success" : "neutral"
|
|
956
956
|
}, {
|
|
957
957
|
default: g(() => [
|
|
958
|
-
Z(
|
|
958
|
+
Z(N(e.status ? m(n)("baseConfigCard.statusBadge.enabledLabel") : m(n)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
959
959
|
]),
|
|
960
960
|
_: 1
|
|
961
961
|
}, 8, ["appearance"]);
|
|
962
962
|
};
|
|
963
963
|
}
|
|
964
|
-
}), Io = "#0044f4", Ao = "#e0e4ea",
|
|
964
|
+
}), Io = "#0044f4", Ao = "#e0e4ea", So = "#3a3f51", xo = "1px", To = "20px", $o = { class: "config-card-details-row" }, jo = ["data-testid"], Mo = ["data-testid"], Oo = ["data-testid"], Eo = ["data-testid"], Fo = { key: 1 }, No = ["data-testid"], Ko = ["data-testid"], qo = ["data-testid"], Bo = ["data-testid"], Lo = {
|
|
965
965
|
name: "ConfigCardItem",
|
|
966
|
-
components: { CopyUuid: An, JsonCardItem:
|
|
967
|
-
},
|
|
968
|
-
...
|
|
966
|
+
components: { CopyUuid: An, JsonCardItem: Sn, StatusBadge: wo, InternalLinkItem: _o }
|
|
967
|
+
}, Uo = /* @__PURE__ */ ae({
|
|
968
|
+
...Lo,
|
|
969
969
|
props: {
|
|
970
970
|
item: {
|
|
971
971
|
type: Object,
|
|
@@ -984,8 +984,8 @@ const ce = {
|
|
|
984
984
|
},
|
|
985
985
|
emits: ["navigation-click"],
|
|
986
986
|
setup(e, { emit: n }) {
|
|
987
|
-
gn((
|
|
988
|
-
"0da74440": p.value ? "none" : `solid ${m(
|
|
987
|
+
gn((w) => ({
|
|
988
|
+
"0da74440": p.value ? "none" : `solid ${m(xo)} ${m(Ao)}`,
|
|
989
989
|
"02a039da": u.value && s.value ? "block" : "flex",
|
|
990
990
|
"690f3ced": u.value && s.value ? "100%" : t.slim ? "50%" : "25%",
|
|
991
991
|
"691182c8": u.value && s.value ? "100%" : t.slim ? "50%" : "75%"
|
|
@@ -1076,8 +1076,8 @@ const ce = {
|
|
|
1076
1076
|
attrs: {
|
|
1077
1077
|
"data-testid": `${t.item.key}-internal-link`,
|
|
1078
1078
|
item: t.item,
|
|
1079
|
-
onNavigationClick: (
|
|
1080
|
-
r("navigation-click",
|
|
1079
|
+
onNavigationClick: (w) => {
|
|
1080
|
+
r("navigation-click", w);
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
1083
|
};
|
|
@@ -1117,17 +1117,17 @@ const ce = {
|
|
|
1117
1117
|
};
|
|
1118
1118
|
}
|
|
1119
1119
|
}), y = F(), { isTruncated: f } = ce.useTruncationDetector(y);
|
|
1120
|
-
return (
|
|
1121
|
-
const A = q("KLabel"),
|
|
1122
|
-
return d(),
|
|
1120
|
+
return (w, h) => {
|
|
1121
|
+
const A = q("KLabel"), b = q("KBadge"), _ = q("KTooltip");
|
|
1122
|
+
return d(), j("div", $o, [
|
|
1123
1123
|
V("div", {
|
|
1124
1124
|
class: "config-card-details-label",
|
|
1125
1125
|
"data-testid": `${e.item.key}-label`
|
|
1126
1126
|
}, [
|
|
1127
|
-
|
|
1127
|
+
X(w.$slots, "label", { item: e.item }, () => [
|
|
1128
1128
|
E(A, { "tooltip-attributes": { maxWidth: "500px" } }, je({
|
|
1129
1129
|
default: g(() => [
|
|
1130
|
-
Z(
|
|
1130
|
+
Z(N(e.item.label) + " ", 1)
|
|
1131
1131
|
]),
|
|
1132
1132
|
_: 2
|
|
1133
1133
|
}, [
|
|
@@ -1137,10 +1137,10 @@ const ce = {
|
|
|
1137
1137
|
V("div", {
|
|
1138
1138
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1139
1139
|
}, [
|
|
1140
|
-
|
|
1141
|
-
Z(
|
|
1140
|
+
X(w.$slots, "label-tooltip", {}, () => [
|
|
1141
|
+
Z(N(e.item.tooltip), 1)
|
|
1142
1142
|
], !0)
|
|
1143
|
-
], 8,
|
|
1143
|
+
], 8, Mo)
|
|
1144
1144
|
]),
|
|
1145
1145
|
key: "0"
|
|
1146
1146
|
} : void 0
|
|
@@ -1151,67 +1151,67 @@ const ce = {
|
|
|
1151
1151
|
class: "config-card-details-value",
|
|
1152
1152
|
"data-testid": `${e.item.key}-property-value`
|
|
1153
1153
|
}, [
|
|
1154
|
-
|
|
1154
|
+
X(w.$slots, e.item.key, {
|
|
1155
1155
|
rowValue: e.item.value
|
|
1156
1156
|
}, () => [
|
|
1157
|
-
s.value ? (d(),
|
|
1158
|
-
(d(),
|
|
1157
|
+
s.value ? (d(), j("div", Fo, [
|
|
1158
|
+
(d(), P(Be(c.value.tag), Cr(kr(c.value.attrs)), {
|
|
1159
1159
|
default: g(() => [
|
|
1160
|
-
c.value.additionalComponent === "KBadge" ? (d(),
|
|
1160
|
+
c.value.additionalComponent === "KBadge" ? (d(), j("div", {
|
|
1161
1161
|
key: 0,
|
|
1162
1162
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1163
1163
|
}, [
|
|
1164
|
-
(d(!0),
|
|
1165
|
-
key: `${e.item.key}-badge-tag-${
|
|
1164
|
+
(d(!0), j(Ce, null, ve(e.item.value, (L, v) => (d(), P(b, {
|
|
1165
|
+
key: `${e.item.key}-badge-tag-${v}`,
|
|
1166
1166
|
class: "config-badge",
|
|
1167
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1168
|
-
tooltip:
|
|
1167
|
+
"data-testid": `${e.item.key}-badge-tag-${v}`,
|
|
1168
|
+
tooltip: L,
|
|
1169
1169
|
"truncation-tooltip": ""
|
|
1170
1170
|
}, {
|
|
1171
1171
|
default: g(() => [
|
|
1172
|
-
Z(
|
|
1172
|
+
Z(N(L), 1)
|
|
1173
1173
|
]),
|
|
1174
1174
|
_: 2
|
|
1175
1175
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
1176
|
-
], 8,
|
|
1177
|
-
c.value.additionalComponent === "CopyUuid" ? (d(),
|
|
1176
|
+
], 8, No)) : z("", !0),
|
|
1177
|
+
c.value.additionalComponent === "CopyUuid" ? (d(), j("div", {
|
|
1178
1178
|
key: 1,
|
|
1179
1179
|
class: "copy-uuid-array",
|
|
1180
1180
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1181
1181
|
}, [
|
|
1182
|
-
(d(!0),
|
|
1183
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1184
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1185
|
-
uuid:
|
|
1182
|
+
(d(!0), j(Ce, null, ve(e.item.value, (L, v) => (d(), P(m(An), bt(c.value.childAttrs, {
|
|
1183
|
+
key: `${e.item.key}-copy-uuid-${v}`,
|
|
1184
|
+
"data-testid": `${e.item.key}-copy-uuid-${v}`,
|
|
1185
|
+
uuid: L
|
|
1186
1186
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1187
|
-
], 8, Ko)) : c.value.additionalComponent === "KMethodBadge" ? (d(),
|
|
1187
|
+
], 8, Ko)) : c.value.additionalComponent === "KMethodBadge" ? (d(), j("div", {
|
|
1188
1188
|
key: 2,
|
|
1189
1189
|
class: "method-badge-array",
|
|
1190
1190
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1191
1191
|
}, [
|
|
1192
|
-
(d(!0),
|
|
1193
|
-
key: `${e.item.key}-badge-method-${
|
|
1194
|
-
appearance: Object.values(m(
|
|
1192
|
+
(d(!0), j(Ce, null, ve(e.item.value, (L, v) => (d(), P(b, {
|
|
1193
|
+
key: `${e.item.key}-badge-method-${v}`,
|
|
1194
|
+
appearance: Object.values(m(Sr)).includes(L.toLowerCase()) ? L.toLowerCase() : "custom",
|
|
1195
1195
|
class: "config-badge",
|
|
1196
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1196
|
+
"data-testid": `${e.item.key}-badge-method-${v}`
|
|
1197
1197
|
}, {
|
|
1198
1198
|
default: g(() => [
|
|
1199
|
-
Z(
|
|
1199
|
+
Z(N(L), 1)
|
|
1200
1200
|
]),
|
|
1201
1201
|
_: 2
|
|
1202
1202
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1203
|
-
], 8,
|
|
1204
|
-
c.value.additionalComponent === "JsonCardItem" ? (d(),
|
|
1203
|
+
], 8, qo)) : z("", !0),
|
|
1204
|
+
c.value.additionalComponent === "JsonCardItem" ? (d(), j("div", {
|
|
1205
1205
|
key: 3,
|
|
1206
1206
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1207
1207
|
}, [
|
|
1208
|
-
(d(!0),
|
|
1209
|
-
key: `json-array-item-${
|
|
1210
|
-
index:
|
|
1208
|
+
(d(!0), j(Ce, null, ve(e.item.value, (L, v) => (d(), P(Sn, {
|
|
1209
|
+
key: `json-array-item-${v}`,
|
|
1210
|
+
index: v,
|
|
1211
1211
|
"is-array-item": "",
|
|
1212
|
-
item:
|
|
1212
|
+
item: L
|
|
1213
1213
|
}, null, 8, ["index", "item"]))), 128))
|
|
1214
|
-
], 8,
|
|
1214
|
+
], 8, Bo)) : (d(), P(_, {
|
|
1215
1215
|
key: 4,
|
|
1216
1216
|
label: m(f) ? e.item.value : ""
|
|
1217
1217
|
}, {
|
|
@@ -1219,27 +1219,27 @@ const ce = {
|
|
|
1219
1219
|
V("span", {
|
|
1220
1220
|
ref_key: "textContent",
|
|
1221
1221
|
ref: y,
|
|
1222
|
-
class:
|
|
1223
|
-
},
|
|
1222
|
+
class: Ee(["attrs-data-text", { truncated: e.truncated }])
|
|
1223
|
+
}, N(c.value.text), 3)
|
|
1224
1224
|
]),
|
|
1225
1225
|
_: 1
|
|
1226
1226
|
}, 8, ["label"]))
|
|
1227
1227
|
]),
|
|
1228
1228
|
_: 1
|
|
1229
1229
|
}, 16))
|
|
1230
|
-
])) : (d(),
|
|
1230
|
+
])) : (d(), j("div", {
|
|
1231
1231
|
key: 0,
|
|
1232
1232
|
"data-testid": `${e.item.key}-no-value`
|
|
1233
|
-
}, " – ", 8,
|
|
1233
|
+
}, " – ", 8, Eo))
|
|
1234
1234
|
], !0)
|
|
1235
|
-
], 8,
|
|
1235
|
+
], 8, Oo)
|
|
1236
1236
|
]);
|
|
1237
1237
|
};
|
|
1238
1238
|
}
|
|
1239
|
-
}), $t = /* @__PURE__ */
|
|
1239
|
+
}), $t = /* @__PURE__ */ _e(Uo, [["__scopeId", "data-v-9c87856b"]]), Po = { class: "json-config" }, Do = {
|
|
1240
1240
|
key: 0,
|
|
1241
1241
|
class: "json-endpoint"
|
|
1242
|
-
},
|
|
1242
|
+
}, xn = /* @__PURE__ */ ae({
|
|
1243
1243
|
__name: "JsonCodeBlock",
|
|
1244
1244
|
props: {
|
|
1245
1245
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1280,13 +1280,13 @@ const ce = {
|
|
|
1280
1280
|
return (o, i) => {
|
|
1281
1281
|
var a;
|
|
1282
1282
|
const s = q("KBadge"), l = q("KCodeBlock");
|
|
1283
|
-
return d(),
|
|
1284
|
-
n.fetcherUrl && (a = n.config) != null && a.jsonYamlMilestone2Enabled ? (d(),
|
|
1283
|
+
return d(), j("div", Po, [
|
|
1284
|
+
n.fetcherUrl && (a = n.config) != null && a.jsonYamlMilestone2Enabled ? (d(), j("div", Do, [
|
|
1285
1285
|
E(s, {
|
|
1286
1286
|
appearance: n.requestMethod
|
|
1287
1287
|
}, {
|
|
1288
1288
|
default: g(() => [
|
|
1289
|
-
Z(
|
|
1289
|
+
Z(N(n.requestMethod), 1)
|
|
1290
1290
|
]),
|
|
1291
1291
|
_: 1
|
|
1292
1292
|
}, 8, ["appearance"]),
|
|
@@ -1298,10 +1298,10 @@ const ce = {
|
|
|
1298
1298
|
theme: "dark"
|
|
1299
1299
|
}, null, 8, ["code"])
|
|
1300
1300
|
])) : z("", !0),
|
|
1301
|
-
n.jsonRecord ? (d(),
|
|
1301
|
+
n.jsonRecord ? (d(), P(l, {
|
|
1302
1302
|
key: 1,
|
|
1303
1303
|
id: "json-codeblock",
|
|
1304
|
-
class:
|
|
1304
|
+
class: Ee({ "json-content": n.fetcherUrl }),
|
|
1305
1305
|
code: JSON.stringify(t, null, 2),
|
|
1306
1306
|
language: "json",
|
|
1307
1307
|
theme: "dark"
|
|
@@ -1314,7 +1314,7 @@ const ce = {
|
|
|
1314
1314
|
function Tn(e) {
|
|
1315
1315
|
return typeof e > "u" || e === null;
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1317
|
+
function Vo(e) {
|
|
1318
1318
|
return typeof e == "object" && e !== null;
|
|
1319
1319
|
}
|
|
1320
1320
|
function Ro(e) {
|
|
@@ -1327,16 +1327,16 @@ function Go(e, n) {
|
|
|
1327
1327
|
o = i[t], e[o] = n[o];
|
|
1328
1328
|
return e;
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function Ho(e, n) {
|
|
1331
1331
|
var t = "", r;
|
|
1332
1332
|
for (r = 0; r < n; r += 1)
|
|
1333
1333
|
t += e;
|
|
1334
1334
|
return t;
|
|
1335
1335
|
}
|
|
1336
|
-
function
|
|
1336
|
+
function zo(e) {
|
|
1337
1337
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1338
1338
|
}
|
|
1339
|
-
var Jo = Tn, Yo =
|
|
1339
|
+
var Jo = Tn, Yo = Vo, Wo = Ro, Zo = Ho, Qo = zo, Xo = Go, ue = {
|
|
1340
1340
|
isNothing: Jo,
|
|
1341
1341
|
isObject: Yo,
|
|
1342
1342
|
toArray: Wo,
|
|
@@ -1350,15 +1350,15 @@ function $n(e, n) {
|
|
|
1350
1350
|
|
|
1351
1351
|
` + e.mark.snippet), r + " " + t) : r;
|
|
1352
1352
|
}
|
|
1353
|
-
function
|
|
1353
|
+
function We(e, n) {
|
|
1354
1354
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = $n(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1355
1355
|
}
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1356
|
+
We.prototype = Object.create(Error.prototype);
|
|
1357
|
+
We.prototype.constructor = We;
|
|
1358
|
+
We.prototype.toString = function(e) {
|
|
1359
1359
|
return this.name + ": " + $n(this, e);
|
|
1360
1360
|
};
|
|
1361
|
-
var ye =
|
|
1361
|
+
var ye = We;
|
|
1362
1362
|
function yt(e, n, t, r, o) {
|
|
1363
1363
|
var i = "", a = "", s = Math.floor(o / 2) - 1;
|
|
1364
1364
|
return r - n > s && (i = " ... ", n = r - s + i.length), t - r > s && (a = " ...", t = r + s - a.length), {
|
|
@@ -1492,26 +1492,26 @@ Ct.prototype.extend = function(e) {
|
|
|
1492
1492
|
var r = Object.create(Ct.prototype);
|
|
1493
1493
|
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = Wt(r, "implicit"), r.compiledExplicit = Wt(r, "explicit"), r.compiledTypeMap = ia(r.compiledImplicit, r.compiledExplicit), r;
|
|
1494
1494
|
};
|
|
1495
|
-
var jn = Ct,
|
|
1495
|
+
var jn = Ct, Mn = new pe("tag:yaml.org,2002:str", {
|
|
1496
1496
|
kind: "scalar",
|
|
1497
1497
|
construct: function(e) {
|
|
1498
1498
|
return e !== null ? e : "";
|
|
1499
1499
|
}
|
|
1500
|
-
}),
|
|
1500
|
+
}), On = new pe("tag:yaml.org,2002:seq", {
|
|
1501
1501
|
kind: "sequence",
|
|
1502
1502
|
construct: function(e) {
|
|
1503
1503
|
return e !== null ? e : [];
|
|
1504
1504
|
}
|
|
1505
|
-
}),
|
|
1505
|
+
}), En = new pe("tag:yaml.org,2002:map", {
|
|
1506
1506
|
kind: "mapping",
|
|
1507
1507
|
construct: function(e) {
|
|
1508
1508
|
return e !== null ? e : {};
|
|
1509
1509
|
}
|
|
1510
1510
|
}), Fn = new jn({
|
|
1511
1511
|
explicit: [
|
|
1512
|
+
Mn,
|
|
1512
1513
|
On,
|
|
1513
|
-
En
|
|
1514
|
-
Mn
|
|
1514
|
+
En
|
|
1515
1515
|
]
|
|
1516
1516
|
});
|
|
1517
1517
|
function sa(e) {
|
|
@@ -1526,7 +1526,7 @@ function la() {
|
|
|
1526
1526
|
function ua(e) {
|
|
1527
1527
|
return e === null;
|
|
1528
1528
|
}
|
|
1529
|
-
var
|
|
1529
|
+
var Nn = new pe("tag:yaml.org,2002:null", {
|
|
1530
1530
|
kind: "scalar",
|
|
1531
1531
|
resolve: sa,
|
|
1532
1532
|
construct: la,
|
|
@@ -1653,7 +1653,7 @@ function ha(e) {
|
|
|
1653
1653
|
function va(e) {
|
|
1654
1654
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ue.isNegativeZero(e);
|
|
1655
1655
|
}
|
|
1656
|
-
var
|
|
1656
|
+
var qn = new pe("tag:yaml.org,2002:int", {
|
|
1657
1657
|
kind: "scalar",
|
|
1658
1658
|
resolve: ya,
|
|
1659
1659
|
construct: ha,
|
|
@@ -1693,8 +1693,8 @@ function ka(e) {
|
|
|
1693
1693
|
var n, t;
|
|
1694
1694
|
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);
|
|
1695
1695
|
}
|
|
1696
|
-
var
|
|
1697
|
-
function
|
|
1696
|
+
var _a = /^[-+]?[0-9]+e/;
|
|
1697
|
+
function wa(e, n) {
|
|
1698
1698
|
var t;
|
|
1699
1699
|
if (isNaN(e))
|
|
1700
1700
|
switch (n) {
|
|
@@ -1725,36 +1725,36 @@ function _a(e, n) {
|
|
|
1725
1725
|
}
|
|
1726
1726
|
else if (ue.isNegativeZero(e))
|
|
1727
1727
|
return "-0.0";
|
|
1728
|
-
return t = e.toString(10),
|
|
1728
|
+
return t = e.toString(10), _a.test(t) ? t.replace("e", ".e") : t;
|
|
1729
1729
|
}
|
|
1730
1730
|
function Ia(e) {
|
|
1731
1731
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ue.isNegativeZero(e));
|
|
1732
1732
|
}
|
|
1733
|
-
var
|
|
1733
|
+
var Bn = new pe("tag:yaml.org,2002:float", {
|
|
1734
1734
|
kind: "scalar",
|
|
1735
1735
|
resolve: Ca,
|
|
1736
1736
|
construct: ka,
|
|
1737
1737
|
predicate: Ia,
|
|
1738
|
-
represent:
|
|
1738
|
+
represent: wa,
|
|
1739
1739
|
defaultStyle: "lowercase"
|
|
1740
|
-
}),
|
|
1740
|
+
}), Ln = Fn.extend({
|
|
1741
1741
|
implicit: [
|
|
1742
|
-
Bn,
|
|
1743
|
-
Kn,
|
|
1744
1742
|
Nn,
|
|
1745
|
-
|
|
1743
|
+
Kn,
|
|
1744
|
+
qn,
|
|
1745
|
+
Bn
|
|
1746
1746
|
]
|
|
1747
|
-
}),
|
|
1747
|
+
}), Un = Ln, Pn = new RegExp(
|
|
1748
1748
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1749
|
-
),
|
|
1749
|
+
), Dn = new RegExp(
|
|
1750
1750
|
"^([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]))?))?$"
|
|
1751
1751
|
);
|
|
1752
1752
|
function Aa(e) {
|
|
1753
|
-
return e === null ? !1 :
|
|
1753
|
+
return e === null ? !1 : Pn.exec(e) !== null || Dn.exec(e) !== null;
|
|
1754
1754
|
}
|
|
1755
|
-
function
|
|
1755
|
+
function Sa(e) {
|
|
1756
1756
|
var n, t, r, o, i, a, s, l = 0, u = null, p, c, y;
|
|
1757
|
-
if (n =
|
|
1757
|
+
if (n = Pn.exec(e), n === null && (n = Dn.exec(e)), n === null)
|
|
1758
1758
|
throw new Error("Date resolve error");
|
|
1759
1759
|
if (t = +n[1], r = +n[2] - 1, o = +n[3], !n[4])
|
|
1760
1760
|
return new Date(Date.UTC(t, r, o));
|
|
@@ -1765,15 +1765,15 @@ function xa(e) {
|
|
|
1765
1765
|
}
|
|
1766
1766
|
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, r, o, i, a, s, l)), u && y.setTime(y.getTime() - u), y;
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1768
|
+
function xa(e) {
|
|
1769
1769
|
return e.toISOString();
|
|
1770
1770
|
}
|
|
1771
|
-
var
|
|
1771
|
+
var Vn = new pe("tag:yaml.org,2002:timestamp", {
|
|
1772
1772
|
kind: "scalar",
|
|
1773
1773
|
resolve: Aa,
|
|
1774
|
-
construct:
|
|
1774
|
+
construct: Sa,
|
|
1775
1775
|
instanceOf: Date,
|
|
1776
|
-
represent:
|
|
1776
|
+
represent: xa
|
|
1777
1777
|
});
|
|
1778
1778
|
function Ta(e) {
|
|
1779
1779
|
return e === "<<" || e === null;
|
|
@@ -1801,23 +1801,23 @@ function ja(e) {
|
|
|
1801
1801
|
n % 4 === 0 && n && (s.push(a >> 16 & 255), s.push(a >> 8 & 255), s.push(a & 255)), a = a << 6 | i.indexOf(r.charAt(n));
|
|
1802
1802
|
return t = o % 4 * 6, t === 0 ? (s.push(a >> 16 & 255), s.push(a >> 8 & 255), s.push(a & 255)) : t === 18 ? (s.push(a >> 10 & 255), s.push(a >> 2 & 255)) : t === 12 && s.push(a >> 4 & 255), new Uint8Array(s);
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1804
|
+
function Ma(e) {
|
|
1805
1805
|
var n = "", t = 0, r, o, i = e.length, a = jt;
|
|
1806
1806
|
for (r = 0; r < i; r++)
|
|
1807
1807
|
r % 3 === 0 && r && (n += a[t >> 18 & 63], n += a[t >> 12 & 63], n += a[t >> 6 & 63], n += a[t & 63]), t = (t << 8) + e[r];
|
|
1808
1808
|
return o = i % 3, o === 0 ? (n += a[t >> 18 & 63], n += a[t >> 12 & 63], n += a[t >> 6 & 63], n += a[t & 63]) : o === 2 ? (n += a[t >> 10 & 63], n += a[t >> 4 & 63], n += a[t << 2 & 63], n += a[64]) : o === 1 && (n += a[t >> 2 & 63], n += a[t << 4 & 63], n += a[64], n += a[64]), n;
|
|
1809
1809
|
}
|
|
1810
|
-
function
|
|
1810
|
+
function Oa(e) {
|
|
1811
1811
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1812
1812
|
}
|
|
1813
1813
|
var Gn = new pe("tag:yaml.org,2002:binary", {
|
|
1814
1814
|
kind: "scalar",
|
|
1815
1815
|
resolve: $a,
|
|
1816
1816
|
construct: ja,
|
|
1817
|
-
predicate:
|
|
1818
|
-
represent:
|
|
1819
|
-
}),
|
|
1820
|
-
function
|
|
1817
|
+
predicate: Oa,
|
|
1818
|
+
represent: Ma
|
|
1819
|
+
}), Ea = Object.prototype.hasOwnProperty, Fa = Object.prototype.toString;
|
|
1820
|
+
function Na(e) {
|
|
1821
1821
|
if (e === null)
|
|
1822
1822
|
return !0;
|
|
1823
1823
|
var n = [], t, r, o, i, a, s = e;
|
|
@@ -1825,7 +1825,7 @@ function Ba(e) {
|
|
|
1825
1825
|
if (o = s[t], a = !1, Fa.call(o) !== "[object Object]")
|
|
1826
1826
|
return !1;
|
|
1827
1827
|
for (i in o)
|
|
1828
|
-
if (
|
|
1828
|
+
if (Ea.call(o, i))
|
|
1829
1829
|
if (!a)
|
|
1830
1830
|
a = !0;
|
|
1831
1831
|
else
|
|
@@ -1842,23 +1842,23 @@ function Ba(e) {
|
|
|
1842
1842
|
function Ka(e) {
|
|
1843
1843
|
return e !== null ? e : [];
|
|
1844
1844
|
}
|
|
1845
|
-
var
|
|
1845
|
+
var Hn = new pe("tag:yaml.org,2002:omap", {
|
|
1846
1846
|
kind: "sequence",
|
|
1847
|
-
resolve:
|
|
1847
|
+
resolve: Na,
|
|
1848
1848
|
construct: Ka
|
|
1849
|
-
}),
|
|
1850
|
-
function
|
|
1849
|
+
}), qa = Object.prototype.toString;
|
|
1850
|
+
function Ba(e) {
|
|
1851
1851
|
if (e === null)
|
|
1852
1852
|
return !0;
|
|
1853
1853
|
var n, t, r, o, i, a = e;
|
|
1854
1854
|
for (i = new Array(a.length), n = 0, t = a.length; n < t; n += 1) {
|
|
1855
|
-
if (r = a[n],
|
|
1855
|
+
if (r = a[n], qa.call(r) !== "[object Object]" || (o = Object.keys(r), o.length !== 1))
|
|
1856
1856
|
return !1;
|
|
1857
1857
|
i[n] = [o[0], r[o[0]]];
|
|
1858
1858
|
}
|
|
1859
1859
|
return !0;
|
|
1860
1860
|
}
|
|
1861
|
-
function
|
|
1861
|
+
function La(e) {
|
|
1862
1862
|
if (e === null)
|
|
1863
1863
|
return [];
|
|
1864
1864
|
var n, t, r, o, i, a = e;
|
|
@@ -1866,55 +1866,55 @@ function Ua(e) {
|
|
|
1866
1866
|
r = a[n], o = Object.keys(r), i[n] = [o[0], r[o[0]]];
|
|
1867
1867
|
return i;
|
|
1868
1868
|
}
|
|
1869
|
-
var
|
|
1869
|
+
var zn = new pe("tag:yaml.org,2002:pairs", {
|
|
1870
1870
|
kind: "sequence",
|
|
1871
|
-
resolve:
|
|
1872
|
-
construct:
|
|
1873
|
-
}),
|
|
1874
|
-
function
|
|
1871
|
+
resolve: Ba,
|
|
1872
|
+
construct: La
|
|
1873
|
+
}), Ua = Object.prototype.hasOwnProperty;
|
|
1874
|
+
function Pa(e) {
|
|
1875
1875
|
if (e === null)
|
|
1876
1876
|
return !0;
|
|
1877
1877
|
var n, t = e;
|
|
1878
1878
|
for (n in t)
|
|
1879
|
-
if (
|
|
1879
|
+
if (Ua.call(t, n) && t[n] !== null)
|
|
1880
1880
|
return !1;
|
|
1881
1881
|
return !0;
|
|
1882
1882
|
}
|
|
1883
|
-
function
|
|
1883
|
+
function Da(e) {
|
|
1884
1884
|
return e !== null ? e : {};
|
|
1885
1885
|
}
|
|
1886
1886
|
var Jn = new pe("tag:yaml.org,2002:set", {
|
|
1887
1887
|
kind: "mapping",
|
|
1888
|
-
resolve:
|
|
1889
|
-
construct:
|
|
1890
|
-
}),
|
|
1888
|
+
resolve: Pa,
|
|
1889
|
+
construct: Da
|
|
1890
|
+
}), Mt = Un.extend({
|
|
1891
1891
|
implicit: [
|
|
1892
|
-
|
|
1892
|
+
Vn,
|
|
1893
1893
|
Rn
|
|
1894
1894
|
],
|
|
1895
1895
|
explicit: [
|
|
1896
1896
|
Gn,
|
|
1897
|
-
zn,
|
|
1898
1897
|
Hn,
|
|
1898
|
+
zn,
|
|
1899
1899
|
Jn
|
|
1900
1900
|
]
|
|
1901
|
-
}), Fe = Object.prototype.hasOwnProperty, at = 1, Yn = 2, Wn = 3, it = 4, vt = 1,
|
|
1901
|
+
}), Fe = Object.prototype.hasOwnProperty, at = 1, Yn = 2, Wn = 3, it = 4, vt = 1, Va = 2, Zt = 3, Ra = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Ga = /[\x85\u2028\u2029]/, Ha = /[,\[\]\{\}]/, Zn = /^(?:!|!!|![a-z\-]+!)$/i, Qn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1902
1902
|
function Qt(e) {
|
|
1903
1903
|
return Object.prototype.toString.call(e);
|
|
1904
1904
|
}
|
|
1905
1905
|
function Ae(e) {
|
|
1906
1906
|
return e === 10 || e === 13;
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1908
|
+
function qe(e) {
|
|
1909
1909
|
return e === 9 || e === 32;
|
|
1910
1910
|
}
|
|
1911
1911
|
function be(e) {
|
|
1912
1912
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function Ve(e) {
|
|
1915
1915
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1916
1916
|
}
|
|
1917
|
-
function
|
|
1917
|
+
function za(e) {
|
|
1918
1918
|
var n;
|
|
1919
1919
|
return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
1920
1920
|
}
|
|
@@ -1935,10 +1935,10 @@ function Wa(e) {
|
|
|
1935
1935
|
);
|
|
1936
1936
|
}
|
|
1937
1937
|
var Xn = new Array(256), er = new Array(256);
|
|
1938
|
-
for (var
|
|
1939
|
-
Xn[
|
|
1938
|
+
for (var Pe = 0; Pe < 256; Pe++)
|
|
1939
|
+
Xn[Pe] = Xt(Pe) ? 1 : 0, er[Pe] = Xt(Pe);
|
|
1940
1940
|
function Za(e, n) {
|
|
1941
|
-
this.input = e, this.filename = n.filename || null, this.schema = n.schema ||
|
|
1941
|
+
this.input = e, this.filename = n.filename || null, this.schema = n.schema || Mt, 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 = [];
|
|
1942
1942
|
}
|
|
1943
1943
|
function tr(e, n) {
|
|
1944
1944
|
var t = {
|
|
@@ -1951,7 +1951,7 @@ function tr(e, n) {
|
|
|
1951
1951
|
};
|
|
1952
1952
|
return t.snippet = ta(t), new ye(n, t);
|
|
1953
1953
|
}
|
|
1954
|
-
function
|
|
1954
|
+
function M(e, n) {
|
|
1955
1955
|
throw tr(e, n);
|
|
1956
1956
|
}
|
|
1957
1957
|
function st(e, n) {
|
|
@@ -1960,40 +1960,40 @@ function st(e, n) {
|
|
|
1960
1960
|
var en = {
|
|
1961
1961
|
YAML: function(e, n, t) {
|
|
1962
1962
|
var r, o, i;
|
|
1963
|
-
e.version !== null &&
|
|
1963
|
+
e.version !== null && M(e, "duplication of %YAML directive"), t.length !== 1 && M(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), r === null && M(e, "ill-formed argument of the YAML directive"), o = parseInt(r[1], 10), i = parseInt(r[2], 10), o !== 1 && M(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = i < 2, i !== 1 && i !== 2 && st(e, "unsupported YAML version of the document");
|
|
1964
1964
|
},
|
|
1965
1965
|
TAG: function(e, n, t) {
|
|
1966
1966
|
var r, o;
|
|
1967
|
-
t.length !== 2 &&
|
|
1967
|
+
t.length !== 2 && M(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1], Zn.test(r) || M(e, "ill-formed tag handle (first argument) of the TAG directive"), Fe.call(e.tagMap, r) && M(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Qn.test(o) || M(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1968
1968
|
try {
|
|
1969
1969
|
o = decodeURIComponent(o);
|
|
1970
1970
|
} catch {
|
|
1971
|
-
|
|
1971
|
+
M(e, "tag prefix is malformed: " + o);
|
|
1972
1972
|
}
|
|
1973
1973
|
e.tagMap[r] = o;
|
|
1974
1974
|
}
|
|
1975
1975
|
};
|
|
1976
|
-
function
|
|
1976
|
+
function Oe(e, n, t, r) {
|
|
1977
1977
|
var o, i, a, s;
|
|
1978
1978
|
if (n < t) {
|
|
1979
1979
|
if (s = e.input.slice(n, t), r)
|
|
1980
1980
|
for (o = 0, i = s.length; o < i; o += 1)
|
|
1981
|
-
a = s.charCodeAt(o), a === 9 || 32 <= a && a <= 1114111 ||
|
|
1981
|
+
a = s.charCodeAt(o), a === 9 || 32 <= a && a <= 1114111 || M(e, "expected valid JSON character");
|
|
1982
1982
|
else
|
|
1983
|
-
Ra.test(s) &&
|
|
1983
|
+
Ra.test(s) && M(e, "the stream contains non-printable characters");
|
|
1984
1984
|
e.result += s;
|
|
1985
1985
|
}
|
|
1986
1986
|
}
|
|
1987
1987
|
function tn(e, n, t, r) {
|
|
1988
1988
|
var o, i, a, s;
|
|
1989
|
-
for (ue.isObject(t) ||
|
|
1989
|
+
for (ue.isObject(t) || M(e, "cannot merge mappings; the provided source object is unacceptable"), o = Object.keys(t), a = 0, s = o.length; a < s; a += 1)
|
|
1990
1990
|
i = o[a], Fe.call(n, i) || (n[i] = t[i], r[i] = !0);
|
|
1991
1991
|
}
|
|
1992
1992
|
function Re(e, n, t, r, o, i, a, s, l) {
|
|
1993
1993
|
var u, p;
|
|
1994
1994
|
if (Array.isArray(o))
|
|
1995
1995
|
for (o = Array.prototype.slice.call(o), u = 0, p = o.length; u < p; u += 1)
|
|
1996
|
-
Array.isArray(o[u]) &&
|
|
1996
|
+
Array.isArray(o[u]) && M(e, "nested arrays are not supported inside keys"), typeof o == "object" && Qt(o[u]) === "[object Object]" && (o[u] = "[object Object]");
|
|
1997
1997
|
if (typeof o == "object" && Qt(o) === "[object Object]" && (o = "[object Object]"), o = String(o), n === null && (n = {}), r === "tag:yaml.org,2002:merge")
|
|
1998
1998
|
if (Array.isArray(i))
|
|
1999
1999
|
for (u = 0, p = i.length; u < p; u += 1)
|
|
@@ -2001,7 +2001,7 @@ function Re(e, n, t, r, o, i, a, s, l) {
|
|
|
2001
2001
|
else
|
|
2002
2002
|
tn(e, n, i, t);
|
|
2003
2003
|
else
|
|
2004
|
-
!e.json && !Fe.call(t, o) && Fe.call(n, o) && (e.line = a || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position,
|
|
2004
|
+
!e.json && !Fe.call(t, o) && Fe.call(n, o) && (e.line = a || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, M(e, "duplicated mapping key")), o === "__proto__" ? Object.defineProperty(n, o, {
|
|
2005
2005
|
configurable: !0,
|
|
2006
2006
|
enumerable: !0,
|
|
2007
2007
|
writable: !0,
|
|
@@ -2009,20 +2009,20 @@ function Re(e, n, t, r, o, i, a, s, l) {
|
|
|
2009
2009
|
}) : n[o] = i, delete t[o];
|
|
2010
2010
|
return n;
|
|
2011
2011
|
}
|
|
2012
|
-
function
|
|
2012
|
+
function Ot(e) {
|
|
2013
2013
|
var n;
|
|
2014
|
-
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
2014
|
+
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : M(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
2015
2015
|
}
|
|
2016
2016
|
function le(e, n, t) {
|
|
2017
2017
|
for (var r = 0, o = e.input.charCodeAt(e.position); o !== 0; ) {
|
|
2018
|
-
for (;
|
|
2018
|
+
for (; qe(o); )
|
|
2019
2019
|
o === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), o = e.input.charCodeAt(++e.position);
|
|
2020
2020
|
if (n && o === 35)
|
|
2021
2021
|
do
|
|
2022
2022
|
o = e.input.charCodeAt(++e.position);
|
|
2023
2023
|
while (o !== 10 && o !== 13 && o !== 0);
|
|
2024
2024
|
if (Ae(o))
|
|
2025
|
-
for (
|
|
2025
|
+
for (Ot(e), o = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; o === 32; )
|
|
2026
2026
|
e.lineIndent++, o = e.input.charCodeAt(++e.position);
|
|
2027
2027
|
else
|
|
2028
2028
|
break;
|
|
@@ -2033,23 +2033,23 @@ function ft(e) {
|
|
|
2033
2033
|
var n = e.position, t;
|
|
2034
2034
|
return t = e.input.charCodeAt(n), !!((t === 45 || t === 46) && t === e.input.charCodeAt(n + 1) && t === e.input.charCodeAt(n + 2) && (n += 3, t = e.input.charCodeAt(n), t === 0 || be(t)));
|
|
2035
2035
|
}
|
|
2036
|
-
function
|
|
2036
|
+
function Et(e, n) {
|
|
2037
2037
|
n === 1 ? e.result += " " : n > 1 && (e.result += ue.repeat(`
|
|
2038
2038
|
`, n - 1));
|
|
2039
2039
|
}
|
|
2040
2040
|
function Qa(e, n, t) {
|
|
2041
2041
|
var r, o, i, a, s, l, u, p, c = e.kind, y = e.result, f;
|
|
2042
|
-
if (f = e.input.charCodeAt(e.position), be(f) ||
|
|
2042
|
+
if (f = e.input.charCodeAt(e.position), be(f) || Ve(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (o = e.input.charCodeAt(e.position + 1), be(o) || t && Ve(o)))
|
|
2043
2043
|
return !1;
|
|
2044
2044
|
for (e.kind = "scalar", e.result = "", i = a = e.position, s = !1; f !== 0; ) {
|
|
2045
2045
|
if (f === 58) {
|
|
2046
|
-
if (o = e.input.charCodeAt(e.position + 1), be(o) || t &&
|
|
2046
|
+
if (o = e.input.charCodeAt(e.position + 1), be(o) || t && Ve(o))
|
|
2047
2047
|
break;
|
|
2048
2048
|
} else if (f === 35) {
|
|
2049
2049
|
if (r = e.input.charCodeAt(e.position - 1), be(r))
|
|
2050
2050
|
break;
|
|
2051
2051
|
} else {
|
|
2052
|
-
if (e.position === e.lineStart && ft(e) || t &&
|
|
2052
|
+
if (e.position === e.lineStart && ft(e) || t && Ve(f))
|
|
2053
2053
|
break;
|
|
2054
2054
|
if (Ae(f))
|
|
2055
2055
|
if (l = e.line, u = e.lineStart, p = e.lineIndent, le(e, !1, -1), e.lineIndent >= n) {
|
|
@@ -2060,9 +2060,9 @@ function Qa(e, n, t) {
|
|
|
2060
2060
|
break;
|
|
2061
2061
|
}
|
|
2062
2062
|
}
|
|
2063
|
-
s && (
|
|
2063
|
+
s && (Oe(e, i, a, !1), Et(e, e.line - l), i = a = e.position, s = !1), qe(f) || (a = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
2064
2064
|
}
|
|
2065
|
-
return
|
|
2065
|
+
return Oe(e, i, a, !1), e.result ? !0 : (e.kind = c, e.result = y, !1);
|
|
2066
2066
|
}
|
|
2067
2067
|
function Xa(e, n) {
|
|
2068
2068
|
var t, r, o;
|
|
@@ -2070,13 +2070,13 @@ function Xa(e, n) {
|
|
|
2070
2070
|
return !1;
|
|
2071
2071
|
for (e.kind = "scalar", e.result = "", e.position++, r = o = e.position; (t = e.input.charCodeAt(e.position)) !== 0; )
|
|
2072
2072
|
if (t === 39)
|
|
2073
|
-
if (
|
|
2073
|
+
if (Oe(e, r, e.position, !0), t = e.input.charCodeAt(++e.position), t === 39)
|
|
2074
2074
|
r = e.position, e.position++, o = e.position;
|
|
2075
2075
|
else
|
|
2076
2076
|
return !0;
|
|
2077
2077
|
else
|
|
2078
|
-
Ae(t) ? (
|
|
2079
|
-
|
|
2078
|
+
Ae(t) ? (Oe(e, r, o, !0), Et(e, le(e, !1, n)), r = o = e.position) : e.position === e.lineStart && ft(e) ? M(e, "unexpected end of the document within a single quoted scalar") : (e.position++, o = e.position);
|
|
2079
|
+
M(e, "unexpected end of the stream within a single quoted scalar");
|
|
2080
2080
|
}
|
|
2081
2081
|
function ei(e, n) {
|
|
2082
2082
|
var t, r, o, i, a, s;
|
|
@@ -2084,38 +2084,38 @@ function ei(e, n) {
|
|
|
2084
2084
|
return !1;
|
|
2085
2085
|
for (e.kind = "scalar", e.result = "", e.position++, t = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
2086
2086
|
if (s === 34)
|
|
2087
|
-
return
|
|
2087
|
+
return Oe(e, t, e.position, !0), e.position++, !0;
|
|
2088
2088
|
if (s === 92) {
|
|
2089
|
-
if (
|
|
2089
|
+
if (Oe(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), Ae(s))
|
|
2090
2090
|
le(e, !1, n);
|
|
2091
2091
|
else if (s < 256 && Xn[s])
|
|
2092
2092
|
e.result += er[s], e.position++;
|
|
2093
2093
|
else if ((a = Ja(s)) > 0) {
|
|
2094
2094
|
for (o = a, i = 0; o > 0; o--)
|
|
2095
|
-
s = e.input.charCodeAt(++e.position), (a =
|
|
2095
|
+
s = e.input.charCodeAt(++e.position), (a = za(s)) >= 0 ? i = (i << 4) + a : M(e, "expected hexadecimal character");
|
|
2096
2096
|
e.result += Wa(i), e.position++;
|
|
2097
2097
|
} else
|
|
2098
|
-
|
|
2098
|
+
M(e, "unknown escape sequence");
|
|
2099
2099
|
t = r = e.position;
|
|
2100
2100
|
} else
|
|
2101
|
-
Ae(s) ? (
|
|
2101
|
+
Ae(s) ? (Oe(e, t, r, !0), Et(e, le(e, !1, n)), t = r = e.position) : e.position === e.lineStart && ft(e) ? M(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
2102
2102
|
}
|
|
2103
|
-
|
|
2103
|
+
M(e, "unexpected end of the stream within a double quoted scalar");
|
|
2104
2104
|
}
|
|
2105
2105
|
function ti(e, n) {
|
|
2106
|
-
var t = !0, r, o, i, a = e.tag, s, l = e.anchor, u, p, c, y, f,
|
|
2107
|
-
if (
|
|
2106
|
+
var t = !0, r, o, i, a = e.tag, s, l = e.anchor, u, p, c, y, f, w = /* @__PURE__ */ Object.create(null), h, A, b, _;
|
|
2107
|
+
if (_ = e.input.charCodeAt(e.position), _ === 91)
|
|
2108
2108
|
p = 93, f = !1, s = [];
|
|
2109
|
-
else if (
|
|
2109
|
+
else if (_ === 123)
|
|
2110
2110
|
p = 125, f = !0, s = {};
|
|
2111
2111
|
else
|
|
2112
2112
|
return !1;
|
|
2113
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = s),
|
|
2114
|
-
if (le(e, !0, n),
|
|
2113
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), _ = e.input.charCodeAt(++e.position); _ !== 0; ) {
|
|
2114
|
+
if (le(e, !0, n), _ = e.input.charCodeAt(e.position), _ === p)
|
|
2115
2115
|
return e.position++, e.tag = a, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
2116
|
-
t ?
|
|
2116
|
+
t ? _ === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), A = h = b = null, c = y = !1, _ === 63 && (u = e.input.charCodeAt(e.position + 1), be(u) && (c = y = !0, e.position++, le(e, !0, n))), r = e.line, o = e.lineStart, i = e.position, Ge(e, n, at, !1, !0), A = e.tag, h = e.result, le(e, !0, n), _ = e.input.charCodeAt(e.position), (y || e.line === r) && _ === 58 && (c = !0, _ = e.input.charCodeAt(++e.position), le(e, !0, n), Ge(e, n, at, !1, !0), b = e.result), f ? Re(e, s, w, A, h, b, r, o, i) : c ? s.push(Re(e, null, w, A, h, b, r, o, i)) : s.push(h), le(e, !0, n), _ = e.input.charCodeAt(e.position), _ === 44 ? (t = !0, _ = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2117
2117
|
}
|
|
2118
|
-
|
|
2118
|
+
M(e, "unexpected end of the stream within a flow collection");
|
|
2119
2119
|
}
|
|
2120
2120
|
function ni(e, n) {
|
|
2121
2121
|
var t, r, o = vt, i = !1, a = !1, s = n, l = 0, u = !1, p, c;
|
|
@@ -2127,22 +2127,22 @@ function ni(e, n) {
|
|
|
2127
2127
|
return !1;
|
|
2128
2128
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
2129
2129
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
2130
|
-
vt === o ? o = c === 43 ? Zt :
|
|
2130
|
+
vt === o ? o = c === 43 ? Zt : Va : M(e, "repeat of a chomping mode identifier");
|
|
2131
2131
|
else if ((p = Ya(c)) >= 0)
|
|
2132
|
-
p === 0 ?
|
|
2132
|
+
p === 0 ? M(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? M(e, "repeat of an indentation width identifier") : (s = n + p - 1, a = !0);
|
|
2133
2133
|
else
|
|
2134
2134
|
break;
|
|
2135
|
-
if (
|
|
2135
|
+
if (qe(c)) {
|
|
2136
2136
|
do
|
|
2137
2137
|
c = e.input.charCodeAt(++e.position);
|
|
2138
|
-
while (
|
|
2138
|
+
while (qe(c));
|
|
2139
2139
|
if (c === 35)
|
|
2140
2140
|
do
|
|
2141
2141
|
c = e.input.charCodeAt(++e.position);
|
|
2142
2142
|
while (!Ae(c) && c !== 0);
|
|
2143
2143
|
}
|
|
2144
2144
|
for (; c !== 0; ) {
|
|
2145
|
-
for (
|
|
2145
|
+
for (Ot(e), e.lineIndent = 0, c = e.input.charCodeAt(e.position); (!a || e.lineIndent < s) && c === 32; )
|
|
2146
2146
|
e.lineIndent++, c = e.input.charCodeAt(++e.position);
|
|
2147
2147
|
if (!a && e.lineIndent > s && (s = e.lineIndent), Ae(c)) {
|
|
2148
2148
|
l++;
|
|
@@ -2154,13 +2154,13 @@ function ni(e, n) {
|
|
|
2154
2154
|
`);
|
|
2155
2155
|
break;
|
|
2156
2156
|
}
|
|
2157
|
-
for (r ?
|
|
2157
|
+
for (r ? qe(c) ? (u = !0, e.result += ue.repeat(`
|
|
2158
2158
|
`, i ? 1 + l : l)) : u ? (u = !1, e.result += ue.repeat(`
|
|
2159
2159
|
`, l + 1)) : l === 0 ? i && (e.result += " ") : e.result += ue.repeat(`
|
|
2160
2160
|
`, l) : e.result += ue.repeat(`
|
|
2161
2161
|
`, i ? 1 + l : l), i = !0, a = !0, l = 0, t = e.position; !Ae(c) && c !== 0; )
|
|
2162
2162
|
c = e.input.charCodeAt(++e.position);
|
|
2163
|
-
|
|
2163
|
+
Oe(e, t, e.position, !1);
|
|
2164
2164
|
}
|
|
2165
2165
|
return !0;
|
|
2166
2166
|
}
|
|
@@ -2168,110 +2168,110 @@ function nn(e, n) {
|
|
|
2168
2168
|
var t, r = e.tag, o = e.anchor, i = [], a, s = !1, l;
|
|
2169
2169
|
if (e.firstTabInLine !== -1)
|
|
2170
2170
|
return !1;
|
|
2171
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2171
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), !(l !== 45 || (a = e.input.charCodeAt(e.position + 1), !be(a)))); ) {
|
|
2172
2172
|
if (s = !0, e.position++, le(e, !0, -1) && e.lineIndent <= n) {
|
|
2173
2173
|
i.push(null), l = e.input.charCodeAt(e.position);
|
|
2174
2174
|
continue;
|
|
2175
2175
|
}
|
|
2176
2176
|
if (t = e.line, Ge(e, n, Wn, !1, !0), i.push(e.result), le(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && l !== 0)
|
|
2177
|
-
|
|
2177
|
+
M(e, "bad indentation of a sequence entry");
|
|
2178
2178
|
else if (e.lineIndent < n)
|
|
2179
2179
|
break;
|
|
2180
2180
|
}
|
|
2181
2181
|
return s ? (e.tag = r, e.anchor = o, e.kind = "sequence", e.result = i, !0) : !1;
|
|
2182
2182
|
}
|
|
2183
2183
|
function ri(e, n, t) {
|
|
2184
|
-
var r, o, i, a, s, l, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), f = null,
|
|
2184
|
+
var r, o, i, a, s, l, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), f = null, w = null, h = null, A = !1, b = !1, _;
|
|
2185
2185
|
if (e.firstTabInLine !== -1)
|
|
2186
2186
|
return !1;
|
|
2187
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = c),
|
|
2188
|
-
if (!A && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2189
|
-
|
|
2187
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), _ = e.input.charCodeAt(e.position); _ !== 0; ) {
|
|
2188
|
+
if (!A && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), i = e.line, (_ === 63 || _ === 58) && be(r))
|
|
2189
|
+
_ === 63 ? (A && (Re(e, c, y, f, w, null, a, s, l), f = w = h = null), b = !0, A = !0, o = !0) : A ? (A = !1, o = !0) : M(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, _ = r;
|
|
2190
2190
|
else {
|
|
2191
2191
|
if (a = e.line, s = e.lineStart, l = e.position, !Ge(e, t, Yn, !1, !0))
|
|
2192
2192
|
break;
|
|
2193
2193
|
if (e.line === i) {
|
|
2194
|
-
for (
|
|
2195
|
-
|
|
2196
|
-
if (
|
|
2197
|
-
|
|
2198
|
-
else if (
|
|
2199
|
-
|
|
2194
|
+
for (_ = e.input.charCodeAt(e.position); qe(_); )
|
|
2195
|
+
_ = e.input.charCodeAt(++e.position);
|
|
2196
|
+
if (_ === 58)
|
|
2197
|
+
_ = e.input.charCodeAt(++e.position), be(_) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), A && (Re(e, c, y, f, w, null, a, s, l), f = w = h = null), b = !0, A = !1, o = !1, f = e.tag, w = e.result;
|
|
2198
|
+
else if (b)
|
|
2199
|
+
M(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2200
2200
|
else
|
|
2201
2201
|
return e.tag = u, e.anchor = p, !0;
|
|
2202
|
-
} else if (
|
|
2203
|
-
|
|
2202
|
+
} else if (b)
|
|
2203
|
+
M(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2204
2204
|
else
|
|
2205
2205
|
return e.tag = u, e.anchor = p, !0;
|
|
2206
2206
|
}
|
|
2207
|
-
if ((e.line === i || e.lineIndent > n) && (A && (a = e.line, s = e.lineStart, l = e.position), Ge(e, n, it, !0, o) && (A ?
|
|
2208
|
-
|
|
2207
|
+
if ((e.line === i || e.lineIndent > n) && (A && (a = e.line, s = e.lineStart, l = e.position), Ge(e, n, it, !0, o) && (A ? w = e.result : h = e.result), A || (Re(e, c, y, f, w, h, a, s, l), f = w = h = null), le(e, !0, -1), _ = e.input.charCodeAt(e.position)), (e.line === i || e.lineIndent > n) && _ !== 0)
|
|
2208
|
+
M(e, "bad indentation of a mapping entry");
|
|
2209
2209
|
else if (e.lineIndent < n)
|
|
2210
2210
|
break;
|
|
2211
2211
|
}
|
|
2212
|
-
return A && Re(e, c, y, f,
|
|
2212
|
+
return A && Re(e, c, y, f, w, null, a, s, l), b && (e.tag = u, e.anchor = p, e.kind = "mapping", e.result = c), b;
|
|
2213
2213
|
}
|
|
2214
2214
|
function oi(e) {
|
|
2215
2215
|
var n, t = !1, r = !1, o, i, a;
|
|
2216
2216
|
if (a = e.input.charCodeAt(e.position), a !== 33)
|
|
2217
2217
|
return !1;
|
|
2218
|
-
if (e.tag !== null &&
|
|
2218
|
+
if (e.tag !== null && M(e, "duplication of a tag property"), a = e.input.charCodeAt(++e.position), a === 60 ? (t = !0, a = e.input.charCodeAt(++e.position)) : a === 33 ? (r = !0, o = "!!", a = e.input.charCodeAt(++e.position)) : o = "!", n = e.position, t) {
|
|
2219
2219
|
do
|
|
2220
2220
|
a = e.input.charCodeAt(++e.position);
|
|
2221
2221
|
while (a !== 0 && a !== 62);
|
|
2222
|
-
e.position < e.length ? (i = e.input.slice(n, e.position), a = e.input.charCodeAt(++e.position)) :
|
|
2222
|
+
e.position < e.length ? (i = e.input.slice(n, e.position), a = e.input.charCodeAt(++e.position)) : M(e, "unexpected end of the stream within a verbatim tag");
|
|
2223
2223
|
} else {
|
|
2224
2224
|
for (; a !== 0 && !be(a); )
|
|
2225
|
-
a === 33 && (r ?
|
|
2226
|
-
i = e.input.slice(n, e.position),
|
|
2225
|
+
a === 33 && (r ? M(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(n - 1, e.position + 1), Zn.test(o) || M(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
2226
|
+
i = e.input.slice(n, e.position), Ha.test(i) && M(e, "tag suffix cannot contain flow indicator characters");
|
|
2227
2227
|
}
|
|
2228
|
-
i && !Qn.test(i) &&
|
|
2228
|
+
i && !Qn.test(i) && M(e, "tag name cannot contain such characters: " + i);
|
|
2229
2229
|
try {
|
|
2230
2230
|
i = decodeURIComponent(i);
|
|
2231
2231
|
} catch {
|
|
2232
|
-
|
|
2232
|
+
M(e, "tag name is malformed: " + i);
|
|
2233
2233
|
}
|
|
2234
|
-
return t ? e.tag = i : Fe.call(e.tagMap, o) ? e.tag = e.tagMap[o] + i : o === "!" ? e.tag = "!" + i : o === "!!" ? e.tag = "tag:yaml.org,2002:" + i :
|
|
2234
|
+
return t ? e.tag = i : Fe.call(e.tagMap, o) ? e.tag = e.tagMap[o] + i : o === "!" ? e.tag = "!" + i : o === "!!" ? e.tag = "tag:yaml.org,2002:" + i : M(e, 'undeclared tag handle "' + o + '"'), !0;
|
|
2235
2235
|
}
|
|
2236
2236
|
function ai(e) {
|
|
2237
2237
|
var n, t;
|
|
2238
2238
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2239
2239
|
return !1;
|
|
2240
|
-
for (e.anchor !== null &&
|
|
2240
|
+
for (e.anchor !== null && M(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !be(t) && !Ve(t); )
|
|
2241
2241
|
t = e.input.charCodeAt(++e.position);
|
|
2242
|
-
return e.position === n &&
|
|
2242
|
+
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;
|
|
2243
2243
|
}
|
|
2244
2244
|
function ii(e) {
|
|
2245
2245
|
var n, t, r;
|
|
2246
2246
|
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
2247
2247
|
return !1;
|
|
2248
|
-
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !be(r) && !
|
|
2248
|
+
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !be(r) && !Ve(r); )
|
|
2249
2249
|
r = e.input.charCodeAt(++e.position);
|
|
2250
|
-
return e.position === n &&
|
|
2250
|
+
return e.position === n && M(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), Fe.call(e.anchorMap, t) || M(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], le(e, !0, -1), !0;
|
|
2251
2251
|
}
|
|
2252
2252
|
function Ge(e, n, t, r, o) {
|
|
2253
|
-
var i, a, s, l = 1, u = !1, p = !1, c, y, f,
|
|
2253
|
+
var i, a, s, l = 1, u = !1, p = !1, c, y, f, w, h, A;
|
|
2254
2254
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = a = s = it === t || Wn === t, r && le(e, !0, -1) && (u = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2255
2255
|
for (; oi(e) || ai(e); )
|
|
2256
2256
|
le(e, !0, -1) ? (u = !0, s = i, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2257
|
-
if (s && (s = u || o), (l === 1 || it === t) && (at === t || Yn === t ?
|
|
2257
|
+
if (s && (s = u || o), (l === 1 || it === t) && (at === t || Yn === t ? h = n : h = n + 1, A = e.position - e.lineStart, l === 1 ? s && (nn(e, A) || ri(e, A, h)) || ti(e, h) ? p = !0 : (a && ni(e, h) || Xa(e, h) || ei(e, h) ? p = !0 : ii(e) ? (p = !0, (e.tag !== null || e.anchor !== null) && M(e, "alias node should not have any properties")) : Qa(e, h, at === t) && (p = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (p = s && nn(e, A))), e.tag === null)
|
|
2258
2258
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2259
2259
|
else if (e.tag === "?") {
|
|
2260
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2261
|
-
if (
|
|
2262
|
-
e.result =
|
|
2260
|
+
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)
|
|
2261
|
+
if (w = e.implicitTypes[c], w.resolve(e.result)) {
|
|
2262
|
+
e.result = w.construct(e.result), e.tag = w.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2263
2263
|
break;
|
|
2264
2264
|
}
|
|
2265
2265
|
} else if (e.tag !== "!") {
|
|
2266
2266
|
if (Fe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2267
|
-
|
|
2267
|
+
w = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2268
2268
|
else
|
|
2269
|
-
for (
|
|
2269
|
+
for (w = null, f = e.typeMap.multi[e.kind || "fallback"], c = 0, y = f.length; c < y; c += 1)
|
|
2270
2270
|
if (e.tag.slice(0, f[c].tag.length) === f[c].tag) {
|
|
2271
|
-
|
|
2271
|
+
w = f[c];
|
|
2272
2272
|
break;
|
|
2273
2273
|
}
|
|
2274
|
-
|
|
2274
|
+
w || M(e, "unknown tag !<" + e.tag + ">"), e.result !== null && w.kind !== e.kind && M(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + w.kind + '", not "' + e.kind + '"'), w.resolve(e.result, e.tag) ? (e.result = w.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : M(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2275
2275
|
}
|
|
2276
2276
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || p;
|
|
2277
2277
|
}
|
|
@@ -2280,8 +2280,8 @@ function si(e) {
|
|
|
2280
2280
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (a = e.input.charCodeAt(e.position)) !== 0 && (le(e, !0, -1), a = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || a !== 37)); ) {
|
|
2281
2281
|
for (i = !0, a = e.input.charCodeAt(++e.position), t = e.position; a !== 0 && !be(a); )
|
|
2282
2282
|
a = e.input.charCodeAt(++e.position);
|
|
2283
|
-
for (r = e.input.slice(t, e.position), o = [], r.length < 1 &&
|
|
2284
|
-
for (;
|
|
2283
|
+
for (r = e.input.slice(t, e.position), o = [], r.length < 1 && M(e, "directive name must not be less than one character in length"); a !== 0; ) {
|
|
2284
|
+
for (; qe(a); )
|
|
2285
2285
|
a = e.input.charCodeAt(++e.position);
|
|
2286
2286
|
if (a === 35) {
|
|
2287
2287
|
do
|
|
@@ -2295,14 +2295,14 @@ function si(e) {
|
|
|
2295
2295
|
a = e.input.charCodeAt(++e.position);
|
|
2296
2296
|
o.push(e.input.slice(t, e.position));
|
|
2297
2297
|
}
|
|
2298
|
-
a !== 0 &&
|
|
2298
|
+
a !== 0 && Ot(e), Fe.call(en, r) ? en[r](e, r, o) : st(e, 'unknown document directive "' + r + '"');
|
|
2299
2299
|
}
|
|
2300
|
-
if (le(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, le(e, !0, -1)) : i &&
|
|
2300
|
+
if (le(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, le(e, !0, -1)) : i && M(e, "directives end mark is expected"), Ge(e, e.lineIndent - 1, it, !1, !0), le(e, !0, -1), e.checkLineBreaks && Ga.test(e.input.slice(n, e.position)) && st(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && ft(e)) {
|
|
2301
2301
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, le(e, !0, -1));
|
|
2302
2302
|
return;
|
|
2303
2303
|
}
|
|
2304
2304
|
if (e.position < e.length - 1)
|
|
2305
|
-
|
|
2305
|
+
M(e, "end of the stream or a document separator is expected");
|
|
2306
2306
|
else
|
|
2307
2307
|
return;
|
|
2308
2308
|
}
|
|
@@ -2310,7 +2310,7 @@ function nr(e, n) {
|
|
|
2310
2310
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2311
2311
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2312
2312
|
var t = new Za(e, n), r = e.indexOf("\0");
|
|
2313
|
-
for (r !== -1 && (t.position = r,
|
|
2313
|
+
for (r !== -1 && (t.position = r, M(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2314
2314
|
t.lineIndent += 1, t.position += 1;
|
|
2315
2315
|
for (; t.position < t.length - 1; )
|
|
2316
2316
|
si(t);
|
|
@@ -2335,7 +2335,7 @@ function ui(e, n) {
|
|
|
2335
2335
|
var ci = li, di = ui, rr = {
|
|
2336
2336
|
loadAll: ci,
|
|
2337
2337
|
load: di
|
|
2338
|
-
}, or = Object.prototype.toString, ar = Object.prototype.hasOwnProperty, Ft = 65279, pi = 9,
|
|
2338
|
+
}, or = Object.prototype.toString, ar = Object.prototype.hasOwnProperty, Ft = 65279, pi = 9, Ze = 10, fi = 13, mi = 32, gi = 33, yi = 34, kt = 35, hi = 37, vi = 38, bi = 39, Ci = 42, ir = 44, ki = 45, lt = 58, _i = 61, wi = 62, Ii = 63, Ai = 64, sr = 91, lr = 93, Si = 96, ur = 123, xi = 124, cr = 125, ge = {};
|
|
2339
2339
|
ge[0] = "\\0";
|
|
2340
2340
|
ge[7] = "\\a";
|
|
2341
2341
|
ge[8] = "\\b";
|
|
@@ -2377,7 +2377,7 @@ function ji(e, n) {
|
|
|
2377
2377
|
a = r[o], s = String(n[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), l = e.compiledTypeMap.fallback[a], l && ar.call(l.styleAliases, s) && (s = l.styleAliases[s]), t[a] = s;
|
|
2378
2378
|
return t;
|
|
2379
2379
|
}
|
|
2380
|
-
function
|
|
2380
|
+
function Mi(e) {
|
|
2381
2381
|
var n, t, r;
|
|
2382
2382
|
if (n = e.toString(16).toUpperCase(), e <= 255)
|
|
2383
2383
|
t = "x", r = 2;
|
|
@@ -2389,9 +2389,9 @@ function Oi(e) {
|
|
|
2389
2389
|
throw new ye("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2390
2390
|
return "\\" + t + ue.repeat("0", r - n.length) + n;
|
|
2391
2391
|
}
|
|
2392
|
-
var
|
|
2393
|
-
function
|
|
2394
|
-
this.schema = e.schema ||
|
|
2392
|
+
var Oi = 1, Qe = 2;
|
|
2393
|
+
function Ei(e) {
|
|
2394
|
+
this.schema = e.schema || Mt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ue.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = ji(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? Qe : Oi, 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;
|
|
2395
2395
|
}
|
|
2396
2396
|
function rn(e, n) {
|
|
2397
2397
|
for (var t = ue.repeat(" ", n), r = 0, o = -1, i = "", a, s = e.length; r < s; )
|
|
@@ -2400,7 +2400,7 @@ function rn(e, n) {
|
|
|
2400
2400
|
` && (i += t), i += a;
|
|
2401
2401
|
return i;
|
|
2402
2402
|
}
|
|
2403
|
-
function
|
|
2403
|
+
function _t(e, n) {
|
|
2404
2404
|
return `
|
|
2405
2405
|
` + ue.repeat(" ", e.indent * n);
|
|
2406
2406
|
}
|
|
@@ -2414,11 +2414,11 @@ function Fi(e, n) {
|
|
|
2414
2414
|
function ut(e) {
|
|
2415
2415
|
return e === mi || e === pi;
|
|
2416
2416
|
}
|
|
2417
|
-
function
|
|
2417
|
+
function Xe(e) {
|
|
2418
2418
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Ft || 65536 <= e && e <= 1114111;
|
|
2419
2419
|
}
|
|
2420
2420
|
function on(e) {
|
|
2421
|
-
return
|
|
2421
|
+
return Xe(e) && e !== Ft && e !== fi && e !== Ze;
|
|
2422
2422
|
}
|
|
2423
2423
|
function an(e, n, t) {
|
|
2424
2424
|
var r = on(e), o = r && !ut(e);
|
|
@@ -2430,13 +2430,13 @@ function an(e, n, t) {
|
|
|
2430
2430
|
) : r && e !== ir && e !== sr && e !== lr && e !== ur && e !== cr) && e !== kt && !(n === lt && !o) || on(n) && !ut(n) && e === kt || n === lt && o
|
|
2431
2431
|
);
|
|
2432
2432
|
}
|
|
2433
|
-
function
|
|
2434
|
-
return
|
|
2433
|
+
function Ni(e) {
|
|
2434
|
+
return Xe(e) && e !== Ft && !ut(e) && e !== ki && e !== Ii && e !== lt && e !== ir && e !== sr && e !== lr && e !== ur && e !== cr && e !== kt && e !== vi && e !== Ci && e !== gi && e !== xi && e !== _i && e !== wi && e !== bi && e !== yi && e !== hi && e !== Ai && e !== Si;
|
|
2435
2435
|
}
|
|
2436
2436
|
function Ki(e) {
|
|
2437
2437
|
return !ut(e) && e !== lt;
|
|
2438
2438
|
}
|
|
2439
|
-
function
|
|
2439
|
+
function ze(e, n) {
|
|
2440
2440
|
var t = e.charCodeAt(n), r;
|
|
2441
2441
|
return t >= 55296 && t <= 56319 && n + 1 < e.length && (r = e.charCodeAt(n + 1), r >= 56320 && r <= 57343) ? (t - 55296) * 1024 + r - 56320 + 65536 : t;
|
|
2442
2442
|
}
|
|
@@ -2444,39 +2444,39 @@ function dr(e) {
|
|
|
2444
2444
|
var n = /^\n* /;
|
|
2445
2445
|
return n.test(e);
|
|
2446
2446
|
}
|
|
2447
|
-
var pr = 1,
|
|
2448
|
-
function
|
|
2449
|
-
var l, u = 0, p = null, c = !1, y = !1, f = r !== -1,
|
|
2447
|
+
var pr = 1, wt = 2, fr = 3, mr = 4, De = 5;
|
|
2448
|
+
function qi(e, n, t, r, o, i, a, s) {
|
|
2449
|
+
var l, u = 0, p = null, c = !1, y = !1, f = r !== -1, w = -1, h = Ni(ze(e, 0)) && Ki(ze(e, e.length - 1));
|
|
2450
2450
|
if (n || a)
|
|
2451
2451
|
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2452
|
-
if (u =
|
|
2453
|
-
return
|
|
2454
|
-
|
|
2452
|
+
if (u = ze(e, l), !Xe(u))
|
|
2453
|
+
return De;
|
|
2454
|
+
h = h && an(u, p, s), p = u;
|
|
2455
2455
|
}
|
|
2456
2456
|
else {
|
|
2457
2457
|
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2458
|
-
if (u =
|
|
2458
|
+
if (u = ze(e, l), u === Ze)
|
|
2459
2459
|
c = !0, f && (y = y || // Foldable line = too long, and not more-indented.
|
|
2460
|
-
l -
|
|
2461
|
-
else if (!
|
|
2462
|
-
return
|
|
2463
|
-
|
|
2460
|
+
l - w - 1 > r && e[w + 1] !== " ", w = l);
|
|
2461
|
+
else if (!Xe(u))
|
|
2462
|
+
return De;
|
|
2463
|
+
h = h && an(u, p, s), p = u;
|
|
2464
2464
|
}
|
|
2465
|
-
y = y || f && l -
|
|
2465
|
+
y = y || f && l - w - 1 > r && e[w + 1] !== " ";
|
|
2466
2466
|
}
|
|
2467
|
-
return !c && !y ?
|
|
2467
|
+
return !c && !y ? h && !a && !o(e) ? pr : i === Qe ? De : wt : t > 9 && dr(e) ? De : a ? i === Qe ? De : wt : y ? mr : fr;
|
|
2468
2468
|
}
|
|
2469
|
-
function
|
|
2469
|
+
function Bi(e, n, t, r, o) {
|
|
2470
2470
|
e.dump = function() {
|
|
2471
2471
|
if (n.length === 0)
|
|
2472
|
-
return e.quotingType ===
|
|
2472
|
+
return e.quotingType === Qe ? '""' : "''";
|
|
2473
2473
|
if (!e.noCompatMode && (Ti.indexOf(n) !== -1 || $i.test(n)))
|
|
2474
|
-
return e.quotingType ===
|
|
2474
|
+
return e.quotingType === Qe ? '"' + n + '"' : "'" + n + "'";
|
|
2475
2475
|
var i = e.indent * Math.max(1, t), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - i), s = r || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2476
2476
|
function l(u) {
|
|
2477
2477
|
return Fi(e, u);
|
|
2478
2478
|
}
|
|
2479
|
-
switch (
|
|
2479
|
+
switch (qi(
|
|
2480
2480
|
n,
|
|
2481
2481
|
s,
|
|
2482
2482
|
e.indent,
|
|
@@ -2488,14 +2488,14 @@ function qi(e, n, t, r, o) {
|
|
|
2488
2488
|
)) {
|
|
2489
2489
|
case pr:
|
|
2490
2490
|
return n;
|
|
2491
|
-
case
|
|
2491
|
+
case wt:
|
|
2492
2492
|
return "'" + n.replace(/'/g, "''") + "'";
|
|
2493
2493
|
case fr:
|
|
2494
2494
|
return "|" + sn(n, e.indent) + ln(rn(n, i));
|
|
2495
2495
|
case mr:
|
|
2496
|
-
return ">" + sn(n, e.indent) + ln(rn(
|
|
2497
|
-
case
|
|
2498
|
-
return '"' +
|
|
2496
|
+
return ">" + sn(n, e.indent) + ln(rn(Li(n, a), i));
|
|
2497
|
+
case De:
|
|
2498
|
+
return '"' + Ui(n) + '"';
|
|
2499
2499
|
default:
|
|
2500
2500
|
throw new ye("impossible error: invalid scalar style");
|
|
2501
2501
|
}
|
|
@@ -2513,7 +2513,7 @@ function ln(e) {
|
|
|
2513
2513
|
return e[e.length - 1] === `
|
|
2514
2514
|
` ? e.slice(0, -1) : e;
|
|
2515
2515
|
}
|
|
2516
|
-
function
|
|
2516
|
+
function Li(e, n) {
|
|
2517
2517
|
for (var t = /(\n+)([^\n]*)/g, r = function() {
|
|
2518
2518
|
var u = e.indexOf(`
|
|
2519
2519
|
`);
|
|
@@ -2536,12 +2536,12 @@ function un(e, n) {
|
|
|
2536
2536
|
`, e.length - o > n && a > o ? l += e.slice(o, a) + `
|
|
2537
2537
|
` + e.slice(a + 1) : l += e.slice(o), l.slice(1);
|
|
2538
2538
|
}
|
|
2539
|
-
function
|
|
2539
|
+
function Ui(e) {
|
|
2540
2540
|
for (var n = "", t = 0, r, o = 0; o < e.length; t >= 65536 ? o += 2 : o++)
|
|
2541
|
-
t =
|
|
2541
|
+
t = ze(e, o), r = ge[t], !r && Xe(t) ? (n += e[o], t >= 65536 && (n += e[o + 1])) : n += r || Mi(t);
|
|
2542
2542
|
return n;
|
|
2543
2543
|
}
|
|
2544
|
-
function
|
|
2544
|
+
function Pi(e, n, t) {
|
|
2545
2545
|
var r = "", o = e.tag, i, a, s;
|
|
2546
2546
|
for (i = 0, a = t.length; i < a; i += 1)
|
|
2547
2547
|
s = t[i], e.replacer && (s = e.replacer.call(t, String(i), s)), ($e(e, n, s, !1, !1) || typeof s > "u" && $e(e, n, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
@@ -2550,16 +2550,16 @@ function Li(e, n, t) {
|
|
|
2550
2550
|
function cn(e, n, t, r) {
|
|
2551
2551
|
var o = "", i = e.tag, a, s, l;
|
|
2552
2552
|
for (a = 0, s = t.length; a < s; a += 1)
|
|
2553
|
-
l = t[a], e.replacer && (l = e.replacer.call(t, String(a), l)), ($e(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && $e(e, n + 1, null, !0, !0, !1, !0)) && ((!r || o !== "") && (o +=
|
|
2553
|
+
l = t[a], e.replacer && (l = e.replacer.call(t, String(a), l)), ($e(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && $e(e, n + 1, null, !0, !0, !1, !0)) && ((!r || o !== "") && (o += _t(e, n)), e.dump && Ze === e.dump.charCodeAt(0) ? o += "-" : o += "- ", o += e.dump);
|
|
2554
2554
|
e.tag = i, e.dump = o || "[]";
|
|
2555
2555
|
}
|
|
2556
|
-
function
|
|
2556
|
+
function Di(e, n, t) {
|
|
2557
2557
|
var r = "", o = e.tag, i = Object.keys(t), a, s, l, u, p;
|
|
2558
2558
|
for (a = 0, s = i.length; a < s; a += 1)
|
|
2559
2559
|
p = "", r !== "" && (p += ", "), e.condenseFlow && (p += '"'), l = i[a], u = t[l], e.replacer && (u = e.replacer.call(t, l, u)), $e(e, n, l, !1, !1) && (e.dump.length > 1024 && (p += "? "), p += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), $e(e, n, u, !1, !1) && (p += e.dump, r += p));
|
|
2560
2560
|
e.tag = o, e.dump = "{" + r + "}";
|
|
2561
2561
|
}
|
|
2562
|
-
function
|
|
2562
|
+
function Vi(e, n, t, r) {
|
|
2563
2563
|
var o = "", i = e.tag, a = Object.keys(t), s, l, u, p, c, y;
|
|
2564
2564
|
if (e.sortKeys === !0)
|
|
2565
2565
|
a.sort();
|
|
@@ -2568,7 +2568,7 @@ function Di(e, n, t, r) {
|
|
|
2568
2568
|
else if (e.sortKeys)
|
|
2569
2569
|
throw new ye("sortKeys must be a boolean or a function");
|
|
2570
2570
|
for (s = 0, l = a.length; s < l; s += 1)
|
|
2571
|
-
y = "", (!r || o !== "") && (y +=
|
|
2571
|
+
y = "", (!r || o !== "") && (y += _t(e, n)), u = a[s], p = t[u], e.replacer && (p = e.replacer.call(t, u, p)), $e(e, n + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Ze === e.dump.charCodeAt(0) ? y += "?" : y += "? "), y += e.dump, c && (y += _t(e, n)), $e(e, n + 1, p, !0, c) && (e.dump && Ze === e.dump.charCodeAt(0) ? y += ":" : y += ": ", y += e.dump, o += y));
|
|
2572
2572
|
e.tag = i, e.dump = o || "{}";
|
|
2573
2573
|
}
|
|
2574
2574
|
function dn(e, n, t) {
|
|
@@ -2597,11 +2597,11 @@ function $e(e, n, t, r, o, i, a) {
|
|
|
2597
2597
|
e.dump = "*ref_" + c;
|
|
2598
2598
|
else {
|
|
2599
2599
|
if (p && y && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), s === "[object Object]")
|
|
2600
|
-
r && Object.keys(e.dump).length !== 0 ? (
|
|
2600
|
+
r && Object.keys(e.dump).length !== 0 ? (Vi(e, n, e.dump, o), y && (e.dump = "&ref_" + c + e.dump)) : (Di(e, n, e.dump), y && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2601
2601
|
else if (s === "[object Array]")
|
|
2602
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !a && n > 0 ? cn(e, n - 1, e.dump, o) : cn(e, n, e.dump, o), y && (e.dump = "&ref_" + c + e.dump)) : (
|
|
2602
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !a && n > 0 ? cn(e, n - 1, e.dump, o) : cn(e, n, e.dump, o), y && (e.dump = "&ref_" + c + e.dump)) : (Pi(e, n, e.dump), y && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2603
2603
|
else if (s === "[object String]")
|
|
2604
|
-
e.tag !== "?" &&
|
|
2604
|
+
e.tag !== "?" && Bi(e, e.dump, n, i, l);
|
|
2605
2605
|
else {
|
|
2606
2606
|
if (s === "[object Undefined]" || e.skipInvalid)
|
|
2607
2607
|
return !1;
|
|
@@ -2633,35 +2633,35 @@ function It(e, n, t) {
|
|
|
2633
2633
|
}
|
|
2634
2634
|
function Gi(e, n) {
|
|
2635
2635
|
n = n || {};
|
|
2636
|
-
var t = new
|
|
2636
|
+
var t = new Ei(n);
|
|
2637
2637
|
t.noRefs || Ri(e, t);
|
|
2638
2638
|
var r = e;
|
|
2639
2639
|
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), $e(t, 0, r, !0, !0) ? t.dump + `
|
|
2640
2640
|
` : "";
|
|
2641
2641
|
}
|
|
2642
|
-
var
|
|
2643
|
-
dump:
|
|
2642
|
+
var Hi = Gi, zi = {
|
|
2643
|
+
dump: Hi
|
|
2644
2644
|
};
|
|
2645
|
-
function
|
|
2645
|
+
function Nt(e, n) {
|
|
2646
2646
|
return function() {
|
|
2647
2647
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2648
2648
|
};
|
|
2649
2649
|
}
|
|
2650
|
-
var Ji = pe, Yi = jn, Wi = Fn, Zi =
|
|
2650
|
+
var Ji = pe, Yi = jn, Wi = Fn, Zi = Ln, Qi = Un, Xi = Mt, es = rr.load, ts = rr.loadAll, ns = zi.dump, rs = ye, os = {
|
|
2651
2651
|
binary: Gn,
|
|
2652
|
-
float:
|
|
2653
|
-
map:
|
|
2654
|
-
null:
|
|
2655
|
-
pairs:
|
|
2652
|
+
float: Bn,
|
|
2653
|
+
map: En,
|
|
2654
|
+
null: Nn,
|
|
2655
|
+
pairs: zn,
|
|
2656
2656
|
set: Jn,
|
|
2657
|
-
timestamp:
|
|
2657
|
+
timestamp: Vn,
|
|
2658
2658
|
bool: Kn,
|
|
2659
|
-
int:
|
|
2659
|
+
int: qn,
|
|
2660
2660
|
merge: Rn,
|
|
2661
|
-
omap:
|
|
2662
|
-
seq:
|
|
2663
|
-
str:
|
|
2664
|
-
}, as =
|
|
2661
|
+
omap: Hn,
|
|
2662
|
+
seq: On,
|
|
2663
|
+
str: Mn
|
|
2664
|
+
}, as = Nt("safeLoad", "load"), is = Nt("safeLoadAll", "loadAll"), ss = Nt("safeDump", "dump"), ls = {
|
|
2665
2665
|
Type: Ji,
|
|
2666
2666
|
Schema: Yi,
|
|
2667
2667
|
FAILSAFE_SCHEMA: Wi,
|
|
@@ -2690,8 +2690,8 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
2690
2690
|
const n = e, t = ot(n.yamlRecord);
|
|
2691
2691
|
return (r, o) => {
|
|
2692
2692
|
const i = q("KCodeBlock");
|
|
2693
|
-
return d(),
|
|
2694
|
-
n.yamlRecord ? (d(),
|
|
2693
|
+
return d(), j("div", us, [
|
|
2694
|
+
n.yamlRecord ? (d(), P(i, {
|
|
2695
2695
|
key: 0,
|
|
2696
2696
|
id: "yaml-codeblock",
|
|
2697
2697
|
code: m(ls).dump(t),
|
|
@@ -2752,23 +2752,23 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
2752
2752
|
const a = JSON.parse(JSON.stringify(n.record));
|
|
2753
2753
|
return delete a.created_at, delete a.updated_at, a;
|
|
2754
2754
|
});
|
|
2755
|
-
return (a, s) => (d(),
|
|
2756
|
-
e.format === "structured" ? (d(),
|
|
2757
|
-
(d(!0),
|
|
2755
|
+
return (a, s) => (d(), j(Ce, null, [
|
|
2756
|
+
e.format === "structured" ? (d(), j("div", cs, [
|
|
2757
|
+
(d(!0), j(Ce, null, ve(e.propListTypes, (l) => (d(), j("div", {
|
|
2758
2758
|
key: `config-card-details-${l}-props`,
|
|
2759
|
-
class:
|
|
2759
|
+
class: Ee(`config-card-details-${l}-props`),
|
|
2760
2760
|
"data-testid": `config-card-details-${l}-props`
|
|
2761
2761
|
}, [
|
|
2762
|
-
l !== "basic" ? (d(),
|
|
2763
|
-
(d(!0),
|
|
2762
|
+
l !== "basic" ? (d(), j("div", ps, N(l === "advanced" ? m(r)("baseConfigCard.sections.advanced") : m(r)("baseConfigCard.sections.plugin")), 1)) : z("", !0),
|
|
2763
|
+
(d(!0), j(Ce, null, ve(e.propertyCollections[l], (u) => (d(), P($t, {
|
|
2764
2764
|
key: u.key,
|
|
2765
2765
|
item: u
|
|
2766
2766
|
}, je({
|
|
2767
2767
|
label: g(() => [
|
|
2768
|
-
|
|
2768
|
+
X(a.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2769
2769
|
]),
|
|
2770
2770
|
[u.key]: g(({ rowValue: p }) => [
|
|
2771
|
-
|
|
2771
|
+
X(a.$slots, u.key, {
|
|
2772
2772
|
row: u,
|
|
2773
2773
|
rowValue: p
|
|
2774
2774
|
}, void 0, !0)
|
|
@@ -2778,27 +2778,27 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
2778
2778
|
o(u) ? {
|
|
2779
2779
|
name: "label-tooltip",
|
|
2780
2780
|
fn: g(() => [
|
|
2781
|
-
|
|
2781
|
+
X(a.$slots, `${u.key}-label-tooltip`, { row: u }, void 0, !0)
|
|
2782
2782
|
]),
|
|
2783
2783
|
key: "0"
|
|
2784
2784
|
} : void 0
|
|
2785
2785
|
]), 1032, ["item"]))), 128))
|
|
2786
2786
|
], 10, ds))), 128))
|
|
2787
2787
|
])) : z("", !0),
|
|
2788
|
-
e.format === "json" && n.record ? (d(),
|
|
2788
|
+
e.format === "json" && n.record ? (d(), P(xn, {
|
|
2789
2789
|
key: 1,
|
|
2790
2790
|
config: n.config,
|
|
2791
2791
|
"fetcher-url": n.fetcherUrl,
|
|
2792
2792
|
"json-record": i.value,
|
|
2793
2793
|
"request-method": "get"
|
|
2794
2794
|
}, null, 8, ["config", "fetcher-url", "json-record"])) : z("", !0),
|
|
2795
|
-
e.format === "yaml" && n.record ? (d(),
|
|
2795
|
+
e.format === "yaml" && n.record ? (d(), P(gr, {
|
|
2796
2796
|
key: 2,
|
|
2797
2797
|
"yaml-record": i.value
|
|
2798
2798
|
}, null, 8, ["yaml-record"])) : z("", !0)
|
|
2799
2799
|
], 64));
|
|
2800
2800
|
}
|
|
2801
|
-
}), ms = /* @__PURE__ */
|
|
2801
|
+
}), ms = /* @__PURE__ */ _e(fs, [["__scopeId", "data-v-2b74ac63"]]), pn = "24px", gs = (e, n) => {
|
|
2802
2802
|
const t = e.__vccOpts || e;
|
|
2803
2803
|
for (const [r, o] of n)
|
|
2804
2804
|
t[r] = o;
|
|
@@ -2878,14 +2878,14 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
2878
2878
|
lineHeight: "0",
|
|
2879
2879
|
width: t.value
|
|
2880
2880
|
}));
|
|
2881
|
-
return (o, i) => (d(),
|
|
2881
|
+
return (o, i) => (d(), P(Be(e.as), {
|
|
2882
2882
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2883
2883
|
class: "kui-icon book-icon",
|
|
2884
2884
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2885
2885
|
style: yn(r.value)
|
|
2886
2886
|
}, {
|
|
2887
2887
|
default: g(() => [
|
|
2888
|
-
(d(),
|
|
2888
|
+
(d(), j("svg", {
|
|
2889
2889
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2890
2890
|
"data-testid": "kui-icon-svg-book-icon",
|
|
2891
2891
|
fill: "none",
|
|
@@ -2895,20 +2895,20 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
2895
2895
|
width: "100%",
|
|
2896
2896
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2897
2897
|
}, [
|
|
2898
|
-
e.title ? (d(),
|
|
2898
|
+
e.title ? (d(), j("title", vs, N(e.title), 1)) : z("", !0),
|
|
2899
2899
|
bs
|
|
2900
2900
|
], 8, hs))
|
|
2901
2901
|
]),
|
|
2902
2902
|
_: 1
|
|
2903
2903
|
}, 8, ["aria-hidden", "style"]));
|
|
2904
2904
|
}
|
|
2905
|
-
}), ks = /* @__PURE__ */ gs(Cs, [["__scopeId", "data-v-84d5ee61"]]),
|
|
2905
|
+
}), ks = /* @__PURE__ */ gs(Cs, [["__scopeId", "data-v-84d5ee61"]]), _s = { "data-testid": "config-card-title" }, ws = { class: "config-card-actions" }, Is = ["href"], As = {
|
|
2906
2906
|
key: 2,
|
|
2907
2907
|
class: "config-card-details-section"
|
|
2908
|
-
},
|
|
2908
|
+
}, Ss = {
|
|
2909
2909
|
key: 3,
|
|
2910
2910
|
class: "config-card-details-section"
|
|
2911
|
-
},
|
|
2911
|
+
}, xs = ["data-testid"], Ts = {
|
|
2912
2912
|
key: 0,
|
|
2913
2913
|
class: "config-card-prop-section-title"
|
|
2914
2914
|
}, $s = /* @__PURE__ */ ae({
|
|
@@ -3002,8 +3002,8 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3002
3002
|
label: "YAML",
|
|
3003
3003
|
value: "yaml"
|
|
3004
3004
|
}
|
|
3005
|
-
], c = F("structured"), y = (
|
|
3006
|
-
c.value =
|
|
3005
|
+
], c = F("structured"), y = (C) => {
|
|
3006
|
+
c.value = C == null ? void 0 : C.value;
|
|
3007
3007
|
}, f = {
|
|
3008
3008
|
id: {
|
|
3009
3009
|
type: oe.ID,
|
|
@@ -3038,119 +3038,119 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3038
3038
|
// the last property displayed
|
|
3039
3039
|
section: ke.Basic
|
|
3040
3040
|
}
|
|
3041
|
-
},
|
|
3042
|
-
var
|
|
3043
|
-
if (!
|
|
3041
|
+
}, w = F(!1), h = F(!1), A = F(""), b = F({}), _ = x(() => {
|
|
3042
|
+
var C, G, K;
|
|
3043
|
+
if (!b.value)
|
|
3044
3044
|
return [];
|
|
3045
|
-
const I = [],
|
|
3046
|
-
for (const O in
|
|
3047
|
-
const
|
|
3048
|
-
let
|
|
3049
|
-
(W || W === 0) && (
|
|
3045
|
+
const I = [], T = Object.keys(b.value).length;
|
|
3046
|
+
for (const O in b.value) {
|
|
3047
|
+
const B = (G = (C = o.configSchema) == null ? void 0 : C[O]) == null ? void 0 : G.order, W = (K = f[O]) == null ? void 0 : K.order;
|
|
3048
|
+
let ee = T;
|
|
3049
|
+
(W || W === 0) && (ee = W === -1 ? T + 1 : W), B && (ee = B === -1 ? T + 1 : B), I.push([O, ee]);
|
|
3050
3050
|
}
|
|
3051
|
-
return I.sort(function(O,
|
|
3052
|
-
return O[1] -
|
|
3051
|
+
return I.sort(function(O, B) {
|
|
3052
|
+
return O[1] - B[1];
|
|
3053
3053
|
}), I.map((O) => {
|
|
3054
|
-
var
|
|
3055
|
-
const
|
|
3054
|
+
var B, W;
|
|
3055
|
+
const ee = O[0], te = (B = b.value) == null ? void 0 : B[ee], ne = ((W = o.configSchema) == null ? void 0 : W[ee]) || {}, de = f[ee];
|
|
3056
3056
|
return {
|
|
3057
|
-
key:
|
|
3058
|
-
value:
|
|
3059
|
-
hidden:
|
|
3060
|
-
type:
|
|
3061
|
-
label:
|
|
3062
|
-
tooltip:
|
|
3063
|
-
section:
|
|
3057
|
+
key: ee,
|
|
3058
|
+
value: te,
|
|
3059
|
+
hidden: ne.hidden || !1,
|
|
3060
|
+
type: ne.type ?? ((de == null ? void 0 : de.type) || oe.Text),
|
|
3061
|
+
label: ne.label ?? ((de == null ? void 0 : de.label) || l(ee)),
|
|
3062
|
+
tooltip: ne.tooltip ?? ((de == null ? void 0 : de.tooltip) || void 0),
|
|
3063
|
+
section: ne.section ?? ((de == null ? void 0 : de.section) || ke.Advanced)
|
|
3064
3064
|
};
|
|
3065
3065
|
}).filter((O) => !O.hidden && O.key !== o.pluginConfigKey);
|
|
3066
|
-
}),
|
|
3067
|
-
var
|
|
3068
|
-
if (!
|
|
3066
|
+
}), L = x(() => {
|
|
3067
|
+
var C, G;
|
|
3068
|
+
if (!b.value || !o.pluginConfigKey)
|
|
3069
3069
|
return [];
|
|
3070
|
-
const
|
|
3071
|
-
for (const O in
|
|
3072
|
-
const
|
|
3073
|
-
let
|
|
3074
|
-
|
|
3070
|
+
const K = b.value[o.pluginConfigKey] || {}, I = Object.keys(K).length, T = [];
|
|
3071
|
+
for (const O in K) {
|
|
3072
|
+
const B = (G = (C = o.pluginConfigSchema) == null ? void 0 : C[O]) == null ? void 0 : G.order, W = K[O];
|
|
3073
|
+
let ee = W != null && W !== "" ? I - 1 : I;
|
|
3074
|
+
B && (ee = B === -1 ? I + 1 : B), T.push([O, ee]);
|
|
3075
3075
|
}
|
|
3076
|
-
return
|
|
3077
|
-
return O[1] -
|
|
3078
|
-
}),
|
|
3079
|
-
var
|
|
3080
|
-
const W = O[0],
|
|
3076
|
+
return T.sort(function(O, B) {
|
|
3077
|
+
return O[1] - B[1];
|
|
3078
|
+
}), T.map((O) => {
|
|
3079
|
+
var B;
|
|
3080
|
+
const W = O[0], ee = K[W], te = ((B = o.pluginConfigSchema) == null ? void 0 : B[W]) || {};
|
|
3081
3081
|
return {
|
|
3082
3082
|
key: W,
|
|
3083
|
-
value:
|
|
3084
|
-
hidden:
|
|
3085
|
-
type:
|
|
3086
|
-
label:
|
|
3087
|
-
tooltip:
|
|
3083
|
+
value: ee,
|
|
3084
|
+
hidden: te.hidden || !1,
|
|
3085
|
+
type: te.type ?? oe.Text,
|
|
3086
|
+
label: te.label ?? l(W),
|
|
3087
|
+
tooltip: te.tooltip ?? void 0,
|
|
3088
3088
|
section: ke.Plugin
|
|
3089
3089
|
};
|
|
3090
3090
|
}).filter((O) => !O.hidden);
|
|
3091
|
-
}),
|
|
3092
|
-
var
|
|
3091
|
+
}), v = x(() => {
|
|
3092
|
+
var C, G, K, I;
|
|
3093
3093
|
return {
|
|
3094
|
-
basic: (
|
|
3095
|
-
advanced: (
|
|
3096
|
-
plugin: (I =
|
|
3094
|
+
basic: (C = _.value) == null ? void 0 : C.filter((T) => T.section === ke.Basic),
|
|
3095
|
+
advanced: (G = _.value) == null ? void 0 : G.filter((T) => T.section === ke.Advanced),
|
|
3096
|
+
plugin: (I = L.value) == null ? void 0 : I.concat((K = _.value) == null ? void 0 : K.filter((T) => T.section === ke.Plugin))
|
|
3097
3097
|
};
|
|
3098
|
-
}),
|
|
3099
|
-
const
|
|
3100
|
-
return
|
|
3101
|
-
}),
|
|
3102
|
-
var
|
|
3103
|
-
let
|
|
3104
|
-
return o.config.app === "konnect" ?
|
|
3105
|
-
}),
|
|
3106
|
-
|
|
3098
|
+
}), S = x(() => {
|
|
3099
|
+
const C = [];
|
|
3100
|
+
return v.value.basic.length && C.push("basic"), v.value.advanced.length && C.push("advanced"), v.value.plugin.length && C.push("plugin"), C;
|
|
3101
|
+
}), D = (C) => !!(C.tooltip || i[`${C.key}-label-tooltip`]), re = x(() => {
|
|
3102
|
+
var C, G;
|
|
3103
|
+
let K = `${o.config.apiBaseUrl}${o.fetchUrl}`;
|
|
3104
|
+
return o.config.app === "konnect" ? K = K.replace(/{controlPlaneId}/gi, ((C = o.config) == null ? void 0 : C.controlPlaneId) || "") : o.config.app === "kongManager" && (K = K.replace(/\/{workspace}/gi, (G = o.config) != null && G.workspace ? `/${o.config.workspace}` : "")), K = K.replace(/{id}/gi, o.config.entityId), K;
|
|
3105
|
+
}), R = (C) => {
|
|
3106
|
+
b.value && C(JSON.stringify(b.value)) ? r("copy:success", b.value) : r("copy:error");
|
|
3107
3107
|
};
|
|
3108
|
-
return Te(
|
|
3109
|
-
r("loading",
|
|
3108
|
+
return Te(w, (C) => {
|
|
3109
|
+
r("loading", C);
|
|
3110
3110
|
}, { immediate: !0 }), dt(async () => {
|
|
3111
|
-
|
|
3111
|
+
h.value = !1, w.value = !0;
|
|
3112
3112
|
try {
|
|
3113
|
-
const { data:
|
|
3113
|
+
const { data: C } = await u.get(re.value);
|
|
3114
3114
|
if (o.dataKey)
|
|
3115
|
-
if (typeof
|
|
3116
|
-
|
|
3115
|
+
if (typeof C[o.dataKey] < "u")
|
|
3116
|
+
b.value = { ...C[o.dataKey] };
|
|
3117
3117
|
else
|
|
3118
3118
|
throw new Error(a("errors.dataKeyUndefined", { dataKey: o.dataKey }));
|
|
3119
3119
|
else
|
|
3120
|
-
|
|
3121
|
-
Object.keys(o.configSchema).filter((
|
|
3122
|
-
|
|
3123
|
-
}), r("fetch:success",
|
|
3124
|
-
} catch (
|
|
3125
|
-
const
|
|
3126
|
-
A.value =
|
|
3120
|
+
b.value = { ...C };
|
|
3121
|
+
Object.keys(o.configSchema).filter((G) => o.configSchema[G].forceShow).forEach((G) => {
|
|
3122
|
+
b.value && typeof b.value[G] > "u" && (b.value[G] = null);
|
|
3123
|
+
}), r("fetch:success", C);
|
|
3124
|
+
} catch (C) {
|
|
3125
|
+
const G = s(C);
|
|
3126
|
+
A.value = G.startsWith("code") ? a("baseConfigCard.errors.load") : G, h.value = !0, r("fetch:error", C);
|
|
3127
3127
|
} finally {
|
|
3128
|
-
|
|
3128
|
+
w.value = !1;
|
|
3129
3129
|
}
|
|
3130
|
-
}), (
|
|
3131
|
-
const
|
|
3132
|
-
return d(),
|
|
3130
|
+
}), (C, G) => {
|
|
3131
|
+
const K = q("KLabel"), I = q("KSelect"), T = q("KButton"), O = q("KClipboardProvider"), B = q("KSkeleton"), W = q("KEmptyState"), ee = q("KCard");
|
|
3132
|
+
return d(), P(ee, { class: "kong-ui-entity-base-config-card" }, je({
|
|
3133
3133
|
actions: g(() => [
|
|
3134
|
-
V("div",
|
|
3135
|
-
|
|
3136
|
-
e.config.jsonYamlEnabled ? (d(),
|
|
3134
|
+
V("div", ws, [
|
|
3135
|
+
X(C.$slots, "actions", {}, void 0, !0),
|
|
3136
|
+
e.config.jsonYamlEnabled ? (d(), P(K, {
|
|
3137
3137
|
key: 0,
|
|
3138
3138
|
class: "config-format-select-label",
|
|
3139
3139
|
"data-testid": "config-format-select-label"
|
|
3140
3140
|
}, {
|
|
3141
3141
|
default: g(() => [
|
|
3142
|
-
Z(
|
|
3142
|
+
Z(N(e.label), 1)
|
|
3143
3143
|
]),
|
|
3144
3144
|
_: 1
|
|
3145
3145
|
})) : z("", !0),
|
|
3146
|
-
e.config.jsonYamlEnabled ? (d(),
|
|
3146
|
+
e.config.jsonYamlEnabled ? (d(), P(I, {
|
|
3147
3147
|
key: 1,
|
|
3148
3148
|
appearance: "select",
|
|
3149
3149
|
"data-testid": "select-config-format",
|
|
3150
3150
|
items: p,
|
|
3151
3151
|
onChange: y
|
|
3152
3152
|
})) : z("", !0),
|
|
3153
|
-
o.config.jsonYamlEnabled && e.configCardDoc ? (d(),
|
|
3153
|
+
o.config.jsonYamlEnabled && e.configCardDoc ? (d(), P(T, {
|
|
3154
3154
|
key: 2,
|
|
3155
3155
|
appearance: "tertiary",
|
|
3156
3156
|
class: "book-icon",
|
|
@@ -3167,16 +3167,16 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3167
3167
|
]),
|
|
3168
3168
|
_: 1
|
|
3169
3169
|
})) : z("", !0),
|
|
3170
|
-
e.config.jsonYamlEnabled ? z("", !0) : (d(),
|
|
3171
|
-
default: g(({ copyToClipboard:
|
|
3172
|
-
!
|
|
3170
|
+
e.config.jsonYamlEnabled ? z("", !0) : (d(), P(O, { key: 3 }, {
|
|
3171
|
+
default: g(({ copyToClipboard: te }) => [
|
|
3172
|
+
!w.value && !h.value ? (d(), P(T, {
|
|
3173
3173
|
key: 0,
|
|
3174
3174
|
appearance: "tertiary",
|
|
3175
3175
|
"data-testid": "json-copy-button",
|
|
3176
|
-
onClick: (
|
|
3176
|
+
onClick: (ne) => R(te)
|
|
3177
3177
|
}, {
|
|
3178
3178
|
default: g(() => [
|
|
3179
|
-
Z(
|
|
3179
|
+
Z(N(m(a)("baseConfigCard.actions.copy")), 1)
|
|
3180
3180
|
]),
|
|
3181
3181
|
_: 2
|
|
3182
3182
|
}, 1032, ["onClick"])) : z("", !0)
|
|
@@ -3186,71 +3186,71 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3186
3186
|
])
|
|
3187
3187
|
]),
|
|
3188
3188
|
default: g(() => [
|
|
3189
|
-
|
|
3189
|
+
w.value ? (d(), P(B, {
|
|
3190
3190
|
key: 0,
|
|
3191
3191
|
"data-testid": "config-card-loader",
|
|
3192
3192
|
"table-columns": 2,
|
|
3193
3193
|
type: "table"
|
|
3194
|
-
})) :
|
|
3194
|
+
})) : h.value ? (d(), P(W, {
|
|
3195
3195
|
key: 1,
|
|
3196
3196
|
"data-testid": "config-card-fetch-error",
|
|
3197
3197
|
"is-error": ""
|
|
3198
3198
|
}, {
|
|
3199
3199
|
message: g(() => [
|
|
3200
|
-
V("h3", null,
|
|
3200
|
+
V("h3", null, N(A.value), 1)
|
|
3201
3201
|
]),
|
|
3202
3202
|
_: 1
|
|
3203
3203
|
})) : z("", !0),
|
|
3204
|
-
e.config.jsonYamlEnabled ? (d(),
|
|
3204
|
+
e.config.jsonYamlEnabled ? (d(), j("div", As, [
|
|
3205
3205
|
E(ms, {
|
|
3206
3206
|
config: e.config,
|
|
3207
|
-
"fetcher-url":
|
|
3207
|
+
"fetcher-url": re.value,
|
|
3208
3208
|
format: c.value,
|
|
3209
|
-
"prop-list-types":
|
|
3210
|
-
"property-collections":
|
|
3211
|
-
record:
|
|
3209
|
+
"prop-list-types": S.value,
|
|
3210
|
+
"property-collections": v.value,
|
|
3211
|
+
record: b.value
|
|
3212
3212
|
}, je({ _: 2 }, [
|
|
3213
|
-
ve(Object.keys(
|
|
3214
|
-
name:
|
|
3215
|
-
fn: g(({ row:
|
|
3216
|
-
|
|
3217
|
-
row:
|
|
3213
|
+
ve(Object.keys(C.$slots), (te) => ({
|
|
3214
|
+
name: te,
|
|
3215
|
+
fn: g(({ row: ne, rowValue: de }) => [
|
|
3216
|
+
X(C.$slots, te, {
|
|
3217
|
+
row: ne,
|
|
3218
3218
|
rowValue: de
|
|
3219
3219
|
}, void 0, !0)
|
|
3220
3220
|
])
|
|
3221
3221
|
}))
|
|
3222
3222
|
]), 1032, ["config", "fetcher-url", "format", "prop-list-types", "property-collections", "record"])
|
|
3223
|
-
])) : (d(),
|
|
3224
|
-
(d(!0),
|
|
3225
|
-
key: `config-card-details-${
|
|
3226
|
-
class:
|
|
3227
|
-
"data-testid": `config-card-details-${
|
|
3223
|
+
])) : (d(), j("div", Ss, [
|
|
3224
|
+
(d(!0), j(Ce, null, ve(S.value, (te) => (d(), j("div", {
|
|
3225
|
+
key: `config-card-details-${te}-props`,
|
|
3226
|
+
class: Ee(`config-card-details-${te}-props`),
|
|
3227
|
+
"data-testid": `config-card-details-${te}-props`
|
|
3228
3228
|
}, [
|
|
3229
|
-
|
|
3230
|
-
(d(!0),
|
|
3231
|
-
key:
|
|
3232
|
-
item:
|
|
3229
|
+
te !== "basic" ? (d(), j("div", Ts, N(te === "advanced" ? m(a)("baseConfigCard.sections.advanced") : m(a)("baseConfigCard.sections.plugin")), 1)) : z("", !0),
|
|
3230
|
+
(d(!0), j(Ce, null, ve(v.value[te], (ne) => (d(), P($t, {
|
|
3231
|
+
key: ne.key,
|
|
3232
|
+
item: ne
|
|
3233
3233
|
}, je({
|
|
3234
3234
|
label: g(() => [
|
|
3235
|
-
|
|
3235
|
+
X(C.$slots, `${ne.key}-label`, { row: ne }, void 0, !0)
|
|
3236
3236
|
]),
|
|
3237
|
-
[
|
|
3238
|
-
|
|
3239
|
-
row:
|
|
3237
|
+
[ne.key]: g(({ rowValue: de }) => [
|
|
3238
|
+
X(C.$slots, ne.key, {
|
|
3239
|
+
row: ne,
|
|
3240
3240
|
rowValue: de
|
|
3241
3241
|
}, void 0, !0)
|
|
3242
3242
|
]),
|
|
3243
3243
|
_: 2
|
|
3244
3244
|
}, [
|
|
3245
|
-
|
|
3245
|
+
D(ne) ? {
|
|
3246
3246
|
name: "label-tooltip",
|
|
3247
3247
|
fn: g(() => [
|
|
3248
|
-
|
|
3248
|
+
X(C.$slots, `${ne.key}-label-tooltip`, { row: ne }, void 0, !0)
|
|
3249
3249
|
]),
|
|
3250
3250
|
key: "0"
|
|
3251
3251
|
} : void 0
|
|
3252
3252
|
]), 1032, ["item"]))), 128))
|
|
3253
|
-
], 10,
|
|
3253
|
+
], 10, xs))), 128))
|
|
3254
3254
|
]))
|
|
3255
3255
|
]),
|
|
3256
3256
|
_: 2
|
|
@@ -3258,9 +3258,9 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3258
3258
|
e.hideTitle ? void 0 : {
|
|
3259
3259
|
name: "title",
|
|
3260
3260
|
fn: g(() => [
|
|
3261
|
-
V("div",
|
|
3262
|
-
|
|
3263
|
-
Z(
|
|
3261
|
+
V("div", _s, [
|
|
3262
|
+
X(C.$slots, "title", {}, () => [
|
|
3263
|
+
Z(N(m(a)("baseConfigCard.title")), 1)
|
|
3264
3264
|
], !0)
|
|
3265
3265
|
])
|
|
3266
3266
|
]),
|
|
@@ -3269,10 +3269,10 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3269
3269
|
]), 1024);
|
|
3270
3270
|
};
|
|
3271
3271
|
}
|
|
3272
|
-
}), js = /* @__PURE__ */
|
|
3272
|
+
}), js = /* @__PURE__ */ _e($s, [["__scopeId", "data-v-068b819b"]]), Ms = {
|
|
3273
3273
|
class: "form-actions",
|
|
3274
3274
|
"data-testid": "form-actions"
|
|
3275
|
-
}, Es = /* @__PURE__ */ ae({
|
|
3275
|
+
}, Os = { key: 0 }, Es = /* @__PURE__ */ ae({
|
|
3276
3276
|
__name: "EntityBaseForm",
|
|
3277
3277
|
props: {
|
|
3278
3278
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3329,17 +3329,19 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3329
3329
|
var t;
|
|
3330
3330
|
const r = n, o = e, i = At(), { i18n: { t: a } } = ce.useI18n(), { getMessageFromError: s } = ce.useErrors(), { axiosInstance: l } = ce.useAxios({
|
|
3331
3331
|
headers: (t = o.config) == null ? void 0 : t.requestHeaders
|
|
3332
|
-
}), u = F(!1), p = F(!1), c = F(""), y = x(() => o.canSubmit === !1 || o.isReadonly), f = x(() => {
|
|
3333
|
-
var
|
|
3334
|
-
let
|
|
3335
|
-
return o.config.app === "konnect" ?
|
|
3336
|
-
}),
|
|
3337
|
-
|
|
3338
|
-
}, v = () => {
|
|
3339
|
-
r("cancel");
|
|
3332
|
+
}), u = F(!1), p = F(!1), c = F(""), y = x(() => o.canSubmit === !1 || o.isReadonly), f = F(!1), w = x(() => {
|
|
3333
|
+
var v, S;
|
|
3334
|
+
let D = `${o.config.apiBaseUrl}${o.fetchUrl}`;
|
|
3335
|
+
return o.config.app === "konnect" ? D = D.replace(/{controlPlaneId}/gi, ((v = o.config) == null ? void 0 : v.controlPlaneId) || "") : o.config.app === "kongManager" && (D = D.replace(/\/{workspace}/gi, (S = o.config) != null && S.workspace ? `/${o.config.workspace}` : "")), o.editId ? (D = D.replace(/{id}/gi, o.editId), D) : (D = D.replace(/\/{id}/gi, ""), D);
|
|
3336
|
+
}), h = () => {
|
|
3337
|
+
f.value = !f.value;
|
|
3340
3338
|
}, A = () => {
|
|
3339
|
+
o.config.cancelRoute ? i.push(o.config.cancelRoute) : b();
|
|
3340
|
+
}, b = () => {
|
|
3341
|
+
r("cancel");
|
|
3342
|
+
}, _ = () => {
|
|
3341
3343
|
y.value || r("submit");
|
|
3342
|
-
},
|
|
3344
|
+
}, L = F([
|
|
3343
3345
|
{
|
|
3344
3346
|
title: a("baseForm.configuration.yaml"),
|
|
3345
3347
|
hash: "#yaml"
|
|
@@ -3349,138 +3351,132 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3349
3351
|
hash: "#json"
|
|
3350
3352
|
}
|
|
3351
3353
|
]);
|
|
3352
|
-
return Te(() => u.value, (
|
|
3353
|
-
r("loading",
|
|
3354
|
+
return Te(() => u.value, (v) => {
|
|
3355
|
+
r("loading", v);
|
|
3354
3356
|
}, { immediate: !0 }), dt(async () => {
|
|
3355
3357
|
if (o.editId)
|
|
3356
3358
|
try {
|
|
3357
3359
|
p.value = !1, u.value = !0;
|
|
3358
|
-
const { data:
|
|
3359
|
-
r("fetch:success",
|
|
3360
|
-
} catch (
|
|
3361
|
-
const
|
|
3362
|
-
c.value =
|
|
3360
|
+
const { data: v } = await l.get(w.value);
|
|
3361
|
+
r("fetch:success", v);
|
|
3362
|
+
} catch (v) {
|
|
3363
|
+
const S = s(v);
|
|
3364
|
+
c.value = S.startsWith("code") ? a("baseForm.errors.edit") : S, p.value = !0, r("fetch:error", v);
|
|
3363
3365
|
} finally {
|
|
3364
3366
|
u.value = !1;
|
|
3365
3367
|
}
|
|
3366
|
-
}), (
|
|
3367
|
-
const
|
|
3368
|
-
return d(),
|
|
3368
|
+
}), (v, S) => {
|
|
3369
|
+
const D = q("KSkeleton"), re = q("KEmptyState"), R = q("KAlert"), C = q("KButton"), G = q("KTabs"), K = q("KSlideout"), I = q("KCard");
|
|
3370
|
+
return d(), P(I, { class: "kong-ui-entity-base-form" }, {
|
|
3369
3371
|
default: g(() => [
|
|
3370
|
-
u.value ? (d(),
|
|
3372
|
+
u.value ? (d(), P(D, {
|
|
3371
3373
|
key: 0,
|
|
3372
3374
|
type: "form"
|
|
3373
|
-
})) : p.value ? (d(),
|
|
3375
|
+
})) : p.value ? (d(), P(re, {
|
|
3374
3376
|
key: 1,
|
|
3375
3377
|
"cta-text": m(a)("baseForm.actions.back"),
|
|
3376
3378
|
"data-testid": "form-fetch-error",
|
|
3377
|
-
"handle-click":
|
|
3379
|
+
"handle-click": A,
|
|
3378
3380
|
"is-error": !0
|
|
3379
3381
|
}, {
|
|
3380
3382
|
message: g(() => [
|
|
3381
|
-
V("h3", null,
|
|
3383
|
+
V("h3", null, N(c.value), 1)
|
|
3382
3384
|
]),
|
|
3383
3385
|
_: 1
|
|
3384
|
-
}, 8, ["cta-text"])) : (d(),
|
|
3386
|
+
}, 8, ["cta-text"])) : (d(), j("form", {
|
|
3385
3387
|
key: 2,
|
|
3386
3388
|
"data-testid": "form-content",
|
|
3387
|
-
onReset:
|
|
3388
|
-
onSubmit:
|
|
3389
|
+
onReset: rt(b, ["prevent"]),
|
|
3390
|
+
onSubmit: rt(_, ["prevent"])
|
|
3389
3391
|
}, [
|
|
3390
|
-
|
|
3391
|
-
e.errorMessage ? (d(),
|
|
3392
|
+
X(v.$slots, "default", {}, void 0, !0),
|
|
3393
|
+
e.errorMessage ? (d(), P(R, {
|
|
3392
3394
|
key: 0,
|
|
3393
3395
|
"alert-message": e.errorMessage,
|
|
3394
3396
|
appearance: "danger",
|
|
3395
3397
|
"data-testid": "form-error"
|
|
3396
3398
|
}, null, 8, ["alert-message"])) : z("", !0),
|
|
3397
|
-
V("div",
|
|
3398
|
-
|
|
3399
|
-
e.config.jsonYamlMilestone2Enabled ? (d(),
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
E(k, {
|
|
3413
|
-
"close-button-alignment": "end",
|
|
3414
|
-
"data-testid": "form-view-configuration-slideout",
|
|
3415
|
-
"has-overlay": !1,
|
|
3416
|
-
"is-visible": I.value,
|
|
3417
|
-
"prevent-close-on-blur": "",
|
|
3418
|
-
title: m(a)("baseForm.configuration.title"),
|
|
3419
|
-
type: "button",
|
|
3420
|
-
onClose: S
|
|
3421
|
-
}, {
|
|
3422
|
-
default: g(() => [
|
|
3423
|
-
V("div", null, B(m(a)("baseForm.configuration.message")), 1),
|
|
3424
|
-
E(D, {
|
|
3425
|
-
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3426
|
-
tabs: C.value
|
|
3427
|
-
}, {
|
|
3428
|
-
json: g(() => [
|
|
3429
|
-
E(Sn, {
|
|
3430
|
-
config: e.config,
|
|
3431
|
-
"fetcher-url": f.value,
|
|
3432
|
-
"json-record": o.formFields,
|
|
3433
|
-
"request-method": o.editId ? "put" : "post"
|
|
3434
|
-
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3435
|
-
]),
|
|
3436
|
-
yaml: g(() => [
|
|
3437
|
-
E(gr, {
|
|
3438
|
-
"yaml-record": o.formFields
|
|
3439
|
-
}, null, 8, ["yaml-record"])
|
|
3440
|
-
]),
|
|
3441
|
-
_: 1
|
|
3442
|
-
}, 8, ["tabs"])
|
|
3443
|
-
]),
|
|
3444
|
-
_: 2
|
|
3445
|
-
}, 1032, ["is-visible", "title", "onClose"])
|
|
3446
|
-
])
|
|
3447
|
-
]),
|
|
3448
|
-
_: 1
|
|
3449
|
-
})) : z("", !0),
|
|
3450
|
-
E(X, {
|
|
3399
|
+
V("div", Ms, [
|
|
3400
|
+
X(v.$slots, "form-actions", {}, () => [
|
|
3401
|
+
e.config.jsonYamlMilestone2Enabled ? (d(), j("div", Os, [
|
|
3402
|
+
E(C, {
|
|
3403
|
+
appearance: "tertiary",
|
|
3404
|
+
"data-testid": "form-view-configuration",
|
|
3405
|
+
onClick: S[0] || (S[0] = (T) => h())
|
|
3406
|
+
}, {
|
|
3407
|
+
default: g(() => [
|
|
3408
|
+
Z(N(m(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3409
|
+
]),
|
|
3410
|
+
_: 1
|
|
3411
|
+
})
|
|
3412
|
+
])) : z("", !0),
|
|
3413
|
+
E(C, {
|
|
3451
3414
|
appearance: "secondary",
|
|
3452
3415
|
"data-testid": "form-cancel",
|
|
3453
3416
|
disabled: e.isReadonly,
|
|
3454
3417
|
type: "reset"
|
|
3455
3418
|
}, {
|
|
3456
3419
|
default: g(() => [
|
|
3457
|
-
Z(
|
|
3420
|
+
Z(N(m(a)("baseForm.actions.cancel")), 1)
|
|
3458
3421
|
]),
|
|
3459
3422
|
_: 1
|
|
3460
3423
|
}, 8, ["disabled"]),
|
|
3461
|
-
E(
|
|
3424
|
+
E(C, {
|
|
3462
3425
|
appearance: "primary",
|
|
3463
3426
|
"data-testid": "form-submit",
|
|
3464
3427
|
disabled: y.value,
|
|
3465
3428
|
type: "submit"
|
|
3466
3429
|
}, {
|
|
3467
3430
|
default: g(() => [
|
|
3468
|
-
Z(
|
|
3431
|
+
Z(N(m(a)("baseForm.actions.save")), 1)
|
|
3469
3432
|
]),
|
|
3470
3433
|
_: 1
|
|
3471
3434
|
}, 8, ["disabled"])
|
|
3472
3435
|
], !0)
|
|
3473
3436
|
])
|
|
3474
|
-
], 32))
|
|
3437
|
+
], 32)),
|
|
3438
|
+
E(K, {
|
|
3439
|
+
"close-button-alignment": "end",
|
|
3440
|
+
"data-testid": "form-view-configuration-slideout",
|
|
3441
|
+
"has-overlay": !1,
|
|
3442
|
+
"is-visible": f.value,
|
|
3443
|
+
"prevent-close-on-blur": "",
|
|
3444
|
+
title: m(a)("baseForm.configuration.title"),
|
|
3445
|
+
onClose: S[1] || (S[1] = (T) => h())
|
|
3446
|
+
}, {
|
|
3447
|
+
default: g(() => [
|
|
3448
|
+
V("div", null, N(m(a)("baseForm.configuration.message")), 1),
|
|
3449
|
+
E(G, {
|
|
3450
|
+
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3451
|
+
tabs: L.value
|
|
3452
|
+
}, {
|
|
3453
|
+
json: g(() => [
|
|
3454
|
+
E(xn, {
|
|
3455
|
+
config: e.config,
|
|
3456
|
+
"fetcher-url": w.value,
|
|
3457
|
+
"json-record": o.formFields,
|
|
3458
|
+
"request-method": o.editId ? "put" : "post"
|
|
3459
|
+
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3460
|
+
]),
|
|
3461
|
+
yaml: g(() => [
|
|
3462
|
+
E(gr, {
|
|
3463
|
+
"yaml-record": o.formFields
|
|
3464
|
+
}, null, 8, ["yaml-record"])
|
|
3465
|
+
]),
|
|
3466
|
+
_: 1
|
|
3467
|
+
}, 8, ["tabs"])
|
|
3468
|
+
]),
|
|
3469
|
+
_: 1
|
|
3470
|
+
}, 8, ["is-visible", "title"])
|
|
3475
3471
|
]),
|
|
3476
3472
|
_: 3
|
|
3477
3473
|
});
|
|
3478
3474
|
};
|
|
3479
3475
|
}
|
|
3480
|
-
}),
|
|
3476
|
+
}), Fs = /* @__PURE__ */ _e(Es, [["__scopeId", "data-v-41712e71"]]), Ns = {
|
|
3481
3477
|
key: 0,
|
|
3482
3478
|
"data-testid": "first-col"
|
|
3483
|
-
},
|
|
3479
|
+
}, Ks = /* @__PURE__ */ ae({
|
|
3484
3480
|
__name: "EntityBaseTableCell",
|
|
3485
3481
|
props: {
|
|
3486
3482
|
keyName: {
|
|
@@ -3494,64 +3490,64 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3494
3490
|
},
|
|
3495
3491
|
setup(e) {
|
|
3496
3492
|
const n = e, t = x(() => {
|
|
3497
|
-
var
|
|
3498
|
-
return ((
|
|
3493
|
+
var h;
|
|
3494
|
+
return ((h = n.rowEl) == null ? void 0 : h.querySelector(`[data-testid="${n.keyName}"]`)) || null;
|
|
3499
3495
|
}), r = x(() => {
|
|
3500
|
-
var
|
|
3501
|
-
return ((
|
|
3496
|
+
var h;
|
|
3497
|
+
return ((h = t.value) == null ? void 0 : h.querySelector('[data-testid="first-col"]')) || null;
|
|
3502
3498
|
}), o = x(() => {
|
|
3503
|
-
var
|
|
3504
|
-
const
|
|
3505
|
-
return
|
|
3499
|
+
var h, A;
|
|
3500
|
+
const b = (h = n.rowEl) == null ? void 0 : h.querySelectorAll("td");
|
|
3501
|
+
return b ? ((A = b[0]) == null ? void 0 : A.getAttribute("data-testid")) === n.keyName : !1;
|
|
3506
3502
|
});
|
|
3507
3503
|
let i;
|
|
3508
3504
|
const a = () => {
|
|
3509
3505
|
i && (i.disconnect(), i = void 0);
|
|
3510
3506
|
}, s = () => {
|
|
3511
|
-
var
|
|
3512
|
-
u.value = ((
|
|
3507
|
+
var h, A, b;
|
|
3508
|
+
u.value = ((h = r.value) == null ? void 0 : h.getBoundingClientRect().width) || 0, p.value = ((A = t.value) == null ? void 0 : A.clientWidth) || 0, c.value = ((b = l.value) == null ? void 0 : b.innerText) || "";
|
|
3513
3509
|
}, l = F({}), u = F(0), p = F(0), c = F(""), y = x(() => [r.value, t.value]), f = Te(
|
|
3514
3510
|
y,
|
|
3515
|
-
(
|
|
3511
|
+
(h) => {
|
|
3516
3512
|
if (o.value && (a(), "ResizeObserver" in window && window)) {
|
|
3517
3513
|
i = new ResizeObserver((A) => {
|
|
3518
3514
|
window.requestAnimationFrame(() => {
|
|
3519
3515
|
!Array.isArray(A) || !A.length || s();
|
|
3520
3516
|
});
|
|
3521
3517
|
});
|
|
3522
|
-
for (const A of
|
|
3518
|
+
for (const A of h)
|
|
3523
3519
|
A && i.observe(A);
|
|
3524
3520
|
}
|
|
3525
3521
|
},
|
|
3526
3522
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3527
|
-
),
|
|
3528
|
-
return
|
|
3523
|
+
), w = x(() => o.value ? u.value > p.value : !1);
|
|
3524
|
+
return _r(() => {
|
|
3529
3525
|
s();
|
|
3530
|
-
}),
|
|
3526
|
+
}), wr(() => {
|
|
3531
3527
|
f();
|
|
3532
|
-
}), (
|
|
3533
|
-
const
|
|
3534
|
-
return d(),
|
|
3528
|
+
}), (h, A) => {
|
|
3529
|
+
const b = q("KTooltip");
|
|
3530
|
+
return d(), j("span", {
|
|
3535
3531
|
ref_key: "contentRef",
|
|
3536
3532
|
ref: l,
|
|
3537
3533
|
class: "content-wrapper"
|
|
3538
3534
|
}, [
|
|
3539
|
-
o.value ? (d(),
|
|
3540
|
-
E(
|
|
3541
|
-
label:
|
|
3535
|
+
o.value ? (d(), j("span", Ns, [
|
|
3536
|
+
E(b, {
|
|
3537
|
+
label: w.value ? c.value : "",
|
|
3542
3538
|
"max-width": "300",
|
|
3543
3539
|
placement: "bottomStart"
|
|
3544
3540
|
}, {
|
|
3545
3541
|
default: g(() => [
|
|
3546
|
-
|
|
3542
|
+
X(h.$slots, "default", {}, void 0, !0)
|
|
3547
3543
|
]),
|
|
3548
3544
|
_: 3
|
|
3549
3545
|
}, 8, ["label"])
|
|
3550
|
-
])) :
|
|
3546
|
+
])) : X(h.$slots, "default", { key: 1 }, void 0, !0)
|
|
3551
3547
|
], 512);
|
|
3552
3548
|
};
|
|
3553
3549
|
}
|
|
3554
|
-
}),
|
|
3550
|
+
}), qs = /* @__PURE__ */ _e(Ks, [["__scopeId", "data-v-e42a20c9"]]), Bs = { class: "toolbar-container" }, Ls = {
|
|
3555
3551
|
key: 0,
|
|
3556
3552
|
class: "toolbar-button-container"
|
|
3557
3553
|
}, Us = ["data-testid"], Ps = /* @__PURE__ */ ae({
|
|
@@ -3665,71 +3661,71 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3665
3661
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3666
3662
|
setup(e, { emit: n }) {
|
|
3667
3663
|
const t = e, r = n, { i18n: { t: o } } = ce.useI18n(), i = x(() => {
|
|
3668
|
-
var
|
|
3664
|
+
var S, D;
|
|
3669
3665
|
return typeof t.errorMessage == "string" ? {
|
|
3670
3666
|
hasError: !!t.errorMessage,
|
|
3671
3667
|
title: t.errorMessage,
|
|
3672
3668
|
message: void 0
|
|
3673
3669
|
} : {
|
|
3674
3670
|
hasError: !!t.errorMessage,
|
|
3675
|
-
title: (
|
|
3676
|
-
message: (
|
|
3671
|
+
title: (S = t.errorMessage) == null ? void 0 : S.title,
|
|
3672
|
+
message: (D = t.errorMessage) == null ? void 0 : D.message
|
|
3677
3673
|
};
|
|
3678
|
-
}), a = x(() => t.cacheIdentifier || t.preferencesStorageKey), s = (
|
|
3679
|
-
const
|
|
3680
|
-
return Object.keys(t.tableHeaders).forEach((
|
|
3681
|
-
const
|
|
3682
|
-
|
|
3683
|
-
label:
|
|
3684
|
-
key:
|
|
3685
|
-
sortable:
|
|
3674
|
+
}), a = x(() => t.cacheIdentifier || t.preferencesStorageKey), s = (S) => S.hasData || !!t.query, l = x(() => {
|
|
3675
|
+
const S = [];
|
|
3676
|
+
return Object.keys(t.tableHeaders).forEach((D) => {
|
|
3677
|
+
const re = t.tableHeaders[D];
|
|
3678
|
+
S.push({
|
|
3679
|
+
label: re.label ?? D,
|
|
3680
|
+
key: D,
|
|
3681
|
+
sortable: re.sortable ?? !1
|
|
3686
3682
|
});
|
|
3687
|
-
}), t.enableEntityActions &&
|
|
3683
|
+
}), t.enableEntityActions && S.push({
|
|
3688
3684
|
key: "actions",
|
|
3689
3685
|
hideLabel: !0
|
|
3690
|
-
}),
|
|
3691
|
-
}), u = (
|
|
3692
|
-
"data-rowid":
|
|
3693
|
-
"data-testid":
|
|
3694
|
-
...t.rowAttributes(
|
|
3695
|
-
}), p = F({}), c = (
|
|
3696
|
-
var
|
|
3697
|
-
return (
|
|
3698
|
-
}, y = (
|
|
3699
|
-
const
|
|
3700
|
-
"data-testid":
|
|
3701
|
-
...t.cellAttributes(
|
|
3686
|
+
}), S;
|
|
3687
|
+
}), u = (S) => ({
|
|
3688
|
+
"data-rowid": S.id,
|
|
3689
|
+
"data-testid": S.name,
|
|
3690
|
+
...t.rowAttributes(S)
|
|
3691
|
+
}), p = F({}), c = (S) => {
|
|
3692
|
+
var D;
|
|
3693
|
+
return (D = p.value) == null ? void 0 : D.$el.querySelector(`[data-rowid="${S.id}"]`);
|
|
3694
|
+
}, y = (S) => {
|
|
3695
|
+
const D = {
|
|
3696
|
+
"data-testid": S.headerKey,
|
|
3697
|
+
...t.cellAttributes(S)
|
|
3702
3698
|
};
|
|
3703
|
-
return
|
|
3699
|
+
return S.colIndex === 0 && (D.style = {
|
|
3704
3700
|
maxWidth: "250px",
|
|
3705
3701
|
overflowX: "hidden",
|
|
3706
3702
|
textOverflow: "ellipsis"
|
|
3707
|
-
}),
|
|
3703
|
+
}), D;
|
|
3708
3704
|
}, f = () => {
|
|
3709
|
-
r("empty-state-cta-clicked"),
|
|
3710
|
-
},
|
|
3705
|
+
r("empty-state-cta-clicked"), w();
|
|
3706
|
+
}, w = () => {
|
|
3711
3707
|
r("clear-search-input");
|
|
3712
|
-
},
|
|
3713
|
-
r("click:row",
|
|
3714
|
-
}), A = (
|
|
3715
|
-
r("sort",
|
|
3716
|
-
}, { setTablePreferences:
|
|
3717
|
-
const
|
|
3708
|
+
}, h = x(() => t.disableRowClick ? void 0 : (S, D) => {
|
|
3709
|
+
r("click:row", D);
|
|
3710
|
+
}), A = (S) => {
|
|
3711
|
+
r("sort", S);
|
|
3712
|
+
}, { setTablePreferences: b, getTablePreferences: _ } = Or(), L = x(() => {
|
|
3713
|
+
const S = _(t.preferencesStorageKey);
|
|
3718
3714
|
return {
|
|
3719
3715
|
...t.initialFetcherParams,
|
|
3720
|
-
...
|
|
3716
|
+
...S
|
|
3721
3717
|
};
|
|
3722
|
-
}),
|
|
3723
|
-
t.preferencesStorageKey &&
|
|
3718
|
+
}), v = (S) => {
|
|
3719
|
+
t.preferencesStorageKey && b(t.preferencesStorageKey, S);
|
|
3724
3720
|
};
|
|
3725
|
-
return (
|
|
3726
|
-
const
|
|
3727
|
-
return d(),
|
|
3721
|
+
return (S, D) => {
|
|
3722
|
+
const re = q("KIcon"), R = q("KButton"), C = q("KDropdown"), G = q("KTable"), K = q("KCard");
|
|
3723
|
+
return d(), P(K, {
|
|
3728
3724
|
class: "kong-ui-entity-base-table",
|
|
3729
3725
|
title: e.title
|
|
3730
3726
|
}, {
|
|
3731
3727
|
default: g(() => [
|
|
3732
|
-
E(
|
|
3728
|
+
E(G, {
|
|
3733
3729
|
ref_key: "tableRefs",
|
|
3734
3730
|
ref: p,
|
|
3735
3731
|
"cache-identifier": a.value,
|
|
@@ -3751,51 +3747,51 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3751
3747
|
"has-error": i.value.hasError,
|
|
3752
3748
|
headers: l.value,
|
|
3753
3749
|
"hide-pagination-when-optional": "",
|
|
3754
|
-
"initial-fetcher-params":
|
|
3750
|
+
"initial-fetcher-params": L.value,
|
|
3755
3751
|
"is-loading": e.isLoading,
|
|
3756
3752
|
"pagination-type": e.paginationType,
|
|
3757
3753
|
"row-attrs": u,
|
|
3758
3754
|
"search-input": e.query,
|
|
3759
3755
|
onKtableEmptyStateCtaClicked: f,
|
|
3760
|
-
"onRow:click":
|
|
3761
|
-
onSort:
|
|
3762
|
-
"onUpdate:tablePreferences":
|
|
3756
|
+
"onRow:click": h.value,
|
|
3757
|
+
onSort: D[0] || (D[0] = (I) => A(I)),
|
|
3758
|
+
"onUpdate:tablePreferences": v
|
|
3763
3759
|
}, je({
|
|
3764
3760
|
toolbar: g(({ state: I }) => [
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3761
|
+
Je(V("div", Bs, [
|
|
3762
|
+
X(S.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3763
|
+
S.$slots["toolbar-button"] ? (d(), j("div", Ls, [
|
|
3764
|
+
X(S.$slots, "toolbar-button", {}, void 0, !0)
|
|
3769
3765
|
])) : z("", !0)
|
|
3770
3766
|
], 512), [
|
|
3771
|
-
[
|
|
3767
|
+
[Ye, s(I)]
|
|
3772
3768
|
])
|
|
3773
3769
|
]),
|
|
3774
|
-
actions: g(({ row: I, rowKey:
|
|
3770
|
+
actions: g(({ row: I, rowKey: T, rowValue: O }) => [
|
|
3775
3771
|
V("div", {
|
|
3776
3772
|
class: "actions-container",
|
|
3777
3773
|
"data-testid": I.name
|
|
3778
3774
|
}, [
|
|
3779
|
-
E(
|
|
3775
|
+
E(C, {
|
|
3780
3776
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3781
3777
|
width: e.dropdownMenuWidth
|
|
3782
3778
|
}, {
|
|
3783
3779
|
items: g(() => [
|
|
3784
|
-
|
|
3780
|
+
X(S.$slots, "actions", {
|
|
3785
3781
|
row: I,
|
|
3786
|
-
rowKey:
|
|
3782
|
+
rowKey: T,
|
|
3787
3783
|
rowValue: O
|
|
3788
3784
|
}, void 0, !0)
|
|
3789
3785
|
]),
|
|
3790
3786
|
default: g(() => [
|
|
3791
|
-
E(
|
|
3787
|
+
E(R, {
|
|
3792
3788
|
class: "actions-trigger",
|
|
3793
3789
|
"data-testid": "overflow-actions-button",
|
|
3794
3790
|
size: "small"
|
|
3795
3791
|
}, {
|
|
3796
3792
|
icon: g(() => [
|
|
3797
|
-
E(
|
|
3798
|
-
color: m(
|
|
3793
|
+
E(re, {
|
|
3794
|
+
color: m(So),
|
|
3799
3795
|
icon: "more",
|
|
3800
3796
|
size: "16"
|
|
3801
3797
|
}, null, 8, ["color"])
|
|
@@ -3809,20 +3805,20 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3809
3805
|
]),
|
|
3810
3806
|
_: 2
|
|
3811
3807
|
}, [
|
|
3812
|
-
ve(e.tableHeaders, (I,
|
|
3813
|
-
name:
|
|
3814
|
-
fn: g(({ row: O, rowKey:
|
|
3815
|
-
E(
|
|
3816
|
-
"key-name": String(
|
|
3808
|
+
ve(e.tableHeaders, (I, T) => ({
|
|
3809
|
+
name: T,
|
|
3810
|
+
fn: g(({ row: O, rowKey: B, rowValue: W }) => [
|
|
3811
|
+
E(qs, {
|
|
3812
|
+
"key-name": String(T),
|
|
3817
3813
|
"row-el": c(O)
|
|
3818
3814
|
}, {
|
|
3819
3815
|
default: g(() => [
|
|
3820
|
-
|
|
3816
|
+
X(S.$slots, T, {
|
|
3821
3817
|
row: O,
|
|
3822
|
-
rowKey:
|
|
3818
|
+
rowKey: B,
|
|
3823
3819
|
rowValue: W
|
|
3824
3820
|
}, () => [
|
|
3825
|
-
Z(
|
|
3821
|
+
Z(N(W), 1)
|
|
3826
3822
|
], !0)
|
|
3827
3823
|
]),
|
|
3828
3824
|
_: 2
|
|
@@ -3835,13 +3831,13 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3835
3831
|
}, 8, ["title"]);
|
|
3836
3832
|
};
|
|
3837
3833
|
}
|
|
3838
|
-
}),
|
|
3834
|
+
}), Ds = /* @__PURE__ */ _e(Ps, [["__scopeId", "data-v-57b5a97b"]]), Vs = {
|
|
3839
3835
|
key: 0,
|
|
3840
3836
|
class: "kong-ui-entity-delete-error"
|
|
3841
|
-
},
|
|
3837
|
+
}, Rs = {
|
|
3842
3838
|
key: 1,
|
|
3843
3839
|
class: "description"
|
|
3844
|
-
},
|
|
3840
|
+
}, Gs = /* @__PURE__ */ ae({
|
|
3845
3841
|
__name: "EntityDeleteModal",
|
|
3846
3842
|
props: {
|
|
3847
3843
|
visible: {
|
|
@@ -3887,7 +3883,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3887
3883
|
};
|
|
3888
3884
|
return (l, u) => {
|
|
3889
3885
|
const p = q("KAlert"), c = q("KPrompt");
|
|
3890
|
-
return d(),
|
|
3886
|
+
return d(), P(c, {
|
|
3891
3887
|
"action-button-text": "Yes, delete",
|
|
3892
3888
|
"action-pending": e.actionPending,
|
|
3893
3889
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -3899,10 +3895,10 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3899
3895
|
onProceed: s
|
|
3900
3896
|
}, {
|
|
3901
3897
|
"body-content": g(() => [
|
|
3902
|
-
e.error ? (d(),
|
|
3898
|
+
e.error ? (d(), j("div", Vs, [
|
|
3903
3899
|
E(p, { appearance: "danger" }, {
|
|
3904
3900
|
alertMessage: g(() => [
|
|
3905
|
-
Z(
|
|
3901
|
+
Z(N(e.error), 1)
|
|
3906
3902
|
]),
|
|
3907
3903
|
_: 1
|
|
3908
3904
|
})
|
|
@@ -3913,21 +3909,21 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3913
3909
|
tag: "p"
|
|
3914
3910
|
}, je({
|
|
3915
3911
|
entityType: g(() => [
|
|
3916
|
-
Z(
|
|
3912
|
+
Z(N(r.entityType), 1)
|
|
3917
3913
|
]),
|
|
3918
3914
|
_: 2
|
|
3919
3915
|
}, [
|
|
3920
3916
|
r.entityName ? {
|
|
3921
3917
|
name: "entityName",
|
|
3922
3918
|
fn: g(() => [
|
|
3923
|
-
V("strong", null,
|
|
3919
|
+
V("strong", null, N(r.entityName), 1)
|
|
3924
3920
|
]),
|
|
3925
3921
|
key: "0"
|
|
3926
3922
|
} : void 0
|
|
3927
3923
|
]), 1032, ["keypath"]),
|
|
3928
|
-
r.description || l.$slots.description ? (d(),
|
|
3929
|
-
|
|
3930
|
-
V("p", null,
|
|
3924
|
+
r.description || l.$slots.description ? (d(), j("div", Rs, [
|
|
3925
|
+
X(l.$slots, "description", {}, () => [
|
|
3926
|
+
V("p", null, N(r.description), 1)
|
|
3931
3927
|
], !0)
|
|
3932
3928
|
])) : z("", !0)
|
|
3933
3929
|
]),
|
|
@@ -3935,13 +3931,13 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3935
3931
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3936
3932
|
};
|
|
3937
3933
|
}
|
|
3938
|
-
}),
|
|
3934
|
+
}), Hs = /* @__PURE__ */ _e(Gs, [["__scopeId", "data-v-1c9a2a07"]]), zs = {
|
|
3939
3935
|
fill: "none",
|
|
3940
3936
|
height: "20",
|
|
3941
3937
|
viewBox: "0 0 20 20",
|
|
3942
3938
|
width: "20",
|
|
3943
3939
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3944
|
-
},
|
|
3940
|
+
}, Js = {
|
|
3945
3941
|
id: "mask0_180_20349",
|
|
3946
3942
|
height: "20",
|
|
3947
3943
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3949,7 +3945,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3949
3945
|
width: "20",
|
|
3950
3946
|
x: "0",
|
|
3951
3947
|
y: "0"
|
|
3952
|
-
},
|
|
3948
|
+
}, Ys = ["fill"], Ws = { mask: "url(#mask0_180_20349)" }, Zs = ["fill"], fn = /* @__PURE__ */ ae({
|
|
3953
3949
|
__name: "IconFilter",
|
|
3954
3950
|
props: {
|
|
3955
3951
|
color: {
|
|
@@ -3958,26 +3954,26 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3958
3954
|
}
|
|
3959
3955
|
},
|
|
3960
3956
|
setup(e) {
|
|
3961
|
-
return (n, t) => (d(),
|
|
3962
|
-
V("mask",
|
|
3957
|
+
return (n, t) => (d(), j("svg", zs, [
|
|
3958
|
+
V("mask", Js, [
|
|
3963
3959
|
V("rect", {
|
|
3964
3960
|
fill: e.color,
|
|
3965
3961
|
height: "20",
|
|
3966
3962
|
width: "20"
|
|
3967
|
-
}, null, 8,
|
|
3963
|
+
}, null, 8, Ys)
|
|
3968
3964
|
]),
|
|
3969
|
-
V("g",
|
|
3965
|
+
V("g", Ws, [
|
|
3970
3966
|
V("path", {
|
|
3971
3967
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3972
3968
|
fill: e.color
|
|
3973
|
-
}, null, 8,
|
|
3969
|
+
}, null, 8, Zs)
|
|
3974
3970
|
])
|
|
3975
3971
|
]));
|
|
3976
3972
|
}
|
|
3977
|
-
}),
|
|
3973
|
+
}), Qs = {
|
|
3978
3974
|
key: 1,
|
|
3979
3975
|
class: "kong-ui-entity-filter"
|
|
3980
|
-
},
|
|
3976
|
+
}, Xs = { class: "menu-item-title" }, el = { class: "menu-item-indicator" }, tl = { class: "menu-item-body" }, nl = ["for"], rl = { class: "menu-item-buttons" }, ol = { class: "filter-clear-button-container" }, al = /* @__PURE__ */ ae({
|
|
3981
3977
|
__name: "EntityFilter",
|
|
3982
3978
|
props: {
|
|
3983
3979
|
// filter config, either exact match or fuzzy match
|
|
@@ -3998,49 +3994,49 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
3998
3994
|
emits: ["update:modelValue"],
|
|
3999
3995
|
setup(e, { emit: n }) {
|
|
4000
3996
|
const { i18n: { t } } = ce.useI18n(), r = e, o = n, i = F(!1), a = F({}), s = x(() => {
|
|
4001
|
-
const
|
|
4002
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
4003
|
-
|
|
4004
|
-
}),
|
|
3997
|
+
const b = [];
|
|
3998
|
+
return new URLSearchParams(r.modelValue).forEach((_, L) => {
|
|
3999
|
+
_ !== "" && b.push(L);
|
|
4000
|
+
}), b;
|
|
4005
4001
|
}), l = x(() => {
|
|
4006
|
-
const
|
|
4007
|
-
return Object.keys(
|
|
4008
|
-
label:
|
|
4009
|
-
value:
|
|
4002
|
+
const b = r.config.fields;
|
|
4003
|
+
return Object.keys(b).filter((_) => b[_].searchable).map((_) => ({
|
|
4004
|
+
label: b[_].label || _,
|
|
4005
|
+
value: _
|
|
4010
4006
|
}));
|
|
4011
4007
|
});
|
|
4012
|
-
Te(() => r.modelValue, (
|
|
4013
|
-
a.value = {}, new URLSearchParams(
|
|
4014
|
-
a.value[
|
|
4008
|
+
Te(() => r.modelValue, (b) => {
|
|
4009
|
+
a.value = {}, new URLSearchParams(b).forEach((_, L) => {
|
|
4010
|
+
a.value[L] = _;
|
|
4015
4011
|
});
|
|
4016
4012
|
});
|
|
4017
4013
|
const u = () => {
|
|
4018
4014
|
i.value = !i.value;
|
|
4019
|
-
}, p = (
|
|
4020
|
-
o("update:modelValue",
|
|
4021
|
-
}, c = (
|
|
4022
|
-
var
|
|
4023
|
-
return (((
|
|
4024
|
-
value:
|
|
4025
|
-
label:
|
|
4015
|
+
}, p = (b) => {
|
|
4016
|
+
o("update:modelValue", b);
|
|
4017
|
+
}, c = (b) => `filter-${b}`, y = (b) => {
|
|
4018
|
+
var _, L;
|
|
4019
|
+
return (((L = (_ = r.config.schema) == null ? void 0 : _[b]) == null ? void 0 : L.values) ?? []).map((v) => ({
|
|
4020
|
+
value: v,
|
|
4021
|
+
label: v
|
|
4026
4022
|
}));
|
|
4027
|
-
}, f = (
|
|
4028
|
-
var
|
|
4029
|
-
return ((
|
|
4030
|
-
},
|
|
4023
|
+
}, f = (b) => {
|
|
4024
|
+
var _, L;
|
|
4025
|
+
return ((L = (_ = r.config.schema) == null ? void 0 : _[b]) == null ? void 0 : L.type) ?? "text";
|
|
4026
|
+
}, w = (b) => {
|
|
4031
4027
|
a.value = {
|
|
4032
4028
|
...a.value,
|
|
4033
|
-
[
|
|
4029
|
+
[b]: ""
|
|
4034
4030
|
}, A();
|
|
4035
|
-
},
|
|
4031
|
+
}, h = () => {
|
|
4036
4032
|
a.value = {}, A(!0);
|
|
4037
|
-
}, A = (
|
|
4038
|
-
const
|
|
4039
|
-
|
|
4033
|
+
}, A = (b = !1) => {
|
|
4034
|
+
const _ = Object.keys(a.value).reduce((L, v) => (a.value[v] && (L[v] = `${a.value[v]}`), L), {});
|
|
4035
|
+
b && (i.value = !1), o("update:modelValue", new URLSearchParams(_).toString());
|
|
4040
4036
|
};
|
|
4041
|
-
return (
|
|
4042
|
-
const
|
|
4043
|
-
return e.config.isExactMatch ? (d(), L
|
|
4037
|
+
return (b, _) => {
|
|
4038
|
+
const L = q("KInput"), v = q("KButton"), S = q("KSelect"), D = q("KMenuItem"), re = q("KMenu");
|
|
4039
|
+
return e.config.isExactMatch ? (d(), P(L, {
|
|
4044
4040
|
key: 0,
|
|
4045
4041
|
autocomplete: "off",
|
|
4046
4042
|
class: "kong-ui-entity-filter-input",
|
|
@@ -4053,86 +4049,86 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4053
4049
|
E(fn)
|
|
4054
4050
|
]),
|
|
4055
4051
|
_: 1
|
|
4056
|
-
}, 8, ["model-value", "placeholder"])) : (d(),
|
|
4057
|
-
E(
|
|
4052
|
+
}, 8, ["model-value", "placeholder"])) : (d(), j("div", Qs, [
|
|
4053
|
+
E(v, {
|
|
4058
4054
|
appearance: "tertiary",
|
|
4059
4055
|
"data-testid": "filter-button",
|
|
4060
4056
|
onClick: u
|
|
4061
4057
|
}, {
|
|
4062
4058
|
default: g(() => [
|
|
4063
4059
|
E(fn),
|
|
4064
|
-
Z(" " +
|
|
4060
|
+
Z(" " + N(m(t)("filter.filterButtonText")) + " " + N(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
4065
4061
|
]),
|
|
4066
4062
|
_: 1
|
|
4067
4063
|
}),
|
|
4068
|
-
|
|
4064
|
+
Je(V("div", {
|
|
4069
4065
|
class: "kong-ui-entity-filter-backdrop",
|
|
4070
4066
|
onClick: u
|
|
4071
4067
|
}, null, 512), [
|
|
4072
|
-
[
|
|
4068
|
+
[Ye, i.value]
|
|
4073
4069
|
]),
|
|
4074
|
-
|
|
4070
|
+
Je(E(re, { class: "kong-ui-entity-filter-menu" }, {
|
|
4075
4071
|
body: g(() => [
|
|
4076
|
-
(d(!0),
|
|
4077
|
-
key:
|
|
4078
|
-
"data-testid":
|
|
4072
|
+
(d(!0), j(Ce, null, ve(l.value, (R, C) => (d(), P(D, {
|
|
4073
|
+
key: R.value,
|
|
4074
|
+
"data-testid": R.value,
|
|
4079
4075
|
expandable: "",
|
|
4080
|
-
"last-menu-item":
|
|
4076
|
+
"last-menu-item": C === l.value.length - 1
|
|
4081
4077
|
}, {
|
|
4082
4078
|
itemTitle: g(() => [
|
|
4083
|
-
V("span",
|
|
4084
|
-
Z(
|
|
4085
|
-
|
|
4086
|
-
[
|
|
4079
|
+
V("span", Xs, [
|
|
4080
|
+
Z(N(R.label) + " ", 1),
|
|
4081
|
+
Je(V("span", el, null, 512), [
|
|
4082
|
+
[Ye, s.value.includes(R.value)]
|
|
4087
4083
|
])
|
|
4088
4084
|
])
|
|
4089
4085
|
]),
|
|
4090
4086
|
itemBody: g(() => {
|
|
4091
|
-
var
|
|
4087
|
+
var G, K;
|
|
4092
4088
|
return [
|
|
4093
|
-
V("div",
|
|
4089
|
+
V("div", tl, [
|
|
4094
4090
|
V("label", {
|
|
4095
4091
|
class: "menu-item-label",
|
|
4096
|
-
for: c(
|
|
4097
|
-
},
|
|
4098
|
-
((
|
|
4092
|
+
for: c(R.value)
|
|
4093
|
+
}, N(m(t)("filter.fieldLabel")), 9, nl),
|
|
4094
|
+
((K = (G = e.config.schema) == null ? void 0 : G[R.value]) == null ? void 0 : K.type) === "select" ? (d(), P(S, {
|
|
4099
4095
|
key: 0,
|
|
4100
|
-
id: c(
|
|
4101
|
-
modelValue: a.value[
|
|
4102
|
-
"onUpdate:modelValue": (I) => a.value[
|
|
4096
|
+
id: c(R.value),
|
|
4097
|
+
modelValue: a.value[R.value],
|
|
4098
|
+
"onUpdate:modelValue": (I) => a.value[R.value] = I,
|
|
4103
4099
|
appearance: "select",
|
|
4104
|
-
items: y(
|
|
4100
|
+
items: y(R.value),
|
|
4105
4101
|
placeholder: m(t)("filter.selectPlaceholder")
|
|
4106
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (d(), L
|
|
4102
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (d(), P(L, {
|
|
4107
4103
|
key: 1,
|
|
4108
|
-
id: c(
|
|
4109
|
-
modelValue: a.value[
|
|
4110
|
-
"onUpdate:modelValue": (I) => a.value[
|
|
4104
|
+
id: c(R.value),
|
|
4105
|
+
modelValue: a.value[R.value],
|
|
4106
|
+
"onUpdate:modelValue": (I) => a.value[R.value] = I,
|
|
4111
4107
|
autocomplete: "off",
|
|
4112
4108
|
placeholder: m(t)("filter.inputPlaceholder"),
|
|
4113
|
-
type: f(
|
|
4109
|
+
type: f(R.value)
|
|
4114
4110
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4115
4111
|
]),
|
|
4116
|
-
V("div",
|
|
4117
|
-
E(
|
|
4112
|
+
V("div", rl, [
|
|
4113
|
+
E(v, {
|
|
4118
4114
|
appearance: "tertiary",
|
|
4119
4115
|
"data-testid": "apply-filter",
|
|
4120
4116
|
size: "small",
|
|
4121
|
-
onClick:
|
|
4117
|
+
onClick: _[0] || (_[0] = (I) => A(!0))
|
|
4122
4118
|
}, {
|
|
4123
4119
|
default: g(() => [
|
|
4124
|
-
Z(
|
|
4120
|
+
Z(N(m(t)("filter.applyButtonText")), 1)
|
|
4125
4121
|
]),
|
|
4126
4122
|
_: 1
|
|
4127
4123
|
}),
|
|
4128
|
-
E(
|
|
4124
|
+
E(v, {
|
|
4129
4125
|
appearance: "tertiary",
|
|
4130
4126
|
"data-testid": "clear-filter",
|
|
4131
4127
|
size: "small",
|
|
4132
|
-
onClick: (I) =>
|
|
4128
|
+
onClick: (I) => w(R.value)
|
|
4133
4129
|
}, {
|
|
4134
4130
|
default: g(() => [
|
|
4135
|
-
Z(
|
|
4131
|
+
Z(N(m(t)("filter.clearButtonText")), 1)
|
|
4136
4132
|
]),
|
|
4137
4133
|
_: 2
|
|
4138
4134
|
}, 1032, ["onClick"])
|
|
@@ -4143,14 +4139,14 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4143
4139
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
4144
4140
|
]),
|
|
4145
4141
|
actionButton: g(() => [
|
|
4146
|
-
V("div",
|
|
4147
|
-
E(
|
|
4142
|
+
V("div", ol, [
|
|
4143
|
+
E(v, {
|
|
4148
4144
|
appearance: "tertiary",
|
|
4149
4145
|
size: "small",
|
|
4150
|
-
onClick:
|
|
4146
|
+
onClick: h
|
|
4151
4147
|
}, {
|
|
4152
4148
|
default: g(() => [
|
|
4153
|
-
Z(
|
|
4149
|
+
Z(N(m(t)("filter.clearAllButtonText")), 1)
|
|
4154
4150
|
]),
|
|
4155
4151
|
_: 1
|
|
4156
4152
|
})
|
|
@@ -4158,12 +4154,12 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4158
4154
|
]),
|
|
4159
4155
|
_: 1
|
|
4160
4156
|
}, 512), [
|
|
4161
|
-
[
|
|
4157
|
+
[Ye, i.value]
|
|
4162
4158
|
])
|
|
4163
4159
|
]));
|
|
4164
4160
|
};
|
|
4165
4161
|
}
|
|
4166
|
-
}),
|
|
4162
|
+
}), il = /* @__PURE__ */ _e(al, [["__scopeId", "data-v-15962ee2"]]), tt = /* @__PURE__ */ ae({
|
|
4167
4163
|
__name: "PermissionsWrapper",
|
|
4168
4164
|
props: {
|
|
4169
4165
|
/**
|
|
@@ -4188,21 +4184,21 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4188
4184
|
const n = e, t = F(void 0), r = x(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
4189
4185
|
return Te(() => n.authFunction, async () => {
|
|
4190
4186
|
t.value = await n.authFunction();
|
|
4191
|
-
}, { immediate: !0 }), (o, i) => r.value ?
|
|
4187
|
+
}, { immediate: !0 }), (o, i) => r.value ? X(o.$slots, "default", {
|
|
4192
4188
|
key: 0,
|
|
4193
4189
|
isAllowed: t.value
|
|
4194
4190
|
}) : z("", !0);
|
|
4195
4191
|
}
|
|
4196
|
-
}),
|
|
4192
|
+
}), sl = { class: "form-section-wrapper" }, ll = {
|
|
4197
4193
|
key: 0,
|
|
4198
4194
|
class: "form-section-title"
|
|
4199
|
-
},
|
|
4195
|
+
}, ul = {
|
|
4200
4196
|
key: 1,
|
|
4201
4197
|
class: "form-section-description"
|
|
4202
|
-
},
|
|
4198
|
+
}, cl = {
|
|
4203
4199
|
key: 2,
|
|
4204
4200
|
class: "form-section-footer"
|
|
4205
|
-
},
|
|
4201
|
+
}, dl = { class: "form-section-content" }, pl = /* @__PURE__ */ ae({
|
|
4206
4202
|
__name: "EntityFormSection",
|
|
4207
4203
|
props: {
|
|
4208
4204
|
title: {
|
|
@@ -4228,34 +4224,34 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4228
4224
|
},
|
|
4229
4225
|
setup(e) {
|
|
4230
4226
|
const n = ct();
|
|
4231
|
-
return (t, r) => (d(),
|
|
4232
|
-
class:
|
|
4227
|
+
return (t, r) => (d(), j("fieldset", {
|
|
4228
|
+
class: Ee(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4233
4229
|
}, [
|
|
4234
|
-
V("div",
|
|
4235
|
-
e.hideInfoHeader ? z("", !0) : (d(),
|
|
4230
|
+
V("div", sl, [
|
|
4231
|
+
e.hideInfoHeader ? z("", !0) : (d(), j("div", {
|
|
4236
4232
|
key: 0,
|
|
4237
|
-
class:
|
|
4233
|
+
class: Ee(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4238
4234
|
}, [
|
|
4239
|
-
e.title ? (d(),
|
|
4240
|
-
e.description || m(n).description ? (d(),
|
|
4241
|
-
|
|
4242
|
-
V("p", null,
|
|
4235
|
+
e.title ? (d(), j("h4", ll, N(e.title), 1)) : z("", !0),
|
|
4236
|
+
e.description || m(n).description ? (d(), j("div", ul, [
|
|
4237
|
+
X(t.$slots, "description", {}, () => [
|
|
4238
|
+
V("p", null, N(e.description), 1)
|
|
4243
4239
|
], !0)
|
|
4244
4240
|
])) : z("", !0),
|
|
4245
|
-
m(n).footer ? (d(),
|
|
4246
|
-
|
|
4241
|
+
m(n).footer ? (d(), j("div", cl, [
|
|
4242
|
+
X(t.$slots, "footer", {}, void 0, !0)
|
|
4247
4243
|
])) : z("", !0)
|
|
4248
4244
|
], 2)),
|
|
4249
|
-
V("div",
|
|
4250
|
-
|
|
4245
|
+
V("div", dl, [
|
|
4246
|
+
X(t.$slots, "default", {}, void 0, !0)
|
|
4251
4247
|
])
|
|
4252
4248
|
])
|
|
4253
4249
|
], 2));
|
|
4254
4250
|
}
|
|
4255
|
-
}), mn = /* @__PURE__ */
|
|
4251
|
+
}), mn = /* @__PURE__ */ _e(pl, [["__scopeId", "data-v-3565daa7"]]), { useAxios: Kt, useDeleteUrlBuilder: fl, useErrors: ml, useExternalLinkCreator: Nl, useFetchUrlBuilder: Kl, useFetcher: gl, useDebouncedFilter: yr, useStringHelpers: ql, useHelpers: Bl, useGatewayFeatureSupported: Ll, useTruncationDetector: Ul } = ce, yl = { class: "add-to-group-form-container" }, hl = { class: "add-to-group-cta-text" }, vl = {
|
|
4256
4252
|
key: 0,
|
|
4257
4253
|
class: "kong-ui-entity-add-to-groups-error"
|
|
4258
|
-
},
|
|
4254
|
+
}, bl = { key: 0 }, Cl = /* @__PURE__ */ ae({
|
|
4259
4255
|
__name: "AddToGroupModal",
|
|
4260
4256
|
props: {
|
|
4261
4257
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4272,9 +4268,9 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4272
4268
|
},
|
|
4273
4269
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4274
4270
|
setup(e, { emit: n }) {
|
|
4275
|
-
var
|
|
4271
|
+
var K;
|
|
4276
4272
|
const { i18n: { t } } = pt.useI18n(), r = e, o = n, { axiosInstance: i } = Kt({
|
|
4277
|
-
headers: (
|
|
4273
|
+
headers: (K = r.config) == null ? void 0 : K.requestHeaders
|
|
4278
4274
|
}), a = F([]), {
|
|
4279
4275
|
debouncedQueryChange: s,
|
|
4280
4276
|
loading: l,
|
|
@@ -4284,103 +4280,103 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4284
4280
|
results: y
|
|
4285
4281
|
} = yr(
|
|
4286
4282
|
r.config,
|
|
4287
|
-
|
|
4283
|
+
Me.list[r.config.app].all,
|
|
4288
4284
|
"",
|
|
4289
4285
|
{
|
|
4290
4286
|
fetchedItemsKey: "data",
|
|
4291
4287
|
searchKeys: ["name", "id"]
|
|
4292
4288
|
}
|
|
4293
|
-
), f = x(() => p.value ? t("consumer_groups.errors.general") : ""),
|
|
4289
|
+
), f = x(() => p.value ? t("consumer_groups.errors.general") : ""), w = F(0), h = x(() => u.value === void 0), A = x(() => y.value.map((I) => ({
|
|
4294
4290
|
label: I.name,
|
|
4295
4291
|
value: I.id,
|
|
4296
4292
|
selected: a.value.includes(I.id),
|
|
4297
4293
|
data: I
|
|
4298
4294
|
// we need this to determine whether or not to show the description text
|
|
4299
|
-
}))),
|
|
4295
|
+
}))), b = (I) => {
|
|
4300
4296
|
var O;
|
|
4301
|
-
const
|
|
4302
|
-
return
|
|
4303
|
-
},
|
|
4304
|
-
|
|
4305
|
-
},
|
|
4297
|
+
const T = h.value ? y.value.find((B) => B.id === I) : (O = u.value) == null ? void 0 : O.find((B) => B.id === I);
|
|
4298
|
+
return T ? T.name : I;
|
|
4299
|
+
}, _ = () => {
|
|
4300
|
+
S.value = "", L.value = [], C.value = [], o("cancel");
|
|
4301
|
+
}, L = F([]), v = F(!1), S = F(""), D = async () => {
|
|
4306
4302
|
if (!a.value.length) {
|
|
4307
|
-
|
|
4303
|
+
S.value = "", C.value = [], o("cancel");
|
|
4308
4304
|
return;
|
|
4309
4305
|
}
|
|
4310
|
-
|
|
4306
|
+
v.value = !0, S.value = "", L.value = [], C.value = [];
|
|
4311
4307
|
try {
|
|
4312
|
-
const I = a.value.map((
|
|
4308
|
+
const I = a.value.map((B) => R(B)), T = await Promise.allSettled(I);
|
|
4313
4309
|
let O = !0;
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
}), O ? (
|
|
4310
|
+
T.forEach((B) => {
|
|
4311
|
+
B.status !== "fulfilled" && (O = !1);
|
|
4312
|
+
}), O ? (L.value = [], C.value = [], o("add:success", a.value), a.value = []) : (L.value.length && o("add:partial-success", L.value), a.value = [], G(T));
|
|
4317
4313
|
} catch {
|
|
4318
|
-
|
|
4314
|
+
S.value = t("consumer_groups.errors.add"), o("error", S.value);
|
|
4319
4315
|
} finally {
|
|
4320
|
-
|
|
4316
|
+
v.value = !1;
|
|
4321
4317
|
}
|
|
4322
|
-
},
|
|
4323
|
-
var
|
|
4324
|
-
let I = `${r.config.apiBaseUrl}${
|
|
4325
|
-
return r.config.app === "konnect" ? I = I.replace(/{controlPlaneId}/gi, ((
|
|
4326
|
-
}),
|
|
4327
|
-
const
|
|
4318
|
+
}, re = x(() => {
|
|
4319
|
+
var T, O, B, W;
|
|
4320
|
+
let I = `${r.config.apiBaseUrl}${Me.list[r.config.app].forConsumer}`;
|
|
4321
|
+
return r.config.app === "konnect" ? I = I.replace(/{controlPlaneId}/gi, ((T = r.config) == null ? void 0 : T.controlPlaneId) || "").replace(/{consumerId}/gi, ((O = r.config) == null ? void 0 : O.consumerId) || "") : r.config.app === "kongManager" && (I = I.replace(/\/{workspace}/gi, (B = r.config) != null && B.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((W = r.config) == null ? void 0 : W.consumerId) || "")), I;
|
|
4322
|
+
}), R = async (I) => {
|
|
4323
|
+
const T = {
|
|
4328
4324
|
group: I
|
|
4329
4325
|
};
|
|
4330
4326
|
try {
|
|
4331
|
-
const O = await i.post(
|
|
4332
|
-
return
|
|
4327
|
+
const O = await i.post(re.value, T);
|
|
4328
|
+
return L.value.push(I), O;
|
|
4333
4329
|
} catch (O) {
|
|
4334
|
-
let
|
|
4335
|
-
return O.response.status === 409 && (
|
|
4330
|
+
let B = `${b(I)} - ${O.message}`;
|
|
4331
|
+
return O.response.status === 409 && (B = `${b(I)} - ${t("consumer_groups.errors.already_added")}`), Promise.reject(Error(B));
|
|
4336
4332
|
}
|
|
4337
|
-
},
|
|
4338
|
-
|
|
4333
|
+
}, C = F([]), G = (I) => {
|
|
4334
|
+
C.value = I.map((T) => {
|
|
4339
4335
|
var O;
|
|
4340
|
-
return (O =
|
|
4336
|
+
return (O = T.reason) == null ? void 0 : O.message;
|
|
4341
4337
|
}).filter(Boolean);
|
|
4342
4338
|
};
|
|
4343
4339
|
return Te(A, () => {
|
|
4344
|
-
|
|
4340
|
+
w.value++;
|
|
4345
4341
|
}, { immediate: !0, deep: !0 }), Te(() => r.visible, () => {
|
|
4346
4342
|
r.visible && c();
|
|
4347
|
-
}, { immediate: !0 }), (I,
|
|
4348
|
-
const O = q("KMultiselect"),
|
|
4349
|
-
return d(),
|
|
4350
|
-
"action-pending":
|
|
4343
|
+
}, { immediate: !0 }), (I, T) => {
|
|
4344
|
+
const O = q("KMultiselect"), B = q("KAlert"), W = q("KPrompt");
|
|
4345
|
+
return d(), P(W, {
|
|
4346
|
+
"action-pending": v.value,
|
|
4351
4347
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
4352
4348
|
"data-testid": "add-to-group-modal",
|
|
4353
4349
|
"is-visible": e.visible,
|
|
4354
4350
|
title: m(t)("consumer_groups.consumers.add.title"),
|
|
4355
|
-
onCanceled:
|
|
4356
|
-
onProceed:
|
|
4351
|
+
onCanceled: _,
|
|
4352
|
+
onProceed: D
|
|
4357
4353
|
}, {
|
|
4358
4354
|
"body-content": g(() => [
|
|
4359
|
-
V("div",
|
|
4360
|
-
V("p",
|
|
4355
|
+
V("div", yl, [
|
|
4356
|
+
V("p", hl, N(m(t)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4361
4357
|
E(O, {
|
|
4362
4358
|
modelValue: a.value,
|
|
4363
|
-
"onUpdate:modelValue":
|
|
4359
|
+
"onUpdate:modelValue": T[0] || (T[0] = (ee) => a.value = ee),
|
|
4364
4360
|
autosuggest: "",
|
|
4365
4361
|
"data-testid": "add-to-groups-multiselect",
|
|
4366
|
-
"dropdown-footer-text":
|
|
4362
|
+
"dropdown-footer-text": h.value ? m(t)("consumer_groups.consumers.add.footer") : void 0,
|
|
4367
4363
|
items: A.value,
|
|
4368
4364
|
label: m(t)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
4369
4365
|
loading: m(l),
|
|
4370
4366
|
placeholder: m(t)("consumer_groups.consumers.add.consumer_group_placeholder"),
|
|
4371
|
-
readonly:
|
|
4367
|
+
readonly: v.value,
|
|
4372
4368
|
required: "",
|
|
4373
4369
|
width: "100%",
|
|
4374
4370
|
onQueryChange: m(s)
|
|
4375
4371
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4376
|
-
|
|
4377
|
-
E(
|
|
4372
|
+
S.value || f.value || C.value.length ? (d(), j("div", vl, [
|
|
4373
|
+
E(B, { appearance: "danger" }, {
|
|
4378
4374
|
alertMessage: g(() => [
|
|
4379
|
-
V("p", null,
|
|
4380
|
-
|
|
4381
|
-
(d(!0),
|
|
4375
|
+
V("p", null, N(m(t)("consumer_groups.errors.add")), 1),
|
|
4376
|
+
C.value.length ? (d(), j("ul", bl, [
|
|
4377
|
+
(d(!0), j(Ce, null, ve(C.value, (ee, te) => (d(), j("li", { key: te }, N(ee), 1))), 128))
|
|
4382
4378
|
])) : z("", !0),
|
|
4383
|
-
V("div", null,
|
|
4379
|
+
V("div", null, N(S.value || f.value), 1)
|
|
4384
4380
|
]),
|
|
4385
4381
|
_: 1
|
|
4386
4382
|
})
|
|
@@ -4391,12 +4387,12 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4391
4387
|
}, 8, ["action-pending", "is-visible", "title"]);
|
|
4392
4388
|
};
|
|
4393
4389
|
}
|
|
4394
|
-
}),
|
|
4390
|
+
}), qt = (e, n) => {
|
|
4395
4391
|
const t = e.__vccOpts || e;
|
|
4396
4392
|
for (const [r, o] of n)
|
|
4397
4393
|
t[r] = o;
|
|
4398
4394
|
return t;
|
|
4399
|
-
},
|
|
4395
|
+
}, kl = /* @__PURE__ */ qt(Cl, [["__scopeId", "data-v-3808b4c0"]]), _l = { class: "kong-ui-entities-consumer-groups-list" }, wl = { key: 1 }, Il = /* @__PURE__ */ ae({
|
|
4400
4396
|
__name: "ConsumerGroupList",
|
|
4401
4397
|
props: {
|
|
4402
4398
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4442,132 +4438,132 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4442
4438
|
},
|
|
4443
4439
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4444
4440
|
setup(e, { emit: n }) {
|
|
4445
|
-
var
|
|
4441
|
+
var Ut;
|
|
4446
4442
|
const t = n, r = e, { i18nT: o, i18n: { t: i } } = pt.useI18n(), a = At(), { axiosInstance: s } = Kt({
|
|
4447
|
-
headers: (
|
|
4443
|
+
headers: (Ut = r.config) == null ? void 0 : Ut.requestHeaders
|
|
4448
4444
|
}), l = F(1), u = x(() => !!r.config.consumerId), p = x(
|
|
4449
4445
|
() => u.value ? "kong-ui-entities-consumer-groups-list-in-consumer-page" : "kong-ui-entities-consumer-groups-list"
|
|
4450
4446
|
), c = x(() => r.config.app !== "kongManager" || !!r.config.disableSorting), y = {
|
|
4451
4447
|
name: { label: i("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4452
4448
|
};
|
|
4453
4449
|
r.config.app === "kongManager" && (y.consumers_count = { label: i("consumer_groups.list.table_headers.consumers_count"), searchable: !1, sortable: !1 }), y.tags = { label: i("consumer_groups.list.table_headers.tags"), sortable: !1 };
|
|
4454
|
-
const f = y,
|
|
4455
|
-
"data-testid":
|
|
4456
|
-
}),
|
|
4450
|
+
const f = y, w = ($) => ({
|
|
4451
|
+
"data-testid": $.username ?? $.custom_id ?? $.id
|
|
4452
|
+
}), h = x(() => {
|
|
4457
4453
|
var Y, se, he, Ie;
|
|
4458
|
-
let
|
|
4459
|
-
return r.config.app === "konnect" ?
|
|
4460
|
-
}), A = F(""),
|
|
4461
|
-
const
|
|
4462
|
-
return
|
|
4463
|
-
isExactMatch:
|
|
4454
|
+
let $ = `${r.config.apiBaseUrl}${Me.list[r.config.app][u.value ? "forConsumer" : "all"]}`;
|
|
4455
|
+
return r.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((Y = r.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((se = r.config) == null ? void 0 : se.consumerId) || "") : r.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (he = r.config) != null && he.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((Ie = r.config) == null ? void 0 : Ie.consumerId) || "")), $;
|
|
4456
|
+
}), A = F(""), b = x(() => {
|
|
4457
|
+
const $ = r.config.app === "konnect" || r.config.isExactMatch;
|
|
4458
|
+
return $ ? {
|
|
4459
|
+
isExactMatch: $,
|
|
4464
4460
|
fields: {
|
|
4465
4461
|
username: y.name,
|
|
4466
4462
|
id: { label: i("consumer_groups.list.table_headers.id") }
|
|
4467
4463
|
},
|
|
4468
4464
|
placeholder: i("consumer_groups.search.placeholder")
|
|
4469
4465
|
} : {
|
|
4470
|
-
isExactMatch:
|
|
4466
|
+
isExactMatch: $,
|
|
4471
4467
|
fields: {
|
|
4472
4468
|
name: y.name
|
|
4473
4469
|
},
|
|
4474
4470
|
schema: r.config.filterSchema
|
|
4475
4471
|
};
|
|
4476
|
-
}),
|
|
4472
|
+
}), _ = x(() => u.value && !r.config.paginatedEndpoint ? "consumer_groups" : void 0), { fetcher: L, fetcherState: v } = gl(r.config, h.value, _.value), S = () => {
|
|
4477
4473
|
A.value = "";
|
|
4478
|
-
},
|
|
4474
|
+
}, D = () => {
|
|
4479
4475
|
l.value++;
|
|
4480
|
-
},
|
|
4481
|
-
const se =
|
|
4476
|
+
}, re = F(null), R = ($, Y) => {
|
|
4477
|
+
const se = $.id;
|
|
4482
4478
|
if (!Y(se)) {
|
|
4483
4479
|
t("copy:error", {
|
|
4484
|
-
entity:
|
|
4480
|
+
entity: $,
|
|
4485
4481
|
field: "id",
|
|
4486
4482
|
message: i("consumer_groups.errors.copy")
|
|
4487
4483
|
});
|
|
4488
4484
|
return;
|
|
4489
4485
|
}
|
|
4490
4486
|
t("copy:success", {
|
|
4491
|
-
entity:
|
|
4487
|
+
entity: $,
|
|
4492
4488
|
field: "id",
|
|
4493
4489
|
message: i("consumer_groups.copy.success", { val: se })
|
|
4494
4490
|
});
|
|
4495
|
-
},
|
|
4496
|
-
const se = JSON.stringify(
|
|
4491
|
+
}, C = ($, Y) => {
|
|
4492
|
+
const se = JSON.stringify($);
|
|
4497
4493
|
if (!Y(se)) {
|
|
4498
4494
|
t("copy:error", {
|
|
4499
|
-
entity:
|
|
4495
|
+
entity: $,
|
|
4500
4496
|
message: i("consumer_groups.errors.copy")
|
|
4501
4497
|
});
|
|
4502
4498
|
return;
|
|
4503
4499
|
}
|
|
4504
4500
|
t("copy:success", {
|
|
4505
|
-
entity:
|
|
4501
|
+
entity: $,
|
|
4506
4502
|
message: i("consumer_groups.copy.success_brief")
|
|
4507
4503
|
});
|
|
4508
|
-
},
|
|
4504
|
+
}, G = async ($) => {
|
|
4509
4505
|
var se;
|
|
4510
|
-
await ((se = r.canRetrieve) == null ? void 0 : se.call(r,
|
|
4511
|
-
},
|
|
4506
|
+
await ((se = r.canRetrieve) == null ? void 0 : se.call(r, $)) && a.push(r.config.getViewRoute($.id));
|
|
4507
|
+
}, K = ($) => ({
|
|
4512
4508
|
label: i("consumer_groups.actions.view"),
|
|
4513
|
-
to: r.config.getViewRoute(
|
|
4514
|
-
}), I = (
|
|
4509
|
+
to: r.config.getViewRoute($)
|
|
4510
|
+
}), I = ($) => ({
|
|
4515
4511
|
label: i("consumer_groups.actions.edit"),
|
|
4516
|
-
to: r.config.getEditRoute(
|
|
4517
|
-
}),
|
|
4518
|
-
|
|
4519
|
-
},
|
|
4512
|
+
to: r.config.getEditRoute($)
|
|
4513
|
+
}), T = F(void 0), O = F(!1), B = F(!1), W = F(""), ee = fl(r.config, h.value), te = ($) => {
|
|
4514
|
+
T.value = $, O.value = !0;
|
|
4515
|
+
}, ne = () => {
|
|
4520
4516
|
O.value = !1;
|
|
4521
4517
|
}, de = async () => {
|
|
4522
|
-
var
|
|
4523
|
-
if ((
|
|
4524
|
-
|
|
4518
|
+
var $, Y, se;
|
|
4519
|
+
if (($ = T.value) != null && $.id) {
|
|
4520
|
+
B.value = !0;
|
|
4525
4521
|
try {
|
|
4526
|
-
await s.delete(
|
|
4522
|
+
await s.delete(ee(T.value.id)), B.value = !1, O.value = !1, l.value++, t("delete:success", T.value);
|
|
4527
4523
|
} catch (he) {
|
|
4528
4524
|
W.value = ((se = (Y = he.response) == null ? void 0 : Y.data) == null ? void 0 : se.message) || he.message || i("consumer_groups.errors.delete"), t("error", he);
|
|
4529
4525
|
} finally {
|
|
4530
|
-
|
|
4526
|
+
B.value = !1;
|
|
4531
4527
|
}
|
|
4532
4528
|
}
|
|
4533
|
-
},
|
|
4534
|
-
|
|
4535
|
-
},
|
|
4536
|
-
|
|
4537
|
-
}, ie = (
|
|
4538
|
-
Y ||
|
|
4539
|
-
},
|
|
4540
|
-
u.value &&
|
|
4541
|
-
},
|
|
4542
|
-
|
|
4543
|
-
},
|
|
4544
|
-
fe.value = !1,
|
|
4545
|
-
},
|
|
4529
|
+
}, Le = F(!1), k = () => {
|
|
4530
|
+
Le.value = !0;
|
|
4531
|
+
}, U = () => {
|
|
4532
|
+
Le.value = !1;
|
|
4533
|
+
}, ie = ($, Y) => {
|
|
4534
|
+
Y || U(), l.value++, t("add:success", $);
|
|
4535
|
+
}, J = () => {
|
|
4536
|
+
u.value && k();
|
|
4537
|
+
}, H = F(void 0), fe = F(!1), we = F(""), me = ($) => {
|
|
4538
|
+
H.value = $, fe.value = !0;
|
|
4539
|
+
}, Ne = () => {
|
|
4540
|
+
fe.value = !1, H.value = void 0;
|
|
4541
|
+
}, et = x(() => {
|
|
4546
4542
|
var Y, se, he, Ie;
|
|
4547
|
-
let
|
|
4548
|
-
return r.config.app === "konnect" ?
|
|
4549
|
-
}),
|
|
4550
|
-
if (
|
|
4551
|
-
|
|
4543
|
+
let $ = `${r.config.apiBaseUrl}${Me.list[r.config.app].oneForConsumer}`;
|
|
4544
|
+
return r.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((Y = r.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((se = r.config) == null ? void 0 : se.consumerId) || "") : r.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (he = r.config) != null && he.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((Ie = r.config) == null ? void 0 : Ie.consumerId) || "")), $;
|
|
4545
|
+
}), Bt = F(!1), hr = async () => {
|
|
4546
|
+
if (H.value) {
|
|
4547
|
+
Bt.value = !0;
|
|
4552
4548
|
try {
|
|
4553
|
-
const
|
|
4554
|
-
await s.delete(
|
|
4555
|
-
} catch (
|
|
4556
|
-
|
|
4549
|
+
const $ = et.value.replace(/{consumerGroupId}/gi, H.value.id);
|
|
4550
|
+
await s.delete($), t("remove:success", H.value), Ne(), l.value++;
|
|
4551
|
+
} catch ($) {
|
|
4552
|
+
we.value = $.message || i("consumer_groups.errors.delete"), t("error", $);
|
|
4557
4553
|
} finally {
|
|
4558
|
-
|
|
4554
|
+
Bt.value = !1;
|
|
4559
4555
|
}
|
|
4560
4556
|
}
|
|
4561
|
-
},
|
|
4562
|
-
Te(
|
|
4557
|
+
}, Lt = F(!0);
|
|
4558
|
+
Te(v, ($) => {
|
|
4563
4559
|
var Y, se, he, Ie;
|
|
4564
|
-
if (Array.isArray((Y =
|
|
4565
|
-
|
|
4560
|
+
if (Array.isArray((Y = $ == null ? void 0 : $.response) == null ? void 0 : Y.data) && (Lt.value = $.response.data.length > 0), $.status === Ke.Error) {
|
|
4561
|
+
re.value = {
|
|
4566
4562
|
title: i("consumer_groups.errors.general")
|
|
4567
|
-
}, (Ie = (he = (se =
|
|
4563
|
+
}, (Ie = (he = (se = $.error) == null ? void 0 : se.response) == null ? void 0 : he.data) != null && Ie.message && (re.value.message = $.error.response.data.message), t("error", $.error);
|
|
4568
4564
|
return;
|
|
4569
4565
|
}
|
|
4570
|
-
|
|
4566
|
+
re.value = null;
|
|
4571
4567
|
});
|
|
4572
4568
|
const mt = F({
|
|
4573
4569
|
ctaPath: u.value ? void 0 : r.config.createRoute,
|
|
@@ -4577,60 +4573,60 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4577
4573
|
});
|
|
4578
4574
|
return dt(async () => {
|
|
4579
4575
|
await r.canCreate() && (mt.value.title = u.value ? i("consumer_groups.list.empty_state.title_for_consumer") : i("consumer_groups.list.empty_state.title"), mt.value.ctaText = u.value ? i("consumer_groups.actions.add_to_group") : i("consumer_groups.actions.create"));
|
|
4580
|
-
}), (
|
|
4581
|
-
const se = q("KButton"), he = q("KBadge"), Ie = q("KTruncate"),
|
|
4582
|
-
return d(),
|
|
4583
|
-
E(m(
|
|
4576
|
+
}), ($, Y) => {
|
|
4577
|
+
const se = q("KButton"), he = q("KBadge"), Ie = q("KTruncate"), He = q("KDropdownItem"), Pt = q("KClipboardProvider"), vr = q("KPrompt");
|
|
4578
|
+
return d(), j("div", _l, [
|
|
4579
|
+
E(m(Ds), {
|
|
4584
4580
|
"cache-identifier": e.cacheIdentifier,
|
|
4585
4581
|
"disable-pagination": u.value && !e.config.paginatedEndpoint,
|
|
4586
4582
|
"disable-pagination-page-jump": "",
|
|
4587
4583
|
"disable-sorting": c.value,
|
|
4588
4584
|
"empty-state-options": mt.value,
|
|
4589
4585
|
"enable-entity-actions": "",
|
|
4590
|
-
"error-message":
|
|
4591
|
-
fetcher: m(
|
|
4586
|
+
"error-message": re.value,
|
|
4587
|
+
fetcher: m(L),
|
|
4592
4588
|
"fetcher-cache-key": l.value,
|
|
4593
4589
|
"pagination-type": "offset",
|
|
4594
4590
|
"preferences-storage-key": p.value,
|
|
4595
4591
|
query: A.value,
|
|
4596
|
-
"row-attributes":
|
|
4592
|
+
"row-attributes": w,
|
|
4597
4593
|
"table-headers": m(f),
|
|
4598
4594
|
"use-action-outside": e.useActionOutside,
|
|
4599
|
-
onClearSearchInput:
|
|
4600
|
-
"onClick:row": Y[3] || (Y[3] = (Q) =>
|
|
4601
|
-
onEmptyStateCtaClicked:
|
|
4602
|
-
onSort:
|
|
4595
|
+
onClearSearchInput: S,
|
|
4596
|
+
"onClick:row": Y[3] || (Y[3] = (Q) => G(Q)),
|
|
4597
|
+
onEmptyStateCtaClicked: J,
|
|
4598
|
+
onSort: D
|
|
4603
4599
|
}, {
|
|
4604
4600
|
"toolbar-filter": g(() => [
|
|
4605
|
-
u.value ? z("", !0) : (d(),
|
|
4601
|
+
u.value ? z("", !0) : (d(), P(m(il), {
|
|
4606
4602
|
key: 0,
|
|
4607
4603
|
modelValue: A.value,
|
|
4608
4604
|
"onUpdate:modelValue": Y[0] || (Y[0] = (Q) => A.value = Q),
|
|
4609
|
-
config:
|
|
4605
|
+
config: b.value
|
|
4610
4606
|
}, null, 8, ["modelValue", "config"]))
|
|
4611
4607
|
]),
|
|
4612
4608
|
"toolbar-button": g(() => [
|
|
4613
|
-
(d(),
|
|
4609
|
+
(d(), P(Be(e.useActionOutside ? "Teleport" : "div"), {
|
|
4614
4610
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
4615
4611
|
}, {
|
|
4616
4612
|
default: g(() => [
|
|
4617
|
-
E(m(
|
|
4613
|
+
E(m(tt), {
|
|
4618
4614
|
"auth-function": () => e.canCreate()
|
|
4619
4615
|
}, {
|
|
4620
4616
|
default: g(() => [
|
|
4621
|
-
|
|
4617
|
+
Je(E(se, {
|
|
4622
4618
|
appearance: "primary",
|
|
4623
4619
|
"data-testid": "toolbar-add-consumer-group",
|
|
4624
4620
|
icon: "plus",
|
|
4625
4621
|
to: e.config.consumerId ? void 0 : e.config.createRoute,
|
|
4626
|
-
onClick: Y[1] || (Y[1] = () => e.config.consumerId ?
|
|
4622
|
+
onClick: Y[1] || (Y[1] = () => e.config.consumerId ? k() : void 0)
|
|
4627
4623
|
}, {
|
|
4628
4624
|
default: g(() => [
|
|
4629
|
-
Z(
|
|
4625
|
+
Z(N(e.config.consumerId ? m(i)("consumer_groups.actions.add_to_group") : m(i)("consumer_groups.list.toolbar_actions.new_consumer_group")), 1)
|
|
4630
4626
|
]),
|
|
4631
4627
|
_: 1
|
|
4632
4628
|
}, 8, ["to"]), [
|
|
4633
|
-
[
|
|
4629
|
+
[Ye, Lt.value]
|
|
4634
4630
|
])
|
|
4635
4631
|
]),
|
|
4636
4632
|
_: 1
|
|
@@ -4640,92 +4636,92 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4640
4636
|
}, 8, ["to"]))
|
|
4641
4637
|
]),
|
|
4642
4638
|
name: g(({ rowValue: Q }) => [
|
|
4643
|
-
V("b", null,
|
|
4639
|
+
V("b", null, N(Q ?? "-"), 1)
|
|
4644
4640
|
]),
|
|
4645
4641
|
consumers_count: g(({ rowValue: Q }) => [
|
|
4646
|
-
Z(
|
|
4642
|
+
Z(N(Q ?? "-"), 1)
|
|
4647
4643
|
]),
|
|
4648
4644
|
tags: g(({ rowValue: Q }) => [
|
|
4649
|
-
(Q == null ? void 0 : Q.length) > 0 ? (d(),
|
|
4645
|
+
(Q == null ? void 0 : Q.length) > 0 ? (d(), P(Ie, { key: 0 }, {
|
|
4650
4646
|
default: g(() => [
|
|
4651
|
-
(d(!0),
|
|
4652
|
-
key:
|
|
4653
|
-
onClick: Y[2] || (Y[2] =
|
|
4647
|
+
(d(!0), j(Ce, null, ve(Q, (Ue) => (d(), P(he, {
|
|
4648
|
+
key: Ue,
|
|
4649
|
+
onClick: Y[2] || (Y[2] = rt(() => {
|
|
4654
4650
|
}, ["stop"]))
|
|
4655
4651
|
}, {
|
|
4656
4652
|
default: g(() => [
|
|
4657
|
-
Z(
|
|
4653
|
+
Z(N(Ue), 1)
|
|
4658
4654
|
]),
|
|
4659
4655
|
_: 2
|
|
4660
4656
|
}, 1024))), 128))
|
|
4661
4657
|
]),
|
|
4662
4658
|
_: 2
|
|
4663
|
-
}, 1024)) : (d(),
|
|
4659
|
+
}, 1024)) : (d(), j("span", wl, "-"))
|
|
4664
4660
|
]),
|
|
4665
4661
|
actions: g(({ row: Q }) => [
|
|
4666
|
-
E(
|
|
4667
|
-
default: g(({ copyToClipboard:
|
|
4668
|
-
E(
|
|
4662
|
+
E(Pt, null, {
|
|
4663
|
+
default: g(({ copyToClipboard: Ue }) => [
|
|
4664
|
+
E(He, {
|
|
4669
4665
|
"data-testid": "action-entity-copy-id",
|
|
4670
|
-
onClick: (br) =>
|
|
4666
|
+
onClick: (br) => R(Q, Ue)
|
|
4671
4667
|
}, {
|
|
4672
4668
|
default: g(() => [
|
|
4673
|
-
Z(
|
|
4669
|
+
Z(N(m(i)("consumer_groups.actions.copy_id")), 1)
|
|
4674
4670
|
]),
|
|
4675
4671
|
_: 2
|
|
4676
4672
|
}, 1032, ["onClick"])
|
|
4677
4673
|
]),
|
|
4678
4674
|
_: 2
|
|
4679
4675
|
}, 1024),
|
|
4680
|
-
E(
|
|
4681
|
-
default: g(({ copyToClipboard:
|
|
4682
|
-
E(
|
|
4676
|
+
E(Pt, null, {
|
|
4677
|
+
default: g(({ copyToClipboard: Ue }) => [
|
|
4678
|
+
E(He, {
|
|
4683
4679
|
"data-testid": "action-entity-copy-json",
|
|
4684
|
-
onClick: (br) =>
|
|
4680
|
+
onClick: (br) => C(Q, Ue)
|
|
4685
4681
|
}, {
|
|
4686
4682
|
default: g(() => [
|
|
4687
|
-
Z(
|
|
4683
|
+
Z(N(m(i)("consumer_groups.actions.copy_json")), 1)
|
|
4688
4684
|
]),
|
|
4689
4685
|
_: 2
|
|
4690
4686
|
}, 1032, ["onClick"])
|
|
4691
4687
|
]),
|
|
4692
4688
|
_: 2
|
|
4693
4689
|
}, 1024),
|
|
4694
|
-
E(m(
|
|
4690
|
+
E(m(tt), {
|
|
4695
4691
|
"auth-function": () => e.canRetrieve(Q)
|
|
4696
4692
|
}, {
|
|
4697
4693
|
default: g(() => [
|
|
4698
|
-
E(
|
|
4694
|
+
E(He, {
|
|
4699
4695
|
"data-testid": "action-entity-view",
|
|
4700
4696
|
"has-divider": "",
|
|
4701
|
-
item:
|
|
4697
|
+
item: K(Q.id)
|
|
4702
4698
|
}, null, 8, ["item"])
|
|
4703
4699
|
]),
|
|
4704
4700
|
_: 2
|
|
4705
4701
|
}, 1032, ["auth-function"]),
|
|
4706
|
-
E(m(
|
|
4702
|
+
E(m(tt), {
|
|
4707
4703
|
"auth-function": () => e.canEdit(Q)
|
|
4708
4704
|
}, {
|
|
4709
4705
|
default: g(() => [
|
|
4710
|
-
E(
|
|
4706
|
+
E(He, {
|
|
4711
4707
|
"data-testid": "action-entity-edit",
|
|
4712
4708
|
item: I(Q.id)
|
|
4713
4709
|
}, null, 8, ["item"])
|
|
4714
4710
|
]),
|
|
4715
4711
|
_: 2
|
|
4716
4712
|
}, 1032, ["auth-function"]),
|
|
4717
|
-
E(m(
|
|
4713
|
+
E(m(tt), {
|
|
4718
4714
|
"auth-function": () => e.canDelete(Q)
|
|
4719
4715
|
}, {
|
|
4720
4716
|
default: g(() => [
|
|
4721
|
-
E(
|
|
4717
|
+
E(He, {
|
|
4722
4718
|
danger: "",
|
|
4723
4719
|
"data-testid": "action-entity-delete",
|
|
4724
4720
|
"has-divider": "",
|
|
4725
|
-
onClick: () => e.config.consumerId ? me(Q) :
|
|
4721
|
+
onClick: () => e.config.consumerId ? me(Q) : te(Q)
|
|
4726
4722
|
}, {
|
|
4727
4723
|
default: g(() => [
|
|
4728
|
-
Z(
|
|
4724
|
+
Z(N(e.config.consumerId ? m(i)("consumer_groups.actions.exit") : m(i)("consumer_groups.actions.delete")), 1)
|
|
4729
4725
|
]),
|
|
4730
4726
|
_: 2
|
|
4731
4727
|
}, 1032, ["onClick"])
|
|
@@ -4735,34 +4731,34 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4735
4731
|
]),
|
|
4736
4732
|
_: 1
|
|
4737
4733
|
}, 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"]),
|
|
4738
|
-
E(m(
|
|
4739
|
-
"action-pending":
|
|
4734
|
+
E(m(Hs), {
|
|
4735
|
+
"action-pending": B.value,
|
|
4740
4736
|
"data-testid": "delete-consumer-group-modal",
|
|
4741
4737
|
description: m(i)("consumer_groups.delete.description"),
|
|
4742
|
-
"entity-name":
|
|
4738
|
+
"entity-name": T.value && (T.value.name || T.value.id),
|
|
4743
4739
|
"entity-type": m(Cn).ConsumerGroup,
|
|
4744
4740
|
error: W.value,
|
|
4745
4741
|
title: m(i)("consumer_groups.delete.title"),
|
|
4746
4742
|
visible: O.value,
|
|
4747
|
-
onCancel:
|
|
4743
|
+
onCancel: ne,
|
|
4748
4744
|
onProceed: de
|
|
4749
4745
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4750
|
-
e.config.consumerId ? (d(),
|
|
4746
|
+
e.config.consumerId ? (d(), P(kl, {
|
|
4751
4747
|
key: 0,
|
|
4752
4748
|
config: e.config,
|
|
4753
4749
|
"data-testid": "add-to-group-modal",
|
|
4754
|
-
visible:
|
|
4750
|
+
visible: Le.value,
|
|
4755
4751
|
"onAdd:partialSuccess": Y[4] || (Y[4] = (Q) => ie(Q, !0)),
|
|
4756
4752
|
"onAdd:success": Y[5] || (Y[5] = (Q) => ie(Q)),
|
|
4757
|
-
onCancel:
|
|
4753
|
+
onCancel: U
|
|
4758
4754
|
}, null, 8, ["config", "visible"])) : z("", !0),
|
|
4759
|
-
e.config.consumerId &&
|
|
4755
|
+
e.config.consumerId && H.value ? (d(), P(vr, {
|
|
4760
4756
|
key: 1,
|
|
4761
4757
|
"data-testid": "exit-group-modal",
|
|
4762
4758
|
"is-visible": fe.value,
|
|
4763
4759
|
title: m(i)("consumer_groups.consumers.exit.title"),
|
|
4764
4760
|
type: "danger",
|
|
4765
|
-
onCanceled:
|
|
4761
|
+
onCanceled: Ne,
|
|
4766
4762
|
onProceed: hr
|
|
4767
4763
|
}, {
|
|
4768
4764
|
"body-content": g(() => [
|
|
@@ -4772,29 +4768,29 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4772
4768
|
tag: "p"
|
|
4773
4769
|
}, je({
|
|
4774
4770
|
consumerGroup: g(() => [
|
|
4775
|
-
V("strong", null,
|
|
4771
|
+
V("strong", null, N(H.value.name || H.value.id), 1)
|
|
4776
4772
|
]),
|
|
4777
4773
|
_: 2
|
|
4778
4774
|
}, [
|
|
4779
4775
|
e.config.consumerUsername ? {
|
|
4780
4776
|
name: "consumer",
|
|
4781
4777
|
fn: g(() => [
|
|
4782
|
-
V("strong", null,
|
|
4778
|
+
V("strong", null, N(e.config.consumerUsername), 1)
|
|
4783
4779
|
]),
|
|
4784
4780
|
key: "0"
|
|
4785
4781
|
} : void 0
|
|
4786
4782
|
]), 1032, ["keypath"]),
|
|
4787
|
-
V("p", null,
|
|
4783
|
+
V("p", null, N(m(i)("consumer_groups.consumers.exit.description")), 1)
|
|
4788
4784
|
]),
|
|
4789
4785
|
_: 1
|
|
4790
4786
|
}, 8, ["is-visible", "title"])) : z("", !0)
|
|
4791
4787
|
]);
|
|
4792
4788
|
};
|
|
4793
4789
|
}
|
|
4794
|
-
}), Pl = /* @__PURE__ */
|
|
4790
|
+
}), Pl = /* @__PURE__ */ qt(Il, [["__scopeId", "data-v-5e849c87"]]), Al = { class: "kong-ui-entities-consumer-group-form" }, Sl = { class: "select-item-label" }, xl = {
|
|
4795
4791
|
key: 0,
|
|
4796
4792
|
class: "select-item-desc"
|
|
4797
|
-
},
|
|
4793
|
+
}, Tl = /* @__PURE__ */ ae({
|
|
4798
4794
|
__name: "ConsumerGroupForm",
|
|
4799
4795
|
props: {
|
|
4800
4796
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4812,7 +4808,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4812
4808
|
},
|
|
4813
4809
|
emits: ["update", "error", "loading"],
|
|
4814
4810
|
setup(e, { emit: n }) {
|
|
4815
|
-
var
|
|
4811
|
+
var ne, de, Le;
|
|
4816
4812
|
const t = e, r = n, { i18n: { t: o } } = pt.useI18n(), i = At(), a = ot({
|
|
4817
4813
|
fields: {
|
|
4818
4814
|
name: "",
|
|
@@ -4831,129 +4827,129 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4831
4827
|
error: p,
|
|
4832
4828
|
loadItems: c,
|
|
4833
4829
|
results: y
|
|
4834
|
-
} = yr(t.config, (de =
|
|
4830
|
+
} = yr(t.config, (de = Me.form[(ne = t.config) == null ? void 0 : ne.app]) == null ? void 0 : de.consumersList, "", {
|
|
4835
4831
|
fetchedItemsKey: "data",
|
|
4836
4832
|
searchKeys: ["username", "custom_id", "id"]
|
|
4837
4833
|
}), { axiosInstance: f } = Kt({
|
|
4838
|
-
headers: (
|
|
4839
|
-
}), { getMessageFromError:
|
|
4840
|
-
label:
|
|
4841
|
-
value:
|
|
4842
|
-
selected: a.fields.consumers.includes(
|
|
4843
|
-
data:
|
|
4834
|
+
headers: (Le = t.config) == null ? void 0 : Le.requestHeaders
|
|
4835
|
+
}), { getMessageFromError: w } = ml(), h = x(() => y.value.map((k) => ({
|
|
4836
|
+
label: k.username || k.custom_id,
|
|
4837
|
+
value: k.id,
|
|
4838
|
+
selected: a.fields.consumers.includes(k.id),
|
|
4839
|
+
data: k
|
|
4844
4840
|
// we need this to determine whether or not to show the description text
|
|
4845
4841
|
}))), A = x(() => {
|
|
4846
|
-
var
|
|
4847
|
-
return (
|
|
4848
|
-
}),
|
|
4849
|
-
var
|
|
4850
|
-
let
|
|
4851
|
-
return ((
|
|
4852
|
-
},
|
|
4853
|
-
var
|
|
4854
|
-
i.push(((
|
|
4855
|
-
},
|
|
4856
|
-
r("error",
|
|
4857
|
-
},
|
|
4858
|
-
r("loading",
|
|
4859
|
-
},
|
|
4860
|
-
var ie,
|
|
4861
|
-
a.fields.name = ((ie =
|
|
4862
|
-
const
|
|
4863
|
-
if (a.fields.tags = (
|
|
4864
|
-
a.fields.consumers = ((fe =
|
|
4842
|
+
var k, U;
|
|
4843
|
+
return (U = Me.form[(k = t.config) == null ? void 0 : k.app]) == null ? void 0 : U.edit;
|
|
4844
|
+
}), b = x(() => t.consumerGroupId ? nt.Edit : nt.Create), _ = x(() => !!a.fields.name && !C.value), L = x(() => JSON.stringify(a.fields) !== JSON.stringify(s)), v = (k, U = "", ie = "") => {
|
|
4845
|
+
var H, fe, we, me, Ne, et;
|
|
4846
|
+
let J = `${(H = t.config) == null ? void 0 : H.apiBaseUrl}${Me.form[(fe = t.config) == null ? void 0 : fe.app][k]}`;
|
|
4847
|
+
return ((we = t.config) == null ? void 0 : we.app) === "konnect" ? J = J.replace(/{controlPlaneId}/gi, ((me = t.config) == null ? void 0 : me.controlPlaneId) || "") : ((Ne = t.config) == null ? void 0 : Ne.app) === "kongManager" && (J = J.replace(/\/{workspace}/gi, (et = t.config) != null && et.workspace ? `/${t.config.workspace}` : "")), J = J.replace(/{id}/gi, U || t.consumerGroupId), (k === "addConsumer" || k === "removeConsumer") && (J = J.replace(/{consumerId}/gi, ie)), J;
|
|
4848
|
+
}, S = () => {
|
|
4849
|
+
var k;
|
|
4850
|
+
i.push(((k = t.config) == null ? void 0 : k.cancelRoute) || { name: "consumer-group-list" });
|
|
4851
|
+
}, D = (k) => {
|
|
4852
|
+
r("error", k);
|
|
4853
|
+
}, re = (k) => {
|
|
4854
|
+
r("loading", k);
|
|
4855
|
+
}, R = async (k) => {
|
|
4856
|
+
var ie, J, H, fe, we;
|
|
4857
|
+
a.fields.name = ((ie = k == null ? void 0 : k.item) == null ? void 0 : ie.name) || ((J = k == null ? void 0 : k.consumer_group) == null ? void 0 : J.name) || (k == null ? void 0 : k.name) || "";
|
|
4858
|
+
const U = ((H = k == null ? void 0 : k.item) == null ? void 0 : H.tags) || (k == null ? void 0 : k.consumer_group.tags) || (k == null ? void 0 : k.tags) || [];
|
|
4859
|
+
if (a.fields.tags = (U == null ? void 0 : U.join(", ")) || "", "consumers" in k)
|
|
4860
|
+
a.fields.consumers = ((fe = k == null ? void 0 : k.consumers) == null ? void 0 : fe.map((me) => me.id)) || [];
|
|
4865
4861
|
else
|
|
4866
4862
|
try {
|
|
4867
|
-
const { data: me } = await f.get(
|
|
4868
|
-
a.fields.consumers = "consumers" in me ? (
|
|
4863
|
+
const { data: me } = await f.get(v("getConsumers"));
|
|
4864
|
+
a.fields.consumers = "consumers" in me ? (we = me == null ? void 0 : me.consumers) == null ? void 0 : we.map((Ne) => Ne.id) : [];
|
|
4869
4865
|
} catch (me) {
|
|
4870
|
-
|
|
4866
|
+
T(me);
|
|
4871
4867
|
}
|
|
4872
4868
|
Object.assign(s, a.fields);
|
|
4873
|
-
},
|
|
4874
|
-
var
|
|
4869
|
+
}, C = x(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : o("consumer_groups.form.validation_errors.name")), G = () => {
|
|
4870
|
+
var k, U;
|
|
4875
4871
|
return {
|
|
4876
4872
|
name: a.fields.name,
|
|
4877
|
-
tags: (
|
|
4873
|
+
tags: (U = (k = a.fields.tags.split(",")) == null ? void 0 : k.map((ie) => String(ie || "").trim())) == null ? void 0 : U.filter((ie) => ie !== "")
|
|
4878
4874
|
};
|
|
4879
|
-
},
|
|
4880
|
-
a.errorMessage =
|
|
4881
|
-
}, O = (
|
|
4882
|
-
Object.assign(s, a.fields), r("update", { ...a.fields, id:
|
|
4883
|
-
},
|
|
4884
|
-
const
|
|
4885
|
-
|
|
4886
|
-
code:
|
|
4887
|
-
message:
|
|
4875
|
+
}, K = async (k, U = "") => await f.post(v("addConsumer", U, k), { consumer: k }), I = async (k, U = "") => await f.delete(v("removeConsumer", U, k)), T = (k) => {
|
|
4876
|
+
a.errorMessage = w(k), r("error", k);
|
|
4877
|
+
}, O = (k = t.consumerGroupId) => {
|
|
4878
|
+
Object.assign(s, a.fields), r("update", { ...a.fields, id: k });
|
|
4879
|
+
}, B = (k, U, ie = t.consumerGroupId) => {
|
|
4880
|
+
const J = k == null ? void 0 : k.find((H) => H.status !== "fulfilled");
|
|
4881
|
+
J ? T({
|
|
4882
|
+
code: J.status,
|
|
4883
|
+
message: U
|
|
4888
4884
|
}) : O(ie);
|
|
4889
4885
|
}, W = async () => {
|
|
4890
|
-
let
|
|
4886
|
+
let k = "";
|
|
4891
4887
|
try {
|
|
4892
|
-
const { data:
|
|
4893
|
-
|
|
4894
|
-
} catch (
|
|
4895
|
-
|
|
4888
|
+
const { data: U } = await f.post(v("create"), G());
|
|
4889
|
+
k = "item" in U ? U.item.id : U.id;
|
|
4890
|
+
} catch (U) {
|
|
4891
|
+
T(U);
|
|
4896
4892
|
}
|
|
4897
|
-
if (a.fields.consumers.length > 0 &&
|
|
4893
|
+
if (a.fields.consumers.length > 0 && k)
|
|
4898
4894
|
try {
|
|
4899
|
-
const
|
|
4900
|
-
|
|
4901
|
-
} catch (
|
|
4902
|
-
|
|
4895
|
+
const U = a.fields.consumers.map((J) => K(J, k)), ie = await Promise.allSettled(U);
|
|
4896
|
+
B(ie, o("consumer_groups.errors.add_consumer"), k);
|
|
4897
|
+
} catch (U) {
|
|
4898
|
+
T(U);
|
|
4903
4899
|
}
|
|
4904
4900
|
else
|
|
4905
|
-
a.fields.consumers.length === 0 &&
|
|
4906
|
-
},
|
|
4901
|
+
a.fields.consumers.length === 0 && k && O(k);
|
|
4902
|
+
}, ee = async () => {
|
|
4907
4903
|
var ie;
|
|
4908
4904
|
try {
|
|
4909
|
-
((ie = t.config) == null ? void 0 : ie.app) === "konnect" ? await f.put(
|
|
4910
|
-
} catch (
|
|
4911
|
-
|
|
4905
|
+
((ie = t.config) == null ? void 0 : ie.app) === "konnect" ? await f.put(v("edit"), G()) : await f.patch(v("edit"), G());
|
|
4906
|
+
} catch (J) {
|
|
4907
|
+
T(J);
|
|
4912
4908
|
}
|
|
4913
|
-
const
|
|
4914
|
-
if (
|
|
4909
|
+
const k = a.fields.consumers.filter((J) => !s.consumers.includes(J)), U = s.consumers.filter((J) => !a.fields.consumers.includes(J));
|
|
4910
|
+
if (U.length === 0 && k.length === 0)
|
|
4915
4911
|
O();
|
|
4916
4912
|
else {
|
|
4917
|
-
if (
|
|
4913
|
+
if (U.length > 0)
|
|
4918
4914
|
try {
|
|
4919
|
-
const
|
|
4920
|
-
|
|
4921
|
-
} catch (
|
|
4922
|
-
|
|
4915
|
+
const J = U.map((fe) => I(fe)), H = await Promise.allSettled(J);
|
|
4916
|
+
B(H, o("consumer_groups.errors.remove_consumer"));
|
|
4917
|
+
} catch (J) {
|
|
4918
|
+
T(J);
|
|
4923
4919
|
}
|
|
4924
|
-
if (
|
|
4920
|
+
if (k.length > 0)
|
|
4925
4921
|
try {
|
|
4926
|
-
const
|
|
4927
|
-
|
|
4928
|
-
} catch (
|
|
4929
|
-
|
|
4922
|
+
const J = k.map((fe) => K(fe)), H = await Promise.allSettled(J);
|
|
4923
|
+
B(H, o("consumer_groups.errors.add_consumer"));
|
|
4924
|
+
} catch (J) {
|
|
4925
|
+
T(J);
|
|
4930
4926
|
}
|
|
4931
4927
|
}
|
|
4932
|
-
},
|
|
4928
|
+
}, te = async () => {
|
|
4933
4929
|
try {
|
|
4934
|
-
a.readonly = !0,
|
|
4930
|
+
a.readonly = !0, b.value === nt.Create ? await W() : await ee();
|
|
4935
4931
|
} finally {
|
|
4936
4932
|
a.readonly = !1;
|
|
4937
4933
|
}
|
|
4938
4934
|
};
|
|
4939
4935
|
return dt(async () => {
|
|
4940
4936
|
await c();
|
|
4941
|
-
}), (
|
|
4942
|
-
const ie = q("KInput"),
|
|
4943
|
-
return d(),
|
|
4944
|
-
E(m(
|
|
4945
|
-
"can-submit":
|
|
4937
|
+
}), (k, U) => {
|
|
4938
|
+
const ie = q("KInput"), J = q("KMultiselect");
|
|
4939
|
+
return d(), j("div", Al, [
|
|
4940
|
+
E(m(Fs), {
|
|
4941
|
+
"can-submit": _.value && L.value,
|
|
4946
4942
|
config: e.config,
|
|
4947
4943
|
"edit-id": e.consumerGroupId,
|
|
4948
|
-
"error-message": a.errorMessage || m(p) ||
|
|
4944
|
+
"error-message": a.errorMessage || m(p) || C.value,
|
|
4949
4945
|
"fetch-url": A.value,
|
|
4950
4946
|
"form-fields": a.fields,
|
|
4951
4947
|
"is-readonly": a.readonly,
|
|
4952
|
-
onCancel:
|
|
4953
|
-
"onFetch:error":
|
|
4954
|
-
"onFetch:success":
|
|
4955
|
-
onLoading:
|
|
4956
|
-
onSubmit:
|
|
4948
|
+
onCancel: S,
|
|
4949
|
+
"onFetch:error": U[3] || (U[3] = (H) => D(H)),
|
|
4950
|
+
"onFetch:success": R,
|
|
4951
|
+
onLoading: U[4] || (U[4] = (H) => re(H)),
|
|
4952
|
+
onSubmit: te
|
|
4957
4953
|
}, {
|
|
4958
4954
|
default: g(() => [
|
|
4959
4955
|
E(m(mn), {
|
|
@@ -4963,7 +4959,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4963
4959
|
default: g(() => [
|
|
4964
4960
|
E(ie, {
|
|
4965
4961
|
modelValue: a.fields.name,
|
|
4966
|
-
"onUpdate:modelValue":
|
|
4962
|
+
"onUpdate:modelValue": U[0] || (U[0] = (H) => a.fields.name = H),
|
|
4967
4963
|
modelModifiers: { trim: !0 },
|
|
4968
4964
|
autocomplete: "off",
|
|
4969
4965
|
"data-testid": "consumer-group-form-name",
|
|
@@ -4974,7 +4970,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4974
4970
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
4975
4971
|
E(ie, {
|
|
4976
4972
|
modelValue: a.fields.tags,
|
|
4977
|
-
"onUpdate:modelValue":
|
|
4973
|
+
"onUpdate:modelValue": U[1] || (U[1] = (H) => a.fields.tags = H),
|
|
4978
4974
|
modelModifiers: { trim: !0 },
|
|
4979
4975
|
autocomplete: "off",
|
|
4980
4976
|
"data-testid": "consumer-group-form-tags",
|
|
@@ -4996,24 +4992,24 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
4996
4992
|
title: m(o)("consumer_groups.form.consumers.title")
|
|
4997
4993
|
}, {
|
|
4998
4994
|
default: g(() => [
|
|
4999
|
-
E(
|
|
4995
|
+
E(J, {
|
|
5000
4996
|
modelValue: a.fields.consumers,
|
|
5001
|
-
"onUpdate:modelValue":
|
|
4997
|
+
"onUpdate:modelValue": U[2] || (U[2] = (H) => a.fields.consumers = H),
|
|
5002
4998
|
appearance: "select",
|
|
5003
4999
|
autosuggest: "",
|
|
5004
5000
|
"expand-selected": "",
|
|
5005
|
-
items:
|
|
5001
|
+
items: h.value,
|
|
5006
5002
|
label: m(o)("consumer_groups.form.fields.consumers.label"),
|
|
5007
5003
|
loading: m(u),
|
|
5008
5004
|
placeholder: m(o)("consumer_groups.form.fields.consumers.placeholder"),
|
|
5009
5005
|
width: "auto",
|
|
5010
5006
|
onQueryChange: m(l)
|
|
5011
5007
|
}, {
|
|
5012
|
-
"item-template": g(({ item:
|
|
5013
|
-
var fe,
|
|
5008
|
+
"item-template": g(({ item: H }) => {
|
|
5009
|
+
var fe, we, me;
|
|
5014
5010
|
return [
|
|
5015
|
-
V("div",
|
|
5016
|
-
(fe =
|
|
5011
|
+
V("div", Sl, N(H.label), 1),
|
|
5012
|
+
(fe = H == null ? void 0 : H.data) != null && fe.username && ((we = H == null ? void 0 : H.data) != null && we.custom_id) ? (d(), j("div", xl, N((me = H == null ? void 0 : H.data) == null ? void 0 : me.custom_id), 1)) : z("", !0)
|
|
5017
5013
|
];
|
|
5018
5014
|
}),
|
|
5019
5015
|
_: 1
|
|
@@ -5027,7 +5023,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
5027
5023
|
]);
|
|
5028
5024
|
};
|
|
5029
5025
|
}
|
|
5030
|
-
}),
|
|
5026
|
+
}), Dl = /* @__PURE__ */ qt(Tl, [["__scopeId", "data-v-6181af14"]]), $l = { class: "kong-ui-consumer-group-entity-config-card" }, Vl = /* @__PURE__ */ ae({
|
|
5031
5027
|
__name: "ConsumerGroupConfigCard",
|
|
5032
5028
|
props: {
|
|
5033
5029
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5054,7 +5050,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
5054
5050
|
},
|
|
5055
5051
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
5056
5052
|
setup(e) {
|
|
5057
|
-
const n = e, { i18n: { t } } = pt.useI18n(), r = x(() =>
|
|
5053
|
+
const n = e, { i18n: { t } } = pt.useI18n(), r = x(() => Me.form[n.config.app].edit), o = F({
|
|
5058
5054
|
id: {},
|
|
5059
5055
|
name: {},
|
|
5060
5056
|
created_at: {},
|
|
@@ -5063,7 +5059,7 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
5063
5059
|
tooltip: t("consumer_groups.form.fields.tags.tooltip")
|
|
5064
5060
|
}
|
|
5065
5061
|
});
|
|
5066
|
-
return (i, a) => (d(),
|
|
5062
|
+
return (i, a) => (d(), j("div", $l, [
|
|
5067
5063
|
E(m(js), {
|
|
5068
5064
|
config: e.config,
|
|
5069
5065
|
"config-card-doc": e.configCardDoc,
|
|
@@ -5081,6 +5077,6 @@ const us = { class: "yaml-config" }, gr = /* @__PURE__ */ ae({
|
|
|
5081
5077
|
});
|
|
5082
5078
|
export {
|
|
5083
5079
|
Vl as ConsumerGroupConfigCard,
|
|
5084
|
-
|
|
5080
|
+
Dl as ConsumerGroupForm,
|
|
5085
5081
|
Pl as ConsumerGroupList
|
|
5086
5082
|
};
|