@kong-ui-public/entities-key-sets 1.1.26 → 1.1.27
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-key-sets.es.js +754 -745
- package/dist/entities-key-sets.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as W, ref as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { createI18n as
|
|
1
|
+
import { defineComponent as W, ref as P, computed as _, watch as se, renderSlot as J, createCommentVNode as G, unref as y, useSlots as Se, onBeforeMount as _e, resolveComponent as T, openBlock as d, createBlock as L, createSlots as ce, withCtx as s, createElementVNode as j, createVNode as w, createTextVNode as D, toDisplayString as q, createElementBlock as K, Fragment as oe, renderList as ee, normalizeClass as le, withModifiers as fe, withDirectives as pe, vShow as ye, useCssVars as Ze, resolveDynamicComponent as me, normalizeProps as Qe, guardReactiveProps as et, mergeProps as ke, onMounted as tt, onUnmounted as at, inject as ot, reactive as Me } from "vue";
|
|
2
|
+
import { useRouter as we } from "vue-router";
|
|
3
|
+
import { createI18n as Ie, i18nTComponent as je } from "@kong-ui-public/i18n";
|
|
4
4
|
import nt from "axios";
|
|
5
5
|
import { MethodsArray as it } from "@kong/kongponents";
|
|
6
|
-
const
|
|
6
|
+
const rt = {
|
|
7
7
|
title: "Key Sets",
|
|
8
8
|
list: {
|
|
9
9
|
toolbar_actions: {
|
|
@@ -64,20 +64,20 @@ const lt = {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
},
|
|
68
|
-
keySets:
|
|
67
|
+
}, lt = {
|
|
68
|
+
keySets: rt
|
|
69
69
|
};
|
|
70
70
|
function st() {
|
|
71
|
-
const e =
|
|
71
|
+
const e = Ie("en-us", lt);
|
|
72
72
|
return {
|
|
73
73
|
i18n: e,
|
|
74
|
-
i18nT:
|
|
74
|
+
i18nT: je(e)
|
|
75
75
|
// Translation component <i18n-t>
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
const
|
|
78
|
+
const $e = {
|
|
79
79
|
useI18n: st
|
|
80
|
-
},
|
|
80
|
+
}, ge = {
|
|
81
81
|
list: {
|
|
82
82
|
konnect: "/api/runtime_groups/{controlPlaneId}/key-sets",
|
|
83
83
|
kongManager: "/{workspace}/key-sets"
|
|
@@ -93,8 +93,8 @@ const Ie = {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
-
var
|
|
97
|
-
function
|
|
96
|
+
var Oe = /* @__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))(Oe || {}), Ce = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(Ce || {}), re = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(re || {}), N = /* @__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))(N || {}), Z = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(Z || {});
|
|
97
|
+
function Ke(e = {}) {
|
|
98
98
|
return {
|
|
99
99
|
axiosInstance: nt.create({
|
|
100
100
|
withCredentials: !0,
|
|
@@ -115,7 +115,7 @@ function dt() {
|
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
const
|
|
118
|
+
const be = "khcp-user-table-preferences", ct = {
|
|
119
119
|
pageSize: 30,
|
|
120
120
|
sortColumnKey: void 0,
|
|
121
121
|
sortColumnOrder: void 0
|
|
@@ -130,14 +130,14 @@ function ut() {
|
|
|
130
130
|
return;
|
|
131
131
|
}
|
|
132
132
|
}, o = () => {
|
|
133
|
-
const t = e(localStorage.getItem(
|
|
133
|
+
const t = e(localStorage.getItem(be));
|
|
134
134
|
return !t || !Object.keys(t).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(t));
|
|
135
135
|
};
|
|
136
136
|
return {
|
|
137
137
|
setTablePreferences: (t, a) => {
|
|
138
138
|
try {
|
|
139
139
|
const i = o();
|
|
140
|
-
i.set(t, a), localStorage.setItem(
|
|
140
|
+
i.set(t, a), localStorage.setItem(be, JSON.stringify(Object.fromEntries(i.entries())));
|
|
141
141
|
} catch (i) {
|
|
142
142
|
console.error("useTablePreferences(setTablePreferences)", i);
|
|
143
143
|
}
|
|
@@ -147,7 +147,7 @@ function ut() {
|
|
|
147
147
|
return (a == null ? void 0 : a.get(t)) || void 0 || ct;
|
|
148
148
|
},
|
|
149
149
|
deleteAllTablePreferences: () => {
|
|
150
|
-
localStorage.removeItem(
|
|
150
|
+
localStorage.removeItem(be);
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
}
|
|
@@ -240,11 +240,11 @@ const pt = {
|
|
|
240
240
|
errors: ht,
|
|
241
241
|
toggleModal: bt
|
|
242
242
|
};
|
|
243
|
-
function
|
|
244
|
-
const e =
|
|
243
|
+
function xe() {
|
|
244
|
+
const e = Ie("en-us", kt);
|
|
245
245
|
return {
|
|
246
246
|
i18n: e,
|
|
247
|
-
i18nT:
|
|
247
|
+
i18nT: je(e)
|
|
248
248
|
// Translation component <i18n-t>
|
|
249
249
|
};
|
|
250
250
|
}
|
|
@@ -253,67 +253,67 @@ function Ct(e, o, t, a = {
|
|
|
253
253
|
searchKeys: ["id"]
|
|
254
254
|
}) {
|
|
255
255
|
t || (t = "100");
|
|
256
|
-
const { axiosInstance: i } =
|
|
256
|
+
const { axiosInstance: i } = Ke({
|
|
257
257
|
headers: e.requestHeaders
|
|
258
|
-
}), { i18n: { t: n } } =
|
|
259
|
-
await
|
|
260
|
-
}, 200),
|
|
261
|
-
let
|
|
262
|
-
e.app === "konnect" ?
|
|
258
|
+
}), { i18n: { t: n } } = xe(), { debounce: f } = dt(), k = f(async (u) => {
|
|
259
|
+
await r(u);
|
|
260
|
+
}, 200), v = P(!1), c = P(""), g = P(""), h = P([]), F = P(void 0), C = y(o);
|
|
261
|
+
let A = `${e.apiBaseUrl}${C}`;
|
|
262
|
+
e.app === "konnect" ? A = A.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (A = A.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
263
263
|
const x = async () => {
|
|
264
264
|
try {
|
|
265
|
-
|
|
266
|
-
const { data:
|
|
267
|
-
|
|
265
|
+
v.value = !0;
|
|
266
|
+
const { data: u } = await i.get(`${A}?size=${t}`);
|
|
267
|
+
u != null && u.next || (F.value = a.fetchedItemsKey in u ? u[a.fetchedItemsKey] : []), h.value = a.fetchedItemsKey in u ? u[a.fetchedItemsKey] : [];
|
|
268
268
|
} catch {
|
|
269
|
-
|
|
269
|
+
h.value = [], c.value = n("debouncedFilter.errors.fetch");
|
|
270
270
|
} finally {
|
|
271
|
-
|
|
271
|
+
v.value = !1;
|
|
272
272
|
}
|
|
273
|
-
},
|
|
274
|
-
var m,
|
|
275
|
-
if (
|
|
276
|
-
if (
|
|
273
|
+
}, l = P(""), r = async (u) => {
|
|
274
|
+
var m, B;
|
|
275
|
+
if (l.value !== u)
|
|
276
|
+
if (l.value = u || "", F.value === void 0)
|
|
277
277
|
try {
|
|
278
|
-
|
|
279
|
-
let p =
|
|
280
|
-
|
|
281
|
-
const { data:
|
|
282
|
-
a.fetchedItemsKey in
|
|
278
|
+
v.value = !0, c.value = "", g.value = "";
|
|
279
|
+
let p = A + "";
|
|
280
|
+
u && (p += `/${u}`);
|
|
281
|
+
const { data: S } = await i.get(`${p}?size=${t}`);
|
|
282
|
+
a.fetchedItemsKey in S ? h.value = S[a.fetchedItemsKey] : S != null && S.id ? h.value = [S] : h.value = [];
|
|
283
283
|
} catch (p) {
|
|
284
|
-
((m = p == null ? void 0 : p.response) == null ? void 0 : m.status) === 404 ? g.value = n("debouncedFilter.errors.invalid") : (
|
|
284
|
+
((m = p == null ? void 0 : p.response) == null ? void 0 : m.status) === 404 ? g.value = n("debouncedFilter.errors.invalid") : (h.value = [], c.value = n("debouncedFilter.errors.fetch"));
|
|
285
285
|
} finally {
|
|
286
|
-
|
|
286
|
+
v.value = !1;
|
|
287
287
|
}
|
|
288
288
|
else
|
|
289
|
-
|
|
290
|
-
var
|
|
289
|
+
v.value = !0, g.value = "", u ? (h.value = (B = F.value) == null ? void 0 : B.filter((p) => {
|
|
290
|
+
var S;
|
|
291
291
|
let b = !1;
|
|
292
|
-
for (const
|
|
293
|
-
const V = typeof p[
|
|
294
|
-
V != null && V.includes(
|
|
292
|
+
for (const U of a.searchKeys) {
|
|
293
|
+
const V = typeof p[U] == "string" ? (S = p[U]) == null ? void 0 : S.toLowerCase() : p[U];
|
|
294
|
+
V != null && V.includes(u.toLowerCase()) && (b = !0);
|
|
295
295
|
}
|
|
296
296
|
return b;
|
|
297
|
-
}), (!
|
|
297
|
+
}), (!h.value || !h.value.length) && (g.value = n("debouncedFilter.errors.invalid"))) : h.value = F.value, v.value = !1;
|
|
298
298
|
};
|
|
299
299
|
return {
|
|
300
|
-
loading:
|
|
301
|
-
error:
|
|
300
|
+
loading: v,
|
|
301
|
+
error: c,
|
|
302
302
|
validationError: g,
|
|
303
|
-
results:
|
|
304
|
-
allRecords:
|
|
303
|
+
results: h,
|
|
304
|
+
allRecords: F,
|
|
305
305
|
loadItems: x,
|
|
306
|
-
debouncedQueryChange:
|
|
306
|
+
debouncedQueryChange: k
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
309
|
function St(e, o) {
|
|
310
|
-
const t =
|
|
310
|
+
const t = y(o), a = _(
|
|
311
311
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
312
312
|
);
|
|
313
313
|
return a.value.search = "", (i) => `${a.value.href}/${i}`;
|
|
314
314
|
}
|
|
315
315
|
function _t() {
|
|
316
|
-
const { i18n: { t: e } } =
|
|
316
|
+
const { i18n: { t: e } } = xe();
|
|
317
317
|
return {
|
|
318
318
|
getMessageFromError: (o) => {
|
|
319
319
|
var t, a, i;
|
|
@@ -324,8 +324,8 @@ function _t() {
|
|
|
324
324
|
return o.response.data.detail;
|
|
325
325
|
if ((a = o.response.data.details) != null && a.length)
|
|
326
326
|
return o.response.data.details.map((n) => {
|
|
327
|
-
let
|
|
328
|
-
return n.messages && typeof n.messages == "object" && n.messages.length && (
|
|
327
|
+
let f = e("errors.unexpected");
|
|
328
|
+
return n.messages && typeof n.messages == "object" && n.messages.length && (f = n.messages.join(", ")), n.field ? `${n.field} - ${f}` : f;
|
|
329
329
|
}).join("; ");
|
|
330
330
|
if (o.response.data.message) {
|
|
331
331
|
const { message: n } = o.response.data;
|
|
@@ -341,86 +341,86 @@ function _t() {
|
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
343
|
function Le(e, o) {
|
|
344
|
-
const t =
|
|
344
|
+
const t = P(y(e)), a = P(y(o)), i = _(
|
|
345
345
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
346
|
-
), n =
|
|
346
|
+
), n = _(
|
|
347
347
|
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
348
348
|
);
|
|
349
|
-
return (
|
|
350
|
-
const { page:
|
|
349
|
+
return (f) => {
|
|
350
|
+
const { page: k, pageSize: v, offset: c, sortColumnKey: g, sortColumnOrder: h, query: F } = f;
|
|
351
351
|
try {
|
|
352
|
-
let
|
|
353
|
-
return i.value &&
|
|
354
|
-
|
|
355
|
-
}), g &&
|
|
356
|
-
} catch (
|
|
357
|
-
return console.error("RouteList(fetcher)",
|
|
352
|
+
let C = new URL(n.value.href);
|
|
353
|
+
return i.value && F ? (C.search = "", C = new URL(`${C.href}/${F}/`)) : (i.value || new URLSearchParams(F).forEach((A, x) => {
|
|
354
|
+
C.searchParams.append(x, A);
|
|
355
|
+
}), g && C.searchParams.append("sort_by", g), h === "desc" && C.searchParams.append("sort_desc", "1"), C.searchParams.append("size", String(v))), c && k !== 1 && C.searchParams.append("offset", String(c)), C.href;
|
|
356
|
+
} catch (C) {
|
|
357
|
+
return console.error("RouteList(fetcher)", C), a.value;
|
|
358
358
|
}
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
361
|
function wt(e, o, t = "data") {
|
|
362
|
-
const a =
|
|
362
|
+
const a = y(o), { axiosInstance: i } = Ke({
|
|
363
363
|
headers: e.requestHeaders
|
|
364
|
-
}), n = Le(e, a),
|
|
365
|
-
status:
|
|
364
|
+
}), n = Le(e, a), f = P({
|
|
365
|
+
status: re.Idle
|
|
366
366
|
});
|
|
367
|
-
return { fetcher: async (
|
|
367
|
+
return { fetcher: async (k) => {
|
|
368
368
|
try {
|
|
369
|
-
|
|
370
|
-
const
|
|
371
|
-
let
|
|
372
|
-
|
|
373
|
-
const
|
|
374
|
-
data:
|
|
375
|
-
total:
|
|
376
|
-
...
|
|
369
|
+
f.value = { status: re.Loading };
|
|
370
|
+
const v = n(k), { data: c } = await i.get(v), g = t && t.replace(/[^\w-_]/gi, "");
|
|
371
|
+
let h;
|
|
372
|
+
c[g] && Array.isArray(c[g]) ? h = c[g] : h = Object.keys(c).length ? [c] : [];
|
|
373
|
+
const F = {
|
|
374
|
+
data: h,
|
|
375
|
+
total: h.length,
|
|
376
|
+
...c.offset ? {
|
|
377
377
|
pagination: {
|
|
378
|
-
offset:
|
|
378
|
+
offset: c.offset
|
|
379
379
|
}
|
|
380
380
|
} : null
|
|
381
381
|
};
|
|
382
|
-
return
|
|
383
|
-
status:
|
|
384
|
-
response:
|
|
385
|
-
},
|
|
386
|
-
} catch (
|
|
387
|
-
const
|
|
382
|
+
return f.value = {
|
|
383
|
+
status: re.Idle,
|
|
384
|
+
response: F
|
|
385
|
+
}, F;
|
|
386
|
+
} catch (v) {
|
|
387
|
+
const c = {
|
|
388
388
|
data: [],
|
|
389
389
|
total: 0
|
|
390
390
|
};
|
|
391
|
-
return
|
|
392
|
-
status:
|
|
393
|
-
response:
|
|
394
|
-
error:
|
|
395
|
-
},
|
|
396
|
-
status:
|
|
397
|
-
response:
|
|
398
|
-
error:
|
|
399
|
-
},
|
|
391
|
+
return k.query && v.response.status === 404 ? (f.value = {
|
|
392
|
+
status: re.NoResults,
|
|
393
|
+
response: c,
|
|
394
|
+
error: v
|
|
395
|
+
}, c) : (f.value = {
|
|
396
|
+
status: re.Error,
|
|
397
|
+
response: c,
|
|
398
|
+
error: v
|
|
399
|
+
}, c);
|
|
400
400
|
}
|
|
401
|
-
}, fetcherState:
|
|
401
|
+
}, fetcherState: f };
|
|
402
402
|
}
|
|
403
403
|
function It() {
|
|
404
404
|
return {
|
|
405
405
|
convertKeyToTitle: (e, o = "_") => e ? e.split(o).map((t) => t.toLowerCase() === "id" ? t.toUpperCase() : t.charAt(0).toUpperCase() + t.substring(1)).join(" ") : ""
|
|
406
406
|
};
|
|
407
407
|
}
|
|
408
|
-
const Ve = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,
|
|
408
|
+
const Ve = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, qe = (e) => {
|
|
409
409
|
if (typeof e != "string")
|
|
410
410
|
throw new TypeError("Invalid argument expected string");
|
|
411
411
|
const o = e.match(Ve);
|
|
412
412
|
if (!o)
|
|
413
413
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
414
414
|
return o.shift(), o;
|
|
415
|
-
},
|
|
415
|
+
}, Ee = (e) => e === "*" || e === "x" || e === "X", Pe = (e) => {
|
|
416
416
|
const o = parseInt(e, 10);
|
|
417
417
|
return isNaN(o) ? e : o;
|
|
418
418
|
}, $t = (e, o) => typeof e != typeof o ? [String(e), String(o)] : [e, o], Kt = (e, o) => {
|
|
419
|
-
if (
|
|
419
|
+
if (Ee(e) || Ee(o))
|
|
420
420
|
return 0;
|
|
421
421
|
const [t, a] = $t(Pe(e), Pe(o));
|
|
422
422
|
return t > a ? 1 : t < a ? -1 : 0;
|
|
423
|
-
},
|
|
423
|
+
}, Fe = (e, o) => {
|
|
424
424
|
for (let t = 0; t < Math.max(e.length, o.length); t++) {
|
|
425
425
|
const a = Kt(e[t] || "0", o[t] || "0");
|
|
426
426
|
if (a !== 0)
|
|
@@ -428,10 +428,10 @@ const Ve = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
428
428
|
}
|
|
429
429
|
return 0;
|
|
430
430
|
}, xt = (e, o) => {
|
|
431
|
-
const t =
|
|
432
|
-
return
|
|
433
|
-
},
|
|
434
|
-
|
|
431
|
+
const t = qe(e), a = qe(o), i = t.pop(), n = a.pop(), f = Fe(t, a);
|
|
432
|
+
return f !== 0 ? f : i && n ? Fe(i.split("."), n.split(".")) : i || n ? i ? -1 : 1 : 0;
|
|
433
|
+
}, Ae = (e, o, t) => {
|
|
434
|
+
Tt(t);
|
|
435
435
|
const a = xt(e, o);
|
|
436
436
|
return Ne[t].includes(a);
|
|
437
437
|
}, Ne = {
|
|
@@ -441,34 +441,34 @@ const Ve = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
441
441
|
"<=": [-1, 0],
|
|
442
442
|
"<": [-1],
|
|
443
443
|
"!=": [-1, 1]
|
|
444
|
-
},
|
|
444
|
+
}, Ue = Object.keys(Ne), Tt = (e) => {
|
|
445
445
|
if (typeof e != "string")
|
|
446
446
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
447
|
-
if (
|
|
448
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
449
|
-
},
|
|
447
|
+
if (Ue.indexOf(e) === -1)
|
|
448
|
+
throw new Error(`Invalid operator, expected one of ${Ue.join("|")}`);
|
|
449
|
+
}, Bt = (e) => typeof e == "string" && /^[v\d]/.test(e) && Ve.test(e);
|
|
450
450
|
function Mt(e) {
|
|
451
451
|
const { gatewayInfo: o, supportedRange: t } = e;
|
|
452
452
|
if (!o)
|
|
453
453
|
return !0;
|
|
454
454
|
const { edition: a, version: i } = o;
|
|
455
|
-
if (!
|
|
455
|
+
if (!Bt(i))
|
|
456
456
|
return console.error("Invalid version"), !1;
|
|
457
457
|
const n = t[a];
|
|
458
458
|
if (!n)
|
|
459
459
|
return !1;
|
|
460
|
-
const [
|
|
461
|
-
return !(
|
|
460
|
+
const [f, k] = n;
|
|
461
|
+
return !(f && Ae(i, f, "<") || k && Ae(i, k, ">"));
|
|
462
462
|
}
|
|
463
463
|
const X = {
|
|
464
|
-
useAxios:
|
|
464
|
+
useAxios: Ke,
|
|
465
465
|
useDebouncedFilter: Ct,
|
|
466
466
|
useDeleteUrlBuilder: St,
|
|
467
467
|
useErrors: _t,
|
|
468
468
|
useFetcher: wt,
|
|
469
469
|
useFetchUrlBuilder: Le,
|
|
470
470
|
useStringHelpers: It,
|
|
471
|
-
useI18n:
|
|
471
|
+
useI18n: xe,
|
|
472
472
|
useGatewayFeatureSupported: Mt
|
|
473
473
|
}, qt = {
|
|
474
474
|
fail: "Failed to copy id to clipboard",
|
|
@@ -476,16 +476,20 @@ const X = {
|
|
|
476
476
|
prefix: "Successfully",
|
|
477
477
|
content: " copied to clipboard"
|
|
478
478
|
}
|
|
479
|
-
},
|
|
479
|
+
}, Et = "Copy to clipboard", Pt = {
|
|
480
480
|
message: qt,
|
|
481
|
-
iconTitle:
|
|
482
|
-
},
|
|
481
|
+
iconTitle: Et
|
|
482
|
+
}, Ft = "kong-ui-copy-uuid-notify", At = { class: "kong-ui-copy-uuid" }, Ut = ["onClick"], Re = 15, Rt = /* @__PURE__ */ W({
|
|
483
483
|
__name: "CopyUuid",
|
|
484
484
|
props: {
|
|
485
485
|
uuid: {
|
|
486
486
|
type: String,
|
|
487
487
|
required: !0
|
|
488
488
|
},
|
|
489
|
+
idTooltip: {
|
|
490
|
+
type: String,
|
|
491
|
+
default: ""
|
|
492
|
+
},
|
|
489
493
|
truncated: {
|
|
490
494
|
type: Boolean,
|
|
491
495
|
default: !0
|
|
@@ -519,65 +523,70 @@ const X = {
|
|
|
519
523
|
},
|
|
520
524
|
emits: ["success", "error"],
|
|
521
525
|
setup(e, { emit: o }) {
|
|
522
|
-
const t = e, { t: a } =
|
|
523
|
-
}), n =
|
|
524
|
-
label:
|
|
526
|
+
const t = e, { t: a } = Ie("en-us", Pt), i = t.notify || ot(Ft, () => {
|
|
527
|
+
}), n = _(() => t.idTooltip ? {
|
|
528
|
+
label: t.idTooltip,
|
|
529
|
+
positionFixed: !0,
|
|
530
|
+
placement: "bottomStart"
|
|
531
|
+
} : {
|
|
532
|
+
title: t.uuid
|
|
533
|
+
}), f = _(() => !!(t.tooltip && t.successTooltip)), k = P(t.tooltip), v = _(() => t.tooltip ? {
|
|
534
|
+
label: k.value,
|
|
525
535
|
positionFixed: !0,
|
|
526
536
|
maxWidth: "500px",
|
|
527
537
|
placement: "bottomStart"
|
|
528
|
-
} : {}),
|
|
529
|
-
|
|
530
|
-
|
|
538
|
+
} : {}), c = _(() => t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${t.uuid.substring(0, 5)}` : t.uuid), g = (F) => {
|
|
539
|
+
k.value = F, setTimeout(() => {
|
|
540
|
+
k.value = t.tooltip;
|
|
531
541
|
}, 1800);
|
|
532
|
-
},
|
|
533
|
-
if (!
|
|
542
|
+
}, h = (F) => {
|
|
543
|
+
if (!F(t.uuid)) {
|
|
534
544
|
typeof i == "function" && i({
|
|
535
545
|
type: "error",
|
|
536
546
|
message: a("message.fail")
|
|
537
|
-
}),
|
|
547
|
+
}), f.value ? g(a("message.fail")) : o("error", t.uuid);
|
|
538
548
|
return;
|
|
539
549
|
}
|
|
540
|
-
const
|
|
550
|
+
const C = t.uuid.length > Re, A = t.format === "hidden" || t.format === "redacted" ? a("message.success.prefix") : `"${t.uuid.substring(0, Re) + (C ? "..." : "")}"`;
|
|
541
551
|
typeof i == "function" && i({
|
|
542
552
|
type: "success",
|
|
543
|
-
message: `${
|
|
544
|
-
}),
|
|
553
|
+
message: `${A}${a("message.success.content")}`
|
|
554
|
+
}), f.value ? g(t.successTooltip) : o("success", t.uuid);
|
|
545
555
|
};
|
|
546
|
-
return (
|
|
547
|
-
const
|
|
556
|
+
return (F, C) => {
|
|
557
|
+
const A = T("KIcon"), x = T("KClipboardProvider");
|
|
548
558
|
return d(), K("div", At, [
|
|
549
|
-
e.format !== "hidden" ? (d(),
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
O("span", {
|
|
559
|
+
e.format !== "hidden" ? (d(), L(me(e.idTooltip ? "KTooltip" : "div"), ke({ key: 0 }, n.value, { "data-testid": "copy-id" }), {
|
|
560
|
+
default: s(() => [
|
|
561
|
+
j("div", {
|
|
562
|
+
class: le([
|
|
563
|
+
"uuid-container",
|
|
564
|
+
e.truncated ? "truncated-uuid" : null,
|
|
565
|
+
e.useMono ? "mono" : null
|
|
566
|
+
])
|
|
567
|
+
}, q(c.value), 3)
|
|
568
|
+
]),
|
|
569
|
+
_: 1
|
|
570
|
+
}, 16)) : G("", !0),
|
|
571
|
+
(d(), L(me(e.tooltip ? "KTooltip" : "div"), ke(v.value, { class: "uuid-icon-wrapper" }), {
|
|
572
|
+
default: s(() => [
|
|
573
|
+
w(x, null, {
|
|
574
|
+
default: s(({ copyToClipboard: l }) => [
|
|
575
|
+
j("span", {
|
|
567
576
|
"data-testid": "copy-to-clipboard",
|
|
568
577
|
role: "button",
|
|
569
578
|
tabindex: "0",
|
|
570
|
-
onClick: fe((r) =>
|
|
579
|
+
onClick: fe((r) => h(l), ["stop"])
|
|
571
580
|
}, [
|
|
572
|
-
|
|
581
|
+
w(A, {
|
|
573
582
|
class: "uuid-icon",
|
|
574
583
|
color: e.iconColor,
|
|
575
584
|
"hide-title": !!e.tooltip || void 0,
|
|
576
585
|
icon: "copy",
|
|
577
586
|
size: "16",
|
|
578
|
-
title:
|
|
587
|
+
title: y(a)("iconTitle")
|
|
579
588
|
}, null, 8, ["color", "hide-title", "title"])
|
|
580
|
-
], 8,
|
|
589
|
+
], 8, Ut)
|
|
581
590
|
]),
|
|
582
591
|
_: 1
|
|
583
592
|
})
|
|
@@ -587,15 +596,15 @@ const X = {
|
|
|
587
596
|
]);
|
|
588
597
|
};
|
|
589
598
|
}
|
|
590
|
-
}),
|
|
599
|
+
}), jt = (e, o) => {
|
|
591
600
|
const t = e.__vccOpts || e;
|
|
592
601
|
for (const [a, i] of o)
|
|
593
602
|
t[a] = i;
|
|
594
603
|
return t;
|
|
595
|
-
}, De = /* @__PURE__ */
|
|
604
|
+
}, De = /* @__PURE__ */ jt(Rt, [["__scopeId", "data-v-bfdaf6f7"]]), Ot = {
|
|
596
605
|
key: 0,
|
|
597
606
|
class: "config-card-fieldset-title"
|
|
598
|
-
},
|
|
607
|
+
}, Lt = /* @__PURE__ */ W({
|
|
599
608
|
__name: "JsonCardItem",
|
|
600
609
|
props: {
|
|
601
610
|
item: {
|
|
@@ -612,26 +621,26 @@ const X = {
|
|
|
612
621
|
}
|
|
613
622
|
},
|
|
614
623
|
setup(e) {
|
|
615
|
-
const o = e, { i18n: { t } } = X.useI18n(), { convertKeyToTitle: a } = X.useStringHelpers(), i =
|
|
616
|
-
const
|
|
617
|
-
return o.isArrayItem && delete
|
|
618
|
-
}),
|
|
619
|
-
var
|
|
620
|
-
return o.isArrayItem ? (
|
|
624
|
+
const o = e, { i18n: { t } } = X.useI18n(), { convertKeyToTitle: a } = X.useStringHelpers(), i = _(() => o.item.key ?? "json-array-item"), n = _(() => o.item.value ?? o.item), f = _(() => {
|
|
625
|
+
const v = JSON.parse(JSON.stringify(n.value));
|
|
626
|
+
return o.isArrayItem && delete v.name, v;
|
|
627
|
+
}), k = _(() => {
|
|
628
|
+
var v;
|
|
629
|
+
return o.isArrayItem ? (v = n.value) != null && v.name ? a(n.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: o.index }) : "";
|
|
621
630
|
});
|
|
622
|
-
return (
|
|
623
|
-
class:
|
|
631
|
+
return (v, c) => (d(), L(me(e.isArrayItem ? "fieldset" : "div"), {
|
|
632
|
+
class: le(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
624
633
|
}, {
|
|
625
|
-
default:
|
|
626
|
-
e.isArrayItem ? (d(), K("legend",
|
|
627
|
-
|
|
634
|
+
default: s(() => [
|
|
635
|
+
e.isArrayItem ? (d(), K("legend", Ot, [
|
|
636
|
+
j("b", null, q(k.value), 1)
|
|
628
637
|
])) : G("", !0),
|
|
629
|
-
(d(!0), K(oe, null, ee(Object.keys(
|
|
630
|
-
key: `${i.value}-property-${
|
|
638
|
+
(d(!0), K(oe, null, ee(Object.keys(f.value), (g, h) => (d(), L(Je, {
|
|
639
|
+
key: `${i.value}-property-${h}`,
|
|
631
640
|
item: {
|
|
632
641
|
key: g,
|
|
633
|
-
label:
|
|
634
|
-
value:
|
|
642
|
+
label: y(a)(g),
|
|
643
|
+
value: f.value[g]
|
|
635
644
|
}
|
|
636
645
|
}, null, 8, ["item"]))), 128))
|
|
637
646
|
]),
|
|
@@ -643,7 +652,7 @@ const X = {
|
|
|
643
652
|
for (const [a, i] of o)
|
|
644
653
|
t[a] = i;
|
|
645
654
|
return t;
|
|
646
|
-
}, He = /* @__PURE__ */ te(
|
|
655
|
+
}, He = /* @__PURE__ */ te(Lt, [["__scopeId", "data-v-68ca83ec"]]), Vt = /* @__PURE__ */ W({
|
|
647
656
|
__name: "InternalLinkItem",
|
|
648
657
|
props: {
|
|
649
658
|
item: {
|
|
@@ -655,22 +664,22 @@ const X = {
|
|
|
655
664
|
setup(e) {
|
|
656
665
|
const { i18n: { t: o } } = X.useI18n();
|
|
657
666
|
return (t, a) => {
|
|
658
|
-
const i =
|
|
667
|
+
const i = T("KButton");
|
|
659
668
|
return d(), K("div", null, [
|
|
660
|
-
|
|
669
|
+
w(i, {
|
|
661
670
|
appearance: "btn-link",
|
|
662
671
|
class: "navigation-button",
|
|
663
672
|
onClick: a[0] || (a[0] = (n) => t.$emit("navigation-click", e.item))
|
|
664
673
|
}, {
|
|
665
|
-
default:
|
|
666
|
-
D(q(e.item.value ||
|
|
674
|
+
default: s(() => [
|
|
675
|
+
D(q(e.item.value || y(o)("baseConfigCard.commonFields.link")), 1)
|
|
667
676
|
]),
|
|
668
677
|
_: 1
|
|
669
678
|
})
|
|
670
679
|
]);
|
|
671
680
|
};
|
|
672
681
|
}
|
|
673
|
-
}),
|
|
682
|
+
}), Nt = /* @__PURE__ */ te(Vt, [["__scopeId", "data-v-7410504d"]]), Dt = /* @__PURE__ */ W({
|
|
674
683
|
__name: "StatusBadge",
|
|
675
684
|
props: {
|
|
676
685
|
status: {
|
|
@@ -681,21 +690,21 @@ const X = {
|
|
|
681
690
|
setup(e) {
|
|
682
691
|
const { i18n: { t: o } } = X.useI18n();
|
|
683
692
|
return (t, a) => {
|
|
684
|
-
const i =
|
|
693
|
+
const i = T("KBadge");
|
|
685
694
|
return d(), L(i, {
|
|
686
695
|
appearance: e.status ? "success" : "neutral"
|
|
687
696
|
}, {
|
|
688
|
-
default:
|
|
689
|
-
D(q(e.status ?
|
|
697
|
+
default: s(() => [
|
|
698
|
+
D(q(e.status ? y(o)("baseConfigCard.statusBadge.enabledLabel") : y(o)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
690
699
|
]),
|
|
691
700
|
_: 1
|
|
692
701
|
}, 8, ["appearance"]);
|
|
693
702
|
};
|
|
694
703
|
}
|
|
695
|
-
}),
|
|
704
|
+
}), Ht = "#0044f4", Jt = "#e0e4ea", zt = "#3a3f51", Wt = "1px", Gt = { class: "config-card-details-row" }, Xt = ["data-testid"], Yt = ["data-testid"], Zt = ["data-testid"], Qt = ["data-testid"], ea = { key: 1 }, ta = ["data-testid"], aa = ["data-testid"], oa = ["data-testid"], na = ["data-testid"], ia = ["title"], ra = {
|
|
696
705
|
name: "ConfigCardItem",
|
|
697
|
-
components: { CopyUuid: De, JsonCardItem: He, StatusBadge:
|
|
698
|
-
},
|
|
706
|
+
components: { CopyUuid: De, JsonCardItem: He, StatusBadge: Dt, InternalLinkItem: Nt }
|
|
707
|
+
}, la = /* @__PURE__ */ W({
|
|
699
708
|
...ra,
|
|
700
709
|
props: {
|
|
701
710
|
item: {
|
|
@@ -716,13 +725,13 @@ const X = {
|
|
|
716
725
|
emits: ["navigation-click"],
|
|
717
726
|
setup(e, { emit: o }) {
|
|
718
727
|
const t = e;
|
|
719
|
-
Ze((
|
|
720
|
-
"2c6ac268":
|
|
721
|
-
c7a65802:
|
|
722
|
-
"778426fe":
|
|
723
|
-
"777f9b48":
|
|
728
|
+
Ze((h) => ({
|
|
729
|
+
"2c6ac268": c.value ? "none" : `solid ${y(Wt)} ${y(Jt)}`,
|
|
730
|
+
c7a65802: v.value && f.value ? "block" : "flex",
|
|
731
|
+
"778426fe": v.value && f.value ? "100%" : t.slim ? "50%" : "25%",
|
|
732
|
+
"777f9b48": v.value && f.value ? "100%" : t.slim ? "50%" : "75%"
|
|
724
733
|
}));
|
|
725
|
-
const a =
|
|
734
|
+
const a = Se(), { i18n: { t: i, formatUnixTimeStamp: n } } = X.useI18n(), f = _(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), k = _(() => !!(t.item.tooltip || a["label-tooltip"])), v = _(() => t.item.type === N.Json || t.item.type === N.JsonArray), c = _(() => t.item.type === N.JsonArray), g = _(() => {
|
|
726
735
|
switch (t.item.type) {
|
|
727
736
|
case N.ID:
|
|
728
737
|
return {
|
|
@@ -808,8 +817,8 @@ const X = {
|
|
|
808
817
|
attrs: {
|
|
809
818
|
"data-testid": `${t.item.key}-internal-link`,
|
|
810
819
|
item: t.item,
|
|
811
|
-
onNavigationClick: (
|
|
812
|
-
o("navigation-click",
|
|
820
|
+
onNavigationClick: (h) => {
|
|
821
|
+
o("navigation-click", h);
|
|
813
822
|
}
|
|
814
823
|
}
|
|
815
824
|
};
|
|
@@ -849,122 +858,122 @@ const X = {
|
|
|
849
858
|
};
|
|
850
859
|
}
|
|
851
860
|
});
|
|
852
|
-
return (
|
|
853
|
-
const
|
|
854
|
-
return d(), K("div",
|
|
855
|
-
|
|
861
|
+
return (h, F) => {
|
|
862
|
+
const C = T("KLabel"), A = T("KBadge"), x = T("KMethodBadge");
|
|
863
|
+
return d(), K("div", Gt, [
|
|
864
|
+
j("div", {
|
|
856
865
|
class: "config-card-details-label",
|
|
857
866
|
"data-testid": `${e.item.key}-label`
|
|
858
867
|
}, [
|
|
859
|
-
J(
|
|
860
|
-
|
|
861
|
-
default:
|
|
868
|
+
J(h.$slots, "label", { item: e.item }, () => [
|
|
869
|
+
w(C, { "tooltip-attributes": { maxWidth: "500px" } }, ce({
|
|
870
|
+
default: s(() => [
|
|
862
871
|
D(q(e.item.label) + " ", 1)
|
|
863
872
|
]),
|
|
864
873
|
_: 2
|
|
865
874
|
}, [
|
|
866
|
-
|
|
875
|
+
k.value ? {
|
|
867
876
|
name: "tooltip",
|
|
868
|
-
fn:
|
|
869
|
-
|
|
877
|
+
fn: s(() => [
|
|
878
|
+
j("div", {
|
|
870
879
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
871
880
|
}, [
|
|
872
|
-
J(
|
|
881
|
+
J(h.$slots, "label-tooltip", {}, () => [
|
|
873
882
|
D(q(e.item.tooltip), 1)
|
|
874
883
|
], !0)
|
|
875
|
-
], 8,
|
|
884
|
+
], 8, Yt)
|
|
876
885
|
]),
|
|
877
886
|
key: "0"
|
|
878
887
|
} : void 0
|
|
879
888
|
]), 1024)
|
|
880
889
|
], !0)
|
|
881
|
-
], 8,
|
|
882
|
-
|
|
890
|
+
], 8, Xt),
|
|
891
|
+
j("div", {
|
|
883
892
|
class: "config-card-details-value",
|
|
884
893
|
"data-testid": `${e.item.key}-property-value`
|
|
885
894
|
}, [
|
|
886
|
-
J(
|
|
895
|
+
J(h.$slots, e.item.key, {
|
|
887
896
|
rowValue: e.item.value
|
|
888
897
|
}, () => [
|
|
889
|
-
|
|
890
|
-
(d(), L(
|
|
891
|
-
default:
|
|
898
|
+
f.value ? (d(), K("div", ea, [
|
|
899
|
+
(d(), L(me(g.value.tag), Qe(et(g.value.attrs)), {
|
|
900
|
+
default: s(() => [
|
|
892
901
|
g.value.additionalComponent === "KBadge" ? (d(), K("div", {
|
|
893
902
|
key: 0,
|
|
894
903
|
"data-testid": `${e.item.key}-badge-tags`
|
|
895
904
|
}, [
|
|
896
|
-
(d(!0), K(oe, null, ee(e.item.value, (
|
|
897
|
-
key: `${e.item.key}-badge-tag-${
|
|
905
|
+
(d(!0), K(oe, null, ee(e.item.value, (l, r) => (d(), L(A, {
|
|
906
|
+
key: `${e.item.key}-badge-tag-${r}`,
|
|
898
907
|
class: "config-badge",
|
|
899
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
900
|
-
"truncation-tooltip":
|
|
908
|
+
"data-testid": `${e.item.key}-badge-tag-${r}`,
|
|
909
|
+
"truncation-tooltip": l
|
|
901
910
|
}, {
|
|
902
|
-
default:
|
|
903
|
-
D(q(
|
|
911
|
+
default: s(() => [
|
|
912
|
+
D(q(l), 1)
|
|
904
913
|
]),
|
|
905
914
|
_: 2
|
|
906
915
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
907
|
-
], 8,
|
|
916
|
+
], 8, ta)) : G("", !0),
|
|
908
917
|
g.value.additionalComponent === "CopyUuid" ? (d(), K("div", {
|
|
909
918
|
key: 1,
|
|
910
919
|
class: "copy-uuid-array",
|
|
911
920
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
912
921
|
}, [
|
|
913
|
-
(d(!0), K(oe, null, ee(e.item.value, (
|
|
914
|
-
key: `${e.item.key}-copy-uuid-${
|
|
915
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
916
|
-
uuid:
|
|
922
|
+
(d(!0), K(oe, null, ee(e.item.value, (l, r) => (d(), L(y(De), ke(g.value.childAttrs, {
|
|
923
|
+
key: `${e.item.key}-copy-uuid-${r}`,
|
|
924
|
+
"data-testid": `${e.item.key}-copy-uuid-${r}`,
|
|
925
|
+
uuid: l
|
|
917
926
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
918
|
-
], 8,
|
|
927
|
+
], 8, aa)) : g.value.additionalComponent === "KMethodBadge" ? (d(), K("div", {
|
|
919
928
|
key: 2,
|
|
920
929
|
class: "method-badge-array",
|
|
921
930
|
"data-testid": `${e.item.key}-badge-methods`
|
|
922
931
|
}, [
|
|
923
|
-
(d(!0), K(oe, null, ee(e.item.value, (
|
|
924
|
-
key: `${e.item.key}-badge-method-${
|
|
932
|
+
(d(!0), K(oe, null, ee(e.item.value, (l, r) => (d(), L(x, {
|
|
933
|
+
key: `${e.item.key}-badge-method-${r}`,
|
|
925
934
|
class: "config-badge",
|
|
926
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
935
|
+
"data-testid": `${e.item.key}-badge-method-${r}`,
|
|
927
936
|
"is-rounded": "",
|
|
928
|
-
label:
|
|
929
|
-
method:
|
|
937
|
+
label: l,
|
|
938
|
+
method: y(it).includes(l.toLowerCase()) ? l.toLowerCase() : "custom"
|
|
930
939
|
}, {
|
|
931
|
-
default:
|
|
932
|
-
D(q(
|
|
940
|
+
default: s(() => [
|
|
941
|
+
D(q(l), 1)
|
|
933
942
|
]),
|
|
934
943
|
_: 2
|
|
935
944
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
936
|
-
], 8,
|
|
945
|
+
], 8, oa)) : G("", !0),
|
|
937
946
|
g.value.additionalComponent === "JsonCardItem" ? (d(), K("div", {
|
|
938
947
|
key: 3,
|
|
939
948
|
"data-testid": `${t.item.key}-json-array-content`
|
|
940
949
|
}, [
|
|
941
|
-
(d(!0), K(oe, null, ee(e.item.value, (
|
|
942
|
-
key: `json-array-item-${
|
|
943
|
-
index:
|
|
950
|
+
(d(!0), K(oe, null, ee(e.item.value, (l, r) => (d(), L(He, {
|
|
951
|
+
key: `json-array-item-${r}`,
|
|
952
|
+
index: r,
|
|
944
953
|
"is-array-item": "",
|
|
945
|
-
item:
|
|
954
|
+
item: l
|
|
946
955
|
}, null, 8, ["index", "item"]))), 128))
|
|
947
|
-
], 8,
|
|
956
|
+
], 8, na)) : (d(), K("span", {
|
|
948
957
|
key: 4,
|
|
949
|
-
class:
|
|
958
|
+
class: le(["attrs-data-text", { truncated: e.truncated }]),
|
|
950
959
|
title: e.truncated ? e.item.value : void 0
|
|
951
|
-
}, q(g.value.text), 11,
|
|
960
|
+
}, q(g.value.text), 11, ia))
|
|
952
961
|
]),
|
|
953
962
|
_: 1
|
|
954
963
|
}, 16))
|
|
955
964
|
])) : (d(), K("div", {
|
|
956
965
|
key: 0,
|
|
957
966
|
"data-testid": `${e.item.key}-no-value`
|
|
958
|
-
}, " – ", 8,
|
|
967
|
+
}, " – ", 8, Qt))
|
|
959
968
|
], !0)
|
|
960
|
-
], 8,
|
|
969
|
+
], 8, Zt)
|
|
961
970
|
]);
|
|
962
971
|
};
|
|
963
972
|
}
|
|
964
|
-
}), Je = /* @__PURE__ */ te(
|
|
973
|
+
}), Je = /* @__PURE__ */ te(la, [["__scopeId", "data-v-a3c5ab01"]]), sa = { "data-testid": "config-card-title" }, da = { class: "config-card-actions" }, ca = { class: "config-card-details-section" }, ua = ["data-testid"], pa = {
|
|
965
974
|
key: 0,
|
|
966
975
|
class: "config-card-prop-section-title"
|
|
967
|
-
},
|
|
976
|
+
}, ya = /* @__PURE__ */ W({
|
|
968
977
|
__name: "EntityBaseConfigCard",
|
|
969
978
|
props: {
|
|
970
979
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1023,9 +1032,9 @@ const X = {
|
|
|
1023
1032
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
1024
1033
|
setup(e, { emit: o }) {
|
|
1025
1034
|
var t;
|
|
1026
|
-
const a = e, i =
|
|
1035
|
+
const a = e, i = Se(), { i18n: { t: n } } = X.useI18n(), { getMessageFromError: f } = X.useErrors(), { convertKeyToTitle: k } = X.useStringHelpers(), { axiosInstance: v } = X.useAxios({
|
|
1027
1036
|
headers: (t = a.config) == null ? void 0 : t.requestHeaders
|
|
1028
|
-
}),
|
|
1037
|
+
}), c = {
|
|
1029
1038
|
id: {
|
|
1030
1039
|
type: N.ID,
|
|
1031
1040
|
label: n("baseConfigCard.commonFields.id_label"),
|
|
@@ -1059,114 +1068,114 @@ const X = {
|
|
|
1059
1068
|
// the last property displayed
|
|
1060
1069
|
section: Z.Basic
|
|
1061
1070
|
}
|
|
1062
|
-
}, g =
|
|
1063
|
-
var p,
|
|
1064
|
-
if (!
|
|
1071
|
+
}, g = P(!1), h = P(!1), F = P(""), C = P(), A = _(() => {
|
|
1072
|
+
var p, S, b;
|
|
1073
|
+
if (!C.value)
|
|
1065
1074
|
return [];
|
|
1066
|
-
const
|
|
1067
|
-
for (const I in
|
|
1068
|
-
const M = (
|
|
1069
|
-
let
|
|
1070
|
-
(
|
|
1075
|
+
const U = [], V = Object.keys(C.value).length;
|
|
1076
|
+
for (const I in C.value) {
|
|
1077
|
+
const M = (S = (p = a.configSchema) == null ? void 0 : p[I]) == null ? void 0 : S.order, E = (b = c[I]) == null ? void 0 : b.order;
|
|
1078
|
+
let R = V;
|
|
1079
|
+
(E || E === 0) && (R = E === -1 ? V + 1 : E), M && (R = M === -1 ? V + 1 : M), U.push([I, R]);
|
|
1071
1080
|
}
|
|
1072
|
-
return
|
|
1081
|
+
return U.sort(function(I, M) {
|
|
1073
1082
|
return I[1] - M[1];
|
|
1074
|
-
}),
|
|
1075
|
-
var M,
|
|
1076
|
-
const
|
|
1083
|
+
}), U.map((I) => {
|
|
1084
|
+
var M, E;
|
|
1085
|
+
const R = I[0], Y = (M = C.value) == null ? void 0 : M[R], ne = ((E = a.configSchema) == null ? void 0 : E[R]) || {}, Q = c[R];
|
|
1077
1086
|
return {
|
|
1078
|
-
key:
|
|
1087
|
+
key: R,
|
|
1079
1088
|
value: Y,
|
|
1080
1089
|
hidden: ne.hidden || !1,
|
|
1081
1090
|
type: ne.type ?? ((Q == null ? void 0 : Q.type) || N.Text),
|
|
1082
|
-
label: ne.label ?? ((Q == null ? void 0 : Q.label) ||
|
|
1091
|
+
label: ne.label ?? ((Q == null ? void 0 : Q.label) || k(R)),
|
|
1083
1092
|
tooltip: ne.tooltip ?? ((Q == null ? void 0 : Q.tooltip) || void 0),
|
|
1084
1093
|
section: ne.section ?? ((Q == null ? void 0 : Q.section) || Z.Advanced)
|
|
1085
1094
|
};
|
|
1086
1095
|
}).filter((I) => !I.hidden && I.key !== a.pluginConfigKey);
|
|
1087
|
-
}), x =
|
|
1088
|
-
var p,
|
|
1089
|
-
if (!
|
|
1096
|
+
}), x = _(() => {
|
|
1097
|
+
var p, S;
|
|
1098
|
+
if (!C.value || !a.pluginConfigKey)
|
|
1090
1099
|
return [];
|
|
1091
|
-
const b =
|
|
1100
|
+
const b = C.value[a.pluginConfigKey] || {}, U = Object.keys(b).length, V = [];
|
|
1092
1101
|
for (const I in b) {
|
|
1093
|
-
const M = (
|
|
1094
|
-
let
|
|
1095
|
-
M && (
|
|
1102
|
+
const M = (S = (p = a.pluginConfigSchema) == null ? void 0 : p[I]) == null ? void 0 : S.order, E = b[I];
|
|
1103
|
+
let R = E != null && E !== "" ? U - 1 : U;
|
|
1104
|
+
M && (R = M === -1 ? U + 1 : M), V.push([I, R]);
|
|
1096
1105
|
}
|
|
1097
1106
|
return V.sort(function(I, M) {
|
|
1098
1107
|
return I[1] - M[1];
|
|
1099
1108
|
}), V.map((I) => {
|
|
1100
1109
|
var M;
|
|
1101
|
-
const
|
|
1110
|
+
const E = I[0], R = b[E], Y = ((M = a.pluginConfigSchema) == null ? void 0 : M[E]) || {};
|
|
1102
1111
|
return {
|
|
1103
|
-
key:
|
|
1104
|
-
value:
|
|
1112
|
+
key: E,
|
|
1113
|
+
value: R,
|
|
1105
1114
|
hidden: Y.hidden || !1,
|
|
1106
1115
|
type: Y.type ?? N.Text,
|
|
1107
|
-
label: Y.label ??
|
|
1116
|
+
label: Y.label ?? k(E),
|
|
1108
1117
|
tooltip: Y.tooltip ?? void 0,
|
|
1109
1118
|
section: Z.Plugin
|
|
1110
1119
|
};
|
|
1111
1120
|
}).filter((I) => !I.hidden);
|
|
1112
|
-
}),
|
|
1113
|
-
var p,
|
|
1121
|
+
}), l = _(() => {
|
|
1122
|
+
var p, S, b, U;
|
|
1114
1123
|
return {
|
|
1115
|
-
basic: (p =
|
|
1116
|
-
advanced: (
|
|
1117
|
-
plugin: (
|
|
1124
|
+
basic: (p = A.value) == null ? void 0 : p.filter((V) => V.section === Z.Basic),
|
|
1125
|
+
advanced: (S = A.value) == null ? void 0 : S.filter((V) => V.section === Z.Advanced),
|
|
1126
|
+
plugin: (U = x.value) == null ? void 0 : U.concat((b = A.value) == null ? void 0 : b.filter((V) => V.section === Z.Plugin))
|
|
1118
1127
|
};
|
|
1119
|
-
}),
|
|
1128
|
+
}), r = _(() => {
|
|
1120
1129
|
const p = [];
|
|
1121
|
-
return
|
|
1122
|
-
}),
|
|
1123
|
-
var p,
|
|
1130
|
+
return l.value.basic.length && p.push("basic"), l.value.advanced.length && p.push("advanced"), l.value.plugin.length && p.push("plugin"), p;
|
|
1131
|
+
}), u = (p) => !!(p.tooltip || i[`${p.key}-label-tooltip`]), m = _(() => {
|
|
1132
|
+
var p, S;
|
|
1124
1133
|
let b = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
1125
|
-
return a.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((p = a.config) == null ? void 0 : p.controlPlaneId) || "") : a.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (
|
|
1126
|
-
}),
|
|
1127
|
-
|
|
1134
|
+
return a.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((p = a.config) == null ? void 0 : p.controlPlaneId) || "") : a.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (S = a.config) != null && S.workspace ? `/${a.config.workspace}` : "")), b = b.replace(/{id}/gi, a.config.entityId), b;
|
|
1135
|
+
}), B = (p) => {
|
|
1136
|
+
C.value && p(JSON.stringify(C.value)) ? o("copy:success", C.value) : o("copy:error");
|
|
1128
1137
|
};
|
|
1129
1138
|
return se(g, (p) => {
|
|
1130
1139
|
o("loading", p);
|
|
1131
|
-
}, { immediate: !0 }),
|
|
1132
|
-
|
|
1140
|
+
}, { immediate: !0 }), _e(async () => {
|
|
1141
|
+
h.value = !1, g.value = !0;
|
|
1133
1142
|
try {
|
|
1134
|
-
const { data: p } = await
|
|
1143
|
+
const { data: p } = await v.get(m.value);
|
|
1135
1144
|
if (a.dataKey)
|
|
1136
1145
|
if (typeof p[a.dataKey] < "u")
|
|
1137
|
-
|
|
1146
|
+
C.value = { ...p[a.dataKey] };
|
|
1138
1147
|
else
|
|
1139
1148
|
throw new Error(n("errors.dataKeyUndefined", { dataKey: a.dataKey }));
|
|
1140
1149
|
else
|
|
1141
|
-
|
|
1142
|
-
Object.keys(a.configSchema).filter((
|
|
1143
|
-
|
|
1150
|
+
C.value = { ...p };
|
|
1151
|
+
Object.keys(a.configSchema).filter((S) => a.configSchema[S].forceShow).forEach((S) => {
|
|
1152
|
+
C.value && typeof C.value[S] > "u" && (C.value[S] = null);
|
|
1144
1153
|
}), o("fetch:success", p);
|
|
1145
1154
|
} catch (p) {
|
|
1146
|
-
const
|
|
1147
|
-
|
|
1155
|
+
const S = f(p);
|
|
1156
|
+
F.value = S.startsWith("code") ? n("baseConfigCard.errors.load") : S, h.value = !0, o("fetch:error", p);
|
|
1148
1157
|
} finally {
|
|
1149
1158
|
g.value = !1;
|
|
1150
1159
|
}
|
|
1151
|
-
}), (p,
|
|
1152
|
-
const b =
|
|
1160
|
+
}), (p, S) => {
|
|
1161
|
+
const b = T("KButton"), U = T("KClipboardProvider"), V = T("KSkeleton"), I = T("KEmptyState"), M = T("KCard");
|
|
1153
1162
|
return d(), L(M, {
|
|
1154
1163
|
"border-variant": "noBorder",
|
|
1155
1164
|
class: "kong-ui-entity-base-config-card"
|
|
1156
1165
|
}, ce({
|
|
1157
|
-
actions:
|
|
1158
|
-
|
|
1166
|
+
actions: s(() => [
|
|
1167
|
+
j("div", da, [
|
|
1159
1168
|
J(p.$slots, "actions", {}, void 0, !0),
|
|
1160
|
-
|
|
1161
|
-
default:
|
|
1162
|
-
!g.value && !
|
|
1169
|
+
w(U, null, {
|
|
1170
|
+
default: s(({ copyToClipboard: E }) => [
|
|
1171
|
+
!g.value && !h.value ? (d(), L(b, {
|
|
1163
1172
|
key: 0,
|
|
1164
1173
|
appearance: "btn-link",
|
|
1165
1174
|
"data-testid": "json-copy-button",
|
|
1166
|
-
onClick: (
|
|
1175
|
+
onClick: (R) => B(E)
|
|
1167
1176
|
}, {
|
|
1168
|
-
default:
|
|
1169
|
-
D(q(
|
|
1177
|
+
default: s(() => [
|
|
1178
|
+
D(q(y(n)("baseConfigCard.actions.copy")), 1)
|
|
1170
1179
|
]),
|
|
1171
1180
|
_: 2
|
|
1172
1181
|
}, 1032, ["onClick"])) : G("", !0)
|
|
@@ -1175,63 +1184,63 @@ const X = {
|
|
|
1175
1184
|
})
|
|
1176
1185
|
])
|
|
1177
1186
|
]),
|
|
1178
|
-
body:
|
|
1187
|
+
body: s(() => [
|
|
1179
1188
|
g.value ? (d(), L(V, {
|
|
1180
1189
|
key: 0,
|
|
1181
1190
|
"data-testid": "config-card-loader",
|
|
1182
1191
|
"table-columns": 2,
|
|
1183
1192
|
type: "table"
|
|
1184
|
-
})) :
|
|
1193
|
+
})) : h.value ? (d(), L(I, {
|
|
1185
1194
|
key: 1,
|
|
1186
1195
|
"data-testid": "config-card-fetch-error",
|
|
1187
1196
|
"is-error": ""
|
|
1188
1197
|
}, {
|
|
1189
|
-
message:
|
|
1190
|
-
|
|
1198
|
+
message: s(() => [
|
|
1199
|
+
j("h3", null, q(F.value), 1)
|
|
1191
1200
|
]),
|
|
1192
1201
|
_: 1
|
|
1193
1202
|
})) : G("", !0),
|
|
1194
|
-
|
|
1195
|
-
(d(!0), K(oe, null, ee(
|
|
1196
|
-
key: `config-card-details-${
|
|
1197
|
-
class:
|
|
1198
|
-
"data-testid": `config-card-details-${
|
|
1203
|
+
j("div", ca, [
|
|
1204
|
+
(d(!0), K(oe, null, ee(r.value, (E) => (d(), K("div", {
|
|
1205
|
+
key: `config-card-details-${E}-props`,
|
|
1206
|
+
class: le(`config-card-details-${E}-props`),
|
|
1207
|
+
"data-testid": `config-card-details-${E}-props`
|
|
1199
1208
|
}, [
|
|
1200
|
-
|
|
1201
|
-
(d(!0), K(oe, null, ee(
|
|
1202
|
-
key:
|
|
1203
|
-
item:
|
|
1209
|
+
E !== "basic" ? (d(), K("div", pa, q(E === "advanced" ? y(n)("baseConfigCard.sections.advanced") : y(n)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
1210
|
+
(d(!0), K(oe, null, ee(l.value[E], (R) => (d(), L(Je, {
|
|
1211
|
+
key: R.key,
|
|
1212
|
+
item: R
|
|
1204
1213
|
}, ce({
|
|
1205
|
-
label:
|
|
1206
|
-
J(p.$slots, `${
|
|
1214
|
+
label: s(() => [
|
|
1215
|
+
J(p.$slots, `${R.key}-label`, { row: R }, void 0, !0)
|
|
1207
1216
|
]),
|
|
1208
|
-
[
|
|
1209
|
-
J(p.$slots,
|
|
1210
|
-
row:
|
|
1217
|
+
[R.key]: s(({ rowValue: Y }) => [
|
|
1218
|
+
J(p.$slots, R.key, {
|
|
1219
|
+
row: R,
|
|
1211
1220
|
rowValue: Y
|
|
1212
1221
|
}, void 0, !0)
|
|
1213
1222
|
]),
|
|
1214
1223
|
_: 2
|
|
1215
1224
|
}, [
|
|
1216
|
-
|
|
1225
|
+
u(R) ? {
|
|
1217
1226
|
name: "label-tooltip",
|
|
1218
|
-
fn:
|
|
1219
|
-
J(p.$slots, `${
|
|
1227
|
+
fn: s(() => [
|
|
1228
|
+
J(p.$slots, `${R.key}-label-tooltip`, { row: R }, void 0, !0)
|
|
1220
1229
|
]),
|
|
1221
1230
|
key: "0"
|
|
1222
1231
|
} : void 0
|
|
1223
1232
|
]), 1032, ["item"]))), 128))
|
|
1224
|
-
], 10,
|
|
1233
|
+
], 10, ua))), 128))
|
|
1225
1234
|
])
|
|
1226
1235
|
]),
|
|
1227
1236
|
_: 2
|
|
1228
1237
|
}, [
|
|
1229
1238
|
e.hideTitle ? void 0 : {
|
|
1230
1239
|
name: "title",
|
|
1231
|
-
fn:
|
|
1232
|
-
|
|
1240
|
+
fn: s(() => [
|
|
1241
|
+
j("div", sa, [
|
|
1233
1242
|
J(p.$slots, "title", {}, () => [
|
|
1234
|
-
D(q(
|
|
1243
|
+
D(q(y(n)("baseConfigCard.title")), 1)
|
|
1235
1244
|
], !0)
|
|
1236
1245
|
])
|
|
1237
1246
|
]),
|
|
@@ -1240,10 +1249,10 @@ const X = {
|
|
|
1240
1249
|
]), 1024);
|
|
1241
1250
|
};
|
|
1242
1251
|
}
|
|
1243
|
-
}),
|
|
1252
|
+
}), fa = /* @__PURE__ */ te(ya, [["__scopeId", "data-v-b72bbdde"]]), ma = ["onReset", "onSubmit"], ga = {
|
|
1244
1253
|
class: "form-actions",
|
|
1245
1254
|
"data-testid": "form-actions"
|
|
1246
|
-
},
|
|
1255
|
+
}, va = /* @__PURE__ */ W({
|
|
1247
1256
|
__name: "EntityBaseForm",
|
|
1248
1257
|
props: {
|
|
1249
1258
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1293,99 +1302,99 @@ const X = {
|
|
|
1293
1302
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
1294
1303
|
setup(e, { emit: o }) {
|
|
1295
1304
|
var t;
|
|
1296
|
-
const a = e, i =
|
|
1305
|
+
const a = e, i = we(), { i18n: { t: n } } = X.useI18n(), { getMessageFromError: f } = X.useErrors(), { axiosInstance: k } = X.useAxios({
|
|
1297
1306
|
headers: (t = a.config) == null ? void 0 : t.requestHeaders
|
|
1298
|
-
}),
|
|
1299
|
-
var
|
|
1307
|
+
}), v = P(!1), c = P(!1), g = P(""), h = _(() => a.canSubmit === !1 || a.isReadonly), F = _(() => {
|
|
1308
|
+
var l, r;
|
|
1300
1309
|
if (!a.editId)
|
|
1301
1310
|
return "";
|
|
1302
|
-
let
|
|
1303
|
-
return a.config.app === "konnect" ?
|
|
1304
|
-
}),
|
|
1305
|
-
a.config.cancelRoute ? i.push(a.config.cancelRoute) :
|
|
1306
|
-
},
|
|
1311
|
+
let u = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
1312
|
+
return a.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((l = a.config) == null ? void 0 : l.controlPlaneId) || "") : a.config.app === "kongManager" && (u = u.replace(/\/{workspace}/gi, (r = a.config) != null && r.workspace ? `/${a.config.workspace}` : "")), u = u.replace(/{id}/gi, a.editId), u;
|
|
1313
|
+
}), C = () => {
|
|
1314
|
+
a.config.cancelRoute ? i.push(a.config.cancelRoute) : A();
|
|
1315
|
+
}, A = () => {
|
|
1307
1316
|
o("cancel");
|
|
1308
1317
|
}, x = () => {
|
|
1309
|
-
|
|
1318
|
+
h.value || o("submit");
|
|
1310
1319
|
};
|
|
1311
|
-
return se(() =>
|
|
1312
|
-
o("loading",
|
|
1313
|
-
}, { immediate: !0 }),
|
|
1320
|
+
return se(() => v.value, (l) => {
|
|
1321
|
+
o("loading", l);
|
|
1322
|
+
}, { immediate: !0 }), _e(async () => {
|
|
1314
1323
|
if (a.editId)
|
|
1315
1324
|
try {
|
|
1316
|
-
|
|
1317
|
-
const { data:
|
|
1318
|
-
o("fetch:success",
|
|
1319
|
-
} catch (
|
|
1320
|
-
const
|
|
1321
|
-
g.value =
|
|
1325
|
+
c.value = !1, v.value = !0;
|
|
1326
|
+
const { data: l } = await k.get(F.value);
|
|
1327
|
+
o("fetch:success", l);
|
|
1328
|
+
} catch (l) {
|
|
1329
|
+
const r = f(l);
|
|
1330
|
+
g.value = r.startsWith("code") ? n("baseForm.errors.edit") : r, c.value = !0, o("fetch:error", l);
|
|
1322
1331
|
} finally {
|
|
1323
|
-
|
|
1332
|
+
v.value = !1;
|
|
1324
1333
|
}
|
|
1325
|
-
}), (
|
|
1326
|
-
const
|
|
1327
|
-
return d(), L(
|
|
1328
|
-
body:
|
|
1329
|
-
|
|
1334
|
+
}), (l, r) => {
|
|
1335
|
+
const u = T("KSkeleton"), m = T("KEmptyState"), B = T("KAlert"), p = T("KButton"), S = T("KCard");
|
|
1336
|
+
return d(), L(S, { class: "kong-ui-entity-base-form" }, {
|
|
1337
|
+
body: s(() => [
|
|
1338
|
+
v.value ? (d(), L(u, {
|
|
1330
1339
|
key: 0,
|
|
1331
1340
|
type: "form"
|
|
1332
|
-
})) :
|
|
1341
|
+
})) : c.value ? (d(), L(m, {
|
|
1333
1342
|
key: 1,
|
|
1334
|
-
"cta-text":
|
|
1343
|
+
"cta-text": y(n)("baseForm.actions.back"),
|
|
1335
1344
|
"data-testid": "form-fetch-error",
|
|
1336
|
-
"handle-click":
|
|
1345
|
+
"handle-click": C,
|
|
1337
1346
|
"is-error": !0
|
|
1338
1347
|
}, {
|
|
1339
|
-
message:
|
|
1340
|
-
|
|
1348
|
+
message: s(() => [
|
|
1349
|
+
j("h3", null, q(g.value), 1)
|
|
1341
1350
|
]),
|
|
1342
1351
|
_: 1
|
|
1343
1352
|
}, 8, ["cta-text"])) : (d(), K("form", {
|
|
1344
1353
|
key: 2,
|
|
1345
1354
|
"data-testid": "form-content",
|
|
1346
|
-
onReset: fe(
|
|
1355
|
+
onReset: fe(A, ["prevent"]),
|
|
1347
1356
|
onSubmit: fe(x, ["prevent"])
|
|
1348
1357
|
}, [
|
|
1349
|
-
J(
|
|
1350
|
-
e.errorMessage ? (d(), L(
|
|
1358
|
+
J(l.$slots, "default", {}, void 0, !0),
|
|
1359
|
+
e.errorMessage ? (d(), L(B, {
|
|
1351
1360
|
key: 0,
|
|
1352
1361
|
"alert-message": e.errorMessage,
|
|
1353
1362
|
appearance: "danger",
|
|
1354
1363
|
"data-testid": "form-error"
|
|
1355
1364
|
}, null, 8, ["alert-message"])) : G("", !0),
|
|
1356
|
-
|
|
1357
|
-
J(
|
|
1358
|
-
|
|
1365
|
+
j("div", ga, [
|
|
1366
|
+
J(l.$slots, "form-actions", {}, () => [
|
|
1367
|
+
w(p, {
|
|
1359
1368
|
appearance: "outline",
|
|
1360
1369
|
"data-testid": "form-cancel",
|
|
1361
1370
|
disabled: e.isReadonly,
|
|
1362
1371
|
type: "reset"
|
|
1363
1372
|
}, {
|
|
1364
|
-
default:
|
|
1365
|
-
D(q(
|
|
1373
|
+
default: s(() => [
|
|
1374
|
+
D(q(y(n)("baseForm.actions.cancel")), 1)
|
|
1366
1375
|
]),
|
|
1367
1376
|
_: 1
|
|
1368
1377
|
}, 8, ["disabled"]),
|
|
1369
|
-
|
|
1378
|
+
w(p, {
|
|
1370
1379
|
appearance: "primary",
|
|
1371
1380
|
"data-testid": "form-submit",
|
|
1372
|
-
disabled:
|
|
1381
|
+
disabled: h.value,
|
|
1373
1382
|
type: "submit"
|
|
1374
1383
|
}, {
|
|
1375
|
-
default:
|
|
1376
|
-
D(q(
|
|
1384
|
+
default: s(() => [
|
|
1385
|
+
D(q(y(n)("baseForm.actions.save")), 1)
|
|
1377
1386
|
]),
|
|
1378
1387
|
_: 1
|
|
1379
1388
|
}, 8, ["disabled"])
|
|
1380
1389
|
], !0)
|
|
1381
1390
|
])
|
|
1382
|
-
], 40,
|
|
1391
|
+
], 40, ma))
|
|
1383
1392
|
]),
|
|
1384
1393
|
_: 3
|
|
1385
1394
|
});
|
|
1386
1395
|
};
|
|
1387
1396
|
}
|
|
1388
|
-
}),
|
|
1397
|
+
}), ha = /* @__PURE__ */ te(va, [["__scopeId", "data-v-2286e5f2"]]), ba = { key: 0 }, ka = /* @__PURE__ */ W({
|
|
1389
1398
|
__name: "EntityBaseTableCell",
|
|
1390
1399
|
props: {
|
|
1391
1400
|
keyName: {
|
|
@@ -1398,57 +1407,57 @@ const X = {
|
|
|
1398
1407
|
}
|
|
1399
1408
|
},
|
|
1400
1409
|
setup(e) {
|
|
1401
|
-
const o = e, t =
|
|
1410
|
+
const o = e, t = _(() => {
|
|
1402
1411
|
var x;
|
|
1403
1412
|
return ((x = o.rowEl) == null ? void 0 : x.querySelector(`[data-testid="${o.keyName}"]`)) || null;
|
|
1404
|
-
}), a =
|
|
1413
|
+
}), a = _(() => {
|
|
1405
1414
|
var x;
|
|
1406
1415
|
return ((x = t.value) == null ? void 0 : x.querySelector('[role="button"]')) || null;
|
|
1407
|
-
}), i =
|
|
1408
|
-
var x,
|
|
1409
|
-
const
|
|
1410
|
-
return
|
|
1416
|
+
}), i = _(() => {
|
|
1417
|
+
var x, l;
|
|
1418
|
+
const r = (x = o.rowEl) == null ? void 0 : x.querySelectorAll("td");
|
|
1419
|
+
return r ? ((l = r[0]) == null ? void 0 : l.getAttribute("data-testid")) === o.keyName : !1;
|
|
1411
1420
|
});
|
|
1412
1421
|
let n;
|
|
1413
|
-
const
|
|
1422
|
+
const f = () => {
|
|
1414
1423
|
n && (n.disconnect(), n = void 0);
|
|
1415
|
-
},
|
|
1416
|
-
var x,
|
|
1417
|
-
|
|
1418
|
-
},
|
|
1419
|
-
|
|
1424
|
+
}, k = () => {
|
|
1425
|
+
var x, l, r;
|
|
1426
|
+
c.value = ((x = a.value) == null ? void 0 : x.getBoundingClientRect().width) || 0, g.value = ((l = t.value) == null ? void 0 : l.clientWidth) || 0, h.value = ((r = v.value) == null ? void 0 : r.innerText) || "";
|
|
1427
|
+
}, v = P({}), c = P(0), g = P(0), h = P(""), F = _(() => [a.value, t.value]), C = se(
|
|
1428
|
+
F,
|
|
1420
1429
|
(x) => {
|
|
1421
|
-
if (i.value && (
|
|
1422
|
-
n = new ResizeObserver((
|
|
1430
|
+
if (i.value && (f(), "ResizeObserver" in window && window)) {
|
|
1431
|
+
n = new ResizeObserver((l) => {
|
|
1423
1432
|
window.requestAnimationFrame(() => {
|
|
1424
|
-
!Array.isArray(
|
|
1433
|
+
!Array.isArray(l) || !l.length || k();
|
|
1425
1434
|
});
|
|
1426
1435
|
});
|
|
1427
|
-
for (const
|
|
1428
|
-
|
|
1436
|
+
for (const l of x)
|
|
1437
|
+
l && n.observe(l);
|
|
1429
1438
|
}
|
|
1430
1439
|
},
|
|
1431
1440
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
1432
|
-
),
|
|
1441
|
+
), A = _(() => i.value ? c.value > g.value : !1);
|
|
1433
1442
|
return tt(() => {
|
|
1434
|
-
S();
|
|
1435
|
-
}), at(() => {
|
|
1436
1443
|
k();
|
|
1437
|
-
}), (
|
|
1438
|
-
|
|
1444
|
+
}), at(() => {
|
|
1445
|
+
C();
|
|
1446
|
+
}), (x, l) => {
|
|
1447
|
+
const r = T("KTooltip");
|
|
1439
1448
|
return d(), K("span", {
|
|
1440
1449
|
ref_key: "contentRef",
|
|
1441
|
-
ref:
|
|
1450
|
+
ref: v,
|
|
1442
1451
|
class: "content-wrapper"
|
|
1443
1452
|
}, [
|
|
1444
|
-
i.value ? (d(), K("span",
|
|
1445
|
-
|
|
1446
|
-
disabled: !
|
|
1447
|
-
label:
|
|
1453
|
+
i.value ? (d(), K("span", ba, [
|
|
1454
|
+
w(r, {
|
|
1455
|
+
disabled: !A.value,
|
|
1456
|
+
label: h.value,
|
|
1448
1457
|
"max-width": "300",
|
|
1449
1458
|
placement: "bottomStart"
|
|
1450
1459
|
}, {
|
|
1451
|
-
default:
|
|
1460
|
+
default: s(() => [
|
|
1452
1461
|
J(x.$slots, "default", {}, void 0, !0)
|
|
1453
1462
|
]),
|
|
1454
1463
|
_: 3
|
|
@@ -1457,10 +1466,10 @@ const X = {
|
|
|
1457
1466
|
], 512);
|
|
1458
1467
|
};
|
|
1459
1468
|
}
|
|
1460
|
-
}),
|
|
1469
|
+
}), Ca = /* @__PURE__ */ te(ka, [["__scopeId", "data-v-f8a220e9"]]), Sa = { class: "toolbar-container" }, _a = {
|
|
1461
1470
|
key: 0,
|
|
1462
1471
|
class: "toolbar-button-container"
|
|
1463
|
-
},
|
|
1472
|
+
}, wa = ["data-testid"], Ia = /* @__PURE__ */ W({
|
|
1464
1473
|
__name: "EntityBaseTable",
|
|
1465
1474
|
props: {
|
|
1466
1475
|
// table header configuration
|
|
@@ -1564,126 +1573,126 @@ const X = {
|
|
|
1564
1573
|
},
|
|
1565
1574
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
1566
1575
|
setup(e, { emit: o }) {
|
|
1567
|
-
const t = e, { i18n: { t: a } } = X.useI18n(), i =
|
|
1576
|
+
const t = e, { i18n: { t: a } } = X.useI18n(), i = _(() => t.cacheIdentifier || t.preferencesStorageKey), n = (m) => m.hasData || !!t.query, f = _(() => {
|
|
1568
1577
|
const m = [];
|
|
1569
|
-
return Object.keys(t.tableHeaders).forEach((
|
|
1570
|
-
const p = t.tableHeaders[
|
|
1578
|
+
return Object.keys(t.tableHeaders).forEach((B) => {
|
|
1579
|
+
const p = t.tableHeaders[B];
|
|
1571
1580
|
m.push({
|
|
1572
|
-
label: p.label ??
|
|
1573
|
-
key:
|
|
1581
|
+
label: p.label ?? B,
|
|
1582
|
+
key: B,
|
|
1574
1583
|
sortable: p.sortable ?? !1
|
|
1575
1584
|
});
|
|
1576
1585
|
}), t.enableEntityActions && m.push({
|
|
1577
1586
|
key: "actions",
|
|
1578
1587
|
hideLabel: !0
|
|
1579
1588
|
}), m;
|
|
1580
|
-
}),
|
|
1589
|
+
}), k = (m) => ({
|
|
1581
1590
|
"data-rowid": m.id,
|
|
1582
1591
|
"data-testid": m.name,
|
|
1583
1592
|
...t.rowAttributes(m)
|
|
1584
|
-
}),
|
|
1585
|
-
var
|
|
1586
|
-
return (
|
|
1593
|
+
}), v = P({}), c = (m) => {
|
|
1594
|
+
var B;
|
|
1595
|
+
return (B = v.value) == null ? void 0 : B.$el.querySelector(`[data-rowid="${m.id}"]`);
|
|
1587
1596
|
}, g = (m) => {
|
|
1588
|
-
const
|
|
1597
|
+
const B = {
|
|
1589
1598
|
"data-testid": m.headerKey,
|
|
1590
1599
|
...t.cellAttributes(m)
|
|
1591
1600
|
};
|
|
1592
|
-
return m.colIndex === 0 && (
|
|
1601
|
+
return m.colIndex === 0 && (B.style = {
|
|
1593
1602
|
maxWidth: "250px",
|
|
1594
1603
|
overflowX: "hidden",
|
|
1595
1604
|
textOverflow: "ellipsis"
|
|
1596
|
-
}),
|
|
1597
|
-
},
|
|
1598
|
-
o("empty-state-cta-clicked"),
|
|
1599
|
-
},
|
|
1605
|
+
}), B;
|
|
1606
|
+
}, h = () => {
|
|
1607
|
+
o("empty-state-cta-clicked"), F();
|
|
1608
|
+
}, F = () => {
|
|
1600
1609
|
o("clear-search-input");
|
|
1601
|
-
},
|
|
1602
|
-
o("click:row",
|
|
1603
|
-
},
|
|
1610
|
+
}, C = (m, B) => {
|
|
1611
|
+
o("click:row", B);
|
|
1612
|
+
}, A = (m) => {
|
|
1604
1613
|
o("sort", m);
|
|
1605
|
-
}, { setTablePreferences: x, getTablePreferences:
|
|
1606
|
-
const m =
|
|
1614
|
+
}, { setTablePreferences: x, getTablePreferences: l } = ut(), r = _(() => {
|
|
1615
|
+
const m = l(t.preferencesStorageKey);
|
|
1607
1616
|
return {
|
|
1608
1617
|
...t.initialFetcherParams,
|
|
1609
1618
|
...m
|
|
1610
1619
|
};
|
|
1611
|
-
}),
|
|
1620
|
+
}), u = (m) => {
|
|
1612
1621
|
t.preferencesStorageKey && x(t.preferencesStorageKey, m);
|
|
1613
1622
|
};
|
|
1614
|
-
return (m,
|
|
1615
|
-
const p =
|
|
1623
|
+
return (m, B) => {
|
|
1624
|
+
const p = T("KIcon"), S = T("KButton"), b = T("KDropdownMenu"), U = T("KTable"), V = T("KCard");
|
|
1616
1625
|
return d(), L(V, {
|
|
1617
1626
|
class: "kong-ui-entity-base-table",
|
|
1618
1627
|
title: e.title
|
|
1619
1628
|
}, {
|
|
1620
|
-
body:
|
|
1621
|
-
|
|
1629
|
+
body: s(() => [
|
|
1630
|
+
w(U, {
|
|
1622
1631
|
ref_key: "tableRefs",
|
|
1623
|
-
ref:
|
|
1632
|
+
ref: v,
|
|
1624
1633
|
"cache-identifier": i.value,
|
|
1625
1634
|
"cell-attrs": g,
|
|
1626
1635
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
1627
1636
|
"disable-sorting": e.disableSorting,
|
|
1628
1637
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
1629
|
-
"empty-state-action-message": e.query ?
|
|
1638
|
+
"empty-state-action-message": e.query ? y(a)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
1630
1639
|
"empty-state-action-route": e.query ? "" : e.emptyStateOptions.ctaPath,
|
|
1631
1640
|
"empty-state-icon": e.query ? "stateNoSearchResults" : "stateGruceo",
|
|
1632
1641
|
"empty-state-icon-size": "96",
|
|
1633
|
-
"empty-state-message": e.query ?
|
|
1634
|
-
"empty-state-title": e.query ?
|
|
1642
|
+
"empty-state-message": e.query ? y(a)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
1643
|
+
"empty-state-title": e.query ? y(a)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
1635
1644
|
"enable-client-sort": e.enableClientSort,
|
|
1636
1645
|
"error-state-title": e.errorMessage,
|
|
1637
1646
|
fetcher: e.fetcher,
|
|
1638
1647
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
1639
1648
|
"has-error": !!e.errorMessage,
|
|
1640
|
-
headers:
|
|
1649
|
+
headers: f.value,
|
|
1641
1650
|
"hide-pagination-when-optional": "",
|
|
1642
|
-
"initial-fetcher-params":
|
|
1651
|
+
"initial-fetcher-params": r.value,
|
|
1643
1652
|
"is-loading": e.isLoading,
|
|
1644
1653
|
"pagination-type": e.paginationType,
|
|
1645
|
-
"row-attrs":
|
|
1654
|
+
"row-attrs": k,
|
|
1646
1655
|
"search-input": e.query,
|
|
1647
|
-
onKtableEmptyStateCtaClicked:
|
|
1648
|
-
"onRow:click":
|
|
1649
|
-
onSort:
|
|
1650
|
-
"onUpdate:tablePreferences":
|
|
1656
|
+
onKtableEmptyStateCtaClicked: h,
|
|
1657
|
+
"onRow:click": C,
|
|
1658
|
+
onSort: B[0] || (B[0] = (I) => A(I)),
|
|
1659
|
+
"onUpdate:tablePreferences": u
|
|
1651
1660
|
}, ce({
|
|
1652
|
-
toolbar:
|
|
1653
|
-
pe(
|
|
1661
|
+
toolbar: s(({ state: I }) => [
|
|
1662
|
+
pe(j("div", Sa, [
|
|
1654
1663
|
J(m.$slots, "toolbar-filter", {}, void 0, !0),
|
|
1655
|
-
m.$slots["toolbar-button"] ? (d(), K("div",
|
|
1664
|
+
m.$slots["toolbar-button"] ? (d(), K("div", _a, [
|
|
1656
1665
|
J(m.$slots, "toolbar-button", {}, void 0, !0)
|
|
1657
1666
|
])) : G("", !0)
|
|
1658
1667
|
], 512), [
|
|
1659
1668
|
[ye, n(I)]
|
|
1660
1669
|
])
|
|
1661
1670
|
]),
|
|
1662
|
-
actions:
|
|
1663
|
-
|
|
1671
|
+
actions: s(({ row: I, rowKey: M, rowValue: E }) => [
|
|
1672
|
+
j("div", {
|
|
1664
1673
|
class: "actions-container",
|
|
1665
1674
|
"data-testid": I.name
|
|
1666
1675
|
}, [
|
|
1667
|
-
|
|
1676
|
+
w(b, {
|
|
1668
1677
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
1669
1678
|
width: e.dropdownMenuWidth
|
|
1670
1679
|
}, {
|
|
1671
|
-
items:
|
|
1680
|
+
items: s(() => [
|
|
1672
1681
|
J(m.$slots, "actions", {
|
|
1673
1682
|
row: I,
|
|
1674
1683
|
rowKey: M,
|
|
1675
|
-
rowValue:
|
|
1684
|
+
rowValue: E
|
|
1676
1685
|
}, void 0, !0)
|
|
1677
1686
|
]),
|
|
1678
|
-
default:
|
|
1679
|
-
|
|
1687
|
+
default: s(() => [
|
|
1688
|
+
w(S, {
|
|
1680
1689
|
class: "actions-trigger",
|
|
1681
1690
|
"data-testid": "overflow-actions-button",
|
|
1682
1691
|
size: "small"
|
|
1683
1692
|
}, {
|
|
1684
|
-
icon:
|
|
1685
|
-
|
|
1686
|
-
color:
|
|
1693
|
+
icon: s(() => [
|
|
1694
|
+
w(p, {
|
|
1695
|
+
color: y(zt),
|
|
1687
1696
|
icon: "more",
|
|
1688
1697
|
size: "16"
|
|
1689
1698
|
}, null, 8, ["color"])
|
|
@@ -1693,21 +1702,21 @@ const X = {
|
|
|
1693
1702
|
]),
|
|
1694
1703
|
_: 2
|
|
1695
1704
|
}, 1032, ["width"])
|
|
1696
|
-
], 8,
|
|
1705
|
+
], 8, wa)
|
|
1697
1706
|
]),
|
|
1698
1707
|
_: 2
|
|
1699
1708
|
}, [
|
|
1700
1709
|
ee(e.tableHeaders, (I, M) => ({
|
|
1701
1710
|
name: M,
|
|
1702
|
-
fn:
|
|
1703
|
-
|
|
1711
|
+
fn: s(({ row: E, rowKey: R, rowValue: Y }) => [
|
|
1712
|
+
w(Ca, {
|
|
1704
1713
|
"key-name": String(M),
|
|
1705
|
-
"row-el":
|
|
1714
|
+
"row-el": c(E)
|
|
1706
1715
|
}, {
|
|
1707
|
-
default:
|
|
1716
|
+
default: s(() => [
|
|
1708
1717
|
J(m.$slots, M, {
|
|
1709
|
-
row:
|
|
1710
|
-
rowKey:
|
|
1718
|
+
row: E,
|
|
1719
|
+
rowKey: R,
|
|
1711
1720
|
rowValue: Y
|
|
1712
1721
|
}, () => [
|
|
1713
1722
|
D(q(Y), 1)
|
|
@@ -1723,10 +1732,10 @@ const X = {
|
|
|
1723
1732
|
}, 8, ["title"]);
|
|
1724
1733
|
};
|
|
1725
1734
|
}
|
|
1726
|
-
}),
|
|
1735
|
+
}), $a = /* @__PURE__ */ te(Ia, [["__scopeId", "data-v-a598b1d9"]]), Ka = {
|
|
1727
1736
|
key: 0,
|
|
1728
1737
|
class: "kong-ui-entity-delete-error"
|
|
1729
|
-
},
|
|
1738
|
+
}, xa = {
|
|
1730
1739
|
key: 1,
|
|
1731
1740
|
class: "description"
|
|
1732
1741
|
}, Ta = /* @__PURE__ */ W({
|
|
@@ -1768,13 +1777,13 @@ const X = {
|
|
|
1768
1777
|
},
|
|
1769
1778
|
emits: ["cancel", "proceed"],
|
|
1770
1779
|
setup(e, { emit: o }) {
|
|
1771
|
-
const t = e, { i18nT: a } = X.useI18n(), i =
|
|
1780
|
+
const t = e, { i18nT: a } = X.useI18n(), i = _(() => t.needConfirm ? t.entityName : ""), n = () => {
|
|
1772
1781
|
o("cancel");
|
|
1773
|
-
},
|
|
1782
|
+
}, f = () => {
|
|
1774
1783
|
o("proceed");
|
|
1775
1784
|
};
|
|
1776
|
-
return (
|
|
1777
|
-
const
|
|
1785
|
+
return (k, v) => {
|
|
1786
|
+
const c = T("KAlert"), g = T("KPrompt");
|
|
1778
1787
|
return d(), L(g, {
|
|
1779
1788
|
"action-button-text": "Yes, delete",
|
|
1780
1789
|
"action-pending": e.actionPending,
|
|
@@ -1784,38 +1793,38 @@ const X = {
|
|
|
1784
1793
|
title: e.title,
|
|
1785
1794
|
type: "danger",
|
|
1786
1795
|
onCanceled: n,
|
|
1787
|
-
onProceed:
|
|
1796
|
+
onProceed: f
|
|
1788
1797
|
}, {
|
|
1789
|
-
"body-content":
|
|
1790
|
-
e.error ? (d(), K("div",
|
|
1791
|
-
|
|
1792
|
-
alertMessage:
|
|
1798
|
+
"body-content": s(() => [
|
|
1799
|
+
e.error ? (d(), K("div", Ka, [
|
|
1800
|
+
w(c, { appearance: "danger" }, {
|
|
1801
|
+
alertMessage: s(() => [
|
|
1793
1802
|
D(q(e.error), 1)
|
|
1794
1803
|
]),
|
|
1795
1804
|
_: 1
|
|
1796
1805
|
})
|
|
1797
1806
|
])) : G("", !0),
|
|
1798
|
-
|
|
1807
|
+
w(y(a), {
|
|
1799
1808
|
class: "message",
|
|
1800
1809
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
1801
1810
|
tag: "p"
|
|
1802
1811
|
}, ce({
|
|
1803
|
-
entityType:
|
|
1812
|
+
entityType: s(() => [
|
|
1804
1813
|
D(q(t.entityType), 1)
|
|
1805
1814
|
]),
|
|
1806
1815
|
_: 2
|
|
1807
1816
|
}, [
|
|
1808
1817
|
t.entityName ? {
|
|
1809
1818
|
name: "entityName",
|
|
1810
|
-
fn:
|
|
1811
|
-
|
|
1819
|
+
fn: s(() => [
|
|
1820
|
+
j("strong", null, q(t.entityName), 1)
|
|
1812
1821
|
]),
|
|
1813
1822
|
key: "0"
|
|
1814
1823
|
} : void 0
|
|
1815
1824
|
]), 1032, ["keypath"]),
|
|
1816
|
-
t.description ||
|
|
1817
|
-
J(
|
|
1818
|
-
|
|
1825
|
+
t.description || k.$slots.description ? (d(), K("div", xa, [
|
|
1826
|
+
J(k.$slots, "description", {}, () => [
|
|
1827
|
+
j("p", null, q(t.description), 1)
|
|
1819
1828
|
], !0)
|
|
1820
1829
|
])) : G("", !0)
|
|
1821
1830
|
]),
|
|
@@ -1823,13 +1832,13 @@ const X = {
|
|
|
1823
1832
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
1824
1833
|
};
|
|
1825
1834
|
}
|
|
1826
|
-
}),
|
|
1835
|
+
}), Ba = /* @__PURE__ */ te(Ta, [["__scopeId", "data-v-1c9a2a07"]]), Ma = {
|
|
1827
1836
|
fill: "none",
|
|
1828
1837
|
height: "20",
|
|
1829
1838
|
viewBox: "0 0 20 20",
|
|
1830
1839
|
width: "20",
|
|
1831
1840
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1832
|
-
},
|
|
1841
|
+
}, qa = {
|
|
1833
1842
|
id: "mask0_180_20349",
|
|
1834
1843
|
height: "20",
|
|
1835
1844
|
maskUnits: "userSpaceOnUse",
|
|
@@ -1837,35 +1846,35 @@ const X = {
|
|
|
1837
1846
|
width: "20",
|
|
1838
1847
|
x: "0",
|
|
1839
1848
|
y: "0"
|
|
1840
|
-
},
|
|
1849
|
+
}, Ea = ["fill"], Pa = { mask: "url(#mask0_180_20349)" }, Fa = ["fill"], Aa = /* @__PURE__ */ W({
|
|
1841
1850
|
__name: "IconFilter",
|
|
1842
1851
|
props: {
|
|
1843
1852
|
color: {
|
|
1844
1853
|
type: String,
|
|
1845
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
1854
|
+
default: `var(--kong-ui-entity-filter-color, ${Ht})`
|
|
1846
1855
|
}
|
|
1847
1856
|
},
|
|
1848
1857
|
setup(e) {
|
|
1849
|
-
return (o, t) => (d(), K("svg",
|
|
1850
|
-
|
|
1851
|
-
|
|
1858
|
+
return (o, t) => (d(), K("svg", Ma, [
|
|
1859
|
+
j("mask", qa, [
|
|
1860
|
+
j("rect", {
|
|
1852
1861
|
fill: e.color,
|
|
1853
1862
|
height: "20",
|
|
1854
1863
|
width: "20"
|
|
1855
|
-
}, null, 8,
|
|
1864
|
+
}, null, 8, Ea)
|
|
1856
1865
|
]),
|
|
1857
|
-
|
|
1858
|
-
|
|
1866
|
+
j("g", Pa, [
|
|
1867
|
+
j("path", {
|
|
1859
1868
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
1860
1869
|
fill: e.color
|
|
1861
|
-
}, null, 8,
|
|
1870
|
+
}, null, 8, Fa)
|
|
1862
1871
|
])
|
|
1863
1872
|
]));
|
|
1864
1873
|
}
|
|
1865
|
-
}),
|
|
1874
|
+
}), Ua = {
|
|
1866
1875
|
key: 1,
|
|
1867
1876
|
class: "kong-ui-entity-filter"
|
|
1868
|
-
},
|
|
1877
|
+
}, Ra = { class: "menu-item-title" }, ja = { class: "menu-item-indicator" }, Oa = { class: "menu-item-body" }, La = ["for"], Va = { class: "menu-item-buttons" }, Na = /* @__PURE__ */ W({
|
|
1869
1878
|
__name: "EntityFilter",
|
|
1870
1879
|
props: {
|
|
1871
1880
|
// filter config, either exact match or fuzzy match
|
|
@@ -1885,143 +1894,143 @@ const X = {
|
|
|
1885
1894
|
},
|
|
1886
1895
|
emits: ["update:modelValue"],
|
|
1887
1896
|
setup(e, { emit: o }) {
|
|
1888
|
-
const t = e, { i18n: { t: a } } = X.useI18n(), i =
|
|
1889
|
-
const
|
|
1890
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
1891
|
-
|
|
1892
|
-
}),
|
|
1893
|
-
}),
|
|
1894
|
-
const
|
|
1895
|
-
return Object.keys(
|
|
1896
|
-
label: r
|
|
1897
|
-
value:
|
|
1897
|
+
const t = e, { i18n: { t: a } } = X.useI18n(), i = P(!1), n = P({}), f = _(() => {
|
|
1898
|
+
const l = [];
|
|
1899
|
+
return new URLSearchParams(t.modelValue).forEach((r, u) => {
|
|
1900
|
+
r !== "" && l.push(u);
|
|
1901
|
+
}), l;
|
|
1902
|
+
}), k = _(() => {
|
|
1903
|
+
const l = t.config.fields;
|
|
1904
|
+
return Object.keys(l).filter((r) => l[r].searchable).map((r) => ({
|
|
1905
|
+
label: l[r].label || r,
|
|
1906
|
+
value: r
|
|
1898
1907
|
}));
|
|
1899
1908
|
});
|
|
1900
|
-
se(() => t.modelValue, (
|
|
1901
|
-
n.value = {}, new URLSearchParams(
|
|
1902
|
-
n.value[
|
|
1909
|
+
se(() => t.modelValue, (l) => {
|
|
1910
|
+
n.value = {}, new URLSearchParams(l).forEach((r, u) => {
|
|
1911
|
+
n.value[u] = r;
|
|
1903
1912
|
});
|
|
1904
1913
|
});
|
|
1905
|
-
const
|
|
1914
|
+
const v = () => {
|
|
1906
1915
|
i.value = !i.value;
|
|
1907
|
-
},
|
|
1908
|
-
o("update:modelValue",
|
|
1909
|
-
}, g = (
|
|
1910
|
-
var
|
|
1911
|
-
return (((
|
|
1916
|
+
}, c = (l) => {
|
|
1917
|
+
o("update:modelValue", l);
|
|
1918
|
+
}, g = (l) => `filter-${l}`, h = (l) => {
|
|
1919
|
+
var r, u;
|
|
1920
|
+
return (((u = (r = t.config.schema) == null ? void 0 : r[l]) == null ? void 0 : u.values) ?? []).map((m) => ({
|
|
1912
1921
|
value: m,
|
|
1913
1922
|
label: m
|
|
1914
1923
|
}));
|
|
1915
|
-
},
|
|
1916
|
-
var
|
|
1917
|
-
return ((
|
|
1918
|
-
},
|
|
1924
|
+
}, F = (l) => {
|
|
1925
|
+
var r, u;
|
|
1926
|
+
return ((u = (r = t.config.schema) == null ? void 0 : r[l]) == null ? void 0 : u.type) ?? "text";
|
|
1927
|
+
}, C = (l) => {
|
|
1919
1928
|
n.value = {
|
|
1920
1929
|
...n.value,
|
|
1921
|
-
[
|
|
1930
|
+
[l]: ""
|
|
1922
1931
|
}, x();
|
|
1923
|
-
},
|
|
1932
|
+
}, A = () => {
|
|
1924
1933
|
n.value = {}, x(!0);
|
|
1925
|
-
}, x = (
|
|
1926
|
-
const
|
|
1927
|
-
|
|
1934
|
+
}, x = (l = !1) => {
|
|
1935
|
+
const r = Object.keys(n.value).reduce((u, m) => (n.value[m] && (u[m] = `${n.value[m]}`), u), {});
|
|
1936
|
+
l && (i.value = !1), o("update:modelValue", new URLSearchParams(r).toString());
|
|
1928
1937
|
};
|
|
1929
|
-
return (
|
|
1930
|
-
const
|
|
1931
|
-
return e.config.isExactMatch ? (d(), L(
|
|
1938
|
+
return (l, r) => {
|
|
1939
|
+
const u = T("KInput"), m = T("KButton"), B = T("KSelect"), p = T("KMenuItem"), S = T("KMenu");
|
|
1940
|
+
return e.config.isExactMatch ? (d(), L(u, {
|
|
1932
1941
|
key: 0,
|
|
1933
1942
|
autocomplete: "off",
|
|
1934
1943
|
class: "kong-ui-entity-filter-input",
|
|
1935
1944
|
"data-testid": "search-input",
|
|
1936
1945
|
"model-value": e.modelValue,
|
|
1937
1946
|
placeholder: e.config.placeholder,
|
|
1938
|
-
"onUpdate:modelValue":
|
|
1947
|
+
"onUpdate:modelValue": c
|
|
1939
1948
|
}, {
|
|
1940
|
-
icon:
|
|
1941
|
-
|
|
1949
|
+
icon: s(() => [
|
|
1950
|
+
w(Aa)
|
|
1942
1951
|
]),
|
|
1943
1952
|
_: 1
|
|
1944
|
-
}, 8, ["model-value", "placeholder"])) : (d(), K("div",
|
|
1945
|
-
|
|
1953
|
+
}, 8, ["model-value", "placeholder"])) : (d(), K("div", Ua, [
|
|
1954
|
+
w(m, {
|
|
1946
1955
|
appearance: "btn-link",
|
|
1947
1956
|
"data-testid": "filter-button",
|
|
1948
1957
|
icon: "filter",
|
|
1949
|
-
onClick:
|
|
1958
|
+
onClick: v
|
|
1950
1959
|
}, {
|
|
1951
|
-
default:
|
|
1952
|
-
D(q(
|
|
1960
|
+
default: s(() => [
|
|
1961
|
+
D(q(y(a)("filter.filterButtonText")) + " " + q(f.value.length > 0 ? `(${f.value.length})` : ""), 1)
|
|
1953
1962
|
]),
|
|
1954
1963
|
_: 1
|
|
1955
1964
|
}),
|
|
1956
|
-
pe(
|
|
1965
|
+
pe(j("div", {
|
|
1957
1966
|
class: "kong-ui-entity-filter-backdrop",
|
|
1958
|
-
onClick:
|
|
1967
|
+
onClick: v
|
|
1959
1968
|
}, null, 512), [
|
|
1960
1969
|
[ye, i.value]
|
|
1961
1970
|
]),
|
|
1962
|
-
pe(
|
|
1963
|
-
body:
|
|
1964
|
-
(d(!0), K(oe, null, ee(
|
|
1971
|
+
pe(w(S, { class: "kong-ui-entity-filter-menu" }, {
|
|
1972
|
+
body: s(() => [
|
|
1973
|
+
(d(!0), K(oe, null, ee(k.value, (b, U) => (d(), L(p, {
|
|
1965
1974
|
key: b.value,
|
|
1966
1975
|
"data-testid": b.value,
|
|
1967
1976
|
expandable: "",
|
|
1968
|
-
"last-menu-item":
|
|
1977
|
+
"last-menu-item": U === k.value.length - 1
|
|
1969
1978
|
}, {
|
|
1970
|
-
itemTitle:
|
|
1971
|
-
|
|
1979
|
+
itemTitle: s(() => [
|
|
1980
|
+
j("span", Ra, [
|
|
1972
1981
|
D(q(b.label) + " ", 1),
|
|
1973
|
-
pe(
|
|
1974
|
-
[ye,
|
|
1982
|
+
pe(j("span", ja, null, 512), [
|
|
1983
|
+
[ye, f.value.includes(b.value)]
|
|
1975
1984
|
])
|
|
1976
1985
|
])
|
|
1977
1986
|
]),
|
|
1978
|
-
itemBody:
|
|
1987
|
+
itemBody: s(() => {
|
|
1979
1988
|
var V, I;
|
|
1980
1989
|
return [
|
|
1981
|
-
|
|
1982
|
-
|
|
1990
|
+
j("div", Oa, [
|
|
1991
|
+
j("label", {
|
|
1983
1992
|
class: "menu-item-label",
|
|
1984
1993
|
for: g(b.value)
|
|
1985
|
-
}, q(
|
|
1986
|
-
((I = (V = e.config.schema) == null ? void 0 : V[b.value]) == null ? void 0 : I.type) === "select" ? (d(), L(
|
|
1994
|
+
}, q(y(a)("filter.fieldLabel")), 9, La),
|
|
1995
|
+
((I = (V = e.config.schema) == null ? void 0 : V[b.value]) == null ? void 0 : I.type) === "select" ? (d(), L(B, {
|
|
1987
1996
|
key: 0,
|
|
1988
1997
|
id: g(b.value),
|
|
1989
1998
|
modelValue: n.value[b.value],
|
|
1990
1999
|
"onUpdate:modelValue": (M) => n.value[b.value] = M,
|
|
1991
2000
|
appearance: "select",
|
|
1992
|
-
items:
|
|
1993
|
-
placeholder:
|
|
1994
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (d(), L(
|
|
2001
|
+
items: h(b.value),
|
|
2002
|
+
placeholder: y(a)("filter.selectPlaceholder")
|
|
2003
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (d(), L(u, {
|
|
1995
2004
|
key: 1,
|
|
1996
2005
|
id: g(b.value),
|
|
1997
2006
|
modelValue: n.value[b.value],
|
|
1998
2007
|
"onUpdate:modelValue": (M) => n.value[b.value] = M,
|
|
1999
2008
|
autocomplete: "off",
|
|
2000
|
-
placeholder:
|
|
2009
|
+
placeholder: y(a)("filter.inputPlaceholder"),
|
|
2001
2010
|
size: "small",
|
|
2002
|
-
type:
|
|
2011
|
+
type: F(b.value)
|
|
2003
2012
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
2004
2013
|
]),
|
|
2005
|
-
|
|
2006
|
-
|
|
2014
|
+
j("div", Va, [
|
|
2015
|
+
w(m, {
|
|
2007
2016
|
appearance: "btn-link",
|
|
2008
2017
|
"data-testid": "apply-filter",
|
|
2009
2018
|
size: "small",
|
|
2010
|
-
onClick:
|
|
2019
|
+
onClick: r[0] || (r[0] = (M) => x(!0))
|
|
2011
2020
|
}, {
|
|
2012
|
-
default:
|
|
2013
|
-
D(q(
|
|
2021
|
+
default: s(() => [
|
|
2022
|
+
D(q(y(a)("filter.applyButtonText")), 1)
|
|
2014
2023
|
]),
|
|
2015
2024
|
_: 1
|
|
2016
2025
|
}),
|
|
2017
|
-
|
|
2026
|
+
w(m, {
|
|
2018
2027
|
appearance: "btn-link",
|
|
2019
2028
|
"data-testid": "clear-filter",
|
|
2020
2029
|
size: "small",
|
|
2021
|
-
onClick: (M) =>
|
|
2030
|
+
onClick: (M) => C(b.value)
|
|
2022
2031
|
}, {
|
|
2023
|
-
default:
|
|
2024
|
-
D(q(
|
|
2032
|
+
default: s(() => [
|
|
2033
|
+
D(q(y(a)("filter.clearButtonText")), 1)
|
|
2025
2034
|
]),
|
|
2026
2035
|
_: 2
|
|
2027
2036
|
}, 1032, ["onClick"])
|
|
@@ -2031,10 +2040,10 @@ const X = {
|
|
|
2031
2040
|
_: 2
|
|
2032
2041
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
2033
2042
|
]),
|
|
2034
|
-
actionButton:
|
|
2035
|
-
|
|
2036
|
-
default:
|
|
2037
|
-
D(q(
|
|
2043
|
+
actionButton: s(() => [
|
|
2044
|
+
w(m, { onClick: A }, {
|
|
2045
|
+
default: s(() => [
|
|
2046
|
+
D(q(y(a)("filter.clearAllButtonText")), 1)
|
|
2038
2047
|
]),
|
|
2039
2048
|
_: 1
|
|
2040
2049
|
})
|
|
@@ -2046,7 +2055,7 @@ const X = {
|
|
|
2046
2055
|
]));
|
|
2047
2056
|
};
|
|
2048
2057
|
}
|
|
2049
|
-
}),
|
|
2058
|
+
}), Da = /* @__PURE__ */ te(Na, [["__scopeId", "data-v-745f38c0"]]), ue = /* @__PURE__ */ W({
|
|
2050
2059
|
__name: "PermissionsWrapper",
|
|
2051
2060
|
props: {
|
|
2052
2061
|
/**
|
|
@@ -2068,7 +2077,7 @@ const X = {
|
|
|
2068
2077
|
}
|
|
2069
2078
|
},
|
|
2070
2079
|
setup(e) {
|
|
2071
|
-
const o = e, t =
|
|
2080
|
+
const o = e, t = P(void 0), a = _(() => t.value === !0 || t.value !== void 0 && o.forceShow === !0);
|
|
2072
2081
|
return se(() => o.authFunction, async () => {
|
|
2073
2082
|
t.value = await o.authFunction();
|
|
2074
2083
|
}, { immediate: !0 }), (i, n) => a.value ? J(i.$slots, "default", {
|
|
@@ -2076,16 +2085,16 @@ const X = {
|
|
|
2076
2085
|
isAllowed: t.value
|
|
2077
2086
|
}) : G("", !0);
|
|
2078
2087
|
}
|
|
2079
|
-
}),
|
|
2088
|
+
}), Ha = { class: "form-section-wrapper" }, Ja = {
|
|
2080
2089
|
key: 0,
|
|
2081
2090
|
class: "form-section-title"
|
|
2082
|
-
},
|
|
2091
|
+
}, za = {
|
|
2083
2092
|
key: 1,
|
|
2084
2093
|
class: "form-section-description"
|
|
2085
|
-
},
|
|
2094
|
+
}, Wa = {
|
|
2086
2095
|
key: 2,
|
|
2087
2096
|
class: "form-section-footer"
|
|
2088
|
-
},
|
|
2097
|
+
}, Ga = { class: "form-section-content" }, Xa = /* @__PURE__ */ W({
|
|
2089
2098
|
__name: "EntityFormSection",
|
|
2090
2099
|
props: {
|
|
2091
2100
|
title: {
|
|
@@ -2110,33 +2119,33 @@ const X = {
|
|
|
2110
2119
|
}
|
|
2111
2120
|
},
|
|
2112
2121
|
setup(e) {
|
|
2113
|
-
const o =
|
|
2122
|
+
const o = Se();
|
|
2114
2123
|
return (t, a) => (d(), K("fieldset", {
|
|
2115
|
-
class:
|
|
2124
|
+
class: le(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
2116
2125
|
}, [
|
|
2117
|
-
|
|
2126
|
+
j("div", Ha, [
|
|
2118
2127
|
e.hideInfoHeader ? G("", !0) : (d(), K("div", {
|
|
2119
2128
|
key: 0,
|
|
2120
|
-
class:
|
|
2129
|
+
class: le(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
2121
2130
|
}, [
|
|
2122
|
-
e.title ? (d(), K("h4",
|
|
2123
|
-
e.description ||
|
|
2131
|
+
e.title ? (d(), K("h4", Ja, q(e.title), 1)) : G("", !0),
|
|
2132
|
+
e.description || y(o).description ? (d(), K("div", za, [
|
|
2124
2133
|
J(t.$slots, "description", {}, () => [
|
|
2125
|
-
|
|
2134
|
+
j("p", null, q(e.description), 1)
|
|
2126
2135
|
], !0)
|
|
2127
2136
|
])) : G("", !0),
|
|
2128
|
-
|
|
2137
|
+
y(o).footer ? (d(), K("div", Wa, [
|
|
2129
2138
|
J(t.$slots, "footer", {}, void 0, !0)
|
|
2130
2139
|
])) : G("", !0)
|
|
2131
2140
|
], 2)),
|
|
2132
|
-
|
|
2141
|
+
j("div", Ga, [
|
|
2133
2142
|
J(t.$slots, "default", {}, void 0, !0)
|
|
2134
2143
|
])
|
|
2135
2144
|
])
|
|
2136
2145
|
], 2));
|
|
2137
2146
|
}
|
|
2138
|
-
}),
|
|
2139
|
-
const
|
|
2147
|
+
}), Ya = /* @__PURE__ */ te(Xa, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: ze, useDeleteUrlBuilder: Za, useErrors: Qa, useFetchUrlBuilder: yo, useFetcher: eo, useDebouncedFilter: fo, useStringHelpers: mo, useGatewayFeatureSupported: go } = X;
|
|
2148
|
+
const to = { class: "kong-ui-entities-key-sets-list" }, ao = { key: 1 }, oo = /* @__PURE__ */ W({
|
|
2140
2149
|
__name: "KeySetList",
|
|
2141
2150
|
props: {
|
|
2142
2151
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2177,44 +2186,44 @@ const ao = { class: "kong-ui-entities-key-sets-list" }, oo = { key: 1 }, no = /*
|
|
|
2177
2186
|
},
|
|
2178
2187
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
2179
2188
|
setup(e, { emit: o }) {
|
|
2180
|
-
var
|
|
2181
|
-
const t = e, { i18n: { t: a } } =
|
|
2182
|
-
headers: (
|
|
2183
|
-
}),
|
|
2189
|
+
var Te;
|
|
2190
|
+
const t = e, { i18n: { t: a } } = $e.useI18n(), i = we(), { axiosInstance: n } = ze({
|
|
2191
|
+
headers: (Te = t.config) == null ? void 0 : Te.requestHeaders
|
|
2192
|
+
}), f = P(1), k = _(() => t.config.app !== "kongManager" || !!t.config.disableSorting), v = {
|
|
2184
2193
|
name: { label: a("keySets.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
2185
2194
|
tags: { label: a("keySets.list.table_headers.tags") },
|
|
2186
2195
|
id: { label: a("keySets.list.table_headers.id"), sortable: !0 }
|
|
2187
|
-
},
|
|
2188
|
-
var
|
|
2189
|
-
let $ = `${t.config.apiBaseUrl}${
|
|
2190
|
-
return t.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((
|
|
2191
|
-
}),
|
|
2196
|
+
}, c = v, g = _(() => {
|
|
2197
|
+
var O, z;
|
|
2198
|
+
let $ = `${t.config.apiBaseUrl}${ge.list[t.config.app]}`;
|
|
2199
|
+
return t.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((O = t.config) == null ? void 0 : O.controlPlaneId) || "") : t.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (z = t.config) != null && z.workspace ? `/${t.config.workspace}` : "")), $;
|
|
2200
|
+
}), h = P(""), F = _(() => {
|
|
2192
2201
|
const $ = t.config.app === "konnect" || t.config.isExactMatch;
|
|
2193
2202
|
if ($)
|
|
2194
2203
|
return {
|
|
2195
2204
|
isExactMatch: $,
|
|
2196
2205
|
placeholder: a("keySets.search.placeholder")
|
|
2197
2206
|
};
|
|
2198
|
-
const
|
|
2207
|
+
const O = { name: v.name };
|
|
2199
2208
|
return {
|
|
2200
2209
|
isExactMatch: $,
|
|
2201
|
-
fields:
|
|
2210
|
+
fields: O,
|
|
2202
2211
|
schema: t.config.filterSchema
|
|
2203
2212
|
};
|
|
2204
|
-
}), { fetcher:
|
|
2205
|
-
|
|
2206
|
-
},
|
|
2207
|
-
|
|
2208
|
-
},
|
|
2213
|
+
}), { fetcher: C, fetcherState: A } = eo(t.config, g.value), x = () => {
|
|
2214
|
+
h.value = "";
|
|
2215
|
+
}, l = () => {
|
|
2216
|
+
f.value++;
|
|
2217
|
+
}, r = P(""), u = ($, O) => {
|
|
2209
2218
|
const z = $.id;
|
|
2210
|
-
if (!
|
|
2211
|
-
|
|
2219
|
+
if (!O(z)) {
|
|
2220
|
+
S($, "id");
|
|
2212
2221
|
return;
|
|
2213
2222
|
}
|
|
2214
2223
|
p($, "id");
|
|
2215
|
-
}, m = ($,
|
|
2224
|
+
}, m = ($, O) => {
|
|
2216
2225
|
const z = JSON.stringify($);
|
|
2217
|
-
if (!
|
|
2226
|
+
if (!O(z)) {
|
|
2218
2227
|
o("copy:error", {
|
|
2219
2228
|
entity: $,
|
|
2220
2229
|
message: a("keySets.errors.copy")
|
|
@@ -2225,102 +2234,102 @@ const ao = { class: "kong-ui-entities-key-sets-list" }, oo = { key: 1 }, no = /*
|
|
|
2225
2234
|
entity: $,
|
|
2226
2235
|
message: a("keySets.copy.success_brief")
|
|
2227
2236
|
});
|
|
2228
|
-
},
|
|
2237
|
+
}, B = ($, O, z) => {
|
|
2229
2238
|
const { type: ie } = $;
|
|
2230
|
-
ie === "success" ? p(
|
|
2231
|
-
}, p = ($,
|
|
2239
|
+
ie === "success" ? p(O, z) : S(O, z);
|
|
2240
|
+
}, p = ($, O) => {
|
|
2232
2241
|
o("copy:success", {
|
|
2233
2242
|
entity: $,
|
|
2234
|
-
field:
|
|
2235
|
-
message: a("keySets.copy.success", { val: $[
|
|
2243
|
+
field: O,
|
|
2244
|
+
message: a("keySets.copy.success", { val: $[O] })
|
|
2236
2245
|
});
|
|
2237
|
-
},
|
|
2246
|
+
}, S = ($, O) => {
|
|
2238
2247
|
o("copy:error", {
|
|
2239
2248
|
entity: $,
|
|
2240
|
-
field:
|
|
2249
|
+
field: O,
|
|
2241
2250
|
message: a("keySets.errors.copy")
|
|
2242
2251
|
});
|
|
2243
2252
|
}, b = async ($) => {
|
|
2244
2253
|
var z;
|
|
2245
2254
|
await ((z = t.canRetrieve) == null ? void 0 : z.call(t, $)) && i.push(t.config.getViewRoute($.id));
|
|
2246
|
-
},
|
|
2255
|
+
}, U = ($) => ({
|
|
2247
2256
|
label: a("keySets.actions.view"),
|
|
2248
2257
|
to: t.config.getViewRoute($)
|
|
2249
2258
|
}), V = ($) => ({
|
|
2250
2259
|
label: a("keySets.actions.edit"),
|
|
2251
2260
|
to: t.config.getEditRoute($)
|
|
2252
|
-
}), I =
|
|
2261
|
+
}), I = P(void 0), M = P(!1), E = P(!1), R = P(""), Y = Za(t.config, g.value), ne = ($) => {
|
|
2253
2262
|
I.value = $, M.value = !0;
|
|
2254
2263
|
}, Q = () => {
|
|
2255
2264
|
M.value = !1;
|
|
2256
2265
|
}, Ge = async () => {
|
|
2257
|
-
var $,
|
|
2266
|
+
var $, O, z;
|
|
2258
2267
|
if (($ = I.value) != null && $.id) {
|
|
2259
|
-
|
|
2268
|
+
E.value = !0;
|
|
2260
2269
|
try {
|
|
2261
|
-
await n.delete(Y(I.value.id)),
|
|
2270
|
+
await n.delete(Y(I.value.id)), E.value = !1, M.value = !1, f.value++, o("delete:success", I.value);
|
|
2262
2271
|
} catch (ie) {
|
|
2263
|
-
|
|
2272
|
+
R.value = ((z = (O = ie.response) == null ? void 0 : O.data) == null ? void 0 : z.message) || ie.message || a("keySets.errors.delete"), o("error", ie);
|
|
2264
2273
|
} finally {
|
|
2265
|
-
|
|
2274
|
+
E.value = !1;
|
|
2266
2275
|
}
|
|
2267
2276
|
}
|
|
2268
2277
|
};
|
|
2269
|
-
se(
|
|
2270
|
-
if ($.status ===
|
|
2271
|
-
|
|
2278
|
+
se(A, ($) => {
|
|
2279
|
+
if ($.status === re.Error) {
|
|
2280
|
+
r.value = a("keySets.errors.general"), o("error", $.error);
|
|
2272
2281
|
return;
|
|
2273
2282
|
}
|
|
2274
|
-
|
|
2283
|
+
r.value = "";
|
|
2275
2284
|
});
|
|
2276
|
-
const
|
|
2285
|
+
const ve = P({
|
|
2277
2286
|
ctaPath: t.config.createRoute,
|
|
2278
2287
|
ctaText: void 0,
|
|
2279
2288
|
message: a("keySets.list.empty_state.description"),
|
|
2280
2289
|
title: a("keySets.title")
|
|
2281
2290
|
});
|
|
2282
|
-
return
|
|
2283
|
-
await t.canCreate() && (
|
|
2284
|
-
}), ($,
|
|
2285
|
-
const z =
|
|
2286
|
-
return d(), K("div",
|
|
2287
|
-
|
|
2291
|
+
return _e(async () => {
|
|
2292
|
+
await t.canCreate() && (ve.value.title = a("keySets.list.empty_state.title"), ve.value.ctaText = a("keySets.actions.create"));
|
|
2293
|
+
}), ($, O) => {
|
|
2294
|
+
const z = T("KButton"), ie = T("KBadge"), Xe = T("KTruncate"), Ye = T("CopyUuid"), de = T("KDropdownItem"), Be = T("KClipboardProvider");
|
|
2295
|
+
return d(), K("div", to, [
|
|
2296
|
+
w(y($a), {
|
|
2288
2297
|
"cache-identifier": e.cacheIdentifier,
|
|
2289
2298
|
"disable-pagination-page-jump": "",
|
|
2290
|
-
"disable-sorting":
|
|
2291
|
-
"empty-state-options":
|
|
2299
|
+
"disable-sorting": k.value,
|
|
2300
|
+
"empty-state-options": ve.value,
|
|
2292
2301
|
"enable-entity-actions": "",
|
|
2293
|
-
"error-message":
|
|
2294
|
-
fetcher:
|
|
2295
|
-
"fetcher-cache-key":
|
|
2302
|
+
"error-message": r.value,
|
|
2303
|
+
fetcher: y(C),
|
|
2304
|
+
"fetcher-cache-key": f.value,
|
|
2296
2305
|
"pagination-type": "offset",
|
|
2297
2306
|
"preferences-storage-key": "kong-ui-entities-key-sets-list",
|
|
2298
|
-
query:
|
|
2299
|
-
"table-headers":
|
|
2307
|
+
query: h.value,
|
|
2308
|
+
"table-headers": y(c),
|
|
2300
2309
|
onClearSearchInput: x,
|
|
2301
|
-
"onClick:row":
|
|
2302
|
-
onSort:
|
|
2310
|
+
"onClick:row": O[2] || (O[2] = (H) => b(H)),
|
|
2311
|
+
onSort: l
|
|
2303
2312
|
}, {
|
|
2304
|
-
"toolbar-filter":
|
|
2305
|
-
|
|
2306
|
-
modelValue:
|
|
2307
|
-
"onUpdate:modelValue":
|
|
2308
|
-
config:
|
|
2313
|
+
"toolbar-filter": s(() => [
|
|
2314
|
+
w(y(Da), {
|
|
2315
|
+
modelValue: h.value,
|
|
2316
|
+
"onUpdate:modelValue": O[0] || (O[0] = (H) => h.value = H),
|
|
2317
|
+
config: F.value
|
|
2309
2318
|
}, null, 8, ["modelValue", "config"])
|
|
2310
2319
|
]),
|
|
2311
|
-
"toolbar-button":
|
|
2312
|
-
|
|
2320
|
+
"toolbar-button": s(() => [
|
|
2321
|
+
w(y(ue), {
|
|
2313
2322
|
"auth-function": () => e.canCreate()
|
|
2314
2323
|
}, {
|
|
2315
|
-
default:
|
|
2316
|
-
|
|
2324
|
+
default: s(() => [
|
|
2325
|
+
w(z, {
|
|
2317
2326
|
appearance: "primary",
|
|
2318
2327
|
"data-testid": "toolbar-add-key-set",
|
|
2319
2328
|
icon: "plus",
|
|
2320
2329
|
to: e.config.createRoute
|
|
2321
2330
|
}, {
|
|
2322
|
-
default:
|
|
2323
|
-
D(q(
|
|
2331
|
+
default: s(() => [
|
|
2332
|
+
D(q(y(a)("keySets.list.toolbar_actions.new_key_set")), 1)
|
|
2324
2333
|
]),
|
|
2325
2334
|
_: 1
|
|
2326
2335
|
}, 8, ["to"])
|
|
@@ -2328,97 +2337,97 @@ const ao = { class: "kong-ui-entities-key-sets-list" }, oo = { key: 1 }, no = /*
|
|
|
2328
2337
|
_: 1
|
|
2329
2338
|
}, 8, ["auth-function"])
|
|
2330
2339
|
]),
|
|
2331
|
-
name:
|
|
2332
|
-
|
|
2340
|
+
name: s(({ rowValue: H }) => [
|
|
2341
|
+
j("b", null, q(H ?? "-"), 1)
|
|
2333
2342
|
]),
|
|
2334
|
-
tags:
|
|
2343
|
+
tags: s(({ rowValue: H }) => [
|
|
2335
2344
|
(H == null ? void 0 : H.length) > 0 ? (d(), L(Xe, { key: 0 }, {
|
|
2336
|
-
default:
|
|
2345
|
+
default: s(() => [
|
|
2337
2346
|
(d(!0), K(oe, null, ee(H, (ae) => (d(), L(ie, {
|
|
2338
2347
|
key: ae,
|
|
2339
|
-
onClick:
|
|
2348
|
+
onClick: O[1] || (O[1] = fe(() => {
|
|
2340
2349
|
}, ["stop"]))
|
|
2341
2350
|
}, {
|
|
2342
|
-
default:
|
|
2351
|
+
default: s(() => [
|
|
2343
2352
|
D(q(ae), 1)
|
|
2344
2353
|
]),
|
|
2345
2354
|
_: 2
|
|
2346
2355
|
}, 1024))), 128))
|
|
2347
2356
|
]),
|
|
2348
2357
|
_: 2
|
|
2349
|
-
}, 1024)) : (d(), K("span",
|
|
2358
|
+
}, 1024)) : (d(), K("span", ao, "-"))
|
|
2350
2359
|
]),
|
|
2351
|
-
id:
|
|
2352
|
-
|
|
2353
|
-
notify: (
|
|
2360
|
+
id: s(({ row: H, rowValue: ae }) => [
|
|
2361
|
+
w(Ye, {
|
|
2362
|
+
notify: (he) => B(he, H, "id"),
|
|
2354
2363
|
truncated: !1,
|
|
2355
2364
|
uuid: ae
|
|
2356
2365
|
}, null, 8, ["notify", "uuid"])
|
|
2357
2366
|
]),
|
|
2358
|
-
actions:
|
|
2359
|
-
|
|
2360
|
-
default:
|
|
2361
|
-
|
|
2367
|
+
actions: s(({ row: H }) => [
|
|
2368
|
+
w(Be, null, {
|
|
2369
|
+
default: s(({ copyToClipboard: ae }) => [
|
|
2370
|
+
w(de, {
|
|
2362
2371
|
"data-testid": "action-entity-copy-id",
|
|
2363
|
-
onClick: (
|
|
2372
|
+
onClick: (he) => u(H, ae)
|
|
2364
2373
|
}, {
|
|
2365
|
-
default:
|
|
2366
|
-
D(q(
|
|
2374
|
+
default: s(() => [
|
|
2375
|
+
D(q(y(a)("keySets.actions.copy_id")), 1)
|
|
2367
2376
|
]),
|
|
2368
2377
|
_: 2
|
|
2369
2378
|
}, 1032, ["onClick"])
|
|
2370
2379
|
]),
|
|
2371
2380
|
_: 2
|
|
2372
2381
|
}, 1024),
|
|
2373
|
-
|
|
2374
|
-
default:
|
|
2375
|
-
|
|
2382
|
+
w(Be, null, {
|
|
2383
|
+
default: s(({ copyToClipboard: ae }) => [
|
|
2384
|
+
w(de, {
|
|
2376
2385
|
"data-testid": "action-entity-copy-json",
|
|
2377
|
-
onClick: (
|
|
2386
|
+
onClick: (he) => m(H, ae)
|
|
2378
2387
|
}, {
|
|
2379
|
-
default:
|
|
2380
|
-
D(q(
|
|
2388
|
+
default: s(() => [
|
|
2389
|
+
D(q(y(a)("keySets.actions.copy_json")), 1)
|
|
2381
2390
|
]),
|
|
2382
2391
|
_: 2
|
|
2383
2392
|
}, 1032, ["onClick"])
|
|
2384
2393
|
]),
|
|
2385
2394
|
_: 2
|
|
2386
2395
|
}, 1024),
|
|
2387
|
-
|
|
2396
|
+
w(y(ue), {
|
|
2388
2397
|
"auth-function": () => e.canRetrieve(H)
|
|
2389
2398
|
}, {
|
|
2390
|
-
default:
|
|
2391
|
-
|
|
2399
|
+
default: s(() => [
|
|
2400
|
+
w(de, {
|
|
2392
2401
|
"data-testid": "action-entity-view",
|
|
2393
2402
|
"has-divider": "",
|
|
2394
|
-
item:
|
|
2403
|
+
item: U(H.id)
|
|
2395
2404
|
}, null, 8, ["item"])
|
|
2396
2405
|
]),
|
|
2397
2406
|
_: 2
|
|
2398
2407
|
}, 1032, ["auth-function"]),
|
|
2399
|
-
|
|
2408
|
+
w(y(ue), {
|
|
2400
2409
|
"auth-function": () => e.canEdit(H)
|
|
2401
2410
|
}, {
|
|
2402
|
-
default:
|
|
2403
|
-
|
|
2411
|
+
default: s(() => [
|
|
2412
|
+
w(de, {
|
|
2404
2413
|
"data-testid": "action-entity-edit",
|
|
2405
2414
|
item: V(H.id)
|
|
2406
2415
|
}, null, 8, ["item"])
|
|
2407
2416
|
]),
|
|
2408
2417
|
_: 2
|
|
2409
2418
|
}, 1032, ["auth-function"]),
|
|
2410
|
-
|
|
2419
|
+
w(y(ue), {
|
|
2411
2420
|
"auth-function": () => e.canDelete(H)
|
|
2412
2421
|
}, {
|
|
2413
|
-
default:
|
|
2414
|
-
|
|
2422
|
+
default: s(() => [
|
|
2423
|
+
w(de, {
|
|
2415
2424
|
"data-testid": "action-entity-delete",
|
|
2416
2425
|
"has-divider": "",
|
|
2417
2426
|
"is-dangerous": "",
|
|
2418
2427
|
onClick: (ae) => ne(H)
|
|
2419
2428
|
}, {
|
|
2420
|
-
default:
|
|
2421
|
-
D(q(
|
|
2429
|
+
default: s(() => [
|
|
2430
|
+
D(q(y(a)("keySets.actions.delete")), 1)
|
|
2422
2431
|
]),
|
|
2423
2432
|
_: 2
|
|
2424
2433
|
}, 1032, ["onClick"])
|
|
@@ -2428,13 +2437,13 @@ const ao = { class: "kong-ui-entities-key-sets-list" }, oo = { key: 1 }, no = /*
|
|
|
2428
2437
|
]),
|
|
2429
2438
|
_: 1
|
|
2430
2439
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
2431
|
-
|
|
2432
|
-
"action-pending":
|
|
2433
|
-
description:
|
|
2440
|
+
w(y(Ba), {
|
|
2441
|
+
"action-pending": E.value,
|
|
2442
|
+
description: y(a)("keySets.delete.description"),
|
|
2434
2443
|
"entity-name": I.value && (I.value.name || I.value.id),
|
|
2435
|
-
"entity-type":
|
|
2436
|
-
error:
|
|
2437
|
-
title:
|
|
2444
|
+
"entity-type": y(Oe).KeySet,
|
|
2445
|
+
error: R.value,
|
|
2446
|
+
title: y(a)("keySets.delete.title"),
|
|
2438
2447
|
visible: M.value,
|
|
2439
2448
|
onCancel: Q,
|
|
2440
2449
|
onProceed: Ge
|
|
@@ -2448,7 +2457,7 @@ const We = (e, o) => {
|
|
|
2448
2457
|
for (const [a, i] of o)
|
|
2449
2458
|
t[a] = i;
|
|
2450
2459
|
return t;
|
|
2451
|
-
},
|
|
2460
|
+
}, vo = /* @__PURE__ */ We(oo, [["__scopeId", "data-v-a16aa26a"]]), no = { class: "kong-ui-entities-key-sets-form" }, io = /* @__PURE__ */ W({
|
|
2452
2461
|
__name: "KeySetForm",
|
|
2453
2462
|
props: {
|
|
2454
2463
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2466,92 +2475,92 @@ const We = (e, o) => {
|
|
|
2466
2475
|
},
|
|
2467
2476
|
emits: ["update", "error", "loading"],
|
|
2468
2477
|
setup(e, { emit: o }) {
|
|
2469
|
-
var
|
|
2470
|
-
const t = e, a =
|
|
2471
|
-
headers: (
|
|
2472
|
-
}),
|
|
2478
|
+
var l;
|
|
2479
|
+
const t = e, a = we(), { i18n: { t: i } } = $e.useI18n(), { getMessageFromError: n } = Qa(), { axiosInstance: f } = ze({
|
|
2480
|
+
headers: (l = t.config) == null ? void 0 : l.requestHeaders
|
|
2481
|
+
}), k = _(() => ge.form[t.config.app].edit), v = _(() => t.keySetId ? Ce.Edit : Ce.Create), c = Me({
|
|
2473
2482
|
fields: {
|
|
2474
2483
|
name: "",
|
|
2475
2484
|
tags: ""
|
|
2476
2485
|
},
|
|
2477
2486
|
isReadonly: !1,
|
|
2478
2487
|
errorMessage: ""
|
|
2479
|
-
}), g =
|
|
2488
|
+
}), g = Me({
|
|
2480
2489
|
name: "",
|
|
2481
2490
|
tags: ""
|
|
2482
|
-
}),
|
|
2483
|
-
var
|
|
2484
|
-
|
|
2485
|
-
},
|
|
2491
|
+
}), h = _(() => JSON.stringify(c.fields) !== JSON.stringify(g) && !!c.fields.name), F = (r) => {
|
|
2492
|
+
var u;
|
|
2493
|
+
c.fields.name = (r == null ? void 0 : r.name) || "", c.fields.tags = ((u = r == null ? void 0 : r.tags) == null ? void 0 : u.join(", ")) || "", Object.assign(g, c.fields);
|
|
2494
|
+
}, C = () => {
|
|
2486
2495
|
a.push(t.config.cancelRoute);
|
|
2487
|
-
},
|
|
2488
|
-
var
|
|
2489
|
-
let
|
|
2490
|
-
return t.config.app === "konnect" ?
|
|
2496
|
+
}, A = _(() => {
|
|
2497
|
+
var u, m;
|
|
2498
|
+
let r = `${t.config.apiBaseUrl}${ge.form[t.config.app][v.value]}`;
|
|
2499
|
+
return t.config.app === "konnect" ? r = r.replace(/{controlPlaneId}/gi, ((u = t.config) == null ? void 0 : u.controlPlaneId) || "") : t.config.app === "kongManager" && (r = r.replace(/\/{workspace}/gi, (m = t.config) != null && m.workspace ? `/${t.config.workspace}` : "")), r = r.replace(/{id}/gi, t.keySetId), r;
|
|
2491
2500
|
}), x = async () => {
|
|
2492
|
-
var
|
|
2501
|
+
var r, u, m, B, p;
|
|
2493
2502
|
try {
|
|
2494
|
-
|
|
2495
|
-
const
|
|
2496
|
-
name:
|
|
2497
|
-
tags: ((m = (
|
|
2503
|
+
c.isReadonly = !0;
|
|
2504
|
+
const S = {
|
|
2505
|
+
name: c.fields.name,
|
|
2506
|
+
tags: ((m = (u = (r = c.fields.tags) == null ? void 0 : r.split(",")) == null ? void 0 : u.map((U) => String(U || "").trim())) == null ? void 0 : m.filter((U) => U !== "")) || ""
|
|
2498
2507
|
};
|
|
2499
2508
|
let b;
|
|
2500
|
-
if (
|
|
2501
|
-
const { data:
|
|
2502
|
-
|
|
2509
|
+
if (v.value === "create" ? b = await f.post(A.value, S) : v.value === "edit" && (b = ((B = t.config) == null ? void 0 : B.app) === "konnect" ? await f.put(A.value, S) : await f.patch(A.value, S)), b) {
|
|
2510
|
+
const { data: U } = b;
|
|
2511
|
+
c.fields.name = (U == null ? void 0 : U.name) || "", c.fields.tags = ((p = U == null ? void 0 : U.tags) == null ? void 0 : p.join(", ")) || "", Object.assign(g, c.fields), o("update", b == null ? void 0 : b.data);
|
|
2503
2512
|
}
|
|
2504
|
-
} catch (
|
|
2505
|
-
|
|
2513
|
+
} catch (S) {
|
|
2514
|
+
c.errorMessage = n(S), o("error", S);
|
|
2506
2515
|
} finally {
|
|
2507
|
-
|
|
2516
|
+
c.isReadonly = !1;
|
|
2508
2517
|
}
|
|
2509
2518
|
};
|
|
2510
|
-
return (
|
|
2511
|
-
const m =
|
|
2512
|
-
return d(), K("div",
|
|
2513
|
-
|
|
2514
|
-
"can-submit":
|
|
2519
|
+
return (r, u) => {
|
|
2520
|
+
const m = T("KInput");
|
|
2521
|
+
return d(), K("div", no, [
|
|
2522
|
+
w(y(ha), {
|
|
2523
|
+
"can-submit": h.value,
|
|
2515
2524
|
config: e.config,
|
|
2516
2525
|
"edit-id": e.keySetId,
|
|
2517
|
-
"error-message":
|
|
2518
|
-
"fetch-url":
|
|
2519
|
-
"is-readonly":
|
|
2520
|
-
onCancel:
|
|
2521
|
-
"onFetch:error":
|
|
2522
|
-
"onFetch:success":
|
|
2523
|
-
onLoading:
|
|
2526
|
+
"error-message": c.errorMessage,
|
|
2527
|
+
"fetch-url": k.value,
|
|
2528
|
+
"is-readonly": c.isReadonly,
|
|
2529
|
+
onCancel: C,
|
|
2530
|
+
"onFetch:error": u[2] || (u[2] = (B) => r.$emit("error", B)),
|
|
2531
|
+
"onFetch:success": F,
|
|
2532
|
+
onLoading: u[3] || (u[3] = (B) => r.$emit("loading", B)),
|
|
2524
2533
|
onSubmit: x
|
|
2525
2534
|
}, {
|
|
2526
|
-
default:
|
|
2527
|
-
|
|
2528
|
-
description:
|
|
2535
|
+
default: s(() => [
|
|
2536
|
+
w(y(Ya), {
|
|
2537
|
+
description: y(i)("keySets.form.sections.general.description"),
|
|
2529
2538
|
"has-divider": "",
|
|
2530
|
-
title:
|
|
2539
|
+
title: y(i)("keySets.form.sections.general.title")
|
|
2531
2540
|
}, {
|
|
2532
|
-
default:
|
|
2533
|
-
|
|
2534
|
-
modelValue:
|
|
2535
|
-
"onUpdate:modelValue":
|
|
2541
|
+
default: s(() => [
|
|
2542
|
+
w(m, {
|
|
2543
|
+
modelValue: c.fields.name,
|
|
2544
|
+
"onUpdate:modelValue": u[0] || (u[0] = (B) => c.fields.name = B),
|
|
2536
2545
|
modelModifiers: { trim: !0 },
|
|
2537
2546
|
autocomplete: "off",
|
|
2538
2547
|
"data-testid": "key-set-form-name",
|
|
2539
|
-
label:
|
|
2540
|
-
placeholder:
|
|
2541
|
-
readonly:
|
|
2548
|
+
label: y(i)("keySets.form.fields.name.label"),
|
|
2549
|
+
placeholder: y(i)("keySets.form.fields.name.placeholder"),
|
|
2550
|
+
readonly: c.isReadonly,
|
|
2542
2551
|
type: "text"
|
|
2543
2552
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
2544
|
-
|
|
2545
|
-
modelValue:
|
|
2546
|
-
"onUpdate:modelValue":
|
|
2553
|
+
w(m, {
|
|
2554
|
+
modelValue: c.fields.tags,
|
|
2555
|
+
"onUpdate:modelValue": u[1] || (u[1] = (B) => c.fields.tags = B),
|
|
2547
2556
|
modelModifiers: { trim: !0 },
|
|
2548
2557
|
autocomplete: "off",
|
|
2549
2558
|
"data-testid": "key-set-form-tags",
|
|
2550
|
-
help:
|
|
2551
|
-
label:
|
|
2552
|
-
"label-attributes": { info:
|
|
2553
|
-
placeholder:
|
|
2554
|
-
readonly:
|
|
2559
|
+
help: y(i)("keySets.form.fields.tags.help"),
|
|
2560
|
+
label: y(i)("keySets.form.fields.tags.label"),
|
|
2561
|
+
"label-attributes": { info: y(i)("keySets.form.fields.tags.tooltip") },
|
|
2562
|
+
placeholder: y(i)("keySets.form.fields.tags.placeholder"),
|
|
2563
|
+
readonly: c.isReadonly,
|
|
2555
2564
|
type: "text"
|
|
2556
2565
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
2557
2566
|
]),
|
|
@@ -2564,7 +2573,7 @@ const We = (e, o) => {
|
|
|
2564
2573
|
};
|
|
2565
2574
|
}
|
|
2566
2575
|
});
|
|
2567
|
-
const
|
|
2576
|
+
const ho = /* @__PURE__ */ We(io, [["__scopeId", "data-v-29df09d7"]]), ro = { class: "kong-ui-entities-keys-entity-config-card" }, bo = /* @__PURE__ */ W({
|
|
2568
2577
|
__name: "KeySetConfigCard",
|
|
2569
2578
|
props: {
|
|
2570
2579
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2583,7 +2592,7 @@ const bo = /* @__PURE__ */ We(lo, [["__scopeId", "data-v-29df09d7"]]), ro = { cl
|
|
|
2583
2592
|
},
|
|
2584
2593
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
2585
2594
|
setup(e) {
|
|
2586
|
-
const o = e, { i18n: { t } } =
|
|
2595
|
+
const o = e, { i18n: { t } } = $e.useI18n(), a = _(() => ge.form[o.config.app].edit), i = P({
|
|
2587
2596
|
id: {},
|
|
2588
2597
|
name: {},
|
|
2589
2598
|
last_updated: {},
|
|
@@ -2592,22 +2601,22 @@ const bo = /* @__PURE__ */ We(lo, [["__scopeId", "data-v-29df09d7"]]), ro = { cl
|
|
|
2592
2601
|
tooltip: t("keySets.form.fields.tags.tooltip")
|
|
2593
2602
|
}
|
|
2594
2603
|
});
|
|
2595
|
-
return (n,
|
|
2596
|
-
|
|
2604
|
+
return (n, f) => (d(), K("div", ro, [
|
|
2605
|
+
w(y(fa), {
|
|
2597
2606
|
config: e.config,
|
|
2598
2607
|
"config-schema": i.value,
|
|
2599
2608
|
"fetch-url": a.value,
|
|
2600
2609
|
"hide-title": e.hideTitle,
|
|
2601
|
-
"onCopy:success":
|
|
2602
|
-
"onFetch:error":
|
|
2603
|
-
"onFetch:success":
|
|
2604
|
-
onLoading:
|
|
2610
|
+
"onCopy:success": f[0] || (f[0] = (k) => n.$emit("copy:success", k)),
|
|
2611
|
+
"onFetch:error": f[1] || (f[1] = (k) => n.$emit("fetch:error", k)),
|
|
2612
|
+
"onFetch:success": f[2] || (f[2] = (k) => n.$emit("fetch:success", k)),
|
|
2613
|
+
onLoading: f[3] || (f[3] = (k) => n.$emit("loading", k))
|
|
2605
2614
|
}, null, 8, ["config", "config-schema", "fetch-url", "hide-title"])
|
|
2606
2615
|
]));
|
|
2607
2616
|
}
|
|
2608
2617
|
});
|
|
2609
2618
|
export {
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2619
|
+
bo as KeySetConfigCard,
|
|
2620
|
+
ho as KeySetForm,
|
|
2621
|
+
vo as KeySetList
|
|
2613
2622
|
};
|