@kong-ui-public/entities-snis 2.1.4 → 2.1.5
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-snis.es.js +118 -118
- package/dist/entities-snis.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/entities-snis.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ee, ref as x, computed as w, watch as ae, renderSlot as G, createCommentVNode as X, unref as s, onBeforeMount as Ce, resolveComponent as F, openBlock as k, createBlock as U, withCtx as p, createElementVNode as M, toDisplayString as $, createElementBlock as q, withModifiers as he, createVNode as C, createTextVNode as J, createSlots as ze, withDirectives as fe, vShow as ye, renderList as xe, Fragment as We, useSlots as st, normalizeClass as be, onMounted as ct, onUnmounted as ut, inject as dt, resolveDynamicComponent as _e, mergeProps as Oe, normalizeStyle as pt, pushScopeId as ft, popScopeId as yt, Teleport as mt, reactive as Me } from "vue";
|
|
2
2
|
import { createI18n as Te, i18nTComponent as Je } from "@kong-ui-public/i18n";
|
|
3
3
|
import gt from "axios";
|
|
4
4
|
import "@kong/kongponents";
|
|
@@ -1154,7 +1154,7 @@ for (var se = 0; se < 256; se++)
|
|
|
1154
1154
|
const ga = ["onReset", "onSubmit"], va = {
|
|
1155
1155
|
class: "form-actions",
|
|
1156
1156
|
"data-testid": "form-actions"
|
|
1157
|
-
}, ha = /* @__PURE__ */
|
|
1157
|
+
}, ha = /* @__PURE__ */ ee({
|
|
1158
1158
|
__name: "EntityBaseForm",
|
|
1159
1159
|
props: {
|
|
1160
1160
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1235,12 +1235,12 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1235
1235
|
}
|
|
1236
1236
|
}), (c, h) => {
|
|
1237
1237
|
const I = F("KSkeleton"), j = F("KEmptyState"), u = F("KAlert"), A = F("KButton"), H = F("KCard");
|
|
1238
|
-
return
|
|
1238
|
+
return k(), U(H, { class: "kong-ui-entity-base-form" }, {
|
|
1239
1239
|
body: p(() => [
|
|
1240
|
-
y.value ? (
|
|
1240
|
+
y.value ? (k(), U(I, {
|
|
1241
1241
|
key: 0,
|
|
1242
1242
|
type: "form"
|
|
1243
|
-
})) : f.value ? (
|
|
1243
|
+
})) : f.value ? (k(), U(j, {
|
|
1244
1244
|
key: 1,
|
|
1245
1245
|
"cta-text": s(i)("baseForm.actions.back"),
|
|
1246
1246
|
"data-testid": "form-fetch-error",
|
|
@@ -1251,19 +1251,19 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1251
1251
|
M("h3", null, $(l.value), 1)
|
|
1252
1252
|
]),
|
|
1253
1253
|
_: 1
|
|
1254
|
-
}, 8, ["cta-text"])) : (
|
|
1254
|
+
}, 8, ["cta-text"])) : (k(), q("form", {
|
|
1255
1255
|
key: 2,
|
|
1256
1256
|
"data-testid": "form-content",
|
|
1257
1257
|
onReset: he(B, ["prevent"]),
|
|
1258
1258
|
onSubmit: he(v, ["prevent"])
|
|
1259
1259
|
}, [
|
|
1260
1260
|
G(c.$slots, "default", {}, void 0, !0),
|
|
1261
|
-
e.errorMessage ? (
|
|
1261
|
+
e.errorMessage ? (k(), U(u, {
|
|
1262
1262
|
key: 0,
|
|
1263
1263
|
"alert-message": e.errorMessage,
|
|
1264
1264
|
appearance: "danger",
|
|
1265
1265
|
"data-testid": "form-error"
|
|
1266
|
-
}, null, 8, ["alert-message"])) :
|
|
1266
|
+
}, null, 8, ["alert-message"])) : X("", !0),
|
|
1267
1267
|
M("div", va, [
|
|
1268
1268
|
G(c.$slots, "form-actions", {}, () => [
|
|
1269
1269
|
C(A, {
|
|
@@ -1299,7 +1299,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1299
1299
|
}), ba = /* @__PURE__ */ ce(ha, [["__scopeId", "data-v-81612aef"]]), ka = {
|
|
1300
1300
|
key: 0,
|
|
1301
1301
|
"data-testid": "first-col"
|
|
1302
|
-
}, wa = /* @__PURE__ */
|
|
1302
|
+
}, wa = /* @__PURE__ */ ee({
|
|
1303
1303
|
__name: "EntityBaseTableCell",
|
|
1304
1304
|
props: {
|
|
1305
1305
|
keyName: {
|
|
@@ -1350,12 +1350,12 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1350
1350
|
T();
|
|
1351
1351
|
}), (v, c) => {
|
|
1352
1352
|
const h = F("KTooltip");
|
|
1353
|
-
return
|
|
1353
|
+
return k(), q("span", {
|
|
1354
1354
|
ref_key: "contentRef",
|
|
1355
1355
|
ref: y,
|
|
1356
1356
|
class: "content-wrapper"
|
|
1357
1357
|
}, [
|
|
1358
|
-
n.value ? (
|
|
1358
|
+
n.value ? (k(), q("span", ka, [
|
|
1359
1359
|
C(h, {
|
|
1360
1360
|
label: B.value ? g.value : "",
|
|
1361
1361
|
"max-width": "300",
|
|
@@ -1373,7 +1373,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1373
1373
|
}), Sa = /* @__PURE__ */ ce(wa, [["__scopeId", "data-v-e42a20c9"]]), _a = { class: "toolbar-container" }, Ia = {
|
|
1374
1374
|
key: 0,
|
|
1375
1375
|
class: "toolbar-button-container"
|
|
1376
|
-
}, Ca = ["data-testid"], xa = /* @__PURE__ */
|
|
1376
|
+
}, Ca = ["data-testid"], xa = /* @__PURE__ */ ee({
|
|
1377
1377
|
__name: "EntityBaseTable",
|
|
1378
1378
|
props: {
|
|
1379
1379
|
// table header configuration
|
|
@@ -1543,7 +1543,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1543
1543
|
};
|
|
1544
1544
|
return (u, A) => {
|
|
1545
1545
|
const H = F("KIcon"), E = F("KButton"), P = F("KDropdown"), K = F("KTable"), z = F("KCard");
|
|
1546
|
-
return
|
|
1546
|
+
return k(), U(z, {
|
|
1547
1547
|
class: "kong-ui-entity-base-table",
|
|
1548
1548
|
title: e.title
|
|
1549
1549
|
}, {
|
|
@@ -1583,9 +1583,9 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1583
1583
|
toolbar: p(({ state: N }) => [
|
|
1584
1584
|
fe(M("div", _a, [
|
|
1585
1585
|
G(u.$slots, "toolbar-filter", {}, void 0, !0),
|
|
1586
|
-
u.$slots["toolbar-button"] ? (
|
|
1586
|
+
u.$slots["toolbar-button"] ? (k(), q("div", Ia, [
|
|
1587
1587
|
G(u.$slots, "toolbar-button", {}, void 0, !0)
|
|
1588
|
-
])) :
|
|
1588
|
+
])) : X("", !0)
|
|
1589
1589
|
], 512), [
|
|
1590
1590
|
[ye, o(N)]
|
|
1591
1591
|
])
|
|
@@ -1630,7 +1630,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1630
1630
|
}, [
|
|
1631
1631
|
xe(e.tableHeaders, (N, L) => ({
|
|
1632
1632
|
name: L,
|
|
1633
|
-
fn: p(({ row: Z, rowKey: ue, rowValue:
|
|
1633
|
+
fn: p(({ row: Z, rowKey: ue, rowValue: te }) => [
|
|
1634
1634
|
C(Sa, {
|
|
1635
1635
|
"key-name": String(L),
|
|
1636
1636
|
"row-el": l(Z)
|
|
@@ -1639,9 +1639,9 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1639
1639
|
G(u.$slots, L, {
|
|
1640
1640
|
row: Z,
|
|
1641
1641
|
rowKey: ue,
|
|
1642
|
-
rowValue:
|
|
1642
|
+
rowValue: te
|
|
1643
1643
|
}, () => [
|
|
1644
|
-
J($(
|
|
1644
|
+
J($(te), 1)
|
|
1645
1645
|
], !0)
|
|
1646
1646
|
]),
|
|
1647
1647
|
_: 2
|
|
@@ -1660,7 +1660,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1660
1660
|
}, Ea = {
|
|
1661
1661
|
key: 1,
|
|
1662
1662
|
class: "description"
|
|
1663
|
-
}, Aa = /* @__PURE__ */
|
|
1663
|
+
}, Aa = /* @__PURE__ */ ee({
|
|
1664
1664
|
__name: "EntityDeleteModal",
|
|
1665
1665
|
props: {
|
|
1666
1666
|
visible: {
|
|
@@ -1706,7 +1706,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1706
1706
|
};
|
|
1707
1707
|
return (m, y) => {
|
|
1708
1708
|
const f = F("KAlert"), l = F("KPrompt");
|
|
1709
|
-
return
|
|
1709
|
+
return k(), U(l, {
|
|
1710
1710
|
"action-button-text": "Yes, delete",
|
|
1711
1711
|
"action-pending": e.actionPending,
|
|
1712
1712
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -1718,14 +1718,14 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1718
1718
|
onProceed: o
|
|
1719
1719
|
}, {
|
|
1720
1720
|
"body-content": p(() => [
|
|
1721
|
-
e.error ? (
|
|
1721
|
+
e.error ? (k(), q("div", Na, [
|
|
1722
1722
|
C(f, { appearance: "danger" }, {
|
|
1723
1723
|
alertMessage: p(() => [
|
|
1724
1724
|
J($(e.error), 1)
|
|
1725
1725
|
]),
|
|
1726
1726
|
_: 1
|
|
1727
1727
|
})
|
|
1728
|
-
])) :
|
|
1728
|
+
])) : X("", !0),
|
|
1729
1729
|
C(s(a), {
|
|
1730
1730
|
class: "message",
|
|
1731
1731
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
@@ -1744,11 +1744,11 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1744
1744
|
key: "0"
|
|
1745
1745
|
} : void 0
|
|
1746
1746
|
]), 1032, ["keypath"]),
|
|
1747
|
-
t.description || m.$slots.description ? (
|
|
1747
|
+
t.description || m.$slots.description ? (k(), q("div", Ea, [
|
|
1748
1748
|
G(m.$slots, "description", {}, () => [
|
|
1749
1749
|
M("p", null, $(t.description), 1)
|
|
1750
1750
|
], !0)
|
|
1751
|
-
])) :
|
|
1751
|
+
])) : X("", !0)
|
|
1752
1752
|
]),
|
|
1753
1753
|
_: 3
|
|
1754
1754
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
@@ -1768,7 +1768,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1768
1768
|
width: "20",
|
|
1769
1769
|
x: "0",
|
|
1770
1770
|
y: "0"
|
|
1771
|
-
}, Fa = ["fill"], Ka = { mask: "url(#mask0_180_20349)" }, ja = ["fill"], Ue = /* @__PURE__ */
|
|
1771
|
+
}, Fa = ["fill"], Ka = { mask: "url(#mask0_180_20349)" }, ja = ["fill"], Ue = /* @__PURE__ */ ee({
|
|
1772
1772
|
__name: "IconFilter",
|
|
1773
1773
|
props: {
|
|
1774
1774
|
color: {
|
|
@@ -1777,7 +1777,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1777
1777
|
}
|
|
1778
1778
|
},
|
|
1779
1779
|
setup(e) {
|
|
1780
|
-
return (r, t) => (
|
|
1780
|
+
return (r, t) => (k(), q("svg", Oa, [
|
|
1781
1781
|
M("mask", Ma, [
|
|
1782
1782
|
M("rect", {
|
|
1783
1783
|
fill: e.color,
|
|
@@ -1796,7 +1796,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1796
1796
|
}), Pa = {
|
|
1797
1797
|
key: 1,
|
|
1798
1798
|
class: "kong-ui-entity-filter"
|
|
1799
|
-
}, Ra = { class: "menu-item-title" }, qa = { class: "menu-item-indicator" }, Ba = { class: "menu-item-body" }, Va = ["for"], Ua = { class: "menu-item-buttons" }, La = { class: "filter-clear-button-container" }, Da = /* @__PURE__ */
|
|
1799
|
+
}, Ra = { class: "menu-item-title" }, qa = { class: "menu-item-indicator" }, Ba = { class: "menu-item-body" }, Va = ["for"], Ua = { class: "menu-item-buttons" }, La = { class: "filter-clear-button-container" }, Da = /* @__PURE__ */ ee({
|
|
1800
1800
|
__name: "EntityFilter",
|
|
1801
1801
|
props: {
|
|
1802
1802
|
// filter config, either exact match or fuzzy match
|
|
@@ -1859,7 +1859,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1859
1859
|
};
|
|
1860
1860
|
return (c, h) => {
|
|
1861
1861
|
const I = F("KInput"), j = F("KButton"), u = F("KSelect"), A = F("KMenuItem"), H = F("KMenu");
|
|
1862
|
-
return e.config.isExactMatch ? (
|
|
1862
|
+
return e.config.isExactMatch ? (k(), U(I, {
|
|
1863
1863
|
key: 0,
|
|
1864
1864
|
autocomplete: "off",
|
|
1865
1865
|
class: "kong-ui-entity-filter-input",
|
|
@@ -1872,7 +1872,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1872
1872
|
C(Ue)
|
|
1873
1873
|
]),
|
|
1874
1874
|
_: 1
|
|
1875
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
1875
|
+
}, 8, ["model-value", "placeholder"])) : (k(), q("div", Pa, [
|
|
1876
1876
|
C(j, {
|
|
1877
1877
|
appearance: "tertiary",
|
|
1878
1878
|
"data-testid": "filter-button",
|
|
@@ -1892,7 +1892,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1892
1892
|
]),
|
|
1893
1893
|
fe(C(H, { class: "kong-ui-entity-filter-menu" }, {
|
|
1894
1894
|
body: p(() => [
|
|
1895
|
-
(
|
|
1895
|
+
(k(!0), q(We, null, xe(m.value, (E, P) => (k(), U(A, {
|
|
1896
1896
|
key: E.value,
|
|
1897
1897
|
"data-testid": E.value,
|
|
1898
1898
|
expandable: "",
|
|
@@ -1914,7 +1914,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1914
1914
|
class: "menu-item-label",
|
|
1915
1915
|
for: l(E.value)
|
|
1916
1916
|
}, $(s(a)("filter.fieldLabel")), 9, Va),
|
|
1917
|
-
((z = (K = e.config.schema) == null ? void 0 : K[E.value]) == null ? void 0 : z.type) === "select" ? (
|
|
1917
|
+
((z = (K = e.config.schema) == null ? void 0 : K[E.value]) == null ? void 0 : z.type) === "select" ? (k(), U(u, {
|
|
1918
1918
|
key: 0,
|
|
1919
1919
|
id: l(E.value),
|
|
1920
1920
|
modelValue: i.value[E.value],
|
|
@@ -1922,7 +1922,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1922
1922
|
appearance: "select",
|
|
1923
1923
|
items: g(E.value),
|
|
1924
1924
|
placeholder: s(a)("filter.selectPlaceholder")
|
|
1925
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
1925
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (k(), U(I, {
|
|
1926
1926
|
key: 1,
|
|
1927
1927
|
id: l(E.value),
|
|
1928
1928
|
modelValue: i.value[E.value],
|
|
@@ -1982,7 +1982,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
1982
1982
|
]));
|
|
1983
1983
|
};
|
|
1984
1984
|
}
|
|
1985
|
-
}), Ha = /* @__PURE__ */ ce(Da, [["__scopeId", "data-v-15962ee2"]]), Se = /* @__PURE__ */
|
|
1985
|
+
}), Ha = /* @__PURE__ */ ce(Da, [["__scopeId", "data-v-15962ee2"]]), Se = /* @__PURE__ */ ee({
|
|
1986
1986
|
__name: "PermissionsWrapper",
|
|
1987
1987
|
props: {
|
|
1988
1988
|
/**
|
|
@@ -2010,7 +2010,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
2010
2010
|
}, { immediate: !0 }), (n, i) => a.value ? G(n.$slots, "default", {
|
|
2011
2011
|
key: 0,
|
|
2012
2012
|
isAllowed: t.value
|
|
2013
|
-
}) :
|
|
2013
|
+
}) : X("", !0);
|
|
2014
2014
|
}
|
|
2015
2015
|
}), za = { class: "form-section-wrapper" }, Wa = {
|
|
2016
2016
|
key: 0,
|
|
@@ -2021,7 +2021,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
2021
2021
|
}, Ya = {
|
|
2022
2022
|
key: 2,
|
|
2023
2023
|
class: "form-section-footer"
|
|
2024
|
-
}, Za = { class: "form-section-content" }, Ga = /* @__PURE__ */
|
|
2024
|
+
}, Za = { class: "form-section-content" }, Ga = /* @__PURE__ */ ee({
|
|
2025
2025
|
__name: "EntityFormSection",
|
|
2026
2026
|
props: {
|
|
2027
2027
|
title: {
|
|
@@ -2047,23 +2047,23 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
2047
2047
|
},
|
|
2048
2048
|
setup(e) {
|
|
2049
2049
|
const r = st();
|
|
2050
|
-
return (t, a) => (
|
|
2050
|
+
return (t, a) => (k(), q("fieldset", {
|
|
2051
2051
|
class: be(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
2052
2052
|
}, [
|
|
2053
2053
|
M("div", za, [
|
|
2054
|
-
e.hideInfoHeader ?
|
|
2054
|
+
e.hideInfoHeader ? X("", !0) : (k(), q("div", {
|
|
2055
2055
|
key: 0,
|
|
2056
2056
|
class: be(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
2057
2057
|
}, [
|
|
2058
|
-
e.title ? (
|
|
2059
|
-
e.description || s(r).description ? (
|
|
2058
|
+
e.title ? (k(), q("h4", Wa, $(e.title), 1)) : X("", !0),
|
|
2059
|
+
e.description || s(r).description ? (k(), q("div", Ja, [
|
|
2060
2060
|
G(t.$slots, "description", {}, () => [
|
|
2061
2061
|
M("p", null, $(e.description), 1)
|
|
2062
2062
|
], !0)
|
|
2063
|
-
])) :
|
|
2064
|
-
s(r).footer ? (
|
|
2063
|
+
])) : X("", !0),
|
|
2064
|
+
s(r).footer ? (k(), q("div", Ya, [
|
|
2065
2065
|
G(t.$slots, "footer", {}, void 0, !0)
|
|
2066
|
-
])) :
|
|
2066
|
+
])) : X("", !0)
|
|
2067
2067
|
], 2)),
|
|
2068
2068
|
M("div", Za, [
|
|
2069
2069
|
G(t.$slots, "default", {}, void 0, !0)
|
|
@@ -2085,13 +2085,13 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
2085
2085
|
for (const [a, n] of r)
|
|
2086
2086
|
t[a] = n;
|
|
2087
2087
|
return t;
|
|
2088
|
-
}, sn = (e) => (ft("data-v-
|
|
2088
|
+
}, sn = (e) => (ft("data-v-77afb926"), e = e(), yt(), e), cn = ["aria-hidden"], un = {
|
|
2089
2089
|
key: 0,
|
|
2090
2090
|
"data-testid": "kui-icon-svg-title"
|
|
2091
2091
|
}, dn = /* @__PURE__ */ sn(() => /* @__PURE__ */ M("path", {
|
|
2092
2092
|
d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
|
|
2093
2093
|
fill: "currentColor"
|
|
2094
|
-
}, null, -1)), pn = /* @__PURE__ */
|
|
2094
|
+
}, null, -1)), pn = /* @__PURE__ */ ee({
|
|
2095
2095
|
__name: "CopyIcon",
|
|
2096
2096
|
props: {
|
|
2097
2097
|
/** The accessibility text provided to screen readers */
|
|
@@ -2160,14 +2160,14 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
2160
2160
|
lineHeight: "0",
|
|
2161
2161
|
width: t.value
|
|
2162
2162
|
}));
|
|
2163
|
-
return (n, i) => (
|
|
2163
|
+
return (n, i) => (k(), U(_e(e.as), {
|
|
2164
2164
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2165
2165
|
class: "kui-icon copy-icon",
|
|
2166
2166
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
2167
2167
|
style: pt(a.value)
|
|
2168
2168
|
}, {
|
|
2169
2169
|
default: p(() => [
|
|
2170
|
-
(
|
|
2170
|
+
(k(), q("svg", {
|
|
2171
2171
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2172
2172
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
2173
2173
|
fill: "none",
|
|
@@ -2177,14 +2177,14 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
2177
2177
|
width: "100%",
|
|
2178
2178
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2179
2179
|
}, [
|
|
2180
|
-
e.title ? (
|
|
2180
|
+
e.title ? (k(), q("title", un, $(e.title), 1)) : X("", !0),
|
|
2181
2181
|
dn
|
|
2182
2182
|
], 8, cn))
|
|
2183
2183
|
]),
|
|
2184
2184
|
_: 1
|
|
2185
2185
|
}, 8, ["aria-hidden", "style"]));
|
|
2186
2186
|
}
|
|
2187
|
-
}), fn = /* @__PURE__ */ ln(pn, [["__scopeId", "data-v-
|
|
2187
|
+
}), fn = /* @__PURE__ */ ln(pn, [["__scopeId", "data-v-77afb926"]]), yn = "16px", mn = { class: "kong-ui-copy-uuid" }, gn = ["onClick"], He = 15, vn = /* @__PURE__ */ ee({
|
|
2188
2188
|
__name: "CopyUuid",
|
|
2189
2189
|
props: {
|
|
2190
2190
|
uuid: {
|
|
@@ -2264,8 +2264,8 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
2264
2264
|
};
|
|
2265
2265
|
return (S, T) => {
|
|
2266
2266
|
const B = F("KClipboardProvider");
|
|
2267
|
-
return
|
|
2268
|
-
e.format !== "hidden" ? (
|
|
2267
|
+
return k(), q("div", mn, [
|
|
2268
|
+
e.format !== "hidden" ? (k(), U(_e(e.idTooltip ? "KTooltip" : "div"), Oe({ key: 0 }, i.value, { "data-testid": "copy-id" }), {
|
|
2269
2269
|
default: p(() => [
|
|
2270
2270
|
M("div", {
|
|
2271
2271
|
class: be([
|
|
@@ -2276,8 +2276,8 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
2276
2276
|
}, $(f.value), 3)
|
|
2277
2277
|
]),
|
|
2278
2278
|
_: 1
|
|
2279
|
-
}, 16)) :
|
|
2280
|
-
(
|
|
2279
|
+
}, 16)) : X("", !0),
|
|
2280
|
+
(k(), U(_e(e.tooltip ? "KTooltip" : "div"), Oe(y.value, { class: "uuid-icon-wrapper" }), {
|
|
2281
2281
|
default: p(() => [
|
|
2282
2282
|
C(B, null, {
|
|
2283
2283
|
default: p(({ copyToClipboard: v }) => [
|
|
@@ -2310,7 +2310,7 @@ const ga = ["onReset", "onSubmit"], va = {
|
|
|
2310
2310
|
t[a] = n;
|
|
2311
2311
|
return t;
|
|
2312
2312
|
}, bn = /* @__PURE__ */ hn(vn, [["__scopeId", "data-v-0c07874b"]]);
|
|
2313
|
-
const kn = { class: "kong-ui-entities-snis-list" }, wn = { key: 1 }, Sn = { key: 1 }, _n = /* @__PURE__ */
|
|
2313
|
+
const kn = { class: "kong-ui-entities-snis-list" }, wn = { key: 1 }, Sn = { key: 1 }, _n = /* @__PURE__ */ ee({
|
|
2314
2314
|
__name: "SniList",
|
|
2315
2315
|
props: {
|
|
2316
2316
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2357,9 +2357,9 @@ const kn = { class: "kong-ui-entities-snis-list" }, wn = { key: 1 }, Sn = { key:
|
|
|
2357
2357
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
2358
2358
|
setup(e, { emit: r }) {
|
|
2359
2359
|
var de;
|
|
2360
|
-
const t = e, { i18n: { t: a } } = Ze.useI18n(), n = (
|
|
2360
|
+
const t = e, { i18n: { t: a } } = Ze.useI18n(), n = (b, O) => {
|
|
2361
2361
|
var d;
|
|
2362
|
-
|
|
2362
|
+
b.type === "error" ? r("copy:error", {
|
|
2363
2363
|
entity: O,
|
|
2364
2364
|
field: "certificate.id",
|
|
2365
2365
|
message: a("errors.copy")
|
|
@@ -2374,24 +2374,24 @@ const kn = { class: "kong-ui-entities-snis-list" }, wn = { key: 1 }, Sn = { key:
|
|
|
2374
2374
|
name: { label: a("snis.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
2375
2375
|
certificate: { label: a("snis.list.table_headers.certificate_id"), sortable: !1 },
|
|
2376
2376
|
tags: { label: a("snis.list.table_headers.tags"), sortable: !1 }
|
|
2377
|
-
}, f = y, l = (
|
|
2377
|
+
}, f = y, l = (b) => ({
|
|
2378
2378
|
style: {
|
|
2379
|
-
maxWidth:
|
|
2379
|
+
maxWidth: b.headerKey === "name" ? "250px" : b.headerKey === "certificate" ? "350px" : null
|
|
2380
2380
|
}
|
|
2381
2381
|
}), g = w(() => {
|
|
2382
2382
|
var O, d;
|
|
2383
|
-
let
|
|
2384
|
-
return t.config.app === "konnect" ?
|
|
2383
|
+
let b = `${t.config.apiBaseUrl}${pe.list[t.config.app].all}`;
|
|
2384
|
+
return t.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((O = t.config) == null ? void 0 : O.controlPlaneId) || "") : t.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (d = t.config) != null && d.workspace ? `/${t.config.workspace}` : "")), b;
|
|
2385
2385
|
}), S = x(""), T = w(() => {
|
|
2386
|
-
const
|
|
2387
|
-
if (
|
|
2386
|
+
const b = t.config.app === "konnect" || t.config.isExactMatch;
|
|
2387
|
+
if (b)
|
|
2388
2388
|
return {
|
|
2389
|
-
isExactMatch:
|
|
2389
|
+
isExactMatch: b,
|
|
2390
2390
|
placeholder: a("search.placeholder")
|
|
2391
2391
|
};
|
|
2392
2392
|
const { name: O } = y;
|
|
2393
2393
|
return {
|
|
2394
|
-
isExactMatch:
|
|
2394
|
+
isExactMatch: b,
|
|
2395
2395
|
fields: { name: O },
|
|
2396
2396
|
schema: t.config.filterSchema
|
|
2397
2397
|
};
|
|
@@ -2404,44 +2404,44 @@ const kn = { class: "kong-ui-entities-snis-list" }, wn = { key: 1 }, Sn = { key:
|
|
|
2404
2404
|
ctaText: void 0,
|
|
2405
2405
|
message: a("snis.list.empty_state.description"),
|
|
2406
2406
|
title: a("snis.title")
|
|
2407
|
-
}), u = (
|
|
2408
|
-
const d =
|
|
2407
|
+
}), u = (b, O) => {
|
|
2408
|
+
const d = b.id;
|
|
2409
2409
|
if (!O(d)) {
|
|
2410
2410
|
r("copy:error", {
|
|
2411
|
-
entity:
|
|
2411
|
+
entity: b,
|
|
2412
2412
|
field: "id",
|
|
2413
2413
|
message: a("errors.copy")
|
|
2414
2414
|
});
|
|
2415
2415
|
return;
|
|
2416
2416
|
}
|
|
2417
2417
|
r("copy:success", {
|
|
2418
|
-
entity:
|
|
2418
|
+
entity: b,
|
|
2419
2419
|
field: "id",
|
|
2420
2420
|
message: a("copy.success", { val: d })
|
|
2421
2421
|
});
|
|
2422
|
-
}, A = (
|
|
2423
|
-
const d = JSON.stringify(
|
|
2422
|
+
}, A = (b, O) => {
|
|
2423
|
+
const d = JSON.stringify(b);
|
|
2424
2424
|
if (!O(d)) {
|
|
2425
2425
|
r("copy:error", {
|
|
2426
|
-
entity:
|
|
2426
|
+
entity: b,
|
|
2427
2427
|
message: a("errors.copy")
|
|
2428
2428
|
});
|
|
2429
2429
|
return;
|
|
2430
2430
|
}
|
|
2431
2431
|
r("copy:success", {
|
|
2432
|
-
entity:
|
|
2432
|
+
entity: b,
|
|
2433
2433
|
message: a("copy.success_brief")
|
|
2434
2434
|
});
|
|
2435
|
-
}, H = (
|
|
2435
|
+
}, H = (b) => ({
|
|
2436
2436
|
label: a("actions.edit"),
|
|
2437
|
-
to: t.config.getEditRoute(
|
|
2438
|
-
}), E = x(void 0), P = x(!1), K = x(!1), z = x(""), N = Qa(t.config, g.value), L = (
|
|
2439
|
-
E.value =
|
|
2437
|
+
to: t.config.getEditRoute(b)
|
|
2438
|
+
}), E = x(void 0), P = x(!1), K = x(!1), z = x(""), N = Qa(t.config, g.value), L = (b) => {
|
|
2439
|
+
E.value = b, P.value = !0;
|
|
2440
2440
|
}, Z = () => {
|
|
2441
2441
|
P.value = !1, E.value = void 0;
|
|
2442
2442
|
}, ue = async () => {
|
|
2443
|
-
var
|
|
2444
|
-
if ((
|
|
2443
|
+
var b, O, d;
|
|
2444
|
+
if ((b = E.value) != null && b.id) {
|
|
2445
2445
|
K.value = !0;
|
|
2446
2446
|
try {
|
|
2447
2447
|
await i.delete(N(E.value.id)), r("delete:success", E.value), K.value = !1, Z(), o.value++;
|
|
@@ -2451,21 +2451,21 @@ const kn = { class: "kong-ui-entities-snis-list" }, wn = { key: 1 }, Sn = { key:
|
|
|
2451
2451
|
K.value = !1;
|
|
2452
2452
|
}
|
|
2453
2453
|
}
|
|
2454
|
-
},
|
|
2455
|
-
return ae(v, (
|
|
2456
|
-
var O, d, _, V
|
|
2457
|
-
if (((
|
|
2454
|
+
}, te = x(!0);
|
|
2455
|
+
return ae(v, (b) => {
|
|
2456
|
+
var O, d, _, V;
|
|
2457
|
+
if (Array.isArray((O = b == null ? void 0 : b.response) == null ? void 0 : O.data) && (te.value = b.response.data.length > 0), b.status === ie.Error) {
|
|
2458
2458
|
I.value = {
|
|
2459
2459
|
title: a("errors.general")
|
|
2460
|
-
}, (
|
|
2460
|
+
}, (V = (_ = (d = b.error) == null ? void 0 : d.response) == null ? void 0 : _.data) != null && V.message && (I.value.message = b.error.response.data.message), r("error", b.error);
|
|
2461
2461
|
return;
|
|
2462
2462
|
}
|
|
2463
2463
|
I.value = null;
|
|
2464
2464
|
}), Ce(async () => {
|
|
2465
2465
|
await t.canCreate() && (j.value.title = a("snis.list.empty_state.title"), j.value.ctaText = a("actions.create"));
|
|
2466
|
-
}), (
|
|
2467
|
-
const d = F("KButton"), _ = F("KBadge"), V = F("KTruncate"),
|
|
2468
|
-
return
|
|
2466
|
+
}), (b, O) => {
|
|
2467
|
+
const d = F("KButton"), _ = F("KBadge"), V = F("KTruncate"), re = F("KDropdownItem"), W = F("KClipboardProvider");
|
|
2468
|
+
return k(), q("div", kn, [
|
|
2469
2469
|
C(s(Ta), {
|
|
2470
2470
|
"cache-identifier": e.cacheIdentifier,
|
|
2471
2471
|
"cell-attributes": l,
|
|
@@ -2493,7 +2493,7 @@ const kn = { class: "kong-ui-entities-snis-list" }, wn = { key: 1 }, Sn = { key:
|
|
|
2493
2493
|
}, null, 8, ["modelValue", "config"])
|
|
2494
2494
|
]),
|
|
2495
2495
|
"toolbar-button": p(() => [
|
|
2496
|
-
(
|
|
2496
|
+
(k(), U(mt, {
|
|
2497
2497
|
disabled: !e.useActionOutside,
|
|
2498
2498
|
to: "#kong-ui-app-page-header-action-button"
|
|
2499
2499
|
}, [
|
|
@@ -2512,7 +2512,7 @@ const kn = { class: "kong-ui-entities-snis-list" }, wn = { key: 1 }, Sn = { key:
|
|
|
2512
2512
|
]),
|
|
2513
2513
|
_: 1
|
|
2514
2514
|
}, 8, ["to"]), [
|
|
2515
|
-
[ye,
|
|
2515
|
+
[ye, te.value]
|
|
2516
2516
|
])
|
|
2517
2517
|
]),
|
|
2518
2518
|
_: 1
|
|
@@ -2523,38 +2523,38 @@ const kn = { class: "kong-ui-entities-snis-list" }, wn = { key: 1 }, Sn = { key:
|
|
|
2523
2523
|
M("b", null, $(R ?? "-"), 1)
|
|
2524
2524
|
]),
|
|
2525
2525
|
certificate: p(({ row: R }) => [
|
|
2526
|
-
R.certificate && R.certificate.id ? (
|
|
2526
|
+
R.certificate && R.certificate.id ? (k(), U(s(bn), {
|
|
2527
2527
|
key: 0,
|
|
2528
2528
|
class: "copy-certificate-uuid",
|
|
2529
2529
|
"data-testid": "copy-certificate-uuid",
|
|
2530
|
-
notify: (
|
|
2530
|
+
notify: (Q) => n(Q, R),
|
|
2531
2531
|
truncated: !1,
|
|
2532
2532
|
uuid: R.certificate.id
|
|
2533
|
-
}, null, 8, ["notify", "uuid"])) : (
|
|
2533
|
+
}, null, 8, ["notify", "uuid"])) : (k(), q("span", wn, "-"))
|
|
2534
2534
|
]),
|
|
2535
2535
|
tags: p(({ rowValue: R }) => [
|
|
2536
|
-
R != null && R.length ? (
|
|
2536
|
+
R != null && R.length ? (k(), U(V, { key: 0 }, {
|
|
2537
2537
|
default: p(() => [
|
|
2538
|
-
(
|
|
2539
|
-
key:
|
|
2538
|
+
(k(!0), q(We, null, xe(R, (Q) => (k(), U(_, {
|
|
2539
|
+
key: Q,
|
|
2540
2540
|
onClick: O[1] || (O[1] = he(() => {
|
|
2541
2541
|
}, ["stop"]))
|
|
2542
2542
|
}, {
|
|
2543
2543
|
default: p(() => [
|
|
2544
|
-
J($(
|
|
2544
|
+
J($(Q), 1)
|
|
2545
2545
|
]),
|
|
2546
2546
|
_: 2
|
|
2547
2547
|
}, 1024))), 128))
|
|
2548
2548
|
]),
|
|
2549
2549
|
_: 2
|
|
2550
|
-
}, 1024)) : (
|
|
2550
|
+
}, 1024)) : (k(), q("span", Sn, "-"))
|
|
2551
2551
|
]),
|
|
2552
2552
|
actions: p(({ row: R }) => [
|
|
2553
2553
|
C(W, null, {
|
|
2554
|
-
default: p(({ copyToClipboard:
|
|
2555
|
-
C(
|
|
2554
|
+
default: p(({ copyToClipboard: Q }) => [
|
|
2555
|
+
C(re, {
|
|
2556
2556
|
"data-testid": "action-entity-copy-id",
|
|
2557
|
-
onClick: (ge) => u(R,
|
|
2557
|
+
onClick: (ge) => u(R, Q)
|
|
2558
2558
|
}, {
|
|
2559
2559
|
default: p(() => [
|
|
2560
2560
|
J($(s(a)("actions.copy_id")), 1)
|
|
@@ -2565,10 +2565,10 @@ const kn = { class: "kong-ui-entities-snis-list" }, wn = { key: 1 }, Sn = { key:
|
|
|
2565
2565
|
_: 2
|
|
2566
2566
|
}, 1024),
|
|
2567
2567
|
C(W, null, {
|
|
2568
|
-
default: p(({ copyToClipboard:
|
|
2569
|
-
C(
|
|
2568
|
+
default: p(({ copyToClipboard: Q }) => [
|
|
2569
|
+
C(re, {
|
|
2570
2570
|
"data-testid": "action-entity-copy-json",
|
|
2571
|
-
onClick: (ge) => A(R,
|
|
2571
|
+
onClick: (ge) => A(R, Q)
|
|
2572
2572
|
}, {
|
|
2573
2573
|
default: p(() => [
|
|
2574
2574
|
J($(s(a)("actions.copy_json")), 1)
|
|
@@ -2582,7 +2582,7 @@ const kn = { class: "kong-ui-entities-snis-list" }, wn = { key: 1 }, Sn = { key:
|
|
|
2582
2582
|
"auth-function": () => e.canEdit(R)
|
|
2583
2583
|
}, {
|
|
2584
2584
|
default: p(() => [
|
|
2585
|
-
C(
|
|
2585
|
+
C(re, {
|
|
2586
2586
|
"data-testid": "action-entity-edit",
|
|
2587
2587
|
item: H(R.id)
|
|
2588
2588
|
}, null, 8, ["item"])
|
|
@@ -2593,11 +2593,11 @@ const kn = { class: "kong-ui-entities-snis-list" }, wn = { key: 1 }, Sn = { key:
|
|
|
2593
2593
|
"auth-function": () => e.canDelete(R)
|
|
2594
2594
|
}, {
|
|
2595
2595
|
default: p(() => [
|
|
2596
|
-
C(
|
|
2596
|
+
C(re, {
|
|
2597
2597
|
danger: "",
|
|
2598
2598
|
"data-testid": "action-entity-delete",
|
|
2599
2599
|
"has-divider": "",
|
|
2600
|
-
onClick: (
|
|
2600
|
+
onClick: (Q) => L(R)
|
|
2601
2601
|
}, {
|
|
2602
2602
|
default: p(() => [
|
|
2603
2603
|
J($(s(a)("actions.delete")), 1)
|
|
@@ -2631,11 +2631,11 @@ const lt = (e, r) => {
|
|
|
2631
2631
|
for (const [a, n] of r)
|
|
2632
2632
|
t[a] = n;
|
|
2633
2633
|
return t;
|
|
2634
|
-
}, qn = /* @__PURE__ */ lt(_n, [["__scopeId", "data-v-
|
|
2634
|
+
}, qn = /* @__PURE__ */ lt(_n, [["__scopeId", "data-v-5470cca7"]]), In = { class: "kong-ui-entities-snis-form" }, Cn = { "data-testid": "no-search-results" }, xn = {
|
|
2635
2635
|
key: 2,
|
|
2636
2636
|
class: "invalid-certificate-message",
|
|
2637
2637
|
"data-testid": "invalid-certificate-message"
|
|
2638
|
-
}, Tn = /* @__PURE__ */
|
|
2638
|
+
}, Tn = /* @__PURE__ */ ee({
|
|
2639
2639
|
__name: "SniForm",
|
|
2640
2640
|
props: {
|
|
2641
2641
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2682,7 +2682,7 @@ const lt = (e, r) => {
|
|
|
2682
2682
|
let d = `${t.config.apiBaseUrl}${pe.form[t.config.app][y.value]}`;
|
|
2683
2683
|
return t.config.app === "konnect" ? d = d.replace(/{controlPlaneId}/gi, ((_ = t.config) == null ? void 0 : _.controlPlaneId) || "") : t.config.app === "kongManager" && (d = d.replace(/\/{workspace}/gi, (V = t.config) != null && V.workspace ? `/${t.config.workspace}` : "")), d = d.replace(/{id}/gi, t.sniId), d;
|
|
2684
2684
|
}), h = async () => {
|
|
2685
|
-
var d, _, V,
|
|
2685
|
+
var d, _, V, re, W, R, Q, ge;
|
|
2686
2686
|
try {
|
|
2687
2687
|
l.isReadonly = !0;
|
|
2688
2688
|
const ne = {
|
|
@@ -2691,7 +2691,7 @@ const lt = (e, r) => {
|
|
|
2691
2691
|
certificate: { id: f.value || l.fields.certificate_id }
|
|
2692
2692
|
};
|
|
2693
2693
|
let Y;
|
|
2694
|
-
await o.post(v.value, ne), y.value === "create" ? Y = await o.post(c.value, ne) : y.value === "edit" && (Y = ((V = t.config) == null ? void 0 : V.app) === "konnect" ? await o.put(c.value, ne) : await o.patch(c.value, ne)), l.fields.name = ((
|
|
2694
|
+
await o.post(v.value, ne), y.value === "create" ? Y = await o.post(c.value, ne) : y.value === "edit" && (Y = ((V = t.config) == null ? void 0 : V.app) === "konnect" ? await o.put(c.value, ne) : await o.patch(c.value, ne)), l.fields.name = ((re = Y == null ? void 0 : Y.data) == null ? void 0 : re.name) || "", l.fields.tags = ((R = (W = Y == null ? void 0 : Y.data) == null ? void 0 : W.tags) == null ? void 0 : R.join(", ")) || "", l.fields.certificate_id = ((ge = (Q = Y == null ? void 0 : Y.data) == null ? void 0 : Q.certificate) == null ? void 0 : ge.id) || "", Object.assign(g, l.fields), r("update", Y == null ? void 0 : Y.data);
|
|
2695
2695
|
} catch (ne) {
|
|
2696
2696
|
l.errorMessage = i(ne), r("error", ne);
|
|
2697
2697
|
} finally {
|
|
@@ -2707,25 +2707,25 @@ const lt = (e, r) => {
|
|
|
2707
2707
|
results: P
|
|
2708
2708
|
} = tn(t.config, pe.form[t.config.app].certificates), K = x(!0), z = (d) => {
|
|
2709
2709
|
K.value = !d, I(d);
|
|
2710
|
-
}, N = w(() => A.value ? n("errors.certificates.fetch") : ""), L = w(() => H.value ? n("errors.certificates.invalid") : ""), Z = x(0), ue = w(() => u.value === void 0),
|
|
2710
|
+
}, N = w(() => A.value ? n("errors.certificates.fetch") : ""), L = w(() => H.value ? n("errors.certificates.invalid") : ""), Z = x(0), ue = w(() => u.value === void 0), te = x(/* @__PURE__ */ new Set()), de = w(() => Array.from(te.value).map((_) => ({
|
|
2711
2711
|
label: _,
|
|
2712
2712
|
value: _,
|
|
2713
2713
|
selected: l.fields.certificate_id === _
|
|
2714
|
-
}))),
|
|
2715
|
-
|
|
2714
|
+
}))), b = (d) => {
|
|
2715
|
+
te.value.clear();
|
|
2716
2716
|
let _;
|
|
2717
2717
|
for (_ of d)
|
|
2718
|
-
|
|
2718
|
+
te.value.add(_.id);
|
|
2719
2719
|
};
|
|
2720
2720
|
return ae(P, (d) => {
|
|
2721
|
-
|
|
2721
|
+
b(d);
|
|
2722
2722
|
}, { immediate: !0, deep: !0 }), ae(de, () => {
|
|
2723
2723
|
Z.value++;
|
|
2724
2724
|
}, { immediate: !0, deep: !0 }), Ce(async () => {
|
|
2725
2725
|
await E();
|
|
2726
2726
|
}), (d, _) => {
|
|
2727
|
-
const V = F("KInput"),
|
|
2728
|
-
return
|
|
2727
|
+
const V = F("KInput"), re = F("KSelect");
|
|
2728
|
+
return k(), q("div", In, [
|
|
2729
2729
|
C(s(ba), {
|
|
2730
2730
|
"can-submit": S.value,
|
|
2731
2731
|
config: e.config,
|
|
@@ -2779,7 +2779,7 @@ const lt = (e, r) => {
|
|
|
2779
2779
|
title: s(n)("form.sections.certificate.title")
|
|
2780
2780
|
}, {
|
|
2781
2781
|
default: p(() => [
|
|
2782
|
-
f.value ? (
|
|
2782
|
+
f.value ? (k(), U(V, {
|
|
2783
2783
|
key: 0,
|
|
2784
2784
|
"data-testid": "sni-form-certificate-id",
|
|
2785
2785
|
label: s(n)("form.fields.certificate_id.label"),
|
|
@@ -2787,7 +2787,7 @@ const lt = (e, r) => {
|
|
|
2787
2787
|
readonly: "",
|
|
2788
2788
|
required: "",
|
|
2789
2789
|
width: "100%"
|
|
2790
|
-
}, null, 8, ["label", "model-value"])) : (
|
|
2790
|
+
}, null, 8, ["label", "model-value"])) : (k(), U(re, {
|
|
2791
2791
|
key: 1,
|
|
2792
2792
|
modelValue: l.fields.certificate_id,
|
|
2793
2793
|
"onUpdate:modelValue": _[2] || (_[2] = (W) => l.fields.certificate_id = W),
|
|
@@ -2815,7 +2815,7 @@ const lt = (e, r) => {
|
|
|
2815
2815
|
]),
|
|
2816
2816
|
_: 1
|
|
2817
2817
|
}, 8, ["modelValue", "class", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly"])),
|
|
2818
|
-
L.value ? (
|
|
2818
|
+
L.value ? (k(), q("p", xn, $(L.value), 1)) : X("", !0)
|
|
2819
2819
|
]),
|
|
2820
2820
|
_: 1
|
|
2821
2821
|
}, 8, ["description", "title"])
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
`+t.mark.snippet),a+" "+r):a}function Q(t,n){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=n,this.message=_e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Q.prototype=Object.create(Error.prototype),Q.prototype.constructor=Q,Q.prototype.toString=function(t){return this.name+": "+_e(this,t)};var z=Q,Nt=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],_t=["scalar","sequence","mapping"];function It(t){var n={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(a){n[String(a)]=r})}),n}function Et(t,n){if(n=n||{},Object.keys(n).forEach(function(r){if(Nt.indexOf(r)===-1)throw new z('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=n,this.tag=t,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(r){return r},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=It(n.styleAliases||null),_t.indexOf(this.kind)===-1)throw new z('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var O=Et;function Ie(t,n){var r=[];return t[n].forEach(function(a){var o=r.length;r.forEach(function(i,l){i.tag===a.tag&&i.kind===a.kind&&i.multi===a.multi&&(o=l)}),r[o]=a}),r}function Tt(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,r;function a(o){o.multi?(t.multi[o.kind].push(o),t.multi.fallback.push(o)):t[o.kind][o.tag]=t.fallback[o.tag]=o}for(n=0,r=arguments.length;n<r;n+=1)arguments[n].forEach(a);return t}function le(t){return this.extend(t)}le.prototype.extend=function(t){var n=[],r=[];if(t instanceof O)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new z("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(o){if(!(o instanceof O))throw new z("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new z("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new z("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(o){if(!(o instanceof O))throw new z("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(le.prototype);return a.implicit=(this.implicit||[]).concat(n),a.explicit=(this.explicit||[]).concat(r),a.compiledImplicit=Ie(a,"implicit"),a.compiledExplicit=Ie(a,"explicit"),a.compiledTypeMap=Tt(a.compiledImplicit,a.compiledExplicit),a};var Vt=le,Bt=new O("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),At=new O("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),$t=new O("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Mt=new Vt({explicit:[Bt,At,$t]});function Ot(t){if(t===null)return!0;var n=t.length;return n===1&&t==="~"||n===4&&(t==="null"||t==="Null"||t==="NULL")}function Dt(){return null}function Ft(t){return t===null}var Kt=new O("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ot,construct:Dt,predicate:Ft,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function jt(t){if(t===null)return!1;var n=t.length;return n===4&&(t==="true"||t==="True"||t==="TRUE")||n===5&&(t==="false"||t==="False"||t==="FALSE")}function qt(t){return t==="true"||t==="True"||t==="TRUE"}function Pt(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var Rt=new O("tag:yaml.org,2002:bool",{kind:"scalar",resolve:jt,construct:qt,predicate:Pt,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function vt(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Ut(t){return 48<=t&&t<=55}function Lt(t){return 48<=t&&t<=57}function Ht(t){if(t===null)return!1;var n=t.length,r=0,a=!1,o;if(!n)return!1;if(o=t[r],(o==="-"||o==="+")&&(o=t[++r]),o==="0"){if(r+1===n)return!0;if(o=t[++r],o==="b"){for(r++;r<n;r++)if(o=t[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;a=!0}return a&&o!=="_"}if(o==="x"){for(r++;r<n;r++)if(o=t[r],o!=="_"){if(!vt(t.charCodeAt(r)))return!1;a=!0}return a&&o!=="_"}if(o==="o"){for(r++;r<n;r++)if(o=t[r],o!=="_"){if(!Ut(t.charCodeAt(r)))return!1;a=!0}return a&&o!=="_"}}if(o==="_")return!1;for(;r<n;r++)if(o=t[r],o!=="_"){if(!Lt(t.charCodeAt(r)))return!1;a=!0}return!(!a||o==="_")}function zt(t){var n=t,r=1,a;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),a=n[0],(a==="-"||a==="+")&&(a==="-"&&(r=-1),n=n.slice(1),a=n[0]),n==="0")return 0;if(a==="0"){if(n[1]==="b")return r*parseInt(n.slice(2),2);if(n[1]==="x")return r*parseInt(n.slice(2),16);if(n[1]==="o")return r*parseInt(n.slice(2),8)}return r*parseInt(n,10)}function Wt(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!ie.isNegativeZero(t)}var Jt=new O("tag:yaml.org,2002:int",{kind:"scalar",resolve:Ht,construct:zt,predicate:Wt,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Yt=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Zt(t){return!(t===null||!Yt.test(t)||t[t.length-1]==="_")}function Gt(t){var n,r;return n=t.replace(/_/g,"").toLowerCase(),r=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:r*parseFloat(n,10)}var Qt=/^[-+]?[0-9]+e/;function Xt(t,n){var r;if(isNaN(t))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ie.isNegativeZero(t))return"-0.0";return r=t.toString(10),Qt.test(r)?r.replace("e",".e"):r}function er(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||ie.isNegativeZero(t))}var tr=new O("tag:yaml.org,2002:float",{kind:"scalar",resolve:Zt,construct:Gt,predicate:er,represent:Xt,defaultStyle:"lowercase"}),rr=Mt.extend({implicit:[Kt,Rt,Jt,tr]}),nr=rr,Ee=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Te=new RegExp("^([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]))?))?$");function ar(t){return t===null?!1:Ee.exec(t)!==null||Te.exec(t)!==null}function or(t){var n,r,a,o,i,l,m,f=0,u=null,s,y,k;if(n=Ee.exec(t),n===null&&(n=Te.exec(t)),n===null)throw new Error("Date resolve error");if(r=+n[1],a=+n[2]-1,o=+n[3],!n[4])return new Date(Date.UTC(r,a,o));if(i=+n[4],l=+n[5],m=+n[6],n[7]){for(f=n[7].slice(0,3);f.length<3;)f+="0";f=+f}return n[9]&&(s=+n[10],y=+(n[11]||0),u=(s*60+y)*6e4,n[9]==="-"&&(u=-u)),k=new Date(Date.UTC(r,a,o,i,l,m,f)),u&&k.setTime(k.getTime()-u),k}function ir(t){return t.toISOString()}var lr=new O("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ar,construct:or,instanceOf:Date,represent:ir});function sr(t){return t==="<<"||t===null}var cr=new O("tag:yaml.org,2002:merge",{kind:"scalar",resolve:sr}),se=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
4
4
|
\r`;function dr(t){if(t===null)return!1;var n,r,a=0,o=t.length,i=se;for(r=0;r<o;r++)if(n=i.indexOf(t.charAt(r)),!(n>64)){if(n<0)return!1;a+=6}return a%8===0}function pr(t){var n,r,a=t.replace(/[\r\n=]/g,""),o=a.length,i=se,l=0,m=[];for(n=0;n<o;n++)n%4===0&&n&&(m.push(l>>16&255),m.push(l>>8&255),m.push(l&255)),l=l<<6|i.indexOf(a.charAt(n));return r=o%4*6,r===0?(m.push(l>>16&255),m.push(l>>8&255),m.push(l&255)):r===18?(m.push(l>>10&255),m.push(l>>2&255)):r===12&&m.push(l>>4&255),new Uint8Array(m)}function ur(t){var n="",r=0,a,o,i=t.length,l=se;for(a=0;a<i;a++)a%3===0&&a&&(n+=l[r>>18&63],n+=l[r>>12&63],n+=l[r>>6&63],n+=l[r&63]),r=(r<<8)+t[a];return o=i%3,o===0?(n+=l[r>>18&63],n+=l[r>>12&63],n+=l[r>>6&63],n+=l[r&63]):o===2?(n+=l[r>>10&63],n+=l[r>>4&63],n+=l[r<<2&63],n+=l[64]):o===1&&(n+=l[r>>2&63],n+=l[r<<4&63],n+=l[64],n+=l[64]),n}function fr(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var mr=new O("tag:yaml.org,2002:binary",{kind:"scalar",resolve:dr,construct:pr,predicate:fr,represent:ur}),yr=Object.prototype.hasOwnProperty,gr=Object.prototype.toString;function hr(t){if(t===null)return!0;var n=[],r,a,o,i,l,m=t;for(r=0,a=m.length;r<a;r+=1){if(o=m[r],l=!1,gr.call(o)!=="[object Object]")return!1;for(i in o)if(yr.call(o,i))if(!l)l=!0;else return!1;if(!l)return!1;if(n.indexOf(i)===-1)n.push(i);else return!1}return!0}function br(t){return t!==null?t:[]}var kr=new O("tag:yaml.org,2002:omap",{kind:"sequence",resolve:hr,construct:br}),wr=Object.prototype.toString;function Cr(t){if(t===null)return!0;var n,r,a,o,i,l=t;for(i=new Array(l.length),n=0,r=l.length;n<r;n+=1){if(a=l[n],wr.call(a)!=="[object Object]"||(o=Object.keys(a),o.length!==1))return!1;i[n]=[o[0],a[o[0]]]}return!0}function Sr(t){if(t===null)return[];var n,r,a,o,i,l=t;for(i=new Array(l.length),n=0,r=l.length;n<r;n+=1)a=l[n],o=Object.keys(a),i[n]=[o[0],a[o[0]]];return i}var xr=new O("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Cr,construct:Sr}),Nr=Object.prototype.hasOwnProperty;function _r(t){if(t===null)return!0;var n,r=t;for(n in r)if(Nr.call(r,n)&&r[n]!==null)return!1;return!0}function Ir(t){return t!==null?t:{}}var Er=new O("tag:yaml.org,2002:set",{kind:"mapping",resolve:_r,construct:Ir});nr.extend({implicit:[lr,cr],explicit:[mr,kr,xr,Er]});function Ve(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
|
5
|
-
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"
":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}for(var Tr=new Array(256),Vr=new Array(256),Y=0;Y<256;Y++)Tr[Y]=Ve(Y)?1:0,Vr[Y]=Ve(Y);const Br=["onReset","onSubmit"],Ar={class:"form-actions","data-testid":"form-actions"},$r=J(e.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(t,{emit:n}){var r;const a=t,o=pe.useRouter(),{i18n:{t:i}}=H.useI18n(),{getMessageFromError:l}=H.useErrors(),{axiosInstance:m}=H.useAxios({headers:(r=a.config)==null?void 0:r.requestHeaders}),f=e.ref(!1),u=e.ref(!1),s=e.ref(""),y=e.computed(()=>a.canSubmit===!1||a.isReadonly),k=e.computed(()=>{var c,h;if(!a.editId)return"";let C=`${a.config.apiBaseUrl}${a.fetchUrl}`;return a.config.app==="konnect"?C=C.replace(/{controlPlaneId}/gi,((c=a.config)==null?void 0:c.controlPlaneId)||""):a.config.app==="kongManager"&&(C=C.replace(/\/{workspace}/gi,(h=a.config)!=null&&h.workspace?`/${a.config.workspace}`:"")),C=C.replace(/{id}/gi,a.editId),C}),S=()=>{a.config.cancelRoute?o.push(a.config.cancelRoute):A()},A=()=>{n("cancel")},g=()=>{y.value||n("submit")};return e.watch(()=>f.value,c=>{n("loading",c)},{immediate:!0}),e.onBeforeMount(async()=>{if(a.editId)try{u.value=!1,f.value=!0;const{data:c}=await m.get(k.value);n("fetch:success",c)}catch(c){const h=l(c);s.value=h.startsWith("code")?i("baseForm.errors.edit"):h,u.value=!0,n("fetch:error",c)}finally{f.value=!1}}),(c,h)=>{const C=e.resolveComponent("KSkeleton"),T=e.resolveComponent("KEmptyState"),d=e.resolveComponent("KAlert"),_=e.resolveComponent("KButton"),D=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(D,{class:"kong-ui-entity-base-form"},{body:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(C,{key:0,type:"form"})):u.value?(e.openBlock(),e.createBlock(T,{key:1,"cta-text":e.unref(i)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":S,"is-error":!0},{message:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(s.value),1)]),_:1},8,["cta-text"])):(e.openBlock(),e.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:e.withModifiers(A,["prevent"]),onSubmit:e.withModifiers(g,["prevent"])},[e.renderSlot(c.$slots,"default",{},void 0,!0),t.errorMessage?(e.openBlock(),e.createBlock(d,{key:0,"alert-message":t.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ar,[e.renderSlot(c.$slots,"form-actions",{},()=>[e.createVNode(_,{appearance:"secondary","data-testid":"form-cancel",disabled:t.isReadonly,type:"reset"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),e.createVNode(_,{appearance:"primary","data-testid":"form-submit",disabled:y.value,type:"submit"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,Br))]),_:3})}}}),[["__scopeId","data-v-81612aef"]]),Mr={key:0,"data-testid":"first-col"},Or=J(e.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(t){const n=t,r=e.computed(()=>{var g;return((g=n.rowEl)==null?void 0:g.querySelector(`[data-testid="${n.keyName}"]`))||null}),a=e.computed(()=>{var g;return((g=r.value)==null?void 0:g.querySelector('[data-testid="first-col"]'))||null}),o=e.computed(()=>{var g,c;const h=(g=n.rowEl)==null?void 0:g.querySelectorAll("td");return h?((c=h[0])==null?void 0:c.getAttribute("data-testid"))===n.keyName:!1});let i;const l=()=>{i&&(i.disconnect(),i=void 0)},m=()=>{var g,c,h;u.value=((g=a.value)==null?void 0:g.getBoundingClientRect().width)||0,s.value=((c=r.value)==null?void 0:c.clientWidth)||0,y.value=((h=f.value)==null?void 0:h.innerText)||""},f=e.ref({}),u=e.ref(0),s=e.ref(0),y=e.ref(""),k=e.computed(()=>[a.value,r.value]),S=e.watch(k,g=>{if(o.value&&(l(),"ResizeObserver"in window&&window)){i=new ResizeObserver(c=>{window.requestAnimationFrame(()=>{!Array.isArray(c)||!c.length||m()})});for(const c of g)c&&i.observe(c)}},{immediate:!0,flush:"post",deep:!0}),A=e.computed(()=>o.value?u.value>s.value:!1);return e.onMounted(()=>{m()}),e.onUnmounted(()=>{S()}),(g,c)=>{const h=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{ref_key:"contentRef",ref:f,class:"content-wrapper"},[o.value?(e.openBlock(),e.createElementBlock("span",Mr,[e.createVNode(h,{label:A.value?y.value:"","max-width":"300",placement:"bottomStart"},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"default",{},void 0,!0)]),_:3},8,["label"])])):e.renderSlot(g.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-e42a20c9"]]),Dr={class:"toolbar-container"},Fr={key:0,class:"toolbar-button-container"},Kr=["data-testid"],jr=J(e.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""},disableRowClick:{type:Boolean,default:!1}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(t,{emit:n}){const r=t,{i18n:{t:a}}=H.useI18n(),o=e.computed(()=>{var d,_;return typeof r.errorMessage=="string"?{hasError:!!r.errorMessage,title:r.errorMessage,message:void 0}:{hasError:!!r.errorMessage,title:(d=r.errorMessage)==null?void 0:d.title,message:(_=r.errorMessage)==null?void 0:_.message}}),i=e.computed(()=>r.cacheIdentifier||r.preferencesStorageKey),l=d=>d.hasData||!!r.query,m=e.computed(()=>{const d=[];return Object.keys(r.tableHeaders).forEach(_=>{const D=r.tableHeaders[_];d.push({label:D.label??_,key:_,sortable:D.sortable??!1})}),r.enableEntityActions&&d.push({key:"actions",hideLabel:!0}),d}),f=d=>({"data-rowid":d.id,"data-testid":d.name,...r.rowAttributes(d)}),u=e.ref({}),s=d=>{var _;return(_=u.value)==null?void 0:_.$el.querySelector(`[data-rowid="${d.id}"]`)},y=d=>{const _={"data-testid":d.headerKey,...r.cellAttributes(d)};return d.colIndex===0&&(_.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),_},k=()=>{n("empty-state-cta-clicked"),S()},S=()=>{n("clear-search-input")},A=e.computed(()=>r.disableRowClick?void 0:(d,_)=>{n("click:row",_)}),g=d=>{n("sort",d)},{setTablePreferences:c,getTablePreferences:h}=Re(),C=e.computed(()=>{const d=h(r.preferencesStorageKey);return{...r.initialFetcherParams,...d}}),T=d=>{r.preferencesStorageKey&&c(r.preferencesStorageKey,d)};return(d,_)=>{const D=e.resolveComponent("KIcon"),N=e.resolveComponent("KButton"),V=e.resolveComponent("KDropdown"),E=e.resolveComponent("KTable"),F=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(F,{class:"kong-ui-entity-base-table",title:t.title},{body:e.withCtx(()=>[e.createVNode(E,{ref_key:"tableRefs",ref:u,"cache-identifier":i.value,"cell-attrs":y,"disable-pagination-page-jump":t.disablePaginationPageJump,"disable-sorting":t.disableSorting,"empty-state-action-button-icon":t.query?"":"plus","empty-state-action-message":t.query?e.unref(a)("baseTable.emptyState.noSearchResultsCtaText"):t.emptyStateOptions.ctaText,"empty-state-action-route":t.query?"":t.emptyStateOptions.ctaPath,"empty-state-icon":t.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":t.query?e.unref(a)("baseTable.emptyState.noSearchResultsMessage"):t.emptyStateOptions.message,"empty-state-title":t.query?e.unref(a)("baseTable.emptyState.noSearchResultsTitle"):t.emptyStateOptions.title,"enable-client-sort":t.enableClientSort,"error-state-message":o.value.message,"error-state-title":o.value.title,fetcher:t.fetcher,"fetcher-cache-key":String(t.fetcherCacheKey),"has-error":o.value.hasError,headers:m.value,"hide-pagination-when-optional":"","initial-fetcher-params":C.value,"is-loading":t.isLoading,"pagination-type":t.paginationType,"row-attrs":f,"search-input":t.query,onKtableEmptyStateCtaClicked:k,"onRow:click":A.value,onSort:_[0]||(_[0]=x=>g(x)),"onUpdate:tablePreferences":T},e.createSlots({toolbar:e.withCtx(({state:x})=>[e.withDirectives(e.createElementVNode("div",Dr,[e.renderSlot(d.$slots,"toolbar-filter",{},void 0,!0),d.$slots["toolbar-button"]?(e.openBlock(),e.createElementBlock("div",Fr,[e.renderSlot(d.$slots,"toolbar-button",{},void 0,!0)])):e.createCommentVNode("",!0)],512),[[e.vShow,l(x)]])]),actions:e.withCtx(({row:x,rowKey:M,rowValue:q})=>[e.createElementVNode("div",{class:"actions-container","data-testid":x.name},[e.createVNode(V,{"kpop-attributes":{placement:"bottomEnd"},width:t.dropdownMenuWidth},{items:e.withCtx(()=>[e.renderSlot(d.$slots,"actions",{row:x,rowKey:M,rowValue:q},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(N,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:e.withCtx(()=>[e.createVNode(D,{color:e.unref(ut),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,Kr)]),_:2},[e.renderList(t.tableHeaders,(x,M)=>({name:M,fn:e.withCtx(({row:q,rowKey:X,rowValue:U})=>[e.createVNode(Or,{"key-name":String(M),"row-el":s(q)},{default:e.withCtx(()=>[e.renderSlot(d.$slots,M,{row:q,rowKey:X,rowValue:U},()=>[e.createTextVNode(e.toDisplayString(U),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-message","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input","onRow:click"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-499a771c"]]),qr={key:0,class:"kong-ui-entity-delete-error"},Pr={key:1,class:"description"},Rr=J(e.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(t,{emit:n}){const r=t,{i18nT:a}=H.useI18n(),o=e.computed(()=>r.needConfirm?r.entityName:""),i=()=>{n("cancel")},l=()=>{n("proceed")};return(m,f)=>{const u=e.resolveComponent("KAlert"),s=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(s,{"action-button-text":"Yes, delete","action-pending":t.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":o.value,"is-visible":t.visible,title:t.title,type:"danger",onCanceled:i,onProceed:l},{"body-content":e.withCtx(()=>[t.error?(e.openBlock(),e.createElementBlock("div",qr,[e.createVNode(u,{appearance:"danger"},{alertMessage:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.error),1)]),_:1})])):e.createCommentVNode("",!0),e.createVNode(e.unref(a),{class:"message",keypath:r.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},e.createSlots({entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.entityType),1)]),_:2},[r.entityName?{name:"entityName",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(r.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),r.description||m.$slots.description?(e.openBlock(),e.createElementBlock("div",Pr,[e.renderSlot(m.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(r.description),1)],!0)])):e.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),vr={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},Ur={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},Lr=["fill"],Hr={mask:"url(#mask0_180_20349)"},zr=["fill"],Be=e.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${pt})`}},setup(t){return(n,r)=>(e.openBlock(),e.createElementBlock("svg",vr,[e.createElementVNode("mask",Ur,[e.createElementVNode("rect",{fill:t.color,height:"20",width:"20"},null,8,Lr)]),e.createElementVNode("g",Hr,[e.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:t.color},null,8,zr)])]))}}),Wr={key:1,class:"kong-ui-entity-filter"},Jr={class:"menu-item-title"},Yr={class:"menu-item-indicator"},Zr={class:"menu-item-body"},Gr=["for"],Qr={class:"menu-item-buttons"},Xr={class:"filter-clear-button-container"},en=J(e.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:n}){const r=t,{i18n:{t:a}}=H.useI18n(),o=e.ref(!1),i=e.ref({}),l=e.computed(()=>{const c=[];return new URLSearchParams(r.modelValue).forEach((h,C)=>{h!==""&&c.push(C)}),c}),m=e.computed(()=>{const c=r.config.fields;return Object.keys(c).filter(h=>c[h].searchable).map(h=>({label:c[h].label||h,value:h}))});e.watch(()=>r.modelValue,c=>{i.value={},new URLSearchParams(c).forEach((h,C)=>{i.value[C]=h})});const f=()=>{o.value=!o.value},u=c=>{n("update:modelValue",c)},s=c=>`filter-${c}`,y=c=>{var h,C;return(((C=(h=r.config.schema)==null?void 0:h[c])==null?void 0:C.values)??[]).map(T=>({value:T,label:T}))},k=c=>{var h,C;return((C=(h=r.config.schema)==null?void 0:h[c])==null?void 0:C.type)??"text"},S=c=>{i.value={...i.value,[c]:""},g()},A=()=>{i.value={},g(!0)},g=(c=!1)=>{const h=Object.keys(i.value).reduce((C,T)=>(i.value[T]&&(C[T]=`${i.value[T]}`),C),{});c&&(o.value=!1),n("update:modelValue",new URLSearchParams(h).toString())};return(c,h)=>{const C=e.resolveComponent("KInput"),T=e.resolveComponent("KButton"),d=e.resolveComponent("KSelect"),_=e.resolveComponent("KMenuItem"),D=e.resolveComponent("KMenu");return t.config.isExactMatch?(e.openBlock(),e.createBlock(C,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":t.modelValue,placeholder:t.config.placeholder,"onUpdate:modelValue":u},{before:e.withCtx(()=>[e.createVNode(Be)]),_:1},8,["model-value","placeholder"])):(e.openBlock(),e.createElementBlock("div",Wr,[e.createVNode(T,{appearance:"tertiary","data-testid":"filter-button",onClick:f},{default:e.withCtx(()=>[e.createVNode(Be),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("filter.filterButtonText"))+" "+e.toDisplayString(l.value.length>0?`(${l.value.length})`:""),1)]),_:1}),e.withDirectives(e.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:f},null,512),[[e.vShow,o.value]]),e.withDirectives(e.createVNode(D,{class:"kong-ui-entity-filter-menu"},{body:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(N,V)=>(e.openBlock(),e.createBlock(_,{key:N.value,"data-testid":N.value,expandable:"","last-menu-item":V===m.value.length-1},{itemTitle:e.withCtx(()=>[e.createElementVNode("span",Jr,[e.createTextVNode(e.toDisplayString(N.label)+" ",1),e.withDirectives(e.createElementVNode("span",Yr,null,512),[[e.vShow,l.value.includes(N.value)]])])]),itemBody:e.withCtx(()=>{var E,F;return[e.createElementVNode("div",Zr,[e.createElementVNode("label",{class:"menu-item-label",for:s(N.value)},e.toDisplayString(e.unref(a)("filter.fieldLabel")),9,Gr),((F=(E=t.config.schema)==null?void 0:E[N.value])==null?void 0:F.type)==="select"?(e.openBlock(),e.createBlock(d,{key:0,id:s(N.value),modelValue:i.value[N.value],"onUpdate:modelValue":x=>i.value[N.value]=x,appearance:"select",items:y(N.value),placeholder:e.unref(a)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(e.openBlock(),e.createBlock(C,{key:1,id:s(N.value),modelValue:i.value[N.value],"onUpdate:modelValue":x=>i.value[N.value]=x,autocomplete:"off",placeholder:e.unref(a)("filter.inputPlaceholder"),type:k(N.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),e.createElementVNode("div",Qr,[e.createVNode(T,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:h[0]||(h[0]=x=>g(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("filter.applyButtonText")),1)]),_:1}),e.createVNode(T,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:x=>S(N.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:e.withCtx(()=>[e.createElementVNode("div",Xr,[e.createVNode(T,{appearance:"tertiary",size:"small",onClick:A},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("filter.clearAllButtonText")),1)]),_:1})])]),_:1},512),[[e.vShow,o.value]])]))}}}),[["__scopeId","data-v-15962ee2"]]),ce=e.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(t){const n=t,r=e.ref(void 0),a=e.computed(()=>r.value===!0||r.value!==void 0&&n.forceShow===!0);return e.watch(()=>n.authFunction,async()=>{r.value=await n.authFunction()},{immediate:!0}),(o,i)=>a.value?e.renderSlot(o.$slots,"default",{key:0,isAllowed:r.value}):e.createCommentVNode("",!0)}}),tn={class:"form-section-wrapper"},rn={key:0,class:"form-section-title"},nn={key:1,class:"form-section-description"},an={key:2,class:"form-section-footer"},on={class:"form-section-content"},Ae=J(e.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1}},setup(t){const n=e.useSlots();return(r,a)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(["kong-ui-entity-form-section",{"has-divider":t.hasDivider}])},[e.createElementVNode("div",tn,[t.hideInfoHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-section-info",{sticky:t.stickyInfoHeader}])},[t.title?(e.openBlock(),e.createElementBlock("h4",rn,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.description||e.unref(n).description?(e.openBlock(),e.createElementBlock("div",nn,[e.renderSlot(r.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0),e.unref(n).footer?(e.openBlock(),e.createElementBlock("div",an,[e.renderSlot(r.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2)),e.createElementVNode("div",on,[e.renderSlot(r.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:$e,useDeleteUrlBuilder:ln,useErrors:sn,useExternalLinkCreator:Gn,useFetchUrlBuilder:Qn,useFetcher:cn,useDebouncedFilter:dn,useStringHelpers:Xn,useHelpers:ea,useGatewayFeatureSupported:ta,useTruncationDetector:ra}=H,pn={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},un="Copy to clipboard",fn={message:pn,iconTitle:un},mn="kong-ui-copy-uuid-notify",Me="24px",yn=(t,n)=>{const r=t.__vccOpts||t;for(const[a,o]of n)r[a]=o;return r},gn=t=>(e.pushScopeId("data-v-243f8fec"),t=t(),e.popScopeId(),t),hn=["aria-hidden"],bn={key:0,"data-testid":"kui-icon-svg-title"},kn=gn(()=>e.createElementVNode("path",{d:"M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",fill:"currentColor"},null,-1)),wn=e.defineComponent({__name:"CopyIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Me,validator:t=>{if(typeof t=="number"&&t>0)return!0;if(typeof t=="string"){const n=String(t).replace(/px/gi,""),r=Number(n);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(t){const n=t,r=e.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),i=Number(o);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return Me}),a=e.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:r.value,lineHeight:"0",width:r.value}));return(o,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.as),{"aria-hidden":t.decorative?"true":void 0,class:"kui-icon copy-icon","data-testid":"kui-icon-wrapper-copy-icon",style:e.normalizeStyle(a.value)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":t.decorative?"true":void 0,"data-testid":"kui-icon-svg-copy-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[t.title?(e.openBlock(),e.createElementBlock("title",bn,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),kn],8,hn))]),_:1},8,["aria-hidden","style"]))}}),Cn=yn(wn,[["__scopeId","data-v-243f8fec"]]),Sn="16px",xn={class:"kong-ui-copy-uuid"},Nn=["onClick"],Oe=15,_n=e.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},idTooltip:{type:String,default:""},truncated:{type:Boolean,default:!0},useMono:{type:Boolean,default:!0},notify:{type:Function,default:void 0},iconColor:{type:String,default:"rgba(0, 0, 0, 0.45)"},tooltip:{type:String,default:""},successTooltip:{type:String,default:""},format:{type:String,required:!1,default:"uuid",validator:t=>["uuid","hidden","redacted","deleted"].includes(t)}},emits:["success","error"],setup(t,{emit:n}){const r=t,{t:a}=Z.createI18n("en-us",fn),o=r.notify||e.inject(mn,()=>{}),i=e.computed(()=>r.idTooltip?{label:r.idTooltip,positionFixed:!0,placement:"bottomStart"}:{title:r.uuid}),l=e.computed(()=>!!(r.tooltip&&r.successTooltip)),m=e.ref(r.tooltip),f=e.computed(()=>r.tooltip?{label:m.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),u=e.computed(()=>{var k;return r.format==="redacted"?"*****":r.format==="deleted"?`*${(k=r.uuid)==null?void 0:k.substring(0,5)}`:r.uuid}),s=k=>{m.value=k,setTimeout(()=>{m.value=r.tooltip},1800)},y=k=>{var S,A;if(!k(r.uuid)){typeof o=="function"&&o({type:"error",message:a("message.fail")}),l.value?s(a("message.fail")):n("error",r.uuid);return}const g=((S=r.uuid)==null?void 0:S.length)>Oe,c=r.format==="hidden"||r.format==="redacted"?a("message.success.prefix"):`"${((A=r.uuid)==null?void 0:A.substring(0,Oe))+(g?"...":"")}"`;typeof o=="function"&&o({type:"success",message:`${c}${a("message.success.content")}`}),l.value?s(r.successTooltip):n("success",r.uuid)};return(k,S)=>{const A=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",xn,[t.format!=="hidden"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.idTooltip?"KTooltip":"div"),e.mergeProps({key:0},i.value,{"data-testid":"copy-id"}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["uuid-container",t.truncated?"truncated-uuid":null,t.useMono?"mono":null])},e.toDisplayString(u.value),3)]),_:1},16)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tooltip?"KTooltip":"div"),e.mergeProps(f.value,{class:"uuid-icon-wrapper"}),{default:e.withCtx(()=>[e.createVNode(A,null,{default:e.withCtx(({copyToClipboard:g})=>[e.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:e.withModifiers(c=>y(g),["stop"])},[e.createVNode(e.unref(Cn),{class:"uuid-icon",color:t.iconColor,decorative:!!t.tooltip,size:e.unref(Sn),title:e.unref(a)("iconTitle")},null,8,["color","decorative","size","title"])],8,Nn)]),_:1})]),_:1},16))])}}}),In=(t,n)=>{const r=t.__vccOpts||t;for(const[a,o]of n)r[a]=o;return r},En=In(_n,[["__scopeId","data-v-0c07874b"]]),na="",aa="",Tn={class:"kong-ui-entities-snis-list"},Vn={key:1},Bn={key:1},An=e.defineComponent({__name:"SniList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(t,{emit:n}){var ee;const r=t,{i18n:{t:a}}=ue.useI18n(),o=(b,I)=>{var p;b.type==="error"?n("copy:error",{entity:I,field:"certificate.id",message:a("errors.copy")}):n("copy:success",{entity:I,field:"certificate.id",message:a("copy.success",{val:(p=I.certificate)==null?void 0:p.id})})},{axiosInstance:i}=$e({headers:(ee=r.config)==null?void 0:ee.requestHeaders}),l=e.ref(1),m=e.computed(()=>r.config.app!=="kongManager"||!!r.config.disableSorting),f={name:{label:a("snis.list.table_headers.name"),searchable:!0,sortable:!0},certificate:{label:a("snis.list.table_headers.certificate_id"),sortable:!1},tags:{label:a("snis.list.table_headers.tags"),sortable:!1}},u=f,s=b=>({style:{maxWidth:b.headerKey==="name"?"250px":b.headerKey==="certificate"?"350px":null}}),y=e.computed(()=>{var I,p;let b=`${r.config.apiBaseUrl}${G.list[r.config.app].all}`;return r.config.app==="konnect"?b=b.replace(/{controlPlaneId}/gi,((I=r.config)==null?void 0:I.controlPlaneId)||""):r.config.app==="kongManager"&&(b=b.replace(/\/{workspace}/gi,(p=r.config)!=null&&p.workspace?`/${r.config.workspace}`:"")),b}),k=e.ref(""),S=e.computed(()=>{const b=r.config.app==="konnect"||r.config.isExactMatch;if(b)return{isExactMatch:b,placeholder:a("search.placeholder")};const{name:I}=f;return{isExactMatch:b,fields:{name:I},schema:r.config.filterSchema}}),{fetcher:A,fetcherState:g}=cn(r.config,y.value),c=()=>{k.value=""},h=()=>{l.value++},C=e.ref(null),T=e.ref({ctaPath:r.config.createRoute,ctaText:void 0,message:a("snis.list.empty_state.description"),title:a("snis.title")}),d=(b,I)=>{const p=b.id;if(!I(p)){n("copy:error",{entity:b,field:"id",message:a("errors.copy")});return}n("copy:success",{entity:b,field:"id",message:a("copy.success",{val:p})})},_=(b,I)=>{const p=JSON.stringify(b);if(!I(p)){n("copy:error",{entity:b,message:a("errors.copy")});return}n("copy:success",{entity:b,message:a("copy.success_brief")})},D=b=>({label:a("actions.edit"),to:r.config.getEditRoute(b)}),N=e.ref(void 0),V=e.ref(!1),E=e.ref(!1),F=e.ref(""),x=ln(r.config,y.value),M=b=>{N.value=b,V.value=!0},q=()=>{V.value=!1,N.value=void 0},X=async()=>{var b,I,p;if((b=N.value)!=null&&b.id){E.value=!0;try{await i.delete(x(N.value.id)),n("delete:success",N.value),E.value=!1,q(),l.value++}catch(w){F.value=((p=(I=w.response)==null?void 0:I.data)==null?void 0:p.message)||w.message||a("errors.delete"),n("error",w)}finally{E.value=!1}}},U=e.ref(!0);return e.watch(g,b=>{var I,p,w,$,R;if(((p=(I=b==null?void 0:b.response)==null?void 0:I.data)==null?void 0:p.length)===0&&(U.value=!1),b.status===L.Error){C.value={title:a("errors.general")},(R=($=(w=b.error)==null?void 0:w.response)==null?void 0:$.data)!=null&&R.message&&(C.value.message=b.error.response.data.message),n("error",b.error);return}C.value=null}),e.onBeforeMount(async()=>{await r.canCreate()&&(T.value.title=a("snis.list.empty_state.title"),T.value.ctaText=a("actions.create"))}),(b,I)=>{const p=e.resolveComponent("KButton"),w=e.resolveComponent("KBadge"),$=e.resolveComponent("KTruncate"),R=e.resolveComponent("KDropdownItem"),K=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Tn,[e.createVNode(e.unref(jr),{"cache-identifier":t.cacheIdentifier,"cell-attributes":s,"disable-pagination-page-jump":"","disable-row-click":!0,"disable-sorting":m.value,"empty-state-options":T.value,"enable-entity-actions":"","error-message":C.value,fetcher:e.unref(A),"fetcher-cache-key":l.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-snis-list",query:k.value,"table-headers":e.unref(u),"use-action-outside":t.useActionOutside,onClearSearchInput:c,onSort:h},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(en),{modelValue:k.value,"onUpdate:modelValue":I[0]||(I[0]=B=>k.value=B),config:S.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(ce),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(p,{appearance:"primary","data-testid":"toolbar-add-sni",icon:"plus",to:t.config.createRoute},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("snis.list.toolbar_actions.new")),1)]),_:1},8,["to"]),[[e.vShow,U.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:B})=>[e.createElementVNode("b",null,e.toDisplayString(B??"-"),1)]),certificate:e.withCtx(({row:B})=>[B.certificate&&B.certificate.id?(e.openBlock(),e.createBlock(e.unref(En),{key:0,class:"copy-certificate-uuid","data-testid":"copy-certificate-uuid",notify:v=>o(v,B),truncated:!1,uuid:B.certificate.id},null,8,["notify","uuid"])):(e.openBlock(),e.createElementBlock("span",Vn,"-"))]),tags:e.withCtx(({rowValue:B})=>[B!=null&&B.length?(e.openBlock(),e.createBlock($,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B,v=>(e.openBlock(),e.createBlock(w,{key:v,onClick:I[1]||(I[1]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",Bn,"-"))]),actions:e.withCtx(({row:B})=>[e.createVNode(K,null,{default:e.withCtx(({copyToClipboard:v})=>[e.createVNode(R,{"data-testid":"action-entity-copy-id",onClick:re=>d(B,v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(K,null,{default:e.withCtx(({copyToClipboard:v})=>[e.createVNode(R,{"data-testid":"action-entity-copy-json",onClick:re=>_(B,v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(ce),{"auth-function":()=>t.canEdit(B)},{default:e.withCtx(()=>[e.createVNode(R,{"data-testid":"action-entity-edit",item:D(B.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(ce),{"auth-function":()=>t.canDelete(B)},{default:e.withCtx(()=>[e.createVNode(R,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:v=>M(B)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","use-action-outside"]),e.createVNode(e.unref(Rr),{"action-pending":E.value,description:e.unref(a)("delete.description"),"entity-name":N.value&&(N.value.name||N.value.id),"entity-type":e.unref(fe).SNI,error:F.value,"need-confirm":!1,title:e.unref(a)("delete.title"),visible:V.value,onCancel:q,onProceed:X},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),oa="",De=(t,n)=>{const r=t.__vccOpts||t;for(const[a,o]of n)r[a]=o;return r},$n=De(An,[["__scopeId","data-v-2df41e2a"]]),Mn={class:"kong-ui-entities-snis-form"},On={"data-testid":"no-search-results"},Dn={key:2,class:"invalid-certificate-message","data-testid":"invalid-certificate-message"},Fn=e.defineComponent({__name:"SniForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.cancelRoute)},sniId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:n}){var I;const r=t,a=pe.useRouter(),{i18n:{t:o}}=ue.useI18n(),{getMessageFromError:i}=sn(),{axiosInstance:l}=$e({headers:(I=r.config)==null?void 0:I.requestHeaders}),m=e.computed(()=>G.form[r.config.app].edit),f=e.computed(()=>r.sniId?te.Edit:te.Create),u=e.computed(()=>r.config.certificateId&&f.value===te.Create?r.config.certificateId:""),s=e.reactive({fields:{name:"",tags:"",certificate_id:""},isReadonly:!1,errorMessage:""}),y=e.reactive({name:"",tags:"",certificate_id:""}),k=e.computed(()=>JSON.stringify(s.fields)!==JSON.stringify(y)&&!!s.fields.name&&!!(s.fields.certificate_id||u.value)),S=p=>{var w,$;s.fields.name=(p==null?void 0:p.name)||"",s.fields.tags=((w=p==null?void 0:p.tags)==null?void 0:w.join(", "))||"",s.fields.certificate_id=(($=p==null?void 0:p.certificate)==null?void 0:$.id)||"",Object.assign(y,s.fields)},A=()=>{a.push(r.config.cancelRoute)},g=e.computed(()=>{var w,$;let p=`${r.config.apiBaseUrl}${G.form[r.config.app].validate}`;return r.config.app==="konnect"?p=p.replace(/{controlPlaneId}/gi,((w=r.config)==null?void 0:w.controlPlaneId)||""):r.config.app==="kongManager"&&(p=p.replace(/\/{workspace}/gi,($=r.config)!=null&&$.workspace?`/${r.config.workspace}`:"")),p=p.replace(/{id}/gi,r.sniId),p}),c=e.computed(()=>{var w,$;let p=`${r.config.apiBaseUrl}${G.form[r.config.app][f.value]}`;return r.config.app==="konnect"?p=p.replace(/{controlPlaneId}/gi,((w=r.config)==null?void 0:w.controlPlaneId)||""):r.config.app==="kongManager"&&(p=p.replace(/\/{workspace}/gi,($=r.config)!=null&&$.workspace?`/${r.config.workspace}`:"")),p=p.replace(/{id}/gi,r.sniId),p}),h=async()=>{var p,w,$,R,K,B,v,re;try{s.isReadonly=!0;const W={name:s.fields.name,tags:(w=(p=s.fields.tags.split(","))==null?void 0:p.map(de=>String(de||"").trim()))==null?void 0:w.filter(de=>de!==""),certificate:{id:u.value||s.fields.certificate_id}};let j;await l.post(g.value,W),f.value==="create"?j=await l.post(c.value,W):f.value==="edit"&&(j=(($=r.config)==null?void 0:$.app)==="konnect"?await l.put(c.value,W):await l.patch(c.value,W)),s.fields.name=((R=j==null?void 0:j.data)==null?void 0:R.name)||"",s.fields.tags=((B=(K=j==null?void 0:j.data)==null?void 0:K.tags)==null?void 0:B.join(", "))||"",s.fields.certificate_id=((re=(v=j==null?void 0:j.data)==null?void 0:v.certificate)==null?void 0:re.id)||"",Object.assign(y,s.fields),n("update",j==null?void 0:j.data)}catch(W){s.errorMessage=i(W),n("error",W)}finally{s.isReadonly=!1}},{debouncedQueryChange:C,loading:T,allRecords:d,error:_,validationError:D,loadItems:N,results:V}=dn(r.config,G.form[r.config.app].certificates),E=e.ref(!0),F=p=>{E.value=!p,C(p)},x=e.computed(()=>_.value?o("errors.certificates.fetch"):""),M=e.computed(()=>D.value?o("errors.certificates.invalid"):""),q=e.ref(0),X=e.computed(()=>d.value===void 0),U=e.ref(new Set),ee=e.computed(()=>Array.from(U.value).map(w=>({label:w,value:w,selected:s.fields.certificate_id===w}))),b=p=>{U.value.clear();let w;for(w of p)U.value.add(w.id)};return e.watch(V,p=>{b(p)},{immediate:!0,deep:!0}),e.watch(ee,()=>{q.value++},{immediate:!0,deep:!0}),e.onBeforeMount(async()=>{await N()}),(p,w)=>{const $=e.resolveComponent("KInput"),R=e.resolveComponent("KSelect");return e.openBlock(),e.createElementBlock("div",Mn,[e.createVNode(e.unref($r),{"can-submit":k.value,config:t.config,"edit-id":t.sniId,"error-message":s.errorMessage||x.value,"fetch-url":m.value,"is-readonly":s.isReadonly,onCancel:A,"onFetch:error":w[3]||(w[3]=K=>p.$emit("error",K)),"onFetch:success":S,onLoading:w[4]||(w[4]=K=>p.$emit("loading",K)),onSubmit:h},{default:e.withCtx(()=>[e.createVNode(e.unref(Ae),{description:e.unref(o)("form.sections.general.description"),title:e.unref(o)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode($,{modelValue:s.fields.name,"onUpdate:modelValue":w[0]||(w[0]=K=>s.fields.name=K),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-name",label:e.unref(o)("form.fields.name.label"),placeholder:e.unref(o)("form.fields.name.placeholder"),readonly:s.isReadonly,required:"",type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode($,{modelValue:s.fields.tags,"onUpdate:modelValue":w[1]||(w[1]=K=>s.fields.tags=K),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-tags",help:e.unref(o)("form.fields.tags.help"),label:e.unref(o)("form.fields.tags.label"),"label-attributes":{info:e.unref(o)("form.fields.tags.tooltip")},placeholder:e.unref(o)("form.fields.tags.placeholder"),readonly:s.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.createVNode(e.unref(Ae),{description:e.unref(o)("form.sections.certificate.description"),"has-divider":"",title:e.unref(o)("form.sections.certificate.title")},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createBlock($,{key:0,"data-testid":"sni-form-certificate-id",label:e.unref(o)("form.fields.certificate_id.label"),"model-value":u.value,readonly:"",required:"",width:"100%"},null,8,["label","model-value"])):(e.openBlock(),e.createBlock(R,{key:1,modelValue:s.fields.certificate_id,"onUpdate:modelValue":w[2]||(w[2]=K=>s.fields.certificate_id=K),appearance:"select",autosuggest:"",class:e.normalizeClass({"k-select-placeholder":E.value}),clearable:"","data-testid":"sni-form-certificate-id","dropdown-footer-text":X.value?e.unref(o)("form.fields.certificate_id.footer"):void 0,"enable-filtering":"",items:ee.value,label:e.unref(o)("form.fields.certificate_id.label"),loading:e.unref(T),placeholder:e.unref(o)("form.fields.certificate_id.placeholder"),readonly:s.isReadonly,required:"",width:"100%",onQueryChange:F},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(o)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",On,e.toDisplayString(e.unref(o)("search.no_results")),1)]),_:1},8,["modelValue","class","dropdown-footer-text","items","label","loading","placeholder","readonly"])),M.value?(e.openBlock(),e.createElementBlock("p",Dn,e.toDisplayString(M.value),1)):e.createCommentVNode("",!0)]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])])}}}),ia="",Kn=De(Fn,[["__scopeId","data-v-576c2dac"]]);P.SniForm=Kn,P.SniList=$n,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
|
|
5
|
+
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"
":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}for(var Tr=new Array(256),Vr=new Array(256),Y=0;Y<256;Y++)Tr[Y]=Ve(Y)?1:0,Vr[Y]=Ve(Y);const Br=["onReset","onSubmit"],Ar={class:"form-actions","data-testid":"form-actions"},$r=J(e.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(t,{emit:n}){var r;const a=t,o=pe.useRouter(),{i18n:{t:i}}=H.useI18n(),{getMessageFromError:l}=H.useErrors(),{axiosInstance:m}=H.useAxios({headers:(r=a.config)==null?void 0:r.requestHeaders}),f=e.ref(!1),u=e.ref(!1),s=e.ref(""),y=e.computed(()=>a.canSubmit===!1||a.isReadonly),k=e.computed(()=>{var c,h;if(!a.editId)return"";let C=`${a.config.apiBaseUrl}${a.fetchUrl}`;return a.config.app==="konnect"?C=C.replace(/{controlPlaneId}/gi,((c=a.config)==null?void 0:c.controlPlaneId)||""):a.config.app==="kongManager"&&(C=C.replace(/\/{workspace}/gi,(h=a.config)!=null&&h.workspace?`/${a.config.workspace}`:"")),C=C.replace(/{id}/gi,a.editId),C}),S=()=>{a.config.cancelRoute?o.push(a.config.cancelRoute):A()},A=()=>{n("cancel")},g=()=>{y.value||n("submit")};return e.watch(()=>f.value,c=>{n("loading",c)},{immediate:!0}),e.onBeforeMount(async()=>{if(a.editId)try{u.value=!1,f.value=!0;const{data:c}=await m.get(k.value);n("fetch:success",c)}catch(c){const h=l(c);s.value=h.startsWith("code")?i("baseForm.errors.edit"):h,u.value=!0,n("fetch:error",c)}finally{f.value=!1}}),(c,h)=>{const C=e.resolveComponent("KSkeleton"),T=e.resolveComponent("KEmptyState"),d=e.resolveComponent("KAlert"),_=e.resolveComponent("KButton"),D=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(D,{class:"kong-ui-entity-base-form"},{body:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(C,{key:0,type:"form"})):u.value?(e.openBlock(),e.createBlock(T,{key:1,"cta-text":e.unref(i)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":S,"is-error":!0},{message:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(s.value),1)]),_:1},8,["cta-text"])):(e.openBlock(),e.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:e.withModifiers(A,["prevent"]),onSubmit:e.withModifiers(g,["prevent"])},[e.renderSlot(c.$slots,"default",{},void 0,!0),t.errorMessage?(e.openBlock(),e.createBlock(d,{key:0,"alert-message":t.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ar,[e.renderSlot(c.$slots,"form-actions",{},()=>[e.createVNode(_,{appearance:"secondary","data-testid":"form-cancel",disabled:t.isReadonly,type:"reset"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),e.createVNode(_,{appearance:"primary","data-testid":"form-submit",disabled:y.value,type:"submit"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,Br))]),_:3})}}}),[["__scopeId","data-v-81612aef"]]),Mr={key:0,"data-testid":"first-col"},Or=J(e.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(t){const n=t,r=e.computed(()=>{var g;return((g=n.rowEl)==null?void 0:g.querySelector(`[data-testid="${n.keyName}"]`))||null}),a=e.computed(()=>{var g;return((g=r.value)==null?void 0:g.querySelector('[data-testid="first-col"]'))||null}),o=e.computed(()=>{var g,c;const h=(g=n.rowEl)==null?void 0:g.querySelectorAll("td");return h?((c=h[0])==null?void 0:c.getAttribute("data-testid"))===n.keyName:!1});let i;const l=()=>{i&&(i.disconnect(),i=void 0)},m=()=>{var g,c,h;u.value=((g=a.value)==null?void 0:g.getBoundingClientRect().width)||0,s.value=((c=r.value)==null?void 0:c.clientWidth)||0,y.value=((h=f.value)==null?void 0:h.innerText)||""},f=e.ref({}),u=e.ref(0),s=e.ref(0),y=e.ref(""),k=e.computed(()=>[a.value,r.value]),S=e.watch(k,g=>{if(o.value&&(l(),"ResizeObserver"in window&&window)){i=new ResizeObserver(c=>{window.requestAnimationFrame(()=>{!Array.isArray(c)||!c.length||m()})});for(const c of g)c&&i.observe(c)}},{immediate:!0,flush:"post",deep:!0}),A=e.computed(()=>o.value?u.value>s.value:!1);return e.onMounted(()=>{m()}),e.onUnmounted(()=>{S()}),(g,c)=>{const h=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{ref_key:"contentRef",ref:f,class:"content-wrapper"},[o.value?(e.openBlock(),e.createElementBlock("span",Mr,[e.createVNode(h,{label:A.value?y.value:"","max-width":"300",placement:"bottomStart"},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"default",{},void 0,!0)]),_:3},8,["label"])])):e.renderSlot(g.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-e42a20c9"]]),Dr={class:"toolbar-container"},Fr={key:0,class:"toolbar-button-container"},Kr=["data-testid"],jr=J(e.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""},disableRowClick:{type:Boolean,default:!1}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(t,{emit:n}){const r=t,{i18n:{t:a}}=H.useI18n(),o=e.computed(()=>{var d,_;return typeof r.errorMessage=="string"?{hasError:!!r.errorMessage,title:r.errorMessage,message:void 0}:{hasError:!!r.errorMessage,title:(d=r.errorMessage)==null?void 0:d.title,message:(_=r.errorMessage)==null?void 0:_.message}}),i=e.computed(()=>r.cacheIdentifier||r.preferencesStorageKey),l=d=>d.hasData||!!r.query,m=e.computed(()=>{const d=[];return Object.keys(r.tableHeaders).forEach(_=>{const D=r.tableHeaders[_];d.push({label:D.label??_,key:_,sortable:D.sortable??!1})}),r.enableEntityActions&&d.push({key:"actions",hideLabel:!0}),d}),f=d=>({"data-rowid":d.id,"data-testid":d.name,...r.rowAttributes(d)}),u=e.ref({}),s=d=>{var _;return(_=u.value)==null?void 0:_.$el.querySelector(`[data-rowid="${d.id}"]`)},y=d=>{const _={"data-testid":d.headerKey,...r.cellAttributes(d)};return d.colIndex===0&&(_.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),_},k=()=>{n("empty-state-cta-clicked"),S()},S=()=>{n("clear-search-input")},A=e.computed(()=>r.disableRowClick?void 0:(d,_)=>{n("click:row",_)}),g=d=>{n("sort",d)},{setTablePreferences:c,getTablePreferences:h}=Re(),C=e.computed(()=>{const d=h(r.preferencesStorageKey);return{...r.initialFetcherParams,...d}}),T=d=>{r.preferencesStorageKey&&c(r.preferencesStorageKey,d)};return(d,_)=>{const D=e.resolveComponent("KIcon"),N=e.resolveComponent("KButton"),V=e.resolveComponent("KDropdown"),E=e.resolveComponent("KTable"),F=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(F,{class:"kong-ui-entity-base-table",title:t.title},{body:e.withCtx(()=>[e.createVNode(E,{ref_key:"tableRefs",ref:u,"cache-identifier":i.value,"cell-attrs":y,"disable-pagination-page-jump":t.disablePaginationPageJump,"disable-sorting":t.disableSorting,"empty-state-action-button-icon":t.query?"":"plus","empty-state-action-message":t.query?e.unref(a)("baseTable.emptyState.noSearchResultsCtaText"):t.emptyStateOptions.ctaText,"empty-state-action-route":t.query?"":t.emptyStateOptions.ctaPath,"empty-state-icon":t.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":t.query?e.unref(a)("baseTable.emptyState.noSearchResultsMessage"):t.emptyStateOptions.message,"empty-state-title":t.query?e.unref(a)("baseTable.emptyState.noSearchResultsTitle"):t.emptyStateOptions.title,"enable-client-sort":t.enableClientSort,"error-state-message":o.value.message,"error-state-title":o.value.title,fetcher:t.fetcher,"fetcher-cache-key":String(t.fetcherCacheKey),"has-error":o.value.hasError,headers:m.value,"hide-pagination-when-optional":"","initial-fetcher-params":C.value,"is-loading":t.isLoading,"pagination-type":t.paginationType,"row-attrs":f,"search-input":t.query,onKtableEmptyStateCtaClicked:k,"onRow:click":A.value,onSort:_[0]||(_[0]=x=>g(x)),"onUpdate:tablePreferences":T},e.createSlots({toolbar:e.withCtx(({state:x})=>[e.withDirectives(e.createElementVNode("div",Dr,[e.renderSlot(d.$slots,"toolbar-filter",{},void 0,!0),d.$slots["toolbar-button"]?(e.openBlock(),e.createElementBlock("div",Fr,[e.renderSlot(d.$slots,"toolbar-button",{},void 0,!0)])):e.createCommentVNode("",!0)],512),[[e.vShow,l(x)]])]),actions:e.withCtx(({row:x,rowKey:M,rowValue:q})=>[e.createElementVNode("div",{class:"actions-container","data-testid":x.name},[e.createVNode(V,{"kpop-attributes":{placement:"bottomEnd"},width:t.dropdownMenuWidth},{items:e.withCtx(()=>[e.renderSlot(d.$slots,"actions",{row:x,rowKey:M,rowValue:q},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(N,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:e.withCtx(()=>[e.createVNode(D,{color:e.unref(ut),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,Kr)]),_:2},[e.renderList(t.tableHeaders,(x,M)=>({name:M,fn:e.withCtx(({row:q,rowKey:X,rowValue:v})=>[e.createVNode(Or,{"key-name":String(M),"row-el":s(q)},{default:e.withCtx(()=>[e.renderSlot(d.$slots,M,{row:q,rowKey:X,rowValue:v},()=>[e.createTextVNode(e.toDisplayString(v),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-message","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input","onRow:click"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-499a771c"]]),qr={key:0,class:"kong-ui-entity-delete-error"},Pr={key:1,class:"description"},Rr=J(e.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(t,{emit:n}){const r=t,{i18nT:a}=H.useI18n(),o=e.computed(()=>r.needConfirm?r.entityName:""),i=()=>{n("cancel")},l=()=>{n("proceed")};return(m,f)=>{const u=e.resolveComponent("KAlert"),s=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(s,{"action-button-text":"Yes, delete","action-pending":t.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":o.value,"is-visible":t.visible,title:t.title,type:"danger",onCanceled:i,onProceed:l},{"body-content":e.withCtx(()=>[t.error?(e.openBlock(),e.createElementBlock("div",qr,[e.createVNode(u,{appearance:"danger"},{alertMessage:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.error),1)]),_:1})])):e.createCommentVNode("",!0),e.createVNode(e.unref(a),{class:"message",keypath:r.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},e.createSlots({entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.entityType),1)]),_:2},[r.entityName?{name:"entityName",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(r.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),r.description||m.$slots.description?(e.openBlock(),e.createElementBlock("div",Pr,[e.renderSlot(m.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(r.description),1)],!0)])):e.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),vr={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},Ur={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},Lr=["fill"],Hr={mask:"url(#mask0_180_20349)"},zr=["fill"],Be=e.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${pt})`}},setup(t){return(n,r)=>(e.openBlock(),e.createElementBlock("svg",vr,[e.createElementVNode("mask",Ur,[e.createElementVNode("rect",{fill:t.color,height:"20",width:"20"},null,8,Lr)]),e.createElementVNode("g",Hr,[e.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:t.color},null,8,zr)])]))}}),Wr={key:1,class:"kong-ui-entity-filter"},Jr={class:"menu-item-title"},Yr={class:"menu-item-indicator"},Zr={class:"menu-item-body"},Gr=["for"],Qr={class:"menu-item-buttons"},Xr={class:"filter-clear-button-container"},en=J(e.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:n}){const r=t,{i18n:{t:a}}=H.useI18n(),o=e.ref(!1),i=e.ref({}),l=e.computed(()=>{const c=[];return new URLSearchParams(r.modelValue).forEach((h,C)=>{h!==""&&c.push(C)}),c}),m=e.computed(()=>{const c=r.config.fields;return Object.keys(c).filter(h=>c[h].searchable).map(h=>({label:c[h].label||h,value:h}))});e.watch(()=>r.modelValue,c=>{i.value={},new URLSearchParams(c).forEach((h,C)=>{i.value[C]=h})});const f=()=>{o.value=!o.value},u=c=>{n("update:modelValue",c)},s=c=>`filter-${c}`,y=c=>{var h,C;return(((C=(h=r.config.schema)==null?void 0:h[c])==null?void 0:C.values)??[]).map(T=>({value:T,label:T}))},k=c=>{var h,C;return((C=(h=r.config.schema)==null?void 0:h[c])==null?void 0:C.type)??"text"},S=c=>{i.value={...i.value,[c]:""},g()},A=()=>{i.value={},g(!0)},g=(c=!1)=>{const h=Object.keys(i.value).reduce((C,T)=>(i.value[T]&&(C[T]=`${i.value[T]}`),C),{});c&&(o.value=!1),n("update:modelValue",new URLSearchParams(h).toString())};return(c,h)=>{const C=e.resolveComponent("KInput"),T=e.resolveComponent("KButton"),d=e.resolveComponent("KSelect"),_=e.resolveComponent("KMenuItem"),D=e.resolveComponent("KMenu");return t.config.isExactMatch?(e.openBlock(),e.createBlock(C,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":t.modelValue,placeholder:t.config.placeholder,"onUpdate:modelValue":u},{before:e.withCtx(()=>[e.createVNode(Be)]),_:1},8,["model-value","placeholder"])):(e.openBlock(),e.createElementBlock("div",Wr,[e.createVNode(T,{appearance:"tertiary","data-testid":"filter-button",onClick:f},{default:e.withCtx(()=>[e.createVNode(Be),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("filter.filterButtonText"))+" "+e.toDisplayString(l.value.length>0?`(${l.value.length})`:""),1)]),_:1}),e.withDirectives(e.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:f},null,512),[[e.vShow,o.value]]),e.withDirectives(e.createVNode(D,{class:"kong-ui-entity-filter-menu"},{body:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(N,V)=>(e.openBlock(),e.createBlock(_,{key:N.value,"data-testid":N.value,expandable:"","last-menu-item":V===m.value.length-1},{itemTitle:e.withCtx(()=>[e.createElementVNode("span",Jr,[e.createTextVNode(e.toDisplayString(N.label)+" ",1),e.withDirectives(e.createElementVNode("span",Yr,null,512),[[e.vShow,l.value.includes(N.value)]])])]),itemBody:e.withCtx(()=>{var E,F;return[e.createElementVNode("div",Zr,[e.createElementVNode("label",{class:"menu-item-label",for:s(N.value)},e.toDisplayString(e.unref(a)("filter.fieldLabel")),9,Gr),((F=(E=t.config.schema)==null?void 0:E[N.value])==null?void 0:F.type)==="select"?(e.openBlock(),e.createBlock(d,{key:0,id:s(N.value),modelValue:i.value[N.value],"onUpdate:modelValue":x=>i.value[N.value]=x,appearance:"select",items:y(N.value),placeholder:e.unref(a)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(e.openBlock(),e.createBlock(C,{key:1,id:s(N.value),modelValue:i.value[N.value],"onUpdate:modelValue":x=>i.value[N.value]=x,autocomplete:"off",placeholder:e.unref(a)("filter.inputPlaceholder"),type:k(N.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),e.createElementVNode("div",Qr,[e.createVNode(T,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:h[0]||(h[0]=x=>g(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("filter.applyButtonText")),1)]),_:1}),e.createVNode(T,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:x=>S(N.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:e.withCtx(()=>[e.createElementVNode("div",Xr,[e.createVNode(T,{appearance:"tertiary",size:"small",onClick:A},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("filter.clearAllButtonText")),1)]),_:1})])]),_:1},512),[[e.vShow,o.value]])]))}}}),[["__scopeId","data-v-15962ee2"]]),ce=e.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(t){const n=t,r=e.ref(void 0),a=e.computed(()=>r.value===!0||r.value!==void 0&&n.forceShow===!0);return e.watch(()=>n.authFunction,async()=>{r.value=await n.authFunction()},{immediate:!0}),(o,i)=>a.value?e.renderSlot(o.$slots,"default",{key:0,isAllowed:r.value}):e.createCommentVNode("",!0)}}),tn={class:"form-section-wrapper"},rn={key:0,class:"form-section-title"},nn={key:1,class:"form-section-description"},an={key:2,class:"form-section-footer"},on={class:"form-section-content"},Ae=J(e.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1}},setup(t){const n=e.useSlots();return(r,a)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(["kong-ui-entity-form-section",{"has-divider":t.hasDivider}])},[e.createElementVNode("div",tn,[t.hideInfoHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-section-info",{sticky:t.stickyInfoHeader}])},[t.title?(e.openBlock(),e.createElementBlock("h4",rn,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.description||e.unref(n).description?(e.openBlock(),e.createElementBlock("div",nn,[e.renderSlot(r.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0),e.unref(n).footer?(e.openBlock(),e.createElementBlock("div",an,[e.renderSlot(r.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2)),e.createElementVNode("div",on,[e.renderSlot(r.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:$e,useDeleteUrlBuilder:ln,useErrors:sn,useExternalLinkCreator:Gn,useFetchUrlBuilder:Qn,useFetcher:cn,useDebouncedFilter:dn,useStringHelpers:Xn,useHelpers:ea,useGatewayFeatureSupported:ta,useTruncationDetector:ra}=H,pn={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},un="Copy to clipboard",fn={message:pn,iconTitle:un},mn="kong-ui-copy-uuid-notify",Me="24px",yn=(t,n)=>{const r=t.__vccOpts||t;for(const[a,o]of n)r[a]=o;return r},gn=t=>(e.pushScopeId("data-v-77afb926"),t=t(),e.popScopeId(),t),hn=["aria-hidden"],bn={key:0,"data-testid":"kui-icon-svg-title"},kn=gn(()=>e.createElementVNode("path",{d:"M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",fill:"currentColor"},null,-1)),wn=e.defineComponent({__name:"CopyIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Me,validator:t=>{if(typeof t=="number"&&t>0)return!0;if(typeof t=="string"){const n=String(t).replace(/px/gi,""),r=Number(n);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(t){const n=t,r=e.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),i=Number(o);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return Me}),a=e.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:r.value,lineHeight:"0",width:r.value}));return(o,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.as),{"aria-hidden":t.decorative?"true":void 0,class:"kui-icon copy-icon","data-testid":"kui-icon-wrapper-copy-icon",style:e.normalizeStyle(a.value)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":t.decorative?"true":void 0,"data-testid":"kui-icon-svg-copy-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[t.title?(e.openBlock(),e.createElementBlock("title",bn,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),kn],8,hn))]),_:1},8,["aria-hidden","style"]))}}),Cn=yn(wn,[["__scopeId","data-v-77afb926"]]),Sn="16px",xn={class:"kong-ui-copy-uuid"},Nn=["onClick"],Oe=15,_n=e.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},idTooltip:{type:String,default:""},truncated:{type:Boolean,default:!0},useMono:{type:Boolean,default:!0},notify:{type:Function,default:void 0},iconColor:{type:String,default:"rgba(0, 0, 0, 0.45)"},tooltip:{type:String,default:""},successTooltip:{type:String,default:""},format:{type:String,required:!1,default:"uuid",validator:t=>["uuid","hidden","redacted","deleted"].includes(t)}},emits:["success","error"],setup(t,{emit:n}){const r=t,{t:a}=Z.createI18n("en-us",fn),o=r.notify||e.inject(mn,()=>{}),i=e.computed(()=>r.idTooltip?{label:r.idTooltip,positionFixed:!0,placement:"bottomStart"}:{title:r.uuid}),l=e.computed(()=>!!(r.tooltip&&r.successTooltip)),m=e.ref(r.tooltip),f=e.computed(()=>r.tooltip?{label:m.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),u=e.computed(()=>{var k;return r.format==="redacted"?"*****":r.format==="deleted"?`*${(k=r.uuid)==null?void 0:k.substring(0,5)}`:r.uuid}),s=k=>{m.value=k,setTimeout(()=>{m.value=r.tooltip},1800)},y=k=>{var S,A;if(!k(r.uuid)){typeof o=="function"&&o({type:"error",message:a("message.fail")}),l.value?s(a("message.fail")):n("error",r.uuid);return}const g=((S=r.uuid)==null?void 0:S.length)>Oe,c=r.format==="hidden"||r.format==="redacted"?a("message.success.prefix"):`"${((A=r.uuid)==null?void 0:A.substring(0,Oe))+(g?"...":"")}"`;typeof o=="function"&&o({type:"success",message:`${c}${a("message.success.content")}`}),l.value?s(r.successTooltip):n("success",r.uuid)};return(k,S)=>{const A=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",xn,[t.format!=="hidden"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.idTooltip?"KTooltip":"div"),e.mergeProps({key:0},i.value,{"data-testid":"copy-id"}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["uuid-container",t.truncated?"truncated-uuid":null,t.useMono?"mono":null])},e.toDisplayString(u.value),3)]),_:1},16)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tooltip?"KTooltip":"div"),e.mergeProps(f.value,{class:"uuid-icon-wrapper"}),{default:e.withCtx(()=>[e.createVNode(A,null,{default:e.withCtx(({copyToClipboard:g})=>[e.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:e.withModifiers(c=>y(g),["stop"])},[e.createVNode(e.unref(Cn),{class:"uuid-icon",color:t.iconColor,decorative:!!t.tooltip,size:e.unref(Sn),title:e.unref(a)("iconTitle")},null,8,["color","decorative","size","title"])],8,Nn)]),_:1})]),_:1},16))])}}}),In=(t,n)=>{const r=t.__vccOpts||t;for(const[a,o]of n)r[a]=o;return r},En=In(_n,[["__scopeId","data-v-0c07874b"]]),na="",aa="",Tn={class:"kong-ui-entities-snis-list"},Vn={key:1},Bn={key:1},An=e.defineComponent({__name:"SniList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(t,{emit:n}){var ee;const r=t,{i18n:{t:a}}=ue.useI18n(),o=(b,I)=>{var p;b.type==="error"?n("copy:error",{entity:I,field:"certificate.id",message:a("errors.copy")}):n("copy:success",{entity:I,field:"certificate.id",message:a("copy.success",{val:(p=I.certificate)==null?void 0:p.id})})},{axiosInstance:i}=$e({headers:(ee=r.config)==null?void 0:ee.requestHeaders}),l=e.ref(1),m=e.computed(()=>r.config.app!=="kongManager"||!!r.config.disableSorting),f={name:{label:a("snis.list.table_headers.name"),searchable:!0,sortable:!0},certificate:{label:a("snis.list.table_headers.certificate_id"),sortable:!1},tags:{label:a("snis.list.table_headers.tags"),sortable:!1}},u=f,s=b=>({style:{maxWidth:b.headerKey==="name"?"250px":b.headerKey==="certificate"?"350px":null}}),y=e.computed(()=>{var I,p;let b=`${r.config.apiBaseUrl}${G.list[r.config.app].all}`;return r.config.app==="konnect"?b=b.replace(/{controlPlaneId}/gi,((I=r.config)==null?void 0:I.controlPlaneId)||""):r.config.app==="kongManager"&&(b=b.replace(/\/{workspace}/gi,(p=r.config)!=null&&p.workspace?`/${r.config.workspace}`:"")),b}),k=e.ref(""),S=e.computed(()=>{const b=r.config.app==="konnect"||r.config.isExactMatch;if(b)return{isExactMatch:b,placeholder:a("search.placeholder")};const{name:I}=f;return{isExactMatch:b,fields:{name:I},schema:r.config.filterSchema}}),{fetcher:A,fetcherState:g}=cn(r.config,y.value),c=()=>{k.value=""},h=()=>{l.value++},C=e.ref(null),T=e.ref({ctaPath:r.config.createRoute,ctaText:void 0,message:a("snis.list.empty_state.description"),title:a("snis.title")}),d=(b,I)=>{const p=b.id;if(!I(p)){n("copy:error",{entity:b,field:"id",message:a("errors.copy")});return}n("copy:success",{entity:b,field:"id",message:a("copy.success",{val:p})})},_=(b,I)=>{const p=JSON.stringify(b);if(!I(p)){n("copy:error",{entity:b,message:a("errors.copy")});return}n("copy:success",{entity:b,message:a("copy.success_brief")})},D=b=>({label:a("actions.edit"),to:r.config.getEditRoute(b)}),N=e.ref(void 0),V=e.ref(!1),E=e.ref(!1),F=e.ref(""),x=ln(r.config,y.value),M=b=>{N.value=b,V.value=!0},q=()=>{V.value=!1,N.value=void 0},X=async()=>{var b,I,p;if((b=N.value)!=null&&b.id){E.value=!0;try{await i.delete(x(N.value.id)),n("delete:success",N.value),E.value=!1,q(),l.value++}catch(w){F.value=((p=(I=w.response)==null?void 0:I.data)==null?void 0:p.message)||w.message||a("errors.delete"),n("error",w)}finally{E.value=!1}}},v=e.ref(!0);return e.watch(g,b=>{var I,p,w,$;if(Array.isArray((I=b==null?void 0:b.response)==null?void 0:I.data)&&(v.value=b.response.data.length>0),b.status===L.Error){C.value={title:a("errors.general")},($=(w=(p=b.error)==null?void 0:p.response)==null?void 0:w.data)!=null&&$.message&&(C.value.message=b.error.response.data.message),n("error",b.error);return}C.value=null}),e.onBeforeMount(async()=>{await r.canCreate()&&(T.value.title=a("snis.list.empty_state.title"),T.value.ctaText=a("actions.create"))}),(b,I)=>{const p=e.resolveComponent("KButton"),w=e.resolveComponent("KBadge"),$=e.resolveComponent("KTruncate"),U=e.resolveComponent("KDropdownItem"),K=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Tn,[e.createVNode(e.unref(jr),{"cache-identifier":t.cacheIdentifier,"cell-attributes":s,"disable-pagination-page-jump":"","disable-row-click":!0,"disable-sorting":m.value,"empty-state-options":T.value,"enable-entity-actions":"","error-message":C.value,fetcher:e.unref(A),"fetcher-cache-key":l.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-snis-list",query:k.value,"table-headers":e.unref(u),"use-action-outside":t.useActionOutside,onClearSearchInput:c,onSort:h},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(en),{modelValue:k.value,"onUpdate:modelValue":I[0]||(I[0]=B=>k.value=B),config:S.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(ce),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(p,{appearance:"primary","data-testid":"toolbar-add-sni",icon:"plus",to:t.config.createRoute},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("snis.list.toolbar_actions.new")),1)]),_:1},8,["to"]),[[e.vShow,v.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:B})=>[e.createElementVNode("b",null,e.toDisplayString(B??"-"),1)]),certificate:e.withCtx(({row:B})=>[B.certificate&&B.certificate.id?(e.openBlock(),e.createBlock(e.unref(En),{key:0,class:"copy-certificate-uuid","data-testid":"copy-certificate-uuid",notify:R=>o(R,B),truncated:!1,uuid:B.certificate.id},null,8,["notify","uuid"])):(e.openBlock(),e.createElementBlock("span",Vn,"-"))]),tags:e.withCtx(({rowValue:B})=>[B!=null&&B.length?(e.openBlock(),e.createBlock($,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B,R=>(e.openBlock(),e.createBlock(w,{key:R,onClick:I[1]||(I[1]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(R),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",Bn,"-"))]),actions:e.withCtx(({row:B})=>[e.createVNode(K,null,{default:e.withCtx(({copyToClipboard:R})=>[e.createVNode(U,{"data-testid":"action-entity-copy-id",onClick:re=>d(B,R)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(K,null,{default:e.withCtx(({copyToClipboard:R})=>[e.createVNode(U,{"data-testid":"action-entity-copy-json",onClick:re=>_(B,R)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(ce),{"auth-function":()=>t.canEdit(B)},{default:e.withCtx(()=>[e.createVNode(U,{"data-testid":"action-entity-edit",item:D(B.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(ce),{"auth-function":()=>t.canDelete(B)},{default:e.withCtx(()=>[e.createVNode(U,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:R=>M(B)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","use-action-outside"]),e.createVNode(e.unref(Rr),{"action-pending":E.value,description:e.unref(a)("delete.description"),"entity-name":N.value&&(N.value.name||N.value.id),"entity-type":e.unref(fe).SNI,error:F.value,"need-confirm":!1,title:e.unref(a)("delete.title"),visible:V.value,onCancel:q,onProceed:X},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),oa="",De=(t,n)=>{const r=t.__vccOpts||t;for(const[a,o]of n)r[a]=o;return r},$n=De(An,[["__scopeId","data-v-5470cca7"]]),Mn={class:"kong-ui-entities-snis-form"},On={"data-testid":"no-search-results"},Dn={key:2,class:"invalid-certificate-message","data-testid":"invalid-certificate-message"},Fn=e.defineComponent({__name:"SniForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.cancelRoute)},sniId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:n}){var I;const r=t,a=pe.useRouter(),{i18n:{t:o}}=ue.useI18n(),{getMessageFromError:i}=sn(),{axiosInstance:l}=$e({headers:(I=r.config)==null?void 0:I.requestHeaders}),m=e.computed(()=>G.form[r.config.app].edit),f=e.computed(()=>r.sniId?te.Edit:te.Create),u=e.computed(()=>r.config.certificateId&&f.value===te.Create?r.config.certificateId:""),s=e.reactive({fields:{name:"",tags:"",certificate_id:""},isReadonly:!1,errorMessage:""}),y=e.reactive({name:"",tags:"",certificate_id:""}),k=e.computed(()=>JSON.stringify(s.fields)!==JSON.stringify(y)&&!!s.fields.name&&!!(s.fields.certificate_id||u.value)),S=p=>{var w,$;s.fields.name=(p==null?void 0:p.name)||"",s.fields.tags=((w=p==null?void 0:p.tags)==null?void 0:w.join(", "))||"",s.fields.certificate_id=(($=p==null?void 0:p.certificate)==null?void 0:$.id)||"",Object.assign(y,s.fields)},A=()=>{a.push(r.config.cancelRoute)},g=e.computed(()=>{var w,$;let p=`${r.config.apiBaseUrl}${G.form[r.config.app].validate}`;return r.config.app==="konnect"?p=p.replace(/{controlPlaneId}/gi,((w=r.config)==null?void 0:w.controlPlaneId)||""):r.config.app==="kongManager"&&(p=p.replace(/\/{workspace}/gi,($=r.config)!=null&&$.workspace?`/${r.config.workspace}`:"")),p=p.replace(/{id}/gi,r.sniId),p}),c=e.computed(()=>{var w,$;let p=`${r.config.apiBaseUrl}${G.form[r.config.app][f.value]}`;return r.config.app==="konnect"?p=p.replace(/{controlPlaneId}/gi,((w=r.config)==null?void 0:w.controlPlaneId)||""):r.config.app==="kongManager"&&(p=p.replace(/\/{workspace}/gi,($=r.config)!=null&&$.workspace?`/${r.config.workspace}`:"")),p=p.replace(/{id}/gi,r.sniId),p}),h=async()=>{var p,w,$,U,K,B,R,re;try{s.isReadonly=!0;const W={name:s.fields.name,tags:(w=(p=s.fields.tags.split(","))==null?void 0:p.map(de=>String(de||"").trim()))==null?void 0:w.filter(de=>de!==""),certificate:{id:u.value||s.fields.certificate_id}};let j;await l.post(g.value,W),f.value==="create"?j=await l.post(c.value,W):f.value==="edit"&&(j=(($=r.config)==null?void 0:$.app)==="konnect"?await l.put(c.value,W):await l.patch(c.value,W)),s.fields.name=((U=j==null?void 0:j.data)==null?void 0:U.name)||"",s.fields.tags=((B=(K=j==null?void 0:j.data)==null?void 0:K.tags)==null?void 0:B.join(", "))||"",s.fields.certificate_id=((re=(R=j==null?void 0:j.data)==null?void 0:R.certificate)==null?void 0:re.id)||"",Object.assign(y,s.fields),n("update",j==null?void 0:j.data)}catch(W){s.errorMessage=i(W),n("error",W)}finally{s.isReadonly=!1}},{debouncedQueryChange:C,loading:T,allRecords:d,error:_,validationError:D,loadItems:N,results:V}=dn(r.config,G.form[r.config.app].certificates),E=e.ref(!0),F=p=>{E.value=!p,C(p)},x=e.computed(()=>_.value?o("errors.certificates.fetch"):""),M=e.computed(()=>D.value?o("errors.certificates.invalid"):""),q=e.ref(0),X=e.computed(()=>d.value===void 0),v=e.ref(new Set),ee=e.computed(()=>Array.from(v.value).map(w=>({label:w,value:w,selected:s.fields.certificate_id===w}))),b=p=>{v.value.clear();let w;for(w of p)v.value.add(w.id)};return e.watch(V,p=>{b(p)},{immediate:!0,deep:!0}),e.watch(ee,()=>{q.value++},{immediate:!0,deep:!0}),e.onBeforeMount(async()=>{await N()}),(p,w)=>{const $=e.resolveComponent("KInput"),U=e.resolveComponent("KSelect");return e.openBlock(),e.createElementBlock("div",Mn,[e.createVNode(e.unref($r),{"can-submit":k.value,config:t.config,"edit-id":t.sniId,"error-message":s.errorMessage||x.value,"fetch-url":m.value,"is-readonly":s.isReadonly,onCancel:A,"onFetch:error":w[3]||(w[3]=K=>p.$emit("error",K)),"onFetch:success":S,onLoading:w[4]||(w[4]=K=>p.$emit("loading",K)),onSubmit:h},{default:e.withCtx(()=>[e.createVNode(e.unref(Ae),{description:e.unref(o)("form.sections.general.description"),title:e.unref(o)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode($,{modelValue:s.fields.name,"onUpdate:modelValue":w[0]||(w[0]=K=>s.fields.name=K),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-name",label:e.unref(o)("form.fields.name.label"),placeholder:e.unref(o)("form.fields.name.placeholder"),readonly:s.isReadonly,required:"",type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode($,{modelValue:s.fields.tags,"onUpdate:modelValue":w[1]||(w[1]=K=>s.fields.tags=K),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-tags",help:e.unref(o)("form.fields.tags.help"),label:e.unref(o)("form.fields.tags.label"),"label-attributes":{info:e.unref(o)("form.fields.tags.tooltip")},placeholder:e.unref(o)("form.fields.tags.placeholder"),readonly:s.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.createVNode(e.unref(Ae),{description:e.unref(o)("form.sections.certificate.description"),"has-divider":"",title:e.unref(o)("form.sections.certificate.title")},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createBlock($,{key:0,"data-testid":"sni-form-certificate-id",label:e.unref(o)("form.fields.certificate_id.label"),"model-value":u.value,readonly:"",required:"",width:"100%"},null,8,["label","model-value"])):(e.openBlock(),e.createBlock(U,{key:1,modelValue:s.fields.certificate_id,"onUpdate:modelValue":w[2]||(w[2]=K=>s.fields.certificate_id=K),appearance:"select",autosuggest:"",class:e.normalizeClass({"k-select-placeholder":E.value}),clearable:"","data-testid":"sni-form-certificate-id","dropdown-footer-text":X.value?e.unref(o)("form.fields.certificate_id.footer"):void 0,"enable-filtering":"",items:ee.value,label:e.unref(o)("form.fields.certificate_id.label"),loading:e.unref(T),placeholder:e.unref(o)("form.fields.certificate_id.placeholder"),readonly:s.isReadonly,required:"",width:"100%",onQueryChange:F},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(o)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",On,e.toDisplayString(e.unref(o)("search.no_results")),1)]),_:1},8,["modelValue","class","dropdown-footer-text","items","label","loading","placeholder","readonly"])),M.value?(e.openBlock(),e.createElementBlock("p",Dn,e.toDisplayString(M.value),1)):e.createCommentVNode("",!0)]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])])}}}),ia="",Kn=De(Fn,[["__scopeId","data-v-576c2dac"]]);P.SniForm=Kn,P.SniList=$n,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-e851fc7c]{align-items:center;border-bottom:var(--23f3018c);display:var(--3815ec6d);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-e851fc7c]{width:var(--1957f153)}.config-card-details-row .config-card-details-label label[data-v-e851fc7c]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-e851fc7c]{width:var(--195a372e)}.config-card-details-row .config-card-details-value .truncated[data-v-e851fc7c]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-e851fc7c]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-e851fc7c] .kong-ui-copy-uuid:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-e851fc7c]{display:flex}.config-card-details-row .config-badge[data-v-e851fc7c]{margin-right:4px}.config-card-details-row[data-v-e851fc7c] .k-label{margin-bottom:0}.config-card-details-row[data-v-e851fc7c] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-e851fc7c] .config-card-details-row{width:auto}.config-card-display-json #config-card-codeblock .k-highlighted-code-block code,.config-card-display-yaml #config-card-codeblock .k-highlighted-code-block code{background-color:#232633}.config-card-prop-section-title[data-v-c914c7e4]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .k-card-title[data-v-b3999889]{margin-bottom:0}.kong-ui-entity-base-config-card[data-v-b3999889] .k-card-content .k-card-body{font-size:14px}.kong-ui-entity-base-config-card .config-card-actions[data-v-b3999889]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-b3999889]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-b3999889]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-b3999889] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-b3999889]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-81612aef]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-81612aef]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-81612aef] .k-button:last-of-type{margin-left:16px}.content-wrapper[data-v-e42a20c9] [role=button]{display:inline}.content-wrapper[data-v-e42a20c9] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-499a771c]{align-items:center}.kong-ui-entity-base-table .toolbar-button-container[data-v-499a771c]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-499a771c]{float:right}.kong-ui-entity-base-table .actions-container[data-v-499a771c] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table .actions-trigger[data-v-499a771c]{background-color:#0000!important;border:none!important;cursor:pointer!important;font-weight:400!important}.k-tabs>.tab-container>.kong-ui-entity-base-table,.k-tabs>.tab-container>[class^=kong-ui-entities-]>.kong-ui-entity-base-table{border-top:0}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-1c9a2a07],.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-1c9a2a07]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{margin-top:32px}.kong-ui-entity-delete-error[data-v-1c9a2a07]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-15962ee2]{width:100%}.kong-ui-entity-filter[data-v-15962ee2]{display:flex;position:relative}.kong-ui-entity-filter[data-v-15962ee2] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-15962ee2] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-15962ee2]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-15962ee2]{box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;position:absolute;top:100%;z-index:1060}.kong-ui-entity-filter-menu[data-v-15962ee2] .k-menu-item .menu-button:focus{box-shadow:none}.kong-ui-entity-filter-menu[data-v-15962ee2] .k-menu-item .menu-button:focus-visible{box-shadow:0 0 0 1px #bee2ff}.menu-item-title[data-v-15962ee2]{align-items:center;display:flex}.menu-item-indicator[data-v-15962ee2]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-15962ee2]{align-items:center;display:flex;justify-content:space-between}.menu-item-body[data-v-15962ee2] .k-input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-15962ee2] .k-input-wrapper{width:100%}.menu-item-body[data-v-15962ee2] .k-select-input .k-input{font-size:12px}.menu-item-body[data-v-15962ee2] .k-select-input .k-input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-15962ee2]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-15962ee2]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-15962ee2]{padding:0 20px}fieldset[data-v-8b6dc312]{margin:0;padding:0}.kong-ui-entity-form-section[data-v-8b6dc312]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-8b6dc312]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-8b6dc312]{color:#000933;font-size:18px;font-weight:600;line-height:24px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-8b6dc312]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-8b6dc312]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-77c479ff]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-77c479ff]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-77c479ff]{display:flex}.kong-ui-public-entity-link .entity-link-icon[data-v-77c479ff]{color:#0044f4;margin-left:4px}.kong-ui-public-entity-link .entity-link-label[data-v-77c479ff]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-77c479ff]{align-items:center;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-77c479ff]{margin-left:6px}.kong-ui-copy-uuid[data-v-0c07874b]{align-items:center;display:flex}.kong-ui-copy-uuid .uuid-container[data-v-0c07874b]{margin-right:12px;white-space:nowrap}.kong-ui-copy-uuid .truncated-uuid[data-v-0c07874b]{margin-right:1ch;max-width:10ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-copy-uuid .uuid-icon-wrapper[data-v-0c07874b]{align-items:center;cursor:pointer;display:flex}.kong-ui-copy-uuid .uuid-icon[data-v-0c07874b]{display:flex}.kong-ui-entities-snis-list[data-v-
|
|
1
|
+
.config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-e851fc7c]{align-items:center;border-bottom:var(--23f3018c);display:var(--3815ec6d);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-e851fc7c]{width:var(--1957f153)}.config-card-details-row .config-card-details-label label[data-v-e851fc7c]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-e851fc7c]{width:var(--195a372e)}.config-card-details-row .config-card-details-value .truncated[data-v-e851fc7c]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-e851fc7c]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-e851fc7c] .kong-ui-copy-uuid:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-e851fc7c]{display:flex}.config-card-details-row .config-badge[data-v-e851fc7c]{margin-right:4px}.config-card-details-row[data-v-e851fc7c] .k-label{margin-bottom:0}.config-card-details-row[data-v-e851fc7c] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-e851fc7c] .config-card-details-row{width:auto}.config-card-display-json #config-card-codeblock .k-highlighted-code-block code,.config-card-display-yaml #config-card-codeblock .k-highlighted-code-block code{background-color:#232633}.config-card-prop-section-title[data-v-c914c7e4]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .k-card-title[data-v-b3999889]{margin-bottom:0}.kong-ui-entity-base-config-card[data-v-b3999889] .k-card-content .k-card-body{font-size:14px}.kong-ui-entity-base-config-card .config-card-actions[data-v-b3999889]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-b3999889]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-b3999889]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-b3999889] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-b3999889]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-81612aef]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-81612aef]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-81612aef] .k-button:last-of-type{margin-left:16px}.content-wrapper[data-v-e42a20c9] [role=button]{display:inline}.content-wrapper[data-v-e42a20c9] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-499a771c]{align-items:center}.kong-ui-entity-base-table .toolbar-button-container[data-v-499a771c]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-499a771c]{float:right}.kong-ui-entity-base-table .actions-container[data-v-499a771c] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table .actions-trigger[data-v-499a771c]{background-color:#0000!important;border:none!important;cursor:pointer!important;font-weight:400!important}.k-tabs>.tab-container>.kong-ui-entity-base-table,.k-tabs>.tab-container>[class^=kong-ui-entities-]>.kong-ui-entity-base-table{border-top:0}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-1c9a2a07],.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-1c9a2a07]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{margin-top:32px}.kong-ui-entity-delete-error[data-v-1c9a2a07]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-15962ee2]{width:100%}.kong-ui-entity-filter[data-v-15962ee2]{display:flex;position:relative}.kong-ui-entity-filter[data-v-15962ee2] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-15962ee2] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-15962ee2]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-15962ee2]{box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;position:absolute;top:100%;z-index:1060}.kong-ui-entity-filter-menu[data-v-15962ee2] .k-menu-item .menu-button:focus{box-shadow:none}.kong-ui-entity-filter-menu[data-v-15962ee2] .k-menu-item .menu-button:focus-visible{box-shadow:0 0 0 1px #bee2ff}.menu-item-title[data-v-15962ee2]{align-items:center;display:flex}.menu-item-indicator[data-v-15962ee2]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-15962ee2]{align-items:center;display:flex;justify-content:space-between}.menu-item-body[data-v-15962ee2] .k-input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-15962ee2] .k-input-wrapper{width:100%}.menu-item-body[data-v-15962ee2] .k-select-input .k-input{font-size:12px}.menu-item-body[data-v-15962ee2] .k-select-input .k-input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-15962ee2]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-15962ee2]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-15962ee2]{padding:0 20px}fieldset[data-v-8b6dc312]{margin:0;padding:0}.kong-ui-entity-form-section[data-v-8b6dc312]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-8b6dc312]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-8b6dc312]{color:#000933;font-size:18px;font-weight:600;line-height:24px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-8b6dc312]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-8b6dc312]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-77c479ff]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-77c479ff]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-77c479ff]{display:flex}.kong-ui-public-entity-link .entity-link-icon[data-v-77c479ff]{color:#0044f4;margin-left:4px}.kong-ui-public-entity-link .entity-link-label[data-v-77c479ff]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-77c479ff]{align-items:center;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-77c479ff]{margin-left:6px}.kong-ui-copy-uuid[data-v-0c07874b]{align-items:center;display:flex}.kong-ui-copy-uuid .uuid-container[data-v-0c07874b]{margin-right:12px;white-space:nowrap}.kong-ui-copy-uuid .truncated-uuid[data-v-0c07874b]{margin-right:1ch;max-width:10ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-copy-uuid .uuid-icon-wrapper[data-v-0c07874b]{align-items:center;cursor:pointer;display:flex}.kong-ui-copy-uuid .uuid-icon[data-v-0c07874b]{display:flex}.kong-ui-entities-snis-list[data-v-5470cca7]{width:100%}.kong-ui-entities-snis-list .kong-ui-entity-filter-input[data-v-5470cca7]{width:300px}.kong-ui-entities-snis-form[data-v-576c2dac]{width:100%}.kong-ui-entities-snis-form .invalid-certificate-message[data-v-576c2dac]{color:#d60027;font-size:11px;font-weight:500;margin-top:3px!important}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-snis",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-snis.umd.js",
|
|
6
6
|
"module": "./dist/entities-snis.es.js",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"errorLimit": "400KB"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@kong-ui-public/copy-uuid": "^2.0.
|
|
53
|
-
"@kong-ui-public/entities-shared": "^2.1.
|
|
52
|
+
"@kong-ui-public/copy-uuid": "^2.0.8",
|
|
53
|
+
"@kong-ui-public/entities-shared": "^2.1.1"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"dev": "cross-env USE_SANDBOX=true vite",
|