@kong-ui-public/entities-consumer-credentials 3.0.9 → 3.0.11
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ae, ref as w, computed as A, watch as le, renderSlot as
|
|
1
|
+
import { defineComponent as ae, ref as w, computed as A, watch as le, renderSlot as Z, createCommentVNode as J, unref as b, resolveComponent as L, openBlock as x, createBlock as z, withCtx as l, createVNode as v, createSlots as xe, withDirectives as Te, createElementVNode as G, createElementBlock as V, vShow as Ie, renderList as Ee, createTextVNode as B, toDisplayString as I, inject as ze, onMounted as Ve, onUnmounted as He, resolveDynamicComponent as Oe, normalizeStyle as We, pushScopeId as Je, popScopeId as Ye, onBeforeMount as Ze, Fragment as Ge, withModifiers as Qe } from "vue";
|
|
2
2
|
import { createI18n as je, i18nTComponent as Ke } from "@kong-ui-public/i18n";
|
|
3
3
|
import me from "axios";
|
|
4
4
|
import "@kong/kongponents";
|
|
@@ -163,7 +163,7 @@ const rt = {
|
|
|
163
163
|
kongManager: "/{workspace}/consumers/{consumerId}/{plugin}"
|
|
164
164
|
}
|
|
165
165
|
};
|
|
166
|
-
var $e = /* @__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))($e || {}),
|
|
166
|
+
var $e = /* @__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))($e || {}), X = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(X || {});
|
|
167
167
|
function nt() {
|
|
168
168
|
return {
|
|
169
169
|
getAxiosInstance: (e = {}) => {
|
|
@@ -364,7 +364,7 @@ function Fe() {
|
|
|
364
364
|
return !1;
|
|
365
365
|
const n = /* @__PURE__ */ new Set([...t, ...a]);
|
|
366
366
|
for (const o of n) {
|
|
367
|
-
const i = t.filter((
|
|
367
|
+
const i = t.filter((f) => f === o).length, s = a.filter((f) => f === o).length;
|
|
368
368
|
if (i !== s)
|
|
369
369
|
return !1;
|
|
370
370
|
}
|
|
@@ -407,74 +407,74 @@ function bt(e, r, t, a = {
|
|
|
407
407
|
searchKeys: ["id"]
|
|
408
408
|
}) {
|
|
409
409
|
t || (t = "1000");
|
|
410
|
-
const { axiosInstance: n } = pe(e.axiosRequestConfig), { i18n: { t: o } } = se(), { debounce: i } = it(), s = i(async (
|
|
411
|
-
await
|
|
412
|
-
}, 200),
|
|
413
|
-
let
|
|
414
|
-
e.app === "konnect" ?
|
|
415
|
-
const { isValidUuid:
|
|
410
|
+
const { axiosInstance: n } = pe(e.axiosRequestConfig), { i18n: { t: o } } = se(), { debounce: i } = it(), s = i(async (m) => {
|
|
411
|
+
await D(m);
|
|
412
|
+
}, 200), f = w(!1), d = w(""), y = w(""), u = w([]), k = w([]), h = w(void 0), F = b(r);
|
|
413
|
+
let N = `${e.apiBaseUrl}${F}`;
|
|
414
|
+
e.app === "konnect" ? N = N.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (N = N.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
415
|
+
const { isValidUuid: S } = Fe(), E = async () => {
|
|
416
416
|
try {
|
|
417
|
-
|
|
418
|
-
const { data:
|
|
419
|
-
|
|
417
|
+
f.value = !0;
|
|
418
|
+
const { data: m } = await n.get(`${N}?size=${t}`);
|
|
419
|
+
m != null && m.next || (h.value = a.fetchedItemsKey in m ? m[a.fetchedItemsKey] : []), k.value = a.fetchedItemsKey in m ? m[a.fetchedItemsKey] : [], u.value = k.value;
|
|
420
420
|
} catch {
|
|
421
|
-
u.value = [],
|
|
421
|
+
u.value = [], d.value = o("debouncedFilter.errors.fetch");
|
|
422
422
|
} finally {
|
|
423
|
-
|
|
423
|
+
f.value = !1;
|
|
424
424
|
}
|
|
425
|
-
},
|
|
426
|
-
var c,
|
|
427
|
-
if (
|
|
428
|
-
if (
|
|
425
|
+
}, U = w(""), D = async (m) => {
|
|
426
|
+
var c, C, H;
|
|
427
|
+
if (U.value !== m)
|
|
428
|
+
if (U.value = m || "", h.value === void 0)
|
|
429
429
|
try {
|
|
430
|
-
if (
|
|
431
|
-
let
|
|
432
|
-
|
|
433
|
-
const { data:
|
|
434
|
-
a.fetchedItemsKey in
|
|
435
|
-
} else if (
|
|
436
|
-
const
|
|
437
|
-
|
|
438
|
-
const { data:
|
|
439
|
-
return [
|
|
440
|
-
})()) :
|
|
441
|
-
...a.searchKeys.filter((
|
|
442
|
-
const { data:
|
|
443
|
-
return
|
|
430
|
+
if (f.value = !0, d.value = "", y.value = "", e.app === "konnect") {
|
|
431
|
+
let j = N + "";
|
|
432
|
+
m && (j += `/${m}`);
|
|
433
|
+
const { data: K } = await n.get(`${j}?size=${t}`);
|
|
434
|
+
a.fetchedItemsKey in K ? u.value = K[a.fetchedItemsKey] : K != null && K.id ? u.value = [K] : u.value = [];
|
|
435
|
+
} else if (m) {
|
|
436
|
+
const j = [];
|
|
437
|
+
S(m) && a.searchKeys.includes("id") ? j.push((async () => {
|
|
438
|
+
const { data: O } = await n.get(`${N}/${m}`);
|
|
439
|
+
return [O[a.fetchedItemsKey] ?? O];
|
|
440
|
+
})()) : j.push(
|
|
441
|
+
...a.searchKeys.filter((O) => O !== "id").map(async (O) => {
|
|
442
|
+
const { data: T } = await n.get(`${N}?${O}=${m}`);
|
|
443
|
+
return T[a.fetchedItemsKey];
|
|
444
444
|
})
|
|
445
445
|
);
|
|
446
|
-
const
|
|
447
|
-
u.value = [], (c =
|
|
448
|
-
var
|
|
449
|
-
(
|
|
450
|
-
|
|
446
|
+
const K = await Promise.all(j), W = /* @__PURE__ */ new Set();
|
|
447
|
+
u.value = [], (c = K == null ? void 0 : K.forEach) == null || c.call(K, (O) => {
|
|
448
|
+
var T;
|
|
449
|
+
(T = O == null ? void 0 : O.forEach) == null || T.call(O, (M) => {
|
|
450
|
+
W.has(M.id) || (W.add(M.id), u.value.push(M));
|
|
451
451
|
});
|
|
452
452
|
});
|
|
453
453
|
} else
|
|
454
|
-
u.value =
|
|
455
|
-
} catch (
|
|
456
|
-
((
|
|
454
|
+
u.value = k.value;
|
|
455
|
+
} catch (j) {
|
|
456
|
+
((C = j == null ? void 0 : j.response) == null ? void 0 : C.status) === 404 ? y.value = o("debouncedFilter.errors.invalid") : (u.value = [], d.value = o("debouncedFilter.errors.fetch"));
|
|
457
457
|
} finally {
|
|
458
|
-
|
|
458
|
+
f.value = !1;
|
|
459
459
|
}
|
|
460
460
|
else
|
|
461
|
-
|
|
462
|
-
var
|
|
463
|
-
let
|
|
464
|
-
for (const
|
|
465
|
-
const
|
|
466
|
-
|
|
461
|
+
f.value = !0, y.value = "", m ? (u.value = (H = h.value) == null ? void 0 : H.filter((j) => {
|
|
462
|
+
var K;
|
|
463
|
+
let W = !1;
|
|
464
|
+
for (const O of a.searchKeys) {
|
|
465
|
+
const T = typeof j[O] == "string" ? (K = j[O]) == null ? void 0 : K.toLowerCase() : j[O];
|
|
466
|
+
T != null && T.includes(m.toLowerCase()) && (W = !0);
|
|
467
467
|
}
|
|
468
|
-
return
|
|
469
|
-
}), (!u.value || !u.value.length) && (
|
|
468
|
+
return W;
|
|
469
|
+
}), (!u.value || !u.value.length) && (y.value = o("debouncedFilter.errors.invalid"))) : u.value = h.value, f.value = !1;
|
|
470
470
|
};
|
|
471
471
|
return {
|
|
472
|
-
loading:
|
|
473
|
-
error:
|
|
474
|
-
validationError:
|
|
472
|
+
loading: f,
|
|
473
|
+
error: d,
|
|
474
|
+
validationError: y,
|
|
475
475
|
results: u,
|
|
476
|
-
allRecords:
|
|
477
|
-
loadItems:
|
|
476
|
+
allRecords: h,
|
|
477
|
+
loadItems: E,
|
|
478
478
|
debouncedQueryChange: s
|
|
479
479
|
};
|
|
480
480
|
}
|
|
@@ -525,43 +525,43 @@ function Ct(e) {
|
|
|
525
525
|
return console.warn("Failed to build valid URL:", a), "";
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function Pe(e, r) {
|
|
529
529
|
const t = w(b(e)), a = w(b(r)), n = A(
|
|
530
530
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
531
531
|
), o = A(
|
|
532
532
|
() => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
|
|
533
533
|
);
|
|
534
534
|
return (i) => {
|
|
535
|
-
const { page: s, pageSize:
|
|
535
|
+
const { page: s, pageSize: f, offset: d, sortColumnKey: y, sortColumnOrder: u, query: k } = i;
|
|
536
536
|
try {
|
|
537
|
-
let
|
|
538
|
-
return n.value &&
|
|
539
|
-
|
|
540
|
-
}),
|
|
541
|
-
} catch (
|
|
542
|
-
return console.error("RouteList(fetcher)",
|
|
537
|
+
let h = new URL(o.value.href);
|
|
538
|
+
return n.value && k ? (h.search = "", h = t.value.isExactMatch ? new URL(`${h.href}/${k}/`) : new URL(`${h.href}?filter[name][contains]=${k}`)) : (n.value || new URLSearchParams(k).forEach((F, N) => {
|
|
539
|
+
h.searchParams.append(N, F);
|
|
540
|
+
}), y && h.searchParams.append("sort_by", y), u === "desc" && h.searchParams.append("sort_desc", "1"), h.searchParams.append("size", String(f))), d && s !== 1 && h.searchParams.append("offset", String(d)), h.href;
|
|
541
|
+
} catch (h) {
|
|
542
|
+
return console.error("RouteList(fetcher)", h), a.value;
|
|
543
543
|
}
|
|
544
544
|
};
|
|
545
545
|
}
|
|
546
546
|
function _t(e, r, t = "data") {
|
|
547
|
-
const a = b(r), { axiosInstance: n } = pe(e.axiosRequestConfig), o =
|
|
548
|
-
status:
|
|
547
|
+
const a = b(r), { axiosInstance: n } = pe(e.axiosRequestConfig), o = Pe(e, a), i = w({
|
|
548
|
+
status: X.Idle
|
|
549
549
|
});
|
|
550
550
|
return { fetcher: async (s) => {
|
|
551
|
-
var
|
|
551
|
+
var f;
|
|
552
552
|
try {
|
|
553
|
-
i.value = { status:
|
|
554
|
-
let
|
|
555
|
-
|
|
556
|
-
const
|
|
557
|
-
if (
|
|
558
|
-
throw
|
|
559
|
-
const u =
|
|
560
|
-
let
|
|
561
|
-
u[
|
|
562
|
-
const
|
|
563
|
-
data:
|
|
564
|
-
total:
|
|
553
|
+
i.value = { status: X.Loading };
|
|
554
|
+
let d = o(s);
|
|
555
|
+
d.includes("filter[name]") && (d = `${d}&page[size]=${s.pageSize}&page[number]=${s.page}`);
|
|
556
|
+
const y = await n.get(d);
|
|
557
|
+
if (y.status >= 400)
|
|
558
|
+
throw y;
|
|
559
|
+
const u = y.data, k = t && t.replace(/[^\w-_]/gi, "");
|
|
560
|
+
let h;
|
|
561
|
+
u[k] && Array.isArray(u[k]) ? h = u[k] : Array.isArray(u) ? h = u : h = Object.keys(u).length ? [u] : [];
|
|
562
|
+
const F = {
|
|
563
|
+
data: h,
|
|
564
|
+
total: h.length,
|
|
565
565
|
...u.offset ? {
|
|
566
566
|
pagination: {
|
|
567
567
|
offset: u.offset
|
|
@@ -569,23 +569,23 @@ function _t(e, r, t = "data") {
|
|
|
569
569
|
} : null
|
|
570
570
|
};
|
|
571
571
|
return i.value = {
|
|
572
|
-
status:
|
|
573
|
-
response:
|
|
574
|
-
},
|
|
575
|
-
} catch (
|
|
576
|
-
const
|
|
572
|
+
status: X.Idle,
|
|
573
|
+
response: F
|
|
574
|
+
}, F;
|
|
575
|
+
} catch (d) {
|
|
576
|
+
const y = {
|
|
577
577
|
data: [],
|
|
578
578
|
total: 0
|
|
579
579
|
};
|
|
580
|
-
return s.query && (((
|
|
581
|
-
status:
|
|
582
|
-
response:
|
|
583
|
-
error:
|
|
584
|
-
},
|
|
585
|
-
status:
|
|
586
|
-
response:
|
|
587
|
-
error:
|
|
588
|
-
},
|
|
580
|
+
return s.query && (((f = d.response) == null ? void 0 : f.status) === 404 || d.status === 404) ? (i.value = {
|
|
581
|
+
status: X.NoResults,
|
|
582
|
+
response: y,
|
|
583
|
+
error: d.response ? d : { response: d }
|
|
584
|
+
}, y) : (i.value = {
|
|
585
|
+
status: X.Error,
|
|
586
|
+
response: y,
|
|
587
|
+
error: d.response ? d : { response: d }
|
|
588
|
+
}, y);
|
|
589
589
|
}
|
|
590
590
|
}, fetcherState: i };
|
|
591
591
|
}
|
|
@@ -596,48 +596,48 @@ function St() {
|
|
|
596
596
|
convertKeyToTitle: e
|
|
597
597
|
};
|
|
598
598
|
}
|
|
599
|
-
const
|
|
599
|
+
const Ue = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, ve = (e) => {
|
|
600
600
|
if (typeof e != "string")
|
|
601
601
|
throw new TypeError("Invalid argument expected string");
|
|
602
|
-
const r = e.match(
|
|
602
|
+
const r = e.match(Ue);
|
|
603
603
|
if (!r)
|
|
604
604
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
605
605
|
return r.shift(), r;
|
|
606
606
|
}, be = (e) => e === "*" || e === "x" || e === "X", we = (e) => {
|
|
607
607
|
const r = parseInt(e, 10);
|
|
608
608
|
return isNaN(r) ? e : r;
|
|
609
|
-
}, At = (e, r) => typeof e != typeof r ? [String(e), String(r)] : [e, r],
|
|
609
|
+
}, At = (e, r) => typeof e != typeof r ? [String(e), String(r)] : [e, r], Nt = (e, r) => {
|
|
610
610
|
if (be(e) || be(r))
|
|
611
611
|
return 0;
|
|
612
612
|
const [t, a] = At(we(e), we(r));
|
|
613
613
|
return t > a ? 1 : t < a ? -1 : 0;
|
|
614
614
|
}, ke = (e, r) => {
|
|
615
615
|
for (let t = 0; t < Math.max(e.length, r.length); t++) {
|
|
616
|
-
const a =
|
|
616
|
+
const a = Nt(e[t] || "0", r[t] || "0");
|
|
617
617
|
if (a !== 0)
|
|
618
618
|
return a;
|
|
619
619
|
}
|
|
620
620
|
return 0;
|
|
621
|
-
},
|
|
621
|
+
}, xt = (e, r) => {
|
|
622
622
|
const t = ve(e), a = ve(r), n = t.pop(), o = a.pop(), i = ke(t, a);
|
|
623
623
|
return i !== 0 ? i : n && o ? ke(n.split("."), o.split(".")) : n || o ? n ? -1 : 1 : 0;
|
|
624
624
|
}, Ce = (e, r, t) => {
|
|
625
625
|
Tt(t);
|
|
626
|
-
const a =
|
|
627
|
-
return
|
|
628
|
-
},
|
|
626
|
+
const a = xt(e, r);
|
|
627
|
+
return Le[t].includes(a);
|
|
628
|
+
}, Le = {
|
|
629
629
|
">": [1],
|
|
630
630
|
">=": [0, 1],
|
|
631
631
|
"=": [0],
|
|
632
632
|
"<=": [-1, 0],
|
|
633
633
|
"<": [-1],
|
|
634
634
|
"!=": [-1, 1]
|
|
635
|
-
}, _e = Object.keys(
|
|
635
|
+
}, _e = Object.keys(Le), Tt = (e) => {
|
|
636
636
|
if (typeof e != "string")
|
|
637
637
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
638
638
|
if (_e.indexOf(e) === -1)
|
|
639
639
|
throw new Error(`Invalid operator, expected one of ${_e.join("|")}`);
|
|
640
|
-
}, It = (e) => typeof e == "string" && /^[v\d]/.test(e) &&
|
|
640
|
+
}, It = (e) => typeof e == "string" && /^[v\d]/.test(e) && Ue.test(e);
|
|
641
641
|
function Et(e) {
|
|
642
642
|
const { gatewayInfo: r, supportedRange: t } = e;
|
|
643
643
|
if (!r)
|
|
@@ -672,7 +672,7 @@ const fe = {
|
|
|
672
672
|
useErrors: kt,
|
|
673
673
|
useExternalLinkCreator: Ct,
|
|
674
674
|
useFetcher: _t,
|
|
675
|
-
useFetchUrlBuilder:
|
|
675
|
+
useFetchUrlBuilder: Pe,
|
|
676
676
|
useHelpers: Fe,
|
|
677
677
|
useStringHelpers: St,
|
|
678
678
|
useI18n: se,
|
|
@@ -686,54 +686,54 @@ const fe = {
|
|
|
686
686
|
return t;
|
|
687
687
|
}, Kt = "#3a3f51";
|
|
688
688
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
689
|
-
function
|
|
689
|
+
function Me(e) {
|
|
690
690
|
return typeof e > "u" || e === null;
|
|
691
691
|
}
|
|
692
692
|
function $t(e) {
|
|
693
693
|
return typeof e == "object" && e !== null;
|
|
694
694
|
}
|
|
695
695
|
function Ft(e) {
|
|
696
|
-
return Array.isArray(e) ? e :
|
|
696
|
+
return Array.isArray(e) ? e : Me(e) ? [] : [e];
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function Pt(e, r) {
|
|
699
699
|
var t, a, n, o;
|
|
700
700
|
if (r)
|
|
701
701
|
for (o = Object.keys(r), t = 0, a = o.length; t < a; t += 1)
|
|
702
702
|
n = o[t], e[n] = r[n];
|
|
703
703
|
return e;
|
|
704
704
|
}
|
|
705
|
-
function
|
|
705
|
+
function Ut(e, r) {
|
|
706
706
|
var t = "", a;
|
|
707
707
|
for (a = 0; a < r; a += 1)
|
|
708
708
|
t += e;
|
|
709
709
|
return t;
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function Lt(e) {
|
|
712
712
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
713
713
|
}
|
|
714
|
-
var
|
|
715
|
-
isNothing:
|
|
716
|
-
isObject:
|
|
717
|
-
toArray:
|
|
718
|
-
repeat:
|
|
714
|
+
var Mt = Me, Rt = $t, Bt = Ft, Dt = Ut, qt = Lt, zt = Pt, ge = {
|
|
715
|
+
isNothing: Mt,
|
|
716
|
+
isObject: Rt,
|
|
717
|
+
toArray: Bt,
|
|
718
|
+
repeat: Dt,
|
|
719
719
|
isNegativeZero: qt,
|
|
720
720
|
extend: zt
|
|
721
721
|
};
|
|
722
|
-
function
|
|
722
|
+
function Re(e, r) {
|
|
723
723
|
var t = "", a = e.reason || "(unknown reason)";
|
|
724
724
|
return e.mark ? (e.mark.name && (t += 'in "' + e.mark.name + '" '), t += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !r && e.mark.snippet && (t += `
|
|
725
725
|
|
|
726
726
|
` + e.mark.snippet), a + " " + t) : a;
|
|
727
727
|
}
|
|
728
728
|
function ie(e, r) {
|
|
729
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = r, this.message =
|
|
729
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = r, this.message = Re(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
730
730
|
}
|
|
731
731
|
ie.prototype = Object.create(Error.prototype);
|
|
732
732
|
ie.prototype.constructor = ie;
|
|
733
733
|
ie.prototype.toString = function(e) {
|
|
734
|
-
return this.name + ": " +
|
|
734
|
+
return this.name + ": " + Re(this, e);
|
|
735
735
|
};
|
|
736
|
-
var
|
|
736
|
+
var ee = ie, Vt = [
|
|
737
737
|
"kind",
|
|
738
738
|
"multi",
|
|
739
739
|
"resolve",
|
|
@@ -760,15 +760,15 @@ function Wt(e) {
|
|
|
760
760
|
function Jt(e, r) {
|
|
761
761
|
if (r = r || {}, Object.keys(r).forEach(function(t) {
|
|
762
762
|
if (Vt.indexOf(t) === -1)
|
|
763
|
-
throw new
|
|
763
|
+
throw new ee('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
764
764
|
}), this.options = r, this.tag = e, this.kind = r.kind || null, this.resolve = r.resolve || function() {
|
|
765
765
|
return !0;
|
|
766
766
|
}, this.construct = r.construct || function(t) {
|
|
767
767
|
return t;
|
|
768
768
|
}, this.instanceOf = r.instanceOf || null, this.predicate = r.predicate || null, this.represent = r.represent || null, this.representName = r.representName || null, this.defaultStyle = r.defaultStyle || null, this.multi = r.multi || !1, this.styleAliases = Wt(r.styleAliases || null), Ht.indexOf(this.kind) === -1)
|
|
769
|
-
throw new
|
|
769
|
+
throw new ee('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
770
770
|
}
|
|
771
|
-
var
|
|
771
|
+
var $ = Jt;
|
|
772
772
|
function Se(e, r) {
|
|
773
773
|
var t = [];
|
|
774
774
|
return e[r].forEach(function(a) {
|
|
@@ -803,46 +803,46 @@ function de(e) {
|
|
|
803
803
|
}
|
|
804
804
|
de.prototype.extend = function(e) {
|
|
805
805
|
var r = [], t = [];
|
|
806
|
-
if (e instanceof
|
|
806
|
+
if (e instanceof $)
|
|
807
807
|
t.push(e);
|
|
808
808
|
else if (Array.isArray(e))
|
|
809
809
|
t = t.concat(e);
|
|
810
810
|
else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit)))
|
|
811
811
|
e.implicit && (r = r.concat(e.implicit)), e.explicit && (t = t.concat(e.explicit));
|
|
812
812
|
else
|
|
813
|
-
throw new
|
|
813
|
+
throw new ee("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
814
814
|
r.forEach(function(n) {
|
|
815
|
-
if (!(n instanceof
|
|
816
|
-
throw new
|
|
815
|
+
if (!(n instanceof $))
|
|
816
|
+
throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
817
817
|
if (n.loadKind && n.loadKind !== "scalar")
|
|
818
|
-
throw new
|
|
818
|
+
throw new ee("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
819
819
|
if (n.multi)
|
|
820
|
-
throw new
|
|
820
|
+
throw new ee("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
821
821
|
}), t.forEach(function(n) {
|
|
822
|
-
if (!(n instanceof
|
|
823
|
-
throw new
|
|
822
|
+
if (!(n instanceof $))
|
|
823
|
+
throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
824
824
|
});
|
|
825
825
|
var a = Object.create(de.prototype);
|
|
826
826
|
return a.implicit = (this.implicit || []).concat(r), a.explicit = (this.explicit || []).concat(t), a.compiledImplicit = Se(a, "implicit"), a.compiledExplicit = Se(a, "explicit"), a.compiledTypeMap = Yt(a.compiledImplicit, a.compiledExplicit), a;
|
|
827
827
|
};
|
|
828
|
-
var
|
|
828
|
+
var Zt = de, Gt = new $("tag:yaml.org,2002:str", {
|
|
829
829
|
kind: "scalar",
|
|
830
830
|
construct: function(e) {
|
|
831
831
|
return e !== null ? e : "";
|
|
832
832
|
}
|
|
833
|
-
}), Qt = new
|
|
833
|
+
}), Qt = new $("tag:yaml.org,2002:seq", {
|
|
834
834
|
kind: "sequence",
|
|
835
835
|
construct: function(e) {
|
|
836
836
|
return e !== null ? e : [];
|
|
837
837
|
}
|
|
838
|
-
}), Xt = new
|
|
838
|
+
}), Xt = new $("tag:yaml.org,2002:map", {
|
|
839
839
|
kind: "mapping",
|
|
840
840
|
construct: function(e) {
|
|
841
841
|
return e !== null ? e : {};
|
|
842
842
|
}
|
|
843
|
-
}), er = new
|
|
843
|
+
}), er = new Zt({
|
|
844
844
|
explicit: [
|
|
845
|
-
|
|
845
|
+
Gt,
|
|
846
846
|
Qt,
|
|
847
847
|
Xt
|
|
848
848
|
]
|
|
@@ -859,7 +859,7 @@ function rr() {
|
|
|
859
859
|
function ar(e) {
|
|
860
860
|
return e === null;
|
|
861
861
|
}
|
|
862
|
-
var nr = new
|
|
862
|
+
var nr = new $("tag:yaml.org,2002:null", {
|
|
863
863
|
kind: "scalar",
|
|
864
864
|
resolve: tr,
|
|
865
865
|
construct: rr,
|
|
@@ -895,7 +895,7 @@ function or(e) {
|
|
|
895
895
|
function lr(e) {
|
|
896
896
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
897
897
|
}
|
|
898
|
-
var sr = new
|
|
898
|
+
var sr = new $("tag:yaml.org,2002:bool", {
|
|
899
899
|
kind: "scalar",
|
|
900
900
|
resolve: ir,
|
|
901
901
|
construct: or,
|
|
@@ -986,7 +986,7 @@ function fr(e) {
|
|
|
986
986
|
function yr(e) {
|
|
987
987
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ge.isNegativeZero(e);
|
|
988
988
|
}
|
|
989
|
-
var gr = new
|
|
989
|
+
var gr = new $("tag:yaml.org,2002:int", {
|
|
990
990
|
kind: "scalar",
|
|
991
991
|
resolve: pr,
|
|
992
992
|
construct: fr,
|
|
@@ -1063,7 +1063,7 @@ function wr(e, r) {
|
|
|
1063
1063
|
function kr(e) {
|
|
1064
1064
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ge.isNegativeZero(e));
|
|
1065
1065
|
}
|
|
1066
|
-
var Cr = new
|
|
1066
|
+
var Cr = new $("tag:yaml.org,2002:float", {
|
|
1067
1067
|
kind: "scalar",
|
|
1068
1068
|
resolve: mr,
|
|
1069
1069
|
construct: vr,
|
|
@@ -1077,41 +1077,41 @@ var Cr = new K("tag:yaml.org,2002:float", {
|
|
|
1077
1077
|
gr,
|
|
1078
1078
|
Cr
|
|
1079
1079
|
]
|
|
1080
|
-
}), Sr = _r,
|
|
1080
|
+
}), Sr = _r, Be = new RegExp(
|
|
1081
1081
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1082
|
-
),
|
|
1082
|
+
), De = new RegExp(
|
|
1083
1083
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
1084
1084
|
);
|
|
1085
1085
|
function Ar(e) {
|
|
1086
|
-
return e === null ? !1 :
|
|
1086
|
+
return e === null ? !1 : Be.exec(e) !== null || De.exec(e) !== null;
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1089
|
-
var r, t, a, n, o, i, s,
|
|
1090
|
-
if (r =
|
|
1088
|
+
function Nr(e) {
|
|
1089
|
+
var r, t, a, n, o, i, s, f = 0, d = null, y, u, k;
|
|
1090
|
+
if (r = Be.exec(e), r === null && (r = De.exec(e)), r === null)
|
|
1091
1091
|
throw new Error("Date resolve error");
|
|
1092
1092
|
if (t = +r[1], a = +r[2] - 1, n = +r[3], !r[4])
|
|
1093
1093
|
return new Date(Date.UTC(t, a, n));
|
|
1094
1094
|
if (o = +r[4], i = +r[5], s = +r[6], r[7]) {
|
|
1095
|
-
for (
|
|
1096
|
-
|
|
1097
|
-
|
|
1095
|
+
for (f = r[7].slice(0, 3); f.length < 3; )
|
|
1096
|
+
f += "0";
|
|
1097
|
+
f = +f;
|
|
1098
1098
|
}
|
|
1099
|
-
return r[9] && (
|
|
1099
|
+
return r[9] && (y = +r[10], u = +(r[11] || 0), d = (y * 60 + u) * 6e4, r[9] === "-" && (d = -d)), k = new Date(Date.UTC(t, a, n, o, i, s, f)), d && k.setTime(k.getTime() - d), k;
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function xr(e) {
|
|
1102
1102
|
return e.toISOString();
|
|
1103
1103
|
}
|
|
1104
|
-
var Tr = new
|
|
1104
|
+
var Tr = new $("tag:yaml.org,2002:timestamp", {
|
|
1105
1105
|
kind: "scalar",
|
|
1106
1106
|
resolve: Ar,
|
|
1107
|
-
construct:
|
|
1107
|
+
construct: Nr,
|
|
1108
1108
|
instanceOf: Date,
|
|
1109
|
-
represent:
|
|
1109
|
+
represent: xr
|
|
1110
1110
|
});
|
|
1111
1111
|
function Ir(e) {
|
|
1112
1112
|
return e === "<<" || e === null;
|
|
1113
1113
|
}
|
|
1114
|
-
var Er = new
|
|
1114
|
+
var Er = new $("tag:yaml.org,2002:merge", {
|
|
1115
1115
|
kind: "scalar",
|
|
1116
1116
|
resolve: Ir
|
|
1117
1117
|
}), he = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
@@ -1143,22 +1143,22 @@ function Kr(e) {
|
|
|
1143
1143
|
function $r(e) {
|
|
1144
1144
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1145
1145
|
}
|
|
1146
|
-
var Fr = new
|
|
1146
|
+
var Fr = new $("tag:yaml.org,2002:binary", {
|
|
1147
1147
|
kind: "scalar",
|
|
1148
1148
|
resolve: Or,
|
|
1149
1149
|
construct: jr,
|
|
1150
1150
|
predicate: $r,
|
|
1151
1151
|
represent: Kr
|
|
1152
|
-
}),
|
|
1153
|
-
function
|
|
1152
|
+
}), Pr = Object.prototype.hasOwnProperty, Ur = Object.prototype.toString;
|
|
1153
|
+
function Lr(e) {
|
|
1154
1154
|
if (e === null)
|
|
1155
1155
|
return !0;
|
|
1156
1156
|
var r = [], t, a, n, o, i, s = e;
|
|
1157
1157
|
for (t = 0, a = s.length; t < a; t += 1) {
|
|
1158
|
-
if (n = s[t], i = !1,
|
|
1158
|
+
if (n = s[t], i = !1, Ur.call(n) !== "[object Object]")
|
|
1159
1159
|
return !1;
|
|
1160
1160
|
for (o in n)
|
|
1161
|
-
if (
|
|
1161
|
+
if (Pr.call(n, o))
|
|
1162
1162
|
if (!i)
|
|
1163
1163
|
i = !0;
|
|
1164
1164
|
else
|
|
@@ -1172,20 +1172,20 @@ function Ur(e) {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
return !0;
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1175
|
+
function Mr(e) {
|
|
1176
1176
|
return e !== null ? e : [];
|
|
1177
1177
|
}
|
|
1178
|
-
var
|
|
1178
|
+
var Rr = new $("tag:yaml.org,2002:omap", {
|
|
1179
1179
|
kind: "sequence",
|
|
1180
|
-
resolve:
|
|
1181
|
-
construct:
|
|
1182
|
-
}),
|
|
1183
|
-
function
|
|
1180
|
+
resolve: Lr,
|
|
1181
|
+
construct: Mr
|
|
1182
|
+
}), Br = Object.prototype.toString;
|
|
1183
|
+
function Dr(e) {
|
|
1184
1184
|
if (e === null)
|
|
1185
1185
|
return !0;
|
|
1186
1186
|
var r, t, a, n, o, i = e;
|
|
1187
1187
|
for (o = new Array(i.length), r = 0, t = i.length; r < t; r += 1) {
|
|
1188
|
-
if (a = i[r],
|
|
1188
|
+
if (a = i[r], Br.call(a) !== "[object Object]" || (n = Object.keys(a), n.length !== 1))
|
|
1189
1189
|
return !1;
|
|
1190
1190
|
o[r] = [n[0], a[n[0]]];
|
|
1191
1191
|
}
|
|
@@ -1199,9 +1199,9 @@ function qr(e) {
|
|
|
1199
1199
|
a = i[r], n = Object.keys(a), o[r] = [n[0], a[n[0]]];
|
|
1200
1200
|
return o;
|
|
1201
1201
|
}
|
|
1202
|
-
var zr = new
|
|
1202
|
+
var zr = new $("tag:yaml.org,2002:pairs", {
|
|
1203
1203
|
kind: "sequence",
|
|
1204
|
-
resolve:
|
|
1204
|
+
resolve: Dr,
|
|
1205
1205
|
construct: qr
|
|
1206
1206
|
}), Vr = Object.prototype.hasOwnProperty;
|
|
1207
1207
|
function Hr(e) {
|
|
@@ -1216,7 +1216,7 @@ function Hr(e) {
|
|
|
1216
1216
|
function Wr(e) {
|
|
1217
1217
|
return e !== null ? e : {};
|
|
1218
1218
|
}
|
|
1219
|
-
var Jr = new
|
|
1219
|
+
var Jr = new $("tag:yaml.org,2002:set", {
|
|
1220
1220
|
kind: "mapping",
|
|
1221
1221
|
resolve: Hr,
|
|
1222
1222
|
construct: Wr
|
|
@@ -1228,7 +1228,7 @@ Sr.extend({
|
|
|
1228
1228
|
],
|
|
1229
1229
|
explicit: [
|
|
1230
1230
|
Fr,
|
|
1231
|
-
|
|
1231
|
+
Rr,
|
|
1232
1232
|
zr,
|
|
1233
1233
|
Jr
|
|
1234
1234
|
]
|
|
@@ -1237,15 +1237,15 @@ function Ae(e) {
|
|
|
1237
1237
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1238
1238
|
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1239
1239
|
}
|
|
1240
|
-
var Yr = new Array(256),
|
|
1240
|
+
var Yr = new Array(256), Zr = new Array(256);
|
|
1241
1241
|
for (var re = 0; re < 256; re++)
|
|
1242
|
-
Yr[re] = Ae(re) ? 1 : 0,
|
|
1243
|
-
const
|
|
1242
|
+
Yr[re] = Ae(re) ? 1 : 0, Zr[re] = Ae(re);
|
|
1243
|
+
const Ne = "24px", Gr = (e, r) => {
|
|
1244
1244
|
const t = e.__vccOpts || e;
|
|
1245
1245
|
for (const [a, n] of r)
|
|
1246
1246
|
t[a] = n;
|
|
1247
1247
|
return t;
|
|
1248
|
-
}, Qr = (e) => (Je("data-v-
|
|
1248
|
+
}, Qr = (e) => (Je("data-v-1d2a8d30"), e = e(), Ye(), e), Xr = ["aria-hidden"], ea = {
|
|
1249
1249
|
key: 0,
|
|
1250
1250
|
"data-testid": "kui-icon-svg-title"
|
|
1251
1251
|
}, ta = /* @__PURE__ */ Qr(() => /* @__PURE__ */ G("path", {
|
|
@@ -1282,7 +1282,7 @@ const xe = "24px", Zr = (e, r) => {
|
|
|
1282
1282
|
size: {
|
|
1283
1283
|
type: [Number, String],
|
|
1284
1284
|
required: !1,
|
|
1285
|
-
default:
|
|
1285
|
+
default: Ne,
|
|
1286
1286
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
1287
1287
|
validator: (e) => {
|
|
1288
1288
|
if (typeof e == "number" && e > 0)
|
|
@@ -1311,7 +1311,7 @@ const xe = "24px", Zr = (e, r) => {
|
|
|
1311
1311
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
1312
1312
|
return `${o}px`;
|
|
1313
1313
|
}
|
|
1314
|
-
return
|
|
1314
|
+
return Ne;
|
|
1315
1315
|
}), a = A(() => ({
|
|
1316
1316
|
boxSizing: "border-box",
|
|
1317
1317
|
color: r.color,
|
|
@@ -1320,14 +1320,14 @@ const xe = "24px", Zr = (e, r) => {
|
|
|
1320
1320
|
lineHeight: "0",
|
|
1321
1321
|
width: t.value
|
|
1322
1322
|
}));
|
|
1323
|
-
return (n, o) => (x(),
|
|
1323
|
+
return (n, o) => (x(), z(Oe(e.as), {
|
|
1324
1324
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1325
1325
|
class: "kui-icon add-icon",
|
|
1326
1326
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
1327
1327
|
style: We(a.value)
|
|
1328
1328
|
}, {
|
|
1329
1329
|
default: l(() => [
|
|
1330
|
-
(x(),
|
|
1330
|
+
(x(), V("svg", {
|
|
1331
1331
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1332
1332
|
"data-testid": "kui-icon-svg-add-icon",
|
|
1333
1333
|
fill: "none",
|
|
@@ -1337,17 +1337,14 @@ const xe = "24px", Zr = (e, r) => {
|
|
|
1337
1337
|
width: "100%",
|
|
1338
1338
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1339
1339
|
}, [
|
|
1340
|
-
e.title ? (x(),
|
|
1340
|
+
e.title ? (x(), V("title", ea, I(e.title), 1)) : J("", !0),
|
|
1341
1341
|
ta
|
|
1342
1342
|
], 8, Xr))
|
|
1343
1343
|
]),
|
|
1344
1344
|
_: 1
|
|
1345
1345
|
}, 8, ["aria-hidden", "style"]));
|
|
1346
1346
|
}
|
|
1347
|
-
}), aa = /* @__PURE__ */
|
|
1348
|
-
key: 0,
|
|
1349
|
-
"data-testid": "first-col"
|
|
1350
|
-
}, ia = /* @__PURE__ */ ae({
|
|
1347
|
+
}), aa = /* @__PURE__ */ Gr(ra, [["__scopeId", "data-v-1d2a8d30"]]), na = ["data-truncate"], ia = /* @__PURE__ */ ae({
|
|
1351
1348
|
__name: "EntityBaseTableCell",
|
|
1352
1349
|
props: {
|
|
1353
1350
|
keyName: {
|
|
@@ -1357,68 +1354,80 @@ const xe = "24px", Zr = (e, r) => {
|
|
|
1357
1354
|
rowEl: {
|
|
1358
1355
|
type: [Object, null],
|
|
1359
1356
|
required: !0
|
|
1357
|
+
},
|
|
1358
|
+
tooltip: {
|
|
1359
|
+
type: Boolean,
|
|
1360
|
+
default: !1
|
|
1360
1361
|
}
|
|
1361
1362
|
},
|
|
1362
1363
|
setup(e) {
|
|
1363
1364
|
const r = e, t = A(() => {
|
|
1364
|
-
var
|
|
1365
|
-
return ((
|
|
1365
|
+
var S;
|
|
1366
|
+
return ((S = r.rowEl) == null ? void 0 : S.querySelector(`[data-testid="${r.keyName}"]`)) || null;
|
|
1366
1367
|
}), a = A(() => {
|
|
1367
|
-
var
|
|
1368
|
-
return ((
|
|
1368
|
+
var S;
|
|
1369
|
+
return ((S = t.value) == null ? void 0 : S.querySelector('[data-truncate="true"]')) || null;
|
|
1369
1370
|
}), n = A(() => {
|
|
1370
|
-
var
|
|
1371
|
-
const
|
|
1372
|
-
return
|
|
1373
|
-
});
|
|
1374
|
-
let
|
|
1375
|
-
const
|
|
1376
|
-
|
|
1377
|
-
},
|
|
1378
|
-
var
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1371
|
+
var S, E;
|
|
1372
|
+
const U = (S = r.rowEl) == null ? void 0 : S.querySelectorAll("td");
|
|
1373
|
+
return U ? ((E = U[0]) == null ? void 0 : E.getAttribute("data-testid")) === r.keyName : !1;
|
|
1374
|
+
}), o = A(() => n.value || r.tooltip);
|
|
1375
|
+
let i;
|
|
1376
|
+
const s = () => {
|
|
1377
|
+
i && (i.disconnect(), i = void 0);
|
|
1378
|
+
}, f = () => {
|
|
1379
|
+
var S, E, U;
|
|
1380
|
+
let D = ((S = t.value) == null ? void 0 : S.clientWidth) || 0;
|
|
1381
|
+
if (t.value && "getComputedStyle" in window) {
|
|
1382
|
+
const m = window.getComputedStyle(t.value);
|
|
1383
|
+
D -= (parseFloat(m.paddingLeft) || 0) + (parseFloat(m.paddingRight) || 0);
|
|
1384
|
+
}
|
|
1385
|
+
y.value = ((E = a.value) == null ? void 0 : E.getBoundingClientRect().width) || 0, u.value = D, k.value = ((U = d.value) == null ? void 0 : U.innerText) || "";
|
|
1386
|
+
}, d = w({}), y = w(0), u = w(0), k = w(""), h = A(() => [a.value, t.value]), F = le(
|
|
1387
|
+
h,
|
|
1388
|
+
(S) => {
|
|
1389
|
+
if (o.value && (s(), "ResizeObserver" in window && window)) {
|
|
1390
|
+
i = new ResizeObserver((E) => {
|
|
1385
1391
|
window.requestAnimationFrame(() => {
|
|
1386
|
-
!Array.isArray(
|
|
1392
|
+
!Array.isArray(E) || !E.length || f();
|
|
1387
1393
|
});
|
|
1388
1394
|
});
|
|
1389
|
-
for (const
|
|
1390
|
-
|
|
1395
|
+
for (const E of S)
|
|
1396
|
+
E && i.observe(E);
|
|
1391
1397
|
}
|
|
1392
1398
|
},
|
|
1393
1399
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
1394
|
-
),
|
|
1400
|
+
), N = A(() => o.value ? y.value > u.value : !1);
|
|
1395
1401
|
return Ve(() => {
|
|
1396
|
-
|
|
1402
|
+
f();
|
|
1397
1403
|
}), He(() => {
|
|
1398
|
-
|
|
1399
|
-
}), (
|
|
1400
|
-
const
|
|
1401
|
-
return x(),
|
|
1404
|
+
F();
|
|
1405
|
+
}), (S, E) => {
|
|
1406
|
+
const U = L("KTooltip");
|
|
1407
|
+
return x(), V("span", {
|
|
1402
1408
|
ref_key: "contentRef",
|
|
1403
|
-
ref:
|
|
1409
|
+
ref: d,
|
|
1404
1410
|
class: "content-wrapper"
|
|
1405
1411
|
}, [
|
|
1406
|
-
|
|
1407
|
-
|
|
1412
|
+
o.value ? (x(), V("span", {
|
|
1413
|
+
key: 0,
|
|
1414
|
+
"data-truncate": o.value || void 0
|
|
1415
|
+
}, [
|
|
1416
|
+
v(U, {
|
|
1408
1417
|
"max-width": "300",
|
|
1409
1418
|
placement: "bottomStart",
|
|
1410
|
-
text:
|
|
1419
|
+
text: N.value ? k.value : ""
|
|
1411
1420
|
}, {
|
|
1412
1421
|
default: l(() => [
|
|
1413
|
-
|
|
1422
|
+
Z(S.$slots, "default", {}, void 0, !0)
|
|
1414
1423
|
]),
|
|
1415
1424
|
_: 3
|
|
1416
1425
|
}, 8, ["text"])
|
|
1417
|
-
])) :
|
|
1426
|
+
], 8, na)) : Z(S.$slots, "default", { key: 1 }, void 0, !0)
|
|
1418
1427
|
], 512);
|
|
1419
1428
|
};
|
|
1420
1429
|
}
|
|
1421
|
-
}), oa = /* @__PURE__ */ ye(ia, [["__scopeId", "data-v-
|
|
1430
|
+
}), oa = /* @__PURE__ */ ye(ia, [["__scopeId", "data-v-6019026f"]]), la = { class: "toolbar-container" }, sa = {
|
|
1422
1431
|
key: 0,
|
|
1423
1432
|
class: "toolbar-button-container"
|
|
1424
1433
|
}, ca = ["data-testid"], ua = /* @__PURE__ */ ae({
|
|
@@ -1536,7 +1545,7 @@ const xe = "24px", Zr = (e, r) => {
|
|
|
1536
1545
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
1537
1546
|
setup(e, { emit: r }) {
|
|
1538
1547
|
const t = e, a = r, { i18n: { t: n } } = fe.useI18n(), o = A(() => {
|
|
1539
|
-
var c,
|
|
1548
|
+
var c, C;
|
|
1540
1549
|
return typeof t.errorMessage == "string" ? {
|
|
1541
1550
|
hasError: !!t.errorMessage,
|
|
1542
1551
|
title: t.errorMessage,
|
|
@@ -1544,68 +1553,68 @@ const xe = "24px", Zr = (e, r) => {
|
|
|
1544
1553
|
} : {
|
|
1545
1554
|
hasError: !!t.errorMessage,
|
|
1546
1555
|
title: (c = t.errorMessage) == null ? void 0 : c.title,
|
|
1547
|
-
message: (
|
|
1556
|
+
message: (C = t.errorMessage) == null ? void 0 : C.message
|
|
1548
1557
|
};
|
|
1549
|
-
}), i = A(() => t.cacheIdentifier || t.preferencesStorageKey), s = (c) => c.hasData || !!t.query,
|
|
1558
|
+
}), i = A(() => t.cacheIdentifier || t.preferencesStorageKey), s = (c) => c.hasData || !!t.query, f = A(() => {
|
|
1550
1559
|
const c = [];
|
|
1551
|
-
return Object.keys(t.tableHeaders).forEach((
|
|
1552
|
-
const
|
|
1560
|
+
return Object.keys(t.tableHeaders).forEach((C) => {
|
|
1561
|
+
const H = t.tableHeaders[C];
|
|
1553
1562
|
c.push({
|
|
1554
|
-
label:
|
|
1555
|
-
key:
|
|
1556
|
-
sortable:
|
|
1563
|
+
label: H.label ?? C,
|
|
1564
|
+
key: C,
|
|
1565
|
+
sortable: H.sortable ?? !1
|
|
1557
1566
|
});
|
|
1558
1567
|
}), t.enableEntityActions && c.push({
|
|
1559
1568
|
key: "actions",
|
|
1560
1569
|
hideLabel: !0
|
|
1561
1570
|
}), c;
|
|
1562
|
-
}),
|
|
1571
|
+
}), d = (c) => ({
|
|
1563
1572
|
"data-rowid": c.id,
|
|
1564
1573
|
"data-testid": c.name,
|
|
1565
1574
|
...t.rowAttributes(c)
|
|
1566
|
-
}),
|
|
1567
|
-
var
|
|
1568
|
-
return (
|
|
1569
|
-
},
|
|
1570
|
-
const
|
|
1575
|
+
}), y = w({}), u = (c) => {
|
|
1576
|
+
var C;
|
|
1577
|
+
return (C = y.value) == null ? void 0 : C.$el.querySelector(`[data-rowid="${c.id}"]`);
|
|
1578
|
+
}, k = (c) => {
|
|
1579
|
+
const C = {
|
|
1571
1580
|
"data-testid": c.headerKey,
|
|
1572
1581
|
...t.cellAttributes(c)
|
|
1573
1582
|
};
|
|
1574
|
-
return c.colIndex === 0 && (
|
|
1583
|
+
return c.colIndex === 0 && (C.style = {
|
|
1575
1584
|
maxWidth: "250px",
|
|
1576
1585
|
overflowX: "hidden",
|
|
1577
1586
|
textOverflow: "ellipsis"
|
|
1578
|
-
}),
|
|
1579
|
-
},
|
|
1580
|
-
a("empty-state-cta-clicked"),
|
|
1581
|
-
},
|
|
1587
|
+
}), C;
|
|
1588
|
+
}, h = () => {
|
|
1589
|
+
a("empty-state-cta-clicked"), F();
|
|
1590
|
+
}, F = () => {
|
|
1582
1591
|
a("clear-search-input");
|
|
1583
|
-
},
|
|
1584
|
-
a("click:row",
|
|
1585
|
-
}),
|
|
1592
|
+
}, N = A(() => t.disableRowClick ? void 0 : (c, C) => {
|
|
1593
|
+
a("click:row", C);
|
|
1594
|
+
}), S = (c) => {
|
|
1586
1595
|
a("sort", c);
|
|
1587
|
-
}, { setTablePreferences:
|
|
1588
|
-
const c =
|
|
1596
|
+
}, { setTablePreferences: E, getTablePreferences: U } = lt(), D = A(() => {
|
|
1597
|
+
const c = U(t.preferencesStorageKey);
|
|
1589
1598
|
return {
|
|
1590
1599
|
...t.initialFetcherParams,
|
|
1591
1600
|
...c
|
|
1592
1601
|
};
|
|
1593
|
-
}),
|
|
1594
|
-
t.preferencesStorageKey &&
|
|
1602
|
+
}), m = (c) => {
|
|
1603
|
+
t.preferencesStorageKey && E(t.preferencesStorageKey, c);
|
|
1595
1604
|
};
|
|
1596
|
-
return (c,
|
|
1597
|
-
const
|
|
1598
|
-
return x(),
|
|
1605
|
+
return (c, C) => {
|
|
1606
|
+
const H = L("KIcon"), j = L("KButton"), K = L("KDropdown"), W = L("KTable"), O = L("KCard");
|
|
1607
|
+
return x(), z(O, {
|
|
1599
1608
|
class: "kong-ui-entity-base-table",
|
|
1600
1609
|
title: e.title,
|
|
1601
1610
|
"title-tag": e.titleTag
|
|
1602
1611
|
}, {
|
|
1603
1612
|
default: l(() => [
|
|
1604
|
-
v(
|
|
1613
|
+
v(W, {
|
|
1605
1614
|
ref_key: "tableRefs",
|
|
1606
|
-
ref:
|
|
1615
|
+
ref: y,
|
|
1607
1616
|
"cache-identifier": i.value,
|
|
1608
|
-
"cell-attrs":
|
|
1617
|
+
"cell-attrs": k,
|
|
1609
1618
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
1610
1619
|
"disable-sorting": e.disableSorting,
|
|
1611
1620
|
"empty-state-action-message": e.query ? b(n)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
@@ -1619,52 +1628,52 @@ const xe = "24px", Zr = (e, r) => {
|
|
|
1619
1628
|
fetcher: e.fetcher,
|
|
1620
1629
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
1621
1630
|
"has-error": o.value.hasError,
|
|
1622
|
-
headers:
|
|
1631
|
+
headers: f.value,
|
|
1623
1632
|
"hide-pagination-when-optional": "",
|
|
1624
|
-
"initial-fetcher-params":
|
|
1633
|
+
"initial-fetcher-params": D.value,
|
|
1625
1634
|
"is-loading": e.isLoading,
|
|
1626
1635
|
"pagination-type": e.paginationType,
|
|
1627
|
-
"row-attrs":
|
|
1636
|
+
"row-attrs": d,
|
|
1628
1637
|
"search-input": e.query,
|
|
1629
|
-
onKtableEmptyStateCtaClicked:
|
|
1630
|
-
"onRow:click":
|
|
1631
|
-
onSort:
|
|
1632
|
-
"onUpdate:tablePreferences":
|
|
1633
|
-
},
|
|
1634
|
-
toolbar: l(({ state:
|
|
1638
|
+
onKtableEmptyStateCtaClicked: h,
|
|
1639
|
+
"onRow:click": N.value,
|
|
1640
|
+
onSort: C[0] || (C[0] = (T) => S(T)),
|
|
1641
|
+
"onUpdate:tablePreferences": m
|
|
1642
|
+
}, xe({
|
|
1643
|
+
toolbar: l(({ state: T }) => [
|
|
1635
1644
|
Te(G("div", la, [
|
|
1636
|
-
|
|
1637
|
-
c.$slots["toolbar-button"] ? (x(),
|
|
1638
|
-
|
|
1639
|
-
])) :
|
|
1645
|
+
Z(c.$slots, "toolbar-filter", {}, void 0, !0),
|
|
1646
|
+
c.$slots["toolbar-button"] ? (x(), V("div", sa, [
|
|
1647
|
+
Z(c.$slots, "toolbar-button", {}, void 0, !0)
|
|
1648
|
+
])) : J("", !0)
|
|
1640
1649
|
], 512), [
|
|
1641
|
-
[Ie, s(
|
|
1650
|
+
[Ie, s(T)]
|
|
1642
1651
|
])
|
|
1643
1652
|
]),
|
|
1644
|
-
actions: l(({ row:
|
|
1653
|
+
actions: l(({ row: T, rowKey: M, rowValue: Q }) => [
|
|
1645
1654
|
G("div", {
|
|
1646
1655
|
class: "actions-container",
|
|
1647
|
-
"data-testid":
|
|
1656
|
+
"data-testid": T.name
|
|
1648
1657
|
}, [
|
|
1649
|
-
v(
|
|
1658
|
+
v(K, {
|
|
1650
1659
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
1651
1660
|
width: e.dropdownMenuWidth
|
|
1652
1661
|
}, {
|
|
1653
1662
|
items: l(() => [
|
|
1654
|
-
|
|
1655
|
-
row:
|
|
1656
|
-
rowKey:
|
|
1657
|
-
rowValue:
|
|
1663
|
+
Z(c.$slots, "actions", {
|
|
1664
|
+
row: T,
|
|
1665
|
+
rowKey: M,
|
|
1666
|
+
rowValue: Q
|
|
1658
1667
|
}, void 0, !0)
|
|
1659
1668
|
]),
|
|
1660
1669
|
default: l(() => [
|
|
1661
|
-
v(
|
|
1670
|
+
v(j, {
|
|
1662
1671
|
class: "actions-trigger",
|
|
1663
1672
|
"data-testid": "overflow-actions-button",
|
|
1664
1673
|
size: "small"
|
|
1665
1674
|
}, {
|
|
1666
1675
|
icon: l(() => [
|
|
1667
|
-
v(
|
|
1676
|
+
v(H, {
|
|
1668
1677
|
color: b(Kt),
|
|
1669
1678
|
icon: "more",
|
|
1670
1679
|
size: "16"
|
|
@@ -1679,24 +1688,25 @@ const xe = "24px", Zr = (e, r) => {
|
|
|
1679
1688
|
]),
|
|
1680
1689
|
_: 2
|
|
1681
1690
|
}, [
|
|
1682
|
-
Ee(e.tableHeaders, (
|
|
1683
|
-
name:
|
|
1684
|
-
fn: l(({ row:
|
|
1691
|
+
Ee(e.tableHeaders, (T, M) => ({
|
|
1692
|
+
name: M,
|
|
1693
|
+
fn: l(({ row: Q, rowKey: p, rowValue: _ }) => [
|
|
1685
1694
|
v(oa, {
|
|
1686
|
-
"key-name": String(
|
|
1687
|
-
"row-el": u(
|
|
1695
|
+
"key-name": String(M),
|
|
1696
|
+
"row-el": u(Q),
|
|
1697
|
+
tooltip: T.tooltip
|
|
1688
1698
|
}, {
|
|
1689
1699
|
default: l(() => [
|
|
1690
|
-
|
|
1691
|
-
row:
|
|
1692
|
-
rowKey:
|
|
1693
|
-
rowValue:
|
|
1700
|
+
Z(c.$slots, M, {
|
|
1701
|
+
row: Q,
|
|
1702
|
+
rowKey: p,
|
|
1703
|
+
rowValue: _
|
|
1694
1704
|
}, () => [
|
|
1695
|
-
|
|
1705
|
+
B(I(_), 1)
|
|
1696
1706
|
], !0)
|
|
1697
1707
|
]),
|
|
1698
1708
|
_: 2
|
|
1699
|
-
}, 1032, ["key-name", "row-el"])
|
|
1709
|
+
}, 1032, ["key-name", "row-el", "tooltip"])
|
|
1700
1710
|
])
|
|
1701
1711
|
})),
|
|
1702
1712
|
e.query ? void 0 : {
|
|
@@ -1712,7 +1722,7 @@ const xe = "24px", Zr = (e, r) => {
|
|
|
1712
1722
|
}, 8, ["title", "title-tag"]);
|
|
1713
1723
|
};
|
|
1714
1724
|
}
|
|
1715
|
-
}), da = /* @__PURE__ */ ye(ua, [["__scopeId", "data-v-
|
|
1725
|
+
}), da = /* @__PURE__ */ ye(ua, [["__scopeId", "data-v-adb02213"]]), pa = {
|
|
1716
1726
|
key: 0,
|
|
1717
1727
|
class: "kong-ui-entity-delete-error"
|
|
1718
1728
|
}, fa = {
|
|
@@ -1762,9 +1772,9 @@ const xe = "24px", Zr = (e, r) => {
|
|
|
1762
1772
|
}, s = () => {
|
|
1763
1773
|
n("proceed");
|
|
1764
1774
|
};
|
|
1765
|
-
return (
|
|
1766
|
-
const
|
|
1767
|
-
return x(),
|
|
1775
|
+
return (f, d) => {
|
|
1776
|
+
const y = L("KAlert"), u = L("KPrompt");
|
|
1777
|
+
return x(), z(u, {
|
|
1768
1778
|
"action-button-appearance": "danger",
|
|
1769
1779
|
"action-button-disabled": e.actionPending,
|
|
1770
1780
|
"action-button-text": "Yes, delete",
|
|
@@ -1776,37 +1786,37 @@ const xe = "24px", Zr = (e, r) => {
|
|
|
1776
1786
|
onProceed: s
|
|
1777
1787
|
}, {
|
|
1778
1788
|
default: l(() => [
|
|
1779
|
-
e.error ? (x(),
|
|
1780
|
-
v(
|
|
1789
|
+
e.error ? (x(), V("div", pa, [
|
|
1790
|
+
v(y, { appearance: "danger" }, {
|
|
1781
1791
|
default: l(() => [
|
|
1782
|
-
|
|
1792
|
+
B(I(e.error), 1)
|
|
1783
1793
|
]),
|
|
1784
1794
|
_: 1
|
|
1785
1795
|
})
|
|
1786
|
-
])) :
|
|
1796
|
+
])) : J("", !0),
|
|
1787
1797
|
v(b(t), {
|
|
1788
1798
|
class: "message",
|
|
1789
1799
|
keypath: a.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
1790
1800
|
tag: "p"
|
|
1791
|
-
},
|
|
1801
|
+
}, xe({
|
|
1792
1802
|
entityType: l(() => [
|
|
1793
|
-
|
|
1803
|
+
B(I(a.entityType), 1)
|
|
1794
1804
|
]),
|
|
1795
1805
|
_: 2
|
|
1796
1806
|
}, [
|
|
1797
1807
|
a.entityName ? {
|
|
1798
1808
|
name: "entityName",
|
|
1799
1809
|
fn: l(() => [
|
|
1800
|
-
G("strong", null,
|
|
1810
|
+
G("strong", null, I(a.entityName), 1)
|
|
1801
1811
|
]),
|
|
1802
1812
|
key: "0"
|
|
1803
1813
|
} : void 0
|
|
1804
1814
|
]), 1032, ["keypath"]),
|
|
1805
|
-
a.description ||
|
|
1806
|
-
|
|
1807
|
-
G("p", null,
|
|
1815
|
+
a.description || f.$slots.description ? (x(), V("div", fa, [
|
|
1816
|
+
Z(f.$slots, "description", {}, () => [
|
|
1817
|
+
G("p", null, I(a.description), 1)
|
|
1808
1818
|
], !0)
|
|
1809
|
-
])) :
|
|
1819
|
+
])) : J("", !0)
|
|
1810
1820
|
]),
|
|
1811
1821
|
_: 3
|
|
1812
1822
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
@@ -1837,16 +1847,16 @@ const xe = "24px", Zr = (e, r) => {
|
|
|
1837
1847
|
const r = e, t = w(void 0), a = A(() => t.value === !0 || t.value !== void 0 && r.forceShow === !0);
|
|
1838
1848
|
return le(() => r.authFunction, async () => {
|
|
1839
1849
|
t.value = await r.authFunction();
|
|
1840
|
-
}, { immediate: !0 }), (n, o) => a.value ?
|
|
1850
|
+
}, { immediate: !0 }), (n, o) => a.value ? Z(n.$slots, "default", {
|
|
1841
1851
|
key: 0,
|
|
1842
1852
|
isAllowed: t.value
|
|
1843
|
-
}) :
|
|
1853
|
+
}) : J("", !0);
|
|
1844
1854
|
}
|
|
1845
1855
|
}), ha = [];
|
|
1846
1856
|
for (let e = 0; e < 256; ++e)
|
|
1847
1857
|
ha.push((e + 256).toString(16).slice(1));
|
|
1848
1858
|
typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1849
|
-
const { useAxios: ma, useDeleteUrlBuilder: va, useErrors: Ia, useExternalLinkCreator: Ea, useFetchUrlBuilder: Oa, useFetcher: ba, useDebouncedFilter: ja, useStringHelpers: Ka, useHelpers: $a, useGatewayFeatureSupported: Fa, useTruncationDetector:
|
|
1859
|
+
const { useAxios: ma, useDeleteUrlBuilder: va, useErrors: Ia, useExternalLinkCreator: Ea, useFetchUrlBuilder: Oa, useFetcher: ba, useDebouncedFilter: ja, useStringHelpers: Ka, useHelpers: $a, useGatewayFeatureSupported: Fa, useTruncationDetector: Pa, useValidators: Ua } = fe, wa = { class: "kong-ui-entities-consumer-credentials-list" }, ka = { key: 1 }, Ca = /* @__PURE__ */ ae({
|
|
1850
1860
|
__name: "ConsumerCredentialList",
|
|
1851
1861
|
props: {
|
|
1852
1862
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1886,8 +1896,8 @@ const { useAxios: ma, useDeleteUrlBuilder: va, useErrors: Ia, useExternalLinkCre
|
|
|
1886
1896
|
},
|
|
1887
1897
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
1888
1898
|
setup(e, { emit: r }) {
|
|
1889
|
-
var
|
|
1890
|
-
const t = r, a = e, { i18n: { t: n, formatUnixTimeStamp: o } } = rt.useI18n(), { axiosInstance: i } = ma((
|
|
1899
|
+
var Q;
|
|
1900
|
+
const t = r, a = e, { i18n: { t: n, formatUnixTimeStamp: o } } = rt.useI18n(), { axiosInstance: i } = ma((Q = a.config) == null ? void 0 : Q.axiosRequestConfig), s = w(1), f = {
|
|
1891
1901
|
acls: {
|
|
1892
1902
|
group: { label: n("credentials.list.table_headers.acls.group") },
|
|
1893
1903
|
created_at: { label: n("credentials.list.table_headers.acls.created_at") },
|
|
@@ -1928,89 +1938,89 @@ const { useAxios: ma, useDeleteUrlBuilder: va, useErrors: Ia, useExternalLinkCre
|
|
|
1928
1938
|
created_at: { label: n("credentials.list.table_headers.jwt.created_at") },
|
|
1929
1939
|
tags: { label: n("credentials.list.table_headers.jwt.tags") }
|
|
1930
1940
|
}
|
|
1931
|
-
},
|
|
1932
|
-
let
|
|
1933
|
-
return a.config.app === "konnect" ?
|
|
1934
|
-
}), { fetcher: u, fetcherState:
|
|
1941
|
+
}, d = A(() => f[a.config.plugin]), y = A(() => {
|
|
1942
|
+
let p = `${a.config.apiBaseUrl}${at.list[a.config.app]}`;
|
|
1943
|
+
return a.config.app === "konnect" ? p = p.replace(/{controlPlaneId}/gi, a.config.controlPlaneId || "").replace(/{consumerId}/gi, a.config.consumerId || "").replace(/{plugin}/gi, a.config.plugin || "") : a.config.app === "kongManager" && (p = p.replace(/\/{workspace}/gi, a.config.workspace ? `/${a.config.workspace}` : "").replace(/{consumerId}/gi, a.config.consumerId || "").replace(/{plugin}/gi, a.config.plugin || "")), p;
|
|
1944
|
+
}), { fetcher: u, fetcherState: k } = ba(a.config, y), h = () => {
|
|
1935
1945
|
s.value++;
|
|
1936
|
-
},
|
|
1937
|
-
const
|
|
1938
|
-
if (!R
|
|
1939
|
-
|
|
1946
|
+
}, F = w(null), N = (p, _, q) => {
|
|
1947
|
+
const R = _ ? p[_] : JSON.stringify(p);
|
|
1948
|
+
if (!q(R)) {
|
|
1949
|
+
E(p, _);
|
|
1940
1950
|
return;
|
|
1941
1951
|
}
|
|
1942
|
-
|
|
1943
|
-
},
|
|
1952
|
+
S(p, _);
|
|
1953
|
+
}, S = (p, _) => {
|
|
1944
1954
|
t("copy:success", {
|
|
1945
|
-
entity:
|
|
1946
|
-
field:
|
|
1947
|
-
message:
|
|
1955
|
+
entity: p,
|
|
1956
|
+
field: _,
|
|
1957
|
+
message: _ && !["password", "key", "client_secret", "secret"].includes(_) ? n("credentials.copy.success", { val: p[_] }) : n("credentials.copy.success_brief")
|
|
1948
1958
|
});
|
|
1949
|
-
},
|
|
1959
|
+
}, E = (p, _) => {
|
|
1950
1960
|
t("copy:error", {
|
|
1951
|
-
entity:
|
|
1952
|
-
field:
|
|
1961
|
+
entity: p,
|
|
1962
|
+
field: _,
|
|
1953
1963
|
message: n("credentials.error.copy")
|
|
1954
1964
|
});
|
|
1955
|
-
},
|
|
1965
|
+
}, U = (p) => ({
|
|
1956
1966
|
label: n("credentials.actions.edit"),
|
|
1957
|
-
to: a.config.getEditRoute(
|
|
1958
|
-
}),
|
|
1959
|
-
|
|
1960
|
-
},
|
|
1961
|
-
|
|
1962
|
-
},
|
|
1963
|
-
var
|
|
1964
|
-
if ((
|
|
1967
|
+
to: a.config.getEditRoute(p)
|
|
1968
|
+
}), D = w(void 0), m = w(!1), c = w(!1), C = w(""), H = va(a.config, y.value), j = A(() => $e[a.config.plugin]), K = (p) => {
|
|
1969
|
+
D.value = p, m.value = !0;
|
|
1970
|
+
}, W = () => {
|
|
1971
|
+
m.value = !1;
|
|
1972
|
+
}, O = async () => {
|
|
1973
|
+
var p, _, q;
|
|
1974
|
+
if ((p = D.value) != null && p.id) {
|
|
1965
1975
|
c.value = !0;
|
|
1966
1976
|
try {
|
|
1967
|
-
await i.delete(
|
|
1968
|
-
} catch (
|
|
1969
|
-
|
|
1977
|
+
await i.delete(H(D.value.id)), c.value = !1, m.value = !1, s.value++, t("delete:success", D.value);
|
|
1978
|
+
} catch (R) {
|
|
1979
|
+
C.value = ((q = (_ = R.response) == null ? void 0 : _.data) == null ? void 0 : q.message) || R.message || n("credentials.error.delete"), t("error", R);
|
|
1970
1980
|
} finally {
|
|
1971
1981
|
c.value = !1;
|
|
1972
1982
|
}
|
|
1973
1983
|
}
|
|
1974
|
-
},
|
|
1975
|
-
le(
|
|
1976
|
-
var
|
|
1977
|
-
if (Array.isArray((
|
|
1978
|
-
|
|
1984
|
+
}, T = w(!0);
|
|
1985
|
+
le(k, (p) => {
|
|
1986
|
+
var _, q, R, oe;
|
|
1987
|
+
if (Array.isArray((_ = p == null ? void 0 : p.response) == null ? void 0 : _.data) && (T.value = p.response.data.length > 0), p.status === X.Error) {
|
|
1988
|
+
F.value = {
|
|
1979
1989
|
title: n("credentials.error.general")
|
|
1980
|
-
}, (oe = (
|
|
1990
|
+
}, (oe = (R = (q = p.error) == null ? void 0 : q.response) == null ? void 0 : R.data) != null && oe.message && (F.value.message = p.error.response.data.message), t("error", p.error);
|
|
1981
1991
|
return;
|
|
1982
1992
|
}
|
|
1983
|
-
|
|
1993
|
+
F.value = null;
|
|
1984
1994
|
});
|
|
1985
|
-
const
|
|
1995
|
+
const M = w({
|
|
1986
1996
|
ctaPath: a.config.createRoute,
|
|
1987
1997
|
ctaText: void 0,
|
|
1988
1998
|
message: "",
|
|
1989
1999
|
title: n("credentials.title")
|
|
1990
2000
|
});
|
|
1991
|
-
return
|
|
1992
|
-
await a.canCreate() && (
|
|
1993
|
-
}), (
|
|
1994
|
-
const
|
|
1995
|
-
return x(),
|
|
2001
|
+
return Ze(async () => {
|
|
2002
|
+
await a.canCreate() && (M.value.title = n(`credentials.list.empty_state.${a.config.plugin}.title`), M.value.ctaText = n(`credentials.list.empty_state.${a.config.plugin}.cta`));
|
|
2003
|
+
}), (p, _) => {
|
|
2004
|
+
const q = L("KButton"), R = L("KCopy"), oe = L("KBadge"), qe = L("KTruncate"), Y = L("KDropdownItem"), te = L("KClipboardProvider");
|
|
2005
|
+
return x(), V("div", wa, [
|
|
1996
2006
|
v(b(da), {
|
|
1997
2007
|
"cache-identifier": e.cacheIdentifier,
|
|
1998
2008
|
"disable-pagination-page-jump": "",
|
|
1999
2009
|
"disable-row-click": "",
|
|
2000
2010
|
"disable-sorting": "",
|
|
2001
|
-
"empty-state-options":
|
|
2011
|
+
"empty-state-options": M.value,
|
|
2002
2012
|
"enable-entity-actions": "",
|
|
2003
|
-
"error-message":
|
|
2013
|
+
"error-message": F.value,
|
|
2004
2014
|
fetcher: b(u),
|
|
2005
2015
|
"fetcher-cache-key": s.value,
|
|
2006
2016
|
"pagination-type": "offset",
|
|
2007
2017
|
"preferences-storage-key": "kong-ui-entities-consumer-credentials-list",
|
|
2008
|
-
"table-headers":
|
|
2018
|
+
"table-headers": d.value,
|
|
2009
2019
|
"use-action-outside": e.useActionOutside,
|
|
2010
|
-
onSort:
|
|
2020
|
+
onSort: h
|
|
2011
2021
|
}, {
|
|
2012
2022
|
"toolbar-button": l(() => [
|
|
2013
|
-
(x(),
|
|
2023
|
+
(x(), z(Oe(e.useActionOutside ? "Teleport" : "div"), {
|
|
2014
2024
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
2015
2025
|
}, {
|
|
2016
2026
|
default: l(() => [
|
|
@@ -2018,7 +2028,7 @@ const { useAxios: ma, useDeleteUrlBuilder: va, useErrors: Ia, useExternalLinkCre
|
|
|
2018
2028
|
"auth-function": () => e.canCreate()
|
|
2019
2029
|
}, {
|
|
2020
2030
|
default: l(() => [
|
|
2021
|
-
Te(v(
|
|
2031
|
+
Te(v(q, {
|
|
2022
2032
|
appearance: "primary",
|
|
2023
2033
|
"data-testid": "toolbar-add-credential",
|
|
2024
2034
|
icon: "plus",
|
|
@@ -2026,11 +2036,11 @@ const { useAxios: ma, useDeleteUrlBuilder: va, useErrors: Ia, useExternalLinkCre
|
|
|
2026
2036
|
to: e.config.createRoute
|
|
2027
2037
|
}, {
|
|
2028
2038
|
default: l(() => [
|
|
2029
|
-
|
|
2039
|
+
B(I(b(n)(`credentials.list.toolbar_actions.${e.config.plugin}.new`)), 1)
|
|
2030
2040
|
]),
|
|
2031
2041
|
_: 1
|
|
2032
2042
|
}, 8, ["to"]), [
|
|
2033
|
-
[Ie,
|
|
2043
|
+
[Ie, T.value]
|
|
2034
2044
|
])
|
|
2035
2045
|
]),
|
|
2036
2046
|
_: 1
|
|
@@ -2039,142 +2049,142 @@ const { useAxios: ma, useDeleteUrlBuilder: va, useErrors: Ia, useExternalLinkCre
|
|
|
2039
2049
|
_: 1
|
|
2040
2050
|
}, 8, ["to"]))
|
|
2041
2051
|
]),
|
|
2042
|
-
group: l(({ rowValue:
|
|
2043
|
-
G("b", null,
|
|
2052
|
+
group: l(({ rowValue: g }) => [
|
|
2053
|
+
G("b", null, I(g ?? "-"), 1)
|
|
2044
2054
|
]),
|
|
2045
|
-
name: l(({ rowValue:
|
|
2046
|
-
G("b", null,
|
|
2055
|
+
name: l(({ rowValue: g }) => [
|
|
2056
|
+
G("b", null, I(g ?? "-"), 1)
|
|
2047
2057
|
]),
|
|
2048
|
-
username: l(({ rowValue:
|
|
2049
|
-
G("span", null,
|
|
2058
|
+
username: l(({ rowValue: g }) => [
|
|
2059
|
+
G("span", null, I(g ?? "-"), 1)
|
|
2050
2060
|
]),
|
|
2051
|
-
password: l(({ rowValue:
|
|
2052
|
-
v(
|
|
2061
|
+
password: l(({ rowValue: g }) => [
|
|
2062
|
+
v(R, {
|
|
2053
2063
|
format: "redacted",
|
|
2054
|
-
text:
|
|
2064
|
+
text: g,
|
|
2055
2065
|
truncate: ""
|
|
2056
2066
|
}, null, 8, ["text"])
|
|
2057
2067
|
]),
|
|
2058
|
-
key: l(({ rowValue:
|
|
2059
|
-
v(
|
|
2068
|
+
key: l(({ rowValue: g }) => [
|
|
2069
|
+
v(R, {
|
|
2060
2070
|
format: "redacted",
|
|
2061
|
-
text:
|
|
2071
|
+
text: g,
|
|
2062
2072
|
truncate: ""
|
|
2063
2073
|
}, null, 8, ["text"])
|
|
2064
2074
|
]),
|
|
2065
|
-
client_secret: l(({ rowValue:
|
|
2066
|
-
v(
|
|
2075
|
+
client_secret: l(({ rowValue: g }) => [
|
|
2076
|
+
v(R, {
|
|
2067
2077
|
format: "redacted",
|
|
2068
|
-
text:
|
|
2078
|
+
text: g,
|
|
2069
2079
|
truncate: ""
|
|
2070
2080
|
}, null, 8, ["text"])
|
|
2071
2081
|
]),
|
|
2072
|
-
secret: l(({ rowValue:
|
|
2073
|
-
v(
|
|
2082
|
+
secret: l(({ rowValue: g }) => [
|
|
2083
|
+
v(R, {
|
|
2074
2084
|
format: "redacted",
|
|
2075
|
-
text:
|
|
2085
|
+
text: g,
|
|
2076
2086
|
truncate: ""
|
|
2077
2087
|
}, null, 8, ["text"])
|
|
2078
2088
|
]),
|
|
2079
|
-
created_at: l(({ rowValue:
|
|
2080
|
-
|
|
2089
|
+
created_at: l(({ rowValue: g }) => [
|
|
2090
|
+
B(I(b(o)(g)), 1)
|
|
2081
2091
|
]),
|
|
2082
|
-
tags: l(({ rowValue:
|
|
2083
|
-
(
|
|
2092
|
+
tags: l(({ rowValue: g }) => [
|
|
2093
|
+
(g == null ? void 0 : g.length) > 0 ? (x(), z(qe, { key: 0 }, {
|
|
2084
2094
|
default: l(() => [
|
|
2085
|
-
(x(!0),
|
|
2086
|
-
key:
|
|
2087
|
-
onClick:
|
|
2095
|
+
(x(!0), V(Ge, null, Ee(g, (P) => (x(), z(oe, {
|
|
2096
|
+
key: P,
|
|
2097
|
+
onClick: _[0] || (_[0] = Qe(() => {
|
|
2088
2098
|
}, ["stop"]))
|
|
2089
2099
|
}, {
|
|
2090
2100
|
default: l(() => [
|
|
2091
|
-
|
|
2101
|
+
B(I(P), 1)
|
|
2092
2102
|
]),
|
|
2093
2103
|
_: 2
|
|
2094
2104
|
}, 1024))), 128))
|
|
2095
2105
|
]),
|
|
2096
2106
|
_: 2
|
|
2097
|
-
}, 1024)) : (x(),
|
|
2107
|
+
}, 1024)) : (x(), V("span", ka, "-"))
|
|
2098
2108
|
]),
|
|
2099
|
-
actions: l(({ row:
|
|
2109
|
+
actions: l(({ row: g }) => [
|
|
2100
2110
|
v(te, null, {
|
|
2101
|
-
default: l(({ copyToClipboard:
|
|
2102
|
-
v(
|
|
2111
|
+
default: l(({ copyToClipboard: P }) => [
|
|
2112
|
+
v(Y, {
|
|
2103
2113
|
"data-testid": "action-entity-copy-id",
|
|
2104
|
-
onClick: (ne) =>
|
|
2114
|
+
onClick: (ne) => N(g, "id", P)
|
|
2105
2115
|
}, {
|
|
2106
2116
|
default: l(() => [
|
|
2107
|
-
|
|
2117
|
+
B(I(b(n)("credentials.actions.copy_id")), 1)
|
|
2108
2118
|
]),
|
|
2109
2119
|
_: 2
|
|
2110
2120
|
}, 1032, ["onClick"])
|
|
2111
2121
|
]),
|
|
2112
2122
|
_: 2
|
|
2113
2123
|
}, 1024),
|
|
2114
|
-
e.config.plugin === "basic-auth" ? (x(),
|
|
2115
|
-
default: l(({ copyToClipboard:
|
|
2116
|
-
v(
|
|
2124
|
+
e.config.plugin === "basic-auth" ? (x(), z(te, { key: 0 }, {
|
|
2125
|
+
default: l(({ copyToClipboard: P }) => [
|
|
2126
|
+
v(Y, {
|
|
2117
2127
|
"data-testid": "action-entity-copy-credential",
|
|
2118
|
-
onClick: (ne) =>
|
|
2128
|
+
onClick: (ne) => N(g, "password", P)
|
|
2119
2129
|
}, {
|
|
2120
2130
|
default: l(() => [
|
|
2121
|
-
|
|
2131
|
+
B(I(b(n)("credentials.actions.copy_credential")), 1)
|
|
2122
2132
|
]),
|
|
2123
2133
|
_: 2
|
|
2124
2134
|
}, 1032, ["onClick"])
|
|
2125
2135
|
]),
|
|
2126
2136
|
_: 2
|
|
2127
|
-
}, 1024)) :
|
|
2128
|
-
["key-auth", "key-auth-enc", "jwt"].includes(e.config.plugin) ? (x(),
|
|
2129
|
-
default: l(({ copyToClipboard:
|
|
2130
|
-
v(
|
|
2137
|
+
}, 1024)) : J("", !0),
|
|
2138
|
+
["key-auth", "key-auth-enc", "jwt"].includes(e.config.plugin) ? (x(), z(te, { key: 1 }, {
|
|
2139
|
+
default: l(({ copyToClipboard: P }) => [
|
|
2140
|
+
v(Y, {
|
|
2131
2141
|
"data-testid": "action-entity-copy-key",
|
|
2132
|
-
onClick: (ne) =>
|
|
2142
|
+
onClick: (ne) => N(g, "key", P)
|
|
2133
2143
|
}, {
|
|
2134
2144
|
default: l(() => [
|
|
2135
|
-
|
|
2145
|
+
B(I(b(n)("credentials.actions.copy_key")), 1)
|
|
2136
2146
|
]),
|
|
2137
2147
|
_: 2
|
|
2138
2148
|
}, 1032, ["onClick"])
|
|
2139
2149
|
]),
|
|
2140
2150
|
_: 2
|
|
2141
|
-
}, 1024)) :
|
|
2142
|
-
e.config.plugin === "oauth2" ? (x(),
|
|
2143
|
-
default: l(({ copyToClipboard:
|
|
2144
|
-
v(
|
|
2151
|
+
}, 1024)) : J("", !0),
|
|
2152
|
+
e.config.plugin === "oauth2" ? (x(), z(te, { key: 2 }, {
|
|
2153
|
+
default: l(({ copyToClipboard: P }) => [
|
|
2154
|
+
v(Y, {
|
|
2145
2155
|
"data-testid": "action-entity-copy-secret",
|
|
2146
|
-
onClick: (ne) =>
|
|
2156
|
+
onClick: (ne) => N(g, "client_secret", P)
|
|
2147
2157
|
}, {
|
|
2148
2158
|
default: l(() => [
|
|
2149
|
-
|
|
2159
|
+
B(I(b(n)("credentials.actions.copy_secret")), 1)
|
|
2150
2160
|
]),
|
|
2151
2161
|
_: 2
|
|
2152
2162
|
}, 1032, ["onClick"])
|
|
2153
2163
|
]),
|
|
2154
2164
|
_: 2
|
|
2155
|
-
}, 1024)) :
|
|
2156
|
-
e.config.plugin === "hmac-auth" ? (x(),
|
|
2157
|
-
default: l(({ copyToClipboard:
|
|
2158
|
-
v(
|
|
2165
|
+
}, 1024)) : J("", !0),
|
|
2166
|
+
e.config.plugin === "hmac-auth" ? (x(), z(te, { key: 3 }, {
|
|
2167
|
+
default: l(({ copyToClipboard: P }) => [
|
|
2168
|
+
v(Y, {
|
|
2159
2169
|
"data-testid": "action-entity-copy-secret",
|
|
2160
|
-
onClick: (ne) =>
|
|
2170
|
+
onClick: (ne) => N(g, "secret", P)
|
|
2161
2171
|
}, {
|
|
2162
2172
|
default: l(() => [
|
|
2163
|
-
|
|
2173
|
+
B(I(b(n)("credentials.actions.copy_secret")), 1)
|
|
2164
2174
|
]),
|
|
2165
2175
|
_: 2
|
|
2166
2176
|
}, 1032, ["onClick"])
|
|
2167
2177
|
]),
|
|
2168
2178
|
_: 2
|
|
2169
|
-
}, 1024)) :
|
|
2179
|
+
}, 1024)) : J("", !0),
|
|
2170
2180
|
v(te, null, {
|
|
2171
|
-
default: l(({ copyToClipboard:
|
|
2172
|
-
v(
|
|
2181
|
+
default: l(({ copyToClipboard: P }) => [
|
|
2182
|
+
v(Y, {
|
|
2173
2183
|
"data-testid": "action-entity-copy-json",
|
|
2174
|
-
onClick: (ne) =>
|
|
2184
|
+
onClick: (ne) => N(g, void 0, P)
|
|
2175
2185
|
}, {
|
|
2176
2186
|
default: l(() => [
|
|
2177
|
-
|
|
2187
|
+
B(I(b(n)("credentials.actions.copy_json")), 1)
|
|
2178
2188
|
]),
|
|
2179
2189
|
_: 2
|
|
2180
2190
|
}, 1032, ["onClick"])
|
|
@@ -2182,29 +2192,29 @@ const { useAxios: ma, useDeleteUrlBuilder: va, useErrors: Ia, useExternalLinkCre
|
|
|
2182
2192
|
_: 2
|
|
2183
2193
|
}, 1024),
|
|
2184
2194
|
v(b(ue), {
|
|
2185
|
-
"auth-function": () => e.canEdit(
|
|
2195
|
+
"auth-function": () => e.canEdit(g)
|
|
2186
2196
|
}, {
|
|
2187
2197
|
default: l(() => [
|
|
2188
|
-
v(
|
|
2198
|
+
v(Y, {
|
|
2189
2199
|
"data-testid": "action-entity-edit",
|
|
2190
2200
|
"has-divider": "",
|
|
2191
|
-
item:
|
|
2201
|
+
item: U(g.id)
|
|
2192
2202
|
}, null, 8, ["item"])
|
|
2193
2203
|
]),
|
|
2194
2204
|
_: 2
|
|
2195
2205
|
}, 1032, ["auth-function"]),
|
|
2196
2206
|
v(b(ue), {
|
|
2197
|
-
"auth-function": () => e.canDelete(
|
|
2207
|
+
"auth-function": () => e.canDelete(g)
|
|
2198
2208
|
}, {
|
|
2199
2209
|
default: l(() => [
|
|
2200
|
-
v(
|
|
2210
|
+
v(Y, {
|
|
2201
2211
|
danger: "",
|
|
2202
2212
|
"data-testid": "action-entity-delete",
|
|
2203
2213
|
"has-divider": "",
|
|
2204
|
-
onClick: (
|
|
2214
|
+
onClick: (P) => K(g)
|
|
2205
2215
|
}, {
|
|
2206
2216
|
default: l(() => [
|
|
2207
|
-
|
|
2217
|
+
B(I(b(n)("credentials.actions.delete")), 1)
|
|
2208
2218
|
]),
|
|
2209
2219
|
_: 2
|
|
2210
2220
|
}, 1032, ["onClick"])
|
|
@@ -2217,12 +2227,12 @@ const { useAxios: ma, useDeleteUrlBuilder: va, useErrors: Ia, useExternalLinkCre
|
|
|
2217
2227
|
v(b(ga), {
|
|
2218
2228
|
"action-pending": c.value,
|
|
2219
2229
|
description: b(n)("credentials.delete.description"),
|
|
2220
|
-
"entity-type":
|
|
2221
|
-
error:
|
|
2230
|
+
"entity-type": j.value,
|
|
2231
|
+
error: C.value,
|
|
2222
2232
|
title: b(n)(`credentials.delete.${e.config.plugin}.title`),
|
|
2223
|
-
visible:
|
|
2224
|
-
onCancel:
|
|
2225
|
-
onProceed:
|
|
2233
|
+
visible: m.value,
|
|
2234
|
+
onCancel: W,
|
|
2235
|
+
onProceed: O
|
|
2226
2236
|
}, null, 8, ["action-pending", "description", "entity-type", "error", "title", "visible"])
|
|
2227
2237
|
]);
|
|
2228
2238
|
};
|
|
@@ -2232,7 +2242,7 @@ const { useAxios: ma, useDeleteUrlBuilder: va, useErrors: Ia, useExternalLinkCre
|
|
|
2232
2242
|
for (const [a, n] of r)
|
|
2233
2243
|
t[a] = n;
|
|
2234
2244
|
return t;
|
|
2235
|
-
},
|
|
2245
|
+
}, La = /* @__PURE__ */ _a(Ca, [["__scopeId", "data-v-f8662795"]]);
|
|
2236
2246
|
export {
|
|
2237
|
-
|
|
2247
|
+
La as ConsumerCredentialList
|
|
2238
2248
|
};
|