@kong-ui-public/entities-consumer-credentials 1.1.26 → 1.1.27

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,9 +1,9 @@
1
- import { defineComponent as Z, ref as C, computed as $, watch as ae, renderSlot as U, createCommentVNode as H, unref as f, resolveComponent as P, openBlock as x, createBlock as L, withCtx as s, createVNode as p, createSlots as ye, withDirectives as ke, createElementVNode as G, createElementBlock as W, vShow as Se, renderList as fe, createTextVNode as D, toDisplayString as N, onMounted as Te, onUnmounted as Ie, onBeforeMount as Ae, Fragment as Ke, withModifiers as Ne } from "vue";
1
+ import { defineComponent as Z, ref as C, computed as x, watch as ae, renderSlot as U, createCommentVNode as H, unref as f, resolveComponent as P, openBlock as $, createBlock as R, withCtx as s, createVNode as p, createSlots as ye, withDirectives as ke, createElementVNode as V, createElementBlock as W, vShow as Se, renderList as fe, createTextVNode as O, toDisplayString as N, onMounted as Te, onUnmounted as Ie, onBeforeMount as Ae, Fragment as Ke, withModifiers as Ne } from "vue";
2
2
  import { createI18n as he, i18nTComponent as ge } from "@kong-ui-public/i18n";
3
- import xe from "axios";
3
+ import $e from "axios";
4
4
  import "@kong/kongponents";
5
5
  import "vue-router";
6
- const $e = {
6
+ const xe = {
7
7
  title: "Consumer Credentials",
8
8
  list: {
9
9
  toolbar_actions: {
@@ -145,7 +145,7 @@ const $e = {
145
145
  success_brief: "Successfully copied to clipboard"
146
146
  }
147
147
  }, Ee = {
148
- credentials: $e
148
+ credentials: xe
149
149
  };
150
150
  function Pe() {
151
151
  const e = he("en-us", Ee);
@@ -163,17 +163,17 @@ const Be = {
163
163
  kongManager: "/{workspace}/consumers/{consumerId}/{plugin}"
164
164
  }
165
165
  };
166
- var me = /* @__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))(me || {}), V = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(V || {});
166
+ var me = /* @__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))(me || {}), G = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(G || {});
167
167
  function ne(e = {}) {
168
168
  return {
169
- axiosInstance: xe.create({
169
+ axiosInstance: $e.create({
170
170
  withCredentials: !0,
171
171
  timeout: 3e4,
172
172
  ...e
173
173
  })
174
174
  };
175
175
  }
176
- function De() {
176
+ function Oe() {
177
177
  return {
178
178
  debounce: (e, n) => {
179
179
  let t;
@@ -185,12 +185,12 @@ function De() {
185
185
  }
186
186
  };
187
187
  }
188
- const ee = "khcp-user-table-preferences", Oe = {
188
+ const ee = "khcp-user-table-preferences", De = {
189
189
  pageSize: 30,
190
190
  sortColumnKey: void 0,
191
191
  sortColumnOrder: void 0
192
192
  };
193
- function Re() {
193
+ function Fe() {
194
194
  const e = (t) => {
195
195
  if (typeof t == "string")
196
196
  try {
@@ -214,7 +214,7 @@ function Re() {
214
214
  },
215
215
  getTablePreferences: (t) => {
216
216
  const a = n();
217
- return (a == null ? void 0 : a.get(t)) || void 0 || Oe;
217
+ return (a == null ? void 0 : a.get(t)) || void 0 || De;
218
218
  },
219
219
  deleteAllTablePreferences: () => {
220
220
  localStorage.removeItem(ee);
@@ -224,7 +224,7 @@ function Re() {
224
224
  const qe = {
225
225
  message: "Are you sure you want to delete this {entityType}?",
226
226
  messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
227
- }, Fe = {
227
+ }, Me = {
228
228
  actions: {
229
229
  save: "Save",
230
230
  cancel: "Cancel",
@@ -233,13 +233,13 @@ const qe = {
233
233
  errors: {
234
234
  edit: "The entity could not be edited at this time."
235
235
  }
236
- }, Me = {
236
+ }, Le = {
237
237
  emptyState: {
238
238
  noSearchResultsTitle: "No results found",
239
239
  noSearchResultsMessage: "Please adjust the criteria and try again.",
240
240
  noSearchResultsCtaText: "Clear"
241
241
  }
242
- }, Le = {
242
+ }, Re = {
243
243
  title: "Configuration",
244
244
  actions: {
245
245
  copy: "Copy JSON"
@@ -302,9 +302,9 @@ const qe = {
302
302
  }
303
303
  }, Je = {
304
304
  deleteModal: qe,
305
- baseForm: Fe,
306
- baseTable: Me,
307
- baseConfigCard: Le,
305
+ baseForm: Me,
306
+ baseTable: Le,
307
+ baseConfigCard: Re,
308
308
  filter: Ue,
309
309
  debouncedFilter: He,
310
310
  errors: We,
@@ -318,14 +318,14 @@ function re() {
318
318
  // Translation component <i18n-t>
319
319
  };
320
320
  }
321
- function Ve(e, n, t, a = {
321
+ function Ge(e, n, t, a = {
322
322
  fetchedItemsKey: "data",
323
323
  searchKeys: ["id"]
324
324
  }) {
325
325
  t || (t = "100");
326
326
  const { axiosInstance: l } = ne({
327
327
  headers: e.requestHeaders
328
- }), { i18n: { t: r } } = re(), { debounce: u } = De(), S = u(async (I) => {
328
+ }), { i18n: { t: r } } = re(), { debounce: u } = Oe(), S = u(async (I) => {
329
329
  await E(I);
330
330
  }, 200), g = C(!1), d = C(""), _ = C(""), h = C([]), K = C(void 0), w = f(n);
331
331
  let T = `${e.apiBaseUrl}${w}`;
@@ -376,8 +376,8 @@ function Ve(e, n, t, a = {
376
376
  debouncedQueryChange: S
377
377
  };
378
378
  }
379
- function Ge(e, n) {
380
- const t = f(n), a = $(
379
+ function Ve(e, n) {
380
+ const t = f(n), a = x(
381
381
  () => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
382
382
  );
383
383
  return a.value.search = "", (l) => `${a.value.href}/${l}`;
@@ -411,9 +411,9 @@ function Xe() {
411
411
  };
412
412
  }
413
413
  function be(e, n) {
414
- const t = C(f(e)), a = C(f(n)), l = $(
414
+ const t = C(f(e)), a = C(f(n)), l = x(
415
415
  () => !!(t.value.app === "konnect" || t.value.isExactMatch)
416
- ), r = $(
416
+ ), r = x(
417
417
  () => a.value.startsWith("/") ? new URL(`${window.location.origin}${a.value}`) : new URL(a.value)
418
418
  );
419
419
  return (u) => {
@@ -432,11 +432,11 @@ function Ye(e, n, t = "data") {
432
432
  const a = f(n), { axiosInstance: l } = ne({
433
433
  headers: e.requestHeaders
434
434
  }), r = be(e, a), u = C({
435
- status: V.Idle
435
+ status: G.Idle
436
436
  });
437
437
  return { fetcher: async (S) => {
438
438
  try {
439
- u.value = { status: V.Loading };
439
+ u.value = { status: G.Loading };
440
440
  const g = r(S), { data: d } = await l.get(g), _ = t && t.replace(/[^\w-_]/gi, "");
441
441
  let h;
442
442
  d[_] && Array.isArray(d[_]) ? h = d[_] : h = Object.keys(d).length ? [d] : [];
@@ -450,7 +450,7 @@ function Ye(e, n, t = "data") {
450
450
  } : null
451
451
  };
452
452
  return u.value = {
453
- status: V.Idle,
453
+ status: G.Idle,
454
454
  response: K
455
455
  }, K;
456
456
  } catch (g) {
@@ -459,11 +459,11 @@ function Ye(e, n, t = "data") {
459
459
  total: 0
460
460
  };
461
461
  return S.query && g.response.status === 404 ? (u.value = {
462
- status: V.NoResults,
462
+ status: G.NoResults,
463
463
  response: d,
464
464
  error: g
465
465
  }, d) : (u.value = {
466
- status: V.Error,
466
+ status: G.Error,
467
467
  response: d,
468
468
  error: g
469
469
  }, d);
@@ -532,8 +532,8 @@ function rt(e) {
532
532
  }
533
533
  const se = {
534
534
  useAxios: ne,
535
- useDebouncedFilter: Ve,
536
- useDeleteUrlBuilder: Ge,
535
+ useDebouncedFilter: Ge,
536
+ useDeleteUrlBuilder: Ve,
537
537
  useErrors: Xe,
538
538
  useFetcher: Ye,
539
539
  useFetchUrlBuilder: be,
@@ -558,13 +558,13 @@ const se = {
558
558
  }
559
559
  },
560
560
  setup(e) {
561
- const n = e, t = $(() => {
561
+ const n = e, t = x(() => {
562
562
  var y;
563
563
  return ((y = n.rowEl) == null ? void 0 : y.querySelector(`[data-testid="${n.keyName}"]`)) || null;
564
- }), a = $(() => {
564
+ }), a = x(() => {
565
565
  var y;
566
566
  return ((y = t.value) == null ? void 0 : y.querySelector('[role="button"]')) || null;
567
- }), l = $(() => {
567
+ }), l = x(() => {
568
568
  var y, k;
569
569
  const E = (y = n.rowEl) == null ? void 0 : y.querySelectorAll("td");
570
570
  return E ? ((k = E[0]) == null ? void 0 : k.getAttribute("data-testid")) === n.keyName : !1;
@@ -575,7 +575,7 @@ const se = {
575
575
  }, S = () => {
576
576
  var y, k, E;
577
577
  d.value = ((y = a.value) == null ? void 0 : y.getBoundingClientRect().width) || 0, _.value = ((k = t.value) == null ? void 0 : k.clientWidth) || 0, h.value = ((E = g.value) == null ? void 0 : E.innerText) || "";
578
- }, g = C({}), d = C(0), _ = C(0), h = C(""), K = $(() => [a.value, t.value]), w = ae(
578
+ }, g = C({}), d = C(0), _ = C(0), h = C(""), K = x(() => [a.value, t.value]), w = ae(
579
579
  K,
580
580
  (y) => {
581
581
  if (l.value && (u(), "ResizeObserver" in window && window)) {
@@ -589,19 +589,19 @@ const se = {
589
589
  }
590
590
  },
591
591
  { immediate: !0, flush: "post", deep: !0 }
592
- ), T = $(() => l.value ? d.value > _.value : !1);
592
+ ), T = x(() => l.value ? d.value > _.value : !1);
593
593
  return Te(() => {
594
594
  S();
595
595
  }), Ie(() => {
596
596
  w();
597
597
  }), (y, k) => {
598
598
  const E = P("KTooltip");
599
- return x(), W("span", {
599
+ return $(), W("span", {
600
600
  ref_key: "contentRef",
601
601
  ref: g,
602
602
  class: "content-wrapper"
603
603
  }, [
604
- l.value ? (x(), W("span", lt, [
604
+ l.value ? ($(), W("span", lt, [
605
605
  p(E, {
606
606
  disabled: !T.value,
607
607
  label: h.value,
@@ -724,7 +724,7 @@ const se = {
724
724
  },
725
725
  emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
726
726
  setup(e, { emit: n }) {
727
- const t = e, { i18n: { t: a } } = se.useI18n(), l = $(() => t.cacheIdentifier || t.preferencesStorageKey), r = (i) => i.hasData || !!t.query, u = $(() => {
727
+ const t = e, { i18n: { t: a } } = se.useI18n(), l = x(() => t.cacheIdentifier || t.preferencesStorageKey), r = (i) => i.hasData || !!t.query, u = x(() => {
728
728
  const i = [];
729
729
  return Object.keys(t.tableHeaders).forEach((b) => {
730
730
  const A = t.tableHeaders[b];
@@ -762,7 +762,7 @@ const se = {
762
762
  n("click:row", b);
763
763
  }, T = (i) => {
764
764
  n("sort", i);
765
- }, { setTablePreferences: y, getTablePreferences: k } = Re(), E = $(() => {
765
+ }, { setTablePreferences: y, getTablePreferences: k } = Fe(), E = x(() => {
766
766
  const i = k(t.preferencesStorageKey);
767
767
  return {
768
768
  ...t.initialFetcherParams,
@@ -773,7 +773,7 @@ const se = {
773
773
  };
774
774
  return (i, b) => {
775
775
  const A = P("KIcon"), B = P("KButton"), X = P("KDropdownMenu"), z = P("KTable"), Y = P("KCard");
776
- return x(), L(Y, {
776
+ return $(), R(Y, {
777
777
  class: "kong-ui-entity-base-table",
778
778
  title: e.title
779
779
  }, {
@@ -806,23 +806,23 @@ const se = {
806
806
  "search-input": e.query,
807
807
  onKtableEmptyStateCtaClicked: h,
808
808
  "onRow:click": w,
809
- onSort: b[0] || (b[0] = (R) => T(R)),
809
+ onSort: b[0] || (b[0] = (F) => T(F)),
810
810
  "onUpdate:tablePreferences": I
811
811
  }, ye({
812
- toolbar: s(({ state: R }) => [
813
- ke(G("div", ct, [
812
+ toolbar: s(({ state: F }) => [
813
+ ke(V("div", ct, [
814
814
  U(i.$slots, "toolbar-filter", {}, void 0, !0),
815
- i.$slots["toolbar-button"] ? (x(), W("div", dt, [
815
+ i.$slots["toolbar-button"] ? ($(), W("div", dt, [
816
816
  U(i.$slots, "toolbar-button", {}, void 0, !0)
817
817
  ])) : H("", !0)
818
818
  ], 512), [
819
- [Se, r(R)]
819
+ [Se, r(F)]
820
820
  ])
821
821
  ]),
822
- actions: s(({ row: R, rowKey: J, rowValue: F }) => [
823
- G("div", {
822
+ actions: s(({ row: F, rowKey: J, rowValue: M }) => [
823
+ V("div", {
824
824
  class: "actions-container",
825
- "data-testid": R.name
825
+ "data-testid": F.name
826
826
  }, [
827
827
  p(X, {
828
828
  "kpop-attributes": { placement: "bottomEnd" },
@@ -830,9 +830,9 @@ const se = {
830
830
  }, {
831
831
  items: s(() => [
832
832
  U(i.$slots, "actions", {
833
- row: R,
833
+ row: F,
834
834
  rowKey: J,
835
- rowValue: F
835
+ rowValue: M
836
836
  }, void 0, !0)
837
837
  ]),
838
838
  default: s(() => [
@@ -857,20 +857,20 @@ const se = {
857
857
  ]),
858
858
  _: 2
859
859
  }, [
860
- fe(e.tableHeaders, (R, J) => ({
860
+ fe(e.tableHeaders, (F, J) => ({
861
861
  name: J,
862
- fn: s(({ row: F, rowKey: o, rowValue: v }) => [
862
+ fn: s(({ row: M, rowKey: o, rowValue: v }) => [
863
863
  p(ot, {
864
864
  "key-name": String(J),
865
- "row-el": d(F)
865
+ "row-el": d(M)
866
866
  }, {
867
867
  default: s(() => [
868
868
  U(i.$slots, J, {
869
- row: F,
869
+ row: M,
870
870
  rowKey: o,
871
871
  rowValue: v
872
872
  }, () => [
873
- D(N(v), 1)
873
+ O(N(v), 1)
874
874
  ], !0)
875
875
  ]),
876
876
  _: 2
@@ -928,14 +928,14 @@ const se = {
928
928
  },
929
929
  emits: ["cancel", "proceed"],
930
930
  setup(e, { emit: n }) {
931
- const t = e, { i18nT: a } = se.useI18n(), l = $(() => t.needConfirm ? t.entityName : ""), r = () => {
931
+ const t = e, { i18nT: a } = se.useI18n(), l = x(() => t.needConfirm ? t.entityName : ""), r = () => {
932
932
  n("cancel");
933
933
  }, u = () => {
934
934
  n("proceed");
935
935
  };
936
936
  return (S, g) => {
937
937
  const d = P("KAlert"), _ = P("KPrompt");
938
- return x(), L(_, {
938
+ return $(), R(_, {
939
939
  "action-button-text": "Yes, delete",
940
940
  "action-pending": e.actionPending,
941
941
  class: "kong-ui-entity-delete-modal",
@@ -947,10 +947,10 @@ const se = {
947
947
  onProceed: u
948
948
  }, {
949
949
  "body-content": s(() => [
950
- e.error ? (x(), W("div", ft, [
950
+ e.error ? ($(), W("div", ft, [
951
951
  p(d, { appearance: "danger" }, {
952
952
  alertMessage: s(() => [
953
- D(N(e.error), 1)
953
+ O(N(e.error), 1)
954
954
  ]),
955
955
  _: 1
956
956
  })
@@ -961,21 +961,21 @@ const se = {
961
961
  tag: "p"
962
962
  }, ye({
963
963
  entityType: s(() => [
964
- D(N(t.entityType), 1)
964
+ O(N(t.entityType), 1)
965
965
  ]),
966
966
  _: 2
967
967
  }, [
968
968
  t.entityName ? {
969
969
  name: "entityName",
970
970
  fn: s(() => [
971
- G("strong", null, N(t.entityName), 1)
971
+ V("strong", null, N(t.entityName), 1)
972
972
  ]),
973
973
  key: "0"
974
974
  } : void 0
975
975
  ]), 1032, ["keypath"]),
976
- t.description || S.$slots.description ? (x(), W("div", ht, [
976
+ t.description || S.$slots.description ? ($(), W("div", ht, [
977
977
  U(S.$slots, "description", {}, () => [
978
- G("p", null, N(t.description), 1)
978
+ V("p", null, N(t.description), 1)
979
979
  ], !0)
980
980
  ])) : H("", !0)
981
981
  ]),
@@ -1005,7 +1005,7 @@ const se = {
1005
1005
  }
1006
1006
  },
1007
1007
  setup(e) {
1008
- const n = e, t = C(void 0), a = $(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
1008
+ const n = e, t = C(void 0), a = x(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
1009
1009
  return ae(() => n.authFunction, async () => {
1010
1010
  t.value = await n.authFunction();
1011
1011
  }, { immediate: !0 }), (l, r) => a.value ? U(l.$slots, "default", {
@@ -1013,7 +1013,7 @@ const se = {
1013
1013
  isAllowed: t.value
1014
1014
  }) : H("", !0);
1015
1015
  }
1016
- }), { useAxios: bt, useDeleteUrlBuilder: vt, useErrors: xt, useFetchUrlBuilder: $t, useFetcher: Ct, useDebouncedFilter: Et, useStringHelpers: Pt, useGatewayFeatureSupported: Bt } = se;
1016
+ }), { useAxios: bt, useDeleteUrlBuilder: vt, useErrors: $t, useFetchUrlBuilder: xt, useFetcher: Ct, useDebouncedFilter: Et, useStringHelpers: Pt, useGatewayFeatureSupported: Bt } = se;
1017
1017
  const _t = { class: "kong-ui-entities-consumer-credentials-list" }, wt = { key: 1 }, kt = /* @__PURE__ */ Z({
1018
1018
  __name: "ConsumerCredentialList",
1019
1019
  props: {
@@ -1092,21 +1092,21 @@ const _t = { class: "kong-ui-entities-consumer-credentials-list" }, wt = { key:
1092
1092
  created_at: { label: a("credentials.list.table_headers.jwt.created_at") },
1093
1093
  tags: { label: a("credentials.list.table_headers.jwt.tags") }
1094
1094
  }
1095
- }, g = $(() => S[t.config.plugin]), d = $(() => {
1095
+ }, g = x(() => S[t.config.plugin]), d = x(() => {
1096
1096
  let o = `${t.config.apiBaseUrl}${je.list[t.config.app]}`;
1097
1097
  return t.config.app === "konnect" ? o = o.replace(/{controlPlaneId}/gi, t.config.controlPlaneId || "").replace(/{consumerId}/gi, t.config.consumerId || "").replace(/{plugin}/gi, t.config.plugin || "") : t.config.app === "kongManager" && (o = o.replace(/\/{workspace}/gi, t.config.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, t.config.consumerId || "").replace(/{plugin}/gi, t.config.plugin || "")), o;
1098
1098
  }), { fetcher: _, fetcherState: h } = Ct(t.config, d), K = () => {
1099
1099
  u.value++;
1100
1100
  }, w = C(""), T = (o, v, q) => {
1101
- const O = v ? o[v] : JSON.stringify(o);
1102
- if (!q(O)) {
1101
+ const D = v ? o[v] : JSON.stringify(o);
1102
+ if (!q(D)) {
1103
1103
  E(o, v);
1104
1104
  return;
1105
1105
  }
1106
1106
  k(o, v);
1107
1107
  }, y = (o, v, q) => {
1108
- const { type: O } = o;
1109
- O === "success" ? k(v, q) : E(v, q);
1108
+ const { type: D } = o;
1109
+ D === "success" ? k(v, q) : E(v, q);
1110
1110
  }, k = (o, v) => {
1111
1111
  n("copy:success", {
1112
1112
  entity: o,
@@ -1122,9 +1122,9 @@ const _t = { class: "kong-ui-entities-consumer-credentials-list" }, wt = { key:
1122
1122
  }, I = (o) => ({
1123
1123
  label: a("credentials.actions.edit"),
1124
1124
  to: t.config.getEditRoute(o)
1125
- }), i = C(void 0), b = C(!1), A = C(!1), B = C(""), X = vt(t.config, d.value), z = $(() => me[t.config.plugin]), Y = (o) => {
1125
+ }), i = C(void 0), b = C(!1), A = C(!1), B = C(""), X = vt(t.config, d.value), z = x(() => me[t.config.plugin]), Y = (o) => {
1126
1126
  i.value = o, b.value = !0;
1127
- }, R = () => {
1127
+ }, F = () => {
1128
1128
  b.value = !1;
1129
1129
  }, J = async () => {
1130
1130
  var o, v, q;
@@ -1132,36 +1132,36 @@ const _t = { class: "kong-ui-entities-consumer-credentials-list" }, wt = { key:
1132
1132
  A.value = !0;
1133
1133
  try {
1134
1134
  await r.delete(X(i.value.id)), A.value = !1, b.value = !1, u.value++, n("delete:success", i.value);
1135
- } catch (O) {
1136
- B.value = ((q = (v = O.response) == null ? void 0 : v.data) == null ? void 0 : q.message) || O.message || a("credentials.error.delete"), n("error", O);
1135
+ } catch (D) {
1136
+ B.value = ((q = (v = D.response) == null ? void 0 : v.data) == null ? void 0 : q.message) || D.message || a("credentials.error.delete"), n("error", D);
1137
1137
  } finally {
1138
1138
  A.value = !1;
1139
1139
  }
1140
1140
  }
1141
1141
  };
1142
1142
  ae(h, (o) => {
1143
- if (o.status === V.Error) {
1143
+ if (o.status === G.Error) {
1144
1144
  w.value = a("credentials.error.general"), n("error", o.error);
1145
1145
  return;
1146
1146
  }
1147
1147
  w.value = "";
1148
1148
  });
1149
- const F = C({
1149
+ const M = C({
1150
1150
  ctaPath: t.config.createRoute,
1151
1151
  ctaText: void 0,
1152
1152
  message: "",
1153
1153
  title: a("credentials.title")
1154
1154
  });
1155
1155
  return Ae(async () => {
1156
- await t.canCreate() && (F.value.title = a(`credentials.list.empty_state.${t.config.plugin}.title`), F.value.ctaText = a(`credentials.list.empty_state.${t.config.plugin}.cta`));
1156
+ await t.canCreate() && (M.value.title = a(`credentials.list.empty_state.${t.config.plugin}.title`), M.value.ctaText = a(`credentials.list.empty_state.${t.config.plugin}.cta`));
1157
1157
  }), (o, v) => {
1158
- const q = P("KButton"), O = P("CopyUuid"), _e = P("KBadge"), we = P("KTruncate"), M = P("KDropdownItem"), Q = P("KClipboardProvider");
1159
- return x(), W("div", _t, [
1158
+ const q = P("KButton"), D = P("CopyUuid"), _e = P("KBadge"), we = P("KTruncate"), L = P("KDropdownItem"), Q = P("KClipboardProvider");
1159
+ return $(), W("div", _t, [
1160
1160
  p(f(yt), {
1161
1161
  "cache-identifier": e.cacheIdentifier,
1162
1162
  "disable-pagination-page-jump": "",
1163
1163
  "disable-sorting": "",
1164
- "empty-state-options": F.value,
1164
+ "empty-state-options": M.value,
1165
1165
  "enable-entity-actions": "",
1166
1166
  "error-message": w.value,
1167
1167
  fetcher: f(_),
@@ -1183,7 +1183,7 @@ const _t = { class: "kong-ui-entities-consumer-credentials-list" }, wt = { key:
1183
1183
  to: e.config.createRoute
1184
1184
  }, {
1185
1185
  default: s(() => [
1186
- D(N(f(a)(`credentials.list.toolbar_actions.${e.config.plugin}.new`)), 1)
1186
+ O(N(f(a)(`credentials.list.toolbar_actions.${e.config.plugin}.new`)), 1)
1187
1187
  ]),
1188
1188
  _: 1
1189
1189
  }, 8, ["to"])
@@ -1192,127 +1192,127 @@ const _t = { class: "kong-ui-entities-consumer-credentials-list" }, wt = { key:
1192
1192
  }, 8, ["auth-function"])
1193
1193
  ]),
1194
1194
  group: s(({ rowValue: c }) => [
1195
- G("b", null, N(c ?? "-"), 1)
1195
+ V("b", null, N(c ?? "-"), 1)
1196
1196
  ]),
1197
1197
  name: s(({ rowValue: c }) => [
1198
- G("b", null, N(c ?? "-"), 1)
1198
+ V("b", null, N(c ?? "-"), 1)
1199
1199
  ]),
1200
1200
  username: s(({ rowValue: c }) => [
1201
- G("span", null, N(c ?? "-"), 1)
1201
+ V("span", null, N(c ?? "-"), 1)
1202
1202
  ]),
1203
1203
  password: s(({ row: c, rowValue: m }) => [
1204
- p(O, {
1204
+ p(D, {
1205
1205
  format: "redacted",
1206
1206
  notify: (j) => y(j, c, "password"),
1207
1207
  uuid: m
1208
1208
  }, null, 8, ["notify", "uuid"])
1209
1209
  ]),
1210
1210
  key: s(({ row: c, rowValue: m }) => [
1211
- p(O, {
1211
+ p(D, {
1212
1212
  format: "redacted",
1213
1213
  notify: (j) => y(j, c, "key"),
1214
1214
  uuid: m
1215
1215
  }, null, 8, ["notify", "uuid"])
1216
1216
  ]),
1217
1217
  client_secret: s(({ row: c, rowValue: m }) => [
1218
- p(O, {
1218
+ p(D, {
1219
1219
  format: "redacted",
1220
1220
  notify: (j) => y(j, c, "client_secret"),
1221
1221
  uuid: m
1222
1222
  }, null, 8, ["notify", "uuid"])
1223
1223
  ]),
1224
1224
  secret: s(({ row: c, rowValue: m }) => [
1225
- p(O, {
1225
+ p(D, {
1226
1226
  format: "redacted",
1227
1227
  notify: (j) => y(j, c, "secret"),
1228
1228
  uuid: m
1229
1229
  }, null, 8, ["notify", "uuid"])
1230
1230
  ]),
1231
1231
  created_at: s(({ rowValue: c }) => [
1232
- D(N(f(l)(c)), 1)
1232
+ O(N(f(l)(c)), 1)
1233
1233
  ]),
1234
1234
  tags: s(({ rowValue: c }) => [
1235
- (c == null ? void 0 : c.length) > 0 ? (x(), L(we, { key: 0 }, {
1235
+ (c == null ? void 0 : c.length) > 0 ? ($(), R(we, { key: 0 }, {
1236
1236
  default: s(() => [
1237
- (x(!0), W(Ke, null, fe(c, (m) => (x(), L(_e, {
1237
+ ($(!0), W(Ke, null, fe(c, (m) => ($(), R(_e, {
1238
1238
  key: m,
1239
1239
  onClick: v[0] || (v[0] = Ne(() => {
1240
1240
  }, ["stop"]))
1241
1241
  }, {
1242
1242
  default: s(() => [
1243
- D(N(m), 1)
1243
+ O(N(m), 1)
1244
1244
  ]),
1245
1245
  _: 2
1246
1246
  }, 1024))), 128))
1247
1247
  ]),
1248
1248
  _: 2
1249
- }, 1024)) : (x(), W("span", wt, "-"))
1249
+ }, 1024)) : ($(), W("span", wt, "-"))
1250
1250
  ]),
1251
1251
  actions: s(({ row: c }) => [
1252
1252
  p(Q, null, {
1253
1253
  default: s(({ copyToClipboard: m }) => [
1254
- p(M, {
1254
+ p(L, {
1255
1255
  "data-testid": "action-entity-copy-id",
1256
1256
  onClick: (j) => T(c, "id", m)
1257
1257
  }, {
1258
1258
  default: s(() => [
1259
- D(N(f(a)("credentials.actions.copy_id")), 1)
1259
+ O(N(f(a)("credentials.actions.copy_id")), 1)
1260
1260
  ]),
1261
1261
  _: 2
1262
1262
  }, 1032, ["onClick"])
1263
1263
  ]),
1264
1264
  _: 2
1265
1265
  }, 1024),
1266
- e.config.plugin === "basic-auth" ? (x(), L(Q, { key: 0 }, {
1266
+ e.config.plugin === "basic-auth" ? ($(), R(Q, { key: 0 }, {
1267
1267
  default: s(({ copyToClipboard: m }) => [
1268
- p(M, {
1268
+ p(L, {
1269
1269
  "data-testid": "action-entity-copy-credential",
1270
1270
  onClick: (j) => T(c, "password", m)
1271
1271
  }, {
1272
1272
  default: s(() => [
1273
- D(N(f(a)("credentials.actions.copy_credential")), 1)
1273
+ O(N(f(a)("credentials.actions.copy_credential")), 1)
1274
1274
  ]),
1275
1275
  _: 2
1276
1276
  }, 1032, ["onClick"])
1277
1277
  ]),
1278
1278
  _: 2
1279
1279
  }, 1024)) : H("", !0),
1280
- ["key-auth", "key-auth-enc", "jwt"].includes(e.config.plugin) ? (x(), L(Q, { key: 1 }, {
1280
+ ["key-auth", "key-auth-enc", "jwt"].includes(e.config.plugin) ? ($(), R(Q, { key: 1 }, {
1281
1281
  default: s(({ copyToClipboard: m }) => [
1282
- p(M, {
1282
+ p(L, {
1283
1283
  "data-testid": "action-entity-copy-key",
1284
1284
  onClick: (j) => T(c, "key", m)
1285
1285
  }, {
1286
1286
  default: s(() => [
1287
- D(N(f(a)("credentials.actions.copy_key")), 1)
1287
+ O(N(f(a)("credentials.actions.copy_key")), 1)
1288
1288
  ]),
1289
1289
  _: 2
1290
1290
  }, 1032, ["onClick"])
1291
1291
  ]),
1292
1292
  _: 2
1293
1293
  }, 1024)) : H("", !0),
1294
- e.config.plugin === "oauth2" ? (x(), L(Q, { key: 2 }, {
1294
+ e.config.plugin === "oauth2" ? ($(), R(Q, { key: 2 }, {
1295
1295
  default: s(({ copyToClipboard: m }) => [
1296
- p(M, {
1296
+ p(L, {
1297
1297
  "data-testid": "action-entity-copy-secret",
1298
1298
  onClick: (j) => T(c, "client_secret", m)
1299
1299
  }, {
1300
1300
  default: s(() => [
1301
- D(N(f(a)("credentials.actions.copy_secret")), 1)
1301
+ O(N(f(a)("credentials.actions.copy_secret")), 1)
1302
1302
  ]),
1303
1303
  _: 2
1304
1304
  }, 1032, ["onClick"])
1305
1305
  ]),
1306
1306
  _: 2
1307
1307
  }, 1024)) : H("", !0),
1308
- e.config.plugin === "hmac-auth" ? (x(), L(Q, { key: 3 }, {
1308
+ e.config.plugin === "hmac-auth" ? ($(), R(Q, { key: 3 }, {
1309
1309
  default: s(({ copyToClipboard: m }) => [
1310
- p(M, {
1310
+ p(L, {
1311
1311
  "data-testid": "action-entity-copy-secret",
1312
1312
  onClick: (j) => T(c, "secret", m)
1313
1313
  }, {
1314
1314
  default: s(() => [
1315
- D(N(f(a)("credentials.actions.copy_secret")), 1)
1315
+ O(N(f(a)("credentials.actions.copy_secret")), 1)
1316
1316
  ]),
1317
1317
  _: 2
1318
1318
  }, 1032, ["onClick"])
@@ -1321,12 +1321,12 @@ const _t = { class: "kong-ui-entities-consumer-credentials-list" }, wt = { key:
1321
1321
  }, 1024)) : H("", !0),
1322
1322
  p(Q, null, {
1323
1323
  default: s(({ copyToClipboard: m }) => [
1324
- p(M, {
1324
+ p(L, {
1325
1325
  "data-testid": "action-entity-copy-json",
1326
1326
  onClick: (j) => T(c, void 0, m)
1327
1327
  }, {
1328
1328
  default: s(() => [
1329
- D(N(f(a)("credentials.actions.copy_json")), 1)
1329
+ O(N(f(a)("credentials.actions.copy_json")), 1)
1330
1330
  ]),
1331
1331
  _: 2
1332
1332
  }, 1032, ["onClick"])
@@ -1337,7 +1337,7 @@ const _t = { class: "kong-ui-entities-consumer-credentials-list" }, wt = { key:
1337
1337
  "auth-function": () => e.canEdit(c)
1338
1338
  }, {
1339
1339
  default: s(() => [
1340
- p(M, {
1340
+ p(L, {
1341
1341
  "data-testid": "action-entity-edit",
1342
1342
  "has-divider": "",
1343
1343
  item: I(c.id)
@@ -1349,14 +1349,14 @@ const _t = { class: "kong-ui-entities-consumer-credentials-list" }, wt = { key:
1349
1349
  "auth-function": () => e.canDelete(c)
1350
1350
  }, {
1351
1351
  default: s(() => [
1352
- p(M, {
1352
+ p(L, {
1353
1353
  "data-testid": "action-entity-delete",
1354
1354
  "has-divider": "",
1355
1355
  "is-dangerous": "",
1356
1356
  onClick: (m) => Y(c)
1357
1357
  }, {
1358
1358
  default: s(() => [
1359
- D(N(f(a)("credentials.actions.delete")), 1)
1359
+ O(N(f(a)("credentials.actions.delete")), 1)
1360
1360
  ]),
1361
1361
  _: 2
1362
1362
  }, 1032, ["onClick"])
@@ -1373,7 +1373,7 @@ const _t = { class: "kong-ui-entities-consumer-credentials-list" }, wt = { key:
1373
1373
  error: B.value,
1374
1374
  title: f(a)(`credentials.delete.${e.config.plugin}.title`),
1375
1375
  visible: b.value,
1376
- onCancel: R,
1376
+ onCancel: F,
1377
1377
  onProceed: J
1378
1378
  }, null, 8, ["action-pending", "description", "entity-type", "error", "title", "visible"])
1379
1379
  ]);
@@ -1 +1 @@
1
- (function(E,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/i18n"),require("axios"),require("@kong/kongponents"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n","axios","@kong/kongponents","vue-router"],e):(E=typeof globalThis<"u"?globalThis:E||self,e(E["kong-ui-public-entities-consumer-credentials"]={},E.Vue,E["kong-ui-public-i18n"],E.axios))})(this,function(E,e,L,re){"use strict";const oe={credentials:{title:"Consumer Credentials",list:{toolbar_actions:{acls:{new:"New ACL Credential"},"basic-auth":{new:"New Basic Auth Credential"},"key-auth":{new:"New Key Auth Credential"},"key-auth-enc":{new:"New Key Auth Encrypted Credential"},oauth2:{new:"New OAuth 2.0 Credential"},"hmac-auth":{new:"New HMAC Credential"},jwt:{new:"New JWT Credential"}},table_headers:{acls:{group:"Group",created_at:"Created At",tags:"Tags"},"basic-auth":{password:"Credential",username:"Username",created_at:"Created at",tags:"Tags"},"key-auth":{key:"Key",created_at:"Created at",tags:"Tags"},"key-auth-enc":{key:"Key",created_at:"Created at",tags:"Tags"},oauth2:{name:"Name",client_id:"Client ID",client_secret:"Client secret",created_at:"Created at",tags:"Tags"},"hmac-auth":{username:"Username",secret:"Secret",created_at:"Created at",tags:"Tags"},jwt:{key:"Key",algorithm:"Algorithm",created_at:"Created at",tags:"Tags"}},empty_state:{acls:{title:"Configure a New ACL Credential",cta:"New ACL Credential"},"basic-auth":{title:"Configure a New Basic Auth Credential",cta:"New Basic Auth Credential"},"key-auth":{title:"Configure a New Key Auth Credential",cta:"New Key Auth Credential"},"key-auth-enc":{title:"Configure a New Key Auth Encrypted Credential",cta:"New Key Auth Encrypted Credential"},oauth2:{title:"Configure a New OAuth 2.0 Credential",cta:"New OAuth 2.0 Credential"},"hmac-auth":{title:"Configure a New HMAC Credential",cta:"New HMAC Credential"},jwt:{title:"Configure a New JWT Credential",cta:"New JWT Credential"}}},actions:{copy_id:"Copy ID",copy_credential:"Copy Credential",copy_key:"Copy Key",copy_secret:"Copy Secret",copy_json:"Copy JSON",edit:"Edit",delete:"Delete"},delete:{acls:{title:"Delete an ACL Credential"},"basic-auth":{title:"Delete a Basic Auth Credential"},"key-auth":{title:"Delete a Key Auth Credential"},"key-auth-enc":{title:"Delete a Key Auth Encrypted Credential"},oauth2:{title:"Delete an OAuth 2.0 Credential"},"hmac-auth":{title:"Delete an HMAC Credential"},jwt:{title:"Delete a JWT Credential"},description:"This action cannot be reversed."},error:{general:"Credentials could not be retrieved",delete:"The credential could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}}};function ie(){const t=L.createI18n("en-us",oe);return{i18n:t,i18nT:L.i18nTComponent(t)}}const le={useI18n:ie},se={list:{konnect:"/api/runtime_groups/{controlPlaneId}/consumers/{consumerId}/{plugin}",kongManager:"/{workspace}/consumers/{consumerId}/{plugin}"}};var G=(t=>(t.GatewayService="service",t.Route="route",t.Consumer="consumer",t.ConsumerGroup="consumer group",t.Plugin="plugin",t.Upstream="upstream",t.Certificate="certificate",t.CACertificate="ca certificate",t.SNI="SNI",t.Key="key",t.KeySet="key set",t.Vault="vault",t.Application="application",t.Developer="developer",t.acls="ACL Credential",t["basic-auth"]="Basic Auth Credential",t["key-auth"]="Key Auth Credential",t["key-auth-enc"]="Key Auth Encrypted Credential",t.oauth2="OAuth 2.0 Credential",t["hmac-auth"]="HMAC Credential",t.jwt="JWT Credential",t.Target="target",t.Policy="policy",t))(G||{}),P=(t=>(t[t.Loading=0]="Loading",t[t.Idle=1]="Idle",t[t.NoResults=2]="NoResults",t[t.Error=3]="Error",t))(P||{});function F(t={}){return{axiosInstance:re.create({withCredentials:!0,timeout:3e4,...t})}}function ce(){return{debounce:(t,r)=>{let a;return(...n)=>{clearTimeout(a),a=window==null?void 0:window.setTimeout(()=>{t(...n)},r)}}}}const U="khcp-user-table-preferences",de={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function ue(){const t=a=>{if(typeof a=="string")try{return JSON.parse(a)}catch(n){console.error("useTablePreferences(tryParseJson)",n);return}},r=()=>{const a=t(localStorage.getItem(U));return!a||!Object.keys(a).length?new Map:new Map(Object.entries(a))};return{setTablePreferences:(a,n)=>{try{const i=r();i.set(a,n),localStorage.setItem(U,JSON.stringify(Object.fromEntries(i.entries())))}catch(i){console.error("useTablePreferences(setTablePreferences)",i)}},getTablePreferences:a=>{const n=r();return(n==null?void 0:n.get(a))||void 0||de},deleteAllTablePreferences:()=>{localStorage.removeItem(U)}}}const pe={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},ye={actions:{save:"Save",cancel:"Cancel",back:"Back"},errors:{edit:"The entity could not be edited at this time."}},fe={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},he={title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}"}},ge={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},me={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},be={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Ce={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},we={deleteModal:pe,baseForm:ye,baseTable:fe,baseConfigCard:he,filter:ge,debouncedFilter:me,errors:be,toggleModal:Ce};function H(){const t=L.createI18n("en-us",we);return{i18n:t,i18nT:L.i18nTComponent(t)}}function ke(t,r,a,n={fetchedItemsKey:"data",searchKeys:["id"]}){a||(a="100");const{axiosInstance:i}=F({headers:t.requestHeaders}),{i18n:{t:o}}=H(),{debounce:u}=ce(),k=u(async S=>{await T(S)},200),f=e.ref(!1),d=e.ref(""),b=e.ref(""),y=e.ref([]),N=e.ref(void 0),C=e.unref(r);let _=`${t.apiBaseUrl}${C}`;t.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,(t==null?void 0:t.controlPlaneId)||""):t.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,t!=null&&t.workspace?`/${t.workspace}`:""));const p=async()=>{try{f.value=!0;const{data:S}=await i.get(`${_}?size=${a}`);S!=null&&S.next||(N.value=n.fetchedItemsKey in S?S[n.fetchedItemsKey]:[]),y.value=n.fetchedItemsKey in S?S[n.fetchedItemsKey]:[]}catch{y.value=[],d.value=o("debouncedFilter.errors.fetch")}finally{f.value=!1}},w=e.ref(""),T=async S=>{var l,g;if(w.value!==S)if(w.value=S||"",N.value===void 0)try{f.value=!0,d.value="",b.value="";let x=_+"";S&&(x+=`/${S}`);const{data:B}=await i.get(`${x}?size=${a}`);n.fetchedItemsKey in B?y.value=B[n.fetchedItemsKey]:B!=null&&B.id?y.value=[B]:y.value=[]}catch(x){((l=x==null?void 0:x.response)==null?void 0:l.status)===404?b.value=o("debouncedFilter.errors.invalid"):(y.value=[],d.value=o("debouncedFilter.errors.fetch"))}finally{f.value=!1}else f.value=!0,b.value="",S?(y.value=(g=N.value)==null?void 0:g.filter(x=>{var B;let O=!1;for(const j of n.searchKeys){const M=typeof x[j]=="string"?(B=x[j])==null?void 0:B.toLowerCase():x[j];M!=null&&M.includes(S.toLowerCase())&&(O=!0)}return O}),(!y.value||!y.value.length)&&(b.value=o("debouncedFilter.errors.invalid"))):y.value=N.value,f.value=!1};return{loading:f,error:d,validationError:b,results:y,allRecords:N,loadItems:p,debouncedQueryChange:k}}function _e(t,r){const a=e.unref(r),n=e.computed(()=>t.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${a}`):new URL(a));return n.value.search="",i=>`${n.value.href}/${i}`}function Se(){const{i18n:{t}}=H();return{getMessageFromError:r=>{var a,n,i;if(!r)return t("errors.unexpected");if((a=r==null?void 0:r.response)!=null&&a.data){if(r.response.data.detail)return r.response.data.detail;if((n=r.response.data.details)!=null&&n.length)return r.response.data.details.map(o=>{let u=t("errors.unexpected");return o.messages&&typeof o.messages=="object"&&o.messages.length&&(u=o.messages.join(", ")),o.field?`${o.field} - ${u}`:u}).join("; ");if(r.response.data.message){const{message:o}=r.response.data;return Array.isArray(o)?(i=o[0])!=null&&i.constraints?Object.values(o[0].constraints)[0]:o[0]:o}if(typeof r.response.data=="string")return r.response.data;if(typeof r.response.data=="object")return Object.keys(r.response.data).map(o=>`${o} ${r.response.data[o]}`).join(", ")}return r.message||t("errors.unexpected")}}}function X(t,r){const a=e.ref(e.unref(t)),n=e.ref(e.unref(r)),i=e.computed(()=>!!(a.value.app==="konnect"||a.value.isExactMatch)),o=e.computed(()=>n.value.startsWith("/")?new URL(`${window.location.origin}${n.value}`):new URL(n.value));return u=>{const{page:k,pageSize:f,offset:d,sortColumnKey:b,sortColumnOrder:y,query:N}=u;try{let C=new URL(o.value.href);return i.value&&N?(C.search="",C=new URL(`${C.href}/${N}/`)):(i.value||new URLSearchParams(N).forEach((_,p)=>{C.searchParams.append(p,_)}),b&&C.searchParams.append("sort_by",b),y==="desc"&&C.searchParams.append("sort_desc","1"),C.searchParams.append("size",String(f))),d&&k!==1&&C.searchParams.append("offset",String(d)),C.href}catch(C){return console.error("RouteList(fetcher)",C),n.value}}}function xe(t,r,a="data"){const n=e.unref(r),{axiosInstance:i}=F({headers:t.requestHeaders}),o=X(t,n),u=e.ref({status:P.Idle});return{fetcher:async k=>{try{u.value={status:P.Loading};const f=o(k),{data:d}=await i.get(f),b=a&&a.replace(/[^\w-_]/gi,"");let y;d[b]&&Array.isArray(d[b])?y=d[b]:y=Object.keys(d).length?[d]:[];const N={data:y,total:y.length,...d.offset?{pagination:{offset:d.offset}}:null};return u.value={status:P.Idle,response:N},N}catch(f){const d={data:[],total:0};return k.query&&f.response.status===404?(u.value={status:P.NoResults,response:d,error:f},d):(u.value={status:P.Error,response:d,error:f},d)}},fetcherState:u}}function Ne(){return{convertKeyToTitle:(t,r="_")=>t?t.split(r).map(a=>a.toLowerCase()==="id"?a.toUpperCase():a.charAt(0).toUpperCase()+a.substring(1)).join(" "):""}}const Y=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Q=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");const r=t.match(Y);if(!r)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return r.shift(),r},Z=t=>t==="*"||t==="x"||t==="X",v=t=>{const r=parseInt(t,10);return isNaN(r)?t:r},Te=(t,r)=>typeof t!=typeof r?[String(t),String(r)]:[t,r],Be=(t,r)=>{if(Z(t)||Z(r))return 0;const[a,n]=Te(v(t),v(r));return a>n?1:a<n?-1:0},ee=(t,r)=>{for(let a=0;a<Math.max(t.length,r.length);a++){const n=Be(t[a]||"0",r[a]||"0");if(n!==0)return n}return 0},Ie=(t,r)=>{const a=Q(t),n=Q(r),i=a.pop(),o=n.pop(),u=ee(a,n);return u!==0?u:i&&o?ee(i.split("."),o.split(".")):i||o?i?-1:1:0},te=(t,r,a)=>{Ae(a);const n=Ie(t,r);return ae[a].includes(n)},ae={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ne=Object.keys(ae),Ae=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(ne.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${ne.join("|")}`)},Ee=t=>typeof t=="string"&&/^[v\d]/.test(t)&&Y.test(t);function Ke(t){const{gatewayInfo:r,supportedRange:a}=t;if(!r)return!0;const{edition:n,version:i}=r;if(!Ee(i))return console.error("Invalid version"),!1;const o=a[n];if(!o)return!1;const[u,k]=o;return!(u&&te(i,u,"<")||k&&te(i,k,">"))}const W={useAxios:F,useDebouncedFilter:ke,useDeleteUrlBuilder:_e,useErrors:Se,useFetcher:xe,useFetchUrlBuilder:X,useStringHelpers:Ne,useI18n:H,useGatewayFeatureSupported:Ke},z=(t,r)=>{const a=t.__vccOpts||t;for(const[n,i]of r)a[n]=i;return a},Ve="#3a3f51",De={key:0},$e=z(e.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(t){const r=t,a=e.computed(()=>{var p;return((p=r.rowEl)==null?void 0:p.querySelector(`[data-testid="${r.keyName}"]`))||null}),n=e.computed(()=>{var p;return((p=a.value)==null?void 0:p.querySelector('[role="button"]'))||null}),i=e.computed(()=>{var p,w;const T=(p=r.rowEl)==null?void 0:p.querySelectorAll("td");return T?((w=T[0])==null?void 0:w.getAttribute("data-testid"))===r.keyName:!1});let o;const u=()=>{o&&(o.disconnect(),o=void 0)},k=()=>{var p,w,T;d.value=((p=n.value)==null?void 0:p.getBoundingClientRect().width)||0,b.value=((w=a.value)==null?void 0:w.clientWidth)||0,y.value=((T=f.value)==null?void 0:T.innerText)||""},f=e.ref({}),d=e.ref(0),b=e.ref(0),y=e.ref(""),N=e.computed(()=>[n.value,a.value]),C=e.watch(N,p=>{if(i.value&&(u(),"ResizeObserver"in window&&window)){o=new ResizeObserver(w=>{window.requestAnimationFrame(()=>{!Array.isArray(w)||!w.length||k()})});for(const w of p)w&&o.observe(w)}},{immediate:!0,flush:"post",deep:!0}),_=e.computed(()=>i.value?d.value>b.value:!1);return e.onMounted(()=>{k()}),e.onUnmounted(()=>{C()}),(p,w)=>{const T=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{ref_key:"contentRef",ref:f,class:"content-wrapper"},[i.value?(e.openBlock(),e.createElementBlock("span",De,[e.createVNode(T,{disabled:!_.value,label:y.value,"max-width":"300",placement:"bottomStart"},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default",{},void 0,!0)]),_:3},8,["disabled","label"])])):e.renderSlot(p.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-f8a220e9"]]),Pe={class:"toolbar-container"},je={key:0,class:"toolbar-button-container"},qe=["data-testid"],Oe=z(e.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:String,default:""},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(t,{emit:r}){const a=t,{i18n:{t:n}}=W.useI18n(),i=e.computed(()=>a.cacheIdentifier||a.preferencesStorageKey),o=l=>l.hasData||!!a.query,u=e.computed(()=>{const l=[];return Object.keys(a.tableHeaders).forEach(g=>{const x=a.tableHeaders[g];l.push({label:x.label??g,key:g,sortable:x.sortable??!1})}),a.enableEntityActions&&l.push({key:"actions",hideLabel:!0}),l}),k=l=>({"data-rowid":l.id,"data-testid":l.name,...a.rowAttributes(l)}),f=e.ref({}),d=l=>{var g;return(g=f.value)==null?void 0:g.$el.querySelector(`[data-rowid="${l.id}"]`)},b=l=>{const g={"data-testid":l.headerKey,...a.cellAttributes(l)};return l.colIndex===0&&(g.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),g},y=()=>{r("empty-state-cta-clicked"),N()},N=()=>{r("clear-search-input")},C=(l,g)=>{r("click:row",g)},_=l=>{r("sort",l)},{setTablePreferences:p,getTablePreferences:w}=ue(),T=e.computed(()=>{const l=w(a.preferencesStorageKey);return{...a.initialFetcherParams,...l}}),S=l=>{a.preferencesStorageKey&&p(a.preferencesStorageKey,l)};return(l,g)=>{const x=e.resolveComponent("KIcon"),B=e.resolveComponent("KButton"),O=e.resolveComponent("KDropdownMenu"),j=e.resolveComponent("KTable"),M=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(M,{class:"kong-ui-entity-base-table",title:t.title},{body:e.withCtx(()=>[e.createVNode(j,{ref_key:"tableRefs",ref:f,"cache-identifier":i.value,"cell-attrs":b,"disable-pagination-page-jump":t.disablePaginationPageJump,"disable-sorting":t.disableSorting,"empty-state-action-button-icon":t.query?"":"plus","empty-state-action-message":t.query?e.unref(n)("baseTable.emptyState.noSearchResultsCtaText"):t.emptyStateOptions.ctaText,"empty-state-action-route":t.query?"":t.emptyStateOptions.ctaPath,"empty-state-icon":t.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":t.query?e.unref(n)("baseTable.emptyState.noSearchResultsMessage"):t.emptyStateOptions.message,"empty-state-title":t.query?e.unref(n)("baseTable.emptyState.noSearchResultsTitle"):t.emptyStateOptions.title,"enable-client-sort":t.enableClientSort,"error-state-title":t.errorMessage,fetcher:t.fetcher,"fetcher-cache-key":String(t.fetcherCacheKey),"has-error":!!t.errorMessage,headers:u.value,"hide-pagination-when-optional":"","initial-fetcher-params":T.value,"is-loading":t.isLoading,"pagination-type":t.paginationType,"row-attrs":k,"search-input":t.query,onKtableEmptyStateCtaClicked:y,"onRow:click":C,onSort:g[0]||(g[0]=K=>_(K)),"onUpdate:tablePreferences":S},e.createSlots({toolbar:e.withCtx(({state:K})=>[e.withDirectives(e.createElementVNode("div",Pe,[e.renderSlot(l.$slots,"toolbar-filter",{},void 0,!0),l.$slots["toolbar-button"]?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(l.$slots,"toolbar-button",{},void 0,!0)])):e.createCommentVNode("",!0)],512),[[e.vShow,o(K)]])]),actions:e.withCtx(({row:K,rowKey:q,rowValue:D})=>[e.createElementVNode("div",{class:"actions-container","data-testid":K.name},[e.createVNode(O,{"kpop-attributes":{placement:"bottomEnd"},width:t.dropdownMenuWidth},{items:e.withCtx(()=>[e.renderSlot(l.$slots,"actions",{row:K,rowKey:q,rowValue:D},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(B,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:e.withCtx(()=>[e.createVNode(x,{color:e.unref(Ve),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,qe)]),_:2},[e.renderList(t.tableHeaders,(K,q)=>({name:q,fn:e.withCtx(({row:D,rowKey:s,rowValue:m})=>[e.createVNode($e,{"key-name":String(q),"row-el":d(D)},{default:e.withCtx(()=>[e.renderSlot(l.$slots,q,{row:D,rowKey:s,rowValue:m},()=>[e.createTextVNode(e.toDisplayString(m),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-a598b1d9"]]),Me={key:0,class:"kong-ui-entity-delete-error"},Re={key:1,class:"description"},Le=z(e.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(t,{emit:r}){const a=t,{i18nT:n}=W.useI18n(),i=e.computed(()=>a.needConfirm?a.entityName:""),o=()=>{r("cancel")},u=()=>{r("proceed")};return(k,f)=>{const d=e.resolveComponent("KAlert"),b=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(b,{"action-button-text":"Yes, delete","action-pending":t.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":i.value,"is-visible":t.visible,title:t.title,type:"danger",onCanceled:o,onProceed:u},{"body-content":e.withCtx(()=>[t.error?(e.openBlock(),e.createElementBlock("div",Me,[e.createVNode(d,{appearance:"danger"},{alertMessage:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.error),1)]),_:1})])):e.createCommentVNode("",!0),e.createVNode(e.unref(n),{class:"message",keypath:a.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},e.createSlots({entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.entityType),1)]),_:2},[a.entityName?{name:"entityName",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(a.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),a.description||k.$slots.description?(e.openBlock(),e.createElementBlock("div",Re,[e.renderSlot(k.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(a.description),1)],!0)])):e.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),J=e.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(t){const r=t,a=e.ref(void 0),n=e.computed(()=>a.value===!0||a.value!==void 0&&r.forceShow===!0);return e.watch(()=>r.authFunction,async()=>{a.value=await r.authFunction()},{immediate:!0}),(i,o)=>n.value?e.renderSlot(i.$slots,"default",{key:0,isAllowed:a.value}):e.createCommentVNode("",!0)}}),{useAxios:Fe,useDeleteUrlBuilder:Ue,useErrors:tt,useFetchUrlBuilder:at,useFetcher:He,useDebouncedFilter:nt,useStringHelpers:rt,useGatewayFeatureSupported:ot}=W,it="",We={class:"kong-ui-entities-consumer-credentials-list"},ze={key:1},Je=e.defineComponent({__name:"ConsumerCredentialList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getEditRoute)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0}},emits:["error","copy:success","copy:error","delete:success"],setup(t,{emit:r}){const a=t,{i18n:{t:n,formatUnixTimeStamp:i}}=le.useI18n(),{axiosInstance:o}=Fe({headers:a.config.requestHeaders}),u=e.ref(1),k={acls:{group:{label:n("credentials.list.table_headers.acls.group")},created_at:{label:n("credentials.list.table_headers.acls.created_at")},tags:{label:n("credentials.list.table_headers.acls.tags")}},"basic-auth":{password:{label:n("credentials.list.table_headers.basic-auth.password")},username:{label:n("credentials.list.table_headers.basic-auth.username")},created_at:{label:n("credentials.list.table_headers.basic-auth.created_at")},tags:{label:n("credentials.list.table_headers.basic-auth.tags")}},"key-auth":{key:{label:n("credentials.list.table_headers.key-auth.key")},created_at:{label:n("credentials.list.table_headers.key-auth.created_at")},tags:{label:n("credentials.list.table_headers.key-auth.tags")}},"key-auth-enc":{key:{label:n("credentials.list.table_headers.key-auth-enc.key")},created_at:{label:n("credentials.list.table_headers.key-auth-enc.created_at")},tags:{label:n("credentials.list.table_headers.key-auth-enc.tags")}},oauth2:{name:{label:n("credentials.list.table_headers.oauth2.name")},client_id:{label:n("credentials.list.table_headers.oauth2.client_id")},client_secret:{label:n("credentials.list.table_headers.oauth2.client_secret")},created_at:{label:n("credentials.list.table_headers.oauth2.created_at")},tags:{label:n("credentials.list.table_headers.oauth2.tags")}},"hmac-auth":{username:{label:n("credentials.list.table_headers.hmac-auth.username")},secret:{label:n("credentials.list.table_headers.hmac-auth.secret")},created_at:{label:n("credentials.list.table_headers.hmac-auth.created_at")},tags:{label:n("credentials.list.table_headers.hmac-auth.tags")}},jwt:{key:{label:n("credentials.list.table_headers.jwt.key")},algorithm:{label:n("credentials.list.table_headers.jwt.algorithm")},created_at:{label:n("credentials.list.table_headers.jwt.created_at")},tags:{label:n("credentials.list.table_headers.jwt.tags")}}},f=e.computed(()=>k[a.config.plugin]),d=e.computed(()=>{let s=`${a.config.apiBaseUrl}${se.list[a.config.app]}`;return a.config.app==="konnect"?s=s.replace(/{controlPlaneId}/gi,a.config.controlPlaneId||"").replace(/{consumerId}/gi,a.config.consumerId||"").replace(/{plugin}/gi,a.config.plugin||""):a.config.app==="kongManager"&&(s=s.replace(/\/{workspace}/gi,a.config.workspace?`/${a.config.workspace}`:"").replace(/{consumerId}/gi,a.config.consumerId||"").replace(/{plugin}/gi,a.config.plugin||"")),s}),{fetcher:b,fetcherState:y}=He(a.config,d),N=()=>{u.value++},C=e.ref(""),_=(s,m,V)=>{const A=m?s[m]:JSON.stringify(s);if(!V(A)){T(s,m);return}w(s,m)},p=(s,m,V)=>{const{type:A}=s;A==="success"?w(m,V):T(m,V)},w=(s,m)=>{r("copy:success",{entity:s,field:m,message:m?n("credentials.copy.success",{val:s[m]}):n("credentials.copy.success_brief")})},T=(s,m)=>{r("copy:error",{entity:s,field:m,message:n("credentials.error.copy")})},S=s=>({label:n("credentials.actions.edit"),to:a.config.getEditRoute(s)}),l=e.ref(void 0),g=e.ref(!1),x=e.ref(!1),B=e.ref(""),O=Ue(a.config,d.value),j=e.computed(()=>G[a.config.plugin]),M=s=>{l.value=s,g.value=!0},K=()=>{g.value=!1},q=async()=>{var s,m,V;if((s=l.value)!=null&&s.id){x.value=!0;try{await o.delete(O(l.value.id)),x.value=!1,g.value=!1,u.value++,r("delete:success",l.value)}catch(A){B.value=((V=(m=A.response)==null?void 0:m.data)==null?void 0:V.message)||A.message||n("credentials.error.delete"),r("error",A)}finally{x.value=!1}}};e.watch(y,s=>{if(s.status===P.Error){C.value=n("credentials.error.general"),r("error",s.error);return}C.value=""});const D=e.ref({ctaPath:a.config.createRoute,ctaText:void 0,message:"",title:n("credentials.title")});return e.onBeforeMount(async()=>{await a.canCreate()&&(D.value.title=n(`credentials.list.empty_state.${a.config.plugin}.title`),D.value.ctaText=n(`credentials.list.empty_state.${a.config.plugin}.cta`))}),(s,m)=>{const V=e.resolveComponent("KButton"),A=e.resolveComponent("CopyUuid"),Xe=e.resolveComponent("KBadge"),Ye=e.resolveComponent("KTruncate"),$=e.resolveComponent("KDropdownItem"),R=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",We,[e.createVNode(e.unref(Oe),{"cache-identifier":t.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":"","empty-state-options":D.value,"enable-entity-actions":"","error-message":C.value,fetcher:e.unref(b),"fetcher-cache-key":u.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-consumer-credentials-list","table-headers":f.value,onSort:N},{"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(J),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(V,{appearance:"primary","data-testid":"toolbar-add-credential",icon:"plus",to:t.config.createRoute},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)(`credentials.list.toolbar_actions.${t.config.plugin}.new`)),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),group:e.withCtx(({rowValue:c})=>[e.createElementVNode("b",null,e.toDisplayString(c??"-"),1)]),name:e.withCtx(({rowValue:c})=>[e.createElementVNode("b",null,e.toDisplayString(c??"-"),1)]),username:e.withCtx(({rowValue:c})=>[e.createElementVNode("span",null,e.toDisplayString(c??"-"),1)]),password:e.withCtx(({row:c,rowValue:h})=>[e.createVNode(A,{format:"redacted",notify:I=>p(I,c,"password"),uuid:h},null,8,["notify","uuid"])]),key:e.withCtx(({row:c,rowValue:h})=>[e.createVNode(A,{format:"redacted",notify:I=>p(I,c,"key"),uuid:h},null,8,["notify","uuid"])]),client_secret:e.withCtx(({row:c,rowValue:h})=>[e.createVNode(A,{format:"redacted",notify:I=>p(I,c,"client_secret"),uuid:h},null,8,["notify","uuid"])]),secret:e.withCtx(({row:c,rowValue:h})=>[e.createVNode(A,{format:"redacted",notify:I=>p(I,c,"secret"),uuid:h},null,8,["notify","uuid"])]),created_at:e.withCtx(({rowValue:c})=>[e.createTextVNode(e.toDisplayString(e.unref(i)(c)),1)]),tags:e.withCtx(({rowValue:c})=>[(c==null?void 0:c.length)>0?(e.openBlock(),e.createBlock(Ye,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c,h=>(e.openBlock(),e.createBlock(Xe,{key:h,onClick:m[0]||(m[0]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",ze,"-"))]),actions:e.withCtx(({row:c})=>[e.createVNode(R,null,{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode($,{"data-testid":"action-entity-copy-id",onClick:I=>_(c,"id",h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("credentials.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.config.plugin==="basic-auth"?(e.openBlock(),e.createBlock(R,{key:0},{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode($,{"data-testid":"action-entity-copy-credential",onClick:I=>_(c,"password",h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("credentials.actions.copy_credential")),1)]),_:2},1032,["onClick"])]),_:2},1024)):e.createCommentVNode("",!0),["key-auth","key-auth-enc","jwt"].includes(t.config.plugin)?(e.openBlock(),e.createBlock(R,{key:1},{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode($,{"data-testid":"action-entity-copy-key",onClick:I=>_(c,"key",h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("credentials.actions.copy_key")),1)]),_:2},1032,["onClick"])]),_:2},1024)):e.createCommentVNode("",!0),t.config.plugin==="oauth2"?(e.openBlock(),e.createBlock(R,{key:2},{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode($,{"data-testid":"action-entity-copy-secret",onClick:I=>_(c,"client_secret",h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("credentials.actions.copy_secret")),1)]),_:2},1032,["onClick"])]),_:2},1024)):e.createCommentVNode("",!0),t.config.plugin==="hmac-auth"?(e.openBlock(),e.createBlock(R,{key:3},{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode($,{"data-testid":"action-entity-copy-secret",onClick:I=>_(c,"secret",h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("credentials.actions.copy_secret")),1)]),_:2},1032,["onClick"])]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(R,null,{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode($,{"data-testid":"action-entity-copy-json",onClick:I=>_(c,void 0,h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("credentials.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(J),{"auth-function":()=>t.canEdit(c)},{default:e.withCtx(()=>[e.createVNode($,{"data-testid":"action-entity-edit","has-divider":"",item:S(c.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(J),{"auth-function":()=>t.canDelete(c)},{default:e.withCtx(()=>[e.createVNode($,{"data-testid":"action-entity-delete","has-divider":"","is-dangerous":"",onClick:h=>M(c)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("credentials.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","empty-state-options","error-message","fetcher","fetcher-cache-key","table-headers"]),e.createVNode(e.unref(Le),{"action-pending":x.value,description:e.unref(n)("credentials.delete.description"),"entity-type":j.value,error:B.value,title:e.unref(n)(`credentials.delete.${t.config.plugin}.title`),visible:g.value,onCancel:K,onProceed:q},null,8,["action-pending","description","entity-type","error","title","visible"])])}}}),lt="",Ge=((t,r)=>{const a=t.__vccOpts||t;for(const[n,i]of r)a[n]=i;return a})(Je,[["__scopeId","data-v-de45b351"]]);E.ConsumerCredentialList=Ge,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
1
+ (function(E,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/i18n"),require("axios"),require("@kong/kongponents"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n","axios","@kong/kongponents","vue-router"],e):(E=typeof globalThis<"u"?globalThis:E||self,e(E["kong-ui-public-entities-consumer-credentials"]={},E.Vue,E["kong-ui-public-i18n"],E.axios))})(this,function(E,e,M,re){"use strict";const oe={credentials:{title:"Consumer Credentials",list:{toolbar_actions:{acls:{new:"New ACL Credential"},"basic-auth":{new:"New Basic Auth Credential"},"key-auth":{new:"New Key Auth Credential"},"key-auth-enc":{new:"New Key Auth Encrypted Credential"},oauth2:{new:"New OAuth 2.0 Credential"},"hmac-auth":{new:"New HMAC Credential"},jwt:{new:"New JWT Credential"}},table_headers:{acls:{group:"Group",created_at:"Created At",tags:"Tags"},"basic-auth":{password:"Credential",username:"Username",created_at:"Created at",tags:"Tags"},"key-auth":{key:"Key",created_at:"Created at",tags:"Tags"},"key-auth-enc":{key:"Key",created_at:"Created at",tags:"Tags"},oauth2:{name:"Name",client_id:"Client ID",client_secret:"Client secret",created_at:"Created at",tags:"Tags"},"hmac-auth":{username:"Username",secret:"Secret",created_at:"Created at",tags:"Tags"},jwt:{key:"Key",algorithm:"Algorithm",created_at:"Created at",tags:"Tags"}},empty_state:{acls:{title:"Configure a New ACL Credential",cta:"New ACL Credential"},"basic-auth":{title:"Configure a New Basic Auth Credential",cta:"New Basic Auth Credential"},"key-auth":{title:"Configure a New Key Auth Credential",cta:"New Key Auth Credential"},"key-auth-enc":{title:"Configure a New Key Auth Encrypted Credential",cta:"New Key Auth Encrypted Credential"},oauth2:{title:"Configure a New OAuth 2.0 Credential",cta:"New OAuth 2.0 Credential"},"hmac-auth":{title:"Configure a New HMAC Credential",cta:"New HMAC Credential"},jwt:{title:"Configure a New JWT Credential",cta:"New JWT Credential"}}},actions:{copy_id:"Copy ID",copy_credential:"Copy Credential",copy_key:"Copy Key",copy_secret:"Copy Secret",copy_json:"Copy JSON",edit:"Edit",delete:"Delete"},delete:{acls:{title:"Delete an ACL Credential"},"basic-auth":{title:"Delete a Basic Auth Credential"},"key-auth":{title:"Delete a Key Auth Credential"},"key-auth-enc":{title:"Delete a Key Auth Encrypted Credential"},oauth2:{title:"Delete an OAuth 2.0 Credential"},"hmac-auth":{title:"Delete an HMAC Credential"},jwt:{title:"Delete a JWT Credential"},description:"This action cannot be reversed."},error:{general:"Credentials could not be retrieved",delete:"The credential could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}}};function ie(){const t=M.createI18n("en-us",oe);return{i18n:t,i18nT:M.i18nTComponent(t)}}const le={useI18n:ie},se={list:{konnect:"/api/runtime_groups/{controlPlaneId}/consumers/{consumerId}/{plugin}",kongManager:"/{workspace}/consumers/{consumerId}/{plugin}"}};var G=(t=>(t.GatewayService="service",t.Route="route",t.Consumer="consumer",t.ConsumerGroup="consumer group",t.Plugin="plugin",t.Upstream="upstream",t.Certificate="certificate",t.CACertificate="ca certificate",t.SNI="SNI",t.Key="key",t.KeySet="key set",t.Vault="vault",t.Application="application",t.Developer="developer",t.acls="ACL Credential",t["basic-auth"]="Basic Auth Credential",t["key-auth"]="Key Auth Credential",t["key-auth-enc"]="Key Auth Encrypted Credential",t.oauth2="OAuth 2.0 Credential",t["hmac-auth"]="HMAC Credential",t.jwt="JWT Credential",t.Target="target",t.Policy="policy",t))(G||{}),P=(t=>(t[t.Loading=0]="Loading",t[t.Idle=1]="Idle",t[t.NoResults=2]="NoResults",t[t.Error=3]="Error",t))(P||{});function R(t={}){return{axiosInstance:re.create({withCredentials:!0,timeout:3e4,...t})}}function ce(){return{debounce:(t,r)=>{let a;return(...n)=>{clearTimeout(a),a=window==null?void 0:window.setTimeout(()=>{t(...n)},r)}}}}const U="khcp-user-table-preferences",de={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function ue(){const t=a=>{if(typeof a=="string")try{return JSON.parse(a)}catch(n){console.error("useTablePreferences(tryParseJson)",n);return}},r=()=>{const a=t(localStorage.getItem(U));return!a||!Object.keys(a).length?new Map:new Map(Object.entries(a))};return{setTablePreferences:(a,n)=>{try{const i=r();i.set(a,n),localStorage.setItem(U,JSON.stringify(Object.fromEntries(i.entries())))}catch(i){console.error("useTablePreferences(setTablePreferences)",i)}},getTablePreferences:a=>{const n=r();return(n==null?void 0:n.get(a))||void 0||de},deleteAllTablePreferences:()=>{localStorage.removeItem(U)}}}const pe={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},ye={actions:{save:"Save",cancel:"Cancel",back:"Back"},errors:{edit:"The entity could not be edited at this time."}},fe={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},he={title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}"}},me={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},ge={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},be={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Ce={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},we={deleteModal:pe,baseForm:ye,baseTable:fe,baseConfigCard:he,filter:me,debouncedFilter:ge,errors:be,toggleModal:Ce};function H(){const t=M.createI18n("en-us",we);return{i18n:t,i18nT:M.i18nTComponent(t)}}function ke(t,r,a,n={fetchedItemsKey:"data",searchKeys:["id"]}){a||(a="100");const{axiosInstance:i}=R({headers:t.requestHeaders}),{i18n:{t:o}}=H(),{debounce:u}=ce(),k=u(async S=>{await T(S)},200),f=e.ref(!1),d=e.ref(""),b=e.ref(""),y=e.ref([]),N=e.ref(void 0),C=e.unref(r);let _=`${t.apiBaseUrl}${C}`;t.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,(t==null?void 0:t.controlPlaneId)||""):t.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,t!=null&&t.workspace?`/${t.workspace}`:""));const p=async()=>{try{f.value=!0;const{data:S}=await i.get(`${_}?size=${a}`);S!=null&&S.next||(N.value=n.fetchedItemsKey in S?S[n.fetchedItemsKey]:[]),y.value=n.fetchedItemsKey in S?S[n.fetchedItemsKey]:[]}catch{y.value=[],d.value=o("debouncedFilter.errors.fetch")}finally{f.value=!1}},w=e.ref(""),T=async S=>{var l,m;if(w.value!==S)if(w.value=S||"",N.value===void 0)try{f.value=!0,d.value="",b.value="";let x=_+"";S&&(x+=`/${S}`);const{data:B}=await i.get(`${x}?size=${a}`);n.fetchedItemsKey in B?y.value=B[n.fetchedItemsKey]:B!=null&&B.id?y.value=[B]:y.value=[]}catch(x){((l=x==null?void 0:x.response)==null?void 0:l.status)===404?b.value=o("debouncedFilter.errors.invalid"):(y.value=[],d.value=o("debouncedFilter.errors.fetch"))}finally{f.value=!1}else f.value=!0,b.value="",S?(y.value=(m=N.value)==null?void 0:m.filter(x=>{var B;let O=!1;for(const j of n.searchKeys){const F=typeof x[j]=="string"?(B=x[j])==null?void 0:B.toLowerCase():x[j];F!=null&&F.includes(S.toLowerCase())&&(O=!0)}return O}),(!y.value||!y.value.length)&&(b.value=o("debouncedFilter.errors.invalid"))):y.value=N.value,f.value=!1};return{loading:f,error:d,validationError:b,results:y,allRecords:N,loadItems:p,debouncedQueryChange:k}}function _e(t,r){const a=e.unref(r),n=e.computed(()=>t.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${a}`):new URL(a));return n.value.search="",i=>`${n.value.href}/${i}`}function Se(){const{i18n:{t}}=H();return{getMessageFromError:r=>{var a,n,i;if(!r)return t("errors.unexpected");if((a=r==null?void 0:r.response)!=null&&a.data){if(r.response.data.detail)return r.response.data.detail;if((n=r.response.data.details)!=null&&n.length)return r.response.data.details.map(o=>{let u=t("errors.unexpected");return o.messages&&typeof o.messages=="object"&&o.messages.length&&(u=o.messages.join(", ")),o.field?`${o.field} - ${u}`:u}).join("; ");if(r.response.data.message){const{message:o}=r.response.data;return Array.isArray(o)?(i=o[0])!=null&&i.constraints?Object.values(o[0].constraints)[0]:o[0]:o}if(typeof r.response.data=="string")return r.response.data;if(typeof r.response.data=="object")return Object.keys(r.response.data).map(o=>`${o} ${r.response.data[o]}`).join(", ")}return r.message||t("errors.unexpected")}}}function Y(t,r){const a=e.ref(e.unref(t)),n=e.ref(e.unref(r)),i=e.computed(()=>!!(a.value.app==="konnect"||a.value.isExactMatch)),o=e.computed(()=>n.value.startsWith("/")?new URL(`${window.location.origin}${n.value}`):new URL(n.value));return u=>{const{page:k,pageSize:f,offset:d,sortColumnKey:b,sortColumnOrder:y,query:N}=u;try{let C=new URL(o.value.href);return i.value&&N?(C.search="",C=new URL(`${C.href}/${N}/`)):(i.value||new URLSearchParams(N).forEach((_,p)=>{C.searchParams.append(p,_)}),b&&C.searchParams.append("sort_by",b),y==="desc"&&C.searchParams.append("sort_desc","1"),C.searchParams.append("size",String(f))),d&&k!==1&&C.searchParams.append("offset",String(d)),C.href}catch(C){return console.error("RouteList(fetcher)",C),n.value}}}function xe(t,r,a="data"){const n=e.unref(r),{axiosInstance:i}=R({headers:t.requestHeaders}),o=Y(t,n),u=e.ref({status:P.Idle});return{fetcher:async k=>{try{u.value={status:P.Loading};const f=o(k),{data:d}=await i.get(f),b=a&&a.replace(/[^\w-_]/gi,"");let y;d[b]&&Array.isArray(d[b])?y=d[b]:y=Object.keys(d).length?[d]:[];const N={data:y,total:y.length,...d.offset?{pagination:{offset:d.offset}}:null};return u.value={status:P.Idle,response:N},N}catch(f){const d={data:[],total:0};return k.query&&f.response.status===404?(u.value={status:P.NoResults,response:d,error:f},d):(u.value={status:P.Error,response:d,error:f},d)}},fetcherState:u}}function Ne(){return{convertKeyToTitle:(t,r="_")=>t?t.split(r).map(a=>a.toLowerCase()==="id"?a.toUpperCase():a.charAt(0).toUpperCase()+a.substring(1)).join(" "):""}}const X=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Q=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");const r=t.match(X);if(!r)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return r.shift(),r},Z=t=>t==="*"||t==="x"||t==="X",v=t=>{const r=parseInt(t,10);return isNaN(r)?t:r},Te=(t,r)=>typeof t!=typeof r?[String(t),String(r)]:[t,r],Be=(t,r)=>{if(Z(t)||Z(r))return 0;const[a,n]=Te(v(t),v(r));return a>n?1:a<n?-1:0},ee=(t,r)=>{for(let a=0;a<Math.max(t.length,r.length);a++){const n=Be(t[a]||"0",r[a]||"0");if(n!==0)return n}return 0},Ie=(t,r)=>{const a=Q(t),n=Q(r),i=a.pop(),o=n.pop(),u=ee(a,n);return u!==0?u:i&&o?ee(i.split("."),o.split(".")):i||o?i?-1:1:0},te=(t,r,a)=>{Ae(a);const n=Ie(t,r);return ae[a].includes(n)},ae={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ne=Object.keys(ae),Ae=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(ne.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${ne.join("|")}`)},Ee=t=>typeof t=="string"&&/^[v\d]/.test(t)&&X.test(t);function Ke(t){const{gatewayInfo:r,supportedRange:a}=t;if(!r)return!0;const{edition:n,version:i}=r;if(!Ee(i))return console.error("Invalid version"),!1;const o=a[n];if(!o)return!1;const[u,k]=o;return!(u&&te(i,u,"<")||k&&te(i,k,">"))}const W={useAxios:R,useDebouncedFilter:ke,useDeleteUrlBuilder:_e,useErrors:Se,useFetcher:xe,useFetchUrlBuilder:Y,useStringHelpers:Ne,useI18n:H,useGatewayFeatureSupported:Ke},z=(t,r)=>{const a=t.__vccOpts||t;for(const[n,i]of r)a[n]=i;return a},Ve="#3a3f51",De={key:0},$e=z(e.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(t){const r=t,a=e.computed(()=>{var p;return((p=r.rowEl)==null?void 0:p.querySelector(`[data-testid="${r.keyName}"]`))||null}),n=e.computed(()=>{var p;return((p=a.value)==null?void 0:p.querySelector('[role="button"]'))||null}),i=e.computed(()=>{var p,w;const T=(p=r.rowEl)==null?void 0:p.querySelectorAll("td");return T?((w=T[0])==null?void 0:w.getAttribute("data-testid"))===r.keyName:!1});let o;const u=()=>{o&&(o.disconnect(),o=void 0)},k=()=>{var p,w,T;d.value=((p=n.value)==null?void 0:p.getBoundingClientRect().width)||0,b.value=((w=a.value)==null?void 0:w.clientWidth)||0,y.value=((T=f.value)==null?void 0:T.innerText)||""},f=e.ref({}),d=e.ref(0),b=e.ref(0),y=e.ref(""),N=e.computed(()=>[n.value,a.value]),C=e.watch(N,p=>{if(i.value&&(u(),"ResizeObserver"in window&&window)){o=new ResizeObserver(w=>{window.requestAnimationFrame(()=>{!Array.isArray(w)||!w.length||k()})});for(const w of p)w&&o.observe(w)}},{immediate:!0,flush:"post",deep:!0}),_=e.computed(()=>i.value?d.value>b.value:!1);return e.onMounted(()=>{k()}),e.onUnmounted(()=>{C()}),(p,w)=>{const T=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{ref_key:"contentRef",ref:f,class:"content-wrapper"},[i.value?(e.openBlock(),e.createElementBlock("span",De,[e.createVNode(T,{disabled:!_.value,label:y.value,"max-width":"300",placement:"bottomStart"},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default",{},void 0,!0)]),_:3},8,["disabled","label"])])):e.renderSlot(p.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-f8a220e9"]]),Pe={class:"toolbar-container"},je={key:0,class:"toolbar-button-container"},qe=["data-testid"],Oe=z(e.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:String,default:""},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(t,{emit:r}){const a=t,{i18n:{t:n}}=W.useI18n(),i=e.computed(()=>a.cacheIdentifier||a.preferencesStorageKey),o=l=>l.hasData||!!a.query,u=e.computed(()=>{const l=[];return Object.keys(a.tableHeaders).forEach(m=>{const x=a.tableHeaders[m];l.push({label:x.label??m,key:m,sortable:x.sortable??!1})}),a.enableEntityActions&&l.push({key:"actions",hideLabel:!0}),l}),k=l=>({"data-rowid":l.id,"data-testid":l.name,...a.rowAttributes(l)}),f=e.ref({}),d=l=>{var m;return(m=f.value)==null?void 0:m.$el.querySelector(`[data-rowid="${l.id}"]`)},b=l=>{const m={"data-testid":l.headerKey,...a.cellAttributes(l)};return l.colIndex===0&&(m.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),m},y=()=>{r("empty-state-cta-clicked"),N()},N=()=>{r("clear-search-input")},C=(l,m)=>{r("click:row",m)},_=l=>{r("sort",l)},{setTablePreferences:p,getTablePreferences:w}=ue(),T=e.computed(()=>{const l=w(a.preferencesStorageKey);return{...a.initialFetcherParams,...l}}),S=l=>{a.preferencesStorageKey&&p(a.preferencesStorageKey,l)};return(l,m)=>{const x=e.resolveComponent("KIcon"),B=e.resolveComponent("KButton"),O=e.resolveComponent("KDropdownMenu"),j=e.resolveComponent("KTable"),F=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(F,{class:"kong-ui-entity-base-table",title:t.title},{body:e.withCtx(()=>[e.createVNode(j,{ref_key:"tableRefs",ref:f,"cache-identifier":i.value,"cell-attrs":b,"disable-pagination-page-jump":t.disablePaginationPageJump,"disable-sorting":t.disableSorting,"empty-state-action-button-icon":t.query?"":"plus","empty-state-action-message":t.query?e.unref(n)("baseTable.emptyState.noSearchResultsCtaText"):t.emptyStateOptions.ctaText,"empty-state-action-route":t.query?"":t.emptyStateOptions.ctaPath,"empty-state-icon":t.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":t.query?e.unref(n)("baseTable.emptyState.noSearchResultsMessage"):t.emptyStateOptions.message,"empty-state-title":t.query?e.unref(n)("baseTable.emptyState.noSearchResultsTitle"):t.emptyStateOptions.title,"enable-client-sort":t.enableClientSort,"error-state-title":t.errorMessage,fetcher:t.fetcher,"fetcher-cache-key":String(t.fetcherCacheKey),"has-error":!!t.errorMessage,headers:u.value,"hide-pagination-when-optional":"","initial-fetcher-params":T.value,"is-loading":t.isLoading,"pagination-type":t.paginationType,"row-attrs":k,"search-input":t.query,onKtableEmptyStateCtaClicked:y,"onRow:click":C,onSort:m[0]||(m[0]=K=>_(K)),"onUpdate:tablePreferences":S},e.createSlots({toolbar:e.withCtx(({state:K})=>[e.withDirectives(e.createElementVNode("div",Pe,[e.renderSlot(l.$slots,"toolbar-filter",{},void 0,!0),l.$slots["toolbar-button"]?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(l.$slots,"toolbar-button",{},void 0,!0)])):e.createCommentVNode("",!0)],512),[[e.vShow,o(K)]])]),actions:e.withCtx(({row:K,rowKey:q,rowValue:D})=>[e.createElementVNode("div",{class:"actions-container","data-testid":K.name},[e.createVNode(O,{"kpop-attributes":{placement:"bottomEnd"},width:t.dropdownMenuWidth},{items:e.withCtx(()=>[e.renderSlot(l.$slots,"actions",{row:K,rowKey:q,rowValue:D},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(B,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:e.withCtx(()=>[e.createVNode(x,{color:e.unref(Ve),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,qe)]),_:2},[e.renderList(t.tableHeaders,(K,q)=>({name:q,fn:e.withCtx(({row:D,rowKey:s,rowValue:g})=>[e.createVNode($e,{"key-name":String(q),"row-el":d(D)},{default:e.withCtx(()=>[e.renderSlot(l.$slots,q,{row:D,rowKey:s,rowValue:g},()=>[e.createTextVNode(e.toDisplayString(g),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-a598b1d9"]]),Fe={key:0,class:"kong-ui-entity-delete-error"},Le={key:1,class:"description"},Me=z(e.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(t,{emit:r}){const a=t,{i18nT:n}=W.useI18n(),i=e.computed(()=>a.needConfirm?a.entityName:""),o=()=>{r("cancel")},u=()=>{r("proceed")};return(k,f)=>{const d=e.resolveComponent("KAlert"),b=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(b,{"action-button-text":"Yes, delete","action-pending":t.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":i.value,"is-visible":t.visible,title:t.title,type:"danger",onCanceled:o,onProceed:u},{"body-content":e.withCtx(()=>[t.error?(e.openBlock(),e.createElementBlock("div",Fe,[e.createVNode(d,{appearance:"danger"},{alertMessage:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.error),1)]),_:1})])):e.createCommentVNode("",!0),e.createVNode(e.unref(n),{class:"message",keypath:a.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},e.createSlots({entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.entityType),1)]),_:2},[a.entityName?{name:"entityName",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(a.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),a.description||k.$slots.description?(e.openBlock(),e.createElementBlock("div",Le,[e.renderSlot(k.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(a.description),1)],!0)])):e.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),J=e.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(t){const r=t,a=e.ref(void 0),n=e.computed(()=>a.value===!0||a.value!==void 0&&r.forceShow===!0);return e.watch(()=>r.authFunction,async()=>{a.value=await r.authFunction()},{immediate:!0}),(i,o)=>n.value?e.renderSlot(i.$slots,"default",{key:0,isAllowed:a.value}):e.createCommentVNode("",!0)}}),{useAxios:Re,useDeleteUrlBuilder:Ue,useErrors:tt,useFetchUrlBuilder:at,useFetcher:He,useDebouncedFilter:nt,useStringHelpers:rt,useGatewayFeatureSupported:ot}=W,it="",We={class:"kong-ui-entities-consumer-credentials-list"},ze={key:1},Je=e.defineComponent({__name:"ConsumerCredentialList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getEditRoute)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0}},emits:["error","copy:success","copy:error","delete:success"],setup(t,{emit:r}){const a=t,{i18n:{t:n,formatUnixTimeStamp:i}}=le.useI18n(),{axiosInstance:o}=Re({headers:a.config.requestHeaders}),u=e.ref(1),k={acls:{group:{label:n("credentials.list.table_headers.acls.group")},created_at:{label:n("credentials.list.table_headers.acls.created_at")},tags:{label:n("credentials.list.table_headers.acls.tags")}},"basic-auth":{password:{label:n("credentials.list.table_headers.basic-auth.password")},username:{label:n("credentials.list.table_headers.basic-auth.username")},created_at:{label:n("credentials.list.table_headers.basic-auth.created_at")},tags:{label:n("credentials.list.table_headers.basic-auth.tags")}},"key-auth":{key:{label:n("credentials.list.table_headers.key-auth.key")},created_at:{label:n("credentials.list.table_headers.key-auth.created_at")},tags:{label:n("credentials.list.table_headers.key-auth.tags")}},"key-auth-enc":{key:{label:n("credentials.list.table_headers.key-auth-enc.key")},created_at:{label:n("credentials.list.table_headers.key-auth-enc.created_at")},tags:{label:n("credentials.list.table_headers.key-auth-enc.tags")}},oauth2:{name:{label:n("credentials.list.table_headers.oauth2.name")},client_id:{label:n("credentials.list.table_headers.oauth2.client_id")},client_secret:{label:n("credentials.list.table_headers.oauth2.client_secret")},created_at:{label:n("credentials.list.table_headers.oauth2.created_at")},tags:{label:n("credentials.list.table_headers.oauth2.tags")}},"hmac-auth":{username:{label:n("credentials.list.table_headers.hmac-auth.username")},secret:{label:n("credentials.list.table_headers.hmac-auth.secret")},created_at:{label:n("credentials.list.table_headers.hmac-auth.created_at")},tags:{label:n("credentials.list.table_headers.hmac-auth.tags")}},jwt:{key:{label:n("credentials.list.table_headers.jwt.key")},algorithm:{label:n("credentials.list.table_headers.jwt.algorithm")},created_at:{label:n("credentials.list.table_headers.jwt.created_at")},tags:{label:n("credentials.list.table_headers.jwt.tags")}}},f=e.computed(()=>k[a.config.plugin]),d=e.computed(()=>{let s=`${a.config.apiBaseUrl}${se.list[a.config.app]}`;return a.config.app==="konnect"?s=s.replace(/{controlPlaneId}/gi,a.config.controlPlaneId||"").replace(/{consumerId}/gi,a.config.consumerId||"").replace(/{plugin}/gi,a.config.plugin||""):a.config.app==="kongManager"&&(s=s.replace(/\/{workspace}/gi,a.config.workspace?`/${a.config.workspace}`:"").replace(/{consumerId}/gi,a.config.consumerId||"").replace(/{plugin}/gi,a.config.plugin||"")),s}),{fetcher:b,fetcherState:y}=He(a.config,d),N=()=>{u.value++},C=e.ref(""),_=(s,g,V)=>{const A=g?s[g]:JSON.stringify(s);if(!V(A)){T(s,g);return}w(s,g)},p=(s,g,V)=>{const{type:A}=s;A==="success"?w(g,V):T(g,V)},w=(s,g)=>{r("copy:success",{entity:s,field:g,message:g?n("credentials.copy.success",{val:s[g]}):n("credentials.copy.success_brief")})},T=(s,g)=>{r("copy:error",{entity:s,field:g,message:n("credentials.error.copy")})},S=s=>({label:n("credentials.actions.edit"),to:a.config.getEditRoute(s)}),l=e.ref(void 0),m=e.ref(!1),x=e.ref(!1),B=e.ref(""),O=Ue(a.config,d.value),j=e.computed(()=>G[a.config.plugin]),F=s=>{l.value=s,m.value=!0},K=()=>{m.value=!1},q=async()=>{var s,g,V;if((s=l.value)!=null&&s.id){x.value=!0;try{await o.delete(O(l.value.id)),x.value=!1,m.value=!1,u.value++,r("delete:success",l.value)}catch(A){B.value=((V=(g=A.response)==null?void 0:g.data)==null?void 0:V.message)||A.message||n("credentials.error.delete"),r("error",A)}finally{x.value=!1}}};e.watch(y,s=>{if(s.status===P.Error){C.value=n("credentials.error.general"),r("error",s.error);return}C.value=""});const D=e.ref({ctaPath:a.config.createRoute,ctaText:void 0,message:"",title:n("credentials.title")});return e.onBeforeMount(async()=>{await a.canCreate()&&(D.value.title=n(`credentials.list.empty_state.${a.config.plugin}.title`),D.value.ctaText=n(`credentials.list.empty_state.${a.config.plugin}.cta`))}),(s,g)=>{const V=e.resolveComponent("KButton"),A=e.resolveComponent("CopyUuid"),Ye=e.resolveComponent("KBadge"),Xe=e.resolveComponent("KTruncate"),$=e.resolveComponent("KDropdownItem"),L=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",We,[e.createVNode(e.unref(Oe),{"cache-identifier":t.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":"","empty-state-options":D.value,"enable-entity-actions":"","error-message":C.value,fetcher:e.unref(b),"fetcher-cache-key":u.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-consumer-credentials-list","table-headers":f.value,onSort:N},{"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(J),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(V,{appearance:"primary","data-testid":"toolbar-add-credential",icon:"plus",to:t.config.createRoute},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)(`credentials.list.toolbar_actions.${t.config.plugin}.new`)),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),group:e.withCtx(({rowValue:c})=>[e.createElementVNode("b",null,e.toDisplayString(c??"-"),1)]),name:e.withCtx(({rowValue:c})=>[e.createElementVNode("b",null,e.toDisplayString(c??"-"),1)]),username:e.withCtx(({rowValue:c})=>[e.createElementVNode("span",null,e.toDisplayString(c??"-"),1)]),password:e.withCtx(({row:c,rowValue:h})=>[e.createVNode(A,{format:"redacted",notify:I=>p(I,c,"password"),uuid:h},null,8,["notify","uuid"])]),key:e.withCtx(({row:c,rowValue:h})=>[e.createVNode(A,{format:"redacted",notify:I=>p(I,c,"key"),uuid:h},null,8,["notify","uuid"])]),client_secret:e.withCtx(({row:c,rowValue:h})=>[e.createVNode(A,{format:"redacted",notify:I=>p(I,c,"client_secret"),uuid:h},null,8,["notify","uuid"])]),secret:e.withCtx(({row:c,rowValue:h})=>[e.createVNode(A,{format:"redacted",notify:I=>p(I,c,"secret"),uuid:h},null,8,["notify","uuid"])]),created_at:e.withCtx(({rowValue:c})=>[e.createTextVNode(e.toDisplayString(e.unref(i)(c)),1)]),tags:e.withCtx(({rowValue:c})=>[(c==null?void 0:c.length)>0?(e.openBlock(),e.createBlock(Xe,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c,h=>(e.openBlock(),e.createBlock(Ye,{key:h,onClick:g[0]||(g[0]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",ze,"-"))]),actions:e.withCtx(({row:c})=>[e.createVNode(L,null,{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode($,{"data-testid":"action-entity-copy-id",onClick:I=>_(c,"id",h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("credentials.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.config.plugin==="basic-auth"?(e.openBlock(),e.createBlock(L,{key:0},{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode($,{"data-testid":"action-entity-copy-credential",onClick:I=>_(c,"password",h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("credentials.actions.copy_credential")),1)]),_:2},1032,["onClick"])]),_:2},1024)):e.createCommentVNode("",!0),["key-auth","key-auth-enc","jwt"].includes(t.config.plugin)?(e.openBlock(),e.createBlock(L,{key:1},{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode($,{"data-testid":"action-entity-copy-key",onClick:I=>_(c,"key",h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("credentials.actions.copy_key")),1)]),_:2},1032,["onClick"])]),_:2},1024)):e.createCommentVNode("",!0),t.config.plugin==="oauth2"?(e.openBlock(),e.createBlock(L,{key:2},{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode($,{"data-testid":"action-entity-copy-secret",onClick:I=>_(c,"client_secret",h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("credentials.actions.copy_secret")),1)]),_:2},1032,["onClick"])]),_:2},1024)):e.createCommentVNode("",!0),t.config.plugin==="hmac-auth"?(e.openBlock(),e.createBlock(L,{key:3},{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode($,{"data-testid":"action-entity-copy-secret",onClick:I=>_(c,"secret",h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("credentials.actions.copy_secret")),1)]),_:2},1032,["onClick"])]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(L,null,{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode($,{"data-testid":"action-entity-copy-json",onClick:I=>_(c,void 0,h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("credentials.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(J),{"auth-function":()=>t.canEdit(c)},{default:e.withCtx(()=>[e.createVNode($,{"data-testid":"action-entity-edit","has-divider":"",item:S(c.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(J),{"auth-function":()=>t.canDelete(c)},{default:e.withCtx(()=>[e.createVNode($,{"data-testid":"action-entity-delete","has-divider":"","is-dangerous":"",onClick:h=>F(c)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("credentials.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","empty-state-options","error-message","fetcher","fetcher-cache-key","table-headers"]),e.createVNode(e.unref(Me),{"action-pending":x.value,description:e.unref(n)("credentials.delete.description"),"entity-type":j.value,error:B.value,title:e.unref(n)(`credentials.delete.${t.config.plugin}.title`),visible:m.value,onCancel:K,onProceed:q},null,8,["action-pending","description","entity-type","error","title","visible"])])}}}),lt="",Ge=((t,r)=>{const a=t.__vccOpts||t;for(const[n,i]of r)a[n]=i;return a})(Je,[["__scopeId","data-v-de45b351"]]);E.ConsumerCredentialList=Ge,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-7410504d] .k-button.navigation-button{font-size:14px;font-weight:400}.kong-ui-copy-uuid[data-v-e4ea1359]{display:flex}.kong-ui-copy-uuid .uuid-container[data-v-e4ea1359]{margin-right:12px;white-space:nowrap}.kong-ui-copy-uuid .truncated-uuid[data-v-e4ea1359]{margin-right:1ch;max-width:10ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-copy-uuid .uuid-icon-wrapper[data-v-e4ea1359]{align-items:center;cursor:pointer;display:flex}.kong-ui-copy-uuid .uuid-icon[data-v-e4ea1359]{display:flex}.config-card-details-row[data-v-a3c5ab01]{border-bottom:var(--2c6ac268);display:var(--c7a65802);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-a3c5ab01]{width:var(--778426fe)}.config-card-details-row .config-card-details-label label[data-v-a3c5ab01]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-a3c5ab01]{width:var(--777f9b48)}.config-card-details-row .config-card-details-value .truncated[data-v-a3c5ab01]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-a3c5ab01]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-a3c5ab01] .kong-ui-copy-uuid:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-a3c5ab01]{display:flex}.config-card-details-row .config-badge[data-v-a3c5ab01]{margin-right:4px}.config-card-details-row[data-v-a3c5ab01] .k-input-label{margin-bottom:0}.config-card-details-row[data-v-a3c5ab01] .k-input-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-a3c5ab01] .config-card-details-row{width:auto}.kong-ui-entity-base-config-card[data-v-b72bbdde] .k-card-content .k-card-body{font-size:14px}.kong-ui-entity-base-config-card .config-card-actions[data-v-b72bbdde]{display:flex}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-b72bbdde]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-b72bbdde] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-form[data-v-2286e5f2]{border:1px solid #F1F1F5!important;box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-2286e5f2]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-2286e5f2] .k-button:last-of-type{margin-left:16px}.content-wrapper[data-v-f8a220e9] [role=button]{display:inline}.kong-ui-entity-base-table[data-v-a598b1d9]{border:1px solid #F1F1F5!important}.kong-ui-entity-base-table .toolbar-container[data-v-a598b1d9]{align-items:center}.kong-ui-entity-base-table .toolbar-button-container[data-v-a598b1d9]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-a598b1d9]{float:right}.kong-ui-entity-base-table .actions-container[data-v-a598b1d9] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table .actions-trigger[data-v-a598b1d9]{background-color:#0000!important;border:none!important;cursor:pointer!important;font-weight:400!important}.k-tabs>.tab-container>.kong-ui-entity-base-table,.k-tabs>.tab-container>[class^=kong-ui-entities-]>.kong-ui-entity-base-table{border-top:0}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-1c9a2a07],.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-1c9a2a07]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{margin-top:32px}.kong-ui-entity-delete-error[data-v-1c9a2a07]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-745f38c0]{width:100%}.kong-ui-entity-filter[data-v-745f38c0]{display:flex;position:relative}.kong-ui-entity-filter[data-v-745f38c0] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-745f38c0] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-745f38c0]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-745f38c0]{box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;position:absolute;top:100%;z-index:1060}.kong-ui-entity-filter-menu[data-v-745f38c0] .k-menu-item .menu-button:focus{box-shadow:none}.kong-ui-entity-filter-menu[data-v-745f38c0] .k-menu-item .menu-button:focus-visible{box-shadow:0 0 0 1px #bee2ff}.menu-item-title[data-v-745f38c0]{align-items:center;display:flex}.menu-item-indicator[data-v-745f38c0]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-745f38c0]{align-items:center;display:flex;justify-content:space-between}.menu-item-body[data-v-745f38c0] .k-input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-745f38c0] .k-input-wrapper{width:100%}.menu-item-body[data-v-745f38c0] .k-select-input .k-input{font-size:12px}.menu-item-body[data-v-745f38c0] .k-select-input .k-input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-745f38c0]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-745f38c0]{display:flex;justify-content:space-between;margin:10px 0 6px}fieldset[data-v-8b6dc312]{margin:0;padding:0}.kong-ui-entity-form-section[data-v-8b6dc312]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-8b6dc312]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-8b6dc312]{color:#000933;font-size:18px;font-weight:600;line-height:24px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-8b6dc312]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-8b6dc312]{border-bottom:1px solid #e0e4ea}.kong-ui-entities-consumer-credentials-list[data-v-de45b351]{width:100%}
1
+ .config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-7410504d] .k-button.navigation-button{font-size:14px;font-weight:400}.kong-ui-copy-uuid[data-v-bfdaf6f7]{display:flex}.kong-ui-copy-uuid .uuid-container[data-v-bfdaf6f7]{margin-right:12px;white-space:nowrap}.kong-ui-copy-uuid .truncated-uuid[data-v-bfdaf6f7]{margin-right:1ch;max-width:10ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-copy-uuid .uuid-icon-wrapper[data-v-bfdaf6f7]{align-items:center;cursor:pointer;display:flex}.kong-ui-copy-uuid .uuid-icon[data-v-bfdaf6f7]{display:flex}.config-card-details-row[data-v-a3c5ab01]{border-bottom:var(--2c6ac268);display:var(--c7a65802);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-a3c5ab01]{width:var(--778426fe)}.config-card-details-row .config-card-details-label label[data-v-a3c5ab01]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-a3c5ab01]{width:var(--777f9b48)}.config-card-details-row .config-card-details-value .truncated[data-v-a3c5ab01]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-a3c5ab01]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-a3c5ab01] .kong-ui-copy-uuid:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-a3c5ab01]{display:flex}.config-card-details-row .config-badge[data-v-a3c5ab01]{margin-right:4px}.config-card-details-row[data-v-a3c5ab01] .k-input-label{margin-bottom:0}.config-card-details-row[data-v-a3c5ab01] .k-input-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-a3c5ab01] .config-card-details-row{width:auto}.kong-ui-entity-base-config-card[data-v-b72bbdde] .k-card-content .k-card-body{font-size:14px}.kong-ui-entity-base-config-card .config-card-actions[data-v-b72bbdde]{display:flex}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-b72bbdde]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-b72bbdde] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-form[data-v-2286e5f2]{border:1px solid #F1F1F5!important;box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-2286e5f2]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-2286e5f2] .k-button:last-of-type{margin-left:16px}.content-wrapper[data-v-f8a220e9] [role=button]{display:inline}.kong-ui-entity-base-table[data-v-a598b1d9]{border:1px solid #F1F1F5!important}.kong-ui-entity-base-table .toolbar-container[data-v-a598b1d9]{align-items:center}.kong-ui-entity-base-table .toolbar-button-container[data-v-a598b1d9]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-a598b1d9]{float:right}.kong-ui-entity-base-table .actions-container[data-v-a598b1d9] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table .actions-trigger[data-v-a598b1d9]{background-color:#0000!important;border:none!important;cursor:pointer!important;font-weight:400!important}.k-tabs>.tab-container>.kong-ui-entity-base-table,.k-tabs>.tab-container>[class^=kong-ui-entities-]>.kong-ui-entity-base-table{border-top:0}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-1c9a2a07],.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-1c9a2a07]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{margin-top:32px}.kong-ui-entity-delete-error[data-v-1c9a2a07]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-745f38c0]{width:100%}.kong-ui-entity-filter[data-v-745f38c0]{display:flex;position:relative}.kong-ui-entity-filter[data-v-745f38c0] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-745f38c0] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-745f38c0]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-745f38c0]{box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;position:absolute;top:100%;z-index:1060}.kong-ui-entity-filter-menu[data-v-745f38c0] .k-menu-item .menu-button:focus{box-shadow:none}.kong-ui-entity-filter-menu[data-v-745f38c0] .k-menu-item .menu-button:focus-visible{box-shadow:0 0 0 1px #bee2ff}.menu-item-title[data-v-745f38c0]{align-items:center;display:flex}.menu-item-indicator[data-v-745f38c0]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-745f38c0]{align-items:center;display:flex;justify-content:space-between}.menu-item-body[data-v-745f38c0] .k-input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-745f38c0] .k-input-wrapper{width:100%}.menu-item-body[data-v-745f38c0] .k-select-input .k-input{font-size:12px}.menu-item-body[data-v-745f38c0] .k-select-input .k-input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-745f38c0]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-745f38c0]{display:flex;justify-content:space-between;margin:10px 0 6px}fieldset[data-v-8b6dc312]{margin:0;padding:0}.kong-ui-entity-form-section[data-v-8b6dc312]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-8b6dc312]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-8b6dc312]{color:#000933;font-size:18px;font-weight:600;line-height:24px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-8b6dc312]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-8b6dc312]{border-bottom:1px solid #e0e4ea}.kong-ui-entities-consumer-credentials-list[data-v-de45b351]{width:100%}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-consumer-credentials",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-consumer-credentials.umd.js",
6
6
  "module": "./dist/entities-consumer-credentials.es.js",
@@ -24,7 +24,7 @@
24
24
  "axios": "^1.4.0",
25
25
  "vue": "^3.3.4",
26
26
  "vue-router": "^4.2.4",
27
- "@kong-ui-public/copy-uuid": "^1.1.27",
27
+ "@kong-ui-public/copy-uuid": "^1.2.0",
28
28
  "@kong-ui-public/i18n": "^0.8.4"
29
29
  },
30
30
  "devDependencies": {
@@ -33,7 +33,7 @@
33
33
  "axios": "^1.4.0",
34
34
  "vue": "^3.3.4",
35
35
  "vue-router": "^4.2.4",
36
- "@kong-ui-public/copy-uuid": "^1.1.27",
36
+ "@kong-ui-public/copy-uuid": "^1.2.0",
37
37
  "@kong-ui-public/i18n": "^0.8.4"
38
38
  },
39
39
  "repository": {
@@ -51,7 +51,7 @@
51
51
  "errorLimit": "300KB"
52
52
  },
53
53
  "dependencies": {
54
- "@kong-ui-public/entities-shared": "^1.3.9"
54
+ "@kong-ui-public/entities-shared": "^1.3.10"
55
55
  },
56
56
  "scripts": {
57
57
  "dev": "cross-env USE_SANDBOX=true vite",