@kong-ui-public/entities-shared 3.32.2-pr.2591.5f106f1b8.0 → 3.32.2-pr.2591.fa1545142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-shared.es.js +274 -254
- package/dist/entities-shared.umd.js +25 -25
- package/dist/style.css +1 -1
- package/dist/types/components/common/TerraformCodeBlock.vue.d.ts +9 -0
- package/dist/types/components/common/TerraformCodeBlock.vue.d.ts.map +1 -1
- package/dist/types/components/entity-base-config-card/ConfigCardDisplay.vue.d.ts +9 -0
- package/dist/types/components/entity-base-config-card/ConfigCardDisplay.vue.d.ts.map +1 -1
- package/dist/types/components/entity-base-config-card/EntityBaseConfigCard.vue.d.ts +15 -0
- package/dist/types/components/entity-base-config-card/EntityBaseConfigCard.vue.d.ts.map +1 -1
- package/dist/types/types/entity-base-config-card.d.ts +5 -1
- package/dist/types/types/entity-base-config-card.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { inject as Dt, ref as K, computed as
|
|
1
|
+
import { inject as Dt, ref as K, computed as F, unref as $, toValue as he, watch as be, toRef as Vn, provide as Pt, defineComponent as z, createBlock as j, openBlock as m, resolveDynamicComponent as je, normalizeClass as fe, withCtx as w, createElementBlock as S, createCommentVNode as N, createElementVNode as R, toDisplayString as L, Fragment as ue, renderList as ce, resolveComponent as P, createVNode as M, createTextVNode as q, useCssVars as Ut, useId as Yn, useSlots as De, renderSlot as D, createSlots as Se, normalizeProps as Wn, guardReactiveProps as Jn, mergeProps as qt, onMounted as tt, onBeforeMount as nt, withModifiers as Le, Teleport as Ht, onUnmounted as Gn, withDirectives as xe, vShow as Ce, withKeys as zn, warn as Qn } from "vue";
|
|
2
2
|
import pt from "axios";
|
|
3
3
|
import { createI18n as Zn, i18nTComponent as Xn } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as ei, KButton as mt, KTruncate as ti, KBadge as ni } from "@kong/kongponents";
|
|
5
5
|
import { BookIcon as Vt, AddIcon as Yt, CloseIcon as ii, ChevronDownIcon as ri, CopyIcon as ai } from "@kong/icons";
|
|
6
6
|
import { useRouter as oi } from "vue-router";
|
|
7
|
-
var li = /* @__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.Secret = "secret", e.RedisConfiguration = "redis configuration", e))(li || {}), si = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(si || {}), me = /* @__PURE__ */ ((e) => (e[e.InitialLoad = 0] = "InitialLoad", e[e.Loading = 1] = "Loading", e[e.Idle = 2] = "Idle", e[e.NoResults = 3] = "NoResults", e[e.NoRecords = 4] = "NoRecords", e[e.Error = 5] = "Error", e))(me || {}), it = /* @__PURE__ */ ((e) => (e.CaCertificate = "ca_certificate", e.Certificate = "certificate", e.Consumer = "consumer", e.ConsumerGroup = "consumer_group", e.GatewayService = "service", e.Key = "key", e.KeySet = "set", e.Plugin = "plugin", e.Route = "route", e.SNI = "sni", e.Upstream = "upstream", e.Target = "target", e.Vault = "vault", e.Partial = "partial", e.BackendCluster = "backend_cluster", e.VirtualCluster = "virtual_cluster", e.Listener = "listener", e.
|
|
8
|
-
const Pe = Object.values(it), ci = ["backend_cluster", "virtual_cluster", "listener", "
|
|
7
|
+
var li = /* @__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.Secret = "secret", e.RedisConfiguration = "redis configuration", e))(li || {}), si = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(si || {}), me = /* @__PURE__ */ ((e) => (e[e.InitialLoad = 0] = "InitialLoad", e[e.Loading = 1] = "Loading", e[e.Idle = 2] = "Idle", e[e.NoResults = 3] = "NoResults", e[e.NoRecords = 4] = "NoRecords", e[e.Error = 5] = "Error", e))(me || {}), it = /* @__PURE__ */ ((e) => (e.CaCertificate = "ca_certificate", e.Certificate = "certificate", e.Consumer = "consumer", e.ConsumerGroup = "consumer_group", e.GatewayService = "service", e.Key = "key", e.KeySet = "set", e.Plugin = "plugin", e.Route = "route", e.SNI = "sni", e.Upstream = "upstream", e.Target = "target", e.Vault = "vault", e.Partial = "partial", e.BackendCluster = "backend_cluster", e.VirtualCluster = "virtual_cluster", e.Listener = "listener", e.ProducePolicy = "produce_policy", e.ConsumePolicy = "consume_policy", e.ClusterPolicy = "cluster_policy", e.ListenerPolicy = "listener_policy", e.SchemaRegistry = "schema_registry", e.Other = "other", e))(it || {});
|
|
8
|
+
const Pe = Object.values(it), ci = ["backend_cluster", "virtual_cluster", "listener", "produce_policy", "consume_policy", "cluster_policy", "listener_policy", "schema_registry"];
|
|
9
9
|
var V = /* @__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.CopyBadge = "copy-badge", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(V || {}), ae = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e.Policy = "policy", e))(ae || {});
|
|
10
10
|
const ht = [
|
|
11
11
|
"primary",
|
|
@@ -260,46 +260,46 @@ function Si(e, t, n, i = {
|
|
|
260
260
|
searchKeys: ["id"]
|
|
261
261
|
}) {
|
|
262
262
|
n || (n = "1000");
|
|
263
|
-
const { axiosInstance: r } = rt(e.axiosRequestConfig), { i18n: { t: o } } = Ue(), { debounce: a } = di(), s = a(async (
|
|
264
|
-
await C(
|
|
265
|
-
}, 200), l = K(!1), c = K(""), d = K(""), u = K([]), p = K([]), g = K(void 0), h =
|
|
266
|
-
const
|
|
267
|
-
return e.app === "konnect" ?
|
|
263
|
+
const { axiosInstance: r } = rt(e.axiosRequestConfig), { i18n: { t: o } } = Ue(), { debounce: a } = di(), s = a(async (T) => {
|
|
264
|
+
await C(T);
|
|
265
|
+
}, 200), l = K(!1), c = K(""), d = K(""), u = K([]), p = K([]), g = K(void 0), h = F(() => {
|
|
266
|
+
const T = `${e.apiBaseUrl}${$(t)}`;
|
|
267
|
+
return e.app === "konnect" ? T.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? T.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : T;
|
|
268
268
|
}), { isValidUuid: x } = Wt(), y = async () => {
|
|
269
269
|
try {
|
|
270
270
|
l.value = !0;
|
|
271
|
-
const { data:
|
|
272
|
-
|
|
271
|
+
const { data: T } = await r.get(`${h.value}?size=${n}`);
|
|
272
|
+
T != null && T.next || (g.value = i.fetchedItemsKey in T ? T[i.fetchedItemsKey] : []), p.value = i.fetchedItemsKey in T ? T[i.fetchedItemsKey] : [], u.value = p.value;
|
|
273
273
|
} catch {
|
|
274
274
|
u.value = [], c.value = o("debouncedFilter.errors.fetch");
|
|
275
275
|
} finally {
|
|
276
276
|
l.value = !1;
|
|
277
277
|
}
|
|
278
|
-
}, k = K(""), C = async (
|
|
278
|
+
}, k = K(""), C = async (T) => {
|
|
279
279
|
var W, X, _;
|
|
280
|
-
if (k.value !==
|
|
281
|
-
if (k.value =
|
|
280
|
+
if (k.value !== T) {
|
|
281
|
+
if (k.value = T ?? "", !T) {
|
|
282
282
|
u.value = p.value;
|
|
283
283
|
return;
|
|
284
284
|
}
|
|
285
285
|
if (g.value === void 0)
|
|
286
286
|
try {
|
|
287
287
|
if (l.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
288
|
-
const A = `${h.value}/${
|
|
289
|
-
i.fetchedItemsKey in
|
|
288
|
+
const A = `${h.value}/${T}`, { data: O } = await r.get(`${A}?size=${n}`);
|
|
289
|
+
i.fetchedItemsKey in O ? u.value = O[i.fetchedItemsKey] : O != null && O[i.exactMatchKey ?? "id"] ? u.value = [O] : u.value = [];
|
|
290
290
|
} else {
|
|
291
291
|
const A = [];
|
|
292
|
-
x(
|
|
293
|
-
const { data: v } = await r.get(`${h.value}/${
|
|
292
|
+
x(T) && i.searchKeys.includes("id") ? A.push((async () => {
|
|
293
|
+
const { data: v } = await r.get(`${h.value}/${T}`);
|
|
294
294
|
return [v[i.fetchedItemsKey] ?? v];
|
|
295
295
|
})()) : A.push(
|
|
296
296
|
...i.searchKeys.filter((v) => v !== "id").map(async (v) => {
|
|
297
|
-
const { data: b } = await r.get(`${h.value}?${v}=${
|
|
297
|
+
const { data: b } = await r.get(`${h.value}?${v}=${T}`);
|
|
298
298
|
return b[i.fetchedItemsKey];
|
|
299
299
|
})
|
|
300
300
|
);
|
|
301
|
-
const
|
|
302
|
-
u.value = [], (W =
|
|
301
|
+
const O = await Promise.all(A), f = /* @__PURE__ */ new Set();
|
|
302
|
+
u.value = [], (W = O == null ? void 0 : O.forEach) == null || W.call(O, (v) => {
|
|
303
303
|
var b;
|
|
304
304
|
(b = v == null ? void 0 : v.forEach) == null || b.call(v, (H) => {
|
|
305
305
|
f.has(H.id) || (f.add(H.id), u.value.push(H));
|
|
@@ -314,12 +314,12 @@ function Si(e, t, n, i = {
|
|
|
314
314
|
else
|
|
315
315
|
l.value = !0, d.value = "", u.value = (_ = g.value) == null ? void 0 : _.filter((A) => {
|
|
316
316
|
var f;
|
|
317
|
-
let
|
|
317
|
+
let O = !1;
|
|
318
318
|
for (const v of i.searchKeys) {
|
|
319
319
|
const b = typeof A[v] == "string" ? (f = A[v]) == null ? void 0 : f.toLowerCase() : A[v];
|
|
320
|
-
b != null && b.includes(
|
|
320
|
+
b != null && b.includes(T.toLowerCase()) && (O = !0);
|
|
321
321
|
}
|
|
322
|
-
return
|
|
322
|
+
return O;
|
|
323
323
|
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid")), l.value = !1;
|
|
324
324
|
}
|
|
325
325
|
};
|
|
@@ -334,7 +334,7 @@ function Si(e, t, n, i = {
|
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
336
|
function $i(e, t) {
|
|
337
|
-
const n = $(t), i =
|
|
337
|
+
const n = $(t), i = F(
|
|
338
338
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
339
339
|
);
|
|
340
340
|
return i.value.search = "", (r) => `${i.value.href}/${r}`;
|
|
@@ -423,10 +423,10 @@ function Ii(e) {
|
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
function Jt(e, t) {
|
|
426
|
-
const n =
|
|
426
|
+
const n = F(() => {
|
|
427
427
|
const r = he(e);
|
|
428
428
|
return r.app === "konnect" || !!r.isExactMatch;
|
|
429
|
-
}), i =
|
|
429
|
+
}), i = F(() => {
|
|
430
430
|
const r = he(t);
|
|
431
431
|
return r.startsWith("/") ? new URL(`${window.location.origin}${r}`) : new URL(r);
|
|
432
432
|
});
|
|
@@ -459,7 +459,7 @@ function Ei(e, t, n) {
|
|
|
459
459
|
const y = x.data, k = p && p.replace(/[^\w-_]/gi, "");
|
|
460
460
|
let C;
|
|
461
461
|
y[k] ? C = Array.isArray(y[k]) ? y[k] : [y[k]] : Array.isArray(y) ? C = y : C = Object.keys(y).length ? [y] : [];
|
|
462
|
-
const
|
|
462
|
+
const T = {
|
|
463
463
|
data: C,
|
|
464
464
|
total: C.length,
|
|
465
465
|
...y.offset ? {
|
|
@@ -468,13 +468,13 @@ function Ei(e, t, n) {
|
|
|
468
468
|
}
|
|
469
469
|
} : null
|
|
470
470
|
};
|
|
471
|
-
return
|
|
471
|
+
return T.data.length === 0 && !u.query ? s.value = {
|
|
472
472
|
status: me.NoRecords,
|
|
473
|
-
response:
|
|
473
|
+
response: T
|
|
474
474
|
} : s.value = {
|
|
475
475
|
status: me.Idle,
|
|
476
|
-
response:
|
|
477
|
-
},
|
|
476
|
+
response: T
|
|
477
|
+
}, T;
|
|
478
478
|
} catch (h) {
|
|
479
479
|
const x = {
|
|
480
480
|
data: [],
|
|
@@ -567,7 +567,7 @@ function Mi(e) {
|
|
|
567
567
|
return be(e, (o) => {
|
|
568
568
|
o && !i.value && (t.value = o.offsetWidth, n.value = o.scrollWidth, i.value = !0);
|
|
569
569
|
}), {
|
|
570
|
-
isTruncated:
|
|
570
|
+
isTruncated: F(() => t.value < n.value)
|
|
571
571
|
};
|
|
572
572
|
}
|
|
573
573
|
function ji() {
|
|
@@ -585,7 +585,7 @@ const Ge = Symbol("schema"), Di = (e) => {
|
|
|
585
585
|
};
|
|
586
586
|
function Ui(e) {
|
|
587
587
|
let t = "";
|
|
588
|
-
const n = K(!1), i = K(null), r =
|
|
588
|
+
const n = K(!1), i = K(null), r = F(() => {
|
|
589
589
|
let a;
|
|
590
590
|
return n.value ? a = !0 : i.value ? a = i.value.hasData || e && he(e) : a = !1, !a;
|
|
591
591
|
});
|
|
@@ -636,10 +636,10 @@ const Y = {
|
|
|
636
636
|
}
|
|
637
637
|
},
|
|
638
638
|
setup(e) {
|
|
639
|
-
const t = e, { i18n: { t: n } } = Y.useI18n(), { convertKeyToTitle: i } = Y.useStringHelpers(), r =
|
|
639
|
+
const t = e, { i18n: { t: n } } = Y.useI18n(), { convertKeyToTitle: i } = Y.useStringHelpers(), r = F(() => t.item.key ?? "json-array-item"), o = F(() => t.item.value ?? t.item), a = F(() => {
|
|
640
640
|
const l = JSON.parse(JSON.stringify(o.value));
|
|
641
641
|
return t.isArrayItem && delete l.name, l;
|
|
642
|
-
}), s =
|
|
642
|
+
}), s = F(() => {
|
|
643
643
|
var l;
|
|
644
644
|
return t.isArrayItem ? (l = o.value) != null && l.name ? i(o.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
645
645
|
});
|
|
@@ -740,15 +740,15 @@ const Y = {
|
|
|
740
740
|
emits: ["navigation-click"],
|
|
741
741
|
setup(e, { emit: t }) {
|
|
742
742
|
Ut((W) => ({
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
743
|
+
v70f369b3: p.value ? "none" : `solid ${$(Zi)} ${$(Gi)}`,
|
|
744
|
+
v67c2fae6: u.value && c.value ? "block" : "flex",
|
|
745
|
+
v847b138c: u.value && c.value ? "100%" : n.slim ? "50%" : "25%",
|
|
746
|
+
v847687d6: u.value && c.value ? "100%" : n.slim ? "50%" : "75%"
|
|
747
747
|
}));
|
|
748
|
-
const n = e, i = t, r = Yn(), o = De(), { i18n: { t: a, formatIsoDate: s, formatUnixTimeStamp: l } } = Y.useI18n(), c =
|
|
748
|
+
const n = e, i = t, r = Yn(), o = De(), { i18n: { t: a, formatIsoDate: s, formatUnixTimeStamp: l } } = Y.useI18n(), c = F(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), d = F(() => !!(n.item.tooltip || o["label-tooltip"])), u = F(() => n.item.type === V.Json || n.item.type === V.JsonArray), p = F(() => n.item.type === V.JsonArray), g = Y.useSubSchema(n.item.key), h = F(() => {
|
|
749
749
|
var W;
|
|
750
750
|
return n.item.type ? n.item.type : (W = g == null ? void 0 : g.value) != null && W.encrypted ? V.Redacted : void 0;
|
|
751
|
-
}), x =
|
|
751
|
+
}), x = F(() => {
|
|
752
752
|
switch (h.value) {
|
|
753
753
|
case V.ID:
|
|
754
754
|
return {
|
|
@@ -879,9 +879,9 @@ const Y = {
|
|
|
879
879
|
text: n.item.value
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
|
-
}), y = K(), k = K(), { isTruncated: C } = Y.useTruncationDetector(y), { isTruncated:
|
|
882
|
+
}), y = K(), k = K(), { isTruncated: C } = Y.useTruncationDetector(y), { isTruncated: T } = Y.useTruncationDetector(k);
|
|
883
883
|
return (W, X) => {
|
|
884
|
-
const _ = P("KTooltip"), A = P("KLabel"),
|
|
884
|
+
const _ = P("KTooltip"), A = P("KLabel"), O = P("KBadge"), f = P("KCopy");
|
|
885
885
|
return m(), S("div", tr, [
|
|
886
886
|
R("div", {
|
|
887
887
|
class: "config-card-details-label",
|
|
@@ -935,7 +935,7 @@ const Y = {
|
|
|
935
935
|
key: 0,
|
|
936
936
|
"data-testid": `${e.item.key}-badge-tags`
|
|
937
937
|
}, [
|
|
938
|
-
(m(!0), S(ue, null, ce(e.item.value, (v, b) => (m(), j(
|
|
938
|
+
(m(!0), S(ue, null, ce(e.item.value, (v, b) => (m(), j(O, {
|
|
939
939
|
key: `${e.item.key}-badge-tag-${b}`,
|
|
940
940
|
class: "config-badge",
|
|
941
941
|
"data-testid": `${e.item.key}-badge-tag-${b}`,
|
|
@@ -962,7 +962,7 @@ const Y = {
|
|
|
962
962
|
class: "method-badge-array",
|
|
963
963
|
"data-testid": `${e.item.key}-badge-methods`
|
|
964
964
|
}, [
|
|
965
|
-
(m(!0), S(ue, null, ce(e.item.value, (v, b) => (m(), j(
|
|
965
|
+
(m(!0), S(ue, null, ce(e.item.value, (v, b) => (m(), j(O, {
|
|
966
966
|
key: `${e.item.key}-badge-method-${b}`,
|
|
967
967
|
appearance: Object.values($(ei)).includes(v.toLowerCase()) ? v.toLowerCase() : "custom",
|
|
968
968
|
class: "config-badge",
|
|
@@ -985,7 +985,7 @@ const Y = {
|
|
|
985
985
|
}, null, 8, ["index", "item"]))), 128))
|
|
986
986
|
], 8, ur)) : (m(), j(_, {
|
|
987
987
|
key: 4,
|
|
988
|
-
text: $(
|
|
988
|
+
text: $(T) ? e.item.value : ""
|
|
989
989
|
}, {
|
|
990
990
|
default: w(() => [
|
|
991
991
|
R("span", {
|
|
@@ -1042,7 +1042,7 @@ const Y = {
|
|
|
1042
1042
|
Ut((r) => ({
|
|
1043
1043
|
eca0976a: `${i.value}ch`
|
|
1044
1044
|
}));
|
|
1045
|
-
const t = e, n =
|
|
1045
|
+
const t = e, n = F(() => t.entityRecord), i = F(() => {
|
|
1046
1046
|
var a;
|
|
1047
1047
|
if (!t.fetcherUrl)
|
|
1048
1048
|
return 0;
|
|
@@ -1694,7 +1694,7 @@ function In(e, t) {
|
|
|
1694
1694
|
};
|
|
1695
1695
|
return n.snippet = $r(n), new oe(t, n);
|
|
1696
1696
|
}
|
|
1697
|
-
function
|
|
1697
|
+
function E(e, t) {
|
|
1698
1698
|
throw In(e, t);
|
|
1699
1699
|
}
|
|
1700
1700
|
function Ke(e, t) {
|
|
@@ -1703,15 +1703,15 @@ function Ke(e, t) {
|
|
|
1703
1703
|
var $t = {
|
|
1704
1704
|
YAML: function(t, n, i) {
|
|
1705
1705
|
var r, o, a;
|
|
1706
|
-
t.version !== null &&
|
|
1706
|
+
t.version !== null && E(t, "duplication of %YAML directive"), i.length !== 1 && E(t, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(i[0]), r === null && E(t, "ill-formed argument of the YAML directive"), o = parseInt(r[1], 10), a = parseInt(r[2], 10), o !== 1 && E(t, "unacceptable YAML version of the document"), t.version = i[0], t.checkLineBreaks = a < 2, a !== 1 && a !== 2 && Ke(t, "unsupported YAML version of the document");
|
|
1707
1707
|
},
|
|
1708
1708
|
TAG: function(t, n, i) {
|
|
1709
1709
|
var r, o;
|
|
1710
|
-
i.length !== 2 &&
|
|
1710
|
+
i.length !== 2 && E(t, "TAG directive accepts exactly two arguments"), r = i[0], o = i[1], wn.test(r) || E(t, "ill-formed tag handle (first argument) of the TAG directive"), ye.call(t.tagMap, r) && E(t, 'there is a previously declared suffix for "' + r + '" tag handle'), Sn.test(o) || E(t, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1711
1711
|
try {
|
|
1712
1712
|
o = decodeURIComponent(o);
|
|
1713
1713
|
} catch {
|
|
1714
|
-
|
|
1714
|
+
E(t, "tag prefix is malformed: " + o);
|
|
1715
1715
|
}
|
|
1716
1716
|
t.tagMap[r] = o;
|
|
1717
1717
|
}
|
|
@@ -1721,21 +1721,21 @@ function ge(e, t, n, i) {
|
|
|
1721
1721
|
if (t < n) {
|
|
1722
1722
|
if (s = e.input.slice(t, n), i)
|
|
1723
1723
|
for (r = 0, o = s.length; r < o; r += 1)
|
|
1724
|
-
a = s.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 ||
|
|
1725
|
-
else ga.test(s) &&
|
|
1724
|
+
a = s.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 || E(e, "expected valid JSON character");
|
|
1725
|
+
else ga.test(s) && E(e, "the stream contains non-printable characters");
|
|
1726
1726
|
e.result += s;
|
|
1727
1727
|
}
|
|
1728
1728
|
}
|
|
1729
1729
|
function Tt(e, t, n, i) {
|
|
1730
1730
|
var r, o, a, s;
|
|
1731
|
-
for (ee.isObject(n) ||
|
|
1731
|
+
for (ee.isObject(n) || E(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(n), a = 0, s = r.length; a < s; a += 1)
|
|
1732
1732
|
o = r[a], ye.call(t, o) || (t[o] = n[o], i[o] = !0);
|
|
1733
1733
|
}
|
|
1734
1734
|
function we(e, t, n, i, r, o, a, s, l) {
|
|
1735
1735
|
var c, d;
|
|
1736
1736
|
if (Array.isArray(r))
|
|
1737
1737
|
for (r = Array.prototype.slice.call(r), c = 0, d = r.length; c < d; c += 1)
|
|
1738
|
-
Array.isArray(r[c]) &&
|
|
1738
|
+
Array.isArray(r[c]) && E(e, "nested arrays are not supported inside keys"), typeof r == "object" && wt(r[c]) === "[object Object]" && (r[c] = "[object Object]");
|
|
1739
1739
|
if (typeof r == "object" && wt(r) === "[object Object]" && (r = "[object Object]"), r = String(r), t === null && (t = {}), i === "tag:yaml.org,2002:merge")
|
|
1740
1740
|
if (Array.isArray(o))
|
|
1741
1741
|
for (c = 0, d = o.length; c < d; c += 1)
|
|
@@ -1743,7 +1743,7 @@ function we(e, t, n, i, r, o, a, s, l) {
|
|
|
1743
1743
|
else
|
|
1744
1744
|
Tt(e, t, o, n);
|
|
1745
1745
|
else
|
|
1746
|
-
!e.json && !ye.call(n, r) && ye.call(t, r) && (e.line = a || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position,
|
|
1746
|
+
!e.json && !ye.call(n, r) && ye.call(t, r) && (e.line = a || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, E(e, "duplicated mapping key")), r === "__proto__" ? Object.defineProperty(t, r, {
|
|
1747
1747
|
configurable: !0,
|
|
1748
1748
|
enumerable: !0,
|
|
1749
1749
|
writable: !0,
|
|
@@ -1753,7 +1753,7 @@ function we(e, t, n, i, r, o, a, s, l) {
|
|
|
1753
1753
|
}
|
|
1754
1754
|
function lt(e) {
|
|
1755
1755
|
var t;
|
|
1756
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1756
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : E(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1757
1757
|
}
|
|
1758
1758
|
function Z(e, t, n) {
|
|
1759
1759
|
for (var i = 0, r = e.input.charCodeAt(e.position); r !== 0; ) {
|
|
@@ -1816,8 +1816,8 @@ function wa(e, t) {
|
|
|
1816
1816
|
i = e.position, e.position++, r = e.position;
|
|
1817
1817
|
else
|
|
1818
1818
|
return !0;
|
|
1819
|
-
else de(n) ? (ge(e, i, r, !0), st(e, Z(e, !1, t)), i = r = e.position) : e.position === e.lineStart && qe(e) ?
|
|
1820
|
-
|
|
1819
|
+
else de(n) ? (ge(e, i, r, !0), st(e, Z(e, !1, t)), i = r = e.position) : e.position === e.lineStart && qe(e) ? E(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
1820
|
+
E(e, "unexpected end of the stream within a single quoted scalar");
|
|
1821
1821
|
}
|
|
1822
1822
|
function Sa(e, t) {
|
|
1823
1823
|
var n, i, r, o, a, s;
|
|
@@ -1833,14 +1833,14 @@ function Sa(e, t) {
|
|
|
1833
1833
|
e.result += Tn[s], e.position++;
|
|
1834
1834
|
else if ((a = xa(s)) > 0) {
|
|
1835
1835
|
for (r = a, o = 0; r > 0; r--)
|
|
1836
|
-
s = e.input.charCodeAt(++e.position), (a = ba(s)) >= 0 ? o = (o << 4) + a :
|
|
1836
|
+
s = e.input.charCodeAt(++e.position), (a = ba(s)) >= 0 ? o = (o << 4) + a : E(e, "expected hexadecimal character");
|
|
1837
1837
|
e.result += ka(o), e.position++;
|
|
1838
1838
|
} else
|
|
1839
|
-
|
|
1839
|
+
E(e, "unknown escape sequence");
|
|
1840
1840
|
n = i = e.position;
|
|
1841
|
-
} else de(s) ? (ge(e, n, i, !0), st(e, Z(e, !1, t)), n = i = e.position) : e.position === e.lineStart && qe(e) ?
|
|
1841
|
+
} else de(s) ? (ge(e, n, i, !0), st(e, Z(e, !1, t)), n = i = e.position) : e.position === e.lineStart && qe(e) ? E(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position);
|
|
1842
1842
|
}
|
|
1843
|
-
|
|
1843
|
+
E(e, "unexpected end of the stream within a double quoted scalar");
|
|
1844
1844
|
}
|
|
1845
1845
|
function $a(e, t) {
|
|
1846
1846
|
var n = !0, i, r, o, a = e.tag, s, l = e.anchor, c, d, u, p, g, h = /* @__PURE__ */ Object.create(null), x, y, k, C;
|
|
@@ -1853,9 +1853,9 @@ function $a(e, t) {
|
|
|
1853
1853
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), C = e.input.charCodeAt(++e.position); C !== 0; ) {
|
|
1854
1854
|
if (Z(e, !0, t), C = e.input.charCodeAt(e.position), C === d)
|
|
1855
1855
|
return e.position++, e.tag = a, e.anchor = l, e.kind = g ? "mapping" : "sequence", e.result = s, !0;
|
|
1856
|
-
n ? C === 44 &&
|
|
1856
|
+
n ? C === 44 && E(e, "expected the node content, but found ','") : E(e, "missed comma between flow collection entries"), y = x = k = null, u = p = !1, C === 63 && (c = e.input.charCodeAt(e.position + 1), le(c) && (u = p = !0, e.position++, Z(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, $e(e, t, Be, !1, !0), y = e.tag, x = e.result, Z(e, !0, t), C = e.input.charCodeAt(e.position), (p || e.line === i) && C === 58 && (u = !0, C = e.input.charCodeAt(++e.position), Z(e, !0, t), $e(e, t, Be, !1, !0), k = e.result), g ? we(e, s, h, y, x, k, i, r, o) : u ? s.push(we(e, null, h, y, x, k, i, r, o)) : s.push(x), Z(e, !0, t), C = e.input.charCodeAt(e.position), C === 44 ? (n = !0, C = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1857
1857
|
}
|
|
1858
|
-
|
|
1858
|
+
E(e, "unexpected end of the stream within a flow collection");
|
|
1859
1859
|
}
|
|
1860
1860
|
function Ta(e, t) {
|
|
1861
1861
|
var n, i, r = We, o = !1, a = !1, s = t, l = 0, c = !1, d, u;
|
|
@@ -1867,9 +1867,9 @@ function Ta(e, t) {
|
|
|
1867
1867
|
return !1;
|
|
1868
1868
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1869
1869
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1870
|
-
We === r ? r = u === 43 ? _t : ha :
|
|
1870
|
+
We === r ? r = u === 43 ? _t : ha : E(e, "repeat of a chomping mode identifier");
|
|
1871
1871
|
else if ((d = Ca(u)) >= 0)
|
|
1872
|
-
d === 0 ?
|
|
1872
|
+
d === 0 ? E(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? E(e, "repeat of an indentation width identifier") : (s = t + d - 1, a = !0);
|
|
1873
1873
|
else
|
|
1874
1874
|
break;
|
|
1875
1875
|
if (ve(u)) {
|
|
@@ -1907,13 +1907,13 @@ function Ta(e, t) {
|
|
|
1907
1907
|
function It(e, t) {
|
|
1908
1908
|
var n, i = e.tag, r = e.anchor, o = [], a, s = !1, l;
|
|
1909
1909
|
if (e.firstTabInLine !== -1) return !1;
|
|
1910
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1910
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, E(e, "tab characters must not be used in indentation")), !(l !== 45 || (a = e.input.charCodeAt(e.position + 1), !le(a)))); ) {
|
|
1911
1911
|
if (s = !0, e.position++, Z(e, !0, -1) && e.lineIndent <= t) {
|
|
1912
1912
|
o.push(null), l = e.input.charCodeAt(e.position);
|
|
1913
1913
|
continue;
|
|
1914
1914
|
}
|
|
1915
1915
|
if (n = e.line, $e(e, t, _n, !1, !0), o.push(e.result), Z(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && l !== 0)
|
|
1916
|
-
|
|
1916
|
+
E(e, "bad indentation of a sequence entry");
|
|
1917
1917
|
else if (e.lineIndent < t)
|
|
1918
1918
|
break;
|
|
1919
1919
|
}
|
|
@@ -1923,8 +1923,8 @@ function Ia(e, t, n) {
|
|
|
1923
1923
|
var i, r, o, a, s, l, c = e.tag, d = e.anchor, u = {}, p = /* @__PURE__ */ Object.create(null), g = null, h = null, x = null, y = !1, k = !1, C;
|
|
1924
1924
|
if (e.firstTabInLine !== -1) return !1;
|
|
1925
1925
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), C = e.input.charCodeAt(e.position); C !== 0; ) {
|
|
1926
|
-
if (!y && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1927
|
-
C === 63 ? (y && (we(e, u, p, g, h, null, a, s, l), g = h = x = null), k = !0, y = !0, r = !0) : y ? (y = !1, r = !0) :
|
|
1926
|
+
if (!y && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, E(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (C === 63 || C === 58) && le(i))
|
|
1927
|
+
C === 63 ? (y && (we(e, u, p, g, h, null, a, s, l), g = h = x = null), k = !0, y = !0, r = !0) : y ? (y = !1, r = !0) : E(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, C = i;
|
|
1928
1928
|
else {
|
|
1929
1929
|
if (a = e.line, s = e.lineStart, l = e.position, !$e(e, n, An, !1, !0))
|
|
1930
1930
|
break;
|
|
@@ -1932,18 +1932,18 @@ function Ia(e, t, n) {
|
|
|
1932
1932
|
for (C = e.input.charCodeAt(e.position); ve(C); )
|
|
1933
1933
|
C = e.input.charCodeAt(++e.position);
|
|
1934
1934
|
if (C === 58)
|
|
1935
|
-
C = e.input.charCodeAt(++e.position), le(C) ||
|
|
1935
|
+
C = e.input.charCodeAt(++e.position), le(C) || E(e, "a whitespace character is expected after the key-value separator within a block mapping"), y && (we(e, u, p, g, h, null, a, s, l), g = h = x = null), k = !0, y = !1, r = !1, g = e.tag, h = e.result;
|
|
1936
1936
|
else if (k)
|
|
1937
|
-
|
|
1937
|
+
E(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1938
1938
|
else
|
|
1939
1939
|
return e.tag = c, e.anchor = d, !0;
|
|
1940
1940
|
} else if (k)
|
|
1941
|
-
|
|
1941
|
+
E(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1942
1942
|
else
|
|
1943
1943
|
return e.tag = c, e.anchor = d, !0;
|
|
1944
1944
|
}
|
|
1945
1945
|
if ((e.line === o || e.lineIndent > t) && (y && (a = e.line, s = e.lineStart, l = e.position), $e(e, t, Re, !0, r) && (y ? h = e.result : x = e.result), y || (we(e, u, p, g, h, x, a, s, l), g = h = x = null), Z(e, !0, -1), C = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && C !== 0)
|
|
1946
|
-
|
|
1946
|
+
E(e, "bad indentation of a mapping entry");
|
|
1947
1947
|
else if (e.lineIndent < t)
|
|
1948
1948
|
break;
|
|
1949
1949
|
}
|
|
@@ -1952,47 +1952,47 @@ function Ia(e, t, n) {
|
|
|
1952
1952
|
function Ea(e) {
|
|
1953
1953
|
var t, n = !1, i = !1, r, o, a;
|
|
1954
1954
|
if (a = e.input.charCodeAt(e.position), a !== 33) return !1;
|
|
1955
|
-
if (e.tag !== null &&
|
|
1955
|
+
if (e.tag !== null && E(e, "duplication of a tag property"), a = e.input.charCodeAt(++e.position), a === 60 ? (n = !0, a = e.input.charCodeAt(++e.position)) : a === 33 ? (i = !0, r = "!!", a = e.input.charCodeAt(++e.position)) : r = "!", t = e.position, n) {
|
|
1956
1956
|
do
|
|
1957
1957
|
a = e.input.charCodeAt(++e.position);
|
|
1958
1958
|
while (a !== 0 && a !== 62);
|
|
1959
|
-
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) :
|
|
1959
|
+
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) : E(e, "unexpected end of the stream within a verbatim tag");
|
|
1960
1960
|
} else {
|
|
1961
1961
|
for (; a !== 0 && !le(a); )
|
|
1962
|
-
a === 33 && (i ?
|
|
1963
|
-
o = e.input.slice(t, e.position), va.test(o) &&
|
|
1962
|
+
a === 33 && (i ? E(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1), wn.test(r) || E(e, "named tag handle cannot contain such characters"), i = !0, t = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
1963
|
+
o = e.input.slice(t, e.position), va.test(o) && E(e, "tag suffix cannot contain flow indicator characters");
|
|
1964
1964
|
}
|
|
1965
|
-
o && !Sn.test(o) &&
|
|
1965
|
+
o && !Sn.test(o) && E(e, "tag name cannot contain such characters: " + o);
|
|
1966
1966
|
try {
|
|
1967
1967
|
o = decodeURIComponent(o);
|
|
1968
1968
|
} catch {
|
|
1969
|
-
|
|
1969
|
+
E(e, "tag name is malformed: " + o);
|
|
1970
1970
|
}
|
|
1971
|
-
return n ? e.tag = o : ye.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o :
|
|
1971
|
+
return n ? e.tag = o : ye.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o : E(e, 'undeclared tag handle "' + r + '"'), !0;
|
|
1972
1972
|
}
|
|
1973
1973
|
function Fa(e) {
|
|
1974
1974
|
var t, n;
|
|
1975
1975
|
if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
|
|
1976
|
-
for (e.anchor !== null &&
|
|
1976
|
+
for (e.anchor !== null && E(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !le(n) && !_e(n); )
|
|
1977
1977
|
n = e.input.charCodeAt(++e.position);
|
|
1978
|
-
return e.position === t &&
|
|
1978
|
+
return e.position === t && E(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1979
1979
|
}
|
|
1980
1980
|
function Oa(e) {
|
|
1981
1981
|
var t, n, i;
|
|
1982
1982
|
if (i = e.input.charCodeAt(e.position), i !== 42) return !1;
|
|
1983
1983
|
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !le(i) && !_e(i); )
|
|
1984
1984
|
i = e.input.charCodeAt(++e.position);
|
|
1985
|
-
return e.position === t &&
|
|
1985
|
+
return e.position === t && E(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), ye.call(e.anchorMap, n) || E(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], Z(e, !0, -1), !0;
|
|
1986
1986
|
}
|
|
1987
1987
|
function $e(e, t, n, i, r) {
|
|
1988
1988
|
var o, a, s, l = 1, c = !1, d = !1, u, p, g, h, x, y;
|
|
1989
1989
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = s = Re === n || _n === n, i && Z(e, !0, -1) && (c = !0, e.lineIndent > t ? l = 1 : e.lineIndent === t ? l = 0 : e.lineIndent < t && (l = -1)), l === 1)
|
|
1990
1990
|
for (; Ea(e) || Fa(e); )
|
|
1991
1991
|
Z(e, !0, -1) ? (c = !0, s = o, e.lineIndent > t ? l = 1 : e.lineIndent === t ? l = 0 : e.lineIndent < t && (l = -1)) : s = !1;
|
|
1992
|
-
if (s && (s = c || r), (l === 1 || Re === n) && (Be === n || An === n ? x = t : x = t + 1, y = e.position - e.lineStart, l === 1 ? s && (It(e, y) || Ia(e, y, x)) || $a(e, x) ? d = !0 : (a && Ta(e, x) || wa(e, x) || Sa(e, x) ? d = !0 : Oa(e) ? (d = !0, (e.tag !== null || e.anchor !== null) &&
|
|
1992
|
+
if (s && (s = c || r), (l === 1 || Re === n) && (Be === n || An === n ? x = t : x = t + 1, y = e.position - e.lineStart, l === 1 ? s && (It(e, y) || Ia(e, y, x)) || $a(e, x) ? d = !0 : (a && Ta(e, x) || wa(e, x) || Sa(e, x) ? d = !0 : Oa(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && E(e, "alias node should not have any properties")) : _a(e, x, Be === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && It(e, y))), e.tag === null)
|
|
1993
1993
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1994
1994
|
else if (e.tag === "?") {
|
|
1995
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
1995
|
+
for (e.result !== null && e.kind !== "scalar" && E(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, p = e.implicitTypes.length; u < p; u += 1)
|
|
1996
1996
|
if (h = e.implicitTypes[u], h.resolve(e.result)) {
|
|
1997
1997
|
e.result = h.construct(e.result), e.tag = h.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1998
1998
|
break;
|
|
@@ -2006,7 +2006,7 @@ function $e(e, t, n, i, r) {
|
|
|
2006
2006
|
h = g[u];
|
|
2007
2007
|
break;
|
|
2008
2008
|
}
|
|
2009
|
-
h ||
|
|
2009
|
+
h || E(e, "unknown tag !<" + e.tag + ">"), e.result !== null && h.kind !== e.kind && E(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + h.kind + '", not "' + e.kind + '"'), h.resolve(e.result, e.tag) ? (e.result = h.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : E(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2010
2010
|
}
|
|
2011
2011
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2012
2012
|
}
|
|
@@ -2015,7 +2015,7 @@ function La(e) {
|
|
|
2015
2015
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (a = e.input.charCodeAt(e.position)) !== 0 && (Z(e, !0, -1), a = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || a !== 37)); ) {
|
|
2016
2016
|
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !le(a); )
|
|
2017
2017
|
a = e.input.charCodeAt(++e.position);
|
|
2018
|
-
for (i = e.input.slice(n, e.position), r = [], i.length < 1 &&
|
|
2018
|
+
for (i = e.input.slice(n, e.position), r = [], i.length < 1 && E(e, "directive name must not be less than one character in length"); a !== 0; ) {
|
|
2019
2019
|
for (; ve(a); )
|
|
2020
2020
|
a = e.input.charCodeAt(++e.position);
|
|
2021
2021
|
if (a === 35) {
|
|
@@ -2031,12 +2031,12 @@ function La(e) {
|
|
|
2031
2031
|
}
|
|
2032
2032
|
a !== 0 && lt(e), ye.call($t, i) ? $t[i](e, i, r) : Ke(e, 'unknown document directive "' + i + '"');
|
|
2033
2033
|
}
|
|
2034
|
-
if (Z(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, Z(e, !0, -1)) : o &&
|
|
2034
|
+
if (Z(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, Z(e, !0, -1)) : o && E(e, "directives end mark is expected"), $e(e, e.lineIndent - 1, Re, !1, !0), Z(e, !0, -1), e.checkLineBreaks && ya.test(e.input.slice(t, e.position)) && Ke(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && qe(e)) {
|
|
2035
2035
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, Z(e, !0, -1));
|
|
2036
2036
|
return;
|
|
2037
2037
|
}
|
|
2038
2038
|
if (e.position < e.length - 1)
|
|
2039
|
-
|
|
2039
|
+
E(e, "end of the stream or a document separator is expected");
|
|
2040
2040
|
else
|
|
2041
2041
|
return;
|
|
2042
2042
|
}
|
|
@@ -2044,7 +2044,7 @@ function En(e, t) {
|
|
|
2044
2044
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2045
2045
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2046
2046
|
var n = new Aa(e, t), i = e.indexOf("\0");
|
|
2047
|
-
for (i !== -1 && (n.position = i,
|
|
2047
|
+
for (i !== -1 && (n.position = i, E(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2048
2048
|
n.lineIndent += 1, n.position += 1;
|
|
2049
2049
|
for (; n.position < n.length - 1; )
|
|
2050
2050
|
La(n);
|
|
@@ -2069,22 +2069,22 @@ function Ra(e, t) {
|
|
|
2069
2069
|
var Ka = Ba, Na = Ra, Fn = {
|
|
2070
2070
|
loadAll: Ka,
|
|
2071
2071
|
load: Na
|
|
2072
|
-
}, On = Object.prototype.toString, Ln = Object.prototype.hasOwnProperty, ct = 65279, Ma = 9, Ee = 10, ja = 13, Da = 32, Pa = 33, Ua = 34, Qe = 35, qa = 37, Ha = 38, Va = 39, Ya = 42, Bn = 44, Wa = 45, Ne = 58, Ja = 61, Ga = 62, za = 63, Qa = 64, Rn = 91, Kn = 93, Za = 96, Nn = 123, Xa = 124, Mn = 125,
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2072
|
+
}, On = Object.prototype.toString, Ln = Object.prototype.hasOwnProperty, ct = 65279, Ma = 9, Ee = 10, ja = 13, Da = 32, Pa = 33, Ua = 34, Qe = 35, qa = 37, Ha = 38, Va = 39, Ya = 42, Bn = 44, Wa = 45, Ne = 58, Ja = 61, Ga = 62, za = 63, Qa = 64, Rn = 91, Kn = 93, Za = 96, Nn = 123, Xa = 124, Mn = 125, re = {};
|
|
2073
|
+
re[0] = "\\0";
|
|
2074
|
+
re[7] = "\\a";
|
|
2075
|
+
re[8] = "\\b";
|
|
2076
|
+
re[9] = "\\t";
|
|
2077
|
+
re[10] = "\\n";
|
|
2078
|
+
re[11] = "\\v";
|
|
2079
|
+
re[12] = "\\f";
|
|
2080
|
+
re[13] = "\\r";
|
|
2081
|
+
re[27] = "\\e";
|
|
2082
|
+
re[34] = '\\"';
|
|
2083
|
+
re[92] = "\\\\";
|
|
2084
|
+
re[133] = "\\N";
|
|
2085
|
+
re[160] = "\\_";
|
|
2086
|
+
re[8232] = "\\L";
|
|
2087
|
+
re[8233] = "\\P";
|
|
2088
2088
|
var eo = [
|
|
2089
2089
|
"y",
|
|
2090
2090
|
"Y",
|
|
@@ -2270,7 +2270,7 @@ function Rt(e, t) {
|
|
|
2270
2270
|
}
|
|
2271
2271
|
function po(e) {
|
|
2272
2272
|
for (var t = "", n = 0, i, r = 0; r < e.length; n >= 65536 ? r += 2 : r++)
|
|
2273
|
-
n = Te(e, r), i =
|
|
2273
|
+
n = Te(e, r), i = re[n], !i && Oe(n) ? (t += e[r], n >= 65536 && (t += e[r + 1])) : t += i || io(n);
|
|
2274
2274
|
return t;
|
|
2275
2275
|
}
|
|
2276
2276
|
function mo(e, t, n) {
|
|
@@ -2420,7 +2420,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2420
2420
|
}
|
|
2421
2421
|
},
|
|
2422
2422
|
setup(e) {
|
|
2423
|
-
const t = e, n =
|
|
2423
|
+
const t = e, n = F(() => {
|
|
2424
2424
|
const i = Object.fromEntries(Object.entries(t.entityRecord).filter(([, r]) => r !== null && r !== "" && (Array.isArray(r) ? r.length !== 0 : !0)));
|
|
2425
2425
|
return Object.keys(i).length === 0 && i.constructor === Object ? "" : Ro.dump(i).trim();
|
|
2426
2426
|
});
|
|
@@ -2437,7 +2437,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2437
2437
|
]);
|
|
2438
2438
|
};
|
|
2439
2439
|
}
|
|
2440
|
-
}), No = { class: "terraform-config config-card-code-block" },
|
|
2440
|
+
}), No = { class: "terraform-config config-card-code-block" }, ie = " ", Hn = /* @__PURE__ */ z({
|
|
2441
2441
|
__name: "TerraformCodeBlock",
|
|
2442
2442
|
props: {
|
|
2443
2443
|
/** A record to indicate the entity's configuration, used to populate the Terraform code block */
|
|
@@ -2453,11 +2453,16 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2453
2453
|
credentialType: {
|
|
2454
2454
|
type: String,
|
|
2455
2455
|
default: ""
|
|
2456
|
+
},
|
|
2457
|
+
subEntityType: {
|
|
2458
|
+
// only for event gateway entities
|
|
2459
|
+
type: String,
|
|
2460
|
+
default: ""
|
|
2456
2461
|
}
|
|
2457
2462
|
},
|
|
2458
2463
|
setup(e) {
|
|
2459
|
-
const t = e, n =
|
|
2460
|
-
const d =
|
|
2464
|
+
const t = e, n = F(() => ci.includes(t.entityType)), i = (l, c) => {
|
|
2465
|
+
const d = ie;
|
|
2461
2466
|
let u = "";
|
|
2462
2467
|
return typeof l == "string" ? u += `${d}${c} = "${l}"
|
|
2463
2468
|
` : u += `${d}${c} = ${String(l ?? "")}
|
|
@@ -2465,7 +2470,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2465
2470
|
}, r = (l, c, d = "") => {
|
|
2466
2471
|
if (typeof l != "object")
|
|
2467
2472
|
return "Invalid object";
|
|
2468
|
-
const u =
|
|
2473
|
+
const u = ie + d;
|
|
2469
2474
|
let p = "";
|
|
2470
2475
|
if (c && (p += `${u}${c} = {
|
|
2471
2476
|
`), l === null)
|
|
@@ -2474,22 +2479,22 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2474
2479
|
let h = "";
|
|
2475
2480
|
for (const [x, y] of Object.entries(g))
|
|
2476
2481
|
Array.isArray(y) ? y.length === 0 ? h = "[]" : (h = `[
|
|
2477
|
-
`, h += o(y, void 0, u), h += `${u}${
|
|
2478
|
-
`, h += r(y, void 0, u), h += `${u}${
|
|
2482
|
+
`, h += o(y, void 0, u), h += `${u}${ie}]`) : y && typeof y == "object" ? (h = `{
|
|
2483
|
+
`, h += r(y, void 0, u), h += `${u}${ie}}`) : h = String(y ?? ""), typeof y == "string" && (h = `"${h}"`), p += `${u}${ie}${x} = ${h}
|
|
2479
2484
|
`;
|
|
2480
2485
|
return c ? p += `${u}}
|
|
2481
2486
|
` : p;
|
|
2482
2487
|
}, o = (l, c, d = "") => {
|
|
2483
2488
|
if (!Array.isArray(l))
|
|
2484
2489
|
return "Invalid array";
|
|
2485
|
-
const u =
|
|
2490
|
+
const u = ie + d;
|
|
2486
2491
|
let p = "";
|
|
2487
2492
|
c && (l.length === 0 ? p += `${u}${c} = [` : p += `${u}${c} = [
|
|
2488
2493
|
`);
|
|
2489
2494
|
for (let g = 0; g < l.length; g++) {
|
|
2490
2495
|
const h = l[g];
|
|
2491
|
-
typeof h == "object" ? (p += `${u}${
|
|
2492
|
-
`, p += r(h, void 0, u), p += `${u}${
|
|
2496
|
+
typeof h == "object" ? (p += `${u}${ie}{
|
|
2497
|
+
`, p += r(h, void 0, u), p += `${u}${ie}}`) : typeof h == "string" ? p += `${u}${ie}"${h}"` : p += `${u}${ie}${String(h ?? "")}`, g < l.length - 1 && (p += ","), p += `
|
|
2493
2498
|
`;
|
|
2494
2499
|
}
|
|
2495
2500
|
return c && (l.length === 0 ? p += `]
|
|
@@ -2500,28 +2505,29 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2500
2505
|
for (const [d, u] of Object.entries(l))
|
|
2501
2506
|
Array.isArray(u) ? c += o(u, d) : typeof u == "object" ? c += r(u, d) : c += i(u, d);
|
|
2502
2507
|
return c;
|
|
2503
|
-
}, s =
|
|
2508
|
+
}, s = F(() => {
|
|
2504
2509
|
var p, g, h, x, y, k, C;
|
|
2505
|
-
const l = Object.fromEntries(Object.entries(t.entityRecord).filter(([,
|
|
2510
|
+
const l = Object.fromEntries(Object.entries(t.entityRecord).filter(([, T]) => T != null)), c = t.entityRecord.config ? Object.fromEntries(Object.entries((p = t.entityRecord) == null ? void 0 : p.config).filter(([, T]) => T != null)) : void 0;
|
|
2506
2511
|
if (c && (l.config = c), Object.keys(l).length === 0)
|
|
2507
2512
|
return "";
|
|
2508
2513
|
delete l.id;
|
|
2509
2514
|
let d = "", u = "";
|
|
2510
|
-
if ((g = l.service) != null && g.id ? (u = "service", delete l.service) : (h = l.route) != null && h.id ? (u = "route", delete l.route) : (x = l.consumer) != null && x.id ? (u = "consumer", delete l.consumer) : (y = l.consumer_group) != null && y.id ? (u = "consumer_group", delete l.consumer_group) : (k = l.certificate) != null && k.id ? (u = "certificate", delete l.certificate) : (C = l.set) != null && C.id && (u = "set", delete l.set), n.value)
|
|
2511
|
-
|
|
2512
|
-
|
|
2515
|
+
if ((g = l.service) != null && g.id ? (u = "service", delete l.service) : (h = l.route) != null && h.id ? (u = "route", delete l.route) : (x = l.consumer) != null && x.id ? (u = "consumer", delete l.consumer) : (y = l.consumer_group) != null && y.id ? (u = "consumer_group", delete l.consumer_group) : (k = l.certificate) != null && k.id ? (u = "certificate", delete l.certificate) : (C = l.set) != null && C.id && (u = "set", delete l.set), n.value) {
|
|
2516
|
+
const T = t.subEntityType ? `${t.entityType}_${t.subEntityType}` : t.entityType;
|
|
2517
|
+
d += `resource "konnect_event_gateway_${T}" "my_eventgateway${T.replaceAll("_", "")}" {
|
|
2518
|
+
`, d += `${ie}provider = konnect-beta
|
|
2513
2519
|
`;
|
|
2514
|
-
else if (t.entityType === "plugin") {
|
|
2515
|
-
const
|
|
2516
|
-
delete l.name, d += `resource "konnect_gateway_plugin_${
|
|
2520
|
+
} else if (t.entityType === "plugin") {
|
|
2521
|
+
const T = t.credentialType.replace(/-/g, "_") || (l.name + "").replace(/-/g, "_");
|
|
2522
|
+
delete l.name, d += `resource "konnect_gateway_plugin_${T}" "my_${T}" {
|
|
2517
2523
|
`;
|
|
2518
2524
|
} else
|
|
2519
2525
|
d += `resource "konnect_gateway_${t.entityType}" "my_${t.entityType}" {
|
|
2520
2526
|
`;
|
|
2521
|
-
return d += a(l), n.value ? u && (d += `${
|
|
2522
|
-
`, d += `${
|
|
2523
|
-
`, d += `${
|
|
2524
|
-
`) : d += `${
|
|
2527
|
+
return d += a(l), n.value ? u && (d += `${ie}${u} = {
|
|
2528
|
+
`, d += `${ie}${ie}id = konnect_gateway_${u}.my_${u}.id
|
|
2529
|
+
`, d += `${ie}}
|
|
2530
|
+
`) : d += `${ie}control_plane_id = konnect_gateway_control_plane.my_konnect_cp.id
|
|
2525
2531
|
`, d += `}
|
|
2526
2532
|
`, d;
|
|
2527
2533
|
});
|
|
@@ -2558,6 +2564,11 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2558
2564
|
required: !0,
|
|
2559
2565
|
validator: (e) => Pe.includes(e)
|
|
2560
2566
|
},
|
|
2567
|
+
subEntityType: {
|
|
2568
|
+
// only for event gateway entities
|
|
2569
|
+
type: String,
|
|
2570
|
+
default: ""
|
|
2571
|
+
},
|
|
2561
2572
|
propertyCollections: {
|
|
2562
2573
|
type: Object,
|
|
2563
2574
|
required: !1,
|
|
@@ -2596,14 +2607,14 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2596
2607
|
}
|
|
2597
2608
|
},
|
|
2598
2609
|
setup(e) {
|
|
2599
|
-
const t = e, n = De(), { i18n: { t: i } } = Y.useI18n(), r = (s) => !!(s.tooltip || n[`${s.key}-label-tooltip`]), o =
|
|
2610
|
+
const t = e, n = De(), { i18n: { t: i } } = Y.useI18n(), r = (s) => !!(s.tooltip || n[`${s.key}-label-tooltip`]), o = F(() => {
|
|
2600
2611
|
if (!t.record)
|
|
2601
2612
|
return t.record;
|
|
2602
2613
|
let s = t.record;
|
|
2603
2614
|
t.codeBlockRecordFormatter && (s = t.codeBlockRecordFormatter(s, t.format));
|
|
2604
2615
|
const l = JSON.parse(JSON.stringify(s));
|
|
2605
2616
|
return delete l.created_at, delete l.updated_at, l;
|
|
2606
|
-
}), a =
|
|
2617
|
+
}), a = F(() => t.fetcherUrl.replace(/(\?|&)__ui_data=true/, ""));
|
|
2607
2618
|
return (s, l) => (m(), S(ue, null, [
|
|
2608
2619
|
e.format === "structured" ? (m(), S("div", Mo, [
|
|
2609
2620
|
(m(!0), S(ue, null, ce(e.propListTypes, (c) => (m(), S("div", {
|
|
@@ -2653,11 +2664,12 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2653
2664
|
e.format === "terraform" && o.value ? (m(), j(Hn, {
|
|
2654
2665
|
key: 3,
|
|
2655
2666
|
"entity-record": o.value,
|
|
2656
|
-
"entity-type": t.entityType
|
|
2657
|
-
|
|
2667
|
+
"entity-type": t.entityType,
|
|
2668
|
+
"sub-entity-type": t.subEntityType
|
|
2669
|
+
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])) : N("", !0)
|
|
2658
2670
|
], 64));
|
|
2659
2671
|
}
|
|
2660
|
-
}), Uo = /* @__PURE__ */ se(Po, [["__scopeId", "data-v-
|
|
2672
|
+
}), Uo = /* @__PURE__ */ se(Po, [["__scopeId", "data-v-a7689049"]]), qo = {
|
|
2661
2673
|
class: "config-card-title",
|
|
2662
2674
|
"data-testid": "config-card-title"
|
|
2663
2675
|
}, Ho = { class: "config-card-actions" }, Vo = ["href"], Yo = { class: "config-card-details-section" }, Wo = /* @__PURE__ */ z({
|
|
@@ -2683,6 +2695,13 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2683
2695
|
required: !0,
|
|
2684
2696
|
validator: (e) => Pe.includes(e)
|
|
2685
2697
|
},
|
|
2698
|
+
/**
|
|
2699
|
+
* Sub Entity type, required to generate terraform code for event gateway entities
|
|
2700
|
+
*/
|
|
2701
|
+
subEntityType: {
|
|
2702
|
+
type: String,
|
|
2703
|
+
default: ""
|
|
2704
|
+
},
|
|
2686
2705
|
/** Record key that contains the plugin configuration */
|
|
2687
2706
|
pluginConfigKey: {
|
|
2688
2707
|
type: String,
|
|
@@ -2775,10 +2794,10 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2775
2794
|
},
|
|
2776
2795
|
emits: ["loading", "fetch:success", "fetch:error", "configFormatChange"],
|
|
2777
2796
|
setup(e, { emit: t }) {
|
|
2778
|
-
var
|
|
2797
|
+
var O;
|
|
2779
2798
|
const n = t, i = e, { i18n: { t: r } } = Y.useI18n(), { getMessageFromError: o } = Y.useErrors(), { convertKeyToTitle: a } = Y.useStringHelpers();
|
|
2780
2799
|
Y.useSubSchema(i.pluginConfigKey);
|
|
2781
|
-
const { axiosInstance: s } = Y.useAxios((
|
|
2800
|
+
const { axiosInstance: s } = Y.useAxios((O = i.config) == null ? void 0 : O.axiosRequestConfig), l = [
|
|
2782
2801
|
{
|
|
2783
2802
|
label: r("baseConfigCard.general.structuredFormat"),
|
|
2784
2803
|
value: "structured",
|
|
@@ -2851,22 +2870,22 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2851
2870
|
// the last property displayed
|
|
2852
2871
|
section: ae.Basic
|
|
2853
2872
|
}
|
|
2854
|
-
}, h = K(!1), x = K(!1), y = K(""), k = K({}), C =
|
|
2873
|
+
}, h = K(!1), x = K(!1), y = K(""), k = K({}), C = F(() => {
|
|
2855
2874
|
var b, H, J;
|
|
2856
2875
|
if (!k.value)
|
|
2857
2876
|
return [];
|
|
2858
2877
|
const f = [], v = Object.keys(k.value).length;
|
|
2859
|
-
for (const
|
|
2860
|
-
if (
|
|
2861
|
-
const B = (H = (b = i.configSchema) == null ? void 0 : b[
|
|
2878
|
+
for (const I in k.value) {
|
|
2879
|
+
if (I === "__ui_data") continue;
|
|
2880
|
+
const B = (H = (b = i.configSchema) == null ? void 0 : b[I]) == null ? void 0 : H.order, G = (J = g[I]) == null ? void 0 : J.order;
|
|
2862
2881
|
let U = v;
|
|
2863
|
-
(G || G === 0) && (U = G === -1 ? v + 1 : G), B && (U = B === -1 ? v + 1 : B), f.push([
|
|
2882
|
+
(G || G === 0) && (U = G === -1 ? v + 1 : G), B && (U = B === -1 ? v + 1 : B), f.push([I, U]);
|
|
2864
2883
|
}
|
|
2865
|
-
return f.sort(function(
|
|
2866
|
-
return
|
|
2867
|
-
}), f.map((
|
|
2884
|
+
return f.sort(function(I, B) {
|
|
2885
|
+
return I[1] - B[1];
|
|
2886
|
+
}), f.map((I) => {
|
|
2868
2887
|
var dt, ft;
|
|
2869
|
-
const B =
|
|
2888
|
+
const B = I[0], G = (dt = k.value) == null ? void 0 : dt[B], U = ((ft = i.configSchema) == null ? void 0 : ft[B]) || {}, Q = g[B];
|
|
2870
2889
|
return {
|
|
2871
2890
|
key: B,
|
|
2872
2891
|
value: G,
|
|
@@ -2876,22 +2895,22 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2876
2895
|
tooltip: U.tooltip ?? ((Q == null ? void 0 : Q.tooltip) || void 0),
|
|
2877
2896
|
section: U.section ?? ((Q == null ? void 0 : Q.section) || ae.Advanced)
|
|
2878
2897
|
};
|
|
2879
|
-
}).filter((
|
|
2880
|
-
}),
|
|
2898
|
+
}).filter((I) => !I.hidden && I.key !== i.pluginConfigKey);
|
|
2899
|
+
}), T = F(() => {
|
|
2881
2900
|
var H, J;
|
|
2882
2901
|
if (!k.value || !i.pluginConfigKey)
|
|
2883
2902
|
return [];
|
|
2884
2903
|
const f = k.value[i.pluginConfigKey] || {}, v = Object.keys(f).length, b = [];
|
|
2885
|
-
for (const
|
|
2886
|
-
const B = (J = (H = i.pluginConfigSchema) == null ? void 0 : H[
|
|
2904
|
+
for (const I in f) {
|
|
2905
|
+
const B = (J = (H = i.pluginConfigSchema) == null ? void 0 : H[I]) == null ? void 0 : J.order, G = f[I];
|
|
2887
2906
|
let U = G != null && G !== "" ? v - 1 : v;
|
|
2888
|
-
B && (U = B === -1 ? v + 1 : B), b.push([
|
|
2907
|
+
B && (U = B === -1 ? v + 1 : B), b.push([I, U]);
|
|
2889
2908
|
}
|
|
2890
|
-
return b.sort(function(
|
|
2891
|
-
return
|
|
2892
|
-
}), b.map((
|
|
2909
|
+
return b.sort(function(I, B) {
|
|
2910
|
+
return I[1] - B[1];
|
|
2911
|
+
}), b.map((I) => {
|
|
2893
2912
|
var Q;
|
|
2894
|
-
const B =
|
|
2913
|
+
const B = I[0], G = f[B], U = ((Q = i.pluginConfigSchema) == null ? void 0 : Q[B]) || {};
|
|
2895
2914
|
return {
|
|
2896
2915
|
key: B,
|
|
2897
2916
|
value: G,
|
|
@@ -2901,22 +2920,22 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2901
2920
|
tooltip: U.tooltip ?? void 0,
|
|
2902
2921
|
section: ae.Plugin
|
|
2903
2922
|
};
|
|
2904
|
-
}).filter((
|
|
2905
|
-
}), W =
|
|
2923
|
+
}).filter((I) => !I.hidden);
|
|
2924
|
+
}), W = F(() => {
|
|
2906
2925
|
var H, J;
|
|
2907
2926
|
if (!k.value || !i.policyConfigKey)
|
|
2908
2927
|
return [];
|
|
2909
2928
|
const f = k.value[i.policyConfigKey] || {}, v = Object.keys(f).length, b = [];
|
|
2910
|
-
for (const
|
|
2911
|
-
const B = (J = (H = i.policyConfigSchema) == null ? void 0 : H[
|
|
2929
|
+
for (const I in f) {
|
|
2930
|
+
const B = (J = (H = i.policyConfigSchema) == null ? void 0 : H[I]) == null ? void 0 : J.order, G = f[I];
|
|
2912
2931
|
let U = G != null && G !== "" ? v - 1 : v;
|
|
2913
|
-
B && (U = B === -1 ? v + 1 : B), b.push([
|
|
2932
|
+
B && (U = B === -1 ? v + 1 : B), b.push([I, U]);
|
|
2914
2933
|
}
|
|
2915
|
-
return b.sort(function(
|
|
2916
|
-
return
|
|
2917
|
-
}), b.map((
|
|
2934
|
+
return b.sort(function(I, B) {
|
|
2935
|
+
return I[1] - B[1];
|
|
2936
|
+
}), b.map((I) => {
|
|
2918
2937
|
var Q;
|
|
2919
|
-
const B =
|
|
2938
|
+
const B = I[0], G = f[B], U = ((Q = i.policyConfigSchema) == null ? void 0 : Q[B]) || {};
|
|
2920
2939
|
return {
|
|
2921
2940
|
key: B,
|
|
2922
2941
|
value: G,
|
|
@@ -2926,19 +2945,19 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2926
2945
|
tooltip: U.tooltip ?? void 0,
|
|
2927
2946
|
section: ae.Policy
|
|
2928
2947
|
};
|
|
2929
|
-
}).filter((
|
|
2930
|
-
}), X =
|
|
2931
|
-
var f, v, b, H, J,
|
|
2948
|
+
}).filter((I) => !I.hidden);
|
|
2949
|
+
}), X = F(() => {
|
|
2950
|
+
var f, v, b, H, J, I;
|
|
2932
2951
|
return {
|
|
2933
2952
|
basic: (f = C.value) == null ? void 0 : f.filter((B) => B.section === ae.Basic),
|
|
2934
2953
|
advanced: (v = C.value) == null ? void 0 : v.filter((B) => B.section === ae.Advanced),
|
|
2935
|
-
plugin: (H =
|
|
2936
|
-
policy: (
|
|
2954
|
+
plugin: (H = T.value) == null ? void 0 : H.concat((b = C.value) == null ? void 0 : b.filter((B) => B.section === ae.Plugin)),
|
|
2955
|
+
policy: (I = W.value) == null ? void 0 : I.concat((J = C.value) == null ? void 0 : J.filter((B) => B.section === ae.Policy))
|
|
2937
2956
|
};
|
|
2938
|
-
}), _ =
|
|
2957
|
+
}), _ = F(() => {
|
|
2939
2958
|
const f = [];
|
|
2940
2959
|
return X.value.basic.length && f.push("basic"), X.value.advanced.length && f.push("advanced"), X.value.plugin.length && f.push("plugin"), X.value.policy.length && f.push("policy"), f;
|
|
2941
|
-
}), A =
|
|
2960
|
+
}), A = F(() => {
|
|
2942
2961
|
var v, b;
|
|
2943
2962
|
let f = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
2944
2963
|
return i.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((v = i.config) == null ? void 0 : v.controlPlaneId) || "") : i.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (b = i.config) != null && b.workspace ? `/${i.config.workspace}` : "")), f = f.replace(/{id}/gi, i.config.entityId), f;
|
|
@@ -2965,7 +2984,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2965
2984
|
h.value = !1;
|
|
2966
2985
|
}
|
|
2967
2986
|
}), (f, v) => {
|
|
2968
|
-
const b = P("KLabel"), H = P("KSelect"), J = P("KButton"),
|
|
2987
|
+
const b = P("KLabel"), H = P("KSelect"), J = P("KButton"), I = P("KSkeleton"), B = P("KEmptyState"), G = P("KCard");
|
|
2969
2988
|
return m(), j(G, {
|
|
2970
2989
|
class: "kong-ui-entity-base-config-card",
|
|
2971
2990
|
"title-tag": e.titleTag
|
|
@@ -3009,7 +3028,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3009
3028
|
])
|
|
3010
3029
|
]),
|
|
3011
3030
|
default: w(() => [
|
|
3012
|
-
h.value ? (m(), j(
|
|
3031
|
+
h.value ? (m(), j(I, {
|
|
3013
3032
|
key: 0,
|
|
3014
3033
|
"data-testid": "config-card-loader",
|
|
3015
3034
|
"table-columns": 2,
|
|
@@ -3033,7 +3052,8 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3033
3052
|
format: d.value,
|
|
3034
3053
|
"prop-list-types": _.value,
|
|
3035
3054
|
"property-collections": X.value,
|
|
3036
|
-
record: k.value
|
|
3055
|
+
record: k.value,
|
|
3056
|
+
"sub-entity-type": e.subEntityType
|
|
3037
3057
|
}, Se({ _: 2 }, [
|
|
3038
3058
|
ce(Object.keys(f.$slots), (U) => ({
|
|
3039
3059
|
name: U,
|
|
@@ -3041,7 +3061,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3041
3061
|
D(f.$slots, U, qt({ record: k.value }, Q), void 0, !0)
|
|
3042
3062
|
])
|
|
3043
3063
|
}))
|
|
3044
|
-
]), 1032, ["code-block-record-formatter", "config", "entity-type", "fetcher-url", "format", "prop-list-types", "property-collections", "record"])
|
|
3064
|
+
]), 1032, ["code-block-record-formatter", "config", "entity-type", "fetcher-url", "format", "prop-list-types", "property-collections", "record", "sub-entity-type"])
|
|
3045
3065
|
])
|
|
3046
3066
|
]),
|
|
3047
3067
|
_: 2
|
|
@@ -3060,7 +3080,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3060
3080
|
]), 1032, ["title-tag"]);
|
|
3061
3081
|
};
|
|
3062
3082
|
}
|
|
3063
|
-
}), ps = /* @__PURE__ */ se(Wo, [["__scopeId", "data-v-
|
|
3083
|
+
}), ps = /* @__PURE__ */ se(Wo, [["__scopeId", "data-v-f2b42324"]]), Jo = ["novalidate"], Go = /* @__PURE__ */ z({
|
|
3064
3084
|
__name: "EntityBaseForm",
|
|
3065
3085
|
props: {
|
|
3066
3086
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3176,17 +3196,17 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3176
3196
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel", "codeBlockTabChange"],
|
|
3177
3197
|
setup(e, { expose: t, emit: n }) {
|
|
3178
3198
|
var X;
|
|
3179
|
-
const i = n, r = e, o = oi(), { i18n: { t: a } } = Y.useI18n(), { getMessageFromError: s } = Y.useErrors(), { axiosInstance: l } = Y.useAxios((X = r.config) == null ? void 0 : X.axiosRequestConfig), c = K(!1), d =
|
|
3180
|
-
var A,
|
|
3199
|
+
const i = n, r = e, o = oi(), { i18n: { t: a } } = Y.useI18n(), { getMessageFromError: s } = Y.useErrors(), { axiosInstance: l } = Y.useAxios((X = r.config) == null ? void 0 : X.axiosRequestConfig), c = K(!1), d = F(() => !!r.editId), u = K(!1), p = K(""), g = F(() => r.canSubmit === !1 || r.isReadonly), h = K(!1), x = F(() => {
|
|
3200
|
+
var A, O;
|
|
3181
3201
|
let _ = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3182
|
-
return r.config.app === "konnect" ? _ = _.replace(/{controlPlaneId}/gi, ((A = r.config) == null ? void 0 : A.controlPlaneId) || "") : r.config.app === "kongManager" && (_ = _.replace(/\/{workspace}/gi, (
|
|
3202
|
+
return r.config.app === "konnect" ? _ = _.replace(/{controlPlaneId}/gi, ((A = r.config) == null ? void 0 : A.controlPlaneId) || "") : r.config.app === "kongManager" && (_ = _.replace(/\/{workspace}/gi, (O = r.config) != null && O.workspace ? `/${r.config.workspace}` : "")), r.editId ? (_ = _.replace(/{id}/gi, r.editId), _) : (_ = _.replace(/\/{id}/gi, ""), _);
|
|
3183
3203
|
}), y = () => {
|
|
3184
3204
|
h.value = !h.value;
|
|
3185
3205
|
}, k = () => {
|
|
3186
3206
|
r.config.cancelRoute ? o.push(r.config.cancelRoute) : C();
|
|
3187
3207
|
}, C = () => {
|
|
3188
3208
|
i("cancel");
|
|
3189
|
-
},
|
|
3209
|
+
}, T = () => {
|
|
3190
3210
|
g.value || i("submit");
|
|
3191
3211
|
}, W = K([
|
|
3192
3212
|
{
|
|
@@ -3218,12 +3238,12 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3218
3238
|
}), t({
|
|
3219
3239
|
viewConfig: y,
|
|
3220
3240
|
formCancel: C,
|
|
3221
|
-
formSubmit:
|
|
3241
|
+
formSubmit: T
|
|
3222
3242
|
}), (_, A) => {
|
|
3223
|
-
const
|
|
3243
|
+
const O = P("KSkeleton"), f = P("KEmptyState"), v = P("KAlert"), b = P("KButton"), H = P("KTabs"), J = P("KSlideout");
|
|
3224
3244
|
return m(), j(je(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3225
3245
|
default: w(() => [
|
|
3226
|
-
c.value ? (m(), j(
|
|
3246
|
+
c.value ? (m(), j(O, {
|
|
3227
3247
|
key: 0,
|
|
3228
3248
|
type: "form"
|
|
3229
3249
|
})) : u.value ? (m(), j(f, {
|
|
@@ -3242,7 +3262,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3242
3262
|
"data-testid": "form-content",
|
|
3243
3263
|
novalidate: r.noValidate,
|
|
3244
3264
|
onReset: Le(C, ["prevent"]),
|
|
3245
|
-
onSubmit: Le(
|
|
3265
|
+
onSubmit: Le(T, ["prevent"])
|
|
3246
3266
|
}, [
|
|
3247
3267
|
D(_.$slots, "default", {}, void 0, !0),
|
|
3248
3268
|
e.errorMessage ? (m(), j(v, {
|
|
@@ -3264,7 +3284,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3264
3284
|
M(b, {
|
|
3265
3285
|
appearance: "tertiary",
|
|
3266
3286
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-view-configuration`,
|
|
3267
|
-
onClick: A[0] || (A[0] = (
|
|
3287
|
+
onClick: A[0] || (A[0] = (I) => y())
|
|
3268
3288
|
}, {
|
|
3269
3289
|
default: w(() => [
|
|
3270
3290
|
q(L($(a)("baseForm.actions.viewConfiguration")), 1)
|
|
@@ -3276,7 +3296,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3276
3296
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-cancel`,
|
|
3277
3297
|
disabled: e.isReadonly,
|
|
3278
3298
|
type: "reset",
|
|
3279
|
-
onClick: A[1] || (A[1] = (
|
|
3299
|
+
onClick: A[1] || (A[1] = (I) => !!e.actionTeleportTarget && C())
|
|
3280
3300
|
}, {
|
|
3281
3301
|
default: w(() => [
|
|
3282
3302
|
q(L(e.cancelButtonText ?? $(a)("baseForm.actions.cancel")), 1)
|
|
@@ -3288,7 +3308,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3288
3308
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-submit`,
|
|
3289
3309
|
disabled: g.value,
|
|
3290
3310
|
type: "submit",
|
|
3291
|
-
onClick: A[2] || (A[2] = (
|
|
3311
|
+
onClick: A[2] || (A[2] = (I) => !!e.actionTeleportTarget && T())
|
|
3292
3312
|
}, {
|
|
3293
3313
|
default: w(() => [
|
|
3294
3314
|
q(L(e.saveButtonText ?? $(a)("baseForm.actions.save")), 1)
|
|
@@ -3306,14 +3326,14 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3306
3326
|
"offset-top": e.slidoutTopOffset,
|
|
3307
3327
|
title: $(a)("baseForm.configuration.title"),
|
|
3308
3328
|
visible: h.value,
|
|
3309
|
-
onClose: A[4] || (A[4] = (
|
|
3329
|
+
onClose: A[4] || (A[4] = (I) => y())
|
|
3310
3330
|
}, {
|
|
3311
3331
|
default: w(() => [
|
|
3312
3332
|
R("div", null, L($(a)("baseForm.configuration.message")), 1),
|
|
3313
3333
|
M(H, {
|
|
3314
3334
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3315
3335
|
tabs: W.value,
|
|
3316
|
-
onChange: A[3] || (A[3] = (
|
|
3336
|
+
onChange: A[3] || (A[3] = (I) => i("codeBlockTabChange", I.replace("#", "")))
|
|
3317
3337
|
}, {
|
|
3318
3338
|
json: w(() => [
|
|
3319
3339
|
M(en, {
|
|
@@ -3344,7 +3364,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3344
3364
|
});
|
|
3345
3365
|
};
|
|
3346
3366
|
}
|
|
3347
|
-
}), ms = /* @__PURE__ */ se(Go, [["__scopeId", "data-v-
|
|
3367
|
+
}), ms = /* @__PURE__ */ se(Go, [["__scopeId", "data-v-520de902"]]), zo = ["data-truncate"], Qo = /* @__PURE__ */ z({
|
|
3348
3368
|
__name: "EntityBaseTableCell",
|
|
3349
3369
|
props: {
|
|
3350
3370
|
keyName: {
|
|
@@ -3361,29 +3381,29 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3361
3381
|
}
|
|
3362
3382
|
},
|
|
3363
3383
|
setup(e) {
|
|
3364
|
-
const t = e, n =
|
|
3384
|
+
const t = e, n = F(() => {
|
|
3365
3385
|
var y;
|
|
3366
3386
|
return ((y = t.rowEl) == null ? void 0 : y.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3367
|
-
}), i =
|
|
3387
|
+
}), i = F(() => {
|
|
3368
3388
|
var y;
|
|
3369
3389
|
return ((y = n.value) == null ? void 0 : y.querySelector('[data-truncate="true"]')) || null;
|
|
3370
|
-
}), r =
|
|
3390
|
+
}), r = F(() => {
|
|
3371
3391
|
var k, C;
|
|
3372
3392
|
const y = (k = t.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3373
3393
|
return y ? ((C = y[0]) == null ? void 0 : C.getAttribute("data-testid")) === t.keyName : !0;
|
|
3374
|
-
}), o =
|
|
3394
|
+
}), o = F(() => r.value || t.tooltip);
|
|
3375
3395
|
let a;
|
|
3376
3396
|
const s = () => {
|
|
3377
3397
|
a && (a.disconnect(), a = void 0);
|
|
3378
3398
|
}, l = () => {
|
|
3379
|
-
var k, C,
|
|
3399
|
+
var k, C, T;
|
|
3380
3400
|
let y = ((k = n.value) == null ? void 0 : k.clientWidth) || 0;
|
|
3381
3401
|
if (n.value && "getComputedStyle" in window) {
|
|
3382
3402
|
const W = window.getComputedStyle(n.value);
|
|
3383
3403
|
y -= (parseFloat(W.paddingLeft) || 0) + (parseFloat(W.paddingRight) || 0);
|
|
3384
3404
|
}
|
|
3385
|
-
d.value = ((C = i.value) == null ? void 0 : C.getBoundingClientRect().width) || 0, u.value = y, p.value = ((
|
|
3386
|
-
}, c = K({}), d = K(0), u = K(0), p = K(""), g =
|
|
3405
|
+
d.value = ((C = i.value) == null ? void 0 : C.getBoundingClientRect().width) || 0, u.value = y, p.value = ((T = c.value) == null ? void 0 : T.innerText) || "";
|
|
3406
|
+
}, c = K({}), d = K(0), u = K(0), p = K(""), g = F(() => [i.value, n.value]), h = be(
|
|
3387
3407
|
g,
|
|
3388
3408
|
(y) => {
|
|
3389
3409
|
if (o.value && (s(), "ResizeObserver" in window && window)) {
|
|
@@ -3397,7 +3417,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3397
3417
|
}
|
|
3398
3418
|
},
|
|
3399
3419
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3400
|
-
), x =
|
|
3420
|
+
), x = F(() => o.value ? d.value > u.value : !1);
|
|
3401
3421
|
return tt(() => {
|
|
3402
3422
|
l();
|
|
3403
3423
|
}), Gn(() => {
|
|
@@ -3578,7 +3598,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3578
3598
|
},
|
|
3579
3599
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked", "state"],
|
|
3580
3600
|
setup(e, { emit: t }) {
|
|
3581
|
-
const n = e, i = t, { i18n: { t: r } } = Y.useI18n(), o =
|
|
3601
|
+
const n = e, i = t, { i18n: { t: r } } = Y.useI18n(), o = F(() => {
|
|
3582
3602
|
var f, v;
|
|
3583
3603
|
return typeof n.errorMessage == "string" ? {
|
|
3584
3604
|
hasError: !!n.errorMessage,
|
|
@@ -3589,7 +3609,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3589
3609
|
title: (f = n.errorMessage) == null ? void 0 : f.title,
|
|
3590
3610
|
message: (v = n.errorMessage) == null ? void 0 : v.message
|
|
3591
3611
|
};
|
|
3592
|
-
}), a =
|
|
3612
|
+
}), a = F(() => n.cacheIdentifier || n.preferencesStorageKey), s = F(() => {
|
|
3593
3613
|
const f = [];
|
|
3594
3614
|
return Object.keys(n.tableHeaders).forEach((b) => {
|
|
3595
3615
|
const H = n.tableHeaders[b];
|
|
@@ -3626,11 +3646,11 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3626
3646
|
i("empty-state-cta-clicked"), h();
|
|
3627
3647
|
}, h = () => {
|
|
3628
3648
|
i("clear-search-input");
|
|
3629
|
-
}, x =
|
|
3649
|
+
}, x = F(() => n.disableRowClick ? void 0 : (f, v) => {
|
|
3630
3650
|
i("click:row", v);
|
|
3631
3651
|
}), y = (f) => {
|
|
3632
3652
|
i("sort", f);
|
|
3633
|
-
}, { hideTableToolbar: k, handleStateChange: C } = Y.useTableState(() => n.query), { setTablePreferences:
|
|
3653
|
+
}, { hideTableToolbar: k, handleStateChange: C } = Y.useTableState(() => n.query), { setTablePreferences: T, getTablePreferences: W } = pi(), X = K(W(a.value, n.defaultTablePreferences)), _ = F(() => {
|
|
3634
3654
|
const f = W(a.value);
|
|
3635
3655
|
return {
|
|
3636
3656
|
...n.initialFetcherParams,
|
|
@@ -3639,8 +3659,8 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3639
3659
|
}), A = (f) => {
|
|
3640
3660
|
X.value = f, s.value.forEach((v) => {
|
|
3641
3661
|
!("hidable" in v) || !X.value.columnVisibility || v.hidable === !1 && (X.value.columnVisibility[v.key] = !0);
|
|
3642
|
-
}), a.value &&
|
|
3643
|
-
},
|
|
3662
|
+
}), a.value && T(a.value, f);
|
|
3663
|
+
}, O = F(() => ({
|
|
3644
3664
|
disablePageJump: n.disablePaginationPageJump,
|
|
3645
3665
|
offset: n.paginationType === "offset",
|
|
3646
3666
|
...n.paginationAttributes
|
|
@@ -3675,7 +3695,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3675
3695
|
"hide-toolbar": e.hideToolbar ?? $(k),
|
|
3676
3696
|
"initial-fetcher-params": _.value,
|
|
3677
3697
|
loading: e.isLoading,
|
|
3678
|
-
"pagination-attributes":
|
|
3698
|
+
"pagination-attributes": O.value,
|
|
3679
3699
|
"resize-columns": "",
|
|
3680
3700
|
"row-attrs": l,
|
|
3681
3701
|
"row-key": e.rowKey,
|
|
@@ -3709,16 +3729,16 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3709
3729
|
]),
|
|
3710
3730
|
key: "0"
|
|
3711
3731
|
} : void 0,
|
|
3712
|
-
ce(e.tableHeaders, (J,
|
|
3713
|
-
name:
|
|
3732
|
+
ce(e.tableHeaders, (J, I) => ({
|
|
3733
|
+
name: I,
|
|
3714
3734
|
fn: w(({ row: B, rowValue: G }) => [
|
|
3715
3735
|
M(Zo, {
|
|
3716
|
-
"key-name": String(
|
|
3736
|
+
"key-name": String(I),
|
|
3717
3737
|
"row-el": d(B),
|
|
3718
3738
|
tooltip: J.tooltip
|
|
3719
3739
|
}, {
|
|
3720
3740
|
default: w(() => [
|
|
3721
|
-
D(f.$slots,
|
|
3741
|
+
D(f.$slots, I, {
|
|
3722
3742
|
row: B,
|
|
3723
3743
|
rowKey: e.rowKey,
|
|
3724
3744
|
rowValue: G
|
|
@@ -3791,7 +3811,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3791
3811
|
},
|
|
3792
3812
|
emits: ["cancel", "proceed"],
|
|
3793
3813
|
setup(e, { emit: t }) {
|
|
3794
|
-
const { i18nT: n } = Y.useI18n(), i = e, r = t, o =
|
|
3814
|
+
const { i18nT: n } = Y.useI18n(), i = e, r = t, o = F(() => i.needConfirm ? i.entityName : ""), a = () => {
|
|
3795
3815
|
r("cancel");
|
|
3796
3816
|
}, s = () => {
|
|
3797
3817
|
r("proceed");
|
|
@@ -3908,16 +3928,16 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3908
3928
|
},
|
|
3909
3929
|
emits: ["update:modelValue"],
|
|
3910
3930
|
setup(e, { emit: t }) {
|
|
3911
|
-
const { i18n: { t: n } } = Y.useI18n(), i = e, r = t, o = K(!1), a = K({}), s = K(/* @__PURE__ */ new Set()), l =
|
|
3931
|
+
const { i18n: { t: n } } = Y.useI18n(), i = e, r = t, o = K(!1), a = K({}), s = K(/* @__PURE__ */ new Set()), l = F(() => {
|
|
3912
3932
|
const _ = [];
|
|
3913
|
-
return new URLSearchParams(i.modelValue).forEach((A,
|
|
3914
|
-
A !== "" && _.push(
|
|
3933
|
+
return new URLSearchParams(i.modelValue).forEach((A, O) => {
|
|
3934
|
+
A !== "" && _.push(O);
|
|
3915
3935
|
}), _;
|
|
3916
|
-
}), c =
|
|
3936
|
+
}), c = F(() => {
|
|
3917
3937
|
const _ = i.config.fields;
|
|
3918
3938
|
return Object.keys(_).filter((A) => {
|
|
3919
|
-
var
|
|
3920
|
-
return (
|
|
3939
|
+
var O;
|
|
3940
|
+
return (O = _ == null ? void 0 : _[A]) == null ? void 0 : O.searchable;
|
|
3921
3941
|
}).map((A) => ({
|
|
3922
3942
|
label: _[A].label || A,
|
|
3923
3943
|
value: A,
|
|
@@ -3925,8 +3945,8 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3925
3945
|
}));
|
|
3926
3946
|
});
|
|
3927
3947
|
be(() => i.modelValue, (_) => {
|
|
3928
|
-
a.value = {}, new URLSearchParams(_).forEach((A,
|
|
3929
|
-
a.value[
|
|
3948
|
+
a.value = {}, new URLSearchParams(_).forEach((A, O) => {
|
|
3949
|
+
a.value[O] = A;
|
|
3930
3950
|
});
|
|
3931
3951
|
});
|
|
3932
3952
|
const d = () => {
|
|
@@ -3938,32 +3958,32 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3938
3958
|
}, g = () => {
|
|
3939
3959
|
p("");
|
|
3940
3960
|
}, h = (_) => `filter-${_}`, x = (_) => {
|
|
3941
|
-
var A,
|
|
3942
|
-
return (((
|
|
3961
|
+
var A, O;
|
|
3962
|
+
return (((O = (A = i.config.schema) == null ? void 0 : A[_]) == null ? void 0 : O.values) ?? []).map((f) => typeof f == "string" ? { value: f, label: f } : f);
|
|
3943
3963
|
}, y = (_) => {
|
|
3944
|
-
var A,
|
|
3945
|
-
return ((
|
|
3964
|
+
var A, O;
|
|
3965
|
+
return ((O = (A = i.config.schema) == null ? void 0 : A[_]) == null ? void 0 : O.type) ?? "text";
|
|
3946
3966
|
}, k = (_) => {
|
|
3947
3967
|
a.value = {
|
|
3948
3968
|
...a.value,
|
|
3949
3969
|
[_]: ""
|
|
3950
|
-
},
|
|
3970
|
+
}, T();
|
|
3951
3971
|
}, C = () => {
|
|
3952
|
-
a.value = {},
|
|
3953
|
-
},
|
|
3954
|
-
const A = Object.keys(a.value).reduce((
|
|
3972
|
+
a.value = {}, T(!0);
|
|
3973
|
+
}, T = (_ = !1) => {
|
|
3974
|
+
const A = Object.keys(a.value).reduce((O, f) => (a.value[f] && (O[f] = `${a.value[f]}`), O), {});
|
|
3955
3975
|
_ && (o.value = !1), r("update:modelValue", new URLSearchParams(A).toString());
|
|
3956
3976
|
}, W = (_) => {
|
|
3957
|
-
var A,
|
|
3958
|
-
return !!((
|
|
3977
|
+
var A, O;
|
|
3978
|
+
return !!((O = (A = i.config.schema) == null ? void 0 : A[_]) != null && O.filterFunction);
|
|
3959
3979
|
}, X = (_, A) => {
|
|
3960
3980
|
var f;
|
|
3961
|
-
const
|
|
3962
|
-
return (
|
|
3981
|
+
const O = (f = i.config.schema) == null ? void 0 : f[_];
|
|
3982
|
+
return (O == null ? void 0 : O.filterFunction) === void 0 ? !0 : O.filterFunction(A);
|
|
3963
3983
|
};
|
|
3964
3984
|
return (_, A) => {
|
|
3965
|
-
const
|
|
3966
|
-
return e.config.isExactMatch ? (m(), j(
|
|
3985
|
+
const O = P("KInput"), f = P("KButton"), v = P("KSelect");
|
|
3986
|
+
return e.config.isExactMatch ? (m(), j(O, {
|
|
3967
3987
|
key: 0,
|
|
3968
3988
|
autocomplete: "off",
|
|
3969
3989
|
class: "kong-ui-entity-filter-input",
|
|
@@ -4016,8 +4036,8 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4016
4036
|
class: fe(["menu-item-title", { expanded: s.value.has(b.value) }]),
|
|
4017
4037
|
role: "button",
|
|
4018
4038
|
tabindex: "0",
|
|
4019
|
-
onClick: (
|
|
4020
|
-
onKeydown: zn((
|
|
4039
|
+
onClick: (I) => u(b.value),
|
|
4040
|
+
onKeydown: zn((I) => u(b.value), ["enter"])
|
|
4021
4041
|
}, [
|
|
4022
4042
|
q(L(b.label) + " ", 1),
|
|
4023
4043
|
xe(R("span", hl, null, 512), [
|
|
@@ -4037,16 +4057,16 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4037
4057
|
key: 0,
|
|
4038
4058
|
id: h(b.value),
|
|
4039
4059
|
modelValue: a.value[b.value],
|
|
4040
|
-
"onUpdate:modelValue": (
|
|
4060
|
+
"onUpdate:modelValue": (I) => a.value[b.value] = I,
|
|
4041
4061
|
"enable-filtering": W(b.value),
|
|
4042
|
-
"filter-function": (
|
|
4062
|
+
"filter-function": (I) => X(b.value, I),
|
|
4043
4063
|
items: x(b.value),
|
|
4044
4064
|
placeholder: $(n)("filter.selectPlaceholder")
|
|
4045
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "enable-filtering", "filter-function", "items", "placeholder"])) : (m(), j(
|
|
4065
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "enable-filtering", "filter-function", "items", "placeholder"])) : (m(), j(O, {
|
|
4046
4066
|
key: 1,
|
|
4047
4067
|
id: h(b.value),
|
|
4048
4068
|
modelValue: a.value[b.value],
|
|
4049
|
-
"onUpdate:modelValue": (
|
|
4069
|
+
"onUpdate:modelValue": (I) => a.value[b.value] = I,
|
|
4050
4070
|
autocomplete: "off",
|
|
4051
4071
|
placeholder: $(n)("filter.inputPlaceholder"),
|
|
4052
4072
|
type: y(b.value)
|
|
@@ -4059,7 +4079,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4059
4079
|
appearance: "tertiary",
|
|
4060
4080
|
"data-testid": "apply-filter",
|
|
4061
4081
|
size: "small",
|
|
4062
|
-
onClick: A[0] || (A[0] = (
|
|
4082
|
+
onClick: A[0] || (A[0] = (I) => T(!0))
|
|
4063
4083
|
}, {
|
|
4064
4084
|
default: w(() => [
|
|
4065
4085
|
q(L($(n)("filter.applyButtonText")), 1)
|
|
@@ -4070,13 +4090,13 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4070
4090
|
appearance: "tertiary",
|
|
4071
4091
|
"data-testid": "clear-filter",
|
|
4072
4092
|
size: "small",
|
|
4073
|
-
onClick: (
|
|
4093
|
+
onClick: (I) => k(b.value)
|
|
4074
4094
|
}, {
|
|
4075
4095
|
default: w(() => [
|
|
4076
4096
|
q(L($(n)("filter.clearButtonText")), 1)
|
|
4077
4097
|
]),
|
|
4078
|
-
_:
|
|
4079
|
-
},
|
|
4098
|
+
_: 1
|
|
4099
|
+
}, 8, ["onClick"])
|
|
4080
4100
|
], 512), [
|
|
4081
4101
|
[Ce, s.value.has(b.value)]
|
|
4082
4102
|
])
|
|
@@ -4132,9 +4152,9 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4132
4152
|
},
|
|
4133
4153
|
emits: ["cancel", "proceed"],
|
|
4134
4154
|
setup(e, { emit: t }) {
|
|
4135
|
-
const { i18n: { t: n }, i18nT: i } = Y.useI18n(), r = e, o = t, a = K(!1), s =
|
|
4155
|
+
const { i18n: { t: n }, i18nT: i } = Y.useI18n(), r = e, o = t, a = K(!1), s = F(
|
|
4136
4156
|
() => r.action === "enable" ? n("toggleModal.enable.title", { entityType: r.entityType }) : n("toggleModal.disable.title", { entityType: r.entityType })
|
|
4137
|
-
), l =
|
|
4157
|
+
), l = F(
|
|
4138
4158
|
() => r.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
4139
4159
|
), c = () => o("cancel"), d = async () => {
|
|
4140
4160
|
if (r.onConfirm) {
|
|
@@ -4201,7 +4221,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4201
4221
|
}
|
|
4202
4222
|
},
|
|
4203
4223
|
setup(e) {
|
|
4204
|
-
const t = e, n = K(void 0), i =
|
|
4224
|
+
const t = e, n = K(void 0), i = F(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4205
4225
|
return be(() => t.authFunction, async () => {
|
|
4206
4226
|
n.value = await t.authFunction();
|
|
4207
4227
|
}, { immediate: !0 }), (r, o) => i.value ? D(r.$slots, "default", {
|
|
@@ -4327,16 +4347,16 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4327
4347
|
const t = De();
|
|
4328
4348
|
return (n, i) => (m(), S("div", Ol, [
|
|
4329
4349
|
R("header", Ll, [
|
|
4330
|
-
|
|
4350
|
+
e.step != null ? (m(), S("div", Bl, L(e.step), 1)) : N("", !0),
|
|
4331
4351
|
R("div", Rl, [
|
|
4332
4352
|
R("h2", Kl, [
|
|
4333
4353
|
D(n.$slots, "title", {}, () => [
|
|
4334
|
-
q(L(
|
|
4354
|
+
q(L(e.title), 1)
|
|
4335
4355
|
], !0)
|
|
4336
4356
|
]),
|
|
4337
|
-
|
|
4357
|
+
e.description || t.description ? (m(), S("div", Nl, [
|
|
4338
4358
|
D(n.$slots, "description", {}, () => [
|
|
4339
|
-
q(L(
|
|
4359
|
+
q(L(e.description), 1)
|
|
4340
4360
|
], !0)
|
|
4341
4361
|
])) : N("", !0)
|
|
4342
4362
|
]),
|
|
@@ -4379,10 +4399,10 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4379
4399
|
}
|
|
4380
4400
|
},
|
|
4381
4401
|
setup(e) {
|
|
4382
|
-
const t = e, n = K(), { isTruncated: i } = Y.useTruncationDetector(n), { i18n: { t: r } } = Y.useI18n(), o = r("global.actions.copyId"), a = K(o), s =
|
|
4402
|
+
const t = e, n = K(), { isTruncated: i } = Y.useTruncationDetector(n), { i18n: { t: r } } = Y.useI18n(), o = r("global.actions.copyId"), a = K(o), s = F(() => t.entityLinkData.deleted ?? !1), l = F(() => {
|
|
4383
4403
|
var u;
|
|
4384
4404
|
return (u = t.entityLinkData.id) != null && u.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4385
|
-
}), c =
|
|
4405
|
+
}), c = F(() => {
|
|
4386
4406
|
var u;
|
|
4387
4407
|
return `${(u = l.value) == null ? void 0 : u.toString().slice(0, 5)} (deleted)`;
|
|
4388
4408
|
}), d = async (u) => {
|
|
@@ -4514,7 +4534,7 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4514
4534
|
},
|
|
4515
4535
|
emits: ["click:create", "click:learn-more"],
|
|
4516
4536
|
setup(e) {
|
|
4517
|
-
const t = e, { i18n: { t: n } } = Y.useI18n(), i = K(!1), r =
|
|
4537
|
+
const t = e, { i18n: { t: n } } = Y.useI18n(), i = K(!1), r = F(() => i.value && !!t.actionButtonText), o = F(() => ht.includes(t.appearance) ? t.appearance : ["primary", t.appearance]);
|
|
4518
4538
|
return nt(async () => {
|
|
4519
4539
|
i.value = await t.canCreate();
|
|
4520
4540
|
}), tt(() => Qn(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
|
|
@@ -4621,7 +4641,7 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4621
4641
|
}
|
|
4622
4642
|
},
|
|
4623
4643
|
setup(e) {
|
|
4624
|
-
const t = e, n =
|
|
4644
|
+
const t = e, n = F(() => {
|
|
4625
4645
|
if (Array.isArray(t.tags))
|
|
4626
4646
|
return t.tags;
|
|
4627
4647
|
if (typeof t.tags == "string")
|