@kong-ui-public/entities-consumers 1.1.27 → 1.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-consumers.es.js +758 -749
- package/dist/entities-consumers.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as Y, ref as A, computed as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { createI18n as
|
|
4
|
-
import
|
|
5
|
-
import { MethodsArray as
|
|
1
|
+
import { defineComponent as Y, ref as A, computed as $, watch as ce, renderSlot as W, createCommentVNode as z, unref as l, useSlots as Ae, onBeforeMount as Ce, resolveComponent as E, openBlock as d, createBlock as N, createSlots as fe, withCtx as c, createElementVNode as B, createVNode as K, createTextVNode as H, toDisplayString as C, createElementBlock as P, Fragment as ne, renderList as ae, normalizeClass as ye, withModifiers as ke, withDirectives as he, vShow as be, useCssVars as yt, resolveDynamicComponent as _e, normalizeProps as vt, guardReactiveProps as gt, mergeProps as Te, onMounted as ht, onUnmounted as bt, inject as kt, reactive as Ge } from "vue";
|
|
2
|
+
import { useRouter as Me } from "vue-router";
|
|
3
|
+
import { createI18n as Pe, i18nTComponent as Ze } from "@kong-ui-public/i18n";
|
|
4
|
+
import _t from "axios";
|
|
5
|
+
import { MethodsArray as Ct } from "@kong/kongponents";
|
|
6
6
|
const It = {
|
|
7
7
|
list: {
|
|
8
8
|
table_headers: {
|
|
@@ -99,14 +99,14 @@ const It = {
|
|
|
99
99
|
consumers: It
|
|
100
100
|
};
|
|
101
101
|
function St() {
|
|
102
|
-
const e =
|
|
102
|
+
const e = Pe("en-us", wt);
|
|
103
103
|
return {
|
|
104
104
|
i18n: e,
|
|
105
105
|
i18nT: Ze(e)
|
|
106
106
|
// Translation component <i18n-t>
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const Ie = {
|
|
110
110
|
useI18n: St
|
|
111
111
|
}, pe = "/api/runtime_groups/{controlPlaneId}", me = "/{workspace}", ue = {
|
|
112
112
|
list: {
|
|
@@ -134,10 +134,10 @@ const _e = {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
|
-
var et = /* @__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))(et || {}),
|
|
138
|
-
function
|
|
137
|
+
var et = /* @__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))(et || {}), Be = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(Be || {}), le = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(le || {}), J = /* @__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))(J || {}), ee = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ee || {});
|
|
138
|
+
function qe(e = {}) {
|
|
139
139
|
return {
|
|
140
|
-
axiosInstance:
|
|
140
|
+
axiosInstance: _t.create({
|
|
141
141
|
withCredentials: !0,
|
|
142
142
|
timeout: 3e4,
|
|
143
143
|
...e
|
|
@@ -156,7 +156,7 @@ function $t() {
|
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
const
|
|
159
|
+
const Ke = "khcp-user-table-preferences", xt = {
|
|
160
160
|
pageSize: 30,
|
|
161
161
|
sortColumnKey: void 0,
|
|
162
162
|
sortColumnOrder: void 0
|
|
@@ -171,14 +171,14 @@ function Kt() {
|
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
173
|
}, o = () => {
|
|
174
|
-
const t = e(localStorage.getItem(
|
|
174
|
+
const t = e(localStorage.getItem(Ke));
|
|
175
175
|
return !t || !Object.keys(t).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(t));
|
|
176
176
|
};
|
|
177
177
|
return {
|
|
178
178
|
setTablePreferences: (t, a) => {
|
|
179
179
|
try {
|
|
180
180
|
const n = o();
|
|
181
|
-
n.set(t, a), localStorage.setItem(
|
|
181
|
+
n.set(t, a), localStorage.setItem(Ke, JSON.stringify(Object.fromEntries(n.entries())));
|
|
182
182
|
} catch (n) {
|
|
183
183
|
console.error("useTablePreferences(setTablePreferences)", n);
|
|
184
184
|
}
|
|
@@ -188,14 +188,14 @@ function Kt() {
|
|
|
188
188
|
return (a == null ? void 0 : a.get(t)) || void 0 || xt;
|
|
189
189
|
},
|
|
190
190
|
deleteAllTablePreferences: () => {
|
|
191
|
-
localStorage.removeItem(
|
|
191
|
+
localStorage.removeItem(Ke);
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
const
|
|
195
|
+
const Tt = {
|
|
196
196
|
message: "Are you sure you want to delete this {entityType}?",
|
|
197
197
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
198
|
-
},
|
|
198
|
+
}, Bt = {
|
|
199
199
|
actions: {
|
|
200
200
|
save: "Save",
|
|
201
201
|
cancel: "Cancel",
|
|
@@ -260,7 +260,7 @@ const Bt = {
|
|
|
260
260
|
}, Et = {
|
|
261
261
|
unexpected: "An unexpected error has occurred",
|
|
262
262
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
263
|
-
},
|
|
263
|
+
}, Ut = {
|
|
264
264
|
enable: {
|
|
265
265
|
title: "Enable {entityType}",
|
|
266
266
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -272,89 +272,89 @@ const Bt = {
|
|
|
272
272
|
confirmText: "Yes, disable"
|
|
273
273
|
}
|
|
274
274
|
}, Ft = {
|
|
275
|
-
deleteModal:
|
|
276
|
-
baseForm:
|
|
275
|
+
deleteModal: Tt,
|
|
276
|
+
baseForm: Bt,
|
|
277
277
|
baseTable: At,
|
|
278
278
|
baseConfigCard: Mt,
|
|
279
279
|
filter: Pt,
|
|
280
280
|
debouncedFilter: qt,
|
|
281
281
|
errors: Et,
|
|
282
|
-
toggleModal:
|
|
282
|
+
toggleModal: Ut
|
|
283
283
|
};
|
|
284
|
-
function
|
|
285
|
-
const e =
|
|
284
|
+
function Ee() {
|
|
285
|
+
const e = Pe("en-us", Ft);
|
|
286
286
|
return {
|
|
287
287
|
i18n: e,
|
|
288
288
|
i18nT: Ze(e)
|
|
289
289
|
// Translation component <i18n-t>
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function Rt(e, o, t, a = {
|
|
293
293
|
fetchedItemsKey: "data",
|
|
294
294
|
searchKeys: ["id"]
|
|
295
295
|
}) {
|
|
296
296
|
t || (t = "100");
|
|
297
|
-
const { axiosInstance: n } =
|
|
297
|
+
const { axiosInstance: n } = qe({
|
|
298
298
|
headers: e.requestHeaders
|
|
299
|
-
}), { i18n: { t: r } } =
|
|
300
|
-
await
|
|
301
|
-
}, 200),
|
|
302
|
-
let V = `${e.apiBaseUrl}${
|
|
299
|
+
}), { i18n: { t: r } } = Ee(), { debounce: y } = $t(), _ = y(async (w) => {
|
|
300
|
+
await f(w);
|
|
301
|
+
}, 200), i = A(!1), T = A(""), b = A(""), I = A([]), R = A(void 0), x = l(o);
|
|
302
|
+
let V = `${e.apiBaseUrl}${x}`;
|
|
303
303
|
e.app === "konnect" ? V = V.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (V = V.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
304
304
|
const q = async () => {
|
|
305
305
|
try {
|
|
306
|
-
|
|
307
|
-
const { data:
|
|
308
|
-
|
|
306
|
+
i.value = !0;
|
|
307
|
+
const { data: w } = await n.get(`${V}?size=${t}`);
|
|
308
|
+
w != null && w.next || (R.value = a.fetchedItemsKey in w ? w[a.fetchedItemsKey] : []), I.value = a.fetchedItemsKey in w ? w[a.fetchedItemsKey] : [];
|
|
309
309
|
} catch {
|
|
310
|
-
|
|
310
|
+
I.value = [], T.value = r("debouncedFilter.errors.fetch");
|
|
311
311
|
} finally {
|
|
312
|
-
|
|
312
|
+
i.value = !1;
|
|
313
313
|
}
|
|
314
|
-
}, u = A(""),
|
|
315
|
-
var
|
|
316
|
-
if (u.value !==
|
|
317
|
-
if (u.value =
|
|
314
|
+
}, u = A(""), f = async (w) => {
|
|
315
|
+
var g, O;
|
|
316
|
+
if (u.value !== w)
|
|
317
|
+
if (u.value = w || "", R.value === void 0)
|
|
318
318
|
try {
|
|
319
|
-
|
|
319
|
+
i.value = !0, T.value = "", b.value = "";
|
|
320
320
|
let s = V + "";
|
|
321
|
-
|
|
321
|
+
w && (s += `/${w}`);
|
|
322
322
|
const { data: p } = await n.get(`${s}?size=${t}`);
|
|
323
|
-
a.fetchedItemsKey in p ?
|
|
323
|
+
a.fetchedItemsKey in p ? I.value = p[a.fetchedItemsKey] : p != null && p.id ? I.value = [p] : I.value = [];
|
|
324
324
|
} catch (s) {
|
|
325
|
-
((
|
|
325
|
+
((g = s == null ? void 0 : s.response) == null ? void 0 : g.status) === 404 ? b.value = r("debouncedFilter.errors.invalid") : (I.value = [], T.value = r("debouncedFilter.errors.fetch"));
|
|
326
326
|
} finally {
|
|
327
|
-
|
|
327
|
+
i.value = !1;
|
|
328
328
|
}
|
|
329
329
|
else
|
|
330
|
-
|
|
330
|
+
i.value = !0, b.value = "", w ? (I.value = (O = R.value) == null ? void 0 : O.filter((s) => {
|
|
331
331
|
var p;
|
|
332
332
|
let h = !1;
|
|
333
|
-
for (const
|
|
334
|
-
const
|
|
335
|
-
|
|
333
|
+
for (const U of a.searchKeys) {
|
|
334
|
+
const v = typeof s[U] == "string" ? (p = s[U]) == null ? void 0 : p.toLowerCase() : s[U];
|
|
335
|
+
v != null && v.includes(w.toLowerCase()) && (h = !0);
|
|
336
336
|
}
|
|
337
337
|
return h;
|
|
338
|
-
}), (!
|
|
338
|
+
}), (!I.value || !I.value.length) && (b.value = r("debouncedFilter.errors.invalid"))) : I.value = R.value, i.value = !1;
|
|
339
339
|
};
|
|
340
340
|
return {
|
|
341
|
-
loading:
|
|
342
|
-
error:
|
|
341
|
+
loading: i,
|
|
342
|
+
error: T,
|
|
343
343
|
validationError: b,
|
|
344
|
-
results:
|
|
345
|
-
allRecords:
|
|
344
|
+
results: I,
|
|
345
|
+
allRecords: R,
|
|
346
346
|
loadItems: q,
|
|
347
|
-
debouncedQueryChange:
|
|
347
|
+
debouncedQueryChange: _
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
350
|
function Vt(e, o) {
|
|
351
|
-
const t =
|
|
351
|
+
const t = l(o), a = $(
|
|
352
352
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
353
353
|
);
|
|
354
354
|
return a.value.search = "", (n) => `${a.value.href}/${n}`;
|
|
355
355
|
}
|
|
356
356
|
function jt() {
|
|
357
|
-
const { i18n: { t: e } } =
|
|
357
|
+
const { i18n: { t: e } } = Ee();
|
|
358
358
|
return {
|
|
359
359
|
getMessageFromError: (o) => {
|
|
360
360
|
var t, a, n;
|
|
@@ -365,8 +365,8 @@ function jt() {
|
|
|
365
365
|
return o.response.data.detail;
|
|
366
366
|
if ((a = o.response.data.details) != null && a.length)
|
|
367
367
|
return o.response.data.details.map((r) => {
|
|
368
|
-
let
|
|
369
|
-
return r.messages && typeof r.messages == "object" && r.messages.length && (
|
|
368
|
+
let y = e("errors.unexpected");
|
|
369
|
+
return r.messages && typeof r.messages == "object" && r.messages.length && (y = r.messages.join(", ")), r.field ? `${r.field} - ${y}` : y;
|
|
370
370
|
}).join("; ");
|
|
371
371
|
if (o.response.data.message) {
|
|
372
372
|
const { message: r } = o.response.data;
|
|
@@ -382,86 +382,86 @@ function jt() {
|
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
384
|
function tt(e, o) {
|
|
385
|
-
const t = A(
|
|
385
|
+
const t = A(l(e)), a = A(l(o)), n = $(
|
|
386
386
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
387
|
-
), r =
|
|
387
|
+
), r = $(
|
|
388
388
|
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
389
389
|
);
|
|
390
|
-
return (
|
|
391
|
-
const { page:
|
|
390
|
+
return (y) => {
|
|
391
|
+
const { page: _, pageSize: i, offset: T, sortColumnKey: b, sortColumnOrder: I, query: R } = y;
|
|
392
392
|
try {
|
|
393
|
-
let
|
|
394
|
-
return n.value &&
|
|
395
|
-
|
|
396
|
-
}), b &&
|
|
397
|
-
} catch (
|
|
398
|
-
return console.error("RouteList(fetcher)",
|
|
393
|
+
let x = new URL(r.value.href);
|
|
394
|
+
return n.value && R ? (x.search = "", x = new URL(`${x.href}/${R}/`)) : (n.value || new URLSearchParams(R).forEach((V, q) => {
|
|
395
|
+
x.searchParams.append(q, V);
|
|
396
|
+
}), b && x.searchParams.append("sort_by", b), I === "desc" && x.searchParams.append("sort_desc", "1"), x.searchParams.append("size", String(i))), T && _ !== 1 && x.searchParams.append("offset", String(T)), x.href;
|
|
397
|
+
} catch (x) {
|
|
398
|
+
return console.error("RouteList(fetcher)", x), a.value;
|
|
399
399
|
}
|
|
400
400
|
};
|
|
401
401
|
}
|
|
402
402
|
function Ot(e, o, t = "data") {
|
|
403
|
-
const a =
|
|
403
|
+
const a = l(o), { axiosInstance: n } = qe({
|
|
404
404
|
headers: e.requestHeaders
|
|
405
|
-
}), r = tt(e, a),
|
|
406
|
-
status:
|
|
405
|
+
}), r = tt(e, a), y = A({
|
|
406
|
+
status: le.Idle
|
|
407
407
|
});
|
|
408
|
-
return { fetcher: async (
|
|
408
|
+
return { fetcher: async (_) => {
|
|
409
409
|
try {
|
|
410
|
-
|
|
411
|
-
const
|
|
412
|
-
let
|
|
413
|
-
|
|
414
|
-
const
|
|
415
|
-
data:
|
|
416
|
-
total:
|
|
417
|
-
...
|
|
410
|
+
y.value = { status: le.Loading };
|
|
411
|
+
const i = r(_), { data: T } = await n.get(i), b = t && t.replace(/[^\w-_]/gi, "");
|
|
412
|
+
let I;
|
|
413
|
+
T[b] && Array.isArray(T[b]) ? I = T[b] : I = Object.keys(T).length ? [T] : [];
|
|
414
|
+
const R = {
|
|
415
|
+
data: I,
|
|
416
|
+
total: I.length,
|
|
417
|
+
...T.offset ? {
|
|
418
418
|
pagination: {
|
|
419
|
-
offset:
|
|
419
|
+
offset: T.offset
|
|
420
420
|
}
|
|
421
421
|
} : null
|
|
422
422
|
};
|
|
423
|
-
return
|
|
424
|
-
status:
|
|
425
|
-
response:
|
|
426
|
-
},
|
|
427
|
-
} catch (
|
|
428
|
-
const
|
|
423
|
+
return y.value = {
|
|
424
|
+
status: le.Idle,
|
|
425
|
+
response: R
|
|
426
|
+
}, R;
|
|
427
|
+
} catch (i) {
|
|
428
|
+
const T = {
|
|
429
429
|
data: [],
|
|
430
430
|
total: 0
|
|
431
431
|
};
|
|
432
|
-
return
|
|
433
|
-
status:
|
|
434
|
-
response:
|
|
435
|
-
error:
|
|
436
|
-
},
|
|
437
|
-
status:
|
|
438
|
-
response:
|
|
439
|
-
error:
|
|
440
|
-
},
|
|
432
|
+
return _.query && i.response.status === 404 ? (y.value = {
|
|
433
|
+
status: le.NoResults,
|
|
434
|
+
response: T,
|
|
435
|
+
error: i
|
|
436
|
+
}, T) : (y.value = {
|
|
437
|
+
status: le.Error,
|
|
438
|
+
response: T,
|
|
439
|
+
error: i
|
|
440
|
+
}, T);
|
|
441
441
|
}
|
|
442
|
-
}, fetcherState:
|
|
442
|
+
}, fetcherState: y };
|
|
443
443
|
}
|
|
444
444
|
function Nt() {
|
|
445
445
|
return {
|
|
446
446
|
convertKeyToTitle: (e, o = "_") => e ? e.split(o).map((t) => t.toLowerCase() === "id" ? t.toUpperCase() : t.charAt(0).toUpperCase() + t.substring(1)).join(" ") : ""
|
|
447
447
|
};
|
|
448
448
|
}
|
|
449
|
-
const at = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,
|
|
449
|
+
const at = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, He = (e) => {
|
|
450
450
|
if (typeof e != "string")
|
|
451
451
|
throw new TypeError("Invalid argument expected string");
|
|
452
452
|
const o = e.match(at);
|
|
453
453
|
if (!o)
|
|
454
454
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
455
455
|
return o.shift(), o;
|
|
456
|
-
},
|
|
456
|
+
}, Je = (e) => e === "*" || e === "x" || e === "X", ze = (e) => {
|
|
457
457
|
const o = parseInt(e, 10);
|
|
458
458
|
return isNaN(o) ? e : o;
|
|
459
459
|
}, Lt = (e, o) => typeof e != typeof o ? [String(e), String(o)] : [e, o], Dt = (e, o) => {
|
|
460
|
-
if (
|
|
460
|
+
if (Je(e) || Je(o))
|
|
461
461
|
return 0;
|
|
462
|
-
const [t, a] = Lt(
|
|
462
|
+
const [t, a] = Lt(ze(e), ze(o));
|
|
463
463
|
return t > a ? 1 : t < a ? -1 : 0;
|
|
464
|
-
},
|
|
464
|
+
}, We = (e, o) => {
|
|
465
465
|
for (let t = 0; t < Math.max(e.length, o.length); t++) {
|
|
466
466
|
const a = Dt(e[t] || "0", o[t] || "0");
|
|
467
467
|
if (a !== 0)
|
|
@@ -469,9 +469,9 @@ const at = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
469
469
|
}
|
|
470
470
|
return 0;
|
|
471
471
|
}, Gt = (e, o) => {
|
|
472
|
-
const t =
|
|
473
|
-
return
|
|
474
|
-
},
|
|
472
|
+
const t = He(e), a = He(o), n = t.pop(), r = a.pop(), y = We(t, a);
|
|
473
|
+
return y !== 0 ? y : n && r ? We(n.split("."), r.split(".")) : n || r ? n ? -1 : 1 : 0;
|
|
474
|
+
}, Qe = (e, o, t) => {
|
|
475
475
|
Ht(t);
|
|
476
476
|
const a = Gt(e, o);
|
|
477
477
|
return ot[t].includes(a);
|
|
@@ -482,11 +482,11 @@ const at = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
482
482
|
"<=": [-1, 0],
|
|
483
483
|
"<": [-1],
|
|
484
484
|
"!=": [-1, 1]
|
|
485
|
-
},
|
|
485
|
+
}, Ye = Object.keys(ot), Ht = (e) => {
|
|
486
486
|
if (typeof e != "string")
|
|
487
487
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
488
|
-
if (
|
|
489
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
488
|
+
if (Ye.indexOf(e) === -1)
|
|
489
|
+
throw new Error(`Invalid operator, expected one of ${Ye.join("|")}`);
|
|
490
490
|
}, Jt = (e) => typeof e == "string" && /^[v\d]/.test(e) && at.test(e);
|
|
491
491
|
function zt(e) {
|
|
492
492
|
const { gatewayInfo: o, supportedRange: t } = e;
|
|
@@ -498,18 +498,18 @@ function zt(e) {
|
|
|
498
498
|
const r = t[a];
|
|
499
499
|
if (!r)
|
|
500
500
|
return !1;
|
|
501
|
-
const [
|
|
502
|
-
return !(
|
|
501
|
+
const [y, _] = r;
|
|
502
|
+
return !(y && Qe(n, y, "<") || _ && Qe(n, _, ">"));
|
|
503
503
|
}
|
|
504
504
|
const X = {
|
|
505
|
-
useAxios:
|
|
506
|
-
useDebouncedFilter:
|
|
505
|
+
useAxios: qe,
|
|
506
|
+
useDebouncedFilter: Rt,
|
|
507
507
|
useDeleteUrlBuilder: Vt,
|
|
508
508
|
useErrors: jt,
|
|
509
509
|
useFetcher: Ot,
|
|
510
510
|
useFetchUrlBuilder: tt,
|
|
511
511
|
useStringHelpers: Nt,
|
|
512
|
-
useI18n:
|
|
512
|
+
useI18n: Ee,
|
|
513
513
|
useGatewayFeatureSupported: zt
|
|
514
514
|
}, Wt = {
|
|
515
515
|
fail: "Failed to copy id to clipboard",
|
|
@@ -520,13 +520,17 @@ const X = {
|
|
|
520
520
|
}, Qt = "Copy to clipboard", Yt = {
|
|
521
521
|
message: Wt,
|
|
522
522
|
iconTitle: Qt
|
|
523
|
-
}, Xt = "kong-ui-copy-uuid-notify", Zt = { class: "kong-ui-copy-uuid" }, ea = ["
|
|
523
|
+
}, Xt = "kong-ui-copy-uuid-notify", Zt = { class: "kong-ui-copy-uuid" }, ea = ["onClick"], Xe = 15, ta = /* @__PURE__ */ Y({
|
|
524
524
|
__name: "CopyUuid",
|
|
525
525
|
props: {
|
|
526
526
|
uuid: {
|
|
527
527
|
type: String,
|
|
528
528
|
required: !0
|
|
529
529
|
},
|
|
530
|
+
idTooltip: {
|
|
531
|
+
type: String,
|
|
532
|
+
default: ""
|
|
533
|
+
},
|
|
530
534
|
truncated: {
|
|
531
535
|
type: Boolean,
|
|
532
536
|
default: !0
|
|
@@ -560,65 +564,70 @@ const X = {
|
|
|
560
564
|
},
|
|
561
565
|
emits: ["success", "error"],
|
|
562
566
|
setup(e, { emit: o }) {
|
|
563
|
-
const t = e, { t: a } =
|
|
564
|
-
}), r =
|
|
565
|
-
label:
|
|
567
|
+
const t = e, { t: a } = Pe("en-us", Yt), n = t.notify || kt(Xt, () => {
|
|
568
|
+
}), r = $(() => t.idTooltip ? {
|
|
569
|
+
label: t.idTooltip,
|
|
570
|
+
positionFixed: !0,
|
|
571
|
+
placement: "bottomStart"
|
|
572
|
+
} : {
|
|
573
|
+
title: t.uuid
|
|
574
|
+
}), y = $(() => !!(t.tooltip && t.successTooltip)), _ = A(t.tooltip), i = $(() => t.tooltip ? {
|
|
575
|
+
label: _.value,
|
|
566
576
|
positionFixed: !0,
|
|
567
577
|
maxWidth: "500px",
|
|
568
578
|
placement: "bottomStart"
|
|
569
|
-
} : {}),
|
|
570
|
-
|
|
571
|
-
|
|
579
|
+
} : {}), T = $(() => t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${t.uuid.substring(0, 5)}` : t.uuid), b = (R) => {
|
|
580
|
+
_.value = R, setTimeout(() => {
|
|
581
|
+
_.value = t.tooltip;
|
|
572
582
|
}, 1800);
|
|
573
|
-
},
|
|
574
|
-
if (!
|
|
583
|
+
}, I = (R) => {
|
|
584
|
+
if (!R(t.uuid)) {
|
|
575
585
|
typeof n == "function" && n({
|
|
576
586
|
type: "error",
|
|
577
587
|
message: a("message.fail")
|
|
578
|
-
}),
|
|
588
|
+
}), y.value ? b(a("message.fail")) : o("error", t.uuid);
|
|
579
589
|
return;
|
|
580
590
|
}
|
|
581
|
-
const
|
|
591
|
+
const x = t.uuid.length > Xe, V = t.format === "hidden" || t.format === "redacted" ? a("message.success.prefix") : `"${t.uuid.substring(0, Xe) + (x ? "..." : "")}"`;
|
|
582
592
|
typeof n == "function" && n({
|
|
583
593
|
type: "success",
|
|
584
|
-
message: `${
|
|
585
|
-
}),
|
|
594
|
+
message: `${V}${a("message.success.content")}`
|
|
595
|
+
}), y.value ? b(t.successTooltip) : o("success", t.uuid);
|
|
586
596
|
};
|
|
587
|
-
return (
|
|
588
|
-
const
|
|
589
|
-
return d(),
|
|
590
|
-
e.format !== "hidden" ? (d(),
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
(d(), N(Te(e.tooltip ? "KTooltip" : "div"), Xe(w.value, { class: "uuid-icon-wrapper" }), {
|
|
597
|
+
return (R, x) => {
|
|
598
|
+
const V = E("KIcon"), q = E("KClipboardProvider");
|
|
599
|
+
return d(), P("div", Zt, [
|
|
600
|
+
e.format !== "hidden" ? (d(), N(_e(e.idTooltip ? "KTooltip" : "div"), Te({ key: 0 }, r.value, { "data-testid": "copy-id" }), {
|
|
601
|
+
default: c(() => [
|
|
602
|
+
B("div", {
|
|
603
|
+
class: ye([
|
|
604
|
+
"uuid-container",
|
|
605
|
+
e.truncated ? "truncated-uuid" : null,
|
|
606
|
+
e.useMono ? "mono" : null
|
|
607
|
+
])
|
|
608
|
+
}, C(T.value), 3)
|
|
609
|
+
]),
|
|
610
|
+
_: 1
|
|
611
|
+
}, 16)) : z("", !0),
|
|
612
|
+
(d(), N(_e(e.tooltip ? "KTooltip" : "div"), Te(i.value, { class: "uuid-icon-wrapper" }), {
|
|
604
613
|
default: c(() => [
|
|
605
|
-
K(
|
|
606
|
-
default: c(({ copyToClipboard:
|
|
607
|
-
|
|
614
|
+
K(q, null, {
|
|
615
|
+
default: c(({ copyToClipboard: u }) => [
|
|
616
|
+
B("span", {
|
|
608
617
|
"data-testid": "copy-to-clipboard",
|
|
609
618
|
role: "button",
|
|
610
619
|
tabindex: "0",
|
|
611
|
-
onClick: ke((
|
|
620
|
+
onClick: ke((f) => I(u), ["stop"])
|
|
612
621
|
}, [
|
|
613
|
-
K(
|
|
622
|
+
K(V, {
|
|
614
623
|
class: "uuid-icon",
|
|
615
624
|
color: e.iconColor,
|
|
616
625
|
"hide-title": !!e.tooltip || void 0,
|
|
617
626
|
icon: "copy",
|
|
618
627
|
size: "16",
|
|
619
|
-
title:
|
|
628
|
+
title: l(a)("iconTitle")
|
|
620
629
|
}, null, 8, ["color", "hide-title", "title"])
|
|
621
|
-
], 8,
|
|
630
|
+
], 8, ea)
|
|
622
631
|
]),
|
|
623
632
|
_: 1
|
|
624
633
|
})
|
|
@@ -628,15 +637,15 @@ const X = {
|
|
|
628
637
|
]);
|
|
629
638
|
};
|
|
630
639
|
}
|
|
631
|
-
}),
|
|
640
|
+
}), aa = (e, o) => {
|
|
632
641
|
const t = e.__vccOpts || e;
|
|
633
642
|
for (const [a, n] of o)
|
|
634
643
|
t[a] = n;
|
|
635
644
|
return t;
|
|
636
|
-
}, nt = /* @__PURE__ */
|
|
645
|
+
}, nt = /* @__PURE__ */ aa(ta, [["__scopeId", "data-v-bfdaf6f7"]]), oa = {
|
|
637
646
|
key: 0,
|
|
638
647
|
class: "config-card-fieldset-title"
|
|
639
|
-
},
|
|
648
|
+
}, na = /* @__PURE__ */ Y({
|
|
640
649
|
__name: "JsonCardItem",
|
|
641
650
|
props: {
|
|
642
651
|
item: {
|
|
@@ -653,26 +662,26 @@ const X = {
|
|
|
653
662
|
}
|
|
654
663
|
},
|
|
655
664
|
setup(e) {
|
|
656
|
-
const o = e, { i18n: { t } } = X.useI18n(), { convertKeyToTitle: a } = X.useStringHelpers(), n =
|
|
657
|
-
const
|
|
658
|
-
return o.isArrayItem && delete
|
|
659
|
-
}),
|
|
660
|
-
var
|
|
661
|
-
return o.isArrayItem ? (
|
|
665
|
+
const o = e, { i18n: { t } } = X.useI18n(), { convertKeyToTitle: a } = X.useStringHelpers(), n = $(() => o.item.key ?? "json-array-item"), r = $(() => o.item.value ?? o.item), y = $(() => {
|
|
666
|
+
const i = JSON.parse(JSON.stringify(r.value));
|
|
667
|
+
return o.isArrayItem && delete i.name, i;
|
|
668
|
+
}), _ = $(() => {
|
|
669
|
+
var i;
|
|
670
|
+
return o.isArrayItem ? (i = r.value) != null && i.name ? a(r.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: o.index }) : "";
|
|
662
671
|
});
|
|
663
|
-
return (
|
|
672
|
+
return (i, T) => (d(), N(_e(e.isArrayItem ? "fieldset" : "div"), {
|
|
664
673
|
class: ye(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
665
674
|
}, {
|
|
666
675
|
default: c(() => [
|
|
667
|
-
e.isArrayItem ? (d(),
|
|
668
|
-
|
|
676
|
+
e.isArrayItem ? (d(), P("legend", oa, [
|
|
677
|
+
B("b", null, C(_.value), 1)
|
|
669
678
|
])) : z("", !0),
|
|
670
|
-
(d(!0),
|
|
671
|
-
key: `${n.value}-property-${
|
|
679
|
+
(d(!0), P(ne, null, ae(Object.keys(y.value), (b, I) => (d(), N(rt, {
|
|
680
|
+
key: `${n.value}-property-${I}`,
|
|
672
681
|
item: {
|
|
673
682
|
key: b,
|
|
674
|
-
label:
|
|
675
|
-
value:
|
|
683
|
+
label: l(a)(b),
|
|
684
|
+
value: y.value[b]
|
|
676
685
|
}
|
|
677
686
|
}, null, 8, ["item"]))), 128))
|
|
678
687
|
]),
|
|
@@ -684,7 +693,7 @@ const X = {
|
|
|
684
693
|
for (const [a, n] of o)
|
|
685
694
|
t[a] = n;
|
|
686
695
|
return t;
|
|
687
|
-
}, st = /* @__PURE__ */ se(
|
|
696
|
+
}, st = /* @__PURE__ */ se(na, [["__scopeId", "data-v-68ca83ec"]]), sa = /* @__PURE__ */ Y({
|
|
688
697
|
__name: "InternalLinkItem",
|
|
689
698
|
props: {
|
|
690
699
|
item: {
|
|
@@ -697,21 +706,21 @@ const X = {
|
|
|
697
706
|
const { i18n: { t: o } } = X.useI18n();
|
|
698
707
|
return (t, a) => {
|
|
699
708
|
const n = E("KButton");
|
|
700
|
-
return d(),
|
|
709
|
+
return d(), P("div", null, [
|
|
701
710
|
K(n, {
|
|
702
711
|
appearance: "btn-link",
|
|
703
712
|
class: "navigation-button",
|
|
704
713
|
onClick: a[0] || (a[0] = (r) => t.$emit("navigation-click", e.item))
|
|
705
714
|
}, {
|
|
706
715
|
default: c(() => [
|
|
707
|
-
H(
|
|
716
|
+
H(C(e.item.value || l(o)("baseConfigCard.commonFields.link")), 1)
|
|
708
717
|
]),
|
|
709
718
|
_: 1
|
|
710
719
|
})
|
|
711
720
|
]);
|
|
712
721
|
};
|
|
713
722
|
}
|
|
714
|
-
}),
|
|
723
|
+
}), ra = /* @__PURE__ */ se(sa, [["__scopeId", "data-v-7410504d"]]), ia = /* @__PURE__ */ Y({
|
|
715
724
|
__name: "StatusBadge",
|
|
716
725
|
props: {
|
|
717
726
|
status: {
|
|
@@ -727,17 +736,17 @@ const X = {
|
|
|
727
736
|
appearance: e.status ? "success" : "neutral"
|
|
728
737
|
}, {
|
|
729
738
|
default: c(() => [
|
|
730
|
-
H(
|
|
739
|
+
H(C(e.status ? l(o)("baseConfigCard.statusBadge.enabledLabel") : l(o)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
731
740
|
]),
|
|
732
741
|
_: 1
|
|
733
742
|
}, 8, ["appearance"]);
|
|
734
743
|
};
|
|
735
744
|
}
|
|
736
|
-
}),
|
|
745
|
+
}), la = "#0044f4", ua = "#e0e4ea", ca = "#3a3f51", da = "1px", pa = { class: "config-card-details-row" }, ma = ["data-testid"], fa = ["data-testid"], ya = ["data-testid"], va = ["data-testid"], ga = { key: 1 }, ha = ["data-testid"], ba = ["data-testid"], ka = ["data-testid"], _a = ["data-testid"], Ca = ["title"], Ia = {
|
|
737
746
|
name: "ConfigCardItem",
|
|
738
|
-
components: { CopyUuid: nt, JsonCardItem: st, StatusBadge: ia, InternalLinkItem:
|
|
739
|
-
},
|
|
740
|
-
...
|
|
747
|
+
components: { CopyUuid: nt, JsonCardItem: st, StatusBadge: ia, InternalLinkItem: ra }
|
|
748
|
+
}, wa = /* @__PURE__ */ Y({
|
|
749
|
+
...Ia,
|
|
741
750
|
props: {
|
|
742
751
|
item: {
|
|
743
752
|
type: Object,
|
|
@@ -757,13 +766,13 @@ const X = {
|
|
|
757
766
|
emits: ["navigation-click"],
|
|
758
767
|
setup(e, { emit: o }) {
|
|
759
768
|
const t = e;
|
|
760
|
-
yt((
|
|
761
|
-
"2c6ac268":
|
|
762
|
-
c7a65802:
|
|
763
|
-
"778426fe":
|
|
764
|
-
"777f9b48":
|
|
769
|
+
yt((I) => ({
|
|
770
|
+
"2c6ac268": T.value ? "none" : `solid ${l(da)} ${l(ua)}`,
|
|
771
|
+
c7a65802: i.value && y.value ? "block" : "flex",
|
|
772
|
+
"778426fe": i.value && y.value ? "100%" : t.slim ? "50%" : "25%",
|
|
773
|
+
"777f9b48": i.value && y.value ? "100%" : t.slim ? "50%" : "75%"
|
|
765
774
|
}));
|
|
766
|
-
const a =
|
|
775
|
+
const a = Ae(), { i18n: { t: n, formatUnixTimeStamp: r } } = X.useI18n(), y = $(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), _ = $(() => !!(t.item.tooltip || a["label-tooltip"])), i = $(() => t.item.type === J.Json || t.item.type === J.JsonArray), T = $(() => t.item.type === J.JsonArray), b = $(() => {
|
|
767
776
|
switch (t.item.type) {
|
|
768
777
|
case J.ID:
|
|
769
778
|
return {
|
|
@@ -849,8 +858,8 @@ const X = {
|
|
|
849
858
|
attrs: {
|
|
850
859
|
"data-testid": `${t.item.key}-internal-link`,
|
|
851
860
|
item: t.item,
|
|
852
|
-
onNavigationClick: (
|
|
853
|
-
o("navigation-click",
|
|
861
|
+
onNavigationClick: (I) => {
|
|
862
|
+
o("navigation-click", I);
|
|
854
863
|
}
|
|
855
864
|
}
|
|
856
865
|
};
|
|
@@ -890,122 +899,122 @@ const X = {
|
|
|
890
899
|
};
|
|
891
900
|
}
|
|
892
901
|
});
|
|
893
|
-
return (
|
|
894
|
-
const
|
|
895
|
-
return d(),
|
|
896
|
-
|
|
902
|
+
return (I, R) => {
|
|
903
|
+
const x = E("KLabel"), V = E("KBadge"), q = E("KMethodBadge");
|
|
904
|
+
return d(), P("div", pa, [
|
|
905
|
+
B("div", {
|
|
897
906
|
class: "config-card-details-label",
|
|
898
907
|
"data-testid": `${e.item.key}-label`
|
|
899
908
|
}, [
|
|
900
|
-
W(
|
|
901
|
-
K(
|
|
909
|
+
W(I.$slots, "label", { item: e.item }, () => [
|
|
910
|
+
K(x, { "tooltip-attributes": { maxWidth: "500px" } }, fe({
|
|
902
911
|
default: c(() => [
|
|
903
|
-
H(
|
|
912
|
+
H(C(e.item.label) + " ", 1)
|
|
904
913
|
]),
|
|
905
914
|
_: 2
|
|
906
915
|
}, [
|
|
907
|
-
|
|
916
|
+
_.value ? {
|
|
908
917
|
name: "tooltip",
|
|
909
918
|
fn: c(() => [
|
|
910
|
-
|
|
919
|
+
B("div", {
|
|
911
920
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
912
921
|
}, [
|
|
913
|
-
W(
|
|
914
|
-
H(
|
|
922
|
+
W(I.$slots, "label-tooltip", {}, () => [
|
|
923
|
+
H(C(e.item.tooltip), 1)
|
|
915
924
|
], !0)
|
|
916
|
-
], 8,
|
|
925
|
+
], 8, fa)
|
|
917
926
|
]),
|
|
918
927
|
key: "0"
|
|
919
928
|
} : void 0
|
|
920
929
|
]), 1024)
|
|
921
930
|
], !0)
|
|
922
|
-
], 8,
|
|
923
|
-
|
|
931
|
+
], 8, ma),
|
|
932
|
+
B("div", {
|
|
924
933
|
class: "config-card-details-value",
|
|
925
934
|
"data-testid": `${e.item.key}-property-value`
|
|
926
935
|
}, [
|
|
927
|
-
W(
|
|
936
|
+
W(I.$slots, e.item.key, {
|
|
928
937
|
rowValue: e.item.value
|
|
929
938
|
}, () => [
|
|
930
|
-
|
|
931
|
-
(d(), N(
|
|
939
|
+
y.value ? (d(), P("div", ga, [
|
|
940
|
+
(d(), N(_e(b.value.tag), vt(gt(b.value.attrs)), {
|
|
932
941
|
default: c(() => [
|
|
933
|
-
b.value.additionalComponent === "KBadge" ? (d(),
|
|
942
|
+
b.value.additionalComponent === "KBadge" ? (d(), P("div", {
|
|
934
943
|
key: 0,
|
|
935
944
|
"data-testid": `${e.item.key}-badge-tags`
|
|
936
945
|
}, [
|
|
937
|
-
(d(!0),
|
|
938
|
-
key: `${e.item.key}-badge-tag-${
|
|
946
|
+
(d(!0), P(ne, null, ae(e.item.value, (u, f) => (d(), N(V, {
|
|
947
|
+
key: `${e.item.key}-badge-tag-${f}`,
|
|
939
948
|
class: "config-badge",
|
|
940
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
949
|
+
"data-testid": `${e.item.key}-badge-tag-${f}`,
|
|
941
950
|
"truncation-tooltip": u
|
|
942
951
|
}, {
|
|
943
952
|
default: c(() => [
|
|
944
|
-
H(
|
|
953
|
+
H(C(u), 1)
|
|
945
954
|
]),
|
|
946
955
|
_: 2
|
|
947
956
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
948
|
-
], 8,
|
|
949
|
-
b.value.additionalComponent === "CopyUuid" ? (d(),
|
|
957
|
+
], 8, ha)) : z("", !0),
|
|
958
|
+
b.value.additionalComponent === "CopyUuid" ? (d(), P("div", {
|
|
950
959
|
key: 1,
|
|
951
960
|
class: "copy-uuid-array",
|
|
952
961
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
953
962
|
}, [
|
|
954
|
-
(d(!0),
|
|
955
|
-
key: `${e.item.key}-copy-uuid-${
|
|
956
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
963
|
+
(d(!0), P(ne, null, ae(e.item.value, (u, f) => (d(), N(l(nt), Te(b.value.childAttrs, {
|
|
964
|
+
key: `${e.item.key}-copy-uuid-${f}`,
|
|
965
|
+
"data-testid": `${e.item.key}-copy-uuid-${f}`,
|
|
957
966
|
uuid: u
|
|
958
967
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
959
|
-
], 8,
|
|
968
|
+
], 8, ba)) : b.value.additionalComponent === "KMethodBadge" ? (d(), P("div", {
|
|
960
969
|
key: 2,
|
|
961
970
|
class: "method-badge-array",
|
|
962
971
|
"data-testid": `${e.item.key}-badge-methods`
|
|
963
972
|
}, [
|
|
964
|
-
(d(!0),
|
|
965
|
-
key: `${e.item.key}-badge-method-${
|
|
973
|
+
(d(!0), P(ne, null, ae(e.item.value, (u, f) => (d(), N(q, {
|
|
974
|
+
key: `${e.item.key}-badge-method-${f}`,
|
|
966
975
|
class: "config-badge",
|
|
967
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
976
|
+
"data-testid": `${e.item.key}-badge-method-${f}`,
|
|
968
977
|
"is-rounded": "",
|
|
969
978
|
label: u,
|
|
970
|
-
method:
|
|
979
|
+
method: l(Ct).includes(u.toLowerCase()) ? u.toLowerCase() : "custom"
|
|
971
980
|
}, {
|
|
972
981
|
default: c(() => [
|
|
973
|
-
H(
|
|
982
|
+
H(C(u), 1)
|
|
974
983
|
]),
|
|
975
984
|
_: 2
|
|
976
985
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
977
|
-
], 8,
|
|
978
|
-
b.value.additionalComponent === "JsonCardItem" ? (d(),
|
|
986
|
+
], 8, ka)) : z("", !0),
|
|
987
|
+
b.value.additionalComponent === "JsonCardItem" ? (d(), P("div", {
|
|
979
988
|
key: 3,
|
|
980
989
|
"data-testid": `${t.item.key}-json-array-content`
|
|
981
990
|
}, [
|
|
982
|
-
(d(!0),
|
|
983
|
-
key: `json-array-item-${
|
|
984
|
-
index:
|
|
991
|
+
(d(!0), P(ne, null, ae(e.item.value, (u, f) => (d(), N(st, {
|
|
992
|
+
key: `json-array-item-${f}`,
|
|
993
|
+
index: f,
|
|
985
994
|
"is-array-item": "",
|
|
986
995
|
item: u
|
|
987
996
|
}, null, 8, ["index", "item"]))), 128))
|
|
988
|
-
], 8, _a)) : (d(),
|
|
997
|
+
], 8, _a)) : (d(), P("span", {
|
|
989
998
|
key: 4,
|
|
990
999
|
class: ye(["attrs-data-text", { truncated: e.truncated }]),
|
|
991
1000
|
title: e.truncated ? e.item.value : void 0
|
|
992
|
-
},
|
|
1001
|
+
}, C(b.value.text), 11, Ca))
|
|
993
1002
|
]),
|
|
994
1003
|
_: 1
|
|
995
1004
|
}, 16))
|
|
996
|
-
])) : (d(),
|
|
1005
|
+
])) : (d(), P("div", {
|
|
997
1006
|
key: 0,
|
|
998
1007
|
"data-testid": `${e.item.key}-no-value`
|
|
999
1008
|
}, " – ", 8, va))
|
|
1000
1009
|
], !0)
|
|
1001
|
-
], 8,
|
|
1010
|
+
], 8, ya)
|
|
1002
1011
|
]);
|
|
1003
1012
|
};
|
|
1004
1013
|
}
|
|
1005
|
-
}), rt = /* @__PURE__ */ se(
|
|
1014
|
+
}), rt = /* @__PURE__ */ se(wa, [["__scopeId", "data-v-a3c5ab01"]]), Sa = { "data-testid": "config-card-title" }, $a = { class: "config-card-actions" }, xa = { class: "config-card-details-section" }, Ka = ["data-testid"], Ta = {
|
|
1006
1015
|
key: 0,
|
|
1007
1016
|
class: "config-card-prop-section-title"
|
|
1008
|
-
},
|
|
1017
|
+
}, Ba = /* @__PURE__ */ Y({
|
|
1009
1018
|
__name: "EntityBaseConfigCard",
|
|
1010
1019
|
props: {
|
|
1011
1020
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1064,9 +1073,9 @@ const X = {
|
|
|
1064
1073
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
1065
1074
|
setup(e, { emit: o }) {
|
|
1066
1075
|
var t;
|
|
1067
|
-
const a = e, n =
|
|
1076
|
+
const a = e, n = Ae(), { i18n: { t: r } } = X.useI18n(), { getMessageFromError: y } = X.useErrors(), { convertKeyToTitle: _ } = X.useStringHelpers(), { axiosInstance: i } = X.useAxios({
|
|
1068
1077
|
headers: (t = a.config) == null ? void 0 : t.requestHeaders
|
|
1069
|
-
}),
|
|
1078
|
+
}), T = {
|
|
1070
1079
|
id: {
|
|
1071
1080
|
type: J.ID,
|
|
1072
1081
|
label: r("baseConfigCard.commonFields.id_label"),
|
|
@@ -1100,114 +1109,114 @@ const X = {
|
|
|
1100
1109
|
// the last property displayed
|
|
1101
1110
|
section: ee.Basic
|
|
1102
1111
|
}
|
|
1103
|
-
}, b = A(!1),
|
|
1112
|
+
}, b = A(!1), I = A(!1), R = A(""), x = A(), V = $(() => {
|
|
1104
1113
|
var s, p, h;
|
|
1105
|
-
if (!
|
|
1114
|
+
if (!x.value)
|
|
1106
1115
|
return [];
|
|
1107
|
-
const
|
|
1108
|
-
for (const
|
|
1109
|
-
const F = (p = (s = a.configSchema) == null ? void 0 : s[
|
|
1110
|
-
let
|
|
1111
|
-
(m || m === 0) && (
|
|
1116
|
+
const U = [], v = Object.keys(x.value).length;
|
|
1117
|
+
for (const M in x.value) {
|
|
1118
|
+
const F = (p = (s = a.configSchema) == null ? void 0 : s[M]) == null ? void 0 : p.order, m = (h = T[M]) == null ? void 0 : h.order;
|
|
1119
|
+
let S = v;
|
|
1120
|
+
(m || m === 0) && (S = m === -1 ? v + 1 : m), F && (S = F === -1 ? v + 1 : F), U.push([M, S]);
|
|
1112
1121
|
}
|
|
1113
|
-
return
|
|
1114
|
-
return
|
|
1115
|
-
}),
|
|
1122
|
+
return U.sort(function(M, F) {
|
|
1123
|
+
return M[1] - F[1];
|
|
1124
|
+
}), U.map((M) => {
|
|
1116
1125
|
var F, m;
|
|
1117
|
-
const
|
|
1126
|
+
const S = M[0], j = (F = x.value) == null ? void 0 : F[S], G = ((m = a.configSchema) == null ? void 0 : m[S]) || {}, Z = T[S];
|
|
1118
1127
|
return {
|
|
1119
|
-
key:
|
|
1128
|
+
key: S,
|
|
1120
1129
|
value: j,
|
|
1121
1130
|
hidden: G.hidden || !1,
|
|
1122
1131
|
type: G.type ?? ((Z == null ? void 0 : Z.type) || J.Text),
|
|
1123
|
-
label: G.label ?? ((Z == null ? void 0 : Z.label) ||
|
|
1132
|
+
label: G.label ?? ((Z == null ? void 0 : Z.label) || _(S)),
|
|
1124
1133
|
tooltip: G.tooltip ?? ((Z == null ? void 0 : Z.tooltip) || void 0),
|
|
1125
1134
|
section: G.section ?? ((Z == null ? void 0 : Z.section) || ee.Advanced)
|
|
1126
1135
|
};
|
|
1127
|
-
}).filter((
|
|
1128
|
-
}), q =
|
|
1136
|
+
}).filter((M) => !M.hidden && M.key !== a.pluginConfigKey);
|
|
1137
|
+
}), q = $(() => {
|
|
1129
1138
|
var s, p;
|
|
1130
|
-
if (!
|
|
1139
|
+
if (!x.value || !a.pluginConfigKey)
|
|
1131
1140
|
return [];
|
|
1132
|
-
const h =
|
|
1133
|
-
for (const
|
|
1134
|
-
const F = (p = (s = a.pluginConfigSchema) == null ? void 0 : s[
|
|
1135
|
-
let
|
|
1136
|
-
F && (
|
|
1141
|
+
const h = x.value[a.pluginConfigKey] || {}, U = Object.keys(h).length, v = [];
|
|
1142
|
+
for (const M in h) {
|
|
1143
|
+
const F = (p = (s = a.pluginConfigSchema) == null ? void 0 : s[M]) == null ? void 0 : p.order, m = h[M];
|
|
1144
|
+
let S = m != null && m !== "" ? U - 1 : U;
|
|
1145
|
+
F && (S = F === -1 ? U + 1 : F), v.push([M, S]);
|
|
1137
1146
|
}
|
|
1138
|
-
return
|
|
1139
|
-
return
|
|
1140
|
-
}),
|
|
1147
|
+
return v.sort(function(M, F) {
|
|
1148
|
+
return M[1] - F[1];
|
|
1149
|
+
}), v.map((M) => {
|
|
1141
1150
|
var F;
|
|
1142
|
-
const m =
|
|
1151
|
+
const m = M[0], S = h[m], j = ((F = a.pluginConfigSchema) == null ? void 0 : F[m]) || {};
|
|
1143
1152
|
return {
|
|
1144
1153
|
key: m,
|
|
1145
|
-
value:
|
|
1154
|
+
value: S,
|
|
1146
1155
|
hidden: j.hidden || !1,
|
|
1147
1156
|
type: j.type ?? J.Text,
|
|
1148
|
-
label: j.label ??
|
|
1157
|
+
label: j.label ?? _(m),
|
|
1149
1158
|
tooltip: j.tooltip ?? void 0,
|
|
1150
1159
|
section: ee.Plugin
|
|
1151
1160
|
};
|
|
1152
|
-
}).filter((
|
|
1153
|
-
}), u =
|
|
1154
|
-
var s, p, h,
|
|
1161
|
+
}).filter((M) => !M.hidden);
|
|
1162
|
+
}), u = $(() => {
|
|
1163
|
+
var s, p, h, U;
|
|
1155
1164
|
return {
|
|
1156
|
-
basic: (s = V.value) == null ? void 0 : s.filter((
|
|
1157
|
-
advanced: (p = V.value) == null ? void 0 : p.filter((
|
|
1158
|
-
plugin: (
|
|
1165
|
+
basic: (s = V.value) == null ? void 0 : s.filter((v) => v.section === ee.Basic),
|
|
1166
|
+
advanced: (p = V.value) == null ? void 0 : p.filter((v) => v.section === ee.Advanced),
|
|
1167
|
+
plugin: (U = q.value) == null ? void 0 : U.concat((h = V.value) == null ? void 0 : h.filter((v) => v.section === ee.Plugin))
|
|
1159
1168
|
};
|
|
1160
|
-
}),
|
|
1169
|
+
}), f = $(() => {
|
|
1161
1170
|
const s = [];
|
|
1162
1171
|
return u.value.basic.length && s.push("basic"), u.value.advanced.length && s.push("advanced"), u.value.plugin.length && s.push("plugin"), s;
|
|
1163
|
-
}),
|
|
1172
|
+
}), w = (s) => !!(s.tooltip || n[`${s.key}-label-tooltip`]), g = $(() => {
|
|
1164
1173
|
var s, p;
|
|
1165
1174
|
let h = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
1166
1175
|
return a.config.app === "konnect" ? h = h.replace(/{controlPlaneId}/gi, ((s = a.config) == null ? void 0 : s.controlPlaneId) || "") : a.config.app === "kongManager" && (h = h.replace(/\/{workspace}/gi, (p = a.config) != null && p.workspace ? `/${a.config.workspace}` : "")), h = h.replace(/{id}/gi, a.config.entityId), h;
|
|
1167
1176
|
}), O = (s) => {
|
|
1168
|
-
|
|
1177
|
+
x.value && s(JSON.stringify(x.value)) ? o("copy:success", x.value) : o("copy:error");
|
|
1169
1178
|
};
|
|
1170
1179
|
return ce(b, (s) => {
|
|
1171
1180
|
o("loading", s);
|
|
1172
1181
|
}, { immediate: !0 }), Ce(async () => {
|
|
1173
|
-
|
|
1182
|
+
I.value = !1, b.value = !0;
|
|
1174
1183
|
try {
|
|
1175
|
-
const { data: s } = await
|
|
1184
|
+
const { data: s } = await i.get(g.value);
|
|
1176
1185
|
if (a.dataKey)
|
|
1177
1186
|
if (typeof s[a.dataKey] < "u")
|
|
1178
|
-
|
|
1187
|
+
x.value = { ...s[a.dataKey] };
|
|
1179
1188
|
else
|
|
1180
1189
|
throw new Error(r("errors.dataKeyUndefined", { dataKey: a.dataKey }));
|
|
1181
1190
|
else
|
|
1182
|
-
|
|
1191
|
+
x.value = { ...s };
|
|
1183
1192
|
Object.keys(a.configSchema).filter((p) => a.configSchema[p].forceShow).forEach((p) => {
|
|
1184
|
-
|
|
1193
|
+
x.value && typeof x.value[p] > "u" && (x.value[p] = null);
|
|
1185
1194
|
}), o("fetch:success", s);
|
|
1186
1195
|
} catch (s) {
|
|
1187
|
-
const p =
|
|
1188
|
-
|
|
1196
|
+
const p = y(s);
|
|
1197
|
+
R.value = p.startsWith("code") ? r("baseConfigCard.errors.load") : p, I.value = !0, o("fetch:error", s);
|
|
1189
1198
|
} finally {
|
|
1190
1199
|
b.value = !1;
|
|
1191
1200
|
}
|
|
1192
1201
|
}), (s, p) => {
|
|
1193
|
-
const h = E("KButton"),
|
|
1202
|
+
const h = E("KButton"), U = E("KClipboardProvider"), v = E("KSkeleton"), M = E("KEmptyState"), F = E("KCard");
|
|
1194
1203
|
return d(), N(F, {
|
|
1195
1204
|
"border-variant": "noBorder",
|
|
1196
1205
|
class: "kong-ui-entity-base-config-card"
|
|
1197
1206
|
}, fe({
|
|
1198
1207
|
actions: c(() => [
|
|
1199
|
-
|
|
1208
|
+
B("div", $a, [
|
|
1200
1209
|
W(s.$slots, "actions", {}, void 0, !0),
|
|
1201
|
-
K(
|
|
1210
|
+
K(U, null, {
|
|
1202
1211
|
default: c(({ copyToClipboard: m }) => [
|
|
1203
|
-
!b.value && !
|
|
1212
|
+
!b.value && !I.value ? (d(), N(h, {
|
|
1204
1213
|
key: 0,
|
|
1205
1214
|
appearance: "btn-link",
|
|
1206
1215
|
"data-testid": "json-copy-button",
|
|
1207
|
-
onClick: (
|
|
1216
|
+
onClick: (S) => O(m)
|
|
1208
1217
|
}, {
|
|
1209
1218
|
default: c(() => [
|
|
1210
|
-
H(
|
|
1219
|
+
H(C(l(r)("baseConfigCard.actions.copy")), 1)
|
|
1211
1220
|
]),
|
|
1212
1221
|
_: 2
|
|
1213
1222
|
}, 1032, ["onClick"])) : z("", !0)
|
|
@@ -1217,52 +1226,52 @@ const X = {
|
|
|
1217
1226
|
])
|
|
1218
1227
|
]),
|
|
1219
1228
|
body: c(() => [
|
|
1220
|
-
b.value ? (d(), N(
|
|
1229
|
+
b.value ? (d(), N(v, {
|
|
1221
1230
|
key: 0,
|
|
1222
1231
|
"data-testid": "config-card-loader",
|
|
1223
1232
|
"table-columns": 2,
|
|
1224
1233
|
type: "table"
|
|
1225
|
-
})) :
|
|
1234
|
+
})) : I.value ? (d(), N(M, {
|
|
1226
1235
|
key: 1,
|
|
1227
1236
|
"data-testid": "config-card-fetch-error",
|
|
1228
1237
|
"is-error": ""
|
|
1229
1238
|
}, {
|
|
1230
1239
|
message: c(() => [
|
|
1231
|
-
|
|
1240
|
+
B("h3", null, C(R.value), 1)
|
|
1232
1241
|
]),
|
|
1233
1242
|
_: 1
|
|
1234
1243
|
})) : z("", !0),
|
|
1235
|
-
|
|
1236
|
-
(d(!0),
|
|
1244
|
+
B("div", xa, [
|
|
1245
|
+
(d(!0), P(ne, null, ae(f.value, (m) => (d(), P("div", {
|
|
1237
1246
|
key: `config-card-details-${m}-props`,
|
|
1238
1247
|
class: ye(`config-card-details-${m}-props`),
|
|
1239
1248
|
"data-testid": `config-card-details-${m}-props`
|
|
1240
1249
|
}, [
|
|
1241
|
-
m !== "basic" ? (d(),
|
|
1242
|
-
(d(!0),
|
|
1243
|
-
key:
|
|
1244
|
-
item:
|
|
1250
|
+
m !== "basic" ? (d(), P("div", Ta, C(m === "advanced" ? l(r)("baseConfigCard.sections.advanced") : l(r)("baseConfigCard.sections.plugin")), 1)) : z("", !0),
|
|
1251
|
+
(d(!0), P(ne, null, ae(u.value[m], (S) => (d(), N(rt, {
|
|
1252
|
+
key: S.key,
|
|
1253
|
+
item: S
|
|
1245
1254
|
}, fe({
|
|
1246
1255
|
label: c(() => [
|
|
1247
|
-
W(s.$slots, `${
|
|
1256
|
+
W(s.$slots, `${S.key}-label`, { row: S }, void 0, !0)
|
|
1248
1257
|
]),
|
|
1249
|
-
[
|
|
1250
|
-
W(s.$slots,
|
|
1251
|
-
row:
|
|
1258
|
+
[S.key]: c(({ rowValue: j }) => [
|
|
1259
|
+
W(s.$slots, S.key, {
|
|
1260
|
+
row: S,
|
|
1252
1261
|
rowValue: j
|
|
1253
1262
|
}, void 0, !0)
|
|
1254
1263
|
]),
|
|
1255
1264
|
_: 2
|
|
1256
1265
|
}, [
|
|
1257
|
-
|
|
1266
|
+
w(S) ? {
|
|
1258
1267
|
name: "label-tooltip",
|
|
1259
1268
|
fn: c(() => [
|
|
1260
|
-
W(s.$slots, `${
|
|
1269
|
+
W(s.$slots, `${S.key}-label-tooltip`, { row: S }, void 0, !0)
|
|
1261
1270
|
]),
|
|
1262
1271
|
key: "0"
|
|
1263
1272
|
} : void 0
|
|
1264
1273
|
]), 1032, ["item"]))), 128))
|
|
1265
|
-
], 10,
|
|
1274
|
+
], 10, Ka))), 128))
|
|
1266
1275
|
])
|
|
1267
1276
|
]),
|
|
1268
1277
|
_: 2
|
|
@@ -1270,9 +1279,9 @@ const X = {
|
|
|
1270
1279
|
e.hideTitle ? void 0 : {
|
|
1271
1280
|
name: "title",
|
|
1272
1281
|
fn: c(() => [
|
|
1273
|
-
|
|
1282
|
+
B("div", Sa, [
|
|
1274
1283
|
W(s.$slots, "title", {}, () => [
|
|
1275
|
-
H(
|
|
1284
|
+
H(C(l(r)("baseConfigCard.title")), 1)
|
|
1276
1285
|
], !0)
|
|
1277
1286
|
])
|
|
1278
1287
|
]),
|
|
@@ -1281,10 +1290,10 @@ const X = {
|
|
|
1281
1290
|
]), 1024);
|
|
1282
1291
|
};
|
|
1283
1292
|
}
|
|
1284
|
-
}),
|
|
1293
|
+
}), Aa = /* @__PURE__ */ se(Ba, [["__scopeId", "data-v-b72bbdde"]]), Ma = ["onReset", "onSubmit"], Pa = {
|
|
1285
1294
|
class: "form-actions",
|
|
1286
1295
|
"data-testid": "form-actions"
|
|
1287
|
-
},
|
|
1296
|
+
}, qa = /* @__PURE__ */ Y({
|
|
1288
1297
|
__name: "EntityBaseForm",
|
|
1289
1298
|
props: {
|
|
1290
1299
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1334,54 +1343,54 @@ const X = {
|
|
|
1334
1343
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
1335
1344
|
setup(e, { emit: o }) {
|
|
1336
1345
|
var t;
|
|
1337
|
-
const a = e, n =
|
|
1346
|
+
const a = e, n = Me(), { i18n: { t: r } } = X.useI18n(), { getMessageFromError: y } = X.useErrors(), { axiosInstance: _ } = X.useAxios({
|
|
1338
1347
|
headers: (t = a.config) == null ? void 0 : t.requestHeaders
|
|
1339
|
-
}),
|
|
1340
|
-
var u,
|
|
1348
|
+
}), i = A(!1), T = A(!1), b = A(""), I = $(() => a.canSubmit === !1 || a.isReadonly), R = $(() => {
|
|
1349
|
+
var u, f;
|
|
1341
1350
|
if (!a.editId)
|
|
1342
1351
|
return "";
|
|
1343
|
-
let
|
|
1344
|
-
return a.config.app === "konnect" ?
|
|
1345
|
-
}),
|
|
1352
|
+
let w = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
1353
|
+
return a.config.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, ((u = a.config) == null ? void 0 : u.controlPlaneId) || "") : a.config.app === "kongManager" && (w = w.replace(/\/{workspace}/gi, (f = a.config) != null && f.workspace ? `/${a.config.workspace}` : "")), w = w.replace(/{id}/gi, a.editId), w;
|
|
1354
|
+
}), x = () => {
|
|
1346
1355
|
a.config.cancelRoute ? n.push(a.config.cancelRoute) : V();
|
|
1347
1356
|
}, V = () => {
|
|
1348
1357
|
o("cancel");
|
|
1349
1358
|
}, q = () => {
|
|
1350
|
-
|
|
1359
|
+
I.value || o("submit");
|
|
1351
1360
|
};
|
|
1352
|
-
return ce(() =>
|
|
1361
|
+
return ce(() => i.value, (u) => {
|
|
1353
1362
|
o("loading", u);
|
|
1354
1363
|
}, { immediate: !0 }), Ce(async () => {
|
|
1355
1364
|
if (a.editId)
|
|
1356
1365
|
try {
|
|
1357
|
-
|
|
1358
|
-
const { data: u } = await
|
|
1366
|
+
T.value = !1, i.value = !0;
|
|
1367
|
+
const { data: u } = await _.get(R.value);
|
|
1359
1368
|
o("fetch:success", u);
|
|
1360
1369
|
} catch (u) {
|
|
1361
|
-
const
|
|
1362
|
-
b.value =
|
|
1370
|
+
const f = y(u);
|
|
1371
|
+
b.value = f.startsWith("code") ? r("baseForm.errors.edit") : f, T.value = !0, o("fetch:error", u);
|
|
1363
1372
|
} finally {
|
|
1364
|
-
|
|
1373
|
+
i.value = !1;
|
|
1365
1374
|
}
|
|
1366
|
-
}), (u,
|
|
1367
|
-
const
|
|
1375
|
+
}), (u, f) => {
|
|
1376
|
+
const w = E("KSkeleton"), g = E("KEmptyState"), O = E("KAlert"), s = E("KButton"), p = E("KCard");
|
|
1368
1377
|
return d(), N(p, { class: "kong-ui-entity-base-form" }, {
|
|
1369
1378
|
body: c(() => [
|
|
1370
|
-
|
|
1379
|
+
i.value ? (d(), N(w, {
|
|
1371
1380
|
key: 0,
|
|
1372
1381
|
type: "form"
|
|
1373
|
-
})) :
|
|
1382
|
+
})) : T.value ? (d(), N(g, {
|
|
1374
1383
|
key: 1,
|
|
1375
|
-
"cta-text":
|
|
1384
|
+
"cta-text": l(r)("baseForm.actions.back"),
|
|
1376
1385
|
"data-testid": "form-fetch-error",
|
|
1377
|
-
"handle-click":
|
|
1386
|
+
"handle-click": x,
|
|
1378
1387
|
"is-error": !0
|
|
1379
1388
|
}, {
|
|
1380
1389
|
message: c(() => [
|
|
1381
|
-
|
|
1390
|
+
B("h3", null, C(b.value), 1)
|
|
1382
1391
|
]),
|
|
1383
1392
|
_: 1
|
|
1384
|
-
}, 8, ["cta-text"])) : (d(),
|
|
1393
|
+
}, 8, ["cta-text"])) : (d(), P("form", {
|
|
1385
1394
|
key: 2,
|
|
1386
1395
|
"data-testid": "form-content",
|
|
1387
1396
|
onReset: ke(V, ["prevent"]),
|
|
@@ -1394,7 +1403,7 @@ const X = {
|
|
|
1394
1403
|
appearance: "danger",
|
|
1395
1404
|
"data-testid": "form-error"
|
|
1396
1405
|
}, null, 8, ["alert-message"])) : z("", !0),
|
|
1397
|
-
|
|
1406
|
+
B("div", Pa, [
|
|
1398
1407
|
W(u.$slots, "form-actions", {}, () => [
|
|
1399
1408
|
K(s, {
|
|
1400
1409
|
appearance: "outline",
|
|
@@ -1403,30 +1412,30 @@ const X = {
|
|
|
1403
1412
|
type: "reset"
|
|
1404
1413
|
}, {
|
|
1405
1414
|
default: c(() => [
|
|
1406
|
-
H(
|
|
1415
|
+
H(C(l(r)("baseForm.actions.cancel")), 1)
|
|
1407
1416
|
]),
|
|
1408
1417
|
_: 1
|
|
1409
1418
|
}, 8, ["disabled"]),
|
|
1410
1419
|
K(s, {
|
|
1411
1420
|
appearance: "primary",
|
|
1412
1421
|
"data-testid": "form-submit",
|
|
1413
|
-
disabled:
|
|
1422
|
+
disabled: I.value,
|
|
1414
1423
|
type: "submit"
|
|
1415
1424
|
}, {
|
|
1416
1425
|
default: c(() => [
|
|
1417
|
-
H(
|
|
1426
|
+
H(C(l(r)("baseForm.actions.save")), 1)
|
|
1418
1427
|
]),
|
|
1419
1428
|
_: 1
|
|
1420
1429
|
}, 8, ["disabled"])
|
|
1421
1430
|
], !0)
|
|
1422
1431
|
])
|
|
1423
|
-
], 40,
|
|
1432
|
+
], 40, Ma))
|
|
1424
1433
|
]),
|
|
1425
1434
|
_: 3
|
|
1426
1435
|
});
|
|
1427
1436
|
};
|
|
1428
1437
|
}
|
|
1429
|
-
}),
|
|
1438
|
+
}), Ea = /* @__PURE__ */ se(qa, [["__scopeId", "data-v-2286e5f2"]]), Ua = { key: 0 }, Fa = /* @__PURE__ */ Y({
|
|
1430
1439
|
__name: "EntityBaseTableCell",
|
|
1431
1440
|
props: {
|
|
1432
1441
|
keyName: {
|
|
@@ -1439,30 +1448,30 @@ const X = {
|
|
|
1439
1448
|
}
|
|
1440
1449
|
},
|
|
1441
1450
|
setup(e) {
|
|
1442
|
-
const o = e, t =
|
|
1451
|
+
const o = e, t = $(() => {
|
|
1443
1452
|
var q;
|
|
1444
1453
|
return ((q = o.rowEl) == null ? void 0 : q.querySelector(`[data-testid="${o.keyName}"]`)) || null;
|
|
1445
|
-
}), a =
|
|
1454
|
+
}), a = $(() => {
|
|
1446
1455
|
var q;
|
|
1447
1456
|
return ((q = t.value) == null ? void 0 : q.querySelector('[role="button"]')) || null;
|
|
1448
|
-
}), n =
|
|
1457
|
+
}), n = $(() => {
|
|
1449
1458
|
var q, u;
|
|
1450
|
-
const
|
|
1451
|
-
return
|
|
1459
|
+
const f = (q = o.rowEl) == null ? void 0 : q.querySelectorAll("td");
|
|
1460
|
+
return f ? ((u = f[0]) == null ? void 0 : u.getAttribute("data-testid")) === o.keyName : !1;
|
|
1452
1461
|
});
|
|
1453
1462
|
let r;
|
|
1454
|
-
const
|
|
1463
|
+
const y = () => {
|
|
1455
1464
|
r && (r.disconnect(), r = void 0);
|
|
1456
|
-
},
|
|
1457
|
-
var q, u,
|
|
1458
|
-
|
|
1459
|
-
},
|
|
1460
|
-
|
|
1465
|
+
}, _ = () => {
|
|
1466
|
+
var q, u, f;
|
|
1467
|
+
T.value = ((q = a.value) == null ? void 0 : q.getBoundingClientRect().width) || 0, b.value = ((u = t.value) == null ? void 0 : u.clientWidth) || 0, I.value = ((f = i.value) == null ? void 0 : f.innerText) || "";
|
|
1468
|
+
}, i = A({}), T = A(0), b = A(0), I = A(""), R = $(() => [a.value, t.value]), x = ce(
|
|
1469
|
+
R,
|
|
1461
1470
|
(q) => {
|
|
1462
|
-
if (n.value && (
|
|
1471
|
+
if (n.value && (y(), "ResizeObserver" in window && window)) {
|
|
1463
1472
|
r = new ResizeObserver((u) => {
|
|
1464
1473
|
window.requestAnimationFrame(() => {
|
|
1465
|
-
!Array.isArray(u) || !u.length ||
|
|
1474
|
+
!Array.isArray(u) || !u.length || _();
|
|
1466
1475
|
});
|
|
1467
1476
|
});
|
|
1468
1477
|
for (const u of q)
|
|
@@ -1470,22 +1479,22 @@ const X = {
|
|
|
1470
1479
|
}
|
|
1471
1480
|
},
|
|
1472
1481
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
1473
|
-
), V =
|
|
1482
|
+
), V = $(() => n.value ? T.value > b.value : !1);
|
|
1474
1483
|
return ht(() => {
|
|
1475
|
-
|
|
1484
|
+
_();
|
|
1476
1485
|
}), bt(() => {
|
|
1477
|
-
|
|
1486
|
+
x();
|
|
1478
1487
|
}), (q, u) => {
|
|
1479
|
-
const
|
|
1480
|
-
return d(),
|
|
1488
|
+
const f = E("KTooltip");
|
|
1489
|
+
return d(), P("span", {
|
|
1481
1490
|
ref_key: "contentRef",
|
|
1482
|
-
ref:
|
|
1491
|
+
ref: i,
|
|
1483
1492
|
class: "content-wrapper"
|
|
1484
1493
|
}, [
|
|
1485
|
-
n.value ? (d(),
|
|
1486
|
-
K(
|
|
1494
|
+
n.value ? (d(), P("span", Ua, [
|
|
1495
|
+
K(f, {
|
|
1487
1496
|
disabled: !V.value,
|
|
1488
|
-
label:
|
|
1497
|
+
label: I.value,
|
|
1489
1498
|
"max-width": "300",
|
|
1490
1499
|
placement: "bottomStart"
|
|
1491
1500
|
}, {
|
|
@@ -1498,10 +1507,10 @@ const X = {
|
|
|
1498
1507
|
], 512);
|
|
1499
1508
|
};
|
|
1500
1509
|
}
|
|
1501
|
-
}),
|
|
1510
|
+
}), Ra = /* @__PURE__ */ se(Fa, [["__scopeId", "data-v-f8a220e9"]]), Va = { class: "toolbar-container" }, ja = {
|
|
1502
1511
|
key: 0,
|
|
1503
1512
|
class: "toolbar-button-container"
|
|
1504
|
-
},
|
|
1513
|
+
}, Oa = ["data-testid"], Na = /* @__PURE__ */ Y({
|
|
1505
1514
|
__name: "EntityBaseTable",
|
|
1506
1515
|
props: {
|
|
1507
1516
|
// table header configuration
|
|
@@ -1605,113 +1614,113 @@ const X = {
|
|
|
1605
1614
|
},
|
|
1606
1615
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
1607
1616
|
setup(e, { emit: o }) {
|
|
1608
|
-
const t = e, { i18n: { t: a } } = X.useI18n(), n =
|
|
1609
|
-
const
|
|
1617
|
+
const t = e, { i18n: { t: a } } = X.useI18n(), n = $(() => t.cacheIdentifier || t.preferencesStorageKey), r = (g) => g.hasData || !!t.query, y = $(() => {
|
|
1618
|
+
const g = [];
|
|
1610
1619
|
return Object.keys(t.tableHeaders).forEach((O) => {
|
|
1611
1620
|
const s = t.tableHeaders[O];
|
|
1612
|
-
|
|
1621
|
+
g.push({
|
|
1613
1622
|
label: s.label ?? O,
|
|
1614
1623
|
key: O,
|
|
1615
1624
|
sortable: s.sortable ?? !1
|
|
1616
1625
|
});
|
|
1617
|
-
}), t.enableEntityActions &&
|
|
1626
|
+
}), t.enableEntityActions && g.push({
|
|
1618
1627
|
key: "actions",
|
|
1619
1628
|
hideLabel: !0
|
|
1620
|
-
}),
|
|
1621
|
-
}),
|
|
1622
|
-
"data-rowid":
|
|
1623
|
-
"data-testid":
|
|
1624
|
-
...t.rowAttributes(
|
|
1625
|
-
}),
|
|
1629
|
+
}), g;
|
|
1630
|
+
}), _ = (g) => ({
|
|
1631
|
+
"data-rowid": g.id,
|
|
1632
|
+
"data-testid": g.name,
|
|
1633
|
+
...t.rowAttributes(g)
|
|
1634
|
+
}), i = A({}), T = (g) => {
|
|
1626
1635
|
var O;
|
|
1627
|
-
return (O =
|
|
1628
|
-
}, b = (
|
|
1636
|
+
return (O = i.value) == null ? void 0 : O.$el.querySelector(`[data-rowid="${g.id}"]`);
|
|
1637
|
+
}, b = (g) => {
|
|
1629
1638
|
const O = {
|
|
1630
|
-
"data-testid":
|
|
1631
|
-
...t.cellAttributes(
|
|
1639
|
+
"data-testid": g.headerKey,
|
|
1640
|
+
...t.cellAttributes(g)
|
|
1632
1641
|
};
|
|
1633
|
-
return
|
|
1642
|
+
return g.colIndex === 0 && (O.style = {
|
|
1634
1643
|
maxWidth: "250px",
|
|
1635
1644
|
overflowX: "hidden",
|
|
1636
1645
|
textOverflow: "ellipsis"
|
|
1637
1646
|
}), O;
|
|
1638
|
-
},
|
|
1639
|
-
o("empty-state-cta-clicked"),
|
|
1640
|
-
},
|
|
1647
|
+
}, I = () => {
|
|
1648
|
+
o("empty-state-cta-clicked"), R();
|
|
1649
|
+
}, R = () => {
|
|
1641
1650
|
o("clear-search-input");
|
|
1642
|
-
},
|
|
1651
|
+
}, x = (g, O) => {
|
|
1643
1652
|
o("click:row", O);
|
|
1644
|
-
}, V = (
|
|
1645
|
-
o("sort",
|
|
1646
|
-
}, { setTablePreferences: q, getTablePreferences: u } = Kt(),
|
|
1647
|
-
const
|
|
1653
|
+
}, V = (g) => {
|
|
1654
|
+
o("sort", g);
|
|
1655
|
+
}, { setTablePreferences: q, getTablePreferences: u } = Kt(), f = $(() => {
|
|
1656
|
+
const g = u(t.preferencesStorageKey);
|
|
1648
1657
|
return {
|
|
1649
1658
|
...t.initialFetcherParams,
|
|
1650
|
-
...
|
|
1659
|
+
...g
|
|
1651
1660
|
};
|
|
1652
|
-
}),
|
|
1653
|
-
t.preferencesStorageKey && q(t.preferencesStorageKey,
|
|
1661
|
+
}), w = (g) => {
|
|
1662
|
+
t.preferencesStorageKey && q(t.preferencesStorageKey, g);
|
|
1654
1663
|
};
|
|
1655
|
-
return (
|
|
1656
|
-
const s = E("KIcon"), p = E("KButton"), h = E("KDropdownMenu"),
|
|
1657
|
-
return d(), N(
|
|
1664
|
+
return (g, O) => {
|
|
1665
|
+
const s = E("KIcon"), p = E("KButton"), h = E("KDropdownMenu"), U = E("KTable"), v = E("KCard");
|
|
1666
|
+
return d(), N(v, {
|
|
1658
1667
|
class: "kong-ui-entity-base-table",
|
|
1659
1668
|
title: e.title
|
|
1660
1669
|
}, {
|
|
1661
1670
|
body: c(() => [
|
|
1662
|
-
K(
|
|
1671
|
+
K(U, {
|
|
1663
1672
|
ref_key: "tableRefs",
|
|
1664
|
-
ref:
|
|
1673
|
+
ref: i,
|
|
1665
1674
|
"cache-identifier": n.value,
|
|
1666
1675
|
"cell-attrs": b,
|
|
1667
1676
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
1668
1677
|
"disable-sorting": e.disableSorting,
|
|
1669
1678
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
1670
|
-
"empty-state-action-message": e.query ?
|
|
1679
|
+
"empty-state-action-message": e.query ? l(a)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
1671
1680
|
"empty-state-action-route": e.query ? "" : e.emptyStateOptions.ctaPath,
|
|
1672
1681
|
"empty-state-icon": e.query ? "stateNoSearchResults" : "stateGruceo",
|
|
1673
1682
|
"empty-state-icon-size": "96",
|
|
1674
|
-
"empty-state-message": e.query ?
|
|
1675
|
-
"empty-state-title": e.query ?
|
|
1683
|
+
"empty-state-message": e.query ? l(a)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
1684
|
+
"empty-state-title": e.query ? l(a)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
1676
1685
|
"enable-client-sort": e.enableClientSort,
|
|
1677
1686
|
"error-state-title": e.errorMessage,
|
|
1678
1687
|
fetcher: e.fetcher,
|
|
1679
1688
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
1680
1689
|
"has-error": !!e.errorMessage,
|
|
1681
|
-
headers:
|
|
1690
|
+
headers: y.value,
|
|
1682
1691
|
"hide-pagination-when-optional": "",
|
|
1683
|
-
"initial-fetcher-params":
|
|
1692
|
+
"initial-fetcher-params": f.value,
|
|
1684
1693
|
"is-loading": e.isLoading,
|
|
1685
1694
|
"pagination-type": e.paginationType,
|
|
1686
|
-
"row-attrs":
|
|
1695
|
+
"row-attrs": _,
|
|
1687
1696
|
"search-input": e.query,
|
|
1688
|
-
onKtableEmptyStateCtaClicked:
|
|
1689
|
-
"onRow:click":
|
|
1690
|
-
onSort: O[0] || (O[0] = (
|
|
1691
|
-
"onUpdate:tablePreferences":
|
|
1697
|
+
onKtableEmptyStateCtaClicked: I,
|
|
1698
|
+
"onRow:click": x,
|
|
1699
|
+
onSort: O[0] || (O[0] = (M) => V(M)),
|
|
1700
|
+
"onUpdate:tablePreferences": w
|
|
1692
1701
|
}, fe({
|
|
1693
|
-
toolbar: c(({ state:
|
|
1694
|
-
he(
|
|
1695
|
-
W(
|
|
1696
|
-
|
|
1697
|
-
W(
|
|
1702
|
+
toolbar: c(({ state: M }) => [
|
|
1703
|
+
he(B("div", Va, [
|
|
1704
|
+
W(g.$slots, "toolbar-filter", {}, void 0, !0),
|
|
1705
|
+
g.$slots["toolbar-button"] ? (d(), P("div", ja, [
|
|
1706
|
+
W(g.$slots, "toolbar-button", {}, void 0, !0)
|
|
1698
1707
|
])) : z("", !0)
|
|
1699
1708
|
], 512), [
|
|
1700
|
-
[be, r(
|
|
1709
|
+
[be, r(M)]
|
|
1701
1710
|
])
|
|
1702
1711
|
]),
|
|
1703
|
-
actions: c(({ row:
|
|
1704
|
-
|
|
1712
|
+
actions: c(({ row: M, rowKey: F, rowValue: m }) => [
|
|
1713
|
+
B("div", {
|
|
1705
1714
|
class: "actions-container",
|
|
1706
|
-
"data-testid":
|
|
1715
|
+
"data-testid": M.name
|
|
1707
1716
|
}, [
|
|
1708
1717
|
K(h, {
|
|
1709
1718
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
1710
1719
|
width: e.dropdownMenuWidth
|
|
1711
1720
|
}, {
|
|
1712
1721
|
items: c(() => [
|
|
1713
|
-
W(
|
|
1714
|
-
row:
|
|
1722
|
+
W(g.$slots, "actions", {
|
|
1723
|
+
row: M,
|
|
1715
1724
|
rowKey: F,
|
|
1716
1725
|
rowValue: m
|
|
1717
1726
|
}, void 0, !0)
|
|
@@ -1724,7 +1733,7 @@ const X = {
|
|
|
1724
1733
|
}, {
|
|
1725
1734
|
icon: c(() => [
|
|
1726
1735
|
K(s, {
|
|
1727
|
-
color:
|
|
1736
|
+
color: l(ca),
|
|
1728
1737
|
icon: "more",
|
|
1729
1738
|
size: "16"
|
|
1730
1739
|
}, null, 8, ["color"])
|
|
@@ -1734,24 +1743,24 @@ const X = {
|
|
|
1734
1743
|
]),
|
|
1735
1744
|
_: 2
|
|
1736
1745
|
}, 1032, ["width"])
|
|
1737
|
-
], 8,
|
|
1746
|
+
], 8, Oa)
|
|
1738
1747
|
]),
|
|
1739
1748
|
_: 2
|
|
1740
1749
|
}, [
|
|
1741
|
-
ae(e.tableHeaders, (
|
|
1750
|
+
ae(e.tableHeaders, (M, F) => ({
|
|
1742
1751
|
name: F,
|
|
1743
|
-
fn: c(({ row: m, rowKey:
|
|
1744
|
-
K(
|
|
1752
|
+
fn: c(({ row: m, rowKey: S, rowValue: j }) => [
|
|
1753
|
+
K(Ra, {
|
|
1745
1754
|
"key-name": String(F),
|
|
1746
|
-
"row-el":
|
|
1755
|
+
"row-el": T(m)
|
|
1747
1756
|
}, {
|
|
1748
1757
|
default: c(() => [
|
|
1749
|
-
W(
|
|
1758
|
+
W(g.$slots, F, {
|
|
1750
1759
|
row: m,
|
|
1751
|
-
rowKey:
|
|
1760
|
+
rowKey: S,
|
|
1752
1761
|
rowValue: j
|
|
1753
1762
|
}, () => [
|
|
1754
|
-
H(
|
|
1763
|
+
H(C(j), 1)
|
|
1755
1764
|
], !0)
|
|
1756
1765
|
]),
|
|
1757
1766
|
_: 2
|
|
@@ -1764,13 +1773,13 @@ const X = {
|
|
|
1764
1773
|
}, 8, ["title"]);
|
|
1765
1774
|
};
|
|
1766
1775
|
}
|
|
1767
|
-
}),
|
|
1776
|
+
}), La = /* @__PURE__ */ se(Na, [["__scopeId", "data-v-a598b1d9"]]), Da = {
|
|
1768
1777
|
key: 0,
|
|
1769
1778
|
class: "kong-ui-entity-delete-error"
|
|
1770
|
-
},
|
|
1779
|
+
}, Ga = {
|
|
1771
1780
|
key: 1,
|
|
1772
1781
|
class: "description"
|
|
1773
|
-
},
|
|
1782
|
+
}, Ha = /* @__PURE__ */ Y({
|
|
1774
1783
|
__name: "EntityDeleteModal",
|
|
1775
1784
|
props: {
|
|
1776
1785
|
visible: {
|
|
@@ -1809,13 +1818,13 @@ const X = {
|
|
|
1809
1818
|
},
|
|
1810
1819
|
emits: ["cancel", "proceed"],
|
|
1811
1820
|
setup(e, { emit: o }) {
|
|
1812
|
-
const t = e, { i18nT: a } = X.useI18n(), n =
|
|
1821
|
+
const t = e, { i18nT: a } = X.useI18n(), n = $(() => t.needConfirm ? t.entityName : ""), r = () => {
|
|
1813
1822
|
o("cancel");
|
|
1814
|
-
},
|
|
1823
|
+
}, y = () => {
|
|
1815
1824
|
o("proceed");
|
|
1816
1825
|
};
|
|
1817
|
-
return (
|
|
1818
|
-
const
|
|
1826
|
+
return (_, i) => {
|
|
1827
|
+
const T = E("KAlert"), b = E("KPrompt");
|
|
1819
1828
|
return d(), N(b, {
|
|
1820
1829
|
"action-button-text": "Yes, delete",
|
|
1821
1830
|
"action-pending": e.actionPending,
|
|
@@ -1825,38 +1834,38 @@ const X = {
|
|
|
1825
1834
|
title: e.title,
|
|
1826
1835
|
type: "danger",
|
|
1827
1836
|
onCanceled: r,
|
|
1828
|
-
onProceed:
|
|
1837
|
+
onProceed: y
|
|
1829
1838
|
}, {
|
|
1830
1839
|
"body-content": c(() => [
|
|
1831
|
-
e.error ? (d(),
|
|
1832
|
-
K(
|
|
1840
|
+
e.error ? (d(), P("div", Da, [
|
|
1841
|
+
K(T, { appearance: "danger" }, {
|
|
1833
1842
|
alertMessage: c(() => [
|
|
1834
|
-
H(
|
|
1843
|
+
H(C(e.error), 1)
|
|
1835
1844
|
]),
|
|
1836
1845
|
_: 1
|
|
1837
1846
|
})
|
|
1838
1847
|
])) : z("", !0),
|
|
1839
|
-
K(
|
|
1848
|
+
K(l(a), {
|
|
1840
1849
|
class: "message",
|
|
1841
1850
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
1842
1851
|
tag: "p"
|
|
1843
1852
|
}, fe({
|
|
1844
1853
|
entityType: c(() => [
|
|
1845
|
-
H(
|
|
1854
|
+
H(C(t.entityType), 1)
|
|
1846
1855
|
]),
|
|
1847
1856
|
_: 2
|
|
1848
1857
|
}, [
|
|
1849
1858
|
t.entityName ? {
|
|
1850
1859
|
name: "entityName",
|
|
1851
1860
|
fn: c(() => [
|
|
1852
|
-
|
|
1861
|
+
B("strong", null, C(t.entityName), 1)
|
|
1853
1862
|
]),
|
|
1854
1863
|
key: "0"
|
|
1855
1864
|
} : void 0
|
|
1856
1865
|
]), 1032, ["keypath"]),
|
|
1857
|
-
t.description ||
|
|
1858
|
-
W(
|
|
1859
|
-
|
|
1866
|
+
t.description || _.$slots.description ? (d(), P("div", Ga, [
|
|
1867
|
+
W(_.$slots, "description", {}, () => [
|
|
1868
|
+
B("p", null, C(t.description), 1)
|
|
1860
1869
|
], !0)
|
|
1861
1870
|
])) : z("", !0)
|
|
1862
1871
|
]),
|
|
@@ -1864,13 +1873,13 @@ const X = {
|
|
|
1864
1873
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
1865
1874
|
};
|
|
1866
1875
|
}
|
|
1867
|
-
}),
|
|
1876
|
+
}), Ja = /* @__PURE__ */ se(Ha, [["__scopeId", "data-v-1c9a2a07"]]), za = {
|
|
1868
1877
|
fill: "none",
|
|
1869
1878
|
height: "20",
|
|
1870
1879
|
viewBox: "0 0 20 20",
|
|
1871
1880
|
width: "20",
|
|
1872
1881
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1873
|
-
},
|
|
1882
|
+
}, Wa = {
|
|
1874
1883
|
id: "mask0_180_20349",
|
|
1875
1884
|
height: "20",
|
|
1876
1885
|
maskUnits: "userSpaceOnUse",
|
|
@@ -1878,35 +1887,35 @@ const X = {
|
|
|
1878
1887
|
width: "20",
|
|
1879
1888
|
x: "0",
|
|
1880
1889
|
y: "0"
|
|
1881
|
-
},
|
|
1890
|
+
}, Qa = ["fill"], Ya = { mask: "url(#mask0_180_20349)" }, Xa = ["fill"], Za = /* @__PURE__ */ Y({
|
|
1882
1891
|
__name: "IconFilter",
|
|
1883
1892
|
props: {
|
|
1884
1893
|
color: {
|
|
1885
1894
|
type: String,
|
|
1886
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
1895
|
+
default: `var(--kong-ui-entity-filter-color, ${la})`
|
|
1887
1896
|
}
|
|
1888
1897
|
},
|
|
1889
1898
|
setup(e) {
|
|
1890
|
-
return (o, t) => (d(),
|
|
1891
|
-
|
|
1892
|
-
|
|
1899
|
+
return (o, t) => (d(), P("svg", za, [
|
|
1900
|
+
B("mask", Wa, [
|
|
1901
|
+
B("rect", {
|
|
1893
1902
|
fill: e.color,
|
|
1894
1903
|
height: "20",
|
|
1895
1904
|
width: "20"
|
|
1896
|
-
}, null, 8,
|
|
1905
|
+
}, null, 8, Qa)
|
|
1897
1906
|
]),
|
|
1898
|
-
|
|
1899
|
-
|
|
1907
|
+
B("g", Ya, [
|
|
1908
|
+
B("path", {
|
|
1900
1909
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
1901
1910
|
fill: e.color
|
|
1902
|
-
}, null, 8,
|
|
1911
|
+
}, null, 8, Xa)
|
|
1903
1912
|
])
|
|
1904
1913
|
]));
|
|
1905
1914
|
}
|
|
1906
|
-
}),
|
|
1915
|
+
}), eo = {
|
|
1907
1916
|
key: 1,
|
|
1908
1917
|
class: "kong-ui-entity-filter"
|
|
1909
|
-
},
|
|
1918
|
+
}, to = { class: "menu-item-title" }, ao = { class: "menu-item-indicator" }, oo = { class: "menu-item-body" }, no = ["for"], so = { class: "menu-item-buttons" }, ro = /* @__PURE__ */ Y({
|
|
1910
1919
|
__name: "EntityFilter",
|
|
1911
1920
|
props: {
|
|
1912
1921
|
// filter config, either exact match or fuzzy match
|
|
@@ -1926,37 +1935,37 @@ const X = {
|
|
|
1926
1935
|
},
|
|
1927
1936
|
emits: ["update:modelValue"],
|
|
1928
1937
|
setup(e, { emit: o }) {
|
|
1929
|
-
const t = e, { i18n: { t: a } } = X.useI18n(), n = A(!1), r = A({}),
|
|
1938
|
+
const t = e, { i18n: { t: a } } = X.useI18n(), n = A(!1), r = A({}), y = $(() => {
|
|
1930
1939
|
const u = [];
|
|
1931
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
1932
|
-
|
|
1940
|
+
return new URLSearchParams(t.modelValue).forEach((f, w) => {
|
|
1941
|
+
f !== "" && u.push(w);
|
|
1933
1942
|
}), u;
|
|
1934
|
-
}),
|
|
1943
|
+
}), _ = $(() => {
|
|
1935
1944
|
const u = t.config.fields;
|
|
1936
|
-
return Object.keys(u).filter((
|
|
1937
|
-
label: u[
|
|
1938
|
-
value:
|
|
1945
|
+
return Object.keys(u).filter((f) => u[f].searchable).map((f) => ({
|
|
1946
|
+
label: u[f].label || f,
|
|
1947
|
+
value: f
|
|
1939
1948
|
}));
|
|
1940
1949
|
});
|
|
1941
1950
|
ce(() => t.modelValue, (u) => {
|
|
1942
|
-
r.value = {}, new URLSearchParams(u).forEach((
|
|
1943
|
-
r.value[
|
|
1951
|
+
r.value = {}, new URLSearchParams(u).forEach((f, w) => {
|
|
1952
|
+
r.value[w] = f;
|
|
1944
1953
|
});
|
|
1945
1954
|
});
|
|
1946
|
-
const
|
|
1955
|
+
const i = () => {
|
|
1947
1956
|
n.value = !n.value;
|
|
1948
|
-
},
|
|
1957
|
+
}, T = (u) => {
|
|
1949
1958
|
o("update:modelValue", u);
|
|
1950
|
-
}, b = (u) => `filter-${u}`,
|
|
1951
|
-
var
|
|
1952
|
-
return (((
|
|
1953
|
-
value:
|
|
1954
|
-
label:
|
|
1959
|
+
}, b = (u) => `filter-${u}`, I = (u) => {
|
|
1960
|
+
var f, w;
|
|
1961
|
+
return (((w = (f = t.config.schema) == null ? void 0 : f[u]) == null ? void 0 : w.values) ?? []).map((g) => ({
|
|
1962
|
+
value: g,
|
|
1963
|
+
label: g
|
|
1955
1964
|
}));
|
|
1956
|
-
},
|
|
1957
|
-
var
|
|
1958
|
-
return ((
|
|
1959
|
-
},
|
|
1965
|
+
}, R = (u) => {
|
|
1966
|
+
var f, w;
|
|
1967
|
+
return ((w = (f = t.config.schema) == null ? void 0 : f[u]) == null ? void 0 : w.type) ?? "text";
|
|
1968
|
+
}, x = (u) => {
|
|
1960
1969
|
r.value = {
|
|
1961
1970
|
...r.value,
|
|
1962
1971
|
[u]: ""
|
|
@@ -1964,105 +1973,105 @@ const X = {
|
|
|
1964
1973
|
}, V = () => {
|
|
1965
1974
|
r.value = {}, q(!0);
|
|
1966
1975
|
}, q = (u = !1) => {
|
|
1967
|
-
const
|
|
1968
|
-
u && (n.value = !1), o("update:modelValue", new URLSearchParams(
|
|
1976
|
+
const f = Object.keys(r.value).reduce((w, g) => (r.value[g] && (w[g] = `${r.value[g]}`), w), {});
|
|
1977
|
+
u && (n.value = !1), o("update:modelValue", new URLSearchParams(f).toString());
|
|
1969
1978
|
};
|
|
1970
|
-
return (u,
|
|
1971
|
-
const
|
|
1972
|
-
return e.config.isExactMatch ? (d(), N(
|
|
1979
|
+
return (u, f) => {
|
|
1980
|
+
const w = E("KInput"), g = E("KButton"), O = E("KSelect"), s = E("KMenuItem"), p = E("KMenu");
|
|
1981
|
+
return e.config.isExactMatch ? (d(), N(w, {
|
|
1973
1982
|
key: 0,
|
|
1974
1983
|
autocomplete: "off",
|
|
1975
1984
|
class: "kong-ui-entity-filter-input",
|
|
1976
1985
|
"data-testid": "search-input",
|
|
1977
1986
|
"model-value": e.modelValue,
|
|
1978
1987
|
placeholder: e.config.placeholder,
|
|
1979
|
-
"onUpdate:modelValue":
|
|
1988
|
+
"onUpdate:modelValue": T
|
|
1980
1989
|
}, {
|
|
1981
1990
|
icon: c(() => [
|
|
1982
|
-
K(
|
|
1991
|
+
K(Za)
|
|
1983
1992
|
]),
|
|
1984
1993
|
_: 1
|
|
1985
|
-
}, 8, ["model-value", "placeholder"])) : (d(),
|
|
1986
|
-
K(
|
|
1994
|
+
}, 8, ["model-value", "placeholder"])) : (d(), P("div", eo, [
|
|
1995
|
+
K(g, {
|
|
1987
1996
|
appearance: "btn-link",
|
|
1988
1997
|
"data-testid": "filter-button",
|
|
1989
1998
|
icon: "filter",
|
|
1990
|
-
onClick:
|
|
1999
|
+
onClick: i
|
|
1991
2000
|
}, {
|
|
1992
2001
|
default: c(() => [
|
|
1993
|
-
H(
|
|
2002
|
+
H(C(l(a)("filter.filterButtonText")) + " " + C(y.value.length > 0 ? `(${y.value.length})` : ""), 1)
|
|
1994
2003
|
]),
|
|
1995
2004
|
_: 1
|
|
1996
2005
|
}),
|
|
1997
|
-
he(
|
|
2006
|
+
he(B("div", {
|
|
1998
2007
|
class: "kong-ui-entity-filter-backdrop",
|
|
1999
|
-
onClick:
|
|
2008
|
+
onClick: i
|
|
2000
2009
|
}, null, 512), [
|
|
2001
2010
|
[be, n.value]
|
|
2002
2011
|
]),
|
|
2003
2012
|
he(K(p, { class: "kong-ui-entity-filter-menu" }, {
|
|
2004
2013
|
body: c(() => [
|
|
2005
|
-
(d(!0),
|
|
2014
|
+
(d(!0), P(ne, null, ae(_.value, (h, U) => (d(), N(s, {
|
|
2006
2015
|
key: h.value,
|
|
2007
2016
|
"data-testid": h.value,
|
|
2008
2017
|
expandable: "",
|
|
2009
|
-
"last-menu-item":
|
|
2018
|
+
"last-menu-item": U === _.value.length - 1
|
|
2010
2019
|
}, {
|
|
2011
2020
|
itemTitle: c(() => [
|
|
2012
|
-
|
|
2013
|
-
H(
|
|
2014
|
-
he(
|
|
2015
|
-
[be,
|
|
2021
|
+
B("span", to, [
|
|
2022
|
+
H(C(h.label) + " ", 1),
|
|
2023
|
+
he(B("span", ao, null, 512), [
|
|
2024
|
+
[be, y.value.includes(h.value)]
|
|
2016
2025
|
])
|
|
2017
2026
|
])
|
|
2018
2027
|
]),
|
|
2019
2028
|
itemBody: c(() => {
|
|
2020
|
-
var
|
|
2029
|
+
var v, M;
|
|
2021
2030
|
return [
|
|
2022
|
-
|
|
2023
|
-
|
|
2031
|
+
B("div", oo, [
|
|
2032
|
+
B("label", {
|
|
2024
2033
|
class: "menu-item-label",
|
|
2025
2034
|
for: b(h.value)
|
|
2026
|
-
},
|
|
2027
|
-
((
|
|
2035
|
+
}, C(l(a)("filter.fieldLabel")), 9, no),
|
|
2036
|
+
((M = (v = e.config.schema) == null ? void 0 : v[h.value]) == null ? void 0 : M.type) === "select" ? (d(), N(O, {
|
|
2028
2037
|
key: 0,
|
|
2029
2038
|
id: b(h.value),
|
|
2030
2039
|
modelValue: r.value[h.value],
|
|
2031
2040
|
"onUpdate:modelValue": (F) => r.value[h.value] = F,
|
|
2032
2041
|
appearance: "select",
|
|
2033
|
-
items:
|
|
2034
|
-
placeholder:
|
|
2035
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (d(), N(
|
|
2042
|
+
items: I(h.value),
|
|
2043
|
+
placeholder: l(a)("filter.selectPlaceholder")
|
|
2044
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (d(), N(w, {
|
|
2036
2045
|
key: 1,
|
|
2037
2046
|
id: b(h.value),
|
|
2038
2047
|
modelValue: r.value[h.value],
|
|
2039
2048
|
"onUpdate:modelValue": (F) => r.value[h.value] = F,
|
|
2040
2049
|
autocomplete: "off",
|
|
2041
|
-
placeholder:
|
|
2050
|
+
placeholder: l(a)("filter.inputPlaceholder"),
|
|
2042
2051
|
size: "small",
|
|
2043
|
-
type:
|
|
2052
|
+
type: R(h.value)
|
|
2044
2053
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
2045
2054
|
]),
|
|
2046
|
-
|
|
2047
|
-
K(
|
|
2055
|
+
B("div", so, [
|
|
2056
|
+
K(g, {
|
|
2048
2057
|
appearance: "btn-link",
|
|
2049
2058
|
"data-testid": "apply-filter",
|
|
2050
2059
|
size: "small",
|
|
2051
|
-
onClick:
|
|
2060
|
+
onClick: f[0] || (f[0] = (F) => q(!0))
|
|
2052
2061
|
}, {
|
|
2053
2062
|
default: c(() => [
|
|
2054
|
-
H(
|
|
2063
|
+
H(C(l(a)("filter.applyButtonText")), 1)
|
|
2055
2064
|
]),
|
|
2056
2065
|
_: 1
|
|
2057
2066
|
}),
|
|
2058
|
-
K(
|
|
2067
|
+
K(g, {
|
|
2059
2068
|
appearance: "btn-link",
|
|
2060
2069
|
"data-testid": "clear-filter",
|
|
2061
2070
|
size: "small",
|
|
2062
|
-
onClick: (F) =>
|
|
2071
|
+
onClick: (F) => x(h.value)
|
|
2063
2072
|
}, {
|
|
2064
2073
|
default: c(() => [
|
|
2065
|
-
H(
|
|
2074
|
+
H(C(l(a)("filter.clearButtonText")), 1)
|
|
2066
2075
|
]),
|
|
2067
2076
|
_: 2
|
|
2068
2077
|
}, 1032, ["onClick"])
|
|
@@ -2073,9 +2082,9 @@ const X = {
|
|
|
2073
2082
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
2074
2083
|
]),
|
|
2075
2084
|
actionButton: c(() => [
|
|
2076
|
-
K(
|
|
2085
|
+
K(g, { onClick: V }, {
|
|
2077
2086
|
default: c(() => [
|
|
2078
|
-
H(
|
|
2087
|
+
H(C(l(a)("filter.clearAllButtonText")), 1)
|
|
2079
2088
|
]),
|
|
2080
2089
|
_: 1
|
|
2081
2090
|
})
|
|
@@ -2087,7 +2096,7 @@ const X = {
|
|
|
2087
2096
|
]));
|
|
2088
2097
|
};
|
|
2089
2098
|
}
|
|
2090
|
-
}), io = /* @__PURE__ */ se(
|
|
2099
|
+
}), io = /* @__PURE__ */ se(ro, [["__scopeId", "data-v-745f38c0"]]), ge = /* @__PURE__ */ Y({
|
|
2091
2100
|
__name: "PermissionsWrapper",
|
|
2092
2101
|
props: {
|
|
2093
2102
|
/**
|
|
@@ -2109,7 +2118,7 @@ const X = {
|
|
|
2109
2118
|
}
|
|
2110
2119
|
},
|
|
2111
2120
|
setup(e) {
|
|
2112
|
-
const o = e, t = A(void 0), a =
|
|
2121
|
+
const o = e, t = A(void 0), a = $(() => t.value === !0 || t.value !== void 0 && o.forceShow === !0);
|
|
2113
2122
|
return ce(() => o.authFunction, async () => {
|
|
2114
2123
|
t.value = await o.authFunction();
|
|
2115
2124
|
}, { immediate: !0 }), (n, r) => a.value ? W(n.$slots, "default", {
|
|
@@ -2117,16 +2126,16 @@ const X = {
|
|
|
2117
2126
|
isAllowed: t.value
|
|
2118
2127
|
}) : z("", !0);
|
|
2119
2128
|
}
|
|
2120
|
-
}),
|
|
2129
|
+
}), lo = { class: "form-section-wrapper" }, uo = {
|
|
2121
2130
|
key: 0,
|
|
2122
2131
|
class: "form-section-title"
|
|
2123
|
-
},
|
|
2132
|
+
}, co = {
|
|
2124
2133
|
key: 1,
|
|
2125
2134
|
class: "form-section-description"
|
|
2126
|
-
},
|
|
2135
|
+
}, po = {
|
|
2127
2136
|
key: 2,
|
|
2128
2137
|
class: "form-section-footer"
|
|
2129
|
-
},
|
|
2138
|
+
}, mo = { class: "form-section-content" }, fo = /* @__PURE__ */ Y({
|
|
2130
2139
|
__name: "EntityFormSection",
|
|
2131
2140
|
props: {
|
|
2132
2141
|
title: {
|
|
@@ -2151,39 +2160,39 @@ const X = {
|
|
|
2151
2160
|
}
|
|
2152
2161
|
},
|
|
2153
2162
|
setup(e) {
|
|
2154
|
-
const o =
|
|
2155
|
-
return (t, a) => (d(),
|
|
2163
|
+
const o = Ae();
|
|
2164
|
+
return (t, a) => (d(), P("fieldset", {
|
|
2156
2165
|
class: ye(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
2157
2166
|
}, [
|
|
2158
|
-
|
|
2159
|
-
e.hideInfoHeader ? z("", !0) : (d(),
|
|
2167
|
+
B("div", lo, [
|
|
2168
|
+
e.hideInfoHeader ? z("", !0) : (d(), P("div", {
|
|
2160
2169
|
key: 0,
|
|
2161
2170
|
class: ye(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
2162
2171
|
}, [
|
|
2163
|
-
e.title ? (d(),
|
|
2164
|
-
e.description ||
|
|
2172
|
+
e.title ? (d(), P("h4", uo, C(e.title), 1)) : z("", !0),
|
|
2173
|
+
e.description || l(o).description ? (d(), P("div", co, [
|
|
2165
2174
|
W(t.$slots, "description", {}, () => [
|
|
2166
|
-
|
|
2175
|
+
B("p", null, C(e.description), 1)
|
|
2167
2176
|
], !0)
|
|
2168
2177
|
])) : z("", !0),
|
|
2169
|
-
|
|
2178
|
+
l(o).footer ? (d(), P("div", po, [
|
|
2170
2179
|
W(t.$slots, "footer", {}, void 0, !0)
|
|
2171
2180
|
])) : z("", !0)
|
|
2172
2181
|
], 2)),
|
|
2173
|
-
|
|
2182
|
+
B("div", mo, [
|
|
2174
2183
|
W(t.$slots, "default", {}, void 0, !0)
|
|
2175
2184
|
])
|
|
2176
2185
|
])
|
|
2177
2186
|
], 2));
|
|
2178
2187
|
}
|
|
2179
|
-
}),
|
|
2180
|
-
const
|
|
2188
|
+
}), yo = /* @__PURE__ */ se(fo, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Ue, useDeleteUrlBuilder: vo, useErrors: go, useFetchUrlBuilder: Oo, useFetcher: ho, useDebouncedFilter: bo, useStringHelpers: No, useGatewayFeatureSupported: Lo } = X;
|
|
2189
|
+
const ko = { class: "add-consumer-form-container" }, _o = { class: "add-consumer-form-cta" }, Co = { class: "select-item-label" }, Io = {
|
|
2181
2190
|
key: 0,
|
|
2182
2191
|
class: "select-item-desc"
|
|
2183
|
-
},
|
|
2192
|
+
}, wo = {
|
|
2184
2193
|
key: 0,
|
|
2185
2194
|
class: "kong-ui-entity-add-consumers-error"
|
|
2186
|
-
},
|
|
2195
|
+
}, So = { key: 0 }, $o = /* @__PURE__ */ Y({
|
|
2187
2196
|
__name: "AddConsumerModal",
|
|
2188
2197
|
props: {
|
|
2189
2198
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2201,16 +2210,16 @@ const Co = { class: "add-consumer-form-container" }, _o = { class: "add-consumer
|
|
|
2201
2210
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
2202
2211
|
setup(e, { emit: o }) {
|
|
2203
2212
|
var F;
|
|
2204
|
-
const t = e, { i18n: { t: a } } =
|
|
2213
|
+
const t = e, { i18n: { t: a } } = Ie.useI18n(), { axiosInstance: n } = Ue({
|
|
2205
2214
|
headers: (F = t.config) == null ? void 0 : F.requestHeaders
|
|
2206
2215
|
}), r = A([]), {
|
|
2207
|
-
debouncedQueryChange:
|
|
2208
|
-
loading:
|
|
2209
|
-
allRecords:
|
|
2210
|
-
error:
|
|
2216
|
+
debouncedQueryChange: y,
|
|
2217
|
+
loading: _,
|
|
2218
|
+
allRecords: i,
|
|
2219
|
+
error: T,
|
|
2211
2220
|
loadItems: b,
|
|
2212
|
-
results:
|
|
2213
|
-
} =
|
|
2221
|
+
results: I
|
|
2222
|
+
} = bo(
|
|
2214
2223
|
t.config,
|
|
2215
2224
|
ue.list[t.config.app].all,
|
|
2216
2225
|
"",
|
|
@@ -2218,103 +2227,103 @@ const Co = { class: "add-consumer-form-container" }, _o = { class: "add-consumer
|
|
|
2218
2227
|
fetchedItemsKey: "data",
|
|
2219
2228
|
searchKeys: ["username", "id"]
|
|
2220
2229
|
}
|
|
2221
|
-
),
|
|
2230
|
+
), R = (m) => m, x = $(() => T.value ? a("consumers.errors.general") : ""), V = A(0), q = $(() => i.value === void 0), u = $(() => I.value.map((m) => ({
|
|
2222
2231
|
label: m.username || m.customId,
|
|
2223
2232
|
value: m.id,
|
|
2224
2233
|
selected: r.value.includes(m.id),
|
|
2225
2234
|
data: m
|
|
2226
2235
|
// we need this to determine whether or not to show the description text
|
|
2227
|
-
}))),
|
|
2236
|
+
}))), f = (m) => {
|
|
2228
2237
|
var j;
|
|
2229
|
-
const
|
|
2230
|
-
return
|
|
2231
|
-
},
|
|
2232
|
-
s.value = "",
|
|
2233
|
-
},
|
|
2238
|
+
const S = q.value ? I.value.find((G) => G.id === m) : (j = i.value) == null ? void 0 : j.find((G) => G.id === m);
|
|
2239
|
+
return S ? S.username || S.custom_id : m;
|
|
2240
|
+
}, w = () => {
|
|
2241
|
+
s.value = "", g.value = [], v.value = [], o("cancel");
|
|
2242
|
+
}, g = A([]), O = A(!1), s = A(""), p = async () => {
|
|
2234
2243
|
if (!r.value.length) {
|
|
2235
|
-
s.value = "",
|
|
2244
|
+
s.value = "", v.value = [], o("cancel");
|
|
2236
2245
|
return;
|
|
2237
2246
|
}
|
|
2238
|
-
O.value = !0, s.value = "",
|
|
2247
|
+
O.value = !0, s.value = "", g.value = [], v.value = [];
|
|
2239
2248
|
try {
|
|
2240
|
-
const m = r.value.map((G) =>
|
|
2249
|
+
const m = r.value.map((G) => U(G)), S = await Promise.allSettled(m);
|
|
2241
2250
|
let j = !0;
|
|
2242
|
-
|
|
2251
|
+
S.forEach((G) => {
|
|
2243
2252
|
G.status !== "fulfilled" && (j = !1);
|
|
2244
|
-
}), j ? (
|
|
2253
|
+
}), j ? (g.value = [], v.value = [], o("add:success", r.value), r.value = []) : (g.value.length && o("add:partial-success", g.value), r.value = [], M(S));
|
|
2245
2254
|
} catch {
|
|
2246
2255
|
s.value = a("consumers.errors.add"), o("error", s.value);
|
|
2247
2256
|
} finally {
|
|
2248
2257
|
O.value = !1;
|
|
2249
2258
|
}
|
|
2250
|
-
}, h =
|
|
2251
|
-
var
|
|
2259
|
+
}, h = $(() => {
|
|
2260
|
+
var S, j, G, Z;
|
|
2252
2261
|
let m = `${t.config.apiBaseUrl}${ue.list[t.config.app].forConsumerGroup}`;
|
|
2253
|
-
return t.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((
|
|
2254
|
-
}),
|
|
2255
|
-
const
|
|
2262
|
+
return t.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((S = t.config) == null ? void 0 : S.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((j = t.config) == null ? void 0 : j.consumerGroupId) || "") : t.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (G = t.config) != null && G.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((Z = t.config) == null ? void 0 : Z.consumerGroupId) || "")), m;
|
|
2263
|
+
}), U = async (m) => {
|
|
2264
|
+
const S = {
|
|
2256
2265
|
consumer: m
|
|
2257
2266
|
};
|
|
2258
2267
|
try {
|
|
2259
|
-
const j = await n.post(h.value,
|
|
2260
|
-
return
|
|
2268
|
+
const j = await n.post(h.value, S);
|
|
2269
|
+
return g.value.push(m), j;
|
|
2261
2270
|
} catch (j) {
|
|
2262
|
-
let G = `${
|
|
2263
|
-
return j.response.status === 409 && (G = `${
|
|
2271
|
+
let G = `${f(m)} - ${j.message}`;
|
|
2272
|
+
return j.response.status === 409 && (G = `${f(m)} - ${a("consumers.errors.already_added")}`), Promise.reject(Error(G));
|
|
2264
2273
|
}
|
|
2265
|
-
},
|
|
2266
|
-
|
|
2274
|
+
}, v = A([]), M = (m) => {
|
|
2275
|
+
v.value = m.map((S) => {
|
|
2267
2276
|
var j;
|
|
2268
|
-
return (j =
|
|
2277
|
+
return (j = S.reason) == null ? void 0 : j.message;
|
|
2269
2278
|
}).filter(Boolean);
|
|
2270
2279
|
};
|
|
2271
2280
|
return ce(u, () => {
|
|
2272
2281
|
V.value++;
|
|
2273
2282
|
}, { immediate: !0, deep: !0 }), Ce(async () => {
|
|
2274
2283
|
await b();
|
|
2275
|
-
}), (m,
|
|
2284
|
+
}), (m, S) => {
|
|
2276
2285
|
const j = E("KMultiselect"), G = E("KAlert"), Z = E("KPrompt");
|
|
2277
2286
|
return d(), N(Z, {
|
|
2278
2287
|
"action-pending": O.value,
|
|
2279
2288
|
class: "kong-ui-entities-add-consumers-modal",
|
|
2280
2289
|
"data-testid": "add-consumer-modal",
|
|
2281
2290
|
"is-visible": e.visible,
|
|
2282
|
-
title:
|
|
2283
|
-
onCanceled:
|
|
2291
|
+
title: l(a)("consumers.consumer_groups.add.title"),
|
|
2292
|
+
onCanceled: w,
|
|
2284
2293
|
onProceed: p
|
|
2285
2294
|
}, {
|
|
2286
2295
|
"body-content": c(() => [
|
|
2287
|
-
|
|
2288
|
-
|
|
2296
|
+
B("div", ko, [
|
|
2297
|
+
B("p", _o, C(l(a)("consumers.consumer_groups.add.ctaText")), 1),
|
|
2289
2298
|
K(j, {
|
|
2290
2299
|
modelValue: r.value,
|
|
2291
|
-
"onUpdate:modelValue":
|
|
2300
|
+
"onUpdate:modelValue": S[0] || (S[0] = (oe) => r.value = oe),
|
|
2292
2301
|
autosuggest: "",
|
|
2293
2302
|
"data-testid": "add-consumers-multiselect",
|
|
2294
|
-
"dropdown-footer-text": q.value ?
|
|
2303
|
+
"dropdown-footer-text": q.value ? l(a)("consumers.consumer_groups.add.footer") : void 0,
|
|
2295
2304
|
items: u.value,
|
|
2296
|
-
label:
|
|
2297
|
-
loading:
|
|
2298
|
-
placeholder:
|
|
2305
|
+
label: l(a)("consumers.consumer_groups.add.consumers_label"),
|
|
2306
|
+
loading: l(_),
|
|
2307
|
+
placeholder: l(a)("consumers.consumer_groups.add.consumer_placeholder"),
|
|
2299
2308
|
readonly: O.value,
|
|
2300
2309
|
required: "",
|
|
2301
2310
|
width: "100%",
|
|
2302
|
-
onQueryChange:
|
|
2311
|
+
onQueryChange: l(y)
|
|
2303
2312
|
}, {
|
|
2304
2313
|
"item-template": c(({ item: oe }) => [
|
|
2305
|
-
|
|
2306
|
-
|
|
2314
|
+
B("div", Co, C(oe.label), 1),
|
|
2315
|
+
R(oe).data.username && R(oe).data.custom_id ? (d(), P("div", Io, C(R(oe).data.custom_id), 1)) : z("", !0)
|
|
2307
2316
|
]),
|
|
2308
2317
|
_: 1
|
|
2309
2318
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
2310
|
-
s.value ||
|
|
2319
|
+
s.value || x.value || v.value.length ? (d(), P("div", wo, [
|
|
2311
2320
|
K(G, { appearance: "danger" }, {
|
|
2312
2321
|
alertMessage: c(() => [
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
(d(!0),
|
|
2322
|
+
B("p", null, C(l(a)("consumers.errors.add")), 1),
|
|
2323
|
+
v.value.length ? (d(), P("ul", So, [
|
|
2324
|
+
(d(!0), P(ne, null, ae(v.value, (oe, we) => (d(), P("li", { key: we }, C(oe), 1))), 128))
|
|
2316
2325
|
])) : z("", !0),
|
|
2317
|
-
|
|
2326
|
+
B("div", null, C(s.value || x.value), 1)
|
|
2318
2327
|
]),
|
|
2319
2328
|
_: 1
|
|
2320
2329
|
})
|
|
@@ -2326,12 +2335,12 @@ const Co = { class: "add-consumer-form-container" }, _o = { class: "add-consumer
|
|
|
2326
2335
|
};
|
|
2327
2336
|
}
|
|
2328
2337
|
});
|
|
2329
|
-
const
|
|
2338
|
+
const Fe = (e, o) => {
|
|
2330
2339
|
const t = e.__vccOpts || e;
|
|
2331
2340
|
for (const [a, n] of o)
|
|
2332
2341
|
t[a] = n;
|
|
2333
2342
|
return t;
|
|
2334
|
-
},
|
|
2343
|
+
}, xo = /* @__PURE__ */ Fe($o, [["__scopeId", "data-v-86f09821"]]), Ko = { class: "kong-ui-entities-consumers-list" }, To = { key: 1 }, Bo = /* @__PURE__ */ Y({
|
|
2335
2344
|
__name: "ConsumerList",
|
|
2336
2345
|
props: {
|
|
2337
2346
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2372,20 +2381,20 @@ const Re = (e, o) => {
|
|
|
2372
2381
|
},
|
|
2373
2382
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
2374
2383
|
setup(e, { emit: o }) {
|
|
2375
|
-
var
|
|
2376
|
-
const t = e, { i18nT: a, i18n: { t: n } } =
|
|
2377
|
-
headers: (
|
|
2378
|
-
}),
|
|
2384
|
+
var Le;
|
|
2385
|
+
const t = e, { i18nT: a, i18n: { t: n } } = Ie.useI18n(), r = Me(), { axiosInstance: y } = Ue({
|
|
2386
|
+
headers: (Le = t.config) == null ? void 0 : Le.requestHeaders
|
|
2387
|
+
}), _ = A(1), i = $(() => !!t.config.consumerGroupId), T = $(() => t.config.app !== "kongManager" || !!t.config.disableSorting), b = {
|
|
2379
2388
|
username: { label: n("consumers.list.table_headers.username"), searchable: !0, sortable: !0 },
|
|
2380
2389
|
custom_id: { label: n("consumers.list.table_headers.custom_id"), searchable: !0, sortable: !0 },
|
|
2381
2390
|
tags: { label: n("consumers.list.table_headers.tags"), sortable: !1 }
|
|
2382
|
-
},
|
|
2391
|
+
}, I = b, R = (k) => ({
|
|
2383
2392
|
"data-testid": k.username ?? k.custom_id ?? k.id
|
|
2384
|
-
}),
|
|
2385
|
-
var L, Q, te,
|
|
2386
|
-
let k = `${t.config.apiBaseUrl}${ue.list[t.config.app][
|
|
2387
|
-
return t.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((L = t.config) == null ? void 0 : L.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((Q = t.config) == null ? void 0 : Q.consumerGroupId) || "") : t.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (te = t.config) != null && te.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((
|
|
2388
|
-
}), V = A(""), q =
|
|
2393
|
+
}), x = $(() => {
|
|
2394
|
+
var L, Q, te, ie;
|
|
2395
|
+
let k = `${t.config.apiBaseUrl}${ue.list[t.config.app][i.value ? "forConsumerGroup" : "all"]}`;
|
|
2396
|
+
return t.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((L = t.config) == null ? void 0 : L.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((Q = t.config) == null ? void 0 : Q.consumerGroupId) || "") : t.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (te = t.config) != null && te.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ie = t.config) == null ? void 0 : ie.consumerGroupId) || "")), k;
|
|
2397
|
+
}), V = A(""), q = $(() => {
|
|
2389
2398
|
const k = t.config.app === "konnect" || t.config.isExactMatch;
|
|
2390
2399
|
return k ? {
|
|
2391
2400
|
isExactMatch: k,
|
|
@@ -2398,10 +2407,10 @@ const Re = (e, o) => {
|
|
|
2398
2407
|
},
|
|
2399
2408
|
schema: t.config.filterSchema
|
|
2400
2409
|
};
|
|
2401
|
-
}), u =
|
|
2410
|
+
}), u = $(() => i.value ? "consumers" : void 0), { fetcher: f, fetcherState: w } = ho(t.config, x.value, u.value), g = () => {
|
|
2402
2411
|
V.value = "";
|
|
2403
2412
|
}, O = () => {
|
|
2404
|
-
|
|
2413
|
+
_.value++;
|
|
2405
2414
|
}, s = (k) => k ?? "-", p = A(""), h = (k, L) => {
|
|
2406
2415
|
const Q = k.id;
|
|
2407
2416
|
if (!L(Q)) {
|
|
@@ -2417,7 +2426,7 @@ const Re = (e, o) => {
|
|
|
2417
2426
|
field: "id",
|
|
2418
2427
|
message: n("consumers.copy.success", { val: Q })
|
|
2419
2428
|
});
|
|
2420
|
-
},
|
|
2429
|
+
}, U = (k, L) => {
|
|
2421
2430
|
const Q = JSON.stringify(k);
|
|
2422
2431
|
if (!L(Q)) {
|
|
2423
2432
|
o("copy:error", {
|
|
@@ -2430,100 +2439,100 @@ const Re = (e, o) => {
|
|
|
2430
2439
|
entity: k,
|
|
2431
2440
|
message: n("consumers.copy.success_brief")
|
|
2432
2441
|
});
|
|
2433
|
-
},
|
|
2442
|
+
}, v = async (k) => {
|
|
2434
2443
|
var Q;
|
|
2435
2444
|
await ((Q = t.canRetrieve) == null ? void 0 : Q.call(t, k)) && r.push(t.config.getViewRoute(k.id));
|
|
2436
|
-
},
|
|
2445
|
+
}, M = (k) => ({
|
|
2437
2446
|
label: n("consumers.actions.view"),
|
|
2438
2447
|
to: t.config.getViewRoute(k)
|
|
2439
2448
|
}), F = (k) => ({
|
|
2440
2449
|
label: n("consumers.actions.edit"),
|
|
2441
2450
|
to: t.config.getEditRoute(k)
|
|
2442
|
-
}), m = A(void 0),
|
|
2443
|
-
m.value = k,
|
|
2444
|
-
},
|
|
2445
|
-
|
|
2446
|
-
},
|
|
2451
|
+
}), m = A(void 0), S = A(!1), j = A(!1), G = A(""), Z = vo(t.config, x.value), oe = (k) => {
|
|
2452
|
+
m.value = k, S.value = !0;
|
|
2453
|
+
}, we = () => {
|
|
2454
|
+
S.value = !1;
|
|
2455
|
+
}, it = async () => {
|
|
2447
2456
|
var k, L, Q;
|
|
2448
2457
|
if ((k = m.value) != null && k.id) {
|
|
2449
2458
|
j.value = !0;
|
|
2450
2459
|
try {
|
|
2451
|
-
await
|
|
2460
|
+
await y.delete(Z(m.value.id)), j.value = !1, S.value = !1, _.value++, o("delete:success", m.value);
|
|
2452
2461
|
} catch (te) {
|
|
2453
2462
|
G.value = ((Q = (L = te.response) == null ? void 0 : L.data) == null ? void 0 : Q.message) || te.message || n("consumers.errors.delete"), o("error", te);
|
|
2454
2463
|
} finally {
|
|
2455
2464
|
j.value = !1;
|
|
2456
2465
|
}
|
|
2457
2466
|
}
|
|
2458
|
-
},
|
|
2459
|
-
|
|
2460
|
-
},
|
|
2461
|
-
|
|
2462
|
-
},
|
|
2463
|
-
L ||
|
|
2464
|
-
},
|
|
2465
|
-
|
|
2466
|
-
}, re = A(void 0),
|
|
2467
|
-
re.value = k,
|
|
2468
|
-
},
|
|
2469
|
-
|
|
2470
|
-
}, dt =
|
|
2471
|
-
var L, Q, te,
|
|
2467
|
+
}, Se = A(!1), Re = () => {
|
|
2468
|
+
Se.value = !0;
|
|
2469
|
+
}, Ve = () => {
|
|
2470
|
+
Se.value = !1;
|
|
2471
|
+
}, je = (k, L) => {
|
|
2472
|
+
L || Ve(), _.value++, o("add:success", k);
|
|
2473
|
+
}, lt = () => {
|
|
2474
|
+
i.value && Re();
|
|
2475
|
+
}, re = A(void 0), $e = A(!1), ut = A(""), ct = (k) => {
|
|
2476
|
+
re.value = k, $e.value = !0;
|
|
2477
|
+
}, Oe = () => {
|
|
2478
|
+
$e.value = !1, re.value = void 0;
|
|
2479
|
+
}, dt = $(() => {
|
|
2480
|
+
var L, Q, te, ie;
|
|
2472
2481
|
let k = `${t.config.apiBaseUrl}${ue.list[t.config.app].oneForConsumerGroup}`;
|
|
2473
|
-
return t.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((L = t.config) == null ? void 0 : L.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((Q = t.config) == null ? void 0 : Q.consumerGroupId) || "") : t.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (te = t.config) != null && te.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((
|
|
2474
|
-
}),
|
|
2482
|
+
return t.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((L = t.config) == null ? void 0 : L.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((Q = t.config) == null ? void 0 : Q.consumerGroupId) || "") : t.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (te = t.config) != null && te.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((ie = t.config) == null ? void 0 : ie.consumerGroupId) || "")), k;
|
|
2483
|
+
}), Ne = A(!1), pt = async () => {
|
|
2475
2484
|
if (re.value) {
|
|
2476
|
-
|
|
2485
|
+
Ne.value = !0;
|
|
2477
2486
|
try {
|
|
2478
2487
|
const k = dt.value.replace(/{consumerId}/gi, re.value.id);
|
|
2479
|
-
await
|
|
2488
|
+
await y.delete(k), o("remove:success", re.value), Oe(), _.value++;
|
|
2480
2489
|
} catch (k) {
|
|
2481
2490
|
ut.value = k.message || n("consumers.errors.delete"), o("error", k);
|
|
2482
2491
|
} finally {
|
|
2483
|
-
|
|
2492
|
+
Ne.value = !1;
|
|
2484
2493
|
}
|
|
2485
2494
|
}
|
|
2486
2495
|
};
|
|
2487
|
-
ce(
|
|
2488
|
-
if (k.status ===
|
|
2496
|
+
ce(w, (k) => {
|
|
2497
|
+
if (k.status === le.Error) {
|
|
2489
2498
|
p.value = n("consumers.errors.general"), o("error", k.error);
|
|
2490
2499
|
return;
|
|
2491
2500
|
}
|
|
2492
2501
|
p.value = "";
|
|
2493
2502
|
});
|
|
2494
|
-
const
|
|
2495
|
-
ctaPath:
|
|
2503
|
+
const xe = A({
|
|
2504
|
+
ctaPath: i.value ? void 0 : t.config.createRoute,
|
|
2496
2505
|
ctaText: void 0,
|
|
2497
2506
|
message: n("consumers.list.empty_state.description"),
|
|
2498
2507
|
title: n("consumers.title")
|
|
2499
2508
|
});
|
|
2500
2509
|
return Ce(async () => {
|
|
2501
|
-
await t.canCreate() && (
|
|
2510
|
+
await t.canCreate() && (xe.value.title = i.value ? n("consumers.list.empty_state.title_for_consumer_group") : n("consumers.list.empty_state.title"), xe.value.ctaText = i.value ? n("consumers.actions.add_consumer") : n("consumers.actions.create"));
|
|
2502
2511
|
}), (k, L) => {
|
|
2503
|
-
const Q = E("KButton"), te = E("KBadge"),
|
|
2504
|
-
return d(),
|
|
2505
|
-
K(
|
|
2512
|
+
const Q = E("KButton"), te = E("KBadge"), ie = E("KTruncate"), ve = E("KDropdownItem"), De = E("KClipboardProvider"), mt = E("KPrompt");
|
|
2513
|
+
return d(), P("div", Ko, [
|
|
2514
|
+
K(l(La), {
|
|
2506
2515
|
"cache-identifier": e.cacheIdentifier,
|
|
2507
|
-
"disable-pagination":
|
|
2516
|
+
"disable-pagination": i.value,
|
|
2508
2517
|
"disable-pagination-page-jump": "",
|
|
2509
|
-
"disable-sorting":
|
|
2510
|
-
"empty-state-options":
|
|
2518
|
+
"disable-sorting": T.value,
|
|
2519
|
+
"empty-state-options": xe.value,
|
|
2511
2520
|
"enable-entity-actions": "",
|
|
2512
2521
|
"error-message": p.value,
|
|
2513
|
-
fetcher:
|
|
2514
|
-
"fetcher-cache-key":
|
|
2522
|
+
fetcher: l(f),
|
|
2523
|
+
"fetcher-cache-key": _.value,
|
|
2515
2524
|
"pagination-type": "offset",
|
|
2516
2525
|
"preferences-storage-key": "kong-ui-entities-consumers-list",
|
|
2517
2526
|
query: V.value,
|
|
2518
|
-
"row-attributes":
|
|
2519
|
-
"table-headers":
|
|
2520
|
-
onClearSearchInput:
|
|
2521
|
-
"onClick:row": L[3] || (L[3] = (D) =>
|
|
2522
|
-
onEmptyStateCtaClicked:
|
|
2527
|
+
"row-attributes": R,
|
|
2528
|
+
"table-headers": l(I),
|
|
2529
|
+
onClearSearchInput: g,
|
|
2530
|
+
"onClick:row": L[3] || (L[3] = (D) => v(D)),
|
|
2531
|
+
onEmptyStateCtaClicked: lt,
|
|
2523
2532
|
onSort: O
|
|
2524
2533
|
}, {
|
|
2525
2534
|
"toolbar-filter": c(() => [
|
|
2526
|
-
|
|
2535
|
+
i.value ? z("", !0) : (d(), N(l(io), {
|
|
2527
2536
|
key: 0,
|
|
2528
2537
|
modelValue: V.value,
|
|
2529
2538
|
"onUpdate:modelValue": L[0] || (L[0] = (D) => V.value = D),
|
|
@@ -2531,7 +2540,7 @@ const Re = (e, o) => {
|
|
|
2531
2540
|
}, null, 8, ["modelValue", "config"]))
|
|
2532
2541
|
]),
|
|
2533
2542
|
"toolbar-button": c(() => [
|
|
2534
|
-
K(
|
|
2543
|
+
K(l(ge), {
|
|
2535
2544
|
"auth-function": () => e.canCreate()
|
|
2536
2545
|
}, {
|
|
2537
2546
|
default: c(() => [
|
|
@@ -2540,10 +2549,10 @@ const Re = (e, o) => {
|
|
|
2540
2549
|
"data-testid": "toolbar-add-consumer",
|
|
2541
2550
|
icon: "plus",
|
|
2542
2551
|
to: e.config.consumerGroupId ? void 0 : e.config.createRoute,
|
|
2543
|
-
onClick: L[1] || (L[1] = () => e.config.consumerGroupId ?
|
|
2552
|
+
onClick: L[1] || (L[1] = () => e.config.consumerGroupId ? Re() : void 0)
|
|
2544
2553
|
}, {
|
|
2545
2554
|
default: c(() => [
|
|
2546
|
-
H(
|
|
2555
|
+
H(C(e.config.consumerGroupId ? l(n)("consumers.actions.add_consumer") : l(n)("consumers.list.toolbar_actions.new_consumer")), 1)
|
|
2547
2556
|
]),
|
|
2548
2557
|
_: 1
|
|
2549
2558
|
}, 8, ["to"])
|
|
@@ -2552,92 +2561,92 @@ const Re = (e, o) => {
|
|
|
2552
2561
|
}, 8, ["auth-function"])
|
|
2553
2562
|
]),
|
|
2554
2563
|
username: c(({ rowValue: D }) => [
|
|
2555
|
-
|
|
2564
|
+
B("b", null, C(s(D)), 1)
|
|
2556
2565
|
]),
|
|
2557
2566
|
custom_id: c(({ rowValue: D }) => [
|
|
2558
|
-
H(
|
|
2567
|
+
H(C(s(D)), 1)
|
|
2559
2568
|
]),
|
|
2560
2569
|
tags: c(({ rowValue: D }) => [
|
|
2561
|
-
D && D.length > 0 ? (d(), N(
|
|
2570
|
+
D && D.length > 0 ? (d(), N(ie, { key: 0 }, {
|
|
2562
2571
|
default: c(() => [
|
|
2563
|
-
(d(!0),
|
|
2572
|
+
(d(!0), P(ne, null, ae(D, (de) => (d(), N(te, {
|
|
2564
2573
|
key: de,
|
|
2565
2574
|
onClick: L[2] || (L[2] = ke(() => {
|
|
2566
2575
|
}, ["stop"]))
|
|
2567
2576
|
}, {
|
|
2568
2577
|
default: c(() => [
|
|
2569
|
-
H(
|
|
2578
|
+
H(C(de), 1)
|
|
2570
2579
|
]),
|
|
2571
2580
|
_: 2
|
|
2572
2581
|
}, 1024))), 128))
|
|
2573
2582
|
]),
|
|
2574
2583
|
_: 2
|
|
2575
|
-
}, 1024)) : (d(),
|
|
2584
|
+
}, 1024)) : (d(), P("span", To, "-"))
|
|
2576
2585
|
]),
|
|
2577
2586
|
actions: c(({ row: D }) => [
|
|
2578
|
-
K(
|
|
2587
|
+
K(De, null, {
|
|
2579
2588
|
default: c(({ copyToClipboard: de }) => [
|
|
2580
|
-
K(
|
|
2589
|
+
K(ve, {
|
|
2581
2590
|
"data-testid": "action-entity-copy-id",
|
|
2582
2591
|
onClick: (ft) => h(D, de)
|
|
2583
2592
|
}, {
|
|
2584
2593
|
default: c(() => [
|
|
2585
|
-
H(
|
|
2594
|
+
H(C(l(n)("consumers.actions.copy_id")), 1)
|
|
2586
2595
|
]),
|
|
2587
2596
|
_: 2
|
|
2588
2597
|
}, 1032, ["onClick"])
|
|
2589
2598
|
]),
|
|
2590
2599
|
_: 2
|
|
2591
2600
|
}, 1024),
|
|
2592
|
-
K(
|
|
2601
|
+
K(De, null, {
|
|
2593
2602
|
default: c(({ copyToClipboard: de }) => [
|
|
2594
|
-
K(
|
|
2603
|
+
K(ve, {
|
|
2595
2604
|
"data-testid": "action-entity-copy-json",
|
|
2596
|
-
onClick: (ft) =>
|
|
2605
|
+
onClick: (ft) => U(D, de)
|
|
2597
2606
|
}, {
|
|
2598
2607
|
default: c(() => [
|
|
2599
|
-
H(
|
|
2608
|
+
H(C(l(n)("consumers.actions.copy_json")), 1)
|
|
2600
2609
|
]),
|
|
2601
2610
|
_: 2
|
|
2602
2611
|
}, 1032, ["onClick"])
|
|
2603
2612
|
]),
|
|
2604
2613
|
_: 2
|
|
2605
2614
|
}, 1024),
|
|
2606
|
-
K(
|
|
2615
|
+
K(l(ge), {
|
|
2607
2616
|
"auth-function": () => e.canRetrieve(D)
|
|
2608
2617
|
}, {
|
|
2609
2618
|
default: c(() => [
|
|
2610
|
-
K(
|
|
2619
|
+
K(ve, {
|
|
2611
2620
|
"data-testid": "action-entity-view",
|
|
2612
2621
|
"has-divider": "",
|
|
2613
|
-
item:
|
|
2622
|
+
item: M(D.id)
|
|
2614
2623
|
}, null, 8, ["item"])
|
|
2615
2624
|
]),
|
|
2616
2625
|
_: 2
|
|
2617
2626
|
}, 1032, ["auth-function"]),
|
|
2618
|
-
K(
|
|
2627
|
+
K(l(ge), {
|
|
2619
2628
|
"auth-function": () => e.canEdit(D)
|
|
2620
2629
|
}, {
|
|
2621
2630
|
default: c(() => [
|
|
2622
|
-
K(
|
|
2631
|
+
K(ve, {
|
|
2623
2632
|
"data-testid": "action-entity-edit",
|
|
2624
2633
|
item: F(D.id)
|
|
2625
2634
|
}, null, 8, ["item"])
|
|
2626
2635
|
]),
|
|
2627
2636
|
_: 2
|
|
2628
2637
|
}, 1032, ["auth-function"]),
|
|
2629
|
-
K(
|
|
2638
|
+
K(l(ge), {
|
|
2630
2639
|
"auth-function": () => e.canDelete(D)
|
|
2631
2640
|
}, {
|
|
2632
2641
|
default: c(() => [
|
|
2633
|
-
K(
|
|
2642
|
+
K(ve, {
|
|
2634
2643
|
"data-testid": "action-entity-delete",
|
|
2635
2644
|
"has-divider": "",
|
|
2636
2645
|
"is-dangerous": "",
|
|
2637
2646
|
onClick: () => e.config.consumerGroupId ? ct(D) : oe(D)
|
|
2638
2647
|
}, {
|
|
2639
2648
|
default: c(() => [
|
|
2640
|
-
H(
|
|
2649
|
+
H(C(e.config.consumerGroupId ? l(n)("consumers.actions.remove") : l(n)("consumers.actions.delete")), 1)
|
|
2641
2650
|
]),
|
|
2642
2651
|
_: 2
|
|
2643
2652
|
}, 1032, ["onClick"])
|
|
@@ -2647,56 +2656,56 @@ const Re = (e, o) => {
|
|
|
2647
2656
|
]),
|
|
2648
2657
|
_: 1
|
|
2649
2658
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
2650
|
-
K(
|
|
2659
|
+
K(l(Ja), {
|
|
2651
2660
|
"action-pending": j.value,
|
|
2652
2661
|
"data-testid": "delete-consumer-modal",
|
|
2653
|
-
description:
|
|
2662
|
+
description: l(n)("consumers.delete.description"),
|
|
2654
2663
|
"entity-name": m.value && (m.value.username || m.value.custom_id || m.value.id),
|
|
2655
|
-
"entity-type":
|
|
2664
|
+
"entity-type": l(et).Consumer,
|
|
2656
2665
|
error: G.value,
|
|
2657
|
-
title:
|
|
2658
|
-
visible:
|
|
2659
|
-
onCancel:
|
|
2660
|
-
onProceed:
|
|
2666
|
+
title: l(n)("consumers.delete.title"),
|
|
2667
|
+
visible: S.value,
|
|
2668
|
+
onCancel: we,
|
|
2669
|
+
onProceed: it
|
|
2661
2670
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
2662
|
-
e.config.consumerGroupId ? (d(), N(
|
|
2671
|
+
e.config.consumerGroupId ? (d(), N(xo, {
|
|
2663
2672
|
key: 0,
|
|
2664
2673
|
config: e.config,
|
|
2665
2674
|
"data-testid": "add-consumer-modal",
|
|
2666
|
-
visible:
|
|
2667
|
-
"onAdd:partialSuccess": L[4] || (L[4] = (D) =>
|
|
2668
|
-
"onAdd:success": L[5] || (L[5] = (D) =>
|
|
2669
|
-
onCancel:
|
|
2675
|
+
visible: Se.value,
|
|
2676
|
+
"onAdd:partialSuccess": L[4] || (L[4] = (D) => je(D, !0)),
|
|
2677
|
+
"onAdd:success": L[5] || (L[5] = (D) => je(D)),
|
|
2678
|
+
onCancel: Ve
|
|
2670
2679
|
}, null, 8, ["config", "visible"])) : z("", !0),
|
|
2671
2680
|
e.config.consumerGroupId && re.value ? (d(), N(mt, {
|
|
2672
2681
|
key: 1,
|
|
2673
2682
|
"data-testid": "remove-consumer-modal",
|
|
2674
|
-
"is-visible":
|
|
2675
|
-
title:
|
|
2683
|
+
"is-visible": $e.value,
|
|
2684
|
+
title: l(n)("consumers.consumer_groups.remove.title"),
|
|
2676
2685
|
type: "danger",
|
|
2677
|
-
onCanceled:
|
|
2686
|
+
onCanceled: Oe,
|
|
2678
2687
|
onProceed: pt
|
|
2679
2688
|
}, {
|
|
2680
2689
|
"body-content": c(() => [
|
|
2681
|
-
K(
|
|
2690
|
+
K(l(a), {
|
|
2682
2691
|
class: "message",
|
|
2683
2692
|
keypath: e.config.consumerGroupName ? "consumers.consumer_groups.remove.confirmation" : "consumers.consumer_groups.remove.confirmationNoCG",
|
|
2684
2693
|
tag: "p"
|
|
2685
2694
|
}, fe({
|
|
2686
2695
|
consumer: c(() => [
|
|
2687
|
-
|
|
2696
|
+
B("strong", null, C(re.value.username || re.value.custom_id || re.value.id), 1)
|
|
2688
2697
|
]),
|
|
2689
2698
|
_: 2
|
|
2690
2699
|
}, [
|
|
2691
2700
|
e.config.consumerGroupName ? {
|
|
2692
2701
|
name: "consumerGroup",
|
|
2693
2702
|
fn: c(() => [
|
|
2694
|
-
|
|
2703
|
+
B("strong", null, C(e.config.consumerGroupName), 1)
|
|
2695
2704
|
]),
|
|
2696
2705
|
key: "0"
|
|
2697
2706
|
} : void 0
|
|
2698
2707
|
]), 1032, ["keypath"]),
|
|
2699
|
-
|
|
2708
|
+
B("p", null, C(l(n)("consumers.consumer_groups.remove.description")), 1)
|
|
2700
2709
|
]),
|
|
2701
2710
|
_: 1
|
|
2702
2711
|
}, 8, ["is-visible", "title"])) : z("", !0)
|
|
@@ -2704,7 +2713,7 @@ const Re = (e, o) => {
|
|
|
2704
2713
|
};
|
|
2705
2714
|
}
|
|
2706
2715
|
});
|
|
2707
|
-
const
|
|
2716
|
+
const Do = /* @__PURE__ */ Fe(Bo, [["__scopeId", "data-v-45929bbf"]]), Ao = { class: "kong-ui-entities-consumer-form" }, Mo = { class: "fields-group-title" }, Po = { class: "fields-group-text" }, qo = /* @__PURE__ */ Y({
|
|
2708
2717
|
__name: "ConsumerForm",
|
|
2709
2718
|
props: {
|
|
2710
2719
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2723,9 +2732,9 @@ const Go = /* @__PURE__ */ Re(Ao, [["__scopeId", "data-v-45929bbf"]]), Mo = { cl
|
|
|
2723
2732
|
emits: ["update", "error", "loading"],
|
|
2724
2733
|
setup(e, { emit: o }) {
|
|
2725
2734
|
var O;
|
|
2726
|
-
const t = e, { i18nT: a, i18n: { t: n } } =
|
|
2735
|
+
const t = e, { i18nT: a, i18n: { t: n } } = Ie.useI18n(), r = Me(), { axiosInstance: y } = Ue({
|
|
2727
2736
|
headers: (O = t.config) == null ? void 0 : O.requestHeaders
|
|
2728
|
-
}), { getMessageFromError:
|
|
2737
|
+
}), { getMessageFromError: _ } = go(), i = Ge({
|
|
2729
2738
|
fields: {
|
|
2730
2739
|
username: "",
|
|
2731
2740
|
customId: "",
|
|
@@ -2733,98 +2742,98 @@ const Go = /* @__PURE__ */ Re(Ao, [["__scopeId", "data-v-45929bbf"]]), Mo = { cl
|
|
|
2733
2742
|
},
|
|
2734
2743
|
readonly: !1,
|
|
2735
2744
|
errorMessage: ""
|
|
2736
|
-
}),
|
|
2745
|
+
}), T = Ge({
|
|
2737
2746
|
username: "",
|
|
2738
2747
|
customId: "",
|
|
2739
2748
|
tags: ""
|
|
2740
|
-
}), b =
|
|
2749
|
+
}), b = $(() => {
|
|
2741
2750
|
var s, p;
|
|
2742
2751
|
return (p = ue.form[(s = t.config) == null ? void 0 : s.app]) == null ? void 0 : p.edit;
|
|
2743
|
-
}),
|
|
2752
|
+
}), I = () => {
|
|
2744
2753
|
var s;
|
|
2745
2754
|
r.push(((s = t.config) == null ? void 0 : s.cancelRoute) || { name: "consumer-list" });
|
|
2746
|
-
},
|
|
2755
|
+
}, R = (s) => {
|
|
2747
2756
|
o("loading", s);
|
|
2748
|
-
},
|
|
2757
|
+
}, x = (s) => {
|
|
2749
2758
|
o("error", s);
|
|
2750
2759
|
}, V = (s) => {
|
|
2751
|
-
var h,
|
|
2752
|
-
|
|
2753
|
-
const p = ((
|
|
2754
|
-
|
|
2755
|
-
}, q =
|
|
2756
|
-
var h,
|
|
2757
|
-
let p = `${(h = t.config) == null ? void 0 : h.apiBaseUrl}${ue.form[(
|
|
2758
|
-
return ((
|
|
2759
|
-
},
|
|
2760
|
+
var h, U, v;
|
|
2761
|
+
i.fields.username = ((h = s == null ? void 0 : s.item) == null ? void 0 : h.username) || (s == null ? void 0 : s.username) || "", i.fields.customId = ((U = s == null ? void 0 : s.item) == null ? void 0 : U.custom_id) || (s == null ? void 0 : s.custom_id) || "";
|
|
2762
|
+
const p = ((v = s == null ? void 0 : s.item) == null ? void 0 : v.tags) || (s == null ? void 0 : s.tags) || [];
|
|
2763
|
+
i.fields.tags = (p == null ? void 0 : p.join(", ")) || "", Object.assign(T, i.fields);
|
|
2764
|
+
}, q = $(() => t.consumerId ? Be.Edit : Be.Create), u = (s) => {
|
|
2765
|
+
var h, U, v, M, F, m;
|
|
2766
|
+
let p = `${(h = t.config) == null ? void 0 : h.apiBaseUrl}${ue.form[(U = t.config) == null ? void 0 : U.app][s]}`;
|
|
2767
|
+
return ((v = t.config) == null ? void 0 : v.app) === "konnect" ? p = p.replace(/{controlPlaneId}/gi, ((M = t.config) == null ? void 0 : M.controlPlaneId) || "") : ((F = t.config) == null ? void 0 : F.app) === "kongManager" && (p = p.replace(/\/{workspace}/gi, (m = t.config) != null && m.workspace ? `/${t.config.workspace}` : "")), p = p.replace(/{id}/gi, t.consumerId), p;
|
|
2768
|
+
}, f = $(() => !!i.fields.username || !!i.fields.customId), w = $(() => JSON.stringify(i.fields) !== JSON.stringify(T)), g = async () => {
|
|
2760
2769
|
var s, p, h;
|
|
2761
2770
|
try {
|
|
2762
|
-
|
|
2763
|
-
const
|
|
2764
|
-
username:
|
|
2765
|
-
custom_id:
|
|
2766
|
-
tags: (p = (s =
|
|
2771
|
+
i.readonly = !0;
|
|
2772
|
+
const U = {
|
|
2773
|
+
username: i.fields.username || null,
|
|
2774
|
+
custom_id: i.fields.customId || null,
|
|
2775
|
+
tags: (p = (s = i.fields.tags.split(",")) == null ? void 0 : s.map((M) => String(M || "").trim())) == null ? void 0 : p.filter((M) => M !== "")
|
|
2767
2776
|
};
|
|
2768
|
-
let
|
|
2769
|
-
await
|
|
2770
|
-
} catch (
|
|
2771
|
-
|
|
2777
|
+
let v;
|
|
2778
|
+
await y.post(u("validate"), U), q.value === "create" ? v = await y.post(u("create"), U) : q.value === "edit" && (v = ((h = t.config) == null ? void 0 : h.app) === "konnect" ? await y.put(u("edit"), U) : await y.patch(u("edit"), U)), V(v == null ? void 0 : v.data), o("update", v == null ? void 0 : v.data);
|
|
2779
|
+
} catch (U) {
|
|
2780
|
+
i.errorMessage = _(U), o("error", U);
|
|
2772
2781
|
} finally {
|
|
2773
|
-
|
|
2782
|
+
i.readonly = !1;
|
|
2774
2783
|
}
|
|
2775
2784
|
};
|
|
2776
2785
|
return (s, p) => {
|
|
2777
|
-
const h = E("KInput"),
|
|
2778
|
-
return d(),
|
|
2779
|
-
K(
|
|
2780
|
-
"can-submit":
|
|
2786
|
+
const h = E("KInput"), U = E("KCard");
|
|
2787
|
+
return d(), P("div", Ao, [
|
|
2788
|
+
K(l(Ea), {
|
|
2789
|
+
"can-submit": f.value && w.value,
|
|
2781
2790
|
config: e.config,
|
|
2782
2791
|
"edit-id": e.consumerId,
|
|
2783
|
-
"error-message":
|
|
2792
|
+
"error-message": i.errorMessage,
|
|
2784
2793
|
"fetch-url": b.value,
|
|
2785
|
-
"is-readonly":
|
|
2786
|
-
onCancel:
|
|
2787
|
-
"onFetch:error": p[3] || (p[3] = (
|
|
2794
|
+
"is-readonly": i.readonly,
|
|
2795
|
+
onCancel: I,
|
|
2796
|
+
"onFetch:error": p[3] || (p[3] = (v) => x(v)),
|
|
2788
2797
|
"onFetch:success": V,
|
|
2789
|
-
onLoading: p[4] || (p[4] = (
|
|
2790
|
-
onSubmit:
|
|
2798
|
+
onLoading: p[4] || (p[4] = (v) => R(v)),
|
|
2799
|
+
onSubmit: g
|
|
2791
2800
|
}, {
|
|
2792
2801
|
default: c(() => [
|
|
2793
|
-
|
|
2794
|
-
K(
|
|
2795
|
-
description:
|
|
2802
|
+
B("div", null, [
|
|
2803
|
+
K(l(yo), {
|
|
2804
|
+
description: l(n)("consumers.form.info.description"),
|
|
2796
2805
|
"has-divider": "",
|
|
2797
|
-
title:
|
|
2806
|
+
title: l(n)("consumers.form.info.title")
|
|
2798
2807
|
}, {
|
|
2799
2808
|
default: c(() => [
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2809
|
+
B("div", null, [
|
|
2810
|
+
B("h5", Mo, C(l(n)("consumers.form.consumer_identification.title")) + "* ", 1),
|
|
2811
|
+
B("p", Po, C(l(n)("consumers.form.consumer_identification.description")), 1)
|
|
2803
2812
|
]),
|
|
2804
|
-
K(
|
|
2813
|
+
K(U, null, {
|
|
2805
2814
|
body: c(() => [
|
|
2806
2815
|
K(h, {
|
|
2807
|
-
modelValue:
|
|
2808
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
2816
|
+
modelValue: i.fields.username,
|
|
2817
|
+
"onUpdate:modelValue": p[0] || (p[0] = (v) => i.fields.username = v),
|
|
2809
2818
|
modelModifiers: { trim: !0 },
|
|
2810
2819
|
autocomplete: "off",
|
|
2811
2820
|
class: "username-field",
|
|
2812
2821
|
"data-testid": "consumer-form-username",
|
|
2813
|
-
label:
|
|
2822
|
+
label: l(n)("consumers.fields.username.label"),
|
|
2814
2823
|
"label-attributes": {
|
|
2815
2824
|
tooltipAttributes: { maxWidth: "250" }
|
|
2816
2825
|
},
|
|
2817
|
-
placeholder:
|
|
2818
|
-
readonly:
|
|
2826
|
+
placeholder: l(n)("consumers.fields.username.placeholder"),
|
|
2827
|
+
readonly: i.readonly,
|
|
2819
2828
|
type: "text"
|
|
2820
2829
|
}, {
|
|
2821
2830
|
"label-tooltip": c(() => [
|
|
2822
|
-
K(
|
|
2831
|
+
K(l(a), {
|
|
2823
2832
|
keypath: "consumers.fields.username.tooltip",
|
|
2824
2833
|
scope: "global"
|
|
2825
2834
|
}, {
|
|
2826
2835
|
custom_id: c(() => [
|
|
2827
|
-
|
|
2836
|
+
B("code", null, C(l(n)("consumers.fields.username.custom_id")), 1)
|
|
2828
2837
|
]),
|
|
2829
2838
|
_: 1
|
|
2830
2839
|
})
|
|
@@ -2832,26 +2841,26 @@ const Go = /* @__PURE__ */ Re(Ao, [["__scopeId", "data-v-45929bbf"]]), Mo = { cl
|
|
|
2832
2841
|
_: 1
|
|
2833
2842
|
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
2834
2843
|
K(h, {
|
|
2835
|
-
modelValue:
|
|
2836
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
2844
|
+
modelValue: i.fields.customId,
|
|
2845
|
+
"onUpdate:modelValue": p[1] || (p[1] = (v) => i.fields.customId = v),
|
|
2837
2846
|
modelModifiers: { trim: !0 },
|
|
2838
2847
|
autocomplete: "off",
|
|
2839
2848
|
"data-testid": "consumer-form-custom-id",
|
|
2840
|
-
label:
|
|
2849
|
+
label: l(n)("consumers.fields.custom_id.label"),
|
|
2841
2850
|
"label-attributes": {
|
|
2842
2851
|
tooltipAttributes: { maxWidth: "250" }
|
|
2843
2852
|
},
|
|
2844
|
-
placeholder:
|
|
2845
|
-
readonly:
|
|
2853
|
+
placeholder: l(n)("consumers.fields.custom_id.placeholder"),
|
|
2854
|
+
readonly: i.readonly,
|
|
2846
2855
|
type: "text"
|
|
2847
2856
|
}, {
|
|
2848
2857
|
"label-tooltip": c(() => [
|
|
2849
|
-
K(
|
|
2858
|
+
K(l(a), {
|
|
2850
2859
|
keypath: "consumers.fields.custom_id.tooltip",
|
|
2851
2860
|
scope: "global"
|
|
2852
2861
|
}, {
|
|
2853
2862
|
username: c(() => [
|
|
2854
|
-
|
|
2863
|
+
B("code", null, C(l(n)("consumers.fields.custom_id.username")), 1)
|
|
2855
2864
|
]),
|
|
2856
2865
|
_: 1
|
|
2857
2866
|
})
|
|
@@ -2862,19 +2871,19 @@ const Go = /* @__PURE__ */ Re(Ao, [["__scopeId", "data-v-45929bbf"]]), Mo = { cl
|
|
|
2862
2871
|
_: 1
|
|
2863
2872
|
}),
|
|
2864
2873
|
K(h, {
|
|
2865
|
-
modelValue:
|
|
2866
|
-
"onUpdate:modelValue": p[2] || (p[2] = (
|
|
2874
|
+
modelValue: i.fields.tags,
|
|
2875
|
+
"onUpdate:modelValue": p[2] || (p[2] = (v) => i.fields.tags = v),
|
|
2867
2876
|
modelModifiers: { trim: !0 },
|
|
2868
2877
|
autocomplete: "off",
|
|
2869
2878
|
"data-testid": "consumer-form-tags",
|
|
2870
|
-
help:
|
|
2871
|
-
label:
|
|
2879
|
+
help: l(n)("consumers.fields.tags.help"),
|
|
2880
|
+
label: l(n)("consumers.fields.tags.label"),
|
|
2872
2881
|
"label-attributes": {
|
|
2873
|
-
info:
|
|
2882
|
+
info: l(n)("consumers.fields.tags.tooltip"),
|
|
2874
2883
|
tooltipAttributes: { maxWidth: "250" }
|
|
2875
2884
|
},
|
|
2876
|
-
placeholder:
|
|
2877
|
-
readonly:
|
|
2885
|
+
placeholder: l(n)("consumers.fields.tags.placeholder"),
|
|
2886
|
+
readonly: i.readonly,
|
|
2878
2887
|
type: "text"
|
|
2879
2888
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
2880
2889
|
]),
|
|
@@ -2888,7 +2897,7 @@ const Go = /* @__PURE__ */ Re(Ao, [["__scopeId", "data-v-45929bbf"]]), Mo = { cl
|
|
|
2888
2897
|
};
|
|
2889
2898
|
}
|
|
2890
2899
|
});
|
|
2891
|
-
const
|
|
2900
|
+
const Go = /* @__PURE__ */ Fe(qo, [["__scopeId", "data-v-335659fc"]]), Eo = { class: "kong-ui-consumer-entity-config-card" }, Ho = /* @__PURE__ */ Y({
|
|
2892
2901
|
__name: "ConsumerConfigCard",
|
|
2893
2902
|
props: {
|
|
2894
2903
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2907,7 +2916,7 @@ const Ho = /* @__PURE__ */ Re(Eo, [["__scopeId", "data-v-335659fc"]]), Ro = { cl
|
|
|
2907
2916
|
},
|
|
2908
2917
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
2909
2918
|
setup(e) {
|
|
2910
|
-
const o = e, { i18n: { t }, i18nT: a } =
|
|
2919
|
+
const o = e, { i18n: { t }, i18nT: a } = Ie.useI18n(), n = $(() => ue.form[o.config.app].edit), r = A({
|
|
2911
2920
|
id: {},
|
|
2912
2921
|
username: {
|
|
2913
2922
|
section: ee.Basic,
|
|
@@ -2932,35 +2941,35 @@ const Ho = /* @__PURE__ */ Re(Eo, [["__scopeId", "data-v-335659fc"]]), Ro = { cl
|
|
|
2932
2941
|
hidden: !0
|
|
2933
2942
|
}
|
|
2934
2943
|
});
|
|
2935
|
-
return (
|
|
2936
|
-
K(
|
|
2944
|
+
return (y, _) => (d(), P("div", Eo, [
|
|
2945
|
+
K(l(Aa), {
|
|
2937
2946
|
config: e.config,
|
|
2938
2947
|
"config-schema": r.value,
|
|
2939
2948
|
"fetch-url": n.value,
|
|
2940
2949
|
"hide-title": e.hideTitle,
|
|
2941
|
-
"onCopy:success":
|
|
2942
|
-
"onFetch:error":
|
|
2943
|
-
"onFetch:success":
|
|
2944
|
-
onLoading:
|
|
2950
|
+
"onCopy:success": _[0] || (_[0] = (i) => y.$emit("copy:success", i)),
|
|
2951
|
+
"onFetch:error": _[1] || (_[1] = (i) => y.$emit("fetch:error", i)),
|
|
2952
|
+
"onFetch:success": _[2] || (_[2] = (i) => y.$emit("fetch:success", i)),
|
|
2953
|
+
onLoading: _[3] || (_[3] = (i) => y.$emit("loading", i))
|
|
2945
2954
|
}, {
|
|
2946
2955
|
"username-label-tooltip": c(() => [
|
|
2947
|
-
K(
|
|
2956
|
+
K(l(a), {
|
|
2948
2957
|
keypath: "consumers.fields.username.tooltip",
|
|
2949
2958
|
scope: "global"
|
|
2950
2959
|
}, {
|
|
2951
2960
|
custom_id: c(() => [
|
|
2952
|
-
|
|
2961
|
+
B("code", null, C(l(t)("consumers.fields.username.custom_id")), 1)
|
|
2953
2962
|
]),
|
|
2954
2963
|
_: 1
|
|
2955
2964
|
})
|
|
2956
2965
|
]),
|
|
2957
2966
|
"custom_id-label-tooltip": c(() => [
|
|
2958
|
-
K(
|
|
2967
|
+
K(l(a), {
|
|
2959
2968
|
keypath: "consumers.fields.custom_id.tooltip",
|
|
2960
2969
|
scope: "global"
|
|
2961
2970
|
}, {
|
|
2962
2971
|
username: c(() => [
|
|
2963
|
-
|
|
2972
|
+
B("code", null, C(l(t)("consumers.fields.custom_id.username")), 1)
|
|
2964
2973
|
]),
|
|
2965
2974
|
_: 1
|
|
2966
2975
|
})
|
|
@@ -2971,7 +2980,7 @@ const Ho = /* @__PURE__ */ Re(Eo, [["__scopeId", "data-v-335659fc"]]), Ro = { cl
|
|
|
2971
2980
|
}
|
|
2972
2981
|
});
|
|
2973
2982
|
export {
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2983
|
+
Ho as ConsumerConfigCard,
|
|
2984
|
+
Go as ConsumerForm,
|
|
2985
|
+
Do as ConsumerList
|
|
2977
2986
|
};
|