@kong-ui-public/entities-consumers 3.9.18 → 3.9.19
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.
|
@@ -756,7 +756,7 @@ const me = {
|
|
|
756
756
|
]);
|
|
757
757
|
};
|
|
758
758
|
}
|
|
759
|
-
}), zt = /* @__PURE__ */ Ce(Dt, [["__scopeId", "data-v-
|
|
759
|
+
}), zt = /* @__PURE__ */ Ce(Dt, [["__scopeId", "data-v-30516065"]]);
|
|
760
760
|
var G = [];
|
|
761
761
|
for (var ye = 0; ye < 256; ++ye)
|
|
762
762
|
G.push((ye + 256).toString(16).slice(1));
|
|
@@ -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,le,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=le.createI18n("en-us",be);return{i18n:t,i18nT:le.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=l=>l,$=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(l=>({label:l.username||l.customId,value:l.id,selected:V.value.includes(l.id),data:l}))),A=l=>{var g;const C=U.value?K.value.find(w=>w.id===l):(g=M.value)==null?void 0:g.find(w=>w.id===l);return C?C.username||C.custom_id:l},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 l=V.value.map(w=>s(w)),C=await Promise.allSettled(l);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{D.value=a("consumers.errors.add"),x("error",D.value)}finally{E.value=!1}},i=e.computed(()=>{var C,g,w,J;let l=`${o.config.apiBaseUrl}${q.list[o.config.app].forConsumerGroup}`;return o.config.app==="konnect"?l=l.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"&&(l=l.replace(/\/{workspace}/gi,(w=o.config)!=null&&w.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((J=o.config)==null?void 0:J.consumerGroupId)||"")),l}),s=async l=>{const C={consumer:l};try{const g=await r.post(i.value,C);return b.value.push(l),g}catch(g){let w=`${A(l)} - ${g.message}`;return g.response.status===409&&(w=`${A(l)} - ${a("consumers.errors.already_added")}`),Promise.reject(Error(w))}},f=e.ref([]),S=l=>{f.value=l.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}),(l,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||$.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||$.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"]]),$e={class:"kong-ui-entities-consumers-list"},De={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 c,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,((c=o.config)==null?void 0:c.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}),$=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($),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=()=>{$.value=""},S=()=>{s.value++},h=n=>n??"-",l=e.ref(null),C=async(n,c)=>{const y=n.id;if(!await c(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,c)=>{const y=JSON.stringify(n);if(!c(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,c,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=(c=k.response)==null?void 0:c.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,c)=>{c||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 c,y,k,F;let n=`${o.config.apiBaseUrl}${q.list[o.config.app].oneForConsumerGroup}`;return o.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((c=o.config)==null?void 0:c.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 c,y,k;if(n.status===d.FetcherStatus.Error){l.value={title:r("consumers.errors.general")},(k=(y=(c=n.error)==null?void 0:c.response)==null?void 0:y.data)!=null&&k.message&&(l.value.message=n.error.response.data.message),a("error",n.error);return}l.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,c)=>{const y=e.resolveComponent("KButton"),k=e.resolveComponent("KDropdownItem"),F=e.resolveComponent("KClipboardProvider"),et=e.resolveComponent("KPrompt");return e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(e.unref(d.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":B.value,"empty-state-options":ae.value,"enable-entity-actions":"","error-message":l.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:$.value,"row-attributes":H,"table-headers":e.unref(m),onClearSearchInput:f,"onClick:row":c[4]||(c[4]=p=>w(p)),onEmptyStateCtaClicked:ze,onSort:S,onState:e.unref(O)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.renderSlot(n.$slots,"toolbar-filter",{},void 0,!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(d.EntityFilter),{key:0,modelValue:$.value,"onUpdate:modelValue":c[0]||(c[0]=p=>$.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",De,[!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:c[1]||(c[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:c[2]||(c[2]=p=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!$.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":c[3]||(c[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":c[5]||(c[5]=p=>pe(p,!0)),"onAdd:success":c[6]||(c[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-be18da6e"]]);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 ce={randomUUID:Re};function Pe(t,u,a){if(ce.randomUUID&&!u&&!t)return ce.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"})},$=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,l,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,((l=a.config)==null?void 0:l.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"),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=>$(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(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"})});
|
|
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,le,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=le.createI18n("en-us",be);return{i18n:t,i18nT:le.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=l=>l,$=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(l=>({label:l.username||l.customId,value:l.id,selected:V.value.includes(l.id),data:l}))),A=l=>{var g;const C=U.value?K.value.find(w=>w.id===l):(g=M.value)==null?void 0:g.find(w=>w.id===l);return C?C.username||C.custom_id:l},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 l=V.value.map(w=>s(w)),C=await Promise.allSettled(l);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{D.value=a("consumers.errors.add"),x("error",D.value)}finally{E.value=!1}},i=e.computed(()=>{var C,g,w,J;let l=`${o.config.apiBaseUrl}${q.list[o.config.app].forConsumerGroup}`;return o.config.app==="konnect"?l=l.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"&&(l=l.replace(/\/{workspace}/gi,(w=o.config)!=null&&w.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((J=o.config)==null?void 0:J.consumerGroupId)||"")),l}),s=async l=>{const C={consumer:l};try{const g=await r.post(i.value,C);return b.value.push(l),g}catch(g){let w=`${A(l)} - ${g.message}`;return g.response.status===409&&(w=`${A(l)} - ${a("consumers.errors.already_added")}`),Promise.reject(Error(w))}},f=e.ref([]),S=l=>{f.value=l.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}),(l,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||$.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||$.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"]]),$e={class:"kong-ui-entities-consumers-list"},De={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 c,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,((c=o.config)==null?void 0:c.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}),$=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($),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=()=>{$.value=""},S=()=>{s.value++},h=n=>n??"-",l=e.ref(null),C=async(n,c)=>{const y=n.id;if(!await c(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,c)=>{const y=JSON.stringify(n);if(!c(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,c,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=(c=k.response)==null?void 0:c.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,c)=>{c||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 c,y,k,F;let n=`${o.config.apiBaseUrl}${q.list[o.config.app].oneForConsumerGroup}`;return o.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((c=o.config)==null?void 0:c.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 c,y,k;if(n.status===d.FetcherStatus.Error){l.value={title:r("consumers.errors.general")},(k=(y=(c=n.error)==null?void 0:c.response)==null?void 0:y.data)!=null&&k.message&&(l.value.message=n.error.response.data.message),a("error",n.error);return}l.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,c)=>{const y=e.resolveComponent("KButton"),k=e.resolveComponent("KDropdownItem"),F=e.resolveComponent("KClipboardProvider"),et=e.resolveComponent("KPrompt");return e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(e.unref(d.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":B.value,"empty-state-options":ae.value,"enable-entity-actions":"","error-message":l.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:$.value,"row-attributes":H,"table-headers":e.unref(m),onClearSearchInput:f,"onClick:row":c[4]||(c[4]=p=>w(p)),onEmptyStateCtaClicked:ze,onSort:S,onState:e.unref(O)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.renderSlot(n.$slots,"toolbar-filter",{},void 0,!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(d.EntityFilter),{key:0,modelValue:$.value,"onUpdate:modelValue":c[0]||(c[0]=p=>$.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",De,[!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:c[1]||(c[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:c[2]||(c[2]=p=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!$.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":c[3]||(c[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":c[5]||(c[5]=p=>pe(p,!0)),"onAdd:success":c[6]||(c[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-30516065"]]);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 ce={randomUUID:Re};function Pe(t,u,a){if(ce.randomUUID&&!u&&!t)return ce.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"})},$=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,l,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,((l=a.config)==null?void 0:l.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"),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=>$(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(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-a19fafa9]{align-items:center;border-bottom:var(--eaabfd90);box-sizing:border-box;display:var(--ea5e332a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-a19fafa9]{box-sizing:border-box;padding-right:16px;width:var(--f719ead6)}.config-card-details-row .config-card-details-label label[data-v-a19fafa9]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-a19fafa9]{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-a19fafa9]{min-width:0}.config-card-details-row .config-card-details-value[data-v-a19fafa9]{box-sizing:border-box;width:var(--f7155f20)}.config-card-details-row .config-card-details-value .truncated[data-v-a19fafa9]{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-a19fafa9]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-a19fafa9] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-a19fafa9]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-a19fafa9]{margin-right:4px}.config-card-details-row[data-v-a19fafa9] .k-label{margin-bottom:0}.config-card-details-row[data-v-a19fafa9] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-a19fafa9] .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-e8247cfa]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-e8247cfa] .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-e8247cfa] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-e8247cfa] .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-e8247cfa] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-e8247cfa]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-e8247cfa] .k-button:last-of-type,.form-actions[data-v-e8247cfa] .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-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{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-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{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-be18da6e]{align-items:center;display:flex;gap:12px}.kong-ui-entities-consumers-list[data-v-be18da6e]{width:100%}.kong-ui-entities-consumers-list .message[data-v-be18da6e]{margin-top:0}.kong-ui-entities-consumers-list .kong-ui-entity-filter-input[data-v-be18da6e]{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-a19fafa9]{align-items:center;border-bottom:var(--eaabfd90);box-sizing:border-box;display:var(--ea5e332a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-a19fafa9]{box-sizing:border-box;padding-right:16px;width:var(--f719ead6)}.config-card-details-row .config-card-details-label label[data-v-a19fafa9]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-a19fafa9]{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-a19fafa9]{min-width:0}.config-card-details-row .config-card-details-value[data-v-a19fafa9]{box-sizing:border-box;width:var(--f7155f20)}.config-card-details-row .config-card-details-value .truncated[data-v-a19fafa9]{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-a19fafa9]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-a19fafa9] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-a19fafa9]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-a19fafa9]{margin-right:4px}.config-card-details-row[data-v-a19fafa9] .k-label{margin-bottom:0}.config-card-details-row[data-v-a19fafa9] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-a19fafa9] .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-e8247cfa]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-e8247cfa] .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-e8247cfa] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-e8247cfa] .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-e8247cfa] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-e8247cfa]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-e8247cfa] .k-button:last-of-type,.form-actions[data-v-e8247cfa] .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-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{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-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{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-30516065]{align-items:center;display:flex;gap:12px}.kong-ui-entities-consumers-list[data-v-30516065]{width:100%}.kong-ui-entities-consumers-list .message[data-v-30516065]{margin-top:0}.kong-ui-entities-consumers-list .kong-ui-entity-filter-input[data-v-30516065]{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.
|
|
3
|
+
"version": "3.9.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-consumers.umd.js",
|
|
6
6
|
"module": "./dist/entities-consumers.es.js",
|
|
@@ -21,22 +21,22 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@kong/icons": "^1.
|
|
25
|
-
"@kong/kongponents": "^9.
|
|
24
|
+
"@kong/icons": "^1.25.1",
|
|
25
|
+
"@kong/kongponents": "^9.29.3",
|
|
26
26
|
"axios": "^1.7.7",
|
|
27
27
|
"vue": ">= 3.3.13 < 4",
|
|
28
28
|
"vue-router": "^4.4.5",
|
|
29
|
-
"@kong-ui-public/entities-shared": "^3.22.
|
|
29
|
+
"@kong-ui-public/entities-shared": "^3.22.1",
|
|
30
30
|
"@kong-ui-public/i18n": "^2.3.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@kong/design-tokens": "1.17.3",
|
|
34
|
-
"@kong/icons": "^1.
|
|
35
|
-
"@kong/kongponents": "9.
|
|
34
|
+
"@kong/icons": "^1.25.1",
|
|
35
|
+
"@kong/kongponents": "9.29.3",
|
|
36
36
|
"axios": "^1.7.7",
|
|
37
37
|
"vue": "^3.5.13",
|
|
38
38
|
"vue-router": "^4.4.5",
|
|
39
|
-
"@kong-ui-public/entities-shared": "^3.22.
|
|
39
|
+
"@kong-ui-public/entities-shared": "^3.22.1",
|
|
40
40
|
"@kong-ui-public/i18n": "^2.3.0"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|