@kong-ui-public/entities-consumers 1.1.27 → 1.1.28

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