@kong-ui-public/entities-consumer-groups 1.1.11 → 1.1.13

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.
@@ -108,7 +108,7 @@ function $t() {
108
108
  }
109
109
  const qe = {
110
110
  useI18n: $t
111
- }, me = "/api/runtime_groups/{controlPlaneId}", fe = "/{workspace}", ge = {
111
+ }, me = "/api/runtime_groups/{controlPlaneId}", ge = "/{workspace}", fe = {
112
112
  list: {
113
113
  konnect: {
114
114
  all: `${me}/consumer_groups`,
@@ -116,9 +116,9 @@ const qe = {
116
116
  oneForConsumer: `${me}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
117
117
  },
118
118
  kongManager: {
119
- all: `${fe}/consumer_groups?counter=true`,
120
- forConsumer: `${fe}/consumers/{consumerId}/consumer_groups`,
121
- oneForConsumer: `${fe}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
119
+ all: `${ge}/consumer_groups?counter=true`,
120
+ forConsumer: `${ge}/consumers/{consumerId}/consumer_groups`,
121
+ oneForConsumer: `${ge}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
122
122
  }
123
123
  },
124
124
  form: {
@@ -131,12 +131,12 @@ const qe = {
131
131
  getConsumers: `${me}/consumer_groups/{id}/consumers`
132
132
  },
133
133
  kongManager: {
134
- consumersList: `${fe}/consumers`,
135
- create: `${fe}/consumer_groups`,
136
- edit: `${fe}/consumer_groups/{id}`,
137
- addConsumer: `${fe}/consumer_groups/{id}/consumers`,
138
- removeConsumer: `${fe}/consumer_groups/{id}/consumers/{consumerId}`,
139
- getConsumers: `${fe}/consumer_groups/{id}/consumers`
134
+ consumersList: `${ge}/consumers`,
135
+ create: `${ge}/consumer_groups`,
136
+ edit: `${ge}/consumer_groups/{id}`,
137
+ addConsumer: `${ge}/consumer_groups/{id}/consumers`,
138
+ removeConsumer: `${ge}/consumer_groups/{id}/consumers/{consumerId}`,
139
+ getConsumers: `${ge}/consumer_groups/{id}/consumers`
140
140
  }
141
141
  }
142
142
  };
@@ -304,36 +304,36 @@ function Vt(e, o, t, a = {
304
304
  headers: e.requestHeaders
305
305
  }), { i18n: { t: r } } = Ge(), { debounce: p } = xt(), w = p(async (b) => {
306
306
  await y(b);
307
- }, 200), g = A(!1), $ = A(""), h = A(""), k = A([]), F = A(void 0), S = s(o);
307
+ }, 200), f = A(!1), $ = A(""), h = A(""), k = A([]), F = A(void 0), S = s(o);
308
308
  let O = `${e.apiBaseUrl}${S}`;
309
309
  e.app === "konnect" ? O = O.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (O = O.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
310
310
  const E = async () => {
311
311
  try {
312
- g.value = !0;
312
+ f.value = !0;
313
313
  const { data: b } = await n.get(`${O}?size=${t}`);
314
314
  b != null && b.next || (F.value = a.fetchedItemsKey in b ? b[a.fetchedItemsKey] : []), k.value = a.fetchedItemsKey in b ? b[a.fetchedItemsKey] : [];
315
315
  } catch {
316
316
  k.value = [], $.value = r("debouncedFilter.errors.fetch");
317
317
  } finally {
318
- g.value = !1;
318
+ f.value = !1;
319
319
  }
320
320
  }, l = A(""), y = async (b) => {
321
- var f, L;
321
+ var g, L;
322
322
  if (l.value !== b)
323
323
  if (l.value = b || "", F.value === void 0)
324
324
  try {
325
- g.value = !0, $.value = "", h.value = "";
325
+ f.value = !0, $.value = "", h.value = "";
326
326
  let m = O + "";
327
327
  b && (m += `/${b}`);
328
328
  const { data: q } = await n.get(`${m}?size=${t}`);
329
329
  a.fetchedItemsKey in q ? k.value = q[a.fetchedItemsKey] : q != null && q.id ? k.value = [q] : k.value = [];
330
330
  } catch (m) {
331
- ((f = m == null ? void 0 : m.response) == null ? void 0 : f.status) === 404 ? h.value = r("debouncedFilter.errors.invalid") : (k.value = [], $.value = r("debouncedFilter.errors.fetch"));
331
+ ((g = m == null ? void 0 : m.response) == null ? void 0 : g.status) === 404 ? h.value = r("debouncedFilter.errors.invalid") : (k.value = [], $.value = r("debouncedFilter.errors.fetch"));
332
332
  } finally {
333
- g.value = !1;
333
+ f.value = !1;
334
334
  }
335
335
  else
336
- g.value = !0, h.value = "", b ? (k.value = (L = F.value) == null ? void 0 : L.filter((m) => {
336
+ f.value = !0, h.value = "", b ? (k.value = (L = F.value) == null ? void 0 : L.filter((m) => {
337
337
  var q;
338
338
  let x = !1;
339
339
  for (const G of a.searchKeys) {
@@ -341,10 +341,10 @@ function Vt(e, o, t, a = {
341
341
  D != null && D.includes(b.toLowerCase()) && (x = !0);
342
342
  }
343
343
  return x;
344
- }), (!k.value || !k.value.length) && (h.value = r("debouncedFilter.errors.invalid"))) : k.value = F.value, g.value = !1;
344
+ }), (!k.value || !k.value.length) && (h.value = r("debouncedFilter.errors.invalid"))) : k.value = F.value, f.value = !1;
345
345
  };
346
346
  return {
347
- loading: g,
347
+ loading: f,
348
348
  error: $,
349
349
  validationError: h,
350
350
  results: k,
@@ -394,12 +394,12 @@ function st(e, o) {
394
394
  () => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
395
395
  );
396
396
  return (p) => {
397
- const { page: w, pageSize: g, offset: $, sortColumnKey: h, sortColumnOrder: k, query: F } = p;
397
+ const { page: w, pageSize: f, offset: $, sortColumnKey: h, sortColumnOrder: k, query: F } = p;
398
398
  try {
399
399
  let S = new URL(r.value.href);
400
400
  return n.value && F ? (S.search = "", S = new URL(`${S.href}/${F}/`)) : (n.value || new URLSearchParams(F).forEach((O, E) => {
401
401
  S.searchParams.append(E, O);
402
- }), h && S.searchParams.append("sort_by", h), k === "desc" && S.searchParams.append("sort_desc", "1"), S.searchParams.append("size", String(g))), $ && w !== 1 && S.searchParams.append("offset", String($)), S.href;
402
+ }), h && S.searchParams.append("sort_by", h), k === "desc" && S.searchParams.append("sort_desc", "1"), S.searchParams.append("size", String(f))), $ && w !== 1 && S.searchParams.append("offset", String($)), S.href;
403
403
  } catch (S) {
404
404
  return console.error("RouteList(fetcher)", S), a.value;
405
405
  }
@@ -414,7 +414,7 @@ function Lt(e, o, t = "data") {
414
414
  return { fetcher: async (w) => {
415
415
  try {
416
416
  p.value = { status: ve.Loading };
417
- const g = r(w), { data: $ } = await n.get(g), h = t && t.replace(/[^\w-_]/gi, "");
417
+ const f = r(w), { data: $ } = await n.get(f), h = t && t.replace(/[^\w-_]/gi, "");
418
418
  let k;
419
419
  $[h] && Array.isArray($[h]) ? k = $[h] : k = Object.keys($).length ? [$] : [];
420
420
  const F = {
@@ -430,19 +430,19 @@ function Lt(e, o, t = "data") {
430
430
  status: ve.Idle,
431
431
  response: F
432
432
  }, F;
433
- } catch (g) {
433
+ } catch (f) {
434
434
  const $ = {
435
435
  data: [],
436
436
  total: 0
437
437
  };
438
- return w.query && g.response.status === 404 ? (p.value = {
438
+ return w.query && f.response.status === 404 ? (p.value = {
439
439
  status: ve.NoResults,
440
440
  response: $,
441
- error: g
441
+ error: f
442
442
  }, $) : (p.value = {
443
443
  status: ve.Error,
444
444
  response: $,
445
- error: g
445
+ error: f
446
446
  }, $);
447
447
  }
448
448
  }, fetcherState: p };
@@ -572,7 +572,7 @@ const re = {
572
572
  positionFixed: !0,
573
573
  maxWidth: "500px",
574
574
  placement: "bottomStart"
575
- } : {}), g = I(() => t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${t.uuid.substring(0, 5)}` : t.uuid), $ = (k) => {
575
+ } : {}), f = I(() => t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${t.uuid.substring(0, 5)}` : t.uuid), $ = (k) => {
576
576
  p.value = k, setTimeout(() => {
577
577
  p.value = t.tooltip;
578
578
  }, 1800);
@@ -604,7 +604,7 @@ const re = {
604
604
  e.truncated ? "truncated-uuid" : null,
605
605
  e.useMono ? "mono" : null
606
606
  ])
607
- }, T(g.value), 3)
607
+ }, T(f.value), 3)
608
608
  ], 8, ta)) : Z("", !0),
609
609
  (u(), H(Ve(e.tooltip ? "KTooltip" : "div"), ot(w.value, { class: "uuid-icon-wrapper" }), {
610
610
  default: c(() => [
@@ -660,13 +660,13 @@ const re = {
660
660
  },
661
661
  setup(e) {
662
662
  const o = e, { i18n: { t } } = re.useI18n(), { convertKeyToTitle: a } = re.useStringHelpers(), n = I(() => o.item.key ?? "json-array-item"), r = I(() => o.item.value ?? o.item), p = I(() => {
663
- const g = JSON.parse(JSON.stringify(r.value));
664
- return o.isArrayItem && delete g.name, g;
663
+ const f = JSON.parse(JSON.stringify(r.value));
664
+ return o.isArrayItem && delete f.name, f;
665
665
  }), w = I(() => {
666
- var g;
667
- return o.isArrayItem ? (g = r.value) != null && g.name ? a(r.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: o.index }) : "";
666
+ var f;
667
+ return o.isArrayItem ? (f = r.value) != null && f.name ? a(r.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: o.index }) : "";
668
668
  });
669
- return (g, $) => (u(), H(Ve(e.isArrayItem ? "fieldset" : "div"), {
669
+ return (f, $) => (u(), H(Ve(e.isArrayItem ? "fieldset" : "div"), {
670
670
  class: Ie(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
671
671
  }, {
672
672
  default: c(() => [
@@ -739,7 +739,7 @@ const re = {
739
739
  }, 8, ["appearance"]);
740
740
  };
741
741
  }
742
- }), ca = "#0044f4", da = "#e0e4ea", pa = "#3a3f51", ma = "1px", fa = { class: "config-card-details-row" }, ga = ["data-testid"], ya = ["data-testid"], va = ["data-testid"], ha = ["data-testid"], ba = { key: 1 }, _a = ["data-testid"], ka = ["data-testid"], Ca = ["data-testid"], Ia = ["data-testid"], wa = ["title"], Sa = {
742
+ }), ca = "#0044f4", da = "#e0e4ea", pa = "#3a3f51", ma = "1px", ga = { class: "config-card-details-row" }, fa = ["data-testid"], ya = ["data-testid"], va = ["data-testid"], ha = ["data-testid"], ba = { key: 1 }, _a = ["data-testid"], ka = ["data-testid"], Ca = ["data-testid"], Ia = ["data-testid"], wa = ["title"], Sa = {
743
743
  name: "ConfigCardItem",
744
744
  components: { CopyUuid: ut, JsonCardItem: ct, StatusBadge: ua, InternalLinkItem: ia }
745
745
  }, $a = /* @__PURE__ */ te({
@@ -765,11 +765,11 @@ const re = {
765
765
  const t = e;
766
766
  yt((k) => ({
767
767
  "2c6ac268": $.value ? "none" : `solid ${s(ma)} ${s(da)}`,
768
- c7a65802: g.value && p.value ? "block" : "flex",
769
- "778426fe": g.value && p.value ? "100%" : t.slim ? "50%" : "25%",
770
- "777f9b48": g.value && p.value ? "100%" : t.slim ? "50%" : "75%"
768
+ c7a65802: f.value && p.value ? "block" : "flex",
769
+ "778426fe": f.value && p.value ? "100%" : t.slim ? "50%" : "25%",
770
+ "777f9b48": f.value && p.value ? "100%" : t.slim ? "50%" : "75%"
771
771
  }));
772
- const a = Fe(), { i18n: { t: n, formatUnixTimeStamp: r } } = re.useI18n(), p = I(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), w = I(() => !!(t.item.tooltip || a["label-tooltip"])), g = I(() => t.item.type === Q.Json || t.item.type === Q.JsonArray), $ = I(() => t.item.type === Q.JsonArray), h = I(() => {
772
+ const a = Fe(), { i18n: { t: n, formatUnixTimeStamp: r } } = re.useI18n(), p = I(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), w = I(() => !!(t.item.tooltip || a["label-tooltip"])), f = I(() => t.item.type === Q.Json || t.item.type === Q.JsonArray), $ = I(() => t.item.type === Q.JsonArray), h = I(() => {
773
773
  switch (t.item.type) {
774
774
  case Q.ID:
775
775
  return {
@@ -898,7 +898,7 @@ const re = {
898
898
  });
899
899
  return (k, F) => {
900
900
  const S = U("KLabel"), O = U("KBadge"), E = U("KMethodBadge");
901
- return u(), P("div", fa, [
901
+ return u(), P("div", ga, [
902
902
  V("div", {
903
903
  class: "config-card-details-label",
904
904
  "data-testid": `${e.item.key}-label`
@@ -925,7 +925,7 @@ const re = {
925
925
  } : void 0
926
926
  ]), 1024)
927
927
  ], !0)
928
- ], 8, ga),
928
+ ], 8, fa),
929
929
  V("div", {
930
930
  class: "config-card-details-value",
931
931
  "data-testid": `${e.item.key}-property-value`
@@ -1070,7 +1070,7 @@ const re = {
1070
1070
  emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
1071
1071
  setup(e, { emit: o }) {
1072
1072
  var t;
1073
- const a = e, n = Fe(), { i18n: { t: r } } = re.useI18n(), { getMessageFromError: p } = re.useErrors(), { convertKeyToTitle: w } = re.useStringHelpers(), { axiosInstance: g } = re.useAxios({
1073
+ const a = e, n = Fe(), { i18n: { t: r } } = re.useI18n(), { getMessageFromError: p } = re.useErrors(), { convertKeyToTitle: w } = re.useStringHelpers(), { axiosInstance: f } = re.useAxios({
1074
1074
  headers: (t = a.config) == null ? void 0 : t.requestHeaders
1075
1075
  }), $ = {
1076
1076
  id: {
@@ -1166,7 +1166,7 @@ const re = {
1166
1166
  }), y = I(() => {
1167
1167
  const m = [];
1168
1168
  return l.value.basic.length && m.push("basic"), l.value.advanced.length && m.push("advanced"), l.value.plugin.length && m.push("plugin"), m;
1169
- }), b = (m) => !!(m.tooltip || n[`${m.key}-label-tooltip`]), f = I(() => {
1169
+ }), b = (m) => !!(m.tooltip || n[`${m.key}-label-tooltip`]), g = I(() => {
1170
1170
  var m, q;
1171
1171
  let x = `${a.config.apiBaseUrl}${a.fetchUrl}`;
1172
1172
  return a.config.app === "konnect" ? x = x.replace(/{controlPlaneId}/gi, ((m = a.config) == null ? void 0 : m.controlPlaneId) || "") : a.config.app === "kongManager" && (x = x.replace(/\/{workspace}/gi, (q = a.config) != null && q.workspace ? `/${a.config.workspace}` : "")), x = x.replace(/{id}/gi, a.config.entityId), x;
@@ -1178,7 +1178,7 @@ const re = {
1178
1178
  }, { immediate: !0 }), Te(async () => {
1179
1179
  k.value = !1, h.value = !0;
1180
1180
  try {
1181
- const { data: m } = await g.get(f.value);
1181
+ const { data: m } = await f.get(g.value);
1182
1182
  if (a.dataKey)
1183
1183
  if (typeof m[a.dataKey] < "u")
1184
1184
  S.value = { ...m[a.dataKey] };
@@ -1342,7 +1342,7 @@ const re = {
1342
1342
  var t;
1343
1343
  const a = e, n = je(), { i18n: { t: r } } = re.useI18n(), { getMessageFromError: p } = re.useErrors(), { axiosInstance: w } = re.useAxios({
1344
1344
  headers: (t = a.config) == null ? void 0 : t.requestHeaders
1345
- }), g = A(!1), $ = A(!1), h = A(""), k = I(() => a.canSubmit === !1 || a.isReadonly), F = I(() => {
1345
+ }), f = A(!1), $ = A(!1), h = A(""), k = I(() => a.canSubmit === !1 || a.isReadonly), F = I(() => {
1346
1346
  var l, y;
1347
1347
  if (!a.editId)
1348
1348
  return "";
@@ -1355,28 +1355,28 @@ const re = {
1355
1355
  }, E = () => {
1356
1356
  k.value || o("submit");
1357
1357
  };
1358
- return he(() => g.value, (l) => {
1358
+ return he(() => f.value, (l) => {
1359
1359
  o("loading", l);
1360
1360
  }, { immediate: !0 }), Te(async () => {
1361
1361
  if (a.editId)
1362
1362
  try {
1363
- $.value = !1, g.value = !0;
1363
+ $.value = !1, f.value = !0;
1364
1364
  const { data: l } = await w.get(F.value);
1365
1365
  o("fetch:success", l);
1366
1366
  } catch (l) {
1367
1367
  const y = p(l);
1368
1368
  h.value = y.startsWith("code") ? r("baseForm.errors.edit") : y, $.value = !0, o("fetch:error", l);
1369
1369
  } finally {
1370
- g.value = !1;
1370
+ f.value = !1;
1371
1371
  }
1372
1372
  }), (l, y) => {
1373
- const b = U("KSkeleton"), f = U("KEmptyState"), L = U("KAlert"), m = U("KButton"), q = U("KCard");
1373
+ const b = U("KSkeleton"), g = U("KEmptyState"), L = U("KAlert"), m = U("KButton"), q = U("KCard");
1374
1374
  return u(), H(q, { class: "kong-ui-entity-base-form" }, {
1375
1375
  body: c(() => [
1376
- g.value ? (u(), H(b, {
1376
+ f.value ? (u(), H(b, {
1377
1377
  key: 0,
1378
1378
  type: "form"
1379
- })) : $.value ? (u(), H(f, {
1379
+ })) : $.value ? (u(), H(g, {
1380
1380
  key: 1,
1381
1381
  "cta-text": s(r)("baseForm.actions.back"),
1382
1382
  "data-testid": "form-fetch-error",
@@ -1461,8 +1461,8 @@ const re = {
1461
1461
  r && (r.disconnect(), r = void 0);
1462
1462
  }, w = () => {
1463
1463
  var E, l, y;
1464
- $.value = ((E = a.value) == null ? void 0 : E.getBoundingClientRect().width) || 0, h.value = ((l = t.value) == null ? void 0 : l.clientWidth) || 0, k.value = ((y = g.value) == null ? void 0 : y.innerText) || "";
1465
- }, g = A({}), $ = A(0), h = A(0), k = A(""), F = I(() => [a.value, t.value]), S = he(
1464
+ $.value = ((E = a.value) == null ? void 0 : E.getBoundingClientRect().width) || 0, h.value = ((l = t.value) == null ? void 0 : l.clientWidth) || 0, k.value = ((y = f.value) == null ? void 0 : y.innerText) || "";
1465
+ }, f = A({}), $ = A(0), h = A(0), k = A(""), F = I(() => [a.value, t.value]), S = he(
1466
1466
  F,
1467
1467
  (E) => {
1468
1468
  if (n.value && (p(), "ResizeObserver" in window && window)) {
@@ -1485,7 +1485,7 @@ const re = {
1485
1485
  const y = U("KTooltip");
1486
1486
  return u(), P("span", {
1487
1487
  ref_key: "contentRef",
1488
- ref: g,
1488
+ ref: f,
1489
1489
  class: "content-wrapper"
1490
1490
  }, [
1491
1491
  n.value ? (u(), P("span", Fa, [
@@ -1611,32 +1611,32 @@ const re = {
1611
1611
  },
1612
1612
  emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
1613
1613
  setup(e, { emit: o }) {
1614
- const t = e, { i18n: { t: a } } = re.useI18n(), n = I(() => t.cacheIdentifier || t.preferencesStorageKey), r = (f) => f.hasData || !!t.query, p = I(() => {
1615
- const f = [];
1614
+ const t = e, { i18n: { t: a } } = re.useI18n(), n = I(() => t.cacheIdentifier || t.preferencesStorageKey), r = (g) => g.hasData || !!t.query, p = I(() => {
1615
+ const g = [];
1616
1616
  return Object.keys(t.tableHeaders).forEach((L) => {
1617
1617
  const m = t.tableHeaders[L];
1618
- f.push({
1618
+ g.push({
1619
1619
  label: m.label ?? L,
1620
1620
  key: L,
1621
1621
  sortable: m.sortable ?? !1
1622
1622
  });
1623
- }), t.enableEntityActions && f.push({
1623
+ }), t.enableEntityActions && g.push({
1624
1624
  key: "actions",
1625
1625
  hideLabel: !0
1626
- }), f;
1627
- }), w = (f) => ({
1628
- "data-rowid": f.id,
1629
- "data-testid": f.name,
1630
- ...t.rowAttributes(f)
1631
- }), g = A({}), $ = (f) => {
1626
+ }), g;
1627
+ }), w = (g) => ({
1628
+ "data-rowid": g.id,
1629
+ "data-testid": g.name,
1630
+ ...t.rowAttributes(g)
1631
+ }), f = A({}), $ = (g) => {
1632
1632
  var L;
1633
- return (L = g.value) == null ? void 0 : L.$el.querySelector(`[data-rowid="${f.id}"]`);
1634
- }, h = (f) => {
1633
+ return (L = f.value) == null ? void 0 : L.$el.querySelector(`[data-rowid="${g.id}"]`);
1634
+ }, h = (g) => {
1635
1635
  const L = {
1636
- "data-testid": f.headerKey,
1637
- ...t.cellAttributes(f)
1636
+ "data-testid": g.headerKey,
1637
+ ...t.cellAttributes(g)
1638
1638
  };
1639
- return f.colIndex === 0 && (L.style = {
1639
+ return g.colIndex === 0 && (L.style = {
1640
1640
  maxWidth: "250px",
1641
1641
  overflowX: "hidden",
1642
1642
  textOverflow: "ellipsis"
@@ -1645,20 +1645,20 @@ const re = {
1645
1645
  o("empty-state-cta-clicked"), F();
1646
1646
  }, F = () => {
1647
1647
  o("clear-search-input");
1648
- }, S = (f, L) => {
1648
+ }, S = (g, L) => {
1649
1649
  o("click:row", L);
1650
- }, O = (f) => {
1651
- o("sort", f);
1650
+ }, O = (g) => {
1651
+ o("sort", g);
1652
1652
  }, { setTablePreferences: E, getTablePreferences: l } = Kt(), y = I(() => {
1653
- const f = l(t.preferencesStorageKey);
1653
+ const g = l(t.preferencesStorageKey);
1654
1654
  return {
1655
1655
  ...t.initialFetcherParams,
1656
- ...f
1656
+ ...g
1657
1657
  };
1658
- }), b = (f) => {
1659
- t.preferencesStorageKey && E(t.preferencesStorageKey, f);
1658
+ }), b = (g) => {
1659
+ t.preferencesStorageKey && E(t.preferencesStorageKey, g);
1660
1660
  };
1661
- return (f, L) => {
1661
+ return (g, L) => {
1662
1662
  const m = U("KIcon"), q = U("KButton"), x = U("KDropdownMenu"), G = U("KTable"), D = U("KCard");
1663
1663
  return u(), H(D, {
1664
1664
  class: "kong-ui-entity-base-table",
@@ -1667,7 +1667,7 @@ const re = {
1667
1667
  body: c(() => [
1668
1668
  B(G, {
1669
1669
  ref_key: "tableRefs",
1670
- ref: g,
1670
+ ref: f,
1671
1671
  "cache-identifier": n.value,
1672
1672
  "cell-attrs": h,
1673
1673
  "disable-pagination-page-jump": e.disablePaginationPageJump,
@@ -1698,9 +1698,9 @@ const re = {
1698
1698
  }, Ce({
1699
1699
  toolbar: c(({ state: R }) => [
1700
1700
  Ae(V("div", Oa, [
1701
- X(f.$slots, "toolbar-filter", {}, void 0, !0),
1702
- f.$slots["toolbar-button"] ? (u(), P("div", La, [
1703
- X(f.$slots, "toolbar-button", {}, void 0, !0)
1701
+ X(g.$slots, "toolbar-filter", {}, void 0, !0),
1702
+ g.$slots["toolbar-button"] ? (u(), P("div", La, [
1703
+ X(g.$slots, "toolbar-button", {}, void 0, !0)
1704
1704
  ])) : Z("", !0)
1705
1705
  ], 512), [
1706
1706
  [Pe, r(R)]
@@ -1716,7 +1716,7 @@ const re = {
1716
1716
  width: e.dropdownMenuWidth
1717
1717
  }, {
1718
1718
  items: c(() => [
1719
- X(f.$slots, "actions", {
1719
+ X(g.$slots, "actions", {
1720
1720
  row: R,
1721
1721
  rowKey: d,
1722
1722
  rowValue: v
@@ -1752,7 +1752,7 @@ const re = {
1752
1752
  "row-el": $(v)
1753
1753
  }, {
1754
1754
  default: c(() => [
1755
- X(f.$slots, d, {
1755
+ X(g.$slots, d, {
1756
1756
  row: v,
1757
1757
  rowKey: _,
1758
1758
  rowValue: N
@@ -1820,7 +1820,7 @@ const re = {
1820
1820
  }, p = () => {
1821
1821
  o("proceed");
1822
1822
  };
1823
- return (w, g) => {
1823
+ return (w, f) => {
1824
1824
  const $ = U("KAlert"), h = U("KPrompt");
1825
1825
  return u(), H(h, {
1826
1826
  "action-button-text": "Yes, delete",
@@ -1949,15 +1949,15 @@ const re = {
1949
1949
  r.value[b] = y;
1950
1950
  });
1951
1951
  });
1952
- const g = () => {
1952
+ const f = () => {
1953
1953
  n.value = !n.value;
1954
1954
  }, $ = (l) => {
1955
1955
  o("update:modelValue", l);
1956
1956
  }, h = (l) => `filter-${l}`, k = (l) => {
1957
1957
  var y, b;
1958
- return (((b = (y = t.config.schema) == null ? void 0 : y[l]) == null ? void 0 : b.values) ?? []).map((f) => ({
1959
- value: f,
1960
- label: f
1958
+ return (((b = (y = t.config.schema) == null ? void 0 : y[l]) == null ? void 0 : b.values) ?? []).map((g) => ({
1959
+ value: g,
1960
+ label: g
1961
1961
  }));
1962
1962
  }, F = (l) => {
1963
1963
  var y, b;
@@ -1970,11 +1970,11 @@ const re = {
1970
1970
  }, O = () => {
1971
1971
  r.value = {}, E(!0);
1972
1972
  }, E = (l = !1) => {
1973
- const y = Object.keys(r.value).reduce((b, f) => (r.value[f] && (b[f] = `${r.value[f]}`), b), {});
1973
+ const y = Object.keys(r.value).reduce((b, g) => (r.value[g] && (b[g] = `${r.value[g]}`), b), {});
1974
1974
  l && (n.value = !1), o("update:modelValue", new URLSearchParams(y).toString());
1975
1975
  };
1976
1976
  return (l, y) => {
1977
- const b = U("KInput"), f = U("KButton"), L = U("KSelect"), m = U("KMenuItem"), q = U("KMenu");
1977
+ const b = U("KInput"), g = U("KButton"), L = U("KSelect"), m = U("KMenuItem"), q = U("KMenu");
1978
1978
  return e.config.isExactMatch ? (u(), H(b, {
1979
1979
  key: 0,
1980
1980
  autocomplete: "off",
@@ -1989,11 +1989,11 @@ const re = {
1989
1989
  ]),
1990
1990
  _: 1
1991
1991
  }, 8, ["model-value", "placeholder"])) : (u(), P("div", ao, [
1992
- B(f, {
1992
+ B(g, {
1993
1993
  appearance: "btn-link",
1994
1994
  "data-testid": "filter-button",
1995
1995
  icon: "filter",
1996
- onClick: g
1996
+ onClick: f
1997
1997
  }, {
1998
1998
  default: c(() => [
1999
1999
  W(T(s(a)("filter.filterButtonText")) + " " + T(p.value.length > 0 ? `(${p.value.length})` : ""), 1)
@@ -2002,7 +2002,7 @@ const re = {
2002
2002
  }),
2003
2003
  Ae(V("div", {
2004
2004
  class: "kong-ui-entity-filter-backdrop",
2005
- onClick: g
2005
+ onClick: f
2006
2006
  }, null, 512), [
2007
2007
  [Pe, n.value]
2008
2008
  ]),
@@ -2050,7 +2050,7 @@ const re = {
2050
2050
  }, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
2051
2051
  ]),
2052
2052
  V("div", lo, [
2053
- B(f, {
2053
+ B(g, {
2054
2054
  appearance: "btn-link",
2055
2055
  "data-testid": "apply-filter",
2056
2056
  size: "small",
@@ -2061,7 +2061,7 @@ const re = {
2061
2061
  ]),
2062
2062
  _: 1
2063
2063
  }),
2064
- B(f, {
2064
+ B(g, {
2065
2065
  appearance: "btn-link",
2066
2066
  "data-testid": "clear-filter",
2067
2067
  size: "small",
@@ -2079,7 +2079,7 @@ const re = {
2079
2079
  }, 1032, ["data-testid", "last-menu-item"]))), 128))
2080
2080
  ]),
2081
2081
  actionButton: c(() => [
2082
- B(f, { onClick: O }, {
2082
+ B(g, { onClick: O }, {
2083
2083
  default: c(() => [
2084
2084
  W(T(s(a)("filter.clearAllButtonText")), 1)
2085
2085
  ]),
@@ -2129,10 +2129,10 @@ const re = {
2129
2129
  }, mo = {
2130
2130
  key: 1,
2131
2131
  class: "form-section-description"
2132
- }, fo = {
2132
+ }, go = {
2133
2133
  key: 2,
2134
2134
  class: "form-section-footer"
2135
- }, go = { class: "form-section-content" }, yo = /* @__PURE__ */ te({
2135
+ }, fo = { class: "form-section-content" }, yo = /* @__PURE__ */ te({
2136
2136
  __name: "EntityFormSection",
2137
2137
  props: {
2138
2138
  title: {
@@ -2172,11 +2172,11 @@ const re = {
2172
2172
  V("p", null, T(e.description), 1)
2173
2173
  ], !0)
2174
2174
  ])) : Z("", !0),
2175
- s(o).footer ? (u(), P("div", fo, [
2175
+ s(o).footer ? (u(), P("div", go, [
2176
2176
  X(t.$slots, "footer", {}, void 0, !0)
2177
2177
  ])) : Z("", !0)
2178
2178
  ], 2)),
2179
- V("div", go, [
2179
+ V("div", fo, [
2180
2180
  X(t.$slots, "default", {}, void 0, !0)
2181
2181
  ])
2182
2182
  ])
@@ -2209,19 +2209,19 @@ const _o = { class: "add-to-group-form-container" }, ko = { class: "add-to-group
2209
2209
  }), r = A([]), {
2210
2210
  debouncedQueryChange: p,
2211
2211
  loading: w,
2212
- allRecords: g,
2212
+ allRecords: f,
2213
2213
  error: $,
2214
2214
  loadItems: h,
2215
2215
  results: k
2216
2216
  } = pt(
2217
2217
  t.config,
2218
- ge.list[t.config.app].all,
2218
+ fe.list[t.config.app].all,
2219
2219
  "",
2220
2220
  {
2221
2221
  fetchedItemsKey: "data",
2222
2222
  searchKeys: ["name", "id"]
2223
2223
  }
2224
- ), F = I(() => $.value ? a("consumer_groups.errors.general") : ""), S = A(0), O = I(() => g.value === void 0), E = I(() => k.value.map((d) => ({
2224
+ ), F = I(() => $.value ? a("consumer_groups.errors.general") : ""), S = A(0), O = I(() => f.value === void 0), E = I(() => k.value.map((d) => ({
2225
2225
  label: d.name,
2226
2226
  value: d.id,
2227
2227
  selected: r.value.includes(d.id),
@@ -2229,16 +2229,16 @@ const _o = { class: "add-to-group-form-container" }, ko = { class: "add-to-group
2229
2229
  // we need this to determine whether or not to show the description text
2230
2230
  }))), l = (d) => {
2231
2231
  var _;
2232
- const v = O.value ? k.value.find((N) => N.id === d) : (_ = g.value) == null ? void 0 : _.find((N) => N.id === d);
2232
+ const v = O.value ? k.value.find((N) => N.id === d) : (_ = f.value) == null ? void 0 : _.find((N) => N.id === d);
2233
2233
  return v ? v.name : d;
2234
2234
  }, y = () => {
2235
2235
  L.value = "", b.value = [], G.value = [], o("cancel");
2236
- }, b = A([]), f = A(!1), L = A(""), m = async () => {
2236
+ }, b = A([]), g = A(!1), L = A(""), m = async () => {
2237
2237
  if (!r.value.length) {
2238
2238
  L.value = "", G.value = [], o("cancel");
2239
2239
  return;
2240
2240
  }
2241
- f.value = !0, L.value = "", b.value = [], G.value = [];
2241
+ g.value = !0, L.value = "", b.value = [], G.value = [];
2242
2242
  try {
2243
2243
  const d = r.value.map((N) => x(N)), v = await Promise.allSettled(d);
2244
2244
  let _ = !0;
@@ -2248,11 +2248,11 @@ const _o = { class: "add-to-group-form-container" }, ko = { class: "add-to-group
2248
2248
  } catch {
2249
2249
  L.value = a("consumer_groups.errors.add"), o("error", L.value);
2250
2250
  } finally {
2251
- f.value = !1;
2251
+ g.value = !1;
2252
2252
  }
2253
2253
  }, q = I(() => {
2254
2254
  var v, _, N, ne;
2255
- let d = `${t.config.apiBaseUrl}${ge.list[t.config.app].forConsumer}`;
2255
+ let d = `${t.config.apiBaseUrl}${fe.list[t.config.app].forConsumer}`;
2256
2256
  return t.config.app === "konnect" ? d = d.replace(/{controlPlaneId}/gi, ((v = t.config) == null ? void 0 : v.controlPlaneId) || "").replace(/{consumerId}/gi, ((_ = t.config) == null ? void 0 : _.consumerId) || "") : t.config.app === "kongManager" && (d = d.replace(/\/{workspace}/gi, (N = t.config) != null && N.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((ne = t.config) == null ? void 0 : ne.consumerId) || "")), d;
2257
2257
  }), x = async (d) => {
2258
2258
  const v = {
@@ -2278,7 +2278,7 @@ const _o = { class: "add-to-group-form-container" }, ko = { class: "add-to-group
2278
2278
  }), (d, v) => {
2279
2279
  const _ = U("KMultiselect"), N = U("KAlert"), ne = U("KPrompt");
2280
2280
  return u(), H(ne, {
2281
- "action-pending": f.value,
2281
+ "action-pending": g.value,
2282
2282
  class: "kong-ui-entities-add-to-groups-modal",
2283
2283
  "data-testid": "add-to-group-modal",
2284
2284
  "is-visible": e.visible,
@@ -2299,7 +2299,7 @@ const _o = { class: "add-to-group-form-container" }, ko = { class: "add-to-group
2299
2299
  label: s(a)("consumer_groups.consumers.add.consumer_groups_label"),
2300
2300
  loading: s(w),
2301
2301
  placeholder: s(a)("consumer_groups.consumers.add.consumer_group_placeholder"),
2302
- readonly: f.value,
2302
+ readonly: g.value,
2303
2303
  required: "",
2304
2304
  width: "100%",
2305
2305
  onQueryChange: s(p)
@@ -2342,25 +2342,25 @@ const De = (e, o) => {
2342
2342
  type: String,
2343
2343
  default: ""
2344
2344
  },
2345
- /** An asynchronous function, that returns a boolean, that evaluates if the user can create a new entity */
2345
+ /** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can create a new entity */
2346
2346
  canCreate: {
2347
2347
  type: Function,
2348
2348
  required: !1,
2349
2349
  default: async () => !0
2350
2350
  },
2351
- /** An asynchronous function, that returns a boolean, that evaluates if the user can delete a given entity */
2351
+ /** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can delete a given entity */
2352
2352
  canDelete: {
2353
2353
  type: Function,
2354
2354
  required: !1,
2355
2355
  default: async () => !0
2356
2356
  },
2357
- /** An asynchronous function, that returns a boolean, that evaluates if the user can edit a given entity */
2357
+ /** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can edit a given entity */
2358
2358
  canEdit: {
2359
2359
  type: Function,
2360
2360
  required: !1,
2361
2361
  default: async () => !0
2362
2362
  },
2363
- /** An asynchronous function, that returns a boolean, that evaluates if the user can retrieve (view details) a given entity */
2363
+ /** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can retrieve (view details) a given entity */
2364
2364
  canRetrieve: {
2365
2365
  type: Function,
2366
2366
  required: !1,
@@ -2372,7 +2372,7 @@ const De = (e, o) => {
2372
2372
  var He;
2373
2373
  const t = e, { i18nT: a, i18n: { t: n } } = qe.useI18n(), r = je(), { axiosInstance: p } = Ne({
2374
2374
  headers: (He = t.config) == null ? void 0 : He.requestHeaders
2375
- }), w = A(1), g = I(() => !!t.config.consumerId), $ = I(() => t.config.app !== "kongManager" || !!t.config.disableSorting), h = {
2375
+ }), w = A(1), f = I(() => !!t.config.consumerId), $ = I(() => t.config.app !== "kongManager" || !!t.config.disableSorting), h = {
2376
2376
  name: { label: n("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
2377
2377
  };
2378
2378
  t.config.app === "kongManager" && (h.consumers_count = { label: n("consumer_groups.list.table_headers.consumers_count"), searchable: !1, sortable: !1 }), h.tags = { label: n("consumer_groups.list.table_headers.tags"), sortable: !1 };
@@ -2380,7 +2380,7 @@ const De = (e, o) => {
2380
2380
  "data-testid": C.username ?? C.custom_id ?? C.id
2381
2381
  }), S = I(() => {
2382
2382
  var J, ee, ie, ye;
2383
- let C = `${t.config.apiBaseUrl}${ge.list[t.config.app][g.value ? "forConsumer" : "all"]}`;
2383
+ let C = `${t.config.apiBaseUrl}${fe.list[t.config.app][f.value ? "forConsumer" : "all"]}`;
2384
2384
  return t.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((J = t.config) == null ? void 0 : J.controlPlaneId) || "").replace(/{consumerId}/gi, ((ee = t.config) == null ? void 0 : ee.consumerId) || "") : t.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (ie = t.config) != null && ie.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((ye = t.config) == null ? void 0 : ye.consumerId) || "")), C;
2385
2385
  }), O = A(""), E = I(() => {
2386
2386
  const C = t.config.app === "konnect" || t.config.isExactMatch;
@@ -2398,7 +2398,7 @@ const De = (e, o) => {
2398
2398
  },
2399
2399
  schema: t.config.filterSchema
2400
2400
  };
2401
- }), l = I(() => g.value ? "consumer_groups" : void 0), { fetcher: y, fetcherState: b } = bo(t.config, S.value, l.value), f = () => {
2401
+ }), l = I(() => f.value ? "consumer_groups" : void 0), { fetcher: y, fetcherState: b } = bo(t.config, S.value, l.value), g = () => {
2402
2402
  O.value = "";
2403
2403
  }, L = () => {
2404
2404
  w.value++;
@@ -2462,14 +2462,14 @@ const De = (e, o) => {
2462
2462
  }, K = (C, J) => {
2463
2463
  J || i(), w.value++, o("add:success", C);
2464
2464
  }, Y = () => {
2465
- g.value && Se();
2465
+ f.value && Se();
2466
2466
  }, M = A(void 0), j = A(!1), se = A(""), ce = (C) => {
2467
2467
  M.value = C, j.value = !0;
2468
2468
  }, ae = () => {
2469
2469
  j.value = !1, M.value = void 0;
2470
2470
  }, _e = I(() => {
2471
2471
  var J, ee, ie, ye;
2472
- let C = `${t.config.apiBaseUrl}${ge.list[t.config.app].oneForConsumer}`;
2472
+ let C = `${t.config.apiBaseUrl}${fe.list[t.config.app].oneForConsumer}`;
2473
2473
  return t.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((J = t.config) == null ? void 0 : J.controlPlaneId) || "").replace(/{consumerId}/gi, ((ee = t.config) == null ? void 0 : ee.consumerId) || "") : t.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (ie = t.config) != null && ie.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((ye = t.config) == null ? void 0 : ye.consumerId) || "")), C;
2474
2474
  }), $e = A(!1), mt = async () => {
2475
2475
  if (M.value) {
@@ -2492,19 +2492,19 @@ const De = (e, o) => {
2492
2492
  m.value = "";
2493
2493
  });
2494
2494
  const Re = A({
2495
- ctaPath: g.value ? void 0 : t.config.createRoute,
2495
+ ctaPath: f.value ? void 0 : t.config.createRoute,
2496
2496
  ctaText: void 0,
2497
2497
  message: n("consumer_groups.list.empty_state.description"),
2498
2498
  title: n("consumer_groups.title")
2499
2499
  });
2500
2500
  return Te(async () => {
2501
- await t.canCreate() && (Re.value.title = g.value ? n("consumer_groups.list.empty_state.title_for_consumer") : n("consumer_groups.list.empty_state.title"), Re.value.ctaText = g.value ? n("consumer_groups.actions.add_to_group") : n("consumer_groups.actions.create"));
2501
+ await t.canCreate() && (Re.value.title = f.value ? n("consumer_groups.list.empty_state.title_for_consumer") : n("consumer_groups.list.empty_state.title"), Re.value.ctaText = f.value ? n("consumer_groups.actions.add_to_group") : n("consumer_groups.actions.create"));
2502
2502
  }), (C, J) => {
2503
- const ee = U("KButton"), ie = U("KBadge"), ye = U("KTruncate"), xe = U("KDropdownItem"), Je = U("KClipboardProvider"), ft = U("KPrompt");
2503
+ const ee = U("KButton"), ie = U("KBadge"), ye = U("KTruncate"), xe = U("KDropdownItem"), Je = U("KClipboardProvider"), gt = U("KPrompt");
2504
2504
  return u(), P("div", $o, [
2505
2505
  B(s(Da), {
2506
2506
  "cache-identifier": e.cacheIdentifier,
2507
- "disable-pagination": g.value,
2507
+ "disable-pagination": f.value,
2508
2508
  "disable-pagination-page-jump": "",
2509
2509
  "disable-sorting": $.value,
2510
2510
  "empty-state-options": Re.value,
@@ -2517,13 +2517,13 @@ const De = (e, o) => {
2517
2517
  query: O.value,
2518
2518
  "row-attributes": F,
2519
2519
  "table-headers": s(k),
2520
- onClearSearchInput: f,
2520
+ onClearSearchInput: g,
2521
2521
  "onClick:row": J[3] || (J[3] = (z) => G(z)),
2522
2522
  onEmptyStateCtaClicked: Y,
2523
2523
  onSort: L
2524
2524
  }, {
2525
2525
  "toolbar-filter": c(() => [
2526
- g.value ? Z("", !0) : (u(), H(s(uo), {
2526
+ f.value ? Z("", !0) : (u(), H(s(uo), {
2527
2527
  key: 0,
2528
2528
  modelValue: O.value,
2529
2529
  "onUpdate:modelValue": J[0] || (J[0] = (z) => O.value = z),
@@ -2579,7 +2579,7 @@ const De = (e, o) => {
2579
2579
  default: c(({ copyToClipboard: ke }) => [
2580
2580
  B(xe, {
2581
2581
  "data-testid": "action-entity-copy-id",
2582
- onClick: (gt) => q(z, ke)
2582
+ onClick: (ft) => q(z, ke)
2583
2583
  }, {
2584
2584
  default: c(() => [
2585
2585
  W(T(s(n)("consumer_groups.actions.copy_id")), 1)
@@ -2593,7 +2593,7 @@ const De = (e, o) => {
2593
2593
  default: c(({ copyToClipboard: ke }) => [
2594
2594
  B(xe, {
2595
2595
  "data-testid": "action-entity-copy-json",
2596
- onClick: (gt) => x(z, ke)
2596
+ onClick: (ft) => x(z, ke)
2597
2597
  }, {
2598
2598
  default: c(() => [
2599
2599
  W(T(s(n)("consumer_groups.actions.copy_json")), 1)
@@ -2668,7 +2668,7 @@ const De = (e, o) => {
2668
2668
  "onAdd:success": J[5] || (J[5] = (z) => K(z)),
2669
2669
  onCancel: i
2670
2670
  }, null, 8, ["config", "visible"])) : Z("", !0),
2671
- e.config.consumerId && M.value ? (u(), H(ft, {
2671
+ e.config.consumerId && M.value ? (u(), H(gt, {
2672
2672
  key: 1,
2673
2673
  "data-testid": "exit-group-modal",
2674
2674
  "is-visible": j.value,
@@ -2704,7 +2704,7 @@ const De = (e, o) => {
2704
2704
  };
2705
2705
  }
2706
2706
  });
2707
- const Lo = /* @__PURE__ */ De(To, [["__scopeId", "data-v-3e0f738f"]]), Ko = { class: "kong-ui-entities-consumer-group-form" }, Bo = { class: "select-item-label" }, Ao = {
2707
+ const Lo = /* @__PURE__ */ De(To, [["__scopeId", "data-v-80c4522c"]]), Ko = { class: "kong-ui-entities-consumer-group-form" }, Bo = { class: "select-item-label" }, Ao = {
2708
2708
  key: 0,
2709
2709
  class: "select-item-desc"
2710
2710
  }, Po = /* @__PURE__ */ te({
@@ -2740,11 +2740,11 @@ const Lo = /* @__PURE__ */ De(To, [["__scopeId", "data-v-3e0f738f"]]), Ko = { cl
2740
2740
  consumers: []
2741
2741
  }), {
2742
2742
  debouncedQueryChange: w,
2743
- loading: g,
2743
+ loading: f,
2744
2744
  error: $,
2745
2745
  loadItems: h,
2746
2746
  results: k
2747
- } = pt(t.config, (be = ge.form[(Ke = t.config) == null ? void 0 : Ke.app]) == null ? void 0 : be.consumersList, "", {
2747
+ } = pt(t.config, (be = fe.form[(Ke = t.config) == null ? void 0 : Ke.app]) == null ? void 0 : be.consumersList, "", {
2748
2748
  fetchedItemsKey: "data",
2749
2749
  searchKeys: ["username", "custom_id"]
2750
2750
  }), { axiosInstance: F } = Ne({
@@ -2757,10 +2757,10 @@ const Lo = /* @__PURE__ */ De(To, [["__scopeId", "data-v-3e0f738f"]]), Ko = { cl
2757
2757
  // we need this to determine whether or not to show the description text
2758
2758
  }))), E = I(() => {
2759
2759
  var i, K;
2760
- return (K = ge.form[(i = t.config) == null ? void 0 : i.app]) == null ? void 0 : K.edit;
2761
- }), l = I(() => t.consumerGroupId ? Me.Edit : Me.Create), y = I(() => !!r.fields.name && !G.value), b = I(() => JSON.stringify(r.fields) !== JSON.stringify(p)), f = (i, K = "", Y = "") => {
2760
+ return (K = fe.form[(i = t.config) == null ? void 0 : i.app]) == null ? void 0 : K.edit;
2761
+ }), l = I(() => t.consumerGroupId ? Me.Edit : Me.Create), y = I(() => !!r.fields.name && !G.value), b = I(() => JSON.stringify(r.fields) !== JSON.stringify(p)), g = (i, K = "", Y = "") => {
2762
2762
  var j, se, ce, ae, _e, $e;
2763
- let M = `${(j = t.config) == null ? void 0 : j.apiBaseUrl}${ge.form[(se = t.config) == null ? void 0 : se.app][i]}`;
2763
+ let M = `${(j = t.config) == null ? void 0 : j.apiBaseUrl}${fe.form[(se = t.config) == null ? void 0 : se.app][i]}`;
2764
2764
  return ((ce = t.config) == null ? void 0 : ce.app) === "konnect" ? M = M.replace(/{controlPlaneId}/gi, ((ae = t.config) == null ? void 0 : ae.controlPlaneId) || "") : ((_e = t.config) == null ? void 0 : _e.app) === "kongManager" && (M = M.replace(/\/{workspace}/gi, ($e = t.config) != null && $e.workspace ? `/${t.config.workspace}` : "")), M = M.replace(/{id}/gi, K || t.consumerGroupId), (i === "addConsumer" || i === "removeConsumer") && (M = M.replace(/{consumerId}/gi, Y)), M;
2765
2765
  }, L = () => {
2766
2766
  var i;
@@ -2777,7 +2777,7 @@ const Lo = /* @__PURE__ */ De(To, [["__scopeId", "data-v-3e0f738f"]]), Ko = { cl
2777
2777
  r.fields.consumers = ((se = i == null ? void 0 : i.consumers) == null ? void 0 : se.map((ae) => ae.id)) || [];
2778
2778
  else
2779
2779
  try {
2780
- const { data: ae } = await F.get(f("getConsumers"));
2780
+ const { data: ae } = await F.get(g("getConsumers"));
2781
2781
  r.fields.consumers = "consumers" in ae ? (ce = ae == null ? void 0 : ae.consumers) == null ? void 0 : ce.map((_e) => _e.id) : [];
2782
2782
  } catch (ae) {
2783
2783
  v(ae);
@@ -2789,7 +2789,7 @@ const Lo = /* @__PURE__ */ De(To, [["__scopeId", "data-v-3e0f738f"]]), Ko = { cl
2789
2789
  name: r.fields.name,
2790
2790
  tags: (K = (i = r.fields.tags.split(",")) == null ? void 0 : i.map((Y) => String(Y || "").trim())) == null ? void 0 : K.filter((Y) => Y !== "")
2791
2791
  };
2792
- }, R = async (i, K = "") => await F.post(f("addConsumer", K, i), { consumer: i }), d = async (i, K = "") => await F.delete(f("removeConsumer", K, i)), v = (i) => {
2792
+ }, R = async (i, K = "") => await F.post(g("addConsumer", K, i), { consumer: i }), d = async (i, K = "") => await F.delete(g("removeConsumer", K, i)), v = (i) => {
2793
2793
  r.errorMessage = S(i), o("error", i);
2794
2794
  }, _ = (i = t.consumerGroupId) => {
2795
2795
  Object.assign(p, r.fields), o("update", { ...r.fields, id: i });
@@ -2802,7 +2802,7 @@ const Lo = /* @__PURE__ */ De(To, [["__scopeId", "data-v-3e0f738f"]]), Ko = { cl
2802
2802
  }, ne = async () => {
2803
2803
  let i = "";
2804
2804
  try {
2805
- const { data: K } = await F.post(f("create"), D());
2805
+ const { data: K } = await F.post(g("create"), D());
2806
2806
  i = "item" in K ? K.item.id : K.id;
2807
2807
  } catch (K) {
2808
2808
  v(K);
@@ -2819,7 +2819,7 @@ const Lo = /* @__PURE__ */ De(To, [["__scopeId", "data-v-3e0f738f"]]), Ko = { cl
2819
2819
  }, oe = async () => {
2820
2820
  var Y;
2821
2821
  try {
2822
- ((Y = t.config) == null ? void 0 : Y.app) === "konnect" ? await F.put(f("edit"), D()) : await F.patch(f("edit"), D());
2822
+ ((Y = t.config) == null ? void 0 : Y.app) === "konnect" ? await F.put(g("edit"), D()) : await F.patch(g("edit"), D());
2823
2823
  } catch (M) {
2824
2824
  v(M);
2825
2825
  }
@@ -2916,7 +2916,7 @@ const Lo = /* @__PURE__ */ De(To, [["__scopeId", "data-v-3e0f738f"]]), Ko = { cl
2916
2916
  "expand-selected": "",
2917
2917
  items: O.value,
2918
2918
  label: s(a)("consumer_groups.form.fields.consumers.label"),
2919
- loading: s(g),
2919
+ loading: s(f),
2920
2920
  placeholder: s(a)("consumer_groups.form.fields.consumers.placeholder"),
2921
2921
  width: "auto",
2922
2922
  onQueryChange: s(w)
@@ -2959,7 +2959,7 @@ const Go = /* @__PURE__ */ De(Po, [["__scopeId", "data-v-2da12897"]]), Mo = { cl
2959
2959
  },
2960
2960
  emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
2961
2961
  setup(e) {
2962
- const o = e, { i18n: { t } } = qe.useI18n(), a = I(() => ge.form[o.config.app].edit), n = A({
2962
+ const o = e, { i18n: { t } } = qe.useI18n(), a = I(() => fe.form[o.config.app].edit), n = A({
2963
2963
  id: {},
2964
2964
  name: {},
2965
2965
  created_at: {},