@kong-ui-public/entities-consumers 3.9.6 → 3.9.7

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.
@@ -180,7 +180,7 @@ const me = {
180
180
  fetchedItemsKey: "data",
181
181
  searchKeys: ["username", "id"]
182
182
  }
183
- ), N = (u) => u, U = w(() => p.value ? a("consumers.errors.general") : ""), ne = I(0), j = w(() => B.value === void 0), Q = w(() => J.value.map((u) => ({
183
+ ), N = (u) => u, R = w(() => p.value ? a("consumers.errors.general") : ""), ne = I(0), j = w(() => B.value === void 0), Q = w(() => J.value.map((u) => ({
184
184
  label: u.username || u.customId,
185
185
  value: u.id,
186
186
  selected: E.value.includes(u.id),
@@ -191,21 +191,21 @@ const me = {
191
191
  const C = j.value ? J.value.find((S) => S.id === u) : (v = B.value) == null ? void 0 : v.find((S) => S.id === u);
192
192
  return C ? C.username || C.custom_id : u;
193
193
  }, re = () => {
194
- R.value = "", k.value = [], g.value = [], A("cancel");
195
- }, k = I([]), D = I(!1), R = I(""), Z = async () => {
194
+ T.value = "", k.value = [], g.value = [], A("cancel");
195
+ }, k = I([]), D = I(!1), T = I(""), Z = async () => {
196
196
  if (!E.value.length) {
197
- R.value = "", g.value = [], A("cancel");
197
+ T.value = "", g.value = [], A("cancel");
198
198
  return;
199
199
  }
200
- D.value = !0, R.value = "", k.value = [], g.value = [];
200
+ D.value = !0, T.value = "", k.value = [], g.value = [];
201
201
  try {
202
202
  const u = E.value.map((S) => r(S)), C = await Promise.allSettled(u);
203
203
  let v = !0;
204
204
  C.forEach((S) => {
205
205
  S.status !== "fulfilled" && (v = !1);
206
- }), v ? (k.value = [], g.value = [], A("add:success", E.value), E.value = []) : (k.value.length && A("add:partial-success", k.value), E.value = [], T(C));
206
+ }), v ? (k.value = [], g.value = [], A("add:success", E.value), E.value = []) : (k.value.length && A("add:partial-success", k.value), E.value = [], U(C));
207
207
  } catch {
208
- R.value = a("consumers.errors.add"), A("error", R.value);
208
+ T.value = a("consumers.errors.add"), A("error", T.value);
209
209
  } finally {
210
210
  D.value = !1;
211
211
  }
@@ -224,7 +224,7 @@ const me = {
224
224
  let S = `${K(u)} - ${v.message}`;
225
225
  return v.response.status === 409 && (S = `${K(u)} - ${a("consumers.errors.already_added")}`), Promise.reject(Error(S));
226
226
  }
227
- }, g = I([]), T = (u) => {
227
+ }, g = I([]), U = (u) => {
228
228
  g.value = u.map((C) => {
229
229
  var v;
230
230
  return (v = C.reason) == null ? void 0 : v.message;
@@ -269,14 +269,14 @@ const me = {
269
269
  ]),
270
270
  _: 1
271
271
  }, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
272
- R.value || U.value || g.value.length ? (x(), H("div", wt, [
272
+ T.value || R.value || g.value.length ? (x(), H("div", wt, [
273
273
  c(S, { appearance: "danger" }, {
274
274
  default: l(() => [
275
275
  _("p", null, h(o(a)("consumers.errors.add")), 1),
276
276
  g.value.length ? (x(), H("ul", $t, [
277
277
  (x(!0), H(Je, null, Qe(g.value, (F, P) => (x(), H("li", { key: P }, h(F), 1))), 128))
278
278
  ])) : W("", !0),
279
- _("div", null, h(R.value || U.value), 1)
279
+ _("div", null, h(T.value || R.value), 1)
280
280
  ]),
281
281
  _: 1
282
282
  })
@@ -360,7 +360,7 @@ const me = {
360
360
  var d, y, $, L;
361
361
  let s = `${t.config.apiBaseUrl}${Y.list[t.config.app][k.value ? "forConsumerGroup" : "all"]}`;
362
362
  return t.config.app === "konnect" ? s = s.replace(/{controlPlaneId}/gi, ((d = t.config) == null ? void 0 : d.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((y = t.config) == null ? void 0 : y.consumerGroupId) || "") : t.config.app === "kongManager" && (s = s.replace(/\/{workspace}/gi, ($ = t.config) != null && $.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((L = t.config) == null ? void 0 : L.consumerGroupId) || "")), s;
363
- }), U = I(""), ne = w(() => {
363
+ }), R = I(""), ne = w(() => {
364
364
  const s = t.config.app === "konnect" || t.config.isExactMatch;
365
365
  return s ? {
366
366
  isExactMatch: s,
@@ -373,15 +373,15 @@ const me = {
373
373
  },
374
374
  schema: t.config.filterSchema
375
375
  };
376
- }), { hasRecords: j, handleStateChange: Q } = tt(U), K = w(() => j.value && t.config.app === "konnect"), re = w(() => !t.enableV2EmptyStates && t.config.app === "konnect"), k = w(() => !!t.config.consumerGroupId), D = w(
376
+ }), { hasRecords: j, handleStateChange: Q } = tt(R), K = w(() => j.value && t.config.app === "konnect"), re = w(() => !t.enableV2EmptyStates && t.config.app === "konnect"), k = w(() => !!t.config.consumerGroupId), D = w(
377
377
  () => k.value ? "kong-ui-entities-consumers-list-in-group-page" : "kong-ui-entities-consumers-list"
378
- ), R = w(() => k.value && !t.config.paginatedEndpoint ? "consumers" : void 0), {
378
+ ), T = w(() => k.value && !t.config.paginatedEndpoint ? "consumers" : void 0), {
379
379
  fetcher: Z,
380
380
  fetcherState: i,
381
381
  fetcherCacheKey: r
382
- } = ot({ ...t.config, cacheIdentifier: t.cacheIdentifier }, N.value, R.value), g = () => {
383
- U.value = "";
384
- }, T = () => {
382
+ } = ot({ ...t.config, cacheIdentifier: t.cacheIdentifier }, N.value, T.value), g = () => {
383
+ R.value = "";
384
+ }, U = () => {
385
385
  r.value++;
386
386
  }, b = (s) => s ?? "-", u = I(null), C = (s, d) => {
387
387
  const y = s.id;
@@ -497,20 +497,20 @@ const me = {
497
497
  "hide-pagination": k.value && !e.config.paginatedEndpoint,
498
498
  "pagination-type": "offset",
499
499
  "preferences-storage-key": D.value,
500
- query: U.value,
500
+ query: R.value,
501
501
  "row-attributes": X,
502
502
  "table-headers": o(p),
503
503
  onClearSearchInput: g,
504
504
  "onClick:row": d[4] || (d[4] = (f) => S(f)),
505
505
  onEmptyStateCtaClicked: Ke,
506
- onSort: T,
506
+ onSort: U,
507
507
  onState: o(Q)
508
508
  }, ve({
509
509
  "toolbar-filter": l(() => [
510
510
  k.value ? W("", !0) : (x(), z(o(at), {
511
511
  key: 0,
512
- modelValue: U.value,
513
- "onUpdate:modelValue": d[0] || (d[0] = (f) => U.value = f),
512
+ modelValue: R.value,
513
+ "onUpdate:modelValue": d[0] || (d[0] = (f) => R.value = f),
514
514
  config: ne.value
515
515
  }, null, 8, ["modelValue", "config"]))
516
516
  ]),
@@ -660,7 +660,7 @@ const me = {
660
660
  ]),
661
661
  key: "0"
662
662
  } : void 0,
663
- e.enableV2EmptyStates && e.config.app === "konnect" ? {
663
+ !R.value && e.enableV2EmptyStates && e.config.app === "konnect" ? {
664
664
  name: "empty-state",
665
665
  fn: l(() => {
666
666
  var f;
@@ -755,7 +755,7 @@ const me = {
755
755
  ]);
756
756
  };
757
757
  }
758
- }), Qt = /* @__PURE__ */ Ce(At, [["__scopeId", "data-v-765d41cc"]]);
758
+ }), Qt = /* @__PURE__ */ Ce(At, [["__scopeId", "data-v-db14b8d1"]]);
759
759
  var G = [];
760
760
  for (var ye = 0; ye < 256; ++ye)
761
761
  G.push((ye + 256).toString(16).slice(1));
@@ -816,18 +816,18 @@ const Ft = { class: "kong-ui-entities-consumer-form" }, Pt = ["id"], Bt = { clas
816
816
  }), N = () => {
817
817
  var i;
818
818
  E.push(((i = a.config) == null ? void 0 : i.cancelRoute) || { name: "consumer-list" });
819
- }, U = (i) => {
819
+ }, R = (i) => {
820
820
  t("loading", i);
821
821
  }, ne = (i) => {
822
822
  t("error", i);
823
823
  }, j = (i) => {
824
- var g, T, b;
825
- p.fields.username = ((g = i == null ? void 0 : i.item) == null ? void 0 : g.username) || (i == null ? void 0 : i.username) || "", p.fields.customId = ((T = i == null ? void 0 : i.item) == null ? void 0 : T.custom_id) || (i == null ? void 0 : i.custom_id) || "";
824
+ var g, U, b;
825
+ p.fields.username = ((g = i == null ? void 0 : i.item) == null ? void 0 : g.username) || (i == null ? void 0 : i.username) || "", p.fields.customId = ((U = i == null ? void 0 : i.item) == null ? void 0 : U.custom_id) || (i == null ? void 0 : i.custom_id) || "";
826
826
  const r = ((b = i == null ? void 0 : i.item) == null ? void 0 : b.tags) || (i == null ? void 0 : i.tags) || [];
827
827
  p.fields.tags = (r == null ? void 0 : r.join(", ")) || "", Object.assign(X, p.fields);
828
828
  }, Q = w(() => a.consumerId ? Ae.Edit : Ae.Create), K = (i) => {
829
- var g, T, b, u, C, v;
830
- let r = `${(g = a.config) == null ? void 0 : g.apiBaseUrl}${Y.form[(T = a.config) == null ? void 0 : T.app][i]}`;
829
+ var g, U, b, u, C, v;
830
+ let r = `${(g = a.config) == null ? void 0 : g.apiBaseUrl}${Y.form[(U = a.config) == null ? void 0 : U.app][i]}`;
831
831
  return ((b = a.config) == null ? void 0 : b.app) === "konnect" ? r = r.replace(/{controlPlaneId}/gi, ((u = a.config) == null ? void 0 : u.controlPlaneId) || "") : ((C = a.config) == null ? void 0 : C.app) === "kongManager" && (r = r.replace(/\/{workspace}/gi, (v = a.config) != null && v.workspace ? `/${a.config.workspace}` : "")), r = r.replace(/{id}/gi, a.consumerId), r;
832
832
  }, re = w(() => !!p.fields.username || !!p.fields.customId), k = w(() => JSON.stringify(p.fields) !== JSON.stringify(X)), D = w(() => {
833
833
  var i, r;
@@ -836,7 +836,7 @@ const Ft = { class: "kong-ui-entities-consumer-form" }, Pt = ["id"], Bt = { clas
836
836
  custom_id: p.fields.customId || null,
837
837
  tags: (r = (i = p.fields.tags.split(",")) == null ? void 0 : i.map((g) => String(g || "").trim())) == null ? void 0 : r.filter((g) => g !== "")
838
838
  };
839
- }), R = async () => {
839
+ }), T = async () => {
840
840
  var i;
841
841
  try {
842
842
  p.readonly = !0;
@@ -849,7 +849,7 @@ const Ft = { class: "kong-ui-entities-consumer-form" }, Pt = ["id"], Bt = { clas
849
849
  }
850
850
  };
851
851
  return (i, r) => {
852
- const g = O("KInput"), T = O("KCard");
852
+ const g = O("KInput"), U = O("KCard");
853
853
  return x(), H("div", Ft, [
854
854
  c(o(mt), {
855
855
  "can-submit": re.value && k.value,
@@ -863,8 +863,8 @@ const Ft = { class: "kong-ui-entities-consumer-form" }, Pt = ["id"], Bt = { clas
863
863
  onCancel: N,
864
864
  "onFetch:error": r[3] || (r[3] = (b) => ne(b)),
865
865
  "onFetch:success": j,
866
- onLoading: r[4] || (r[4] = (b) => U(b)),
867
- onSubmit: R
866
+ onLoading: r[4] || (r[4] = (b) => R(b)),
867
+ onSubmit: T
868
868
  }, {
869
869
  default: l(() => [
870
870
  _("div", null, [
@@ -881,7 +881,7 @@ const Ft = { class: "kong-ui-entities-consumer-form" }, Pt = ["id"], Bt = { clas
881
881
  }, h(o(n)("consumers.form.consumer_identification.title")) + "* ", 9, Pt),
882
882
  _("p", Bt, h(o(n)("consumers.form.consumer_identification.description")), 1)
883
883
  ]),
884
- c(T, null, {
884
+ c(U, null, {
885
885
  default: l(() => [
886
886
  _("fieldset", {
887
887
  "aria-labelledby": `fields-group-title-${o(B)}`
@@ -1 +1 @@
1
- (function(N,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):(N=typeof globalThis<"u"?globalThis:N||self,e(N["kong-ui-public-entities-consumers"]={},N.Vue,N.VueRouter,N.KongIcons,N["kong-ui-public-i18n"],N["kong-ui-public-entities-shared"]))})(this,function(N,e,ie,Y,ce,d){"use strict";const he="#00abd2",Ce="24px",be={consumers:{list:{table_headers:{username:"Username",custom_id:"Custom ID",tags:"Tags",id:"ID"},empty_state:{title:"Configure a New Consumer",description:"Consumers are the end users of a service.",title_for_consumer_group:"Configure a New Consumer"},empty_state_v2:{title:"Configure your first consumer",group:"Consumers created in gateways within this group will automatically appear here.",description:"Consumers represent users or apps accessing your APIs, allowing for tailored authentication and individual access control."},toolbar_actions:{new_consumer:"New consumer"}},title:"Consumers",search:{placeholder:{konnect:"Filter by name",kongManager:"Filter by exact username or ID"}},actions:{add_consumer:"Add Consumer",create:"New Consumer",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",remove:"Remove",view:"View Details"},delete:{title:"Delete a Consumer",description:"Deleting this consumer will also remove this consumer from any associated consumer group and delete all its plugins. This action cannot be reversed."},consumer_groups:{add:{title:"Add Consumers",ctaText:"Add consumers to this group",consumers_label:"Consumers",consumer_placeholder:"Add consumer",footer:"Search by exact name or ID to find consumers not included in the list"},remove:{title:"Remove a Consumer",confirmation:"Are you sure you want to remove this consumer {consumer} from consumer group {consumerGroup}?",confirmationNoCG:"Are you sure you want to remove this consumer {consumer} from this consumer group?",description:"Removing this consumer from the group could change the rate limit policy applied to this consumer."}},errors:{general:"Consumers could not be retrieved",delete:"The consumer could not be deleted at this time.",copy:"Failed to copy to clipboard",add:"Some consumers could not be added at this time.",already_added:"This consumer has already been added to the consumer group"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{title:"Consumer Identification",info:{title:"General Information",description:"General information will help identify and manage added consumer."},consumer_identification:{title:"Consumer Identification",description:"A consumer can have both unique username and unique custom ID or one of them."}},fields:{username:{label:"Username",placeholder:"Enter a unique username",tooltip:"The unique username of the Consumer. You must send either this field or {custom_id} with the request.",custom_id:"custom_id"},custom_id:{label:"Custom ID",placeholder:"Enter a unique custom ID",tooltip:"Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or {username} with the request.",username:"username"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Consumer for grouping and filtering."}}}};function ke(){const t=ce.createI18n("en-us",be);return{i18n:t,i18nT:ce.i18nTComponent(t)}}const X={useI18n:ke},j="/v2/control-planes/{controlPlaneId}/core-entities",L="/{workspace}",q={list:{konnect:{all:`${j}/consumers`,forConsumerGroup:`${j}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${j}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`},kongManager:{all:`${L}/consumers`,forConsumerGroup:`${L}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${L}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`}},form:{konnect:{validate:`${j}/v1/schemas/json/consumer/validate`,create:`${j}/consumers`,edit:`${j}/consumers/{id}`},kongManager:{validate:`${L}/schemas/consumers/validate`,create:`${L}/consumers`,edit:`${L}/consumers/{id}`}}},_e={class:"add-consumer-form-container"},Ve={class:"add-consumer-form-cta"},we={class:"select-item-label"},Ie={key:0,class:"select-item-desc"},xe={key:0,class:"kong-ui-entity-add-consumers-error"},Ne={key:0},Ee=e.defineComponent({__name:"AddConsumerModal",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.consumerGroupId)},visible:{type:Boolean,required:!0,default:!1}},emits:["cancel","add:success","add:partial-success","error"],setup(t,{emit:u}){var h;const{i18n:{t:a}}=X.useI18n(),o=t,x=u,{axiosInstance:r}=d.useAxios((h=o.config)==null?void 0:h.axiosRequestConfig),V=e.ref([]),{debouncedQueryChange:I,loading:B,allRecords:M,error:m,loadItems:H,results:K}=d.useDebouncedFilter(o.config,q.list[o.config.app].all,"",{fetchedItemsKey:"data",searchKeys:["username","id"]}),P=c=>c,S=e.computed(()=>m.value?a("consumers.errors.general"):""),Q=e.ref(0),U=e.computed(()=>M.value===void 0),O=e.computed(()=>K.value.map(c=>({label:c.username||c.customId,value:c.id,selected:V.value.includes(c.id),data:c}))),A=c=>{var g;const C=U.value?K.value.find(w=>w.id===c):(g=M.value)==null?void 0:g.find(w=>w.id===c);return C?C.username||C.custom_id:c},z=()=>{D.value="",b.value=[],f.value=[],x("cancel")},b=e.ref([]),E=e.ref(!1),D=e.ref(""),W=async()=>{if(!V.value.length){D.value="",f.value=[],x("cancel");return}E.value=!0,D.value="",b.value=[],f.value=[];try{const c=V.value.map(w=>s(w)),C=await Promise.allSettled(c);let g=!0;C.forEach(w=>{w.status!=="fulfilled"&&(g=!1)}),g?(b.value=[],f.value=[],x("add:success",V.value),V.value=[]):(b.value.length&&x("add:partial-success",b.value),V.value=[],$(C))}catch{D.value=a("consumers.errors.add"),x("error",D.value)}finally{E.value=!1}},i=e.computed(()=>{var C,g,w,J;let c=`${o.config.apiBaseUrl}${q.list[o.config.app].forConsumerGroup}`;return o.config.app==="konnect"?c=c.replace(/{controlPlaneId}/gi,((C=o.config)==null?void 0:C.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((g=o.config)==null?void 0:g.consumerGroupId)||""):o.config.app==="kongManager"&&(c=c.replace(/\/{workspace}/gi,(w=o.config)!=null&&w.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((J=o.config)==null?void 0:J.consumerGroupId)||"")),c}),s=async c=>{const C={consumer:c};try{const g=await r.post(i.value,C);return b.value.push(c),g}catch(g){let w=`${A(c)} - ${g.message}`;return g.response.status===409&&(w=`${A(c)} - ${a("consumers.errors.already_added")}`),Promise.reject(Error(w))}},f=e.ref([]),$=c=>{f.value=c.map(C=>{var g;return(g=C.reason)==null?void 0:g.message}).filter(Boolean)};return e.watch(O,()=>{Q.value++},{immediate:!0,deep:!0}),e.watch(()=>o.visible,()=>{o.visible&&H()},{immediate:!0}),(c,C)=>{const g=e.resolveComponent("KMultiselect"),w=e.resolveComponent("KAlert"),J=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(J,{"action-button-disabled":E.value,class:"kong-ui-entities-add-consumers-modal","data-testid":"add-consumer-modal",title:e.unref(a)("consumers.consumer_groups.add.title"),visible:t.visible,onCancel:z,onProceed:W},{default:e.withCtx(()=>[e.createElementVNode("div",_e,[e.createElementVNode("p",Ve,e.toDisplayString(e.unref(a)("consumers.consumer_groups.add.ctaText")),1),e.createVNode(g,{modelValue:V.value,"onUpdate:modelValue":C[0]||(C[0]=T=>V.value=T),autosuggest:"","data-testid":"add-consumers-multiselect","dropdown-footer-text":U.value?e.unref(a)("consumers.consumer_groups.add.footer"):void 0,items:O.value,label:e.unref(a)("consumers.consumer_groups.add.consumers_label"),loading:e.unref(B),placeholder:e.unref(a)("consumers.consumer_groups.add.consumer_placeholder"),readonly:E.value,required:"",width:"100%",onQueryChange:e.unref(I)},{"item-template":e.withCtx(({item:T})=>[e.createElementVNode("div",we,e.toDisplayString(T.label),1),P(T).data.username&&P(T).data.custom_id?(e.openBlock(),e.createElementBlock("div",Ie,e.toDisplayString(P(T).data.custom_id),1)):e.createCommentVNode("",!0)]),_:1},8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly","onQueryChange"]),D.value||S.value||f.value.length?(e.openBlock(),e.createElementBlock("div",xe,[e.createVNode(w,{appearance:"danger"},{default:e.withCtx(()=>[e.createElementVNode("p",null,e.toDisplayString(e.unref(a)("consumers.errors.add")),1),f.value.length?(e.openBlock(),e.createElementBlock("ul",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(T,G)=>(e.openBlock(),e.createElementBlock("li",{key:G},e.toDisplayString(T),1))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",null,e.toDisplayString(D.value||S.value),1)]),_:1})])):e.createCommentVNode("",!0)])]),_:1},8,["action-button-disabled","title","visible"])}}}),oe=(t,u)=>{const a=t.__vccOpts||t;for(const[o,x]of u)a[o]=x;return a},Be=oe(Ee,[["__scopeId","data-v-d54468ab"]]),De={class:"kong-ui-entities-consumers-list"},$e={class:"button-row"},Se={class:"empty-state-icon-gateway"},Te=oe(e.defineComponent({__name:"ConsumerList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","add:success","remove:success"],setup(t,{emit:u}){var ye;const a=u,o=t,{i18nT:x,i18n:{t:r}}=X.useI18n(),V=ie.useRouter(),{axiosInstance:I}=d.useAxios((ye=o.config)==null?void 0:ye.axiosRequestConfig),B=e.computed(()=>o.config.app!=="kongManager"||!!o.config.disableSorting),M={username:{label:r("consumers.list.table_headers.username"),searchable:!0,sortable:!0,hidable:!1},custom_id:{label:r("consumers.list.table_headers.custom_id"),searchable:!0,sortable:!0},tags:{label:r("consumers.list.table_headers.tags"),sortable:!1}},m=M,H=n=>({"data-testid":n.username??n.custom_id??n.id}),K=()=>{o.config.consumerGroupId?ue():V.push(o.config.createRoute)},P=e.computed(()=>{var l,y,k,F;let n=`${o.config.apiBaseUrl}${q.list[o.config.app][b.value?"forConsumerGroup":"all"]}`;return o.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((l=o.config)==null?void 0:l.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((y=o.config)==null?void 0:y.consumerGroupId)||""):o.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(k=o.config)!=null&&k.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((F=o.config)==null?void 0:F.consumerGroupId)||"")),n}),S=e.ref(""),Q=e.computed(()=>{const n=o.config.app==="konnect"||o.config.isExactMatch;return n?{isExactMatch:n,placeholder:r(`consumers.search.placeholder.${o.config.app}`)}:{isExactMatch:n,fields:{username:M.username,custom_id:M.custom_id},schema:o.config.filterSchema}}),{hasRecords:U,handleStateChange:O}=d.useTableState(S),A=e.computed(()=>U.value&&o.config.app==="konnect"),z=e.computed(()=>!o.enableV2EmptyStates&&o.config.app==="konnect"),b=e.computed(()=>!!o.config.consumerGroupId),E=e.computed(()=>b.value?"kong-ui-entities-consumers-list-in-group-page":"kong-ui-entities-consumers-list"),D=e.computed(()=>b.value&&!o.config.paginatedEndpoint?"consumers":void 0),{fetcher:W,fetcherState:i,fetcherCacheKey:s}=d.useFetcher({...o.config,cacheIdentifier:o.cacheIdentifier},P.value,D.value),f=()=>{S.value=""},$=()=>{s.value++},h=n=>n??"-",c=e.ref(null),C=(n,l)=>{const y=n.id;if(!l(y)){a("copy:error",{entity:n,field:"id",message:r("consumers.errors.copy")});return}a("copy:success",{entity:n,field:"id",message:r("consumers.copy.success",{val:y})})},g=(n,l)=>{const y=JSON.stringify(n);if(!l(y)){a("copy:error",{entity:n,message:r("consumers.errors.copy")});return}a("copy:success",{entity:n,message:r("consumers.copy.success_brief")})},w=async n=>{var y;await((y=o.canRetrieve)==null?void 0:y.call(o,n))&&V.push(o.config.getViewRoute(n.id))},J=n=>({label:r("consumers.actions.view"),to:o.config.getViewRoute(n)}),T=n=>({label:r("consumers.actions.edit"),to:o.config.getEditRoute(n)}),G=e.ref(void 0),v=e.ref(!1),ee=e.ref(!1),de=e.ref(""),He=d.useDeleteUrlBuilder(o.config,P.value),We=n=>{G.value=n,v.value=!0},Je=()=>{v.value=!1},Qe=async()=>{var n,l,y;if((n=G.value)!=null&&n.id){ee.value=!0;try{await I.delete(He(G.value.id)),ee.value=!1,v.value=!1,s.value++,a("delete:success",G.value)}catch(k){de.value=((y=(l=k.response)==null?void 0:l.data)==null?void 0:y.message)||k.message||r("consumers.errors.delete"),a("error",k)}finally{ee.value=!1}}},re=e.ref(!1),ue=()=>{re.value=!0},me=()=>{re.value=!1},pe=(n,l)=>{l||me(),s.value++,a("add:success",n)},ze=()=>{b.value&&ue()},R=e.ref(void 0),se=e.ref(!1),Ye=e.ref(""),Xe=n=>{R.value=n,se.value=!0},fe=()=>{se.value=!1,R.value=void 0},Ze=e.computed(()=>{var l,y,k,F;let n=`${o.config.apiBaseUrl}${q.list[o.config.app].oneForConsumerGroup}`;return o.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((l=o.config)==null?void 0:l.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((y=o.config)==null?void 0:y.consumerGroupId)||""):o.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(k=o.config)!=null&&k.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((F=o.config)==null?void 0:F.consumerGroupId)||"")),n}),ge=e.ref(!1),ve=async()=>{if(R.value){ge.value=!0;try{const n=Ze.value.replace(/{consumerId}/gi,R.value.id);await I.delete(n),a("remove:success",R.value),fe(),s.value++}catch(n){Ye.value=n.message||r("consumers.errors.delete"),a("error",n)}finally{ge.value=!1}}};e.watch(i,n=>{var l,y,k;if(n.status===d.FetcherStatus.Error){c.value={title:r("consumers.errors.general")},(k=(y=(l=n.error)==null?void 0:l.response)==null?void 0:y.data)!=null&&k.message&&(c.value.message=n.error.response.data.message),a("error",n.error);return}c.value=null});const ae=e.ref({ctaPath:b.value?void 0:o.config.createRoute,ctaText:void 0,message:`${r("consumers.list.empty_state.description")}${o.config.additionMessageForEmptyState?` ${o.config.additionMessageForEmptyState}`:""}`,title:r("consumers.title")});return e.onBeforeMount(async()=>{await o.canCreate()&&(ae.value.title=b.value?r("consumers.list.empty_state.title_for_consumer_group"):r("consumers.list.empty_state.title"),ae.value.ctaText=b.value?r("consumers.actions.add_consumer"):r("consumers.actions.create"))}),(n,l)=>{const y=e.resolveComponent("KButton"),k=e.resolveComponent("KDropdownItem"),F=e.resolveComponent("KClipboardProvider"),et=e.resolveComponent("KPrompt");return e.openBlock(),e.createElementBlock("div",De,[e.createVNode(e.unref(d.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":B.value,"empty-state-options":ae.value,"enable-entity-actions":"","error-message":c.value,fetcher:e.unref(W),"fetcher-cache-key":e.unref(s),"hide-pagination":b.value&&!t.config.paginatedEndpoint,"pagination-type":"offset","preferences-storage-key":E.value,query:S.value,"row-attributes":H,"table-headers":e.unref(m),onClearSearchInput:f,"onClick:row":l[4]||(l[4]=p=>w(p)),onEmptyStateCtaClicked:ze,onSort:$,onState:e.unref(O)},e.createSlots({"toolbar-filter":e.withCtx(()=>[b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(d.EntityFilter),{key:0,modelValue:S.value,"onUpdate:modelValue":l[0]||(l[0]=p=>S.value=p),config:Q.value},null,8,["modelValue","config"]))]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",$e,[!b.value&&A.value?(e.openBlock(),e.createBlock(y,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"consumers-learn-more-button",icon:"",onClick:l[1]||(l[1]=p=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(y,{appearance:"primary","data-testid":"toolbar-add-consumer",size:t.useActionOutside?"medium":"large",onClick:K},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.AddIcon)),e.createTextVNode(" "+e.toDisplayString(t.config.consumerGroupId?e.unref(r)("consumers.actions.add_consumer"):e.unref(r)("consumers.list.toolbar_actions.new_consumer")),1)]),_:1},8,["size"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),username:e.withCtx(({rowValue:p})=>[e.createElementVNode("b",null,e.toDisplayString(h(p)),1)]),custom_id:e.withCtx(({rowValue:p})=>[e.createTextVNode(e.toDisplayString(h(p)),1)]),tags:e.withCtx(({rowValue:p})=>[e.createVNode(e.unref(d.TableTags),{tags:p},null,8,["tags"])]),actions:e.withCtx(({row:p})=>[e.createVNode(F,null,{default:e.withCtx(({copyToClipboard:te})=>[e.createVNode(k,{"data-testid":"action-entity-copy-id",onClick:tt=>C(p,te)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("consumers.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(F,null,{default:e.withCtx(({copyToClipboard:te})=>[e.createVNode(k,{"data-testid":"action-entity-copy-json",onClick:tt=>g(p,te)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("consumers.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(p)},{default:e.withCtx(()=>[e.createVNode(k,{"data-testid":"action-entity-view","has-divider":"",item:J(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>t.canEdit(p)},{default:e.withCtx(()=>[e.createVNode(k,{"data-testid":"action-entity-edit",item:T(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>t.canDelete(p)},{default:e.withCtx(()=>[e.createVNode(k,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:()=>t.config.consumerGroupId?Xe(p):We(p)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.config.consumerGroupId?e.unref(r)("consumers.actions.remove"):e.unref(r)("consumers.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!e.unref(U)&&z.value?{name:"outside-actions",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(y,{appearance:"secondary",class:"open-learning-hub","data-testid":"consumers-learn-more-button",icon:"",onClick:l[2]||(l[2]=p=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,t.enableV2EmptyStates&&t.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var p;return[e.createVNode(e.unref(d.EntityEmptyState),{"action-button-text":e.unref(r)("consumers.list.toolbar_actions.new_consumer"),appearance:"secondary","can-create":()=>t.canCreate(),"data-testid":t.config.consumerGroupId?"nested-consumers-entity-empty-state":"consumers-entity-empty-state",description:e.unref(r)("consumers.list.empty_state_v2.description"),"learn-more":t.config.app==="konnect",title:e.unref(r)("consumers.list.empty_state_v2.title"),"onClick:create":K,"onClick:learnMore":l[3]||(l[3]=te=>n.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",Se,[e.createVNode(e.unref(Y.TeamIcon),{color:e.unref(he),size:e.unref(Ce)},null,8,["color","size"])])]),_:2},[(p=t.config)!=null&&p.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("consumers.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","data-testid","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","hide-pagination","preferences-storage-key","query","table-headers","onState"]),e.createVNode(e.unref(d.EntityDeleteModal),{"action-button-disabled":ee.value,"data-testid":"delete-consumer-modal",description:e.unref(r)("consumers.delete.description"),"entity-name":G.value&&(G.value.username||G.value.custom_id||G.value.id),"entity-type":e.unref(d.EntityTypes).Consumer,error:de.value,title:e.unref(r)("consumers.delete.title"),visible:v.value,onCancel:Je,onProceed:Qe},null,8,["action-button-disabled","description","entity-name","entity-type","error","title","visible"]),t.config.consumerGroupId?(e.openBlock(),e.createBlock(Be,{key:0,config:t.config,"data-testid":"add-consumer-modal",visible:re.value,"onAdd:partialSuccess":l[5]||(l[5]=p=>pe(p,!0)),"onAdd:success":l[6]||(l[6]=p=>pe(p)),onCancel:me},null,8,["config","visible"])):e.createCommentVNode("",!0),t.config.consumerGroupId&&R.value?(e.openBlock(),e.createBlock(et,{key:1,"action-button-appearance":"danger","data-testid":"remove-consumer-modal",title:e.unref(r)("consumers.consumer_groups.remove.title"),visible:se.value,onCancel:fe,onProceed:ve},{default:e.withCtx(()=>[e.createVNode(e.unref(x),{class:"message",keypath:t.config.consumerGroupName?"consumers.consumer_groups.remove.confirmation":"consumers.consumer_groups.remove.confirmationNoCG",tag:"p"},e.createSlots({consumer:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(R.value.username||R.value.custom_id||R.value.id),1)]),_:2},[t.config.consumerGroupName?{name:"consumerGroup",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(t.config.consumerGroupName),1)]),key:"0"}:void 0]),1032,["keypath"]),e.createElementVNode("p",null,e.toDisplayString(e.unref(r)("consumers.consumer_groups.remove.description")),1)]),_:1},8,["title","visible"])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-765d41cc"]]);for(var _=[],ne=0;ne<256;++ne)_.push((ne+256).toString(16).slice(1));function Ge(t,u=0){return(_[t[u+0]]+_[t[u+1]]+_[t[u+2]]+_[t[u+3]]+"-"+_[t[u+4]]+_[t[u+5]]+"-"+_[t[u+6]]+_[t[u+7]]+"-"+_[t[u+8]]+_[t[u+9]]+"-"+_[t[u+10]]+_[t[u+11]]+_[t[u+12]]+_[t[u+13]]+_[t[u+14]]+_[t[u+15]]).toLowerCase()}var Z,Me=new Uint8Array(16);function Ae(){if(!Z&&(Z=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Z))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Z(Me)}var Re=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const le={randomUUID:Re};function Pe(t,u,a){if(le.randomUUID&&!u&&!t)return le.randomUUID();t=t||{};var o=t.random||(t.rng||Ae)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Ge(o)}const Ue={class:"kong-ui-entities-consumer-form"},Fe=["id"],qe={class:"fields-group-text"},Ke=["aria-labelledby"],Oe=oe(e.defineComponent({__name:"ConsumerForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||(t==null?void 0:t.app)==="konnect"&&!(t!=null&&t.controlPlaneId)||(t==null?void 0:t.app)==="kongManager"&&typeof(t==null?void 0:t.workspace)!="string"||!(t!=null&&t.cancelRoute))},consumerId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:u}){var W;const a=t,o=u,{i18nT:x,i18n:{t:r}}=X.useI18n(),V=ie.useRouter(),{axiosInstance:I}=d.useAxios((W=a.config)==null?void 0:W.axiosRequestConfig),{getMessageFromError:B}=d.useErrors(),M=Pe(),m=e.reactive({fields:{username:"",customId:"",tags:""},readonly:!1,errorMessage:""}),H=e.reactive({username:"",customId:"",tags:""}),K=e.computed(()=>{var i,s;return(s=q.form[(i=a.config)==null?void 0:i.app])==null?void 0:s.edit}),P=()=>{var i;V.push(((i=a.config)==null?void 0:i.cancelRoute)||{name:"consumer-list"})},S=i=>{o("loading",i)},Q=i=>{o("error",i)},U=i=>{var f,$,h;m.fields.username=((f=i==null?void 0:i.item)==null?void 0:f.username)||(i==null?void 0:i.username)||"",m.fields.customId=(($=i==null?void 0:i.item)==null?void 0:$.custom_id)||(i==null?void 0:i.custom_id)||"";const s=((h=i==null?void 0:i.item)==null?void 0:h.tags)||(i==null?void 0:i.tags)||[];m.fields.tags=(s==null?void 0:s.join(", "))||"",Object.assign(H,m.fields)},O=e.computed(()=>a.consumerId?d.EntityBaseFormType.Edit:d.EntityBaseFormType.Create),A=i=>{var f,$,h,c,C,g;let s=`${(f=a.config)==null?void 0:f.apiBaseUrl}${q.form[($=a.config)==null?void 0:$.app][i]}`;return((h=a.config)==null?void 0:h.app)==="konnect"?s=s.replace(/{controlPlaneId}/gi,((c=a.config)==null?void 0:c.controlPlaneId)||""):((C=a.config)==null?void 0:C.app)==="kongManager"&&(s=s.replace(/\/{workspace}/gi,(g=a.config)!=null&&g.workspace?`/${a.config.workspace}`:"")),s=s.replace(/{id}/gi,a.consumerId),s},z=e.computed(()=>!!m.fields.username||!!m.fields.customId),b=e.computed(()=>JSON.stringify(m.fields)!==JSON.stringify(H)),E=e.computed(()=>{var i,s;return{username:m.fields.username||null,custom_id:m.fields.customId||null,tags:(s=(i=m.fields.tags.split(","))==null?void 0:i.map(f=>String(f||"").trim()))==null?void 0:s.filter(f=>f!=="")}}),D=async()=>{var i;try{m.readonly=!0;let s;await I.post(A("validate"),E.value),O.value==="create"?s=await I.post(A("create"),E.value):O.value==="edit"&&(s=((i=a.config)==null?void 0:i.app)==="konnect"?await I.put(A("edit"),E.value):await I.patch(A("edit"),E.value)),U(s==null?void 0:s.data),o("update",s==null?void 0:s.data)}catch(s){m.errorMessage=B(s),o("error",s)}finally{m.readonly=!1}};return(i,s)=>{const f=e.resolveComponent("KInput"),$=e.resolveComponent("KCard");return e.openBlock(),e.createElementBlock("div",Ue,[e.createVNode(e.unref(d.EntityBaseForm),{"can-submit":z.value&&b.value,config:t.config,"edit-id":t.consumerId,"entity-type":e.unref(d.SupportedEntityType).Consumer,"error-message":m.errorMessage,"fetch-url":K.value,"form-fields":E.value,"is-readonly":m.readonly,onCancel:P,"onFetch:error":s[3]||(s[3]=h=>Q(h)),"onFetch:success":U,onLoading:s[4]||(s[4]=h=>S(h)),onSubmit:D},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(d.EntityFormSection),{description:e.unref(r)("consumers.form.info.description"),"has-divider":"",title:e.unref(r)("consumers.form.info.title")},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("h3",{id:`fields-group-title-${e.unref(M)}`,class:"fields-group-title"},e.toDisplayString(e.unref(r)("consumers.form.consumer_identification.title"))+"* ",9,Fe),e.createElementVNode("p",qe,e.toDisplayString(e.unref(r)("consumers.form.consumer_identification.description")),1)]),e.createVNode($,null,{default:e.withCtx(()=>[e.createElementVNode("fieldset",{"aria-labelledby":`fields-group-title-${e.unref(M)}`},[e.createVNode(f,{modelValue:m.fields.username,"onUpdate:modelValue":s[0]||(s[0]=h=>m.fields.username=h),modelModifiers:{trim:!0},autocomplete:"off",class:"username-field","data-testid":"consumer-form-username",label:e.unref(r)("consumers.fields.username.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(r)("consumers.fields.username.placeholder"),readonly:m.readonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(x),{keypath:"consumers.fields.username.tooltip",scope:"global"},{custom_id:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("consumers.fields.username.custom_id")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"]),e.createVNode(f,{modelValue:m.fields.customId,"onUpdate:modelValue":s[1]||(s[1]=h=>m.fields.customId=h),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-form-custom-id",label:e.unref(r)("consumers.fields.custom_id.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(r)("consumers.fields.custom_id.placeholder"),readonly:m.readonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(x),{keypath:"consumers.fields.custom_id.tooltip",scope:"global"},{username:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("consumers.fields.custom_id.username")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"])],8,Ke)]),_:1}),e.createVNode(f,{modelValue:m.fields.tags,"onUpdate:modelValue":s[2]||(s[2]=h=>m.fields.tags=h),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-form-tags",help:e.unref(r)("consumers.fields.tags.help"),label:e.unref(r)("consumers.fields.tags.label"),"label-attributes":{info:e.unref(r)("consumers.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(r)("consumers.fields.tags.placeholder"),readonly:m.readonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-5580f86e"]]),je={class:"kong-ui-consumer-entity-config-card"},Le=e.defineComponent({__name:"ConsumerConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(t){const u=t,{i18n:{t:a},i18nT:o}=X.useI18n(),x=e.computed(()=>q.form[u.config.app].edit),r=e.ref({id:{},username:{section:d.ConfigurationSchemaSection.Basic,tooltip:a("consumers.fields.username.tooltip"),order:1},custom_id:{section:d.ConfigurationSchemaSection.Basic,tooltip:a("consumers.fields.custom_id.tooltip"),label:a("consumers.fields.custom_id.label"),order:2},updated_at:{},created_at:{},tags:{tooltip:a("consumers.fields.tags.tooltip")},username_lower:{hidden:!0},type:{hidden:!0}});return(V,I)=>(e.openBlock(),e.createElementBlock("div",je,[e.createVNode(e.unref(d.EntityBaseConfigCard),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":r.value,"entity-type":e.unref(d.SupportedEntityType).Consumer,"fetch-url":x.value,"hide-title":t.hideTitle,"onFetch:error":I[0]||(I[0]=B=>V.$emit("fetch:error",B)),"onFetch:success":I[1]||(I[1]=B=>V.$emit("fetch:success",B)),onLoading:I[2]||(I[2]=B=>V.$emit("loading",B))},{"username-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(o),{keypath:"consumers.fields.username.tooltip",scope:"global"},{custom_id:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("consumers.fields.username.custom_id")),1)]),_:1})]),"custom_id-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(o),{keypath:"consumers.fields.custom_id.tooltip",scope:"global"},{username:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("consumers.fields.custom_id.username")),1)]),_:1})]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});N.ConsumerConfigCard=Le,N.ConsumerForm=Oe,N.ConsumerList=Te,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
1
+ (function(N,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):(N=typeof globalThis<"u"?globalThis:N||self,e(N["kong-ui-public-entities-consumers"]={},N.Vue,N.VueRouter,N.KongIcons,N["kong-ui-public-i18n"],N["kong-ui-public-entities-shared"]))})(this,function(N,e,ie,Y,ce,d){"use strict";const he="#00abd2",Ce="24px",be={consumers:{list:{table_headers:{username:"Username",custom_id:"Custom ID",tags:"Tags",id:"ID"},empty_state:{title:"Configure a New Consumer",description:"Consumers are the end users of a service.",title_for_consumer_group:"Configure a New Consumer"},empty_state_v2:{title:"Configure your first consumer",group:"Consumers created in gateways within this group will automatically appear here.",description:"Consumers represent users or apps accessing your APIs, allowing for tailored authentication and individual access control."},toolbar_actions:{new_consumer:"New consumer"}},title:"Consumers",search:{placeholder:{konnect:"Filter by name",kongManager:"Filter by exact username or ID"}},actions:{add_consumer:"Add Consumer",create:"New Consumer",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",remove:"Remove",view:"View Details"},delete:{title:"Delete a Consumer",description:"Deleting this consumer will also remove this consumer from any associated consumer group and delete all its plugins. This action cannot be reversed."},consumer_groups:{add:{title:"Add Consumers",ctaText:"Add consumers to this group",consumers_label:"Consumers",consumer_placeholder:"Add consumer",footer:"Search by exact name or ID to find consumers not included in the list"},remove:{title:"Remove a Consumer",confirmation:"Are you sure you want to remove this consumer {consumer} from consumer group {consumerGroup}?",confirmationNoCG:"Are you sure you want to remove this consumer {consumer} from this consumer group?",description:"Removing this consumer from the group could change the rate limit policy applied to this consumer."}},errors:{general:"Consumers could not be retrieved",delete:"The consumer could not be deleted at this time.",copy:"Failed to copy to clipboard",add:"Some consumers could not be added at this time.",already_added:"This consumer has already been added to the consumer group"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{title:"Consumer Identification",info:{title:"General Information",description:"General information will help identify and manage added consumer."},consumer_identification:{title:"Consumer Identification",description:"A consumer can have both unique username and unique custom ID or one of them."}},fields:{username:{label:"Username",placeholder:"Enter a unique username",tooltip:"The unique username of the Consumer. You must send either this field or {custom_id} with the request.",custom_id:"custom_id"},custom_id:{label:"Custom ID",placeholder:"Enter a unique custom ID",tooltip:"Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or {username} with the request.",username:"username"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Consumer for grouping and filtering."}}}};function ke(){const t=ce.createI18n("en-us",be);return{i18n:t,i18nT:ce.i18nTComponent(t)}}const X={useI18n:ke},j="/v2/control-planes/{controlPlaneId}/core-entities",L="/{workspace}",q={list:{konnect:{all:`${j}/consumers`,forConsumerGroup:`${j}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${j}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`},kongManager:{all:`${L}/consumers`,forConsumerGroup:`${L}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${L}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`}},form:{konnect:{validate:`${j}/v1/schemas/json/consumer/validate`,create:`${j}/consumers`,edit:`${j}/consumers/{id}`},kongManager:{validate:`${L}/schemas/consumers/validate`,create:`${L}/consumers`,edit:`${L}/consumers/{id}`}}},_e={class:"add-consumer-form-container"},Ve={class:"add-consumer-form-cta"},we={class:"select-item-label"},Ie={key:0,class:"select-item-desc"},xe={key:0,class:"kong-ui-entity-add-consumers-error"},Ne={key:0},Ee=e.defineComponent({__name:"AddConsumerModal",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.consumerGroupId)},visible:{type:Boolean,required:!0,default:!1}},emits:["cancel","add:success","add:partial-success","error"],setup(t,{emit:u}){var h;const{i18n:{t:a}}=X.useI18n(),o=t,x=u,{axiosInstance:r}=d.useAxios((h=o.config)==null?void 0:h.axiosRequestConfig),V=e.ref([]),{debouncedQueryChange:I,loading:B,allRecords:M,error:m,loadItems:H,results:K}=d.useDebouncedFilter(o.config,q.list[o.config.app].all,"",{fetchedItemsKey:"data",searchKeys:["username","id"]}),P=c=>c,D=e.computed(()=>m.value?a("consumers.errors.general"):""),Q=e.ref(0),U=e.computed(()=>M.value===void 0),O=e.computed(()=>K.value.map(c=>({label:c.username||c.customId,value:c.id,selected:V.value.includes(c.id),data:c}))),A=c=>{var g;const C=U.value?K.value.find(w=>w.id===c):(g=M.value)==null?void 0:g.find(w=>w.id===c);return C?C.username||C.custom_id:c},z=()=>{$.value="",b.value=[],f.value=[],x("cancel")},b=e.ref([]),E=e.ref(!1),$=e.ref(""),W=async()=>{if(!V.value.length){$.value="",f.value=[],x("cancel");return}E.value=!0,$.value="",b.value=[],f.value=[];try{const c=V.value.map(w=>s(w)),C=await Promise.allSettled(c);let g=!0;C.forEach(w=>{w.status!=="fulfilled"&&(g=!1)}),g?(b.value=[],f.value=[],x("add:success",V.value),V.value=[]):(b.value.length&&x("add:partial-success",b.value),V.value=[],S(C))}catch{$.value=a("consumers.errors.add"),x("error",$.value)}finally{E.value=!1}},i=e.computed(()=>{var C,g,w,J;let c=`${o.config.apiBaseUrl}${q.list[o.config.app].forConsumerGroup}`;return o.config.app==="konnect"?c=c.replace(/{controlPlaneId}/gi,((C=o.config)==null?void 0:C.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((g=o.config)==null?void 0:g.consumerGroupId)||""):o.config.app==="kongManager"&&(c=c.replace(/\/{workspace}/gi,(w=o.config)!=null&&w.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((J=o.config)==null?void 0:J.consumerGroupId)||"")),c}),s=async c=>{const C={consumer:c};try{const g=await r.post(i.value,C);return b.value.push(c),g}catch(g){let w=`${A(c)} - ${g.message}`;return g.response.status===409&&(w=`${A(c)} - ${a("consumers.errors.already_added")}`),Promise.reject(Error(w))}},f=e.ref([]),S=c=>{f.value=c.map(C=>{var g;return(g=C.reason)==null?void 0:g.message}).filter(Boolean)};return e.watch(O,()=>{Q.value++},{immediate:!0,deep:!0}),e.watch(()=>o.visible,()=>{o.visible&&H()},{immediate:!0}),(c,C)=>{const g=e.resolveComponent("KMultiselect"),w=e.resolveComponent("KAlert"),J=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(J,{"action-button-disabled":E.value,class:"kong-ui-entities-add-consumers-modal","data-testid":"add-consumer-modal",title:e.unref(a)("consumers.consumer_groups.add.title"),visible:t.visible,onCancel:z,onProceed:W},{default:e.withCtx(()=>[e.createElementVNode("div",_e,[e.createElementVNode("p",Ve,e.toDisplayString(e.unref(a)("consumers.consumer_groups.add.ctaText")),1),e.createVNode(g,{modelValue:V.value,"onUpdate:modelValue":C[0]||(C[0]=T=>V.value=T),autosuggest:"","data-testid":"add-consumers-multiselect","dropdown-footer-text":U.value?e.unref(a)("consumers.consumer_groups.add.footer"):void 0,items:O.value,label:e.unref(a)("consumers.consumer_groups.add.consumers_label"),loading:e.unref(B),placeholder:e.unref(a)("consumers.consumer_groups.add.consumer_placeholder"),readonly:E.value,required:"",width:"100%",onQueryChange:e.unref(I)},{"item-template":e.withCtx(({item:T})=>[e.createElementVNode("div",we,e.toDisplayString(T.label),1),P(T).data.username&&P(T).data.custom_id?(e.openBlock(),e.createElementBlock("div",Ie,e.toDisplayString(P(T).data.custom_id),1)):e.createCommentVNode("",!0)]),_:1},8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly","onQueryChange"]),$.value||D.value||f.value.length?(e.openBlock(),e.createElementBlock("div",xe,[e.createVNode(w,{appearance:"danger"},{default:e.withCtx(()=>[e.createElementVNode("p",null,e.toDisplayString(e.unref(a)("consumers.errors.add")),1),f.value.length?(e.openBlock(),e.createElementBlock("ul",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(T,G)=>(e.openBlock(),e.createElementBlock("li",{key:G},e.toDisplayString(T),1))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",null,e.toDisplayString($.value||D.value),1)]),_:1})])):e.createCommentVNode("",!0)])]),_:1},8,["action-button-disabled","title","visible"])}}}),oe=(t,u)=>{const a=t.__vccOpts||t;for(const[o,x]of u)a[o]=x;return a},Be=oe(Ee,[["__scopeId","data-v-d54468ab"]]),De={class:"kong-ui-entities-consumers-list"},$e={class:"button-row"},Se={class:"empty-state-icon-gateway"},Te=oe(e.defineComponent({__name:"ConsumerList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","add:success","remove:success"],setup(t,{emit:u}){var ye;const a=u,o=t,{i18nT:x,i18n:{t:r}}=X.useI18n(),V=ie.useRouter(),{axiosInstance:I}=d.useAxios((ye=o.config)==null?void 0:ye.axiosRequestConfig),B=e.computed(()=>o.config.app!=="kongManager"||!!o.config.disableSorting),M={username:{label:r("consumers.list.table_headers.username"),searchable:!0,sortable:!0,hidable:!1},custom_id:{label:r("consumers.list.table_headers.custom_id"),searchable:!0,sortable:!0},tags:{label:r("consumers.list.table_headers.tags"),sortable:!1}},m=M,H=n=>({"data-testid":n.username??n.custom_id??n.id}),K=()=>{o.config.consumerGroupId?ue():V.push(o.config.createRoute)},P=e.computed(()=>{var l,y,k,F;let n=`${o.config.apiBaseUrl}${q.list[o.config.app][b.value?"forConsumerGroup":"all"]}`;return o.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((l=o.config)==null?void 0:l.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((y=o.config)==null?void 0:y.consumerGroupId)||""):o.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(k=o.config)!=null&&k.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((F=o.config)==null?void 0:F.consumerGroupId)||"")),n}),D=e.ref(""),Q=e.computed(()=>{const n=o.config.app==="konnect"||o.config.isExactMatch;return n?{isExactMatch:n,placeholder:r(`consumers.search.placeholder.${o.config.app}`)}:{isExactMatch:n,fields:{username:M.username,custom_id:M.custom_id},schema:o.config.filterSchema}}),{hasRecords:U,handleStateChange:O}=d.useTableState(D),A=e.computed(()=>U.value&&o.config.app==="konnect"),z=e.computed(()=>!o.enableV2EmptyStates&&o.config.app==="konnect"),b=e.computed(()=>!!o.config.consumerGroupId),E=e.computed(()=>b.value?"kong-ui-entities-consumers-list-in-group-page":"kong-ui-entities-consumers-list"),$=e.computed(()=>b.value&&!o.config.paginatedEndpoint?"consumers":void 0),{fetcher:W,fetcherState:i,fetcherCacheKey:s}=d.useFetcher({...o.config,cacheIdentifier:o.cacheIdentifier},P.value,$.value),f=()=>{D.value=""},S=()=>{s.value++},h=n=>n??"-",c=e.ref(null),C=(n,l)=>{const y=n.id;if(!l(y)){a("copy:error",{entity:n,field:"id",message:r("consumers.errors.copy")});return}a("copy:success",{entity:n,field:"id",message:r("consumers.copy.success",{val:y})})},g=(n,l)=>{const y=JSON.stringify(n);if(!l(y)){a("copy:error",{entity:n,message:r("consumers.errors.copy")});return}a("copy:success",{entity:n,message:r("consumers.copy.success_brief")})},w=async n=>{var y;await((y=o.canRetrieve)==null?void 0:y.call(o,n))&&V.push(o.config.getViewRoute(n.id))},J=n=>({label:r("consumers.actions.view"),to:o.config.getViewRoute(n)}),T=n=>({label:r("consumers.actions.edit"),to:o.config.getEditRoute(n)}),G=e.ref(void 0),v=e.ref(!1),ee=e.ref(!1),de=e.ref(""),He=d.useDeleteUrlBuilder(o.config,P.value),We=n=>{G.value=n,v.value=!0},Je=()=>{v.value=!1},Qe=async()=>{var n,l,y;if((n=G.value)!=null&&n.id){ee.value=!0;try{await I.delete(He(G.value.id)),ee.value=!1,v.value=!1,s.value++,a("delete:success",G.value)}catch(k){de.value=((y=(l=k.response)==null?void 0:l.data)==null?void 0:y.message)||k.message||r("consumers.errors.delete"),a("error",k)}finally{ee.value=!1}}},re=e.ref(!1),ue=()=>{re.value=!0},me=()=>{re.value=!1},pe=(n,l)=>{l||me(),s.value++,a("add:success",n)},ze=()=>{b.value&&ue()},R=e.ref(void 0),se=e.ref(!1),Ye=e.ref(""),Xe=n=>{R.value=n,se.value=!0},fe=()=>{se.value=!1,R.value=void 0},Ze=e.computed(()=>{var l,y,k,F;let n=`${o.config.apiBaseUrl}${q.list[o.config.app].oneForConsumerGroup}`;return o.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((l=o.config)==null?void 0:l.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((y=o.config)==null?void 0:y.consumerGroupId)||""):o.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(k=o.config)!=null&&k.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((F=o.config)==null?void 0:F.consumerGroupId)||"")),n}),ge=e.ref(!1),ve=async()=>{if(R.value){ge.value=!0;try{const n=Ze.value.replace(/{consumerId}/gi,R.value.id);await I.delete(n),a("remove:success",R.value),fe(),s.value++}catch(n){Ye.value=n.message||r("consumers.errors.delete"),a("error",n)}finally{ge.value=!1}}};e.watch(i,n=>{var l,y,k;if(n.status===d.FetcherStatus.Error){c.value={title:r("consumers.errors.general")},(k=(y=(l=n.error)==null?void 0:l.response)==null?void 0:y.data)!=null&&k.message&&(c.value.message=n.error.response.data.message),a("error",n.error);return}c.value=null});const ae=e.ref({ctaPath:b.value?void 0:o.config.createRoute,ctaText:void 0,message:`${r("consumers.list.empty_state.description")}${o.config.additionMessageForEmptyState?` ${o.config.additionMessageForEmptyState}`:""}`,title:r("consumers.title")});return e.onBeforeMount(async()=>{await o.canCreate()&&(ae.value.title=b.value?r("consumers.list.empty_state.title_for_consumer_group"):r("consumers.list.empty_state.title"),ae.value.ctaText=b.value?r("consumers.actions.add_consumer"):r("consumers.actions.create"))}),(n,l)=>{const y=e.resolveComponent("KButton"),k=e.resolveComponent("KDropdownItem"),F=e.resolveComponent("KClipboardProvider"),et=e.resolveComponent("KPrompt");return e.openBlock(),e.createElementBlock("div",De,[e.createVNode(e.unref(d.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":B.value,"empty-state-options":ae.value,"enable-entity-actions":"","error-message":c.value,fetcher:e.unref(W),"fetcher-cache-key":e.unref(s),"hide-pagination":b.value&&!t.config.paginatedEndpoint,"pagination-type":"offset","preferences-storage-key":E.value,query:D.value,"row-attributes":H,"table-headers":e.unref(m),onClearSearchInput:f,"onClick:row":l[4]||(l[4]=p=>w(p)),onEmptyStateCtaClicked:ze,onSort:S,onState:e.unref(O)},e.createSlots({"toolbar-filter":e.withCtx(()=>[b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(d.EntityFilter),{key:0,modelValue:D.value,"onUpdate:modelValue":l[0]||(l[0]=p=>D.value=p),config:Q.value},null,8,["modelValue","config"]))]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",$e,[!b.value&&A.value?(e.openBlock(),e.createBlock(y,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"consumers-learn-more-button",icon:"",onClick:l[1]||(l[1]=p=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(y,{appearance:"primary","data-testid":"toolbar-add-consumer",size:t.useActionOutside?"medium":"large",onClick:K},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.AddIcon)),e.createTextVNode(" "+e.toDisplayString(t.config.consumerGroupId?e.unref(r)("consumers.actions.add_consumer"):e.unref(r)("consumers.list.toolbar_actions.new_consumer")),1)]),_:1},8,["size"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),username:e.withCtx(({rowValue:p})=>[e.createElementVNode("b",null,e.toDisplayString(h(p)),1)]),custom_id:e.withCtx(({rowValue:p})=>[e.createTextVNode(e.toDisplayString(h(p)),1)]),tags:e.withCtx(({rowValue:p})=>[e.createVNode(e.unref(d.TableTags),{tags:p},null,8,["tags"])]),actions:e.withCtx(({row:p})=>[e.createVNode(F,null,{default:e.withCtx(({copyToClipboard:te})=>[e.createVNode(k,{"data-testid":"action-entity-copy-id",onClick:tt=>C(p,te)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("consumers.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(F,null,{default:e.withCtx(({copyToClipboard:te})=>[e.createVNode(k,{"data-testid":"action-entity-copy-json",onClick:tt=>g(p,te)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("consumers.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(p)},{default:e.withCtx(()=>[e.createVNode(k,{"data-testid":"action-entity-view","has-divider":"",item:J(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>t.canEdit(p)},{default:e.withCtx(()=>[e.createVNode(k,{"data-testid":"action-entity-edit",item:T(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>t.canDelete(p)},{default:e.withCtx(()=>[e.createVNode(k,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:()=>t.config.consumerGroupId?Xe(p):We(p)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.config.consumerGroupId?e.unref(r)("consumers.actions.remove"):e.unref(r)("consumers.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!e.unref(U)&&z.value?{name:"outside-actions",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(y,{appearance:"secondary",class:"open-learning-hub","data-testid":"consumers-learn-more-button",icon:"",onClick:l[2]||(l[2]=p=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!D.value&&t.enableV2EmptyStates&&t.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var p;return[e.createVNode(e.unref(d.EntityEmptyState),{"action-button-text":e.unref(r)("consumers.list.toolbar_actions.new_consumer"),appearance:"secondary","can-create":()=>t.canCreate(),"data-testid":t.config.consumerGroupId?"nested-consumers-entity-empty-state":"consumers-entity-empty-state",description:e.unref(r)("consumers.list.empty_state_v2.description"),"learn-more":t.config.app==="konnect",title:e.unref(r)("consumers.list.empty_state_v2.title"),"onClick:create":K,"onClick:learnMore":l[3]||(l[3]=te=>n.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",Se,[e.createVNode(e.unref(Y.TeamIcon),{color:e.unref(he),size:e.unref(Ce)},null,8,["color","size"])])]),_:2},[(p=t.config)!=null&&p.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("consumers.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","data-testid","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","hide-pagination","preferences-storage-key","query","table-headers","onState"]),e.createVNode(e.unref(d.EntityDeleteModal),{"action-button-disabled":ee.value,"data-testid":"delete-consumer-modal",description:e.unref(r)("consumers.delete.description"),"entity-name":G.value&&(G.value.username||G.value.custom_id||G.value.id),"entity-type":e.unref(d.EntityTypes).Consumer,error:de.value,title:e.unref(r)("consumers.delete.title"),visible:v.value,onCancel:Je,onProceed:Qe},null,8,["action-button-disabled","description","entity-name","entity-type","error","title","visible"]),t.config.consumerGroupId?(e.openBlock(),e.createBlock(Be,{key:0,config:t.config,"data-testid":"add-consumer-modal",visible:re.value,"onAdd:partialSuccess":l[5]||(l[5]=p=>pe(p,!0)),"onAdd:success":l[6]||(l[6]=p=>pe(p)),onCancel:me},null,8,["config","visible"])):e.createCommentVNode("",!0),t.config.consumerGroupId&&R.value?(e.openBlock(),e.createBlock(et,{key:1,"action-button-appearance":"danger","data-testid":"remove-consumer-modal",title:e.unref(r)("consumers.consumer_groups.remove.title"),visible:se.value,onCancel:fe,onProceed:ve},{default:e.withCtx(()=>[e.createVNode(e.unref(x),{class:"message",keypath:t.config.consumerGroupName?"consumers.consumer_groups.remove.confirmation":"consumers.consumer_groups.remove.confirmationNoCG",tag:"p"},e.createSlots({consumer:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(R.value.username||R.value.custom_id||R.value.id),1)]),_:2},[t.config.consumerGroupName?{name:"consumerGroup",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(t.config.consumerGroupName),1)]),key:"0"}:void 0]),1032,["keypath"]),e.createElementVNode("p",null,e.toDisplayString(e.unref(r)("consumers.consumer_groups.remove.description")),1)]),_:1},8,["title","visible"])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-db14b8d1"]]);for(var _=[],ne=0;ne<256;++ne)_.push((ne+256).toString(16).slice(1));function Ge(t,u=0){return(_[t[u+0]]+_[t[u+1]]+_[t[u+2]]+_[t[u+3]]+"-"+_[t[u+4]]+_[t[u+5]]+"-"+_[t[u+6]]+_[t[u+7]]+"-"+_[t[u+8]]+_[t[u+9]]+"-"+_[t[u+10]]+_[t[u+11]]+_[t[u+12]]+_[t[u+13]]+_[t[u+14]]+_[t[u+15]]).toLowerCase()}var Z,Me=new Uint8Array(16);function Ae(){if(!Z&&(Z=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Z))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Z(Me)}var Re=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const le={randomUUID:Re};function Pe(t,u,a){if(le.randomUUID&&!u&&!t)return le.randomUUID();t=t||{};var o=t.random||(t.rng||Ae)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Ge(o)}const Ue={class:"kong-ui-entities-consumer-form"},Fe=["id"],qe={class:"fields-group-text"},Ke=["aria-labelledby"],Oe=oe(e.defineComponent({__name:"ConsumerForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||(t==null?void 0:t.app)==="konnect"&&!(t!=null&&t.controlPlaneId)||(t==null?void 0:t.app)==="kongManager"&&typeof(t==null?void 0:t.workspace)!="string"||!(t!=null&&t.cancelRoute))},consumerId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:u}){var W;const a=t,o=u,{i18nT:x,i18n:{t:r}}=X.useI18n(),V=ie.useRouter(),{axiosInstance:I}=d.useAxios((W=a.config)==null?void 0:W.axiosRequestConfig),{getMessageFromError:B}=d.useErrors(),M=Pe(),m=e.reactive({fields:{username:"",customId:"",tags:""},readonly:!1,errorMessage:""}),H=e.reactive({username:"",customId:"",tags:""}),K=e.computed(()=>{var i,s;return(s=q.form[(i=a.config)==null?void 0:i.app])==null?void 0:s.edit}),P=()=>{var i;V.push(((i=a.config)==null?void 0:i.cancelRoute)||{name:"consumer-list"})},D=i=>{o("loading",i)},Q=i=>{o("error",i)},U=i=>{var f,S,h;m.fields.username=((f=i==null?void 0:i.item)==null?void 0:f.username)||(i==null?void 0:i.username)||"",m.fields.customId=((S=i==null?void 0:i.item)==null?void 0:S.custom_id)||(i==null?void 0:i.custom_id)||"";const s=((h=i==null?void 0:i.item)==null?void 0:h.tags)||(i==null?void 0:i.tags)||[];m.fields.tags=(s==null?void 0:s.join(", "))||"",Object.assign(H,m.fields)},O=e.computed(()=>a.consumerId?d.EntityBaseFormType.Edit:d.EntityBaseFormType.Create),A=i=>{var f,S,h,c,C,g;let s=`${(f=a.config)==null?void 0:f.apiBaseUrl}${q.form[(S=a.config)==null?void 0:S.app][i]}`;return((h=a.config)==null?void 0:h.app)==="konnect"?s=s.replace(/{controlPlaneId}/gi,((c=a.config)==null?void 0:c.controlPlaneId)||""):((C=a.config)==null?void 0:C.app)==="kongManager"&&(s=s.replace(/\/{workspace}/gi,(g=a.config)!=null&&g.workspace?`/${a.config.workspace}`:"")),s=s.replace(/{id}/gi,a.consumerId),s},z=e.computed(()=>!!m.fields.username||!!m.fields.customId),b=e.computed(()=>JSON.stringify(m.fields)!==JSON.stringify(H)),E=e.computed(()=>{var i,s;return{username:m.fields.username||null,custom_id:m.fields.customId||null,tags:(s=(i=m.fields.tags.split(","))==null?void 0:i.map(f=>String(f||"").trim()))==null?void 0:s.filter(f=>f!=="")}}),$=async()=>{var i;try{m.readonly=!0;let s;await I.post(A("validate"),E.value),O.value==="create"?s=await I.post(A("create"),E.value):O.value==="edit"&&(s=((i=a.config)==null?void 0:i.app)==="konnect"?await I.put(A("edit"),E.value):await I.patch(A("edit"),E.value)),U(s==null?void 0:s.data),o("update",s==null?void 0:s.data)}catch(s){m.errorMessage=B(s),o("error",s)}finally{m.readonly=!1}};return(i,s)=>{const f=e.resolveComponent("KInput"),S=e.resolveComponent("KCard");return e.openBlock(),e.createElementBlock("div",Ue,[e.createVNode(e.unref(d.EntityBaseForm),{"can-submit":z.value&&b.value,config:t.config,"edit-id":t.consumerId,"entity-type":e.unref(d.SupportedEntityType).Consumer,"error-message":m.errorMessage,"fetch-url":K.value,"form-fields":E.value,"is-readonly":m.readonly,onCancel:P,"onFetch:error":s[3]||(s[3]=h=>Q(h)),"onFetch:success":U,onLoading:s[4]||(s[4]=h=>D(h)),onSubmit:$},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(d.EntityFormSection),{description:e.unref(r)("consumers.form.info.description"),"has-divider":"",title:e.unref(r)("consumers.form.info.title")},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("h3",{id:`fields-group-title-${e.unref(M)}`,class:"fields-group-title"},e.toDisplayString(e.unref(r)("consumers.form.consumer_identification.title"))+"* ",9,Fe),e.createElementVNode("p",qe,e.toDisplayString(e.unref(r)("consumers.form.consumer_identification.description")),1)]),e.createVNode(S,null,{default:e.withCtx(()=>[e.createElementVNode("fieldset",{"aria-labelledby":`fields-group-title-${e.unref(M)}`},[e.createVNode(f,{modelValue:m.fields.username,"onUpdate:modelValue":s[0]||(s[0]=h=>m.fields.username=h),modelModifiers:{trim:!0},autocomplete:"off",class:"username-field","data-testid":"consumer-form-username",label:e.unref(r)("consumers.fields.username.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(r)("consumers.fields.username.placeholder"),readonly:m.readonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(x),{keypath:"consumers.fields.username.tooltip",scope:"global"},{custom_id:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("consumers.fields.username.custom_id")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"]),e.createVNode(f,{modelValue:m.fields.customId,"onUpdate:modelValue":s[1]||(s[1]=h=>m.fields.customId=h),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-form-custom-id",label:e.unref(r)("consumers.fields.custom_id.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(r)("consumers.fields.custom_id.placeholder"),readonly:m.readonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(x),{keypath:"consumers.fields.custom_id.tooltip",scope:"global"},{username:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("consumers.fields.custom_id.username")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"])],8,Ke)]),_:1}),e.createVNode(f,{modelValue:m.fields.tags,"onUpdate:modelValue":s[2]||(s[2]=h=>m.fields.tags=h),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-form-tags",help:e.unref(r)("consumers.fields.tags.help"),label:e.unref(r)("consumers.fields.tags.label"),"label-attributes":{info:e.unref(r)("consumers.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(r)("consumers.fields.tags.placeholder"),readonly:m.readonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-5580f86e"]]),je={class:"kong-ui-consumer-entity-config-card"},Le=e.defineComponent({__name:"ConsumerConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(t){const u=t,{i18n:{t:a},i18nT:o}=X.useI18n(),x=e.computed(()=>q.form[u.config.app].edit),r=e.ref({id:{},username:{section:d.ConfigurationSchemaSection.Basic,tooltip:a("consumers.fields.username.tooltip"),order:1},custom_id:{section:d.ConfigurationSchemaSection.Basic,tooltip:a("consumers.fields.custom_id.tooltip"),label:a("consumers.fields.custom_id.label"),order:2},updated_at:{},created_at:{},tags:{tooltip:a("consumers.fields.tags.tooltip")},username_lower:{hidden:!0},type:{hidden:!0}});return(V,I)=>(e.openBlock(),e.createElementBlock("div",je,[e.createVNode(e.unref(d.EntityBaseConfigCard),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":r.value,"entity-type":e.unref(d.SupportedEntityType).Consumer,"fetch-url":x.value,"hide-title":t.hideTitle,"onFetch:error":I[0]||(I[0]=B=>V.$emit("fetch:error",B)),"onFetch:success":I[1]||(I[1]=B=>V.$emit("fetch:success",B)),onLoading:I[2]||(I[2]=B=>V.$emit("loading",B))},{"username-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(o),{keypath:"consumers.fields.username.tooltip",scope:"global"},{custom_id:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("consumers.fields.username.custom_id")),1)]),_:1})]),"custom_id-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(o),{keypath:"consumers.fields.custom_id.tooltip",scope:"global"},{username:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("consumers.fields.custom_id.username")),1)]),_:1})]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});N.ConsumerConfigCard=Le,N.ConsumerForm=Oe,N.ConsumerList=Te,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-761f7e64]{align-items:center;border-bottom:var(--3ccdd5d2);box-sizing:border-box;display:var(--4b1da305);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-761f7e64]{box-sizing:border-box;padding-right:16px;width:var(--cd20788a)}.config-card-details-row .config-card-details-label label[data-v-761f7e64]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-761f7e64]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-761f7e64]{min-width:0}.config-card-details-row .config-card-details-value[data-v-761f7e64]{box-sizing:border-box;width:var(--cd1becd4)}.config-card-details-row .config-card-details-value .truncated[data-v-761f7e64]{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-761f7e64]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-761f7e64] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-761f7e64]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-761f7e64]{margin-right:4px}.config-card-details-row[data-v-761f7e64] .k-label{margin-bottom:0}.config-card-details-row[data-v-761f7e64] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-761f7e64] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--54aebfa2);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-be491a0e]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-be491a0e]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-be491a0e]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-be491a0e] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-be491a0e]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-18af080f]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-18af080f] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-18af080f] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-18af080f] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-18af080f] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-18af080f]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-18af080f] .k-button:last-of-type,.form-actions[data-v-18af080f] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-d58db70c]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-d58db70c]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-d58db70c]{display:none}.kong-ui-entity-base-table[data-v-d58db70c] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{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-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{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-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] 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-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-6f25ab21]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-6f25ab21]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-6f25ab21]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-6f25ab21] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-6f25ab21]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-6f25ab21]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-6f25ab21]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-48ae9c8c]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-48ae9c8c]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-48ae9c8c]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-48ae9c8c]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-48ae9c8c]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-48ae9c8c]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-48ae9c8c],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-48ae9c8c]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-48ae9c8c],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-48ae9c8c]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-48ae9c8c]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-48ae9c8c]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-48ae9c8c]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-48ae9c8c]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-48ae9c8c]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-48ae9c8c]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-48ae9c8c] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-48ae9c8c]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-48ae9c8c]{width:640px}}.kong-ui-entities-add-consumers-modal .add-consumer-form-cta[data-v-d54468ab]{margin-top:0}.kong-ui-entities-add-consumers-modal .add-consumer-form-container[data-v-d54468ab]{margin-bottom:20px}.kong-ui-entities-add-consumers-modal .add-consumer-form-container .kong-ui-entity-add-consumers-error[data-v-d54468ab]{margin-top:16px}.button-row[data-v-765d41cc]{align-items:center;display:flex;gap:12px}.kong-ui-entities-consumers-list[data-v-765d41cc]{width:100%}.kong-ui-entities-consumers-list .message[data-v-765d41cc]{margin-top:0}.kong-ui-entities-consumers-list .kong-ui-entity-filter-input[data-v-765d41cc]{margin-right:12px}.kong-ui-entities-consumer-form[data-v-5580f86e]{width:100%}@media screen and (min-width: 1280px){.kong-ui-entities-consumer-form[data-v-5580f86e] .form-section-wrapper{column-gap:64px}}.kong-ui-entities-consumer-form fieldset[data-v-5580f86e]{border:none;margin:0;padding:0}.fields-group-title[data-v-5580f86e]{color:#232633;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-5580f86e]{color:#00000073;font-size:14px;line-height:20px;margin-bottom:0;margin-top:0}.username-field[data-v-5580f86e]{margin-bottom:16px}
1
+ .config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-761f7e64]{align-items:center;border-bottom:var(--3ccdd5d2);box-sizing:border-box;display:var(--4b1da305);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-761f7e64]{box-sizing:border-box;padding-right:16px;width:var(--cd20788a)}.config-card-details-row .config-card-details-label label[data-v-761f7e64]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-761f7e64]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-761f7e64]{min-width:0}.config-card-details-row .config-card-details-value[data-v-761f7e64]{box-sizing:border-box;width:var(--cd1becd4)}.config-card-details-row .config-card-details-value .truncated[data-v-761f7e64]{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-761f7e64]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-761f7e64] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-761f7e64]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-761f7e64]{margin-right:4px}.config-card-details-row[data-v-761f7e64] .k-label{margin-bottom:0}.config-card-details-row[data-v-761f7e64] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-761f7e64] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--54aebfa2);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-be491a0e]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-be491a0e]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-be491a0e]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-be491a0e] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-be491a0e]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-18af080f]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-18af080f] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-18af080f] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-18af080f] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-18af080f] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-18af080f]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-18af080f] .k-button:last-of-type,.form-actions[data-v-18af080f] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-d58db70c]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-d58db70c]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-d58db70c]{display:none}.kong-ui-entity-base-table[data-v-d58db70c] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{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-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{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-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] 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-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-6f25ab21]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-6f25ab21]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-6f25ab21]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-6f25ab21] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-6f25ab21]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-6f25ab21]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-6f25ab21]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-48ae9c8c]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-48ae9c8c]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-48ae9c8c]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-48ae9c8c]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-48ae9c8c]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-48ae9c8c]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-48ae9c8c],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-48ae9c8c]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-48ae9c8c],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-48ae9c8c]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-48ae9c8c]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-48ae9c8c]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-48ae9c8c]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-48ae9c8c]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-48ae9c8c]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-48ae9c8c]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-48ae9c8c] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-48ae9c8c]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-48ae9c8c]{width:640px}}.kong-ui-entities-add-consumers-modal .add-consumer-form-cta[data-v-d54468ab]{margin-top:0}.kong-ui-entities-add-consumers-modal .add-consumer-form-container[data-v-d54468ab]{margin-bottom:20px}.kong-ui-entities-add-consumers-modal .add-consumer-form-container .kong-ui-entity-add-consumers-error[data-v-d54468ab]{margin-top:16px}.button-row[data-v-db14b8d1]{align-items:center;display:flex;gap:12px}.kong-ui-entities-consumers-list[data-v-db14b8d1]{width:100%}.kong-ui-entities-consumers-list .message[data-v-db14b8d1]{margin-top:0}.kong-ui-entities-consumers-list .kong-ui-entity-filter-input[data-v-db14b8d1]{margin-right:12px}.kong-ui-entities-consumer-form[data-v-5580f86e]{width:100%}@media screen and (min-width: 1280px){.kong-ui-entities-consumer-form[data-v-5580f86e] .form-section-wrapper{column-gap:64px}}.kong-ui-entities-consumer-form fieldset[data-v-5580f86e]{border:none;margin:0;padding:0}.fields-group-title[data-v-5580f86e]{color:#232633;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-5580f86e]{color:#00000073;font-size:14px;line-height:20px;margin-bottom:0;margin-top:0}.username-field[data-v-5580f86e]{margin-bottom:16px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-consumers",
3
- "version": "3.9.6",
3
+ "version": "3.9.7",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-consumers.umd.js",
6
6
  "module": "./dist/entities-consumers.es.js",
@@ -21,37 +21,23 @@
21
21
  "access": "public"
22
22
  },
23
23
  "peerDependencies": {
24
+ "@kong-ui-public/entities-shared": "workspace:^",
25
+ "@kong-ui-public/i18n": "workspace:^",
24
26
  "@kong/icons": "^1.21.2",
25
27
  "@kong/kongponents": "^9.21.6",
26
28
  "axios": "^1.7.7",
27
29
  "vue": ">= 3.3.13 < 4",
28
- "vue-router": "^4.4.5",
29
- "@kong-ui-public/entities-shared": "^3.19.3",
30
- "@kong-ui-public/i18n": "^2.2.10"
30
+ "vue-router": "^4.4.5"
31
31
  },
32
32
  "devDependencies": {
33
+ "@kong-ui-public/entities-shared": "^3.19.3",
34
+ "@kong-ui-public/i18n": "^2.2.10",
33
35
  "@kong/design-tokens": "1.17.3",
34
36
  "@kong/icons": "^1.21.2",
35
37
  "@kong/kongponents": "9.21.6",
36
38
  "axios": "^1.7.7",
37
39
  "vue": "^3.5.13",
38
- "vue-router": "^4.4.5",
39
- "@kong-ui-public/entities-shared": "^3.19.3",
40
- "@kong-ui-public/i18n": "^2.2.10"
41
- },
42
- "repository": {
43
- "type": "git",
44
- "url": "https://github.com/Kong/public-ui-components.git",
45
- "directory": "packages/entities/entities-consumers"
46
- },
47
- "homepage": "https://github.com/Kong/public-ui-components/tree/main/packages/entities/entities-consumers",
48
- "author": "Kong, Inc.",
49
- "license": "Apache-2.0",
50
- "volta": {
51
- "extends": "../../../package.json"
52
- },
53
- "distSizeChecker": {
54
- "errorLimit": "500KB"
40
+ "vue-router": "^4.4.5"
55
41
  },
56
42
  "scripts": {
57
43
  "dev": "cross-env USE_SANDBOX=true vite",
@@ -70,5 +56,20 @@
70
56
  "test:component:open": "BABEL_ENV=cypress cross-env FORCE_COLOR=1 cypress open --component -b chrome --project '../../../.'",
71
57
  "test:unit": "cross-env FORCE_COLOR=1 vitest run",
72
58
  "test:unit:open": "cross-env FORCE_COLOR=1 vitest --ui"
73
- }
74
- }
59
+ },
60
+ "repository": {
61
+ "type": "git",
62
+ "url": "https://github.com/Kong/public-ui-components.git",
63
+ "directory": "packages/entities/entities-consumers"
64
+ },
65
+ "homepage": "https://github.com/Kong/public-ui-components/tree/main/packages/entities/entities-consumers",
66
+ "author": "Kong, Inc.",
67
+ "license": "Apache-2.0",
68
+ "volta": {
69
+ "extends": "../../../package.json"
70
+ },
71
+ "distSizeChecker": {
72
+ "errorLimit": "500KB"
73
+ },
74
+ "gitHead": "fb43f17c1677bdc8361d7845e3a019db3899d92d"
75
+ }